@pie-players/pie-assessment-toolkit 0.3.73 → 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 +469 -318
- package/dist/attempt/AssessmentSession.d.ts +1 -5
- package/dist/attempt/AssessmentSession.js +0 -29
- package/dist/attempt/TestSession.d.ts +1 -20
- package/dist/attempt/TestSession.js +8 -99
- package/dist/components/ItemScope.custom-element.d.ts +1 -0
- package/dist/components/ItemScope.custom-element.js +1 -0
- package/dist/components/ItemToolBar.custom-element.d.ts +1 -0
- package/dist/components/ItemToolBar.custom-element.js +1 -1
- package/dist/components/PieAssessmentToolkit.custom-element.d.ts +1 -0
- package/dist/components/PieAssessmentToolkit.custom-element.js +13 -13
- package/dist/components/SectionToolBar.custom-element.d.ts +1 -0
- package/dist/components/SectionToolBar.custom-element.js +1 -1
- package/dist/components/chunks/ItemToolBar-7tt7v2xp.js +4 -0
- package/dist/components/chunks/ItemToolBar-97hx60z4.js +2 -0
- package/dist/components/chunks/ItemToolBar-bxwyhr5p.js +2 -0
- package/dist/components/chunks/ItemToolBar-jx38w99s.js +2 -0
- package/dist/components/chunks/ItemToolBar-rd2bb4p6.js +40 -0
- package/dist/components/chunks/ItemToolBar-vdkyn9f3.js +2 -0
- package/dist/components/chunks/sre-engine-jd8cc08x.js +1 -0
- package/dist/components/item-scope-element.d.ts +2 -0
- package/dist/components/item-scope-element.js +2 -0
- package/dist/context/assessment-toolkit-context.d.ts +32 -6
- package/dist/index.d.ts +23 -48
- package/dist/index.js +12 -37
- package/dist/policy/core/PolicySource.d.ts +1 -1
- package/dist/policy/core/ToolPolicyEngine.d.ts +85 -34
- package/dist/policy/core/ToolPolicyEngine.js +148 -46
- package/dist/policy/core/compose-decision.d.ts +28 -7
- package/dist/policy/core/compose-decision.js +75 -54
- package/dist/policy/core/decision-types.d.ts +65 -34
- package/dist/policy/core/feature-decision.d.ts +16 -9
- package/dist/policy/core/feature-decision.js +14 -8
- package/dist/policy/core/pnp-policy-inputs.d.ts +24 -33
- package/dist/policy/core/pnp-policy-inputs.js +28 -56
- package/dist/policy/core/provenance.d.ts +9 -4
- package/dist/policy/core/provenance.js +1 -1
- package/dist/policy/engine.d.ts +7 -23
- package/dist/policy/engine.js +5 -20
- package/dist/policy/sources/PnpPolicySource.d.ts +44 -61
- package/dist/policy/sources/PnpPolicySource.js +117 -118
- package/dist/runtime/SectionControllerBinding.d.ts +279 -0
- package/dist/runtime/SectionControllerBinding.js +450 -0
- package/dist/runtime/SectionRuntimeEngine.d.ts +26 -289
- package/dist/runtime/SectionRuntimeEngine.js +30 -372
- package/dist/runtime/adapter/SectionEngineAdapter.d.ts +19 -80
- package/dist/runtime/adapter/SectionEngineAdapter.js +19 -92
- package/dist/runtime/adapter/dom-event-bridge.d.ts +15 -30
- package/dist/runtime/adapter/dom-event-bridge.js +17 -44
- package/dist/runtime/adapter/subscriber-fanout.d.ts +1 -2
- package/dist/runtime/adapter/subscriber-fanout.js +1 -2
- package/dist/runtime/catalog-context.d.ts +19 -0
- package/dist/runtime/catalog-context.js +28 -0
- package/dist/runtime/composition-emit-scheduler.d.ts +9 -15
- package/dist/runtime/composition-emit-scheduler.js +9 -15
- package/dist/runtime/content-language.d.ts +32 -0
- package/dist/runtime/content-language.js +46 -0
- package/dist/runtime/content-region.d.ts +17 -0
- package/dist/runtime/content-region.js +29 -0
- package/dist/runtime/content-registration.d.ts +13 -0
- package/dist/runtime/content-registration.js +25 -0
- package/dist/runtime/core/SectionEngineCore.d.ts +2 -2
- package/dist/runtime/core/SectionEngineCore.js +2 -2
- package/dist/runtime/core/cohort.d.ts +1 -1
- package/dist/runtime/core/cohort.js +1 -1
- package/dist/runtime/core/engine-input.d.ts +18 -30
- package/dist/runtime/core/engine-input.js +11 -12
- package/dist/runtime/core/engine-output.d.ts +16 -40
- package/dist/runtime/core/engine-output.js +9 -21
- package/dist/runtime/core/engine-readiness.d.ts +5 -37
- package/dist/runtime/core/engine-readiness.js +8 -41
- package/dist/runtime/core/engine-resolver.d.ts +46 -74
- package/dist/runtime/core/engine-resolver.js +18 -43
- package/dist/runtime/core/engine-state.d.ts +28 -36
- package/dist/runtime/core/engine-state.js +18 -21
- package/dist/runtime/core/engine-transition.d.ts +14 -19
- package/dist/runtime/core/engine-transition.js +71 -51
- package/dist/runtime/engine.d.ts +16 -19
- package/dist/runtime/engine.js +12 -19
- package/dist/runtime/page-warnings.d.ts +13 -0
- package/dist/runtime/page-warnings.js +22 -0
- package/dist/runtime/policy-input-forwarding.d.ts +25 -0
- package/dist/runtime/policy-input-forwarding.js +25 -0
- package/dist/runtime/registration-events.d.ts +14 -0
- package/dist/runtime/runtime-event-claim.d.ts +8 -0
- package/dist/runtime/runtime-event-claim.js +15 -0
- package/dist/runtime/shell-event-bridge.d.ts +45 -0
- package/dist/runtime/shell-event-bridge.js +127 -0
- package/dist/runtime/shell-registration.d.ts +73 -0
- package/dist/runtime/shell-registration.js +95 -0
- package/dist/runtime/shell-scope.d.ts +68 -0
- package/dist/runtime/shell-scope.js +188 -0
- package/dist/runtime/tool-host-contract.d.ts +28 -10
- package/dist/runtime/tool-host-contract.js +31 -10
- package/dist/runtime/unclaimed-registration-watch.d.ts +7 -0
- package/dist/runtime/unclaimed-registration-watch.js +23 -0
- package/dist/services/ElementToolStateStore.d.ts +14 -10
- package/dist/services/ElementToolStateStore.js +37 -13
- package/dist/services/HighlightCoordinator.d.ts +22 -28
- package/dist/services/HighlightCoordinator.js +431 -327
- package/dist/services/RangeSerializer.d.ts +10 -1
- package/dist/services/RangeSerializer.js +87 -14
- package/dist/services/TTSService.d.ts +130 -69
- package/dist/services/TTSService.js +713 -570
- package/dist/services/ToolCoordinator.d.ts +43 -66
- package/dist/services/ToolCoordinator.js +164 -208
- package/dist/services/ToolRegistry.d.ts +78 -54
- package/dist/services/ToolRegistry.js +107 -105
- package/dist/services/ToolkitCoordinator.d.ts +261 -175
- package/dist/services/ToolkitCoordinator.js +667 -433
- package/dist/services/audio-handoff.d.ts +6 -7
- package/dist/services/audio-handoff.js +20 -14
- package/dist/services/catalog-owner.d.ts +11 -1
- package/dist/services/catalog-owner.js +25 -0
- package/dist/services/create-tools-config.d.ts +2 -2
- package/dist/services/framework-error-bus.d.ts +3 -6
- package/dist/services/framework-error-bus.js +3 -6
- package/dist/services/framework-error.d.ts +30 -8
- package/dist/services/framework-error.js +9 -7
- package/dist/services/interfaces.d.ts +158 -129
- package/dist/services/section-controller-types.d.ts +15 -0
- package/dist/services/section-session-assignment.d.ts +21 -0
- package/dist/services/section-session-assignment.js +82 -0
- package/dist/services/spoken-audio-cards.d.ts +0 -2
- package/dist/services/spoken-audio-cards.js +1 -3
- package/dist/services/tool-config-defaults.d.ts +3 -3
- package/dist/services/tool-config-defaults.js +3 -3
- package/dist/services/tool-config-validation.d.ts +14 -4
- package/dist/services/tool-config-validation.js +63 -71
- package/dist/services/tool-context.d.ts +0 -8
- package/dist/services/tool-context.js +29 -25
- package/dist/services/tool-icons.d.ts +4 -3
- package/dist/services/tool-icons.js +4 -3
- package/dist/services/tool-instance-id.d.ts +0 -1
- package/dist/services/tool-instance-id.js +0 -6
- package/dist/services/tool-providers/TTSToolProvider.d.ts +41 -80
- package/dist/services/tool-providers/TTSToolProvider.js +81 -40
- package/dist/services/tool-providers/ToolProviderApi.d.ts +10 -4
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts +32 -28
- package/dist/services/tool-providers/ToolProviderRegistry.js +121 -107
- package/dist/services/tool-providers/index.d.ts +0 -9
- package/dist/services/tool-providers/index.js +2 -4
- package/dist/services/tool-request.d.ts +27 -12
- package/dist/services/tool-request.js +24 -14
- package/dist/services/toolbar-decided-tools.d.ts +15 -0
- package/dist/services/toolbar-decided-tools.js +28 -0
- package/dist/services/tools-config-normalizer.d.ts +37 -23
- package/dist/services/tools-config-normalizer.js +2 -10
- package/dist/services/tts/browser-provider.d.ts +38 -2
- package/dist/services/tts/browser-provider.js +276 -140
- package/dist/services/tts/catalog-span-alignment.d.ts +2 -17
- package/dist/services/tts/catalog-span-alignment.js +17 -142
- package/dist/services/tts/flat-tree.d.ts +71 -0
- package/dist/services/tts/flat-tree.js +269 -0
- package/dist/services/tts/generated-speech/assemble-plan.d.ts +3 -1
- package/dist/services/tts/generated-speech/assemble-plan.js +3 -1
- package/dist/services/tts/generated-speech/dom/build-dom-plan.d.ts +2 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js +1 -1
- package/dist/services/tts/generated-speech/math-speech-cache.d.ts +3 -1
- package/dist/services/tts/generated-speech/math-speech-cache.js +5 -1
- package/dist/services/tts/generated-speech/types.d.ts +0 -12
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.js +12 -62
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +38 -5
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.js +3 -6
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js +6 -4
- package/dist/services/tts/highlight-pipeline/readable-region.js +3 -2
- package/dist/services/tts/highlight-pipeline/types.d.ts +5 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.d.ts +12 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js +73 -7
- package/dist/services/tts/math-alignment/index.d.ts +0 -5
- package/dist/services/tts/math-alignment/index.js +5 -25
- package/dist/services/tts/math-alignment/speech-tokenizer.d.ts +9 -1
- package/dist/services/tts/math-alignment/speech-tokenizer.js +38 -36
- package/dist/services/tts/math-alignment/types.d.ts +4 -2
- package/dist/services/tts/math-aware-text-processing.d.ts +5 -1
- package/dist/services/tts/math-aware-text-processing.js +74 -18
- package/dist/services/tts/math-control-names.d.ts +21 -0
- package/dist/services/tts/math-control-names.js +142 -0
- package/dist/services/tts/math-speech.d.ts +16 -1
- package/dist/services/tts/math-speech.js +55 -19
- package/dist/services/tts/provider-options.d.ts +41 -0
- package/dist/services/tts/provider-options.js +1 -0
- package/dist/services/tts/sre-engine.d.ts +7 -0
- package/dist/services/tts/sre-engine.js +11 -0
- package/dist/services/tts/sre-locales.d.ts +14 -0
- package/dist/services/tts/sre-locales.js +57 -0
- package/dist/services/tts/ssml/spoken-text.d.ts +2 -26
- package/dist/services/tts/ssml/spoken-text.js +29 -0
- package/dist/services/tts/start-failure.d.ts +11 -0
- package/dist/services/tts/start-failure.js +19 -0
- package/dist/services/tts/text-processing.d.ts +9 -1
- package/dist/services/tts/text-processing.js +46 -34
- package/dist/services/tts/text-segmentation.d.ts +7 -0
- package/dist/services/tts/text-segmentation.js +47 -0
- package/dist/services/tts-runtime-config.d.ts +44 -18
- package/dist/services/tts-runtime-config.js +22 -93
- package/dist/tools/content-capability-resolution.d.ts +7 -9
- package/dist/tools/content-capability-resolution.js +8 -45
- package/dist/tools/registration.d.ts +58 -0
- package/dist/tools/registration.js +54 -0
- package/dist/tools/registrations/toolbar-registration-helpers.js +2 -2
- package/dist/tools/tool-surface-host.d.ts +6 -10
- package/dist/tools/tool-surface-host.js +44 -42
- package/dist/tools/tool-tag-map.d.ts +5 -15
- package/dist/tools/tool-tag-map.js +6 -20
- package/dist/utils/structural-equality.d.ts +11 -0
- package/dist/utils/structural-equality.js +47 -0
- package/package.json +24 -59
- package/dist/attempt/adapters/activity-to-test-attempt-session.d.ts +0 -49
- package/dist/attempt/adapters/activity-to-test-attempt-session.js +0 -138
- package/dist/components/chunks/ItemToolBar-byq80z42.js +0 -40
- package/dist/components/chunks/ItemToolBar-d36g3aw4.js +0 -49
- package/dist/context/runtime-context-consumer.d.ts +0 -13
- package/dist/context/runtime-context-consumer.js +0 -51
- package/dist/item-loader.d.ts +0 -44
- package/dist/item-loader.js +0 -61
- package/dist/policy/core/engine-context.d.ts +0 -29
- package/dist/policy/core/engine-context.js +0 -27
- package/dist/policy/core/policy-source-tag.d.ts +0 -31
- package/dist/policy/core/policy-source-tag.js +0 -28
- package/dist/policy/internal.d.ts +0 -25
- package/dist/policy/internal.js +0 -25
- package/dist/runtime/adapter/coordinator-bridge.d.ts +0 -92
- package/dist/runtime/adapter/coordinator-bridge.js +0 -126
- package/dist/runtime/adapter/framework-error-bridge.d.ts +0 -36
- package/dist/runtime/adapter/framework-error-bridge.js +0 -46
- package/dist/runtime/adapter/instrumentation-bridge.d.ts +0 -31
- package/dist/runtime/adapter/instrumentation-bridge.js +0 -38
- package/dist/runtime/core/engine-stage-derivation.d.ts +0 -18
- package/dist/runtime/core/engine-stage-derivation.js +0 -29
- package/dist/runtime/engine-context.d.ts +0 -39
- package/dist/runtime/engine-context.js +0 -31
- package/dist/runtime/internal.d.ts +0 -43
- package/dist/runtime/internal.js +0 -45
- package/dist/runtime/section-runtime-engine-host-context.d.ts +0 -80
- package/dist/runtime/section-runtime-engine-host-context.js +0 -95
- package/dist/runtime/stage-emit-gate.d.ts +0 -92
- package/dist/runtime/stage-emit-gate.js +0 -82
- package/dist/services/I18nService.d.ts +0 -47
- package/dist/services/I18nService.js +0 -84
- package/dist/services/ThemeProvider.d.ts +0 -95
- package/dist/services/ThemeProvider.js +0 -334
- package/dist/services/ToolConfigResolver.d.ts +0 -161
- package/dist/services/ToolConfigResolver.js +0 -229
- package/dist/services/catalog-media.d.ts +0 -56
- package/dist/services/catalog-media.js +0 -190
- package/dist/services/createDefaultToolRegistry.d.ts +0 -53
- package/dist/services/createDefaultToolRegistry.js +0 -45
- package/dist/services/defaultPersonalNeedsProfile.d.ts +0 -21
- package/dist/services/defaultPersonalNeedsProfile.js +0 -26
- package/dist/services/pnp-standard-features.d.ts +0 -238
- package/dist/services/pnp-standard-features.js +0 -338
- package/dist/services/tool-providers/CortexToolProvider.d.ts +0 -13
- package/dist/services/tool-providers/CortexToolProvider.js +0 -32
- package/dist/services/tool-providers/DesmosToolProvider.d.ts +0 -14
- package/dist/services/tool-providers/DesmosToolProvider.js +0 -32
- package/dist/services/tool-providers/GeoGebraToolProvider.d.ts +0 -16
- package/dist/services/tool-providers/GeoGebraToolProvider.js +0 -32
- package/dist/services/tool-providers/LazyCalculatorToolProvider.d.ts +0 -35
- package/dist/services/tool-providers/LazyCalculatorToolProvider.js +0 -95
- package/dist/services/tts/visual-line-ranges.d.ts +0 -18
- package/dist/services/tts/visual-line-ranges.js +0 -226
- package/dist/tools/client.d.ts +0 -12
- package/dist/tools/client.js +0 -14
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.js +0 -10
- package/dist/tools/internal.d.ts +0 -43
- package/dist/tools/internal.js +0 -41
- package/dist/tools/response-discovery.d.ts +0 -61
- package/dist/tools/response-discovery.js +0 -113
- package/dist/tools/types.d.ts +0 -337
- package/dist/tools/types.js +0 -12
- package/dist/tools/variant-resolver.d.ts +0 -41
- package/dist/tools/variant-resolver.js +0 -207
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunks/ItemToolBar-
|
|
1
|
+
import"./chunks/ItemToolBar-rd2bb4p6.js";import"./chunks/ItemToolBar-bxwyhr5p.js";import{$ as Y,G as E,L as W,N as X,Y as w,_ as G,u as U,v as V,x as F}from"./chunks/ItemToolBar-7tt7v2xp.js";import"./chunks/ItemToolBar-97hx60z4.js";var x=(H,A)=>{if(customElements.get(H))return;try{customElements.define(H,A)}catch(C){if(!(C instanceof DOMException&&C.name==="NotSupportedError"||C&&typeof C==="object"&&C.name==="NotSupportedError")||!customElements.get(H))throw C}},D=W("<pie-item-toolbar></pie-item-toolbar>",2);function Z(H,A){U(A,!0);let C=G(A,"enabledTools",7,""),J=G(A,"position",7,"bottom"),K=G(A,"sectionId",7,""),L=G(A,"size",7,"md"),M=G(A,"language",7,""),O=G(A,"toolRegistry",7,null),P=G(A,"item",7,null),Q=G(A,"hostButtons",23,()=>[]);var j={get enabledTools(){return C()},set enabledTools(k){C(k),F()},get position(){return J()},set position(k){J(k),F()},get sectionId(){return K()},set sectionId(k){K(k),F()},get size(){return L()},set size(k){L(k),F()},get language(){return M()},set language(k){M(k),F()},get toolRegistry(){return O()},set toolRegistry(k){O(k),F()},get item(){return P()},set item(k){P(k),F()},get hostButtons(){return Q()},set hostButtons(k){Q(k),F()}},q=D();return w(q,"level","section"),E(()=>w(q,"scope-id",K())),E(()=>w(q,"section-id",K())),E(()=>w(q,"tools",C())),w(q,"content-kind","section"),E(()=>w(q,"position",J())),E(()=>w(q,"size",L())),E(()=>w(q,"language",M())),E(()=>w(q,"toolRegistry",O())),E(()=>w(q,"item",P())),E(()=>w(q,"hostButtons",Q())),X(H,q),V(j)}x("pie-section-toolbar",Y(Z,{enabledTools:{attribute:"enabled-tools",type:"String"},position:{attribute:"position",type:"String"},sectionId:{attribute:"section-id",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"}},[],[],{mode:"open"}));export{Z as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var g9="5";if(typeof window<"u")((window.__svelte??={}).v??=new Set).add(g9);var g=2,h7=4,e7=8,qQ=16777216,n=16,i=32,z7=64,AQ=128,X0=256,G7=512,T=1024,N=2048,m=4096,d=8192,y=16384,V7=32768,QQ=33554432,P7=65536,$Q=131072,h0=262144,v7=524288,h9=1048576,x7=33554432,mQ=2097152,N7=4194304,R7=8388608,q7=Symbol("$state"),Z0=Symbol("component"),uQ=Symbol("legacy props"),v9=Symbol(""),v0=Symbol("proxy path"),z0=Symbol("attributes"),pQ=Symbol("class"),m0=Symbol("style"),fQ=Symbol("text"),u0=Symbol("form reset"),m9=Symbol("hmr anchor"),o7=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},p0=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var NQ=3,D7=8;var u9=1,p9=2,f0=4,f9=8,d9=16,_9=1,l9=2,i9=4,c9=8,o9=16;var s9=1,r9=2;var RQ="[",JQ="[!",d0="[?",UQ="]",m7={};var E=Symbol("uninitialized"),E7=Symbol("filename"),a9=Symbol("hmr"),G0="http://www.w3.org/1999/xhtml",dQ="http://www.w3.org/2000/svg",_0="http://www.w3.org/1998/Math/MathML";function n9(){console.warn("https://svelte.dev/e/derived_inert")}function t9(Q,J,W){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function WQ(Q){console.warn("https://svelte.dev/e/hydration_mismatch")}function e9(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var s7=Array.isArray,QJ=Array.prototype.indexOf,PQ=Array.prototype.includes,jQ=Array.from,_Q=Object.keys,H7=Object.defineProperty,B7=Object.getOwnPropertyDescriptor,V0=Object.getOwnPropertyDescriptors,l0=Object.prototype,JJ=Array.prototype,HQ=Object.getPrototypeOf,i0=Object.isExtensible;var u7=()=>{};function q0(Q){for(var J=0;J<Q.length;J++)Q[J]()}function $0(){var Q,J,W=new Promise((K,X)=>{Q=K,J=X});return{promise:W,resolve:Q,reject:J}}function WJ(Q){var J=L;if(J===null)return O.f|=R7,Q;if((J.f&V7)===0&&(J.f&h7)===0)throw Q;Y7(Q,J)}function Y7(Q,J){if(J!==null&&(J.f&y)!==0)return;while(J!==null){if((J.f&AQ)!==0&&(J.f&(y|QQ))===0){if((J.f&V7)===0)throw Q;try{J.b.error(Q);return}catch(W){Q=W}}J=J.parent}throw Q}function XJ(){throw Error("https://svelte.dev/e/async_derived_orphan")}function ZJ(Q,J,W){throw Error("https://svelte.dev/e/each_key_duplicate")}function zJ(Q){throw Error("https://svelte.dev/e/effect_in_teardown")}function GJ(){throw Error("https://svelte.dev/e/effect_in_unowned_derived")}function VJ(Q){throw Error("https://svelte.dev/e/effect_orphan")}function qJ(){throw Error("https://svelte.dev/e/effect_update_depth_exceeded")}function $J(){throw Error("https://svelte.dev/e/hydration_failed")}function UJ(Q){throw Error("https://svelte.dev/e/props_invalid_value")}function PJ(){throw Error("https://svelte.dev/e/state_descriptors_fixed")}function HJ(){throw Error("https://svelte.dev/e/state_prototype_fixed")}function BJ(){throw Error("https://svelte.dev/e/state_unsafe_mutation")}function YJ(){throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Q7=!1,KQ=!1;var C=null;function r7(Q){C=Q}function c0(Q,J=!1,W){C={p:C,i:!1,c:null,e:null,s:Q,x:null,r:L,l:KQ&&!J?{s:null,u:null,$:[]}:null}}function o0(Q){var J=C,W=J.e;if(W!==null){J.e=null;for(var K of W)s0(K)}if(Q!==void 0)J.x=Q;return J.i=!0,C=J.p,lQ(Q)}function lQ(Q={}){return H7(Q,Z0,{value:!0}),Q}function k7(){return!KQ||C!==null&&C.l===null}var BQ=[];function LJ(){var Q=BQ;BQ=[],q0(Q)}function s(Q){if(BQ.length===0&&!YQ){var J=BQ;queueMicrotask(()=>{if(J===BQ)LJ()})}BQ.push(Q)}function FJ(){while(BQ.length>0)LJ()}function P0(Q){return Q===this.v}function H0(Q,J){return Q!=Q?J==J:Q!==J||Q!==null&&typeof Q==="object"||typeof Q==="function"}function B0(Q){return!H0(Q,this.v)}function MQ(Q,J){return Q.label=J,r0(Q.v,J),Q}function r0(Q,J){return Q?.[v0]?.(J),Q}function p7(Q){var J=O,W=L;u(null),_(null);try{return Q()}finally{u(J),_(W)}}function L0(Q,J,W,K){let X=k7()?ZQ:LQ;var Z=Q.filter((q)=>!q.settled),z=J.map(X);if(W.length===0&&Z.length===0){K(z);return}var G=L,V=DJ(),H=Z.length===1?Z[0].promise:Z.length>1?Promise.all(Z.map((q)=>q.promise)):null;function P(q){if((G.f&y)!==0)return;V();try{K([...z,...q])}catch(B){Y7(B,G)}TQ()}var $=a0();if(W.length===0){H.then(()=>P([])).finally($);return}function U(){Promise.all(W.map((q)=>n0(q))).then(P).catch((q)=>Y7(q,G)).finally($)}if(H)H.then(()=>{V(),U(),TQ()});else U()}function DJ(){var Q=L,J=O,W=C,K=S;if(!1)var X;return function(z=!0){if(_(Q),u(J),r7(W),z&&(Q.f&y)===0)K?.activate(),K?.apply()}}var C4=!1;function TQ(Q=!0){if(C4=!1,_(null),u(null),r7(null),Q)S?.deactivate()}function a0(){var Q=L,J=Q.b,W=S,K=!!J?.is_rendered();return J?.update_pending_count(1,W),W.increment(K,Q),()=>{J?.update_pending_count(-1,W),W.decrement(K,Q)}}var N4=~(N|m|T);function j(Q,J){Q.f=Q.f&N4|J}function xQ(Q){if((Q.f&G7)!==0||Q.deps===null)j(Q,T);else j(Q,m)}function ZQ(Q){var J=g|N;if(L!==null)L.f|=v7;return{ctx:C,deps:null,effects:null,equals:P0,f:J,fn:Q,reactions:null,rv:0,v:E,wv:0,parent:L,ac:null}}var EQ=Symbol("obsolete");function n0(Q,J,W){let K=L;if(K===null)XJ();var X=void 0,Z=K7(E),z=!O,G=new Set;return wJ(()=>{var V=L,H=$0();X=H.promise;try{Promise.resolve(Q()).then(H.resolve,(q)=>{if(q!==o7)H.reject(q)}).finally(TQ)}catch(q){H.reject(q),TQ()}var P=S;if(z){if((V.f&V7)!==0)var $=a0();if(K.b?.is_rendered())P.async_deriveds.get(V)?.reject(EQ);else for(let q of G.values())q.reject(EQ);G.add(H),P.async_deriveds.set(V,H)}let U=(q,B=void 0)=>{if($?.(),G.delete(H),B===EQ)return;if(P.activate(),B)Z.f|=R7,b7(Z,B);else{if((Z.f&R7)!==0)Z.f^=R7;b7(Z,q)}P.deactivate()};H.promise.then(U,(q)=>U(null,q||"unknown"))}),W7(()=>{for(let V of G)V.reject(EQ)}),new Promise((V)=>{function H(P){function $(){if(P===X)V(Z);else H(X)}P.then($,$)}H(X)})}function R4(Q){let J=ZQ(Q);if(!Q7)O0(J);return J}function LQ(Q){let J=ZQ(Q);return J.equals=B0,J}function j4(Q){var J=Q.effects;if(J!==null){Q.effects=null;for(var W=0;W<J.length;W+=1)v(J[W])}}function cQ(Q){var J,W=L,K=Q.parent;if(!S7&&K!==null&&Q.v!==E&&(K.f&(y|d))!==0)return n9(),Q.v;_(K);try{j4(Q),J=J9(Q)}finally{_(W)}return J}function e0(Q){var J=cQ(Q);if(!Q.equals(J)){if(Q.wv=rQ(),!S?.is_fork||Q.deps===null){if(S!==null)S.capture(Q,J,!0),FQ?.capture(Q,J,!0);else Q.v=J;if(Q.deps===null){j(Q,T);return}}}if(S7)return;if(r!==null){if(XQ()||S?.is_fork)r.set(Q,J)}else xQ(Q)}function SJ(Q){if(Q.effects===null)return;for(let J of Q.effects)if(J.teardown||J.ac){if(J.teardown?.(),J.ac!==null)p7(()=>{J.ac.abort(o7),J.ac=null});if(J.fn!==null)J.teardown=u7;OQ(J,0),sQ(J)}}function Q9(Q){if(Q.effects===null)return;for(let J of Q.effects)if(J.teardown&&J.fn!==null)f7(J)}var oQ=new Set,j7=new Map;var CJ=!1;function K7(Q,J){var W={f:0,v:Q,reactions:null,equals:P0,rv:0,wv:0};return W}function d7(Q,J){let W=K7(Q,J);return O0(W),W}function SQ(Q,J=!1,W=!0){let K=K7(Q);if(!J)K.equals=B0;if(KQ&&W&&C!==null&&C.l!==null)(C.l.s??=[]).push(K);return K}function X7(Q,J,W=!1){if(O!==null&&(!C7||(O.f&$Q)!==0)&&k7()&&(O.f&(g|n|N7|$Q))!==0&&(y7===null||!y7.has(Q)))BJ();let K=W?a7(J):J;return b7(Q,K,aQ)}var DQ=null,W9=0;function b7(Q,J,W=null){if(!Q.equals(J)){if(S7)j7.set(Q,J);else if(!j7.has(Q))j7.set(Q,Q.v);var K=J7.ensure();if(K.capture(Q,J),(Q.f&g)!==0){let X=Q;if((Q.f&N)!==0)cQ(X);if(r===null)xQ(X)}if(Q.wv=rQ(),DQ=null,W9=0,IJ(Q,N,W),DQ=null,k7()&&L!==null&&(L.f&T)!==0&&(L.f&(i|z7))===0)if(w7===null)AJ([Q]);else w7.push(Q);if(!K.is_fork&&oQ.size>0&&!CJ)K9()}return J}function K9(){CJ=!1;for(let Q of oQ){if((Q.f&T)!==0)j(Q,m);let J;try{J=zQ(Q)}catch{J=!0}if(J)f7(Q)}oQ.clear()}function wQ(Q){X7(Q,Q.v+1)}function IJ(Q,J,W){var K=Q.reactions;if(K===null)return;var X=k7(),Z=K.length;if(W9+=Z,W9>1e5&&DQ===null)DQ=new Set;if(DQ!==null){if(DQ.has(Q))return;DQ.add(Q)}for(var z=0;z<Z;z++){var G=K[z],V=G.f;if(!X&&G===L)continue;var H=(V&N)===0;if(H)j(G,J);if((V&$Q)!==0)oQ.add(G);else if((V&g)!==0){var P=G;r?.delete(P),IJ(P,m,W)}else if(H){var $=G;if((V&n)!==0&&T7!==null)T7.add($);if(W!==null)W.push($);else nQ($)}}}function D0(Q,J,W){if((Q.f&N)!==0)J.add(Q);else if((Q.f&m)!==0)W.add(Q);j(Q,T)}var S0=null,kQ=null,S=null,FQ=null,r=null,Z9=null,YQ=!1,X9=!1,bQ=null,aQ=null,NJ=0;var E4=1;class J7{id=E4++;#Q=!1;linked=!0;#J=null;#W=null;async_deriveds=new Map;current=new Map;previous=new Map;#G=new Set;#X=new Set;#z=0;#K=new Map;#V=null;#Z=[];#B=[];#q=new Set;#$=new Set;#P=new Map;#M=new Set;is_fork=!1;#U=!1;constructor(){if(kQ===null)S0=kQ=this;else kQ.#W=this,this.#J=kQ;kQ=this}#D(){if(this.is_fork)return!0;for(let W of this.#K.keys()){var Q=W,J=!1;while(Q.parent!==null){if(this.#P.has(Q)){J=!0;break}Q=Q.parent}if(!J)return!0}return!1}skip_effect(Q){if(!this.#P.has(Q))this.#P.set(Q,{d:[],m:[]});this.#M.delete(Q)}unskip_effect(Q,J=(W)=>this.schedule(W)){var W=this.#P.get(Q);if(W){this.#P.delete(Q);for(var K of W.d)j(K,N),J(K);for(K of W.m)j(K,m),J(K)}this.#M.add(Q)}#S(){var Q=[];for(let X of this.#Z){if((X.f&y)!==0||(X.f&(N|m))===0)continue;var J=X,W=!1;while(J.parent!==null){J=J.parent;var K=J.f;if((K&(z7|i))!==0){if((K&T)===0){W=!0;break}J.f^=T}}if(!W)Q.push(J)}return this.#Z=[],Q}#L(){this.#Q=!0;for(let z of this.#q)this.#$.delete(z),j(z,N),this.schedule(z);for(let z of this.#$)j(z,m),this.schedule(z);this.apply();var Q=bQ=[],J=[],W=aQ=[];while(this.#Z.length>0){if(NJ++>1000)this.#Y(),k4();for(let z of this.#S())try{this.#F(z,Q,J)}catch(G){if(xJ(z),!this.#D())this.discard();throw G}}if(S=null,W.length>0){var K=J7.ensure();for(let z of W)K.schedule(z)}if(bQ=null,aQ=null,this.#D()){this.#H(J),this.#H(Q);for(let[z,G]of this.#P)TJ(z,G);if(W.length>0)S.#L();return}let X=this.#C();if(X){this.#H(J),this.#H(Q),X.#w(this);return}this.#q.clear(),this.#$.clear();for(let z of this.#G)z(this);this.#G.clear(),FQ=this,RJ(J),RJ(Q),FQ=null,this.#V?.resolve();var Z=S;if(this.#z===0&&(this.#Z.length===0||Z!==null)){if(this.#Y(),Q7)this.#O(),S=Z}if(this.#Z.length>0)if(Z!==null){for(let z of this.#Z)Z.#Z.push(z);this.#Z=[]}else Z=this;if(Z!==null)j7.clear(),Z.#L()}#F(Q,J,W){Q.f^=T;var K=Q.first;while(K!==null){var X=K.f,Z=(X&(i|z7))!==0,z=Z&&(X&T)!==0,G=z||(X&d)!==0||this.#P.has(K);if(!G&&K.fn!==null){if(Z)K.f^=T;else if((X&h7)!==0)J.push(K);else if(Q7&&(X&(e7|qQ))!==0)W.push(K);else if(zQ(K)){if((X&n)!==0)this.#$.add(K);f7(K)}var V=K.first;if(V!==null){K=V;continue}}while(K!==null){var H=K.next;if(H!==null){K=H;break}K=K.parent}}}#C(){var Q=this.#J;while(Q!==null){if(!Q.is_fork){for(let[J,[,W]]of this.current)if(Q.current.has(J)&&!W)return Q}Q=Q.#J}return null}#w(Q){for(let[W,K]of Q.current){if(!this.previous.has(W)&&Q.previous.has(W))this.previous.set(W,Q.previous.get(W));this.current.set(W,K)}for(let[W,K]of Q.async_deriveds){let X=this.async_deriveds.get(W);if(X)K.promise.then(X.resolve).catch(X.reject)}Q.async_deriveds.clear(),this.transfer_effects(Q.#q,Q.#$);let J=(W)=>{var K=W.reactions;if(K===null)return;if((W.f&g)!==0&&(W.f&(N|m))===0)return;for(let z of K){var X=z.f;if((X&g)!==0)J(z);else{var Z=z;if(X&(N7|n)&&!this.async_deriveds.has(Z))this.#$.delete(Z),j(Z,N),this.schedule(Z)}}};for(let W of this.current.keys())J(W);this.oncommit(()=>Q.discard()),Q.#Y(),S=this,this.#L()}#H(Q){for(var J=0;J<Q.length;J+=1)D0(Q[J],this.#q,this.#$)}capture(Q,J,W=!1){if(Q.v!==E&&!this.previous.has(Q))this.previous.set(Q,Q.v);if((Q.f&R7)===0)this.current.set(Q,[J,W]),r?.set(Q,J);if(!this.is_fork)Q.v=J}activate(){S=this}deactivate(){S=null,r=null}flush(){try{X9=!0,S=this,this.#L()}finally{NJ=0,Z9=null,bQ=null,aQ=null,X9=!1,S=null,r=null,j7.clear()}}discard(){for(let Q of this.#X)Q(this);this.#X.clear();for(let Q of this.async_deriveds.values())Q.reject(EQ);this.#Y(),this.#V?.resolve()}register_created_effect(Q){this.#B.push(Q)}#O(){for(let P=S0;P!==null;P=P.#W){var Q=P.id<this.id,J=[];for(let[$,[U,q]]of this.current){if(P.current.has($)){var W=P.current.get($)[0];if(Q&&U!==W)P.current.set($,[U,q]);else continue}J.push($)}if(Q)for(let[$,U]of this.async_deriveds){let q=P.async_deriveds.get($);if(q)U.promise.then(q.resolve).catch(q.reject)}var K=[...P.current.keys()].filter(($)=>!P.current.get($)[1]);if(!P.#Q||K.length===0)continue;var X=K.filter(($)=>!this.current.has($));if(X.length===0){if(Q)P.discard()}else if(J.length>0){if(Q)for(let $ of this.#M)P.unskip_effect($,(U)=>{if((U.f&(n|N7))!==0)P.schedule(U);else P.#H([U])});P.activate();var Z=new Set,z=new Map;for(var G of J)jJ(G,X,Z,z);z=new Map;var V=[...P.current].filter(([$,U])=>{let q=this.current.get($);if(!q)return!0;return q[0]!==U[0]||q[1]!==U[1]}).map(([$])=>$);if(V.length>0){for(let $ of this.#B)if(($.f&(y|d|$Q))===0&&z9($,V,z))if(($.f&(N7|n))!==0)j($,N),P.schedule($);else P.#q.add($)}if(P.#Z.length>0&&!P.#U){P.apply();for(var H of P.#S())P.#F(H,[],[])}P.deactivate()}}}increment(Q,J){if(this.#z+=1,Q){let W=this.#K.get(J)??0;this.#K.set(J,W+1)}}decrement(Q,J){if(this.#z-=1,Q){let W=this.#K.get(J)??0;if(W===1)this.#K.delete(J);else this.#K.set(J,W-1)}if(this.#U)return;this.#U=!0,s(()=>{if(this.#U=!1,this.linked)this.flush()})}transfer_effects(Q,J){for(let W of Q)this.#q.add(W);for(let W of J)this.#$.add(W);Q.clear(),J.clear()}oncommit(Q){this.#G.add(Q)}ondiscard(Q){this.#X.add(Q)}settled(){return(this.#V??=$0()).promise}static ensure(){if(S===null){let Q=S=new J7;if(!X9&&!YQ)s(()=>{if(!Q.#Q)Q.flush()})}return S}apply(){if(!Q7||!this.is_fork&&this.#J===null&&this.#W===null){r=null;return}r=new Map;for(let[J,[W]]of this.current)r.set(J,W);for(let J=S0;J!==null;J=J.#W){if(J===this||J.is_fork)continue;var Q=!1;if(J.id<this.id)for(let[W,[,K]]of J.current){if(K)continue;if(this.current.has(W)){Q=!0;break}}if(!Q){for(let[W,K]of J.previous)if(!r.has(W))r.set(W,K)}}}schedule(Q){if(Z9=Q,Q.b?.is_pending&&(Q.f&(h7|e7|qQ))!==0&&(Q.f&V7)===0){Q.b.defer_effect(Q);return}this.#Z.push(Q)}#Y(){if(!this.linked)return;var Q=this.#J,J=this.#W;if(Q===null)S0=J;else Q.#W=J;if(J===null)kQ=Q;else J.#J=Q;this.linked=!1}}function yQ(Q){var J=YQ;YQ=!0;try{var W;if(Q){if(S!==null&&!S.is_fork)S.flush();W=Q()}while(!0){if(FJ(),S===null)return W;S.flush()}}finally{YQ=J}}function k4(){if(!1){var Q;for(let W of S.current.keys())for(let[K,X]of W.updated??[])var J}try{qJ()}catch(W){Y7(W,Z9)}}var T7=null;function RJ(Q){var J=Q.length;if(J===0)return;var W=0;while(W<J){var K=Q[W++];if((K.f&(y|d))===0&&zQ(K)){if(T7=new Set,f7(K),K.deps===null&&K.first===null&&K.nodes===null&&K.teardown===null&&K.ac===null)G9(K);if(T7?.size>0){j7.clear();for(let X of T7){if((X.f&(y|d))!==0)continue;let Z=[X],z=X.parent;while(z!==null){if(T7.has(z))T7.delete(z),Z.push(z);z=z.parent}for(let G=Z.length-1;G>=0;G--){let V=Z[G];if((V.f&(y|d))!==0)continue;f7(V)}}T7.clear()}}}T7=null}function jJ(Q,J,W,K){if(W.has(Q))return;if(W.add(Q),Q.reactions!==null)for(let X of Q.reactions){let Z=X.f;if((Z&g)!==0)jJ(X,J,W,K);else if((Z&(N7|n))!==0&&(Z&N)===0&&z9(X,J,K))j(X,N),nQ(X)}}function z9(Q,J,W){let K=W.get(Q);if(K!==void 0)return K;if(Q.deps!==null)for(let X of Q.deps){if(PQ.call(J,X))return!0;if((X.f&g)!==0&&z9(X,J,W))return W.set(X,!0),!0}return W.set(Q,!1),!1}function nQ(Q){S.schedule(Q)}function TJ(Q,J){if((Q.f&i)!==0&&(Q.f&T)!==0)return;if((Q.f&N)!==0)J.d.push(Q);else if((Q.f&m)!==0)J.m.push(Q);j(Q,T);var W=Q.first;while(W!==null)TJ(W,J),W=W.next}function xJ(Q){j(Q,T);var J=Q.first;while(J!==null)xJ(J),J=J.next}function kJ(Q){if(L===null){if(O===null)VJ(Q);GJ()}if(S7)zJ(Q)}function y4(Q,J){var W=J.last;if(W===null)J.last=J.first=Q;else W.next=Q,Q.prev=W,J.last=Q}function _7(Q,J){var W=L;if(W!==null&&(W.f&d)!==0)Q|=d;var K={ctx:C,deps:null,nodes:null,f:Q|N|G7,first:null,fn:J,last:null,next:null,parent:W,b:W&&W.b,prev:null,teardown:null,wv:0,ac:null};S?.register_created_effect(K);var X=K;if((Q&h7)!==0)if(bQ!==null)bQ.push(K);else J7.ensure().schedule(K);else if(J!==null){try{f7(K)}catch(z){throw v(K),z}if(X.deps===null&&X.teardown===null&&X.nodes===null&&X.first===X.last&&(X.f&v7)===0){if(X=X.first,(Q&n)!==0&&(Q&P7)!==0&&X!==null)X.f|=P7}}if(X!==null){if(X.parent=W,W!==null)y4(X,W);if(O!==null&&(O.f&g)!==0&&(Q&z7)===0){var Z=O;(Z.effects??=[]).push(X)}}return K}function XQ(){return O!==null&&!C7}function W7(Q){let J=_7(e7,null);return j(J,T),J.teardown=Q,J}function q9(Q){kJ("$effect");var J=L.f,W=!O&&(J&i)!==0&&C!==null&&!C.i;if(W){var K=C;(K.e??=[]).push(Q)}else return s0(Q)}function s0(Q){return _7(h7|h9,Q)}function $9(Q){J7.ensure();let J=_7(z7|v7,Q);return()=>{v(J)}}function bJ(Q){J7.ensure();let J=_7(z7|v7,Q);return(W={})=>{return new Promise((K)=>{if(W.outro)l7(J,()=>{v(J),K(void 0)});else v(J),K(void 0)})}}function U7(Q){return _7(h7,Q)}function wJ(Q){return _7(N7|v7,Q)}function a(Q,J=0){return _7(e7|J,Q)}function U9(Q,J=[],W=[],K=[]){L0(K,J,W,(X)=>{_7(e7,()=>{Q(...X.map(A))})})}function L7(Q,J=0){var W=_7(n|J,Q);return W}function o(Q){return _7(i|v7,Q)}function P9(Q){var J=Q.teardown;if(J!==null){let W=S7,K=O;V9(!0),u(null);try{J.call(null)}catch(X){Y7(X,Q.parent)}finally{V9(W),u(K)}}}function sQ(Q,J=!1){var W=Q.first;Q.first=Q.last=null;while(W!==null){let X=W.ac;if(X!==null)p7(()=>{X.abort(o7)});var K=W.next;if((W.f&z7)!==0)W.parent=null;else v(W,J);W=K}}function yJ(Q){var J=Q.first;while(J!==null){var W=J.next;if((J.f&i)===0)v(J);J=W}}function v(Q,J=!0){var W=!1;if((J||(Q.f&h0)!==0)&&Q.nodes!==null&&Q.nodes.end!==null)H9(Q.nodes.start,Q.nodes.end),W=!0;Q.f|=QQ,sQ(Q,J&&!W),OQ(Q,0);var K=Q.nodes&&Q.nodes.t;if(K!==null)for(let Z of K)Z.stop();P9(Q),Q.f^=QQ,Q.f|=y;var X=Q.parent;if(X!==null&&X.first!==null)G9(Q);Q.next=Q.prev=Q.teardown=Q.ctx=Q.deps=Q.fn=Q.nodes=Q.ac=Q.b=null}function H9(Q,J){while(Q!==null){var W=Q===J?null:c(Q);Q.remove(),Q=W}}function G9(Q){var{parent:J,prev:W,next:K}=Q;if(W!==null)W.next=K;if(K!==null)K.prev=W;if(J!==null){if(J.first===Q)J.first=K;if(J.last===Q)J.last=W}}function l7(Q,J,W=!0){var K=[];Q.f|=X0,gJ(Q,K,!0);var X=()=>{if(W)v(Q);if(J)J()},Z=K.length;if(Z>0){var z=()=>--Z||X();for(var G of K)G.out(z)}else X()}function gJ(Q,J,W){if((Q.f&d)!==0)return;Q.f^=d;var K=Q.nodes&&Q.nodes.t;if(K!==null){for(let G of K)if(G.is_global||W)J.push(G)}var X=Q.first;while(X!==null){var Z=X.next;if((X.f&z7)===0){var z=(X.f&P7)!==0||(X.f&i)!==0&&(Q.f&n)!==0;gJ(X,J,z?W:!1)}X=Z}}function gQ(Q){Q.f&=~X0,hJ(Q,!0)}function hJ(Q,J){if((Q.f&X0)!==0)return;if((Q.f&d)===0)return;if(Q.f^=d,(Q.f&T)===0)j(Q,N),J7.ensure().schedule(Q);var W=Q.first;while(W!==null){var K=W.next,X=(W.f&P7)!==0||(W.f&i)!==0;hJ(W,X?J:!1),W=K}var Z=Q.nodes&&Q.nodes.t;if(Z!==null){for(let z of Z)if(z.is_global||J)z.in()}}function hQ(Q,J){if(!Q.nodes)return;var W=Q.nodes.start,K=Q.nodes.end;while(W!==null){var X=W===K?null:c(W);J.append(W),W=X}}var vJ=null;var w0=!1,S7=!1;function V9(Q){S7=Q}var O=null,C7=!1;function u(Q){O=Q}var L=null;function _(Q){L=Q}var y7=null;function O0(Q){if(O!==null&&(!Q7&&(O.f&mQ)!==0||(O.f&g)!==0))(y7??=new Set).add(Q)}var $7=null,M7=0,w7=null;function AJ(Q){w7=Q}var uJ=1,CQ=0,GQ=CQ;function B9(Q){GQ=Q}function rQ(){return++uJ}function zQ(Q){var J=Q.f;if((J&N)!==0)return!0;if((J&m)!==0){var W=Q.deps,K=W.length;for(var X=0;X<K;X++){var Z=W[X];if(zQ(Z))e0(Z);if(Z.wv>Q.wv)return!0}if((J&G7)!==0&&r===null)j(Q,T)}return!1}function pJ(Q,J,W=!0){var K=Q.reactions;if(K===null)return;if(!Q7&&y7!==null&&y7.has(Q))return;for(var X=0;X<K.length;X++){var Z=K[X];if((Z.f&g)!==0)pJ(Z,J,!1);else if(J===Z){if(W)j(Z,N);else if((Z.f&T)!==0)j(Z,m);nQ(Z)}}}function J9(Q){var J=$7,W=M7,K=w7,X=O,Z=y7,z=C,G=C7,V=GQ,H=Q.f;if($7=null,M7=0,w7=null,O=(H&(i|z7))===0?Q:null,y7=null,r7(Q.ctx),C7=!1,GQ=++CQ,Q.ac!==null)p7(()=>{Q.ac.abort(o7)}),Q.ac=null;try{Q.f|=mQ;var P=Q.fn,$=P();Q.f|=V7;var U=mJ(Q);if(k7()&&w7!==null&&!C7&&U!==null&&(Q.f&(g|m|N))===0)for(var q=0;q<w7.length;q++)pJ(w7[q],Q);if(X!==null&&X!==Q){if(CQ++,X.deps!==null)for(let B=0;B<W;B+=1)X.deps[B].rv=CQ;if(J!==null)for(let B of J)B.rv=CQ;if(w7!==null)if(K===null)K=w7;else K.push(...w7)}if((Q.f&R7)!==0)Q.f^=R7;return $}catch(B){return mJ(Q),WJ(B)}finally{Q.f^=mQ,$7=J,M7=W,w7=K,O=X,y7=Z,r7(z),C7=G,GQ=V}}function mJ(Q){var J=Q.deps,W=S?.is_fork;if($7!==null){var K;if(!W)OQ(Q,M7);if(J!==null&&M7>0){J.length=M7+$7.length;for(K=0;K<$7.length;K++)J[M7+K]=$7[K]}else Q.deps=J=$7;if(XQ()&&(Q.f&G7)!==0)for(K=M7;K<J.length;K++)(J[K].reactions??=[]).push(Q)}else if(!W&&J!==null&&M7<J.length)OQ(Q,M7),J.length=M7;return J}function h4(Q,J){let W=J.reactions;if(W!==null){var K=QJ.call(W,Q);if(K!==-1){var X=W.length-1;if(X===0)W=J.reactions=null;else W[K]=W[X],W.pop()}}if(W===null&&(J.f&g)!==0&&($7===null||!PQ.call($7,J))){var Z=J;if((Z.f&G7)!==0)Z.f^=G7;if(Z.v!==E)xQ(Z);if(Z.ac!==null)p7(()=>{Z.ac.abort(o7),Z.ac=null,j(Z,N)});SJ(Z),OQ(Z,0)}}function OQ(Q,J){var W=Q.deps;if(W===null)return;for(var K=J;K<W.length;K++)h4(Q,W[K])}function f7(Q){var J=Q.f;if((J&y)!==0)return;j(Q,T);var W=L,K=w0;if(L=Q,w0=(J&(i|z7))===0,!1)var X,Z;try{if((J&(n|qQ))!==0)yJ(Q);else sQ(Q);P9(Q);var z=J9(Q);if(Q.teardown=typeof z==="function"?z:null,Q.wv=uJ,!1)for(var G of Q.deps);}finally{w0=K,L=W}}function A(Q){var J=Q.f,W=(J&g)!==0;if(vJ?.add(Q),O!==null&&!C7){var K=L!==null&&(L.f&y)!==0;if(!K&&(y7===null||!y7.has(Q))){var X=O.deps;if((O.f&mQ)!==0){if(Q.rv<CQ)if(Q.rv=CQ,$7===null&&X!==null&&X[M7]===Q)M7++;else if($7===null)$7=[Q];else $7.push(Q)}else{if(O.deps??=[],!PQ.call(O.deps,Q))O.deps.push(Q);var Z=Q.reactions;if(Z===null)Q.reactions=[O];else if(!PQ.call(Z,O))Z.push(O)}}}if(!1){if(!C7&&I4&&S===null&&FQ===null&&!I4.warned&&(I4.effect.f&mQ)===0&&!I4.effect_deps.has(Q))var z;if(t0&&!C7&&A5!==null&&O!==null&&A5.reaction===O){if(Q.trace);else if(z)var G,V}}if(S7&&j7.has(Q))return j7.get(Q);if(W){var H=Q;if(S7){var P=H.v;if((H.f&T)===0&&H.reactions!==null||dJ(H))P=cQ(H);return j7.set(H,P),P}var $=(H.f&G7)===0&&!C7&&O!==null&&(w0||(O.f&G7)!==0),U=(H.f&V7)===0;if(zQ(H)){if($)H.f|=G7;e0(H)}if($&&!U)Q9(H),fJ(H)}if(r?.has(Q))return r.get(Q);if((Q.f&R7)!==0)throw Q.v;return Q.v}function fJ(Q){if(Q.f|=G7,Q.deps===null)return;for(let J of Q.deps)if((J.reactions??=[]).push(Q),(J.f&g)!==0&&(J.f&G7)===0)Q9(J),fJ(J)}function dJ(Q){if(Q.v===E)return!0;if(Q.deps===null)return!1;for(let J of Q.deps){if(j7.has(J))return!0;if((J.f&g)!==0&&dJ(J))return!0}return!1}function k(Q){var J=C7;try{return C7=!0,Q()}finally{C7=J}}function I0(Q){if(typeof Q!=="object"||!Q||Q instanceof EventTarget)return;if(q7 in Q)C0(Q);else if(!Array.isArray(Q))for(let J in Q){let W=Q[J];if(typeof W==="object"&&W&&q7 in W)C0(W)}}function C0(Q,J=new Set){if(typeof Q==="object"&&Q!==null&&!(Q instanceof EventTarget)&&!J.has(Q)){if(J.add(Q),Q instanceof Date)Q.getTime();for(let K in Q)try{C0(Q[K],J)}catch(X){}let W=HQ(Q);if(W!==Object.prototype&&W!==Array.prototype&&W!==Map.prototype&&W!==Set.prototype&&W!==Date.prototype){let K=V0(W);for(let X in K){let Z=K[X].get;if(Z)try{Z.call(Q)}catch(z){}}}}}var v4=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function a7(Q){if(typeof Q!=="object"||Q===null||q7 in Q||Z0 in Q)return Q;let J=HQ(Q);if(J!==l0&&J!==JJ)return Q;var W=new Map,K=s7(Q),X=d7(0),Z=null,z=GQ,G=($)=>{if(GQ===z)return $();var U=O,q=GQ;u(null),B9(z);var B=$();return u(U),B9(q),B};if(K)W.set("length",d7(Q.length,Z));var V="";let H=!1;function P($){if(H)return;H=!0,V=$,MQ(X,`${V} version`);for(let[U,q]of W)MQ(q,m4(V,U));H=!1}return new Proxy(Q,{defineProperty($,U,q){if(!("value"in q)||q.configurable===!1||q.enumerable===!1||q.writable===!1)PJ();var B=W.get(U);if(B===void 0)G(()=>{var F=d7(q.value,Z);return W.set(U,F),F});else X7(B,q.value,!0);return!0},deleteProperty($,U){var q=W.get(U);if(q===void 0){if(U in $){let B=G(()=>d7(E,Z));W.set(U,B),wQ(X)}}else X7(q,E),wQ(X);return!0},get($,U,q){if(U===q7)return Q;var B=W.get(U),F=U in $;if(B===void 0&&(!F||B7($,U)?.writable))B=G(()=>{var w=a7(F?$[U]:E),b=d7(w,Z);return b}),W.set(U,B);if(B!==void 0){var Y=A(B);return Y===E?void 0:Y}return Reflect.get($,U,q)},getOwnPropertyDescriptor($,U){this.has?.($,U);var q=Reflect.getOwnPropertyDescriptor($,U),B=W.get(U);if(B!==void 0){var F=A(B);if(F===E)return;if(q&&"value"in q)q.value=F;else return{enumerable:!0,configurable:!0,value:F,writable:!0}}return q},has($,U){if(U===q7)return!0;var q=W.get(U),B=q!==void 0&&q.v!==E||Reflect.has($,U);if(q!==void 0||L!==null&&(!B||B7($,U)?.writable)){if(q===void 0)q=G(()=>{var Y=B?a7($[U]):E,w=d7(Y,Z);return w}),W.set(U,q);var F=A(q);if(F===E)return!1}return B},set($,U,q,B){var F=W.get(U),Y=U in $;if(K&&U==="length")for(var w=q;w<F.v;w+=1){var b=W.get(w+"");if(b!==void 0)X7(b,E);else if(w in $)b=G(()=>d7(E,Z)),W.set(w+"",b)}if(F===void 0){if(!Y||B7($,U)?.writable)F=G(()=>d7(void 0,Z)),X7(F,a7(q)),W.set(U,F)}else{Y=F.v!==E;var x=G(()=>a7(q));X7(F,x)}var I=Reflect.getOwnPropertyDescriptor($,U);if(I?.set)I.set.call(B,q);if(!Y){if(K&&typeof U==="string"){var A7=W.get("length"),Z7=Number(U);if(Number.isInteger(Z7)&&Z7>=A7.v)X7(A7,Z7+1)}wQ(X)}return!0},ownKeys($){A(X);var U=Reflect.ownKeys($).filter((F)=>{var Y=W.get(F);return Y===void 0||Y.v!==E});for(var[q,B]of W)if(B.v!==E&&!(q in $))U.push(q);return U},setPrototypeOf(){HJ()}})}function m4(Q,J){if(typeof J==="symbol")return`${Q}[Symbol(${J.description??""})]`;if(v4.test(J))return`${Q}.${J}`;return/^\d+$/.test(J)?`${Q}[${J}]`:`${Q}['${J}']`}var Y9,_J,U0,lJ,iJ;function N0(){if(Y9!==void 0)return;Y9=window,_J=document,U0=/Firefox/.test(navigator.userAgent);var Q=Element.prototype,J=Node.prototype,W=Text.prototype;if(lJ=B7(J,"firstChild").get,iJ=B7(J,"nextSibling").get,i0(Q))Q[pQ]=void 0,Q[z0]=null,Q[m0]=void 0,Q.__e=void 0;if(i0(W))W[fQ]=void 0}function p(Q=""){return document.createTextNode(Q)}function h(Q){return lJ.call(Q)}function c(Q){return iJ.call(Q)}function cJ(Q,J){if(!M)return h(Q);var W=h(D);if(W===null)W=D.appendChild(p());else if(J&&W.nodeType!==NQ){var K=p();return W?.before(K),R(K),K}if(J)j0(W);return R(W),W}function u4(Q,J=!1){if(!M){var W=h(Q);if(W instanceof Comment&&W.data==="")return c(W);return W}if(J){if(D?.nodeType!==NQ){var K=p();return D?.before(K),R(K),K}j0(D)}return D}function p4(Q,J=!1){if(!M)return h(Q);var W=cJ(Q,J);return A0(Q),W}function f4(Q,J=1,W=!1){let K=M?D:Q;var X;while(J--)X=K,K=c(K);if(!M)return K;if(W){if(K?.nodeType!==NQ){var Z=p();if(K===null)X?.after(Z);else K.before(Z);return R(Z),Z}j0(K)}return R(K),K}function iQ(Q){Q.textContent=""}function R0(){if(!Q7)return!1;if(T7!==null)return!1;var Q=L.f;return(Q&V7)!==0}function I7(Q,J,W){if(J==null||J===G0)return W?document.createElement(Q,{is:W}):document.createElement(Q);return W?document.createElementNS(J,Q,{is:W}):document.createElementNS(J,Q)}function j0(Q){if(Q.nodeValue.length<65536)return;let J=Q.nextSibling;while(J!==null&&J.nodeType===NQ)J.remove(),Q.nodeValue+=J.nodeValue,J=Q.nextSibling}var M=!1;function f(Q){M=Q}var D;function R(Q){if(Q===null)throw WQ(),m7;return D=Q}function l(){return R(c(D))}function A0(Q){if(!M)return;if(c(D)!==null)throw WQ(),m7;D=Q}function M9(Q=1){if(M){var J=Q,W=D;while(J--)W=c(W);D=W}}function i7(Q=!0){var J=0,W=D;while(!0){if(W.nodeType===D7){var K=W.data;if(K===UQ){if(J===0)return W;J-=1}else if(K===RQ||K===JQ||K[0]==="["&&!isNaN(Number(K.slice(1))))J+=1}var X=c(W);if(Q)W.remove();W=X}}function eQ(Q){if(!Q||Q.nodeType!==D7)throw WQ(),m7;return Q.data}var vQ=Symbol("events"),O9=new Set,T0=new Set;function oJ(Q,J,W){(J[vQ]??={})[Q]=W}function sJ(Q){for(var J=0;J<Q.length;J++)O9.add(Q[J]);for(var W of T0)W(Q)}var L9=null,F9=!1;function D9(Q){var J=this,W=J.ownerDocument,K=Q.type,X=Q.composedPath?.()||[],Z=X[0]||Q.target;if(L9=Q,!F9)F9=!0,setTimeout(()=>{F9=!1,L9=null});var z=0,G=L9===Q&&Q[vQ];if(G){var V=X.indexOf(G);if(V!==-1&&(J===document||J===window)){Q[vQ]=J;return}var H=X.indexOf(J);if(H===-1)return;if(V<=H)z=V}if(Z=X[z]||Q.target,Z===J)return;H7(Q,"currentTarget",{configurable:!0,get(){return Z||W}});var P=O,$=L;u(null),_(null);try{var U,q=[];while(Z!==null){if(Z===J)break;try{var B=Z[vQ]?.[K];if(B!=null&&(!Z.disabled||Q.target===Z))B.call(Z,Q)}catch(F){if(U)q.push(F);else U=F}if(Q.cancelBubble)break;z++,Z=z<X.length?X[z]:null}if(U){for(let F of q)queueMicrotask(()=>{throw F});throw U}}finally{Q[vQ]=J,delete Q.currentTarget,u(P),_($)}}var d4=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:(Q)=>{return Q}});function rJ(Q){return d4?.createHTML(Q)??Q}function S9(Q){var J=I7("template");return J.innerHTML=rJ(Q.replaceAll("<!>","<!---->")),J.content}function F7(Q,J){var W=L;if(W.nodes===null)W.nodes={start:Q,end:J,a:null,t:null}}function i4(Q,J){var W=(J&s9)!==0,K=(J&r9)!==0,X,Z=!Q.startsWith("<!>");return()=>{if(M)return F7(D,null),D;if(X===void 0){if(X=S9(Z?Q:"<!>"+Q),!W)X=h(X)}var z=K||U0?document.importNode(X,!0):X.cloneNode(!0);if(W){var G=h(z),V=z.lastChild;F7(G,V)}else F7(z,z);return z}}function c4(){if(M)return F7(D,null),D;var Q=document.createDocumentFragment(),J=document.createComment(""),W=p();return Q.append(J,W),F7(J,W),Q}function Q0(Q,J){if(M){var W=L;if((W.f&V7)===0||W.nodes.end===null)W.nodes.end=D;l();return}if(Q===null)return;Q.before(J)}var o4=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var uW=[...o4,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var s4=["touchstart","touchmove"];function aJ(Q){return s4.includes(Q)}var r4=["$state","$state.raw","$derived","$derived.by"],pW=[...r4,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function nJ(Q){let J=0,W=K7(0),K;return()=>{if(XQ())A(W),a(()=>{if(J===0)K=k(()=>Q(()=>wQ(W)));return J+=1,()=>{s(()=>{if(J-=1,J===0)K?.(),K=void 0,wQ(W)})}})}}var a4=P7|v7;function C9(Q,J,W,K){new tJ(Q,J,W,K)}class tJ{parent;is_pending=!1;transform_error;#Q;#J=M?D:null;#W;#G;#X;#z=null;#K=null;#V=null;#Z=null;#B=0;#q=0;#$=!1;#P=new Set;#M=new Set;#U=null;#D=nJ(()=>{return this.#U=K7(this.#B),()=>{this.#U=null}});constructor(Q,J,W,K){if(this.#Q=Q,this.#W=J,this.#G=(X)=>{var Z=L;Z.b=this,Z.f|=AQ,W(X)},this.parent=L.b,this.transform_error=K??this.parent?.transform_error??((X)=>X),this.#X=L7(()=>{if(M){let X=this.#J;l();let Z=X.data===JQ;if(X.data.startsWith(d0)){let G=JSON.parse(X.data.slice(d0.length));this.#L(G)}else if(Z)this.#C();else this.#S()}else this.#w()},a4),M)this.#Q=D}#S(){try{this.#z=o(()=>this.#G(this.#Q))}catch(Q){this.error(Q)}}#L(Q){let J=this.#W.failed,{reset:W,invoke_onerror:K}=this.#F(Q);if(s(K),!J)return;this.#V=o(()=>{J(this.#Q,()=>Q,()=>W)})}#F(Q){var J=!1,W=!1;let K=()=>{if(J){e9();return}if(J=!0,W)YJ();if(this.#V!==null)l7(this.#V,()=>{this.#V=null});this.#O(()=>{this.#w()})};return{reset:K,invoke_onerror:()=>{try{W=!0,this.#W.onerror?.(Q,K),W=!1}catch(Z){Y7(Z,this.#X&&this.#X.parent)}}}}#C(){let Q=this.#W.pending;if(!Q)return;this.is_pending=!0,this.#K=o(()=>Q(this.#Q)),s(()=>{var J=this.#Z=document.createDocumentFragment(),W=p(),K=!1;if(J.append(W),this.#z=this.#O(()=>{try{return o(()=>this.#G(W))}catch(X){try{this.error(X),K=!0}catch(Z){Y7(Z,this.#X.parent)}return null}}),this.#z===null){if(this.#Z=null,K)this.#H(S);return}if(this.#q===0)this.#Q.before(J),this.#Z=null,l7(this.#K,()=>{this.#K=null}),this.#H(S)})}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#q=0,this.#B=0,this.#z=o(()=>{this.#G(this.#Q)}),this.#q>0){var Q=this.#Z=document.createDocumentFragment();hQ(this.#z,Q);let J=this.#W.pending;this.#K=o(()=>J(this.#Q))}else this.#H(S)}catch(J){this.error(J)}}#H(Q){this.is_pending=!1,Q.transfer_effects(this.#P,this.#M)}defer_effect(Q){D0(Q,this.#P,this.#M)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#W.pending}#O(Q){var J=L,W=O,K=C;_(this.#X),u(this.#X),r7(this.#X.ctx);try{return J7.ensure(),Q()}finally{_(J),u(W),r7(K)}}#Y(Q,J){if(!this.has_pending_snippet()){if(this.parent)this.parent.#Y(Q,J);return}if(this.#q+=Q,this.#q===0){if(this.#H(J),this.#K)l7(this.#K,()=>{this.#K=null});if(this.#Z)this.#Q.before(this.#Z),this.#Z=null}}update_pending_count(Q,J){if(this.#Y(Q,J),this.#B+=Q,!this.#U||this.#$)return;this.#$=!0,s(()=>{if(this.#$=!1,this.#U)b7(this.#U,this.#B)})}get_effect_pending(){return this.#D(),A(this.#U)}error(Q){if(!this.#W.onerror&&!this.#W.failed)throw Q;if(S?.is_fork){if(this.#z)S.skip_effect(this.#z);if(this.#K)S.skip_effect(this.#K);if(this.#V)S.skip_effect(this.#V);S.oncommit(()=>{this.#I(Q)})}else this.#I(Q)}#I(Q){if(this.#z)v(this.#z),this.#z=null;if(this.#K)v(this.#K),this.#K=null;if(this.#V)v(this.#V),this.#V=null;if(M)R(this.#J),M9(),R(i7());let J=this.#W.failed,W=(K)=>{let{reset:X,invoke_onerror:Z}=this.#F(K);if(Z(),J)this.#V=this.#O(()=>{try{return o(()=>{var z=L;z.b=this,z.f|=AQ,J(this.#Q,()=>K,()=>X)})}catch(z){return Y7(z,this.#X.parent),null}})};s(()=>{var K;try{K=this.transform_error(Q)}catch(X){Y7(X,this.#X&&this.#X.parent);return}if(K!==null&&typeof K==="object"&&typeof K.then==="function")K.then(W,(X)=>Y7(X,this.#X&&this.#X.parent));else W(K)})}}var I9=!0;function n4(Q,J){var W=J==null?"":typeof J==="object"?`${J}`:J;if(W!==(Q[fQ]??=Q.nodeValue))Q[fQ]=W,Q.nodeValue=`${W}`}function E0(Q,J){return eJ(Q,J)}function N9(Q,J){N0(),J.intro=J.intro??!1;let W=J.target,K=M,X=D;try{var Z=h(W);while(Z&&(Z.nodeType!==D7||Z.data!==RQ))Z=c(Z);if(!Z)throw m7;f(!0),R(Z);let z=eJ(Q,{...J,anchor:Z});return f(!1),z}catch(z){if(z instanceof Error&&z.message.split(`
|
|
2
|
+
`).some((G)=>G.startsWith("https://svelte.dev/e/")))throw z;if(z!==m7)console.warn("Failed to hydrate: ",z);if(J.recover===!1)$J();return N0(),iQ(W),f(!1),E0(Q,J)}finally{f(K),R(X)}}var x0=new Map;function eJ(Q,{target:J,anchor:W,props:K={},events:X,context:Z,intro:z=!0,transformError:G}){N0();var V=void 0,H=bJ(()=>{var P=W??J.appendChild(p());C9(P,{pending:()=>{}},(q)=>{c0({});var B=C;if(Z)B.c=Z;if(X)K.$$events=X;if(M)F7(q,null);if(I9=z,V=Q(q,K)||lQ(),I9=!0,M){if(L.nodes.end=D,D===null||D.nodeType!==D7||D.data!==UQ)throw WQ(),m7}o0()},G);var $=new Set,U=(q)=>{for(var B=0;B<q.length;B++){var F=q[B];if($.has(F))continue;$.add(F);var Y=aJ(F);for(let x of[J,document]){var w=x0.get(x);if(w===void 0)w=new Map,x0.set(x,w);var b=w.get(F);if(b===void 0)x.addEventListener(F,D9,{passive:Y}),w.set(F,1);else w.set(F,b+1)}}};return U(jQ(O9)),T0.add(U),()=>{for(var q of $)for(let Y of[J,document]){var B=x0.get(Y),F=B.get(q);if(--F==0){if(Y.removeEventListener(q,D9),B.delete(q),B.size===0)x0.delete(Y)}else B.set(q,F)}if(T0.delete(U),P!==W)P.parentNode?.removeChild(P)}});return A9.set(V,H),V}var A9=new WeakMap;function R9(Q,J){let W=A9.get(Q);if(W)return A9.delete(Q),W(J);return Promise.resolve()}class n7{anchor;#Q=new Map;#J=new Map;#W=new Map;#G=new Set;#X=!0;constructor(Q,J=!0){this.anchor=Q,this.#X=J}#z=(Q)=>{if(!this.#Q.has(Q))return;var J=this.#Q.get(Q),W=this.#J.get(J);if(W)gQ(W),this.#G.delete(J);else{var K=this.#W.get(J);if(K)gQ(K.effect),this.#J.set(J,K.effect),this.#W.delete(J),K.fragment.lastChild.remove(),this.anchor.before(K.fragment),W=K.effect}for(let[X,Z]of this.#Q){if(this.#Q.delete(X),X===Q)break;let z=this.#W.get(Z);if(z)v(z.effect),this.#W.delete(Z)}for(let[X,Z]of this.#J){if(X===J||this.#G.has(X))continue;let z=()=>{if(Array.from(this.#Q.values()).includes(X)){var V=document.createDocumentFragment();hQ(Z,V),V.append(p()),this.#W.set(X,{effect:Z,fragment:V})}else v(Z);this.#G.delete(X),this.#J.delete(X)};if(this.#X||!W)this.#G.add(X),l7(Z,z,!1);else z()}};#K=(Q)=>{this.#Q.delete(Q);let J=Array.from(this.#Q.values());for(let[W,K]of this.#W)if(!J.includes(W))v(K.effect),this.#W.delete(W)};ensure(Q,J){var W=S,K=R0();if(J&&!this.#J.has(Q)&&!this.#W.has(Q))if(K){var X=document.createDocumentFragment(),Z=p();X.append(Z),this.#W.set(Q,{effect:o(()=>J(Z)),fragment:X})}else this.#J.set(Q,o(()=>J(this.anchor)));if(this.#Q.set(W,Q),K){for(let[z,G]of this.#J)if(z===Q)W.unskip_effect(G);else W.skip_effect(G);for(let[z,G]of this.#W)if(z===Q)W.unskip_effect(G.effect);else W.skip_effect(G.effect);W.oncommit(this.#z),W.ondiscard(this.#K)}else{if(M)this.anchor=D;this.#z(W)}}}function Q8(Q,J,W=!1){var K;if(M)K=D,l();var X=new n7(Q),Z=W?P7:0;function z(G,V){if(M){var H=eQ(K);if(G!==parseInt(H.substring(1))){var P=i7();R(P),X.anchor=P,f(!1),X.ensure(G,V),f(!0);return}}X.ensure(G,V)}L7(()=>{var G=!1;if(J((V,H=0)=>{G=!0,z(H,V)}),!G)z(-1,null)},Z)}var J8=Symbol("NaN");function W8(Q,J,W){if(M)l();var K=new n7(Q),X=!k7();L7(()=>{var Z=J();if(Z!==Z)Z=J8;if(X&&Z!==null&&typeof Z==="object")Z={};K.ensure(Z,W)})}function K8(Q,J,W){var K=[],X=J.length,Z,z=J.length;for(var G=0;G<X;G++){let $=J[G];l7($,()=>{if(Z){if(Z.pending.delete($),Z.done.add($),Z.pending.size===0){var U=Q.outrogroups;if(j9(Q,jQ(Z.done)),U.delete(Z),U.size===0)Q.outrogroups=null}}else z-=1},!1)}if(z===0){var V=K.length===0&&W!==null&&Q.pending.size===0;if(V){var H=W,P=H.parentNode;iQ(P),P.append(H),Q.items.clear()}j9(Q,J,!V)}else Z={pending:new Set(J),done:new Set},(Q.outrogroups??=new Set).add(Z)}function j9(Q,J,W=!0){var K;if(Q.pending.size>0){K=new Set;for(let z of Q.pending.values())for(let G of z)K.add(Q.items.get(G).e)}for(var X=0;X<J.length;X++){var Z=J[X];if(K?.has(Z)){Z.f|=x7;let z=document.createDocumentFragment();hQ(Z,z)}else v(J[X],W)}}var W4;function X8(Q,J,W,K,X,Z=null){var z=Q,G=new Map,V=(J&f0)!==0;if(V){var H=Q;z=M?R(h(H)):H.appendChild(p())}if(M)l();var P=null,$=LQ(()=>{var x=W();return s7(x)?x:x==null?[]:jQ(x)}),U,q=new Map,B=!0;function F(x){if((b.effect.f&y)!==0)return;if(b.pending.delete(x),b.fallback=P,Z8(b,U,z,J,K),P!==null)if(U.length===0)if((P.f&x7)===0)gQ(P);else P.f^=x7,W0(P,null,z);else l7(P,()=>{P=null})}function Y(x){b.pending.delete(x)}var w=L7(()=>{U=A($);var x=U.length;let I=!1;if(M){var A7=eQ(z)===JQ;if(A7!==(x===0))z=i7(),R(z),f(!1),I=!0}var Z7=new Set,O7=S,IQ=R0();for(var t7=0;t7<x;t7+=1){if(M&&D.nodeType===D7&&D.data===UQ)z=D,I=!0,f(!1);var g7=U[t7],K0=K(g7,t7);if(!1)var t8;var c7=B?null:G.get(K0);if(c7){if(c7.v)b7(c7.v,g7);if(c7.i)b7(c7.i,t7);if(IQ)O7.unskip_effect(c7.e)}else{if(c7=z8(G,B?z:W4??=p(),g7,K0,t7,X,J,W),!B)c7.e.f|=x7;G.set(K0,c7)}Z7.add(K0)}if(x===0&&Z&&!P)if(B)P=o(()=>Z(z));else P=o(()=>Z(W4??=p())),P.f|=x7;if(x>Z7.size)ZJ("","","");if(M&&x>0)R(i7());if(!B)if(q.set(O7,Z7),IQ){for(let[O4,D4]of G)if(!Z7.has(O4))O7.skip_effect(D4.e);O7.oncommit(F),O7.ondiscard(Y)}else F(O7);if(I)f(!0);A($)}),b={effect:w,flags:J,items:G,pending:q,outrogroups:null,fallback:P};if(B=!1,M)z=D}function J0(Q){while(Q!==null&&(Q.f&i)===0)Q=Q.next;return Q}function Z8(Q,J,W,K,X){var Z=(K&f9)!==0,z=J.length,G=Q.items,V=J0(Q.effect.first),H,P=null,$,U=[],q=[],B,F,Y,w;if(Z){for(w=0;w<z;w+=1)if(B=J[w],F=X(B,w),Y=G.get(F).e,(Y.f&x7)===0)Y.nodes?.a?.measure(),($??=new Set).add(Y)}for(w=0;w<z;w+=1){if(B=J[w],F=X(B,w),Y=G.get(F).e,Q.outrogroups!==null)for(let g7 of Q.outrogroups)g7.pending.delete(Y),g7.done.delete(Y);if((Y.f&d)!==0){if(gQ(Y),Z)Y.nodes?.a?.unfix(),($??=new Set).delete(Y)}if((Y.f&x7)!==0)if(Y.f^=x7,Y===V)W0(Y,null,W);else{var b=P?P.next:V;if(Y===Q.effect.last)Q.effect.last=Y.prev;if(Y.prev)Y.prev.next=Y.next;if(Y.next)Y.next.prev=Y.prev;VQ(Q,P,Y),VQ(Q,Y,b),W0(Y,b,W),P=Y,U=[],q=[],V=J0(P.next);continue}if(Y!==V){if(H!==void 0&&H.has(Y)){if(U.length<q.length){var x=q[0],I;P=x.prev;var A7=U[0],Z7=U[U.length-1];for(I=0;I<U.length;I+=1)W0(U[I],x,W);for(I=0;I<q.length;I+=1)H.delete(q[I]);VQ(Q,A7.prev,Z7.next),VQ(Q,P,A7),VQ(Q,Z7,x),V=x,P=Z7,w-=1,U=[],q=[]}else H.delete(Y),W0(Y,V,W),VQ(Q,Y.prev,Y.next),VQ(Q,Y,P===null?Q.effect.first:P.next),VQ(Q,P,Y),P=Y;continue}U=[],q=[];while(V!==null&&V!==Y)(H??=new Set).add(V),q.push(V),V=J0(V.next);if(V===null)continue}if((Y.f&x7)===0)U.push(Y);P=Y,V=J0(Y.next)}if(Q.outrogroups!==null){for(let g7 of Q.outrogroups)if(g7.pending.size===0)j9(Q,jQ(g7.done)),Q.outrogroups?.delete(g7);if(Q.outrogroups.size===0)Q.outrogroups=null}if(V!==null||H!==void 0){var O7=[];if(H!==void 0){for(Y of H)if((Y.f&d)===0)O7.push(Y)}while(V!==null){if((V.f&d)===0&&V!==Q.fallback)O7.push(V);V=J0(V.next)}var IQ=O7.length;if(IQ>0){var t7=(K&f0)!==0&&z===0?W:null;if(Z){for(w=0;w<IQ;w+=1)O7[w].nodes?.a?.measure();for(w=0;w<IQ;w+=1)O7[w].nodes?.a?.fix()}K8(Q,O7,t7)}}if(Z)s(()=>{if($===void 0)return;for(Y of $)Y.nodes?.a?.apply()})}function z8(Q,J,W,K,X,Z,z,G){var V=(z&u9)!==0?(z&d9)===0?SQ(W,!1,!1):K7(W):null,H=(z&p9)!==0?K7(X):null;return{v:V,i:H,e:o(()=>{return Z(J,V??W,H??X,G),()=>{Q.delete(K)}})}}function W0(Q,J,W){if(!Q.nodes)return;var K=Q.nodes.start,X=Q.nodes.end,Z=J&&(J.f&x7)===0?J.nodes.start:W;while(K!==null){var z=c(K);if(Z.before(K),K===X)return;K=z}}function VQ(Q,J,W){if(J===null)Q.effect.first=W;else J.next=W;if(W===null)Q.effect.last=J;else W.prev=J}function G8(Q,J,W=!1,K=!1,X=!1,Z=!1){var z=Q,G="";if(W){var V=Q;if(M)z=R(h(V))}U9(()=>{var H=L;if(G===(G=J()??"")){if(M)l();return}if(W&&!M){if(H.nodes=null,V.innerHTML=G,G!=="")F7(h(V),V.lastChild);return}if(H.nodes!==null)H9(H.nodes.start,H.nodes.end),H.nodes=null;if(G==="")return;if(M){var P=D.data,$=l(),U=$;while($!==null&&($.nodeType!==D7||$.data!==""))U=$,$=c($);if($===null)throw WQ(),m7;F7(D,U),z=R($);return}var q=K?dQ:X?_0:void 0,B=I7(K?"svg":X?"math":"template",q);B.innerHTML=G;var F=K||X?B:B.content;if(F7(h(F),F.lastChild),K||X)while(h(F))z.before(h(F));else z.before(F)})}function V8(Q,J,W,K,X){if(M)l();if(J.$$host?.$$shadowRoot){let G=I7("slot");if(W!=="default")G.name=W;if(Q0(Q,G),X!==null){let V=p();G.append(V),X(V)}return}var Z=J.$$slots?.[W],z=!1;if(Z===!0)Z=J[W==="default"?"children":W],z=!0;if(Z===void 0){if(X!==null)X(Q)}else Z(Q,z?()=>K:K)}function Y8(Q,J){U7(()=>{Q=L?.parent?.nodes?.start??Q;var W=Q.getRootNode(),K=W.host?W:W.head??W.ownerDocument.head;if(!K.querySelector("#"+J.hash)){let X=I7("style");X.id=J.hash,X.textContent=J.code,K.appendChild(X)}})}function M8(Q,J,W){U7(()=>{var K=k(()=>J(Q,W?.())||{});if(W&&K?.update){var X=!1,Z={};a(()=>{var z=W();if(I0(z),X&&H0(Z,z))Z=z,K.update(z)}),X=!0}if(K?.destroy)return()=>K.destroy()})}var K4=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function X4(Q,J,W){var K=Q==null?"":""+Q;if(J)K=K?K+" "+J:J;if(W){for(var X of Object.keys(W))if(W[X])K=K?K+" "+X:X;else if(K.length){var Z=X.length,z=0;while((z=K.indexOf(X,z))>=0){var G=z+Z;if((z===0||K4.includes(K[z-1]))&&(G===K.length||K4.includes(K[G])))K=(z===0?"":K.substring(0,z))+K.substring(G+1);else z=G}}}return K===""?null:K}function Z4(Q,J,W,K,X,Z){var z=Q[pQ];if(M||z!==W||z===void 0){var G=X4(W,K,Z);if(!M||G!==Q.getAttribute("class"))if(G==null)Q.removeAttribute("class");else if(J)Q.className=G;else Q.setAttribute("class",G);Q[pQ]=W}else if(Z&&X!==Z)for(var V in Z){var H=!!Z[V];if(X==null||H!==!!X[V])Q.classList.toggle(V,H)}return Z}var j8=Symbol("class"),T8=Symbol("style"),x8=Symbol("is custom element"),E8=Symbol("is html"),k8=p0?"link":"LINK";function V4(Q,J,W,K){var X=y8(Q);if(M){if(X[J]=Q.getAttribute(J),J==="src"||J==="srcset"||J==="href"&&Q.nodeName===k8){if(!K)g8(Q,J,W??"");return}}if(X[J]===(X[J]=W))return;if(J==="loading")Q[v9]=W;if(W==null)Q.removeAttribute(J);else if(typeof W!=="string"&&q4(Q).has(J))Q[J]=W;else Q.setAttribute(J,W)}function b8(Q,J,W){var K=O,X=L;let Z=M;if(M)f(!1);u(null),_(null);try{if(J!=="style"&&(T9.has(Q.getAttribute("is")||Q.nodeName)||!customElements||customElements.get(Q.getAttribute("is")||Q.nodeName.toLowerCase())?q4(Q).has(J):W&&typeof W==="object"))Q[J]=W;else V4(Q,J,W==null?W:String(W))}finally{if(u(K),_(X),Z)f(!0)}}function y8(Q){return Q[z0]??={[x8]:Q.nodeName.includes("-"),[E8]:Q.namespaceURI===G0}}var T9=new Map;function q4(Q){var J=Q.getAttribute("is")||Q.nodeName,W=T9.get(J);if(W)return W;T9.set(J,W=new Set);var K,X=Q,Z=Element.prototype;while(Z!==X){K=V0(X);for(var z in K)if(K[z].set&&z!=="innerHTML"&&z!=="textContent"&&z!=="innerText")W.add(z);X=HQ(X)}return W}function g8(Q,J,W){return}function x9(Q,J){if(Q===J)return!0;return new URL(Q,document.baseURI).href===new URL(J,document.baseURI).href}function z4(Q){return Q.split(",").map((J)=>J.trim().split(" ").filter(Boolean))}function h8(Q,J){var W=z4(Q.srcset),K=z4(J);return K.length===W.length&&K.every(([X,Z],z)=>Z===W[z][1]&&(x9(W[z][0],X)||x9(X,W[z][0])))}class $4{#Q=new WeakMap;#J;#W;static entries=new WeakMap;constructor(Q){this.#W=Q}observe(Q,J){var W=this.#Q.get(Q)||new Set;return W.add(J),this.#Q.set(Q,W),this.#G().observe(Q,this.#W),()=>{var K=this.#Q.get(Q);if(K.delete(J),K.size===0)this.#Q.delete(Q),this.#J.unobserve(Q)}}#G(){return this.#J??(this.#J=new ResizeObserver((Q)=>{for(var J of Q){$4.entries.set(J.target,J);for(var W of this.#Q.get(J.target)||[])W(J)}}))}}function E9(Q,J){return Q===J||Q?.[q7]===J}function v8(Q=lQ(),J,W,K){var X=C.r,Z=L;return U7(()=>{var z,G;return a(()=>{z=G,G=K?.()||[],k(()=>{if(!E9(W(...G),Q)){if(J(Q,...G),z&&E9(W(...z),Q))J(null,...z)}})}),()=>{let V=Z;while(V!==X&&V.parent!==null&&V.parent.f&QQ)V=V.parent;let H=()=>{if(G&&E9(W(...G),Q))J(null,...G)},P=V.teardown;V.teardown=()=>{H(),P?.()}}}),Q}var b0=!1,UG=Symbol("unmounted");function b9(Q){var J=b0;try{return b0=!1,[Q(),b0]}finally{b0=J}}function u8(Q,J,W,K){var X=!KQ||(W&l9)!==0,Z=(W&c9)!==0,z=(W&o9)!==0,G=K,V=!0,H=void 0,P=()=>{if(z&&X)return H??=ZQ(K),A(H);if(V)V=!1,G=z?k(K):K;return G};let $;if(Z){var U=q7 in Q||uQ in Q;$=B7(Q,J)?.set??(U&&J in Q?(I)=>Q[J]=I:void 0)}var q,B=!1;if(Z)[q,B]=b9(()=>Q[J]);else q=Q[J];if(q===void 0&&K!==void 0){if(q=P(),$){if(X)UJ(J);$(q)}}var F;if(X)F=()=>{var I=Q[J];if(I===void 0)return P();return V=!0,I};else F=()=>{var I=Q[J];if(I!==void 0)G=void 0;return I===void 0?G:I};if(X&&(W&i9)===0)return F;if($){var Y=Q.$$legacy;return function(I,A7){if(arguments.length>0){if(!X||!A7||Y||B)$(A7?F():I);return I}return F()}}var w=!1,b=((W&_9)!==0?ZQ:LQ)(()=>{return w=!1,F()});if(Z)A(b);var x=L;return function(I,A7){if(arguments.length>0){let Z7=A7?A(b):X&&Z?a7(I):I;if(X7(b,Z7),w=!0,G!==void 0)G=Z7;return I}if(S7&&w||(x.f&y)!==0)return b.v;return A(b)}}function U4(Q){return new P4(Q)}class P4{#Q;#J;constructor(Q){var J=new Map,W=(X,Z)=>{var z=SQ(Z,!1,!1);return J.set(X,z),z};let K=new Proxy({...Q.props||{},$$events:{}},{get(X,Z){return A(J.get(Z)??W(Z,Reflect.get(X,Z)))},has(X,Z){if(Z===uQ)return!0;return A(J.get(Z)??W(Z,Reflect.get(X,Z))),Reflect.has(X,Z)},set(X,Z,z){return X7(J.get(Z)??W(Z,z),z),Reflect.set(X,Z,z)}});if(this.#J=(Q.hydrate?N9:E0)(Q.component,{target:Q.target,anchor:Q.anchor,props:K,context:Q.context,intro:Q.intro??!1,recover:Q.recover,transformError:Q.transformError}),!Q7&&(!Q?.props?.$$host||Q.sync===!1))yQ();this.#Q=K.$$events;for(let X of Object.keys(this.#J)){if(X==="$set"||X==="$destroy"||X==="$on")continue;H7(this,X,{get(){return this.#J[X]},set(Z){this.#J[X]=Z},enumerable:!0})}this.#J.$set=(X)=>{Object.assign(K,X)},this.#J.$destroy=()=>{R9(this.#J)}}$set(Q){this.#J.$set(Q)}$on(Q,J){this.#Q[Q]=this.#Q[Q]||[];let W=(...K)=>J.call(this,...K);return this.#Q[Q].push(W),()=>{this.#Q[Q]=this.#Q[Q].filter((K)=>K!==W)}}$destroy(){this.#J.$destroy()}}var H4;if(typeof HTMLElement==="function")H4=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(Q,J,W){super();if(this.$$ctor=Q,this.$$s=J,W)this.$$shadowRoot=this.attachShadow(W)}addEventListener(Q,J,W){if(this.$$l[Q]=this.$$l[Q]||[],this.$$l[Q].push(J),this.$$c){let K=this.$$c.$on(Q,J);this.$$l_u.set(J,K)}super.addEventListener(Q,J,W)}removeEventListener(Q,J,W){if(super.removeEventListener(Q,J,W),this.$$c){let K=this.$$l_u.get(J);if(K)K(),this.$$l_u.delete(J)}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let Q=function(K){return(X)=>{let Z=I7("slot");if(K!=="default")Z.name=K;Q0(X,Z)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let J={},W=o8(this);for(let K of this.$$s)if(K in W)if(K==="default"&&!this.$$d.children)this.$$d.children=Q(K),J.default=!0;else J[K]=Q(K);for(let K of this.attributes){let X=this.$$g_p(K.name);if(!(X in this.$$d))this.$$d[X]=y0(X,K.value,this.$$p_d,"toProp")}for(let K in this.$$p_d)if(!(K in this.$$d)&&this[K]!==void 0)this.$$d[K]=this[K],delete this[K];this.$$c=U4({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:J,$$host:this}}),this.$$me=$9(()=>{a(()=>{this.$$r=!0;for(let K of _Q(this.$$c)){if(!this.$$p_d[K]?.reflect)continue;this.$$d[K]=this.$$c[K];let X=y0(K,this.$$d[K],this.$$p_d,"toAttribute");if(X==null)this.removeAttribute(this.$$p_d[K].attribute||K);else this.setAttribute(this.$$p_d[K].attribute||K,X)}this.$$r=!1})});for(let K in this.$$l)for(let X of this.$$l[K]){let Z=this.$$c.$on(K,X);this.$$l_u.set(X,Z)}this.$$l={}}}attributeChangedCallback(Q,J,W){if(this.$$r)return;Q=this.$$g_p(Q),this.$$d[Q]=y0(Q,W,this.$$p_d,"toProp"),this.$$c?.$set({[Q]:this.$$d[Q]})}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{if(!this.$$cn&&this.$$c)this.$$c.$destroy(),this.$$me(),this.$$c=void 0})}$$g_p(Q){return _Q(this.$$p_d).find((J)=>this.$$p_d[J].attribute===Q||!this.$$p_d[J].attribute&&J.toLowerCase()===Q)||Q}};function y0(Q,J,W,K){let X=W[Q]?.type;if(J=X==="Boolean"&&typeof J!=="boolean"?J!=null:J,!K||!W[Q])return J;else if(K==="toAttribute")switch(X){case"Object":case"Array":return J==null?null:JSON.stringify(J);case"Boolean":return J?"":null;case"Number":return J==null?null:J;default:return J}else switch(X){case"Object":case"Array":return J&&JSON.parse(J);case"Boolean":return J;case"Number":return J!=null?+J:J;default:return J}}function o8(Q){let J={};return Q.childNodes.forEach((W)=>{J[W.slot||"default"]=!0}),J}function s8(Q,J,W,K,X,Z){let z=class extends H4{constructor(){super(Q,W,X);this.$$p_d=J}static get observedAttributes(){return _Q(J).map((G)=>(J[G].attribute||G).toLowerCase())}};if(_Q(J).forEach((G)=>{H7(z.prototype,G,{get(){return this.$$c&&G in this.$$c?this.$$c[G]:this.$$d[G]},set(V){V=y0(G,V,J),this.$$d[G]=V;var H=this.$$c;if(H){var P=B7(H,G)?.get;if(P)H[G]=V;else H.$set({[G]:V})}}})}),K.forEach((G)=>{H7(z.prototype,G,{get(){return this.$$c?.[G]}})}),Z)z=Z(z);return Q.element=z,z}import{createContext as g0}from"@pie-players/pie-context";var B4=g0(Symbol.for("pie.assessmentToolkit.runtimeContext")),Y4=g0(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),M4=g0(Symbol.for("pie.assessmentToolkit.shellContext")),r8=g0(Symbol.for("pie.assessmentToolkit.regionScopeContext"));import{connectContextWithRetry as y9}from"@pie-players/pie-context";var a8={bubbles:!0,composed:!0,cancelable:!1};function n8(Q,J,W={}){return new CustomEvent(Q,{detail:J,...a8,...W})}function UP(Q,J,W,K={}){return Q.dispatchEvent(n8(J,W,K))}function PP(Q,J){return y9(Q,B4,J)}function HP(Q,J){return y9(Q,M4,J)}function BP(Q,J){return y9(Q,Y4,J)}var MP=1e4;function LP(Q,J,W){if(!Q)return;let K=Symbol.for(`pie.assessmentToolkit.warned.${J}`),X=Q;if(X[K])return;X[K]=!0,console.warn(W)}function OP(Q,J){return F4(Q,J,new WeakMap)}function F4(Q,J,W){if(Object.is(Q,J))return!0;let K=Array.isArray(Q);if(K!==Array.isArray(J))return!1;if(!K&&(!L4(Q)||!L4(J)))return!1;let X=Q,Z=J;if(K&&Q.length!==J.length)return!1;let z=W.get(X);if(z?.has(Z))return!0;if(!z)z=new Set,W.set(X,z);z.add(Z);let G=new Set([...Object.keys(X),...Object.keys(Z)]);for(let V of G)if(!F4(X[V],Z[V],W))return!1;return!0}function L4(Q){if(Q===null||typeof Q!=="object")return!1;let J=Object.getPrototypeOf(Q);return J===Object.prototype||J===null}
|
|
4
|
+
export{A0 as t,c0 as u,o0 as v,R4 as w,yQ as x,d7 as y,X7 as z,a7 as A,cJ as B,u4 as C,p4 as D,f4 as E,q9 as F,U9 as G,A as H,k as I,oJ as J,sJ as K,i4 as L,c4 as M,Q0 as N,n4 as O,Q8 as P,W8 as Q,X8 as R,G8 as S,V8 as T,Y8 as U,M8 as V,Z4 as W,V4 as X,b8 as Y,v8 as Z,u8 as _,s8 as $,B4 as aa,Y4 as ba,M4 as ca,r8 as da,UP as ea,PP as fa,HP as ga,BP as ha,MP as ia,LP as ja,OP as ka};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ia as h,ja as F}from"./ItemToolBar-7tt7v2xp.js";var Y=["assessment","section","item","passage","rubric"],H=new Set(Y);function U(f){return H.has(f)}function N(f,p,c){let w=f.trim(),E=c.trim();if(!w||!E)throw Error("Tool instance ids require non-empty tool and scope ids");if(!U(p))throw Error(`Unknown tool scope level '${p}'. Register custom levels with registerToolScopeLevel().`);return`${w}:${p}:${E}`}function q(f){let p=f.split(":");if(p.length!==3)return null;let[c,w,E]=p;if(!c||!E)return null;if(!U(w))return null;return{baseToolId:c,scopeLevel:w,scopeId:E}}function B(f){return(...p)=>{console.debug(`[${f}]`,...p)}}var z=B("ToolCoordinator"),T;(function(f){f[f.BASE=0]="BASE",f[f.TOOL=1000]="TOOL",f[f.MODAL=2000]="MODAL",f[f.CONTROL=3000]="CONTROL",f[f.HIGHLIGHT=4000]="HIGHLIGHT"})(T||(T={}));function J(f,p){if(!p?.baseId)return!0;return(q(f)?.baseToolId??f)===p.baseId}function M(f){return{id:f.id,name:f.name,isVisible:f.isVisible,element:f.element,layer:f.layer}}class V{tools=new Map;listeners=new Set;subscribe(f){return this.listeners.add(f),()=>{this.listeners.delete(f)}}notifyListeners(){for(let f of this.listeners)try{f()}catch(p){console.warn("[ToolCoordinator] listener failed:",p)}}registerTool(f,p,c,w){z("registerTool called:",{id:f,name:p,hasElement:!!c,layer:w});let E=this.tools.get(f);if(E){E.name=p;let u=E.registered;if(E.registered=!0,w!==void 0&&!E.layerDeclared)E.layer=w,E.layerDeclared=!0,this.stackOnTop(E);else if(!u)this.stackOnTop(E)}else E={id:f,name:p,registered:!0,element:null,layer:w??T.TOOL,layerDeclared:w!==void 0,isVisible:!1,baseZIndex:0},this.tools.set(f,E),this.stackOnTop(E);if(c)this.updateToolElement(f,c)}unregisterTool(f){let p=this.tools.get(f);if(!p?.registered)return;this.detachElement(p),p.registered=!1}releaseTool(f){let p=this.tools.get(f);if(!p)return;if(this.detachElement(p),this.tools.delete(f),p.isVisible)this.notifyListeners()}showTool(f){let p=this.tools.get(f);if(!p){z(`Tool ${f} not found`);return}if(p.element)this.bringToFront(p.element);this.setVisible(p,!0)}hideTool(f){let p=this.tools.get(f);if(!p){z(`Tool ${f} not found`);return}this.setVisible(p,!1)}toggleTool(f){let p=this.tools.get(f);if(!p){z(`Tool ${f} not found`);return}if(p.isVisible)this.hideTool(f);else this.showTool(f)}isToolVisible(f){return this.tools.get(f)?.isVisible??!1}bringToFront(f){let p=Array.from(this.tools.values()).find((c)=>c.element===f);if(!p)return;this.stackOnTop(p)}getRegisteredTools(){return Array.from(this.tools.values()).filter((f)=>f.registered).map((f)=>f.id)}getToolElement(f){return this.tools.get(f)?.element??null}setVisible(f,p){if(f.isVisible===p)return;f.isVisible=p,this.notifyListeners()}detachElement(f){if(f.element&&f.mouseDownHandler)f.element.removeEventListener("mousedown",f.mouseDownHandler);f.element=null,f.mouseDownHandler=void 0}stackOnTop(f){let p=Array.from(this.tools.values()).filter((w)=>w.registered&&w.layer===f.layer&&w!==f).sort((w,E)=>w.baseZIndex-E.baseZIndex),c=f.layer+p.length+1;if(f.baseZIndex===c&&p.every((w)=>w.baseZIndex<c))return;[...p,f].forEach((w,E)=>{if(w.baseZIndex=f.layer+1+E,w.element)w.element.style.zIndex=String(w.baseZIndex)})}updateToolElement(f,p){let c=this.tools.get(f);if(!c?.registered){z(`Tool ${f} not found`);return}if(c.element===p)return;if(c.element?.isConnected&&c.element.contains(p))return;this.detachElement(c);let w=()=>this.bringToFront(p);if(p.addEventListener("mousedown",w),c.element=p,c.mouseDownHandler=w,p.style.zIndex=String(c.baseZIndex),c.isVisible)this.bringToFront(p)}hideAllTools(f){let p=!1;for(let c of this.tools.values()){if(!c.isVisible||!J(c.id,f))continue;c.isVisible=!1,p=!0}if(p)this.notifyListeners()}getToolState(f){let p=this.tools.get(f);return p?.registered?M(p):void 0}getVisibleTools(f){return Array.from(this.tools.values()).filter((p)=>p.isVisible&&J(p.id,f)).map(M)}}import{dynamicMessageKey as a}from"@pie-players/pie-players-shared/i18n/provider";import{validateCustomElementTag as W}from"@pie-players/pie-players-shared/pie/tag-names";var P=(f,p)=>{let c=p?.toolTagMap?.[f];if(c===void 0&&!f.includes("-"))throw Error(`No element tag is mapped for tool "${f}". Install a tag map on the registry via setComponentOverrides({ toolTagMap }) — for the packaged capabilities, PACKAGED_TOOL_TAG_MAP from "@pie-players/pie-default-tool-loaders".`);return W(c??f,`tool component tag for "${f}"`)};var R=["assessment","section","item","passage","rubric","element"];function j(f,p){if(typeof f!=="string"||f.trim().length===0)throw Error(`Invalid tool registration: "${p}" must be a non-empty string.`)}var S=[{pattern:/<script\b/i,reason:"contains a <script> tag"},{pattern:/\son[a-z]+\s*=/i,reason:"contains an inline event handler (on*=) attribute"},{pattern:/javascript:/i,reason:"contains a javascript: URL"},{pattern:/<foreignObject\b/i,reason:"contains a <foreignObject> element"}];function G(f,p,c){let w=p.trimStart(),E=w.toLowerCase().startsWith("<svg"),u=/^https?:/i.test(w);if(/^data:/i.test(w))throw Error(`Invalid tool registration "${f}": "${c}" may not be a data: URL.`);if(!E&&!u)return;for(let{pattern:X,reason:_}of S)if(X.test(p))throw Error(`Invalid tool registration "${f}": "${c}" ${_}. Inline SVG icons must not include scriptable content.`)}function Q(f){j(f.toolId,"toolId"),j(f.name,"name"),j(f.description,"description");let p=f.activation==="region";if(!p||f.icon!==void 0){if(typeof f.icon!=="string"&&typeof f.icon!=="function")throw Error(`Invalid tool registration "${f.toolId}": "icon" must be a string or function.`)}if(typeof f.icon==="string")G(f.toolId,f.icon,"icon");if(!Array.isArray(f.supportedLevels)||f.supportedLevels.length===0)throw Error(`Invalid tool registration "${f.toolId}": "supportedLevels" must be a non-empty array.`);let c=f.supportedLevels.find((w)=>!R.includes(w));if(c)throw Error(`Invalid tool registration "${f.toolId}": unsupported level "${c}".`);if(f.activation!==void 0&&f.activation!=="toolbar-toggle"&&f.activation!=="selection-gateway"&&f.activation!=="region")throw Error(`Invalid tool registration "${f.toolId}": unsupported activation "${String(f.activation)}".`);if(f.surfaces!==void 0&&(!Array.isArray(f.surfaces)||f.surfaces.some((w)=>typeof w!=="string"||w.trim().length===0)))throw Error(`Invalid tool registration "${f.toolId}": "surfaces" must be an array of non-empty strings.`);if(p&&!f.surfaces?.length)throw Error(`Invalid tool registration "${f.toolId}": region tools must declare at least one host surface in "surfaces".`);if(p&&typeof f.renderSurface!=="function")throw Error(`Invalid tool registration "${f.toolId}": region tools must implement "renderSurface".`);if(f.resolvesWithoutGrant!==void 0&&typeof f.resolvesWithoutGrant!=="boolean")throw Error(`Invalid tool registration "${f.toolId}": "resolvesWithoutGrant" must be a boolean.`);if(f.resolvesWithoutGrant&&!f.requiresAuthoredContent)throw Error(`Invalid tool registration "${f.toolId}": "resolvesWithoutGrant" requires "requiresAuthoredContent".`);if(f.renderSurface!==void 0&&typeof f.renderSurface!=="function")throw Error(`Invalid tool registration "${f.toolId}": "renderSurface" must be a function.`);if(f.renderSurface&&!f.surfaces?.length)throw Error(`Invalid tool registration "${f.toolId}": "renderSurface" requires at least one entry in "surfaces".`);if(f.singletonScope!==void 0&&f.singletonScope!=="section")throw Error(`Invalid tool registration "${f.toolId}": unsupported singletonScope "${String(f.singletonScope)}".`);if(f.activation==="selection-gateway"&&f.singletonScope!=="section")throw Error(`Invalid tool registration "${f.toolId}": selection-gateway tools must declare singletonScope "section".`);if(f.activation!=="region"&&typeof f.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${f.toolId}": "isVisibleInContext" must be a function.`);if(f.isVisibleInContext!==void 0&&typeof f.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${f.toolId}": "isVisibleInContext" must be a function when present.`);if(f.isApplicableToContent!==void 0&&typeof f.isApplicableToContent!=="function")throw Error(`Invalid tool registration "${f.toolId}": "isApplicableToContent" must be a function when present.`);if(f.requiresAuthoredContent!==void 0){if(typeof f.requiresAuthoredContent!=="object"||f.requiresAuthoredContent===null||typeof f.requiresAuthoredContent.resolve!=="function")throw Error(`Invalid tool registration "${f.toolId}": "requiresAuthoredContent" must be an object with a "resolve" function.`)}if(f.renderToolbar!==void 0){if(typeof f.renderToolbar!=="function")throw Error(`Invalid tool registration "${f.toolId}": "renderToolbar" must be a function.`)}else if(!p)throw Error(`Invalid tool registration "${f.toolId}": "renderToolbar" must be a function.`)}class D{tools=new Map;componentOverrides={};watchedUndefinedToolElements=new Set;moduleLoaders=new Map;loadedToolModules=new Set;warnedLoaderReplacements=new Set;warnedUnregisteredAllowedTools=new Set;moduleLoadPromises=new Map;changeListeners=new Set;emitChange(f){for(let p of this.changeListeners)try{p(f)}catch(c){console.warn("[ToolRegistry] change listener failed:",c)}}onRegistryChange(f){this.changeListeners.add(f);let p=!0;return()=>{if(!p)return;p=!1,this.changeListeners.delete(f)}}normalizeToolId(f){return f.trim()}normalizeToolIds(f){return f.map((p)=>this.normalizeToolId(p))}register(f){if(Q(f),this.tools.has(f.toolId))throw Error(`Tool '${f.toolId}' is already registered`);this.tools.set(f.toolId,f),this.emitChange({kind:"register",toolIds:[f.toolId]})}override(f){if(Q(f),!this.tools.has(f.toolId))throw Error(`Cannot override non-existent tool '${f.toolId}'`);this.tools.set(f.toolId,f),this.emitChange({kind:"override",toolIds:[f.toolId]})}unregister(f){if(!this.tools.has(f))return;this.tools.delete(f),this.emitChange({kind:"unregister",toolIds:[f]})}get(f){return this.tools.get(f)}has(f){return this.tools.has(f)}getAllToolIds(){return Array.from(this.tools.keys())}getAllTools(){return Array.from(this.tools.values())}getToolsByLevel(f){return this.getAllTools().filter((p)=>p.supportedLevels.includes(f))}getToolActivation(f){return this.get(f)?.activation||"toolbar-toggle"}getToolSingletonScope(f){return this.get(f)?.singletonScope||null}getToolsBySurface(f){if(!f)return[];return this.getAllTools().filter((p)=>typeof p.renderSurface==="function"&&p.surfaces?.includes(f))}getContentDependentSupportIds(){return this.getAllTools().filter((f)=>f.requiresAuthoredContent).map((f)=>f.toolId).sort()}filterToolIdsByActivation(f,p){return f.filter((c)=>this.getToolActivation(c)===p)}filterVisibleInContext(f,p){let c=[];for(let w of f){let E=this.get(w);if(!E){if(!this.warnedUnregisteredAllowedTools.has(w))this.warnedUnregisteredAllowedTools.add(w),console.warn(`Tool '${w}' is allowed but not registered`);continue}if(!E.supportedLevels.includes(p.level))continue;try{if(E.isVisibleInContext?.(p))c.push(E)}catch(u){console.error(`Error evaluating visibility for tool '${w}':`,u)}}return c}isApplicableToAnyContext(f,p){let c=this.get(f);if(!c?.isApplicableToContent)return!0;if(p.length===0)return!0;return p.some((w)=>{try{return c.isApplicableToContent?.(w)??!0}catch(E){return console.error(`Error evaluating applicability for tool '${f}':`,E),!0}})}getToolMetadata(){return this.getAllTools().map((f)=>({toolId:f.toolId,name:f.name,description:f.description,supportedLevels:f.supportedLevels,activation:f.activation||"toolbar-toggle",singletonScope:f.singletonScope||null,surfaces:f.surfaces||[],requiresAuthoredContent:Boolean(f.requiresAuthoredContent),contentDependencyDescription:f.requiresAuthoredContent?.description??null}))}clear(){let f=this.getAllToolIds();if(f.length===0)return;this.tools.clear(),this.emitChange({kind:"clear",toolIds:f})}setComponentOverrides(f){if(this.componentOverrides===f)return;this.componentOverrides=f,this.emitChange({kind:"component-overrides",toolIds:[]})}setToolModuleLoaders(f){let p=Object.entries(f).filter((w)=>w[1]!==void 0);for(let[w,E]of p)if(j(w,"tool module loader id"),typeof E!=="function")throw Error(`Invalid tool module loader for "${w}": expected a function.`);let c=[];for(let[w,E]of p){if(this.moduleLoaders.get(w)===E)continue;if(this.loadedToolModules.has(w)||this.moduleLoadPromises.has(w)){this.warnLoaderReplacedAfterLoad(w);continue}this.moduleLoaders.set(w,E),c.push(w)}if(c.length>0)this.emitChange({kind:"module-loaders",toolIds:c})}warnLoaderReplacedAfterLoad(f){if(this.warnedLoaderReplacements.has(f))return;this.warnedLoaderReplacements.add(f),console.warn(`[ToolRegistry] Ignored a new module loader for "${f}": its module already loaded, so the elements it defines stay in place. Register loaders before the tool first renders.`)}async ensureToolModuleLoaded(f){if(this.loadedToolModules.has(f))return;let p=this.moduleLoadPromises.get(f);if(p){await p;return}let c=this.moduleLoaders.get(f);if(!c){this.watchUndefinedToolElement(f);return}let w=(async()=>{await c(),this.loadedToolModules.add(f),this.warnIfLoadedToolElementUndefined(f)})();this.moduleLoadPromises.set(f,w);try{await w}finally{this.moduleLoadPromises.delete(f)}}undefinedToolElementTag(f){if(typeof customElements>"u"||typeof document>"u")return null;let p=this.componentOverrides;if(p.toolComponentFactories?.[f])return null;let c;try{c=P(f,p)}catch{return null}return customElements.get(c)?null:c}warnIfLoadedToolElementUndefined(f){let p=this.undefinedToolElementTag(f);if(!p)return;F(document,`loadedToolElementUndefined.${f}.${p}`,`[ToolRegistry] Tool "${f}" renders <${p}>, but its module loader finished without defining it, so the tool renders blank. The tag map and the loader disagree: map "${f}" to the tag its loader defines, or register a loader that defines <${p}>. Reported once per page.`)}watchUndefinedToolElement(f){if(this.watchedUndefinedToolElements.has(f))return;let p=this.undefinedToolElementTag(f);if(!p)return;this.watchedUndefinedToolElements.add(f);let c=document,w=setTimeout(()=>{if(customElements.get(p))return;F(c,`undefinedToolElement.${f}`,`[ToolRegistry] Tool "${f}" renders <${p}>, which is still undefined after ${h/1000} s, and its registry has no module loader for it. Pass toolModuleLoaders to createPackagedToolRegistry (DEFAULT_TOOL_MODULE_LOADERS from @pie-players/pie-default-tool-loaders loads the stock tools), register one with setToolModuleLoaders, or import the tool's package before it renders. Reported once per page.`)},h);customElements.whenDefined(p).then(()=>clearTimeout(w))}async ensureToolModulesLoaded(f){let p=await Promise.allSettled(f.map((w)=>this.ensureToolModuleLoaded(w))),c=new Map;return p.forEach((w,E)=>{if(w.status==="rejected")c.set(f[E],w.reason)}),c}isToolModuleLoaded(f){return this.loadedToolModules.has(f)}renderForToolbar(f,p,c){let w=this.get(f);if(!w)throw Error(`Tool '${f}' is not registered`);if(typeof w.renderToolbar!=="function")throw Error(`Tool '${f}' has activation "${w.activation||"toolbar-toggle"}" and renders into a host surface, not a toolbar. Remove it from toolbar placement.`);let E={...c,componentOverrides:{...this.componentOverrides||{},...c.componentOverrides||{}}};return w.renderToolbar(p,E)}renderForSurface(f,p){let c=this.get(f);if(!c)throw Error(`Tool '${f}' is not registered`);if(typeof c.renderSurface!=="function")throw Error(`Tool '${f}' does not render into a host surface. Surface capabilities declare "surfaces" and implement "renderSurface".`);return c.renderSurface({...p,componentOverrides:{...this.componentOverrides||{},...p.componentOverrides||{}}})}}var b={assessment:[],section:[],item:[],passage:[],rubric:[],element:[]};var C={section:[...b.section],item:[...b.item],passage:[...b.passage]};function A(f){return typeof f==="object"&&f!==null&&!Array.isArray(f)}function O(f,p){if(f==null)return[];if(!Array.isArray(f))throw Error(`Invalid tools config at "${p}": expected an array of tool ids.`);if(f.find((w)=>typeof w!=="string")!==void 0)throw Error(`Invalid tools config at "${p}": all entries must be strings.`);return f}function K(f){if(f==null)return;if(!A(f))throw Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');return f}function k(f){if(f==null)return;if(!A(f))throw Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');return f}function L(f,p){if(p==null)return;if(!A(p))throw Error(`Invalid tools config at "providers.${f}": expected an object.`);let c=p;if("enabled"in c&&c.enabled!==void 0&&typeof c.enabled!=="boolean")throw Error(`Invalid tools config at "providers.${f}.enabled": expected a boolean.`);if("settings"in c&&c.settings!==void 0&&!A(c.settings))throw Error(`Invalid tools config at "providers.${f}.settings": expected an object.`);if("provider"in c&&c.provider!==void 0&&!A(c.provider))throw Error(`Invalid tools config at "providers.${f}.provider": expected an object.`);return c}function Z(f){if(f==null)return{};if(!A(f))throw Error('Invalid tools config at "providers": expected an object keyed by tool id.');let p={};for(let[c,w]of Object.entries(f))p[c]=L(c,w);return p}function $(f){if(!f||f.length===0)return[];let p=new Set;for(let c of f){if(typeof c!=="string")throw Error("Invalid tools config: tool list entries must be strings.");let w=c.trim();if(!w)continue;p.add(w)}return Array.from(p)}function ff(f){if(!f)return[];return $(f.split(",").map((p)=>p.trim()).filter(Boolean))}function v(f,p){if(f==null)return;if(f==="on"||f==="off")return f;throw Error(`Invalid tools config at "${p}": expected "on" or "off", got ${JSON.stringify(f)}.`)}function pf(f){if(f!=null&&!A(f))throw Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');let p=k(f?.policy),c=K(f?.placement),w=Z(f?.providers),E=v(f?.pnpEnforcement,"pnpEnforcement"),u={policy:{allowed:$(O(p?.allowed,"policy.allowed")),blocked:$(O(p?.blocked,"policy.blocked"))},placement:{section:$(O(c?.section,"placement.section")).length?$(O(c?.section,"placement.section")):[...C.section],item:$(O(c?.item,"placement.item")).length?$(O(c?.item,"placement.item")):[...C.item],passage:$(O(c?.passage,"placement.passage")).length?$(O(c?.passage,"placement.passage")):[...C.passage]},providers:w};if(E)u.pnpEnforcement=E;return u}
|
|
2
|
+
export{N as m,T as n,V as o,D as p,$ as q,ff as r,pf as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{oa as w}from"./ItemToolBar-97hx60z4.js";var y={base:()=>import("speech-rule-engine/lib/mathmaps/base.json"),en:()=>import("speech-rule-engine/lib/mathmaps/en.json"),es:()=>import("speech-rule-engine/lib/mathmaps/es.json")},D=async(f)=>{if(!Object.hasOwn(y,f))throw Error(`no speech-rule-engine locale table is packaged for "${f}"; name a source with mathSpeech.engineOptions.json or .custom`);return(await y[f]()).default},G=()=>typeof window<"u"&&typeof window.document<"u"||typeof globalThis.DedicatedWorkerGlobalScope<"u",z=(f={})=>{let{json:q,custom:v}=f;if(q||v)return{...q?{json:q}:{},...v?{custom:v}:{}};return G()?{custom:D}:{}},x,H=(f)=>{x=z(f)},I=()=>{return x??=z(),x};
|
|
2
|
+
export{z as la,H as ma,I as na};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{m as rJ,n as lJ,p as nJ,r as tJ}from"./ItemToolBar-bxwyhr5p.js";import{$ as sJ,A as mJ,B as c0,C as Q0,E as wj,F as Z0,G as L0,H as j,J as Jj,K as hJ,L as M0,M as X0,N as H,P as Y0,Q as Bj,R as Zj,S as Uj,U as uJ,V as B0,W as T0,X as U0,Y as f0,Z as cJ,_ as o,aa as iJ,fa as aJ,ga as dJ,ia as tj,ja as oJ,ka as bJ,t as N0,u as gJ,v as $J,w as O,x as l,y as R0,z as V0}from"./ItemToolBar-7tt7v2xp.js";import{ContextProvider as hZ}from"@pie-players/pie-context";function lj(B){return typeof B.href==="string"}function CJ(B){if(!B||typeof B!=="object"||Array.isArray(B))return!1;let F=B;if(typeof F.id!=="string"||F.id.trim().length===0)return!1;if(typeof F.label!=="string"||F.label.trim().length===0)return!1;if(F.ariaLabel!==void 0&&typeof F.ariaLabel!=="string")return!1;if(F.icon!==void 0&&typeof F.icon!=="string")return!1;if(F.tooltip!==void 0&&typeof F.tooltip!=="string")return!1;if(F.active!==void 0&&typeof F.active!=="boolean")return!1;if(F.disabled!==void 0&&typeof F.disabled!=="boolean")return!1;let v=typeof F.href==="string",W0=typeof F.onClick==="function";if(v===W0)return!1;if(v)return!0;return W0}function oj(B){return typeof B==="string"&&B.trimStart().startsWith("<svg")}function nj(B){return typeof B==="string"&&B.trimStart().startsWith("http")}import{sanitizeSvgIcon as kj}from"@pie-players/pie-players-shared/security";import{resolveInterfaceI18n as uZ}from"@pie-players/pie-players-shared/i18n/provider";import{collectFocusable as cZ,createFocusTrap as sZ,createPointerGesture as iZ,FOCUSABLE_SELECTOR as aZ,isProgrammaticFocusTarget as dZ}from"@pie-players/pie-players-shared";var $Z={calculator:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v4h10V4H7Zm0 6v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z" fill="currentColor"/></svg>',"volume-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3.23v2.06A7.002 7.002 0 0 1 19 12a7 7 0 0 1-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77Zm-2 17.75V3L7 8H3v8h4l5 5Zm4.5-9a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12Z" fill="currentColor"/></svg>',swatch:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9c0-.55-.45-1-1-1h-2.5a1.5 1.5 0 0 1 0-3H20a1 1 0 0 0 1-1 8.99 8.99 0 0 0-9-4Zm-5.5 9A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 12Zm3-4A1.5 1.5 0 1 1 11 9.5 1.5 1.5 0 0 1 9.5 8Zm5 0A1.5 1.5 0 1 1 16 9.5 1.5 1.5 0 0 1 14.5 8Z" fill="currentColor"/></svg>',"chart-bar":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z" fill="currentColor"/></svg>',beaker:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z" fill="currentColor"/></svg>',protractor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z" fill="currentColor"/></svg>',"bars-3":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z" fill="currentColor"/></svg>',ruler:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z" fill="currentColor"/></svg>',"book-open":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 6.25a6.6 6.6 0 0 0-2.3-1.32A8.6 8.6 0 0 0 7 4.5c-.63 0-1.25.06-1.85.18-.6.12-1.19.3-1.76.54a1.5 1.5 0 0 0-.93 1.4v10.1c0 .52.26.98.68 1.24.42.26.92.28 1.35.06.36-.18.75-.31 1.18-.4.42-.09.86-.13 1.33-.13.78 0 1.53.14 2.24.42.7.28 1.35.7 1.93 1.24l.83-.75.83.75c.58-.54 1.22-.96 1.93-1.24a6.1 6.1 0 0 1 2.24-.42c.47 0 .91.04 1.33.13.43.09.82.22 1.18.4.43.22.93.2 1.35-.06.42-.26.68-.72.68-1.24V6.62c0-.6-.36-1.15-.93-1.4a9.3 9.3 0 0 0-1.76-.54A9.8 9.8 0 0 0 17 4.5a8.6 8.6 0 0 0-2.7.43A6.6 6.6 0 0 0 12 6.25Zm1 10.06V8.02c.55-.5 1.16-.88 1.84-1.13A6 6 0 0 1 17 6.5c.45 0 .89.04 1.32.11.43.08.85.19 1.26.34v9.24a8.2 8.2 0 0 0-1.28-.24A10 10 0 0 0 17 15.85c-.72 0-1.42.09-2.09.26a7.7 7.7 0 0 0-1.91.8Zm-2 0a7.7 7.7 0 0 0-1.91-.8 8.4 8.4 0 0 0-2.09-.26c-.44 0-.87.02-1.3.07-.43.05-.86.13-1.28.24V6.95c.41-.15.83-.26 1.26-.34A7.7 7.7 0 0 1 7 6.5c.76 0 1.48.13 2.16.39.68.25 1.29.63 1.84 1.13Z" fill="currentColor"/></svg>',photo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 21c-.55 0-1.02-.2-1.41-.59A1.93 1.93 0 0 1 2 19V5c0-.55.2-1.02.59-1.41A1.93 1.93 0 0 1 4 3h16c.55 0 1.02.2 1.41.59.39.39.59.86.59 1.41v14c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H4Zm0-2h16V5H4v14Zm1.5-2.5h13l-4.1-5.47-3.4 4.47-2.5-3.25L5.5 16.5ZM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" fill="currentColor"/></svg>'};function yJ(B){return $Z[B]||null}function pJ(){let B=null;return(F,v)=>{if(!F)return B=null,null;let W0=F.visibleTools.map((s0)=>({toolId:s0.toolId,required:s0.required,alwaysAvailable:s0.alwaysAvailable}));if(B?.renderVersion===v&&bJ(B.tools,W0))return B.tools;return B={renderVersion:v,tools:W0},W0}}import"@pie-players/pie-players-shared/nds-icon-button";var mZ=(B,F)=>{if(customElements.get(B))return;try{customElements.define(B,F)}catch(v){if(!(v instanceof DOMException&&v.name==="NotSupportedError"||v&&typeof v==="object"&&v.name==="NotSupportedError")||!customElements.get(B))throw v}},zj=M0('<span class="item-toolbar__element-host svelte-1c13522"></span>'),rZ=M0('<span class="item-toolbar__nds-button-zoom svelte-1c13522"><nds-icon-button></nds-icon-button></span>',2),Hj=M0('<span aria-hidden="true"></span>'),_J=M0('<img class="item-toolbar__icon-image svelte-1c13522" alt=""/>'),EJ=M0('<i aria-hidden="true"></i>'),lZ=M0("<a><!></a>"),oZ=M0('<button type="button"><!></button>'),vJ=M0('<span class="item-toolbar__controls-host svelte-1c13522"></span>'),nZ=M0("<div></div>"),tZ=M0('<div><div class="item-toolbar__tools-row svelte-1c13522"><!> <!> <!></div> <!></div>'),eZ={hash:"svelte-1c13522",code:`.item-toolbar.svelte-1c13522 {display:flex;flex-direction:column;align-items:flex-end;min-width:0;max-width:100%;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-1c13522 {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:0.5rem;max-width:100%;min-height:var(--pie-toolbar-tools-row-height);}
|
|
2
|
+
|
|
3
|
+
/* A granted section tool must stay reachable even when there isn't room for
|
|
4
|
+
every button: scroll the row rather than clipping items past the edge,
|
|
5
|
+
which left them impossible to focus, tab to, or click. \`min-width: 0\`
|
|
6
|
+
beats the flex default (\`auto\`, i.e. never shrink below content), which
|
|
7
|
+
would otherwise keep the row at full content width and make overflow-x
|
|
8
|
+
moot. Item and passage rows wrap without an overflow clip so an inline
|
|
9
|
+
reading-controls panel can still extend outside the row. */.item-toolbar[data-level="section"].svelte-1c13522 .item-toolbar__tools-row:where(.svelte-1c13522) {flex-wrap:nowrap;justify-content:flex-start;
|
|
10
|
+
/* Keep the focus outline inside the scrolling box on both axes. */padding:4px;scroll-padding:4px;box-sizing:border-box;overflow-x:auto;max-width:100%;min-width:0;}.item-toolbar__controls-row.svelte-1c13522 {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-1c13522 {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-1c13522 {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-1c13522 {justify-content:flex-start;}.item-toolbar__controls-host.svelte-1c13522 {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-1c13522,
|
|
11
|
+
.item-toolbar--bottom.svelte-1c13522 {align-items:flex-end;}.item-toolbar--left.svelte-1c13522,
|
|
12
|
+
.item-toolbar--right.svelte-1c13522 {align-items:stretch;}.item-toolbar--left.svelte-1c13522 .item-toolbar__tools-row:where(.svelte-1c13522),
|
|
13
|
+
.item-toolbar--right.svelte-1c13522 .item-toolbar__tools-row:where(.svelte-1c13522) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-1c13522 .item-toolbar__controls-row:where(.svelte-1c13522),
|
|
14
|
+
.item-toolbar--right.svelte-1c13522 .item-toolbar__controls-row:where(.svelte-1c13522) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-1c13522 {display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}
|
|
15
|
+
|
|
16
|
+
/* Drive the vendored NDS icon button's outer size via its own \`--height-32\`
|
|
17
|
+
custom property so its light-DOM inner button matches the toolbar's
|
|
18
|
+
md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph
|
|
19
|
+
keeps the NDS-native icon size (we render size="small"), so it isn't
|
|
20
|
+
oversized. */.item-toolbar__nds-button-zoom.svelte-1c13522 {display:inline-flex;flex-shrink:0;}.item-toolbar.svelte-1c13522 nds-icon-button:where(.svelte-1c13522) {
|
|
21
|
+
/* Host-settable button size per toolbar size (drives the NDS outer button
|
|
22
|
+
via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);
|
|
23
|
+
/* Host-settable accent for the calculator button: the NDS tertiary glyph
|
|
24
|
+
colour derives from --color-interactive-blue, remapped here to a
|
|
25
|
+
themeable variable. --pie-calculator-button-color is package-private, so
|
|
26
|
+
nothing sets it and the default is what ships: it now resolves through
|
|
27
|
+
--pie-button-color (DaisyUI base-content) instead of holding the Figma
|
|
28
|
+
blue on every theme, with the literal as the no-theme last resort.
|
|
29
|
+
Not --pie-primary or --pie-tertiary: both are \`direct\` mappings of
|
|
30
|
+
DaisyUI slots chosen to pair with their own -content colour, so a glyph
|
|
31
|
+
taken from either sits at 1.37:1 against the page under \`pastel\` and 11
|
|
32
|
+
of the 35 shipped themes fall under SC 1.4.11's 3:1. */--color-interactive-blue: var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)));
|
|
33
|
+
/* NDS palette bridge — keep in sync with the copies in tool-tts-inline
|
|
34
|
+
and section-player SectionItemsPane (asserted by
|
|
35
|
+
scripts/check-theme-tokens.mjs). The vendored button paints its fill,
|
|
36
|
+
its on-accent glyph, its hover ring and its focus ring from the NDS
|
|
37
|
+
design-system palette, which no PIE theme sets, so a tertiary button
|
|
38
|
+
kept a #f3f5f7 pill on every page — and once the glyph followed the
|
|
39
|
+
theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}.item-toolbar--sm.svelte-1c13522 nds-icon-button:where(.svelte-1c13522) {--height-32: var(--pie-calculator-button-size-sm, 2.75rem);}.item-toolbar--lg.svelte-1c13522 nds-icon-button:where(.svelte-1c13522) {--height-32: var(--pie-calculator-button-size-lg, 2.5rem);}.item-toolbar__element-host.svelte-1c13522 {display:contents;}.item-toolbar--sm.svelte-1c13522 .item-toolbar__button:where(.svelte-1c13522) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-1c13522 {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-1c13522 .item-toolbar__button:where(.svelte-1c13522) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-1c13522 {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-1c13522:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-1c13522:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-1c13522 {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-1c13522:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-1c13522:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-1c13522:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-1c13522 svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-1c13522 {width:100%;height:100%;object-fit:contain;}`};function eJ(B,F){gJ(F,!0),uJ(B,eZ);let v=typeof window<"u",W0=["/_fa-pro/fontawesome.min.css","/_fa-pro/light.min.css"],s0="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css",jZ="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap",ej=/font.?awesome|fa-?pro/i,xj=(J)=>{if(document.querySelector(`link[href="${J}"]`))return;let Z=document.createElement("link");Z.rel="stylesheet",Z.href=J,Z.addEventListener("error",()=>{Z.dataset.pieLoadFailed=""},{once:!0}),document.head.appendChild(Z)},jJ=!1,Aj=()=>{if(!v||jJ)return;if(jJ=!0,!document.querySelector('link[href*="Roboto"]'))xj(jZ);if(Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).some((Z)=>ej.test(Z.href)))return;xj(s0);for(let Z of W0)xj(Z)},JJ="__pieFaToolbarShadowInstalled",JZ=(J)=>{let Z=J.getRootNode();if(!(Z instanceof ShadowRoot))return;let U=Z;if(U[JJ])return;U[JJ]=!0;let Q=new Set,q=(X)=>{if(!X||Q.has(X))return;Q.add(X);let G=document.createElement("link");G.rel="stylesheet",G.href=X,Z.appendChild(G)},S=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter((X)=>ej.test(X.href));for(let X of S){if("pieLoadFailed"in X.dataset)continue;if(X.sheet){q(X.href);continue}let G=(a)=>{if(X.removeEventListener("load",G),X.removeEventListener("error",G),a.type==="load")q(X.href)};X.addEventListener("load",G),X.addEventListener("error",G)}},ZZ=(J)=>{return Aj(),JZ(J),{}},UZ=(J,Z)=>{let U=Z,Q=()=>{let S=J.querySelector("button");if(S)S.setAttribute("aria-pressed",U?"true":"false")};Q();let q=new MutationObserver(Q);return q.observe(J,{childList:!0,subtree:!0}),{update(S){U=S,Q()},destroy(){q.disconnect()}}},ZJ=(J)=>J.faIconName||null,KZ=new nJ,I0=R0(mJ({})),v0=o(F,"level",7,"item"),Kj=o(F,"scopeId",7,""),Sj=o(F,"itemId",7,""),Tj=o(F,"sectionId",7,""),fj=o(F,"catalogId",7,""),Ij=o(F,"tools",7,""),Cj=o(F,"contentKind",7,"assessment-item"),x0=o(F,"position",7,"bottom"),Qj=o(F,"scopeElement",7,null),Lj=o(F,"toolRegistry",7,null),yj=o(F,"item",7,null),Xj=o(F,"hostButtons",23,()=>[]),bj=o(F,"class",7,""),Yj=o(F,"size",7,"md"),pj=o(F,"language",7,""),D0=R0(null),x=R0(null),g0=O(()=>j(x)?.ndsIcons===!0),Vj=O(()=>uZ(j(x))),QZ=O(()=>pj()||j(x)?.contentLanguage||void 0),$0=R0(null),i0=R0(0),a0=R0(0),_j=R0(0),Ej=R0(0);Z0(()=>{if(!j(D0))return;return aJ(j(D0),(J)=>{V0(x,J,!0)})}),Z0(()=>{if(!j(D0))return;return dJ(j(D0),(J)=>{V0($0,J,!0)})}),Z0(()=>{let J=j(x)?.toolkitCoordinator;if(!J||typeof J.onPolicyChange!=="function")return;let Z=J.onPolicyChange((U)=>{if(V0(a0,j(a0)+1),U?.reason!=="item-settings")V0(_j,j(_j)+1)});return()=>{try{Z?.()}catch{}}}),Z0(()=>{let J=j(x)?.toolkitCoordinator;if(!J||typeof J.onToolContextResolverChange!=="function")return;let Z=J.onToolContextResolverChange(()=>{V0(Ej,j(Ej)+1)});return()=>{try{Z?.()}catch{}}});let P0=O(()=>j(x)?.toolCoordinator),LZ=O(()=>j(x)?.ttsService),vj=O(()=>j(x)?.elementToolStateStore),UJ=O(()=>j(x)?.assessmentId??""),Dj=O(()=>Sj()||j($0)?.itemId||""),C0=O(()=>j($0)?.canonicalItemId||j(Dj)),d0=O(()=>Tj()||j(x)?.sectionId||""),r0=O(()=>Cj()||j($0)?.contentKind||(v0()==="section"?"section":"assessment-item")),b=O(()=>{if(v0()&&v0()!=="item")return v0();if(j(r0)==="rubric-block-stimulus")return"passage";return"item"}),y0=O(()=>{if(Kj())return Kj();if(j(b)==="section")return j(d0)||j(x)?.sectionId||"default-section";if(j(b)==="assessment")return j(x)?.assessmentId||"default-assessment";return j(C0)||j(Dj)||"default-item"}),XZ=O(()=>fj()||j(y0)),k0=O(()=>yj()||j($0)?.item||null),i=O(()=>{if(Lj())return Lj();return j(a0),j(x)?.toolkitCoordinator?.getToolRegistry?.()||KZ}),YZ=O(()=>tJ(Ij())),VZ=O(()=>j(i).normalizeToolIds(j(YZ)).filter(Boolean)),KJ=O(()=>{if(j(b)==="section")return"section";if(j(b)==="passage"||j(r0)==="rubric-block-stimulus")return"passage";return"item"}),QJ=O(()=>{j(a0);let J=j(x)?.toolkitCoordinator;if(!J||typeof J.decideToolPolicy!=="function")return null;return J.decideToolPolicy({level:j(KJ),scope:{level:j(b),scopeId:j(y0),assessmentId:j(x)?.assessmentId,sectionId:j(d0)||void 0,itemId:j(Dj)||void 0,canonicalItemId:j(C0)||void 0,contentKind:j(r0)}})}),DZ=pJ(),Oj=O(()=>DZ(j(QJ),j(_j))),Gj=O(()=>{let J=(Z)=>Array.from(new Set(Z));if(j(Oj))return J(j(i).normalizeToolIds(j(Oj).map((Z)=>Z.toolId)).filter(Boolean));return J(j(VZ))});Z0(()=>{if(!j(QJ)||j(Gj).length===0)return;if(j(i).getAllTools().length>0)return;let J=j(D0)?.ownerDocument,Z=j(Gj).join(", "),U=setTimeout(()=>{oJ(J,"toolbarWithoutRegistry",`[pie-item-toolbar] Policy places ${Z} on this toolbar, but its tool registry is still empty after ${tj/1000} s, so it renders no buttons. Pass a toolRegistry to <pie-assessment-toolkit> or its coordinator; @pie-players/pie-default-tool-loaders builds the stock one. Reported once per page.`)},tj);return()=>clearTimeout(U)});let OZ=O(()=>{let J=new Set;if(!j(Oj))return J;for(let Z of j(Oj)){if(!Z.required&&!Z.alwaysAvailable)continue;for(let U of j(i).normalizeToolIds([Z.toolId]).filter(Boolean))J.add(U)}return J}),gj=O(()=>{if(j(b)==="section"||j(b)==="assessment")return!0;let J=j(k0)?.config;return!!(j(k0)&&J&&typeof J==="object")}),GZ=O(()=>{j(a0);let J=j(x)?.toolkitCoordinator;if(!J||typeof J.getPolicyInputs!=="function")return null;return J.getPolicyInputs()}),m0=O(()=>j(GZ)?.assessment??null),Nj=O(()=>({id:j(C0)})),b0=O(()=>{if(j(b)==="section")return{level:"section",assessment:j(m0)||{},section:{}};if(j(b)==="assessment")return{level:"assessment",assessment:j(m0)||{}};if(!j(gj)||!j(k0))return null;if(j(b)==="passage")return{level:"passage",assessment:j(m0)||{},itemRef:j(Nj),passage:j(k0)};return{level:"item",assessment:j(m0)||{},itemRef:j(Nj),item:j(k0)}}),LJ=O(()=>{if(j(b0))return j(b0);return{level:"item",assessment:j(m0)||{},itemRef:j(Nj),item:j(k0)||{id:j(C0),config:{}}}}),Mj=O(()=>{if(j(b)!=="item"&&j(b)!=="passage")return[];if(!j(gj)||!j(k0))return[];let J=j(k0)?.config?.models;return(Array.isArray(J)?J:J&&typeof J==="object"?Object.values(J):[]).filter((U)=>U&&typeof U==="object"&&typeof U.id==="string").map((U)=>({level:"element",assessment:j(m0)||{},itemRef:j(Nj),item:j(k0),elementId:U.id}))});function $j(J){return rJ(J,j(b),j(y0))}let l0=null;function XJ(J,Z){let U=$j(Z);if(!J.getToolState(U)){if(J.registerTool(U,Z),l0?.coordinator!==J)l0={coordinator:J,ids:new Set};l0.ids.add(U)}return U}Z0(()=>{return j(P0),j(b),j(y0),()=>{let J=l0;if(l0=null,!J)return;for(let Z of J.ids)J.coordinator.releaseTool(Z)}});function NZ(J){if(!j(vj)||!j(UJ)||!j(d0)||!j(C0))return null;return j(vj).getGlobalElementId(j(UJ),j(d0),j(C0),J)}function MZ(){if(Qj())return Qj();return j($0)?.scopeElement||null}function YJ(){let J=j(P0)||null;return{scope:{level:j(b),scopeId:j(y0),assessmentId:j(x)?.assessmentId,sectionId:j(d0),itemId:j(Dj),canonicalItemId:j(C0),contentKind:j(r0)},itemId:j(y0),catalogId:j(XZ),language:j(QZ),i18n:j(Vj),ui:{size:Yj()},getScopeElement:MZ,getGlobalElementId:NZ,toolCoordinator:J,toolkitCoordinator:j(x)?.toolkitCoordinator||null,ttsService:j(LZ)||null,elementToolStateStore:j(vj)||null,toggleTool:(Z)=>{if(!J)return;J.toggleTool(XJ(J,Z))},isToolVisible:(Z)=>J?.isToolVisible($j(Z))??!1,subscribeVisibility:J?(Z)=>J.subscribe(Z):null}}let PZ=O(YJ),mj=O(()=>{j(Ej);let J=j(x)?.toolkitCoordinator;if(!J||typeof J.hasToolContextResolver!=="function"||typeof J.resolveToolContext!=="function")return{};let Z={};for(let U of j(Gj)){if(!j(i).get(U)?.supportedLevels.includes(j(b)))continue;if(!J.hasToolContextResolver(U))continue;let q=J.resolveToolContext({toolId:U,context:j(LJ),toolbarContext:j(PZ)});if(q)Z[U]=q}return Z}),qZ=O(()=>{let J=j(Gj).filter((X)=>{let G=j(i).get(X);return G?G.supportedLevels.includes(j(b)):!1}),Z=Object.values(j(mj)),U=new Set(Z.map((X)=>X.toolId)),Q=new Set(Z.filter((X)=>X.visible).map((X)=>X.toolId)),q=J.filter((X)=>!U.has(X));if(j(b)==="section")return q.forEach((X)=>Q.add(X)),Array.from(Q);if(!j(gj))return q.forEach((X)=>Q.add(X)),Array.from(Q);if(!j(b0)&&j(Mj).length===0)return q.forEach((X)=>Q.add(X)),Array.from(Q);if(q.filter((X)=>j(OZ).has(X)).forEach((X)=>Q.add(X)),j(b0))j(i).filterVisibleInContext(q,j(b0)).forEach((X)=>Q.add(X.toolId));for(let X of j(Mj))j(i).filterVisibleInContext(q,X).forEach((G)=>Q.add(G.toolId));let S=j(b0)?[j(b0),...j(Mj)]:j(Mj);for(let X of Array.from(Q)){if(U.has(X))continue;if(!j(i).isApplicableToAnyContext(X,S))Q.delete(X)}return Array.from(Q)}),o0=R0(null),n0=O(()=>{let J=j(o0)?.registry===j(i)?j(o0).toolIds:null,Z=j(i).filterToolIdsByActivation(j(qZ),"toolbar-toggle");return J?Z.filter((U)=>!J.has(U)):Z});function FZ(J,Z){let U=j(x)?.toolkitCoordinator;if(typeof U?.reportToolModuleFailure==="function"){U.reportToolModuleFailure(J,Z);return}console.error(`[ItemToolBar] Tool "${J}" failed to load:`,Z)}Z0(()=>{if(!v)return;let J=j(i),Z=!1;return J.ensureToolModulesLoaded(j(n0)).then((U)=>{if(U.size>0){let Q=j(o0)?.registry===J?j(o0).toolIds:[];V0(o0,{registry:J,toolIds:new Set([...Q,...U.keys()])},!0);for(let[q,S]of U)FZ(q,S)}if(!Z)V0(i0,j(i0)+1)}),()=>{Z=!0}});let p0=O(()=>{return{...YJ(),getResolvedToolContext:(J)=>j(mj)[J]??null,getToolRenderParams:(J)=>{let Z=j(mj)[J]?.params??null,U=VJ.get(J);if(!U)return Z;return{...Z??{},...U}}}}),VJ=new Map,DJ=0,z0=O(()=>{if(!v)return[];j(i0);let J=[];for(let Z of j(n0)){let U=j(i).renderForToolbar(Z,j(LJ),j(p0));if(U)J.push(U)}return J}),RZ=O(()=>{if(!Array.isArray(Xj()))return[];let J=[];return Xj().forEach((Z,U)=>{if(CJ(Z)){J.push(Z);return}console.warn(`[ItemToolBar] Ignoring invalid host button at index ${U}. Expected { id, label, href | onClick } with valid types.`)}),J}),WZ=O(()=>j(z0).filter((J)=>!!J.button).map((J)=>{let Z=J.button;return{id:J.toolId,label:Z.label,ariaLabel:Z.ariaLabel||Z.label,icon:Z.icon,faIconName:Z.faIconName,tooltip:Z.tooltip||Z.label,disabled:Z.disabled,active:j(I0)[J.toolId]??Z.active??!1,onClick:()=>{Z.onClick(),h0()}}})),OJ=O(()=>[...j(WZ),...j(RZ)]),t0=O(()=>{let J={};for(let Z of j(z0))J[Z.toolId]=j(I0)[Z.toolId]??Z.button?.active??!1;return J}),kZ=O(()=>j(z0).flatMap((J)=>(J.elements||[]).filter((Z)=>Z.mount==="before-buttons").filter((Z)=>Boolean(Z.element)).map((Z,U)=>({key:`before-${J.toolId}-${U}`,toolId:J.toolId,entry:Z})))),zZ=O(()=>j(z0).flatMap((J)=>(J.elements||[]).filter((Z)=>Z.mount==="after-buttons").filter((Z)=>Boolean(Z.element)).map((Z,U)=>({key:`after-${J.toolId}-${U}`,toolId:J.toolId,entry:Z})))),GJ=O(()=>j(z0).flatMap((J)=>(J.elements||[]).filter((Z)=>Z.mount==="controls-row").filter((Z)=>Boolean(Z.element)).map((Z,U)=>({key:`controls-row-${J.toolId}-${U}`,toolId:J.toolId,entry:Z})))),NJ=O(()=>j(z0).flatMap((J)=>(J.elements||[]).map((Z)=>({toolId:J.toolId,hint:Z.layoutHints?.controlsRow})).filter((Z)=>Boolean(Z.hint)))),MJ=O(()=>j(z0).flatMap((J)=>(J.elements||[]).map((Z)=>({toolId:J.toolId,hint:Z.layoutHints?.headerOverlay})).filter((Z)=>Boolean(Z.hint)))),PJ=O(()=>j(NJ).some((J)=>J.hint?.reserveSpace===!0)),qJ=O(()=>j(NJ).some((J)=>J.hint?.showWhenToolActive===!0&&(j(t0)[J.toolId]??!1))),HZ=O(()=>x0()==="left"||x0()==="right"),FJ=O(()=>j(MJ).some((J)=>J.hint?.showWhenToolActive===!0&&(j(t0)[J.toolId]??!1))),wZ=O(()=>j(GJ).length>0||j(PJ)||j(qJ));function BZ(){if(!j(D0))return null;let J=j(D0).getRootNode();if(J instanceof ShadowRoot)return J.host;return null}Z0(()=>{let J=BZ();if(!J)return;let Z=j(MJ).length>0,U=j(FJ);return J.setAttribute("data-pie-header-overlay",Z?"true":"false"),J.setAttribute("data-pie-header-overlay-active",U?"true":"false"),()=>{J.removeAttribute("data-pie-header-overlay"),J.removeAttribute("data-pie-header-overlay-active")}}),Z0(()=>{if(!v||!j(g0))return;if(j(OJ).some((J)=>!!ZJ(J)))Aj()});function Pj(J){if(J.id in j(I0))return j(I0)[J.id]===!0;return J.active===!0}function RJ(J){return yJ(J)}function h0(){let J={};for(let Z of j(z0))if(Z.sync?.(),Z.button)J[Z.toolId]=Z.button.active??!1;V0(I0,J,!0)}Z0(()=>{let J=[];h0();for(let Z of j(z0))if(Z.subscribeActive){let U=!1,Q=Z.subscribeActive((q)=>{queueMicrotask(()=>{if(U)return;V0(I0,{...j(I0),[Z.toolId]:q},!0),Z.sync?.()})});J.push(()=>{U=!0,Q()})}return()=>{J.forEach((Z)=>Z())}}),Z0(()=>{let J=j(x)?.toolkitCoordinator;if(typeof J?.registerToolRequestTarget!=="function")return;let Z=j(KJ);return J.registerToolRequestTarget({level:Z,get scopeId(){return j(y0)},hostsTool:(U)=>j(n0).includes(U),open:(U,Q)=>{if(!j(P0))return;if(!j(n0).includes(U))return;if(Q&&Object.keys(Q).length>0)DJ+=1,VJ.set(U,{...Q,toolRequestId:DJ});let q=XJ(j(P0),U);j(P0).showTool(q),queueMicrotask(()=>h0())}})}),Z0(()=>{if(!j(p0).subscribeVisibility)return;let J=!1,Z=j(p0).subscribeVisibility(()=>{queueMicrotask(()=>{if(J)return;h0()})});return()=>{J=!0,Z?.()}}),Z0(()=>{let J=j(p0).toolkitCoordinator;if(typeof J?.subscribeTelemetry!=="function")return;let Z=!1,U=J.subscribeTelemetry(({eventName:Q,payload:q})=>{if(Q!=="pie-toolkit-tool-config-updated")return;if(q?.toolId&&!j(n0).includes(q.toolId))return;queueMicrotask(()=>{if(Z)return;V0(i0,j(i0)+1),h0()})});return()=>{Z=!0,U?.()}});let xZ="[data-pie-tool-overlay-boundary]";function AZ(J,Z){if(Z.container!=="content-boundary")return J;let U=J;while(U){if(U instanceof HTMLElement&&U.matches(xZ))return U;if(U instanceof HTMLElement&&U.parentElement){U=U.parentElement;continue}let Q=U.getRootNode();U=Q instanceof ShadowRoot?Q.host:null}return J}function hj(J,Z){let U=Z,Q=null,q=J,S=(G)=>{if(!G)return;let a=G.__pieToolElementUnmount;if(typeof a==="function")a()},X=(G)=>{if(Q===G)return;if(Q){if(S(Q),Q.parentNode===q)q.removeChild(Q)}if(Q=G,Q){if(q=AZ(J,U),Q.parentNode&&Q.parentNode!==q)Q.parentNode.removeChild(Q);q.appendChild(Q)}};return X(Z.element),{update(G){U=G,X(G.element)},destroy(){X(null)}}}function uj(J,Z){let U=Z,Q=null,q=null,S=[],X=null,G=null,a=null,k=null,D=null,t=null,e=null,m=!1,d=!1,y=()=>U.mounted.entry.shell?.pageTabOrder===!0,A=()=>U.mounted.entry.shell?.ndsHeaderControls===!0,z=null,T=null,s=iZ({onMove:(K)=>gZ(K),onEnd:()=>{T=null}}),p=0,W=0,w=0,g=0,q0=0,h=0,O0=0,_0=0,H0=null,E0=[],_=0,E=0,f=U.mounted.entry.shell?.initialWidth??720,R=U.mounted.entry.shell?.initialHeight??560,I=f,A0=R,w0=!1,F0=null,j0=null,u=!1,r=(K)=>{if(!K)return;let Y=K.__pieToolElementUnmount;if(typeof Y==="function")Y()},cj=()=>{let K=U.mounted.entry.shell;if(!K)return null;return{toolId:U.mounted.toolId,toolbarContext:j(p0),shellConfig:K}},IZ=(K)=>{let Y=j(i).get(U.mounted.toolId),N=cj();if(!Y?.onHostedMount||!N)return;Y.onHostedMount(K,N)},qj=()=>{let K=j(i).get(U.mounted.toolId),Y=cj();if(!K?.onHostedResize||!Y)return;K.onHostedResize({width:f,height:R},U.mounted.entry.element,Y)},CZ=()=>{let K=j(i).get(U.mounted.toolId),Y=cj();if(!K?.onHostedUnmount||!Y)return;K.onHostedUnmount(U.mounted.entry.element,Y)},J0=(K,Y,N)=>Math.max(Y,Math.min(K,N)),yZ=()=>{let K=U.mounted.entry.shell,Y=K?.minWidth??320,N=K?.minHeight??240,V=K?.maxWidth??window.innerWidth,L=K?.maxHeight??window.innerHeight;return{minWidth:Y,minHeight:N,maxWidth:V,maxHeight:L}},sj=()=>{let K=U.mounted.entry.shell?.minWidth,Y=typeof K==="number"&&K>0&&f<K,N=Y?`${K}px`:"";if(z)z.style.minWidth=N;if(X)X.style.minWidth="0";if(G)G.style.minWidth="0",G.style.overflowX=Y?"auto":"hidden"},kJ=()=>U.mounted.entry.shell?.content?.overflowY==="auto"?"auto":"hidden",bZ=()=>{if(!X)return 0;let K=X.getBoundingClientRect().height;if(K>0)return K;return X.offsetHeight||0},ij=()=>{if(!G)return;let K=U.mounted.entry.shell;if(G.style.overflowY=kJ(),!z)return;if(K?.content?.preserveMinHeight===!0){let Y=bZ(),N=K.minHeight??240,V=Math.max(0,N-Y),L=Math.max(0,R-Y),M=Math.max(L,V);z.style.height=`${M}px`,z.style.minHeight="0",z.style.flex=`0 0 ${M}px`;return}z.style.height="100%",z.style.minHeight="0",z.style.flex="1 1 auto"},pZ=()=>{let K=U.mounted.entry.shell,Y=K?.initialWidth??720,N=K?.initialHeight??560;if(Y===I&&N===A0)return;if(I=Y,A0=N,w0)return;f=Y,R=N,Wj()},Fj=()=>{let{minWidth:K,minHeight:Y,maxWidth:N,maxHeight:V}=yZ(),L=Math.min(K,window.innerWidth),M=Math.min(Y,window.innerHeight);f=J0(f,L,Math.max(L,Math.min(N,window.innerWidth))),R=J0(R,M,Math.max(M,Math.min(V,window.innerHeight))),_=J0(_,0,Math.max(0,window.innerWidth-f)),E=J0(E,0,Math.max(0,window.innerHeight-R)),e0(),sj(),ij(),qj()},S0=(K,Y)=>{w0=!0,_+=K,E+=Y,Fj()},Rj=(K,Y)=>{w0=!0,f+=K,R+=Y,Fj()},zJ=(K,Y,N,V="fa-regular")=>{let L=document.createElement("nds-icon-button");if(L.setAttribute("variant","tertiary"),L.setAttribute("size","small"),L.setAttribute("type","circle"),L.setAttribute("icon-name",Y),L.setAttribute("button-aria-label",K),L.title=K,L.addEventListener("click",(M)=>{M.stopPropagation(),N(),u0()}),V!=="fa-light"){let M=(C)=>{C.classList.remove("fa-light"),C.classList.add(V)},P=L.querySelector("i.fa-light");if(P)M(P);else{let C=new MutationObserver(()=>{let c=L.querySelector("i.fa-light");if(c)M(c),C.disconnect()});C.observe(L,{childList:!0,subtree:!0})}}return L},HJ=(K,Y,N)=>{let V=document.createElement("button");return V.type="button",V.className="pie-tool-shell__control",V.setAttribute("aria-label",K),V.title=K,V.textContent=Y,V.style.border="1px solid transparent",V.style.background="color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)",V.style.color="inherit",V.style.cursor="pointer",V.style.display="inline-flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.width="28px",V.style.height="28px",V.style.padding="0",V.style.fontSize="14px",V.style.fontWeight="700",V.style.borderRadius="8px",V.style.lineHeight="1",V.onclick=(L)=>{L.stopPropagation(),N(),u0()},V.onfocus=()=>{V.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",V.style.outlineOffset="2px"},V.onblur=()=>{V.style.outline="none",V.style.outlineOffset="0"},V},e0=()=>{if(!Q)return;Q.style.left=`${_}px`,Q.style.top=`${E}px`,Q.style.width=`${f}px`,Q.style.height=`${R}px`,Q.style.display=U.active?"flex":"none"},wJ=()=>{if(a)a.textContent=U.mounted.entry.shell?.title||U.mounted.toolId;for(let{el:K,key:Y}of S){let N=U.i18n.t(Y);if(K.tagName==="NDS-ICON-BUTTON")K.setAttribute("button-aria-label",N);else K.setAttribute("aria-label",N);if(K.title)K.title=N}},BJ=()=>{if(!G)return;let K=U.mounted.entry.element;if(K.style.display="block",K.style.width="100%",K.style.height="100%",K.style.flex="1 1 auto",K.style.minHeight="0",z&&z!==K){if(z.parentNode===G)r(z),G.removeChild(z);z=null}if(K.parentNode&&K.parentNode!==G)K.parentNode.removeChild(K);if(K.parentNode!==G)G.appendChild(K);z=K,sj(),ij(),IZ(K)},u0=()=>{if(j(P0)&&Q)j(P0).bringToFront(Q)},xJ=()=>{if(!Q||!j(P0)||!U.active)return;let K=$j(U.mounted.toolId);if(j(P0).getToolState(K)?.element===Q)return;j(P0).updateToolElement(K,Q)},Wj=()=>{let{innerWidth:K,innerHeight:Y}=window,N=U.mounted.entry.shell,V=N?.initialAlign??"center",L=N?.initialMargin??16,M=L+60;switch(V){case"top-left":_=L,E=M;break;case"top-right":_=Math.max(0,K-f-L),E=M;break;case"bottom-left":_=L,E=Math.max(0,Y-R-M);break;case"bottom-right":_=Math.max(0,K-f-L),E=Math.max(0,Y-R-M);break;default:_=Math.max(0,Math.round((K-f)/2)),E=Math.max(0,Math.round((Y-R)/2))}Fj()},_Z=()=>{let K=j0;if(!K)return;queueMicrotask(()=>{if(!K.isConnected)return;try{K.focus()}catch{}})},AJ=()=>{if(typeof document>"u")return null;let K=document.activeElement;while(K){let Y=K.shadowRoot;if(Y&&Y.activeElement&&Y.activeElement!==K)K=Y.activeElement;else break}return K??null},SJ=()=>{if(!Q||F0)return;let K=AJ();if(!j0&&K&&!Q.contains(K))j0=K;if(y()&&!d)document.addEventListener("keydown",dj,!0),d=!0;F0=sZ(Q,{initialFocus:D,onEscape:()=>{rj()},wrap:!y(),onTabExit:y()?(Y,N)=>{if(Y==="backward"){if(j0?.isConnected){N.preventDefault();try{j0.focus()}catch{}}return}let V=aj();if(V){N.preventDefault();try{V.focus()}catch{}}}:void 0})},aj=()=>{let K=j(p0).getScopeElement?.()??null;if(!K)return null;let Y=(V)=>{if(j(D0)&&j(D0).contains(V))return!0;if(Q&&Q.contains(V))return!0;return!1},N=(V)=>{if(V instanceof HTMLElement){if(Y(V))return null;if(V.matches?.(aZ)&&dZ(V))return V}let L=V.shadowRoot;if(L)for(let M=0;M<L.children.length;M++){let P=N(L.children[M]);if(P)return P}for(let M=0;M<V.children.length;M++){let P=N(V.children[M]);if(P)return P}return null};return N(K)},EZ=()=>{if(!Q)return[];return cZ(Q).filter((K)=>K!==t&&K!==e)},dj=(K)=>{if(K.key!=="Tab")return;if(!Q||!U.active)return;let Y=AJ();if(!Y)return;if(Q.contains(Y))return;let N=EZ();if(N.length===0)return;if(K.shiftKey){let V=aj();if(Y!==V)return;K.preventDefault();try{N[N.length-1].focus()}catch{}return}if(Y!==j0)return;K.preventDefault();try{N[0].focus()}catch{}},TJ=()=>{if(d)document.removeEventListener("keydown",dj,!0),d=!1;if(!F0)return;let K=F0;F0=null;try{K()}catch{}_Z()},rj=()=>{j(p0).toggleTool(U.mounted.toolId),h0()},fJ=(K)=>{if(!U.mounted.entry.shell?.draggable)return;if(K.target.closest("button")||!Q)return;if(!s.begin(K,Q))return;T="drag",w0=!0,p=K.clientX-_,W=K.clientY-E,Q.setPointerCapture(K.pointerId),u0()},vZ=(K)=>(Y)=>{if(!Q||!U.mounted.entry.shell?.resizable)return;if(Y.stopPropagation(),!s.begin(Y,Q))return;T="resize",w0=!0,H0=K,w=f,g=R,q0=Y.clientX,h=Y.clientY,O0=_,_0=E,Q.setPointerCapture(Y.pointerId),u0()},gZ=(K)=>{if(!Q)return;if(T==="drag"){K.preventDefault();let Y=Math.max(0,window.innerWidth-f),N=Math.max(0,window.innerHeight-R);_=J0(K.clientX-p,0,Y),E=J0(K.clientY-W,0,N),e0();return}if(T==="resize"){K.preventDefault();let Y=U.mounted.entry.shell,N=Y?.minWidth??320,V=Y?.minHeight??240,L=Math.min(N,window.innerWidth),M=Math.min(V,window.innerHeight),P=Y?.maxWidth??window.innerWidth,C=Y?.maxHeight??window.innerHeight,c=K.clientX-q0,K0=K.clientY-h;if(H0==="se")f=J0(w+c,L,Math.max(L,Math.min(P,window.innerWidth-_))),R=J0(g+K0,M,Math.max(M,Math.min(C,window.innerHeight-E)));else if(H0==="sw"){let n=O0+w,G0=J0(w-c,L,Math.min(P,n));_=n-G0,f=G0,R=J0(g+K0,M,Math.max(M,Math.min(C,window.innerHeight-E)))}else if(H0==="ne"){let n=_0+g;f=J0(w+c,L,Math.max(L,Math.min(P,window.innerWidth-_)));let G0=J0(g-K0,M,Math.min(C,n));E=n-G0,R=G0}else if(H0==="nw"){let n=O0+w,G0=_0+g,$=J0(w-c,L,Math.min(P,n));_=n-$,f=$;let jj=J0(g-K0,M,Math.min(C,G0));E=G0-jj,R=jj}e0(),sj(),ij(),qj()}},IJ=()=>{Fj()};if(v&&U.mounted.entry.shell){let K=U.mounted.entry.shell?.ndsHeaderControls===!0&&j(g0);if(K)Aj();if(Q=document.createElement("div"),Q.className="pie-tool-shell",Q.setAttribute("data-pie-tool-shell",U.mounted.toolId),Q.style.position="fixed",Q.style.zIndex=String(lJ.TOOL),Q.style.background="var(--pie-background, #fff)",Q.style.border="1px solid var(--pie-border-light, #d1d5db)",Q.style.borderRadius="12px",Q.style.boxShadow="0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)",Q.style.setProperty("--color-interactive-blue","var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)))"),Q.style.setProperty("--color-new-gray","var(--pie-background-dark, #f3f5f7)"),Q.style.setProperty("--color-primary-white","var(--pie-white, #ffffff)"),Q.style.setProperty("--color-primary-black","var(--pie-text, #000000)"),Q.style.setProperty("--color-focus-blue","var(--pie-button-focus-outline, #2b87ff)"),Q.style.overflow="visible",Q.style.display=U.active?"flex":"none",Q.style.flexDirection="column",Q.style.userSelect="none",Q.style.webkitUserSelect="none",Q.style.touchAction="none",Q.setAttribute("draggable","false"),Q.addEventListener("dragstart",(L)=>L.preventDefault()),X=document.createElement("div"),X.className="pie-tool-shell__header",X.style.display="flex",X.style.flexWrap="wrap",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.gap="6px",X.style.padding=A()?"12px 12px 12px 28px":"10px 12px",A())X.style.minHeight="48px";if(A())X.style.background="var(--pie-section-player-card-header-background, var(--pie-button-active-bg, #f3f4f6))",X.style.color="var(--pie-text, #111827)",X.style.borderBottom="1px solid var(--pie-border-light, #e5e7eb)";else X.style.background="var(--pie-primary-dark, #2c3e50)",X.style.color="var(--pie-white, #fff)";X.style.cursor=U.mounted.entry.shell.draggable===!1?"default":"move",X.style.flex="0 0 auto",X.style.borderRadius="12px 12px 0 0",X.style.overflow="hidden",X.style.userSelect="none",X.style.webkitUserSelect="none",X.style.touchAction="none",X.setAttribute("draggable","false"),X.addEventListener("dragstart",(L)=>L.preventDefault()),a=document.createElement("span"),a.className="pie-tool-shell__title",a.style.minWidth="0",a.style.overflowWrap="anywhere",a.textContent=U.mounted.entry.shell.title||U.mounted.toolId,X.appendChild(a),k=document.createElement("div"),k.className="pie-tool-shell__controls",k.style.display="inline-flex",k.style.flexWrap="wrap",k.style.minWidth="0",k.style.alignItems="center",k.style.gap=A()?"6px":"4px";let Y=U.mounted.entry.shell,N=(L,M,P,C,c="fa-regular")=>{if(!k)return;let K0=U.i18n.t(L),n=K?zJ(K0,P,C,c):HJ(K0,M,C);S.push({el:n,key:L}),k.appendChild(n)};if(Y?.draggable!==!1)N("toolkit.window.moveLeftA11y","←","chevron-left",()=>S0(-24,0)),N("toolkit.window.moveRightA11y","→","chevron-right",()=>S0(24,0)),N("toolkit.window.moveUpA11y","↑","chevron-up",()=>S0(0,-24)),N("toolkit.window.moveDownA11y","↓","chevron-down",()=>S0(0,24));if(Y?.resizable!==!1)N("toolkit.window.shrinkA11y","−","magnifying-glass-minus",()=>Rj(-40,-40)),N("toolkit.window.growA11y","+","magnifying-glass-plus",()=>Rj(40,40));if(!A()){let L=HJ(U.i18n.t("toolkit.window.centerA11y"),"◎",Wj);S.push({el:L,key:"toolkit.window.centerA11y"}),k.appendChild(L)}let V=null;if(A())V=document.createElement("div"),V.className="pie-tool-shell__header-right",V.style.display="inline-flex",V.style.flexWrap="wrap",V.style.maxWidth="100%",V.style.justifyContent="flex-end",V.style.alignItems="center",V.style.gap="6px",V.appendChild(k),X.appendChild(V);else X.appendChild(k);if(K)D=zJ(U.i18n.t("toolkit.window.closeA11y"),"xmark",rj,"fa-regular"),S.push({el:D,key:"toolkit.window.closeA11y"}),D.style.display=U.mounted.entry.shell.closeable===!1?"none":"inline-block";else{let L=document.createElement("button");L.type="button",L.className="pie-tool-shell__close",L.setAttribute("aria-label",U.i18n.t("toolkit.window.closeA11y")),S.push({el:L,key:"toolkit.window.closeA11y"});let M="http://www.w3.org/2000/svg",P=document.createElementNS(M,"svg");P.setAttribute("xmlns",M),P.setAttribute("viewBox","0 0 16 16"),P.setAttribute("aria-hidden","true");let C=document.createElementNS(M,"path");C.setAttribute("d","M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"),C.setAttribute("stroke","currentColor"),C.setAttribute("stroke-width","1.8"),C.setAttribute("stroke-linecap","round"),P.appendChild(C),L.appendChild(P);let c=P.style;c.width="16px",c.height="16px",c.display="block",c.flexShrink="0",c.pointerEvents="none";let K0="color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)",n="color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";L.style.border="1px solid transparent",L.style.background=K0,L.style.color="inherit",L.style.cursor="pointer",L.style.display="inline-flex",L.style.alignItems="center",L.style.justifyItems="center",L.style.width="28px",L.style.height="28px",L.style.padding="0",L.style.borderRadius="8px",L.style.lineHeight="0",L.style.transition="background-color 0.15s ease, border-color 0.15s ease",L.style.display=U.mounted.entry.shell.closeable===!1?"none":"inline-flex",L.onmouseenter=()=>{L.style.background=n},L.onmouseleave=()=>{L.style.background=K0},L.onfocus=()=>{L.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",L.style.outlineOffset="2px"},L.onblur=()=>{L.style.outline="none",L.style.outlineOffset="0"},L.onclick=rj,D=L}if(V)V.appendChild(D);else X.appendChild(D);if(X.tabIndex=0,X.onkeydown=(L)=>{if(L.key==="Home"){L.preventDefault(),Wj();return}let M=U.mounted.entry.shell;if(L.shiftKey&&M?.resizable!==!1){if(L.key==="ArrowRight"||L.key==="ArrowDown"){L.preventDefault(),Rj(40,40);return}if(L.key==="ArrowLeft"||L.key==="ArrowUp"){L.preventDefault(),Rj(-40,-40);return}}if(M?.draggable!==!1){if(L.key==="ArrowLeft")L.preventDefault(),S0(-24,0);else if(L.key==="ArrowRight")L.preventDefault(),S0(24,0);else if(L.key==="ArrowUp")L.preventDefault(),S0(0,-24);else if(L.key==="ArrowDown")L.preventDefault(),S0(0,24)}},G=document.createElement("div"),G.className="pie-tool-shell__content",G.style.position="relative",G.style.width="100%",G.style.flex="1 1 auto",G.style.minHeight="0",G.style.overflowX="hidden",G.style.overflowY=kJ(),G.style.borderRadius="0 0 12px 12px",A()){let L=(M)=>{let P=document.createElement("div");return P.tabIndex=0,P.setAttribute("aria-hidden","true"),P.setAttribute("data-pie-tool-shell-focus-guard",M),P.style.position="absolute",P.style.width="1px",P.style.height="1px",P.style.padding="0",P.style.margin="-1px",P.style.overflow="hidden",P.style.clipPath="inset(50%)",P.style.whiteSpace="nowrap",P.style.border="0",P};t=L("start"),e=L("end"),t.addEventListener("focus",(M)=>{if(m)return;m=!0;try{if(M.stopPropagation(),j0?.isConnected)try{j0.focus()}catch{}}finally{queueMicrotask(()=>{m=!1})}}),e.addEventListener("focus",(M)=>{if(m)return;m=!0;try{M.stopPropagation();let P=aj();if(P)try{P.focus()}catch{}}finally{queueMicrotask(()=>{m=!1})}}),Q.appendChild(t)}if(Q.appendChild(X),Q.appendChild(G),A()&&e)Q.appendChild(e);if(U.mounted.entry.shell.resizable!==!1){let L=(M,P,C,c,K0,n,G0)=>{let $=document.createElement("div");if($.className="pie-tool-shell__resize",$.style.position="absolute",$.style.width="24px",$.style.height="24px",$.style.cursor=n,$.style.zIndex="10",$.style.touchAction="none",$.setAttribute("draggable","false"),P!==null)$.style.top=P;if(C!==null)$.style.right=C;if(c!==null)$.style.bottom=c;if(K0!==null)$.style.left=K0;if(G0!==null)$.style.background=`linear-gradient(${G0}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`;let jj=vZ(M);$.addEventListener("pointerdown",jj),Q.appendChild($),E0.push({el:$,handler:jj})};L("se",null,"0","0",null,"nwse-resize",null),L("nw","0",null,null,"0","nwse-resize","135deg"),L("ne","0","0",null,null,"nesw-resize",null),L("sw",null,null,"0","0","nesw-resize",null)}if(X.addEventListener("pointerdown",fJ),Q.addEventListener("pointerdown",u0),window.addEventListener("resize",IJ),document.body.appendChild(Q),q=new hZ(Q,{context:iJ,initialValue:U.runtime}),q.connect(),Wj(),e0(),xJ(),wJ(),BJ(),qj(),U.active)SJ();u=U.active}return{update(K){if(U=K,!Q||!G||!a||!D)return;q?.setValue(U.runtime),wJ(),pZ();let Y=D.tagName.toLowerCase()==="nds-icon-button"?"inline-block":"inline-flex";if(D.style.display=U.mounted.entry.shell?.closeable===!1?"none":Y,e0(),xJ(),BJ(),qj(),!u&&U.active)SJ();else if(u&&!U.active)TJ(),j0=null;u=U.active},destroy(){if(CZ(),q?.disconnect(),q=null,S.length=0,F0)TJ();if(d)document.removeEventListener("keydown",dj,!0),d=!1;for(let{el:K,handler:Y}of E0)K.removeEventListener("pointerdown",Y);if(j0=null,E0.length=0,X)X.removeEventListener("pointerdown",fJ),X.onkeydown=null;if(s.release(),Q)Q.removeEventListener("pointerdown",u0);if(window.removeEventListener("resize",IJ),z&&G&&z.parentNode===G)r(z),G.removeChild(z);if(z=null,Q&&Q.parentElement)Q.remove()}}}var SZ={get level(){return v0()},set level(J){v0(J),l()},get scopeId(){return Kj()},set scopeId(J){Kj(J),l()},get itemId(){return Sj()},set itemId(J){Sj(J),l()},get sectionId(){return Tj()},set sectionId(J){Tj(J),l()},get catalogId(){return fj()},set catalogId(J){fj(J),l()},get tools(){return Ij()},set tools(J){Ij(J),l()},get contentKind(){return Cj()},set contentKind(J){Cj(J),l()},get position(){return x0()},set position(J){x0(J),l()},get scopeElement(){return Qj()},set scopeElement(J){Qj(J),l()},get toolRegistry(){return Lj()},set toolRegistry(J){Lj(J),l()},get item(){return yj()},set item(J){yj(J),l()},get hostButtons(){return Xj()},set hostButtons(J){Xj(J),l()},get class(){return bj()},set class(J){bj(J),l()},get size(){return Yj()},set size(J){Yj(J),l()},get language(){return pj()},set language(J){pj(J),l()}},WJ=X0(),TZ=Q0(WJ);{var fZ=(J)=>{var Z=tZ();let U;var Q=c0(Z),q=c0(Q);Zj(q,17,()=>j(kZ),(k)=>k.key,(k,D)=>{var t=X0(),e=Q0(t);{var m=(y)=>{var A=X0(),z=Q0(A);Bj(z,()=>j(g0),(T)=>{var s=zj();B0(s,(p,W)=>uj?.(p,W),()=>({mounted:j(D),active:j(t0)[j(D).toolId]??!1,runtime:j(x),i18n:j(Vj)})),H(T,s)}),H(y,A)},d=(y)=>{var A=zj();B0(A,(z,T)=>hj?.(z,T),()=>j(D).entry),H(y,A)};Y0(e,(y)=>{if(j(D).entry.shell)y(m);else y(d,-1)})}H(k,t)});var S=wj(q,2);Zj(S,17,()=>j(OJ),(k)=>k.id,(k,D,t,e)=>{let m=O(()=>j(g0)&&!lj(j(D))?ZJ(j(D)):null);var d=X0(),y=Q0(d);{var A=(p)=>{var W=rZ(),w=c0(W);T0(w,1,"item-toolbar__nds-button svelte-1c13522"),f0(w,"type","circle"),f0(w,"size","small"),f0(w,"variant","tertiary"),L0(()=>f0(w,"icon-name",j(m))),L0(()=>f0(w,"button-aria-label",j(D).ariaLabel||j(D).label)),L0(()=>f0(w,"title",j(D).tooltip||j(D).label)),L0(()=>f0(w,"disabled",j(D).disabled)),B0(w,(g)=>ZZ?.(g)),B0(w,(g,q0)=>UZ?.(g,q0),()=>Pj(j(D))),N0(W),Jj("click",w,function(...g){j(D).onClick?.apply(this,g)}),H(p,W)},z=(p)=>{var W=lZ();let w;var g=c0(W);{var q0=(h)=>{var O0=X0(),_0=Q0(O0);{var H0=(R)=>{var I=Hj();Uj(I,()=>kj(j(D).icon),!0),N0(I),H(R,I)},E0=O(()=>oj(j(D).icon)),_=(R)=>{var I=_J();L0(()=>U0(I,"src",j(D).icon)),H(R,I)},E=O(()=>nj(j(D).icon)),f=(R)=>{let I=O(()=>RJ(j(D).icon));var A0=X0(),w0=Q0(A0);{var F0=(u)=>{var r=Hj();Uj(r,()=>kj(j(I)),!0),N0(r),H(u,r)},j0=(u)=>{var r=EJ();L0(()=>T0(r,1,`icon icon-${j(D).icon}`,"svelte-1c13522")),H(u,r)};Y0(w0,(u)=>{if(j(I))u(F0);else u(j0,-1)})}H(R,A0)};Y0(_0,(R)=>{if(j(E0))R(H0);else if(j(E))R(_,1);else R(f,-1)})}H(h,O0)};Y0(g,(h)=>{if(j(D).icon)h(q0)})}N0(W),L0((h)=>{w=T0(W,1,"item-toolbar__button svelte-1c13522",null,w,{"item-toolbar__button--active":h}),U0(W,"href",j(D).disabled?void 0:j(D).href),U0(W,"target",j(D).target),U0(W,"rel",j(D).rel),U0(W,"aria-label",j(D).ariaLabel||j(D).label),U0(W,"title",j(D).tooltip||j(D).label),U0(W,"aria-disabled",j(D).disabled?"true":void 0)},[()=>Pj(j(D))]),Jj("click",W,(h)=>{if(j(D).disabled)h.preventDefault()}),H(p,W)},T=O(()=>lj(j(D))),s=(p)=>{var W=oZ();let w;var g=c0(W);{var q0=(h)=>{var O0=X0(),_0=Q0(O0);{var H0=(R)=>{var I=Hj();Uj(I,()=>kj(j(D).icon),!0),N0(I),H(R,I)},E0=O(()=>oj(j(D).icon)),_=(R)=>{var I=_J();L0(()=>U0(I,"src",j(D).icon)),H(R,I)},E=O(()=>nj(j(D).icon)),f=(R)=>{let I=O(()=>RJ(j(D).icon));var A0=X0(),w0=Q0(A0);{var F0=(u)=>{var r=Hj();Uj(r,()=>kj(j(I)),!0),N0(r),H(u,r)},j0=(u)=>{var r=EJ();L0(()=>T0(r,1,`icon icon-${j(D).icon}`,"svelte-1c13522")),H(u,r)};Y0(w0,(u)=>{if(j(I))u(F0);else u(j0,-1)})}H(R,A0)};Y0(_0,(R)=>{if(j(E0))R(H0);else if(j(E))R(_,1);else R(f,-1)})}H(h,O0)};Y0(g,(h)=>{if(j(D).icon)h(q0)})}N0(W),L0((h,O0)=>{w=T0(W,1,"item-toolbar__button svelte-1c13522",null,w,{"item-toolbar__button--active":h}),U0(W,"aria-label",j(D).ariaLabel||j(D).label),U0(W,"aria-pressed",O0),U0(W,"title",j(D).tooltip||j(D).label),W.disabled=j(D).disabled},[()=>Pj(j(D)),()=>Pj(j(D))]),Jj("click",W,function(...h){j(D).onClick?.apply(this,h)}),H(p,W)};Y0(y,(p)=>{if(j(m))p(A);else if(j(T))p(z,1);else p(s,-1)})}H(k,d)});var X=wj(S,2);Zj(X,17,()=>j(zZ),(k)=>k.key,(k,D)=>{var t=X0(),e=Q0(t);{var m=(y)=>{var A=X0(),z=Q0(A);Bj(z,()=>j(g0),(T)=>{var s=zj();B0(s,(p,W)=>uj?.(p,W),()=>({mounted:j(D),active:j(t0)[j(D).toolId]??!1,runtime:j(x),i18n:j(Vj)})),H(T,s)}),H(y,A)},d=(y)=>{var A=zj();B0(A,(z,T)=>hj?.(z,T),()=>j(D).entry),H(y,A)};Y0(e,(y)=>{if(j(D).entry.shell)y(m);else y(d,-1)})}H(k,t)}),N0(Q);var G=wj(Q,2);{var a=(k)=>{var D=nZ();let t;Zj(D,21,()=>j(GJ),(e)=>e.key,(e,m)=>{var d=X0(),y=Q0(d);{var A=(T)=>{var s=X0(),p=Q0(s);Bj(p,()=>j(g0),(W)=>{var w=vJ();B0(w,(g,q0)=>uj?.(g,q0),()=>({mounted:j(m),active:j(t0)[j(m).toolId]??!1,runtime:j(x),i18n:j(Vj)})),H(W,w)}),H(T,s)},z=(T)=>{var s=vJ();B0(s,(p,W)=>hj?.(p,W),()=>j(m).entry),H(T,s)};Y0(y,(T)=>{if(j(m).entry.shell)T(A);else T(z,-1)})}H(e,d)}),N0(D),L0(()=>t=T0(D,1,"item-toolbar__controls-row svelte-1c13522",null,t,{"item-toolbar__controls-row--reserve":j(PJ),"item-toolbar__controls-row--active":j(qJ),"item-toolbar__controls-row--align-start":j(HZ)})),H(k,D)};Y0(G,(k)=>{if(j(wZ))k(a)})}N0(Z),cJ(Z,(k)=>V0(D0,k),()=>j(D0)),L0(()=>{U=T0(Z,1,`item-toolbar ${bj()??""} item-toolbar--${Yj()??""}`,"svelte-1c13522",U,{"item-toolbar--top":x0()==="top","item-toolbar--right":x0()==="right","item-toolbar--bottom":x0()==="bottom","item-toolbar--left":x0()==="left","item-toolbar--header-overlay-active":j(FJ)}),U0(Z,"data-content-kind",j(r0)),U0(Z,"data-level",j(b))}),Jj("focusin",Q,(k)=>{if(j(b)==="section"&&k.target instanceof HTMLElement)k.target.scrollIntoView({block:"nearest",inline:"nearest"})}),H(J,Z)};Y0(TZ,(J)=>{if(v)J(fZ)})}return H(B,WJ),$J(SZ)}hJ(["focusin","click"]);mZ("pie-item-toolbar",sJ(eJ,{level:{attribute:"level",type:"String"},scopeId:{attribute:"scope-id",type:"String"},itemId:{attribute:"item-id",type:"String"},sectionId:{attribute:"section-id",type:"String"},catalogId:{attribute:"catalog-id",type:"String"},tools:{attribute:"tools",type:"String"},contentKind:{attribute:"content-kind",type:"String"},position:{attribute:"position",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},scopeElement:{type:"Object"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"},class:{}},[],[],{mode:"open"}));
|
|
40
|
+
export{eJ as l};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var P="pie-register",S="pie-unregister",V="pie-item-session-changed",L="item-session-changed",M="pie-content-loaded",O="pie-item-player-error",D="pie-formative-action",G="pie-media-time-source";var p=(E)=>Array.isArray(E)&&E.length>0;function R(E){if(E.kind==="passage")return{ownerKind:"passage",assessmentId:E.assessmentId,sectionId:E.sectionId,passageId:E.canonicalItemId||E.itemId};return{ownerKind:"itemModel",assessmentId:E.assessmentId,sectionId:E.sectionId,itemId:E.itemId,canonicalItemId:E.canonicalItemId||E.itemId}}function A(E,I){if(!E)return[];let N=R(I),_=[];if(p(E.accessibilityCatalogs))_.push({context:N,catalogs:E.accessibilityCatalogs});if(p(E.config?.extractedCatalogs))_.push({context:N,catalogs:E.config.extractedCatalogs});if(I.kind==="passage")return _;if(N.ownerKind!=="itemModel")return _;for(let T of E.config?.models??[]){if(!p(T.accessibilityCatalogs))continue;_.push({context:{...N,modelId:T.id},catalogs:T.accessibilityCatalogs})}return _}function x(E,I){let N=A(E,{kind:I,itemId:""});try{return JSON.stringify(N.map((_)=>[_.context.modelId??null,_.catalogs]))}catch{return null}}
|
|
2
|
+
export{P as a,S as b,V as c,L as d,M as e,O as f,D as g,G as h,R as i,A as j,x as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{na as v}from"./ItemToolBar-jx38w99s.js";import"./ItemToolBar-97hx60z4.js";import*as q from"speech-rule-engine";var x=q.default??q;x.setupEngine(v());var B=x;export{B as default};
|
|
@@ -25,18 +25,18 @@ export interface AssessmentToolkitRuntimeContext {
|
|
|
25
25
|
/**
|
|
26
26
|
* Opt-in flag: context consumers render the vendored `<nds-icon-button>`
|
|
27
27
|
* only when this is `true`; otherwise (unset/`false`, the default) they
|
|
28
|
-
* render plain `<button>` controls. Sourced from the
|
|
29
|
-
*
|
|
28
|
+
* render plain `<button>` controls. Sourced from the `nds-icons` attribute
|
|
29
|
+
* on the toolkit or section player.
|
|
30
30
|
*/
|
|
31
31
|
ndsIcons?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Interface locale: the language this deployment renders its *own* UI in —
|
|
34
34
|
* toolbar labels, tool panels, `aria-label`s. Not the language of the
|
|
35
|
-
* authored content, which
|
|
35
|
+
* authored content, which {@link contentLanguage} carries.
|
|
36
36
|
*
|
|
37
37
|
* A composition context in the sense of `composition-context.md`: the
|
|
38
|
-
* deployment knows it and no tool can. Sourced from the
|
|
39
|
-
*
|
|
38
|
+
* deployment knows it and no tool can. Sourced from the `locale` attribute
|
|
39
|
+
* on the toolkit or section player, defaulting to
|
|
40
40
|
* `en-US` with no host input — never `navigator.language`, because a
|
|
41
41
|
* rendered-string change reaches a host's live delivery on their next install
|
|
42
42
|
* with no build signal on their side.
|
|
@@ -56,7 +56,22 @@ export interface AssessmentToolkitRuntimeContext {
|
|
|
56
56
|
* they saw.
|
|
57
57
|
*/
|
|
58
58
|
i18n?: I18nProvider;
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Content language: the language the authored content is written in, which
|
|
61
|
+
* read-aloud speaks it in and catalog lookups select alternates by. Sourced
|
|
62
|
+
* from the host's `content-language` attribute on the toolkit (or
|
|
63
|
+
* `runtime.contentLanguage` on a section player), and unset when the host
|
|
64
|
+
* names none. A `lang` in the content's markup wins over it; read-aloud
|
|
65
|
+
* resolves both per read in `TTSService.speak`. Independent of
|
|
66
|
+
* {@link locale}, since a learner can read content in one language through
|
|
67
|
+
* an interface in another.
|
|
68
|
+
*/
|
|
69
|
+
contentLanguage?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Reports a failure that keeps the section's content from loading as the
|
|
72
|
+
* section controller's `section-error`, with source `section-runtime`.
|
|
73
|
+
*/
|
|
74
|
+
reportSectionError?: (error: unknown) => void;
|
|
60
75
|
}
|
|
61
76
|
export declare const assessmentToolkitRuntimeContext: {
|
|
62
77
|
__context__: AssessmentToolkitRuntimeContext;
|
|
@@ -64,6 +79,17 @@ export declare const assessmentToolkitRuntimeContext: {
|
|
|
64
79
|
export interface AssessmentToolkitHostRuntimeContext {
|
|
65
80
|
runtimeId: string;
|
|
66
81
|
coordinator: ToolkitCoordinatorApi;
|
|
82
|
+
/**
|
|
83
|
+
* The toolkit holds a section, so a shell under it is its content's channel
|
|
84
|
+
* to the section. Without one the host owns its players and their events.
|
|
85
|
+
*/
|
|
86
|
+
sectionBound: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The element the runtime hears its shells' events on. A shell whose host
|
|
89
|
+
* has left the document, as on teardown, dispatches here: an event bubbling
|
|
90
|
+
* from a detached host reaches nothing.
|
|
91
|
+
*/
|
|
92
|
+
eventTarget: EventTarget;
|
|
67
93
|
}
|
|
68
94
|
export declare const assessmentToolkitHostRuntimeContext: {
|
|
69
95
|
__context__: AssessmentToolkitHostRuntimeContext;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,74 +6,49 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export type {
|
|
9
|
+
export type { AssessmentToolkitRuntimeContext, ItemPlayerConfig, ItemPlayerType, ShellContextKind, } from "./context/assessment-toolkit-context.js";
|
|
10
10
|
export type { TTSHighlightContext, TTSHighlightTargetResolver, TTSHighlightTargetResolverProvider, TTSHighlightTargetResolverRuntime, } from "./services/tts/highlight-target-resolver.js";
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export type { AccessibilityCatalogResolverApi, ElementToolStateStoreApi, HighlightCoordinatorApi,
|
|
11
|
+
export { catalogOwnerContextFor, type CatalogOwnerContext, type CatalogOwnerIdentity, type CatalogSourceEntity, } from "./services/catalog-owner.js";
|
|
12
|
+
export { PIE_INTERNAL_FORMATIVE_ACTION_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_MEDIA_TIME_SOURCE_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, type InternalFormativeActionDetail, type InternalMediaTimeSourceDetail, } from "./runtime/registration-events.js";
|
|
13
|
+
export { createShellScope, type ShellScope, type ShellScopeState, } from "./runtime/shell-scope.js";
|
|
14
|
+
export { createShellEventBridge, type ShellEventBridge, type ShellEventBridgeOptions, } from "./runtime/shell-event-bridge.js";
|
|
15
|
+
export { connectToolRuntimeContext, dispatchCrossBoundaryEvent, } from "./runtime/tool-host-contract.js";
|
|
16
|
+
export type { AccessibilityCatalogResolverApi, ElementToolStateStoreApi, HighlightCoordinatorApi, ToolCoordinatorApi, ToolkitCoordinatorApi, SpeakOptions, TtsServiceApi, ToolState, ToolStateFilter, } from "./services/interfaces.js";
|
|
17
17
|
export type { CatalogCardForm, CatalogChangeEvent, CatalogChangeListener, CatalogChangeReason, CatalogLookupContext, CatalogLookupOptions, CatalogOwnerCard, CatalogOwnerRegistration, CatalogOwnerSnapshot, CatalogOwnerView, CatalogStatistics, CatalogType, ResolvedCatalog, } from "./services/AccessibilityCatalogResolver.js";
|
|
18
|
-
export { AccessibilityCatalogResolver
|
|
19
|
-
export { ContextVariableStore } from "./services/ContextVariableStore.js";
|
|
18
|
+
export { AccessibilityCatalogResolver } from "./services/AccessibilityCatalogResolver.js";
|
|
20
19
|
export { ElementToolStateStore } from "./services/ElementToolStateStore.js";
|
|
21
20
|
export type { Annotation } from "./services/HighlightCoordinator.js";
|
|
22
21
|
export { HighlightColor, HighlightCoordinator, HighlightType, } from "./services/HighlightCoordinator.js";
|
|
23
22
|
export type { SerializedRange } from "./services/RangeSerializer.js";
|
|
24
|
-
export {
|
|
25
|
-
export type {
|
|
26
|
-
export { I18nService } from "./services/I18nService.js";
|
|
27
|
-
export type { ResolvedToolContext, ToolbarContext, ToolContextResolver, ToolContextResolverContext, ToolContextResolverMap, ToolContextResolverResult, ToolActivation, ToolContentDependency, ToolContentDependencyContext, ToolModuleLoader, ToolRegistryChangeEvent, ToolRegistryChangeKind, ToolRegistryChangeListener, ToolSingletonScope, ToolSurfaceRenderContext, ToolSurfaceRenderResult, ToolSurfaceServices, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolWindowShellAction, ToolWindowShellAlign, ToolWindowShellConfig, ToolWindowShellContentConfig, ToolRegistration, } from "./services/ToolRegistry.js";
|
|
23
|
+
export type { I18nProvider, InterpolationValues, LocaleCode, MessageKeyInput, PluralOptions, TextDirection, } from "@pie-players/pie-players-shared/i18n";
|
|
24
|
+
export type { ResolvedToolContext, ToolbarContext, ToolContextResolver, ToolContextResolverContext, ToolContextResolverMap, ToolContextResolverResult, ToolActivation, ToolContentDependency, ToolContentDependencyContext, ToolModuleLoader, ToolRegistryChangeEvent, ToolRegistryChangeKind, ToolRegistryChangeListener, ToolSingletonScope, ToolSurfaceRenderContext, ToolSurfaceRenderResult, ToolSurfaceServices, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolRegistration, } from "./services/ToolRegistry.js";
|
|
28
25
|
export { ToolRegistry } from "./services/ToolRegistry.js";
|
|
29
26
|
export type { ToolOpenRequest, ToolRequestTarget, } from "./services/tool-request.js";
|
|
30
|
-
export { DEFAULT_TOOL_REQUEST_LEVEL } from "./services/tool-request.js";
|
|
31
|
-
export type { ToolSelectionAction, ToolSelectionContext, } from "./services/selection-action.js";
|
|
32
27
|
export type { AssessmentToolContext, BaseToolContext, ElementToolContext, ItemToolContext, PassageToolContext, RubricToolContext, SectionToolContext, ToolContext, ToolLevel, } from "./services/tool-context.js";
|
|
33
|
-
export {
|
|
34
|
-
export { DEFAULT_TOOL_PLACEMENT } from "./services/createDefaultToolRegistry.js";
|
|
28
|
+
export { hasReadableText } from "./services/tool-context.js";
|
|
35
29
|
export type { CreateToolsConfigArgs } from "./services/create-tools-config.js";
|
|
36
30
|
export { createToolsConfig } from "./services/create-tools-config.js";
|
|
37
|
-
export { createEmptyPersonalNeedsProfile } from "./services/defaultPersonalNeedsProfile.js";
|
|
38
31
|
export type { ToolComponentFactory, ToolComponentFactoryMap, ToolComponentOverrides, ToolTagMap, } from "./tools/tool-tag-map.js";
|
|
39
|
-
export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tools/tool-tag-map.js";
|
|
40
|
-
export { ALL_STANDARD_ACCESS_FEATURES, EXAMPLE_PNP_CONFIGURATIONS, getFeatureCategory, getFeaturesInCategory, isStandardAccessFeature, QTI_STANDARD_ACCESS_FEATURES, } from "./services/pnp-standard-features.js";
|
|
41
|
-
export { applyMediaFragment, enforceMediaFragment, isSafeMediaSrc, isUnsupportedMediaAssetVersion, normalizeMediaFragment, normalizeMediaSources, SUPPORTED_MEDIA_ASSET_VERSION, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
42
|
-
export type { SpokenAudioMedia } from "./services/spoken-audio-cards.js";
|
|
43
|
-
export { resolveSpokenAudioMedia, SPOKEN_CATALOG_TYPE, } from "./services/spoken-audio-cards.js";
|
|
44
32
|
export type { ExtractionResult } from "./services/SSMLExtractor.js";
|
|
45
33
|
export { SSMLExtractor } from "./services/SSMLExtractor.js";
|
|
46
|
-
export type { FontSize, ThemeConfig } from "./services/ThemeProvider.js";
|
|
47
|
-
export { ThemeProvider } from "./services/ThemeProvider.js";
|
|
48
34
|
export { ToolCoordinator, ZIndexLayer } from "./services/ToolCoordinator.js";
|
|
49
|
-
export type {
|
|
35
|
+
export type { ProviderLifecycleContext, SectionControllerContext, SectionControllerEvent, SectionControllerEventType, SectionItemEvent, SectionItemEventType, SectionControllerFactoryDefaults, SectionControllerHandle, SectionControllerKey, SectionScopedEvent, SectionScopedEventType, SectionSessionPersistenceConfig, SectionItemEventSubscriptionArgs, SectionScopedEventSubscriptionArgs, SectionEventSubscriptionArgs, SectionSessionPersistenceStrategy, SectionControllerLoadedRenderable, SectionControllerRuntimeState, SectionControllerSessionState, SectionPersistenceFactoryDefaults, ToolkitCoordinatorConfig, ToolkitCoordinatorHooks, ToolkitErrorContext, } from "./services/ToolkitCoordinator.js";
|
|
50
36
|
export { ToolkitCoordinator } from "./services/ToolkitCoordinator.js";
|
|
51
|
-
export type { CanonicalToolsConfig, ToolPlacementConfig, ToolPlacementLevel, ToolPolicyConfig, ToolProvidersConfig, } from "./services/tools-config-normalizer.js";
|
|
52
|
-
export type { FrameworkErrorKind, FrameworkErrorModel, FrameworkErrorSeverity, } from "./services/framework-error.js";
|
|
53
|
-
export {
|
|
37
|
+
export type { CalculatorToolProviderConfig, CanonicalToolsConfig, ToolPlacementConfig, ToolPlacementLevel, ToolPolicyConfig, ToolProvidersConfig, ToolsConfigInput, TextToSpeechToolProviderConfig, } from "./services/tools-config-normalizer.js";
|
|
38
|
+
export type { FrameworkErrorKind, FrameworkErrorModel, FrameworkErrorScope, FrameworkErrorSeverity, } from "./services/framework-error.js";
|
|
39
|
+
export { frameworkErrorFromUnknown, toFrameworkErrorModel, } from "./services/framework-error.js";
|
|
54
40
|
export type { FrameworkErrorListener } from "./services/framework-error-bus.js";
|
|
55
|
-
export type { ToolConfigDiagnostic, ToolConfigDiagnosticSeverity, ToolConfigStrictness,
|
|
41
|
+
export type { ToolConfigDiagnostic, ToolConfigDiagnosticSeverity, ToolConfigStrictness, ToolConfigValidationResult, } from "./services/tool-config-validation.js";
|
|
56
42
|
export type { ToolbarButtonItem, ToolbarItem, ToolbarItemBase, ToolbarLinkItem, } from "./services/toolbar-items.js";
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export { isHostDeniedFeature } from "./policy/core/feature-decision.js";
|
|
60
|
-
export { frameworkErrorFromToolConfigValidation, normalizeAndValidateToolsConfig, } from "./services/tool-config-validation.js";
|
|
61
|
-
export type { ParsedToolInstanceId, ToolScopeLevel, } from "./services/tool-instance-id.js";
|
|
62
|
-
export { createScopedToolId, parseScopedToolId, toOverlayToolId, } from "./services/tool-instance-id.js";
|
|
43
|
+
export type { ToolScopeLevel } from "./services/tool-instance-id.js";
|
|
44
|
+
export { createScopedToolId } from "./services/tool-instance-id.js";
|
|
63
45
|
export type { TTSConfig } from "./services/TTSService.js";
|
|
64
46
|
export { PlaybackState, TTSService } from "./services/TTSService.js";
|
|
65
|
-
export { PIE_TTS_CONTROL_HANDOFF_EVENT, type TTSControlHandoffDetail, } from "./services/tts-control-events.js";
|
|
66
|
-
export { bindTtsAudioHandoff, pauseTtsForMediaAudio, } from "./services/audio-handoff.js";
|
|
67
47
|
export { BrowserTTSProvider } from "./services/tts/browser-provider.js";
|
|
68
48
|
export type { SREMathSpeechOptions } from "./services/tts/math-speech.js";
|
|
69
|
-
export type {
|
|
70
|
-
export {
|
|
71
|
-
export type {
|
|
72
|
-
export
|
|
73
|
-
export { createFetchItemLoader, createLoadItem, ItemLoadError, } from "./item-loader.js";
|
|
74
|
-
export type { StorageLike, TestAttemptItemSession, TestAttemptSession, TestAttemptSessionNavigationState, TestAttemptSessionRealization, } from "./attempt/TestSession.js";
|
|
75
|
-
export { createMemoryStorage, createTestAttemptSessionIdentifier, createNewTestAttemptSession, getBrowserLocalStorage, getOrCreateAnonymousDeviceId, getTestAttemptSessionStorageKey, loadTestAttemptSession, saveTestAttemptSession, setCurrentPosition, upsertItemSessionFromPieSessionChange, upsertVisitedItem, } from "./attempt/TestSession.js";
|
|
49
|
+
export type { TTSLayoutMode, TTSRuntimeSettings, TTSSpeedOption, TTSSpeedOptionConfig, } from "./services/tts-runtime-config.js";
|
|
50
|
+
export type { ITTSProvider, ITTSProviderImplementation, TTSSpeechSegment, TTSProviderCapabilities, } from "@pie-players/pie-tts";
|
|
51
|
+
export type { TestAttemptItemSession, TestAttemptSession, TestAttemptSessionNavigationState, TestAttemptSessionRealization, } from "./attempt/TestSession.js";
|
|
52
|
+
export { createNewTestAttemptSession, setCurrentPosition, toItemSessionsRecord, upsertItemSessionFromPieSessionChange, upsertVisitedItem, } from "./attempt/TestSession.js";
|
|
76
53
|
export type { AssessmentSession, AssessmentSectionSessionState, AssessmentSessionNavigationState, AssessmentSessionRealization, } from "./attempt/AssessmentSession.js";
|
|
77
|
-
export { createNewAssessmentSession,
|
|
78
|
-
export type { ActivitySessionPatchPayload, MapActivityToTestAttemptSessionArgs, PieBackendActivityDefinition, PieBackendActivityItemRef, PieBackendActivitySession, } from "./attempt/adapters/activity-to-test-attempt-session.js";
|
|
79
|
-
export { buildActivitySessionItemUpdate, buildActivitySessionPatchFromTestAttemptSession, mapActivityToTestAttemptSession, toItemSessionsRecord, } from "./attempt/adapters/activity-to-test-attempt-session.js";
|
|
54
|
+
export { createNewAssessmentSession, setCurrentSectionPosition, upsertSectionSession, } from "./attempt/AssessmentSession.js";
|