@pie-players/pie-assessment-toolkit 0.3.75 → 1.0.0-beta.1
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 +451 -541
- package/custom-elements.json +1315 -0
- package/dist/attempt/TestSession.d.ts +0 -1
- package/dist/attempt/TestSession.js +10 -5
- package/dist/components/ItemScope.custom-element.js +1 -1
- package/dist/components/ItemToolBar.custom-element.js +1 -1
- package/dist/components/PieAssessmentToolkit.custom-element.js +8 -8
- package/dist/components/SectionToolBar.custom-element.js +1 -1
- package/dist/components/chunks/{ItemToolBar-7tt7v2xp.js → ItemToolBar-3zrc4p3d.js} +4 -4
- package/dist/components/chunks/{ItemToolBar-jx38w99s.js → ItemToolBar-66hcwmfw.js} +2 -2
- package/dist/components/chunks/ItemToolBar-asenkvx6.js +40 -0
- package/dist/components/chunks/ItemToolBar-hzc5wyjp.js +2 -0
- package/dist/components/chunks/{ItemToolBar-97hx60z4.js → ItemToolBar-kkj69ptr.js} +1 -1
- package/dist/components/chunks/sre-engine-bj997w4b.js +1 -0
- package/dist/context/assessment-toolkit-context.d.ts +6 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4 -10
- package/dist/policy/core/PolicySource.d.ts +1 -1
- package/dist/policy/core/ToolPolicyEngine.d.ts +46 -7
- package/dist/policy/core/ToolPolicyEngine.js +73 -16
- package/dist/policy/core/compose-decision.d.ts +3 -3
- package/dist/policy/core/compose-decision.js +32 -30
- package/dist/policy/core/decision-types.d.ts +51 -34
- package/dist/policy/core/feature-decision.d.ts +17 -15
- package/dist/policy/core/feature-decision.js +11 -13
- package/dist/policy/core/pnp-policy-inputs.d.ts +7 -3
- package/dist/policy/core/pnp-policy-inputs.js +17 -33
- package/dist/policy/core/provenance.d.ts +2 -2
- package/dist/policy/core/tool-parameters.d.ts +12 -0
- package/dist/policy/core/tool-parameters.js +27 -0
- package/dist/policy/engine.d.ts +1 -1
- package/dist/policy/sources/PnpPolicySource.d.ts +18 -24
- package/dist/policy/sources/PnpPolicySource.js +57 -29
- package/dist/runtime/SectionControllerBinding.d.ts +6 -2
- package/dist/runtime/SectionControllerBinding.js +21 -15
- package/dist/runtime/adapter/subscriber-fanout.d.ts +0 -1
- package/dist/runtime/adapter/subscriber-fanout.js +1 -4
- package/dist/runtime/composition-emit-scheduler.d.ts +3 -3
- package/dist/runtime/composition-emit-scheduler.js +1 -1
- package/dist/runtime/content-region.d.ts +0 -4
- package/dist/runtime/content-region.js +2 -2
- package/dist/runtime/core/SectionEngineCore.d.ts +0 -2
- package/dist/runtime/core/SectionEngineCore.js +0 -4
- package/dist/runtime/core/cohort.d.ts +0 -5
- package/dist/runtime/core/cohort.js +0 -9
- package/dist/runtime/core/engine-output.d.ts +3 -2
- package/dist/runtime/core/engine-transition.js +3 -2
- package/dist/runtime/registration-events.d.ts +11 -14
- package/dist/runtime/runtime-id.d.ts +1 -1
- package/dist/runtime/runtime-id.js +1 -1
- package/dist/runtime/shell-scope.d.ts +4 -4
- package/dist/runtime/shell-scope.js +15 -9
- package/dist/runtime/tool-host-contract.d.ts +0 -4
- package/dist/runtime/tool-host-contract.js +1 -1
- package/dist/services/AccessibilityCatalogResolver.d.ts +21 -31
- package/dist/services/AccessibilityCatalogResolver.js +29 -42
- package/dist/services/ElementToolStateStore.d.ts +32 -61
- package/dist/services/ElementToolStateStore.js +37 -67
- package/dist/services/HighlightCoordinator.d.ts +9 -21
- package/dist/services/HighlightCoordinator.js +52 -80
- package/dist/services/RangeSerializer.d.ts +4 -35
- package/dist/services/RangeSerializer.js +4 -48
- package/dist/services/SSMLExtractor.d.ts +8 -31
- package/dist/services/SSMLExtractor.js +18 -40
- package/dist/services/TTSService.d.ts +51 -57
- package/dist/services/TTSService.js +323 -284
- package/dist/services/ToolCoordinator.d.ts +6 -49
- package/dist/services/ToolCoordinator.js +25 -61
- package/dist/services/ToolRegistry.d.ts +83 -80
- package/dist/services/ToolRegistry.js +91 -67
- package/dist/services/ToolkitCoordinator.d.ts +83 -81
- package/dist/services/ToolkitCoordinator.js +186 -174
- package/dist/services/framework-error.d.ts +30 -7
- package/dist/services/framework-error.js +10 -13
- package/dist/services/interfaces.d.ts +51 -71
- package/dist/services/section-controller-types.d.ts +7 -7
- package/dist/services/section-session-assignment.js +6 -8
- package/dist/services/spoken-audio-cards.d.ts +2 -4
- package/dist/services/spoken-audio-cards.js +2 -4
- package/dist/services/tool-config-validation.d.ts +5 -7
- package/dist/services/tool-config-validation.js +11 -26
- package/dist/services/tool-context.d.ts +39 -24
- package/dist/services/tool-context.js +158 -92
- package/dist/services/tool-failure.d.ts +30 -0
- package/dist/services/tool-failure.js +11 -0
- package/dist/services/tool-icons.d.ts +1 -2
- package/dist/services/tool-icons.js +2 -2
- package/dist/services/tool-instance-id.d.ts +8 -6
- package/dist/services/tool-instance-id.js +12 -18
- package/dist/services/tool-providers/TTSToolProvider.d.ts +6 -43
- package/dist/services/tool-providers/TTSToolProvider.js +7 -63
- package/dist/services/tool-providers/ToolProviderApi.d.ts +0 -7
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts +7 -42
- package/dist/services/tool-providers/ToolProviderRegistry.js +21 -63
- package/dist/services/tool-request.d.ts +4 -0
- package/dist/services/tool-request.js +7 -2
- package/dist/services/toolbar-decided-tools.d.ts +2 -0
- package/dist/services/toolbar-decided-tools.js +2 -0
- package/dist/services/toolbar-items.js +2 -5
- package/dist/services/tools-config-normalizer.d.ts +18 -9
- package/dist/services/tools-config-normalizer.js +25 -19
- package/dist/services/tts/browser-provider.d.ts +2 -5
- package/dist/services/tts/browser-provider.js +13 -22
- package/dist/services/tts/catalog-span-alignment.js +14 -7
- package/dist/services/tts/flat-tree.d.ts +0 -7
- package/dist/services/tts/flat-tree.js +2 -2
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.d.ts +2 -2
- package/dist/services/tts/generated-speech/index.d.ts +1 -1
- package/dist/services/tts/generated-speech/index.js +1 -1
- package/dist/services/tts/generated-speech/types.d.ts +1 -1
- package/dist/services/tts/generated-speech/types.js +1 -1
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +10 -12
- package/dist/services/tts/highlight-target-resolver.d.ts +12 -0
- package/dist/services/tts/math-aware-text-processing.js +10 -29
- package/dist/services/tts/math-speech.d.ts +1 -1
- package/dist/services/tts/math-speech.js +3 -0
- package/dist/services/tts/mathml-sanitization.d.ts +7 -0
- package/dist/services/tts/mathml-sanitization.js +9 -1
- package/dist/services/tts/provider-options.d.ts +12 -1
- package/dist/services/tts/ssml/spoken-text.js +1 -1
- package/dist/services/tts/start-failure.d.ts +0 -7
- package/dist/services/tts/start-failure.js +1 -1
- package/dist/services/tts/text-segmentation.d.ts +5 -0
- package/dist/services/tts/text-segmentation.js +13 -10
- package/dist/services/tts-runtime-config.d.ts +32 -12
- package/dist/services/tts-runtime-config.js +14 -20
- package/dist/tools/content-capability-resolution.d.ts +2 -2
- package/dist/tools/registration.d.ts +7 -6
- package/dist/tools/registration.js +10 -9
- package/dist/tools/registrations/toolbar-registration-helpers.d.ts +6 -0
- package/dist/tools/registrations/toolbar-registration-helpers.js +6 -0
- package/dist/tools/tool-surface-host.js +1 -8
- package/package.json +8 -6
- package/dist/components/chunks/ItemToolBar-bxwyhr5p.js +0 -2
- package/dist/components/chunks/ItemToolBar-rd2bb4p6.js +0 -40
- package/dist/components/chunks/sre-engine-jd8cc08x.js +0 -1
- package/dist/services/ContextVariableStore.d.ts +0 -113
- package/dist/services/ContextVariableStore.js +0 -206
- package/dist/services/tts-control-events.d.ts +0 -13
- package/dist/services/tts-control-events.js +0 -7
- package/dist/utils/logger.d.ts +0 -6
- package/dist/utils/logger.js +0 -10
|
@@ -1,40 +0,0 @@
|
|
|
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};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Variable Store
|
|
3
|
-
*
|
|
4
|
-
* Standalone service for managing QTI 3.0 context variables.
|
|
5
|
-
* Context variables are global assessment-level variables that can be
|
|
6
|
-
* shared across items.
|
|
7
|
-
*
|
|
8
|
-
* Can be used independently by any assessment player without requiring
|
|
9
|
-
* the full AssessmentPlayer.
|
|
10
|
-
*
|
|
11
|
-
* Part of PIE Assessment Toolkit.
|
|
12
|
-
*/
|
|
13
|
-
import type { ContextDeclaration } from "@pie-players/pie-players-shared/types";
|
|
14
|
-
/**
|
|
15
|
-
* Standalone service for managing QTI 3.0 context variables.
|
|
16
|
-
*
|
|
17
|
-
* Context variables are global assessment-level variables that can be
|
|
18
|
-
* shared across items. Can be used independently by any assessment player.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* // Initialize with declarations
|
|
23
|
-
* const store = new ContextVariableStore(declarations);
|
|
24
|
-
*
|
|
25
|
-
* // Get/set variables
|
|
26
|
-
* const seed = store.get('RANDOM_SEED');
|
|
27
|
-
* store.set('DIFFICULTY_LEVEL', 'hard');
|
|
28
|
-
*
|
|
29
|
-
* // Pass to items
|
|
30
|
-
* const context = store.toObject();
|
|
31
|
-
* await renderItem(item, session, context);
|
|
32
|
-
*
|
|
33
|
-
* // Persist in session
|
|
34
|
-
* session.contextVariables = store.toObject();
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare class ContextVariableStore {
|
|
38
|
-
private variables;
|
|
39
|
-
private declarations;
|
|
40
|
-
/**
|
|
41
|
-
* Initialize store with context declarations from assessment
|
|
42
|
-
*
|
|
43
|
-
* @param declarations QTI 3.0 context declarations
|
|
44
|
-
*/
|
|
45
|
-
constructor(declarations?: ContextDeclaration[]);
|
|
46
|
-
/**
|
|
47
|
-
* Initialize context variables from declarations
|
|
48
|
-
*
|
|
49
|
-
* Sets each variable to its defaultValue or type-appropriate default.
|
|
50
|
-
*/
|
|
51
|
-
initialize(declarations: ContextDeclaration[]): void;
|
|
52
|
-
/**
|
|
53
|
-
* Get context variable value
|
|
54
|
-
*
|
|
55
|
-
* @param identifier Variable identifier
|
|
56
|
-
* @returns Variable value or undefined if not found
|
|
57
|
-
*/
|
|
58
|
-
get(identifier: string): any;
|
|
59
|
-
/**
|
|
60
|
-
* Set context variable value
|
|
61
|
-
*
|
|
62
|
-
* @param identifier Variable identifier
|
|
63
|
-
* @param value New value
|
|
64
|
-
*/
|
|
65
|
-
set(identifier: string, value: any): void;
|
|
66
|
-
/**
|
|
67
|
-
* Check if variable exists
|
|
68
|
-
*/
|
|
69
|
-
has(identifier: string): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Get all variable names
|
|
72
|
-
*/
|
|
73
|
-
getIdentifiers(): string[];
|
|
74
|
-
/**
|
|
75
|
-
* Get all variables as object (for passing to PIE elements)
|
|
76
|
-
*
|
|
77
|
-
* @returns Plain object with all context variables
|
|
78
|
-
*/
|
|
79
|
-
toObject(): Record<string, any>;
|
|
80
|
-
/**
|
|
81
|
-
* Load state from serialized object (for session restore)
|
|
82
|
-
*
|
|
83
|
-
* @param state Object containing context variable values
|
|
84
|
-
*/
|
|
85
|
-
fromObject(state: Record<string, any>): void;
|
|
86
|
-
/**
|
|
87
|
-
* Clear all variables (reset to defaults)
|
|
88
|
-
*/
|
|
89
|
-
reset(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Get declaration for variable
|
|
92
|
-
*
|
|
93
|
-
* @param identifier Variable identifier
|
|
94
|
-
* @returns Declaration or undefined if not found
|
|
95
|
-
*/
|
|
96
|
-
getDeclaration(identifier: string): ContextDeclaration | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Get all declarations
|
|
99
|
-
*/
|
|
100
|
-
getDeclarations(): ContextDeclaration[];
|
|
101
|
-
/**
|
|
102
|
-
* Get default value for QTI base type
|
|
103
|
-
*
|
|
104
|
-
* @private
|
|
105
|
-
*/
|
|
106
|
-
private getDefaultValueForType;
|
|
107
|
-
/**
|
|
108
|
-
* Validate value matches declared type (basic validation)
|
|
109
|
-
*
|
|
110
|
-
* @private
|
|
111
|
-
*/
|
|
112
|
-
private validateValue;
|
|
113
|
-
}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Variable Store
|
|
3
|
-
*
|
|
4
|
-
* Standalone service for managing QTI 3.0 context variables.
|
|
5
|
-
* Context variables are global assessment-level variables that can be
|
|
6
|
-
* shared across items.
|
|
7
|
-
*
|
|
8
|
-
* Can be used independently by any assessment player without requiring
|
|
9
|
-
* the full AssessmentPlayer.
|
|
10
|
-
*
|
|
11
|
-
* Part of PIE Assessment Toolkit.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Standalone service for managing QTI 3.0 context variables.
|
|
15
|
-
*
|
|
16
|
-
* Context variables are global assessment-level variables that can be
|
|
17
|
-
* shared across items. Can be used independently by any assessment player.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* // Initialize with declarations
|
|
22
|
-
* const store = new ContextVariableStore(declarations);
|
|
23
|
-
*
|
|
24
|
-
* // Get/set variables
|
|
25
|
-
* const seed = store.get('RANDOM_SEED');
|
|
26
|
-
* store.set('DIFFICULTY_LEVEL', 'hard');
|
|
27
|
-
*
|
|
28
|
-
* // Pass to items
|
|
29
|
-
* const context = store.toObject();
|
|
30
|
-
* await renderItem(item, session, context);
|
|
31
|
-
*
|
|
32
|
-
* // Persist in session
|
|
33
|
-
* session.contextVariables = store.toObject();
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export class ContextVariableStore {
|
|
37
|
-
variables = new Map();
|
|
38
|
-
declarations = new Map();
|
|
39
|
-
/**
|
|
40
|
-
* Initialize store with context declarations from assessment
|
|
41
|
-
*
|
|
42
|
-
* @param declarations QTI 3.0 context declarations
|
|
43
|
-
*/
|
|
44
|
-
constructor(declarations) {
|
|
45
|
-
if (declarations) {
|
|
46
|
-
this.initialize(declarations);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Initialize context variables from declarations
|
|
51
|
-
*
|
|
52
|
-
* Sets each variable to its defaultValue or type-appropriate default.
|
|
53
|
-
*/
|
|
54
|
-
initialize(declarations) {
|
|
55
|
-
this.declarations.clear();
|
|
56
|
-
this.variables.clear();
|
|
57
|
-
for (const decl of declarations) {
|
|
58
|
-
this.declarations.set(decl.identifier, decl);
|
|
59
|
-
const value = decl.defaultValue ??
|
|
60
|
-
this.getDefaultValueForType(decl.baseType, decl.cardinality);
|
|
61
|
-
this.variables.set(decl.identifier, value);
|
|
62
|
-
}
|
|
63
|
-
console.debug(`ContextVariableStore: Initialized ${declarations.length} context variables:`, Array.from(this.variables.keys()));
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Get context variable value
|
|
67
|
-
*
|
|
68
|
-
* @param identifier Variable identifier
|
|
69
|
-
* @returns Variable value or undefined if not found
|
|
70
|
-
*/
|
|
71
|
-
get(identifier) {
|
|
72
|
-
return this.variables.get(identifier);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Set context variable value
|
|
76
|
-
*
|
|
77
|
-
* @param identifier Variable identifier
|
|
78
|
-
* @param value New value
|
|
79
|
-
*/
|
|
80
|
-
set(identifier, value) {
|
|
81
|
-
if (!this.declarations.has(identifier)) {
|
|
82
|
-
console.warn(`ContextVariableStore: Setting undeclared context variable: ${identifier}`, "Consider declaring it in contextDeclarations");
|
|
83
|
-
}
|
|
84
|
-
// Type validation (optional but recommended)
|
|
85
|
-
const decl = this.declarations.get(identifier);
|
|
86
|
-
if (decl) {
|
|
87
|
-
this.validateValue(decl, value);
|
|
88
|
-
}
|
|
89
|
-
this.variables.set(identifier, value);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Check if variable exists
|
|
93
|
-
*/
|
|
94
|
-
has(identifier) {
|
|
95
|
-
return this.variables.has(identifier);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get all variable names
|
|
99
|
-
*/
|
|
100
|
-
getIdentifiers() {
|
|
101
|
-
return Array.from(this.variables.keys());
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Get all variables as object (for passing to PIE elements)
|
|
105
|
-
*
|
|
106
|
-
* @returns Plain object with all context variables
|
|
107
|
-
*/
|
|
108
|
-
toObject() {
|
|
109
|
-
return Object.fromEntries(this.variables);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Load state from serialized object (for session restore)
|
|
113
|
-
*
|
|
114
|
-
* @param state Object containing context variable values
|
|
115
|
-
*/
|
|
116
|
-
fromObject(state) {
|
|
117
|
-
for (const [key, value] of Object.entries(state)) {
|
|
118
|
-
this.variables.set(key, value);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Clear all variables (reset to defaults)
|
|
123
|
-
*/
|
|
124
|
-
reset() {
|
|
125
|
-
for (const [identifier, decl] of this.declarations) {
|
|
126
|
-
const value = decl.defaultValue ??
|
|
127
|
-
this.getDefaultValueForType(decl.baseType, decl.cardinality);
|
|
128
|
-
this.variables.set(identifier, value);
|
|
129
|
-
}
|
|
130
|
-
console.debug("ContextVariableStore: Reset to default values");
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Get declaration for variable
|
|
134
|
-
*
|
|
135
|
-
* @param identifier Variable identifier
|
|
136
|
-
* @returns Declaration or undefined if not found
|
|
137
|
-
*/
|
|
138
|
-
getDeclaration(identifier) {
|
|
139
|
-
return this.declarations.get(identifier);
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Get all declarations
|
|
143
|
-
*/
|
|
144
|
-
getDeclarations() {
|
|
145
|
-
return Array.from(this.declarations.values());
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Get default value for QTI base type
|
|
149
|
-
*
|
|
150
|
-
* @private
|
|
151
|
-
*/
|
|
152
|
-
getDefaultValueForType(baseType, cardinality) {
|
|
153
|
-
if (cardinality === "multiple" || cardinality === "ordered") {
|
|
154
|
-
return [];
|
|
155
|
-
}
|
|
156
|
-
if (cardinality === "record") {
|
|
157
|
-
return {};
|
|
158
|
-
}
|
|
159
|
-
// Single cardinality defaults
|
|
160
|
-
switch (baseType) {
|
|
161
|
-
case "boolean":
|
|
162
|
-
return false;
|
|
163
|
-
case "integer":
|
|
164
|
-
return 0;
|
|
165
|
-
case "float":
|
|
166
|
-
return 0.0;
|
|
167
|
-
case "string":
|
|
168
|
-
case "identifier":
|
|
169
|
-
case "uri":
|
|
170
|
-
return "";
|
|
171
|
-
case "point":
|
|
172
|
-
return [0, 0];
|
|
173
|
-
case "pair":
|
|
174
|
-
return ["", ""];
|
|
175
|
-
case "directedPair":
|
|
176
|
-
return ["", ""];
|
|
177
|
-
case "duration":
|
|
178
|
-
return 0;
|
|
179
|
-
case "file":
|
|
180
|
-
return null;
|
|
181
|
-
default:
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Validate value matches declared type (basic validation)
|
|
187
|
-
*
|
|
188
|
-
* @private
|
|
189
|
-
*/
|
|
190
|
-
validateValue(decl, value) {
|
|
191
|
-
// Basic type checking - can be extended
|
|
192
|
-
if (decl.baseType === "integer" && !Number.isInteger(value)) {
|
|
193
|
-
console.warn(`ContextVariableStore: Variable ${decl.identifier} expects integer, got:`, typeof value);
|
|
194
|
-
}
|
|
195
|
-
if (decl.baseType === "float" && typeof value !== "number") {
|
|
196
|
-
console.warn(`ContextVariableStore: Variable ${decl.identifier} expects float, got:`, typeof value);
|
|
197
|
-
}
|
|
198
|
-
if (decl.baseType === "boolean" && typeof value !== "boolean") {
|
|
199
|
-
console.warn(`ContextVariableStore: Variable ${decl.identifier} expects boolean, got:`, typeof value);
|
|
200
|
-
}
|
|
201
|
-
if ((decl.cardinality === "multiple" || decl.cardinality === "ordered") &&
|
|
202
|
-
!Array.isArray(value)) {
|
|
203
|
-
console.warn(`ContextVariableStore: Variable ${decl.identifier} expects array (cardinality: ${decl.cardinality}), got:`, typeof value);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared orchestration events for TTS tool UI controls.
|
|
3
|
-
*
|
|
4
|
-
* These events are intentionally UI-level coordination hints. They do not replace
|
|
5
|
-
* playback controls such as stop/pause/resume.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PIE_TTS_CONTROL_HANDOFF_EVENT = "pie-tts-control-handoff";
|
|
8
|
-
export type TTSControlHandoffDetail = {
|
|
9
|
-
/**
|
|
10
|
-
* Optional source identifier for host-orchestrated handoff tracing.
|
|
11
|
-
*/
|
|
12
|
-
source?: "host";
|
|
13
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared orchestration events for TTS tool UI controls.
|
|
3
|
-
*
|
|
4
|
-
* These events are intentionally UI-level coordination hints. They do not replace
|
|
5
|
-
* playback controls such as stop/pause/resume.
|
|
6
|
-
*/
|
|
7
|
-
export const PIE_TTS_CONTROL_HANDOFF_EVENT = "pie-tts-control-handoff";
|
package/dist/utils/logger.d.ts
DELETED
package/dist/utils/logger.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal logger helper (replacement for PIEOneer’s internal debug logger).
|
|
3
|
-
* We intentionally keep this lightweight and browser-safe.
|
|
4
|
-
*/
|
|
5
|
-
export function createLogger(namespace) {
|
|
6
|
-
return (...args) => {
|
|
7
|
-
// eslint-disable-next-line no-console
|
|
8
|
-
console.debug(`[${namespace}]`, ...args);
|
|
9
|
-
};
|
|
10
|
-
}
|