@citolab/qti-components 6.3.5 → 6.3.8

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 (51) hide show
  1. package/dist/{chunk-LNHTXQXY.js → chunk-DHQGPGHW.js} +3 -7
  2. package/dist/chunk-GHNL64KC.js +397 -0
  3. package/dist/{chunk-6G76D2MI.cjs → chunk-HYQC3D4Z.cjs} +1 -1
  4. package/dist/{chunk-LWL4UHCJ.cjs → chunk-OMMRIRZN.cjs} +3 -7
  5. package/dist/chunk-QGPCSWAA.cjs +397 -0
  6. package/dist/{chunk-M4CYU6DC.cjs → chunk-SLKHOXHJ.cjs} +1 -1
  7. package/dist/{chunk-QROD4MVT.js → chunk-V6U2X6CM.js} +1 -1
  8. package/dist/chunk-YWGBLO7P.js +1 -0
  9. package/dist/context/index.cjs +1 -1
  10. package/dist/context/index.js +1 -1
  11. package/dist/custom-elements.json +3788 -3466
  12. package/dist/decorators/index.cjs +1 -1
  13. package/dist/decorators/index.js +1 -1
  14. package/dist/index.cjs +443 -116
  15. package/dist/index.css +1 -5
  16. package/dist/index.d.cts +83 -30
  17. package/dist/index.d.ts +83 -30
  18. package/dist/index.js +443 -116
  19. package/dist/qti-components/index.cjs +40 -39
  20. package/dist/qti-components/index.d.cts +4 -4
  21. package/dist/qti-components/index.d.ts +4 -4
  22. package/dist/qti-components/index.js +29 -28
  23. package/dist/qti-item/index.cjs +1 -1
  24. package/dist/qti-item/index.d.cts +29 -2
  25. package/dist/qti-item/index.d.ts +29 -2
  26. package/dist/qti-item/index.js +1 -1
  27. package/dist/qti-item-react/index.cjs +1 -1
  28. package/dist/qti-item-react/index.d.cts +2 -2
  29. package/dist/qti-item-react/index.d.ts +2 -2
  30. package/dist/qti-item-react/index.js +1 -1
  31. package/dist/{qti-simple-choice-5902cb37.d.ts → qti-simple-choice-1e52645f.d.ts} +1 -1
  32. package/dist/qti-test/index.cjs +1 -1
  33. package/dist/qti-test/index.d.cts +34 -72
  34. package/dist/qti-test/index.d.ts +34 -72
  35. package/dist/qti-test/index.js +1 -1
  36. package/dist/qti-test-react/index.cjs +1 -1
  37. package/dist/qti-test-react/index.d.cts +61 -13
  38. package/dist/qti-test-react/index.d.ts +61 -13
  39. package/dist/qti-test-react/index.js +1 -1
  40. package/dist/qti-transform/index.cjs +1 -1
  41. package/dist/qti-transform/index.js +1 -1
  42. package/dist/test-print-variables-9b4289a6.d.ts +97 -0
  43. package/dist/test-print-variables-9f2390d5.d.ts +97 -0
  44. package/package.json +28 -26
  45. package/dist/chunk-343LZK3D.js +0 -1
  46. package/dist/chunk-5MW7QEIY.cjs +0 -79
  47. package/dist/chunk-CLTJGOOQ.js +0 -79
  48. package/dist/chunk-MTPOYN4D.js +0 -0
  49. package/dist/chunk-TEMU6PXC.cjs +0 -1
  50. package/dist/qti-test-0312b9bb.d.ts +0 -32
  51. package/dist/qti-test-24952460.d.ts +0 -32
