@toa.io/extensions.exposition 1.0.0-alpha.291 → 1.0.0-alpha.292

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
  3. package/components/identity.clients/tsconfig.tsbuildinfo +1 -1
  4. package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
  5. package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
  6. package/components/identity.grants/tsconfig.tsbuildinfo +1 -1
  7. package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
  8. package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
  9. package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
  10. package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
  11. package/features/steps/Gateway.ts +1 -2
  12. package/package.json +6 -5
  13. package/source/Discovery/Explorer.ts +1 -1
  14. package/source/Discovery/Site.ts +1 -1
  15. package/source/Discovery/trunk.ts +1 -1
  16. package/source/Factory.ts +1 -1
  17. package/source/Gateway.ts +1 -1
  18. package/source/HTTP/Server.ts +7 -2
  19. package/source/MCP/Server.ts +2 -2
  20. package/source/MCP/discover.ts +1 -1
  21. package/source/Query.ts +1 -1
  22. package/source/RPC/Dispatcher.ts +3 -3
  23. package/source/RTD/Tree.ts +1 -1
  24. package/source/RTD/factory.ts +1 -1
  25. package/source/RTD/syntax/index.ts +1 -2
  26. package/source/Tenant.ts +1 -1
  27. package/source/directives/auth/Authorization.ts +1 -1
  28. package/source/directives/io/IO.ts +1 -1
  29. package/source/directives/oauth/documents.ts +1 -1
  30. package/source/index.ts +0 -2
  31. package/source/service.ts +3 -2
  32. package/transpiled/Discovery/Explorer.js +1 -1
  33. package/transpiled/Discovery/Explorer.js.map +1 -1
  34. package/transpiled/Discovery/Site.js +1 -1
  35. package/transpiled/Discovery/Site.js.map +1 -1
  36. package/transpiled/Discovery/trunk.js +1 -1
  37. package/transpiled/Discovery/trunk.js.map +1 -1
  38. package/transpiled/Factory.js +1 -1
  39. package/transpiled/Factory.js.map +1 -1
  40. package/transpiled/Gateway.js +1 -1
  41. package/transpiled/Gateway.js.map +1 -1
  42. package/transpiled/HTTP/Server.d.ts +1 -1
  43. package/transpiled/HTTP/Server.js +1 -1
  44. package/transpiled/HTTP/Server.js.map +1 -1
  45. package/transpiled/MCP/Server.d.ts +1 -1
  46. package/transpiled/MCP/Server.js +1 -1
  47. package/transpiled/MCP/Server.js.map +1 -1
  48. package/transpiled/MCP/discover.d.ts +1 -1
  49. package/transpiled/Query.js +1 -1
  50. package/transpiled/Query.js.map +1 -1
  51. package/transpiled/RPC/Dispatcher.d.ts +1 -1
  52. package/transpiled/RPC/Dispatcher.js +2 -2
  53. package/transpiled/RPC/Dispatcher.js.map +1 -1
  54. package/transpiled/RTD/Tree.js +1 -1
  55. package/transpiled/RTD/Tree.js.map +1 -1
  56. package/transpiled/RTD/factory.js +1 -1
  57. package/transpiled/RTD/factory.js.map +1 -1
  58. package/transpiled/RTD/syntax/index.d.ts +1 -2
  59. package/transpiled/RTD/syntax/index.js +1 -2
  60. package/transpiled/RTD/syntax/index.js.map +1 -1
  61. package/transpiled/Tenant.js +1 -1
  62. package/transpiled/Tenant.js.map +1 -1
  63. package/transpiled/directives/auth/Authorization.js +1 -1
  64. package/transpiled/directives/auth/Authorization.js.map +1 -1
  65. package/transpiled/directives/io/IO.js +1 -1
  66. package/transpiled/directives/io/IO.js.map +1 -1
  67. package/transpiled/directives/oauth/documents.d.ts +1 -1
  68. package/transpiled/index.d.ts +0 -2
  69. package/transpiled/index.js +0 -2
  70. package/transpiled/index.js.map +1 -1
  71. package/transpiled/service.js +1 -1
  72. package/transpiled/service.js.map +1 -1
  73. package/tsconfig.tsbuildinfo +1 -1
  74. package/ui/dist/_app/immutable/chunks/BaWe3aOV.js +1 -0
  75. package/ui/dist/_app/immutable/chunks/{B_pK3U1C.js → GZTfV0ks.js} +2 -2
  76. package/ui/dist/_app/immutable/chunks/{D9tE1yyO.js → aLpTDmOc.js} +1 -1
  77. package/ui/dist/_app/immutable/entry/{app.DMqmL4NY.js → app.D5v4JoUx.js} +2 -2
  78. package/ui/dist/_app/immutable/entry/start.CWxFoIyZ.js +1 -0
  79. package/ui/dist/_app/immutable/nodes/{0.D9m-6cbM.js → 0.DIh5T_5-.js} +1 -1
  80. package/ui/dist/_app/immutable/nodes/{1.Cgi_RcSO.js → 1.CY-bFzHC.js} +1 -1
  81. package/ui/dist/_app/immutable/nodes/{2.D_Cbxgz4.js → 2.6Ubd1ItY.js} +1 -1
  82. package/ui/dist/_app/version.json +1 -1
  83. package/ui/dist/index.html +10 -10
  84. package/schemas/annotation.cos.yaml +0 -125
  85. package/schemas/call.cos.yaml +0 -18
  86. package/schemas/directive.cos.yaml +0 -7
  87. package/schemas/method.cos.yaml +0 -23
  88. package/schemas/node.cos.yaml +0 -22
  89. package/schemas/query.cos.yaml +0 -31
  90. package/schemas/querystring.cos.yaml +0 -19
  91. package/schemas/range.cos.yaml +0 -10
  92. package/schemas/route.cos.yaml +0 -6
  93. package/source/Annotation.ts +0 -89
  94. package/source/RTD/syntax/parse.test.ts +0 -196
  95. package/source/RTD/syntax/parse.ts +0 -171
  96. package/source/RTD/syntax/types.ts +0 -69
  97. package/source/const.ts +0 -45
  98. package/source/deployment.ts +0 -96
  99. package/source/manifest.test.ts +0 -56
  100. package/source/manifest.ts +0 -56
  101. package/source/schemas.test.ts +0 -31
  102. package/source/schemas.ts +0 -15
  103. package/source/shortcuts.ts +0 -14
  104. package/transpiled/Annotation.d.ts +0 -70
  105. package/transpiled/Annotation.js +0 -2
  106. package/transpiled/Annotation.js.map +0 -1
  107. package/transpiled/RTD/syntax/parse.d.ts +0 -4
  108. package/transpiled/RTD/syntax/parse.js +0 -112
  109. package/transpiled/RTD/syntax/parse.js.map +0 -1
  110. package/transpiled/RTD/syntax/types.d.ts +0 -52
  111. package/transpiled/RTD/syntax/types.js +0 -11
  112. package/transpiled/RTD/syntax/types.js.map +0 -1
  113. package/transpiled/const.d.ts +0 -36
  114. package/transpiled/const.js +0 -37
  115. package/transpiled/const.js.map +0 -1
  116. package/transpiled/deployment.d.ts +0 -6
  117. package/transpiled/deployment.js +0 -76
  118. package/transpiled/deployment.js.map +0 -1
  119. package/transpiled/manifest.d.ts +0 -3
  120. package/transpiled/manifest.js +0 -39
  121. package/transpiled/manifest.js.map +0 -1
  122. package/transpiled/schemas.d.ts +0 -9
  123. package/transpiled/schemas.js +0 -9
  124. package/transpiled/schemas.js.map +0 -1
  125. package/transpiled/shortcuts.d.ts +0 -3
  126. package/transpiled/shortcuts.js +0 -13
  127. package/transpiled/shortcuts.js.map +0 -1
  128. package/ui/dist/_app/immutable/chunks/CiKbPLyY.js +0 -1
  129. package/ui/dist/_app/immutable/entry/start.CRe7HWBI.js +0 -1
