@pie-players/pie-section-player 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -134
- package/dist/browser/assets/{evaluation-worker-DkU_wGh3.js → evaluation-worker-CORp9m0K.js} +39245 -38027
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -1
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -1
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -1
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -1
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -1
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -1
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -1
- package/dist/browser/chunks/browser-a3c32178.js +17 -16
- package/dist/browser/chunks/calculator-element-271c142f.js +7 -3
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -1
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
- package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -1
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -1
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -1
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -1
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-59132a53.js +1 -1
- package/dist/browser/chunks/dist-60d7afef.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -1
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -1
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -1
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -1
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -1
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -1
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -1
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -1
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -1
- package/dist/browser/chunks/logger-8b07fb72.js +1 -1
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -1
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/{mathjax-D2JHb_R_-64780dc5.js → mathjax-BKrHE4xs-3ca05bf6.js} +41 -41
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -1
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -1
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -1
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -1
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/{runtime-C7H1jS4E-64772f5e.js → runtime-wcU7KOFU-ac86d7b8.js} +401 -278
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -1
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -1
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -1
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -1
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -1
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -1
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -1
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -1
- package/dist/browser/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-0162a7a9.js} +18 -18
- package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
- package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
- package/dist/browser/chunks/sre-locales-112320af.js +1 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -1
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -1
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +7 -6
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +4 -4
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +2 -2
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +1 -1
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +2 -2
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +1 -1
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +1 -1
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +7 -7
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -1
- package/dist/browser/pie-section-player.js +199 -85
- package/dist/chunks/nl-NL-364d61b9.js +1 -24
- package/dist/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-engine-jd8cc08x-42d270e5.js} +1 -1
- package/dist/components/shared/composition.d.ts +3 -1
- package/dist/components/shared/framework-error-latch.d.ts +32 -0
- package/dist/components/shared/host-element.d.ts +10 -0
- package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
- package/dist/components/shared/layout-host-methods.d.ts +12 -27
- package/dist/components/shared/missing-tool-providers.d.ts +8 -8
- package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +5 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
- package/dist/components/shared/section-player-layout-context.d.ts +77 -0
- package/dist/components/shared/section-player-own-event.d.ts +10 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
- package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
- package/dist/components/shared/section-player-view-state.d.ts +6 -1
- package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
- package/dist/contracts/host-hooks.d.ts +0 -7
- package/dist/contracts/runtime-host-contract.d.ts +0 -5
- package/dist/controllers/SectionController.d.ts +1 -0
- package/dist/controllers/types.d.ts +8 -1
- package/dist/item-section/index.d.ts +22 -0
- package/dist/item-section/index.js +37 -0
- package/dist/pie-section-player.d.ts +4 -6
- package/dist/pie-section-player.js +19437 -19877
- package/dist/policies/index.d.ts +1 -19
- package/dist/policies/index.js +6 -14
- package/dist/policies/types.d.ts +0 -4
- package/package.json +13 -53
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +0 -1
- package/dist/browser/chunks/nds-icon-button-d602f784.js +0 -194
- package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +0 -9
- package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +0 -9
- package/dist/components/item-shell-element.d.ts +0 -1
- package/dist/components/shared/shell-registration.d.ts +0 -55
- package/dist/contracts/layout-contract.d.ts +0 -17
- package/dist/contracts/layout-contract.js +0 -0
- package/dist/contracts/layout-parity-metadata.d.ts +0 -4
- package/dist/contracts/layout-parity-metadata.js +0 -87
- package/dist/contracts/public-events.d.ts +0 -92
- package/dist/contracts/public-events.js +0 -12
- package/dist/policies/guards.d.ts +0 -2
- /package/dist/browser/chunks/{ItemToolBar-wr2myaah-2ce4b643.js → ItemToolBar-jx38w99s-58defccc.js} +0 -0
- /package/dist/chunks/{ItemToolBar-wr2myaah-1287ba31.js → ItemToolBar-jx38w99s-1287ba31.js} +0 -0
package/dist/policies/index.d.ts
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { SectionPlayerPolicies } from './types.js';
|
|
2
|
-
export type {
|
|
2
|
+
export type { SectionPlayerPolicies, SectionPlayerPreloadPolicy, SectionPlayerReadinessPolicy, SectionPlayerTelemetryPolicy, } from './types.js';
|
|
3
3
|
export declare const DEFAULT_SECTION_PLAYER_POLICIES: SectionPlayerPolicies;
|
|
4
|
-
/**
|
|
5
|
-
* Whether the section-level element preload pipeline should run. Defaults to
|
|
6
|
-
* `true` when the policy is unset or partially set so existing hosts are
|
|
7
|
-
* unaffected. Hosts opt out by passing `policies.preload.enabled === false`,
|
|
8
|
-
* which short-circuits `warmupSectionElements` in `SectionItemsPane`. Items
|
|
9
|
-
* still mount and item-players register their own elements on demand.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isPreloadEnabled(policies: Partial<SectionPlayerPolicies> | null | undefined): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the section-player layout elements should attach the
|
|
14
|
-
* instrumentation event bridge. Defaults to `true` when the policy is unset
|
|
15
|
-
* or partially set. Hosts opt out by passing
|
|
16
|
-
* `policies.telemetry.enabled === false`, which skips
|
|
17
|
-
* `attachInstrumentationEventBridge` setup entirely. Hosts that want a
|
|
18
|
-
* different shape of opt-out can still supply a custom
|
|
19
|
-
* `instrumentationProvider`.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isTelemetryEnabled(policies: Partial<SectionPlayerPolicies> | null | undefined): boolean;
|
|
22
4
|
/**
|
|
23
5
|
* The complete policy set a layout runs under: each field the host leaves
|
|
24
6
|
* unset, including a whole missing section of a partial object, takes its
|
package/dist/policies/index.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var d = {
|
|
2
2
|
readiness: { mode: "progressive" },
|
|
3
3
|
preload: { enabled: !0 },
|
|
4
4
|
telemetry: { enabled: !0 }
|
|
5
5
|
};
|
|
6
|
-
function d(e) {
|
|
7
|
-
return e?.preload?.enabled !== !1;
|
|
8
|
-
}
|
|
9
6
|
function a(e) {
|
|
10
|
-
return e?.telemetry?.enabled !== !1;
|
|
11
|
-
}
|
|
12
|
-
function t(e) {
|
|
13
7
|
const r = e?.readiness?.mode;
|
|
14
8
|
return {
|
|
15
|
-
readiness: { mode: r === "strict" || r === "progressive" ? r :
|
|
16
|
-
preload: { enabled:
|
|
17
|
-
telemetry: { enabled:
|
|
9
|
+
readiness: { mode: r === "strict" || r === "progressive" ? r : d.readiness.mode },
|
|
10
|
+
preload: { enabled: e?.preload?.enabled !== !1 },
|
|
11
|
+
telemetry: { enabled: e?.telemetry?.enabled !== !1 }
|
|
18
12
|
};
|
|
19
13
|
}
|
|
20
14
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
a as isTelemetryEnabled,
|
|
24
|
-
t as resolveSectionPlayerPolicies
|
|
15
|
+
d as DEFAULT_SECTION_PLAYER_POLICIES,
|
|
16
|
+
a as resolveSectionPlayerPolicies
|
|
25
17
|
};
|
package/dist/policies/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SectionPlayerReadinessChangeDetail } from '../contracts/public-events.js';
|
|
2
1
|
export type SectionPlayerReadinessPolicy = {
|
|
3
2
|
mode: "progressive" | "strict";
|
|
4
3
|
};
|
|
@@ -13,6 +12,3 @@ export type SectionPlayerPolicies = {
|
|
|
13
12
|
preload: SectionPlayerPreloadPolicy;
|
|
14
13
|
telemetry: SectionPlayerTelemetryPolicy;
|
|
15
14
|
};
|
|
16
|
-
export interface ReadinessPolicyAdapter {
|
|
17
|
-
computeFinalReady(detail: SectionPlayerReadinessChangeDetail): boolean;
|
|
18
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-section-player",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web component for rendering QTI 3.0 assessment sections with passages and items",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,54 +29,10 @@
|
|
|
29
29
|
"types": "./dist/pie-section-player.d.ts",
|
|
30
30
|
"import": "./dist/pie-section-player.js"
|
|
31
31
|
},
|
|
32
|
-
"./components/section-player-vertical-element": {
|
|
33
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
34
|
-
"import": "./dist/pie-section-player.js"
|
|
35
|
-
},
|
|
36
|
-
"./components/section-player-tabbed-element": {
|
|
37
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
38
|
-
"import": "./dist/pie-section-player.js"
|
|
39
|
-
},
|
|
40
|
-
"./components/section-player-shell-element": {
|
|
41
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
42
|
-
"import": "./dist/pie-section-player.js"
|
|
43
|
-
},
|
|
44
|
-
"./components/section-player-item-card-element": {
|
|
45
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
46
|
-
"import": "./dist/pie-section-player.js"
|
|
47
|
-
},
|
|
48
|
-
"./components/section-player-passage-card-element": {
|
|
49
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
50
|
-
"import": "./dist/pie-section-player.js"
|
|
51
|
-
},
|
|
52
|
-
"./components/section-player-items-pane-element": {
|
|
53
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
54
|
-
"import": "./dist/pie-section-player.js"
|
|
55
|
-
},
|
|
56
|
-
"./components/section-player-passages-pane-element": {
|
|
57
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
58
|
-
"import": "./dist/pie-section-player.js"
|
|
59
|
-
},
|
|
60
|
-
"./components/section-player-kernel-host-element": {
|
|
61
|
-
"types": "./dist/pie-section-player.d.ts",
|
|
62
|
-
"import": "./dist/pie-section-player.js"
|
|
63
|
-
},
|
|
64
|
-
"./contracts/layout-contract": {
|
|
65
|
-
"types": "./dist/contracts/layout-contract.d.ts",
|
|
66
|
-
"import": "./dist/contracts/layout-contract.js"
|
|
67
|
-
},
|
|
68
|
-
"./contracts/public-events": {
|
|
69
|
-
"types": "./dist/contracts/public-events.d.ts",
|
|
70
|
-
"import": "./dist/contracts/public-events.js"
|
|
71
|
-
},
|
|
72
32
|
"./contracts/runtime-host-contract": {
|
|
73
33
|
"types": "./dist/contracts/runtime-host-contract.d.ts",
|
|
74
34
|
"import": "./dist/contracts/runtime-host-contract.js"
|
|
75
35
|
},
|
|
76
|
-
"./contracts/layout-parity-metadata": {
|
|
77
|
-
"types": "./dist/contracts/layout-parity-metadata.d.ts",
|
|
78
|
-
"import": "./dist/contracts/layout-parity-metadata.js"
|
|
79
|
-
},
|
|
80
36
|
"./contracts/host-hooks": {
|
|
81
37
|
"types": "./dist/contracts/host-hooks.d.ts",
|
|
82
38
|
"import": "./dist/contracts/host-hooks.js"
|
|
@@ -84,6 +40,10 @@
|
|
|
84
40
|
"./policies": {
|
|
85
41
|
"types": "./dist/policies/index.d.ts",
|
|
86
42
|
"import": "./dist/policies/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./item-section": {
|
|
45
|
+
"types": "./dist/item-section/index.d.ts",
|
|
46
|
+
"import": "./dist/item-section/index.js"
|
|
87
47
|
}
|
|
88
48
|
},
|
|
89
49
|
"files": [
|
|
@@ -92,24 +52,24 @@
|
|
|
92
52
|
"scripts": {
|
|
93
53
|
"build": "vite build && vite build --config vite.config.browser.ts",
|
|
94
54
|
"dev": "vite build --watch",
|
|
95
|
-
"typecheck": "tsc --noEmit",
|
|
55
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.tests.json",
|
|
96
56
|
"check": "svelte-check --tsconfig ./tsconfig.svelte-check.json --compiler-warnings options_missing_custom_element:ignore",
|
|
97
57
|
"lint": "biome lint .",
|
|
98
58
|
"test": "bun test"
|
|
99
59
|
},
|
|
100
60
|
"dependencies": {
|
|
101
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
102
|
-
"@pie-players/pie-default-tool-loaders": "0.3.
|
|
103
|
-
"@pie-players/pie-item-player": "0.3.
|
|
104
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
61
|
+
"@pie-players/pie-assessment-toolkit": "0.3.75",
|
|
62
|
+
"@pie-players/pie-default-tool-loaders": "0.3.75",
|
|
63
|
+
"@pie-players/pie-item-player": "0.3.75",
|
|
64
|
+
"@pie-players/pie-players-shared": "0.3.75",
|
|
105
65
|
"speech-rule-engine": "5.0.0-rc.4"
|
|
106
66
|
},
|
|
107
67
|
"devDependencies": {
|
|
108
68
|
"@axe-core/playwright": "^4.13.0",
|
|
109
69
|
"@biomejs/biome": "^2.5.15",
|
|
110
70
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
111
|
-
"@pie-players/pie-context": "0.3.
|
|
112
|
-
"@pie-players/pie-theme": "0.3.
|
|
71
|
+
"@pie-players/pie-context": "0.3.75",
|
|
72
|
+
"@pie-players/pie-theme": "0.3.75",
|
|
113
73
|
"@playwright/test": "^1.63.0",
|
|
114
74
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
115
75
|
"@types/node": "^26.6.4",
|
|
@@ -117,7 +77,7 @@
|
|
|
117
77
|
"svelte-check": "^4.7.6",
|
|
118
78
|
"typescript": "^5.9.3",
|
|
119
79
|
"vite": "^8.3.2",
|
|
120
|
-
"vite-plugin-dts": "^5.1.
|
|
80
|
+
"vite-plugin-dts": "^5.1.2"
|
|
121
81
|
},
|
|
122
82
|
"homepage": "https://github.com/pie-framework/pie-players/tree/master/packages/section-player#readme",
|
|
123
83
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),d=/^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/,i={delivery:"",author:"-config",print:"-print"},u=(e,r="custom element tag")=>{if(!e||typeof e!="string")throw new Error(`Invalid ${r}: expected a non-empty string`);const t=e.trim();if(!t)throw new Error(`Invalid ${r}: tag is empty`);if(t!==t.toLowerCase())throw new Error(`Invalid ${r} "${t}": custom element names must be lowercase`);if(!t.includes("-"))throw new Error(`Invalid ${r} "${t}": custom element names must include a hyphen`);if(s.has(t))throw new Error(`Invalid ${r} "${t}": this name is reserved by the HTML spec`);if(!d.test(t))throw new Error(`Invalid ${r} "${t}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);return t},f=(e,r,t)=>`${e}${t??(i[r]!==void 0?i[r]:"")}`,c=e=>typeof DOMException<"u"&&e instanceof DOMException?e.name==="NotSupportedError"||e.code===DOMException.NOT_SUPPORTED_ERR:(typeof e=="object"&&e!==null&&"name"in e?String(e.name):"")==="NotSupportedError",l=(e,r,t="custom element tag",n={})=>{const a=u(e,t);if(customElements.get(a))return{outcome:"already-defined",tagName:a};try{return customElements.define(a,r),{outcome:"defined",tagName:a}}catch(o){if(!c(o))return{outcome:"error",tagName:a,error:o};if(customElements.get(a))return{outcome:"already-defined",tagName:a};if(!n.allowWrappedFallback)return{outcome:"error",tagName:a,error:o};try{return customElements.define(a,class extends r{}),{outcome:"defined-wrapped",tagName:a}}catch(m){return{outcome:"wrapped-error",tagName:a,error:m}}}},p=(e,r,t="custom element tag")=>{const n=l(e,r,t);if(n.outcome==="error"||n.outcome==="wrapped-error")throw n.error;return{status:n.outcome==="already-defined"?"already-defined":"defined",tagName:n.tagName}};export{f as n,u as r,p as t};
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
var z=t=>Array.isArray(t)&&t.length>0;function gt(t){return t.kind==="passage"?{ownerKind:"passage",assessmentId:t.assessmentId,sectionId:t.sectionId,passageId:t.canonicalItemId||t.itemId}:{ownerKind:"itemModel",assessmentId:t.assessmentId,sectionId:t.sectionId,itemId:t.itemId,canonicalItemId:t.canonicalItemId||t.itemId}}function $t(t,e){if(!t)return[];const s=gt(e),r=[];if(z(t.accessibilityCatalogs)&&r.push({context:s,catalogs:t.accessibilityCatalogs}),z(t.config?.extractedCatalogs)&&r.push({context:s,catalogs:t.config.extractedCatalogs}),e.kind==="passage"||s.ownerKind!=="itemModel")return r;for(const i of t.config?.models??[])z(i.accessibilityCatalogs)&&r.push({context:{...s,modelId:i.id},catalogs:i.accessibilityCatalogs});return r}function ne(t,e){const s=$t(t,{kind:e,itemId:""});try{return JSON.stringify(s.map(r=>[r.context.modelId??null,r.catalogs]))}catch{return null}}var ae=Promise.resolve(),K=t=>!!t&&typeof t=="object"&&!Array.isArray(t),J=t=>typeof t=="string"&&t.trim()?t.trim():void 0,_t=t=>{if(!K(t))return;const e=J(t.domain),s=J(t.style),r=K(t.engineOptions)?t.engineOptions:void 0;if(!(!e&&!s&&!r))return{...e?{domain:e}:{},...s?{style:s}:{},...r?{engineOptions:r}:{}}},At=new Set(["reserved-row","expanding-row","floating-overlay","left-aligned"]),U=t=>t&&typeof t=="object"?t:{},St=t=>t==="polly"||t==="google"||t==="server",u=(t,e)=>t===void 0?e:t,ct=(t,e="left-aligned")=>typeof t=="string"&&At.has(t)?t:e,le=Object.freeze([.8,1.25]),Z=Object.freeze([{rate:.8,label:"Slow",ariaLabel:"Slow speed"},{rate:1,label:"Normal",ariaLabel:"Normal speed",default:!0},{rate:1.25,label:"Fast",ariaLabel:"Fast speed"}]),G=t=>{if(!(typeof t!="number"||!Number.isFinite(t)||t<=0))return Math.round(t*100)/100},Q=t=>{if(typeof t!="string")return;const e=t.trim();return e.length?e:void 0},Y=t=>`${t}x`,ht=(t,e)=>t.toLowerCase()==="normal"?"Normal speed":e?`Speed ${t}`:`${t} speed`,Et=(t,e,s)=>e?e.toLowerCase().includes(t.toLowerCase())?e:`${t} ${e}`:ht(t,s),wt=t=>{const e=Array.isArray(t)?t:[...Z];if(e.length===0)return[];const s=new Set,r=[];for(const o of e){const a=U(o),l=G(typeof o=="number"?o:a.rate);if(l===void 0||s.has(l))continue;s.add(l);const b=l===1?"Normal":Y(l),c=typeof o=="number"?b:Q(a.label)||b,d=typeof o=="number"?l===1?"Normal speed":ht(c,!0):Et(c,Q(a.ariaLabel),c===b);r.push({rate:l,label:c,ariaLabel:d,isDefault:!1,requestedDefault:a.default===!0||a.isDefault===!0})}if(!r.length)return wt(Z);if(!s.has(1)){const o={rate:1,label:"Normal",ariaLabel:"Normal speed",isDefault:!1,requestedDefault:!1},a=r.findIndex(l=>l.rate>1);a>=0?r.splice(a,0,o):r.push(o)}const i=r.findIndex(o=>o.requestedDefault),n=i>=0?i:r.findIndex(o=>o.rate===1);return r.map(({requestedDefault:o,...a},l)=>({...a,isDefault:l===n}))},de=Object.freeze([.8,1,1.25]),xt=t=>{const e={...t,layoutMode:ct(t.layoutMode)},s=t.backend||"browser";if(!St(s))return e;const r={...e,apiEndpoint:u(e.apiEndpoint,"/api/tts"),transportMode:u(e.transportMode,"pie"),endpointValidationMode:u(e.endpointValidationMode,"voices"),validateEndpoint:u(e.validateEndpoint,!0),includeAuthOnAssetFetch:u(e.includeAuthOnAssetFetch,!1),rate:u(e.rate,1),language:u(e.language,"en-US")};return s==="polly"?{...r,defaultVoice:u(r.defaultVoice,"Joanna"),engine:u(r.engine,"neural"),format:u(r.format,"mp3"),speechMarksMode:u(r.speechMarksMode,"word+sentence")}:s==="google"?{...r,defaultVoice:u(r.defaultVoice,"en-US-Wavenet-A")}:r},ce=t=>{const e=U(t),s=U(e.settings),{provider:r,...i}={...e,...s};return xt({...i,...typeof r=="string"?{provider:r}:{}})},Ot=t=>t.backend||"browser",Ct=(t,e)=>e==="polly"||e==="google"?e:t.serverProvider||t.provider,Tt=(t,e)=>t.transportMode||(e==="custom"?"custom":"pie"),he=t=>{const e=Ot(t),s=Ct(t,e),r=Tt(t,s),i=_t(t.mathSpeech);return{voice:t.defaultVoice,rate:t.rate,pitch:t.pitch,providerOptions:{...U(t.providerOptions),...t.language?{locale:t.language}:{},...e==="polly"&&t.engine?{engine:t.engine}:{},...e==="polly"&&typeof t.sampleRate=="number"?{sampleRate:t.sampleRate}:{},...e==="polly"&&t.format?{format:t.format}:{},...e==="polly"?{speechMarkTypes:t.speechMarksMode==="word+sentence"?["word","sentence"]:["word"]}:{},...r==="custom"&&typeof t.cache=="boolean"?{cache:t.cache}:{},...r==="custom"&&t.speedRate?{speedRate:t.speedRate}:{},...r==="custom"&&t.lang_id?{lang_id:t.lang_id}:{},...i?{mathSpeech:i}:{}},apiEndpoint:t.apiEndpoint,provider:s,language:t.language,transportMode:r,endpointMode:t.endpointMode,endpointValidationMode:t.endpointValidationMode,includeAuthOnAssetFetch:t.includeAuthOnAssetFetch,assetOrigins:t.assetOrigins,credentials:t.credentials,headers:t.headers,validateEndpoint:t.validateEndpoint,...typeof t.mathTokenHighlighting=="boolean"?{mathTokenHighlighting:t.mathTokenHighlighting}:{}}},kt=t=>ct(t.layoutMode),ue=t=>{switch(kt(t)){case"reserved-row":return{mount:"before-buttons",controlsRow:{reserveSpace:!0,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!1}};case"expanding-row":return{mount:"before-buttons",controlsRow:{reserveSpace:!1,expandWhenToolActive:!0},headerOverlay:{expandWhenToolActive:!1}};case"floating-overlay":return{mount:"before-buttons",controlsRow:{reserveSpace:!1,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!1}};default:return{mount:"before-buttons",controlsRow:{reserveSpace:!1,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!0}}}},X,R=globalThis,q=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ut=Symbol(),tt=new WeakMap,Pt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(q&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&tt.set(e,t))}return t}toString(){return this.cssText}},Mt=t=>new Pt(typeof t=="string"?t:t+"",void 0,ut),Rt=(t,e)=>{if(q)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=R.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},et=q?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return Mt(s)})(t):t,{is:Ut,defineProperty:Nt,getOwnPropertyDescriptor:It,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ht,getPrototypeOf:Lt}=Object,E=globalThis,st=E.trustedTypes,zt=st?st.emptyScript:"",jt=E.reactiveElementPolyfillSupport,C=(t,e)=>t,N={toAttribute(t,e){switch(e){case Boolean:t=t?zt:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},B=(t,e)=>!Ut(t,e),rt={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:B};(X=Symbol).metadata??(X.metadata=Symbol("metadata")),E.litPropertyMetadata??(E.litPropertyMetadata=new WeakMap);var S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=rt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Nt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:i}=It(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){const o=r?.call(this);i?.call(this,n),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??rt}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const t=Lt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const e=this.properties,s=[...Dt(e),...Ht(e)];for(const r of s)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(et(r))}else t!==void 0&&e.push(et(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Rt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const i=(s.converter?.toAttribute!==void 0?s.converter:N).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:N;this._$Em=r;const o=n.fromAttribute(e,i.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){const r=this.constructor,i=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??B)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,i]of s){const{wrapped:n}=i,o=this[r];n!==!0||this._$AL.has(r)||o===void 0||this.C(r,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[C("elementProperties")]=new Map,S[C("finalized")]=new Map,jt?.({ReactiveElement:S}),(E.reactiveElementVersions??(E.reactiveElementVersions=[])).push("2.1.1");var I=globalThis,D=I.trustedTypes,it=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,pt="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,vt="?"+y,Vt=`<${vt}>`,A=document,k=()=>A.createComment(""),P=t=>t===null||typeof t!="object"&&typeof t!="function",W=Array.isArray,qt=t=>W(t)||typeof t?.[Symbol.iterator]=="function",j=`[
|
|
2
|
-
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,nt=/>/g,$=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),at=/'/g,lt=/"/g,ft=/^(?:script|style|textarea|title)$/i,Bt=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),Wt=Bt(1),w=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),dt=new WeakMap,_=A.createTreeWalker(A,129);function bt(t,e){if(!W(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(e):e}var Ft=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=O;for(let a=0;a<s;a++){const l=t[a];let b,c,d=-1,v=0;for(;v<l.length&&(o.lastIndex=v,c=o.exec(l),c!==null);)v=o.lastIndex,o===O?c[1]==="!--"?o=ot:c[1]!==void 0?o=nt:c[2]!==void 0?(ft.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=$):c[3]!==void 0&&(o=$):o===$?c[0]===">"?(o=i??O,d=-1):c[1]===void 0?d=-2:(d=o.lastIndex-c[2].length,b=c[1],o=c[3]===void 0?$:c[3]==='"'?lt:at):o===lt||o===at?o=$:o===ot||o===nt?o=O:(o=$,i=void 0);const m=o===$&&t[a+1].startsWith("/>")?" ":"";n+=o===O?l+Vt:d>=0?(r.push(b),l.slice(0,d)+pt+l.slice(d)+y+m):l+y+(d===-2?a:m)}return[bt(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},V=class mt{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[b,c]=Ft(e,s);if(this.el=mt.createElement(b,r),_.currentNode=this.el.content,s===2||s===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=_.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(pt)){const v=c[o++],m=i.getAttribute(d).split(y),M=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:M[2],strings:m,ctor:M[1]==="."?Jt:M[1]==="?"?Zt:M[1]==="@"?Gt:L}),i.removeAttribute(d)}else d.startsWith(y)&&(l.push({type:6,index:n}),i.removeAttribute(d));if(ft.test(i.tagName)){const d=i.textContent.split(y),v=d.length-1;if(v>0){i.textContent=D?D.emptyScript:"";for(let m=0;m<v;m++)i.append(d[m],k()),_.nextNode(),l.push({type:2,index:++n});i.append(d[v],k())}}}else if(i.nodeType===8)if(i.data===vt)l.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(y,d+1))!==-1;)l.push({type:7,index:n}),d+=y.length-1}n++}}static createElement(e,s){const r=A.createElement("template");return r.innerHTML=e,r}};function x(t,e,s=t,r){if(e===w)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=P(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??(s._$Co=[]))[r]=i:s._$Cl=i),i!==void 0&&(e=x(t,i._$AS(t,e.values),i,r)),e}var Kt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??A).importNode(e,!0);_.currentNode=r;let i=_.nextNode(),n=0,o=0,a=s[0];for(;a!==void 0;){if(n===a.index){let l;a.type===2?l=new F(i,i.nextSibling,this,t):a.type===1?l=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(l=new Qt(i,this,t)),this._$AV.push(l),a=s[++o]}n!==a?.index&&(i=_.nextNode(),n++)}return _.currentNode=A,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},F=class yt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=x(this,e,s),P(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==w&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==h&&P(this._$AH)?this._$AA.nextSibling.data=e:this.T(A.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=V.createElement(bt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new Kt(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=dt.get(e.strings);return s===void 0&&dt.set(e.strings,s=new V(e)),s}k(e){W(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new yt(this.O(k()),this.O(k()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=h}_$AI(t,e=this,s,r){const i=this.strings;let n=!1;if(i===void 0)t=x(this,t,e,0),n=!P(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const o=t;let a,l;for(t=i[0],a=0;a<i.length-1;a++)l=x(this,o[s+a],e,a),l===w&&(l=this._$AH[a]),n||(n=!P(l)||l!==this._$AH[a]),l===h?t=h:t!==h&&(t+=(l??"")+i[a+1]),this._$AH[a]=l}n&&!r&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Jt=class extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},Zt=class extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},Gt=class extends L{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??h)===w)return;const s=this._$AH,r=t===h&&s!==h||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==h&&(s===h||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Qt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}},Yt=I.litHtmlPolyfillSupport;Yt?.(V,F),(I.litHtmlVersions??(I.litHtmlVersions=[])).push("3.3.1");var Xt=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new F(e.insertBefore(k(),n),n,void 0,s??{})}return i._$AI(t),i},H=globalThis,T=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Xt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return w}};T._$litElement$=!0,T.finalized=!0,H.litElementHydrateSupport?.({LitElement:T});var te=H.litElementPolyfillSupport;te?.({LitElement:T});(H.litElementVersions??(H.litElementVersions=[])).push("4.2.1");var ee=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.get(t)||customElements.define(t,e)})):customElements.get(t)||customElements.define(t,e)},se={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:B},re=(t=se,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,l,t)},init(a){return a!==void 0&&this.C(o,void 0,t,a),a}}}if(r==="setter"){const{name:o}=s;return function(a){const l=this[o];e.call(this,a),this.requestUpdate(o,l,t)}}throw Error("Unsupported decorator location: "+r)};function g(t){return(e,s)=>typeof s=="object"?re(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}var ie=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,f=(t,e,s,r)=>{for(var i=r>1?void 0:r?oe(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ie(e,s,i),i},p=class extends T{constructor(){super(...arguments),this.variant="primary",this.size="default",this.type="circle",this.state="default",this.iconName="home",this.disabled=!1,this.buttonAriaLabel="Icon button"}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),!document.querySelector('link[href*="Roboto"]')){const t=document.createElement("link");t.rel="stylesheet",t.href="https://ui.renaissance.com/fonts/Roboto/style.css",document.head.appendChild(t)}}set shape(t){this.type=t}get shape(){return this.type}get buttonClasses(){return["nds-icon-button",`nds-icon-button--${this.variant}`,`nds-icon-button--${this.size}`,`nds-icon-button--${this.type}`,this.state!=="default"?`nds-icon-button--${this.state}`:"",this.disabled?"nds-icon-button--disabled":""].filter(Boolean).join(" ")}handleClick(t){if(this.disabled){t.preventDefault(),t.stopPropagation();return}this.dispatchEvent(new CustomEvent("icon-button-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}render(){return Wt`
|
|
4
|
-
<style>
|
|
5
|
-
nds-icon-button {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.nds-icon-button {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
font-family: var(--font-family-roboto, "Roboto", sans-serif);
|
|
15
|
-
font-weight: var(--font-weight-regular, 400);
|
|
16
|
-
line-height: 1;
|
|
17
|
-
text-decoration: none;
|
|
18
|
-
background: none;
|
|
19
|
-
position: relative;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
margin: 0;
|
|
22
|
-
padding: 0;
|
|
23
|
-
border: none;
|
|
24
|
-
transition: background-color 0.2s ease-in-out,
|
|
25
|
-
color 0.2s ease-in-out,
|
|
26
|
-
box-shadow 0.2s ease-in-out;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* ── Sizes ── */
|
|
30
|
-
.nds-icon-button--small {
|
|
31
|
-
width: var(--height-32, 32px);
|
|
32
|
-
height: var(--height-32, 32px);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.nds-icon-button--medium {
|
|
36
|
-
width: var(--height-36, 36px);
|
|
37
|
-
height: var(--height-36, 36px);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.nds-icon-button--default {
|
|
41
|
-
width: var(--height-40, 40px);
|
|
42
|
-
height: var(--height-40, 40px);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.nds-icon-button--large {
|
|
46
|
-
width: var(--height-48, 48px);
|
|
47
|
-
height: var(--height-48, 48px);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* ── Shapes ── */
|
|
51
|
-
.nds-icon-button--circle {
|
|
52
|
-
border-radius: var(--radius-circle, 50%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.nds-icon-button--rounded {
|
|
56
|
-
border-radius: var(--radius-8, 8px);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* ── Primary ── */
|
|
60
|
-
.nds-icon-button--primary {
|
|
61
|
-
background-color: var(--color-interactive-blue, #146eb3);
|
|
62
|
-
color: var(--color-primary-white, #ffffff);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
66
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
70
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* ── Secondary ── */
|
|
74
|
-
.nds-icon-button--secondary {
|
|
75
|
-
background-color: var(--color-primary-white, #ffffff);
|
|
76
|
-
color: var(--color-interactive-blue, #146eb3);
|
|
77
|
-
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
81
|
-
background-color: var(--color-interactive-blue, #146eb3);
|
|
82
|
-
color: var(--color-primary-white, #ffffff);
|
|
83
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
87
|
-
background-color: var(--color-interactive-blue, #146eb3);
|
|
88
|
-
color: var(--color-primary-white, #ffffff);
|
|
89
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* ── Tertiary ── */
|
|
93
|
-
.nds-icon-button--tertiary {
|
|
94
|
-
background-color: var(--color-new-gray, #f3f5f7);
|
|
95
|
-
color: var(--color-interactive-blue, #146eb3);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
99
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
103
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* ── Ghost ── */
|
|
107
|
-
.nds-icon-button--ghost {
|
|
108
|
-
background-color: transparent;
|
|
109
|
-
color: var(--color-interactive-blue, #146eb3);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
113
|
-
background-color: var(--color-new-gray, #f3f5f7);
|
|
114
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
118
|
-
background-color: var(--color-new-gray, #f3f5f7);
|
|
119
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* ── Dark (for dark backgrounds) ── */
|
|
123
|
-
.nds-icon-button--dark {
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
color: var(--color-primary-white, #ffffff);
|
|
126
|
-
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
130
|
-
background-color: var(--color-interactive-blue, #146eb3);
|
|
131
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
135
|
-
background-color: var(--color-interactive-blue, #146eb3);
|
|
136
|
-
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* ── Disabled ── */
|
|
140
|
-
.nds-icon-button--disabled,
|
|
141
|
-
.nds-icon-button:disabled {
|
|
142
|
-
opacity: 0.5;
|
|
143
|
-
cursor: not-allowed;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* ── Icon sizing ── */
|
|
147
|
-
.nds-icon-button__icon {
|
|
148
|
-
line-height: 1;
|
|
149
|
-
display: inline-flex;
|
|
150
|
-
align-items: center;
|
|
151
|
-
justify-content: center;
|
|
152
|
-
color: inherit;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.nds-icon-button--small .nds-icon-button__icon {
|
|
156
|
-
font-size: var(--nds-icon-small, 12px);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.nds-icon-button--medium .nds-icon-button__icon {
|
|
160
|
-
font-size: var(--nds-icon-medium, 14px);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.nds-icon-button--default .nds-icon-button__icon {
|
|
164
|
-
font-size: var(--nds-icon-default, 16px);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.nds-icon-button--large .nds-icon-button__icon {
|
|
168
|
-
font-size: var(--nds-icon-large, 20px);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* ── Focus ── */
|
|
172
|
-
.nds-icon-button:focus-visible {
|
|
173
|
-
outline: 2px solid var(--color-focus-blue, #2b87ff);
|
|
174
|
-
outline-offset: 2px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* ── Reduced motion ── */
|
|
178
|
-
@media (prefers-reduced-motion: reduce) {
|
|
179
|
-
.nds-icon-button {
|
|
180
|
-
transition: none;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
</style>
|
|
184
|
-
<button
|
|
185
|
-
type="button"
|
|
186
|
-
class="${this.buttonClasses}"
|
|
187
|
-
?disabled="${this.disabled}"
|
|
188
|
-
aria-disabled="${this.disabled?"true":"false"}"
|
|
189
|
-
aria-label="${this.buttonAriaLabel}"
|
|
190
|
-
@click="${this.handleClick}"
|
|
191
|
-
>
|
|
192
|
-
<i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
|
|
193
|
-
</button>
|
|
194
|
-
`}};f([g()],p.prototype,"variant",2);f([g()],p.prototype,"size",2);f([g()],p.prototype,"type",2);f([g()],p.prototype,"state",2);f([g({attribute:"icon-name"})],p.prototype,"iconName",2);f([g({type:Boolean})],p.prototype,"disabled",2);f([g({attribute:"button-aria-label"})],p.prototype,"buttonAriaLabel",2);f([g()],p.prototype,"shape",1);p=f([ee("nds-icon-button")],p);export{Ot as a,ce as c,ne as d,Ct as i,Tt as l,ct as n,ue as o,wt as r,kt as s,he as t,gt as u};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{t as S}from"./defineProperty-a20a667d.js";import{a as hn,i as m,n as w,r as b,t as l}from"./classPrivateFieldGet2-338e0179.js";import{g as pi,n as gi}from"./tool-host-contract-b93b482c.js";import{i as wi}from"./provider-4c704118.js";var Jr,Kr,Le,Et,Nt,ve,oe,At,Wt,Xt,ot,cr,zt,dt,$t,Ee,ae,E,yr,tt,Re,at,Qt,J,et,U,rt,bt,It,Pt,ue,qe,ze,Ct,fr,P,ht,yt,G,Kt,Pe,Oe,hr,Tt,lt;typeof window<"u"&&((Jr=(Kr=window).__svelte??(Kr.__svelte={})).v??(Jr.v=new Set)).add("5");var te={},I=Symbol("uninitialized"),_i="http://www.w3.org/1999/xhtml",mi=Array.isArray,yi=Array.prototype.indexOf,$r=Array.prototype.includes,$i=Array.from,Ke=Object.keys,we=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,bi=Object.getOwnPropertyDescriptors,ki=Object.prototype,Mi=Array.prototype,vn=Object.getPrototypeOf,Ur=Object.isExtensible,xi=()=>{};function Si(t){for(var e=0;e<t.length;e++)t[e]()}function dn(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}var nt=1024,ft=2048,Vt=4096,Er=8192,Ci=16384,Pr=32768,Xr=1<<25,Or=65536,ie=1<<19,Ti=1<<20,Yr=1<<21,Wi=1<<22,Ue=1<<23,de=Symbol("$state"),pn=Symbol("component"),gn=Symbol("legacy props"),Ei=Symbol(""),br=Symbol("attributes"),Pi=Symbol("class"),Oi=Symbol("style"),Fe=Symbol("text"),$e=new class extends Error{constructor(...t){super(...t),S(this,"name","StaleReactionError"),S(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ji=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ai(){console.warn("https://svelte.dev/e/derived_inert")}function rr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Ii(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var O=!1;function Zt(t){O=t}var T;function wt(t){if(t===null)throw rr(),te;return T=t}function jr(){return wt(Ot(T))}function De(t){if(O){if(Ot(T)!==null)throw rr(),te;T=t}}function Ni(t=1){if(O){for(var e=t,r=T;e--;)r=Ot(r);T=r}}function wn(t=!0){for(var e=0,r=T;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Ot(r);t&&r.remove(),r=i}}function Li(t){if(!t||t.nodeType!==8)throw rr(),te;return t.data}function _n(t){return t===this.v}function Ri(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function mn(t){return!Ri(t,this.v)}function qi(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function zi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Fi(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Di(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Bi(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Hi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Vi(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ji(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ki(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ui(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Yi(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var nr=!1,ir=!1,j=null;function ee(t){j=t}function Ar(t,e=!1,r){j={p:j,i:!1,c:null,e:null,s:t,x:null,r:y,l:ir&&!e?{s:null,u:null,$:[]}:null}}function Ir(t){var e=j,r=e.e;if(r!==null){e.e=null;for(var n of r)Ln(n)}return t!==void 0&&(e.x=t),e.i=!0,j=e.p,Nr(t)}function Nr(t={}){return we(t,pn,{value:!0}),t}function be(){return!ir||j!==null&&j.l===null}var Rt=[];function yn(){var t=Rt;Rt=[],Si(t)}function Bt(t){if(Rt.length===0&&!pe){var e=Rt;queueMicrotask(()=>{e===Rt&&yn()})}Rt.push(t)}function Zi(){for(;Rt.length>0;)yn()}var Gi=~(ft|Vt|nt);function A(t,e){t.f=t.f&Gi|e}function Lr(t){(t.f&512)!==0||t.deps===null?A(t,nt):A(t,Vt)}function $n(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),A(t,nt)}function sr(t){var e=k,r=y;it(null),_t(null);try{return t()}finally{it(e),_t(r)}}function Qi(t,e,r,n){const i=be()?_e:kn;var s=t.filter(h=>!h.settled),o=e.map(i);if(r.length===0&&s.length===0){n(o);return}var a=y,c=ts(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function f(h){if((a.f&16384)===0){c();try{n([...o,...h])}catch(_){gt(_,a)}Xe()}}var v=bn();if(r.length===0){u.then(()=>f([])).finally(v);return}function p(){Promise.all(r.map(h=>es(h))).then(f).catch(h=>gt(h,a)).finally(v)}u?u.then(()=>{c(),p(),Xe()}):p()}function ts(){var t=y,e=k,r=j,n=$;return function(i=!0){_t(t),it(e),ee(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function Xe(t=!0){_t(null),it(null),ee(null),t&&$?.deactivate()}function bn(){var t=y,e=t.b,r=$,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function _e(t){var e=2|ft;return y!==null&&(y.f|=ie),{ctx:j,deps:null,effects:null,equals:_n,f:e,fn:t,reactions:null,rv:0,v:I,wv:0,parent:y,ac:null}}var fe=Symbol("obsolete");function es(t,e,r){let n=y;n===null&&zi();var i=void 0,s=ke(I),o=!k,a=new Set;return ys(()=>{var c=y,u=dn();i=u.promise;try{Promise.resolve(t()).then(u.resolve,h=>{h!==$e&&u.reject(h)}).finally(Xe)}catch(h){u.reject(h),Xe()}var f=$;if(o){if((c.f&32768)!==0)var v=bn();if(n.b?.is_rendered())f.async_deriveds.get(c)?.reject(fe);else for(const h of a.values())h.reject(fe);a.add(u),f.async_deriveds.set(c,u)}const p=(h,_=void 0)=>{v?.(),a.delete(u),_!==fe&&(f.activate(),_?(s.f|=Ue,tr(s,_)):(s.f&8388608&&(s.f^=Ue),tr(s,h)),f.deactivate())};u.promise.then(p,h=>p(null,h||"unknown"))}),ws(()=>{for(const c of a)c.reject(fe)}),new Promise(c=>{function u(f){function v(){f===i?c(s):u(i)}f.then(v,v)}u(i)})}function ce(t){const e=_e(t);return Vn(e),e}function kn(t){const e=_e(t);return e.equals=mn,e}function rs(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)X(e[r])}}function Rr(t){var e,r=y,n=t.parent;if(!Mt&&n!==null&&t.v!==I&&(n.f&24576)!==0)return Ai(),t.v;_t(n);try{rs(t),e=Xn(t)}finally{_t(r)}return e}function Mn(t){var e=Rr(t);if(!t.equals(e)&&(t.wv=Kn(),(!$?.is_fork||t.deps===null)&&($!==null?($.capture(t,e,!0),Mr?.capture(t,e,!0)):t.v=e,t.deps===null))){A(t,nt);return}Mt||(q!==null?(zr()||$?.is_fork)&&q.set(t,e):Lr(t))}function ns(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&sr(()=>{e.ac.abort($e),e.ac=null}),e.fn!==null&&(e.teardown=xi),ye(e,0),Dr(e))}function xn(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&ne(e)}var kr=null,Yt=null,$=null,Mr=null,q=null,xr=null,pe=!1,vr=!1,me=null,Ye=null,Sn=0,is=1,se=(Le=new WeakMap,Et=new WeakMap,Nt=new WeakMap,ve=new WeakMap,oe=new WeakMap,At=new WeakMap,Wt=new WeakMap,Xt=new WeakMap,ot=new WeakMap,cr=new WeakMap,zt=new WeakMap,dt=new WeakMap,$t=new WeakMap,Ee=new WeakMap,ae=new WeakMap,E=new WeakSet,yr=class Cn{constructor(){hn(this,E),S(this,"id",is++),m(this,Le,!1),S(this,"linked",!0),m(this,Et,null),m(this,Nt,null),S(this,"async_deriveds",new Map),S(this,"current",new Map),S(this,"previous",new Map),m(this,ve,new Set),m(this,oe,new Set),m(this,At,0),m(this,Wt,new Map),m(this,Xt,null),m(this,ot,[]),m(this,cr,[]),m(this,zt,new Set),m(this,dt,new Set),m(this,$t,new Map),m(this,Ee,new Set),S(this,"is_fork",!1),m(this,ae,!1),Yt===null?kr=Yt=this:(w(Nt,Yt,this),w(Et,this,Yt)),Yt=this}skip_effect(e){l($t,this).has(e)||l($t,this).set(e,{d:[],m:[]}),l(Ee,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=l($t,this).get(e);if(n){l($t,this).delete(e);for(var i of n.d)A(i,ft),r(i);for(i of n.m)A(i,Vt),r(i)}l(Ee,this).add(e)}capture(e,r,n=!1){e.v!==I&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),q?.set(e,r)),this.is_fork||(e.v=r)}activate(){$=this}deactivate(){$=null,q=null}flush(){try{vr=!0,$=this,b(E,this,Ze).call(this)}finally{Sn=0,xr=null,me=null,Ye=null,vr=!1,$=null,q=null,pt.clear()}}discard(){for(const e of l(oe,this))e(this);l(oe,this).clear();for(const e of this.async_deriveds.values())e.reject(fe);b(E,this,Ge).call(this),l(Xt,this)?.resolve()}register_created_effect(e){l(cr,this).push(e)}increment(e,r){if(w(At,this,l(At,this)+1),e){let n=l(Wt,this).get(r)??0;l(Wt,this).set(r,n+1)}}decrement(e,r){if(w(At,this,l(At,this)-1),e){let n=l(Wt,this).get(r)??0;n===1?l(Wt,this).delete(r):l(Wt,this).set(r,n-1)}l(ae,this)||(w(ae,this,!0),Bt(()=>{w(ae,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)l(zt,this).add(n);for(const n of r)l(dt,this).add(n);e.clear(),r.clear()}oncommit(e){l(ve,this).add(e)}ondiscard(e){l(oe,this).add(e)}settled(){return(l(Xt,this)??w(Xt,this,dn())).promise}static ensure(){if($===null){const e=$=new Cn;!vr&&!pe&&Bt(()=>{l(Le,e)||e.flush()})}return $}apply(){if(!nr||!this.is_fork&&l(Et,this)===null&&l(Nt,this)===null){q=null;return}q=new Map;for(const[r,[n]]of this.current)q.set(r,n);for(let r=kr;r!==null;r=l(Nt,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)q.has(n)||q.set(n,i)}}schedule(e){if(xr=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}l(ot,this).push(e)}},yr);function Zr(){if(this.is_fork)return!0;for(const r of l(Wt,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(l($t,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function ss(){var t=[];for(const i of l(ot,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=nt}}r||t.push(e)}return w(ot,this,[]),t}function Ze(){w(Le,this,!0);for(const o of l(zt,this))l(dt,this).delete(o),A(o,ft),this.schedule(o);for(const o of l(dt,this))A(o,Vt),this.schedule(o);this.apply();for(var t=me=[],e=[],r=Ye=[];l(ot,this).length>0;){Sn++>1e3&&(b(E,this,Ge).call(this),us());for(const o of b(E,this,ss).call(this))try{b(E,this,ls).call(this,o,t,e)}catch(a){throw En(o),b(E,this,Zr).call(this)||this.discard(),a}}if($=null,r.length>0){var n=yr.ensure();for(const o of r)n.schedule(o)}if(me=null,Ye=null,b(E,this,Zr).call(this)){b(E,this,je).call(this,e),b(E,this,je).call(this,t);for(const[o,a]of l($t,this))Wn(o,a);r.length>0&&b(E,$,Ze).call($);return}const i=b(E,this,os).call(this);if(i){b(E,this,je).call(this,e),b(E,this,je).call(this,t),b(E,i,as).call(i,this);return}l(zt,this).clear(),l(dt,this).clear();for(const o of l(ve,this))o(this);l(ve,this).clear(),Mr=this,Gr(e),Gr(t),Mr=null,l(Xt,this)?.resolve();var s=$;if(l(At,this)===0&&(l(ot,this).length===0||s!==null)&&b(E,this,Ge).call(this),l(ot,this).length>0)if(s!==null){for(const o of l(ot,this))l(ot,s).push(o);w(ot,this,[])}else s=this;s!==null&&(pt.clear(),b(E,s,Ze).call(s))}function ls(t,e,r){t.f^=nt;for(var n=t.first;n!==null;){var i=n.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||l($t,this).has(n))&&n.fn!==null){s?n.f^=nt:(i&4)!==0?e.push(n):nr&&(i&16777224)!==0?r.push(n):xe(n)&&(i&16&&l(dt,this).add(n),ne(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function os(){for(var t=l(Et,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=l(Et,t)}return null}function as(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(l(zt,t),l(dt,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var s=o;i&4194320&&!this.async_deriveds.has(s)&&(l(dt,this).delete(s),A(s,ft),this.schedule(s))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),b(E,t,Ge).call(t),$=this,b(E,this,Ze).call(this)}function je(t){for(var e=0;e<t.length;e+=1)$n(t[e],l(zt,this),l(dt,this))}function Ge(){if(this.linked){var t=l(Et,this),e=l(Nt,this);t===null?kr=e:w(Nt,t,e),e===null?Yt=t:w(Et,e,t),this.linked=!1}}function F(t){var e=pe;pe=!0;try{var r;for(t&&($!==null&&!$.is_fork&&$.flush(),r=t());;){if(Zi(),$===null)return r;$.flush()}}finally{pe=e}}function us(){try{Hi()}catch(t){gt(t,xr)}}var vt=null;function Gr(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&xe(n)&&(vt=new Set,ne(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Fn(n),vt?.size>0)){pt.clear();for(const i of vt){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)vt.has(o)&&(vt.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const c=s[a];!(c.f&24576)&&ne(c)}}vt.clear()}}vt=null}}function Tn(t){$.schedule(t)}function Wn(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),A(t,nt);for(var r=t.first;r!==null;)Wn(r,e),r=r.next}}function En(t){A(t,nt);for(var e=t.first;e!==null;)En(e),e=e.next}var Qe=new Set,pt=new Map,Pn=!1;function ke(t,e){return{f:0,v:t,reactions:null,equals:_n,rv:0,wv:0}}function z(t,e){const r=ke(t,e);return Vn(r),r}function cs(t,e=!1,r=!0){const n=ke(t);return e||(n.equals=mn),n}function x(t,e,r=!1){return k!==null&&(!ut||k.f&131072)&&be()&&k.f&4325394&&(ct===null||!ct.has(t))&&Xi(),tr(t,r?Gt(e):e,Ye)}var Lt=null,Sr=0;function tr(t,e,r=null){if(!t.equals(e)){Mt?pt.set(t,e):pt.has(t)||pt.set(t,t.v);var n=se.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&Rr(i),q===null&&Lr(i)}t.wv=Kn(),Lt=null,Sr=0,On(t,ft,r),Lt=null,be()&&y!==null&&y.f&1024&&!(y.f&96)&&(Q===null?Ms([t]):Q.push(t)),!n.is_fork&&Qe.size>0&&!Pn&&fs()}return e}function fs(){Pn=!1;for(const t of Qe){t.f&1024&&A(t,Vt);let e;try{e=xe(t)}catch{e=!0}e&&ne(t)}Qe.clear()}function ge(t){x(t,t.v+1)}function On(t,e,r){var n=t.reactions;if(n!==null){var i=be(),s=n.length;if(Sr+=s,Sr>1e5&&Lt===null&&(Lt=new Set),Lt!==null){if(Lt.has(t))return;Lt.add(t)}for(var o=0;o<s;o++){var a=n[o],c=a.f;if(!(!i&&a===y)){var u=(c&ft)===0;if(u&&A(a,e),(c&131072)!==0)Qe.add(a);else if((c&2)!==0){var f=a;q?.delete(f),On(f,Vt,r)}else if(u){var v=a;c&16&&vt!==null&&vt.add(v),r!==null?r.push(v):Tn(v)}}}}}function Gt(t){if(typeof t!="object"||t===null||de in t||pn in t)return t;const e=vn(t);if(e!==ki&&e!==Mi)return t;var r=new Map,n=mi(t),i=z(0),s=null,o=Dt,a=c=>{if(Dt===o)return c();var u=k,f=Dt;it(null),nn(o);var v=c();return it(u),nn(f),v};return n&&r.set("length",z(t.length,s)),new Proxy(t,{defineProperty(c,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ki();var v=r.get(u);return v===void 0?a(()=>{var p=z(f.value,s);return r.set(u,p),p}):x(v,f.value,!0),!0},deleteProperty(c,u){var f=r.get(u);if(f===void 0){if(u in c){const v=a(()=>z(I,s));r.set(u,v),ge(i)}}else x(f,I),ge(i);return!0},get(c,u,f){if(u===de)return t;var v=r.get(u),p=u in c;if(v===void 0&&(!p||Ft(c,u)?.writable)&&(v=a(()=>z(Gt(p?c[u]:I),s)),r.set(u,v)),v!==void 0){var h=d(v);return h===I?void 0:h}return Reflect.get(c,u,f)},getOwnPropertyDescriptor(c,u){this.has?.(c,u);var f=Reflect.getOwnPropertyDescriptor(c,u),v=r.get(u);if(v!==void 0){var p=d(v);if(p===I)return;if(f&&"value"in f)f.value=p;else return{enumerable:!0,configurable:!0,value:p,writable:!0}}return f},has(c,u){if(u===de)return!0;var f=r.get(u),v=f!==void 0&&f.v!==I||Reflect.has(c,u);return(f!==void 0||y!==null&&(!v||Ft(c,u)?.writable))&&(f===void 0&&(f=a(()=>z(v?Gt(c[u]):I,s)),r.set(u,f)),d(f)===I)?!1:v},set(c,u,f,v){var p=r.get(u),h=u in c;if(n&&u==="length")for(var _=f;_<p.v;_+=1){var M=r.get(_+"");M!==void 0?x(M,I):_ in c&&(M=a(()=>z(I,s)),r.set(_+"",M))}if(p===void 0)(!h||Ft(c,u)?.writable)&&(p=a(()=>z(void 0,s)),x(p,Gt(f)),r.set(u,p));else{h=p.v!==I;var D=a(()=>Gt(f));x(p,D)}var L=Reflect.getOwnPropertyDescriptor(c,u);if(L?.set&&L.set.call(v,f),!h){if(n&&typeof u=="string"){var B=r.get("length"),H=Number(u);Number.isInteger(H)&&H>=B.v&&x(B,H+1)}ge(i)}return!0},ownKeys(c){d(i);var u=Reflect.ownKeys(c).filter(p=>{var h=r.get(p);return h===void 0||h.v!==I});for(var[f,v]of r)v.v!==I&&!(f in c)&&u.push(f);return u},setPrototypeOf(){Ui()}})}var Qr,jn,An,In;function Cr(){if(Qr===void 0){Qr=window,jn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;An=Ft(e,"firstChild").get,In=Ft(e,"nextSibling").get,Ur(t)&&(t[Pi]=void 0,t[br]=null,t[Oi]=void 0,t.__e=void 0),Ur(r)&&(r[Fe]=void 0)}}function Ht(t=""){return document.createTextNode(t)}function re(t){return An.call(t)}function Ot(t){return In.call(t)}function Be(t,e){if(!O)return re(t);var r=re(T);if(r===null)r=T.appendChild(Ht());else if(e&&r.nodeType!==3){var n=Ht();return r?.before(n),wt(n),n}return e&&Nn(r),wt(r),r}function tn(t,e=!1){if(!O)return re(t);var r=Be(t,e);return De(t),r}function dr(t,e=1,r=!1){let n=O?T:t;for(var i;e--;)i=n,n=Ot(n);if(!O)return n;if(r){if(n?.nodeType!==3){var s=Ht();return n===null?i?.after(s):n.before(s),wt(s),s}Nn(n)}return wt(n),n}function hs(t){t.textContent=""}function vs(){return!nr||vt!==null?!1:(y.f&Pr)!==0}function qr(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function Nn(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function ds(t){var e=y;if(e===null)return k.f|=Ue,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;gt(t,e)}function gt(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}}function ps(t){y===null&&(k===null&&Bi(t),Di()),Mt&&Fi(t)}function gs(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function mt(t,e){var r=y;r!==null&&r.f&8192&&(t|=Er);var n={ctx:j,deps:null,nodes:null,f:t|ft|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(n);var i=n;if((t&4)!==0)me!==null?me.push(n):se.ensure().schedule(n);else if(e!==null){try{ne(n)}catch(o){throw X(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=Or))}if(i!==null&&(i.parent=r,r!==null&&gs(i,r),k!==null&&(k.f&2)!==0&&(t&64)===0)){var s=k;(s.effects??(s.effects=[])).push(i)}return n}function zr(){return k!==null&&!ut}function ws(t){const e=mt(8,null);return A(e,nt),e.teardown=t,e}function Tr(t){ps("$effect");var e=y.f;if(!k&&(e&32)!==0&&j!==null&&!j.i){var r=j;(r.e??(r.e=[])).push(t)}else return Ln(t)}function Ln(t){return mt(4|Ti,t)}function _s(t){se.ensure();const e=mt(64|ie,t);return()=>{X(e)}}function ms(t){se.ensure();const e=mt(64|ie,t);return(r={})=>new Promise(n=>{r.outro?Me(e,()=>{X(e),n(void 0)}):(X(e),n(void 0))})}function Rn(t){return mt(4,t)}function ys(t){return mt(Wi|ie,t)}function Fr(t,e=0){return mt(8|e,t)}function pr(t,e=[],r=[],n=[]){Qi(n,e,r,i=>{mt(8,()=>{t(...i.map(d))})})}function qn(t,e=0){return mt(16|e,t)}function kt(t){return mt(32|ie,t)}function zn(t){var e=t.teardown;if(e!==null){const r=Mt,n=k;rn(!0),it(null);try{e.call(null)}catch(i){gt(i,t.parent)}finally{rn(r),it(n)}}}function Dr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&sr(()=>{i.abort($e)});var n=r.next;(r.f&64)!==0?r.parent=null:X(r,e),r=n}}function $s(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&X(e),e=r}}function X(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(bs(t.nodes.start,t.nodes.end),r=!0),t.f|=Xr,Dr(t,e&&!r),ye(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();zn(t),t.f^=Xr,t.f|=Ci;var i=t.parent;i!==null&&i.first!==null&&Fn(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function bs(t,e){for(;t!==null;){var r=t===e?null:Ot(t);t.remove(),t=r}}function Fn(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Me(t,e,r=!0){var n=[];t.f|=256,Dn(t,n,!0);var i=()=>{r&&X(t),e&&e()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function Dn(t,e,r){if((t.f&8192)===0){t.f^=Er;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;Dn(i,e,o?r:!1)}i=s}}}function en(t){t.f&=-257,Bn(t,!0)}function Bn(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=Er,!(t.f&1024)&&(A(t,ft),se.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Bn(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function Hn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Ot(r);e.append(r),r=i}}var ks=null,He=!1,Mt=!1;function rn(t){Mt=t}var k=null,ut=!1;function it(t){k=t}var y=null;function _t(t){y=t}var ct=null;function Vn(t){k!==null&&(k.f&2097152||k.f&2)&&(ct??(ct=new Set)).add(t)}var K=null,Y=0,Q=null;function Ms(t){Q=t}var Jn=1,qt=0,Dt=qt;function nn(t){Dt=t}function Kn(){return++Jn}function xe(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(xe(s)&&Mn(s),s.wv>t.wv)return!0}e&512&&q===null&&A(t,nt)}return!1}function Un(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!nr&&ct!==null&&ct.has(t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?Un(s,e,!1):e===s&&(r?A(s,ft):s.f&1024&&A(s,Vt),Tn(s))}}function Xn(t){var e=K,r=Y,n=Q,i=k,s=ct,o=j,a=ut,c=Dt,u=t.f;K=null,Y=0,Q=null,k=(u&96)===0?t:null,ct=null,ee(t.ctx),ut=!1,Dt=++qt,t.ac!==null&&(sr(()=>{t.ac.abort($e)}),t.ac=null);try{t.f|=Yr;var f=t.fn,v=f();t.f|=Pr;var p=sn(t);if(be()&&Q!==null&&!ut&&p!==null&&(t.f&6146)===0)for(var h=0;h<Q.length;h++)Un(Q[h],t);if(i!==null&&i!==t){if(qt++,i.deps!==null)for(let _=0;_<r;_+=1)i.deps[_].rv=qt;if(e!==null)for(const _ of e)_.rv=qt;Q!==null&&(n===null?n=Q:n.push(...Q))}return t.f&8388608&&(t.f^=Ue),v}catch(_){return sn(t),ds(_)}finally{t.f^=Yr,K=e,Y=r,Q=n,k=i,ct=s,ee(o),ut=a,Dt=c}}function sn(t){var e=t.deps,r=$?.is_fork;if(K!==null){var n,i;if(r||ye(t,Y),e!==null&&Y>0)for(e.length=Y+K.length,i=0;i<K.length;i++)e[Y+i]=K[i];else t.deps=e=K;if(zr()&&(t.f&512)!==0)for(i=Y;i<e.length;i++)((n=e[i]).reactions??(n.reactions=[])).push(t)}else!r&&e!==null&&Y<e.length&&(ye(t,Y),e.length=Y);return e}function xs(t,e){let r=e.reactions;if(r!==null){var n=yi.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(K===null||!$r.call(K,e))){var s=e;s.f&512&&(s.f^=512),s.v!==I&&Lr(s),s.ac!==null&&sr(()=>{s.ac.abort($e),s.ac=null,A(s,ft)}),ns(s),ye(s,0)}}function ye(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)xs(t,r[n])}function ne(t){var e=t.f;if((e&16384)===0){A(t,nt);var r=y,n=He;y=t,He=(e&96)===0;try{(e&16777232)!==0?$s(t):Dr(t),zn(t);var i=Xn(t);t.teardown=typeof i=="function"?i:null,t.wv=Jn}finally{He=n,y=r}}}function d(t){var e=(t.f&2)!==0;if(ks?.add(t),k!==null&&!ut&&!(y!==null&&(y.f&16384)!==0)&&(ct===null||!ct.has(t))){var r=k.deps;if((k.f&2097152)!==0)t.rv<qt&&(t.rv=qt,K===null&&r!==null&&r[Y]===t?Y++:K===null?K=[t]:K.push(t));else{var n;(n=k).deps??(n.deps=[]),$r.call(k.deps,t)||k.deps.push(t);var i=t.reactions;i===null?t.reactions=[k]:$r.call(i,k)||i.push(k)}}if(Mt&&pt.has(t))return pt.get(t);if(e){var s=t;if(Mt){var o=s.v;return(!(s.f&1024)&&s.reactions!==null||Zn(s))&&(o=Rr(s)),pt.set(s,o),o}var a=(s.f&512)===0&&!ut&&k!==null&&(He||(k.f&512)!==0),c=(s.f&Pr)===0;xe(s)&&(a&&(s.f|=512),Mn(s)),a&&!c&&(xn(s),Yn(s))}if(q?.has(t))return q.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function Yn(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(xn(e),Yn(e))}function Zn(t){if(t.v===I)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(pt.has(e)||(e.f&2)!==0&&Zn(e))return!0;return!1}function Se(t){var e=ut;try{return ut=!0,t()}finally{ut=e}}var Ae=Symbol("events"),Ss=new Set,ln=new Set,gr=null,wr=!1;function on(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;gr=t,wr||(wr=!0,setTimeout(()=>{wr=!1,gr=null}));var o=0,a=gr===t&&t[Ae];if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t[Ae]=e;return}var u=i.indexOf(e);if(u===-1)return;c<=u&&(o=c)}if(s=i[o]||t.target,s!==e){we(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=k,v=y;it(null),_t(null);try{for(var p,h=[];s!==null&&s!==e;){try{var _=s[Ae]?.[n];_!=null&&(!s.disabled||t.target===s)&&_.call(s,t)}catch(M){p?h.push(M):p=M}if(t.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let M of h)queueMicrotask(()=>{throw M});throw p}}finally{t[Ae]=e,delete t.currentTarget,it(f),_t(v)}}}var Cs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ts(t){return Cs?.createHTML(t)??t}function Ws(t){var e=qr("template");return e.innerHTML=Ts(t.replaceAll("<!>","<!---->")),e.content}function Ve(t,e){var r=y;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function lr(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,s=!t.startsWith("<!>");return()=>{if(O)return Ve(T,null),T;i===void 0&&(i=Ws(s?t:"<!>"+t),r||(i=re(i)));var o=n||jn?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=re(o),c=o.lastChild;Ve(a,c)}else Ve(o,o);return o}}function he(t,e){if(O){var r=y;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=T),jr();return}t!==null&&t.before(e)}var Es=["touchstart","touchmove"];function Ps(t){return Es.includes(t)}function Os(t){let e=0,r=ke(0),n;return()=>{zr()&&(d(r),Fr(()=>(e===0&&(n=Se(()=>t(()=>ge(r)))),e+=1,()=>{Bt(()=>{e-=1,e===0&&(n?.(),n=void 0,ge(r))})})))}}var js=Or|ie;function As(t,e,r,n){new Is(t,e,r,n)}var Is=(tt=new WeakMap,Re=new WeakMap,at=new WeakMap,Qt=new WeakMap,J=new WeakMap,et=new WeakMap,U=new WeakMap,rt=new WeakMap,bt=new WeakMap,It=new WeakMap,Pt=new WeakMap,ue=new WeakMap,qe=new WeakMap,ze=new WeakMap,Ct=new WeakMap,fr=new WeakMap,P=new WeakSet,class{constructor(t,e,r,n){hn(this,P),S(this,"parent",void 0),S(this,"is_pending",!1),S(this,"transform_error",void 0),m(this,tt,void 0),m(this,Re,O?T:null),m(this,at,void 0),m(this,Qt,void 0),m(this,J,void 0),m(this,et,null),m(this,U,null),m(this,rt,null),m(this,bt,null),m(this,It,0),m(this,Pt,0),m(this,ue,!1),m(this,qe,new Set),m(this,ze,new Set),m(this,Ct,null),m(this,fr,Os(()=>(w(Ct,this,ke(l(It,this))),()=>{w(Ct,this,null)}))),w(tt,this,t),w(at,this,e),w(Qt,this,i=>{var s=y;s.b=this,s.f|=128,r(i)}),this.parent=y.b,this.transform_error=n??this.parent?.transform_error??(i=>i),w(J,this,qn(()=>{if(O){const i=l(Re,this);jr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));b(P,this,Ls).call(this,o)}else s?b(P,this,Rs).call(this):b(P,this,Ns).call(this)}else b(P,this,Qn).call(this)},js)),O&&w(tt,this,T)}defer_effect(t){$n(t,l(qe,this),l(ze,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!l(at,this).pending}update_pending_count(t,e){b(P,this,ti).call(this,t,e),w(It,this,l(It,this)+t),l(Ct,this)&&!l(ue,this)&&(w(ue,this,!0),Bt(()=>{w(ue,this,!1),l(Ct,this)&&tr(l(Ct,this),l(It,this))}))}get_effect_pending(){return l(fr,this).call(this),d(l(Ct,this))}error(t){if(!l(at,this).onerror&&!l(at,this).failed)throw t;$?.is_fork?(l(et,this)&&$.skip_effect(l(et,this)),l(U,this)&&$.skip_effect(l(U,this)),l(rt,this)&&$.skip_effect(l(rt,this)),$.oncommit(()=>{b(P,this,an).call(this,t)})):b(P,this,an).call(this,t)}});function Ns(){try{w(et,this,kt(()=>l(Qt,this).call(this,l(tt,this))))}catch(t){this.error(t)}}function Ls(t){const e=l(at,this).failed,{reset:r,invoke_onerror:n}=b(P,this,Gn).call(this,t);Bt(n),e&&w(rt,this,kt(()=>{e(l(tt,this),()=>t,()=>r)}))}function Gn(t){var e=!1,r=!1;const n=()=>{if(e){Ii();return}e=!0,r&&Yi(),l(rt,this)!==null&&Me(l(rt,this),()=>{w(rt,this,null)}),b(P,this,Br).call(this,()=>{b(P,this,Qn).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,l(at,this).onerror?.(t,n),r=!1}catch(i){gt(i,l(J,this)&&l(J,this).parent)}}}}function Rs(){const t=l(at,this).pending;t&&(this.is_pending=!0,w(U,this,kt(()=>t(l(tt,this)))),Bt(()=>{var e=w(bt,this,document.createDocumentFragment()),r=Ht(),n=!1;if(e.append(r),w(et,this,b(P,this,Br).call(this,()=>{try{return kt(()=>l(Qt,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(s){gt(s,l(J,this).parent)}return null}})),l(et,this)===null){w(bt,this,null),n&&b(P,this,er).call(this,$);return}l(Pt,this)===0&&(l(tt,this).before(e),w(bt,this,null),Me(l(U,this),()=>{w(U,this,null)}),b(P,this,er).call(this,$))}))}function Qn(){try{if(this.is_pending=this.has_pending_snippet(),w(Pt,this,0),w(It,this,0),w(et,this,kt(()=>{l(Qt,this).call(this,l(tt,this))})),l(Pt,this)>0){var t=w(bt,this,document.createDocumentFragment());Hn(l(et,this),t);const e=l(at,this).pending;w(U,this,kt(()=>e(l(tt,this))))}else b(P,this,er).call(this,$)}catch(e){this.error(e)}}function er(t){this.is_pending=!1,t.transfer_effects(l(qe,this),l(ze,this))}function Br(t){var e=y,r=k,n=j;_t(l(J,this)),it(l(J,this)),ee(l(J,this).ctx);try{return se.ensure(),t()}finally{_t(e),it(r),ee(n)}}function ti(t,e){if(!this.has_pending_snippet()){var r;this.parent&&b(P,r=this.parent,ti).call(r,t,e);return}w(Pt,this,l(Pt,this)+t),l(Pt,this)===0&&(b(P,this,er).call(this,e),l(U,this)&&Me(l(U,this),()=>{w(U,this,null)}),l(bt,this)&&(l(tt,this).before(l(bt,this)),w(bt,this,null)))}function an(t){l(et,this)&&(X(l(et,this)),w(et,this,null)),l(U,this)&&(X(l(U,this)),w(U,this,null)),l(rt,this)&&(X(l(rt,this)),w(rt,this,null)),O&&(wt(l(Re,this)),Ni(),wt(wn()));let e=l(at,this).failed;const r=n=>{const{reset:i,invoke_onerror:s}=b(P,this,Gn).call(this,n);s(),e&&w(rt,this,b(P,this,Br).call(this,()=>{try{return kt(()=>{var o=y;o.b=this,o.f|=128,e(l(tt,this),()=>n,()=>i)})}catch(o){return gt(o,l(J,this).parent),null}}))};Bt(()=>{var n;try{n=this.transform_error(t)}catch(i){gt(i,l(J,this)&&l(J,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>gt(i,l(J,this)&&l(J,this).parent)):r(n)})}function un(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[Fe]??(t[Fe]=t.nodeValue))&&(t[Fe]=r,t.nodeValue=`${r}`)}function ei(t,e){return ri(t,e)}function qs(t,e){Cr(),e.intro=e.intro??!1;const r=e.target,n=O,i=T;try{for(var s=re(r);s&&(s.nodeType!==8||s.data!=="[");)s=Ot(s);if(!s)throw te;Zt(!0),wt(s);const o=ri(t,{...e,anchor:s});return Zt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==te&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Vi(),Cr(),hs(r),Zt(!1),ei(t,e)}finally{Zt(n),wt(i)}}var Ie=new Map;function ri(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){Cr();var c=void 0,u=ms(()=>{var f=r??e.appendChild(Ht());As(f,{pending:()=>{}},h=>{Ar({});var _=j;if(s&&(_.c=s),i&&(n.$$events=i),O&&Ve(h,null),c=t(h,n)||Nr(),O&&(y.nodes.end=T,T===null||T.nodeType!==8||T.data!=="]"))throw rr(),te;Ir()},a);var v=new Set,p=h=>{for(var _=0;_<h.length;_++){var M=h[_];if(!v.has(M)){v.add(M);var D=Ps(M);for(const H of[e,document]){var L=Ie.get(H);L===void 0&&(L=new Map,Ie.set(H,L));var B=L.get(M);B===void 0?(H.addEventListener(M,on,{passive:D}),L.set(M,1)):L.set(M,B+1)}}}};return p($i(Ss)),ln.add(p),()=>{for(var h of v)for(const D of[e,document]){var _=Ie.get(D),M=_.get(h);--M==0?(D.removeEventListener(h,on),_.delete(h),_.size===0&&Ie.delete(D)):_.set(h,M)}ln.delete(p),f!==r&&f.parentNode?.removeChild(f)}});return Wr.set(c,u),c}var Wr=new WeakMap;function zs(t,e){const r=Wr.get(t);return r?(Wr.delete(t),r(e)):Promise.resolve()}var Fs=(ht=new WeakMap,yt=new WeakMap,G=new WeakMap,Kt=new WeakMap,Pe=new WeakMap,Oe=new WeakMap,hr=new WeakMap,class{constructor(t,e=!0){S(this,"anchor",void 0),m(this,ht,new Map),m(this,yt,new Map),m(this,G,new Map),m(this,Kt,new Set),m(this,Pe,!0),m(this,Oe,r=>{if(l(ht,this).has(r)){var n=l(ht,this).get(r),i=l(yt,this).get(n);if(i)en(i),l(Kt,this).delete(n);else{var s=l(G,this).get(n);s&&(en(s.effect),l(yt,this).set(n,s.effect),l(G,this).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[o,a]of l(ht,this)){if(l(ht,this).delete(o),o===r)break;const c=l(G,this).get(a);c&&(X(c.effect),l(G,this).delete(a))}for(const[o,a]of l(yt,this)){if(o===n||l(Kt,this).has(o))continue;const c=()=>{if(Array.from(l(ht,this).values()).includes(o)){var u=document.createDocumentFragment();Hn(a,u),u.append(Ht()),l(G,this).set(o,{effect:a,fragment:u})}else X(a);l(Kt,this).delete(o),l(yt,this).delete(o)};l(Pe,this)||!i?(l(Kt,this).add(o),Me(a,c,!1)):c()}}}),m(this,hr,r=>{l(ht,this).delete(r);const n=Array.from(l(ht,this).values());for(const[i,s]of l(G,this))n.includes(i)||(X(s.effect),l(G,this).delete(i))}),this.anchor=t,w(Pe,this,e)}ensure(t,e){var r=$,n=vs();if(e&&!l(yt,this).has(t)&&!l(G,this).has(t))if(n){var i=document.createDocumentFragment(),s=Ht();i.append(s),l(G,this).set(t,{effect:kt(()=>e(s)),fragment:i})}else l(yt,this).set(t,kt(()=>e(this.anchor)));if(l(ht,this).set(r,t),n){for(const[o,a]of l(yt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of l(G,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(l(Oe,this)),r.ondiscard(l(hr,this))}else O&&(this.anchor=T),l(Oe,this).call(this,r)}});function Ds(t){j===null&&qi("onMount"),ir&&j.l!==null?Bs(j).m.push(t):Tr(()=>{const e=Se(t);if(typeof e=="function")return e})}function Bs(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}function _r(t,e,r=!1){var n;O&&(n=T,jr());var i=new Fs(t),s=r?Or:0;function o(a,c){if(O){var u=Li(n);if(a!==parseInt(u.substring(1))){var f=wn();wt(f),i.anchor=f,Zt(!1),i.ensure(a,c),Zt(!0);return}}i.ensure(a,c)}qn(()=>{var a=!1;e((c,u=0)=>{a=!0,o(u,c)}),a||o(-1,null)},s)}function Hs(t,e){Rn(()=>{t=y?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=qr("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var Vs=Symbol("is custom element"),Js=Symbol("is html"),Ks=ji?"link":"LINK";function Ut(t,e,r,n){var i=Us(t);O&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===Ks)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Ei]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Xs(t).has(e)?t[e]=r:t.setAttribute(e,r))}function Us(t){return t[br]??(t[br]={[Vs]:t.nodeName.includes("-"),[Js]:t.namespaceURI===_i})}var cn=new Map;function Xs(t){var e=t.getAttribute("is")||t.nodeName,r=cn.get(e);if(r)return r;cn.set(e,r=new Set);for(var n,i=t,s=Element.prototype;s!==i;){n=bi(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=vn(i)}return r}function mr(t,e){return t===e||t?.[de]===e}function fn(t=Nr(),e,r,n){var i=j.r,s=y;return Rn(()=>{var o,a;return Fr(()=>{o=a,a=n?.()||[],Se(()=>{mr(r(...a),t)||(e(t,...a),o&&mr(r(...o),t)&&e(null,...o))})}),()=>{let c=s;for(;c!==i&&c.parent!==null&&c.parent.f&33554432;)c=c.parent;const u=()=>{a&&mr(r(...a),t)&&e(null,...a)},f=c.teardown;c.teardown=()=>{u(),f?.()}}}),t}var Ne=!1;function Ys(t){var e=Ne;try{return Ne=!1,[t(),Ne]}finally{Ne=e}}function V(t,e,r,n){var i=!ir||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,c=!0,u=void 0,f=()=>o&&i?(u??(u=_e(n)),d(u)):(c&&(c=!1,a=o?Se(n):n),a);let v;if(s){var p=de in t||gn in t;v=Ft(t,e)?.set??(p&&e in t?N=>t[e]=N:void 0)}var h,_=!1;s?[h,_]=Ys(()=>t[e]):h=t[e],h===void 0&&n!==void 0&&(h=f(),v&&(i&&Ji(e),v(h)));var M;if(i?M=()=>{var N=t[e];return N===void 0?f():(c=!0,N)}:M=()=>{var N=t[e];return N!==void 0&&(a=void 0),N===void 0?a:N},i&&(r&4)===0)return M;if(v){var D=t.$$legacy;return(function(N,xt){return arguments.length>0?((!i||!xt||D||_)&&v(xt?M():N),N):M()})}var L=!1,B=((r&1)!==0?_e:kn)(()=>(L=!1,M()));s&&d(B);var H=y;return(function(N,xt){if(arguments.length>0){const Z=xt?d(B):i&&s?Gt(N):N;return x(B,Z),L=!0,a!==void 0&&(a=Z),N}return Mt&&L||(H.f&16384)!==0?B.v:d(B)})}function Zs(t){return new Gs(t)}var Gs=(Tt=new WeakMap,lt=new WeakMap,class{constructor(t){m(this,Tt,void 0),m(this,lt,void 0);var e=new Map,r=(i,s)=>{var o=cs(s,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,s){return d(e.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===gn?!0:(d(e.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return x(e.get(s)??r(s,o),o),Reflect.set(i,s,o)}});w(lt,this,(t.hydrate?qs:ei)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&F(),w(Tt,this,n.$$events);for(const i of Object.keys(l(lt,this)))i==="$set"||i==="$destroy"||i==="$on"||we(this,i,{get(){return l(lt,this)[i]},set(s){l(lt,this)[i]=s},enumerable:!0});l(lt,this).$set=i=>{Object.assign(n,i)},l(lt,this).$destroy=()=>{zs(l(lt,this))}}$set(t){l(lt,this).$set(t)}$on(t,e){l(Tt,this)[t]=l(Tt,this)[t]||[];const r=(...n)=>e.call(this,...n);return l(Tt,this)[t].push(r),()=>{l(Tt,this)[t]=l(Tt,this)[t].filter(n=>n!==r)}}$destroy(){l(lt,this).$destroy()}}),ni;typeof HTMLElement=="function"&&(ni=class extends HTMLElement{constructor(t,e,r){var n=(...i)=>(super(...i),S(this,"$$ctor",void 0),S(this,"$$s",void 0),S(this,"$$c",void 0),S(this,"$$cn",!1),S(this,"$$d",{}),S(this,"$$r",!1),S(this,"$$p_d",{}),S(this,"$$l",{}),S(this,"$$l_u",new Map),S(this,"$$me",void 0),S(this,"$$shadowRoot",null),this);n(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=qr("slot");n!=="default"&&(s.name=n),he(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Qs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Je(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Zs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=_s(()=>{Fr(()=>{this.$$r=!0;for(const n of Ke(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Je(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Je(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Ke(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Je(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Qs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ii(t,e,r,n,i,s){let o=class extends ni{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Ke(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Ke(e).forEach(a=>{we(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(c){c=Je(a,c,e),this.$$d[a]=c;var u=this.$$c;u&&(Ft(u,a)?.get?u[a]=c:u.$set({[a]:c}))}})}),n.forEach(a=>{we(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),t.element=o,o}function tl(t){const e=new Set,r=n=>{if(n===void 0)return{$type:"undefined"};if(typeof n=="bigint")return{$type:"bigint",value:n.toString()};if(typeof n=="function")return{$type:"function",value:n.toString()};if(typeof n=="symbol")return{$type:"symbol",value:n.description??""};if(n===null||typeof n!="object")return n;if(e.has(n))return{$type:"circular-reference"};e.add(n);const i=Array.isArray(n)?n.map(r):Object.fromEntries(Object.entries(n).sort(([s],[o])=>s.localeCompare(o)).map(([s,o])=>[s,r(o)]));return e.delete(n),i};return JSON.stringify(r(t))}var el=lr('<div class="pie-tool-calculator__loading svelte-16ps7c2"> </div>'),rl=lr('<div class="pie-tool-calculator__loading pie-tool-calculator__loading--error svelte-16ps7c2">Calculator failed to initialize. <div class="pie-tool-calculator__error-details svelte-16ps7c2"> </div></div>'),nl=lr('<div class="pie-tool-calculator notranslate svelte-16ps7c2" role="region" tabindex="-1" translate="no"><div class="pie-tool-calculator__container svelte-16ps7c2"></div> <!> <!></div>'),il=lr('<div class="pie-tool-calculator__context-host svelte-16ps7c2"><!></div>'),sl={hash:"svelte-16ps7c2",code:`.pie-tool-calculator__context-host.svelte-16ps7c2 {display:flex;width:100%;height:100%;min-height:0;}.pie-tool-calculator.svelte-16ps7c2 {position:relative;display:flex;flex:1 1 auto;min-width:100%;min-height:0;background:var(--pie-white, white);overflow:hidden;}.pie-tool-calculator__container.svelte-16ps7c2 {position:relative;width:100%;height:100%;min-width:100%;min-height:100%;
|
|
3
|
-
/*
|
|
4
|
-
* \`--pie-white\`, not the literal. The token inverts by design (#ffffff light,
|
|
5
|
-
* #000000 dark, redefined per colour scheme), so a hardcoded white showed
|
|
6
|
-
* through as a white plate behind a dark calculator the moment a provider's own
|
|
7
|
-
* surface stopped being opaque — and under a PNP colour scheme it was simply
|
|
8
|
-
* the wrong colour.
|
|
9
|
-
*/background:var(--pie-white, white);overflow:hidden;}.pie-tool-calculator__mount {width:100%;height:100%;min-width:100%;min-height:100%;}.pie-tool-calculator__loading.svelte-16ps7c2 {position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb, var(--pie-white, #fff) 90%, transparent);color:var(--pie-text, #334155);font-size:0.9rem;}.pie-tool-calculator__loading--error.svelte-16ps7c2 {flex-direction:column;gap:0.5rem;padding:0.75rem;color:var(--pie-incorrect, #b91c1c);text-align:center;}.pie-tool-calculator__error-details.svelte-16ps7c2 {max-width:95%;color:var(--pie-incorrect, #7f1d1d);font-size:0.8rem;line-height:1.2;word-break:break-word;}.pie-tool-calculator__mount > * {width:100% !important;height:100% !important;}`};function si(t,e){Ar(e,!0),Hs(t,sl);let r=V(e,"visible",7,!1),n=V(e,"toolId",7,"calculator"),i=V(e,"providerId",7,""),s=V(e,"calculatorType",7,"basic"),o=V(e,"availableTypes",23,()=>["basic","scientific","graphing"]),a=V(e,"calculatorConfig",23,()=>({})),c=V(e,"toolkitCoordinator",7,null),u=z(null),f=z(null),v=z(null),p=z(null),h=z(!1),_=z(null),M=z(!1);const D=ce(()=>wi(d(v))),L=ce(()=>c()??d(v)?.toolkitCoordinator),B=ce(()=>(typeof o()=="string"?o().split(",").map(g=>g.trim()):o()).filter(g=>g==="basic"||g==="scientific"||g==="graphing")),H=ce(()=>d(B).includes(s())?s():d(B)[0]??"basic"),N=ce(()=>tl(a()));let xt=null,Z=null,jt=0,or=!1,Ce=null;const Te=new Set;Tr(()=>{if(d(u))return gi(d(u),g=>{x(v,g,!0)})});function Hr(){Ce?.disconnect(),Ce=null;for(const g of Te)clearTimeout(g);Te.clear()}function ar(){jt+=1,Hr();const g=d(p),W=Z;x(p,null),Z=null;try{g?.destroy()}catch(C){console.warn("[CalculatorTool] calculator cleanup failed:",C)}W?.remove(),xt=null,x(h,!1),x(M,!1)}function Vr(){requestAnimationFrame(()=>{if(!r()||!d(p)||!Z?.isConnected)return;const g=document.activeElement;g instanceof Node&&Z.contains(g)||d(p).focus?.()})}function li(g,W){Hr(),typeof ResizeObserver<"u"&&(Ce=new ResizeObserver(()=>{r()&&W.isConnected&&g.resize?.()}),Ce.observe(W));for(const C of[60,250,1e3]){const R=setTimeout(()=>{Te.delete(R),r()&&W.isConnected&&g.resize?.()},C);Te.add(R)}}async function oi(g,W,C){x(h,!0),x(_,null);try{if(!i())throw new Error("Calculator provider id is required");const R=d(L)?.toolProviderRegistry;if(!R)throw new Error("Calculator provider registry is unavailable");const ur=await(await R.getProvider(i())).createInstance();if(g!==jt||!r()||!C.isConnected){C.remove();return}const Jt=await ur.createCalculator(d(H),C,a());if(g!==jt||!r()||!C.isConnected){Jt.destroy(),C.remove();return}x(p,Jt,!0),xt=W,x(M,C.childElementCount>0),li(Jt,C),requestAnimationFrame(()=>{g===jt&&(Jt.resize?.(),x(M,C.childElementCount>0),Vr())})}catch(R){if(g!==jt){C.remove();return}x(_,R instanceof Error?R.message:String(R),!0),x(p,null),Z===C&&(Z=null),C.remove(),x(M,!1)}finally{g===jt&&x(h,!1)}}function ai(){or=!1;const g=d(f),W=d(L);if(!r()||!g||!g.isConnected||!W){(d(p)||d(h)||Z)&&ar(),x(_,null);return}const C=`${i()}:${d(H)}:${d(N)}`;if(d(p)&&xt===C){Vr();return}(d(p)||d(h)||Z)&&ar();const R=document.createElement("div");R.className="pie-tool-calculator__mount",g.replaceChildren(R),Z=R,oi(++jt,C,R)}function ui(){or||(or=!0,queueMicrotask(ai))}Tr(()=>{r(),i(),d(H),a(),d(N),d(f),d(L),Se(ui)}),Ds(()=>()=>ar());var ci={get visible(){return r()},set visible(g=!1){r(g),F()},get toolId(){return n()},set toolId(g="calculator"){n(g),F()},get providerId(){return i()},set providerId(g=""){i(g),F()},get calculatorType(){return s()},set calculatorType(g="basic"){s(g),F()},get availableTypes(){return o()},set availableTypes(g=["basic","scientific","graphing"]){o(g),F()},get calculatorConfig(){return a()},set calculatorConfig(g={}){a(g),F()},get toolkitCoordinator(){return c()},set toolkitCoordinator(g=null){c(g),F()}},We=il(),fi=Be(We),hi=g=>{var W=nl(),C=Be(W);fn(C,st=>x(f,st),()=>d(f));var R=dr(C,2),ur=st=>{var St=el(),le=tn(St,!0);pr(di=>un(le,di),[()=>d(D).t("tools.calculator.loading")]),he(st,St)};_r(R,st=>{(d(h)||!d(_)&&!d(M))&&st(ur)});var Jt=dr(R,2),vi=st=>{var St=rl(),le=tn(dr(Be(St)),!0);De(St),pr(()=>un(le,d(_))),he(st,St)};_r(Jt,st=>{d(_)&&st(vi)}),De(W),pr((st,St,le)=>{Ut(W,"data-tool-id",n()),Ut(W,"data-provider-id",i()),Ut(W,"lang",st),Ut(W,"dir",St),Ut(W,"aria-label",le),Ut(C,"data-calculator-type",d(H)),W.dir=W.dir},[()=>d(D).getLocale(),()=>d(D).getDirection?.()??"ltr",()=>d(D).t("tools.calculator.toolA11y")]),he(g,W)};return _r(fi,g=>{r()&&g(hi)}),De(We),fn(We,g=>x(u,g),()=>d(u)),he(t,We),Ir(ci)}ii(si,{visible:{},toolId:{},providerId:{},calculatorType:{},availableTypes:{},calculatorConfig:{},toolkitCoordinator:{}},[],[],{mode:"open"});function ll(t,e){Ar(e,!0);let r=V(e,"visible",7,!1),n=V(e,"toolId",7,"calculator"),i=V(e,"providerId",7,"calculator-cortex"),s=V(e,"calculatorType",7,"basic"),o=V(e,"availableTypes",23,()=>["basic","scientific","graphing"]),a=V(e,"calculatorConfig",23,()=>({})),c=V(e,"toolkitCoordinator",7,null);return si(t,{get visible(){return r()},get toolId(){return n()},get providerId(){return i()},get calculatorType(){return s()},get availableTypes(){return o()},get calculatorConfig(){return a()},get toolkitCoordinator(){return c()}}),Ir({get visible(){return r()},set visible(u=!1){r(u),F()},get toolId(){return n()},set toolId(u="calculator"){n(u),F()},get providerId(){return i()},set providerId(u="calculator-cortex"){i(u),F()},get calculatorType(){return s()},set calculatorType(u="basic"){s(u),F()},get availableTypes(){return o()},set availableTypes(u=["basic","scientific","graphing"]){o(u),F()},get calculatorConfig(){return a()},set calculatorConfig(u={}){a(u),F()},get toolkitCoordinator(){return c()},set toolkitCoordinator(u=null){c(u),F()}})}ol("pie-tool-calculator-cortex",ii(ll,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},providerId:{attribute:"provider-id",type:"String"},calculatorType:{attribute:"calculator-type",type:"String"},availableTypes:{attribute:"available-types",type:"Array"},calculatorConfig:{type:"Object"},toolkitCoordinator:{type:"Object"}},[],[],void 0,pi));function ol(t,e){customElements.get(t)||customElements.define(t,e)}export{ll as default};
|