@@ -1,16 +1,12 @@
1
- import{a as n}from"./chunk-DPSTDDQZ.js";import{a as w}from"./chunk-AWSFYZS5.js";import{c as r}from"./chunk-343LZK3D.js";import{html as d,LitElement as g}from"lit";import{customElement as h,property as i,state as l}from"lit/decorators.js";import{unsafeHTML as p}from"lit/directives/unsafe-html.js";import{provide as f}from"@lit/context";var s=`/* PK: Tailwind theming file for all qti-components
1
+ import{a as n}from"./chunk-DPSTDDQZ.js";import{a as w}from"./chunk-AWSFYZS5.js";import{c as r}from"./chunk-YWGBLO7P.js";import{html as d,LitElement as g}from"lit";import{customElement as h,property as i,state as l}from"lit/decorators.js";import{unsafeHTML as p}from"lit/directives/unsafe-html.js";import{provide as f}from"@lit/context";var s=`/* PK: Tailwind theming file for all qti-components
2
2
  Uses tailwind components and utilities from the other files
3
3
 
4
4
  https://play.tailwindcss.com/OFThGk8CbR
5
5
  https://play.tailwindcss.com/CeHVrnwgXR
6
6
  https://play.tailwindcss.com/JOgoCf81JM
7
7
 
8
- We make use of the default prose stylesheet, since it is much better looking then
9
- the default HTML styling.
10
- https://play.tailwindcss.com/uj1vGACRJA?layout=preview
8
+ You should in you project include modern-normalize.css
11
9
 
12
- So first we ( as tailwind does ) reset ALL styling on all default elements
13
- Then we add the prose stylesheet: the Interaction will / or will not have a no-prose declaration, don't know about that yet
14
10
  Then we create tailwind components
15
11
  Then we consume these components in our qti-webcomponents
16
12
 
@@ -2195,4 +2191,4 @@ video {
2195
2191
  max-width: 100%;
2196
2192
  height: auto;
2197
2193
  }
2198
- `;var o=class extends g{constructor(){super();this.itemLocation="";this.disabled=!1;this._xml="";this.audienceContext={view:"candidate"};this.render=()=>d`${p(this._xml)}<slot></slot>`}update(t){t.has("disabled")&&this.assessmentItem&&(this.assessmentItem.disabled=this.disabled),super.update(t)}set xml(t){this._xml=w(t).customTypes().cDataToComment().customDefinition().assetsLocation(`${this.itemLocation}`).xml()}set css(t){var e;let a=new CSSStyleSheet;a.replaceSync(t),(e=this.shadowRoot)==null||e.adoptedStyleSheets.push(a)}get assessmentItem(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("qti-assessment-item")}connectedCallback(){super.connectedCallback(),this.css=s}};r([i({type:String,attribute:"item-location"})],o.prototype,"itemLocation",2),r([i({type:Boolean,attribute:!1})],o.prototype,"disabled",2),r([l()],o.prototype,"_xml",2),r([f({context:n}),i({attribute:!1})],o.prototype,"audienceContext",2),o=r([h("qti-item")],o);export{o as a};
2194
+ `;var o=class extends g{constructor(){super(...arguments);this.itemLocation="";this.disabled=!1;this._xml="";this.audienceContext={view:"candidate"};this.render=()=>d`${p(this._xml)}<slot></slot>`}update(t){t.has("disabled")&&this.assessmentItem&&(this.assessmentItem.disabled=this.disabled),super.update(t)}set xml(t){this._xml=w(t).customTypes().cDataToComment().customDefinition().assetsLocation(`${this.itemLocation}`).xml()}set css(t){var e;let a=new CSSStyleSheet;a.replaceSync(t),(e=this.shadowRoot)==null||e.adoptedStyleSheets.push(a)}get assessmentItem(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("qti-assessment-item")}connectedCallback(){super.connectedCallback(),this.css=s}};r([i({type:String,attribute:"item-location"})],o.prototype,"itemLocation",2),r([i({type:Boolean,attribute:!1})],o.prototype,"disabled",2),r([l()],o.prototype,"_xml",2),r([f({context:n}),i({attribute:!1})],o.prototype,"audienceContext",2),o=r([h("qti-item")],o);export{o as a};
@@ -0,0 +1,397 @@
1
+ import{a as lt}from"./chunk-DHQGPGHW.js";import{a as w,b as C,c as n,d as a}from"./chunk-YWGBLO7P.js";import{customElement as Ot,property as mt}from"lit/decorators.js";var k=class extends lt{connectedCallback(){super.connectedCallback();let t=new CustomEvent("register-item-ref",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href}});this.dispatchEvent(t)}};n([mt({type:String})],k.prototype,"identifier",2),n([mt({type:String})],k.prototype,"href",2),k=n([Ot("qti-assessment-item-ref")],k);import{html as Pt,LitElement as Ft}from"lit";import{customElement as Vt,property as dt}from"lit/decorators.js";import{provide as Ht}from"@lit/context";import{createContext as Qt}from"@lit/context";var ut=class{},m=Qt("test");import{signal as Nt,effect as Ut}from"@lit-labs/preact-signals";var I=class extends Ft{constructor(){super();this._initialValue={itemIndex:0,items:[]};this.signalContext=Nt(this._initialValue);this.itemRefEls=new Map;this.restoreContext=t=>{var s;t||(t=this._initialValue),this.signalContext.value.itemIndex=t.itemIndex,(s=t.items)==null||s.forEach(r=>{let i=this.signalContext.value.items.find(c=>c.identifier===r.identifier);i?i.variables=r.variables:this.signalContext.value.items.push(r)})};this.itemConnected=t=>{let s=this.signalContext.value.items.find(r=>(r==null?void 0:r.identifier)===(t==null?void 0:t.identifier));s.variables.length===1?this.copyItemVariables(t.identifier):t.variables=[...s.variables]};this.addEventListener("register-item-ref",this.onItemRefRegistered),this.addEventListener("on-test-request-item",this.onTestRequestItem),this.addEventListener("qti-item-first-updated",t=>this.itemConnected(t.detail)),this.addEventListener("qti-interaction-changed",t=>this.copyItemVariables(t.detail.item)),this.addEventListener("qti-outcome-changed",t=>this.copyItemVariables(t.detail.item)),Ut(()=>this._context=this.signalContext.value)}set context(t){console.log("set context",t),this.signalContext.value=t}copyItemVariables(t){this.signalContext.value=C(w({},this.signalContext.value),{items:this.signalContext.value.items.map(s=>s.identifier==t?C(w({},s),{variables:this.getAssessmentItem(t).context.variables}):s)})}getAssessmentItem(t){return this.querySelector(`qti-assessment-item-ref[identifier="${t}"]`).assessmentItem}get currentAssessmentItem(){return this.querySelector(`qti-assessment-item-ref[identifier="${this.signalContext.value.items[this.signalContext.value.itemIndex].identifier}"]`).assessmentItem}onItemRefRegistered(t){this.itemRefEls.set(t.detail.identifier,t.target);let{href:s,identifier:r}=t.detail;this.signalContext.value.items=[...this.signalContext.value.items,{href:s,identifier:r,variables:[{identifier:"completionStatus",cardinality:"single",baseType:"string",value:"not_attempted",type:"outcome"}]}]}onTestRequestItem(t){t.stopImmediatePropagation(),t.detail!==this.signalContext.value.itemIndex&&(this.signalContext.value=C(w({},this.signalContext.value),{itemIndex:t.detail}))}firstUpdated(t){if(super.firstUpdated(t),this.signalContext.value.items.length===0){console.warn("No items found in the test, please add at least one item");return}this._emit("qti-assessment-first-updated",this)}updated(t){var s,r;if(t.has("_context")){let i=(s=t.get("_context"))==null?void 0:s.itemIndex;this.signalContext.value.items.length>0&&this.signalContext.value.itemIndex!==null&&i!==this.signalContext.value.itemIndex&&this._requestItem(this.signalContext.value.items[this.signalContext.value.itemIndex].identifier,(r=this.signalContext.value.items[i])==null?void 0:r.identifier)}}_requestItem(t,s){this.dispatchEvent(new CustomEvent("on-test-set-item",{bubbles:!0,composed:!0,detail:{old:s,new:t}}))}_emit(t,s=null){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:s}))}render(){return Pt`<slot></slot>`}};n([dt({type:String})],I.prototype,"identifier",2),n([Ht({context:m}),dt({attribute:!1})],I.prototype,"_context",2),I=n([Vt("qti-assessment-test")],I);import{html as jt,LitElement as Xt}from"lit";import{customElement as Wt,property as pt}from"lit/decorators.js";var q=class extends Xt{constructor(){super(...arguments);this.loading=!1;this._navigationMode="linear"}render(){return jt`
2
+ <slot name="qti-item"></slot>
3
+ <slot> </slot>
4
+ `}};n([pt({type:Boolean,reflect:!0})],q.prototype,"loading",2),n([pt({type:String,attribute:"navigation-mode"})],q.prototype,"_navigationMode",2),q=n([Wt("qti-test-part")],q);import{html as ne,render as Et}from"lit";var R,ft=0;function G(o){R=o}function K(){R=null,ft=0}function ht(){return ft++}var B=Symbol("haunted.phase"),S=Symbol("haunted.hook"),Y=Symbol("haunted.update"),Z=Symbol("haunted.commit"),g=Symbol("haunted.effects"),y=Symbol("haunted.layoutEffects"),D="haunted.context";var Bt,Jt,Gt,z=class{constructor(e,t){a(this,"update");a(this,"host");a(this,"virtual");a(this,Bt);a(this,Jt);a(this,Gt);this.update=e,this.host=t,this[S]=new Map,this[g]=[],this[y]=[]}run(e){G(this);let t=e();return K(),t}_runEffects(e){let t=this[e];G(this);for(let s of t)s.call(this);K()}runEffects(){this._runEffects(g)}runLayoutEffects(){this._runEffects(y)}teardown(){this[S].forEach(t=>{typeof t.teardown=="function"&&t.teardown()})}};Bt=S,Jt=g,Gt=y;var Kt=Promise.resolve().then.bind(Promise.resolve());function gt(){let o=[],e;function t(){e=null;let s=o;o=[];for(var r=0,i=s.length;r<i;r++)s[r]()}return function(s){o.push(s),e==null&&(e=Kt(t))}}var Yt=gt(),bt=gt(),Zt,_=class{constructor(e,t){a(this,"renderer");a(this,"host");a(this,"state");a(this,Zt);a(this,"_updateQueued");this.renderer=e,this.host=t,this.state=new z(this.update.bind(this),t),this[B]=null,this._updateQueued=!1}update(){this._updateQueued||(Yt(()=>{let e=this.handlePhase(Y);bt(()=>{this.handlePhase(Z,e),bt(()=>{this.handlePhase(g)})}),this._updateQueued=!1}),this._updateQueued=!0)}handlePhase(e,t){switch(this[B]=e,e){case Z:this.commit(t),this.runEffects(y);return;case Y:return this.render();case g:return this.runEffects(g)}}render(){return this.state.run(()=>this.renderer.call(this.host,this.host))}runEffects(e){this.state._runEffects(e)}teardown(){this.state.teardown()}};Zt=B;var Tt=(o="")=>o.replace(/-+([a-z])?/g,(e,t)=>t?t.toUpperCase():"");function xt(o){class e extends _{constructor(i,c,l){super(i,l||c);a(this,"frag");this.frag=c}commit(i){o(i,this.frag)}}function t(s,r,i){let c=(i||r||{}).baseElement||HTMLElement,{observedAttributes:l=[],useShadowDOM:u=!0,shadowRootInit:E={}}=i||r||{};class A extends c{constructor(){super();a(this,"_scheduler");u===!1?this._scheduler=new e(s,this):(this.attachShadow(w({mode:"open"},E)),this._scheduler=new e(s,this.shadowRoot,this))}static get observedAttributes(){return s.observedAttributes||l||[]}connectedCallback(){this._scheduler.update()}disconnectedCallback(){this._scheduler.teardown()}attributeChangedCallback(b,x,d){if(x===d)return;let zt=d===""?!0:d;Reflect.set(this,Tt(b),zt)}}function Rt(v){let f=v,b=!1;return Object.freeze({enumerable:!0,configurable:!0,get(){return f},set(x){b&&f===x||(b=!0,f=x,this._scheduler&&this._scheduler.update())}})}let Dt=new Proxy(c.prototype,{getPrototypeOf(v){return v},set(v,f,b,x){let d;return f in v?(d=Object.getOwnPropertyDescriptor(v,f),d&&d.set?(d.set.call(x,b),!0):(Reflect.set(v,f,b,x),!0)):(typeof f=="symbol"||f[0]==="_"?d={enumerable:!0,configurable:!0,writable:!0,value:b}:d=Rt(b),Object.defineProperty(x,f,d),d.set&&d.set.call(x,b),!0)}});return Object.setPrototypeOf(A.prototype,Dt),A}return t}var p=class{constructor(e,t){a(this,"id");a(this,"state");this.id=e,this.state=t}};function te(o,...e){let t=ht(),s=R[S],r=s.get(t);return r||(r=new o(t,R,...e),s.set(t,r)),r.update(...e)}function h(o){return te.bind(null,o)}function J(o){return h(class extends p{constructor(t,s,r,i){super(t,s);a(this,"callback");a(this,"lastValues");a(this,"values");a(this,"_teardown");o(s,this)}update(t,s){this.callback=t,this.values=s}call(){(!this.values||this.hasChanged())&&this.run(),this.lastValues=this.values}run(){this.teardown(),this._teardown=this.callback.call(this.state)}teardown(){typeof this._teardown=="function"&&this._teardown()}hasChanged(){return!this.lastValues||this.values.some((t,s)=>this.lastValues[s]!==t)}})}function T(o,e){o[g].push(e)}var $=J(T);var tt=h(class extends p{constructor(e,t,s){super(e,t);a(this,"Context");a(this,"value");a(this,"_ranEffect");a(this,"_unsubscribe");this._updater=this._updater.bind(this),this._ranEffect=!1,this._unsubscribe=null,T(t,this)}update(e){if(this.state.virtual)throw new Error("can't be used with virtual components");return this.Context!==e&&(this._subscribe(e),this.Context=e),this.value}call(){this._ranEffect||(this._ranEffect=!0,this._unsubscribe&&this._unsubscribe(),this._subscribe(this.Context),this.state.update())}_updater(e){this.value=e,this.state.update()}_subscribe(e){let t={Context:e,callback:this._updater};this.state.host.dispatchEvent(new CustomEvent(D,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));let{unsubscribe:s=null,value:r}=t;this.value=s?r:e.defaultValue,this._unsubscribe=s}teardown(){this._unsubscribe&&this._unsubscribe()}});function wt(o){return e=>{let t={Provider:class extends HTMLElement{constructor(){super();a(this,"listeners");a(this,"_value");this.listeners=new Set,this.addEventListener(D,this)}disconnectedCallback(){this.removeEventListener(D,this)}handleEvent(r){let{detail:i}=r;i.Context===t&&(i.value=this.value,i.unsubscribe=this.unsubscribe.bind(this,i.callback),this.listeners.add(i.callback),r.stopPropagation())}unsubscribe(r){this.listeners.delete(r)}set value(r){this._value=r;for(let i of this.listeners)i(r)}get value(){return this._value}},Consumer:o(function({render:s}){let r=tt(t);return s(r)}),defaultValue:e};return t}}var et=h(class extends p{constructor(e,t,s,r){super(e,t);a(this,"value");a(this,"values");this.value=s(),this.values=r}update(e,t){return this.hasChanged(t)&&(this.values=t,this.value=e()),this.value}hasChanged(e=[]){return e.some((t,s)=>this.values[s]!==t)}});function ee(o,e){o[y].push(e)}var vt=J(ee);var M=h(class extends p{constructor(e,t,s){super(e,t);a(this,"args");this.updater=this.updater.bind(this),typeof s=="function"&&(s=s()),this.makeArgs(s)}update(){return this.args}updater(e){if(typeof e=="function"){let t=e,[s]=this.args;e=t(s)}this.makeArgs(e),this.state.update()}makeArgs(e){this.args=Object.freeze([e,this.updater])}});var Dr=Promise.resolve();var se=h(class extends p{constructor(e,t,s,r,i){super(e,t);a(this,"reducer");a(this,"currentState");this.dispatch=this.dispatch.bind(this),this.currentState=i!==void 0?i(r):r}update(e){return this.reducer=e,[this.currentState,this.dispatch]}dispatch(e){this.currentState=this.reducer(this.currentState,e),this.state.update()}});function st({render:o}){let e=xt(o),t=wt(e);return{component:e,createContext:t}}import{directive as re}from"lit/directive.js";import{noChange as oe}from"lit";import{AsyncDirective as ie}from"lit/async-directive.js";var yt=Array.prototype.includes,rt=new WeakMap,Ct=new WeakMap,ot=class extends _{constructor(t,s,r){super(t,s);a(this,"args");a(this,"setValue");this.state.virtual=!0,this.setValue=r}render(){return this.state.run(()=>this.renderer.apply(this.host,this.args))}commit(t){this.setValue(t)}teardown(){super.teardown();let t=Ct.get(this);rt.delete(t)}};function _t(){function o(e){class t extends ie{constructor(i){super(i);a(this,"cont");this.cont=void 0}update(i,c){return this.cont=rt.get(i),(!this.cont||this.cont.renderer!==e)&&(this.cont=new ot(e,i,l=>{this.setValue(l)}),rt.set(i,this.cont),Ct.set(this.cont,i),it(this.cont,i)),this.cont.args=c,this.cont.update(),this.render(c)}render(i){return oe}}return re(t)}return o}function it(o,e,t=e.startNode){let s=t.parentNode,r=new MutationObserver(i=>{for(let c of i)if(yt.call(c.removedNodes,t)){r.disconnect(),t.parentNode instanceof ShadowRoot?it(o,e):o.teardown();break}else if(yt.call(c.addedNodes,t.nextSibling)){r.disconnect(),it(o,e,t.nextSibling||void 0);break}});r.observe(s,{childList:!0})}var{component:nt,createContext:ae}=st({render:Et}),at=_t();import{ifDefined as me}from"lit/directives/if-defined.js";import{createRef as ue,ref as de}from"lit/directives/ref.js";import*as ct from"cheerio";var ce=async o=>{let t=await(await fetch(o)).text();return ct.load(t,{xmlMode:!0,xml:{xmlMode:!0}})('resource[type="imsqti_test_xmlv3p0"]').first()},le=async o=>{let t=await(await fetch(o)).text(),s=ct.load(t,{xmlMode:!0,xml:{xmlMode:!0}}),r=[];return s("qti-assessment-item-ref").each((i,c)=>{let l=s(c).attr("identifier"),u=s(c).attr("href"),E=s(c).attr("category");r.push({identifier:l,href:u,category:E})}),r},O=new AbortController;async function kt(o){let e=async s=>{try{return await(await fetch(s,{signal:t})).text()}catch(r){r.name==="AbortError"?console.log("Fetch aborted"):console.error(r)}return""};O==null||O.abort(),O=new AbortController;let t=O.signal;return await e(o)}var It=async o=>{o.endsWith("/")||(o=o+"/");let e=await ce(o+"/imsmanifest.xml"),t=await le(o+e.attr("href"));return{itemLocation:`${o}/${e.attr("href").substring(0,e.attr("href").lastIndexOf("/"))}/`,items:t,testIdentifier:e.attr("identifier")}};import{html as qt}from"lit";var St=o=>{let[e,t]=M(null),s=ue();return $(()=>{console.log("QtiTestHaunted",o),t(o)},[e]),e?qt`
5
+ <qti-assessment-test
6
+ ${de(s)}
7
+ identifier="${e.testIdentifier}"
8
+ @on-test-set-item=${async({detail:r})=>{let i=s.value.itemRefEls.get(r.new),c=await kt(`${e.itemLocation}/${i.href}`);i.xml=c,i.scrollIntoView({block:"center",inline:"center",behavior:"instant"}),s.value.itemRefEls.forEach((l,u)=>l.identifier!==i.identifier&&(l.xml=""))}}
9
+ @qti-assessment-first-updated=${r=>{}}
10
+ >
11
+ <test-show-index></test-show-index>
12
+ <qti-test-part>
13
+ <qti-assessment-section>
14
+ ${e.items.map(r=>qt`<qti-assessment-item-ref
15
+ item-location=${`${e.itemLocation}`}
16
+ identifier="${r.identifier}"
17
+ href="${r.href}"
18
+ category="${me(r.category)}"
19
+ >
20
+ </qti-assessment-item-ref>`)}
21
+ </qti-assessment-section>
22
+ </qti-test-part>
23
+
24
+ <div class="nav">
25
+ <test-prev>
26
+ <svg class="arrow" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
27
+ <path
28
+ fill-rule="evenodd"
29
+ d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z"
30
+ clip-rule="evenodd"
31
+ />
32
+ </svg>
33
+ </test-prev>
34
+
35
+ <test-paging-buttons></test-paging-buttons>
36
+
37
+ <test-next>
38
+ <svg class="arrow" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
39
+ <path
40
+ fill-rule="evenodd"
41
+ d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z"
42
+ clip-rule="evenodd"
43
+ />
44
+ </svg>
45
+ </test-next>
46
+ </div>
47
+
48
+ <test-slider></test-slider>
49
+ </qti-assessment-test>
50
+ `:""};import{html as fe}from"lit";var $t=`*, ::before, ::after {
51
+ --tw-border-spacing-x: 0;
52
+ --tw-border-spacing-y: 0;
53
+ --tw-translate-x: 0;
54
+ --tw-translate-y: 0;
55
+ --tw-rotate: 0;
56
+ --tw-skew-x: 0;
57
+ --tw-skew-y: 0;
58
+ --tw-scale-x: 1;
59
+ --tw-scale-y: 1;
60
+ --tw-pan-x: ;
61
+ --tw-pan-y: ;
62
+ --tw-pinch-zoom: ;
63
+ --tw-scroll-snap-strictness: proximity;
64
+ --tw-gradient-from-position: ;
65
+ --tw-gradient-via-position: ;
66
+ --tw-gradient-to-position: ;
67
+ --tw-ordinal: ;
68
+ --tw-slashed-zero: ;
69
+ --tw-numeric-figure: ;
70
+ --tw-numeric-spacing: ;
71
+ --tw-numeric-fraction: ;
72
+ --tw-ring-inset: ;
73
+ --tw-ring-offset-width: 0px;
74
+ --tw-ring-offset-color: #fff;
75
+ --tw-ring-color: rgb(59 130 246 / 0.5);
76
+ --tw-ring-offset-shadow: 0 0 #0000;
77
+ --tw-ring-shadow: 0 0 #0000;
78
+ --tw-shadow: 0 0 #0000;
79
+ --tw-shadow-colored: 0 0 #0000;
80
+ --tw-blur: ;
81
+ --tw-brightness: ;
82
+ --tw-contrast: ;
83
+ --tw-grayscale: ;
84
+ --tw-hue-rotate: ;
85
+ --tw-invert: ;
86
+ --tw-saturate: ;
87
+ --tw-sepia: ;
88
+ --tw-drop-shadow: ;
89
+ --tw-backdrop-blur: ;
90
+ --tw-backdrop-brightness: ;
91
+ --tw-backdrop-contrast: ;
92
+ --tw-backdrop-grayscale: ;
93
+ --tw-backdrop-hue-rotate: ;
94
+ --tw-backdrop-invert: ;
95
+ --tw-backdrop-opacity: ;
96
+ --tw-backdrop-saturate: ;
97
+ --tw-backdrop-sepia: ;
98
+ }
99
+ ::backdrop {
100
+ --tw-border-spacing-x: 0;
101
+ --tw-border-spacing-y: 0;
102
+ --tw-translate-x: 0;
103
+ --tw-translate-y: 0;
104
+ --tw-rotate: 0;
105
+ --tw-skew-x: 0;
106
+ --tw-skew-y: 0;
107
+ --tw-scale-x: 1;
108
+ --tw-scale-y: 1;
109
+ --tw-pan-x: ;
110
+ --tw-pan-y: ;
111
+ --tw-pinch-zoom: ;
112
+ --tw-scroll-snap-strictness: proximity;
113
+ --tw-gradient-from-position: ;
114
+ --tw-gradient-via-position: ;
115
+ --tw-gradient-to-position: ;
116
+ --tw-ordinal: ;
117
+ --tw-slashed-zero: ;
118
+ --tw-numeric-figure: ;
119
+ --tw-numeric-spacing: ;
120
+ --tw-numeric-fraction: ;
121
+ --tw-ring-inset: ;
122
+ --tw-ring-offset-width: 0px;
123
+ --tw-ring-offset-color: #fff;
124
+ --tw-ring-color: rgb(59 130 246 / 0.5);
125
+ --tw-ring-offset-shadow: 0 0 #0000;
126
+ --tw-ring-shadow: 0 0 #0000;
127
+ --tw-shadow: 0 0 #0000;
128
+ --tw-shadow-colored: 0 0 #0000;
129
+ --tw-blur: ;
130
+ --tw-brightness: ;
131
+ --tw-contrast: ;
132
+ --tw-grayscale: ;
133
+ --tw-hue-rotate: ;
134
+ --tw-invert: ;
135
+ --tw-saturate: ;
136
+ --tw-sepia: ;
137
+ --tw-drop-shadow: ;
138
+ --tw-backdrop-blur: ;
139
+ --tw-backdrop-brightness: ;
140
+ --tw-backdrop-contrast: ;
141
+ --tw-backdrop-grayscale: ;
142
+ --tw-backdrop-hue-rotate: ;
143
+ --tw-backdrop-invert: ;
144
+ --tw-backdrop-opacity: ;
145
+ --tw-backdrop-saturate: ;
146
+ --tw-backdrop-sepia: ;
147
+ }
148
+ button {
149
+ all: unset;
150
+ }
151
+ button:focus {
152
+ outline: revert;
153
+ }
154
+ ::host {
155
+ height: 100vh;
156
+ width: 100vw;
157
+ --tw-bg-opacity: 1;
158
+ background-color: rgb(248 250 252 / var(--tw-bg-opacity)); /* bg-red-400; */
159
+ }
160
+ qti-assessment-test {
161
+ display: block;
162
+ padding: 2rem; /* bg-red-400; */
163
+ }
164
+ :host {
165
+ --tw-bg-opacity: 1;
166
+ background-color: rgb(96 165 250 / var(--tw-bg-opacity));
167
+ }
168
+ .arrow {
169
+ height: 1.25rem;
170
+ width: 1.25rem;
171
+ }
172
+ .nav {
173
+ isolation: isolate;
174
+ margin-top: 1rem;
175
+ display: inline-flex;
176
+ width: 100%;
177
+ }
178
+ .nav > :not([hidden]) ~ :not([hidden]) {
179
+ --tw-space-x-reverse: 0;
180
+ margin-right: calc(-1px * var(--tw-space-x-reverse));
181
+ margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse)));
182
+ }
183
+ .nav {
184
+ border-radius: 0.375rem;
185
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
186
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
187
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
188
+ }
189
+ test-prev::part(button) {
190
+ all: unset;
191
+ position: relative;
192
+ display: inline-flex;
193
+ align-items: center;
194
+ border-top-left-radius: 0.375rem;
195
+ border-bottom-left-radius: 0.375rem;
196
+ --tw-bg-opacity: 1;
197
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
198
+ padding-left: 0.5rem;
199
+ padding-right: 0.5rem;
200
+ padding-top: 0.5rem;
201
+ padding-bottom: 0.5rem;
202
+ --tw-text-opacity: 1;
203
+ color: rgb(156 163 175 / var(--tw-text-opacity));
204
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
205
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
206
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
207
+ --tw-ring-inset: inset;
208
+ --tw-ring-opacity: 1;
209
+ --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
210
+ }
211
+ test-prev::part(button):hover {
212
+ --tw-bg-opacity: 1;
213
+ background-color: rgb(249 250 251 / var(--tw-bg-opacity));
214
+ }
215
+ test-prev::part(button):focus {
216
+ z-index: 20;
217
+ outline-offset: 0px;
218
+ }
219
+ test-slider::part(input) {
220
+ width: 100%;
221
+ }
222
+ test-next::part(button) {
223
+ all: unset;
224
+ position: relative;
225
+ display: inline-flex;
226
+ align-items: center;
227
+ border-top-right-radius: 0.375rem;
228
+ border-bottom-right-radius: 0.375rem;
229
+ --tw-bg-opacity: 1;
230
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
231
+ padding-left: 0.5rem;
232
+ padding-right: 0.5rem;
233
+ padding-top: 0.5rem;
234
+ padding-bottom: 0.5rem;
235
+ --tw-text-opacity: 1;
236
+ color: rgb(156 163 175 / var(--tw-text-opacity));
237
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
238
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
239
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
240
+ --tw-ring-inset: inset;
241
+ --tw-ring-opacity: 1;
242
+ --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
243
+ }
244
+ test-next::part(button):hover {
245
+ --tw-bg-opacity: 1;
246
+ background-color: rgb(249 250 251 / var(--tw-bg-opacity));
247
+ }
248
+ test-next::part(button):focus {
249
+ z-index: 20;
250
+ outline-offset: 0px;
251
+ }
252
+ test-paging-buttons {
253
+ display: none;
254
+ width: 100%;
255
+ justify-content: center;
256
+ }
257
+ @media (min-width: 768px) {
258
+ test-paging-buttons {
259
+ margin-top: -1px;
260
+ display: flex;
261
+ }
262
+ }
263
+ test-paging-buttons > button {
264
+ position: relative;
265
+ display: inline-flex;
266
+ align-items: center;
267
+ --tw-bg-opacity: 1;
268
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
269
+ padding-left: 1rem;
270
+ padding-right: 1rem;
271
+ padding-top: 0.5rem;
272
+ padding-bottom: 0.5rem;
273
+ font-size: 0.875rem;
274
+ line-height: 1.25rem;
275
+ font-weight: 600;
276
+ --tw-text-opacity: 1;
277
+ color: rgb(17 24 39 / var(--tw-text-opacity));
278
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
279
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
280
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
281
+ --tw-ring-inset: inset;
282
+ --tw-ring-opacity: 1;
283
+ --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
284
+ }
285
+ test-paging-buttons > button:hover {
286
+ --tw-bg-opacity: 1;
287
+ background-color: rgb(249 250 251 / var(--tw-bg-opacity));
288
+ }
289
+ test-paging-buttons > button:focus {
290
+ z-index: 20;
291
+ outline-offset: 0px;
292
+ }
293
+ test-paging-buttons > button[data-active-item='true'] {
294
+ position: relative;
295
+ z-index: 10;
296
+ display: inline-flex;
297
+ align-items: center;
298
+ --tw-bg-opacity: 1;
299
+ background-color: rgb(79 70 229 / var(--tw-bg-opacity));
300
+ padding-left: 1rem;
301
+ padding-right: 1rem;
302
+ padding-top: 0.5rem;
303
+ padding-bottom: 0.5rem;
304
+ font-size: 0.875rem;
305
+ line-height: 1.25rem;
306
+ font-weight: 600;
307
+ --tw-text-opacity: 1;
308
+ color: rgb(255 255 255 / var(--tw-text-opacity));
309
+ }
310
+ test-paging-buttons > button[data-active-item='true']:focus {
311
+ z-index: 20;
312
+ }
313
+ test-paging-buttons > button[data-active-item='true']:focus-visible {
314
+ outline-style: solid;
315
+ outline-width: 2px;
316
+ outline-offset: 2px;
317
+ outline-color: #4f46e5;
318
+ }
319
+ qti-test-part qti-assessment-section {
320
+ display: flex;
321
+ aspect-ratio: 16 / 9;
322
+ gap: 2rem;
323
+ overflow-x: hidden;
324
+ }
325
+ qti-test-part qti-assessment-section qti-assessment-item-ref {
326
+ display: block;
327
+ height: 100%;
328
+ width: 100%;
329
+ max-width: none;
330
+ flex-shrink: 0;
331
+ --tw-bg-opacity: 1;
332
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
333
+ padding: 2rem;
334
+ }
335
+ `;function he(o){let[e,t]=M();return $(()=>{var r;let s=new CSSStyleSheet;s.replaceSync($t),(r=o.shadowRoot)==null||r.adoptedStyleSheets.push(s)},[]),$(()=>{(async r=>await It(r))(o.packageUri).then(r=>{t(r)})},[o.packageUri]),fe`${e?at(St)(e):""}`}var be=nt(he,{observedAttributes:["package-uri"]});customElements.define("qti-test",be);import{html as ge,LitElement as xe}from"lit";import{customElement as we,state as ve}from"lit/decorators.js";import{consume as ye}from"@lit/context";var Q=class extends xe{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){var i;let{items:t,itemIndex:s}=this._testContext,r=Math.min(s+1,t.length-1);return ge`
336
+ <button part="button" @click=${c=>this._requestItem(r)} id="${(i=t[r])==null?void 0:i.identifier}">
337
+ <slot></slot>
338
+ </button>
339
+ `}};n([ye({context:m,subscribe:!0}),ve()],Q.prototype,"_testContext",2),Q=n([we("test-next")],Q);import{html as Ce,LitElement as _e}from"lit";import{customElement as Ee,state as ke}from"lit/decorators.js";import{consume as Ie}from"@lit/context";var P=class extends _e{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){var i;let{items:t,itemIndex:s}=this._testContext,r=Math.max(s-1,0);return Ce`
340
+ <button part="button" @click=${c=>this._requestItem(r)} id="${(i=t[r])==null?void 0:i.identifier}">
341
+ <slot></slot>
342
+ </button>
343
+ `}};n([Ie({context:m,subscribe:!0}),ke()],P.prototype,"_testContext",2),P=n([Ee("test-prev")],P);import{consume as qe}from"@lit/context";import{LitElement as Se,html as $e}from"lit";import{customElement as Me,state as Le}from"lit/decorators.js";var F=class extends Se{render(){let{items:t,itemIndex:s}=this._testProvider;return $e`
344
+ <progress part="progress" id="file" max=${t.length-1} value=${s}>
345
+ ${s/(t.length-1)}%
346
+ </progress>
347
+ `}};n([qe({context:m,subscribe:!0}),Le()],F.prototype,"_testProvider",2),F=n([Me("test-progress")],F);import{consume as Ae}from"@lit/context";import{LitElement as Re,html as De}from"lit";import{customElement as ze,state as Oe}from"lit/decorators.js";var V=class extends Re{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:s}=this._testProvider;return De`
348
+ <input
349
+ part="input"
350
+ type="range"
351
+ value=${s.toString()}
352
+ class="absolute w-full appearance-none bg-transparent"
353
+ max=${t.length-1}
354
+ @input=${r=>this._requestItem(+r.target.value)}
355
+ />
356
+ `}};n([Ae({context:m,subscribe:!0}),Oe()],V.prototype,"_testProvider",2),V=n([ze("test-slider")],V);import{consume as Qe}from"@lit/context";import{LitElement as Pe,html as Mt}from"lit";import{customElement as Fe,state as Ve}from"lit/decorators.js";var H=class extends Pe{createRenderRoot(){return this}_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:s}=this._testProvider;return Mt`
357
+ ${t.map((r,i)=>{var c;return Mt` <label>
358
+ <input
359
+ type="radio"
360
+ part="input"
361
+ name="item"
362
+ value="${i}"
363
+ ?checked=${i===s}
364
+ @change=${l=>this._requestItem(i)}
365
+ data-completion-status=${(c=r.variables.find(l=>l.identifier==="completionStatus"))==null?void 0:c.value}
366
+ id="${r.identifier}"
367
+ />
368
+ ${i+1}
369
+ </label>`})}
370
+ `}};n([Qe({context:m,subscribe:!0}),Ve()],H.prototype,"_testProvider",2),H=n([Fe("test-paging-radio")],H);import{consume as He}from"@lit/context";import{LitElement as Ne,html as Lt}from"lit";import{customElement as Ue,property as je,state as Xe}from"lit/decorators.js";var L=class extends Ne{constructor(){super(...arguments);this.maxDisplayedItems=5}createRenderRoot(){return this}_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:s}=this._testProvider,r=Math.max(0,s-this.maxDisplayedItems),i=Math.min(t.length-1,s+this.maxDisplayedItems),c=t.slice(r,i+1);return Lt`
371
+ ${c.map((l,u)=>{var E;return Lt`<button
372
+ part="button"
373
+ data-completion-status=${(E=l.variables.find(A=>A.identifier==="completionStatus"))==null?void 0:E.value}
374
+ data-active-item=${r+u===s}
375
+ @click=${A=>this._requestItem(r+u)}
376
+ id="${l.identifier}"
377
+ >
378
+ ${r+u+1}
379
+ </button>`})}
380
+ `}};n([He({context:m,subscribe:!0}),Xe()],L.prototype,"_testProvider",2),n([je({type:Number})],L.prototype,"maxDisplayedItems",2),L=n([Ue("test-paging-buttons")],L);import{consume as We}from"@lit/context";import{LitElement as Be,html as At}from"lit";import{customElement as Je,state as Ge}from"lit/decorators.js";var N=class extends Be{render(){var i,c,l;let{items:t,itemIndex:s}=this._testProvider;if(s==null)return At``;let r=(l=(c=this.closest("qti-assessment-test"))==null?void 0:c.itemRefEls.get((i=t[s])==null?void 0:i.identifier))==null?void 0:l.assessmentItem;return At`
381
+ <button part="button" @click=${u=>r.showCorrectResponse()}>
382
+ <slot></slot>
383
+ </button>
384
+ `}};n([We({context:m,subscribe:!0}),Ge()],N.prototype,"_testProvider",2),N=n([Je("test-show-correct")],N);import{ContextConsumer as Ke}from"@lit/context";import{html as Ye,LitElement as Ze}from"lit";import{customElement as Te,state as ts}from"lit/decorators.js";var U=class extends Ze{constructor(){super(...arguments);this._printed=""}render(){return Ye`${this._printed}<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(t){var r,i;let s=Array.from((r=this.childNodes)!=null?r:[]).find(c=>c.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","item",(i=s.textContent)!=null?i:"")}catch(c){console.error("custom-operator contains invalid javascript code",c)}this._context=new Ke(this,m,c=>{this._printed=this.operatorFunction(c,this.closest("qti-assessment-item"))},!0)}};n([ts()],U.prototype,"_printed",2),U=n([Te("test-script")],U);import{html as es,LitElement as ss}from"lit";import{customElement as rs,state as os}from"lit/decorators.js";import{consume as is}from"@lit/context";var j=class extends ss{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:s}=this._testContext,r=t[s-1];return es` ${s+1}/${t.length} `}};n([is({context:m,subscribe:!0}),os()],j.prototype,"_testContext",2),j=n([rs("test-show-index")],j);import{consume as ns}from"@lit/context";import{LitElement as as,html as cs}from"lit";import{customElement as ls,state as ms}from"lit/decorators.js";var X=class extends as{render(){return cs`
385
+ <pre>
386
+ ${JSON.stringify(C(w({},this._testProvider),{items:this._testProvider.items.map(t=>C(w({},t),{itemEl:null}))}),null,2)}</pre
387
+ >
388
+ `}};n([ns({context:m,subscribe:!0}),ms()],X.prototype,"_testProvider",2),X=n([ls("test-print-variables")],X);import{consume as us}from"@lit/context";import{LitElement as ds,html as ps}from"lit";import{customElement as fs,state as hs}from"lit/decorators.js";var W=class extends ds{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t}=this._testContext,s=t.reduce((i,c)=>{let l=c.variables.find(u=>u.identifier==="SCORE");return i+(l?+l.value:0)},0),r=t.reduce((i,c)=>{let l=c.variables.find(u=>u.identifier==="MAXSCORE");return i+(l?+l.value:0)},0);return ps` ${s}/${r}`}};n([us({context:m,subscribe:!0}),hs()],W.prototype,"_testContext",2),W=n([fs("test-print-score")],W);export{k as a,ut as b,m as c,I as d,q as e,kt as f,It as g,be as h,Q as i,P as j,F as k,V as l,H as m,L as n,N as o,U as p,j as q,X as r,W as s};
389
+ /*! Bundled license information:
390
+
391
+ haunted/lib/use-controller.js:
392
+ (**
393
+ * @license
394
+ * Portions Copyright 2021 Google LLC
395
+ * SPDX-License-Identifier: BSD-3-Clause
396
+ *)
397
+ */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var j=Object.defineProperty,k=Object.defineProperties,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;var i=(c,a,b)=>a in c?j(c,a,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[a]=b,p= exports.a =(c,a)=>{for(var b in a||(a={}))n.call(a,b)&&i(c,b,a[b]);if(h)for(var b of h(a))o.call(a,b)&&i(c,b,a[b]);return c},q= exports.b =(c,a)=>k(c,m(a));var r=(c,a,b,e)=>{for(var d=e>1?void 0:e?l(a,b):a,f=c.length-1,g;f>=0;f--)(g=c[f])&&(d=(e?g(a,b,d):g(d))||d);return e&&d&&j(a,b,d),d};exports.a = p; exports.b = q; exports.c = r;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var j=Object.defineProperty,k=Object.defineProperties,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyDescriptors;var i=Object.getOwnPropertySymbols;var n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;var h=(c,a,b)=>a in c?j(c,a,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[a]=b,p= exports.a =(c,a)=>{for(var b in a||(a={}))n.call(a,b)&&h(c,b,a[b]);if(i)for(var b of i(a))o.call(a,b)&&h(c,b,a[b]);return c},q= exports.b =(c,a)=>k(c,m(a));var r=(c,a,b,e)=>{for(var d=e>1?void 0:e?l(a,b):a,f=c.length-1,g;f>=0;f--)(g=c[f])&&(d=(e?g(a,b,d):g(d))||d);return e&&d&&j(a,b,d),d};var s=(c,a,b)=>(h(c,typeof a!="symbol"?a+"":a,b),b);exports.a = p; exports.b = q; exports.c = r; exports.d = s;
@@ -1,16 +1,12 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBKBZWUX6cjs = require('./chunk-BKBZWUX6.cjs');var _chunkCCQXZDO6cjs = require('./chunk-CCQXZDO6.cjs');var _chunk6G76D2MIcjs = require('./chunk-6G76D2MI.cjs');var _lit = require('lit');var _decoratorsjs = require('lit/decorators.js');var _unsafehtmljs = require('lit/directives/unsafe-html.js');var _context = require('@lit/context');var s=`/* PK: Tailwind theming file for all qti-components
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBKBZWUX6cjs = require('./chunk-BKBZWUX6.cjs');var _chunkCCQXZDO6cjs = require('./chunk-CCQXZDO6.cjs');var _chunkHYQC3D4Zcjs = require('./chunk-HYQC3D4Z.cjs');var _lit = require('lit');var _decoratorsjs = require('lit/decorators.js');var _unsafehtmljs = require('lit/directives/unsafe-html.js');var _context = require('@lit/context');var s=`/* PK: Tailwind theming file for all qti-components
2
2
  Uses tailwind components and utilities from the other files
3
3
 
4
4
  https://play.tailwindcss.com/OFThGk8CbR
5
5
  https://play.tailwindcss.com/CeHVrnwgXR
6
6
  https://play.tailwindcss.com/JOgoCf81JM
7
7
 
8
- We make use of the default prose stylesheet, since it is much better looking then
9
- the default HTML styling.
10
- https://play.tailwindcss.com/uj1vGACRJA?layout=preview
8
+ You should in you project include modern-normalize.css
11
9
 
12
- So first we ( as tailwind does ) reset ALL styling on all default elements
13
- Then we add the prose stylesheet: the Interaction will / or will not have a no-prose declaration, don't know about that yet
14
10
  Then we create tailwind components
15
11
  Then we consume these components in our qti-webcomponents
16
12
 
@@ -2195,4 +2191,4 @@ video {
2195
2191
  max-width: 100%;
2196
2192
  height: auto;
2197
2193
  }
2198
- `;var o=class extends _lit.LitElement{constructor(){super();this.itemLocation="";this.disabled=!1;this._xml="";this.audienceContext={view:"candidate"};this.render=()=>_lit.html`${_unsafehtmljs.unsafeHTML.call(void 0, this._xml)}<slot></slot>`}update(t){t.has("disabled")&&this.assessmentItem&&(this.assessmentItem.disabled=this.disabled),super.update(t)}set xml(t){this._xml=_chunkCCQXZDO6cjs.a.call(void 0, t).customTypes().cDataToComment().customDefinition().assetsLocation(`${this.itemLocation}`).xml()}set css(t){var e;let a=new CSSStyleSheet;a.replaceSync(t),(e=this.shadowRoot)==null||e.adoptedStyleSheets.push(a)}get assessmentItem(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("qti-assessment-item")}connectedCallback(){super.connectedCallback(),this.css=s}};_chunk6G76D2MIcjs.c.call(void 0, [_decoratorsjs.property.call(void 0, {type:String,attribute:"item-location"})],o.prototype,"itemLocation",2),_chunk6G76D2MIcjs.c.call(void 0, [_decoratorsjs.property.call(void 0, {type:Boolean,attribute:!1})],o.prototype,"disabled",2),_chunk6G76D2MIcjs.c.call(void 0, [_decoratorsjs.state.call(void 0, )],o.prototype,"_xml",2),_chunk6G76D2MIcjs.c.call(void 0, [_context.provide.call(void 0, {context:_chunkBKBZWUX6cjs.a}),_decoratorsjs.property.call(void 0, {attribute:!1})],o.prototype,"audienceContext",2),o= exports.a =_chunk6G76D2MIcjs.c.call(void 0, [_decoratorsjs.customElement.call(void 0, "qti-item")],o);exports.a = o;
2194
+ `;var o=class extends _lit.LitElement{constructor(){super(...arguments);this.itemLocation="";this.disabled=!1;this._xml="";this.audienceContext={view:"candidate"};this.render=()=>_lit.html`${_unsafehtmljs.unsafeHTML.call(void 0, this._xml)}<slot></slot>`}update(t){t.has("disabled")&&this.assessmentItem&&(this.assessmentItem.disabled=this.disabled),super.update(t)}set xml(t){this._xml=_chunkCCQXZDO6cjs.a.call(void 0, t).customTypes().cDataToComment().customDefinition().assetsLocation(`${this.itemLocation}`).xml()}set css(t){var e;let a=new CSSStyleSheet;a.replaceSync(t),(e=this.shadowRoot)==null||e.adoptedStyleSheets.push(a)}get assessmentItem(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("qti-assessment-item")}connectedCallback(){super.connectedCallback(),this.css=s}};_chunkHYQC3D4Zcjs.c.call(void 0, [_decoratorsjs.property.call(void 0, {type:String,attribute:"item-location"})],o.prototype,"itemLocation",2),_chunkHYQC3D4Zcjs.c.call(void 0, [_decoratorsjs.property.call(void 0, {type:Boolean,attribute:!1})],o.prototype,"disabled",2),_chunkHYQC3D4Zcjs.c.call(void 0, [_decoratorsjs.state.call(void 0, )],o.prototype,"_xml",2),_chunkHYQC3D4Zcjs.c.call(void 0, [_context.provide.call(void 0, {context:_chunkBKBZWUX6cjs.a}),_decoratorsjs.property.call(void 0, {attribute:!1})],o.prototype,"audienceContext",2),o= exports.a =_chunkHYQC3D4Zcjs.c.call(void 0, [_decoratorsjs.customElement.call(void 0, "qti-item")],o);exports.a = o;