screenreader-speech-capture 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/cli.mjs +984 -278
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/{CM9WugkD.js → 0YgL1EU2.js} +36 -36
- package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js.br +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{Fimt9aTv.js → Cba3ZwaX.js} +11 -11
- package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.br +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js +4 -0
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/{start.uodUAHNT.js → start.Dluk7nQO.js} +2 -2
- package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.br +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js +52 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js +5 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{4.DY8qq4Io.js → 4.CMHCNMDn.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +97 -54
- package/dist/ui/server/chunks/composition.js +112 -118
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/config.js +139 -3
- package/dist/ui/server/chunks/config.js.map +1 -1
- package/dist/ui/server/chunks/exports.js +19 -204
- package/dist/ui/server/chunks/exports.js.map +1 -1
- package/dist/ui/server/chunks/functions.js +1 -1
- package/dist/ui/server/chunks/icon-button.js +1 -1
- package/dist/ui/server/chunks/instance.js +9 -56
- package/dist/ui/server/chunks/instance.js.map +1 -1
- package/dist/ui/server/chunks/internal.js +55 -4
- package/dist/ui/server/chunks/internal.js.map +1 -1
- package/dist/ui/server/chunks/outlined-text-field.js +1 -1
- package/dist/ui/server/chunks/remote-1j2tn2d.js +4 -0
- package/dist/ui/server/chunks/remote.js +1565 -0
- package/dist/ui/server/chunks/remote.js.map +1 -0
- package/dist/ui/server/chunks/scope.js +13 -0
- package/dist/ui/server/chunks/scope.js.map +1 -0
- package/dist/ui/server/chunks/server-errors.js +48 -1
- package/dist/ui/server/chunks/server-errors.js.map +1 -1
- package/dist/ui/server/chunks/server2.js +24 -1
- package/dist/ui/server/chunks/server2.js.map +1 -1
- package/dist/ui/server/chunks/sessions.js +65 -0
- package/dist/ui/server/chunks/sessions.js.map +1 -0
- package/dist/ui/server/chunks/sessions.remote.js +56 -0
- package/dist/ui/server/chunks/sessions.remote.js.map +1 -0
- package/dist/ui/server/chunks/shared-errors.js +214 -0
- package/dist/ui/server/chunks/shared-errors.js.map +1 -0
- package/dist/ui/server/chunks/src.js +123 -44
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +3 -5
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +3 -4
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js +12 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +4 -9
- package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +2 -3
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +6 -9
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js +3 -3
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/status/_server.ts.js +2 -3
- package/dist/ui/server/entries/endpoints/api/status/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/fallbacks/error.svelte.js +1 -1
- package/dist/ui/server/entries/hooks.server.js +145 -1
- package/dist/ui/server/entries/hooks.server.js.map +1 -1
- package/dist/ui/server/entries/pages/_layout.server.ts.js +2 -3
- package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js +4 -2
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.server.ts.js +3 -3
- package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +8 -62
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.svelte.js +3 -2
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/params.js +60 -0
- package/dist/ui/server/entries/params.js.map +1 -0
- package/dist/ui/server/env.js +1 -1
- package/dist/ui/server/index.js +2 -2
- package/dist/ui/server/manifest-full.js +7 -6
- package/dist/ui/server/manifest.js +7 -6
- package/dist/ui/server/nodes/0.js +1 -1
- package/dist/ui/server/nodes/1.js +1 -1
- package/dist/ui/server/nodes/2.js +1 -1
- package/dist/ui/server/nodes/3.js +1 -1
- package/dist/ui/server/nodes/4.js +1 -1
- package/dist/ui/server/remote-entry.js +1 -1565
- package/dist/ui/server/server.js +7 -6
- package/package.json +3 -2
- package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js.br +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js.br +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js +0 -4
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js.br +0 -2
- package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.uodUAHNT.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.uodUAHNT.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js.br +0 -2
- package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js +0 -52
- package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js +0 -5
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.DY8qq4Io.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.DY8qq4Io.js.gz +0 -0
- package/dist/ui/server/chunks/bridge-api.js +0 -105
- package/dist/ui/server/chunks/bridge-api.js.map +0 -1
- package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js +0 -13
- package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js.map +0 -1
- package/dist/ui/server/remote-entry.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,G as r,H as i,I as a,K as o,L as s,N as c,O as l,P as u,R as d,T as f,U as p,V as m,W as h,c as g,g as _,h as v,i as y,j as b,l as x,m as S,n as C,o as w,p as T,q as E,t as D,u as O,w as k,x as A,y as j,z as M}from"../chunks/h7UQ89-l.js";import{t as N}from"../chunks/Dksil5Gu.js";import{t as P}from"../chunks/CVUOwNb5.js";import{B as F,C as I,D as L,E as R,F as z,H as B,L as V,M as H,U,V as W,c as ee,d as G,f as K,i as q,j as te,l as ne,m as J,n as Y,r as X,s as re,u as ie,z as Z}from"../chunks/CXrPUR7p.js";import{n as ae}from"../chunks/C67ohLw_.js";import"../chunks/DnL0kOQY.js";import"../chunks/Fimt9aTv.js";import{i as oe,n as se,r as ce,t as le}from"../chunks/CM9WugkD.js";var ue=e(`<div class="banner svelte-qexebn" role="note"><md-icon>warning</md-icon> <p class="svelte-qexebn"><strong>The speech log is hidden from the screen reader (aria-hidden).</strong> This page is opened on the bridge's own machine (loopback or its own network address): the screen
|
|
2
|
-
reader would read new rows aloud and they would be recorded again. Open the UI from another machine
|
|
3
|
-
to read the log with a screen reader.</p></div>`,2);function de(e){var t=ue(),n=a(t);w(n,`aria-hidden`,`true`),x(n,1,`svelte-qexebn`),o(2),E(t),A(e,t)}var fe=class extends oe{renderElevationOrOutline(){return z`<md-elevation part="elevation"></md-elevation>`}},pe=W`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)}
|
|
4
|
-
`;pe.styleSheet;var me=class extends fe{};me.styles=[se,ce,pe],me=U([B(`md-filled-tonal-button`)],me);var Q=class extends te{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}};U([F({type:Boolean,reflect:!0})],Q.prototype,`inset`,void 0),U([F({type:Boolean,reflect:!0,attribute:`inset-start`})],Q.prototype,`insetStart`,void 0),U([F({type:Boolean,reflect:!0,attribute:`inset-end`})],Q.prototype,`insetEnd`,void 0);var he=W`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
|
|
5
|
-
`;he.styleSheet;var ge=class extends Q{};ge.styles=[he],ge=U([B(`md-divider`)],ge);var _e={dialog:[[[{transform:`translateY(-50px)`},{transform:`translateY(0)`}],{duration:500,easing:R.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:`linear`}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:`linear`,pseudoElement:`::before`}],[[{height:`35%`},{height:`100%`}],{duration:500,easing:R.EMPHASIZED,pseudoElement:`::before`}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:`linear`,fill:`forwards`}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:`linear`,fill:`forwards`}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:`linear`,fill:`forwards`}]]},ve={dialog:[[[{transform:`translateY(0)`},{transform:`translateY(-50px)`}],{duration:150,easing:R.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:`linear`}]],container:[[[{height:`100%`},{height:`35%`}],{duration:150,easing:R.EMPHASIZED_ACCELERATE,pseudoElement:`::before`}],[[{opacity:`1`},{opacity:`0`}],{delay:100,duration:50,easing:`linear`,pseudoElement:`::before`}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]]},ye=I(te),$=class extends ye{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute(`open`,``),this.show()):(this.removeAttribute(`open`),this.close()))}constructor(){super(),this.quick=!1,this.returnValue=``,this.noFocusTrap=!1,this.getOpenAnimation=()=>_e,this.getCloseAnimation=()=>ve,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener(`submit`,this.handleSubmit)}async show(){this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;let e=this.dialog;e.open||!this.isOpening?this.isOpening=!1:this.dispatchEvent(new Event(`open`,{cancelable:!0}))?(e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),this.querySelector(`[autofocus]`)?.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event(`opened`)),this.isOpening=!1):(this.open=!1,this.isOpening=!1)}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;let t=this.dialog;if(!t.open||this.isOpening){this.open=!1;return}let n=this.returnValue;this.returnValue=e,this.dispatchEvent(new Event(`close`,{cancelable:!0}))?(await this.animateDialog(this.getCloseAnimation()),t.close(e),this.open=!1,this.dispatchEvent(new Event(`closed`))):this.returnValue=n}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){let e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),t={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},n=this.open&&!this.noFocusTrap,r=z`
|
|
6
|
-
<div
|
|
7
|
-
class="focus-trap"
|
|
8
|
-
tabindex="0"
|
|
9
|
-
aria-hidden="true"
|
|
10
|
-
@focus=${this.handleFocusTrapFocus}></div>
|
|
11
|
-
`,{ariaLabel:i}=this;return z`
|
|
12
|
-
<div class="scrim"></div>
|
|
13
|
-
<dialog
|
|
14
|
-
class=${L(t)}
|
|
15
|
-
aria-label=${i||H}
|
|
16
|
-
aria-labelledby=${this.hasHeadline?`headline`:H}
|
|
17
|
-
role=${this.type===`alert`?`alertdialog`:H}
|
|
18
|
-
@cancel=${this.handleCancel}
|
|
19
|
-
@click=${this.handleDialogClick}
|
|
20
|
-
@close=${this.handleClose}
|
|
21
|
-
@keydown=${this.handleKeydown}
|
|
22
|
-
.returnValue=${this.returnValue||H}>
|
|
23
|
-
${n?r:H}
|
|
24
|
-
<div class="container" @click=${this.handleContentClick}>
|
|
25
|
-
<div class="headline">
|
|
26
|
-
<div class="icon" aria-hidden="true">
|
|
27
|
-
<slot name="icon" @slotchange=${this.handleIconChange}></slot>
|
|
28
|
-
</div>
|
|
29
|
-
<h2 id="headline" aria-hidden=${!this.hasHeadline||H}>
|
|
30
|
-
<slot
|
|
31
|
-
name="headline"
|
|
32
|
-
@slotchange=${this.handleHeadlineChange}></slot>
|
|
33
|
-
</h2>
|
|
34
|
-
<md-divider></md-divider>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="scroller">
|
|
37
|
-
<div class="content">
|
|
38
|
-
<div class="top anchor"></div>
|
|
39
|
-
<slot name="content"></slot>
|
|
40
|
-
<div class="bottom anchor"></div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="actions">
|
|
44
|
-
<md-divider></md-divider>
|
|
45
|
-
<slot name="actions" @slotchange=${this.handleActionsChange}></slot>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
${n?r:H}
|
|
49
|
-
</dialog>
|
|
50
|
-
`}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(let t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){this.nextClickIsFromContent?this.nextClickIsFromContent=!1:this.dispatchEvent(new Event(`cancel`,{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){let t=e.target,{submitter:n}=e;t.getAttribute(`method`)===`dialog`&&n&&this.close(n.getAttribute(`value`)??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;let t=!le(this,e);e.preventDefault(),t||this.close()}handleClose(){this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,this.dialog?.dispatchEvent(new Event(`cancel`,{cancelable:!0})))}handleKeydown(e){e.key===`Escape`&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;let{dialog:t,scrim:n,container:r,headline:i,content:a,actions:o}=this;if(!t||!n||!r||!i||!a||!o)return;let{container:s,dialog:c,scrim:l,headline:u,content:d,actions:f}=e,p=[[t,c??[]],[n,l??[]],[r,s??[]],[i,u??[]],[a,d??[]],[o,f??[]]],m=[];for(let[e,t]of p)for(let n of t){let t=e.animate(...n);this.cancelAnimations.signal.addEventListener(`abort`,()=>{t.cancel()}),m.push(t)}await Promise.all(m.map(e=>e.finished.catch(()=>{})))}handleHeadlineChange(e){let t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){let t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){let t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){let{target:t,isIntersecting:n}=e;t===this.topAnchor&&(this.isAtScrollTop=n),t===this.bottomAnchor&&(this.isAtScrollBottom=n)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){let[t,n]=this.getFirstAndLastFocusableChildren();if(!t||!n){this.dialog?.focus();return}let r=e.target===this.firstFocusTrap,i=!r,a=e.relatedTarget===t,o=e.relatedTarget===n,s=!a&&!o;i&&o||r&&s?t.focus():(r&&a||i&&s)&&n.focus()}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,t=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){let n=this.treewalker.currentNode;be(n)&&(e||=n,t=n)}return[e,t]}};U([F({type:Boolean})],$.prototype,`open`,null),U([F({type:Boolean})],$.prototype,`quick`,void 0),U([F({attribute:!1})],$.prototype,`returnValue`,void 0),U([F()],$.prototype,`type`,void 0),U([F({type:Boolean,attribute:`no-focus-trap`})],$.prototype,`noFocusTrap`,void 0),U([V(`dialog`)],$.prototype,`dialog`,void 0),U([V(`.scrim`)],$.prototype,`scrim`,void 0),U([V(`.container`)],$.prototype,`container`,void 0),U([V(`.headline`)],$.prototype,`headline`,void 0),U([V(`.content`)],$.prototype,`content`,void 0),U([V(`.actions`)],$.prototype,`actions`,void 0),U([Z()],$.prototype,`isAtScrollTop`,void 0),U([Z()],$.prototype,`isAtScrollBottom`,void 0),U([V(`.scroller`)],$.prototype,`scroller`,void 0),U([V(`.top.anchor`)],$.prototype,`topAnchor`,void 0),U([V(`.bottom.anchor`)],$.prototype,`bottomAnchor`,void 0),U([V(`.focus-trap`)],$.prototype,`firstFocusTrap`,void 0),U([Z()],$.prototype,`hasHeadline`,void 0),U([Z()],$.prototype,`hasActions`,void 0),U([Z()],$.prototype,`hasIcon`,void 0);function be(e){let t=`:not(:disabled,[disabled])`;return e.matches(`:is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])`+t+`:not([tabindex^="-"])`)?!0:!e.localName.includes(`-`)||!e.matches(t)?!1:e.shadowRoot?.delegatesFocus??!1}var xe=W`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
|
|
51
|
-
`;xe.styleSheet;var Se=class extends ${};Se.styles=[xe],Se=U([B(`md-dialog`)],Se);var Ce=e(`<p role="alert" class="failure svelte-qieqgw"> </p>`),we=e(`<md-dialog><div slot="headline">Clear speech?</div> <div slot="content"><p class="svelte-qieqgw">The speech of <strong> </strong> is removed from the bridge. The session keeps running.
|
|
52
|
-
This cannot be undone.</p> <!></div> <div slot="actions"><md-text-button>Cancel</md-text-button> <md-text-button>Clear</md-text-button></div></md-dialog>`,2);function Te(e,s){r(s,!0);let f=i(``),p=i(!1);u(()=>{s.open&&m(f,``)});async function g(){if(!l(p)){m(f,``),m(p,!0);try{await s.onClear(),s.onClose()}catch(e){m(f,e instanceof Error?e.message:`The speech could not be cleared.`,!0)}finally{m(p,!1)}}}var _=we();c(()=>w(_,`open`,s.open)),x(_,1,`svelte-qieqgw`);var v=M(a(_),2),y=a(v),b=M(a(y)),C=d(b,!0);o(),E(y);var T=M(y,2),D=e=>{var t=Ce(),n=d(t,!0);c(()=>j(n,l(f))),A(e,t)};S(T,e=>{l(f)!==``&&e(D)}),E(v);var O=M(v,2),k=a(O);w(k,`type`,`button`);var N=M(k,2);w(N,`type`,`button`),c(()=>w(N,`disabled`,l(p))),E(O),E(_),c(()=>j(C,s.heading)),t(`closed`,_,function(...e){s.onClose?.apply(this,e)}),n(`click`,k,function(...e){s.onClose?.apply(this,e)}),n(`click`,N,g),A(e,_),h()}f([`click`]);var Ee=e(`<p role="alert" class="failure svelte-1sof82u"> </p>`),De=e(`<md-dialog><div slot="headline">Delete session?</div> <div slot="content"><p class="svelte-1sof82u"><strong> </strong> and its speech are removed from the bridge. This cannot be undone.</p> <!></div> <div slot="actions"><md-text-button>Cancel</md-text-button> <md-text-button>Delete</md-text-button></div></md-dialog>`,2);function Oe(e,s){r(s,!0);let f=i(``),p=i(!1);u(()=>{s.open&&m(f,``)});async function g(){if(!l(p)){m(f,``),m(p,!0);try{await s.onDelete(),s.onClose()}catch(e){m(f,e instanceof Error?e.message:`The session could not be deleted.`,!0)}finally{m(p,!1)}}}var _=De();c(()=>w(_,`open`,s.open)),x(_,1,`svelte-1sof82u`);var v=M(a(_),2),y=a(v),b=a(y),C=d(b,!0);o(),E(y);var T=M(y,2),D=e=>{var t=Ee(),n=d(t,!0);c(()=>j(n,l(f))),A(e,t)};S(T,e=>{l(f)!==``&&e(D)}),E(v);var O=M(v,2),k=a(O);w(k,`type`,`button`);var N=M(k,2);w(N,`type`,`button`),c(()=>w(N,`disabled`,l(p))),E(O),E(_),c(()=>j(C,s.heading)),t(`closed`,_,function(...e){s.onClose?.apply(this,e)}),n(`click`,k,function(...e){s.onClose?.apply(this,e)}),n(`click`,N,g),A(e,_),h()}f([`click`]);var ke=e(`<p role="alert" class="failure svelte-ttl1x5"> </p>`),Ae=e(`<md-dialog><div slot="headline">Add a marker</div> <form slot="content" id="add-marker-form" novalidate="" class="svelte-ttl1x5"><md-outlined-text-field></md-outlined-text-field> <!></form> <div slot="actions"><md-text-button>Cancel</md-text-button> <md-text-button>Add</md-text-button></div></md-dialog>`,2);function je(e,o){r(o,!0);let s=i(``),f=i(``),p=i(``),g=i(!1);u(()=>{o.open&&(m(s,``),m(f,``),m(p,``))});async function _(e){if(e.preventDefault(),l(g))return;let t=l(s).trim();if(t===``)m(f,`Enter a label.`);else{m(f,``),m(p,``),m(g,!0);try{await o.onAdd(t),o.onClose()}catch(e){m(p,e instanceof Error?e.message:`The marker could not be added.`,!0)}finally{m(g,!1)}}}var v=Ae();c(()=>w(v,`open`,o.open)),x(v,1,`svelte-ttl1x5`);var y=M(a(v),2),b=a(y);w(b,`label`,`Label`),w(b,`required`,!0),c(()=>w(b,`maxlength`,J.markerLength)),w(b,`supporting-text`,`Shows in the log as a row of its own, for example “step 3”.`),c(()=>w(b,`value`,l(s))),c(()=>w(b,`error`,l(f)!==``)),c(()=>w(b,`error-text`,l(f)));var C=M(b,2),T=e=>{var t=ke(),n=d(t,!0);c(()=>j(n,l(p))),A(e,t)};S(C,e=>{l(p)!==``&&e(T)}),E(y);var D=M(y,2),O=a(D);w(O,`type`,`button`);var k=M(O,2);w(k,`type`,`submit`),w(k,`form`,`add-marker-form`),c(()=>w(k,`disabled`,l(g))),E(D),E(v),t(`closed`,v,function(...e){o.onClose?.apply(this,e)}),t(`submit`,y,_),n(`input`,b,e=>m(s,e.target.value,!0)),n(`click`,O,function(...e){o.onClose?.apply(this,e)}),A(e,v),h()}f([`input`,`click`]);var Me=e(`<span class="pill svelte-5c13xh"><md-icon>bookmark</md-icon> <span class="visually-hidden svelte-5c13xh">Marker:</span> <span class="label mono svelte-5c13xh"> </span></span>`,2),Ne=e(`<tr><td class="time mono svelte-5c13xh"> </td><td class="text svelte-5c13xh"><!></td><td class="seq mono svelte-5c13xh"> </td></tr>`),Pe=e(`<table aria-label="Speech" class="svelte-5c13xh"><thead class="svelte-5c13xh"><tr><th scope="col" class="svelte-5c13xh">Received</th><th scope="col" class="svelte-5c13xh">Spoken text</th><th scope="col" class="seq svelte-5c13xh">Seq</th></tr></thead><tbody class="svelte-5c13xh"></tbody></table>`);function Fe(e,t){r(t,!0);let n=e=>Date.now()-Date.parse(e.receivedAt)<2e3;var i=Pe(),o=M(a(i));T(o,21,()=>t.entries,e=>e.seq,(e,t)=>{var r=Ne();let i;var o=a(r),s=d(o,!0),u=M(o),f=a(u),p=e=>{var n=Me(),r=a(n);w(r,`aria-hidden`,`true`),x(r,1,`svelte-5c13xh`);var i=M(r,4),o=d(i,!0);E(n),c(()=>{y(n,`title`,l(t).text),j(o,l(t).text)}),A(e,n)},m=e=>{var n=k();c(()=>j(n,l(t).text)),A(e,n)};S(f,e=>{l(t).kind===`marker`?e(p):e(m,-1)}),E(u);var h=M(u),g=d(h);E(r),c((e,n)=>{i=x(r,1,`svelte-5c13xh`,null,i,{fresh:e,marker:l(t).kind===`marker`}),j(s,n),j(g,`#${l(t).seq??``}`)},[()=>n(l(t)),()=>ie(l(t).receivedAt)]),A(e,r)}),E(o),E(i),A(e,i),h()}var Ie=e(`<md-icon-button><md-icon>bookmark_add</md-icon></md-icon-button>`,2),Le=e(`<md-icon-button><md-icon>delete_sweep</md-icon></md-icon-button>`,2),Re=e(`<md-icon-button><md-icon>delete</md-icon></md-icon-button>`,2),ze=e(`<div role="toolbar" aria-label="Log actions"><!> <!> <!></div>`),Be=e(`<p class="title svelte-1jnrixz">No entries left</p> <p class="svelte-1jnrixz">This session's entries are no longer in the buffer.</p>`,1),Ve=e(`<p class="title svelte-1jnrixz">No speech yet</p> <p class="svelte-1jnrixz">Make the screen reader speak.</p>`,1),He=e(`<div class="empty svelte-1jnrixz"><md-icon>mic</md-icon> <!></div>`,2),Ue=e(`<p role="status" class="mono svelte-1jnrixz">Connection lost, reconnecting…</p>`),We=e(`<p role="alert" class="mono failed svelte-1jnrixz">The speech could not be loaded.</p>`),Ge=e(`<span></span>`),Ke=e(`<md-filled-tonal-button><md-icon>arrow_downward</md-icon> Jump to latest</md-filled-tonal-button>`,2),qe=e(`<footer class="svelte-1jnrixz"><!> <!></footer>`),Je=e(`<section class="log svelte-1jnrixz" aria-labelledby="log-heading"><header class="svelte-1jnrixz"><h1 id="log-heading" class="trunc svelte-1jnrixz"> </h1> <!></header> <div class="scroll svelte-1jnrixz"><!> <!></div> <!></section> <!> <!> <!>`,1);function Ye(e,f){r(f,!0);let p=D(f,`local`,3,!1),g=i(!1),_=i(!1),v=i(!1),b=i(void 0),T=i(!0);function O(){l(b)&&m(T,l(b).scrollHeight-l(b).scrollTop-l(b).clientHeight<=48)}function k(){m(T,!0),l(b)?.scrollTo({top:l(b).scrollHeight})}u(()=>{f.entries.length===0&&m(T,!0),l(T)&&l(b)&&(l(b).scrollTop=l(b).scrollHeight)});var N=Je(),P=s(N),F=a(P),I=a(F),L=d(I,!0),R=M(I,2),z=e=>{var t=ze(),r=a(t),i=e=>{var t=Ie();w(t,`title`,`Add marker`),w(t,`aria-label`,`Add marker`);var r=a(t);w(r,`aria-hidden`,`true`),E(t),n(`click`,t,()=>m(g,!0)),A(e,t)};S(r,e=>{f.canMark&&e(i)});var o=M(r,2),s=e=>{var t=Le();w(t,`title`,`Clear speech`),w(t,`aria-label`,`Clear speech`),c(()=>w(t,`disabled`,f.entries.length===0));var r=a(t);w(r,`aria-hidden`,`true`),E(t),n(`click`,t,()=>m(v,!0)),A(e,t)};S(o,e=>{f.canClear&&e(s)});var l=M(o,2),u=e=>{var t=Re();w(t,`title`,`Delete session`),w(t,`aria-label`,`Delete session`);var r=a(t);w(r,`aria-hidden`,`true`),E(t),n(`click`,t,()=>m(_,!0)),A(e,t)};S(l,e=>{f.canDelete&&e(u)}),E(t),A(e,t)};S(R,e=>{(f.canMark||f.canClear||f.canDelete)&&e(z)}),E(F);var B=M(F,2),V=a(B);Fe(V,{get entries(){return f.entries}});var H=M(V,2),U=e=>{var t=He(),n=a(t);w(n,`aria-hidden`,`true`),x(n,1,`svelte-1jnrixz`);var r=M(n,2),i=e=>{var t=Be();o(2),A(e,t)},s=e=>{var t=Ve();o(2),A(e,t)};S(r,e=>{f.connection===`ended`?e(i):e(s,-1)}),E(t),A(e,t)};S(H,e=>{f.entries.length===0&&e(U)}),E(B),C(B,e=>m(b,e),()=>l(b));var W=M(B,2),ee=e=>{var t=qe(),r=a(t),i=e=>{var t=Ue();A(e,t)},s=e=>{var t=We();A(e,t)},c=e=>{var t=Ge();A(e,t)};S(r,e=>{f.connection===`reconnecting`?e(i):f.connection===`failed`?e(s,1):e(c,-1)});var u=M(r,2),d=e=>{var t=Ke(),r=a(t);w(r,`slot`,`icon`),w(r,`aria-hidden`,`true`),o(),E(t),n(`click`,t,k),A(e,t)};S(u,e=>{l(T)||e(d)}),E(t),A(e,t)};S(W,e=>{f.connection!==`reconnecting`&&f.connection!==`failed`&&l(T)||e(ee)}),E(P);var G=M(P,2),K=e=>{je(e,{get open(){return l(g)},get onAdd(){return f.onAddMarker},onClose:()=>m(g,!1)})};S(G,e=>{f.canMark&&e(K)});var q=M(G,2),te=e=>{Te(e,{get open(){return l(v)},get heading(){return f.heading},get onClear(){return f.onClear},onClose:()=>m(v,!1)})};S(q,e=>{f.canClear&&e(te)});var ne=M(q,2),J=e=>{Oe(e,{get open(){return l(_)},get heading(){return f.heading},get onDelete(){return f.onDelete},onClose:()=>m(_,!1)})};S(ne,e=>{f.canDelete&&e(J)}),c(()=>{j(L,f.heading),y(B,`role`,p()?void 0:`region`),y(B,`aria-label`,p()?void 0:`Speech log`),y(B,`aria-live`,p()?void 0:`off`),y(B,`aria-hidden`,p()?`true`:void 0),y(B,`tabindex`,p()?void 0:0)}),t(`scroll`,B,O),A(e,N),h()}f([`click`]);var Xe=e(`<span class="subtitle svelte-3qlloz"><!></span>`),Ze=e(`<span class="sr-only svelte-3qlloz"> </span>`),Qe=e(`<span class="trailing svelte-3qlloz"><!></span>`),$e=e(`<li><md-ripple></md-ripple> <button type="button" class="select svelte-3qlloz"><span class="title svelte-3qlloz"> </span> <!> <!></button> <!></li>`,2);function et(e,t){let r=D(t,`selected`,3,!1);var i=$e();let o,s;var l=a(i);w(l,`aria-hidden`,`true`);var u=M(l,2),f=a(u),p=d(f,!0),m=M(f,2),h=e=>{var n=Xe(),r=a(n);_(r,()=>t.subtitle),E(n),c(()=>y(n,`aria-hidden`,t.description===void 0?void 0:`true`)),A(e,n)};S(m,e=>{t.subtitle&&e(h)});var v=M(m,2),b=e=>{var n=Ze(),r=d(n,!0);c(()=>j(r,t.description)),A(e,n)};S(v,e=>{t.description!==void 0&&e(b)}),E(u);var C=M(u,2),T=e=>{var n=Qe(),r=a(n);_(r,()=>t.trailing),E(n),A(e,n)};S(C,e=>{t.trailing&&e(T)}),E(i),c(()=>{o=x(i,1,`svelte-3qlloz`,null,o,{selected:r()}),s=g(i,``,s,{"--list-item-shape":t.shape}),y(u,`aria-current`,r()?`true`:void 0),j(p,t.title)}),n(`click`,u,function(...e){t.onSelect?.apply(this,e)}),A(e,i)}f([`click`]);function tt(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n} h ${String(r).padStart(2,`0`)} min`:r>0?`${r} min ${i} s`:`${i} s`}function nt(e,t){let n=tt((e.endedAt===null?t:Date.parse(e.endedAt))-Date.parse(e.startedAt)),r=e.endedAt===null,i=`${e.entries} ${e.entries===1?`entry`:`entries`}`,a=[`Session ${e.id}`,r?`live`:null,e.run===null?null:`run ${e.run}`,n,i];return{id:`#${e.id}`,run:e.run,duration:n,entries:i,spoken:a.filter(e=>e!==null).join(`, `)}}var rt=`none`;function it(e,t,n){if(e===`none`)return rt;let r=e===null||!/^\d+$/.test(e)?null:Number(e);return r!==null&&t.some(e=>e.id===r)?r:n??`none`}function at(e,t){let n=t.findIndex(t=>t.id===e);return n===-1?null:(t[n+1]??t[n-1])?.id??null}var ot=e(`<p class="svelte-17z3k9b">This session has no entries, so ending it deletes it. Its number is not reused.</p>`),st=e(`<p class="svelte-17z3k9b">Speech captured after this belongs to no session.</p>`),ct=e(`<p role="alert" class="failure svelte-17z3k9b"> </p>`),lt=e(`<md-dialog><div slot="headline"> </div> <div slot="content"><!> <!></div> <div slot="actions"><md-text-button>Cancel</md-text-button> <md-text-button>End session</md-text-button></div></md-dialog>`,2);function ut(e,o){r(o,!0);let s=p(()=>o.entries===0),f=i(``),g=i(!1);u(()=>{o.open&&m(f,``)});async function _(){if(!l(g)){m(f,``),m(g,!0);try{await o.onEnd(),o.onClose()}catch(e){m(f,e instanceof Error?e.message:`The session could not be ended.`,!0)}finally{m(g,!1)}}}var v=lt();c(()=>w(v,`open`,o.open)),x(v,1,`svelte-17z3k9b`);var y=a(v),b=d(y),C=M(y,2),T=a(C),D=e=>{var t=ot();A(e,t)},O=e=>{var t=st();A(e,t)};S(T,e=>{l(s)?e(D):e(O,-1)});var k=M(T,2),N=e=>{var t=ct(),n=d(t,!0);c(()=>j(n,l(f))),A(e,t)};S(k,e=>{l(f)!==``&&e(N)}),E(C);var P=M(C,2),F=a(P);w(F,`type`,`button`);var I=M(F,2);w(I,`type`,`button`),c(()=>w(I,`disabled`,l(g))),E(P),E(v),c(()=>j(b,`${l(s)?`Drop`:`End`} session ${o.sessionId===null?``:`#${o.sessionId}`}?`)),t(`closed`,v,function(...e){o.onClose?.apply(this,e)}),n(`click`,F,function(...e){o.onClose?.apply(this,e)}),n(`click`,I,_),A(e,v),h()}f([`click`]);var dt=e(`<span class="dot svelte-wvg2ho"></span>`),ft=e(`<span class="run svelte-wvg2ho"> </span>`),pt=e(`<span class="meta svelte-wvg2ho"><!> <span class="svelte-wvg2ho"> </span> <!> <span class="svelte-wvg2ho"> </span> <span class="svelte-wvg2ho"> </span></span>`);function mt(e,t){r(t,!0);let n=e=>{var n=pt(),r=a(n),o=e=>{var t=dt();A(e,t)};S(r,e=>{t.live&&e(o)});var s=M(r,2),u=d(s,!0),f=M(s,2),p=e=>{var t=ft(),n=d(t,!0);c(()=>j(n,l(i).run)),A(e,t)};S(f,e=>{l(i).run!==null&&e(p)});var m=M(f,2),h=d(m,!0),g=M(m,2),_=d(g,!0);E(n),c(()=>{j(u,l(i).id),j(h,l(i).duration),j(_,l(i).entries)}),A(e,n)},i=p(()=>nt(t.session,t.now));et(e,{get title(){return t.session.name},shape:`var(--md-sys-shape-corner-extra-large, 28px)`,get subtitle(){return n},get selected(){return t.selected},get description(){return l(i).spoken},get onSelect(){return t.onSelect}}),h()}var ht=e(`<p role="alert" class="failure svelte-2k1elc"> </p>`),gt=e(`<md-dialog><div slot="headline">Start a session</div> <form slot="content" id="start-session-form" novalidate="" class="svelte-2k1elc"><md-outlined-text-field></md-outlined-text-field> <md-outlined-text-field></md-outlined-text-field> <!></form> <div slot="actions"><md-text-button>Cancel</md-text-button> <md-text-button>Start</md-text-button></div></md-dialog>`,2);function _t(e,o){r(o,!0);let s=i(``),f=i(``),p=i(``),g=i(``),_=i(!1);u(()=>{o.open&&(m(s,``),m(f,``),m(p,``),m(g,``))});async function v(e){if(e.preventDefault(),l(_))return;let t=l(s).trim();if(t===``)m(p,`Enter a name.`);else{m(p,``),m(g,``),m(_,!0);try{await o.onStart(t,l(f).trim()===``?null:l(f).trim()),o.onClose()}catch(e){m(g,e instanceof Error?e.message:`The session could not be started.`,!0)}finally{m(_,!1)}}}var y=gt();c(()=>w(y,`open`,o.open)),x(y,1,`svelte-2k1elc`);var b=M(a(y),2),C=a(b);w(C,`label`,`Name`),w(C,`required`,!0),c(()=>w(C,`maxlength`,J.sessionLabelLength)),c(()=>w(C,`value`,l(s))),c(()=>w(C,`error`,l(p)!==``)),c(()=>w(C,`error-text`,l(p)));var T=M(C,2);w(T,`label`,`Run (optional)`),w(T,`supporting-text`,`Groups sessions, for example one run id per test run.`),c(()=>w(T,`maxlength`,J.sessionLabelLength)),c(()=>w(T,`value`,l(f)));var D=M(T,2),O=e=>{var t=ht(),n=d(t,!0);c(()=>j(n,l(g))),A(e,t)};S(D,e=>{l(g)!==``&&e(O)}),E(b);var k=M(b,2),N=a(k);w(N,`type`,`button`);var P=M(N,2);w(P,`type`,`submit`),w(P,`form`,`start-session-form`),c(()=>w(P,`disabled`,l(_))),E(k),E(y),t(`closed`,y,function(...e){o.onClose?.apply(this,e)}),t(`submit`,b,v),n(`input`,C,e=>m(s,e.target.value,!0)),n(`input`,T,e=>m(f,e.target.value,!0)),n(`click`,N,function(...e){o.onClose?.apply(this,e)}),A(e,y),h()}f([`input`,`click`]);var vt=e(`<span> </span>`),yt=e(`<md-icon-button><md-icon> </md-icon></md-icon-button>`,2),bt=e(`<p class="empty svelte-1fz71rn">No sessions in the buffer. Start one with the play button.</p>`),xt=e(`<ul aria-labelledby="sessions-heading" class="svelte-1fz71rn"></ul>`),St=e(`<ul class="outside svelte-1fz71rn" aria-label="Outside sessions"><!></ul>`),Ct=e(`<section aria-labelledby="sessions-heading"><header class="svelte-1fz71rn"><!> <h2 id="sessions-heading">Sessions</h2> <md-icon-button><md-icon> </md-icon></md-icon-button></header> <!> <!></section> <!> <!>`,3);function wt(e,t){r(t,!0);let o=e=>{var t=vt(),n=d(t,!0);c(()=>j(n,l(y))),A(e,t)},u=D(t,`collapsed`,3,!1),f=i(!1),g=i(!1),_=p(()=>t.currentId===null?`Start a session`:`End session ${t.currentId}`),v=p(()=>u()?`Expand sessions`:`Collapse sessions`),y=p(()=>t.outsideEntries===1?`1 entry`:`${t.outsideEntries} entries`);var b=Ct(),C=s(b);let k;var N=a(C),P=a(N),F=e=>{var r=yt();x(r,1,`collapse`),c(()=>w(r,`title`,l(v))),c(()=>w(r,`aria-label`,l(v))),c(()=>w(r,`aria-expanded`,!u()));var i=a(r);w(i,`aria-hidden`,`true`);var o=d(i,!0);E(r),c(()=>j(o,u()?`left_panel_open`:`left_panel_close`)),n(`click`,r,function(...e){t.onToggleCollapse?.apply(this,e)}),A(e,r)};S(P,e=>{t.onToggleCollapse&&e(F)});var I=M(P,2);let L;var R=M(I,2);c(()=>w(R,`title`,l(_))),c(()=>w(R,`aria-label`,l(_)));var z=a(R);w(z,`aria-hidden`,`true`);var B=d(z,!0);E(R),E(N);var V=M(N,2),H=e=>{},U=e=>{var t=bt();A(e,t)},W=e=>{var n=xt();T(n,21,()=>t.sessions,e=>e.id,(e,n)=>{{let r=p(()=>l(n).id===t.currentId),i=p(()=>l(n).id===t.selectedId);mt(e,{get session(){return l(n)},get now(){return t.now},get live(){return l(r)},get selected(){return l(i)},onSelect:()=>t.onSelect(l(n).id)})}}),E(n),A(e,n)};S(V,e=>{u()?e(H):t.sessions.length===0?e(U,1):e(W,-1)});var ee=M(V,2),G=e=>{var n=St(),r=a(n);{let e=p(()=>t.selectedId===rt),n=p(()=>`Speech captured while no session was running, ${l(y)}`);et(r,{title:`Outside sessions`,shape:`var(--md-sys-shape-corner-extra-large, 28px)`,get subtitle(){return o},get selected(){return l(e)},get description(){return l(n)},onSelect:()=>t.onSelect(rt)})}E(n),A(e,n)};S(ee,e=>{u()||e(G)}),E(C);var K=M(C,2);_t(K,{get open(){return l(f)},get onStart(){return t.onStart},onClose:()=>m(f,!1)});var q=M(K,2);{let e=p(()=>t.sessions.find(e=>e.id===t.currentId)?.entries??null);ut(q,{get open(){return l(g)},get sessionId(){return t.currentId},get entries(){return l(e)},get onEnd(){return t.onEnd},onClose:()=>m(g,!1)})}c(()=>{k=x(C,1,`svelte-1fz71rn`,null,k,{collapsed:u()}),L=x(I,1,`svelte-1fz71rn`,null,L,{"visually-hidden":u()}),x(R,1,O(t.currentId===null?`start`:`stop`),`svelte-1fz71rn`),j(B,t.currentId===null?`play_arrow`:`stop`)}),n(`click`,R,()=>t.currentId===null?m(f,!0):m(g,!0)),A(e,b),h()}f([`click`]);var Tt=e(`<div class="monitor svelte-1uha8ag"><aside><!></aside> <div class="log svelte-1uha8ag"><!> <div class="log-body svelte-1uha8ag"><!></div></div></div>`);function Et(e,t){r(t,!0);let n=p(()=>X.loaded?{sessions:X.sessions,currentId:X.currentId,outsideEntries:X.outsideEntries}:t.data.sessions??{sessions:[],currentId:null,outsideEntries:0}),i=p(()=>X.loaded?X.now:t.data.now),o=p(()=>it(ae.url.searchParams.get(`session`),l(n).sessions,l(n).currentId)),s=p(()=>K(l(o),l(n).sessions)),d=p(()=>re(l(o),l(n).currentId)),f=p(()=>ee(l(o),l(n).currentId)),m=p(()=>ne(l(o),l(n).currentId));v(()=>(Y.init(),X.init(t.data.sessions))),u(()=>q.open(l(o),b(()=>G(l(o),l(n).currentId))));function g(e){return P(e===null?N(`/`):`${N(`/`)}?session=${e}`,{reset:!1})}async function _(){let e=l(n).currentId;await X.end(),e!==null&&!l(n).sessions.some(t=>t.id===e)&&await g(null)}async function y(){await q.clear(l(o)),await X.refresh()}async function C(){if(typeof l(o)!=`number`)return;let e=at(l(o),l(n).sessions);await X.delete(l(o)),await g(e)}async function w(e,t){await g((await X.start(e,t)).id)}var T=Tt(),D=a(T);let O;wt(a(D),{get collapsed(){return Y.collapsed},onToggleCollapse:()=>Y.toggle(),get sessions(){return l(n).sessions},get currentId(){return l(n).currentId},get outsideEntries(){return l(n).outsideEntries},get selectedId(){return l(o)},get now(){return l(i)},onSelect:e=>void g(e),onStart:w,onEnd:_}),E(D);var k=M(D,2),j=a(k),F=e=>{de(e,{})};S(j,e=>{t.data.local&&e(F)});var I=M(j,2);Ye(a(I),{get heading(){return l(s)},get local(){return t.data.local},get entries(){return q.entries},get connection(){return q.connection},get canMark(){return l(d)},onAddMarker:e=>q.addMarker(e),get canClear(){return l(f)},onClear:y,get canDelete(){return l(m)},onDelete:C}),E(I),E(k),E(T),c(()=>O=x(D,1,`svelte-1uha8ag`,null,O,{collapsed:Y.collapsed})),A(e,T),h()}export{Et as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,F as r,G as i,H as a,I as o,K as s,M as c,N as l,O as u,R as d,T as f,U as p,V as m,W as h,a as g,d as _,h as v,i as y,m as b,o as x,p as S,q as C,r as w,s as T,x as E,y as D,z as O}from"../chunks/h7UQ89-l.js";import{F as k,H as A,U as j,V as M,h as N,o as P,p as F,t as I}from"../chunks/CXrPUR7p.js";import{i as L,n as R,r as z}from"../chunks/CM9WugkD.js";var B=class extends L{renderElevationOrOutline(){return k`<md-elevation part="elevation"></md-elevation>`}},V=M`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
|
|
2
|
-
`;V.styleSheet;var H=class extends B{};H.styles=[R,z,V],H=j([A(`md-filled-button`)],H);var U=e(`<p class="note svelte-1oos7l">Set by <code class="svelte-1oos7l"> </code> when the bridge starts, so a saved port has no effect. Remove
|
|
3
|
-
it to change the port here.</p>`),W=e(`<div class="actions svelte-1oos7l"><md-filled-button>Save</md-filled-button> <md-text-button>Revert</md-text-button></div>`,2),G=e(`<div class="pending svelte-1oos7l"><strong> </strong> <code class="svelte-1oos7l">text-to-socket-engine-add-voice</code>) and
|
|
4
|
-
select it in the screen reader.</div>`),K=e(`<p role="alert" class="failure svelte-1oos7l"> </p>`),q=e(`<form novalidate="" class="svelte-1oos7l"><md-outlined-text-field></md-outlined-text-field> <!> <p class="note svelte-1oos7l"> </p> <div role="status" class="status"><!></div> <!></form>`,2);function J(e,r){i(r,!0);let c=a(null),f=a(``),g=a(``),_=a(!1),v=p(()=>u(c)??String(r.saved)),y=p(()=>u(c)!==null&&u(c).trim()!==String(r.saved)),S=p(()=>r.saved!==r.active);function w(){m(c,null),m(f,``),m(g,``)}async function T(){if(u(_)||!u(y))return;let e=F(u(v));if(!e.ok)m(f,e.message,!0),m(g,``);else{m(f,``),m(g,``),m(_,!0);try{await r.onSave(e.port),m(c,null)}catch(e){m(g,e instanceof Error?e.message:`The port could not be saved.`,!0)}finally{m(_,!1)}}}var k=q(),A=o(k);x(A,`label`,`TCP port`),x(A,`inputmode`,`numeric`),x(A,`autocomplete`,`off`),x(A,`supporting-text`,`The port the screen reader's speech voice sends to. Default 4449.`),l(()=>x(A,`value`,u(v))),l(()=>x(A,`disabled`,r.overriddenBy!==null)),l(()=>x(A,`error`,u(f)!==``)),l(()=>x(A,`error-text`,u(f)));var j=O(A,2),M=e=>{var t=U(),n=O(o(t)),i=d(n,!0);s(),C(t),l(()=>D(i,r.overriddenBy)),E(e,t)},N=e=>{var t=W(),r=o(t);x(r,`type`,`submit`),l(()=>x(r,`disabled`,!u(y)||u(_)));var i=O(r,2);x(i,`type`,`button`),l(()=>x(i,`disabled`,!u(y)||u(_))),C(t),n(`click`,i,w),E(e,t)};b(j,e=>{r.overriddenBy===null?e(N,-1):e(M)});var P=O(j,2),I=d(P),L=O(P,2),R=o(L),z=e=>{var t=G(),n=o(t),i=d(n),a=O(n);s(2),C(t),l(()=>{D(i,`Restart the bridge to use port ${r.saved??``}.`),D(a,` It still listens on ${r.active??``} until it is restarted. The speech voice on the VM sends to a fixed
|
|
5
|
-
port, so also add a voice for ${r.saved??``} (`)}),E(e,t)};b(R,e=>{u(S)&&e(z)}),C(L);var B=O(L,2),V=e=>{var t=K(),n=d(t,!0);l(()=>D(n,u(g))),E(e,t)};b(B,e=>{u(g)!==``&&e(V)}),C(k),l(()=>D(I,`In use: ${r.active??``}`)),t(`submit`,k,e=>{e.preventDefault(),T()}),n(`keydown`,A,e=>{e.key===`Enter`&&(e.preventDefault(),T())}),n(`input`,A,e=>{m(c,e.target.value,!0),m(f,``)}),E(e,k),h()}f([`keydown`,`input`,`click`]);var Y=e(`<label class="option svelte-15x0123"><input type="radio" name="color-theme" class="svelte-15x0123"/> <span class="mark svelte-15x0123" aria-hidden="true"></span> <span class="swatch svelte-15x0123" aria-hidden="true"><span class="bar svelte-15x0123"></span> <span class="aa svelte-15x0123">Aa</span> <span class="chip svelte-15x0123"></span></span> <span class="text svelte-15x0123"><span class="label svelte-15x0123"> </span> <span class="description svelte-15x0123"> </span></span> <span class="selected svelte-15x0123" aria-hidden="true"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg> Selected</span></label>`),X=e(`<fieldset class="svelte-15x0123"><legend class="svelte-15x0123">Color theme</legend> <p class="hint svelte-15x0123">Stored in this browser only. Applied immediately.</p> <div class="options svelte-15x0123"></div></fieldset>`);function Z(e,t){i(t,!0);var r=X(),a=O(o(r),4);S(a,21,()=>N,e=>e.value,(e,r)=>{var i=Y(),a=o(i);w(a);var c=O(a,4),f=O(c,2),p=o(f),m=d(p,!0),h=O(p,2),_=d(h,!0);C(f),s(2),C(i),l(()=>{T(a,u(r).value),g(a,t.value===u(r).value),y(a,`aria-describedby`,`theme-${u(r).value??``}-description`),y(c,`data-theme`,u(r).value),D(m,u(r).label),y(h,`id`,`theme-${u(r).value??``}-description`),D(_,u(r).description)}),n(`change`,a,()=>t.onChange(u(r).value)),E(e,i)}),C(a),C(r),E(e,r),h()}f([`change`]);var Q=e(`<p class="scope svelte-1i19ct2" role="alert">The bridge is not reachable, so its settings can't be read. <button type="button">Try again</button></p>`),$=e(`<p class="scope svelte-1i19ct2">Reading the bridge settings…</p>`),ee=e(`<div class="page svelte-1i19ct2"><div class="pane svelte-1i19ct2"><h1 class="visually-hidden svelte-1i19ct2">Settings</h1> <section aria-labelledby="capture-heading" class="svelte-1i19ct2"><h2 id="capture-heading" class="svelte-1i19ct2">Speech capture</h2> <p class="scope svelte-1i19ct2">Saved on the bridge. A change takes effect when the bridge is restarted.</p> <!></section> <section aria-labelledby="appearance-heading" class="svelte-1i19ct2"><h2 id="appearance-heading" class="svelte-1i19ct2">Appearance</h2> <!></section></div></div>`);function te(e,t){i(t,!0),v(()=>{I.refresh()});var a=ee();_(`1i19ct2`,e=>{c(()=>{r.title=`Settings · Speech Capture`})});var s=o(a),l=O(o(s),2),d=O(o(l),4),f=e=>{{let t=p(()=>I.overrides[`tcp.port`]??null);J(e,{get active(){return I.active.tcp.port},get saved(){return I.saved.tcp.port},get overriddenBy(){return u(t)},onSave:e=>I.save({tcp:{port:e}})})}},m=e=>{var t=Q(),r=O(o(t));C(t),n(`click`,r,()=>void I.refresh()),E(e,t)},g=e=>{var t=$();E(e,t)};b(d,e=>{I.active!==null&&I.saved!==null?e(f):I.reachable?e(g,-1):e(m,1)}),C(l);var y=O(l,2);Z(O(o(y),2),{get value(){return P.current},onChange:e=>P.set(e)}),C(y),C(s),C(a),E(e,a),h()}f([`click`]);export{te as component};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { t as error } from "./exports.js";
|
|
2
|
-
import { a as SpeechEntrySchema, c as SessionListSchema, d as ConfigOverridesSchema, n as checkDto, o as SpeechListSchema, p as ConfigSchema, r as StatusSchema, s as CLIENT_HEADER, t as AnyErrorBodySchema, u as StartSessionResponseSchema } from "./src.js";
|
|
3
|
-
// ../shared/src/api-version.ts
|
|
4
|
-
/** Path prefix of every API route. */
|
|
5
|
-
var API_PREFIX = "/api/v1";
|
|
6
|
-
/** Named in the bridge's logs when this UI ends or replaces another client's session. */
|
|
7
|
-
var UI_CLIENT = "web-ui";
|
|
8
|
-
/**
|
|
9
|
-
* `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in
|
|
10
|
-
* routes and a fake in tests.
|
|
11
|
-
*/
|
|
12
|
-
function createBridgeApi(baseUrl, fetchFn) {
|
|
13
|
-
const root = baseUrl.replace(/\/+$/, "") + API_PREFIX;
|
|
14
|
-
const origin = new URL(root).origin;
|
|
15
|
-
async function call(method, path, body) {
|
|
16
|
-
let response;
|
|
17
|
-
try {
|
|
18
|
-
response = await fetchFn(`${root}${path}`, {
|
|
19
|
-
method,
|
|
20
|
-
headers: {
|
|
21
|
-
accept: "application/json",
|
|
22
|
-
origin,
|
|
23
|
-
[CLIENT_HEADER]: UI_CLIENT,
|
|
24
|
-
...body === void 0 ? {} : { "content-type": "application/json" }
|
|
25
|
-
},
|
|
26
|
-
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
27
|
-
});
|
|
28
|
-
} catch (cause) {
|
|
29
|
-
error(502, `The bridge is not reachable: ${describe(cause)}`);
|
|
30
|
-
}
|
|
31
|
-
const answer = await response.json().catch(() => void 0);
|
|
32
|
-
if (!response.ok) {
|
|
33
|
-
const apiError = checkDto(AnyErrorBodySchema, answer);
|
|
34
|
-
if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);
|
|
35
|
-
const { message, details } = apiError.value.error;
|
|
36
|
-
const field = details?.field;
|
|
37
|
-
if (typeof field === "string") error(response.status, {
|
|
38
|
-
message,
|
|
39
|
-
field
|
|
40
|
-
});
|
|
41
|
-
error(response.status, message);
|
|
42
|
-
}
|
|
43
|
-
return answer;
|
|
44
|
-
}
|
|
45
|
-
async function read(method, path, schema, body) {
|
|
46
|
-
const checked = checkDto(schema, await call(method, path, body));
|
|
47
|
-
if (!checked.ok) error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);
|
|
48
|
-
return checked.value;
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
status: () => read("GET", "/status", StatusSchema),
|
|
52
|
-
sessions: () => read("GET", "/sessions", SessionListSchema),
|
|
53
|
-
startSession: (request) => read("POST", "/sessions", StartSessionResponseSchema, request),
|
|
54
|
-
endSession: async () => {
|
|
55
|
-
await call("POST", "/sessions/end");
|
|
56
|
-
},
|
|
57
|
-
deleteSession: async (id) => {
|
|
58
|
-
await call("DELETE", `/sessions?session=${id}`);
|
|
59
|
-
},
|
|
60
|
-
clearSpeech: async (session) => {
|
|
61
|
-
await call("DELETE", `/speech?session=${encodeURIComponent(session)}`);
|
|
62
|
-
},
|
|
63
|
-
config: (view) => read("GET", `/config?view=${view}`, ConfigSchema),
|
|
64
|
-
configOverrides: () => read("GET", "/config/overrides", ConfigOverridesSchema),
|
|
65
|
-
updateConfig: (patch) => read("PUT", "/config", ConfigSchema, patch),
|
|
66
|
-
addMarker: (label) => read("POST", "/markers", SpeechEntrySchema, { label }),
|
|
67
|
-
speech: (session, since, limit) => {
|
|
68
|
-
const query = new URLSearchParams({
|
|
69
|
-
since: String(since),
|
|
70
|
-
limit: String(limit)
|
|
71
|
-
});
|
|
72
|
-
if (session !== null) query.set("session", session);
|
|
73
|
-
return read("GET", `/speech?${query}`, SpeechListSchema);
|
|
74
|
-
},
|
|
75
|
-
openSpeechStream: async (session, lastEventId, signal) => {
|
|
76
|
-
const query = session === null ? "" : `?session=${encodeURIComponent(session)}`;
|
|
77
|
-
let response;
|
|
78
|
-
try {
|
|
79
|
-
response = await fetchFn(`${root}/speech/stream${query}`, {
|
|
80
|
-
headers: {
|
|
81
|
-
accept: "text/event-stream",
|
|
82
|
-
origin,
|
|
83
|
-
[CLIENT_HEADER]: UI_CLIENT,
|
|
84
|
-
...lastEventId === null ? {} : { "last-event-id": lastEventId }
|
|
85
|
-
},
|
|
86
|
-
signal
|
|
87
|
-
});
|
|
88
|
-
} catch (cause) {
|
|
89
|
-
error(502, `The bridge is not reachable: ${describe(cause)}`);
|
|
90
|
-
}
|
|
91
|
-
if (!response.ok || response.body === null) error(response.status === 200 ? 502 : response.status, "The speech stream is not available");
|
|
92
|
-
return response;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
function describe(cause) {
|
|
97
|
-
return cause instanceof Error ? cause.message : String(cause);
|
|
98
|
-
}
|
|
99
|
-
/** The bridge API of this deployment (read per request, so no SvelteKit env module is needed). */
|
|
100
|
-
function bridgeApiFromEnv(fetchFn) {
|
|
101
|
-
return createBridgeApi(process.env.SR_BRIDGE_API_URL ?? "http://127.0.0.1:5151", fetchFn);
|
|
102
|
-
}
|
|
103
|
-
export { bridgeApiFromEnv as t };
|
|
104
|
-
|
|
105
|
-
//# sourceMappingURL=bridge-api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-api.js","names":[],"sources":["../../../../shared/src/api-version.ts","../../../src/lib/server/bridge-api.ts"],"sourcesContent":["/**\n * `<major>.<minor>` of the HTTP API. Minor versions only add things\n * (docs/usage/http-api.md#versioning).\n */\nexport const API_VERSION = '1.18';\n\n/** Path prefix of every API route. */\nexport const API_PREFIX = '/api/v1';\n","import { error } from '@sveltejs/kit';\nimport {\n AnyErrorBodySchema,\n API_PREFIX,\n CLIENT_HEADER,\n checkDto,\n ConfigOverridesSchema,\n ConfigSchema,\n SessionListSchema,\n SpeechEntrySchema,\n SpeechListSchema,\n StartSessionResponseSchema,\n StatusSchema,\n type ConfigDto,\n type ConfigOverridesDto,\n type ConfigPatchDto,\n type DtoOf,\n type DtoSchema,\n type SessionListDto,\n type SpeechEntryDto,\n type SpeechListDto,\n type StartSessionRequestDto,\n type StartSessionResponseDto,\n type StatusDto,\n} from '@screenreader-speech-capture/shared';\n\n/** Where the BFF finds the bridge when `SR_BRIDGE_API_URL` is not set (`pnpm dev:ui`). */\nexport const DEFAULT_BRIDGE_URL = 'http://127.0.0.1:5151';\n\ntype Fetch = typeof fetch;\n\n/** The bridge's HTTP API as the BFF uses it: the only place the UI server talks to the bridge. */\nexport interface BridgeApi {\n status(): Promise<StatusDto>;\n sessions(): Promise<SessionListDto>;\n startSession(request: StartSessionRequestDto): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n endSession(): Promise<void>;\n /** Deletes an ended session and its speech (the bridge refuses the current one). */\n deleteSession(id: number): Promise<void>;\n /** Clears the speech of the current session or of `none` (`session`: an id or `none`); it keeps running. */\n clearSpeech(session: string): Promise<void>;\n /** The configuration in use (`active`) or the one the next start will use (`saved`). */\n config(view: 'active' | 'saved'): Promise<ConfigDto>;\n /** The settings a flag or environment variable sets: the config file can't change them. */\n configOverrides(): Promise<ConfigOverridesDto>;\n /**\n * Saves a partial config for the next start and answers with the saved config. Rejects with the\n * bridge's status and message, plus `field` (`tcp.port`) when the bridge names one.\n */\n updateConfig(patch: ConfigPatchDto): Promise<ConfigDto>;\n /** Inserts a marker; the bridge files it under the current session (or outside any). */\n addMarker(label: string): Promise<SpeechEntryDto>;\n /** One page of a scope's entries with `seq > since`, oldest first (`session`: an id or `none`). */\n speech(session: string | null, since: number, limit: number): Promise<SpeechListDto>;\n /**\n * Opens the bridge's SSE stream (`session`: an id or `none`). The body is passed on as it is,\n * so `Last-Event-ID` replays and every event name reach the browser untouched.\n */\n openSpeechStream(\n session: string | null,\n lastEventId: string | null,\n signal: AbortSignal,\n ): Promise<Response>;\n}\n\n/** Named in the bridge's logs when this UI ends or replaces another client's session. */\nconst UI_CLIENT = 'web-ui';\n\n/**\n * `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in\n * routes and a fake in tests.\n */\nexport function createBridgeApi(baseUrl: string, fetchFn: Fetch): BridgeApi {\n const root = baseUrl.replace(/\\/+$/, '') + API_PREFIX;\n // SvelteKit's `event.fetch` adds `Origin: <the UI's own origin>` to every call to another origin\n // (`pnpm dev:ui`: http://localhost:5173). The bridge refuses a POST from any origin but its own\n // (docs/usage/security.md#host-and-origin), so name the bridge itself: this is a server-side\n // call, not a page of another site.\n const origin = new URL(root).origin;\n\n async function call(\n method: 'GET' | 'POST' | 'PUT' | 'DELETE',\n path: string,\n body?: unknown,\n ): Promise<unknown> {\n let response: Response;\n try {\n response = await fetchFn(`${root}${path}`, {\n method,\n headers: {\n accept: 'application/json',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(body === undefined ? {} : { 'content-type': 'application/json' }),\n },\n body: body === undefined ? undefined : JSON.stringify(body),\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n const answer: unknown = await response.json().catch(() => undefined);\n if (!response.ok) {\n const apiError = checkDto(AnyErrorBodySchema, answer);\n if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);\n const { message, details } = apiError.value.error;\n const field = details?.field;\n if (typeof field === 'string') error(response.status, { message, field });\n error(response.status, message);\n }\n return answer;\n }\n\n async function read<S extends DtoSchema>(\n method: 'GET' | 'POST' | 'PUT',\n path: string,\n schema: S,\n body?: unknown,\n ): Promise<DtoOf<S>> {\n const checked = checkDto(schema, await call(method, path, body));\n if (!checked.ok) {\n error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);\n }\n return checked.value;\n }\n\n return {\n status: () => read('GET', '/status', StatusSchema),\n sessions: () => read('GET', '/sessions', SessionListSchema),\n startSession: (request) => read('POST', '/sessions', StartSessionResponseSchema, request),\n endSession: async () => {\n await call('POST', '/sessions/end');\n },\n deleteSession: async (id) => {\n await call('DELETE', `/sessions?session=${id}`);\n },\n clearSpeech: async (session) => {\n await call('DELETE', `/speech?session=${encodeURIComponent(session)}`);\n },\n config: (view) => read('GET', `/config?view=${view}`, ConfigSchema),\n configOverrides: () => read('GET', '/config/overrides', ConfigOverridesSchema),\n updateConfig: (patch) => read('PUT', '/config', ConfigSchema, patch),\n addMarker: (label) => read('POST', '/markers', SpeechEntrySchema, { label }),\n speech: (session, since, limit) => {\n const query = new URLSearchParams({ since: String(since), limit: String(limit) });\n if (session !== null) query.set('session', session);\n return read('GET', `/speech?${query}`, SpeechListSchema);\n },\n openSpeechStream: async (session, lastEventId, signal) => {\n const query = session === null ? '' : `?session=${encodeURIComponent(session)}`;\n let response: Response;\n try {\n response = await fetchFn(`${root}/speech/stream${query}`, {\n headers: {\n accept: 'text/event-stream',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(lastEventId === null ? {} : { 'last-event-id': lastEventId }),\n },\n signal,\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n if (!response.ok || response.body === null) {\n error(\n response.status === 200 ? 502 : response.status,\n 'The speech stream is not available',\n );\n }\n return response;\n },\n };\n}\n\nfunction describe(cause: unknown): string {\n return cause instanceof Error ? cause.message : String(cause);\n}\n\n/** The bridge API of this deployment (read per request, so no SvelteKit env module is needed). */\nexport function bridgeApiFromEnv(fetchFn: Fetch): BridgeApi {\n // The bridge sets SR_BRIDGE_API_URL to its own address when it mounts the UI.\n return createBridgeApi(process.env.SR_BRIDGE_API_URL ?? DEFAULT_BRIDGE_URL, fetchFn);\n}\n"],"mappings":";;;;AAOA,IAAa,aAAa;;AC4D1B,IAAM,YAAY;;;;;AAMlB,SAAgB,gBAAgB,SAAiB,SAA2B;CAC1E,MAAM,OAAO,QAAQ,QAAQ,QAAQ,EAAE,IAAI;CAK3C,MAAM,SAAS,IAAI,IAAI,IAAI,CAAC,CAAC;CAE7B,eAAe,KACb,QACA,MACA,MACkB;EAClB,IAAI;EACJ,IAAI;GACF,WAAW,MAAM,QAAQ,GAAG,OAAO,QAAQ;IACzC;IACA,SAAS;KACP,QAAQ;KACR;MACC,gBAAgB;KACjB,GAAI,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,mBAAmB;IACrE;IACA,MAAM,SAAS,KAAA,IAAY,KAAA,IAAY,KAAK,UAAU,IAAI;GAC5D,CAAC;EACH,SAAS,OAAO;GACd,MAAM,KAAK,gCAAgC,SAAS,KAAK,GAAG;EAC9D;EACA,MAAM,SAAkB,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;EACnE,IAAI,CAAC,SAAS,IAAI;GAChB,MAAM,W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O;GAClD,OAAO,KAAK,OAAO,WAAW,SAAS,gBAAgB;EACzD;EACA,kBAAkB,OAAO,SAAS,aAAa,WAAW;GACxD,MAAM,QAAQ,YAAY,OAAO,KAAK,YAAY,mBAAmB,OAAO;GAC5E,IAAI;GACJ,IAAI;IACF,WAAW,MAAM,QAAQ,GAAG,KAAK,gBAAgB,SAAS;KACxD,SAAS;MACP,QAAQ;MACR;OACC,gBAAgB;MACjB,GAAI,gBAAgB,OAAO,CAAC,IAAI,EAAE,iBAAiB,YAAY;KACjE;KACA;IACF,CAAC;GACH,SAAS,OAAO;IACd,MAAM,KAAK,gCAAgC,SAAS,KAAK,GAAG;GAC9D;GACA,IAAI,CAAC,SAAS,MAAM,SAAS,SAAS,MACpC,MACE,SAAS,WAAW,MAAM,MAAM,SAAS,QACzC,oCACF;GAEF,OAAO;EACT;CACF;AACF;AAEA,SAAS,SAAS,OAAwB;CACxC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;;AAGA,SAAgB,iBAAiB,SAA2B;CAE1D,OAAO,gBAAgB,QAAQ,IAAI,qBAAA,yBAAyC,OAAO;AACrF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { t as error } from "../../../../../chunks/exports.js";
|
|
2
|
-
import { t as bridgeApiFromEnv } from "../../../../../chunks/bridge-api.js";
|
|
3
|
-
// src/routes/api/sessions/[id]/+server.ts
|
|
4
|
-
/** Deletes an ended session and its speech (the bridge refuses the current one). */
|
|
5
|
-
var DELETE = async ({ params, fetch }) => {
|
|
6
|
-
const id = Number(params.id);
|
|
7
|
-
if (!/^\d+$/.test(params.id) || !Number.isSafeInteger(id) || id < 1) error(400, "The session id must be a positive integer");
|
|
8
|
-
await bridgeApiFromEnv(fetch).deleteSession(id);
|
|
9
|
-
return new Response(null, { status: 204 });
|
|
10
|
-
};
|
|
11
|
-
export { DELETE };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/sessions/[id]/+server.ts"],"sourcesContent":["import { error } from '@sveltejs/kit';\nimport { bridgeApiFromEnv } from '#lib/server/bridge-api.js';\nimport type { RequestHandler } from './$types';\n\n/** Deletes an ended session and its speech (the bridge refuses the current one). */\nexport const DELETE: RequestHandler = async ({ params, fetch }) => {\n const id = Number(params.id);\n if (!/^\\d+$/.test(params.id) || !Number.isSafeInteger(id) || id < 1) {\n error(400, 'The session id must be a positive integer');\n }\n await bridgeApiFromEnv(fetch).deleteSession(id);\n return new Response(null, { status: 204 });\n};\n"],"mappings":";;;;AAKA,IAAa,SAAyB,OAAO,EAAE,QAAQ,YAAY;CACjE,MAAM,KAAK,OAAO,OAAO,EAAE;CAC3B,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE,KAAK,CAAC,OAAO,cAAc,EAAE,KAAK,KAAK,GAChE,MAAM,KAAK,2CAA2C;CAExD,MAAM,iBAAiB,KAAK,CAAC,CAAC,cAAc,EAAE;CAC9C,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAC3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-entry.js","names":["e.remote_request_property"],"sources":["../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/shared.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/command.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/form.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/prerender.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/utils/shared-iterator.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/query.js","../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/server/remote/requested.js"],"sourcesContent":["/** @import { RequestEvent } from '@sveltejs/kit' */\n/** @import { MaybePromise, RequestState, RemoteInternals, RequestStore, RemoteLiveQueryUserFunctionReturnType } from 'types' */\nimport { error } from '@sveltejs/kit';\nimport { ValidationError } from '@sveltejs/kit/internal';\nimport { with_request_store } from '@sveltejs/kit/internal/server';\nimport * as e from '../../../../messages/server-errors.js';\n\n/**\n * @param {any} validate_or_fn\n * @param {((arg?: any) => any) | undefined} [maybe_fn]\n * @param {(() => import('types').BaseRemoteInternals | undefined) | undefined} [get_internals]\n * @returns {(arg?: any) => MaybePromise<any>}\n */\nexport function create_validator(validate_or_fn, maybe_fn, get_internals) {\n\t// prevent functions without validators being called with arguments\n\tif (!maybe_fn) {\n\t\treturn (arg) => {\n\t\t\tif (arg !== undefined) {\n\t\t\t\terror(400, 'Bad Request');\n\t\t\t}\n\t\t};\n\t}\n\n\t// if 'unchecked', pass input through without validating\n\tif (validate_or_fn === 'unchecked') {\n\t\treturn (arg) => arg;\n\t}\n\n\t// use https://standardschema.dev validator if provided\n\tif ('~standard' in validate_or_fn) {\n\t\treturn async (arg) => {\n\t\t\t// access property and call method in one go to preserve potential this context\n\t\t\tconst result = await validate_or_fn['~standard'].validate(arg);\n\n\t\t\t// if the `issues` field exists, the validation failed\n\t\t\tif (result.issues) {\n\t\t\t\tconst internals = get_internals?.();\n\t\t\t\tthrow new ValidationError(\n\t\t\t\t\tresult.issues,\n\t\t\t\t\tinternals?.name ? { name: internals.name, file: internals.file } : undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn result.value;\n\t\t};\n\t}\n\n\te.remote_invalid_validator();\n}\n\n/**\n * In case of a single remote function call, just returns the result.\n *\n * In case of a full page reload, returns the response for a remote function call,\n * either from the cache or by invoking the function.\n * Also saves an uneval'ed version of the result for later HTML inlining for hydration.\n *\n * @template {MaybePromise<any>} T\n * @param {RemoteInternals} internals\n * @param {string} payload — the stringified raw argument (i.e. the cache key the client will use)\n * @param {RequestState} state\n * @param {() => Promise<T>} get_result\n * @returns {Promise<T>}\n */\nexport async function get_response(internals, payload, state, get_result) {\n\t// wait a beat, in case `myQuery().set(...)` or `myQuery().refresh()` is immediately called\n\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\tawait 0;\n\n\tconst cache = get_cache(internals, state);\n\n\tif (!state.is_in_remote_query) {\n\t\t// if this is a top-level (not nested) `await myQuery()`, include it in the serialized response\n\t\tget_implicit_lookup(internals, state)[payload] = get_result;\n\t}\n\n\treturn (cache[payload] ??= get_result());\n}\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {boolean} allow_cookies\n * @returns {RequestStore}\n */\nfunction derive_remote_function_event(event, state, allow_cookies) {\n\t/** @type {RequestEvent} */\n\tconst derived = {\n\t\t...event,\n\t\tsetHeaders: () => {\n\t\t\te.remote_headers_forbidden();\n\t\t},\n\t\tcookies: {\n\t\t\t...event.cookies,\n\t\t\tset: (name, value, opts) => {\n\t\t\t\tif (!allow_cookies) {\n\t\t\t\t\te.remote_cookie_forbidden({ operation: 'set' });\n\t\t\t\t}\n\n\t\t\t\tif (opts?.path && !opts.path.startsWith('/')) {\n\t\t\t\t\te.remote_cookie_path_relative({ operation: 'set' });\n\t\t\t\t}\n\n\t\t\t\treturn event.cookies.set(name, value, opts);\n\t\t\t},\n\t\t\tdelete: (name, opts) => {\n\t\t\t\tif (!allow_cookies) {\n\t\t\t\t\te.remote_cookie_forbidden({ operation: 'delete' });\n\t\t\t\t}\n\n\t\t\t\tif (opts?.path && !opts.path.startsWith('/')) {\n\t\t\t\t\te.remote_cookie_path_relative({ operation: 'deleted' });\n\t\t\t\t}\n\n\t\t\t\treturn event.cookies.delete(name, opts);\n\t\t\t}\n\t\t}\n\t};\n\n\tif (state.is_in_remote_query) {\n\t\tfor (const property of ['url', 'params', 'route']) {\n\t\t\t// non-enumerable so spreading for a nested derivation doesn't invoke the getter\n\t\t\tObject.defineProperty(derived, property, {\n\t\t\t\tenumerable: false,\n\t\t\t\tget() {\n\t\t\t\t\treturn e.remote_request_property({ property });\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\tevent: derived,\n\t\tstate: {\n\t\t\t...state,\n\t\t\tis_in_remote_function: true\n\t\t}\n\t};\n}\n\n/**\n * Like `with_event` but removes things from `event` you cannot see/call in remote functions, such as `setHeaders`.\n * @template T\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {boolean} allow_cookies\n * @param {() => any} get_input\n * @param {(arg?: any) => T} fn\n */\nexport async function run_remote_function(event, state, allow_cookies, get_input, fn) {\n\tconst store = derive_remote_function_event(event, state, allow_cookies);\n\n\t// In two parts, each with_event, so that runtimes without async local storage can still get the event at the start of the function\n\tconst input = await with_request_store(store, get_input);\n\treturn with_request_store(store, () => fn(input));\n}\n\n/**\n * Like `with_event` but removes things from `event` you cannot see/call in remote functions, such as `setHeaders`.\n * @template T\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {boolean} allow_cookies\n * @param {() => any} get_input\n * @param {(arg?: any) => RemoteLiveQueryUserFunctionReturnType<T>} fn\n * @param {string} name\n */\nexport async function* run_remote_generator(event, state, allow_cookies, get_input, fn, name) {\n\tconst store = derive_remote_function_event(event, state, allow_cookies);\n\n\t// In two parts, each with_event, so that runtimes without async local storage can still get the event at the start of the function / calls to next\n\tconst input = await with_request_store(store, get_input);\n\tconst source = await with_request_store(store, () => fn(input));\n\tconst iterator = to_iterator(source, name);\n\tlet done = false;\n\n\ttry {\n\t\twhile (true) {\n\t\t\t// the code of a generator function is basically chopped apart at each\n\t\t\t// yield, and each part is an invocation of `.next`. So, to provide\n\t\t\t// access to the request context in generator functions, we have to\n\t\t\t// provide it to every invocation of `.next`. (It's more obvious that\n\t\t\t// this is necessary with plain iterators.)\n\t\t\tconst result = await with_request_store(store, () => iterator.next());\n\t\t\tif (result.done) {\n\t\t\t\tdone = true;\n\t\t\t\treturn result.value;\n\t\t\t}\n\t\t\tyield result.value;\n\t\t}\n\t} finally {\n\t\tif (!done && typeof iterator.return === 'function') {\n\t\t\tawait with_request_store(store, () => iterator.return?.(undefined));\n\t\t}\n\t}\n}\n\n/**\n * @template T\n * @param {Awaited<RemoteLiveQueryUserFunctionReturnType<T>>} source\n * @param {string} name\n * @returns {Iterator<T> | AsyncIterator<T>}\n */\nfunction to_iterator(source, name) {\n\t// intentionally using `in` because these could be inherited\n\tif ('next' in source && typeof source.next === 'function') {\n\t\treturn source;\n\t}\n\n\tif (Symbol.asyncIterator in source && typeof source[Symbol.asyncIterator] === 'function') {\n\t\treturn source[Symbol.asyncIterator]();\n\t}\n\n\tif (Symbol.iterator in source && typeof source[Symbol.iterator] === 'function') {\n\t\treturn source[Symbol.iterator]();\n\t}\n\n\te.remote_query_live_not_iterable({ name });\n}\n\n/**\n * Note that `state` is deliberately not optional: resources that capture the request\n * state at creation must pass it explicitly, because reading it from the request store\n * at call time is only equivalent on runtimes with `AsyncLocalStorage` support.\n * Callers without a captured state (such as the module-level `form` instance getters)\n * should pass `get_request_store().state` themselves.\n * @param {RemoteInternals} internals\n * @param {RequestState} state\n */\nexport function get_cache(internals, state) {\n\tlet cache = state.remote.data?.get(internals);\n\n\tif (cache === undefined) {\n\t\tcache = {};\n\t\t(state.remote.data ??= new Map()).set(internals, cache);\n\t}\n\n\treturn cache;\n}\n\n/**\n * @param {RemoteInternals} internals\n * @param {RequestState} state\n */\nexport function get_implicit_lookup(internals, state) {\n\tlet cache = state.remote.implicit?.get(internals);\n\n\tif (cache === undefined) {\n\t\tcache = {};\n\t\t(state.remote.implicit ??= new Map()).set(internals, cache);\n\t}\n\n\treturn cache;\n}\n","/** @import { RemoteCommand } from '$app/server' */\n/** @import { MaybePromise, RemoteCommandInternals } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\nimport { get_request_store } from '@sveltejs/kit/internal/server';\nimport { create_validator, run_remote_function } from './shared.js';\nimport { MUTATIVE_METHODS } from '../../../../constants.js';\nimport * as e from '../../../../messages/server-errors.js';\n\n/**\n * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation.\n *\n * @template Output\n * @overload\n * @param {() => MaybePromise<Output>} fn\n * @returns {RemoteCommand<void, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation.\n *\n * @template Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(arg: Input) => MaybePromise<Output>} fn\n * @returns {RemoteCommand<Input, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation.\n *\n * @template {StandardSchemaV1} Schema\n * @template Output\n * @overload\n * @param {Schema} validate\n * @param {(arg: StandardSchemaV1.InferOutput<Schema>) => MaybePromise<Output>} fn\n * @returns {RemoteCommand<StandardSchemaV1.InferInput<Schema>, Output>}\n * @since 2.27\n */\n/**\n * @template Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {(arg?: Input) => MaybePromise<Output>} [maybe_fn]\n * @returns {RemoteCommand<Input, Output>}\n * @since 2.27\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function command(validate_or_fn, maybe_fn) {\n\t/** @type {(arg?: Input) => MaybePromise<Output>} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {RemoteCommandInternals} */\n\tconst __ = { type: 'command', id: '', name: '' };\n\n\t/** @type {(arg?: any) => MaybePromise<Input>} */\n\tconst validate = create_validator(validate_or_fn, maybe_fn, () => __);\n\n\t/** @type {RemoteCommand<Input, Output> & { __: RemoteCommandInternals }} */\n\tconst wrapper = (arg) => {\n\t\tconst { event, state } = get_request_store();\n\n\t\tif (\n\t\t\t!MUTATIVE_METHODS.includes(event.request.method) ||\n\t\t\tstate.is_in_remote_query ||\n\t\t\tstate.is_in_remote_prerender\n\t\t) {\n\t\t\tif (state.is_in_remote_query || state.is_in_remote_prerender) {\n\t\t\t\te.remote_command_readonly({ name: __.name });\n\t\t\t}\n\t\t\te.remote_command_method({ name: __.name, method: event.request.method });\n\t\t}\n\n\t\tif (state.is_in_render) {\n\t\t\te.remote_command_render({ name: __.name });\n\t\t}\n\n\t\tconst promise = Promise.resolve(\n\t\t\trun_remote_function(event, state, true, () => validate(arg), fn)\n\t\t);\n\n\t\t// @ts-expect-error\n\t\tpromise.updates = () => {\n\t\t\te.server_api_unavailable({ name: `${__.name}(...).updates(...)` });\n\t\t};\n\n\t\treturn /** @type {ReturnType<RemoteCommand<Input, Output>>} */ (promise);\n\t};\n\n\tObject.defineProperty(wrapper, '__', { value: __ });\n\n\t// On the server, pending is always 0\n\tObject.defineProperty(wrapper, 'pending', {\n\t\tget: () => 0\n\t});\n\n\treturn wrapper;\n}\n","/** @import { RemoteFormInput, RemoteForm, RemoteFormInvalidField } from '$app/server' */\n/** @import { InternalRemoteFormIssue, MaybePromise, HasNonOptionalBoolean, RemoteFormInternals } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\nimport { get_request_store } from '@sveltejs/kit/internal/server';\nimport {\n\tcreate_field_proxy,\n\tsplit_path,\n\tdeep_set,\n\tnormalize_issue,\n\tflatten_issues,\n\tparse_form_key,\n\tgroup_formdata\n} from '../../../form-utils.js';\nimport { get_cache, get_implicit_lookup, run_remote_function } from './shared.js';\nimport { ActionFailure, ValidationError } from '@sveltejs/kit/internal';\nimport { DEV } from 'esm-env';\nimport * as e from '../../../../messages/server-errors.js';\n\n/**\n * Creates a form object that can be spread onto a `<form>` element.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation.\n *\n * @template Output\n * @overload\n * @param {() => MaybePromise<Output>} fn\n * @returns {RemoteForm<void, Output>}\n * @since 2.27\n */\n/**\n * Creates a form object that can be spread onto a `<form>` element.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation.\n *\n * @template {RemoteFormInput} Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(data: Input, issue: RemoteFormInvalidField<Input>) => MaybePromise<Output>} fn\n * @returns {RemoteForm<Input, Output>}\n * @since 2.27\n */\n/**\n * Creates a form object that can be spread onto a `<form>` element.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation.\n *\n * @template {StandardSchemaV1<RemoteFormInput, Record<string, any>>} Schema\n * @template Output\n * @overload\n * @param {true extends HasNonOptionalBoolean<StandardSchemaV1.InferInput<Schema>> ? 'Error: All booleans in form schemas must be optional (e.g. `v.optional(v.boolean(), false)`) because checkbox inputs do not send a false value when unchecked.' : Schema} validate\n * @param {(data: StandardSchemaV1.InferOutput<Schema>, issue: RemoteFormInvalidField<StandardSchemaV1.InferInput<Schema>>) => MaybePromise<Output>} fn\n * @returns {RemoteForm<StandardSchemaV1.InferInput<Schema>, Output>}\n * @since 2.27\n */\n/**\n * @template {RemoteFormInput} Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {(data_or_issue: any, issue?: any) => MaybePromise<Output>} [maybe_fn]\n * @returns {RemoteForm<Input, Output>}\n * @since 2.27\n */\n/*@__NO_SIDE_EFFECTS__*/\n// @ts-ignore we don't want to prefix `fn` with an underscore, as that will be user-visible\nexport function form(validate_or_fn, maybe_fn) {\n\t/** @type {any} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {StandardSchemaV1 | null} */\n\tconst schema =\n\t\t!maybe_fn || validate_or_fn === 'unchecked' ? null : /** @type {any} */ (validate_or_fn);\n\n\t/**\n\t * @param {string | number | boolean} [key]\n\t */\n\tfunction create_instance(key) {\n\t\tconst instance = /** @type {RemoteForm<Input, Output>} */ ({});\n\n\t\tinstance.method = 'POST';\n\n\t\tObject.defineProperty(instance, 'enhance', {\n\t\t\tvalue: () => {\n\t\t\t\treturn { action: instance.action, method: instance.method };\n\t\t\t}\n\t\t});\n\n\t\t/** @type {RemoteFormInternals} */\n\t\tconst __ = {\n\t\t\ttype: 'form',\n\t\t\tname: '',\n\t\t\tid: '',\n\t\t\tfn: async (data, meta, form_data) => {\n\t\t\t\tconst output =\n\t\t\t\t\t/** @type {{ submission: true, input?: Record<string, any>, issues?: InternalRemoteFormIssue[], result: Output }} */ ({});\n\n\t\t\t\t// make it possible to differentiate between user submission and programmatic `field.set(...)` updates\n\t\t\t\toutput.submission = true;\n\n\t\t\t\tconst { event, state } = get_request_store();\n\t\t\t\tconst validated = await schema?.['~standard'].validate(data);\n\n\t\t\t\tif (meta.validate_only) {\n\t\t\t\t\treturn validated?.issues?.map((issue) => normalize_issue(issue, true)) ?? [];\n\t\t\t\t}\n\n\t\t\t\tif (validated?.issues !== undefined) {\n\t\t\t\t\thandle_issues(output, validated.issues, form_data, __.id);\n\t\t\t\t} else {\n\t\t\t\t\tif (validated !== undefined) {\n\t\t\t\t\t\tdata = validated.value;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst issue = create_issues();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\toutput.result = await run_remote_function(\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t() => data,\n\t\t\t\t\t\t\t(data) => (!maybe_fn ? fn() : fn(data, issue))\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (DEV && output.result instanceof ActionFailure) {\n\t\t\t\t\t\t\te.remote_form_fail();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (error instanceof ValidationError) {\n\t\t\t\t\t\t\thandle_issues(output, error.issues, form_data, __.id);\n\t\t\t\t\t\t} else if (DEV && error instanceof ActionFailure) {\n\t\t\t\t\t\t\te.remote_form_fail(undefined, { cause: error });\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// We don't need to care about args or deduplicating calls, because uneval results are only relevant in full page reloads\n\t\t\t\t// where only one form submission is active at the same time\n\t\t\t\tif (!event.isRemoteRequest) {\n\t\t\t\t\tconst cache = get_cache(__, state);\n\t\t\t\t\tcache[''] ??= output;\n\n\t\t\t\t\t// register under the client-side action id so the output is serialized\n\t\t\t\t\t// into the page, allowing the hydrated client to restore `result`/`issues`/`input`\n\t\t\t\t\tget_implicit_lookup(__, state)[__.key ? `${__.id}/${__.key}` : __.id] = () => cache[''];\n\t\t\t\t}\n\n\t\t\t\treturn output;\n\t\t\t}\n\t\t};\n\n\t\tObject.defineProperty(instance, '__', { value: __ });\n\n\t\tObject.defineProperty(instance, 'action', {\n\t\t\tget: () => {\n\t\t\t\tconst { event, state } = get_request_store();\n\t\t\t\tconst search = new URLSearchParams(state.prerendering ? '' : event.url.search);\n\t\t\t\tsearch.delete('/remote');\n\n\t\t\t\tconst query = search.toString();\n\t\t\t\tconst action_id = __.key ? `${__.id}/${encodeURIComponent(__.key)}` : __.id;\n\n\t\t\t\treturn `?${query ? `${query}&` : ''}/remote=${action_id}`;\n\t\t\t},\n\t\t\tenumerable: true\n\t\t});\n\n\t\tObject.defineProperty(instance, 'fields', {\n\t\t\tget() {\n\t\t\t\t// the form instance is created once per module and shared across requests,\n\t\t\t\t// so the current request's state has to be resolved at access time\n\t\t\t\treturn create_field_proxy({\n\t\t\t\t\tform_id: __.id,\n\t\t\t\t\tget: () => get_cache(__, get_request_store().state)?.['']?.input ?? {},\n\t\t\t\t\tset: (path, value) => {\n\t\t\t\t\t\tconst cache = get_cache(__, get_request_store().state);\n\t\t\t\t\t\tconst entry = cache[''];\n\n\t\t\t\t\t\tif (entry?.submission) {\n\t\t\t\t\t\t\t// don't override a submission\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (path.length === 0) {\n\t\t\t\t\t\t\t(cache[''] ??= {}).input = value;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst input = entry?.input ?? {};\n\t\t\t\t\t\tdeep_set(input, path.map(String), value);\n\t\t\t\t\t\t(cache[''] ??= {}).input = input;\n\t\t\t\t\t},\n\t\t\t\t\tget_issues: () =>\n\t\t\t\t\t\tflatten_issues(get_cache(__, get_request_store().state)?.['']?.issues ?? []),\n\t\t\t\t\tget_touched: () => ({}),\n\t\t\t\t\tget_dirty: () => ({})\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(instance, 'result', {\n\t\t\tget() {\n\t\t\t\ttry {\n\t\t\t\t\treturn get_cache(__, get_request_store().state)?.['']?.result;\n\t\t\t\t} catch {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// On the server, pending is always 0\n\t\tObject.defineProperty(instance, 'pending', {\n\t\t\tget: () => 0\n\t\t});\n\n\t\tObject.defineProperty(instance, 'submitted', {\n\t\t\tget: () => false\n\t\t});\n\n\t\tObject.defineProperty(instance, 'preflight', {\n\t\t\t// preflight is a noop on the server\n\t\t\tvalue: () => instance\n\t\t});\n\n\t\tObject.defineProperty(instance, 'validate', {\n\t\t\tvalue: () => {\n\t\t\t\te.server_api_unavailable({ name: 'form.validate()' });\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(instance, 'submit', {\n\t\t\tvalue: () => {\n\t\t\t\te.server_api_unavailable({ name: 'form.submit()' });\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(instance, 'element', {\n\t\t\tget: () => null\n\t\t});\n\n\t\tif (key == undefined) {\n\t\t\tObject.defineProperty(instance, 'for', {\n\t\t\t\t/** @type {RemoteForm<any, any>['for']} */\n\t\t\t\tvalue: (key) => {\n\t\t\t\t\tconst { state } = get_request_store();\n\t\t\t\t\tconst cache_key = __.id + '|' + JSON.stringify(key);\n\t\t\t\t\t/** @type {RemoteForm<Input, Output> & { __: RemoteFormInternals }} */\n\t\t\t\t\tlet instance = (state.remote.forms ??= new Map()).get(cache_key);\n\n\t\t\t\t\tif (!instance) {\n\t\t\t\t\t\tinstance = /** @type {RemoteForm<Input, Output> & { __: RemoteFormInternals }} */ (\n\t\t\t\t\t\t\tcreate_instance(key)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tinstance.__.id = __.id;\n\t\t\t\t\t\tinstance.__.key = JSON.stringify(key);\n\t\t\t\t\t\tinstance.__.name = __.name;\n\n\t\t\t\t\t\tstate.remote.forms.set(cache_key, instance);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn instance;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn instance;\n\t}\n\n\treturn create_instance();\n}\n\n/**\n * @param {{ issues?: InternalRemoteFormIssue[], input?: Record<string, any>, result: any }} output\n * @param {readonly StandardSchemaV1.Issue[]} issues\n * @param {FormData | null} form_data - null if the form is progressively enhanced\n * @param {string} form_id - hash/name of the form\n */\nfunction handle_issues(output, issues, form_data, form_id) {\n\toutput.issues = issues.map((issue) => normalize_issue(issue, true));\n\n\t// if it was a progressively-enhanced submission, we don't need\n\t// to return the input — it's already there\n\tif (form_data) {\n\t\toutput.input = {};\n\n\t\tfor (const [field_name, entries] of group_formdata(form_data)) {\n\t\t\tconst field = parse_form_key(form_id, field_name);\n\t\t\tconst path = split_path(field.name);\n\n\t\t\t// redact sensitive fields\n\t\t\tif (path.some((part) => part.startsWith('_'))) continue;\n\n\t\t\tconst values = entries.filter((value) => typeof value === 'string');\n\n\t\t\tdeep_set(\n\t\t\t\t/** @type {Record<string, any>} */ (output.input),\n\t\t\t\tpath,\n\t\t\t\tfield.is_array ? values : values[0]\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Creates an invalid function that can be used to imperatively mark form fields as invalid\n * @returns {RemoteFormInvalidField<any>}\n */\nfunction create_issues() {\n\treturn /** @type {RemoteFormInvalidField<any>} */ (\n\t\tnew Proxy(\n\t\t\t/** @param {string} message */\n\t\t\t(message) => {\n\t\t\t\treturn create_issue(message);\n\t\t\t},\n\t\t\t{\n\t\t\t\tget(target, prop) {\n\t\t\t\t\tif (typeof prop === 'symbol') return /** @type {any} */ (target)[prop];\n\n\t\t\t\t\treturn create_issue_proxy(prop, []);\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t);\n\n\t/**\n\t * @param {string} message\n\t * @param {(string | number)[]} path\n\t * @returns {StandardSchemaV1.Issue}\n\t */\n\tfunction create_issue(message, path = []) {\n\t\treturn {\n\t\t\tmessage,\n\t\t\tpath\n\t\t};\n\t}\n\n\t/**\n\t * Creates a proxy that builds up a path and returns a function to create an issue\n\t * @param {string | number} key\n\t * @param {(string | number)[]} path\n\t */\n\tfunction create_issue_proxy(key, path) {\n\t\tconst new_path = [...path, key];\n\n\t\t/**\n\t\t * @param {string} message\n\t\t * @returns {StandardSchemaV1.Issue}\n\t\t */\n\t\tconst issue_func = (message) => create_issue(message, new_path);\n\n\t\treturn new Proxy(issue_func, {\n\t\t\tget(target, prop) {\n\t\t\t\tif (typeof prop === 'symbol') return /** @type {any} */ (target)[prop];\n\n\t\t\t\t// Handle array access like invalid.items[0]\n\t\t\t\tif (/^\\d+$/.test(prop)) {\n\t\t\t\t\treturn create_issue_proxy(parseInt(prop, 10), new_path);\n\t\t\t\t}\n\n\t\t\t\t// Handle property access like invalid.field.nested\n\t\t\t\treturn create_issue_proxy(prop, new_path);\n\t\t\t}\n\t\t});\n\t}\n}\n","/** @import { RemoteResource, RemotePrerenderFunction } from '$app/server' */\n/** @import { RemoteFunctionResponse, RemotePrerenderInputsGenerator, RemotePrerenderInternals, MaybePromise } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\nimport { HandledHttpError } from '@sveltejs/kit/internal';\nimport { get_request_store } from '@sveltejs/kit/internal/server';\nimport { stringify_remote_arg } from '../../../shared.js';\nimport { parse, stringify } from '#app/internal/transport';\nimport { noop } from '../../../../utils/functions.js';\nimport { app_dir, base } from '#app/paths';\nimport { create_validator, get_response, run_remote_function } from './shared.js';\n\n/**\n * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation.\n *\n * @template Output\n * @overload\n * @param {() => MaybePromise<Output>} fn\n * @param {{ inputs?: RemotePrerenderInputsGenerator<void>, dynamic?: boolean }} [options]\n * @returns {RemotePrerenderFunction<void, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation.\n *\n * @template Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(arg: Input) => MaybePromise<Output>} fn\n * @param {{ inputs?: RemotePrerenderInputsGenerator<Input>, dynamic?: boolean }} [options]\n * @returns {RemotePrerenderFunction<Input, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation.\n *\n * @template {StandardSchemaV1} Schema\n * @template Output\n * @overload\n * @param {Schema} schema\n * @param {(arg: StandardSchemaV1.InferOutput<Schema>) => MaybePromise<Output>} fn\n * @param {{ inputs?: RemotePrerenderInputsGenerator<StandardSchemaV1.InferInput<Schema>>, dynamic?: boolean }} [options]\n * @returns {RemotePrerenderFunction<StandardSchemaV1.InferInput<Schema>, Output>}\n * @since 2.27\n */\n/**\n * @template Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {any} [fn_or_options]\n * @param {{ inputs?: RemotePrerenderInputsGenerator<Input>, dynamic?: boolean }} [maybe_options]\n * @returns {RemotePrerenderFunction<Input, Output>}\n * @since 2.27\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function prerender(validate_or_fn, fn_or_options, maybe_options) {\n\tconst maybe_fn = typeof fn_or_options === 'function' ? fn_or_options : undefined;\n\n\t/** @type {typeof maybe_options} */\n\tconst options = maybe_options ?? (maybe_fn ? undefined : fn_or_options);\n\n\t/** @type {(arg?: Input) => MaybePromise<Output>} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {RemotePrerenderInternals} */\n\tconst __ = {\n\t\ttype: 'prerender',\n\t\tid: '',\n\t\tname: '',\n\t\thas_arg: !!maybe_fn,\n\t\tinputs: options?.inputs,\n\t\tdynamic: options?.dynamic\n\t};\n\n\t/** @type {(arg?: any) => MaybePromise<Input>} */\n\tconst validate = create_validator(validate_or_fn, maybe_fn, () => __);\n\n\t/** @type {RemotePrerenderFunction<Input, Output> & { __: RemotePrerenderInternals }} */\n\tconst wrapper = (arg) => {\n\t\tconst { event, state } = get_request_store();\n\t\tconst payload = stringify_remote_arg(arg);\n\n\t\t// `get_response` (as opposed to bare `get_cache`) also registers the call in the\n\t\t// implicit lookup, so that the result is inlined into the page payload (`data.p`)\n\t\t// and the client doesn't need to fetch it again upon hydration\n\t\t/** @type {Promise<Output> & Partial<RemoteResource<Output>>} */\n\t\tconst promise = get_response(__, payload, state, async () => {\n\t\t\tconst id = __.id;\n\t\t\tconst url = `${base}/${app_dir}/remote/${id}${payload ? `/${payload}` : ''}`;\n\n\t\t\tif (!state.prerendering && !__SVELTEKIT_DEV__ && !event.isRemoteRequest) {\n\t\t\t\t/** @type {RemoteFunctionResponse | undefined} */\n\t\t\t\tlet prerendered;\n\n\t\t\t\ttry {\n\t\t\t\t\t// TODO adapters can provide prerendered data more efficiently than\n\t\t\t\t\t// fetching from the public internet\n\t\t\t\t\t// `request.url` rather than `event.url`, which throws inside queries\n\t\t\t\t\tconst response = await fetch(new URL(url, event.request.url).href, {\n\t\t\t\t\t\t// in the unlikely event that an attacker is able to spoof the origin,\n\t\t\t\t\t\t// this protects us against SSRF (the attacker-controlled server cannot\n\t\t\t\t\t\t// trick us into making a request to an internal resource)\n\t\t\t\t\t\tredirect: 'manual'\n\t\t\t\t\t});\n\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\tprerendered = /** @type {RemoteFunctionResponse} */ (await response.json());\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// not available prerendered, fallback to normal function\n\t\t\t\t}\n\n\t\t\t\tif (prerendered) {\n\t\t\t\t\tif (prerendered.type === 'error') {\n\t\t\t\t\t\tthrow new HandledHttpError(prerendered.error);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn parse(prerendered.data)._;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// during a prerender run, the same function might be invoked while rendering\n\t\t\t// multiple pages — share the result across the entire run\n\t\t\tif (state.prerendering?.remote_responses.has(url)) {\n\t\t\t\treturn /** @type {Promise<any>} */ (state.prerendering.remote_responses.get(url));\n\t\t\t}\n\n\t\t\tconst promise = run_remote_function(\n\t\t\t\tevent,\n\t\t\t\t{ ...state, is_in_remote_prerender: true },\n\t\t\t\tfalse,\n\t\t\t\t() => validate(arg),\n\t\t\t\tfn\n\t\t\t);\n\n\t\t\tif (state.prerendering) {\n\t\t\t\tstate.prerendering.remote_responses.set(url, promise);\n\t\t\t}\n\n\t\t\tconst result = await promise;\n\n\t\t\tif (state.prerendering) {\n\t\t\t\tconst body = { type: 'result', data: stringify({ _: result }) };\n\t\t\t\tstate.prerendering.dependencies.set(url, {\n\t\t\t\t\tbody: JSON.stringify(body),\n\t\t\t\t\tresponse: Response.json(body)\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// TODO this is missing error/loading/current/status\n\t\t\treturn result;\n\t\t});\n\n\t\tpromise.catch(noop);\n\n\t\treturn /** @type {RemoteResource<Output>} */ (promise);\n\t};\n\n\tObject.defineProperty(wrapper, '__', { value: __ });\n\n\treturn wrapper;\n}\n","/**\n * A pull-style async iterator that fans out a single stream of values to\n * multiple `for await (...)` consumers. Each subscriber gets its own\n * `AsyncGenerator` whose `.next()` resolves whenever a value is pushed via\n * `push(value)`. Multiple consumers see the same values without each one\n * driving an independent underlying source.\n *\n * Backpressure is **latest-wins**: if values arrive faster than a particular\n * consumer drains its iterator, only the most-recently-pushed value is kept\n * pending for that subscriber. Earlier undrained values are dropped. This is\n * appropriate for live data streams (reactive state replication), not for\n * event logs where every value must be delivered.\n *\n * Lifecycle hooks are exposed via the constructor:\n *\n * - `start()` is called when the subscriber count transitions\n * from 0 to 1 (e.g. to start a pump pulling from a real source).\n * - `stop()` is called when the subscriber count transitions\n * from non-zero back to 0 (e.g. to tear down that pump).\n *\n * Either hook may be omitted.\n *\n * The owner is responsible for calling `push(value)` to broadcast values,\n * `done()` to signal natural completion to all subscribers, and `fail(error)`\n * to broadcast a terminal error. After `done()` or `fail()`, the iterator\n * rejects further `subscribe()` calls with the terminal state appropriately.\n *\n * @template T\n */\nexport class SharedIterator {\n\t/**\n\t * @typedef {object} Subscriber\n\t * @property {{ value: any } | null} pending\n\t * @property {{ error: unknown } | null} pending_error\n\t * @property {boolean} finished\n\t * @property {((result: IteratorResult<any, void>) => void) | null} waiting_resolve\n\t * @property {((reason: unknown) => void) | null} waiting_reject\n\t */\n\n\t/** @type {Set<Subscriber>} */\n\t#subscribers = new Set();\n\n\t/** @type {((instance: SharedIterator<T>) => (() => void)) | undefined} */\n\t#start = undefined;\n\n\t/** @type {(() => void) | undefined} */\n\t#stop = undefined;\n\n\t/** Once `done()` or `fail()` has been broadcast, no new values are accepted. */\n\t#closed = false;\n\n\t/** @type {unknown} */\n\t#terminal_error = undefined;\n\n\t/** Whether `done()` or `fail()` has been broadcast. */\n\tget closed() {\n\t\treturn this.#closed;\n\t}\n\n\t/**\n\t * @param {(instance: SharedIterator<T>) => (() => void)} [start]\n\t */\n\tconstructor(start) {\n\t\tthis.#start = start;\n\t}\n\n\t/** @param {T} value */\n\tpush(value) {\n\t\tif (this.#closed) return;\n\t\tfor (const subscriber of this.#subscribers) {\n\t\t\tif (subscriber.waiting_resolve) {\n\t\t\t\tconst resolve = subscriber.waiting_resolve;\n\t\t\t\tsubscriber.waiting_resolve = null;\n\t\t\t\tsubscriber.waiting_reject = null;\n\t\t\t\tresolve({ value, done: false });\n\t\t\t} else {\n\t\t\t\tsubscriber.pending = { value };\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Signal natural completion to all current subscribers, and to any future\n\t * subscriber (which will receive an immediately-done iterator).\n\t */\n\tdone() {\n\t\tif (this.#closed) return;\n\t\tthis.#closed = true;\n\t\tfor (const subscriber of this.#subscribers) {\n\t\t\tsubscriber.finished = true;\n\t\t\tif (subscriber.waiting_resolve) {\n\t\t\t\tconst resolve = subscriber.waiting_resolve;\n\t\t\t\tsubscriber.waiting_resolve = null;\n\t\t\t\tsubscriber.waiting_reject = null;\n\t\t\t\tresolve({ value: undefined, done: true });\n\t\t\t}\n\t\t}\n\t\tthis.#subscribers.clear();\n\t}\n\n\t/**\n\t * Broadcast a terminal error. All current subscribers will reject their\n\t * next `.next()` call with `error`. Future subscribers will also reject\n\t * their first `.next()`.\n\t *\n\t * @param {unknown} error\n\t */\n\tfail(error) {\n\t\tif (this.#closed) return;\n\t\tthis.#closed = true;\n\t\tthis.#terminal_error = error;\n\t\tfor (const subscriber of this.#subscribers) {\n\t\t\tsubscriber.finished = true;\n\t\t\tif (subscriber.waiting_reject) {\n\t\t\t\tconst reject = subscriber.waiting_reject;\n\t\t\t\tsubscriber.waiting_resolve = null;\n\t\t\t\tsubscriber.waiting_reject = null;\n\t\t\t\treject(error);\n\t\t\t} else {\n\t\t\t\tsubscriber.pending_error = { error };\n\t\t\t}\n\t\t}\n\t\tthis.#subscribers.clear();\n\t}\n\n\t/**\n\t * Subscribe to the shared stream. Returns an `AsyncGenerator<T>` that\n\t * yields every value pushed after this call (and, if `initial_value` is\n\t * provided, that value as the first yield).\n\t *\n\t * @param {{ initial_value?: { value: T } }} [options]\n\t * `initial_value` lets the caller seed the iterator with a synchronously-\n\t * available current value before any new pushes arrive (e.g. the\n\t * \"last-seen value\" of a reactive resource). Pass it wrapped in an\n\t * object so `undefined` can be distinguished from \"no initial value\".\n\t * @returns {AsyncGenerator<T, void, void>}\n\t */\n\tsubscribe(options) {\n\t\t/** @type {Subscriber} */\n\t\tconst subscriber = {\n\t\t\tpending: options?.initial_value ? { value: options.initial_value.value } : null,\n\t\t\tpending_error:\n\t\t\t\tthis.#closed && this.#terminal_error !== undefined ? { error: this.#terminal_error } : null,\n\t\t\tfinished: this.#closed && this.#terminal_error === undefined,\n\t\t\twaiting_resolve: null,\n\t\t\twaiting_reject: null\n\t\t};\n\n\t\tif (!subscriber.finished && subscriber.pending_error === null) {\n\t\t\tthis.#subscribers.add(subscriber);\n\t\t}\n\n\t\tif (!this.#closed) {\n\t\t\tthis.#stop ??= this.#start?.(this);\n\t\t}\n\n\t\tconst unsubscribe = () => {\n\t\t\tsubscriber.finished = true;\n\t\t\tconst was_present = this.#subscribers.delete(subscriber);\n\n\t\t\tif (was_present && this.#subscribers.size === 0) {\n\t\t\t\tthis.#stop?.();\n\t\t\t}\n\t\t};\n\n\t\t/** @type {AsyncGenerator<T, void, void>} */\n\t\tconst iterator = {\n\t\t\tnext() {\n\t\t\t\tif (subscriber.pending_error) {\n\t\t\t\t\tconst { error } = subscriber.pending_error;\n\t\t\t\t\tsubscriber.pending_error = null;\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\treturn Promise.reject(error);\n\t\t\t\t}\n\n\t\t\t\tif (subscriber.pending) {\n\t\t\t\t\tconst { value } = subscriber.pending;\n\t\t\t\t\tsubscriber.pending = null;\n\t\t\t\t\treturn Promise.resolve({ value, done: false });\n\t\t\t\t}\n\n\t\t\t\tif (subscriber.finished) {\n\t\t\t\t\treturn Promise.resolve({ value: undefined, done: true });\n\t\t\t\t}\n\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tsubscriber.waiting_resolve = resolve;\n\t\t\t\t\tsubscriber.waiting_reject = reject;\n\t\t\t\t});\n\t\t\t},\n\t\t\treturn(value) {\n\t\t\t\tunsubscribe();\n\t\t\t\tif (subscriber.waiting_resolve) {\n\t\t\t\t\tconst resolve = subscriber.waiting_resolve;\n\t\t\t\t\tsubscriber.waiting_resolve = null;\n\t\t\t\t\tsubscriber.waiting_reject = null;\n\t\t\t\t\tresolve({ value: undefined, done: true });\n\t\t\t\t}\n\t\t\t\treturn Promise.resolve({ value: /** @type {void} */ (value), done: true });\n\t\t\t},\n\t\t\tthrow(error) {\n\t\t\t\tunsubscribe();\n\t\t\t\tif (subscriber.waiting_reject) {\n\t\t\t\t\tconst reject = subscriber.waiting_reject;\n\t\t\t\t\tsubscriber.waiting_resolve = null;\n\t\t\t\t\tsubscriber.waiting_reject = null;\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t\treturn Promise.reject(error);\n\t\t\t},\n\t\t\t[Symbol.asyncIterator]() {\n\t\t\t\treturn iterator;\n\t\t\t},\n\t\t\tasync [Symbol.asyncDispose]() {\n\t\t\t\t// TODO: investigate if this needs to be implemented\n\t\t\t}\n\t\t};\n\n\t\treturn iterator;\n\t}\n}\n","/** @import { RemoteLiveQuery, RemoteLiveQueryFunction, RemoteQuery, RemoteQueryFunction } from '$app/server' */\n/** @import { RequestEvent } from '@sveltejs/kit' */\n/** @import { RemoteInternals, MaybePromise, RequestState, RemoteQueryLiveInternals, RemoteQueryBatchInternals, RemoteQueryInternals, RemoteLiveQueryUserFunctionReturnType } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\nimport { get_request_store } from '@sveltejs/kit/internal/server';\nimport { create_remote_key, stringify_remote_arg } from '../../../shared.js';\nimport { prerendering } from '#app/env/server';\nimport {\n\tcreate_validator,\n\tget_cache,\n\tget_response,\n\trun_remote_function,\n\trun_remote_generator\n} from './shared.js';\nimport { noop } from '../../../../utils/functions.js';\nimport { SharedIterator } from '../../../../utils/shared-iterator.js';\nimport { handle_error_and_jsonify } from '../../../server/errors.js';\nimport * as e from '../../../../messages/server-errors.js';\n\n/**\n * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation.\n *\n * @template Output\n * @overload\n * @param {() => MaybePromise<Output>} fn\n * @returns {RemoteQueryFunction<void, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation.\n *\n * @template Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(arg: Input) => MaybePromise<Output>} fn\n * @returns {RemoteQueryFunction<Input, Output>}\n * @since 2.27\n */\n/**\n * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation.\n *\n * @template {StandardSchemaV1} Schema\n * @template Output\n * @overload\n * @param {Schema} schema\n * @param {(arg: StandardSchemaV1.InferOutput<Schema>) => MaybePromise<Output>} fn\n * @returns {RemoteQueryFunction<StandardSchemaV1.InferInput<Schema>, Output, StandardSchemaV1.InferOutput<Schema>>}\n * @since 2.27\n */\n/**\n * @template Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {(args?: Input) => MaybePromise<Output>} [maybe_fn]\n * @returns {RemoteQueryFunction<Input, Output>}\n * @since 2.27\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function query(validate_or_fn, maybe_fn) {\n\t/** @type {(arg?: Input) => Output} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {(arg?: any) => MaybePromise<Input>} */\n\tconst validate = create_validator(validate_or_fn, maybe_fn, () => __);\n\n\t/** @type {RemoteQueryInternals} */\n\tconst __ = {\n\t\ttype: 'query',\n\t\tid: '',\n\t\tname: '',\n\t\tvalidate,\n\t\tbind(payload, validated_arg) {\n\t\t\tconst { event, state } = get_request_store();\n\n\t\t\treturn create_query_resource(__, payload, event, state, () =>\n\t\t\t\trun_remote_function(\n\t\t\t\t\tevent,\n\t\t\t\t\t{ ...state, is_in_remote_query: true },\n\t\t\t\t\tfalse,\n\t\t\t\t\t() => validated_arg,\n\t\t\t\t\tfn\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t};\n\n\t/** @type {RemoteQueryFunction<Input, Output> & { __: RemoteQueryInternals }} */\n\tconst wrapper = (arg) => {\n\t\tif (prerendering) {\n\t\t\te.remote_query_prerender({ type: 'query', name: __.name });\n\t\t}\n\n\t\tconst { event, state } = get_request_store();\n\t\tconst payload = stringify_remote_arg(arg);\n\n\t\treturn create_query_resource(__, payload, event, state, () =>\n\t\t\trun_remote_function(\n\t\t\t\tevent,\n\t\t\t\t{ ...state, is_in_remote_query: true },\n\t\t\t\tfalse,\n\t\t\t\t() => validate(arg),\n\t\t\t\tfn\n\t\t\t)\n\t\t);\n\t};\n\n\tObject.defineProperty(wrapper, '__', { value: __ });\n\n\treturn wrapper;\n}\n\n/**\n * Creates a live remote query. When called from the browser, the function will be invoked on the server via a streaming `fetch` call.\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.live) for full documentation.\n *\n * @template Output\n * @overload\n * @param {(arg: void) => RemoteLiveQueryUserFunctionReturnType<Output>} fn\n * @returns {RemoteLiveQueryFunction<void, Output>}\n */\n/**\n * @template Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(arg: Input) => RemoteLiveQueryUserFunctionReturnType<Output>} fn\n * @returns {RemoteLiveQueryFunction<Input, Output>}\n */\n/**\n * @template {StandardSchemaV1} Schema\n * @template Output\n * @overload\n * @param {Schema} schema\n * @param {(arg: StandardSchemaV1.InferOutput<Schema>) => RemoteLiveQueryUserFunctionReturnType<Output>} fn\n * @returns {RemoteLiveQueryFunction<StandardSchemaV1.InferInput<Schema>, Output, StandardSchemaV1.InferOutput<Schema>>}\n */\n/**\n * @template Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {(args: Input) => RemoteLiveQueryUserFunctionReturnType<Output>} [maybe_fn]\n * @returns {RemoteLiveQueryFunction<Input, Output>}\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction live(validate_or_fn, maybe_fn) {\n\t/** @type {(arg: Input) => RemoteLiveQueryUserFunctionReturnType<Output>} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {(arg?: any) => MaybePromise<Input>} */\n\tconst validate = create_validator(validate_or_fn, maybe_fn, () => __);\n\n\t/**\n\t * @param {any} event\n\t * @param {any} state\n\t * @param {any} get_input\n\t */\n\tconst run = (event, state, get_input) =>\n\t\trun_remote_generator(\n\t\t\tevent,\n\t\t\t{ ...state, is_in_remote_query: true },\n\t\t\tfalse,\n\t\t\tget_input,\n\t\t\tfn,\n\t\t\t__.name\n\t\t);\n\n\t/** @type {RemoteQueryLiveInternals} */\n\tconst __ = {\n\t\ttype: 'query_live',\n\t\tid: '',\n\t\tname: '',\n\t\trun: (event, state, arg) => run(event, state, () => validate(arg)),\n\t\tvalidate,\n\t\tbind(payload, validated_arg) {\n\t\t\tconst { event, state } = get_request_store();\n\n\t\t\treturn create_live_query_resource(__, payload, event, state, () =>\n\t\t\t\trun(event, state, () => validated_arg)\n\t\t\t);\n\t\t}\n\t};\n\n\t/** @type {RemoteLiveQueryFunction<Input, Output> & { __: RemoteQueryLiveInternals }} */\n\tconst wrapper = (arg) => {\n\t\tif (prerendering) {\n\t\t\te.remote_query_prerender({ type: 'query.live', name: __.name });\n\t\t}\n\n\t\tconst { event, state } = get_request_store();\n\t\tconst payload = stringify_remote_arg(arg);\n\n\t\treturn create_live_query_resource(__, payload, event, state, () =>\n\t\t\trun(event, state, () => validate(arg))\n\t\t);\n\t};\n\n\tObject.defineProperty(wrapper, '__', { value: __ });\n\n\treturn wrapper;\n}\n\n/**\n * Creates a batch query function that collects multiple calls and executes them in a single request\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.batch) for full documentation.\n *\n * @template Input\n * @template Output\n * @overload\n * @param {'unchecked'} validate\n * @param {(args: Input[]) => MaybePromise<(arg: Input, idx: number) => Output>} fn\n * @returns {RemoteQueryFunction<Input, Output>}\n * @since 2.35\n */\n/**\n * Creates a batch query function that collects multiple calls and executes them in a single request\n *\n * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.batch) for full documentation.\n *\n * @template {StandardSchemaV1} Schema\n * @template Output\n * @overload\n * @param {Schema} schema\n * @param {(args: StandardSchemaV1.InferOutput<Schema>[]) => MaybePromise<(arg: StandardSchemaV1.InferOutput<Schema>, idx: number) => Output>} fn\n * @returns {RemoteQueryFunction<StandardSchemaV1.InferInput<Schema>, Output, StandardSchemaV1.InferOutput<Schema>>}\n * @since 2.35\n */\n/**\n * @template Input\n * @template Output\n * @param {any} validate_or_fn\n * @param {(args?: Input[]) => MaybePromise<(arg: Input, idx: number) => Output>} [maybe_fn]\n * @returns {RemoteQueryFunction<Input, Output>}\n * @since 2.35\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction batch(validate_or_fn, maybe_fn) {\n\t/** @type {(args?: Input[]) => MaybePromise<(arg: Input, idx: number) => Output>} */\n\tconst fn = maybe_fn ?? validate_or_fn;\n\n\t/** @type {(arg?: any) => MaybePromise<Input>} */\n\tconst validate = create_validator(validate_or_fn, maybe_fn, () => __);\n\n\t/**\n\t * Enqueues a single call into the current batch (creating one if necessary)\n\t * and returns a promise that resolves with the result for this entry.\n\t *\n\t * @param {string} payload — the stringified raw argument (cache key)\n\t * @param {() => MaybePromise<any>} get_validated — produces the validated argument for this entry\n\t * @returns {Promise<any>}\n\t */\n\tconst enqueue = (payload, get_validated) => {\n\t\tconst { event, state } = get_request_store();\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst batches = (state.remote.batches ??=\n\t\t\t\t/** @type {NonNullable<typeof state.remote.batches>} */ (new Map()));\n\t\t\tlet batched = batches.get(__);\n\t\t\tif (!batched) {\n\t\t\t\tbatched = new Map();\n\t\t\t\tbatches.set(__, batched);\n\t\t\t}\n\t\t\tconst entry = batched.get(payload);\n\n\t\t\tif (entry) {\n\t\t\t\tentry.resolvers.push({ resolve, reject });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbatched.set(payload, {\n\t\t\t\tget_validated,\n\t\t\t\tresolvers: [{ resolve, reject }]\n\t\t\t});\n\n\t\t\tif (batched.size > 1) return;\n\n\t\t\tsetTimeout(async () => {\n\t\t\t\tbatches.delete(__);\n\t\t\t\tconst entries = Array.from(batched.values());\n\n\t\t\t\ttry {\n\t\t\t\t\treturn await run_remote_function(\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\t{ ...state, is_in_remote_query: true },\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tasync () => Promise.all(entries.map((entry) => entry.get_validated())),\n\t\t\t\t\t\tasync (input) => {\n\t\t\t\t\t\t\tconst get_result = await fn(input);\n\n\t\t\t\t\t\t\tfor (let i = 0; i < entries.length; i++) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst result = get_result(input[i], i);\n\n\t\t\t\t\t\t\t\t\tfor (const resolver of entries[i].resolvers) {\n\t\t\t\t\t\t\t\t\t\tresolver.resolve(result);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\tfor (const resolver of entries[i].resolvers) {\n\t\t\t\t\t\t\t\t\t\tresolver.reject(error);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tfor (const entry of batched.values()) {\n\t\t\t\t\t\tfor (const resolver of entry.resolvers) {\n\t\t\t\t\t\t\tresolver.reject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t});\n\t};\n\n\t/** @type {RemoteQueryBatchInternals} */\n\tconst __ = {\n\t\ttype: 'query_batch',\n\t\tid: '',\n\t\tname: '',\n\t\tvalidate,\n\t\trun: async (args) => {\n\t\t\tconst { event, state } = get_request_store();\n\n\t\t\treturn run_remote_function(\n\t\t\t\tevent,\n\t\t\t\t{ ...state, is_in_remote_query: true },\n\t\t\t\tfalse,\n\t\t\t\tasync () => Promise.all(args.map(validate)),\n\t\t\t\tasync (/** @type {any[]} */ input) => {\n\t\t\t\t\tconst get_result = await fn(input);\n\n\t\t\t\t\treturn Promise.all(\n\t\t\t\t\t\tinput.map(async (arg, i) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst data = get_result(arg, i);\n\t\t\t\t\t\t\t\treturn { type: 'result', data };\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tconst transformed = await handle_error_and_jsonify(event, state, error);\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\t\terror: transformed\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tbind(payload, validated_arg) {\n\t\t\tconst { event, state } = get_request_store();\n\n\t\t\treturn create_query_resource(__, payload, event, state, () =>\n\t\t\t\tenqueue(payload, () => validated_arg)\n\t\t\t);\n\t\t}\n\t};\n\n\t/** @type {RemoteQueryFunction<Input, Output> & { __: RemoteQueryBatchInternals }} */\n\tconst wrapper = (arg) => {\n\t\tif (prerendering) {\n\t\t\te.remote_query_prerender({ type: 'query.batch', name: __.name });\n\t\t}\n\n\t\tconst { event, state } = get_request_store();\n\t\tconst payload = stringify_remote_arg(arg);\n\n\t\treturn create_query_resource(__, payload, event, state, () =>\n\t\t\t// Collect all the calls to the same query in the same macrotask,\n\t\t\t// then execute them as one backend request.\n\t\t\tenqueue(payload, () => validate(arg))\n\t\t);\n\t};\n\n\tObject.defineProperty(wrapper, '__', { value: __ });\n\n\treturn wrapper;\n}\n\n/**\n * Include this value in the returned payload...\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {RemoteInternals} internals\n * @param {string} payload\n * @param {() => Promise<any>} fn\n */\nexport function refresh(event, state, internals, payload, fn) {\n\tif (!internals.id) {\n\t\t// unless this is a non-exported (i.e. private) query...\n\t\treturn;\n\t}\n\n\tif (!event.isRemoteRequest && state.is_in_remote_form_or_command) {\n\t\t// ...or this is a no-JS (native) form submission, where the page re-renders\n\t\t// anyway so there's no live client cache to apply a single-flight update to.\n\t\treturn;\n\t}\n\n\tconst key = create_remote_key(internals.id, payload);\n\n\t// `fn` is stored rather than invoked eagerly. The query is run at the end of\n\t// the request (in `collect_remote_data`), so that it observes any state\n\t// mutations that happen after `refresh()` is called. If the developer re-awaits\n\t// the query before the request finishes, the cache entry created by that await\n\t// is reused instead of re-running the query.\n\t(state.remote.explicit ??= new Map()).set(key, {\n\t\tinternals,\n\t\tfn\n\t});\n}\n\n/**\n * @param {RemoteInternals} __\n * @param {string} payload — the stringified raw argument (i.e. the cache key the client will use)\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {() => Promise<any>} fn\n * @returns {RemoteQuery<any>}\n */\nfunction create_query_resource(__, payload, event, state, fn) {\n\t/** @type {Promise<any> | null} */\n\tlet promise = null;\n\n\tconst get_promise = () => {\n\t\treturn (promise ??= get_response(__, payload, state, fn));\n\t};\n\n\tconst populate_hydratable = () => {\n\t\t// accessing data properties needs to kick off the work\n\t\t// so that it gets seeded in the hydration cache\n\t\t// and becomes available on the client\n\t\tif (__.id && state.is_in_render) {\n\t\t\t// swallow rejections so they don't crash the server — the error is\n\t\t\t// serialized into the response and surfaced on the client instead\n\t\t\tget_promise().catch(noop);\n\t\t}\n\t};\n\n\treturn {\n\t\t/** @type {Promise<any>['catch']} */\n\t\tcatch(onrejected) {\n\t\t\treturn get_promise().catch(onrejected);\n\t\t},\n\t\tget current() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn undefined;\n\t\t},\n\t\tget error() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn undefined;\n\t\t},\n\t\t/** @type {Promise<any>['finally']} */\n\t\tfinally(onfinally) {\n\t\t\treturn get_promise().finally(onfinally);\n\t\t},\n\t\tget loading() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn true;\n\t\t},\n\t\tget ready() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn false;\n\t\t},\n\t\trefresh() {\n\t\t\tpromise = null;\n\t\t\tdelete get_cache(__, state)[payload];\n\n\t\t\trefresh(event, state, __, payload, get_promise);\n\n\t\t\treturn Promise.resolve();\n\t\t},\n\t\t/** @param {any} value */\n\t\tset(value) {\n\t\t\tconst p = (promise = Promise.resolve(value));\n\t\t\tget_cache(__, state)[payload] = p;\n\n\t\t\trefresh(event, state, __, payload, () => p);\n\t\t},\n\t\t/** @type {Promise<any>['then']} */\n\t\tthen(onfulfilled, onrejected) {\n\t\t\treturn get_promise().then(onfulfilled, onrejected);\n\t\t},\n\t\twithOverride() {\n\t\t\te.server_api_unavailable({ name: `${__.name}.withOverride()` });\n\t\t},\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn 'QueryResource';\n\t\t}\n\t};\n}\n\n/**\n * @param {RemoteQueryLiveInternals} __\n * @param {string} payload — the stringified raw argument (i.e. the cache key the client will use)\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {() => AsyncGenerator<any, void, void>} get_generator\n * @returns {RemoteLiveQuery<any>}\n */\nfunction create_live_query_resource(__, payload, event, state, get_generator) {\n\t/** @type {Promise<any> | null} */\n\tlet promise = null;\n\n\tconst get_first_value = async () => {\n\t\tfor await (const value of get_generator()) {\n\t\t\treturn value;\n\t\t}\n\t\te.remote_query_live_no_value({ name: __.name });\n\t};\n\n\tconst get_promise = () => {\n\t\treturn (promise ??= get_response(__, payload, state, get_first_value));\n\t};\n\n\tconst populate_hydratable = () => {\n\t\tif (__.id && state.is_in_render) {\n\t\t\t// swallow rejections so they don't crash the server — the error is\n\t\t\t// serialized into the response and surfaced on the client instead\n\t\t\tget_promise().catch(noop);\n\t\t}\n\t};\n\n\treturn {\n\t\t/** @type {Promise<any>['catch']} */\n\t\tcatch(onrejected) {\n\t\t\treturn get_promise().catch(onrejected);\n\t\t},\n\t\tget current() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn undefined;\n\t\t},\n\t\tget error() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn undefined;\n\t\t},\n\t\t/** @type {Promise<any>['finally']} */\n\t\tfinally(onfinally) {\n\t\t\treturn get_promise().finally(onfinally);\n\t\t},\n\t\tget done() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn false;\n\t\t},\n\t\tget loading() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn true;\n\t\t},\n\t\tget ready() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn false;\n\t\t},\n\t\tget connected() {\n\t\t\tpopulate_hydratable();\n\t\t\treturn false;\n\t\t},\n\t\treconnect() {\n\t\t\tpromise = null;\n\t\t\tdelete get_cache(__, state)[payload];\n\n\t\t\trefresh(event, state, __, payload, get_promise);\n\n\t\t\treturn Promise.resolve();\n\t\t},\n\t\t/** @type {Promise<any>['then']} */\n\t\tthen(onfulfilled, onrejected) {\n\t\t\treturn get_promise().then(onfulfilled, onrejected);\n\t\t},\n\t\t[Symbol.asyncIterator]() {\n\t\t\tconst key = create_remote_key(__.id, payload);\n\t\t\tconst cache = (state.remote.live_iterators ??= new Map());\n\t\t\tlet cached = cache.get(key);\n\t\t\tif (!cached) {\n\t\t\t\tcached = create_shared_live_iterator(event.request.signal, get_generator);\n\t\t\t\tcache.set(key, cached);\n\t\t\t}\n\t\t\treturn cached.subscribe();\n\t\t},\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn 'LiveQueryResource';\n\t\t}\n\t};\n}\n\n/**\n * Wraps a lazily-created live-query generator so that multiple `for await`\n * consumers within the same request share one underlying iteration. The first\n * subscriber starts the generator; values are broadcast to all subscribers\n * via a `SharedIterator`. When the last subscriber unsubscribes, the generator\n * is closed via `generator.return(undefined)`.\n *\n * If `signal` aborts (typically because the client has disconnected), the\n * pump is torn down and any in-flight `next()` calls on consumer iterators\n * resolve with `{ done: true }`, so suspended `for await` loops unwind\n * cleanly rather than leaking.\n *\n * @param {AbortSignal} signal\n * @param {() => AsyncGenerator<any, void, void>} get_generator\n */\nfunction create_shared_live_iterator(signal, get_generator) {\n\treturn new SharedIterator((instance) => {\n\t\t// Don't bother starting the pump if the request has already been\n\t\t// aborted between cache creation and first subscription.\n\t\tif (signal.aborted) {\n\t\t\tinstance.done();\n\t\t\treturn noop;\n\t\t}\n\n\t\tconst generator = get_generator();\n\n\t\t// Set to `true` when we deliberately close the generator (because every\n\t\t// subscriber has unsubscribed, or the request was aborted). The pump's\n\t\t// `generator.next()` will reject as a result; we use this flag to swallow that\n\t\t// abort error rather than surfacing it through `instance.fail()`.\n\t\tlet aborted = false;\n\n\t\tconst close = () => {\n\t\t\taborted = true;\n\t\t\tvoid generator.return().catch(noop);\n\t\t};\n\n\t\t// On request abort, tear down the pump and notify subscribers. `done()` is\n\t\t// used (rather than `fail()`) because an aborted request is a normal\n\t\t// termination — there's no error to surface to user code that's already\n\t\t// been disconnected from the client.\n\t\tsignal.addEventListener('abort', () => (close(), instance.done()), { once: true });\n\n\t\tvoid (async () => {\n\t\t\ttry {\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst result = await generator.next();\n\t\t\t\t\tif (result.done) {\n\t\t\t\t\t\tinstance.done();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tinstance.push(result.value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (!aborted) instance.fail(error);\n\t\t\t} finally {\n\t\t\t\tclose();\n\t\t\t}\n\t\t})();\n\n\t\treturn close;\n\t});\n}\n\n// Add batch as a property to the query function\nObject.defineProperty(query, 'batch', { value: batch, enumerable: true });\nObject.defineProperty(query, 'live', { value: live, enumerable: true });\n","/** @import { RemoteLiveQuery, RemoteLiveQueryFunction, RemoteQuery, RemoteQueryFunction, RequestedResult, RemoteQueryRequestedResult, RemoteLiveQueryRequestedResult } from '$app/server' */\n/** @import { MaybePromise, RemoteAnyQueryInternals } from 'types' */\nimport { get_request_store } from '@sveltejs/kit/internal/server';\nimport { create_remote_key, parse_remote_arg } from '../../../shared.js';\nimport { noop } from '../../../../utils/functions.js';\nimport { get_cache } from './shared.js';\nimport { refresh } from './query.js';\nimport * as e from '../../../../messages/server-errors.js';\n\n/**\n * Inside a remote `command` or `form` callback, returns an iterable\n * of `{ arg, query }` entries for the query instances the client asked to refresh, up to\n * the supplied `limit`. Each `query` is a `RemoteQuery` bound to the original\n * client-side cache key, so `refresh()` / `set()` propagate correctly even when\n * the query's schema transforms the input. `arg` is the *validated* argument,\n * i.e. the value after the schema has run (so `InferOutput<Schema>` for queries\n * declared with a Standard Schema).\n *\n * Arguments that fail validation or exceed `limit` are recorded as failures in\n * the response to the client.\n * See [Client-requested refreshes](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations-Client-requested-refreshes)\n * for usage in a remote `command` or `form`.\n *\n * @example\n * ```ts\n * import { requested } from '$app/server';\n *\n * for (const { arg, query } of requested(getPost, 5)) {\n * \t// `arg` is the validated argument; `query` is bound to the client's\n * \t// cache key. It's safe to throw away this promise -- SvelteKit will\n * \t// await it and forward any errors to the client.\n * \tvoid query.refresh();\n * }\n * ```\n *\n * As a shorthand for the above, you can also call `refreshAll` on the result:\n *\n * @example\n * ```ts\n * import { requested } from '$app/server';\n *\n * await requested(getPost, 5).refreshAll();\n * ```\n *\n * Works with `query.batch` as well — refreshes for individual entries are\n * collected into a single batched call.\n *\n * For live queries, the same applies, but with `reconnect` and `reconnectAll`.\n *\n * @template Input\n * @template Output\n * @template [Validated=Input]\n * @overload\n * @param {RemoteQueryFunction<Input, Output, Validated>} query\n * @param {number} limit\n * @returns {RemoteQueryRequestedResult<Validated, Output>}\n */\n/**\n * Inside a remote `command` or `form` callback, returns an iterable\n * of `{ arg, query }` entries for the live query instances the client asked to reconnect, up to\n * the supplied `limit`. Each `query` is a `RemoteLiveQuery` bound to the original\n * client-side cache key, so `reconnect()` propagates correctly even when\n * the query's schema transforms the input. `arg` is the *validated* argument.\n *\n * Arguments that fail validation or exceed `limit` are recorded as failures in\n * the response to the client.\n * See [Client-requested refreshes](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations-Client-requested-refreshes)\n * for usage in a remote `command` or `form`.\n *\n * @example\n * ```ts\n * import { requested } from '$app/server';\n *\n * for (const { query } of requested(getPost, 5)) {\n * \tvoid query.reconnect();\n * }\n * ```\n *\n * As a shorthand, you can also call `reconnectAll` on the result:\n *\n * @example\n * ```ts\n * import { requested } from '$app/server';\n *\n * await requested(getPost, 5).reconnectAll();\n * ```\n *\n * @template Input\n * @template Output\n * @template [Validated=Input]\n * @overload\n * @param {RemoteLiveQueryFunction<Input, Output, Validated>} query\n * @param {number} limit\n * @returns {RemoteLiveQueryRequestedResult<Validated, Output>}\n */\n/**\n * @template Input\n * @template Output\n * @template [Validated=Input]\n * @param {RemoteQueryFunction<Input, Output, Validated> | RemoteLiveQueryFunction<Input, Output, Validated>} query\n * @param {number} limit\n * @returns {RequestedResult<Validated, Output>}\n */\nexport function requested(query, limit) {\n\tconst { event, state } = get_request_store();\n\tconst internals = /** @type {RemoteAnyQueryInternals | undefined} */ (\n\t\t/** @type {any} */ (query).__\n\t);\n\n\tif (\n\t\tinternals?.type !== 'query' &&\n\t\tinternals?.type !== 'query_batch' &&\n\t\tinternals?.type !== 'query_live'\n\t) {\n\t\te.remote_requested_invalid_query();\n\t}\n\n\t// narrow-stable alias so generator closures below don't lose the narrowing\n\tconst __ = internals;\n\n\tconst requested = state.remote.requested;\n\tconst payloads = requested?.get(__.id) ?? new Set();\n\tconst ignored = (state.remote.ignored ??= new Set());\n\n\t/** @param {string} payload */\n\tconst consume = (payload) => {\n\t\tpayloads.delete(payload);\n\t\tif (payloads.size === 0) requested?.delete(__.id);\n\t};\n\n\t/** @param {string} payload */\n\tconst create_ignore = (payload) => () => {\n\t\tignored.add(create_remote_key(__.id, payload));\n\t};\n\n\t// note: don't initialize these maps here -- they will be initialized by the\n\t// command/form wrapper when we enter them, and if we initialize them here\n\t// we will enable requested(...) in contexts where it shouldn't be allowed,\n\t// such as load functions or other server functions\n\tif (!state.is_in_remote_form_or_command) {\n\t\te.remote_requested_context();\n\t}\n\tconst [selected, skipped] = split_limit([...payloads], limit);\n\n\t/**\n\t * Registers the failure exactly like `.set()` registers a value: the error record\n\t * is serialized to the client (putting the query there into a failed state), and\n\t * subsequent server-side calls of the query with the same argument reject with it.\n\t * @param {string} payload\n\t * @param {unknown} error\n\t */\n\tconst record_failure = (payload, error) => {\n\t\tconst promise = Promise.reject(error);\n\t\tpromise.catch(noop);\n\n\t\tget_cache(__, state)[payload] = promise;\n\t\trefresh(event, state, __, payload, () => promise);\n\t};\n\n\tfor (const payload of skipped) consume(payload);\n\n\tconst result = {\n\t\t*[Symbol.iterator]() {\n\t\t\tfor (const payload of selected) {\n\t\t\t\tconsume(payload);\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = parse_remote_arg(payload);\n\t\t\t\t\tconst validated = __.validate(parsed);\n\n\t\t\t\t\tif (is_thenable(validated)) {\n\t\t\t\t\t\te.remote_requested_async_validator({ name: __.name, limit: String(limit) });\n\t\t\t\t\t}\n\n\t\t\t\t\tyield {\n\t\t\t\t\t\targ: validated,\n\t\t\t\t\t\tquery: __.bind(payload, validated),\n\t\t\t\t\t\tignore: create_ignore(payload)\n\t\t\t\t\t};\n\t\t\t\t} catch (error) {\n\t\t\t\t\trecord_failure(payload, error);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync *[Symbol.asyncIterator]() {\n\t\t\tyield* race_all(selected, async (payload) => {\n\t\t\t\tconsume(payload);\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = parse_remote_arg(payload);\n\t\t\t\t\tconst validated = await __.validate(parsed);\n\t\t\t\t\treturn {\n\t\t\t\t\t\targ: validated,\n\t\t\t\t\t\tquery: __.bind(payload, validated),\n\t\t\t\t\t\tignore: create_ignore(payload)\n\t\t\t\t\t};\n\t\t\t\t} catch (error) {\n\t\t\t\t\trecord_failure(payload, error);\n\t\t\t\t\tthrow new Error(`Skipping ${__.name}(${payload})`, { cause: error });\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tasync refreshAll() {\n\t\t\tif (__.type === 'query_live') {\n\t\t\t\te.remote_requested_wrong_method({\n\t\t\t\t\tmethod: 'refreshAll',\n\t\t\t\t\ttype: 'live',\n\t\t\t\t\treplacement: 'reconnectAll'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor await (const { query } of result) {\n\t\t\t\tvoid (/** @type {RemoteQuery<Output>} */ (query).refresh());\n\t\t\t}\n\t\t},\n\t\tasync reconnectAll() {\n\t\t\tif (__.type !== 'query_live') {\n\t\t\t\te.remote_requested_wrong_method({\n\t\t\t\t\tmethod: 'reconnectAll',\n\t\t\t\t\ttype: 'regular',\n\t\t\t\t\treplacement: 'refreshAll'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor await (const { query } of result) {\n\t\t\t\tvoid (/** @type {RemoteLiveQuery<Output>} */ (query).reconnect());\n\t\t\t}\n\t\t},\n\t\tasync ignoreAll() {\n\t\t\tfor await (const { ignore } of result) ignore();\n\t\t}\n\t};\n\n\treturn /** @type {RequestedResult<Validated, Output>} */ (/** @type {unknown} */ (result));\n}\n\n/**\n * @template T\n * @param {Array<T>} array\n * @param {number} limit\n * @returns {[Array<T>, Array<T>]}\n */\nfunction split_limit(array, limit) {\n\tif (limit === Infinity) {\n\t\treturn [array, []];\n\t}\n\tif (!Number.isInteger(limit) || limit < 0) {\n\t\te.remote_requested_invalid_limit();\n\t}\n\treturn [array.slice(0, limit), array.slice(limit)];\n}\n\n/**\n * @param {any} value\n * @returns {value is PromiseLike<any>}\n */\nfunction is_thenable(value) {\n\treturn !!value && (typeof value === 'object' || typeof value === 'function') && 'then' in value;\n}\n\n/**\n * Runs all callbacks immediately and yields resolved values in completion order.\n * If the promise rejects, it is skipped.\n *\n * @template T\n * @template R\n * @param {Array<T>} array\n * @param {(value: T) => MaybePromise<R>} fn\n * @returns {AsyncIterable<R>}\n */\nasync function* race_all(array, fn) {\n\t/** @type {Set<Promise<{ promise: Promise<any>, value: Awaited<R> }>>} */\n\tconst pending = new Set();\n\n\tfor (const value of array) {\n\t\t/** @type {Promise<{ promise: Promise<any>, value: Awaited<R> }>} */\n\t\tconst promise = Promise.resolve(fn(value)).then((result) => ({\n\t\t\tpromise,\n\t\t\tvalue: result\n\t\t}));\n\n\t\tpromise.catch(() => pending.delete(promise));\n\t\tpending.add(promise);\n\t}\n\n\twhile (pending.size > 0) {\n\t\ttry {\n\t\t\tconst { promise, value } = await Promise.race(pending);\n\t\t\tpending.delete(promise);\n\t\t\tyield value;\n\t\t} catch {\n\t\t\t// Ignore errors, they are handled in the fn callback and result in skip\n\t\t}\n\t}\n}\n"],"ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;;;;;;;;;;AAaA,SAAgB,iBAAiB,gBAAgB,UAAU,eAAe;CAEzE,IAAI,CAAC,UACJ,QAAQ,QAAQ;EACf,IAAI,QAAQ,KAAA,GACX,MAAM,KAA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