@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.
Files changed (142) hide show
  1. package/README.md +451 -541
  2. package/custom-elements.json +1315 -0
  3. package/dist/attempt/TestSession.d.ts +0 -1
  4. package/dist/attempt/TestSession.js +10 -5
  5. package/dist/components/ItemScope.custom-element.js +1 -1
  6. package/dist/components/ItemToolBar.custom-element.js +1 -1
  7. package/dist/components/PieAssessmentToolkit.custom-element.js +8 -8
  8. package/dist/components/SectionToolBar.custom-element.js +1 -1
  9. package/dist/components/chunks/{ItemToolBar-7tt7v2xp.js → ItemToolBar-3zrc4p3d.js} +4 -4
  10. package/dist/components/chunks/{ItemToolBar-jx38w99s.js → ItemToolBar-66hcwmfw.js} +2 -2
  11. package/dist/components/chunks/ItemToolBar-asenkvx6.js +40 -0
  12. package/dist/components/chunks/ItemToolBar-hzc5wyjp.js +2 -0
  13. package/dist/components/chunks/{ItemToolBar-97hx60z4.js → ItemToolBar-kkj69ptr.js} +1 -1
  14. package/dist/components/chunks/sre-engine-bj997w4b.js +1 -0
  15. package/dist/context/assessment-toolkit-context.d.ts +6 -0
  16. package/dist/index.d.ts +7 -7
  17. package/dist/index.js +4 -10
  18. package/dist/policy/core/PolicySource.d.ts +1 -1
  19. package/dist/policy/core/ToolPolicyEngine.d.ts +46 -7
  20. package/dist/policy/core/ToolPolicyEngine.js +73 -16
  21. package/dist/policy/core/compose-decision.d.ts +3 -3
  22. package/dist/policy/core/compose-decision.js +32 -30
  23. package/dist/policy/core/decision-types.d.ts +51 -34
  24. package/dist/policy/core/feature-decision.d.ts +17 -15
  25. package/dist/policy/core/feature-decision.js +11 -13
  26. package/dist/policy/core/pnp-policy-inputs.d.ts +7 -3
  27. package/dist/policy/core/pnp-policy-inputs.js +17 -33
  28. package/dist/policy/core/provenance.d.ts +2 -2
  29. package/dist/policy/core/tool-parameters.d.ts +12 -0
  30. package/dist/policy/core/tool-parameters.js +27 -0
  31. package/dist/policy/engine.d.ts +1 -1
  32. package/dist/policy/sources/PnpPolicySource.d.ts +18 -24
  33. package/dist/policy/sources/PnpPolicySource.js +57 -29
  34. package/dist/runtime/SectionControllerBinding.d.ts +6 -2
  35. package/dist/runtime/SectionControllerBinding.js +21 -15
  36. package/dist/runtime/adapter/subscriber-fanout.d.ts +0 -1
  37. package/dist/runtime/adapter/subscriber-fanout.js +1 -4
  38. package/dist/runtime/composition-emit-scheduler.d.ts +3 -3
  39. package/dist/runtime/composition-emit-scheduler.js +1 -1
  40. package/dist/runtime/content-region.d.ts +0 -4
  41. package/dist/runtime/content-region.js +2 -2
  42. package/dist/runtime/core/SectionEngineCore.d.ts +0 -2
  43. package/dist/runtime/core/SectionEngineCore.js +0 -4
  44. package/dist/runtime/core/cohort.d.ts +0 -5
  45. package/dist/runtime/core/cohort.js +0 -9
  46. package/dist/runtime/core/engine-output.d.ts +3 -2
  47. package/dist/runtime/core/engine-transition.js +3 -2
  48. package/dist/runtime/registration-events.d.ts +11 -14
  49. package/dist/runtime/runtime-id.d.ts +1 -1
  50. package/dist/runtime/runtime-id.js +1 -1
  51. package/dist/runtime/shell-scope.d.ts +4 -4
  52. package/dist/runtime/shell-scope.js +15 -9
  53. package/dist/runtime/tool-host-contract.d.ts +0 -4
  54. package/dist/runtime/tool-host-contract.js +1 -1
  55. package/dist/services/AccessibilityCatalogResolver.d.ts +21 -31
  56. package/dist/services/AccessibilityCatalogResolver.js +29 -42
  57. package/dist/services/ElementToolStateStore.d.ts +32 -61
  58. package/dist/services/ElementToolStateStore.js +37 -67
  59. package/dist/services/HighlightCoordinator.d.ts +9 -21
  60. package/dist/services/HighlightCoordinator.js +52 -80
  61. package/dist/services/RangeSerializer.d.ts +4 -35
  62. package/dist/services/RangeSerializer.js +4 -48
  63. package/dist/services/SSMLExtractor.d.ts +8 -31
  64. package/dist/services/SSMLExtractor.js +18 -40
  65. package/dist/services/TTSService.d.ts +51 -57
  66. package/dist/services/TTSService.js +323 -284
  67. package/dist/services/ToolCoordinator.d.ts +6 -49
  68. package/dist/services/ToolCoordinator.js +25 -61
  69. package/dist/services/ToolRegistry.d.ts +83 -80
  70. package/dist/services/ToolRegistry.js +91 -67
  71. package/dist/services/ToolkitCoordinator.d.ts +83 -81
  72. package/dist/services/ToolkitCoordinator.js +186 -174
  73. package/dist/services/framework-error.d.ts +30 -7
  74. package/dist/services/framework-error.js +10 -13
  75. package/dist/services/interfaces.d.ts +51 -71
  76. package/dist/services/section-controller-types.d.ts +7 -7
  77. package/dist/services/section-session-assignment.js +6 -8
  78. package/dist/services/spoken-audio-cards.d.ts +2 -4
  79. package/dist/services/spoken-audio-cards.js +2 -4
  80. package/dist/services/tool-config-validation.d.ts +5 -7
  81. package/dist/services/tool-config-validation.js +11 -26
  82. package/dist/services/tool-context.d.ts +39 -24
  83. package/dist/services/tool-context.js +158 -92
  84. package/dist/services/tool-failure.d.ts +30 -0
  85. package/dist/services/tool-failure.js +11 -0
  86. package/dist/services/tool-icons.d.ts +1 -2
  87. package/dist/services/tool-icons.js +2 -2
  88. package/dist/services/tool-instance-id.d.ts +8 -6
  89. package/dist/services/tool-instance-id.js +12 -18
  90. package/dist/services/tool-providers/TTSToolProvider.d.ts +6 -43
  91. package/dist/services/tool-providers/TTSToolProvider.js +7 -63
  92. package/dist/services/tool-providers/ToolProviderApi.d.ts +0 -7
  93. package/dist/services/tool-providers/ToolProviderRegistry.d.ts +7 -42
  94. package/dist/services/tool-providers/ToolProviderRegistry.js +21 -63
  95. package/dist/services/tool-request.d.ts +4 -0
  96. package/dist/services/tool-request.js +7 -2
  97. package/dist/services/toolbar-decided-tools.d.ts +2 -0
  98. package/dist/services/toolbar-decided-tools.js +2 -0
  99. package/dist/services/toolbar-items.js +2 -5
  100. package/dist/services/tools-config-normalizer.d.ts +18 -9
  101. package/dist/services/tools-config-normalizer.js +25 -19
  102. package/dist/services/tts/browser-provider.d.ts +2 -5
  103. package/dist/services/tts/browser-provider.js +13 -22
  104. package/dist/services/tts/catalog-span-alignment.js +14 -7
  105. package/dist/services/tts/flat-tree.d.ts +0 -7
  106. package/dist/services/tts/flat-tree.js +2 -2
  107. package/dist/services/tts/generated-speech/dom/to-chunk-inputs.d.ts +2 -2
  108. package/dist/services/tts/generated-speech/index.d.ts +1 -1
  109. package/dist/services/tts/generated-speech/index.js +1 -1
  110. package/dist/services/tts/generated-speech/types.d.ts +1 -1
  111. package/dist/services/tts/generated-speech/types.js +1 -1
  112. package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +10 -12
  113. package/dist/services/tts/highlight-target-resolver.d.ts +12 -0
  114. package/dist/services/tts/math-aware-text-processing.js +10 -29
  115. package/dist/services/tts/math-speech.d.ts +1 -1
  116. package/dist/services/tts/math-speech.js +3 -0
  117. package/dist/services/tts/mathml-sanitization.d.ts +7 -0
  118. package/dist/services/tts/mathml-sanitization.js +9 -1
  119. package/dist/services/tts/provider-options.d.ts +12 -1
  120. package/dist/services/tts/ssml/spoken-text.js +1 -1
  121. package/dist/services/tts/start-failure.d.ts +0 -7
  122. package/dist/services/tts/start-failure.js +1 -1
  123. package/dist/services/tts/text-segmentation.d.ts +5 -0
  124. package/dist/services/tts/text-segmentation.js +13 -10
  125. package/dist/services/tts-runtime-config.d.ts +32 -12
  126. package/dist/services/tts-runtime-config.js +14 -20
  127. package/dist/tools/content-capability-resolution.d.ts +2 -2
  128. package/dist/tools/registration.d.ts +7 -6
  129. package/dist/tools/registration.js +10 -9
  130. package/dist/tools/registrations/toolbar-registration-helpers.d.ts +6 -0
  131. package/dist/tools/registrations/toolbar-registration-helpers.js +6 -0
  132. package/dist/tools/tool-surface-host.js +1 -8
  133. package/package.json +8 -6
  134. package/dist/components/chunks/ItemToolBar-bxwyhr5p.js +0 -2
  135. package/dist/components/chunks/ItemToolBar-rd2bb4p6.js +0 -40
  136. package/dist/components/chunks/sre-engine-jd8cc08x.js +0 -1
  137. package/dist/services/ContextVariableStore.d.ts +0 -113
  138. package/dist/services/ContextVariableStore.js +0 -206
  139. package/dist/services/tts-control-events.d.ts +0 -13
  140. package/dist/services/tts-control-events.js +0 -7
  141. package/dist/utils/logger.d.ts +0 -6
  142. package/dist/utils/logger.js +0 -10