@@ -1,112 +0,0 @@
1
- import * as schemas from '../../schemas.js';
2
- import { verbs } from './types.js';
3
- export function parse(input, shortcuts) {
4
- const node = parseNode(input, shortcuts);
5
- schemas.node.validate(node);
6
- return node;
7
- }
8
- function parseNode(input, shortcuts) {
9
- const node = createNode();
10
- if (typeof input === 'string') {
11
- node.forward = input;
12
- return node;
13
- }
14
- for (const [key, value] of Object.entries(input))
15
- switch (key) {
16
- case 'protected':
17
- case 'isolated':
18
- node[key] = value;
19
- break;
20
- case 'forward':
21
- node[key] = value;
22
- break;
23
- default:
24
- // eslint-disable-next-line max-depth
25
- if (key[0] === '/') {
26
- const route = parseRoute(key, value, shortcuts);
27
- node.routes.push(route);
28
- continue;
29
- }
30
- // eslint-disable-next-line max-depth
31
- if (verbs.has(key)) {
32
- const method = parseMethod(key, value, shortcuts);
33
- node.methods.push(method);
34
- continue;
35
- }
36
- // eslint-disable-next-line no-case-declarations
37
- const directive = parseDirective(key, value, shortcuts);
38
- // eslint-disable-next-line max-depth
39
- if (directive !== null) {
40
- node.directives.push(directive);
41
- continue;
42
- }
43
- throw new Error(`RTD parse error: unknown key '${key}'`);
44
- }
45
- return node;
46
- }
47
- export function createNode() {
48
- return {
49
- routes: [],
50
- methods: [],
51
- directives: []
52
- };
53
- }
54
- function parseRoute(path, value, shortcuts) {
55
- const node = parse(value, shortcuts);
56
- return createRoute(path, node);
57
- }
58
- function createRoute(path, node) {
59
- return { path, node };
60
- }
61
- function parseMethod(verb, value, shortcuts) {
62
- const mapping = typeof value === 'string' ? { endpoint: value } : value;
63
- parseEndpoint(mapping);
64
- parseQuery(mapping);
65
- const directives = parseDirectives(mapping, shortcuts);
66
- return { verb, mapping, directives };
67
- }
68
- function parseEndpoint(mapping) {
69
- if (mapping.endpoint === undefined)
70
- return;
71
- const [endpoiont, component, namespace] = mapping.endpoint.split('.').reverse();
72
- if (component !== undefined) {
73
- mapping.component = component;
74
- mapping.namespace = namespace ?? mapping.namespace ?? 'default';
75
- mapping.endpoint = endpoiont;
76
- }
77
- }
78
- function parseQuery(mapping) {
79
- const query = mapping.query;
80
- if (query === undefined || query === null)
81
- return;
82
- if (typeof query.limit === 'number')
83
- query.limit = expandRange(query.limit);
84
- if (typeof query.omit === 'number')
85
- query.omit = expandRange(query.omit);
86
- }
87
- function parseDirectives(mapping, shortcuts) {
88
- const directives = [];
89
- for (const [key, value] of Object.entries(mapping)) {
90
- const directive = parseDirective(key, value, shortcuts);
91
- if (directive === null)
92
- continue;
93
- directives.push(directive);
94
- // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
95
- delete mapping[key];
96
- }
97
- return directives;
98
- }
99
- function parseDirective(key, value, shortcuts) {
100
- if (shortcuts?.has(key) === true)
101
- key = shortcuts.get(key); // eslint-disable-line @typescript-eslint/no-non-null-assertion
102
- const match = key.match(DIRECTIVE_RX);
103
- if (match === null)
104
- return null;
105
- const { family, name } = match.groups;
106
- return { family, name, value };
107
- }
108
- function expandRange(range) {
109
- return { value: range, range: [range, range] };
110
- }
111
- const DIRECTIVE_RX = /^(?<family>\w{1,32}):(?<name>\w{1,32})$/;
112
- //# source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K,EAAE,SAAS,CAAC,CAAA;QAEvD,IAAI,SAAS,KAAK,IAAI;YAAE,SAAQ;QAEhC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAE1B,gEAAgE;QAChE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;IACrB,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,SAAS,cAAc,CACrB,GAAW,EACX,KAAU,EACV,SAAqB;IAErB,IAAI,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI;QAAE,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAE,CAAA,CAAC,+DAA+D;IAE3H,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAErC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,MAA0C,CAAA;IAEzE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;AAChC,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAA;AAChD,CAAC;AAED,MAAM,YAAY,GAAG,yCAAyC,CAAA"}
@@ -1,52 +0,0 @@
1
- export interface Node {
2
- protected?: boolean;
3
- isolated?: boolean;
4
- forward?: string;
5
- routes: Route[];
6
- methods: Method[];
7
- directives: Directive[];
8
- }
9
- export interface Route {
10
- path: string;
11
- node: Node;
12
- }
13
- export interface Method {
14
- verb: string;
15
- mapping?: Mapping;
16
- directives: Directive[];
17
- }
18
- export interface Directive {
19
- family: string;
20
- name: string;
21
- value: any;
22
- }
23
- export interface Mapping {
24
- namespace?: string;
25
- component?: string;
26
- endpoint: string;
27
- query?: Query | null;
28
- /**
29
- * Whether the operation this maps to answers a page of a collection, and so takes the
30
- * `omit` and `limit` a page is taken by. Written where the component's manifest is read,
31
- * beside `namespace` and `component`, and not declared.
32
- */
33
- paged?: boolean;
34
- }
35
- export interface Query {
36
- id?: string;
37
- criteria?: string;
38
- search?: boolean;
39
- sample?: number;
40
- sort?: string;
41
- omit?: Range;
42
- limit?: Range;
43
- selectors?: string[];
44
- projection?: string[];
45
- parameters?: string[];
46
- deleted?: boolean;
47
- }
48
- export interface Range {
49
- value?: number;
50
- range: [number, number];
51
- }
52
- export declare const verbs: Set<string>;
@@ -1,11 +0,0 @@
1
- export const verbs = new Set([
2
- 'GET',
3
- 'HEAD',
4
- 'POST',
5
- 'PUT',
6
- 'PATCH',
7
- 'DELETE',
8
- 'LOCK',
9
- 'UNLOCK'
10
- ]);
11
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../source/RTD/syntax/types.ts"],"names":[],"mappings":"AA2DA,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS;IACnC,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA"}
@@ -1,36 +0,0 @@
1
- export declare const BRANCH_TTL = 1800000;
2
- /** The broadcast the gateway and its tenants share. */
3
- export declare const CHANNEL = "exposition";
4
- /** The replicas of the gateway decide together, whatever context they serve. */
5
- export declare const ATOM_GROUP = "exposition";
6
- /**
7
- * Where JSON-RPC is served, for every procedure at once. Pinned rather than configured: a
8
- * path an application could choose is a path it could collide with a route of its own.
9
- */
10
- export declare const RPC = "/.rpc";
11
- /** Calls one request may carry where the annotation does not say. */
12
- export declare const BATCH = 32;
13
- /**
14
- * Where the Model Context Protocol is served. Pinned for the reason `/.rpc` is: a path an
15
- * application could choose is a path it could collide with a route of its own.
16
- */
17
- export declare const MCP = "/.mcp";
18
- /**
19
- * Where the resource tree and the page that reads it are served. Pinned for the reason
20
- * `/.rpc` is: a path an application could choose is a path it could collide with a route of
21
- * its own. Unlike those two it is not annotated — every entry it carries is what `OPTIONS`
22
- * on that path already answers to the same caller, and what it adds is the enumeration.
23
- */
24
- export declare const DISCOVERY = "/.discovery";
25
- /** Where the gateway serves. */
26
- export declare const PORT = 8000;
27
- /**
28
- * Reserved for the readiness probe. `8001` is the Telemetry readiness probe's, and `toa export`
29
- * refuses a port claimed twice — `toa mono` and a local run put every service in one process.
30
- */
31
- export declare const PROBE = 8004;
32
- /**
33
- * The initial delay of the readiness probe. The server does not sleep for it: whoever
34
- * probes is the one that waits, and doing it here as well only delayed the process twice.
35
- */
36
- export declare const DELAY = 3;
@@ -1,37 +0,0 @@
1
- export const BRANCH_TTL = 1_800_000;
2
- /** The broadcast the gateway and its tenants share. */
3
- export const CHANNEL = 'exposition';
4
- /** The replicas of the gateway decide together, whatever context they serve. */
5
- export const ATOM_GROUP = 'exposition';
6
- /**
7
- * Where JSON-RPC is served, for every procedure at once. Pinned rather than configured: a
8
- * path an application could choose is a path it could collide with a route of its own.
9
- */
10
- export const RPC = '/.rpc';
11
- /** Calls one request may carry where the annotation does not say. */
12
- export const BATCH = 32;
13
- /**
14
- * Where the Model Context Protocol is served. Pinned for the reason `/.rpc` is: a path an
15
- * application could choose is a path it could collide with a route of its own.
16
- */
17
- export const MCP = '/.mcp';
18
- /**
19
- * Where the resource tree and the page that reads it are served. Pinned for the reason
20
- * `/.rpc` is: a path an application could choose is a path it could collide with a route of
21
- * its own. Unlike those two it is not annotated — every entry it carries is what `OPTIONS`
22
- * on that path already answers to the same caller, and what it adds is the enumeration.
23
- */
24
- export const DISCOVERY = '/.discovery';
25
- /** Where the gateway serves. */
26
- export const PORT = 8000;
27
- /**
28
- * Reserved for the readiness probe. `8001` is the Telemetry readiness probe's, and `toa export`
29
- * refuses a port claimed twice — `toa mono` and a local run put every service in one process.
30
- */
31
- export const PROBE = 8004;
32
- /**
33
- * The initial delay of the readiness probe. The server does not sleep for it: whoever
34
- * probes is the one that waits, and doing it here as well only delayed the process twice.
35
- */
36
- export const DELAY = 3; // seconds
37
- //# sourceMappingURL=const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["../source/const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAA;AAEnC,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AAEnC,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAA;AAE1B,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAA;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAA;AAE1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAA;AAEtC,gCAAgC;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAA;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAA;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAA,CAAC,UAAU"}
@@ -1,6 +0,0 @@
1
- import { type Dependency } from '@toa.io/operations';
2
- import { type Annotation } from './Annotation.js';
3
- /** Where Toa's release publishes this service's image. An application takes it
4
- * instead of building one when its context says `registry.services: published`. */
5
- export declare const image = "ghcr.io/toa-io/extension-exposition-gateway";
6
- export declare function deployment(_: unknown, annotation?: Annotation): Dependency;
@@ -1,76 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
- import assert from 'node:assert';
3
- import * as schemas from './schemas.js';
4
- import { shortcuts } from './shortcuts.js';
5
- import { components } from './Composition.js';
6
- import { parse } from './RTD/syntax/index.js';
7
- import { DELAY, PORT, PROBE } from './const.js';
8
- /** Where Toa's release publishes this service's image. An application takes it
9
- * instead of building one when its context says `registry.services: published`. */
10
- export const image = 'ghcr.io/toa-io/extension-exposition-gateway';
11
- export function deployment(_, annotation) {
12
- assert.ok(annotation !== undefined, 'Exposition context annotation is required');
13
- schemas.annotation.validate(annotation);
14
- const labels = components().labels;
15
- const service = {
16
- group: 'exposition',
17
- name: 'gateway',
18
- image,
19
- port: PORT,
20
- version: JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
21
- .version,
22
- variables: [],
23
- components: labels,
24
- resources: annotation.resources,
25
- ingress: { path: '/', hosts: [] },
26
- probe: {
27
- path: '/.ready',
28
- port: PROBE,
29
- delay: DELAY
30
- }
31
- };
32
- if (annotation?.['/'] !== undefined) {
33
- const tree = parse(annotation['/'], shortcuts);
34
- service.variables.push({
35
- name: 'TOA_EXPOSITION',
36
- value: JSON.stringify(tree)
37
- });
38
- }
39
- const { debug, authorities } = annotation;
40
- service.ingress.hosts = Object.values(authorities);
41
- // leaving these undefined lets the context's own ingress section supply them
42
- if (annotation.class !== undefined)
43
- service.ingress.class = annotation.class;
44
- if (annotation.annotations !== undefined)
45
- service.ingress.annotations = annotation.annotations;
46
- if (annotation.service?.annotations !== undefined)
47
- service.annotations = annotation.service.annotations;
48
- const properties = { authorities };
49
- if (debug === true)
50
- properties.debug = true;
51
- if (annotation.protocol !== undefined)
52
- properties.protocol = annotation.protocol;
53
- if (annotation.ip !== undefined)
54
- properties.ip = annotation.ip;
55
- if (annotation.bouncer !== undefined)
56
- properties.bouncer = annotation.bouncer;
57
- if (annotation.oauth !== undefined)
58
- properties.oauth = annotation.oauth;
59
- if (annotation.rpc !== undefined)
60
- properties.rpc = annotation.rpc;
61
- if (annotation.mcp !== undefined)
62
- properties.mcp = annotation.mcp;
63
- service.variables.push({
64
- name: 'TOA_EXPOSITION_PROPERTIES',
65
- value: JSON.stringify(properties)
66
- });
67
- // The identity composition nested in this process connects before route discovery settles,
68
- // so telemetry's probe — which tracks that composition — would report ready too early.
69
- // The gateway answers for itself, on the same port telemetry would have used.
70
- service.variables.push({
71
- name: 'TOA_TELEMETRY_READY',
72
- value: JSON.stringify(false)
73
- });
74
- return { services: [service] };
75
- }
76
- //# sourceMappingURL=deployment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployment.js","sourceRoot":"","sources":["../source/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,MAAM,MAAM,aAAa,CAAA;AAGhC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAE/C;oFACoF;AACpF,MAAM,CAAC,MAAM,KAAK,GAAG,6CAA6C,CAAA;AAElE,MAAM,UAAU,UAAU,CAAC,CAAU,EAAE,UAAuB;IAC5D,MAAM,CAAC,EAAE,CAAC,UAAU,KAAK,SAAS,EAAE,2CAA2C,CAAC,CAAA;IAChF,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAEvC,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC,MAAM,CAAA;IAElC,MAAM,OAAO,GAAY;QACvB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,SAAS;QACf,KAAK;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;aACnF,OAAO;QACV,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,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,EAAE,GAAG,UAAU,CAAC,EAAE,CAAA;IAE9D,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS;QAAE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAA;IAE7E,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS;QAAE,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAA;IAEvE,IAAI,UAAU,CAAC,GAAG,KAAK,SAAS;QAAE,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAA;IAEjE,IAAI,UAAU,CAAC,GAAG,KAAK,SAAS;QAAE,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAA;IAEjE,OAAO,CAAC,SAAU,CAAC,IAAI,CAAC;QACtB,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;KAClC,CAAC,CAAA;IAEF,2FAA2F;IAC3F,uFAAuF;IACvF,8EAA8E;IAC9E,OAAO,CAAC,SAAU,CAAC,IAAI,CAAC;QACtB,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;KAC7B,CAAC,CAAA;IAEF,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAChC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Node } from './RTD/syntax/index.js';
2
- import type { Manifest } from '@toa.io/norm';
3
- export declare function manifest(declaration: object, manifest: Manifest): Node;
@@ -1,39 +0,0 @@
1
- import assert from 'node:assert';
2
- import { parse } from './RTD/syntax/index.js';
3
- import { shortcuts } from './shortcuts.js';
4
- import * as schemas from './schemas.js';
5
- export function manifest(declaration, manifest) {
6
- assert.ok(typeof declaration === 'object' && declaration !== null, 'Exposition declaration must be an object');
7
- declaration = wrap(declaration, manifest.namespace, manifest.name);
8
- const node = parse(declaration, shortcuts);
9
- specify(node, manifest);
10
- schemas.node.validate(node);
11
- return node;
12
- }
13
- function wrap(declaration, namespace, name) {
14
- const path = (namespace === undefined || namespace === 'default' ? '' : '/' + namespace) +
15
- '/' +
16
- name;
17
- return { [path]: declaration };
18
- }
19
- function specify(node, manifest) {
20
- for (const route of node.routes) {
21
- for (const method of route.node.methods)
22
- specifyMethod(method, manifest);
23
- specify(route.node, manifest);
24
- }
25
- }
26
- function specifyMethod(method, manifest) {
27
- if (method.mapping?.endpoint === undefined)
28
- return;
29
- const operation = manifest.operations[method.mapping.endpoint];
30
- assert.ok(operation !== undefined, `Operation '${method.mapping.endpoint}' not found`);
31
- if (method.mapping.query === undefined)
32
- method.mapping.query = operation.query === false ? null : {};
33
- // a page is taken of a collection, and of nothing else: an operation that answers one object
34
- // takes no `omit` and no `limit`, and refuses a request that carries them
35
- method.mapping.paged = operation.type === 'observation' && operation.scope === 'objects';
36
- method.mapping.namespace = manifest.namespace;
37
- method.mapping.component = manifest.name;
38
- }
39
- //# sourceMappingURL=manifest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../source/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,KAAK,EAAsC,MAAM,uBAAuB,CAAA;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAGvC,MAAM,UAAU,QAAQ,CAAC,WAAmB,EAAE,QAAkB;IAC9D,MAAM,CAAC,EAAE,CACP,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,IAAI,EACvD,0CAA0C,CAC3C,CAAA;IAED,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAElE,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;IAE1C,OAAO,CAAC,IAAI,EAAE,QAAQ,C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1E,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,KAAK,aAAa,IAAI,SAAS,CAAC,KAAK,KAAK,SAAS,CAAA;IAExF,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAA;IAC7C,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAA;AAC1C,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { Query } from './HTTP/index.js';
2
- import type { Node } from './RTD/index.js';
3
- import type { Call } from './RPC/types.js';
4
- import type { Schema } from '@toa.io/schemas';
5
- import type { Annotation } from './Annotation.js';
6
- export declare const querystring: Schema<Query>;
7
- export declare const annotation: Schema<Annotation>;
8
- export declare const node: Schema<Node>;
9
- export declare const call: Schema<Call>;
@@ -1,9 +0,0 @@
1
- import { resolve } from 'node:path';
2
- import * as schemas from '@toa.io/schemas';
3
- const path = resolve(import.meta.dirname, '../schemas');
4
- const namespace = schemas.namespace(path);
5
- export const querystring = namespace.schema('querystring');
6
- export const annotation = namespace.schema('annotation');
7
- export const node = namespace.schema('node');
8
- export const call = namespace.schema('call');
9
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAO1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;AACvD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAkB,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,UAAU,GAAuB,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,IAAI,GAAiB,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,IAAI,GAAiB,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { Shortcuts } from './RTD/syntax/index.js';
2
- /** What a directive may be written as, where the family is implied. */
3
- export declare const shortcuts: Shortcuts;
@@ -1,13 +0,0 @@
1
- /** What a directive may be written as, where the family is implied. */
2
- export const shortcuts = new Map([
3
- ['anonymous', 'auth:anonymous'],
4
- ['anyone', 'auth:anyone'],
5
- ['id', 'auth:id'],
6
- ['role', 'auth:role'],
7
- ['rule', 'auth:rule'],
8
- ['incept', 'auth:incept'],
9
- ['input', 'io:input'],
10
- ['output', 'io:output'],
11
- ['languages', 'map:languages']
12
- ]);
13
- //# sourceMappingURL=shortcuts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shortcuts.js","sourceRoot":"","sources":["../source/shortcuts.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,MAAM,CAAC,MAAM,SAAS,GAAc,IAAI,GAAG,CAAC;IAC1C,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAC/B,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,IAAI,EAAE,SAAS,CAAC;IACjB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,OAAO,EAAE,UAAU,CAAC;IACrB,CAAC,QAAQ,EAAE,WAAW,CAAC;IACvB,CAAC,WAAW,EAAE,eAAe,CAAC;CAC/B,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- import{B as e,H as t,U as n,V as r,_t as i,at as a,n as o,rt as s,t as c}from"./DjIYL2zC.js";var l=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},u=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},d=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function f(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function p(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function ee(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ue({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function de(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function fe(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_b4wcb9?.base??`/.discovery`,pe=globalThis.__sveltekit_b4wcb9?.assets??x??``,me=`1788806468772`,he=`sveltekit:snapshot`,ge=`sveltekit:scroll`,_e=`sveltekit:states`,ve=`sveltekit:pageurl`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ye=location.origin;function be(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var xe={...w,"":w.hover};function Se(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ce(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Se(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ye&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Se(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:xe[r??`off`],preload_data:xe[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Te(e){let t=i(e),n=!0;function r(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:a,subscribe:o}}var Ee={v:h};function De(){let{set:e,subscribe:t}=i(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${pe}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==me;return r&&(e(!0),Ee.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function O(e,t,n){return e.origin!==ye||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Oe(e){}var ke=2**32-1-1,Ae=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function je(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getPrototypeOf(t)===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Ae}function Me(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ne(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)}function Pe(e){return!(!Number.isInteger(e)||e<0||e>ke)}function Fe(e){if(e.length===0||e.length>1&&e.charCodeAt(0)===48)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return Pe(+e)}function Ie(e){for(var t=e.length-1;t>=0&&!Fe(e[t]);t--);return t+1}function Le(e){let t=Object.keys(e);return t.length=Ie(t),t}Uint8Array.fromBase64,typeof process==`object`&&process.versions?.node;var Re=Object.freeze({kind:`not-plain`}),ze=Object.freeze({kind:`symbol-keys`});Object.freeze({identify:e=>e,typeOf:e=>e===null?`null`:typeof e,toPrimitive:e=>e,tagOf:e=>Me(e),isThenable:e=>typeof e.then==`function`,toPromise:e=>Promise.resolve(e),unbox:e=>e.valueOf(),toISOString:e=>isNaN(e.getDate())?``:e.toISOString(),toStringValue:e=>e.toString(),regExpInfo:e=>({source:e.source,flags:e.flags}),valuesOf:e=>e,entriesOf:e=>e,viewInfo:e=>({buffer:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength,length:e.length,bufferByteLength:e.buffer.byteLength}),toArrayBuffer:e=>e,lengthOf:e=>e.length,hasOwn:(e,t)=>Object.hasOwn(e,t),indicesOf:e=>Le(e),shapeOf:e=>je(e)?Ne(e).length>0?ze:{kind:Object.getPrototypeOf(e)===null?`null-proto`:`plain`,keys:Object.keys(e)}:Re,get:(e,t)=>e[t]}),Object.freeze({fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e===`URL`?new URL(t):e===`URLSearchParams`?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,n,r)=>{let i=globalThis[e];return n===void 0?new i(t):new i(t,n,r)},box:e=>Object(e),createArray:e=>Array(e),createSparseArray:e=>{let t=[];return t[ke]=void 0,delete t[ke],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,n)=>{e[t]=n},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,n)=>{e.set(t,n)}});var Be=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Be],[...new Set([...Be])];function Ve(e){return e.filter(e=>e!=null)}function k(e,t){return e+`/`+t}function He(e){return e instanceof l||e instanceof d?e.status:500}function Ue(e){return e instanceof d?e.text:`Internal Error`}var A,j,We,Ge=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),Ke=`a:`;Ge?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ke)},j={current:null},We={current:!1}):(A=new class{#e=a({});get data(){return e(this.#e)}set data(e){s(this.#e,e)}#t=a(null);get form(){return e(this.#t)}set form(e){s(this.#t,e)}#n=a(null);get error(){return e(this.#n)}set error(e){s(this.#n,e)}#r=a({});get params(){return e(this.#r)}set params(e){s(this.#r,e)}#i=a({id:null});get route(){return e(this.#i)}set route(e){s(this.#i,e)}#a=a({});get state(){return e(this.#a)}set state(e){s(this.#a,e)}#o=a(-1);get status(){return e(this.#o)}set status(e){s(this.#o,e)}#s=a(new URL(Ke));get url(){return e(this.#s)}set url(e){s(this.#s,e)}},j=new class{#e=a(null);get current(){return e(this.#e)}set current(e){s(this.#e,e)}},We=new class{#e=a(!1);get current(){return e(this.#e)}set current(e){s(this.#e,e)}},Ee.v=()=>We.current=!0);function qe(e){Object.assign(A,e)}var{onMount:Je,tick:Ye}=c,Xe=n??(e=>e()),Ze=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=de(`sveltekit:scroll`)??{},P=de(`sveltekit:snapshot`)??{},F={url:Te({}),page:Te({}),navigating:i(null),updated:De()};function Qe(e){N[e]=T()}function $e(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function et(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var tt,nt,L,R,rt,z,it={},at={},B=[],V=[],H=null;function ot(){H?.fork?.then(e=>e?.discard()),H=null,Q={element:void 0,href:void 0}}var st=new Map,ct=new Set,lt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},ut=!1,G=!1,dt=!0,K=!1,q=!1,ft=!1,pt=!1,mt,J,Y,X,ht=new Set,gt=new Map,_t=new Map;async function vt(e,t,n){if(globalThis.__sveltekit_b4wcb9.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_b4wcb9.data;for(let t in e)it[t]=e[t];for(let e in n)it[e]=n[e];for(let e in r)it[e]=r[e];for(let e in t)at[e]=t[e]}document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),tt=ue(e),R=document.documentElement,rt=t,nt=e.nodes[0],L=e.nodes[1],nt(),L(),J=history.state?.[S],Y=history.state?.[C],J||(J=Y=Date.now(),history.replaceState({...history.state,[S]:J,[C]:Y},``));let r=N[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Yt(rt,n)):(await Z({type:`enter`,url:be(z.hash?tn(new URL(location.href)):location.href),replace_state:!0}),i()),Jt()}function yt(){B.length=0,pt=!1}function bt(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function xt(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function St(){Qe(J),fe(ge,N),bt(Y),fe(he,P)}async function Ct(e,n,r,i){let a,o;n.invalidateAll&&ot(),await Z({type:`goto`,url:be(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){pt=!0,a=new Set;for(let[e,t]of gt)for(let[n,r]of t)r.resource?.reset(),a.add(k(e,n));o=new Set;for(let[e,t]of _t)for(let n of t.keys())o.add(k(e,n))}n.invalidate&&n.invalidate.forEach(Kt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of gt)for(let[n,{resource:r}]of t)a?.has(k(e,n))&&r.start();for(let[e,t]of _t)for(let[n,{resource:r}]of t)o?.has(k(e,n))&&r.reconnect()})}async function wt(e){if(e.id!==H?.id){ot();let t={};ht.add(t),H={id:e.id,token:t,promise:Pt({...e,preload:t}).then(e=>(ht.delete(t),e.type===`loaded`&&e.state.error&&ot(),e)),fork:null}}return H.promise}async function Tt(e){let t=(await Rt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function Et(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},qe(e.props.page),mt=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:N[J]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}xt(Y),G=!0}async function Dt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=f(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Ve(n).map(e=>e.node.component),page:en(A)}};s!==void 0&&(l.props.form=s);let u={},d=!A,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==A.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:A.data}),l}async function Ot({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function kt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:G?ne(r,i.href,t):y(r,t)}}function At(e,t,n,r,i,a){if(pt)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function jt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Mt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Nt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:en(A),constructors:[]}}}async function Pt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return ht.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:c}=i,d=[...s,c];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Bt(W.url):!1,p=W.route?i.id!==W.route.id:!1,ee=Mt(W.url,n),m=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!At(m,p,f,ee,a.universal?.uses,r)?a:(m=!0,Ot({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:jt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof u)return{type:`redirect`,location:t.location};if(a&&ht.has(a))return Nt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=He(t),c;if(t instanceof l)c=t.body;else{if(await F.updated.check())return await et(),await I(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await Ft(e,_,o);return d?Dt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:c,route:i}):await Ht(n,{id:i.id},c,s)}else _.push(void 0);return Dt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Ft(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function It({status:e,error:t,url:n,route:r}){let i={};try{return Dt({url:n,params:i,branch:[await Ot({loader:nt,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:jt(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof u){await Ct(new URL(t.location,location.href),{},0);return}let a=await z.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Lt(e){let t=e.href;if(st.has(t))return st.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>kt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();st.set(t,r),n=await r}catch{st.delete(t);return}return n}async function Rt(e,t){if(e&&!O(e,x,z.hash)){let n=await Lt(e);if(!n)return;let r=zt(n);for(let n of tt){let i=n.exec(r);if(i)return{id:Bt(e),invalidating:t,route:n,params:ee(i),url:e}}}}function zt(e){return p(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Bt(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Vt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=$t(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||ct.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:n,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:u={},accept:f=h,block:p=h,event:ee}){let m=X;X=u;let g=await Rt(n,!1),_=e===`enter`?$t(W,g,n,e):Vt({url:n,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:ee});if(!_){p(),X===u&&(X=m);return}let te=J,v=Y;f(),K=!0,G&&_.navigation.type!==`enter`&&F.navigating.set(j.current=_.navigation);let y=g&&await Pt(g);if(!y){if(O(n,x,z.hash))return await I(n,s);y=await Ht(n,{id:null},await $(new d(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,s)}if(n=g?.url||n,X!==u){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:e,url:new URL(y.location,n),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:u}),_.fulfil(void 0);return}if(y=await It({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await F.updated.check())return await et(),await I(n,s);if(yt(),Qe(te),bt(v),y.props.page.url.pathname!==n.pathname&&(n.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:J+=e,[C]:Y+=e,[_e]:c};(s?history.replaceState:history.pushState).call(history,t,``,n),s||$e(J,Y)}let ne=g&&H?.id===g.id?H.fork:null;H?.fork&&!ne?ot():(H=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(G){let e=(await Promise.all(Array.from(lt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let t=_.navigation.to;W={...y.state,nav:{params:t.params,route:t.route,url:t.url}},y.props.page&&(y.props.page.url=n),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(M=null,mt.$set(y.props),M&&Object.assign(y.props.page,M),qe(y.props.page),b=r?.()),ft=!0}else await Et(y,rt,!1);let{activeElement:re}=document;if(await b,await t(),await t(),X!==u){_.reject(Error(`navigation aborted`));return}y.props.page&&M&&Object.assign(y.props.page,M);let ie=null;if(dt){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=n.hash&&document.getElementById(nn(n)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Qt(n,!ie),dt=!0,K=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),e===`popstate`&&xt(Y),F.navigating.set(j.current=null)}async function Ht(e,t,n,r,i){return e.origin===ye&&e.pathname===location.pathname&&!ut?await It({status:r,error:n,url:e,route:t}):await I(e,i)}var Q={element:void 0,href:void 0};function Ut(){let e,t;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}R.addEventListener(`mousedown`,n),R.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(Tt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ce(e,R),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=we(r,x,z.hash);if(o||s)return;let c=D(r),l=a&&Bt(W.url)===Bt(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await Rt(a,!1);if(!e)return;wt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,Tt(a))}}function a(){r.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:i}=we(e,x,z.hash);if(n||i)continue;let a=D(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&Tt(t))}}U.add(a),a()}function $(e,t){if(e instanceof l)return e.body;let n=He(e),r=Ue(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Wt(e,t){Je(()=>(e.add(t),()=>{e.delete(t)}))}function Gt(e){Wt(lt,e)}function Kt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function qt(e,t){let n={[S]:J,[C]:Y,[ve]:A.url.href,[_e]:t};history.replaceState(n,``,be(e)),A.state=t,mt.$set({page:Xe(()=>en(A))})}function Jt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(St(),!K){let e=$t(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};ct.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&St()}),navigator.connection?.saveData||Ut(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ce(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=we(n,x,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Vt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Qe(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,x,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Zt){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(X={},n===J)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===Y&&(ft||s)){i!==A.state&&(A.state=i),e(a),N[J]=T(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),z.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[S]:++J,[C]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ze.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(j.current=null)});function e(e){W.url=A.url=e,F.page.set(en(A)),F.page.notify()}}async function Yt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){ut=!0;let l=new URL(location.href),d;({params:i={},route:a={id:null}}=await Rt(l,!1)||{}),d=tt.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Xt(r.uses)),Ot({loader:z.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:jt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await Dt({url:l,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof u)return await I(new URL(t.location,location.href));f=await It({status:He(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await Et(f,e,p))}function Xt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Zt=!1;function Qt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=nn(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Zt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Zt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function $t(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function en(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function tn(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function nn(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{A as a,j as i,qt as n,Oe as o,vt as r,me as s,Gt as t};
@@ -1 +0,0 @@
1
- import{o as e,r as t}from"../chunks/CiKbPLyY.js";export{e as load_css,t as start};