corequery 0.32.0 → 0.33.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/package.json +5 -5
- package/server/dist/server/api/handlers/departures/v0/index.js +8 -4
- package/server/dist/server/api/handlers/departures/v0/index.js.map +1 -1
- package/server/dist/server/api/handlers/departures/v0/to-api-result.d.ts +1 -1
- package/server/dist/server/api/handlers/departures/v0/to-api-result.js +29 -8
- package/server/dist/server/api/handlers/departures/v0/to-api-result.js.map +1 -1
- package/server/dist/server/api/handlers/foundational-data/multiversional/multiversional-line-diagram-entry-foda.d.ts +1 -1
- package/server/dist/server/api/handlers/foundational-data/multiversional/multiversional-line-diagram-foda.d.ts +1 -1
- package/server/dist/server/api/handlers/foundational-data/multiversional/multiversional-line-foda.d.ts +1 -1
- package/server/dist/server/api/handlers/foundational-data/multiversional/multiversional-stop-foda.d.ts +1 -1
- package/server/dist/server/config/helpers/corequery-filters.js +3 -0
- package/server/dist/server/config/helpers/corequery-filters.js.map +1 -1
- package/server/dist/server/config/types/get-canonical-lines-serving-stop-config.d.ts +2 -1
- package/server/dist/server/config/types/get-default-departure-feeds-for-stop-config.d.ts +2 -1
- package/server/dist/server/config/types/get-filters-for-stop-config.d.ts +2 -1
- package/server/dist/server/corequery.d.ts +2 -2
- package/server/dist/server/corequery.js +2 -2
- package/server/dist/server/corequery.js.map +1 -1
- package/server/dist/server/data/index.d.ts +3 -7
- package/server/dist/server/data/index.js +3 -7
- package/server/dist/server/data/index.js.map +1 -1
- package/server/dist/server/data/line/index.d.ts +4 -0
- package/server/dist/server/data/line/index.js +5 -0
- package/server/dist/server/data/line/index.js.map +1 -0
- package/server/dist/server/data/{line-collection.d.ts → line/line-collection.d.ts} +2 -2
- package/server/dist/server/data/{line-collection.js → line/line-collection.js} +1 -1
- package/server/dist/server/data/line/line-collection.js.map +1 -0
- package/server/dist/server/data/{line-diagram-entry.d.ts → line/line-diagram-entry.d.ts} +2 -2
- package/server/dist/server/data/{line-diagram-entry.js → line/line-diagram-entry.js} +2 -2
- package/server/dist/server/data/line/line-diagram-entry.js.map +1 -0
- package/server/dist/server/data/{line-diagram.d.ts → line/line-diagram.d.ts} +1 -1
- package/server/dist/server/data/line/line-diagram.js.map +1 -0
- package/server/dist/server/data/{line.d.ts → line/line.d.ts} +3 -3
- package/server/dist/server/data/{line.js → line/line.js} +2 -2
- package/server/dist/server/data/line/line.js.map +1 -0
- package/server/dist/server/data/stop/index.d.ts +5 -0
- package/server/dist/server/data/stop/index.js +6 -0
- package/server/dist/server/data/stop/index.js.map +1 -0
- package/server/dist/server/data/{stop-collection.d.ts → stop/stop-collection.d.ts} +2 -2
- package/server/dist/server/data/{stop-collection.js → stop/stop-collection.js} +2 -2
- package/server/dist/server/data/stop/stop-collection.js.map +1 -0
- package/server/dist/server/data/{stop-default-departure-feed.d.ts → stop/stop-default-departure-feed.d.ts} +1 -1
- package/server/dist/server/data/stop/stop-default-departure-feed.js.map +1 -0
- package/server/dist/server/data/{stop-departure-filters.d.ts → stop/stop-departure-filters.d.ts} +1 -1
- package/server/dist/server/data/stop/stop-departure-filters.js.map +1 -0
- package/server/dist/server/data/{stop-position.d.ts → stop/stop-position.d.ts} +1 -1
- package/server/dist/server/data/stop/stop-position.js.map +1 -0
- package/server/dist/server/data/{stop.d.ts → stop/stop.d.ts} +4 -4
- package/server/dist/server/data/{stop.js → stop/stop.js} +8 -4
- package/server/dist/server/data/stop/stop.js.map +1 -0
- package/server/dist/server/data/tags.d.ts +1 -0
- package/server/dist/server/data/tags.js +1 -0
- package/server/dist/server/data/tags.js.map +1 -1
- package/server/dist/server/web-server/index-html-preparer.js +11 -5
- package/server/dist/server/web-server/index-html-preparer.js.map +1 -1
- package/web/dist/assets/{About-BdSlO-kD.js → About-BUHOPQcu.js} +1 -1
- package/web/dist/assets/{AdminControls-DJo59RGN.js → AdminControls-CHryNpn4.js} +1 -1
- package/web/dist/assets/{Alert-SQhECZag.js → Alert-B1bEDR3t.js} +1 -1
- package/web/dist/assets/{Debug-5P9iSK2l.js → Debug-C82KdgDu.js} +1 -1
- package/web/dist/assets/{Home-hrGQ5RvQ.js → Home-BE8Ov5RO.js} +1 -1
- package/web/dist/assets/Line-CYTWM3jD.js +1 -0
- package/web/dist/assets/NotFound-CEJ64l5x.js +1 -0
- package/web/dist/assets/{NotFoundPage-qJ2To3wC.js → NotFoundPage-B17fzPr9.js} +1 -1
- package/web/dist/assets/{Picker-di2TPJNV.js → Picker-DVb1h4gb.js} +1 -1
- package/web/dist/assets/{Service-CjcKHFQZ.js → Service-BkIhOzWr.js} +1 -1
- package/web/dist/assets/{Settings-Clz1x2Cr.js → Settings-Cz0PRdM4.js} +1 -1
- package/web/dist/assets/{SimpleMobileHeaderContent-DJTkr_6C.js → SimpleMobileHeaderContent-Cpqzarjr.js} +1 -1
- package/web/dist/assets/{Status-Bw3AMuJH.js → Status-B6JsOy21.js} +1 -1
- package/web/dist/assets/Stop-Dia974mX.js +1 -0
- package/web/dist/assets/{ZenMode-CXXD5IBd.js → ZenMode-DCn99EM0.js} +1 -1
- package/web/dist/assets/{index-DOvczcZF.js → index-CyUttHc8.js} +2 -2
- package/web/dist/assets/{linear-BiU4teCm.js → linear-BPbFILtP.js} +1 -1
- package/web/dist/assets/{use-simple-headers-DM6VutL0.js → use-simple-headers-DJo4M2YI.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/sw.js +1 -1
- package/server/dist/server/data/line-collection.js.map +0 -1
- package/server/dist/server/data/line-diagram-entry.js.map +0 -1
- package/server/dist/server/data/line-diagram.js.map +0 -1
- package/server/dist/server/data/line.js.map +0 -1
- package/server/dist/server/data/stop-collection.js.map +0 -1
- package/server/dist/server/data/stop-default-departure-feed.js.map +0 -1
- package/server/dist/server/data/stop-departure-filters.js.map +0 -1
- package/server/dist/server/data/stop-position.js.map +0 -1
- package/server/dist/server/data/stop.js.map +0 -1
- package/web/dist/assets/Line-ClqpaOxi.js +0 -1
- package/web/dist/assets/NotFound-D-nyY3X1.js +0 -1
- package/web/dist/assets/Stop-hkgAICn9.js +0 -1
- /package/server/dist/server/data/{line-diagram.js → line/line-diagram.js} +0 -0
- /package/server/dist/server/data/{stop-default-departure-feed.js → stop/stop-default-departure-feed.js} +0 -0
- /package/server/dist/server/data/{stop-departure-filters.js → stop/stop-departure-filters.js} +0 -0
- /package/server/dist/server/data/{stop-position.js → stop/stop-position.js} +0 -0
|
@@ -20,11 +20,17 @@ export class IndexHtmlPreparer {
|
|
|
20
20
|
tags.title.textContent = this._config.appName;
|
|
21
21
|
tags.description.setAttribute("content", this._config.description);
|
|
22
22
|
tags.appName.setAttribute("content", this._config.appName);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
// In local development, we often end up rewriting the same `/dist` files
|
|
24
|
+
// multiple times without a rebuild in-between. We don't want the old
|
|
25
|
+
// version values to interfere with the new we calculate, so even though we
|
|
26
|
+
// aren't ready to write these values when `partial = true` (we do that
|
|
27
|
+
// after the hash is calculated), we'll still clear out any old content.
|
|
28
|
+
//
|
|
29
|
+
// In prod we'd be starting from fresh files every time, so this was only an
|
|
30
|
+
// issue in local development.
|
|
31
|
+
tags.frontendVersion.setAttribute("content", partial ? "" : frontendVersion);
|
|
32
|
+
tags.packageVersionOnLastUpdate.setAttribute("content", partial ? "" : this._config.corequeryPackageVersion);
|
|
33
|
+
tags.serverVersionOnLastUpdate.setAttribute("content", partial ? "" : this._config.serverVersion);
|
|
28
34
|
return tags.indexHtml.toString();
|
|
29
35
|
}
|
|
30
36
|
async validate() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-html-preparer.js","sourceRoot":"","sources":["../../../web-server/index-html-preparer.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAUzC,MAAM,OAA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{d as r}from"./use-api-Ft007Dfs.js";import{n as i}from"./use-foundational-data-BEVQRFj9.js";import{n as a,v as o}from"./index-
|
|
1
|
+
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r}from"./use-api-Ft007Dfs.js";import{n as i}from"./use-foundational-data-BEVQRFj9.js";import{n as a,v as o}from"./index-CyUttHc8.js";import{t as s}from"./Placeholder-BRnxNmKm.js";import{n as c,t as l}from"./Markdown-D5fQv556.js";import{t as u}from"./Page-BMcxP_9m.js";import{t as d}from"./use-simple-headers-DJo4M2YI.js";import{t as f}from"./Divider-lz6Cf6K8.js";import{t as p}from"./Alert-B1bEDR3t.js";function m(){let{appName:m}=o(),{foda:h}=i(),{data:g,loading:_,error:v}=a(r,{}),y=d({title:`About ${m}`});return _?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:[t(s,{class:`w-[30%] text-xl`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[60%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[40%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[20%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[50%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[80%] text-md`})]})}):v!=null||g==null?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:t(p,{type:`error`,children:t(e,{children:`An error occurred while loading the about page.`})})})}):t(u,{...y,children:t(n,{class:`px-4 py-8 gap-12`,children:[t(l,{markdown:g.primaryMarkdown}),t(n,{class:`gap-8`,children:[t(f,{}),t(e,{as:`p`,style:`small-weak`,children:t(c,{markdown:h.footerPrimaryMarkdown})})]})]})})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-
|
|
1
|
+
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DJo4M2YI.js";function a(){return t(r,{...i({title:`Admin controls`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`Maybe the real admin controls were the friends we made along the way?`})})})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,l as t,o as n,s as r}from"./use-nav-exemptions-QtGbfEPT.js";import{l as i,r as a,s as o}from"./index-
|
|
1
|
+
import{c as e,l as t,o as n,s as r}from"./use-nav-exemptions-QtGbfEPT.js";import{l as i,r as a,s as o}from"./index-CyUttHc8.js";import{t as s}from"./MingcuteAlertLine-CdthHQmK.js";function c(e){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:t(`g`,{fill:`none`,fillRule:`evenodd`,children:[t(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),t(`path`,{fill:`currentColor`,d:`M21.192 5.465a1 1 0 0 1 0 1.414L9.95 18.122a1.1 1.1 0 0 1-1.556 0l-5.586-5.586a1 1 0 1 1 1.415-1.415l4.95 4.95L19.777 5.465a1 1 0 0 1 1.414 0Z`})]})})}function l(l){let u={info:o,error:i,warning:s,success:c}[l.type],d=l.icon===void 0?u:l.icon,f={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[l.type],p={info:[`[--color-fg:var(--color-accent-text)]`,`[--color-fg-strong:var(--color-accent-text)]`,`[--color-fg-weak:var(--color-accent-text)]`],error:[`[--color-fg:var(--color-error-text)]`,`[--color-fg-strong:var(--color-error-text)]`,`[--color-fg-weak:var(--color-error-text)]`],warning:[`[--color-fg:var(--color-warning-text)]`,`[--color-fg-strong:var(--color-warning-text)]`,`[--color-fg-weak:var(--color-warning-text)]`],success:[`[--color-fg:var(--color-success-text)]`,`[--color-fg-strong:var(--color-success-text)]`,`[--color-fg-weak:var(--color-success-text)]`]}[l.type];return t(r,{class:e(l.class,f,p,`px-4 py-4.5 rounded-sm gap-2 items-start`,{"grid-cols-[auto_1fr]":d!=null}),children:[d!=null&&t(a,{heightRem:n(`text-md`),children:t(d,{class:`text-fg text-icon-lg`})}),l.children]})}export{l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,h as t,i as n,l as r,o as i,r as a,s as o,v as s}from"./use-nav-exemptions-QtGbfEPT.js";import{i as c}from"./use-api-Ft007Dfs.js";import{n as l}from"./use-foundational-data-BEVQRFj9.js";import{_ as u,f as d,g as f,m as p,n as m,o as h,r as g,t as _,v}from"./index-
|
|
1
|
+
import{c as e,h as t,i as n,l as r,o as i,r as a,s as o,v as s}from"./use-nav-exemptions-QtGbfEPT.js";import{i as c}from"./use-api-Ft007Dfs.js";import{n as l}from"./use-foundational-data-BEVQRFj9.js";import{_ as u,f as d,g as f,m as p,n as m,o as h,r as g,t as _,v}from"./index-CyUttHc8.js";import{t as y}from"./Placeholder-BRnxNmKm.js";import{t as b}from"./Page-BMcxP_9m.js";import{t as x}from"./use-simple-headers-DJo4M2YI.js";import{t as S}from"./Divider-lz6Cf6K8.js";import{t as C}from"./Alert-B1bEDR3t.js";function w(t){let i={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[t.type],a={info:`[--color-fg:var(--color-accent-text)]`,error:`[--color-fg:var(--color-error-text)]`,warning:`[--color-fg:var(--color-warning-text)]`,success:`[--color-fg:var(--color-success-text)]`}[t.type];return r(o,{class:e(t.class,i,a,`px-2 py-1.5 rounded-full`),children:r(n,{style:`small`,children:t.text})})}function T(t){return r(p,{class:e(t.class,`gap-x-2 gap-y-3`),wrap:!0,children:[r(n,{style:`strong`,children:t.header}),t.loading&&r(y,{class:`w-[20%] text-md`}),!t.loading&&t.pillContent!=null&&r(g,{heightRem:i(`text-md`),children:r(w,{type:t.pillContent.type,text:t.pillContent.text})})]})}function E(e){return r(T,{class:e.class,header:e.header,pillContent:D(e.currentValue,e.latestValue),loading:e.loading})}function D(e,t){return t==null?null:{text:e===t?`Up to date`:`Outdated`,type:e===t?`success`:`error`}}function O(e){return e.loading?r(o,{class:e.class,children:r(y,{class:`w-[40%] text-md`})}):e.value==null?null:r(n,{class:e.class,children:[e.prefix,`: `,e.value]})}function k(e){return e==null?null:e.length<32||!/^[0-9a-f]+$/.test(e)?e:e.slice(0,7)}function A(t){let{isUpdateAvailable:a,update:o}=h();return a?r(d,{theme:`accent`,text:`Refresh & update`,class:`self-start`,icon:f,onClick:()=>void o()}):r(p,{class:e(t.class,`gap-2`),children:[r(g,{heightRem:i(`text-md`),children:r(u,{})}),r(n,{class:`min-w-0 shrink`,children:`Waiting for service worker to install update...`})]})}function j(e){let{isHotReloadingEnabled:t}=_();return r(t?M:N,{...e})}function M(t){return r(a,{class:e(t.class,`gap-6`),children:[r(T,{header:`App version`,pillContent:{text:`Development`,type:`info`},loading:!1}),r(n,{children:`All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)`}),r(P,{}),r(O,{prefix:`Latest version`,value:t.latestVersion?.slice(0,8)??null,loading:t.loading})]})}function N(t){let{frontendVersion:n}=v(),i=!t.loading&&t.latestVersion!=null&&t.latestVersion!==n;return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`App version`,currentValue:n,latestValue:t.latestVersion,loading:t.loading}),r(P,{}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading}),i&&r(A,{})]})}function P(){let{frontendVersion:e,versionsOnLastUpdate:t}=v();return r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(e)]}),r(a,{class:`gap-3`,children:[r(n,{style:`small-weak`,children:[`Server version: `,k(t.serverVersion)]}),r(n,{style:`small-weak`,children:[`CoreQuery version: `,t.corequeryPackageVersion]})]})]})}function F(t){let{foda:i}=l();return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`Foundational data`,currentValue:i.hash,latestValue:t.latestVersion,loading:t.loading}),r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(i.hash)]}),r(n,{style:`small-weak`,children:[`Server version: `,k(i.serverVersion)]})]}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading})]})}function I(t){return r(a,{class:e(t.class,`gap-6`),children:[r(n,{style:`strong`,children:`Server`}),t.error!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Server version`,value:k(t.serverVersion),loading:t.loading}),r(O,{prefix:`CoreQuery version`,value:t.corequeryPackageVersion,loading:t.loading})]})]})}function L(e){return e<2e3?`${e.toFixed(0)} bytes`:e<2e6?`${(e/1e3).toFixed(2)} KB`:e<2e9?`${(e/1e6).toFixed(2)} MB`:e<2e12?`${(e/1e9).toFixed(2)} GB`:`${(e/0xe8d4a51000).toFixed(2)} TB`}function R(){let[e,i]=s(null),[o,c]=s(!0),[l,u]=s(!1);t(()=>{async function e(){c(!0),u(!1);try{let e=await navigator.storage.estimate();i(e)}catch(e){console.warn(`An error occurred while retrieving storage metrics.`,e),u(!0)}finally{c(!1)}}e()},[]);let d=e?.usage==null?null:L(e.usage),f=e?.quota==null?null:L(e.quota);return r(a,{class:`gap-6`,children:[r(n,{style:`strong`,children:`On-device storage`}),l&&r(C,{type:`error`,children:r(n,{children:`An error occurred while retrieving storage metrics.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Storage used`,value:d,loading:o}),r(O,{prefix:`Storage quota`,value:f,loading:o})]})]})}function z(){let{data:e,loading:t,error:i}=m(c,{});return r(b,{...x({title:`Developer info`}),children:r(a,{class:`px-4 py-8 gap-8`,children:[i!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(j,{latestVersion:e?.frontendVersion??null,loading:t}),r(S,{}),r(F,{latestVersion:e?.foundationalDataHash??null,loading:t}),r(S,{}),r(I,{serverVersion:e?.serverVersion??null,corequeryPackageVersion:e?.corequeryPackageVersion??null,loading:t,error:i}),r(S,{}),r(R,{}),r(S,{})]})})}export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,r as t}from"./use-nav-exemptions-QtGbfEPT.js";import{n}from"./use-foundational-data-BEVQRFj9.js";import{t as r}from"./Markdown-D5fQv556.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-
|
|
1
|
+
import{l as e,r as t}from"./use-nav-exemptions-QtGbfEPT.js";import{n}from"./use-foundational-data-BEVQRFj9.js";import{t as r}from"./Markdown-D5fQv556.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DJo4M2YI.js";function o(){let{foda:o}=n();return e(i,{...a({title:`Home`}),children:e(t,{class:`px-4 py-8 gap-12`,children:e(r,{markdown:o.landingPage.primaryMarkdown})})})}export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o,v as s,y as c}from"./use-nav-exemptions-QtGbfEPT.js";import{l}from"./use-api-Ft007Dfs.js";import{n as u}from"./use-foundational-data-BEVQRFj9.js";import{t as d}from"./scope-B-e4l8Dr.js";import{i as f,n as p,o as m,r as h,t as g}from"./linear-BPbFILtP.js";import{t as _}from"./LinkText-sdmJpshg.js";import{a as v,d as y,v as b}from"./index-CyUttHc8.js";import{t as x}from"./Page-BMcxP_9m.js";import{t as S}from"./use-simple-headers-DJo4M2YI.js";import{t as C}from"./Alert-B1bEDR3t.js";import{t as w}from"./NotFoundPage-B17fzPr9.js";import{t as T}from"./Picker-DVb1h4gb.js";function E(e){throw Error(`Unexpected value: ${String(e)}`)}function D(i){let{foda:o}=u(),{appName:s}=b(),c=e(()=>i.fallbackStopList.map(e=>o.stops.require(e)).sort((e,t)=>e.name.localeCompare(t.name)),[o.stops,i.fallbackStopList]);return r(a,{class:t(i.class,`gap-6`),children:[r(n,{style:`subtitle`,children:`Stops`}),r(C,{type:`info`,children:r(a,{class:`gap-6`,children:[r(n,{children:[`A neat little diagram is also available for this line, but it's of a new type, and so requires a newer version of `,s,` to be able to view.`,` `]}),r(n,{style:`strong`,children:r(_,{href:`/debug`,children:`Help me update`})})]})}),r(`ul`,{class:`flex-col flex list-disc list-inside gap-4`,children:c.map((e,t)=>r(n,{children:r(`li`,{children:r(_,{href:`/stop/${e.urlPath}`,children:e.name})})},t))})]})}function O(e,t){return t.map(t=>{let i=e.stops.require(t.stopId),a=`/stop/${i.urlPath}`;if(t.type===`regular`)return{content:r(n,{style:`strong`,children:r(_,{href:a,style:`subtle`,children:i.name})})};if(t.type===`always-express`)return{content:r(n,{style:`small-weak`,children:r(_,{href:a,style:`subtle`,children:[`Skips `,i.name]})}),drawMark:!1};E(t.type)})}function k(t){let{foda:n}=u(),i=e(()=>({type:`linear`,stops:O(n,t.diagram.stops)}),[n,t.diagram.stops]);return r(g,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}var A=10,j=15,M=class extends h{_onRenderStructure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,{x:r,y:i}=this._measure();this._renderSection({stops:e,x:r.common,yLevels:i.common.all,terminatesAtTop:!0,terminatesAtBottom:!1,notchSide:`right`}),this._renderSection({stops:t,x:r.branchA,yLevels:i.branchA.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`left`}),this._renderSection({stops:n,x:r.branchB,yLevels:i.branchB.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(e=>{e.moveTo(r.common,i.common.bottom),e.lineTo(r.common,i.common.bottom+A),e.bezierCurveTo(r.common,i.common.bottom+j+A,r.branchA,i.branches.top-j,r.branchA,i.branches.top),e.lineTo(r.branchA,i.branchA.top),e.moveTo(r.common,i.common.bottom+A),e.bezierCurveTo(r.common,i.common.bottom+j+A,r.branchB,i.branches.top-j,r.branchB,i.branches.top),e.lineTo(r.branchB,i.branchA.top)})}_measure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,r=this._extractYLevels(e,N),i=d(r[0]),a=d(r[r.length-1]),o=this._extractYLevels(t,P),s=d(o[0]),c=d(o[o.length-1]),l=this._extractYLevels(n,F),u=d(l[0]),f=d(l[l.length-1]);return{x:{common:this.width/2,branchA:8,branchB:this.width-8},y:{common:{all:r,top:i,bottom:a},branchA:{all:o,top:s,bottom:c},branchB:{all:l,top:u,bottom:f},branches:{top:Math.min(s,u),bottom:Math.max(c,f)}}}}},N=`_diagram-common-stops`,P=`_diagram-branch-a-stops`,F=`_diagram-branch-b-stops`;function I(n){let{settings:i}=y(),s=e(()=>({structure:n.structure,lightThemeColorHexCode:n.lightThemeColorHexCode,darkThemeColorHexCode:n.darkThemeColorHexCode,colorTheme:i.theme}),[n.darkThemeColorHexCode,n.lightThemeColorHexCode,n.structure,i.theme]),l=c((e,t)=>new M(e,t),[]);return s.structure.commonStops.length<1||s.structure.branchAStops.length<1||s.structure.branchBStops.length<1?r(p,{}):r(o,{class:t(n.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-y-8 gap-x-4`),children:[r(f,{class:`w-12 col-2 row-span-full`,createController:l,data:s}),r(a,{class:t(`gap-6 col-3 row-1 -ml-4`,N),xAlign:`left`,children:n.structure.commonStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-1 row-2`,P),xAlign:`right`,children:n.structure.branchAStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-2`,F),xAlign:`left`,children:n.structure.branchBStops.map((e,t)=>r(o,{children:e.content},t))})]})}function L(t){let{foda:n}=u(),i=e(()=>({type:`branch`,commonStops:O(n,t.diagram.commonStops),branchAStops:O(n,t.diagram.branchAStops),branchBStops:O(n,t.diagram.branchBStops)}),[n,t.diagram]);return r(I,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}var R=10,z=15,B=24,V=1,H=class extends h{_onRenderStructure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,{x:r,y:i}=this._measure();if(e.length>0?this._renderSection({stops:e,x:r.loopLeft,yLevels:i.loopLeft.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`left`}):this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top-V),e.lineTo(r.loopLeft,i.loopLeft.bottom+V)}),t.length>0?this._renderSection({stops:t,x:r.loopRight,yLevels:i.loopRight.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`right`}):this._drawLine(e=>{e.moveTo(r.loopRight,i.loopRight.top-V),e.lineTo(r.loopRight,i.loopRight.bottom+V)}),n.length>0){let e=d(i.main.top);this._renderSection({stops:n,x:r.main,yLevels:i.main.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(t=>{t.moveTo(r.main,e),t.lineTo(r.main,e-R),t.bezierCurveTo(r.main,e-z-R,r.loopLeft,i.loop.bottom+z,r.loopLeft,i.loop.bottom),t.lineTo(r.loopLeft,i.loopLeft.bottom),t.moveTo(r.main,e-R),t.bezierCurveTo(r.main,e-z-R,r.loopRight,i.loop.bottom+z,r.loopRight,i.loop.bottom),t.lineTo(r.loopRight,i.loopRight.bottom)}),this.ctx.stroke()}else this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.bottom),e.lineTo(r.loopLeft,i.loop.bottom),e.bezierCurveTo(r.loopLeft,i.loop.bottom+B,r.loopRight,i.loop.bottom+B,r.loopRight,i.loop.bottom),e.lineTo(r.loopRight,i.loopRight.bottom)});this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top),e.lineTo(r.loopLeft,i.loop.top),e.bezierCurveTo(r.loopLeft,i.loop.top-B,r.loopRight,i.loop.top-B,r.loopRight,i.loop.top),e.lineTo(r.loopRight,i.loopRight.top)})}_measure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,r=this._extractYLevels(e,W),i=this._extractYLevels(t,G),a=this._extractYLevels(n,U),o=r[0],s=i[0],c=r[r.length-1],l=i[i.length-1],u=d(o??s),f=d(s??o),p=d(c??l),m=d(l??c);return{x:{loopLeft:8,loopRight:this.width-8,main:this.width/2},y:{loopLeft:{all:r,top:u,bottom:p},loopRight:{all:i,top:f,bottom:m},main:{all:a,top:a[0]??null,bottom:a[a.length-1]??null},loop:{top:Math.min(u,f),bottom:Math.max(p,m)}}}}},U=`_diagram-main-stops`,W=`_diagram-loop-left-stops`,G=`_diagram-loop-right-stops`;function K(n){let{settings:i}=y(),s=e(()=>({structure:n.structure,lightThemeColorHexCode:n.lightThemeColorHexCode,darkThemeColorHexCode:n.darkThemeColorHexCode,colorTheme:i.theme}),[n.darkThemeColorHexCode,n.lightThemeColorHexCode,n.structure,i.theme]),l=c((e,t)=>new H(e,t),[]),{loopLeftStops:u,loopRightStops:d}=s.structure;return u.length+d.length<1?r(p,{}):r(o,{class:t(n.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-x-4`),children:[r(f,{class:`w-12 col-2 row-span-full`,createController:l,data:s}),r(a,{class:t(`gap-6 col-1 row-1 py-4`,W),xAlign:`right`,yAlign:`center`,children:n.structure.loopLeftStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-1 py-4`,G),xAlign:`left`,yAlign:`center`,children:n.structure.loopRightStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-2 -ml-4`,U,{"pt-4":n.structure.mainStops.length>0}),xAlign:`left`,children:n.structure.mainStops.map((e,t)=>r(o,{children:e.content},t))})]})}function q(t){let{foda:n}=u(),i=e(()=>({type:`loop`,loopLeftStops:O(n,t.diagram.loopLeftStops),loopRightStops:O(n,t.diagram.loopRightStops),mainStops:O(n,t.diagram.mainStops)}),[n,t.diagram]);return r(K,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}function J(e){return r(o,{class:t(e.class,`bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border`),children:r(Y,{diagram:e.diagram})})}function Y(e){if(e.diagram.type===`linear`)return r(k,{diagram:e.diagram});if(e.diagram.type===`branch`)return r(L,{diagram:e.diagram});if(e.diagram.type===`loop`)return r(q,{diagram:e.diagram});E(e.diagram)}function X(e){let i=e.diagram.entries.filter(e=>l(e.type));return i.length<e.diagram.entries.length?r(D,{fallbackStopList:e.diagram.fallbackStopList}):r(a,{class:t(e.class,`gap-6`),children:[r(n,{style:`subtitle`,children:`Diagram`}),i.length===1?r(J,{diagram:d(i[0])}):r(Z,{entries:i},i.length)]})}function Z(t){let[n,i]=s(0),o=e(()=>t.entries.map((e,t)=>({value:t.toFixed(),label:e.name??`Route ${t+1}`})),[t.entries]);return r(a,{class:`gap-4`,children:[r(T,{class:`self-start`,value:n.toFixed(),options:o,onChange:e=>{i(m(e))}}),r(J,{diagram:d(t.entries[n])})]})}function Q(){let{params:{id:t}}=i(),{foda:n}=u(),a=e(()=>n.lines.getByUrlPath(t??``),[n.lines,t]);return a==null?r(w,{afterConfirming:`foundational-data-version`}):r($,{line:a},a.id)}function $(e){let{formatLine:t}=v();return r(x,{...S({title:t(e.line.name),back:{href:`/`,text:`Home`}}),children:r(a,{class:`px-4 py-8 gap-8`,children:e.line.diagram.entries.length>0&&r(X,{diagram:e.line.diagram})})})}export{Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e}from"./use-nav-exemptions-QtGbfEPT.js";import{t}from"./NotFoundPage-B17fzPr9.js";function n(){return e(t,{afterConfirming:`frontend-version`})}export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,i as t,l as n,r,v as i}from"./use-nav-exemptions-QtGbfEPT.js";import{i as a}from"./use-api-Ft007Dfs.js";import{n as o}from"./use-foundational-data-BEVQRFj9.js";import{_ as s,c,f as l,n as u,o as d,t as f,v as p}from"./index-
|
|
1
|
+
import{h as e,i as t,l as n,r,v as i}from"./use-nav-exemptions-QtGbfEPT.js";import{i as a}from"./use-api-Ft007Dfs.js";import{n as o}from"./use-foundational-data-BEVQRFj9.js";import{_ as s,c,f as l,n as u,o as d,t as f,v as p}from"./index-CyUttHc8.js";import{t as m}from"./Page-BMcxP_9m.js";function h(e){let t=u(a,{}),n=g(e===`frontend-version`,t),r=_(e===`foundational-data-version`,t);return t.loading||n||r}function g(t,n){let{isHotReloadingEnabled:r}=f(),{frontendVersion:i}=p(),{unregister:a}=d(),o=t&&!r&&!n.loading&&n.error==null&&n.data!=null&&n.data.frontendVersion!==i;return e(()=>{if(!o)return;async function e(){await a(),window.location.reload()}e()},[o,a]),o}function _(t,n){let{foda:r,forceFodaUpdate:a}=o(),[s,c]=i(!1),[l,u]=i(!1),d=t&&!n.loading&&n.error==null&&n.data!=null&&n.data.foundationalDataHash!==r.hash;return e(()=>{if(!d)return;async function e(){u(!0);try{await a()}catch{console.warn(`Foundational data is outdated, but force update failed.`)}finally{c(!0),u(!1)}}e()},[d,a]),d&&!s||l}function v({afterConfirming:e}){return h(e)?n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{xAlign:`center`,yAlign:`center`,children:n(s,{})})}):n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[n(t,{style:`title`,align:`center`,children:`Page not found`}),n(t,{align:`center`,children:`This page doesn't exist, at least not anymore!`}),n(l,{href:`/`,text:`Go home`,icon:c})]})})}export{v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{h as r,m as i}from"./index-
|
|
1
|
+
import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{h as r,m as i}from"./index-CyUttHc8.js";var a=[`bg-transparent`,`group-hover:bg-soft-hover`,`group-active:bg-soft-active`],o=[`bg-accent`,`group-hover:bg-accent-hover`,`group-active:bg-accent-active`],s=[`[--color-fg:var(--color-on-accent)]`,`[--color-fg-strong:var(--color-on-accent)]`,`[--color-fg-weak:var(--color-on-accent)]`],c=e(a),l=e(o),u=e(s);function d(t){return n(i,{class:e(t.class,`overflow-hidden rounded-sm border border-accent max-w-full`),children:t.options.map((e,r)=>n(f,{class:`shrink`,label:e.label,active:e.value===t.value,last:r===t.options.length-1,onClick:()=>t.onChange(e.value)},e.value))})}function f(a){return n(r,{class:e(a.class,`relative group min-h-8`,{[u]:a.active,"border-r border-accent":!a.last}),onClick:a.onClick,children:[n(`div`,{class:e(`absolute z-0 top-0 bottom-0 left-0 right-0`,{[c]:!a.active,[l]:a.active})}),n(i,{class:`relative z-1 px-6 py-2 min-w-0`,xAlign:`center`,yAlign:`center`,children:n(t,{class:`shrink min-w-min`,align:`center`,children:a.label})})]})}export{d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o}from"./use-nav-exemptions-QtGbfEPT.js";import{o as s}from"./use-api-Ft007Dfs.js";import{n as c}from"./use-foundational-data-BEVQRFj9.js";import{a as l,t as u}from"./linear-
|
|
1
|
+
import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o}from"./use-nav-exemptions-QtGbfEPT.js";import{o as s}from"./use-api-Ft007Dfs.js";import{n as c}from"./use-foundational-data-BEVQRFj9.js";import{a as l,t as u}from"./linear-BPbFILtP.js";import{t as d}from"./LinkText-sdmJpshg.js";import{_ as f,c as p,f as m,m as h}from"./index-CyUttHc8.js";import{t as g}from"./Page-BMcxP_9m.js";import{t as _}from"./use-simple-headers-DJo4M2YI.js";import{t as v}from"./use-foda-synced-query-hrC70vJ_.js";function y(n){let{foda:i}=c(),a=e(()=>({type:`linear`,stops:b(i,n.service.movements)}),[i,n.service.movements]);return r(o,{class:t(n.class),children:r(u,{class:n.class,structure:a,lightThemeColorHexCode:n.service.color?.lightModeHexCode??null,darkThemeColorHexCode:n.service.color?.darkModeHexCode??null})})}function b(e,t){return t.map(t=>{let i=e.stops.require(t.stopId),a=`/stop/${i.urlPath}`,o=t.arrivalTime==null?null:new Date(Date.parse(t.arrivalTime)).toLocaleString(),s=t.departureTime==null?null:new Date(Date.parse(t.departureTime)).toLocaleString();if(o==null&&s==null)return{content:r(n,{style:`small-weak`,children:r(d,{href:a,style:`subtle`,children:[`Skips `,i.name]})}),drawMark:!1};let c=s??o;return{content:r(h,{class:`gap-2 min-w-0`,children:[r(n,{style:`strong`,children:r(d,{href:a,style:`subtle`,children:i.name})}),r(n,{children:`•`}),r(n,{class:`shrink min-w-0`,oneLine:!0,children:c})]})}})}function x(){let{params:{sourceId:e,intrasourceId:t},query:{from:n}}=i(),{data:a,loading:o,error:c}=v(s,{sourceId:e??``,intrasourceId:t??``}),u=l(n??``);return o?r(C,{}):c!=null||a==null||u==null||u<0||a.service!=null&&u>a.service.movements.length-1?r(w,{}):a.service==null?r(T,{}):r(S,{service:a.service,movementIndex:u},`${e}/${t}`)}function S(e){return r(g,{..._({title:`${e.service.primaryDestinationText} service`,back:{href:`/`,text:`Home`}}),children:r(a,{class:`px-4 py-8 gap-8`,children:[r(y,{service:e.service}),r(n,{style:`small-narrow`,children:`(Real-time data has not been provided for all stops. Times marked with * are estimates, extrapolated from the available data.)`})]})})}function C(){return r(g,{..._({title:`Loading...`,back:{href:`/`,text:`Home`}}),children:r(f,{})})}function w(){return r(g,{..._({title:`Error`,back:{href:`/`,text:`Home`}}),children:r(n,{children:`Failed to load service.`})})}function T(){return r(g,{mobileHeader:null,desktopHeader:null,children:r(a,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[r(n,{style:`title`,align:`center`,children:`Service not found`}),r(n,{align:`center`,children:`This can happen if the service was cancelled, or the timetable changed since this link was generated. You might be able to find it again by searching for one of the stops it departed from.`}),r(m,{href:`/`,text:`Go home`,icon:p})]})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r,u as i}from"./index-
|
|
1
|
+
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r,u as i}from"./index-CyUttHc8.js";import{t as a}from"./Page-BMcxP_9m.js";import{t as o}from"./use-simple-headers-DJo4M2YI.js";import{t as s}from"./Divider-lz6Cf6K8.js";import{t as c}from"./Picker-DVb1h4gb.js";var l={auto:`Auto`,light:`Light`,dark:`Dark`},u=i.map(e=>({value:e,label:l[e]}));function d(e){let{settings:n,updateSettings:i}=r();return t(c,{class:e.class,value:n.theme,options:u,onChange:e=>{i(t=>t.with({theme:e}))}})}function f(){return t(a,{...o({title:`Settings`}),children:t(n,{class:`px-4 py-8 gap-8`,children:[t(n,{class:`gap-6`,children:[t(e,{style:`strong`,children:`Theme`}),t(e,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),t(d,{class:`self-start`})]}),t(s,{}),t(e,{style:`small-weak`,children:`(Settings are saved to your device's/browser's local storage.)`})]})})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{f as r,m as i}from"./index-
|
|
1
|
+
import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{f as r,m as i}from"./index-CyUttHc8.js";function a(e){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:n(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M14.657 17.657L9 12l5.657-5.657`})})}function o(o){return n(i,{class:e(o.class,`gap-2`,{"px-4":o.backHref==null,"pl-2 pr-4":o.backHref!=null}),yAlign:`center`,children:[o.backHref!=null&&n(r,{href:o.backHref,icon:a,theme:`hover`}),n(t,{style:`title`,children:o.title})]})}export{a as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-
|
|
1
|
+
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DJo4M2YI.js";function a(){return t(r,{...i({title:`Status`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`LGTM`})})})}export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,c as t,i as n,l as r,m as i,n as a,o,r as s,s as c,v as l}from"./use-nav-exemptions-QtGbfEPT.js";import{u}from"./use-api-Ft007Dfs.js";import{n as d}from"./use-foundational-data-BEVQRFj9.js";import{_ as f,a as p,f as m,i as h,m as g,p as _,r as v}from"./index-CyUttHc8.js";import{t as y}from"./Page-BMcxP_9m.js";import{n as b,t as x}from"./SimpleMobileHeaderContent-Cpqzarjr.js";import{t as S}from"./NotFoundPage-B17fzPr9.js";import{t as C}from"./ErrorMessage-CCAB4vXB.js";import{t as w}from"./use-foda-synced-query-hrC70vJ_.js";function T(e){return{hideMobileHeaderWhenScrolledToTop:!0,mobileHeader:r(x,{title:e.title,backHref:e.back?.href??null}),agnosticHeader:r(c,{class:`not-desktop:bg-bg-navbar not-desktop:border-b not-desktop:border-soft-border`,children:r(a,{children:r(c,{class:`not-desktop:px-4 desktop:mx-4 desktop:border-b desktop:border-soft-border`,children:r(s,{class:t(`gap-8`,{"pt-4 pb-6 desktop:pt-6":e.back!=null,"py-6 desktop:pt-8":e.back==null,"desktop:pb-4":e.additionalContent==null}),children:[e.back!=null&&r(m,{text:e.back.text,href:e.back.href,icon:b,class:`self-start`,layout:`narrow-icon`}),r(s,{class:`gap-4`,children:[r(n,{style:`megatitle`,children:e.title}),e.additionalContent]})]})})})})}}function E(e){return r(g,{class:t(e.class),children:r(n,{style:`strong`,dynamicColor:e.serviceColor,children:e.time})})}var D=3.5;function O(e){return r(s,{class:t(e.class,`h-14 min-w-0`),yAlign:`space-between`,children:[r(g,{xAlign:`space-between`,class:`gap-2 `,children:[r(g,{yAlign:`bottom`,class:`gap-1 shrink min-w-0`,children:[r(n,{style:`strong`,dynamicColor:e.departure.color,children:e.departure.primaryDestinationText}),e.departure.secondaryDestinationText!=null&&r(n,{style:`small-narrow`,class:`shrink min-w-0`,dynamicColor:e.departure.color,oneLine:!0,children:e.departure.secondaryDestinationText})]}),r(E,{time:e.departure.movement.time,formerTime:e.departure.movement.formerTime,serviceColor:e.departure.color})]}),r(g,{xAlign:`space-between`,yAlign:`bottom`,children:[r(s,{class:`gap-3 min-w-0 shrink`,children:[r(n,{style:`small-narrow`,oneLine:!0,children:`The stopping pattern goes here`}),r(g,{class:`gap-1`,children:[r(n,{style:`small-narrow-strong-success`,children:`Solid`}),r(n,{style:`small-narrow`,children:`•`}),r(n,{style:`small-narrow`,class:`shrink min-w-0`,oneLine:!0,children:`And then this row shows all sorts of stuff`})]})]}),r(s,{yAlign:`space-between`,class:`border-2 px-1.5 py-1 border-soft-border rounded-sm -mb-0.5 h-8.5`,children:[r(n,{style:`tiny-narrow`,align:`center`,children:`Platform`}),r(n,{style:`strong`,align:`center`,children:`X`})]})]})]})}function k(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9.343 6.343L15 12l-5.657 5.657`})})}var A=D+2;function j(e){return r(_,{class:t(e.class),href:M(e.departure),children:r(c,{class:`grid-cols-[1fr_auto] p-4 items-center pr-2 gap-2`,children:[r(O,{departure:e.departure}),r(k,{class:`text-icon-lg text-fg`})]})})}function M(e){return`/service/${encodeURIComponent(e.sourceId)}/${encodeURIComponent(e.intrasourceId)}?from=${encodeURIComponent(e.movement.index.toString())}`}function N(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M11 20H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4H4m12-7v2M8 4v2m12.121 9.879L18 18m0 0l-2.121 2.121M18 18l-2.121-2.121M18 18l2.121 2.121`})})}function P(e){let{pluralServicesTerm:n}=p();return e.loading?r(F,{class:e.class,queryCount:e.queryCount,centerContent:!0,children:r(f,{})}):e.hadError?r(F,{class:t(e.class,`gap-2`),queryCount:e.queryCount,centerContent:!0,children:r(C,{text:`An error occurred while retrieving departures`})}):e.departures.length===0?r(F,{class:e.class,queryCount:e.queryCount,centerContent:!0,children:r(C,{text:`No ${n} scheduled`,icon:N})}):r(F,{class:e.class,queryCount:e.queryCount,children:e.departures.map((t,n)=>r(c,{class:`relative`,children:[r(j,{departure:t}),n<e.queryCount-1&&r(`hr`,{class:`border-soft-border absolute bottom-0 left-0 right-0 mx-4`})]},I(t)))})}function F(e){let t=e.centerContent??!1;return r(s,{class:e.class,xAlign:t?`center`:`stretch`,yAlign:t?`center`:`top`,dynamicMinHeightRem:A*e.queryCount,children:e.children})}function I(e){return`${e.sourceId}/${e.intrasourceId}/${e.movement.index}`}function L(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m4 20l5-5m0 0l3.956 3.956a1 1 0 0 0 1.626-.314l2.255-5.261a1 1 0 0 1 .548-.535l3.207-1.283a1 1 0 0 0 .336-1.635l-6.856-6.856a1 1 0 0 0-1.635.336l-1.283 3.207a1 1 0 0 1-.535.548L5.358 9.418a1 1 0 0 0-.314 1.626z`})})}function R(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 20H4v-5m0 5l6.5-6.5M15 4h5v5m0-5l-6.5 6.5`})})}function z(e){return r(s,{class:t(e.class,`min-w-0`),children:[r(g,{xAlign:`space-between`,yAlign:`center`,class:`gap-2 not-desktop:pl-4 not-desktop:pr-2 not-desktop:pt-6 pb-2`,children:[r(n,{style:`subtitle`,class:`shrink min-w-0`,oneLine:!0,children:e.feed.query.title}),r(g,{class:`gap-2`,children:[r(m,{theme:`hover`,icon:L}),r(m,{theme:`hover`,icon:R})]})]}),r(P,{class:`bg-bg-raised desktop:border not-desktop:border-y border-soft-border desktop:rounded-lg overflow-hidden box-content`,departures:e.feed.departures,queryCount:e.feed.query.desiredCount,loading:e.feed.loading,hadError:e.feed.hadError})]})}function B(e){return r(c,{class:t(e.class,`desktop:grid-cols-[1fr_1fr] desktop:gap-6 desktop:px-4 desktop:py-8`),children:e.feeds.map((e,t)=>r(z,{feed:e,class:`not-desktop:last:-mb-px`},t))})}function V(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M17.657 9.343L12 15L6.343 9.343`})})}function H(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 7v5l3 3m6-3a9 9 0 1 1-18 0a9 9 0 0 1 18 0`})})}function U(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19.5 4h-15a.5.5 0 0 0-.5.5v2.086a1 1 0 0 0 .293.707L10 13v5.691a.5.5 0 0 0 .276.447L14 21v-8l5.707-5.707A1 1 0 0 0 20 6.586V4.5a.5.5 0 0 0-.5-.5Z`})})}function W(e){return r(c,{class:`desktop:pt-6 desktop:px-4`,children:r(c,{class:t(e.class,`grid-cols-[1fr_1fr] desktop:max-w-150 bg-bg-raised divide-x divide-soft-border desktop:border not-desktop:border-b border-soft-border desktop:rounded-lg overflow-hidden`),children:[r(_,{children:r(g,{xAlign:`space-between`,yAlign:`center`,class:`p-4`,children:[r(g,{yAlign:`center`,class:`gap-2`,children:[r(v,{heightRem:o(`text-md`),children:r(H,{class:`text-icon-lg text-fg`})}),r(n,{children:`Now`})]}),r(v,{heightRem:o(`text-md`),children:r(V,{class:`text-icon-lg text-fg`})})]})}),r(_,{children:r(g,{xAlign:`space-between`,yAlign:`center`,class:`p-4`,children:[r(g,{yAlign:`center`,class:`gap-2`,children:[r(v,{heightRem:o(`text-md`),children:r(U,{class:`text-icon-lg text-fg`})}),r(n,{children:`All trains`})]}),r(v,{heightRem:o(`text-md`),children:r(V,{class:`text-icon-lg text-fg`})})]})})]})})}function G(){let{params:{id:t}}=i(),{foda:n}=d(),a=e(()=>n.stops.getByUrlPath(t??``),[n.stops,t]);return a==null?r(S,{afterConfirming:`foundational-data-version`}):r(K,{stop:a},a.id)}function K(t){let[n]=l(()=>Temporal.Now.zonedDateTimeISO(`UTC`).round({smallestUnit:`minute`,roundingMode:`floor`}).toInstant()),{data:i,loading:a,error:o}=w(u,{instant:n.toString(),direction:`forwards`,feeds:t.stop.defaultDepartureFeeds.map(e=>({stopId:t.stop.id,desiredCount:e.desiredCount,filterExpression:`${e.filterExpression} !arr !sdo`.trim(),skips:[]}))}),c=e(()=>t.stop.defaultDepartureFeeds.map((e,t)=>({query:{title:e.name,desiredCount:e.desiredCount},departures:i?.feeds[t]?.departures??[],loading:a,hadError:o!=null})),[t.stop.defaultDepartureFeeds,i,a,o]);return r(y,{...T({title:t.stop.name,back:{href:`/`,text:`Home`},additionalContent:r(h,{lineIds:t.stop.canonicalLinesServingStop,withLinks:!0})}),children:r(s,{children:[r(W,{}),r(B,{feeds:c})]})})}export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Strong-C0VDYprE.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-
|
|
1
|
+
import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Strong-C0VDYprE.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DJo4M2YI.js";function o(){return t(i,{...a({title:`Zen mode`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:[t(r,{children:`✨`}),` Zen! `,t(r,{children:`✨`})]})})})}export{o as default};
|