@@ -1 +1 @@
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};
1
+ import"./chunks/ItemToolBar-asenkvx6.js";import"./chunks/ItemToolBar-hzc5wyjp.js";import{H as E,M as W,O as X,_ as w,aa as G,ba as Y,v as U,w as V,y as F}from"./chunks/ItemToolBar-3zrc4p3d.js";import"./chunks/ItemToolBar-kkj69ptr.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};
@@ -1,4 +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};
1
+ var g9="5";if(typeof window<"u")((window.__svelte??={}).v??=new Set).add(g9);var o7=Array.isArray,h9=Array.prototype.indexOf,qQ=Array.prototype.includes,AQ=Array.from,mQ=Object.keys,P7=Object.defineProperty,H7=Object.getOwnPropertyDescriptor,X0=Object.getOwnPropertyDescriptors,h0=Object.prototype,v9=Array.prototype,$Q=Object.getPrototypeOf,v0=Object.isExtensible;var h7=()=>{};function Z0(Q){for(var J=0;J<Q.length;J++)Q[J]()}function z0(){var Q,J,W=new Promise((K,X)=>{Q=K,J=X});return{promise:W,resolve:Q,reject:J}}var g=2,v7=4,e7=8,UQ=16777216,n=16,i=32,z7=64,NQ=128,G0=256,G7=512,T=1024,N=2048,m=4096,d=8192,y=16384,V7=32768,QQ=33554432,B7=65536,PQ=131072,m0=262144,m7=524288,m9=1048576,x7=33554432,uQ=2097152,N7=4194304,R7=8388608,q7=Symbol("$state"),V0=Symbol("component"),pQ=Symbol("legacy props"),u9=Symbol(""),u0=Symbol("proxy path"),q0=Symbol("attributes"),fQ=Symbol("class"),p0=Symbol("style"),dQ=Symbol("text"),f0=Symbol("form reset"),p9=Symbol("hmr anchor"),s7=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},d0=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var RQ=3,D7=8;var f9=1,d9=2,_0=4,_9=8,l9=16,i9=1,c9=2,o9=4,s9=8,r9=16;var a9=1,n9=2;var jQ="[",JQ="[!",l0="[?",HQ="]",u7={};var E=Symbol("uninitialized"),E7=Symbol("filename"),t9=Symbol("hmr"),$0="http://www.w3.org/1999/xhtml",_Q="http://www.w3.org/2000/svg",i0="http://www.w3.org/1998/Math/MathML";function e9(){console.warn("https://svelte.dev/e/derived_inert")}function QJ(Q,J,W){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function WQ(Q){console.warn("https://svelte.dev/e/hydration_mismatch")}function JJ(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function WJ(Q){var J=L;if(J===null)return O.f|=R7,Q;if((J.f&V7)===0&&(J.f&v7)===0)throw Q;Y7(Q,J)}function Y7(Q,J){if(J!==null&&(J.f&y)!==0)return;while(J!==null){if((J.f&NQ)!==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 P7(Q,V0,{value:!0}),Q}function k7(){return!KQ||C!==null&&C.l===null}var BQ=[];function LJ(){var Q=BQ;BQ=[],Z0(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?.[u0]?.(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 N4=!1;function TQ(Q=!0){if(N4=!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 T4=~(N|m|T);function j(Q,J){Q.f=Q.f&T4|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|=m7;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=z0();X=H.promise;try{Promise.resolve(Q()).then(H.resolve,(q)=>{if(q!==s7)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 x4(Q){let J=ZQ(Q);if(!Q7)O0(J);return J}function LQ(Q){let J=ZQ(Q);return J.equals=B0,J}function E4(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 e9(),Q.v;_(K);try{E4(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(s7),J.ac=null});if(J.fn!==null)J.teardown=h7;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&PQ)!==0)&&k7()&&(O.f&(g|n|N7|PQ))!==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&PQ)!==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 y4=1;class J7{id=y4++;#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(),g4();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&v7)!==0)J.push(K);else if(Q7&&(X&(e7|UQ))!==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|PQ))===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??=z0()).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&(v7|e7|UQ))!==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 g4(){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(qQ.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 v4(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&v7)!==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&m7)===0){if(X=X.first,(Q&n)!==0&&(Q&B7)!==0&&X!==null)X.f|=B7}}if(X!==null){if(X.parent=W,W!==null)v4(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(v7|m9,Q)}function $9(Q){J7.ensure();let J=_7(z7|m7,Q);return()=>{v(J)}}function bJ(Q){J7.ensure();let J=_7(z7|m7,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(v7,Q)}function wJ(Q){return _7(N7|m7,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|m7,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(s7)});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&m0)!==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|=G0,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&B7)!==0||(X.f&i)!==0&&(Q.f&n)!==0;gJ(X,J,z?W:!1)}X=Z}}function gQ(Q){Q.f&=~G0,hJ(Q,!0)}function hJ(Q,J){if((Q.f&G0)!==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&B7)!==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&uQ)!==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(s7)}),Q.ac=null;try{Q.f|=uQ;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^=uQ,$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 u4(Q,J){let W=J.reactions;if(W!==null){var K=h9.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||!qQ.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(s7),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++)u4(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|UQ))!==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&uQ)!==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??=[],!qQ.call(O.deps,Q))O.deps.push(Q);var Z=Q.reactions;if(Z===null)Q.reactions=[O];else if(!qQ.call(Z,O))Z.push(O)}}}if(!1){if(!C7&&R4&&S===null&&FQ===null&&!R4.warned&&(R4.effect.f&uQ)===0&&!R4.effect_deps.has(Q))var z;if(t0&&!C7&&R5!==null&&O!==null&&R5.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=$Q(Q);if(W!==Object.prototype&&W!==Array.prototype&&W!==Map.prototype&&W!==Set.prototype&&W!==Date.prototype){let K=X0(W);for(let X in K){let Z=K[X].get;if(Z)try{Z.call(Q)}catch(z){}}}}}var p4=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function a7(Q){if(typeof Q!=="object"||Q===null||q7 in Q||V0 in Q)return Q;let J=$Q(Q);if(J!==h0&&J!==v9)return Q;var W=new Map,K=o7(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,f4(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||H7($,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||H7($,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||H7($,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 f4(Q,J){if(typeof J==="symbol")return`${Q}[Symbol(${J.description??""})]`;if(p4.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=H7(J,"firstChild").get,iJ=H7(J,"nextSibling").get,v0(Q))Q[fQ]=void 0,Q[q0]=null,Q[p0]=void 0,Q.__e=void 0;if(v0(W))W[dQ]=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!==RQ){var K=p();return W?.before(K),R(K),K}if(J)j0(W);return R(W),W}function d4(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!==RQ){var K=p();return D?.before(K),R(K),K}j0(D)}return D}function _4(Q,J=!1){if(!M)return h(Q);var W=cJ(Q,J);return A0(Q),W}function l4(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!==RQ){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===$0)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===RQ)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(),u7;return D=Q}function l(){return R(c(D))}function A0(Q){if(!M)return;if(c(D)!==null)throw WQ(),u7;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===HQ){if(J===0)return W;J-=1}else if(K===jQ||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(),u7;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;P7(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 i4=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:(Q)=>{return Q}});function rJ(Q){return i4?.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 s4(Q,J){var W=(J&a9)!==0,K=(J&n9)!==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 r4(){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 a4=["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 fW=[...a4,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var n4=["touchstart","touchmove"];function aJ(Q){return n4.includes(Q)}var t4=["$state","$state.raw","$derived","$derived.by"],dW=[...t4,"$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 e4=B7|m7;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|=NQ,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(l0)){let G=JSON.parse(X.data.slice(l0.length));this.#L(G)}else if(Z)this.#C();else this.#S()}else this.#w()},e4),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){JJ();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|=NQ,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 Q8(Q,J){var W=J==null?"":typeof J==="object"?`${J}`:J;if(W!==(Q[dQ]??=Q.nodeValue))Q[dQ]=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!==jQ))Z=c(Z);if(!Z)throw u7;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!==u7)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!==HQ)throw WQ(),u7}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(AQ(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 K8(Q,J,W=!1){var K;if(M)K=D,l();var X=new n7(Q),Z=W?B7: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 X8=Symbol("NaN");function Z8(Q,J,W){if(M)l();var K=new n7(Q),X=!k7();L7(()=>{var Z=J();if(Z!==Z)Z=X8;if(X&&Z!==null&&typeof Z==="object")Z={};K.ensure(Z,W)})}function z8(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,AQ(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 G8(Q,J,W,K,X,Z=null){var z=Q,G=new Map,V=(J&_0)!==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 o7(x)?x:x==null?[]:AQ(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,V8(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===HQ)z=D,I=!0,f(!1);var g7=U[t7],K0=K(g7,t7);if(!1)var Q1;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=q8(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[w4,C4]of G)if(!Z7.has(w4))O7.skip_effect(C4.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 V8(Q,J,W,K,X){var Z=(K&_9)!==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,AQ(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&_0)!==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()}z8(Q,O7,t7)}}if(Z)s(()=>{if($===void 0)return;for(Y of $)Y.nodes?.a?.apply()})}function q8(Q,J,W,K,X,Z,z,G){var V=(z&f9)!==0?(z&l9)===0?SQ(W,!1,!1):K7(W):null,H=(z&d9)!==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 $8(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(),u7;F7(D,U),z=R($);return}var q=K?_Q:X?i0: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 U8(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 F8(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 O8(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()})}function K4(Q){var J,W,K="";if(typeof Q=="string"||typeof Q=="number")K+=Q;else if(typeof Q=="object")if(Array.isArray(Q)){var X=Q.length;for(J=0;J<X;J++)Q[J]&&(W=K4(Q[J]))&&(K&&(K+=" "),K+=W)}else for(W in Q)Q[W]&&(K&&(K+=" "),K+=W);return K}function X4(){for(var Q,J,W=0,K="",X=arguments.length;W<X;W++)(Q=arguments[W])&&(J=K4(Q))&&(K&&(K+=" "),K+=J);return K}function z4(Q){if(typeof Q==="object")return X4(Q);else return Q??""}var Z4=[...`
3
+ \r\f \v\uFEFF`];function G4(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||Z4.includes(K[z-1]))&&(G===K.length||Z4.includes(K[G])))K=(z===0?"":K.substring(0,z))+K.substring(G+1);else z=G}}}return K===""?null:K}function V4(Q,J,W,K,X,Z){var z=Q[fQ];if(M||z!==W||z===void 0){var G=G4(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[fQ]=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 x8=Symbol("class"),E8=Symbol("style"),k8=Symbol("is custom element"),b8=Symbol("is html"),y8=d0?"link":"LINK";function U4(Q,J,W,K){var X=h8(Q);if(M){if(X[J]=Q.getAttribute(J),J==="src"||J==="srcset"||J==="href"&&Q.nodeName===y8){if(!K)v8(Q,J,W??"");return}}if(X[J]===(X[J]=W))return;if(J==="loading")Q[u9]=W;if(W==null)Q.removeAttribute(J);else if(typeof W!=="string"&&P4(Q).has(J))Q[J]=W;else Q.setAttribute(J,W)}function g8(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())?P4(Q).has(J):W&&typeof W==="object"))Q[J]=W;else U4(Q,J,W==null?W:String(W))}finally{if(u(K),_(X),Z)f(!0)}}function h8(Q){return Q[q0]??={[k8]:Q.nodeName.includes("-"),[b8]:Q.namespaceURI===$0}}var T9=new Map;function P4(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=X0(X);for(var z in K)if(K[z].set&&z!=="innerHTML"&&z!=="textContent"&&z!=="innerText")W.add(z);X=$Q(X)}return W}function v8(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 q4(Q){return Q.split(",").map((J)=>J.trim().split(" ").filter(Boolean))}function m8(Q,J){var W=q4(Q.srcset),K=q4(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 H4{#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){H4.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 u8(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,PG=Symbol("unmounted");function b9(Q){var J=b0;try{return b0=!1,[Q(),b0]}finally{b0=J}}function f8(Q,J,W,K){var X=!KQ||(W&c9)!==0,Z=(W&s9)!==0,z=(W&r9)!==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||pQ in Q;$=H7(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&o9)===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&i9)!==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 B4(Q){return new Y4(Q)}class Y4{#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===pQ)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;P7(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 M4;if(typeof HTMLElement==="function")M4=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=r8(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=B4({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 mQ(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 mQ(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 r8(Q){let J={};return Q.childNodes.forEach((W)=>{J[W.slot||"default"]=!0}),J}function a8(Q,J,W,K,X,Z){let z=class extends M4{constructor(){super(Q,W,X);this.$$p_d=J}static get observedAttributes(){return mQ(J).map((G)=>(J[G].attribute||G).toLowerCase())}};if(mQ(J).forEach((G)=>{P7(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=H7(H,G)?.get;if(P)H[G]=V;else H.$set({[G]:V})}}})}),K.forEach((G)=>{P7(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 L4=g0(Symbol.for("pie.assessmentToolkit.runtimeContext")),F4=g0(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),O4=g0(Symbol.for("pie.assessmentToolkit.shellContext")),n8=g0(Symbol.for("pie.assessmentToolkit.regionScopeContext"));import{connectContextWithRetry as y9}from"@pie-players/pie-context";var t8={bubbles:!0,composed:!0,cancelable:!1};function e8(Q,J,W={}){return new CustomEvent(Q,{detail:J,...t8,...W})}function PP(Q,J,W,K={}){return Q.dispatchEvent(e8(J,W,K))}function HP(Q,J){return y9(Q,L4,J)}function BP(Q,J){return y9(Q,O4,J)}function YP(Q,J){return y9(Q,F4,J)}var LP=1e4;function FP(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 DP(Q,J){return S4(Q,J,new WeakMap)}function S4(Q,J,W){if(Object.is(Q,J))return!0;let K=Array.isArray(Q);if(K!==Array.isArray(J))return!1;if(!K&&(!D4(Q)||!D4(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(!S4(X[V],Z[V],W))return!1;return!0}function D4(Q){if(Q===null||typeof Q!=="object")return!1;let J=Object.getPrototypeOf(Q);return J===Object.prototype||J===null}
4
+ export{h7 as t,A0 as u,c0 as v,o0 as w,x4 as x,yQ as y,d7 as z,X7 as A,a7 as B,cJ as C,d4 as D,_4 as E,l4 as F,q9 as G,U9 as H,A as I,k as J,oJ as K,sJ as L,s4 as M,r4 as N,Q0 as O,Q8 as P,K8 as Q,Z8 as R,G8 as S,$8 as T,U8 as U,F8 as V,O8 as W,z4 as X,V4 as Y,U4 as Z,g8 as _,u8 as $,f8 as aa,a8 as ba,L4 as ca,F4 as da,O4 as ea,n8 as fa,PP as ga,HP as ha,BP as ia,YP as ja,LP as ka,FP as la,DP as ma};
@@ -1,2 +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};
1
+ import{qa as w}from"./ItemToolBar-kkj69ptr.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 na,H as oa,I as pa};
@@ -0,0 +1,40 @@
1
+ import{m as D6,n as O6,p as N6,r as F6}from"./ItemToolBar-hzc5wyjp.js";import{$ as U6,A as r,B as j6,C as aJ,D as yJ,F as TZ,G as $,H as o,I as J,K as VZ,L as K6,M as LJ,N as xJ,O as y,Q as NJ,R as X6,S as YZ,T as Q0,V as Q6,W as LZ,X as U0,Y as OJ,Z as l,_ as BJ,aa as u,ba as V6,ca as Y6,ha as L6,ia as q6,ka as V0,la as G6,ma as r0,t as AZ,u as GJ,v as J6,w as Z6,x as G,y as h,z as UJ}from"./ItemToolBar-3zrc4p3d.js";import{ContextProvider as O9}from"@pie-players/pie-context";function j0(D,L,M,H){if(typeof D?.reportToolFailure==="function"){D.reportToolFailure(L,M,H);return}console.error(`[${L}] ${M} failed:`,H)}function K0(D){return typeof D.href==="string"}function c0(D){if(!D||typeof D!=="object"||Array.isArray(D))return!1;let L=D;if(typeof L.id!=="string"||L.id.trim().length===0)return!1;if(typeof L.label!=="string"||L.label.trim().length===0)return!1;if(L.ariaLabel!==void 0&&typeof L.ariaLabel!=="string")return!1;if(L.icon!==void 0&&typeof L.icon!=="string")return!1;if(L.tooltip!==void 0&&typeof L.tooltip!=="string")return!1;if(L.active!==void 0&&typeof L.active!=="boolean")return!1;if(L.disabled!==void 0&&typeof L.disabled!=="boolean")return!1;let M=typeof L.href==="string",H=typeof L.onClick==="function";return M!==H}function a0(D){return typeof D==="string"&&D.trimStart().startsWith("<svg")}function i0(D){return typeof D==="string"&&D.trimStart().startsWith("http")}import{sanitizeSvgIcon as o0}from"@pie-players/pie-players-shared/security";import{resolveInterfaceI18n as G9}from"@pie-players/pie-players-shared/i18n/provider";import{collectFocusable as N9,createFocusTrap as F9,createPointerGesture as P9,FOCUSABLE_SELECTOR as W9,isProgrammaticFocusTarget as M9}from"@pie-players/pie-players-shared";var Z9={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 s0(D){return Z9[D]||null}import{runtimeElementTags as j9}from"@pie-players/pie-players-shared/pie";import{parseVersionedTagName as K9}from"@pie-players/pie-players-shared/pie/tag-names";function X9(D){return D.level==="item"}function Q9(D){return D.level==="passage"}function U9(D){return D.level==="element"}function X0(D){if(Array.isArray(D))return D;if(D&&typeof D==="object")return Object.values(D);return[]}function V9(D,L){return X0(D).find((M)=>!!M&&typeof M==="object"&&M.id===L)}function Y9(D,L){if(!L||typeof L!=="object")return;let M=L,H=M[D]??M[K9(D).baseName];return typeof H==="string"&&H?H:void 0}function L9(D){let L;try{L=D.pieSupports}catch{return}if(!Array.isArray(L))return;return L.filter((M)=>typeof M==="string")}function q9(D,L){if(!D||typeof D!=="object")return null;let{id:M,element:H}=D;if(typeof H!=="string"||!H)return null;let p=Y9(H,L),FJ=j9(H,p),$J=typeof customElements>"u"?void 0:customElements;for(let IJ of FJ){let pJ=$J?.get(IJ);if(pJ)return{elementId:typeof M==="string"?M:void 0,tag:H,packageSpec:p,supports:L9(pJ),pendingTags:[]}}return{elementId:typeof M==="string"?M:void 0,tag:H,packageSpec:p,supports:void 0,pendingTags:$J?FJ:[]}}function d0(D){let L,M;if(U9(D))L=D.item.config,M=[V9(L?.models,D.elementId)];else if(X9(D))L=D.item?.config,M=X0(L?.models);else if(Q9(D))L=D.passage?.config,M=X0(L?.models);else return[];return M.flatMap((H)=>{let p=q9(H,L?.elements);return p?[p]:[]})}function l0(){let D=null;return(L,M)=>{if(!L)return D=null,null;let H=L.visibleTools.map((p)=>({toolId:p.toolId,required:p.required,alwaysAvailable:p.alwaysAvailable,activateAtInit:p.activateAtInit,parameters:p.parameters}));if(D?.renderVersion===M&&r0(D.tools,H))return D.tools;return D={renderVersion:M,tools:H},H}}import"@pie-players/pie-players-shared/nds-icon-button";var D9=(D,L)=>{if(customElements.get(D))return;try{customElements.define(D,L)}catch(M){if(!(M instanceof DOMException&&M.name==="NotSupportedError"||M&&typeof M==="object"&&M.name==="NotSupportedError")||!customElements.get(D))throw M}},n0=(D,L=AZ)=>{var M=xJ(),H=yJ(M);{var p=(n)=>{var jJ=t0();Q0(jJ,()=>o0(L()),!0),GJ(jJ),y(n,jJ)},FJ=G(()=>a0(L())),$J=(n)=>{var jJ=R9();o(()=>l(jJ,"src",L())),y(n,jJ)},IJ=G(()=>i0(L())),pJ=(n)=>{let jJ=G(()=>s0(L()));var iJ=xJ(),vJ=yJ(iJ);{var qZ=(PJ)=>{var WJ=t0();Q0(WJ,()=>o0(J(jJ)),!0),GJ(WJ),y(PJ,WJ)},SZ=(PJ)=>{var WJ=k9();o(()=>OJ(WJ,1,`icon icon-${L()}`,"svelte-1c13522")),y(PJ,WJ)};NJ(vJ,(PJ)=>{if(J(jJ))PJ(qZ);else PJ(SZ,-1)})}y(n,iJ)};NJ(H,(n)=>{if(J(FJ))n(p);else if(J(IJ))n($J,1);else n(pJ,-1)})}y(D,M)},t0=LJ('<span aria-hidden="true"></span>'),R9=LJ('<img class="item-toolbar__icon-image svelte-1c13522" alt=""/>'),k9=LJ('<i aria-hidden="true"></i>'),e0=LJ("<span></span>"),z9=LJ('<span class="item-toolbar__nds-button-zoom svelte-1c13522"><nds-icon-button></nds-icon-button></span>',2),H9=LJ("<a><!></a>"),w9=LJ('<button type="button"><!></button>'),B9=LJ("<div></div>"),I9=LJ('<div><div class="item-toolbar__tools-row svelte-1c13522"><!> <!> <!></div> <!></div>'),T9={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 P6(D,L){J6(L,!0),Q6(D,T9);let M=(Z,K=AZ,j=AZ)=>{var Q=xJ(),N=yJ(Q);{var k=(P)=>{var S=xJ(),z=yJ(S);X6(z,()=>J(PZ),(O)=>{var e=e0();LZ(e,(JJ,s)=>u6?.(JJ,s),()=>({mounted:K(),active:J(aZ)[K().toolId]??!1,runtime:J(B),i18n:J(L0)})),o(()=>OJ(e,1,U0(j()),"svelte-1c13522")),y(O,e)}),y(P,S)},q=(P)=>{var S=e0();LZ(S,(z,O)=>h6?.(z,O),()=>K().entry),o(()=>OJ(S,1,U0(j()),"svelte-1c13522")),y(P,S)};NJ(N,(P)=>{if(K().entry.shell)P(k);else P(q,-1)})}y(Z,Q)},H=typeof window<"u",p="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css",FJ=/font.?awesome|fa-?pro/i,$J=/fontawesome-free/i,IJ=()=>Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')),pJ=()=>IJ().some((Z)=>FJ.test(Z.href)&&!$J.test(Z.href)),n=(Z,K)=>{let j=pJ()?K:"fa-solid";if(j==="fa-light")return()=>{};let Q=()=>{for(let k of Z.querySelectorAll("i.fa-light"))k.classList.remove("fa-light"),k.classList.add(j)};Q();let N=new MutationObserver(Q);return N.observe(Z,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),()=>N.disconnect()},jJ=(Z)=>{if(document.querySelector(`link[href="${Z}"]`))return;let K=document.createElement("link");K.rel="stylesheet",K.href=Z,K.addEventListener("error",()=>{K.dataset.pieLoadFailed=""},{once:!0}),document.head.appendChild(K)},iJ=!1,vJ=()=>{if(!H||iJ)return;if(iJ=!0,IJ().some((K)=>FJ.test(K.href)))return;jJ(p)},qZ="__pieFaToolbarShadowInstalled",SZ=(Z)=>{let K=Z.getRootNode();if(!(K instanceof ShadowRoot))return;let j=K;if(j[qZ])return;j[qZ]=!0;let Q=new Set,N=(q)=>{if(!q||Q.has(q))return;Q.add(q);let P=document.createElement("link");P.rel="stylesheet",P.href=q,K.appendChild(P)},k=IJ().filter((q)=>FJ.test(q.href));for(let q of k){if("pieLoadFailed"in q.dataset)continue;if(q.sheet){N(q.href);continue}let P=(S)=>{if(q.removeEventListener("load",P),q.removeEventListener("error",P),S.type==="load")N(q.href)};q.addEventListener("load",P),q.addEventListener("error",P)}},PJ=(Z)=>{return vJ(),SZ(Z),{destroy:n(Z,"fa-light")}},WJ=(Z,K)=>{let j=K,Q=()=>{let k=Z.querySelector("button");if(k)k.setAttribute("aria-pressed",j?"true":"false")};Q();let N=new MutationObserver(Q);return N.observe(Z,{childList:!0,subtree:!0}),{update(k){j=k,Q()},destroy(){N.disconnect()}}},Y0=(Z)=>Z.faIconName||null,W6=new N6,TJ=UJ(j6({})),EJ=u(L,"level",7,"item"),DZ=u(L,"scopeId",7,""),_Z=u(L,"itemId",7,""),CZ=u(L,"sectionId",7,""),fZ=u(L,"catalogId",7,""),bZ=u(L,"tools",7,""),yZ=u(L,"contentKind",7,"assessment-item"),MJ=u(L,"position",7,"bottom"),OZ=u(L,"scopeElement",7,null),GZ=u(L,"toolRegistry",7,null),xZ=u(L,"item",7,null),NZ=u(L,"hostButtons",23,()=>[]),$Z=u(L,"class",7,""),FZ=u(L,"size",7,"md"),pZ=u(L,"language",7,""),KJ=UJ(null),B=UJ(null),PZ=G(()=>J(B)?.ndsIcons===!0),L0=G(()=>G9(J(B))),M6=G(()=>pZ()||J(B)?.contentLanguage||void 0),gJ=UJ(null),sJ=UJ(0),dJ=UJ(0),vZ=UJ(0),EZ=UJ(0),gZ=UJ(0);$(()=>{if(!J(KJ))return;return L6(J(KJ),(Z)=>{r(B,Z,!0)})}),$(()=>{if(!J(KJ))return;return q6(J(KJ),(Z)=>{r(gJ,Z,!0)})}),$(()=>{let Z=J(B)?.toolkitCoordinator;if(!Z||typeof Z.onPolicyChange!=="function")return;let K=Z.onPolicyChange((j)=>{if(r(dJ,J(dJ)+1),j?.reason!=="item-settings")r(vZ,J(vZ)+1)});return()=>{try{K?.()}catch{}}}),$(()=>{let Z=J(B)?.toolkitCoordinator;if(!Z||typeof Z.onToolContextResolverChange!=="function")return;let K=Z.onToolContextResolverChange(()=>{r(EZ,J(EZ)+1)});return()=>{try{K?.()}catch{}}});let t=G(()=>J(B)?.toolCoordinator),R6=G(()=>J(B)?.ttsService),mZ=G(()=>J(B)?.elementToolStateStore),q0=G(()=>J(B)?.assessmentId??""),WZ=G(()=>_Z()||J(gJ)?.itemId||""),AJ=G(()=>J(gJ)?.canonicalItemId||J(WZ)),rJ=G(()=>CZ()||J(B)?.sectionId||""),lJ=G(()=>yZ()||J(gJ)?.contentKind||(EJ()==="section"?"section":"assessment-item")),A=G(()=>{if(EJ()&&EJ()!=="item")return EJ();if(J(lJ)==="rubric-block-stimulus")return"passage";return"item"}),RJ=G(()=>{if(DZ())return DZ();if(J(A)==="section")return J(rJ)||J(B)?.sectionId||"default-section";if(J(A)==="assessment")return J(B)?.assessmentId||"default-assessment";return J(AJ)||J(WZ)||"default-item"}),k6=G(()=>fZ()||J(RJ)),qJ=G(()=>xZ()||J(gJ)?.item||null),v=G(()=>{if(GZ())return GZ();return J(dJ),J(B)?.toolkitCoordinator?.getToolRegistry?.()||W6}),z6=G(()=>F6(bZ())),H6=G(()=>J(v).normalizeToolIds(J(z6)).filter(Boolean)),D0=G(()=>{if(J(A)==="section")return"section";if(J(A)==="passage"||J(lJ)==="rubric-block-stimulus")return"passage";return"item"}),O0=G(()=>{J(dJ);let Z=J(B)?.toolkitCoordinator;if(!Z||typeof Z.decideToolPolicy!=="function")return null;return Z.decideToolPolicy({level:J(D0),scope:{level:J(A),scopeId:J(RJ),assessmentId:J(B)?.assessmentId,sectionId:J(rJ)||void 0,itemId:J(WZ)||void 0,canonicalItemId:J(AJ)||void 0,contentKind:J(lJ)}})}),w6=l0(),oJ=G(()=>w6(J(O0),J(vZ))),nJ=G(()=>{let Z=(K)=>Array.from(new Set(K));if(J(oJ))return Z(J(v).normalizeToolIds(J(oJ).map((K)=>K.toolId)).filter(Boolean));return Z(J(H6))});$(()=>{if(!J(O0)||J(nJ).length===0)return;if(J(v).getAllTools().length>0)return;let Z=J(KJ)?.ownerDocument,K=J(nJ).join(", "),j=setTimeout(()=>{G6(Z,"toolbarWithoutRegistry",`[pie-item-toolbar] Policy places ${K} on this toolbar, but its tool registry is still empty after ${V0/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.`)},V0);return()=>clearTimeout(j)});let hZ=G(()=>{if(J(A)==="section"||J(A)==="assessment")return!0;let Z=J(qJ)?.config;return!!(J(qJ)&&Z&&typeof Z==="object")}),B6=G(()=>{J(dJ);let Z=J(B)?.toolkitCoordinator;if(!Z||typeof Z.getPolicyInputs!=="function")return null;return Z.getPolicyInputs()}),mJ=G(()=>J(B6)?.assessment??null),MZ=G(()=>({id:J(AJ)})),hJ=G(()=>{if(J(A)==="section")return{level:"section",assessment:J(mJ)||{},section:{}};if(J(A)==="assessment")return{level:"assessment",assessment:J(mJ)||{}};if(!J(hZ)||!J(qJ))return null;if(J(A)==="passage")return{level:"passage",assessment:J(mJ)||{},itemRef:J(MZ),passage:J(qJ)};return{level:"item",assessment:J(mJ)||{},itemRef:J(MZ),item:J(qJ)}}),G0=G(()=>{if(J(hJ))return J(hJ);return{level:"item",assessment:J(mJ)||{},itemRef:J(MZ),item:J(qJ)||{id:J(AJ),config:{}}}}),N0=G(()=>{if(J(A)!=="item"&&J(A)!=="passage")return[];if(!J(hZ)||!J(qJ))return[];let Z=J(qJ)?.config?.models;return(Array.isArray(Z)?Z:Z&&typeof Z==="object"?Object.values(Z):[]).filter((j)=>j&&typeof j==="object"&&typeof j.id==="string").map((j)=>({level:"element",assessment:J(mJ)||{},itemRef:J(MZ),item:J(qJ),elementId:j.id}))});function RZ(Z){return D6(Z,J(A),J(RJ))}let SJ=null;function F0(Z,K){if(SJ?.coordinator===Z)SJ.ids.add(K)}function uZ(Z,K){let j=RZ(K);if(!Z.getToolState(j))Z.registerTool(j,K);return F0(Z,j),j}$(()=>{let Z=J(t);if(J(A),J(RJ),!Z)return;let K={coordinator:Z,ids:new Set,activated:new Set};return SJ=K,()=>{if(SJ===K)SJ=null;for(let j of K.ids)Z.releaseTool(j)}});function I6(Z){if(!J(mZ)||!J(q0)||!J(rJ)||!J(AJ))return null;return J(mZ).getGlobalElementId({assessmentId:J(q0),sectionId:J(rJ),attemptId:J(B)?.attemptId??"",itemId:J(AJ),elementId:Z})}function T6(){if(OZ())return OZ();return J(gJ)?.scopeElement||null}function P0(){let Z=J(t)||null;return{scope:{level:J(A),scopeId:J(RJ),assessmentId:J(B)?.assessmentId,sectionId:J(rJ),itemId:J(WZ),canonicalItemId:J(AJ),contentKind:J(lJ)},itemId:J(RJ),catalogId:J(k6),language:J(M6),i18n:J(L0),ui:{size:FZ()},getScopeElement:T6,getGlobalElementId:I6,toolCoordinator:Z,toolkitCoordinator:J(B)?.toolkitCoordinator||null,ttsService:J(R6)||null,elementToolStateStore:J(mZ)||null,toggleTool:(K)=>{if(!Z)return;Z.toggleTool(uZ(Z,K))},isToolVisible:(K)=>Z?.isToolVisible(RZ(K))??!1,subscribeVisibility:Z?(K)=>Z.subscribe(K):null}}let A6=G(P0),cZ=G(()=>{J(EZ);let Z=J(B)?.toolkitCoordinator;if(!Z||typeof Z.hasToolContextResolver!=="function"||typeof Z.resolveToolContext!=="function")return{};let K={};for(let j of J(nJ)){if(!J(v).get(j)?.supportedLevels.includes(J(A)))continue;if(!Z.hasToolContextResolver(j))continue;let N=Z.resolveToolContext({toolId:j,context:J(G0),toolbarContext:J(A6)});if(N)K[j]=N}return K}),S6=G(()=>{J(gZ);let Z=J(cZ),K=(J(oJ)??J(nJ).map((k)=>({toolId:k,required:!1,alwaysAvailable:!1,activateAtInit:!1}))).filter((k)=>!Z[J(v).normalizeToolId(k.toolId)]),j=!J(hZ)?[]:J(hJ)?[J(hJ),...J(N0)]:J(N0),Q=(k,q,P)=>j0(J(B)?.toolkitCoordinator,k,q,P),N=new Set(J(v).filterDecidedToolIds(K,J(A),j,Q));return J(nJ).filter((k)=>N.has(k)||Z[k]?.visible)});$(()=>{if(!H||!J(hJ)||typeof customElements>"u")return;let Z=new Set(d0(J(hJ)).flatMap((j)=>j.pendingTags));if(Z.size===0)return;let K=!1;for(let j of Z)customElements.whenDefined(j).then(()=>{if(!K)r(gZ,J(gZ)+1)},()=>{});return()=>{K=!0}});let tJ=UJ(null),eJ=G(()=>{let Z=J(tJ)?.registry===J(v)?J(tJ).toolIds:null,K=J(v).filterToolIdsByActivation(J(S6),"toolbar-toggle");return Z?K.filter((j)=>!Z.has(j)):K});$(()=>{if(!H)return;let Z=J(v),K=!1;return Z.ensureToolModulesLoaded(J(eJ)).then((j)=>{if(j.size>0){let Q=J(tJ)?.registry===Z?J(tJ).toolIds:[];r(tJ,{registry:Z,toolIds:new Set([...Q,...j.keys()])},!0);for(let[N,k]of j)j0(J(B)?.toolkitCoordinator,N,"tool-module-load",k)}if(!K)r(sJ,J(sJ)+1)}),()=>{K=!0}});let _6=G(()=>{let Z=new Map;for(let K of J(oJ)??[]){if(!K.parameters)continue;let[j]=J(v).normalizeToolIds([K.toolId]);if(j)Z.set(j,K.parameters)}return Z}),_J=G(()=>{let Z=J(_6);return{...P0(),getResolvedToolContext:(K)=>J(cZ)[K]??null,getToolParameters:(K)=>Z.get(J(v).normalizeToolId(K))??null,getToolRenderParams:(K)=>{let j=J(cZ)[K]?.params??null,Q=W0.get(K);if(!Q)return j;return{...j??{},...Q}}}}),W0=new Map,M0=0,XJ=G(()=>{if(!H)return[];J(sJ);let Z=[];for(let K of J(eJ)){let j=J(v).renderForToolbar(K,J(G0),J(_J));if(j)Z.push(j)}return Z});$(()=>{let Z=J(t);if(!Z)return;for(let K of J(XJ))F0(Z,RZ(K.toolId))});let C6=G(()=>new Set(J(v).normalizeToolIds((J(oJ)??[]).filter((Z)=>Z.activateAtInit).map((Z)=>Z.toolId))));$(()=>{let Z=J(t),K=J(C6);J(A),J(RJ);let j=SJ;if(!Z||K.size===0||j?.coordinator!==Z)return;let Q=J(XJ).filter((N)=>N.button&&K.has(N.toolId)).map((N)=>N.toolId).filter((N)=>!j.activated.has(N));if(Q.length===0)return;for(let N of Q)j.activated.add(N);queueMicrotask(()=>{if(SJ!==j)return;for(let N of Q)Z.showTool(uZ(Z,N));CJ()})});let f6=G(()=>{if(!Array.isArray(NZ()))return[];let Z=[];return NZ().forEach((K,j)=>{if(c0(K)){Z.push(K);return}console.warn(`[ItemToolBar] Ignoring invalid host button at index ${j}. Expected { id, label, href | onClick } with valid types.`)}),Z}),b6=G(()=>J(XJ).filter((Z)=>!!Z.button).map((Z)=>{let K=Z.button;return{id:Z.toolId,label:K.label,ariaLabel:K.ariaLabel||K.label,icon:K.icon,faIconName:K.faIconName,tooltip:K.tooltip||K.label,disabled:K.disabled,active:J(TJ)[Z.toolId]??K.active??!1,onClick:()=>{K.onClick(),CJ()}}})),R0=G(()=>[...J(b6),...J(f6)]),aZ=G(()=>{let Z={};for(let K of J(XJ))Z[K.toolId]=J(TJ)[K.toolId]??K.button?.active??!1;return Z}),iZ=(Z,K,j)=>Z.flatMap((Q)=>(Q.elements||[]).filter((N)=>N.mount===K).filter((N)=>Boolean(N.element)).map((N,k)=>({key:`${j}-${Q.toolId}-${k}`,toolId:Q.toolId,entry:N}))),y6=G(()=>iZ(J(XJ),"before-buttons","before")),x6=G(()=>iZ(J(XJ),"after-buttons","after")),k0=G(()=>iZ(J(XJ),"controls-row","controls-row")),z0=G(()=>J(XJ).flatMap((Z)=>(Z.elements||[]).map((K)=>({toolId:Z.toolId,hint:K.layoutHints?.controlsRow})).filter((K)=>Boolean(K.hint)))),H0=G(()=>J(XJ).flatMap((Z)=>(Z.elements||[]).map((K)=>({toolId:Z.toolId,hint:K.layoutHints?.headerOverlay})).filter((K)=>Boolean(K.hint)))),w0=G(()=>J(z0).some((Z)=>Z.hint?.reserveSpace===!0)),B0=G(()=>J(z0).some((Z)=>Z.hint?.showWhenToolActive===!0&&(J(aZ)[Z.toolId]??!1))),$6=G(()=>MJ()==="left"||MJ()==="right"),I0=G(()=>J(H0).some((Z)=>Z.hint?.showWhenToolActive===!0&&(J(aZ)[Z.toolId]??!1))),p6=G(()=>J(k0).length>0||J(w0)||J(B0));function v6(){if(!J(KJ))return null;let Z=J(KJ).getRootNode();if(Z instanceof ShadowRoot)return Z.host;return null}$(()=>{let Z=v6();if(!Z)return;let K=J(H0).length>0,j=J(I0);return Z.setAttribute("data-pie-header-overlay",K?"true":"false"),Z.setAttribute("data-pie-header-overlay-active",j?"true":"false"),()=>{Z.removeAttribute("data-pie-header-overlay"),Z.removeAttribute("data-pie-header-overlay-active")}}),$(()=>{if(!H||!J(PZ))return;if(J(R0).some((Z)=>!!Y0(Z)))vJ()});function kZ(Z){if(Z.id in J(TJ))return J(TJ)[Z.id]===!0;return Z.active===!0}function CJ(){let Z={};for(let K of J(XJ))if(K.sync?.(),K.button)Z[K.toolId]=K.button.active??!1;r(TJ,Z,!0)}$(()=>{let Z=[];CJ();for(let K of J(XJ))if(K.subscribeActive){let j=!1,Q=K.subscribeActive((N)=>{queueMicrotask(()=>{if(j)return;r(TJ,{...J(TJ),[K.toolId]:N},!0),K.sync?.()})});Z.push(()=>{j=!0,Q()})}return()=>{Z.forEach((K)=>K())}}),$(()=>{let Z=J(B)?.toolkitCoordinator;if(typeof Z?.registerToolRequestTarget!=="function")return;let K=J(D0);return Z.registerToolRequestTarget({level:K,get scopeId(){return J(RJ)},hostsTool:(j)=>J(eJ).includes(j),open:(j,Q)=>{if(!J(t))return;if(!J(eJ).includes(j))return;if(Q&&Object.keys(Q).length>0)M0+=1,W0.set(j,{...Q,toolRequestId:M0});let N=uZ(J(t),j);J(t).showTool(N),queueMicrotask(()=>CJ())}})}),$(()=>{if(!J(_J).subscribeVisibility)return;let Z=!1,K=J(_J).subscribeVisibility(()=>{queueMicrotask(()=>{if(Z)return;CJ()})});return()=>{Z=!0,K?.()}}),$(()=>{let Z=J(_J).toolkitCoordinator;if(typeof Z?.subscribeTelemetry!=="function")return;let K=!1,j=Z.subscribeTelemetry(({eventName:Q,payload:N})=>{if(Q!=="pie-toolkit-tool-config-updated")return;if(N?.toolId&&!J(eJ).includes(N.toolId))return;queueMicrotask(()=>{if(K)return;r(sJ,J(sJ)+1),CJ()})});return()=>{K=!0,j?.()}});let E6="[data-pie-tool-overlay-boundary]";function g6(Z,K){if(K.container!=="content-boundary")return Z;let j=Z;while(j){if(j instanceof HTMLElement&&j.matches(E6))return j;if(j instanceof HTMLElement&&j.parentElement){j=j.parentElement;continue}let Q=j.getRootNode();j=Q instanceof ShadowRoot?Q.host:null}return Z}let m6="__pieToolElementUnmount";function sZ(Z){if(!Z)return;let K=Z[m6];if(typeof K==="function")K()}function h6(Z,K){let j=K,Q=null,N=Z,k=(q)=>{if(Q===q)return;if(Q){if(sZ(Q),Q.parentNode===N)N.removeChild(Q)}if(Q=q,Q){if(N=g6(Z,j),Q.parentNode&&Q.parentNode!==N)Q.parentNode.removeChild(Q);N.appendChild(Q)}};return k(K.element),{update(q){j=q,k(q.element)},destroy(){k(null)}}}let T0=720,A0=560,S0=320,dZ=240,kJ=24,zJ=40;function u6(Z,K){let j=K,Q=null,N=null,k=[],q=null,P=null,S=null,z=null,O=null,e=null,JJ=null,s=!1,DJ=!1,JZ=()=>j.mounted.entry.shell?.pageTabOrder===!0,VJ=()=>j.mounted.entry.shell?.ndsHeaderControls===!0,T=null,fJ=null,ZZ=P9({onMove:(X)=>J9(X),onEnd:()=>{fJ=null}}),ZJ=0,w=0,I=0,x=0,HJ=0,C=0,jZ=0,rZ=0,KZ=null,lZ=[],E=0,g=0,f=j.mounted.entry.shell?.initialWidth??T0,b=j.mounted.entry.shell?.initialHeight??A0,C0=f,f0=b,XZ=!1,uJ=null,YJ=null,zZ=!1,oZ=()=>{let X=j.mounted.entry.shell;if(!X)return null;return{toolId:j.mounted.toolId,toolbarContext:J(_J),shellConfig:X}},s6=(X)=>{let V=J(v).get(j.mounted.toolId),F=oZ();if(!V?.onHostedMount||!F)return;V.onHostedMount(X,F)},HZ=()=>{let X=J(v).get(j.mounted.toolId),V=oZ();if(!X?.onHostedResize||!V)return;X.onHostedResize({width:f,height:b},j.mounted.entry.element,V)},d6=()=>{let X=J(v).get(j.mounted.toolId),V=oZ();if(!X?.onHostedUnmount||!V)return;X.onHostedUnmount(j.mounted.entry.element,V)},i=(X,V,F)=>Math.max(V,Math.min(X,F)),bJ=(X)=>{try{X.focus()}catch{}},r6=()=>{let X=j.mounted.entry.shell,V=X?.minWidth??S0,F=X?.minHeight??dZ,Y=X?.maxWidth??window.innerWidth,U=X?.maxHeight??window.innerHeight;return{minWidth:V,minHeight:F,maxWidth:Y,maxHeight:U}},nZ=()=>{let X=j.mounted.entry.shell?.minWidth,V=typeof X==="number"&&X>0&&f<X,F=V?`${X}px`:"";if(T)T.style.minWidth=F;if(q)q.style.minWidth="0";if(P)P.style.minWidth="0",P.style.overflowX=V?"auto":"hidden"},b0=()=>j.mounted.entry.shell?.content?.overflowY==="auto"?"auto":"hidden",l6=()=>{if(!q)return 0;let X=q.getBoundingClientRect().height;if(X>0)return X;return q.offsetHeight||0},tZ=()=>{if(!P)return;let X=j.mounted.entry.shell;if(P.style.overflowY=b0(),!T)return;if(X?.content?.preserveMinHeight===!0){let V=l6(),F=X.minHeight??dZ,Y=Math.max(0,F-V),U=Math.max(0,b-V),W=Math.max(U,Y);T.style.height=`${W}px`,T.style.minHeight="0",T.style.flex=`0 0 ${W}px`;return}T.style.height="100%",T.style.minHeight="0",T.style.flex="1 1 auto"},o6=()=>{let X=j.mounted.entry.shell,V=X?.initialWidth??T0,F=X?.initialHeight??A0;if(V===C0&&F===f0)return;if(C0=V,f0=F,XZ)return;f=V,b=F,IZ()},wZ=()=>{let{minWidth:X,minHeight:V,maxWidth:F,maxHeight:Y}=r6(),U=Math.min(X,window.innerWidth),W=Math.min(V,window.innerHeight);f=i(f,U,Math.max(U,Math.min(F,window.innerWidth))),b=i(b,W,Math.max(W,Math.min(Y,window.innerHeight))),E=i(E,0,Math.max(0,window.innerWidth-f)),g=i(g,0,Math.max(0,window.innerHeight-b)),QZ(),nZ(),tZ(),HZ()},wJ=(X,V)=>{XZ=!0,E+=X,g+=V,wZ()},BZ=(X,V)=>{XZ=!0,f+=X,b+=V,wZ()},y0=(X,V,F,Y="fa-regular")=>{vJ();let U=document.createElement("nds-icon-button");return U.setAttribute("variant","tertiary"),U.setAttribute("size","small"),U.setAttribute("type","circle"),U.setAttribute("icon-name",V),U.setAttribute("button-aria-label",X),U.title=X,U.addEventListener("click",(W)=>{W.stopPropagation(),F(),cJ()}),n(U,Y),U},x0=(X,V,F)=>{let Y=document.createElement("button");return Y.type="button",Y.className="pie-tool-shell__control",Y.setAttribute("aria-label",X),Y.title=X,Y.textContent=V,Y.style.border="1px solid transparent",Y.style.background="color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)",Y.style.color="inherit",Y.style.cursor="pointer",Y.style.display="inline-flex",Y.style.alignItems="center",Y.style.justifyContent="center",Y.style.width="28px",Y.style.height="28px",Y.style.padding="0",Y.style.fontSize="14px",Y.style.fontWeight="700",Y.style.borderRadius="8px",Y.style.lineHeight="1",Y.onclick=(U)=>{U.stopPropagation(),F(),cJ()},Y.onfocus=()=>{Y.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",Y.style.outlineOffset="2px"},Y.onblur=()=>{Y.style.outline="none",Y.style.outlineOffset="0"},Y},QZ=()=>{if(!Q)return;Q.style.left=`${E}px`,Q.style.top=`${g}px`,Q.style.width=`${f}px`,Q.style.height=`${b}px`,Q.style.display=j.active?"flex":"none"},$0=()=>{if(S)S.textContent=j.mounted.entry.shell?.title||j.mounted.toolId;for(let{el:X,key:V}of k){let F=j.i18n.t(V);if(X.tagName==="NDS-ICON-BUTTON")X.setAttribute("button-aria-label",F);else X.setAttribute("aria-label",F);if(X.title)X.title=F}},p0=()=>{if(!P)return;let X=j.mounted.entry.element;if(X.style.display="block",X.style.width="100%",X.style.height="100%",X.style.flex="1 1 auto",X.style.minHeight="0",T&&T!==X){if(T.parentNode===P)sZ(T),P.removeChild(T);T=null}if(X.parentNode&&X.parentNode!==P)X.parentNode.removeChild(X);if(X.parentNode!==P)P.appendChild(X);T=X,nZ(),tZ(),s6(X)},cJ=()=>{if(J(t)&&Q)J(t).bringToFront(Q)},v0=()=>{if(!Q||!J(t)||!j.active)return;let X=RZ(j.mounted.toolId);if(J(t).getToolState(X)?.element===Q)return;J(t).updateToolElement(X,Q)},IZ=()=>{let{innerWidth:X,innerHeight:V}=window,F=j.mounted.entry.shell,Y=F?.initialAlign??"center",U=F?.initialMargin??16,W=U+60;switch(Y){case"top-left":E=U,g=W;break;case"top-right":E=Math.max(0,X-f-U),g=W;break;case"bottom-left":E=U,g=Math.max(0,V-b-W);break;case"bottom-right":E=Math.max(0,X-f-U),g=Math.max(0,V-b-W);break;default:E=Math.max(0,Math.round((X-f)/2)),g=Math.max(0,Math.round((V-b)/2))}wZ()},n6=()=>{let X=YJ;if(!X)return;queueMicrotask(()=>{if(!X.isConnected)return;bJ(X)})},E0=()=>{if(typeof document>"u")return null;let X=document.activeElement;while(X){let V=X.shadowRoot;if(V&&V.activeElement&&V.activeElement!==X)X=V.activeElement;else break}return X??null},g0=()=>{if(!Q||uJ)return;let X=E0();if(!YJ&&X&&!Q.contains(X))YJ=X;if(JZ()&&!DJ)document.addEventListener("keydown",J0,!0),DJ=!0;uJ=F9(Q,{initialFocus:O,onEscape:()=>{Z0()},wrap:!JZ(),onTabExit:JZ()?(V,F)=>{if(V==="backward"){if(YJ?.isConnected)F.preventDefault(),bJ(YJ);return}let Y=eZ();if(Y)F.preventDefault(),bJ(Y)}:void 0})},eZ=()=>{let X=J(_J).getScopeElement?.()??null;if(!X)return null;let V=(Y)=>{if(J(KJ)&&J(KJ).contains(Y))return!0;if(Q&&Q.contains(Y))return!0;return!1},F=(Y)=>{if(Y instanceof HTMLElement){if(V(Y))return null;if(Y.matches?.(W9)&&M9(Y))return Y}let U=Y.shadowRoot;if(U)for(let W=0;W<U.children.length;W++){let R=F(U.children[W]);if(R)return R}for(let W=0;W<Y.children.length;W++){let R=F(Y.children[W]);if(R)return R}return null};return F(X)},t6=()=>{if(!Q)return[];return N9(Q).filter((X)=>X!==e&&X!==JJ)},J0=(X)=>{if(X.key!=="Tab")return;if(!Q||!j.active)return;let V=E0();if(!V)return;if(Q.contains(V))return;let F=t6();if(F.length===0)return;if(X.shiftKey){let Y=eZ();if(V!==Y)return;X.preventDefault(),bJ(F[F.length-1]);return}if(V!==YJ)return;X.preventDefault(),bJ(F[0])},m0=()=>{if(DJ)document.removeEventListener("keydown",J0,!0),DJ=!1;if(!uJ)return;let X=uJ;uJ=null;try{X()}catch{}n6()},Z0=()=>{J(_J).toggleTool(j.mounted.toolId),CJ()},h0=(X)=>{if(!j.mounted.entry.shell?.draggable)return;if(X.target.closest("button")||!Q)return;if(!ZZ.begin(X,Q))return;fJ="drag",XZ=!0,ZJ=X.clientX-E,w=X.clientY-g,Q.setPointerCapture(X.pointerId),cJ()},e6=(X)=>(V)=>{if(!Q||!j.mounted.entry.shell?.resizable)return;if(V.stopPropagation(),!ZZ.begin(V,Q))return;fJ="resize",XZ=!0,KZ=X,I=f,x=b,HJ=V.clientX,C=V.clientY,jZ=E,rZ=g,Q.setPointerCapture(V.pointerId),cJ()},J9=(X)=>{if(!Q)return;if(fJ==="drag"){X.preventDefault();let V=Math.max(0,window.innerWidth-f),F=Math.max(0,window.innerHeight-b);E=i(X.clientX-ZJ,0,V),g=i(X.clientY-w,0,F),QZ();return}if(fJ==="resize"){X.preventDefault();let V=j.mounted.entry.shell,F=V?.minWidth??S0,Y=V?.minHeight??dZ,U=Math.min(F,window.innerWidth),W=Math.min(Y,window.innerHeight),R=V?.maxWidth??window.innerWidth,m=V?.maxHeight??window.innerHeight,c=X.clientX-HJ,d=X.clientY-C;if(KZ==="se")f=i(I+c,U,Math.max(U,Math.min(R,window.innerWidth-E))),b=i(x+d,W,Math.max(W,Math.min(m,window.innerHeight-g)));else if(KZ==="sw"){let a=jZ+I,QJ=i(I-c,U,Math.min(R,a));E=a-QJ,f=QJ,b=i(x+d,W,Math.max(W,Math.min(m,window.innerHeight-g)))}else if(KZ==="ne"){let a=rZ+x;f=i(I+c,U,Math.max(U,Math.min(R,window.innerWidth-E)));let QJ=i(x-d,W,Math.min(m,a));g=a-QJ,b=QJ}else if(KZ==="nw"){let a=jZ+I,QJ=rZ+x,_=i(I-c,U,Math.min(R,a));E=a-_,f=_;let UZ=i(x-d,W,Math.min(m,QJ));g=QJ-UZ,b=UZ}QZ(),nZ(),tZ(),HZ()}},u0=()=>{wZ()};if(H&&j.mounted.entry.shell){let X=VJ()&&J(PZ);if(X)vJ();if(Q=document.createElement("div"),Q.className="pie-tool-shell",Q.setAttribute("data-pie-tool-shell",j.mounted.toolId),Q.style.position="fixed",Q.style.zIndex=String(O6.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=j.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",(U)=>U.preventDefault()),q=document.createElement("div"),q.className="pie-tool-shell__header",q.style.display="flex",q.style.flexWrap="wrap",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.gap="6px",q.style.padding=VJ()?"12px 12px 12px 28px":"10px 12px",VJ())q.style.minHeight="48px",q.style.background="var(--pie-section-player-card-header-background, var(--pie-button-active-bg, #f3f4f6))",q.style.color="var(--pie-text, #111827)",q.style.borderBottom="1px solid var(--pie-border-light, #e5e7eb)";else q.style.background="var(--pie-primary-dark, #2c3e50)",q.style.color="var(--pie-white, #fff)";q.style.cursor=j.mounted.entry.shell.draggable===!1?"default":"move",q.style.flex="0 0 auto",q.style.borderRadius="12px 12px 0 0",q.style.overflow="hidden",q.style.userSelect="none",q.style.webkitUserSelect="none",q.style.touchAction="none",q.setAttribute("draggable","false"),q.addEventListener("dragstart",(U)=>U.preventDefault()),S=document.createElement("span"),S.className="pie-tool-shell__title",S.style.minWidth="0",S.style.overflowWrap="anywhere",S.textContent=j.mounted.entry.shell.title||j.mounted.toolId,q.appendChild(S),z=document.createElement("div"),z.className="pie-tool-shell__controls",z.style.display="inline-flex",z.style.flexWrap="wrap",z.style.minWidth="0",z.style.alignItems="center",z.style.gap=VJ()?"6px":"4px";let V=j.mounted.entry.shell,F=(U,W,R,m,c="fa-regular")=>{if(!z)return;let d=j.i18n.t(U),a=X?y0(d,R,m,c):x0(d,W,m);k.push({el:a,key:U}),z.appendChild(a)};if(V?.draggable!==!1)F("toolkit.window.moveLeftA11y","←","chevron-left",()=>wJ(-kJ,0)),F("toolkit.window.moveRightA11y","→","chevron-right",()=>wJ(kJ,0)),F("toolkit.window.moveUpA11y","↑","chevron-up",()=>wJ(0,-kJ)),F("toolkit.window.moveDownA11y","↓","chevron-down",()=>wJ(0,kJ));if(V?.resizable!==!1)F("toolkit.window.shrinkA11y","−","magnifying-glass-minus",()=>BZ(-zJ,-zJ)),F("toolkit.window.growA11y","+","magnifying-glass-plus",()=>BZ(zJ,zJ));if(!VJ()){let U=x0(j.i18n.t("toolkit.window.centerA11y"),"◎",IZ);k.push({el:U,key:"toolkit.window.centerA11y"}),z.appendChild(U)}let Y=null;if(VJ())Y=document.createElement("div"),Y.className="pie-tool-shell__header-right",Y.style.display="inline-flex",Y.style.flexWrap="wrap",Y.style.maxWidth="100%",Y.style.justifyContent="flex-end",Y.style.alignItems="center",Y.style.gap="6px",Y.appendChild(z),q.appendChild(Y);else q.appendChild(z);if(X)O=y0(j.i18n.t("toolkit.window.closeA11y"),"xmark",Z0,"fa-regular"),k.push({el:O,key:"toolkit.window.closeA11y"}),O.style.display=j.mounted.entry.shell.closeable===!1?"none":"inline-block";else{let U=document.createElement("button");U.type="button",U.className="pie-tool-shell__close",U.setAttribute("aria-label",j.i18n.t("toolkit.window.closeA11y")),k.push({el:U,key:"toolkit.window.closeA11y"});let W="http://www.w3.org/2000/svg",R=document.createElementNS(W,"svg");R.setAttribute("xmlns",W),R.setAttribute("viewBox","0 0 16 16"),R.setAttribute("aria-hidden","true");let m=document.createElementNS(W,"path");m.setAttribute("d","M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"),m.setAttribute("stroke","currentColor"),m.setAttribute("stroke-width","1.8"),m.setAttribute("stroke-linecap","round"),R.appendChild(m),U.appendChild(R);let c=R.style;c.width="16px",c.height="16px",c.display="block",c.flexShrink="0",c.pointerEvents="none";let d="color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)",a="color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";U.style.border="1px solid transparent",U.style.background=d,U.style.color="inherit",U.style.cursor="pointer",U.style.display="inline-flex",U.style.alignItems="center",U.style.justifyItems="center",U.style.width="28px",U.style.height="28px",U.style.padding="0",U.style.borderRadius="8px",U.style.lineHeight="0",U.style.transition="background-color 0.15s ease, border-color 0.15s ease",U.style.display=j.mounted.entry.shell.closeable===!1?"none":"inline-flex",U.onmouseenter=()=>{U.style.background=a},U.onmouseleave=()=>{U.style.background=d},U.onfocus=()=>{U.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",U.style.outlineOffset="2px"},U.onblur=()=>{U.style.outline="none",U.style.outlineOffset="0"},U.onclick=Z0,O=U}if(Y)Y.appendChild(O);else q.appendChild(O);if(q.tabIndex=0,q.onkeydown=(U)=>{if(U.key==="Home"){U.preventDefault(),IZ();return}let W=j.mounted.entry.shell;if(U.shiftKey&&W?.resizable!==!1){if(U.key==="ArrowRight"||U.key==="ArrowDown"){U.preventDefault(),BZ(zJ,zJ);return}if(U.key==="ArrowLeft"||U.key==="ArrowUp"){U.preventDefault(),BZ(-zJ,-zJ);return}}if(W?.draggable!==!1){if(U.key==="ArrowLeft")U.preventDefault(),wJ(-kJ,0);else if(U.key==="ArrowRight")U.preventDefault(),wJ(kJ,0);else if(U.key==="ArrowUp")U.preventDefault(),wJ(0,-kJ);else if(U.key==="ArrowDown")U.preventDefault(),wJ(0,kJ)}},P=document.createElement("div"),P.className="pie-tool-shell__content",P.style.position="relative",P.style.width="100%",P.style.flex="1 1 auto",P.style.minHeight="0",P.style.overflowX="hidden",P.style.overflowY=b0(),P.style.borderRadius="0 0 12px 12px",VJ()){let U=(W)=>{let R=document.createElement("div");return R.tabIndex=0,R.setAttribute("aria-hidden","true"),R.setAttribute("data-pie-tool-shell-focus-guard",W),R.style.position="absolute",R.style.width="1px",R.style.height="1px",R.style.padding="0",R.style.margin="-1px",R.style.overflow="hidden",R.style.clipPath="inset(50%)",R.style.whiteSpace="nowrap",R.style.border="0",R};e=U("start"),JJ=U("end"),e.addEventListener("focus",(W)=>{if(s)return;s=!0;try{if(W.stopPropagation(),YJ?.isConnected)bJ(YJ)}finally{queueMicrotask(()=>{s=!1})}}),JJ.addEventListener("focus",(W)=>{if(s)return;s=!0;try{W.stopPropagation();let R=eZ();if(R)bJ(R)}finally{queueMicrotask(()=>{s=!1})}}),Q.appendChild(e)}if(Q.appendChild(q),Q.appendChild(P),VJ()&&JJ)Q.appendChild(JJ);if(j.mounted.entry.shell.resizable!==!1){let U=(W,R,m,c,d,a,QJ)=>{let _=document.createElement("div");if(_.className="pie-tool-shell__resize",_.style.position="absolute",_.style.width="24px",_.style.height="24px",_.style.cursor=a,_.style.zIndex="10",_.style.touchAction="none",_.setAttribute("draggable","false"),R!==null)_.style.top=R;if(m!==null)_.style.right=m;if(c!==null)_.style.bottom=c;if(d!==null)_.style.left=d;if(QJ!==null)_.style.background=`linear-gradient(${QJ}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`;let UZ=e6(W);_.addEventListener("pointerdown",UZ),Q.appendChild(_),lZ.push({el:_,handler:UZ})};U("se",null,"0","0",null,"nwse-resize",null),U("nw","0",null,null,"0","nwse-resize","135deg"),U("ne","0","0",null,null,"nesw-resize",null),U("sw",null,null,"0","0","nesw-resize",null)}if(q.addEventListener("pointerdown",h0),Q.addEventListener("pointerdown",cJ),window.addEventListener("resize",u0),document.body.appendChild(Q),N=new O9(Q,{context:Y6,initialValue:j.runtime}),N.connect(),IZ(),QZ(),v0(),$0(),p0(),HZ(),j.active)g0();zZ=j.active}return{update(X){if(j=X,!Q||!P||!S||!O)return;N?.setValue(j.runtime),$0(),o6();let V=O.tagName.toLowerCase()==="nds-icon-button"?"inline-block":"inline-flex";if(O.style.display=j.mounted.entry.shell?.closeable===!1?"none":V,QZ(),v0(),p0(),HZ(),!zZ&&j.active)g0();else if(zZ&&!j.active)m0(),YJ=null;zZ=j.active},destroy(){if(d6(),N?.disconnect(),N=null,k.length=0,uJ)m0();if(DJ)document.removeEventListener("keydown",J0,!0),DJ=!1;for(let{el:X,handler:V}of lZ)X.removeEventListener("pointerdown",V);if(YJ=null,lZ.length=0,q)q.removeEventListener("pointerdown",h0),q.onkeydown=null;if(ZZ.release(),Q)Q.removeEventListener("pointerdown",cJ);if(window.removeEventListener("resize",u0),T&&P&&T.parentNode===P)sZ(T),P.removeChild(T);if(T=null,Q&&Q.parentElement)Q.remove()}}}var c6={get level(){return EJ()},set level(Z){EJ(Z),h()},get scopeId(){return DZ()},set scopeId(Z){DZ(Z),h()},get itemId(){return _Z()},set itemId(Z){_Z(Z),h()},get sectionId(){return CZ()},set sectionId(Z){CZ(Z),h()},get catalogId(){return fZ()},set catalogId(Z){fZ(Z),h()},get tools(){return bZ()},set tools(Z){bZ(Z),h()},get contentKind(){return yZ()},set contentKind(Z){yZ(Z),h()},get position(){return MJ()},set position(Z){MJ(Z),h()},get scopeElement(){return OZ()},set scopeElement(Z){OZ(Z),h()},get toolRegistry(){return GZ()},set toolRegistry(Z){GZ(Z),h()},get item(){return xZ()},set item(Z){xZ(Z),h()},get hostButtons(){return NZ()},set hostButtons(Z){NZ(Z),h()},get class(){return $Z()},set class(Z){$Z(Z),h()},get size(){return FZ()},set size(Z){FZ(Z),h()},get language(){return pZ()},set language(Z){pZ(Z),h()}},_0=xJ(),a6=yJ(_0);{var i6=(Z)=>{var K=I9();let j;var Q=aJ(K),N=aJ(Q);YZ(N,17,()=>J(y6),(z)=>z.key,(z,O)=>{M(z,()=>J(O),()=>"item-toolbar__element-host")});var k=TZ(N,2);YZ(k,17,()=>J(R0),(z)=>z.id,(z,O,e,JJ)=>{let s=G(()=>J(PZ)&&!K0(J(O))?Y0(J(O)):null);var DJ=xJ(),JZ=yJ(DJ);{var VJ=(ZJ)=>{var w=z9(),I=aJ(w);OJ(I,1,"item-toolbar__nds-button svelte-1c13522"),BJ(I,"type","circle"),BJ(I,"size","small"),BJ(I,"variant","tertiary"),o(()=>BJ(I,"icon-name",J(s))),o(()=>BJ(I,"button-aria-label",J(O).ariaLabel||J(O).label)),o(()=>BJ(I,"title",J(O).tooltip||J(O).label)),o(()=>BJ(I,"disabled",J(O).disabled)),LZ(I,(x)=>PJ?.(x)),LZ(I,(x,HJ)=>WJ?.(x,HJ),()=>kZ(J(O))),GJ(w),VZ("click",I,function(...x){J(O).onClick?.apply(this,x)}),y(ZJ,w)},T=(ZJ)=>{var w=H9();let I;var x=aJ(w);{var HJ=(C)=>{n0(C,()=>J(O).icon)};NJ(x,(C)=>{if(J(O).icon)C(HJ)})}GJ(w),o((C)=>{I=OJ(w,1,"item-toolbar__button svelte-1c13522",null,I,{"item-toolbar__button--active":C}),l(w,"href",J(O).disabled?void 0:J(O).href),l(w,"target",J(O).target),l(w,"rel",J(O).rel),l(w,"aria-label",J(O).ariaLabel||J(O).label),l(w,"title",J(O).tooltip||J(O).label),l(w,"aria-disabled",J(O).disabled?"true":void 0)},[()=>kZ(J(O))]),VZ("click",w,(C)=>{if(J(O).disabled)C.preventDefault()}),y(ZJ,w)},fJ=G(()=>K0(J(O))),ZZ=(ZJ)=>{var w=w9();let I;var x=aJ(w);{var HJ=(C)=>{n0(C,()=>J(O).icon)};NJ(x,(C)=>{if(J(O).icon)C(HJ)})}GJ(w),o((C,jZ)=>{I=OJ(w,1,"item-toolbar__button svelte-1c13522",null,I,{"item-toolbar__button--active":C}),l(w,"aria-label",J(O).ariaLabel||J(O).label),l(w,"aria-pressed",jZ),l(w,"title",J(O).tooltip||J(O).label),w.disabled=J(O).disabled},[()=>kZ(J(O)),()=>kZ(J(O))]),VZ("click",w,function(...C){J(O).onClick?.apply(this,C)}),y(ZJ,w)};NJ(JZ,(ZJ)=>{if(J(s))ZJ(VJ);else if(J(fJ))ZJ(T,1);else ZJ(ZZ,-1)})}y(z,DJ)});var q=TZ(k,2);YZ(q,17,()=>J(x6),(z)=>z.key,(z,O)=>{M(z,()=>J(O),()=>"item-toolbar__element-host")}),GJ(Q);var P=TZ(Q,2);{var S=(z)=>{var O=B9();let e;YZ(O,21,()=>J(k0),(JJ)=>JJ.key,(JJ,s)=>{M(JJ,()=>J(s),()=>"item-toolbar__controls-host")}),GJ(O),o(()=>e=OJ(O,1,"item-toolbar__controls-row svelte-1c13522",null,e,{"item-toolbar__controls-row--reserve":J(w0),"item-toolbar__controls-row--active":J(B0),"item-toolbar__controls-row--align-start":J($6)})),y(z,O)};NJ(P,(z)=>{if(J(p6))z(S)})}GJ(K),U6(K,(z)=>r(KJ,z),()=>J(KJ)),o(()=>{j=OJ(K,1,`item-toolbar ${$Z()??""} item-toolbar--${FZ()??""}`,"svelte-1c13522",j,{"item-toolbar--top":MJ()==="top","item-toolbar--right":MJ()==="right","item-toolbar--bottom":MJ()==="bottom","item-toolbar--left":MJ()==="left","item-toolbar--header-overlay-active":J(I0)}),l(K,"data-content-kind",J(lJ)),l(K,"data-level",J(A))}),VZ("focusin",Q,(z)=>{if(J(A)==="section"&&z.target instanceof HTMLElement)z.target.scrollIntoView({block:"nearest",inline:"nearest"})}),y(Z,K)};NJ(a6,(Z)=>{if(H)Z(i6)})}return y(D,_0),Z6(c6)}K6(["focusin","click"]);D9("pie-item-toolbar",V6(P6,{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{P6 as l};
@@ -0,0 +1,2 @@
1
+ import{ka as D,la as A}from"./ItemToolBar-3zrc4p3d.js";var S=["assessment","section","item","passage","rubric"],b=new Set(S);function _(q){return b.has(q)}function g(q,J,Q){let X=q.trim(),$=Q.trim();if(!X||!$)throw Error("Tool instance ids require non-empty tool and scope ids");if(!_(J))throw Error(`Unknown tool scope level '${J}'.`);return`${X}:${J}:${$}`}function R(q){let J=q.split(":");if(J.length!==3)return null;let[Q,X,$]=J;if(!Q||!$)return null;if(!_(X))return null;return{baseToolId:Q,scopeLevel:X,scopeId:$}}import{createPieLogger as h,isGlobalDebugEnabled as P}from"@pie-players/pie-players-shared/pie";var V=h("ToolCoordinator",P),O;(function(q){q[q.BASE=0]="BASE",q[q.TOOL=1000]="TOOL",q[q.MODAL=2000]="MODAL",q[q.CONTROL=3000]="CONTROL",q[q.HIGHLIGHT=4000]="HIGHLIGHT"})(O||(O={}));function k(q,J){if(!J?.baseId)return!0;return(R(q)?.baseToolId??q)===J.baseId}function C(q){return{id:q.id,name:q.name,isVisible:q.isVisible,element:q.element,layer:q.layer}}class N{tools=new Map;listeners=new Set;subscribe(q){return this.listeners.add(q),()=>{this.listeners.delete(q)}}notifyListeners(){for(let q of this.listeners)try{q()}catch(J){console.warn("[ToolCoordinator] listener failed:",J)}}registerTool(q,J,Q,X){V.debug("registerTool called:",{id:q,name:J,hasElement:!!Q,layer:X});let $=this.tools.get(q);if($){$.name=J;let Y=$.registered;if($.registered=!0,X!==void 0&&!$.layerDeclared)$.layer=X,$.layerDeclared=!0,this.stackOnTop($);else if(!Y)this.stackOnTop($)}else $={id:q,name:J,registered:!0,element:null,layer:X??O.TOOL,layerDeclared:X!==void 0,isVisible:!1,baseZIndex:0},this.tools.set(q,$),this.stackOnTop($);if(Q)this.updateToolElement(q,Q)}unregisterTool(q){let J=this.tools.get(q);if(!J?.registered)return;this.detachElement(J),J.registered=!1}releaseTool(q){let J=this.tools.get(q);if(!J)return;if(this.detachElement(J),this.tools.delete(q),J.isVisible)this.notifyListeners()}showTool(q){let J=this.tools.get(q);if(!J){V.debug(`Tool ${q} not found`);return}if(J.element)this.bringToFront(J.element);this.setVisible(J,!0)}hideTool(q){let J=this.tools.get(q);if(!J){V.debug(`Tool ${q} not found`);return}this.setVisible(J,!1)}toggleTool(q){let J=this.tools.get(q);if(!J){V.debug(`Tool ${q} not found`);return}if(J.isVisible)this.hideTool(q);else this.showTool(q)}isToolVisible(q){return this.tools.get(q)?.isVisible??!1}bringToFront(q){let J=Array.from(this.tools.values()).find((Q)=>Q.element===q);if(!J)return;this.stackOnTop(J)}destroy(){let q=Array.from(this.tools.values()).some((J)=>J.isVisible);for(let J of this.tools.values())this.detachElement(J);if(this.tools.clear(),q)this.notifyListeners();this.listeners.clear()}setVisible(q,J){if(q.isVisible===J)return;q.isVisible=J,this.notifyListeners()}detachElement(q){if(q.element&&q.mouseDownHandler)q.element.removeEventListener("mousedown",q.mouseDownHandler);q.element=null,q.mouseDownHandler=void 0}stackOnTop(q){let J=Array.from(this.tools.values()).filter((X)=>X.registered&&X.layer===q.layer&&X!==q).sort((X,$)=>X.baseZIndex-$.baseZIndex),Q=q.layer+J.length+1;if(q.baseZIndex===Q&&J.every((X)=>X.baseZIndex<Q))return;[...J,q].forEach((X,$)=>{if(X.baseZIndex=q.layer+1+$,X.element)X.element.style.zIndex=String(X.baseZIndex)})}updateToolElement(q,J){let Q=this.tools.get(q);if(!Q?.registered){V.debug(`Tool ${q} not found`);return}if(Q.element===J)return;if(Q.element?.isConnected&&Q.element.contains(J))return;this.detachElement(Q);let X=()=>this.bringToFront(J);if(J.addEventListener("mousedown",X),Q.element=J,Q.mouseDownHandler=X,J.style.zIndex=String(Q.baseZIndex),Q.isVisible)this.bringToFront(J)}hideAllTools(q){let J=!1;for(let Q of this.tools.values()){if(!Q.isVisible||!k(Q.id,q))continue;Q.isVisible=!1,J=!0}if(J)this.notifyListeners()}getToolState(q){let J=this.tools.get(q);return J?.registered?C(J):void 0}getVisibleTools(q){return Array.from(this.tools.values()).filter((J)=>J.isVisible&&k(J.id,q)).map(C)}}import{dynamicMessageKey as o}from"@pie-players/pie-players-shared/i18n/provider";import{validateCustomElementTag as T}from"@pie-players/pie-players-shared/pie/tag-names";var E=(q,J)=>{let Q=J?.toolTagMap?.[q];if(Q===void 0&&!q.includes("-"))throw Error(`No element tag is mapped for tool "${q}". 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 T(Q??q,`tool component tag for "${q}"`)};var w=(q,J,Q)=>console.error(`[ToolRegistry] Tool '${q}' ${J} check threw:`,Q);var f=["assessment","section","item","passage","rubric","element"];function G(q,J){if(typeof q!=="string"||q.trim().length===0)throw Error(`Invalid tool registration: "${J}" must be a non-empty string.`)}var x=[{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 L(q,J,Q){let X=J.trimStart(),$=X.toLowerCase().startsWith("<svg"),Y=/^https?:/i.test(X);if(/^data:/i.test(X))throw Error(`Invalid tool registration "${q}": "${Q}" may not be a data: URL.`);if(!$&&!Y)return;for(let{pattern:H,reason:W}of x)if(H.test(J))throw Error(`Invalid tool registration "${q}": "${Q}" ${W}. Inline SVG icons must not include scriptable content.`)}function Z(q){G(q.toolId,"toolId"),G(q.name,"name"),G(q.description,"description");let J=q.activation==="region";if(!J||q.icon!==void 0){if(typeof q.icon!=="string"&&typeof q.icon!=="function")throw Error(`Invalid tool registration "${q.toolId}": "icon" must be a string or function.`)}if(typeof q.icon==="string")L(q.toolId,q.icon,"icon");if(!Array.isArray(q.supportedLevels)||q.supportedLevels.length===0)throw Error(`Invalid tool registration "${q.toolId}": "supportedLevels" must be a non-empty array.`);let Q=q.supportedLevels.find((X)=>!f.includes(X));if(Q)throw Error(`Invalid tool registration "${q.toolId}": unsupported level "${Q}".`);if(q.activation!==void 0&&q.activation!=="toolbar-toggle"&&q.activation!=="selection-gateway"&&q.activation!=="region")throw Error(`Invalid tool registration "${q.toolId}": unsupported activation "${String(q.activation)}".`);if(q.surfaces!==void 0&&(!Array.isArray(q.surfaces)||q.surfaces.some((X)=>typeof X!=="string"||X.trim().length===0)))throw Error(`Invalid tool registration "${q.toolId}": "surfaces" must be an array of non-empty strings.`);if(J&&!q.surfaces?.length)throw Error(`Invalid tool registration "${q.toolId}": region tools must declare at least one host surface in "surfaces".`);if(J&&typeof q.renderSurface!=="function")throw Error(`Invalid tool registration "${q.toolId}": region tools must implement "renderSurface".`);if(q.resolvesWithoutGrant!==void 0&&typeof q.resolvesWithoutGrant!=="boolean")throw Error(`Invalid tool registration "${q.toolId}": "resolvesWithoutGrant" must be a boolean.`);if(q.resolvesWithoutGrant&&!q.requiresAuthoredContent)throw Error(`Invalid tool registration "${q.toolId}": "resolvesWithoutGrant" requires "requiresAuthoredContent".`);if(q.renderSurface!==void 0&&typeof q.renderSurface!=="function")throw Error(`Invalid tool registration "${q.toolId}": "renderSurface" must be a function.`);if(q.renderSurface&&!q.surfaces?.length)throw Error(`Invalid tool registration "${q.toolId}": "renderSurface" requires at least one entry in "surfaces".`);if(q.singletonScope!==void 0&&q.singletonScope!=="section")throw Error(`Invalid tool registration "${q.toolId}": unsupported singletonScope "${String(q.singletonScope)}".`);if(q.activation==="selection-gateway"&&q.singletonScope!=="section")throw Error(`Invalid tool registration "${q.toolId}": selection-gateway tools must declare singletonScope "section".`);if(q.activation!=="region"&&typeof q.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${q.toolId}": "isVisibleInContext" must be a function.`);if(q.isVisibleInContext!==void 0&&typeof q.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${q.toolId}": "isVisibleInContext" must be a function when present.`);if(q.isApplicableToContent!==void 0&&typeof q.isApplicableToContent!=="function")throw Error(`Invalid tool registration "${q.toolId}": "isApplicableToContent" must be a function when present.`);if(q.requiresAuthoredContent!==void 0){if(typeof q.requiresAuthoredContent!=="object"||q.requiresAuthoredContent===null||typeof q.requiresAuthoredContent.resolve!=="function")throw Error(`Invalid tool registration "${q.toolId}": "requiresAuthoredContent" must be an object with a "resolve" function.`)}if(q.renderToolbar!==void 0){if(typeof q.renderToolbar!=="function")throw Error(`Invalid tool registration "${q.toolId}": "renderToolbar" must be a function.`)}else if(!J)throw Error(`Invalid tool registration "${q.toolId}": "renderToolbar" must be a function.`)}class p{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(q){for(let J of this.changeListeners)try{J(q)}catch(Q){console.warn("[ToolRegistry] change listener failed:",Q)}}onRegistryChange(q){this.changeListeners.add(q);let J=!0;return()=>{if(!J)return;J=!1,this.changeListeners.delete(q)}}normalizeToolId(q){return q.trim()}normalizeToolIds(q){return q.map((J)=>this.normalizeToolId(J))}register(q){if(Z(q),this.tools.has(q.toolId))throw Error(`Tool '${q.toolId}' is already registered`);this.tools.set(q.toolId,q),this.emitChange({kind:"register",toolIds:[q.toolId]})}override(q){if(Z(q),!this.tools.has(q.toolId))throw Error(`Cannot override non-existent tool '${q.toolId}'`);this.tools.set(q.toolId,q),this.emitChange({kind:"override",toolIds:[q.toolId]})}unregister(q){if(!this.tools.has(q))return;this.tools.delete(q),this.emitChange({kind:"unregister",toolIds:[q]})}get(q){return this.tools.get(q)}has(q){return this.tools.has(q)}getAllToolIds(){return Array.from(this.tools.keys())}getAllTools(){return Array.from(this.tools.values())}getToolsByLevel(q){return this.getAllTools().filter((J)=>J.supportedLevels.includes(q))}getToolActivation(q){return this.get(q)?.activation||"toolbar-toggle"}getToolSingletonScope(q){return this.get(q)?.singletonScope||null}getToolsBySurface(q){if(!q)return[];return this.getAllTools().filter((J)=>typeof J.renderSurface==="function"&&J.surfaces?.includes(q))}getContentDependentSupportIds(){return this.getAllTools().filter((q)=>q.requiresAuthoredContent).map((q)=>q.toolId).sort()}filterToolIdsByActivation(q,J){return q.filter((Q)=>this.getToolActivation(Q)===J)}filterVisibleInContext(q,J,Q=w){let X=[];for(let $ of q){let Y=this.get($);if(!Y){if(!this.warnedUnregisteredAllowedTools.has($))this.warnedUnregisteredAllowedTools.add($),console.warn(`Tool '${$}' is allowed but not registered`);continue}if(!Y.supportedLevels.includes(J.level))continue;try{if(Y.isVisibleInContext?.(J))X.push(Y)}catch(j){Q($,"tool-visibility",j)}}return X}isApplicableToAnyContext(q,J,Q=w){let X=this.get(q);if(!X?.isApplicableToContent)return!0;if(J.length===0)return!0;return J.some(($)=>{try{return X.isApplicableToContent?.($)??!0}catch(Y){return Q(q,"tool-applicability",Y),!0}})}filterDecidedToolIds(q,J,Q,X=w){let $=new Set,Y=[];for(let H of q){let W=this.normalizeToolId(H.toolId);if(!W)continue;if(H.required||H.alwaysAvailable)$.add(W);if(Y.includes(W))continue;if(!this.get(W)?.supportedLevels.includes(J))continue;Y.push(W)}if(J==="section")return Y;let j=new Set(Q.length===0?Y:Y.filter((H)=>$.has(H)));for(let H of Q){let W=Y.filter((U)=>!j.has(U));for(let U of this.filterVisibleInContext(W,H,X))j.add(U.toolId)}return Y.filter((H)=>j.has(H)&&this.isApplicableToAnyContext(H,Q,X))}getToolMetadata(){return this.getAllTools().map((q)=>({toolId:q.toolId,name:q.name,description:q.description,supportedLevels:q.supportedLevels,activation:q.activation||"toolbar-toggle",singletonScope:q.singletonScope||null,surfaces:q.surfaces||[],requiresAuthoredContent:Boolean(q.requiresAuthoredContent),contentDependencyDescription:q.requiresAuthoredContent?.description??null}))}clear(){let q=this.getAllToolIds();if(q.length===0)return;this.tools.clear(),this.emitChange({kind:"clear",toolIds:q})}setComponentOverrides(q){if(this.componentOverrides===q)return;this.componentOverrides=q,this.emitChange({kind:"component-overrides",toolIds:[]})}setToolModuleLoaders(q){let J=Object.entries(q).filter((X)=>X[1]!==void 0);for(let[X,$]of J)if(G(X,"tool module loader id"),typeof $!=="function")throw Error(`Invalid tool module loader for "${X}": expected a function.`);let Q=[];for(let[X,$]of J){if(this.moduleLoaders.get(X)===$)continue;if(this.loadedToolModules.has(X)||this.moduleLoadPromises.has(X)){this.warnLoaderReplacedAfterLoad(X);continue}this.moduleLoaders.set(X,$),Q.push(X)}if(Q.length>0)this.emitChange({kind:"module-loaders",toolIds:Q})}warnLoaderReplacedAfterLoad(q){if(this.warnedLoaderReplacements.has(q))return;this.warnedLoaderReplacements.add(q),console.warn(`[ToolRegistry] Ignored a new module loader for "${q}": its module already loaded, so the elements it defines stay in place. Register loaders before the tool first renders.`)}async ensureToolModuleLoaded(q){if(this.loadedToolModules.has(q))return;let J=this.moduleLoadPromises.get(q);if(J){await J;return}let Q=this.moduleLoaders.get(q);if(!Q){this.watchUndefinedToolElement(q);return}let X=(async()=>{await Q(),this.loadedToolModules.add(q),this.warnIfLoadedToolElementUndefined(q)})();this.moduleLoadPromises.set(q,X);try{await X}finally{this.moduleLoadPromises.delete(q)}}undefinedToolElementTag(q){if(typeof customElements>"u"||typeof document>"u")return null;let J=this.componentOverrides;if(J.toolComponentFactories?.[q])return null;let Q;try{Q=E(q,J)}catch{return null}return customElements.get(Q)?null:Q}warnIfLoadedToolElementUndefined(q){let J=this.undefinedToolElementTag(q);if(!J)return;A(document,`loadedToolElementUndefined.${q}.${J}`,`[ToolRegistry] Tool "${q}" renders <${J}>, but its module loader finished without defining it, so the tool renders blank. The tag map and the loader disagree: map "${q}" to the tag its loader defines, or register a loader that defines <${J}>. Reported once per page.`)}watchUndefinedToolElement(q){if(this.watchedUndefinedToolElements.has(q))return;let J=this.undefinedToolElementTag(q);if(!J)return;this.watchedUndefinedToolElements.add(q);let Q=document,X=setTimeout(()=>{if(customElements.get(J))return;A(Q,`undefinedToolElement.${q}`,`[ToolRegistry] Tool "${q}" renders <${J}>, which is still undefined after ${D/1000} s, and its registry has no module loader for it. Register one with setToolModuleLoaders or import the tool's package before it renders; a registry from createPackagedToolRegistry has the packaged loaders unless its toolModuleLoaders replaced them. Reported once per page.`)},D);customElements.whenDefined(J).then(()=>clearTimeout(X))}async ensureToolModulesLoaded(q){let J=await Promise.allSettled(q.map((X)=>this.ensureToolModuleLoaded(X))),Q=new Map;return J.forEach((X,$)=>{if(X.status==="rejected")Q.set(q[$],X.reason)}),Q}isToolModuleLoaded(q){return this.loadedToolModules.has(q)}renderForToolbar(q,J,Q){let X=this.get(q);if(!X)throw Error(`Tool '${q}' is not registered`);if(typeof X.renderToolbar!=="function")throw Error(`Tool '${q}' has activation "${X.activation||"toolbar-toggle"}" and renders into a host surface, not a toolbar. Remove it from toolbar placement.`);let $={...Q,componentOverrides:this.mergeComponentOverrides(Q.componentOverrides)};return X.renderToolbar(J,$)}renderForSurface(q,J){let Q=this.get(q);if(!Q)throw Error(`Tool '${q}' is not registered`);if(typeof Q.renderSurface!=="function")throw Error(`Tool '${q}' does not render into a host surface. Surface capabilities declare "surfaces" and implement "renderSurface".`);return Q.renderSurface({...J,componentOverrides:this.mergeComponentOverrides(J.componentOverrides)})}mergeComponentOverrides(q){return{...this.componentOverrides||{},...q||{}}}}var K={assessment:[],section:[],item:[],passage:[],rubric:[],element:[]};import{isPlainRecord as B}from"@pie-players/pie-players-shared/object";var m={section:[...K.section],item:[...K.item],passage:[...K.passage]};function F(q,J){if(q==null)return[];if(!Array.isArray(q))throw Error(`Invalid tools config at "${J}": expected an array of tool ids.`);if(q.find((X)=>typeof X!=="string")!==void 0)throw Error(`Invalid tools config at "${J}": all entries must be strings.`);return q}function u(q){if(q==null)return;if(!B(q))throw Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');return q}function v(q){if(q==null)return;if(!B(q))throw Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');return q}function c(q,J){if(J==null)return;if(!B(J))throw Error(`Invalid tools config at "providers.${q}": expected an object.`);let Q=J;if("enabled"in Q&&Q.enabled!==void 0&&typeof Q.enabled!=="boolean")throw Error(`Invalid tools config at "providers.${q}.enabled": expected a boolean.`);if("settings"in Q&&Q.settings!==void 0&&!B(Q.settings))throw Error(`Invalid tools config at "providers.${q}.settings": expected an object.`);if("provider"in Q&&Q.provider!==void 0&&!B(Q.provider))throw Error(`Invalid tools config at "providers.${q}.provider": expected an object.`);return Q}function y(q){if(q==null)return{};if(!B(q))throw Error('Invalid tools config at "providers": expected an object keyed by tool id.');let J={};for(let[Q,X]of Object.entries(q))J[Q]=c(Q,X);return J}function M(q){if(!q||q.length===0)return[];let J=new Set;for(let Q of q){if(typeof Q!=="string")throw Error("Invalid tools config: tool list entries must be strings.");let X=Q.trim();if(!X)continue;J.add(X)}return Array.from(J)}function $q(q){if(!q)return[];return M(q.split(",").map((J)=>J.trim()).filter(Boolean))}function I(q,J){if(q==null)return;if(q==="on"||q==="off")return q;throw Error(`Invalid tools config at "${J}": expected "on" or "off", got ${JSON.stringify(q)}.`)}function z(q,J){let Q=M(F(q?.[J],`placement.${J}`));return Q.length?Q:[...m[J]]}function Yq(q){if(q!=null&&!B(q))throw Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');let J=v(q?.policy),Q=u(q?.placement),X=y(q?.providers),$=I(q?.pnpEnforcement,"pnpEnforcement"),Y={policy:{allowed:M(F(J?.allowed,"policy.allowed")),blocked:M(F(J?.blocked,"policy.blocked"))},placement:{section:z(Q,"section"),item:z(Q,"item"),passage:z(Q,"passage")},providers:X};if($)Y.pnpEnforcement=$;return Y}
2
+ export{g as m,O as n,N as o,p,M as q,$q as r,Yq as s};
@@ -1,2 +1,2 @@
1
1
  var d=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});
2
- export{d as oa};
2
+ export{d as qa};
@@ -0,0 +1 @@
1
+ import{pa as v}from"./ItemToolBar-66hcwmfw.js";import"./ItemToolBar-kkj69ptr.js";import*as q from"speech-rule-engine";var x=q.default??q;x.setupEngine(v());var B=x;export{B as default};
@@ -21,6 +21,12 @@ export interface AssessmentToolkitRuntimeContext {
21
21
  elementToolStateStore: ElementToolStateStoreApi;
22
22
  assessmentId: string;
23
23
  sectionId: string;
24
+ /**
25
+ * The attempt the toolkit's `attempt-id` names, unset when the host names
26
+ * none. Tool state keys carry it, so two attempts at one section never share
27
+ * a tool's state.
28
+ */
29
+ attemptId?: string;
24
30
  itemPlayer: ItemPlayerConfig;
25
31
  /**
26
32
  * Opt-in flag: context consumers render the vendored `<nds-icon-button>`