@citolab/qti-components 6.9.1-beta.9 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js ADDED
@@ -0,0 +1,4681 @@
1
+ var yi=Object.defineProperty;var Us=Object.getOwnPropertyDescriptor;var Fs=(s,t,e)=>t in s?yi(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var l=(s,t,e,r)=>{for(var i=r>1?void 0:r?Us(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(i=(r?n(t,e,i):n(i))||i);return r&&i&&yi(t,e,i),i};var z=(s,t,e)=>Fs(s,typeof t!="symbol"?t+"":t,e);var de=class extends Event{constructor(t,e,r){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=r??!1}};var Re=class{constructor(t,e,r,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,n)=>{this.unsubscribe&&(this.unsubscribe!==n&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,n)),this.unsubscribe=n},this.host=t,e.context!==void 0){let o=e;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=e,this.callback=r,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new de(this.context,this.t,this.subscribe))}};var Vt=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){let r=e||!Object.is(t,this.o);this.o=t,r&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:r}]of this.subscriptions)e(this.o,r)},t!==void 0&&(this.value=t)}addCallback(t,e,r){if(!r)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});let{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var Rr=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Me=class extends Vt{constructor(t,e,r){super(e.context!==void 0?e.initialValue:r),this.onContextRequest=i=>{let o=i.composedPath()[0];i.context===this.context&&o!==this.host&&(i.stopPropagation(),this.addCallback(i.callback,o,i.subscribe))},this.onProviderRequest=i=>{let o=i.composedPath()[0];if(i.context!==this.context||o===this.host)return;let n=new Set;for(let[a,{consumerHost:c}]of this.subscriptions)n.has(a)||(n.add(a),c.dispatchEvent(new de(this.context,a,!0)));i.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Rr(this.context))}};function Le({context:s}){return(t,e)=>{let r=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){r.set(this,new Me(this,{context:s}))}),{get(){return t.get.call(this)},set(i){return r.get(this)?.setValue(i),t.set.call(this,i)},init(i){return r.get(this)?.setValue(i),i}};{t.constructor.addInitializer(n=>{r.set(n,new Me(n,{context:s}))});let i=Object.getOwnPropertyDescriptor(t,e),o;if(i===void 0){let n=new WeakMap;o={get(){return n.get(this)},set(a){r.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{let n=i.set;o={...i,set(a){r.get(this).setValue(a),n?.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}function T({context:s,subscribe:t}){return(e,r)=>{typeof r=="object"?r.addInitializer(function(){new Re(this,{context:s,callback:i=>{e.set.call(this,i)},subscribe:t})}):e.constructor.addInitializer(i=>{new Re(i,{context:s,callback:o=>{i[r]=o},subscribe:t})})}}var qi=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColSpan="",this.ariaCurrent="",this.ariaDescription="",this.ariaDisabled="",this.ariaExpanded="",this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var wi=new WeakMap,et=s=>{let t=wi.get(s);return t===void 0&&wi.set(s,t=new Map),t},Bs=class{constructor(){this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(et(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){et(this).set(t,String(e))}removeAttribute(t){et(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return et(this).has(t)}attachShadow(t){let e={host:this};return this.__shadowRootMode=t.mode,t&&t.mode==="open"&&(this.__shadowRoot=e),e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new qi(this);return this.__internals=t,t}getAttribute(t){return et(this).get(t)??null}};var js=class extends Bs{},Ei=js;var Ws=class{constructor(){this.__definitions=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]})}get(t){return this.__definitions.get(t)?.ctor}},Xs=Ws;var Ci=new Xs;var tt=globalThis,zt=tt.ShadowRoot&&(tt.ShadyCSS===void 0||tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Mr=Symbol(),_i=new WeakMap,rt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==Mr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(zt&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=_i.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&_i.set(e,t))}return t}toString(){return this.cssText}},ki=s=>new rt(typeof s=="string"?s:s+"",void 0,Mr),b=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((r,i,o)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+s[o+1],s[0]);return new rt(e,s,Mr)},Lr=(s,t)=>{if(zt)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=tt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,s.appendChild(r)}},Ut=zt||tt.CSSStyleSheet===void 0?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ki(e)})(s):s;var{is:Ys,defineProperty:Gs,getOwnPropertyDescriptor:Ks,getOwnPropertyNames:Zs,getOwnPropertySymbols:Js,getPrototypeOf:Qs}=Object,U=globalThis;U.customElements??(U.customElements=Ci);var Ti=U.trustedTypes,eo=Ti?Ti.emptyScript:"",to=U.reactiveElementPolyfillSupport,it=(s,t)=>s,st={toAttribute(s,t){switch(t){case Boolean:s=s?eo:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},Ft=(s,t)=>!Ys(s,t),Ai={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Ft};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),U.litPropertyMetadata??(U.litPropertyMetadata=new WeakMap);var se=class extends(globalThis.HTMLElement??Ei){static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ai){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&Gs(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){let{get:i,set:o}=Ks(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i?.call(this)},set(n){let a=i?.call(this);o.call(this,n),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ai}static _$Ei(){if(this.hasOwnProperty(it("elementProperties")))return;let t=Qs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(it("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(it("properties"))){let e=this.properties,r=[...Zs(e),...Js(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(Ut(i))}else t!==void 0&&e.push(Ut(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Lr(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:st).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:st;this._$Em=i,this[i]=n.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??Ft)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r)o.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],o)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};se.elementStyles=[],se.shadowRootOptions={mode:"open"},se[it("elementProperties")]=new Map,se[it("finalized")]=new Map,to?.({ReactiveElement:se}),(U.reactiveElementVersions??(U.reactiveElementVersions=[])).push("2.0.4");var $e=globalThis,Bt=$e.trustedTypes,Si=Bt?Bt.createPolicy("lit-html",{createHTML:s=>s}):void 0,Dr="$lit$",oe=`lit$${Math.random().toFixed(9).slice(2)}$`,Ir="?"+oe,ro=`<${Ir}>`,Ce=$e.document===void 0?{createTreeWalker:()=>({})}:document,nt=()=>Ce.createComment(""),at=s=>s===null||typeof s!="object"&&typeof s!="function",Nr=Array.isArray,Ii=s=>Nr(s)||typeof s?.[Symbol.iterator]=="function",$r=`[
3
+ \f\r]`,ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ri=/-->/g,Mi=/>/g,we=RegExp(`>|${$r}(?:([^\\s"'>=/]+)(${$r}*=${$r}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,$i=/"/g,Ni=/^(?:script|style|textarea|title)$/i,Pr=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),h=Pr(1),Hr=Pr(2),_n=Pr(3),R=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),Di=new WeakMap,Ee=Ce.createTreeWalker(Ce,129);function Pi(s,t){if(!Nr(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Si!==void 0?Si.createHTML(t):t}var Hi=(s,t)=>{let e=s.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",n=ot;for(let a=0;a<e;a++){let c=s[a],d,u,m=-1,f=0;for(;f<c.length&&(n.lastIndex=f,u=n.exec(c),u!==null);)f=n.lastIndex,n===ot?u[1]==="!--"?n=Ri:u[1]!==void 0?n=Mi:u[2]!==void 0?(Ni.test(u[2])&&(i=RegExp("</"+u[2],"g")),n=we):u[3]!==void 0&&(n=we):n===we?u[0]===">"?(n=i??ot,m=-1):u[1]===void 0?m=-2:(m=n.lastIndex-u[2].length,d=u[1],n=u[3]===void 0?we:u[3]==='"'?$i:Li):n===$i||n===Li?n=we:n===Ri||n===Mi?n=ot:(n=we,i=void 0);let y=n===we&&s[a+1].startsWith("/>")?" ":"";o+=n===ot?c+ro:m>=0?(r.push(d),c.slice(0,m)+Dr+c.slice(m)+oe+y):c+oe+(m===-2?a:y)}return[Pi(s,o+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},lt=class s{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let o=0,n=0,a=t.length-1,c=this.parts,[d,u]=Hi(t,e);if(this.el=s.createElement(d,r),Ee.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=Ee.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let m of i.getAttributeNames())if(m.endsWith(Dr)){let f=u[n++],y=i.getAttribute(m).split(oe),x=/([.?@])?(.*)/.exec(f);c.push({type:1,index:o,name:x[2],strings:y,ctor:x[1]==="."?Wt:x[1]==="?"?Xt:x[1]==="@"?Yt:ke}),i.removeAttribute(m)}else m.startsWith(oe)&&(c.push({type:6,index:o}),i.removeAttribute(m));if(Ni.test(i.tagName)){let m=i.textContent.split(oe),f=m.length-1;if(f>0){i.textContent=Bt?Bt.emptyScript:"";for(let y=0;y<f;y++)i.append(m[y],nt()),Ee.nextNode(),c.push({type:2,index:++o});i.append(m[f],nt())}}}else if(i.nodeType===8)if(i.data===Ir)c.push({type:2,index:o});else{let m=-1;for(;(m=i.data.indexOf(oe,m+1))!==-1;)c.push({type:7,index:o}),m+=oe.length-1}o++}}static createElement(t,e){let r=Ce.createElement("template");return r.innerHTML=t,r}};function _e(s,t,e=s,r){if(t===R)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,o=at(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(s),i._$AT(s,e,r)),r!==void 0?(e._$Co??(e._$Co=[]))[r]=i:e._$Cl=i),i!==void 0&&(t=_e(s,i._$AS(s,t.values),i,r)),t}var jt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??Ce).importNode(e,!0);Ee.currentNode=i;let o=Ee.nextNode(),n=0,a=0,c=r[0];for(;c!==void 0;){if(n===c.index){let d;c.type===2?d=new De(o,o.nextSibling,this,t):c.type===1?d=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(d=new Gt(o,this,t)),this._$AV.push(d),c=r[++a]}n!==c?.index&&(o=Ee.nextNode(),n++)}return Ee.currentNode=Ce,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},De=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=_e(this,t,e),at(t)?t===k||t==null||t===""?(this._$AH!==k&&this._$AR(),this._$AH=k):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ii(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==k&&at(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ce.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=lt.createElement(Pi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else{let o=new jt(i,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=Di.get(t.strings);return e===void 0&&Di.set(t.strings,e=new lt(t)),e}k(t){Nr(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let o of t)i===e.length?e.push(r=new s(this.O(nt()),this.O(nt()),this,this.options)):r=e[i],r._$AI(o),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let r=t.nextSibling;t.remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},ke=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,o){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=k}_$AI(t,e=this,r,i){let o=this.strings,n=!1;if(o===void 0)t=_e(this,t,e,0),n=!at(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{let a=t,c,d;for(t=o[0],c=0;c<o.length-1;c++)d=_e(this,a[r+c],e,c),d===R&&(d=this._$AH[c]),n||(n=!at(d)||d!==this._$AH[c]),d===k?t=k:t!==k&&(t+=(d??"")+o[c+1]),this._$AH[c]=d}n&&!i&&this.j(t)}j(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Wt=class extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===k?void 0:t}},Xt=class extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==k)}},Yt=class extends ke{constructor(t,e,r,i,o){super(t,e,r,i,o),this.type=5}_$AI(t,e=this){if((t=_e(this,t,e,0)??k)===R)return;let r=this._$AH,i=t===k&&r!==k||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==k&&(r===k||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Gt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){_e(this,t)}},M={M:Dr,P:oe,A:Ir,C:1,L:Hi,R:jt,D:Ii,V:_e,I:De,H:ke,N:Xt,U:Yt,B:Wt,F:Gt},io=$e.litHtmlPolyfillSupport;io?.(lt,De),($e.litHtmlVersions??($e.litHtmlVersions=[])).push("3.2.1");var Or=(s,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let o=e?.renderBefore??null;r._$litPart$=i=new De(t.insertBefore(nt(),o),o,void 0,e??{})}return i._$AI(s),i};var v=class extends se{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;let t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Or(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return R}};v._$litElement$=!0,v.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:v});var so=globalThis.litElementPolyfillSupport;so?.({LitElement:v});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var g=s=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(s,t)}):customElements.define(s,t)};var oo={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Ft},no=(s=oo,t,e)=>{let{kind:r,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(e.name,s),r==="accessor"){let{name:n}=e;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,c,s)},init(a){return a!==void 0&&this.P(n,void 0,s),a}}}if(r==="setter"){let{name:n}=e;return function(a){let c=this[n];t.call(this,a),this.requestUpdate(n,c,s)}}throw Error("Unsupported decorator location: "+r)};function p(s){return(t,e)=>typeof e=="object"?no(s,t,e):((r,i,o)=>{let n=i.hasOwnProperty(o);return i.constructor.createProperty(o,n?{...r,wrapped:!0}:r),n?Object.getOwnPropertyDescriptor(i,o):void 0})(s,t,e)}function q(s){return p({...s,state:!0,attribute:!1})}var pe=(s,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(s,t,e),e);function Ie(s,t){return(e,r,i)=>{let o=n=>n.renderRoot?.querySelector(s)??null;if(t){let{get:n,set:a}=typeof r=="object"?e:i??(()=>{let c=Symbol();return{get(){return this[c]},set(d){this[c]=d}}})();return pe(e,r,{get(){let c=n.call(this);return c===void 0&&(c=o(this),(c!==null||this.hasUpdated)&&a.call(this,c)),c}})}return pe(e,r,{get(){return o(this)}})}}function Oi(s){return(t,e)=>{let{slot:r,selector:i}=s??{},o="slot"+(r?`[name=${r}]`:":not([name])");return pe(t,e,{get(){let n=this.renderRoot?.querySelector(o),a=n?.assignedElements(s)??[];return i===void 0?a:a.filter(c=>c.matches(i))}})}}var B=Symbol("test"),Kt=Symbol("testElement");var Vi={fromAttribute(s){return s==="true"},toAttribute(s){return s?"true":"false"}},j=class extends v{constructor(){super(...arguments);this.weigths=new Map}createRenderRoot(){return this}get assessmentItem(){return this.renderRoot?.querySelector("qti-assessment-item")}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-item-ref-connected",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href,category:this.category}}))}render(){return h`${this.xmlDoc}`}};l([p({type:String})],j.prototype,"category",2),l([p({type:String})],j.prototype,"identifier",2),l([p({type:Boolean,converter:Vi})],j.prototype,"required",2),l([p({type:Boolean,converter:Vi})],j.prototype,"fixed",2),l([p({type:String})],j.prototype,"href",2),l([T({context:B,subscribe:!0})],j.prototype,"_testContext",2),l([p({type:Object,attribute:!1})],j.prototype,"xmlDoc",2);customElements.get("qti-assessment-item-ref")||customElements.define("qti-assessment-item-ref",j);var Vr={fromAttribute(s){return s==="true"},toAttribute(s){return s?"true":"false"}},W=class extends v{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-assessment-section-connected",{bubbles:!0,composed:!0}))}render(){return h`<slot name="qti-rubric-block"></slot><slot></slot>`}};l([p({type:String})],W.prototype,"identifier",2),l([p({type:String})],W.prototype,"required",2),l([p({type:Boolean,converter:Vr})],W.prototype,"fixed",2),l([p({type:String})],W.prototype,"title",2),l([p({type:Boolean,converter:Vr})],W.prototype,"visible",2),l([p({type:Boolean,converter:Vr,attribute:"keep-together"})],W.prototype,"keepTogether",2),l([T({context:B,subscribe:!0})],W.prototype,"_testContext",2);customElements.get("qti-assessment-section")||customElements.define("qti-assessment-section",W);var Te=class extends v{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-test-connected",{detail:this,bubbles:!0,composed:!0}))}render(){return h` <slot></slot>`}};l([p({type:String})],Te.prototype,"identifier",2),l([p({type:String})],Te.prototype,"title",2),l([T({context:B,subscribe:!0})],Te.prototype,"_testContext",2),Te=l([g("qti-assessment-test")],Te);var X=class extends v{constructor(){super(...arguments);this.identifier="";this.title="";this.class="";this.NavigationMode="nonlinear";this.submissionMode="individual"}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-test-part-connected",{bubbles:!0,composed:!0}))}render(){return h` <slot></slot>`}};l([p({type:String})],X.prototype,"identifier",2),l([p({type:String})],X.prototype,"title",2),l([p({type:String})],X.prototype,"class",2),l([p({type:String,attribute:"navigation-mode"})],X.prototype,"NavigationMode",2),l([p({type:String,attribute:"submission-mode"})],X.prototype,"submissionMode",2),X=l([g("qti-test-part")],X);customElements.get("qti-test-part")||customElements.define("qti-test-part",X);var ao=String.raw,lo=ao`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
+ <xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
6
+ <xsl:template match="@*|node()">
7
+ <xsl:copy>
8
+ <xsl:apply-templates select="@*|node()"/>
9
+ </xsl:copy>
10
+ </xsl:template>
11
+
12
+ <!-- remove existing namespaces -->
13
+ <xsl:template match="*">
14
+ <!-- remove element prefix -->
15
+ <xsl:element name="{local-name()}">
16
+ <!-- process attributes -->
17
+ <xsl:for-each select="@*">
18
+ <!-- remove attribute prefix -->
19
+ <xsl:attribute name="{local-name()}">
20
+ <xsl:value-of select="."/>
21
+ </xsl:attribute>
22
+ </xsl:for-each>
23
+ <xsl:apply-templates/>
24
+ </xsl:element>
25
+ </xsl:template>
26
+ </xsl:stylesheet>`;function zi(s,t,e){s.querySelectorAll(t).forEach(r=>{let i=`${t}-${e}`,o=Fi(r,i);r.replaceWith(o)})}function Ui(s,t){s.querySelectorAll("*").forEach(e=>{let r=e.classList;r&&r.forEach(i=>{if(i.startsWith(`${t}:`)){let o=i.slice(`${t}:`.length),n=`${e.nodeName}-${o}`,a=Fi(e,n);e.replaceWith(a)}})})}function Fi(s,t){let e=document.createElement(t);for(let r of s.attributes)e.setAttribute(r.name,r.value);for(;s.firstChild;)e.appendChild(s.firstChild);return e}function Bi(s){let t=[];return s.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let r=e.getAttribute("identifier"),i=e.getAttribute("href"),o=e.getAttribute("category");t.push({identifier:r,href:i,category:o})}),t}var zr=null;function ct(s,t=!1){return t&&zr!==null&&zr.abort(),new Promise((e,r)=>{let i=new XMLHttpRequest;zr=i,i.open("GET",s,!0),i.responseType="document",i.onload=()=>{i.status>=200&&i.status<300?e(i.responseXML):r(i.statusText)},i.onerror=()=>{r(i.statusText)},i.send()})}function dt(s){return new DOMParser().parseFromString(s,"text/xml")}function Ne(s){let t=new XSLTProcessor,e=new DOMParser().parseFromString(lo,"text/xml");return t.importStylesheet(e),t.transformToFragment(s,document)}function ji(s,t){t.endsWith("/")||(t+="/"),s.querySelectorAll("[src],[href],[primary-path]").forEach(e=>{let r="";e.getAttribute("src")&&(r="src"),e.getAttribute("href")&&(r="href"),e.getAttribute("primary-path")&&(r="primary-path");let i=e.getAttribute(r)?.trim();if(!i.startsWith("data:")&&!i.startsWith("http")){let o=t+encodeURI(i);e.setAttribute(r,o)}})}function Wi(s){s.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let r=document.createComment(e.textContent);e.replaceChild(r,e.firstChild)})}function Xi(s){s.querySelectorAll("qti-stylesheet").forEach(t=>t.remove())}var Zt=()=>{let s,t={async load(e,r=!1){return new Promise(i=>{ct(e,r).then(o=>(s=o,t.path(e.substring(0,e.lastIndexOf("/"))),i(t)))})},parse(e){return s=dt(e),t},path:e=>(ji(s,e),t),fn(e){return e(s),t},pciHooks(e){let r=["hook","module"],i=e.substring(0,e.lastIndexOf("/"));for(let o of r)s.querySelectorAll("["+o+"]").forEach(a=>{let c=a.getAttribute(o);!c.startsWith("data:")&&!c.startsWith("http")&&(a.setAttribute("base-url",e),a.setAttribute("module",i+"/"+encodeURI(c+(c.endsWith(".js")?"":".js"))))});return t},extendElementName:(e,r)=>(zi(s,e,r),t),extendElementsWithClass:(e="extend")=>(Ui(s,e),t),customInteraction(e,r){let i=s.querySelector("qti-custom-interaction"),o=i.querySelector("object");return i.setAttribute("data-base-ref",e),i.setAttribute("data-base-item",e+r),i.setAttribute("data",o.getAttribute("data")),i.setAttribute("width",o.getAttribute("width")),i.setAttribute("height",o.getAttribute("height")),i.removeChild(o),t},convertCDATAtoComment(){return Wi(s),t},stripStyleSheets(){return Xi(s),t},html(){return new XMLSerializer().serializeToString(Ne(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Ne(s)},xmlDoc(){return s}};return t};var Yi=()=>{let s,t={async load(e){return new Promise((r,i)=>{ct(e).then(o=>(s=o,r(t)))})},parse(e){return s=dt(e),t},fn(e){return e(s),t},items(){return Bi(s)},html(){return new XMLSerializer().serializeToString(Ne(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Ne(s)},xmlDoc(){return s}};return t};var Gi=s=>{class t extends s{constructor(...i){super(...i);this.testURL="";this.addEventListener("qti-load-test-request",o=>{let{testURL:n}=o.detail;n?this.testURL=n:console.warn("No test found, there should be an attribute test-url with the path to the test on the test-container"),o.detail.promise=(async()=>(o.preventDefault(),(await Yi().load(`${this.testURL}`)).htmlDoc()))()}),this.addEventListener("qti-assessment-test-connected",()=>{}),this.addEventListener("qti-load-item-request",({detail:o})=>{this.testURL&&(o.promise=(async()=>(await Zt().load(`${this.testURL.slice(0,this.testURL.lastIndexOf("/"))}/${o.href}`,o.cancelPreviousRequest)).htmlDoc())())}),this.addEventListener("qti-interaction-changed",o=>{}),this.addEventListener("qti-outcome-changed",()=>{})}}return t};var Ki=s=>{class t extends s{constructor(...r){super(...r),this.addEventListener("qti-request-test-item",({detail:i})=>{if(!i)return;this._clearLoadedItems();let o=this.testElement.el.querySelector(`qti-assessment-item-ref[identifier="${i}"]`),n=this._loadItemRequest(o.href,!1),a=o.closest("qti-test-part").identifier,c=o.closest("qti-assessment-section").identifier;this._testContext={...this._testContext,navPartId:a,navSectionId:c,navItemId:i,navItemLoading:!0},n?n.then(d=>{o.xmlDoc=d,requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("qti-item-connected",{bubbles:!0,composed:!0}))),this._testContext={...this._testContext,navItemLoading:!1}}).catch(d=>console.error("Failed to load item:",d)):console.info("Load item request was not handled:",o.href)}),this.addEventListener("qti-assessment-test-connected",()=>{let i=this._testContext.navItemId;i||(i=this.testElement.el.querySelector("qti-assessment-item-ref").identifier),this.dispatchEvent(new CustomEvent("qti-request-test-item",{detail:i,bubbles:!0,composed:!0}))})}_clearLoadedItems(){let r=this.testElement.el.querySelectorAll("qti-assessment-test qti-assessment-item-ref");Array.from(r).forEach(i=>{i.xmlDoc=null})}_loadItemRequest(r,i=!0){let o=new CustomEvent("qti-load-item-request",{bubbles:!0,composed:!0,detail:{href:r,promise:null,cancelPreviousRequest:i}});return this.dispatchEvent(o),o.detail.promise}}return t};var Zi=s=>{class t extends s{constructor(...r){super(...r),this._testContext={...this._testContext,view:"candidate"},this.addEventListener("on-test-switch-view",i=>{this._testContext={...this._testContext,view:i.detail},this._updateElementView()}),this.addEventListener("qti-assessment-test-connected",()=>{this._updateElementView()}),this.addEventListener("qti-assessment-item-connected",i=>{this._updateElementView(),this._setCorrectResponseVisibility(i.detail)})}willUpdate(r){super.willUpdate(r),r.has("_testContext")&&this._updateElementView()}_updateElementView(){if(this.testElement&&this.testElement.el){Array.from(this.testElement.el.querySelectorAll("[view]")).forEach(o=>{o.classList.toggle("show",o.getAttribute("view")===this._testContext.view)});let i=this.testElement.el.querySelector(`qti-assessment-item[identifier="${this._testContext.navItemId}"]`);i&&i.showCorrectResponse(this._testContext.view==="scorer")}}_setCorrectResponseVisibility(r){r.showCorrectResponse(this._testContext.view==="scorer")}}return t};var Pe=class extends v{constructor(){super();this._testContext={items:[],testOutcomeVariables:[]};this.testElement={el:null};this._updateItemInTestContext=e=>{let{identifier:r,variables:i}=e,o=this._testContext.items.find(n=>n?.identifier===r);if(!o){console.warn(`Item IDs between assessment.xml and item.xml should match: ${r} is not found!`);return}o.variables?.length===1?this._updateItemVariablesInTestContext(r,i):e.variables=[...o.variables||[]]};this.addEventListener("qti-assessment-test-connected",e=>{let r=e.detail,i=Array.from(r.querySelectorAll("qti-assessment-item-ref")).map(o=>({href:o.href,identifier:o.identifier,category:o.category,variables:[{identifier:"completionStatus",value:"not_attempted",type:"outcome"}]}));this.testElement={el:r},this._testContext={...this._testContext,items:i}}),this.addEventListener("qti-assessment-item-connected",e=>{this._updateItemInTestContext(e.detail)}),this.addEventListener("qti-outcome-changed",e=>{let r=e.composedPath()[0];this._updateItemVariablesInTestContext(r.identifier,r.variables)})}get context(){return this._testContext}set context(e){e!=null&&(this._testContext={...e},e.items?.forEach(r=>{let i=this._testContext.items.find(o=>o.identifier===r.identifier);i?i.variables=r.variables:this._testContext.items.push(r)}))}_updateItemVariablesInTestContext(e,r){this._testContext={...this._testContext,items:this._testContext.items.map(i=>i.identifier!==e?i:{...i,variables:r.map(o=>{let n=i.variables.find(a=>a.identifier===o.identifier);return n?{...n,...o}:o})})}}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-test","")}};l([q(),Le({context:B})],Pe.prototype,"_testContext",2),l([q(),Le({context:Kt})],Pe.prototype,"testElement",2);var Jt=class extends Gi(Ki(Zi(Pe))){connectedCallback(){super.connectedCallback();let t=this.querySelector(":scope > template");t&&this.shadowRoot?.appendChild(t.content)}render(){return h`<slot></slot>`}};Jt=l([g("qti-test")],Jt);var Ji=b`
27
+ display: inline-flex;
28
+ align-items: center;
29
+ cursor: pointer;
30
+ padding: 0.5rem 1rem;
31
+ border-radius: 0.25rem;
32
+ user-select: none;
33
+ `,Qt=b`
34
+ background-color: lightgray;
35
+ ${Ji};
36
+ `,er=b`
37
+ cursor: not-allowed;
38
+ opacity: 0.5;
39
+ `,_l=b`
40
+ ${Ji};
41
+ border: 1px solid gray;
42
+ `;function tr(s,t){let e;return(r,i)=>{let{connectedCallback:o,disconnectedCallback:n}=r;r.connectedCallback=function(){o.call(this);let a=d=>{let u=Array.from(this.querySelectorAll(s)).concat(Array.from(this.shadowRoot?.querySelectorAll(s)||[]));for(let m of d){let f=Array.from(m.addedNodes).map(x=>x),y=Array.from(m.addedNodes).map(x=>x);m.type==="childList"&&f.find(x=>u.includes(x))&&this[i](f,y)}};e=new MutationObserver(a),e.observe(this,{childList:!0,subtree:!0});let c=Array.from(this.querySelectorAll(s)).concat(Array.from(this.shadowRoot?.querySelectorAll(s)||[]));this[i](Array.from(c),[])},r.disconnectedCallback=function(){n.call(this),e.disconnect()}}}function A(s,t){let e={waitUntilFirstUpdate:!1,...t};return(r,i)=>{let{update:o}=r,n=Array.isArray(s)?s:[s];r.update=function(a){n.forEach(c=>{let d=c;if(a.has(d)){let u=a.get(d),m=this[d];u!==m&&(!e.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,m)}}),o.call(this,a)}}}function es(s){return(t,e)=>{p(s)(t,e);let r=`__${e}`;Object.defineProperty(t,e,{get(){return this[r]},set(i){let o=this[r];if(this[r]=i,o!==i){if(this._internals?.states){let n=e.toLowerCase();i?this._internals.states.add(`--${n}`):this._internals.states.delete(`--${n}`)}if(s.aria&&this._internals){let n=s.aria;i?this._internals[n]="true":this._internals[n]=null}this.requestUpdate(e,o)}},configurable:!0,enumerable:!0})}}var L=class extends v{constructor(){super();this.disabled=!0;this._internals=this.attachInternals()}_handleTestElementChange(e,r){r.el&&(this.disabled=!1)}willUpdate(e){if(e.has("_testContext")){let{items:r=[],navItemId:i}=this._testContext??{};this.itemIndex=r.findIndex(o=>o.identifier===i),this.items=r,this.view=this._testContext?.view}}_switchView(e){this.dispatchEvent(new CustomEvent("on-test-switch-view",{composed:!0,bubbles:!0,detail:e}))}_requestItem(e){this.dispatchEvent(new CustomEvent("qti-request-test-item",{composed:!0,bubbles:!0,detail:e}))}};l([es({type:Boolean,reflect:!0,aria:"ariaDisabled"})],L.prototype,"disabled",2),l([q(),T({context:B,subscribe:!0})],L.prototype,"_testContext",2),l([q(),T({context:Kt,subscribe:!0})],L.prototype,"_testElement",2),l([A("_testElement")],L.prototype,"_handleTestElementChange",1);var pt=class extends L{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",t=>{t.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex+1].identifier)})}willUpdate(t){super.willUpdate(t),t.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex<0||this.itemIndex>=this.items.length-1)}render(){return h`<slot></slot>`}};pt.styles=b`
43
+ :host {
44
+ ${Qt};
45
+ }
46
+ :host([disabled]) {
47
+ ${er};
48
+ }
49
+ `,pt=l([g("test-next")],pt);var ht=class extends L{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",t=>{t.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex-1].identifier)})}willUpdate(t){super.willUpdate(t),t.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex===0||this.itemIndex===-1)}render(){return h`<slot></slot>`}};ht.styles=b`
50
+ :host {
51
+ ${Qt};
52
+ }
53
+ :host([disabled]) {
54
+ ${er};
55
+ }
56
+ `,ht=l([g("test-prev")],ht);var Y=class extends L{constructor(){super(...arguments);this.label="view";this.viewOptions="";this._handleViewOptionsChange=(e,r)=>{console.log(r)};this._viewOptions=Y.DEFAULT_VIEW_OPTIONS}render(){return h`
57
+ <label part="label" for="viewSelect">${this.label}</label>
58
+ <select
59
+ part="select"
60
+ id="viewSelect"
61
+ .disabled=${this.disabled}
62
+ @change=${e=>{let r=e.target;this._switchView(r.value)}}
63
+ >
64
+ ${this._viewOptions.map(e=>h`<option value="${e}" ?selected=${e===this.view}>${e}</option>`)}
65
+ </select>
66
+ `}};Y.DEFAULT_VIEW_OPTIONS=["author","candidate","proctor","scorer","testConstructor","tutor"],l([p({type:String})],Y.prototype,"label",2),l([p({type:String,attribute:"view-options"})],Y.prototype,"viewOptions",2),l([A("viewOptions")],Y.prototype,"_handleViewOptionsChange",2),Y=l([g("test-view")],Y);var ut=class extends L{constructor(){super();this.itemId=null;this.addEventListener("click",()=>this._requestItem(this.itemId))}render(){return h` <slot></slot> `}};l([p({type:String,attribute:"item-id"})],ut.prototype,"itemId",2),ut=l([g("test-item-link")],ut);var{I:co}=M,rs=s=>s===null||typeof s!="object"&&typeof s!="function";var is=s=>s.strings===void 0,ts=()=>document.createComment(""),He=(s,t,e)=>{let r=s._$AA.parentNode,i=t===void 0?s._$AB:t._$AA;if(e===void 0){let o=r.insertBefore(ts(),i),n=r.insertBefore(ts(),i);e=new co(o,n,s,s.options)}else{let o=e._$AB.nextSibling,n=e._$AM,a=n!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==n._$AU&&e._$AP(c)}if(o!==i||a){let c=e._$AA;for(;c!==o;){let d=c.nextSibling;r.insertBefore(c,i),c=d}}}return e},he=(s,t,e=s)=>(s._$AI(t,e),s),po={},ss=(s,t=po)=>s._$AH=t,os=s=>s._$AH,rr=s=>{s._$AP?.(!1,!0);let t=s._$AA,e=s._$AB.nextSibling;for(;t!==e;){let r=t.nextSibling;t.remove(),t=r}};var ue={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},F=s=>(...t)=>({_$litDirective$:s,values:t}),G=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var mt=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let r of e)r._$AO?.(t,!1),mt(r,t);return!0},ir=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ns=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),mo(t)}};function ho(s){this._$AN!==void 0?(ir(this),this._$AM=s,ns(this)):this._$AM=s}function uo(s,t=!1,e=0){let r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let o=e;o<r.length;o++)mt(r[o],!1),ir(r[o]);else r!=null&&(mt(r,!1),ir(r));else mt(this,s)}var mo=s=>{s.type==ue.CHILD&&(s._$AP??(s._$AP=uo),s._$AQ??(s._$AQ=ho))},Oe=class extends G{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),ns(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(mt(this,t),ir(this))}setValue(t){if(is(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var sr=class{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}},or=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??(this.Z=new Promise(t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}};var as=s=>!rs(s)&&typeof s.then=="function",ls=1073741823,Ur=class extends Oe{constructor(){super(...arguments),this._$Cwt=ls,this._$Cbt=[],this._$CK=new sr(this),this._$CX=new or}render(...t){return t.find(e=>!as(e))??R}update(t,e){let r=this._$Cbt,i=r.length;this._$Cbt=e;let o=this._$CK,n=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<e.length&&!(a>this._$Cwt);a++){let c=e[a];if(!as(c))return this._$Cwt=a,c;a<i&&c===r[a]||(this._$Cwt=ls,i=0,Promise.resolve(c).then(async d=>{for(;n.get();)await n.get();let u=o.deref();if(u!==void 0){let m=u._$Cbt.indexOf(c);m>-1&&m<u._$Cwt&&(u._$Cwt=m,u.setValue(d))}}))}return R}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},cs=F(Ur);var ds=`@layer qti-base, qti-components, qti-utilities, qti-variants, qti-extended;
67
+
68
+ :root,
69
+ :host {
70
+ /* Active colors */
71
+ --qti-bg-active: #ffecec;
72
+ --qti-border-active: #f86d70;
73
+
74
+ /* Gap size */
75
+ --qti-gap-size: 1rem;
76
+
77
+ /* Background colors */
78
+ --qti-bg: white;
79
+ --qti-hover-bg: #f9fafb;
80
+
81
+ /* Light theme colors */
82
+ --qti-light-bg-active: #f0f0f0; /* Light gray */
83
+ --qti-light-border-active: #d0d0d0; /* Medium gray */
84
+
85
+ /* Dark theme colors */
86
+ --qti-dark-bg-active: #1f2937; /* Dark gray */
87
+ --qti-dark-border-active: #64748b; /* Medium gray */
88
+
89
+ /* Disabled colors */
90
+ --qti-disabled-bg: #f3f4f6;
91
+ --qti-disabled-color: #45484f;
92
+
93
+ /* Border properties */
94
+ --qti-border-thickness: 2px;
95
+ --qti-border-style: solid;
96
+ --qti-border-color: #c6cad0;
97
+ --qti-border-radius: 0.3rem;
98
+ --qti-drop-border-radius: calc(var(--qti-border-radius) + var(--qti-border-thickness));
99
+
100
+ /* Focus & active states */
101
+ --qti-focus-border-width: 5px;
102
+ --qti-focus-color: #bddcff7e;
103
+
104
+ /* Class-specific variables */
105
+
106
+ /* Form elements */
107
+ --qti-form-size: 1rem;
108
+
109
+ /* Point elements */
110
+ --qti-point-size: 2rem;
111
+
112
+ /* Order buttons */
113
+ --qti-order-size: 2rem;
114
+
115
+ /* Generic padding for all elements */
116
+ --qti-padding-vertical: 0.5rem; /* py-2 */
117
+ --qti-padding-horizontal: 0.5rem; /* px-2 */
118
+ }
119
+
120
+ /* SVG masks and backgrounds */
121
+
122
+ .chevron {
123
+ background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
124
+ no-repeat center right 6px;
125
+ }
126
+
127
+ .handle {
128
+ background-image: radial-gradient(
129
+ circle at center,
130
+ rgb(0 0 0 / 10%) 0,
131
+ rgb(0 0 0 / 20%) 2px,
132
+ rgb(255 255 255 / 0%) 2px,
133
+ rgb(255 255 255 / 0%) 100%
134
+ );
135
+ background-repeat: repeat-y;
136
+ background-position: left center;
137
+ background-size: 14px 8px;
138
+ }
139
+
140
+ .check-mask {
141
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
142
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
143
+ }
144
+
145
+ /*
146
+ Following are classes that can be applied to elements and element states, so they are not used directly
147
+ The @apply directive is used to apply these classes to elements
148
+ */
149
+
150
+ /* Apply .bordered to an element */
151
+
152
+ .bordered {
153
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
154
+ outline: none;
155
+ }
156
+
157
+ /* Apply .form rules for checkbox and radiobutton */
158
+
159
+ .form {
160
+
161
+ display: grid;
162
+ place-content: center;
163
+ width: var(--qti-form-size);
164
+ height: var(--qti-form-size);
165
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
166
+ outline: none;
167
+ }
168
+
169
+ /* Apply .button rules for button-like elements, such as drags and buttons */
170
+
171
+ .button {
172
+
173
+ border-radius: var(--qti-border-radius);
174
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
175
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
176
+ outline: none;
177
+ }
178
+
179
+ /* Apply .select for the select dropdown element */
180
+
181
+ .select {
182
+
183
+ border-radius: var(--qti-border-radius);
184
+ position: relative;
185
+ -webkit-appearance: none;
186
+ -moz-appearance: none;
187
+ appearance: none;
188
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
189
+ padding-right: calc(var(--qti-padding-horizontal) + 1.5rem); /* 1.5rem for the chevron */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
190
+ no-repeat center right 6px;
191
+ }
192
+
193
+ /* Apply .text for the input text and textarea */
194
+
195
+ .text {
196
+
197
+ border-radius: 0;
198
+ cursor: text;
199
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
200
+ background: unset;
201
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
202
+ outline: none;
203
+ }
204
+
205
+ /* Apply .spot for hotspot shapes */
206
+
207
+ .spot {
208
+
209
+ width: 100%;
210
+ height: 100%;
211
+ background-color: transparent;
212
+ padding: 0;
213
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
214
+ outline: none;
215
+ }
216
+
217
+ /* Apply .point for circular small hotspots */
218
+
219
+ .point {
220
+
221
+ border-radius: 100%;
222
+ width: var(--qti-point-size);
223
+ height: var(--qti-point-size);
224
+ background-color: transparent;
225
+ padding: 0;
226
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
227
+ outline: none;
228
+ }
229
+
230
+ /* Apply .drag for draggable elements */
231
+
232
+ .drag {
233
+
234
+ transition:
235
+ transform 200ms ease-out,
236
+ box-shadow 200ms ease-out,
237
+ rotate 200ms ease-out;
238
+ cursor: grab;
239
+ background-color: var(--qti-bg);
240
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
241
+ border-radius: var(--qti-border-radius);
242
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem) !important; /* 1.5rem for the drag */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background-image: radial-gradient(
243
+ circle at center,
244
+ rgb(0 0 0 / 10%) 0,
245
+ rgb(0 0 0 / 20%) 2px,
246
+ rgb(255 255 255 / 0%) 2px,
247
+ rgb(255 255 255 / 0%) 100%
248
+ ); background-repeat: repeat-y; background-position: left center; background-size: 14px 8px;
249
+ }
250
+
251
+ /* Apply .dragging for the dragging state of a draggable element */
252
+
253
+ .dragging {
254
+ pointer-events: none;
255
+ rotate: -2deg;
256
+ box-shadow:
257
+ 0 8px 12px rgb(0 0 0 / 20%),
258
+ 0 4px 8px rgb(0 0 0 / 10%);
259
+ }
260
+
261
+ /* Apply .drop for an element where you can drop the draggable */
262
+
263
+ .drop {
264
+
265
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
266
+ center no-repeat;
267
+ border-radius: var(--qti-border-radius);
268
+ position: relative;
269
+ background-color: var(--qti-bg);
270
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
271
+ outline: none;
272
+ }
273
+
274
+ /* Apply .dropping for an indicator where you can drop the draggable */
275
+
276
+ .dropping {
277
+ background-color: var(--qti-bg-active);
278
+ }
279
+
280
+ /* Apply .order for a small circular button */
281
+
282
+ .order {
283
+
284
+ display: grid;
285
+ place-content: center;
286
+
287
+ /* background-color: var(--qti-bg-active); */
288
+ border-radius: 100%;
289
+ width: var(--qti-order-size);
290
+ height: var(--qti-order-size);
291
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
292
+ outline: none;
293
+ }
294
+
295
+ /* Apply .check-size for radio and checkbox size */
296
+
297
+ .check-size {
298
+ width: calc(var(--qti-form-size) - 6px);
299
+ height: calc(var(--qti-form-size) - 6px);
300
+ }
301
+
302
+ /* Apply .check for checkbox */
303
+
304
+ .check {
305
+ gap: 0.5rem;
306
+ border-radius: var(--qti-border-radius);
307
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
308
+ outline: none;
309
+ cursor: pointer;
310
+ }
311
+
312
+ /* Apply .check-radio for outer circle of the radio buttons */
313
+
314
+ .check-radio {
315
+
316
+ border-radius: 100%;
317
+
318
+ display: grid;
319
+
320
+ place-content: center;
321
+
322
+ width: var(--qti-form-size);
323
+
324
+ height: var(--qti-form-size);
325
+
326
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
327
+
328
+ outline: none;
329
+ }
330
+
331
+ /* Apply .check-radio-checked for the inner checked radio */
332
+
333
+ .check-radio-checked {
334
+ background-color: var(--qti-border-active);
335
+ border-radius: 100%;
336
+ }
337
+
338
+ /* Apply .check-checkbox for outer square of the checkbox */
339
+
340
+ .check-checkbox {
341
+
342
+ display: flex;
343
+ place-items: center;
344
+ border-radius: var(--qti-border-radius);
345
+ display: grid;
346
+ place-content: center;
347
+ width: var(--qti-form-size);
348
+ height: var(--qti-form-size);
349
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
350
+ outline: none;
351
+ }
352
+
353
+ /* Apply .check-checkbox-checked for the inner checkmark */
354
+
355
+ .check-checkbox-checked {
356
+ background-color: var(--qti-border-active);
357
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
358
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
359
+ }
360
+
361
+ /* Apply .hov for hover state */
362
+
363
+ .hov {
364
+ background-color: var(--qti-hover-bg);
365
+ }
366
+
367
+ /* Apply .foc for focus state */
368
+
369
+ .foc {
370
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
371
+ }
372
+
373
+ /* Apply .act for active state */
374
+
375
+ .act {
376
+ border-color: var(--qti-border-active);
377
+ background-color: var(--qti-bg-active);
378
+ }
379
+
380
+ .act-bg {
381
+ background-color: var(--qti-bg-active);
382
+ }
383
+
384
+ .act-bor {
385
+ border-color: var(--qti-border-active);
386
+ }
387
+
388
+ /* Apply .rdo for readonly state */
389
+
390
+ .rdo {
391
+ cursor: pointer;
392
+ background-color: var(--qti-bg);
393
+ outline: 0;
394
+ border: none;
395
+ }
396
+
397
+ /* Apply .dis for disabled state */
398
+
399
+ .dis {
400
+ cursor: not-allowed;
401
+ background-color: var(--qti-disabled-bg);
402
+ color: var(--qti-disabled-color);
403
+ border-color: var(--qti-border-color);
404
+ outline: 4px solid var(--qti-disabled-bg);
405
+ }
406
+
407
+ /* base */
408
+
409
+ /* ============================
410
+ QTI 3 shared css
411
+ 1. Display
412
+ 2. Special Flex styles
413
+ 3. Margin
414
+ 4. Padding
415
+ 5. Horizontal Alignment styles
416
+ 6. Vertical Alignment styles
417
+ 7. Height
418
+ 8. Width
419
+ 9. Text-Indent
420
+ 10. List Style
421
+ 11. Layout
422
+ 12. Other QTI 3 presentation utilities
423
+ ============================ */
424
+
425
+ /* ==========
426
+ Display css
427
+ =========== */
428
+
429
+ .qti-display-inline {
430
+ display: inline;
431
+ }
432
+
433
+ .qti-display-inline-block {
434
+ display: inline-block;
435
+ }
436
+
437
+ .qti-display-block {
438
+ display: block;
439
+ }
440
+
441
+ .qti-display-flex {
442
+ display: flexbox;
443
+ display: flex;
444
+ }
445
+
446
+ .qti-display-inline-flex {
447
+ display: inline-flex;
448
+ }
449
+
450
+ .qti-display-grid {
451
+ display: grid;
452
+ }
453
+
454
+ .qti-display-inline-grid {
455
+ display: inline-grid;
456
+ }
457
+
458
+ .qti-display-table {
459
+ display: table;
460
+ }
461
+
462
+ .qti-display-table-cell {
463
+ display: table-cell;
464
+ }
465
+
466
+ .qti-display-table-row {
467
+ display: table-row;
468
+ }
469
+
470
+ .qti-display-list-item {
471
+ display: list-item;
472
+ }
473
+
474
+ .qti-display-inherit {
475
+ display: inherit;
476
+ }
477
+
478
+ /*
479
+ * hidden to screen readers and sighted
480
+ */
481
+
482
+ .qti-hidden {
483
+ display: none;
484
+ }
485
+
486
+ /*
487
+ * visible to screen readers, hidden to sighted
488
+ */
489
+
490
+ .qti-visually-hidden {
491
+ position: fixed !important;
492
+ overflow: hidden;
493
+ clip: rect(1px 1px 1px 1px);
494
+ height: 1px;
495
+ width: 1px;
496
+ border: 0;
497
+ margin: -1px;
498
+ }
499
+
500
+ /* =============================
501
+ Special flex styles
502
+ ============================= */
503
+
504
+ .qti-flex-direction-column {
505
+ flex-direction: column;
506
+ }
507
+
508
+ .qti-flex-direction-row {
509
+ flex-direction: row;
510
+ }
511
+
512
+ .qti-flex-grow-1 {
513
+ flex-grow: 1;
514
+ }
515
+
516
+ .qti-flex-grow-0 {
517
+ flex-grow: 0;
518
+ }
519
+
520
+ /* =========
521
+ Margin css
522
+ ========== */
523
+
524
+ /**
525
+ * For margin Top and Bottom and Left and Right
526
+ */
527
+
528
+ .qti-margin-0 {
529
+ margin: 0 !important;
530
+ }
531
+
532
+ .qti-margin-1 {
533
+ margin: 0.25rem !important;
534
+ }
535
+
536
+ .qti-margin-2 {
537
+ margin: 0.5rem !important;
538
+ }
539
+
540
+ .qti-margin-3 {
541
+ margin: 1rem !important;
542
+ }
543
+
544
+ .qti-margin-4 {
545
+ margin: 1.5rem !important;
546
+ }
547
+
548
+ .qti-margin-5 {
549
+ margin: 3rem !important;
550
+ }
551
+
552
+ .qti-margin-auto {
553
+ margin: auto !important;
554
+ }
555
+
556
+ /*
557
+ For margin Left and Right
558
+ */
559
+
560
+ .qti-margin-x-0 {
561
+ margin-right: 0 !important;
562
+ margin-left: 0 !important;
563
+ }
564
+
565
+ .qti-margin-x-1 {
566
+ margin-right: 0.25rem !important;
567
+ margin-left: 0.25rem !important;
568
+ }
569
+
570
+ .qti-margin-x-2 {
571
+ margin-right: 0.5rem !important;
572
+ margin-left: 0.5rem !important;
573
+ }
574
+
575
+ .qti-margin-x-3 {
576
+ margin-right: 1rem !important;
577
+ margin-left: 1rem !important;
578
+ }
579
+
580
+ .qti-margin-x-4 {
581
+ margin-right: 1.5rem !important;
582
+ margin-left: 1.5rem !important;
583
+ }
584
+
585
+ .qti-margin-x-5 {
586
+ margin-right: 3rem !important;
587
+ margin-left: 3rem !important;
588
+ }
589
+
590
+ .qti-margin-x-auto {
591
+ margin-right: auto !important;
592
+ margin-left: auto !important;
593
+ }
594
+
595
+ /*
596
+ For margin Top and Bottom
597
+ */
598
+
599
+ .qti-margin-y-0 {
600
+ margin-top: 0 !important;
601
+ margin-bottom: 0 !important;
602
+ }
603
+
604
+ .qti-margin-y-1 {
605
+ margin-top: 0.25rem !important;
606
+ margin-bottom: 0.25rem !important;
607
+ }
608
+
609
+ .qti-margin-y-2 {
610
+ margin-top: 0.5rem !important;
611
+ margin-bottom: 0.5rem !important;
612
+ }
613
+
614
+ .qti-margin-y-3 {
615
+ margin-top: 1rem !important;
616
+ margin-bottom: 1rem !important;
617
+ }
618
+
619
+ .qti-margin-y-4 {
620
+ margin-top: 1.5rem !important;
621
+ margin-bottom: 1.5rem !important;
622
+ }
623
+
624
+ .qti-margin-y-5 {
625
+ margin-top: 3rem !important;
626
+ margin-bottom: 3rem !important;
627
+ }
628
+
629
+ .qti-margin-y-auto {
630
+ margin-top: auto !important;
631
+ margin-bottom: auto !important;
632
+ }
633
+
634
+ /*
635
+ For margin Top
636
+ */
637
+
638
+ .qti-margin-t-0 {
639
+ margin-top: 0 !important;
640
+ }
641
+
642
+ .qti-margin-t-1 {
643
+ margin-top: 0.25rem !important;
644
+ }
645
+
646
+ .qti-margin-t-2 {
647
+ margin-top: 0.5rem !important;
648
+ }
649
+
650
+ .qti-margin-t-3 {
651
+ margin-top: 1rem !important;
652
+ }
653
+
654
+ .qti-margin-t-4 {
655
+ margin-top: 1.5rem !important;
656
+ }
657
+
658
+ .qti-margin-t-5 {
659
+ margin-top: 3rem !important;
660
+ }
661
+
662
+ .qti-margin-t-auto {
663
+ margin-top: auto !important;
664
+ }
665
+
666
+ /*
667
+ For margin Bottom
668
+ */
669
+
670
+ .qti-margin-b-0 {
671
+ margin-bottom: 0 !important;
672
+ }
673
+
674
+ .qti-margin-b-1 {
675
+ margin-bottom: 0.25rem !important;
676
+ }
677
+
678
+ .qti-margin-b-2 {
679
+ margin-bottom: 0.5rem !important;
680
+ }
681
+
682
+ .qti-margin-b-3 {
683
+ margin-bottom: 1rem !important;
684
+ }
685
+
686
+ .qti-margin-b-4 {
687
+ margin-bottom: 1.5rem !important;
688
+ }
689
+
690
+ .qti-margin-b-5 {
691
+ margin-bottom: 3rem !important;
692
+ }
693
+
694
+ .qti-margin-b-auto {
695
+ margin-bottom: auto !important;
696
+ }
697
+
698
+ /*
699
+ For margin Start LTR
700
+ */
701
+
702
+ .qti-margin-s-0 {
703
+ margin-left: 0 !important;
704
+ }
705
+
706
+ .qti-margin-s-1 {
707
+ margin-left: 0.25rem !important;
708
+ }
709
+
710
+ .qti-margin-s-2 {
711
+ margin-left: 0.5rem !important;
712
+ }
713
+
714
+ .qti-margin-s-3 {
715
+ margin-left: 1rem !important;
716
+ }
717
+
718
+ .qti-margin-s-4 {
719
+ margin-left: 1.5rem !important;
720
+ }
721
+
722
+ .qti-margin-s-5 {
723
+ margin-left: 3rem !important;
724
+ }
725
+
726
+ .qti-margin-s-auto {
727
+ margin-left: auto !important;
728
+ }
729
+
730
+ /*
731
+ For margin End LTR
732
+ */
733
+
734
+ .qti-margin-e-0 {
735
+ margin-right: 0 !important;
736
+ }
737
+
738
+ .qti-margin-e-1 {
739
+ margin-right: 0.25rem !important;
740
+ }
741
+
742
+ .qti-margin-e-2 {
743
+ margin-right: 0.5rem !important;
744
+ }
745
+
746
+ .qti-margin-e-3 {
747
+ margin-right: 1rem !important;
748
+ }
749
+
750
+ .qti-margin-e-4 {
751
+ margin-right: 1.5rem !important;
752
+ }
753
+
754
+ .qti-margin-e-5 {
755
+ margin-right: 3rem !important;
756
+ }
757
+
758
+ .qti-margin-e-auto {
759
+ margin-right: auto !important;
760
+ }
761
+
762
+ /* =========
763
+ Padding css
764
+ ========== */
765
+
766
+ /*
767
+ For padding Top and Bottom and Left and Right
768
+ */
769
+
770
+ .qti-padding-0 {
771
+ padding: 0 !important;
772
+ }
773
+
774
+ .qti-padding-1 {
775
+ padding: 0.25rem !important;
776
+ }
777
+
778
+ .qti-padding-2 {
779
+ padding: 0.5rem !important;
780
+ }
781
+
782
+ .qti-padding-3 {
783
+ padding: 1rem !important;
784
+ }
785
+
786
+ .qti-padding-4 {
787
+ padding: 1.5rem !important;
788
+ }
789
+
790
+ .qti-padding-5 {
791
+ padding: 3rem !important;
792
+ }
793
+
794
+ /*
795
+ For padding Left and Right
796
+ */
797
+
798
+ .qti-padding-x-0 {
799
+ padding-right: 0 !important;
800
+ padding-left: 0 !important;
801
+ }
802
+
803
+ .qti-padding-x-1 {
804
+ padding-right: 0.25rem !important;
805
+ padding-left: 0.25rem !important;
806
+ }
807
+
808
+ .qti-padding-x-2 {
809
+ padding-right: 0.5rem !important;
810
+ padding-left: 0.5rem !important;
811
+ }
812
+
813
+ .qti-padding-x-3 {
814
+ padding-right: 1rem !important;
815
+ padding-left: 1rem !important;
816
+ }
817
+
818
+ .qti-padding-x-4 {
819
+ padding-right: 1.5rem !important;
820
+ padding-left: 1.5rem !important;
821
+ }
822
+
823
+ .qti-padding-x-5 {
824
+ padding-right: 3rem !important;
825
+ padding-left: 3rem !important;
826
+ }
827
+
828
+ /*
829
+ For padding Top and Bottom
830
+ */
831
+
832
+ .qti-padding-y-0 {
833
+ padding-top: 0 !important;
834
+ padding-bottom: 0 !important;
835
+ }
836
+
837
+ .qti-padding-y-1 {
838
+ padding-top: 0.25rem !important;
839
+ padding-bottom: 0.25rem !important;
840
+ }
841
+
842
+ .qti-padding-y-2 {
843
+ padding-top: 0.5rem !important;
844
+ padding-bottom: 0.5rem !important;
845
+ }
846
+
847
+ .qti-padding-y-3 {
848
+ padding-top: 1rem !important;
849
+ padding-bottom: 1rem !important;
850
+ }
851
+
852
+ .qti-padding-y-4 {
853
+ padding-top: 1.5rem !important;
854
+ padding-bottom: 1.5rem !important;
855
+ }
856
+
857
+ .qti-padding-y-5 {
858
+ padding-top: 3rem !important;
859
+ padding-bottom: 3rem !important;
860
+ }
861
+
862
+ /*
863
+ For padding Top
864
+ */
865
+
866
+ .qti-padding-t-0 {
867
+ padding-top: 0 !important;
868
+ }
869
+
870
+ .qti-padding-t-1 {
871
+ padding-top: 0.25rem !important;
872
+ }
873
+
874
+ .qti-padding-t-2 {
875
+ padding-top: 0.5rem !important;
876
+ }
877
+
878
+ .qti-padding-t-3 {
879
+ padding-top: 1rem !important;
880
+ }
881
+
882
+ .qti-padding-t-4 {
883
+ padding-top: 1.5rem !important;
884
+ }
885
+
886
+ .qti-padding-t-5 {
887
+ padding-top: 3rem !important;
888
+ }
889
+
890
+ /*
891
+ For padding Bottom
892
+ */
893
+
894
+ .qti-padding-b-0 {
895
+ padding-bottom: 0 !important;
896
+ }
897
+
898
+ .qti-padding-b-1 {
899
+ padding-bottom: 0.25rem !important;
900
+ }
901
+
902
+ .qti-padding-b-2 {
903
+ padding-bottom: 0.5rem !important;
904
+ }
905
+
906
+ .qti-padding-b-3 {
907
+ padding-bottom: 1rem !important;
908
+ }
909
+
910
+ .qti-padding-b-4 {
911
+ padding-bottom: 1.5rem !important;
912
+ }
913
+
914
+ .qti-padding-b-5 {
915
+ padding-bottom: 3rem !important;
916
+ }
917
+
918
+ /*
919
+ For padding Start LTR
920
+ */
921
+
922
+ .qti-padding-s-0 {
923
+ padding-left: 0 !important;
924
+ }
925
+
926
+ .qti-padding-s-1 {
927
+ padding-left: 0.25rem !important;
928
+ }
929
+
930
+ .qti-padding-s-2 {
931
+ padding-left: 0.5rem !important;
932
+ }
933
+
934
+ .qti-padding-s-3 {
935
+ padding-left: 1rem !important;
936
+ }
937
+
938
+ .qti-padding-s-4 {
939
+ padding-left: 1.5rem !important;
940
+ }
941
+
942
+ .qti-padding-s-5 {
943
+ padding-left: 3rem !important;
944
+ }
945
+
946
+ /*
947
+ For padding End LTR
948
+ */
949
+
950
+ .qti-padding-e-0 {
951
+ padding-right: 0 !important;
952
+ }
953
+
954
+ .qti-padding-e-1 {
955
+ padding-right: 0.25rem !important;
956
+ }
957
+
958
+ .qti-padding-e-2 {
959
+ padding-right: 0.5rem !important;
960
+ }
961
+
962
+ .qti-padding-e-3 {
963
+ padding-right: 1rem !important;
964
+ }
965
+
966
+ .qti-padding-e-4 {
967
+ padding-right: 1.5rem !important;
968
+ }
969
+
970
+ .qti-padding-e-5 {
971
+ padding-right: 3rem !important;
972
+ }
973
+
974
+ /* ====================
975
+ Horizontal alignment
976
+ ==================== */
977
+
978
+ .qti-align-left {
979
+ text-align: left;
980
+ }
981
+
982
+ .qti-align-center {
983
+ text-align: center;
984
+ }
985
+
986
+ .qti-align-right {
987
+ text-align: right;
988
+ }
989
+
990
+ /* ==================
991
+ Vertical alignment
992
+ ================== */
993
+
994
+ .qti-valign-top {
995
+ vertical-align: top;
996
+ }
997
+
998
+ .qti-valign-middle {
999
+ vertical-align: middle;
1000
+ }
1001
+
1002
+ .qti-valign-baseline {
1003
+ vertical-align: baseline;
1004
+ }
1005
+
1006
+ .qti-valign-bottom {
1007
+ vertical-align: bottom;
1008
+ }
1009
+
1010
+ /* =============
1011
+ Height styles
1012
+ ============= */
1013
+
1014
+ .qti-height-0 {
1015
+ height: 0;
1016
+ }
1017
+
1018
+ .qti-height-px {
1019
+ height: 1px;
1020
+ }
1021
+
1022
+ .qti-height-0p5 {
1023
+ height: 0.125rem;
1024
+ }
1025
+
1026
+ .qti-height-1 {
1027
+ height: 0.25rem;
1028
+ }
1029
+
1030
+ .qti-height-1p5 {
1031
+ height: 0.375rem;
1032
+ }
1033
+
1034
+ .qti-height-2 {
1035
+ height: 0.5rem;
1036
+ }
1037
+
1038
+ .qti-height-2p5 {
1039
+ height: 0.625rem;
1040
+ }
1041
+
1042
+ .qti-height-3 {
1043
+ height: 0.75rem;
1044
+ }
1045
+
1046
+ .qti-height-3p5 {
1047
+ height: 0.875rem;
1048
+ }
1049
+
1050
+ .qti-height-4 {
1051
+ height: 1rem;
1052
+ }
1053
+
1054
+ .qti-height-5 {
1055
+ height: 1.25rem;
1056
+ }
1057
+
1058
+ .qti-height-6 {
1059
+ height: 1.5rem;
1060
+ }
1061
+
1062
+ .qti-height-7 {
1063
+ height: 1.75rem;
1064
+ }
1065
+
1066
+ .qti-height-8 {
1067
+ height: 2rem;
1068
+ }
1069
+
1070
+ .qti-height-9 {
1071
+ height: 2.25rem;
1072
+ }
1073
+
1074
+ .qti-height-10 {
1075
+ height: 2.5rem;
1076
+ }
1077
+
1078
+ .qti-height-11 {
1079
+ height: 2.75rem;
1080
+ }
1081
+
1082
+ .qti-height-12 {
1083
+ height: 3rem;
1084
+ }
1085
+
1086
+ .qti-height-14 {
1087
+ height: 3.5rem;
1088
+ }
1089
+
1090
+ .qti-height-16 {
1091
+ height: 4rem;
1092
+ }
1093
+
1094
+ .qti-height-20 {
1095
+ height: 5rem;
1096
+ }
1097
+
1098
+ .qti-height-24 {
1099
+ height: 6rem;
1100
+ }
1101
+
1102
+ .qti-height-28 {
1103
+ height: 7rem;
1104
+ }
1105
+
1106
+ .qti-height-32 {
1107
+ height: 8rem;
1108
+ }
1109
+
1110
+ .qti-height-36 {
1111
+ height: 9rem;
1112
+ }
1113
+
1114
+ .qti-height-40 {
1115
+ height: 10rem;
1116
+ }
1117
+
1118
+ .qti-height-44 {
1119
+ height: 11rem;
1120
+ }
1121
+
1122
+ .qti-height-48 {
1123
+ height: 12rem;
1124
+ }
1125
+
1126
+ .qti-height-52 {
1127
+ height: 13rem;
1128
+ }
1129
+
1130
+ .qti-height-56 {
1131
+ height: 14rem;
1132
+ }
1133
+
1134
+ .qti-height-60 {
1135
+ height: 15rem;
1136
+ }
1137
+
1138
+ .qti-height-64 {
1139
+ height: 16rem;
1140
+ }
1141
+
1142
+ .qti-height-72 {
1143
+ height: 18rem;
1144
+ }
1145
+
1146
+ .qti-height-80 {
1147
+ height: 20rem;
1148
+ }
1149
+
1150
+ .qti-height-96 {
1151
+ height: 24rem;
1152
+ }
1153
+
1154
+ .qti-height-1-2 {
1155
+ height: 50%;
1156
+ }
1157
+
1158
+ .qti-height-1-3 {
1159
+ height: 33.3333%;
1160
+ }
1161
+
1162
+ .qti-height-2-3 {
1163
+ height: 66.6667%;
1164
+ }
1165
+
1166
+ .qti-height-1-4 {
1167
+ height: 25%;
1168
+ }
1169
+
1170
+ .qti-height-2-4 {
1171
+ height: 50%;
1172
+ }
1173
+
1174
+ .qti-height-3-4 {
1175
+ height: 75%;
1176
+ }
1177
+
1178
+ .qti-height-1-5 {
1179
+ height: 20%;
1180
+ }
1181
+
1182
+ .qti-height-2-5 {
1183
+ height: 40%;
1184
+ }
1185
+
1186
+ .qti-height-3-5 {
1187
+ height: 60%;
1188
+ }
1189
+
1190
+ .qti-height-4-5 {
1191
+ height: 80%;
1192
+ }
1193
+
1194
+ .qti-height-1-6 {
1195
+ height: 16.6667%;
1196
+ }
1197
+
1198
+ .qti-height-2-6 {
1199
+ height: 33.3333%;
1200
+ }
1201
+
1202
+ .qti-height-3-6 {
1203
+ height: 50%;
1204
+ }
1205
+
1206
+ .qti-height-4-6 {
1207
+ height: 66.6667%;
1208
+ }
1209
+
1210
+ .qti-height-5-6 {
1211
+ height: 83.3333%;
1212
+ }
1213
+
1214
+ .qti-height-auto {
1215
+ height: auto;
1216
+ }
1217
+
1218
+ .qti-height-full {
1219
+ height: 100%;
1220
+ }
1221
+
1222
+ /* ============
1223
+ Width styles
1224
+ ============ */
1225
+
1226
+ .qti-width-0 {
1227
+ width: 0;
1228
+ }
1229
+
1230
+ .qti-width-px {
1231
+ width: 1px;
1232
+ }
1233
+
1234
+ .qti-width-0p5 {
1235
+ width: 0.125rem;
1236
+ }
1237
+
1238
+ .qti-width-1 {
1239
+ width: 0.25rem;
1240
+ }
1241
+
1242
+ .qti-width-1p5 {
1243
+ width: 0.375rem;
1244
+ }
1245
+
1246
+ .qti-width-2 {
1247
+ width: 0.5rem;
1248
+ }
1249
+
1250
+ .qti-width-2p5 {
1251
+ width: 0.625rem;
1252
+ }
1253
+
1254
+ .qti-width-3 {
1255
+ width: 0.75rem;
1256
+ }
1257
+
1258
+ .qti-width-3p5 {
1259
+ width: 0.875rem;
1260
+ }
1261
+
1262
+ .qti-width-4 {
1263
+ width: 1rem;
1264
+ }
1265
+
1266
+ .qti-width-5 {
1267
+ width: 1.25rem;
1268
+ }
1269
+
1270
+ .qti-width-6 {
1271
+ width: 1.5rem;
1272
+ }
1273
+
1274
+ .qti-width-7 {
1275
+ width: 1.75rem;
1276
+ }
1277
+
1278
+ .qti-width-8 {
1279
+ width: 2rem;
1280
+ }
1281
+
1282
+ .qti-width-9 {
1283
+ width: 2.25rem;
1284
+ }
1285
+
1286
+ .qti-width-10 {
1287
+ width: 2.5rem;
1288
+ }
1289
+
1290
+ .qti-width-11 {
1291
+ width: 2.75rem;
1292
+ }
1293
+
1294
+ .qti-width-12 {
1295
+ width: 3rem;
1296
+ }
1297
+
1298
+ .qti-width-14 {
1299
+ width: 3.5rem;
1300
+ }
1301
+
1302
+ .qti-width-16 {
1303
+ width: 4rem;
1304
+ }
1305
+
1306
+ .qti-width-20 {
1307
+ width: 5rem;
1308
+ }
1309
+
1310
+ .qti-width-24 {
1311
+ width: 6rem;
1312
+ }
1313
+
1314
+ .qti-width-28 {
1315
+ width: 7rem;
1316
+ }
1317
+
1318
+ .qti-width-32 {
1319
+ width: 8rem;
1320
+ }
1321
+
1322
+ .qti-width-36 {
1323
+ width: 9rem;
1324
+ }
1325
+
1326
+ .qti-width-40 {
1327
+ width: 10rem;
1328
+ }
1329
+
1330
+ .qti-width-44 {
1331
+ width: 11rem;
1332
+ }
1333
+
1334
+ .qti-width-48 {
1335
+ width: 12rem;
1336
+ }
1337
+
1338
+ .qti-width-52 {
1339
+ width: 13rem;
1340
+ }
1341
+
1342
+ .qti-width-56 {
1343
+ width: 14rem;
1344
+ }
1345
+
1346
+ .qti-width-60 {
1347
+ width: 15rem;
1348
+ }
1349
+
1350
+ .qti-width-64 {
1351
+ width: 16rem;
1352
+ }
1353
+
1354
+ .qti-width-72 {
1355
+ width: 18rem;
1356
+ }
1357
+
1358
+ .qti-width-80 {
1359
+ width: 20rem;
1360
+ }
1361
+
1362
+ .qti-width-96 {
1363
+ width: 24rem;
1364
+ }
1365
+
1366
+ .qti-width-auto {
1367
+ width: auto;
1368
+ }
1369
+
1370
+ .qti-width-1-2 {
1371
+ width: 50%;
1372
+ }
1373
+
1374
+ .qti-width-1-3 {
1375
+ width: 33.3333%;
1376
+ }
1377
+
1378
+ .qti-width-2-3 {
1379
+ width: 66.6667%;
1380
+ }
1381
+
1382
+ .qti-width-1-4 {
1383
+ width: 25%;
1384
+ }
1385
+
1386
+ .qti-width-2-4 {
1387
+ width: 50%;
1388
+ }
1389
+
1390
+ .qti-width-3-4 {
1391
+ width: 75%;
1392
+ }
1393
+
1394
+ .qti-width-1-5 {
1395
+ width: 20%;
1396
+ }
1397
+
1398
+ .qti-width-2-5 {
1399
+ width: 40%;
1400
+ }
1401
+
1402
+ .qti-width-3-5 {
1403
+ width: 60%;
1404
+ }
1405
+
1406
+ .qti-width-4-5 {
1407
+ width: 80%;
1408
+ }
1409
+
1410
+ .qti-width-1-6 {
1411
+ width: 16.6667%;
1412
+ }
1413
+
1414
+ .qti-width-2-6 {
1415
+ width: 33.3333%;
1416
+ }
1417
+
1418
+ .qti-width-3-6 {
1419
+ width: 50%;
1420
+ }
1421
+
1422
+ .qti-width-4-6 {
1423
+ width: 66.6667%;
1424
+ }
1425
+
1426
+ .qti-width-5-6 {
1427
+ width: 83.3333%;
1428
+ }
1429
+
1430
+ .qti-width-1-12 {
1431
+ width: 8.3333%;
1432
+ }
1433
+
1434
+ .qti-width-2-12 {
1435
+ width: 16.6667%;
1436
+ }
1437
+
1438
+ .qti-width-3-12 {
1439
+ width: 25%;
1440
+ }
1441
+
1442
+ .qti-width-4-12 {
1443
+ width: 33.3333%;
1444
+ }
1445
+
1446
+ .qti-width-5-12 {
1447
+ width: 41.6667%;
1448
+ }
1449
+
1450
+ .qti-width-6-12 {
1451
+ width: 50%;
1452
+ }
1453
+
1454
+ .qti-width-7-12 {
1455
+ width: 58.3333%;
1456
+ }
1457
+
1458
+ .qti-width-8-12 {
1459
+ width: 66.6667%;
1460
+ }
1461
+
1462
+ .qti-width-9-12 {
1463
+ width: 75%;
1464
+ }
1465
+
1466
+ .qti-width-10-12 {
1467
+ width: 83.3333%;
1468
+ }
1469
+
1470
+ .qti-width-11-12 {
1471
+ width: 91.6667%;
1472
+ }
1473
+
1474
+ .qti-width-full,
1475
+ .qti-fullwidth {
1476
+ width: 100%;
1477
+ }
1478
+
1479
+ /* ==================
1480
+ Text Indent styles
1481
+ ================== */
1482
+
1483
+ .qti-text-indent-0 {
1484
+ text-indent: 0;
1485
+ }
1486
+
1487
+ .qti-text-indent-px {
1488
+ text-indent: 1px;
1489
+ }
1490
+
1491
+ .qti-text-indent-0p5 {
1492
+ text-indent: 0.125rem;
1493
+ }
1494
+
1495
+ .qti-text-indent-1 {
1496
+ text-indent: 0.25rem;
1497
+ }
1498
+
1499
+ .qti-text-indent-1p5 {
1500
+ text-indent: 0.375rem;
1501
+ }
1502
+
1503
+ .qti-text-indent-2 {
1504
+ text-indent: 0.5rem;
1505
+ }
1506
+
1507
+ .qti-text-indent-2p5 {
1508
+ text-indent: 0.625rem;
1509
+ }
1510
+
1511
+ .qti-text-indent-3 {
1512
+ text-indent: 0.75rem;
1513
+ }
1514
+
1515
+ .qti-text-indent-3p5 {
1516
+ text-indent: 0.875rem;
1517
+ }
1518
+
1519
+ .qti-text-indent-4 {
1520
+ text-indent: 1rem;
1521
+ }
1522
+
1523
+ .qti-text-indent-5 {
1524
+ text-indent: 1.25rem;
1525
+ }
1526
+
1527
+ .qti-text-indent-6 {
1528
+ text-indent: 1.5rem;
1529
+ }
1530
+
1531
+ .qti-text-indent-7 {
1532
+ text-indent: 1.75rem;
1533
+ }
1534
+
1535
+ .qti-text-indent-8 {
1536
+ text-indent: 2rem;
1537
+ }
1538
+
1539
+ .qti-text-indent-12 {
1540
+ text-indent: 3rem;
1541
+ }
1542
+
1543
+ .qti-text-indent-16 {
1544
+ text-indent: 4rem;
1545
+ }
1546
+
1547
+ .qti-text-indent-20 {
1548
+ text-indent: 5rem;
1549
+ }
1550
+
1551
+ .qti-text-indent-24 {
1552
+ text-indent: 6rem;
1553
+ }
1554
+
1555
+ .qti-text-indent-28 {
1556
+ text-indent: 7rem;
1557
+ }
1558
+
1559
+ .qti-text-indent-32 {
1560
+ text-indent: 8rem;
1561
+ }
1562
+
1563
+ /* =================
1564
+ List Style styles
1565
+ ================= */
1566
+
1567
+ .qti-list-style-type-none {
1568
+ list-style-type: none;
1569
+ }
1570
+
1571
+ .qti-list-style-type-disc {
1572
+ list-style-type: disc;
1573
+ }
1574
+
1575
+ .qti-list-style-type-circle {
1576
+ list-style-type: circle;
1577
+ }
1578
+
1579
+ .qti-list-style-type-square {
1580
+ list-style-type: square;
1581
+ }
1582
+
1583
+ .qti-list-style-type-decimal {
1584
+ list-style-type: decimal;
1585
+ }
1586
+
1587
+ .qti-list-style-type-decimal-leading-zero {
1588
+ list-style-type: decimal-leading-zero;
1589
+ }
1590
+
1591
+ .qti-list-style-type-lower-alpha {
1592
+ list-style-type: lower-alpha;
1593
+ }
1594
+
1595
+ .qti-list-style-type-upper-alpha {
1596
+ list-style-type: upper-alpha;
1597
+ }
1598
+
1599
+ .qti-list-style-type-lower-roman {
1600
+ list-style-type: lower-roman;
1601
+ }
1602
+
1603
+ .qti-list-style-type-upper-roman {
1604
+ list-style-type: upper-roman;
1605
+ }
1606
+
1607
+ .qti-list-style-type-lower-latin {
1608
+ list-style-type: lower-latin;
1609
+ }
1610
+
1611
+ .qti-list-style-type-upper-latin {
1612
+ list-style-type: upper-latin;
1613
+ }
1614
+
1615
+ .qti-list-style-type-lower-greek {
1616
+ list-style-type: lower-greek;
1617
+ }
1618
+
1619
+ .qti-list-style-type-arabic-indic {
1620
+ list-style-type: arabic-indic;
1621
+ }
1622
+
1623
+ .qti-list-style-type-armenian {
1624
+ list-style-type: armenian;
1625
+ }
1626
+
1627
+ .qti-list-style-type-lower-armenian {
1628
+ list-style-type: lower-armenian;
1629
+ }
1630
+
1631
+ .qti-list-style-type-upper-armenian {
1632
+ list-style-type: upper-armenian;
1633
+ }
1634
+
1635
+ .qti-list-style-type-bengali {
1636
+ list-style-type: bengali;
1637
+ }
1638
+
1639
+ .qti-list-style-type-cambodian {
1640
+ list-style-type: cambodian;
1641
+ }
1642
+
1643
+ .qti-list-style-type-simp-chinese-formal {
1644
+ list-style-type: simp-chinese-formal;
1645
+ }
1646
+
1647
+ .qti-list-style-type-simp-chinese-informal {
1648
+ list-style-type: simp-chinese-informal;
1649
+ }
1650
+
1651
+ .qti-list-style-type-trad-chinese-formal {
1652
+ list-style-type: trad-chinese-formal;
1653
+ }
1654
+
1655
+ .qti-list-style-type-trad-chinese-informal {
1656
+ list-style-type: trad-chinese-informal;
1657
+ }
1658
+
1659
+ .qti-list-style-type-cjk-ideographic {
1660
+ list-style-type: cjk-ideographic;
1661
+ }
1662
+
1663
+ .qti-list-style-type-cjk-heavenly-stem {
1664
+ list-style-type: cjk-heavenly-stem;
1665
+ }
1666
+
1667
+ .qti-list-style-type-cjk-earthly-branch {
1668
+ list-style-type: cjk-earthly-branch;
1669
+ }
1670
+
1671
+ .qti-list-style-type-devanagari {
1672
+ list-style-type: devanagari;
1673
+ }
1674
+
1675
+ .qti-list-style-type-ethiopic-halehame-ti-er {
1676
+ list-style-type: ethiopic-halehame-ti-er;
1677
+ }
1678
+
1679
+ .qti-list-style-type-ethiopic-halehame-ti-et {
1680
+ list-style-type: ethiopic-halehame-ti-et;
1681
+ }
1682
+
1683
+ .qti-list-style-type-ethiopic-halehame-am {
1684
+ list-style-type: ethiopic-halehame-am;
1685
+ }
1686
+
1687
+ .qti-list-style-type-ethiopic-halehame {
1688
+ list-style-type: ethiopic-halehame;
1689
+ }
1690
+
1691
+ .qti-list-style-type-georgian {
1692
+ list-style-type: georgian;
1693
+ }
1694
+
1695
+ .qti-list-style-type-gujarati {
1696
+ list-style-type: gujarati;
1697
+ }
1698
+
1699
+ .qti-list-style-type-gurmukhi {
1700
+ list-style-type: gurmukhi;
1701
+ }
1702
+
1703
+ .qti-list-style-type-hangul {
1704
+ list-style-type: hangul;
1705
+ }
1706
+
1707
+ .qti-list-style-type-hangul-consonant {
1708
+ list-style-type: hangul-consonant;
1709
+ }
1710
+
1711
+ .qti-list-style-type-hebrew {
1712
+ list-style-type: hebrew;
1713
+ }
1714
+
1715
+ .qti-list-style-type-hiragana {
1716
+ list-style-type: hiragana;
1717
+ }
1718
+
1719
+ .qti-list-style-type-hiragana-iroha {
1720
+ list-style-type: hiragana-iroha;
1721
+ }
1722
+
1723
+ .qti-list-style-type-khmer {
1724
+ list-style-type: khmer;
1725
+ }
1726
+
1727
+ .qti-list-style-type-korean-hangul-formal {
1728
+ list-style-type: korean-hangul-formal;
1729
+ }
1730
+
1731
+ .qti-list-style-type-korean-hanja-formal {
1732
+ list-style-type: korean-hanja-formal;
1733
+ }
1734
+
1735
+ .qti-list-style-type-korean-hanja-informal {
1736
+ list-style-type: korean-hanja-informal;
1737
+ }
1738
+
1739
+ .qti-list-style-type-lao {
1740
+ list-style-type: lao;
1741
+ }
1742
+
1743
+ .qti-list-style-type-malayalam {
1744
+ list-style-type: malayalam;
1745
+ }
1746
+
1747
+ .qti-list-style-type-mongolian {
1748
+ list-style-type: mongolian;
1749
+ }
1750
+
1751
+ .qti-list-style-type-myanmar {
1752
+ list-style-type: myanmar;
1753
+ }
1754
+
1755
+ .qti-list-style-type-oriya {
1756
+ list-style-type: oriya;
1757
+ }
1758
+
1759
+ .qti-list-style-type-persian {
1760
+ list-style-type: persian;
1761
+ }
1762
+
1763
+ .qti-list-style-type-thai {
1764
+ list-style-type: thai;
1765
+ }
1766
+
1767
+ .qti-list-style-type-tibetan {
1768
+ list-style-type: tibetan;
1769
+ }
1770
+
1771
+ .qti-list-style-type-telugu {
1772
+ list-style-type: telugu;
1773
+ }
1774
+
1775
+ .qti-list-style-type-urdu {
1776
+ list-style-type: urdu;
1777
+ }
1778
+
1779
+ /* =========================
1780
+ Other QTI 3 Presentation Utilities
1781
+ ========================= */
1782
+
1783
+ .qti-bordered {
1784
+ border: 1px solid var(--table-border-color);
1785
+ }
1786
+
1787
+ .qti-underline {
1788
+ text-decoration: underline;
1789
+ text-decoration-color: var(--foreground);
1790
+ }
1791
+
1792
+ .qti-italic {
1793
+ font-style: italic;
1794
+ }
1795
+
1796
+ .qti-well {
1797
+ min-height: 20px;
1798
+ padding: 19px;
1799
+ margin-bottom: 20px;
1800
+ background-color: var(--well-bg);
1801
+ border: var(--well-border);
1802
+ border-radius: 4px;
1803
+ box-shadow: var(--well-box-shadow);
1804
+ }
1805
+
1806
+ /* Set writing-mode to vertical-rl
1807
+ Typical for CJK vertical text */
1808
+
1809
+ .qti-writing-mode-vertical-rl {
1810
+ writing-mode: vertical-rl;
1811
+ }
1812
+
1813
+ /* Set writing-mode to vertical-lr
1814
+ Typical for Mongolian vertical text */
1815
+
1816
+ .qti-writing-mode-vertical-lr {
1817
+ writing-mode: vertical-lr;
1818
+ }
1819
+
1820
+ /* Set writing-mode to horizontal-tb
1821
+ Browser default */
1822
+
1823
+ .qti-writing-mode-horizontal-tb {
1824
+ writing-mode: horizontal-tb;
1825
+ }
1826
+
1827
+ /* Float an element left */
1828
+
1829
+ .qti-float-left {
1830
+ float: left;
1831
+ }
1832
+
1833
+ /* Float an element right */
1834
+
1835
+ .qti-float-right {
1836
+ float: right;
1837
+ }
1838
+
1839
+ /* Remove a float */
1840
+
1841
+ .qti-float-none {
1842
+ float: none;
1843
+ }
1844
+
1845
+ /* Clearfix Hack to apply to a container of
1846
+ floated content that overflows the container. */
1847
+
1848
+ .qti-float-clearfix::after {
1849
+ content: '';
1850
+ clear: both;
1851
+ display: table;
1852
+ }
1853
+
1854
+ .qti-float-clear-left
1855
+ .qti-float-clear-right
1856
+ .qti-float-clear-both
1857
+
1858
+ /* Set text-orientation to upright */
1859
+ .qti-text-orientation-upright {
1860
+ text-orientation: upright;
1861
+ }
1862
+
1863
+ /* stylelint-disable number-max-precision */
1864
+
1865
+ @layer qti-base {
1866
+ .qti-layout-row {
1867
+ display: flex;
1868
+ flex-wrap: wrap;
1869
+ width: 100%;
1870
+ gap: 2.1276595745%;
1871
+ }
1872
+
1873
+ .qti-layout-row [class*='qti-layout-col']:not(:empty) {
1874
+ box-sizing: border-box;
1875
+ }
1876
+
1877
+ .qti-layout-row [class*='qti-layout-col']:empty {
1878
+ width: 0;
1879
+ overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
1880
+ }
1881
+
1882
+ .qti-layout-col1 {
1883
+ width: 6.3829787234%;
1884
+ }
1885
+
1886
+ .qti-layout-col2 {
1887
+ width: 14.8936170213%;
1888
+ }
1889
+
1890
+ .qti-layout-col3 {
1891
+ width: 23.4042553191%;
1892
+ }
1893
+
1894
+ .qti-layout-col4 {
1895
+ width: 31.914893617%;
1896
+ }
1897
+
1898
+ .qti-layout-col5 {
1899
+ width: 40.4255319149%;
1900
+ }
1901
+
1902
+ .qti-layout-col6 {
1903
+ width: 48.9361702128%;
1904
+ }
1905
+
1906
+ .qti-layout-col7 {
1907
+ width: 57.4468085106%;
1908
+ }
1909
+
1910
+ .qti-layout-col8 {
1911
+ width: 65.9574468085%;
1912
+ }
1913
+
1914
+ .qti-layout-col9 {
1915
+ width: 74.4680851064%;
1916
+ }
1917
+
1918
+ .qti-layout-col10 {
1919
+ width: 82.9787234043%;
1920
+ }
1921
+
1922
+ .qti-layout-col11 {
1923
+ width: 91.4893617021%;
1924
+ }
1925
+
1926
+ .qti-layout-col12 {
1927
+ width: 100%;
1928
+ }
1929
+
1930
+ .qti-layout-offset1 {
1931
+ margin-left: 8.5106382979%;
1932
+ }
1933
+
1934
+ .qti-layout-offset2 {
1935
+ margin-left: 17.0212765957%;
1936
+ }
1937
+
1938
+ .qti-layout-offset3 {
1939
+ margin-left: 25.5319148936%;
1940
+ }
1941
+
1942
+ .qti-layout-offset4 {
1943
+ margin-left: 34.0425531915%;
1944
+ }
1945
+
1946
+ .qti-layout-offset5 {
1947
+ margin-left: 42.5531914894%;
1948
+ }
1949
+
1950
+ .qti-layout-offset6 {
1951
+ margin-left: 51.0638297872%;
1952
+ }
1953
+
1954
+ .qti-layout-offset7 {
1955
+ margin-left: 59.5744680851%;
1956
+ }
1957
+
1958
+ .qti-layout-offset8 {
1959
+ margin-left: 68.085106383%;
1960
+ }
1961
+
1962
+ .qti-layout-offset9 {
1963
+ margin-left: 76.5957446809%;
1964
+ }
1965
+
1966
+ .qti-layout-offset10 {
1967
+ margin-left: 85.1063829787%;
1968
+ }
1969
+
1970
+ .qti-layout-offset11 {
1971
+ margin-left: 93.6170212766%;
1972
+ }
1973
+
1974
+ .qti-layout-offset12 {
1975
+ margin-left: 102.1276595745%;
1976
+ }
1977
+
1978
+ @media (width <= 767px) {
1979
+ [class*='qti-layout-col'] {
1980
+ width: 100%;
1981
+ }
1982
+ }
1983
+ }
1984
+
1985
+ [view],
1986
+ qti-outcome-declaration,
1987
+ qti-response-declaration {
1988
+ display: none;
1989
+ }
1990
+
1991
+ [view].show {
1992
+ display: block;
1993
+ }
1994
+
1995
+ :host {
1996
+ box-sizing: border-box;
1997
+ }
1998
+
1999
+ *,
2000
+ *::before,
2001
+ *::after {
2002
+ box-sizing: inherit;
2003
+ }
2004
+
2005
+ /* components */
2006
+
2007
+ @layer qti-components {
2008
+ qti-choice-interaction {
2009
+ &.qti-input-control-hidden {
2010
+ & qti-simple-choice {
2011
+
2012
+ &:hover {
2013
+ background-color: var(--qti-hover-bg);
2014
+ }
2015
+
2016
+ &:focus {
2017
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2018
+ }
2019
+
2020
+ &::part(ch) {
2021
+ display: none;
2022
+ }
2023
+
2024
+ &:state(--checked),
2025
+ &[aria-checked='true'] {
2026
+ border-color: var(--qti-border-active);
2027
+ background-color: var(--qti-bg-active);
2028
+ }
2029
+
2030
+ &:state(readonly),
2031
+ &[aria-readonly='true'] {
2032
+ cursor: pointer;
2033
+ background-color: var(--qti-bg);
2034
+ outline: 0;
2035
+ border: none;
2036
+ }
2037
+
2038
+ &:state(disabled),
2039
+ &[aria-disabled='true'] {
2040
+ cursor: not-allowed;
2041
+ background-color: var(--qti-disabled-bg);
2042
+ color: var(--qti-disabled-color);
2043
+ border-color: var(--qti-border-color);
2044
+ outline: 4px solid var(--qti-disabled-bg);
2045
+ }
2046
+
2047
+ border-radius: var(--qti-border-radius);
2048
+
2049
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2050
+
2051
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2052
+
2053
+ outline: none
2054
+ }
2055
+ }
2056
+
2057
+ &:not(.qti-input-control-hidden) {
2058
+ & qti-simple-choice {
2059
+
2060
+ &:not([aria-disabled='true'], [aria-readonly='true'], :state(--checked)):hover {
2061
+ background-color: var(--qti-hover-bg);
2062
+ }
2063
+
2064
+ &:focus {
2065
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2066
+ }
2067
+
2068
+ &:state(--checked),
2069
+ &[aria-checked='true'] {
2070
+ border-color: var(--qti-border-active);
2071
+ background-color: var(--qti-bg-active);
2072
+ }
2073
+
2074
+ &:state(readonly),
2075
+ &[aria-readonly='true'] {
2076
+ cursor: pointer;
2077
+ background-color: var(--qti-bg);
2078
+ outline: 0;
2079
+ border: none;
2080
+ }
2081
+
2082
+ &:state(disabled),
2083
+ &[aria-disabled='true'] {
2084
+ cursor: not-allowed;
2085
+ background-color: var(--qti-disabled-bg);
2086
+ color: var(--qti-disabled-color);
2087
+ border-color: var(--qti-border-color);
2088
+ outline: 4px solid var(--qti-disabled-bg);
2089
+ }
2090
+
2091
+ &::part(cha) {
2092
+ width: calc(var(--qti-form-size) - 6px);
2093
+ height: calc(var(--qti-form-size) - 6px);
2094
+ }
2095
+
2096
+ &:state(radio)::part(ch) {
2097
+ border-radius: 100%;
2098
+ display: grid;
2099
+ place-content: center;
2100
+ width: var(--qti-form-size);
2101
+ height: var(--qti-form-size);
2102
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2103
+ outline: none;
2104
+ }
2105
+
2106
+ &:state(radio):state(--checked)::part(cha) {
2107
+ background-color: var(--qti-border-active);
2108
+ border-radius: 100%;
2109
+ }
2110
+
2111
+ &:state(checkbox)::part(ch) {
2112
+ display: flex;
2113
+ place-items: center;
2114
+ border-radius: var(--qti-border-radius);
2115
+ display: grid;
2116
+ place-content: center;
2117
+ width: var(--qti-form-size);
2118
+ height: var(--qti-form-size);
2119
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2120
+ outline: none;
2121
+ }
2122
+
2123
+ &:state(checkbox):state(--checked)::part(cha) {
2124
+ background-color: var(--qti-border-active);
2125
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
2126
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
2127
+ }
2128
+
2129
+ gap: 0.5rem;
2130
+
2131
+ border-radius: var(--qti-border-radius);
2132
+
2133
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2134
+
2135
+ outline: none;
2136
+
2137
+ cursor: pointer
2138
+ }
2139
+ }
2140
+
2141
+ & qti-simple-choice {
2142
+ width: -moz-fit-content;
2143
+ width: fit-content;
2144
+ cursor: pointer;
2145
+
2146
+ &:state(correct-response),
2147
+ &[data-correct-response='true'] {
2148
+ &::after {
2149
+ content: '\\02714';
2150
+ color: #16a34a; /* text-green-600 */
2151
+ }
2152
+ }
2153
+ }
2154
+
2155
+ & qti-simple-choice > p {
2156
+ margin: 0 !important;
2157
+ padding: 0 !important;
2158
+ }
2159
+ }
2160
+
2161
+ .hover-border {
2162
+ border: 2px solid #000; /* Adjust the border style and color as needed */
2163
+ }
2164
+
2165
+ qti-graphic-gap-match-interaction {
2166
+ position: relative;
2167
+
2168
+ &.qti-selections-light {
2169
+ &:state(--dragzone-active)::part(drags) {
2170
+ background-color: var(--qti-light-bg-active);
2171
+ border-color: var(--qti-light-border-active);
2172
+ }
2173
+
2174
+ &:state(--dragzone-enabled)::part(drags) {
2175
+ background-color: var(--qti-light-bg-active);
2176
+ }
2177
+ }
2178
+
2179
+ &.qti-selections-dark {
2180
+ &:state(--dragzone-active)::part(drags) {
2181
+ background-color: var(--qti-dark-bg-active);
2182
+ border-color: var(--qti-dark-border-active);
2183
+ }
2184
+
2185
+ &:state(--dragzone-enabled)::part(drags) {
2186
+ background-color: var(--qti-dark-bg-active);
2187
+ }
2188
+ }
2189
+
2190
+ /* General styles for active and enabled states */
2191
+ &:state(--dragzone-active)::part(drags) {
2192
+ border-color: var(--qti-border-active);
2193
+ background-color: var(--qti-bg-active);
2194
+ }
2195
+
2196
+ &:state(--dragzone-enabled)::part(drags) {
2197
+ background-color: var(--qti-bg-active);
2198
+ }
2199
+
2200
+ & qti-gap-img,
2201
+ qti-gap-text {
2202
+ display: flex;
2203
+ justify-content: center;
2204
+ align-items: center;
2205
+ cursor: grab;
2206
+ }
2207
+
2208
+ & qti-associable-hotspot {
2209
+ display: flex;
2210
+ justify-content: center;
2211
+ align-items: center;
2212
+ border: 2px solid transparent;
2213
+
2214
+ &[enabled] {
2215
+
2216
+ /* Light theme override */
2217
+ .qti-selections-light & {
2218
+ background-color: var(--qti-light-bg-active);
2219
+ }
2220
+
2221
+ /* Dark theme override */
2222
+ .qti-selections-dark & {
2223
+ background-color: var(--qti-dark-bg-active);
2224
+ }
2225
+ background-color: var(--qti-bg-active)
2226
+ }
2227
+
2228
+ &[active] {
2229
+
2230
+ /* Light theme override */
2231
+ .qti-selections-light & {
2232
+ background-color: var(--qti-light-bg-active);
2233
+ border-color: var(--qti-light-border-active);
2234
+ }
2235
+
2236
+ /* Dark theme override */
2237
+ .qti-selections-dark & {
2238
+ background-color: var(--qti-dark-bg-active);
2239
+ border-color: var(--qti-dark-border-active);
2240
+ }
2241
+ border-color: var(--qti-border-active);
2242
+ background-color: var(--qti-bg-active)
2243
+ }
2244
+
2245
+ &[disabled] {
2246
+
2247
+ &:not(:empty) {
2248
+ cursor: default !important;
2249
+ }
2250
+
2251
+ cursor: not-allowed;
2252
+
2253
+ background-color: var(--qti-disabled-bg);
2254
+
2255
+ color: var(--qti-disabled-color);
2256
+
2257
+ border-color: var(--qti-border-color);
2258
+
2259
+ outline: 4px solid var(--qti-disabled-bg)
2260
+ }
2261
+
2262
+ &:empty::after {
2263
+ padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
2264
+ content: '\\0000a0'; /* when empty, put a space in it */
2265
+ }
2266
+
2267
+ &:not(:empty) {
2268
+ padding: 0;
2269
+ width: auto;
2270
+ }
2271
+
2272
+ &:not(:empty) > * {
2273
+ flex: 1;
2274
+ transform: rotate(0); /* rotate-0 */
2275
+ box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
2276
+ }
2277
+ }
2278
+
2279
+ & img {
2280
+ margin: 0;
2281
+ padding: 0;
2282
+ }
2283
+ }
2284
+
2285
+ qti-text-entry-interaction {
2286
+ &::part(input) {
2287
+ border-radius: 0;
2288
+ cursor: text;
2289
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2290
+ background: unset;
2291
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2292
+ outline: none;
2293
+ }
2294
+
2295
+ &:hover {
2296
+ background-color: var(--qti-hover-bg);
2297
+ }
2298
+
2299
+ &:focus-within {
2300
+ &::part(input) {
2301
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2302
+ border-color: var(--qti-border-active);
2303
+ }
2304
+ }
2305
+ }
2306
+
2307
+ qti-extended-text-interaction {
2308
+ &::part(textarea) {
2309
+ border-radius: 0;
2310
+ cursor: text;
2311
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2312
+ background: unset;
2313
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2314
+ outline: none;
2315
+ }
2316
+
2317
+ &:hover {
2318
+ background-color: var(--qti-hover-bg);
2319
+ }
2320
+
2321
+ &:focus-within {
2322
+ &::part(textarea) {
2323
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2324
+ border-color: var(--qti-border-active);
2325
+ }
2326
+ }
2327
+ }
2328
+
2329
+ qti-gap-match-interaction {
2330
+ &.qti-selections-light {
2331
+ &:state(--dragzone-active)::part(drags) {
2332
+ background-color: var(--qti-light-bg-active);
2333
+ border-color: var(--qti-light-border-active);
2334
+ }
2335
+
2336
+ &:state(--dragzone-enabled)::part(drags) {
2337
+ background-color: var(--qti-light-bg-active);
2338
+ }
2339
+ }
2340
+
2341
+ &.qti-selections-dark {
2342
+ &:state(--dragzone-active)::part(drags) {
2343
+ background-color: var(--qti-dark-bg-active);
2344
+ border-color: var(--qti-dark-border-active);
2345
+ }
2346
+
2347
+ &:state(--dragzone-enabled)::part(drags) {
2348
+ background-color: var(--qti-dark-bg-active);
2349
+ }
2350
+ }
2351
+
2352
+ /* General styles for active and enabled states */
2353
+ &:state(--dragzone-active)::part(drags) {
2354
+ border-color: var(--qti-border-active);
2355
+ background-color: var(--qti-bg-active);
2356
+ }
2357
+
2358
+ &:state(--dragzone-enabled)::part(drags) {
2359
+ background-color: var(--qti-bg-active);
2360
+ }
2361
+
2362
+ & qti-gap-text {
2363
+
2364
+ &[dragging] {
2365
+ pointer-events: none;
2366
+ rotate: -2deg;
2367
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
2368
+ 0 4px 8px rgb(0 0 0 / 10%);
2369
+ }
2370
+
2371
+ &:hover {
2372
+ background-color: var(--qti-hover-bg);
2373
+ }
2374
+
2375
+ &:focus {
2376
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2377
+ }
2378
+
2379
+ transition: transform 200ms ease-out,
2380
+ box-shadow 200ms ease-out,
2381
+ rotate 200ms ease-out;
2382
+
2383
+ cursor: grab;
2384
+
2385
+ background-color: var(--qti-bg);
2386
+
2387
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2388
+
2389
+ border-radius: var(--qti-border-radius);
2390
+
2391
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
2392
+
2393
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2394
+
2395
+ outline: none;
2396
+
2397
+ background-image: radial-gradient(
2398
+ circle at center,
2399
+ rgb(0 0 0 / 10%) 0,
2400
+ rgb(0 0 0 / 20%) 2px,
2401
+ rgb(255 255 255 / 0%) 2px,
2402
+ rgb(255 255 255 / 0%) 100%
2403
+ );
2404
+
2405
+ background-repeat: repeat-y;
2406
+
2407
+ background-position: left center;
2408
+
2409
+ background-size: 14px 8px
2410
+ }
2411
+
2412
+ & qti-gap {
2413
+
2414
+ &[enabled] {
2415
+
2416
+ /* Light theme override */
2417
+ .qti-selections-light & {
2418
+ border-color: var(--qti-light-border-active);
2419
+ }
2420
+
2421
+ /* Dark theme override */
2422
+ .qti-selections-dark & {
2423
+ border-color: var(--qti-dark-border-active);
2424
+ }
2425
+ background-color: var(--qti-bg-active)
2426
+ }
2427
+
2428
+ &[disabled] {
2429
+
2430
+ &:not(:empty) {
2431
+ cursor: default !important;
2432
+ }
2433
+
2434
+ cursor: not-allowed;
2435
+
2436
+ background-color: var(--qti-disabled-bg);
2437
+
2438
+ color: var(--qti-disabled-color);
2439
+
2440
+ border-color: var(--qti-border-color);
2441
+
2442
+ outline: 4px solid var(--qti-disabled-bg)
2443
+ }
2444
+
2445
+ &[active] {
2446
+
2447
+ /* Light theme override */
2448
+ .qti-selections-light & {
2449
+ background-color: var(--qti-light-bg-active);
2450
+ border-color: var(--qti-light-border-active);
2451
+ }
2452
+
2453
+ /* Dark theme override */
2454
+ .qti-selections-dark & {
2455
+ background-color: var(--qti-dark-bg-active);
2456
+ border-color: var(--qti-dark-border-active);
2457
+ }
2458
+ border-color: var(--qti-border-active);
2459
+ background-color: var(--qti-bg-active)
2460
+ }
2461
+
2462
+ display: inline-flex;
2463
+ align-items: center;
2464
+
2465
+ &:empty::after {
2466
+ padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
2467
+ content: '\\0000a0'; /* when empty, put a space in it */
2468
+ }
2469
+
2470
+ &:not(:empty) {
2471
+ display: inline-flex;
2472
+ padding: 0;
2473
+ width: auto;
2474
+ }
2475
+
2476
+ &:not(:empty) > * {
2477
+ flex: 1;
2478
+ transform: rotate(0); /* rotate-0 */
2479
+ box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
2480
+ }
2481
+
2482
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
2483
+ center no-repeat;
2484
+
2485
+ border-radius: var(--qti-border-radius);
2486
+
2487
+ position: relative;
2488
+
2489
+ background-color: var(--qti-bg);
2490
+
2491
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2492
+
2493
+ outline: none
2494
+ }
2495
+ }
2496
+
2497
+ qti-hotspot-interaction {
2498
+ & qti-hotspot-choice {
2499
+ &[shape='circle'] {
2500
+
2501
+ &:hover {
2502
+ background-color: var(--qti-hover-bg);
2503
+ }
2504
+
2505
+ &:focus {
2506
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2507
+ }
2508
+
2509
+ &:state(--checked),
2510
+ &[aria-checked='true'] {
2511
+ border-color: var(--qti-border-active);
2512
+ }
2513
+
2514
+ &:state(--readonly),
2515
+ &[aria-readonly='true'] {
2516
+ cursor: pointer;
2517
+ background-color: var(--qti-bg);
2518
+ outline: 0;
2519
+ border: none;
2520
+ }
2521
+
2522
+ &:state(--disabled),
2523
+ &[aria-disabled='true'] {
2524
+ cursor: not-allowed;
2525
+ background-color: var(--qti-disabled-bg);
2526
+ color: var(--qti-disabled-color);
2527
+ border-color: var(--qti-border-color);
2528
+ outline: 4px solid var(--qti-disabled-bg);
2529
+ }
2530
+
2531
+ width: 100%;
2532
+
2533
+ height: 100%;
2534
+
2535
+ background-color: transparent;
2536
+
2537
+ padding: 0;
2538
+
2539
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2540
+
2541
+ outline: none
2542
+ }
2543
+
2544
+ &[shape='rect'] {
2545
+
2546
+ /* &:hover {
2547
+ @apply hov;
2548
+ } */
2549
+
2550
+ &:focus {
2551
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2552
+ }
2553
+
2554
+ &:state(--checked),
2555
+ &[aria-checked='true'] {
2556
+ border-color: var(--qti-border-active);
2557
+ }
2558
+
2559
+ &[aria-readonly='true'] {
2560
+ cursor: pointer;
2561
+ background-color: var(--qti-bg);
2562
+ outline: 0;
2563
+ border: none;
2564
+ }
2565
+
2566
+ &[aria-disabled='true'] {
2567
+ cursor: not-allowed;
2568
+ background-color: var(--qti-disabled-bg);
2569
+ color: var(--qti-disabled-color);
2570
+ border-color: var(--qti-border-color);
2571
+ outline: 4px solid var(--qti-disabled-bg);
2572
+ }
2573
+
2574
+ width: 100%;
2575
+
2576
+ height: 100%;
2577
+
2578
+ background-color: transparent;
2579
+
2580
+ padding: 0;
2581
+
2582
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2583
+
2584
+ outline: none
2585
+ }
2586
+
2587
+ &[shape='poly'] {
2588
+ &:hover::after {
2589
+ content: '';
2590
+ width: 100%;
2591
+ height: 100%;
2592
+ background: repeating-linear-gradient(
2593
+ 45deg,
2594
+ var(--qti-border-active),
2595
+ var(--qti-border-active) 5px,
2596
+ transparent 5px,
2597
+ transparent 10px
2598
+ );
2599
+ display: block;
2600
+ }
2601
+
2602
+ &:state(--checked)::after,
2603
+ &[aria-checked='true']::after {
2604
+ content: '';
2605
+ width: 100%;
2606
+ height: 100%;
2607
+ background: repeating-linear-gradient(
2608
+ 45deg,
2609
+ transparent,
2610
+ transparent 5px,
2611
+ var(--qti-border-active) 5px,
2612
+ var(--qti-border-active) 10px
2613
+ );
2614
+ display: block;
2615
+ }
2616
+
2617
+ &[aria-readonly='true'] {
2618
+ cursor: pointer;
2619
+ background-color: var(--qti-bg);
2620
+ outline: 0;
2621
+ border: none;
2622
+ }
2623
+
2624
+ &[aria-disabled='true'] {
2625
+ cursor: not-allowed;
2626
+ background-color: var(--qti-disabled-bg);
2627
+ color: var(--qti-disabled-color);
2628
+ border-color: var(--qti-border-color);
2629
+ outline: 4px solid var(--qti-disabled-bg);
2630
+ }
2631
+ }
2632
+ }
2633
+ }
2634
+
2635
+ qti-hottext-interaction {
2636
+ /* &:not(.qti-input-control-hidden),
2637
+ &:not(.qti-unselected-hidden) { */
2638
+ qti-hottext {
2639
+ display: inline-flex;
2640
+ align-items: center;
2641
+
2642
+ &:hover {
2643
+ background-color: var(--qti-hover-bg);
2644
+ }
2645
+
2646
+ &:focus {
2647
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2648
+ }
2649
+
2650
+ &::part(cha) {
2651
+ width: calc(var(--qti-form-size) - 6px);
2652
+ height: calc(var(--qti-form-size) - 6px);
2653
+ }
2654
+
2655
+ &:state(radio)::part(ch) {
2656
+ border-radius: 100%;
2657
+ display: grid;
2658
+ place-content: center;
2659
+ width: var(--qti-form-size);
2660
+ height: var(--qti-form-size);
2661
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2662
+ outline: none;
2663
+ }
2664
+
2665
+ &:state(radio):state(--checked)::part(cha) {
2666
+ background-color: var(--qti-border-active);
2667
+ border-radius: 100%;
2668
+ }
2669
+
2670
+ &:state(checkbox)::part(ch) {
2671
+ display: flex;
2672
+ place-items: center;
2673
+ border-radius: var(--qti-border-radius);
2674
+ display: grid;
2675
+ place-content: center;
2676
+ width: var(--qti-form-size);
2677
+ height: var(--qti-form-size);
2678
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2679
+ outline: none;
2680
+ }
2681
+
2682
+ &:state(checkbox):state(--checked)::part(cha) {
2683
+ background-color: var(--qti-border-active);
2684
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
2685
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
2686
+ }
2687
+
2688
+ gap: 0.5rem;
2689
+
2690
+ border-radius: var(--qti-border-radius);
2691
+
2692
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2693
+
2694
+ outline: none;
2695
+
2696
+ cursor: pointer
2697
+ }
2698
+
2699
+ /* } */
2700
+
2701
+ &.qti-input-control-hidden {
2702
+ qti-hottext {
2703
+ /* --qti-padding-md: 0.1rem;
2704
+ --qti-padding-lg: 0.2rem;
2705
+ --qti-border-radius-md: 0.3rem;
2706
+ --qti-border-thickness: 1px;
2707
+ --qti-font-weight-semibold: 400; */
2708
+
2709
+ &:hover {
2710
+ background-color: var(--qti-hover-bg);
2711
+ }
2712
+
2713
+ &:focus {
2714
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2715
+ }
2716
+
2717
+ /* @layer qti-variants { */
2718
+ &::part(ch) {
2719
+ display: none;
2720
+ }
2721
+
2722
+ &:state(--checked) {
2723
+ border-color: var(--qti-border-active);
2724
+ background-color: var(--qti-bg-active);
2725
+ }
2726
+
2727
+ &[aria-readonly='true'] {
2728
+ cursor: pointer;
2729
+ background-color: var(--qti-bg);
2730
+ outline: 0;
2731
+ border: none;
2732
+ }
2733
+
2734
+ &[aria-disabled='true'] {
2735
+ cursor: not-allowed;
2736
+ background-color: var(--qti-disabled-bg);
2737
+ color: var(--qti-disabled-color);
2738
+ border-color: var(--qti-border-color);
2739
+ outline: 4px solid var(--qti-disabled-bg);
2740
+ }
2741
+
2742
+ border-radius: var(--qti-border-radius);
2743
+
2744
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2745
+
2746
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2747
+
2748
+ outline: none
2749
+ }
2750
+
2751
+ /* } */
2752
+ }
2753
+
2754
+ &.qti-unselected-hidden {
2755
+ qti-hottext {
2756
+ &:hover {
2757
+ background-color: var(--qti-hover-bg);
2758
+ }
2759
+
2760
+ &:focus {
2761
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2762
+ }
2763
+
2764
+ cursor: pointer;
2765
+
2766
+ &::part(ch) {
2767
+ display: none;
2768
+ }
2769
+
2770
+ &:state(--checked) {
2771
+ background-color: var(--qti-bg-active);
2772
+ }
2773
+
2774
+ &[aria-readonly='true'] {
2775
+ cursor: pointer;
2776
+ background-color: var(--qti-bg);
2777
+ outline: 0;
2778
+ border: none;
2779
+ }
2780
+
2781
+ &[aria-disabled='true'] {
2782
+ cursor: not-allowed;
2783
+ background-color: var(--qti-disabled-bg);
2784
+ color: var(--qti-disabled-color);
2785
+ border-color: var(--qti-border-color);
2786
+ outline: 4px solid var(--qti-disabled-bg);
2787
+ }
2788
+ }
2789
+ }
2790
+ }
2791
+
2792
+ qti-inline-choice-interaction {
2793
+ &::part(select) {
2794
+
2795
+ &:hover {
2796
+ background-color: var(--qti-hover-bg);
2797
+ }
2798
+
2799
+ &:focus {
2800
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2801
+ }
2802
+
2803
+ border-radius: var(--qti-border-radius);
2804
+
2805
+ position: relative;
2806
+
2807
+ -webkit-appearance: none;
2808
+
2809
+ -moz-appearance: none;
2810
+
2811
+ appearance: none;
2812
+
2813
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2814
+
2815
+ padding-right: calc(var(--qti-padding-horizontal) + 1.5rem);
2816
+
2817
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2818
+
2819
+ outline: none;
2820
+
2821
+ background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
2822
+ no-repeat center right 6px
2823
+ }
2824
+ }
2825
+
2826
+ qti-match-interaction:not(.qti-match-tabular) {
2827
+ /* The draggables */
2828
+ & qti-simple-match-set:first-of-type {
2829
+ display: flex;
2830
+ flex-wrap: wrap;
2831
+ align-items: flex-start; /* Prevents children from stretching */
2832
+ gap: var(--qti-gap-size);
2833
+
2834
+ & qti-simple-associable-choice {
2835
+
2836
+ &[dragging] {
2837
+ pointer-events: none;
2838
+ rotate: -2deg;
2839
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
2840
+ 0 4px 8px rgb(0 0 0 / 10%);
2841
+ }
2842
+
2843
+ &:hover {
2844
+ background-color: var(--qti-hover-bg);
2845
+ }
2846
+
2847
+ &:focus {
2848
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2849
+ }
2850
+
2851
+ transition: transform 200ms ease-out,
2852
+ box-shadow 200ms ease-out,
2853
+ rotate 200ms ease-out;
2854
+
2855
+ cursor: grab;
2856
+
2857
+ background-color: var(--qti-bg);
2858
+
2859
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2860
+
2861
+ border-radius: var(--qti-border-radius);
2862
+
2863
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
2864
+
2865
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2866
+
2867
+ outline: none;
2868
+
2869
+ background-image: radial-gradient(
2870
+ circle at center,
2871
+ rgb(0 0 0 / 10%) 0,
2872
+ rgb(0 0 0 / 20%) 2px,
2873
+ rgb(255 255 255 / 0%) 2px,
2874
+ rgb(255 255 255 / 0%) 100%
2875
+ );
2876
+
2877
+ background-repeat: repeat-y;
2878
+
2879
+ background-position: left center;
2880
+
2881
+ background-size: 14px 8px
2882
+ }
2883
+ }
2884
+
2885
+ /* The droppables */
2886
+ & qti-simple-match-set:last-of-type {
2887
+ display: grid;
2888
+ grid-auto-columns: 1fr; /* auto-cols-fr */
2889
+ grid-auto-flow: column; /* grid-flow-col */
2890
+ gap: var(--qti-gap-size); /* gap-2 */
2891
+ width: 100%; /* w-full */
2892
+
2893
+ & qti-simple-associable-choice {
2894
+ display: flex;
2895
+ flex-direction: column;
2896
+ }
2897
+
2898
+ & > qti-simple-associable-choice {
2899
+ /* a droppable qti-simple-associable-choice */
2900
+ box-sizing: border-box;
2901
+ display: grid;
2902
+ grid-row: 2 / 4;
2903
+ grid-template-rows: subgrid;
2904
+
2905
+ & img {
2906
+ max-width: 100%;
2907
+ height: auto;
2908
+ }
2909
+
2910
+ &[enabled] {
2911
+ &::part(dropslot) {
2912
+ background-color: var(--qti-bg-active);
2913
+ }
2914
+ }
2915
+
2916
+ &[disabled] {
2917
+ &::part(dropslot) {
2918
+ cursor: not-allowed;
2919
+ background-color: var(--qti-disabled-bg);
2920
+ color: var(--qti-disabled-color);
2921
+ border-color: var(--qti-border-color);
2922
+ outline: 4px solid var(--qti-disabled-bg);
2923
+ }
2924
+ }
2925
+
2926
+ &[active] {
2927
+ &::part(dropslot) {
2928
+ border-color: var(--qti-border-active);
2929
+ background-color: var(--qti-bg-active);
2930
+ }
2931
+ }
2932
+
2933
+ &::part(dropslot) {
2934
+
2935
+ &[dragging] {
2936
+ pointer-events: none;
2937
+ rotate: -2deg;
2938
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
2939
+ 0 4px 8px rgb(0 0 0 / 10%);
2940
+ }
2941
+
2942
+ &:focus {
2943
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2944
+ }
2945
+
2946
+ min-height: 6rem;
2947
+ gap: var(--qti-gap-size);
2948
+ box-sizing: border-box;
2949
+ display: flex;
2950
+ justify-content: center;
2951
+ align-items: center;
2952
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
2953
+ center no-repeat;
2954
+ border-radius: var(--qti-border-radius);
2955
+ position: relative;
2956
+ background-color: var(--qti-bg);
2957
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2958
+ outline: none;
2959
+ }
2960
+
2961
+ & > *:not(qti-simple-associable-choice) {
2962
+ pointer-events: none;
2963
+ }
2964
+
2965
+ & > qti-simple-associable-choice {
2966
+
2967
+ &::part(dropslot) {
2968
+ display: none;
2969
+ }
2970
+
2971
+ &:hover {
2972
+ background-color: var(--qti-hover-bg);
2973
+ }
2974
+
2975
+ &:focus {
2976
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2977
+ }
2978
+
2979
+ flex-basis: fit-content;
2980
+
2981
+ transition: transform 200ms ease-out,
2982
+ box-shadow 200ms ease-out,
2983
+ rotate 200ms ease-out;
2984
+
2985
+ cursor: grab;
2986
+
2987
+ background-color: var(--qti-bg);
2988
+
2989
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2990
+
2991
+ border-radius: var(--qti-border-radius);
2992
+
2993
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
2994
+
2995
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2996
+
2997
+ outline: none;
2998
+
2999
+ background-image: radial-gradient(
3000
+ circle at center,
3001
+ rgb(0 0 0 / 10%) 0,
3002
+ rgb(0 0 0 / 20%) 2px,
3003
+ rgb(255 255 255 / 0%) 2px,
3004
+ rgb(255 255 255 / 0%) 100%
3005
+ );
3006
+
3007
+ background-repeat: repeat-y;
3008
+
3009
+ background-position: left center;
3010
+
3011
+ background-size: 14px 8px;
3012
+ }
3013
+ }
3014
+ }
3015
+ }
3016
+
3017
+ qti-order-interaction:state(--dragzone-active)::part(drags) {
3018
+ border-color: var(--qti-border-active);
3019
+ background-color: var(--qti-bg-active);
3020
+ }
3021
+
3022
+ qti-order-interaction:state(--dragzone-enabled)::part(drags) {
3023
+ background-color: var(--qti-bg-active);
3024
+ }
3025
+
3026
+ qti-order-interaction {
3027
+ &::part(qti-simple-choice),
3028
+ & qti-simple-choice {
3029
+
3030
+ &[dragging] {
3031
+ pointer-events: none;
3032
+ rotate: -2deg;
3033
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3034
+ 0 4px 8px rgb(0 0 0 / 10%);
3035
+ }
3036
+
3037
+ &:hover {
3038
+ background-color: var(--qti-hover-bg);
3039
+ }
3040
+
3041
+ &:focus {
3042
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3043
+ }
3044
+
3045
+ transition: transform 200ms ease-out,
3046
+ box-shadow 200ms ease-out,
3047
+ rotate 200ms ease-out;
3048
+
3049
+ cursor: grab;
3050
+
3051
+ background-color: var(--qti-bg);
3052
+
3053
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3054
+
3055
+ border-radius: var(--qti-border-radius);
3056
+
3057
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3058
+
3059
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3060
+
3061
+ outline: none;
3062
+
3063
+ background-image: radial-gradient(
3064
+ circle at center,
3065
+ rgb(0 0 0 / 10%) 0,
3066
+ rgb(0 0 0 / 20%) 2px,
3067
+ rgb(255 255 255 / 0%) 2px,
3068
+ rgb(255 255 255 / 0%) 100%
3069
+ );
3070
+
3071
+ background-repeat: repeat-y;
3072
+
3073
+ background-position: left center;
3074
+
3075
+ background-size: 14px 8px
3076
+ }
3077
+
3078
+ &::part(qti-simple-choice) {
3079
+ display: flex;
3080
+ overflow: hidden;
3081
+ align-items: center;
3082
+ width: 100%;
3083
+ text-overflow: ellipsis;
3084
+ }
3085
+
3086
+ &::part(drops) {
3087
+ gap: 0.5rem; /* gap-2 */
3088
+ }
3089
+
3090
+ &::part(drags) {
3091
+ gap: 0.5rem; /* gap-2 */
3092
+ }
3093
+
3094
+ &::part(drop-list) {
3095
+
3096
+ &[enabled] {
3097
+
3098
+ /* Light theme override */
3099
+ .qti-selections-light & {
3100
+ border-color: var(--qti-light-border-active);
3101
+ }
3102
+
3103
+ /* Dark theme override */
3104
+ .qti-selections-dark & {
3105
+ border-color: var(--qti-dark-border-active);
3106
+ }
3107
+ background-color: var(--qti-bg-active)
3108
+ }
3109
+
3110
+ &:hover {
3111
+ background-color: var(--qti-hover-bg);
3112
+ }
3113
+
3114
+ &:focus {
3115
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3116
+ }
3117
+
3118
+ display: flex;
3119
+ min-height: 4rem;
3120
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3121
+ center no-repeat;
3122
+ border-radius: var(--qti-border-radius);
3123
+ position: relative;
3124
+ background-color: var(--qti-bg);
3125
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3126
+ outline: none;
3127
+ }
3128
+
3129
+ &::part(active) {
3130
+ border-color: var(--qti-border-active);
3131
+ background-color: var(--qti-bg-active);
3132
+ }
3133
+
3134
+ & drop-list {
3135
+ &[shape='circle'] {
3136
+
3137
+ &:hover {
3138
+ background-color: var(--qti-hover-bg);
3139
+ }
3140
+
3141
+ &:focus {
3142
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3143
+ }
3144
+
3145
+ &[aria-checked='true'] {
3146
+ border-color: var(--qti-border-active);
3147
+ background-color: var(--qti-bg-active);
3148
+ }
3149
+
3150
+ &[aria-readonly='true'] {
3151
+ cursor: pointer;
3152
+ background-color: var(--qti-bg);
3153
+ outline: 0;
3154
+ border: none;
3155
+ }
3156
+
3157
+ &[aria-disabled='true'] {
3158
+ cursor: not-allowed;
3159
+ background-color: var(--qti-disabled-bg);
3160
+ color: var(--qti-disabled-color);
3161
+ border-color: var(--qti-border-color);
3162
+ outline: 4px solid var(--qti-disabled-bg);
3163
+ }
3164
+
3165
+ width: 100%;
3166
+
3167
+ height: 100%;
3168
+
3169
+ background-color: transparent;
3170
+
3171
+ padding: 0;
3172
+
3173
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3174
+
3175
+ outline: none
3176
+ }
3177
+
3178
+ &[shape='square'] {
3179
+
3180
+ &:hover {
3181
+ background-color: var(--qti-hover-bg);
3182
+ }
3183
+
3184
+ &:focus {
3185
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3186
+ }
3187
+
3188
+ &[aria-checked='true'] {
3189
+ border-color: var(--qti-border-active);
3190
+ background-color: var(--qti-bg-active);
3191
+ }
3192
+
3193
+ &[aria-readonly='true'] {
3194
+ cursor: pointer;
3195
+ background-color: var(--qti-bg);
3196
+ outline: 0;
3197
+ border: none;
3198
+ }
3199
+
3200
+ &[aria-disabled='true'] {
3201
+ cursor: not-allowed;
3202
+ background-color: var(--qti-disabled-bg);
3203
+ color: var(--qti-disabled-color);
3204
+ border-color: var(--qti-border-color);
3205
+ outline: 4px solid var(--qti-disabled-bg);
3206
+ }
3207
+
3208
+ width: 100%;
3209
+
3210
+ height: 100%;
3211
+
3212
+ background-color: transparent;
3213
+
3214
+ padding: 0;
3215
+
3216
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3217
+
3218
+ outline: none
3219
+ }
3220
+ }
3221
+ }
3222
+
3223
+ qti-associate-interaction {
3224
+ & qti-simple-associable-choice, /* drags when in lightdom */
3225
+ &::part(qti-simple-associable-choice) /* drags when in shadowdom */ {
3226
+
3227
+ &:hover {
3228
+ background-color: var(--qti-hover-bg);
3229
+ }
3230
+
3231
+ &:focus {
3232
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3233
+ }
3234
+
3235
+ &[dragging] {
3236
+ pointer-events: none;
3237
+ rotate: -2deg;
3238
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3239
+ 0 4px 8px rgb(0 0 0 / 10%);
3240
+ }
3241
+
3242
+ transition: transform 200ms ease-out,
3243
+ box-shadow 200ms ease-out,
3244
+ rotate 200ms ease-out;
3245
+
3246
+ cursor: grab;
3247
+
3248
+ background-color: var(--qti-bg);
3249
+
3250
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3251
+
3252
+ border-radius: var(--qti-border-radius);
3253
+
3254
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3255
+
3256
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3257
+
3258
+ outline: none;
3259
+
3260
+ background-image: radial-gradient(
3261
+ circle at center,
3262
+ rgb(0 0 0 / 10%) 0,
3263
+ rgb(0 0 0 / 20%) 2px,
3264
+ rgb(255 255 255 / 0%) 2px,
3265
+ rgb(255 255 255 / 0%) 100%
3266
+ );
3267
+
3268
+ background-repeat: repeat-y;
3269
+
3270
+ background-position: left center;
3271
+
3272
+ background-size: 14px 8px
3273
+ }
3274
+
3275
+ /* display: flex;
3276
+ overflow: hidden;
3277
+ align-items: center; */
3278
+
3279
+ /* &::part(drop-container) {
3280
+ display: flex;
3281
+ flex-direction: column;
3282
+ gap: var(--qti-gap-size);
3283
+ } */
3284
+
3285
+ &::part(drop-list) {
3286
+
3287
+ display: grid;
3288
+ height: 3rem;
3289
+ min-width: 10rem;
3290
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3291
+ center no-repeat;
3292
+ border-radius: var(--qti-border-radius);
3293
+ position: relative;
3294
+ background-color: var(--qti-bg);
3295
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3296
+ outline: none;
3297
+ }
3298
+
3299
+ &::part(drop-list):focus {
3300
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3301
+ }
3302
+
3303
+ &::part(drop-list)[dragging] {
3304
+ border-color: var(--qti-border-active);
3305
+ background-color: var(--qti-bg-active);
3306
+ }
3307
+
3308
+ /* &::part(drop-list) {
3309
+ @apply act;
3310
+ } */
3311
+ }
3312
+
3313
+ qti-graphic-order-interaction {
3314
+ & qti-hotspot-choice {
3315
+
3316
+ &:hover {
3317
+ background-color: var(--qti-hover-bg);
3318
+ }
3319
+
3320
+ &:focus {
3321
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3322
+ }
3323
+
3324
+ &:state(--checked),
3325
+ &[aria-checked='true'] {
3326
+ border-color: var(--qti-border-active);
3327
+ background-color: var(--qti-bg-active);
3328
+ }
3329
+
3330
+ &[aria-readonly='true'] {
3331
+ cursor: pointer;
3332
+ background-color: var(--qti-bg);
3333
+ outline: 0;
3334
+ border: none;
3335
+ }
3336
+
3337
+ &[aria-disabled='true'] {
3338
+ cursor: not-allowed;
3339
+ background-color: var(--qti-disabled-bg);
3340
+ color: var(--qti-disabled-color);
3341
+ border-color: var(--qti-border-color);
3342
+ outline: 4px solid var(--qti-disabled-bg);
3343
+ }
3344
+
3345
+ &[aria-ordervalue] {
3346
+ display: grid;
3347
+ place-content: center;
3348
+ }
3349
+
3350
+ &[aria-ordervalue]::after {
3351
+ content: attr(aria-ordervalue) !important;
3352
+ }
3353
+
3354
+ width: 100%;
3355
+
3356
+ height: 100%;
3357
+
3358
+ background-color: transparent;
3359
+
3360
+ padding: 0;
3361
+
3362
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3363
+
3364
+ outline: none
3365
+ }
3366
+
3367
+ &.qti-selections-light {
3368
+ &:state(--dragzone-active)::part(drags) {
3369
+ background-color: var(--qti-light-bg-active);
3370
+ border-color: var(--qti-light-border-active);
3371
+ }
3372
+
3373
+ &:state(--dragzone-enabled)::part(drags) {
3374
+ background-color: var(--qti-light-bg-active);
3375
+ }
3376
+ }
3377
+
3378
+ &.qti-selections-dark {
3379
+ &:state(--dragzone-active)::part(drags) {
3380
+ background-color: var(--qti-dark-bg-active);
3381
+ border-color: var(--qti-dark-border-active);
3382
+ }
3383
+
3384
+ &:state(--dragzone-enabled)::part(drags) {
3385
+ background-color: var(--qti-dark-bg-active);
3386
+ }
3387
+ }
3388
+
3389
+ /* General styles for active and enabled states */
3390
+ &:state(--dragzone-active)::part(drags) {
3391
+ border-color: var(--qti-border-active);
3392
+ background-color: var(--qti-bg-active);
3393
+ }
3394
+
3395
+ &:state(--dragzone-enabled)::part(drags) {
3396
+ background-color: var(--qti-bg-active);
3397
+ }
3398
+ }
3399
+
3400
+ qti-graphic-associate-interaction {
3401
+ position: relative;
3402
+ display: block;
3403
+
3404
+ & qti-associable-hotspot {
3405
+ &[shape='circle'] {
3406
+
3407
+ &:hover {
3408
+ background-color: var(--qti-hover-bg);
3409
+ }
3410
+
3411
+ &:focus {
3412
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3413
+ }
3414
+
3415
+ &[aria-checked='true'] {
3416
+ border-color: var(--qti-border-active);
3417
+ background-color: var(--qti-bg-active);
3418
+ }
3419
+
3420
+ &[aria-readonly='true'] {
3421
+ cursor: pointer;
3422
+ background-color: var(--qti-bg);
3423
+ outline: 0;
3424
+ border: none;
3425
+ }
3426
+
3427
+ &[aria-disabled='true'] {
3428
+ cursor: not-allowed;
3429
+ background-color: var(--qti-disabled-bg);
3430
+ color: var(--qti-disabled-color);
3431
+ border-color: var(--qti-border-color);
3432
+ outline: 4px solid var(--qti-disabled-bg);
3433
+ }
3434
+
3435
+ width: 100%;
3436
+
3437
+ height: 100%;
3438
+
3439
+ background-color: transparent;
3440
+
3441
+ padding: 0;
3442
+
3443
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3444
+
3445
+ outline: none
3446
+ }
3447
+
3448
+ &[shape='square'] {
3449
+
3450
+ &:hover {
3451
+ background-color: var(--qti-hover-bg);
3452
+ }
3453
+
3454
+ &:focus {
3455
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3456
+ }
3457
+
3458
+ &[aria-checked='true'] {
3459
+ border-color: var(--qti-border-active);
3460
+ background-color: var(--qti-bg-active);
3461
+ }
3462
+
3463
+ &[aria-readonly='true'] {
3464
+ cursor: pointer;
3465
+ background-color: var(--qti-bg);
3466
+ outline: 0;
3467
+ border: none;
3468
+ }
3469
+
3470
+ &[aria-disabled='true'] {
3471
+ cursor: not-allowed;
3472
+ background-color: var(--qti-disabled-bg);
3473
+ color: var(--qti-disabled-color);
3474
+ border-color: var(--qti-border-color);
3475
+ outline: 4px solid var(--qti-disabled-bg);
3476
+ }
3477
+
3478
+ width: 100%;
3479
+
3480
+ height: 100%;
3481
+
3482
+ background-color: transparent;
3483
+
3484
+ padding: 0;
3485
+
3486
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3487
+
3488
+ outline: none
3489
+ }
3490
+ }
3491
+
3492
+ &.qti-selections-light {
3493
+ &:state(--dragzone-active)::part(drags) {
3494
+ background-color: var(--qti-light-bg-active);
3495
+ border-color: var(--qti-light-border-active);
3496
+ }
3497
+
3498
+ &:state(--dragzone-enabled)::part(drags) {
3499
+ background-color: var(--qti-light-bg-active);
3500
+ }
3501
+ }
3502
+
3503
+ &.qti-selections-dark {
3504
+ &:state(--dragzone-active)::part(drags) {
3505
+ background-color: var(--qti-dark-bg-active);
3506
+ border-color: var(--qti-dark-border-active);
3507
+ }
3508
+
3509
+ &:state(--dragzone-enabled)::part(drags) {
3510
+ background-color: var(--qti-dark-bg-active);
3511
+ }
3512
+ }
3513
+
3514
+ /* General styles for active and enabled states */
3515
+ &:state(--dragzone-active)::part(drags) {
3516
+ border-color: var(--qti-border-active);
3517
+ background-color: var(--qti-bg-active);
3518
+ }
3519
+
3520
+ &:state(--dragzone-enabled)::part(drags) {
3521
+ background-color: var(--qti-bg-active);
3522
+ }
3523
+ }
3524
+
3525
+ qti-slider-interaction {
3526
+ display: block;
3527
+
3528
+ --qti-tick-color: rgb(229 231 235 / 100%);
3529
+ --qti-tick-width: 1px;
3530
+
3531
+ &::part(slider) {
3532
+ margin-left: 2rem; /* mx-8 */
3533
+ margin-right: 2rem;
3534
+ padding-bottom: 1rem; /* pb-4 */
3535
+ padding-top: 1.25rem; /* pt-5 */
3536
+ }
3537
+
3538
+ --show-bounds: true;
3539
+
3540
+ &::part(bounds) {
3541
+ display: flex;
3542
+ width: 100%;
3543
+ justify-content: space-between;
3544
+ margin-bottom: 0.5rem; /* mb-2 */
3545
+ }
3546
+
3547
+ --show-ticks: true;
3548
+
3549
+ &::part(ticks) {
3550
+ margin-left: 0.125rem; /* mx-0.5 */
3551
+ margin-right: 0.125rem;
3552
+ margin-bottom: 0.25rem; /* mb-1 */
3553
+ height: 0.5rem; /* h-2 */
3554
+ background: linear-gradient(to right, var(--qti-tick-color) var(--qti-tick-width), transparent 1px) repeat-x 0
3555
+ center / calc(calc(100% - var(--qti-tick-width)) / ((var(--max) - var(--min)) / var(--step))) 100%;
3556
+ }
3557
+
3558
+ &::part(rail) {
3559
+ display: flex;
3560
+ align-items: center;
3561
+ box-sizing: border-box;
3562
+ height: 0.375rem; /* h-1.5 */
3563
+ width: 100%;
3564
+ cursor: pointer;
3565
+ border-radius: 9999px; /* rounded-full */
3566
+ border: 1px solid #d1d5db; /* border-gray-300 */
3567
+ background-color: #e5e7eb; /* bg-gray-200 */
3568
+ }
3569
+
3570
+ &::part(knob) {
3571
+ background-color: var(--qti-primary);
3572
+ position: relative;
3573
+ height: 1rem; /* h-4 */
3574
+ width: 1rem; /* w-4 */
3575
+ transform-origin: center;
3576
+ transform: translateX(-50%);
3577
+ cursor: pointer;
3578
+ border-radius: 9999px; /* rounded-full */
3579
+ left: var(--value-percentage);
3580
+ }
3581
+
3582
+ --show-value: true;
3583
+
3584
+ &::part(value) {
3585
+ position: absolute;
3586
+ bottom: 2rem; /* bottom-8 */
3587
+ left: 0.5rem; /* left-2 */
3588
+ transform: translateX(-50%);
3589
+ cursor: pointer;
3590
+ border-radius: 0.25rem; /* rounded */
3591
+ background-color: #f3f4f6; /* bg-gray-100 */
3592
+ padding: 0.25rem 0.5rem; /* px-2 py-1 */
3593
+ text-align: center;
3594
+ color: #6b7280; /* text-gray-500 */
3595
+ }
3596
+ }
3597
+
3598
+ qti-select-point-interaction {
3599
+ &::part(point) {
3600
+ &:hover {
3601
+ background-color: var(--qti-hover-bg);
3602
+ }
3603
+
3604
+ &:focus {
3605
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3606
+ }
3607
+
3608
+ border-radius: 100%;
3609
+
3610
+ width: var(--qti-point-size);
3611
+
3612
+ height: var(--qti-point-size);
3613
+
3614
+ background-color: transparent;
3615
+
3616
+ padding: 0;
3617
+
3618
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3619
+
3620
+ outline: none;
3621
+ }
3622
+ }
3623
+
3624
+ qti-position-object-stage {
3625
+ & qti-position-object-interaction {
3626
+ /* no styles necessary, only layout styles, defined in the component */
3627
+ }
3628
+ }
3629
+
3630
+ qti-prompt {
3631
+ margin: 0.5rem 0; /* my-2 */
3632
+ display: block;
3633
+ width: 100%;
3634
+ }
3635
+ }
3636
+ `;var Ve=class extends v{constructor(){super(...arguments);this.testURL=""}async connectedCallback(){super.connectedCallback();let e=this.querySelector("template");if(e)this.preContent=e.content;else{this.preContent=h``;let r=new CSSStyleSheet;r.replaceSync(ds),this.shadowRoot.adoptedStyleSheets=[r],await this.updateComplete;let i=new CustomEvent("qti-load-test-request",{bubbles:!0,composed:!0,detail:{promise:null,testURL:this.testURL}});this.dispatchEvent(i)?this.content=(async()=>await i.detail.promise)():(console.warn("No qti-load-test-request listener found"),this.preContent=h`<span>qti-load-test-request was not catched</span>`)}}render(){return h`
3637
+ ${this.preContent}
3638
+ <slot></slot>
3639
+ ${cs(this.content,h`<span>Loading...</span>`)}
3640
+ `}};l([q()],Ve.prototype,"content",2),l([p({type:String,attribute:"test-url"})],Ve.prototype,"testURL",2),Ve=l([g("test-container")],Ve);var nr=["this"],ps=["+","-","!"],hs=["=","+","-","*","/","%","^","==","!=",">","<",">=","<=","||","&&","??","&","===","!==","|","|>"],Fr={"!":0,":":0,",":0,")":0,"]":0,"}":0,"|>":1,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"{":13},ar=13;var fo=["==","!=","<=",">=","||","&&","??","|>"],bo=["===","!=="],w;(function(s){s[s.STRING=1]="STRING",s[s.IDENTIFIER=2]="IDENTIFIER",s[s.DOT=3]="DOT",s[s.COMMA=4]="COMMA",s[s.COLON=5]="COLON",s[s.INTEGER=6]="INTEGER",s[s.DECIMAL=7]="DECIMAL",s[s.OPERATOR=8]="OPERATOR",s[s.GROUPER=9]="GROUPER",s[s.KEYWORD=10]="KEYWORD",s[s.ARROW=11]="ARROW"})(w||(w={}));var K=(s,t,e=0)=>({kind:s,value:t,precedence:e}),vo=s=>s===9||s===10||s===13||s===32,us=s=>s===95||s===36||(s&=-33,65<=s&&s<=90),yo=s=>us(s)||gt(s),xo=s=>nr.indexOf(s)!==-1,qo=s=>s===34||s===39,gt=s=>48<=s&&s<=57,wo=s=>s===43||s===45||s===42||s===47||s===33||s===38||s===37||s===60||s===61||s===62||s===63||s===94||s===124,Eo=s=>s===40||s===41||s===91||s===93||s===123||s===125,Co=s=>s.replace(/\\(.)/g,(t,e)=>{switch(e){case"n":return`
3641
+ `;case"r":return"\r";case"t":return" ";case"b":return"\b";case"f":return"\f";default:return e}}),lr=class{constructor(t){z(this,"_input");z(this,"_index",-1);z(this,"_tokenStart",0);z(this,"_next");this._input=t,this._advance()}nextToken(){for(;vo(this._next);)this._advance(!0);if(qo(this._next))return this._tokenizeString();if(us(this._next))return this._tokenizeIdentOrKeyword();if(gt(this._next))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(wo(this._next))return this._tokenizeOperator();if(Eo(this._next))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw new Error(`Expected end of input, got ${this._next}`)}_advance(t){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),t===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(t=0){let e=this._input.substring(this._tokenStart,this._index+t);return t===0&&this._clearValue(),e}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let t="unterminated string",e=this._next;for(this._advance(!0);this._next!==e;){if(this._next===void 0)throw new Error(t);if(this._next===92&&(this._advance(),this._next===void 0))throw new Error(t);this._advance()}let r=K(w.STRING,Co(this._getValue()));return this._advance(),r}_tokenizeIdentOrKeyword(){do this._advance();while(yo(this._next));let t=this._getValue(),e=xo(t)?w.KEYWORD:w.IDENTIFIER;return K(e,t)}_tokenizeNumber(){do this._advance();while(gt(this._next));return this._next===46?this._tokenizeDot():K(w.INTEGER,this._getValue())}_tokenizeDot(){return this._advance(),gt(this._next)?this._tokenizeFraction():(this._clearValue(),K(w.DOT,".",ar))}_tokenizeComma(){return this._advance(!0),K(w.COMMA,",")}_tokenizeColon(){return this._advance(!0),K(w.COLON,":")}_tokenizeFraction(){do this._advance();while(gt(this._next));return K(w.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let t=this._getValue(2);if(bo.indexOf(t)!==-1)this._advance(),this._advance();else{if(t=this._getValue(1),t==="=>")return this._advance(),K(w.ARROW,t);fo.indexOf(t)!==-1&&this._advance()}return t=this._getValue(),K(w.OPERATOR,t,Fr[t])}_tokenizeGrouper(){let t=String.fromCharCode(this._next),e=K(w.GROUPER,t,Fr[t]);return this._advance(!0),e}};var Br=(s,t)=>new ft(s,t).parse(),ft=class{constructor(t,e){z(this,"_kind");z(this,"_tokenizer");z(this,"_ast");z(this,"_token");z(this,"_value");this._tokenizer=new lr(t),this._ast=e}parse(){return this._advance(),this._parseExpression()}_advance(t,e){if(!this._matches(t,e))throw new Error(`Expected kind ${t} (${e}), was ${this._token?.kind} (${this._token?.value})`);let r=this._tokenizer.nextToken();this._token=r,this._kind=r?.kind,this._value=r?.value}_matches(t,e){return!(t&&this._kind!==t||e&&this._value!==e)}_parseExpression(){if(!this._token)return this._ast.empty();let t=this._parseUnary();return t===void 0?void 0:this._parsePrecedence(t,0)}_parsePrecedence(t,e){if(t===void 0)throw new Error("Expected left to be defined.");for(;this._token;)if(this._matches(w.GROUPER,"(")){let r=this._parseArguments();t=this._ast.invoke(t,void 0,r)}else if(this._matches(w.GROUPER,"[")){let r=this._parseIndex();t=this._ast.index(t,r)}else if(this._matches(w.DOT)){this._advance();let r=this._parseUnary();t=this._makeInvokeOrGetter(t,r)}else{if(this._matches(w.KEYWORD))break;if(this._matches(w.OPERATOR)&&this._token.precedence>=e)t=this._value==="?"?this._parseTernary(t):this._parseBinary(t,this._token);else break}return t}_makeInvokeOrGetter(t,e){if(e===void 0)throw new Error("expected identifier");if(e.type==="ID")return this._ast.getter(t,e.value);if(e.type==="Invoke"&&e.receiver.type==="ID"){let r=e.receiver;return this._ast.invoke(t,r.value,e.arguments)}else throw new Error(`expected identifier: ${e}`)}_parseBinary(t,e){if(hs.indexOf(e.value)===-1)throw new Error(`unknown operator: ${e.value}`);this._advance();let r=this._parseUnary();for(;(this._kind===w.OPERATOR||this._kind===w.DOT||this._kind===w.GROUPER)&&this._token.precedence>e.precedence;)r=this._parsePrecedence(r,this._token.precedence);return this._ast.binary(t,e.value,r)}_parseUnary(){if(this._matches(w.OPERATOR)){let t=this._value;if(this._advance(),t==="+"||t==="-"){if(this._matches(w.INTEGER))return this._parseInteger(t);if(this._matches(w.DECIMAL))return this._parseDecimal(t)}if(ps.indexOf(t)===-1)throw new Error(`unexpected token: ${t}`);let e=this._parsePrecedence(this._parsePrimary(),ar);return this._ast.unary(t,e)}return this._parsePrimary()}_parseTernary(t){this._advance(w.OPERATOR,"?");let e=this._parseExpression();this._advance(w.COLON);let r=this._parseExpression();return this._ast.ternary(t,e,r)}_parsePrimary(){switch(this._kind){case w.KEYWORD:let t=this._value;if(t==="this")return this._advance(),this._ast.id(t);throw nr.indexOf(t)!==-1?new Error(`unexpected keyword: ${t}`):new Error(`unrecognized keyword: ${t}`);case w.IDENTIFIER:return this._parseInvokeOrIdentifier();case w.STRING:return this._parseString();case w.INTEGER:return this._parseInteger();case w.DECIMAL:return this._parseDecimal();case w.GROUPER:return this._value==="("?this._parseParenOrFunction():this._value==="{"?this._parseMap():this._value==="["?this._parseList():void 0;case w.COLON:throw new Error('unexpected token ":"');default:return}}_parseList(){let t=[];do{if(this._advance(),this._matches(w.GROUPER,"]"))break;t.push(this._parseExpression())}while(this._matches(w.COMMA));return this._advance(w.GROUPER,"]"),this._ast.list(t)}_parseMap(){let t={};do{if(this._advance(),this._matches(w.GROUPER,"}"))break;let e=this._value;(this._matches(w.STRING)||this._matches(w.IDENTIFIER))&&this._advance(),this._advance(w.COLON),t[e]=this._parseExpression()}while(this._matches(w.COMMA));return this._advance(w.GROUPER,"}"),this._ast.map(t)}_parseInvokeOrIdentifier(){let t=this._value;if(t==="true")return this._advance(),this._ast.literal(!0);if(t==="false")return this._advance(),this._ast.literal(!1);if(t==="null")return this._advance(),this._ast.literal(null);if(t==="undefined")return this._advance(),this._ast.literal(void 0);let e=this._parseIdentifier(),r=this._parseArguments();return r?this._ast.invoke(e,void 0,r):e}_parseIdentifier(){if(!this._matches(w.IDENTIFIER))throw new Error(`expected identifier: ${this._value}`);let t=this._value;return this._advance(),this._ast.id(t)}_parseArguments(){if(!this._matches(w.GROUPER,"("))return;let t=[];do{if(this._advance(),this._matches(w.GROUPER,")"))break;let e=this._parseExpression();t.push(e)}while(this._matches(w.COMMA));return this._advance(w.GROUPER,")"),t}_parseIndex(){this._advance();let t=this._parseExpression();return this._advance(w.GROUPER,"]"),t}_parseParenOrFunction(){let t=this._parseArguments();if(this._matches(w.ARROW)){this._advance();let e=this._parseExpression(),r=t?.map(i=>i.value)??[];return this._ast.arrowFunction(r,e)}else return this._ast.paren(t[0])}_parseString(){let t=this._ast.literal(this._value);return this._advance(),t}_parseInteger(t=""){let e=this._ast.literal(parseInt(`${t}${this._value}`,10));return this._advance(),e}_parseDecimal(t=""){let e=this._ast.literal(parseFloat(`${t}${this._value}`));return this._advance(),e}};var _o={"+":(s,t)=>s+t,"-":(s,t)=>s-t,"*":(s,t)=>s*t,"/":(s,t)=>s/t,"%":(s,t)=>s%t,"==":(s,t)=>s==t,"!=":(s,t)=>s!=t,"===":(s,t)=>s===t,"!==":(s,t)=>s!==t,">":(s,t)=>s>t,">=":(s,t)=>s>=t,"<":(s,t)=>s<t,"<=":(s,t)=>s<=t,"||":(s,t)=>s||t,"&&":(s,t)=>s&&t,"??":(s,t)=>s??t,"|":(s,t)=>t(s),"|>":(s,t)=>t(s)},ko={"+":s=>s,"-":s=>-s,"!":s=>!s},cr=class{empty(){return{type:"Empty",evaluate(t){return t},getIds(t){return t}}}literal(t){return{type:"Literal",value:t,evaluate(e){return this.value},getIds(e){return e}}}id(t){return{type:"ID",value:t,evaluate(e){return this.value==="this"?e:e?.[this.value]},getIds(e){return e.push(this.value),e}}}unary(t,e){let r=ko[t];return{type:"Unary",operator:t,child:e,evaluate(i){return r(this.child.evaluate(i))},getIds(i){return this.child.getIds(i)}}}binary(t,e,r){let i=_o[e];return{type:"Binary",operator:e,left:t,right:r,evaluate(o){if(this.operator==="="){if(this.left.type!=="ID"&&this.left.type!=="Getter"&&this.left.type!=="Index")throw new Error(`Invalid assignment target: ${this.left}`);let n=this.right.evaluate(o),a,c;return this.left.type==="Getter"?(a=this.left.receiver.evaluate(o),c=this.left.name):this.left.type==="Index"?(a=this.left.receiver.evaluate(o),c=this.left.argument.evaluate(o)):this.left.type==="ID"&&(a=o,c=this.left.value),a===void 0?void 0:a[c]=n}return i(this.left.evaluate(o),this.right.evaluate(o))},getIds(o){return this.left.getIds(o),this.right.getIds(o),o}}}getter(t,e){return{type:"Getter",receiver:t,name:e,evaluate(r){return this.receiver.evaluate(r)?.[this.name]},getIds(r){return this.receiver.getIds(r),r}}}invoke(t,e,r){if(e!=null&&typeof e!="string")throw new Error("method not a string");return{type:"Invoke",receiver:t,method:e,arguments:r,evaluate(i){let o=this.receiver.evaluate(i),n=this.method?o:i?.this??i,a=this.method?o?.[e]:o,d=(this.arguments??[]).map(u=>u?.evaluate(i));return a?.apply?.(n,d)},getIds(i){return this.receiver.getIds(i),this.arguments?.forEach(o=>o?.getIds(i)),i}}}paren(t){return t}index(t,e){return{type:"Index",receiver:t,argument:e,evaluate(r){return this.receiver.evaluate(r)?.[this.argument.evaluate(r)]},getIds(r){return this.receiver.getIds(r),r}}}ternary(t,e,r){return{type:"Ternary",condition:t,trueExpr:e,falseExpr:r,evaluate(i){return this.condition.evaluate(i)?this.trueExpr.evaluate(i):this.falseExpr.evaluate(i)},getIds(i){return this.condition.getIds(i),this.trueExpr.getIds(i),this.falseExpr.getIds(i),i}}}map(t){return{type:"Map",entries:t,evaluate(e){let r={};if(t&&this.entries)for(let i in t){let o=this.entries[i];o&&(r[i]=o.evaluate(e))}return r},getIds(e){if(t&&this.entries)for(let r in t){let i=this.entries[r];i&&i.getIds(e)}return e}}}list(t){return{type:"List",items:t,evaluate(e){return this.items?.map(r=>r?.evaluate(e))},getIds(e){return this.items?.forEach(r=>r?.getIds(e)),e}}}arrowFunction(t,e){return{type:"ArrowFunction",params:t,body:e,evaluate(r){let i=this.params,o=this.body;return function(...n){let a=Object.fromEntries(i.map((d,u)=>[d,n[u]])),c=new Proxy(r??{},{set(d,u,m){return a.hasOwnProperty(u)&&(a[u]=m),d[u]=m},get(d,u){return a.hasOwnProperty(u)?a[u]:d[u]}});return o.evaluate(c)}},getIds(r){return this.body.getIds(r).filter(i=>!this.params.includes(i))}}}};var jr=null,ms={boundAttributeSuffix:M.M,marker:M.P,markerMatch:M.A,HTML_RESULT:M.C,getTemplateHtml:M.L,overrideDirectiveResolve:(s,t)=>class extends s{_$AS(e,r){return t(this,r)}},patchDirectiveResolve:(s,t)=>{if(s.prototype._$AS!==t){jr??(jr=s.prototype._$AS.name);for(let e=s.prototype;e!==Object.prototype;e=Object.getPrototypeOf(e))if(e.hasOwnProperty(jr))return void(e[jr]=t);throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527")}},setDirectiveClass(s,t){s._$litDirective$=t},getAttributePartCommittedValue:(s,t,e)=>{let r=R;return s.j=i=>r=i,s._$AI(t,s,e),r},connectedDisconnectable:s=>({...s,_$AU:!0}),resolveDirective:M.V,AttributePart:M.H,PropertyPart:M.B,BooleanAttributePart:M.N,EventPart:M.U,ElementPart:M.F,TemplateInstance:M.R,isIterable:M.D,ChildPart:M.I};var{AttributePart:To,PropertyPart:Ao,BooleanAttributePart:So,EventPart:Ro}=ms,Xr=new cr,Wr=new Map,gs=s=>s.replace(/-(-|\w)/g,(t,e)=>e.toUpperCase()),dr=(s,t)=>{let e=Wr.get(s);if(e===void 0){if(Wr.has(s))return;if(s=s.trim(),s.startsWith("{{")&&s.endsWith("}}")){let r=s.substring(2,s.length-2).trim();e=new ft(r,Xr).parse(),Wr.set(s,e)}}return e?.evaluate(t)},Mo=(s,t,e,r)=>{let i=s.getAttribute("if");if(i!==null&&dr(i,t))return pr(s,t,e,r)},fs=/(?<!\\){{(.*?)(?:(?<!\\)}})/g,bs=s=>/(?:\\{{)|(?:\\}})/g.test(s),bt=s=>s.replaceAll(/\\{{/g,"{{").replace(/\\}}/g,"}}"),Lo=(s,t,e,r)=>{let i=s.getAttribute("repeat");if(i!==null){let o=dr(i,t);if(!o[Symbol.iterator])return k;let n=vt(s),a=-1,c=[];for(let d of o){a++;let u=Object.create(t);u.item=d,u.index=a,u.this=t.this??t;let m=[];for(let y of n.parts){let x=y.update(u,e,r);y.type===1?m.push(...x):m.push(x)}let f={_$litType$:n,values:m};c.push(f)}return c}},ys={if:Mo,repeat:Lo},xs=(s,t=ys,e={},r)=>{let o=vt(s).renderers;if(r){let a=vt(r).renderers,c=o.super;c!==void 0?e={...o,...e,super:(d,u,m)=>(m={...a,...m,super:(f,y,x)=>pr(r,f,y,x)},c(d,u,m))}:(e={...a,...o,...e},s=r)}else e={...o,...e};return n=>pr(s,n,t,e)};var pr=(s,t,e=ys,r={})=>{let i=vt(s),o=[];for(let a of i.parts){let c=a.update(t,e,r);a.type===1?o.push(...c):o.push(c)}return{_$litType$:i,values:o}},vs=new Map,vt=s=>{let t=vs.get(s);return t===void 0&&vs.set(s,t=$o(s)),t},$o=s=>{let t={h:void 0,el:s.cloneNode(!0),parts:[],renderers:{}},e=document.createTreeWalker(t.el.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),r=e.currentNode,i=-1,o=[];for(;(r=e.nextNode())!==null;)if(r.nodeType===Node.ELEMENT_NODE){i++;let n=r;if(n.tagName==="TEMPLATE"){let c=n.getAttribute("type"),d=n.getAttribute("name"),u=n.getAttribute("call");if(u!==null||c!==null||d!==null){n.parentNode.insertBefore(document.createComment(""),n),o.push(n);let m;if(u!==null){let f=u.trim(),y=f.startsWith("{{")&&f.endsWith("}}");m=(x,_,S)=>{let D=n.getAttribute("data"),Qe=D===null?void 0:dr(D,x);return(y?dr(f,x):S[u])?.(Qe,_,S)}}else c!==null?m=(f,y,x)=>{let _=y[c];return _?.(n,f,y,x)}:(d==="super"?t.renderers.super=(f,y,x)=>{let _=x.super,S=vt(n);return x={...x,...S.renderers},_(f,y,x)}:t.renderers[d]=(f,y,x)=>pr(n,f,y,x),m=(f,y,x)=>{let _=x[d];return _?.(f,y,x)});t.parts.push({type:2,index:i,update:m});continue}}let a=n.getAttributeNames();for(let c of a){let d=n.getAttribute(c),u=d.split(fs);if(u.length===1){bs(d)&&n.setAttribute(c,bt(d));continue}n.removeAttribute(c);let m=c,f=To,y=c[0];y==="."?(m=gs(c.substring(1)),f=Ao):y==="?"?(m=c.substring(1),f=So):y==="@"&&(m=gs(c.substring(1)),f=Ro);let x=[bt(u[0])],_=[];for(let S=1;S<u.length;S+=2){let D=u[S];_.push(Br(D,Xr)),x.push(bt(u[S+1]))}t.parts.push({type:1,index:i,name:m,strings:x,ctor:f,update:(S,D,Qe)=>_.map(ce=>ce.evaluate(S))})}}else if(r.nodeType===Node.TEXT_NODE){let n=r,a=n.textContent,c=a.split(fs);c.length>1?n.textContent=bt(c[0]):bs(a)&&(n.textContent=bt(a));for(let d=1;d<c.length;d+=2){let u=c[d],m=Br(u,Xr);t.parts.push({type:2,index:++i,update:(y,x)=>m.evaluate(y)});let f=new Text(c[d+1].replace("\\{{","{{"));n.parentNode.insertBefore(f,n.nextSibling),n.parentNode.insertBefore(document.createComment(""),n.nextSibling),n=f,e.currentNode=f}}for(let n of o)n.remove();return t};var ze=class extends L{constructor(){super();this.maxDisplayedItems=2;this.skipOnCategory="dep-informational";this._internals.ariaLabel="pagination"}createRenderRoot(){return this}render(){let e=this._testContext.items.reduce((a,c)=>{let u=c.category?.split(" ").includes(this.skipOnCategory)?"i":a.counter++;return a.result.push({...c,newIndex:u}),a},{counter:0,result:[]}).result,r=e.findIndex(a=>a.identifier===this._testContext.navItemId),i=Math.max(0,r-this.maxDisplayedItems),o=Math.min(e.length,r+this.maxDisplayedItems+1),n=e.slice(i,o);return h`
3642
+ ${n.map(a=>{let c=a.variables.find(ce=>ce.identifier=="SCORE"),d=parseInt(c?.value?.toString()),u=a.variables.find(ce=>ce.identifier==="completionStatus")?.value,m=a.category!==this.skipOnCategory?"regular":"info",f=this._testContext.navItemId===a.identifier,y=this._testContext.view==="scorer"&&m=="regular"&&d!==void 0&&!isNaN(d)&&d>0,x=this._testContext.view==="scorer"&&m=="regular"&&d!==void 0&&!isNaN(d)&&d<=0,_=this._testContext.view==="candidate"&&u==="completed"&&a.category!==this.skipOnCategory,S={...a,type:m,active:f,correct:y,incorrect:x,answered:_},D=this.firstElementChild;return xs(D)({item:S})})}
3643
+ `}};l([p({type:Number,attribute:"max-displayed-items"})],ze.prototype,"maxDisplayedItems",2),l([p({type:String,attribute:"skip-on-category"})],ze.prototype,"skipOnCategory",2),ze=l([g("test-paging-buttons-stamp")],ze);function qs(s){class t extends s{createRenderRoot(){return this}get assessmentItem(){return this.renderRoot?.querySelector("qti-assessment-item")}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-item-connected",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href}}))}render(){return h`${this.xmlDoc}`}}return l([p({type:String,reflect:!0})],t.prototype,"identifier",2),l([p({type:String})],t.prototype,"href",2),l([p({type:Object,attribute:!1})],t.prototype,"xmlDoc",2),t}var hr=class extends qs(v){};hr=l([g("qti-item")],hr);var ws=[{identifier:"completionStatus",cardinality:"single",baseType:"string",value:"unknown",type:"outcome"},{identifier:"numAttempts",cardinality:"single",baseType:"integer",value:"0",type:"response"}],$=Symbol("item");var I=class extends v{constructor(){super();this.identifier="";this.adaptive="false";this.timeDependent=null;this._handleDisabledChange=(e,r)=>{this._interactionElements.forEach(i=>i.disabled=r)};this._handleReadonlyChange=(e,r)=>this._interactionElements.forEach(i=>i.readonly=r);this._context={identifier:this.getAttribute("identifier"),variables:ws};this._initialContext={...this._context,variables:this._context.variables};this._feedbackElements=[];this._interactionElements=[];this.addEventListener("qti-register-variable",e=>{this._context={...this._context,variables:[...this._context.variables,e.detail.variable]},this._initialContext=this._context,e.stopPropagation()}),this.addEventListener("qti-register-feedback",e=>{e.stopPropagation();let r=e.detail;this._feedbackElements.push(r),r.checkShowFeedback(r.outcomeIdentifier)}),this.addEventListener("qti-register-interaction",e=>{e.stopPropagation(),this._interactionElements.push(e.target)}),this.addEventListener("end-attempt",e=>{let{responseIdentifier:r,countAttempt:i}=e.detail;this.validate(),this.updateResponseVariable(r,"true"),this.processResponse(i)}),this.addEventListener("qti-set-outcome-value",e=>{let{outcomeIdentifier:r,value:i}=e.detail;this.updateOutcomeVariable(r,i),e.stopPropagation()}),this.addEventListener("qti-interaction-response",this.handleUpdateResponseVariable)}get variables(){return this._context.variables.map(e=>({identifier:e.identifier,value:e.value,type:e.type,...e.type==="outcome"&&e.identifier==="SCORE"?{externalScored:e.externalScored}:{}}))}set variables(e){if(!Array.isArray(e)||e.some(r=>!("identifier"in r))){console.warn("variables property should be an array of VariableDeclaration");return}this._context={...this._context,variables:this._context.variables.map(r=>{let i=e.find(o=>o.identifier===r.identifier);return i?{...r,...i}:r})},this._context.variables.forEach(r=>{if(r.type==="response"){let i=this._interactionElements.find(o=>o.responseIdentifier===r.identifier);i&&(i.value=r.value)}r.type==="outcome"&&this._feedbackElements.forEach(i=>i.checkShowFeedback(r.identifier))})}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this._emit("qti-assessment-item-connected",this)}set responses(e){if(e)for(let r of e){this.getResponse(r.responseIdentifier)&&this.updateResponseVariable(r.responseIdentifier,r.response);let o=this._interactionElements.find(n=>n.getAttribute("response-identifier")===r.responseIdentifier);o&&(o.value=r.response)}}render(){return h`<slot></slot>`}showCorrectResponse(e){let i=this._context.variables.filter(o=>"correctResponse"in o&&o.correctResponse).map(o=>({responseIdentifier:o.identifier,response:o.correctResponse}));for(let o of i){let n=this._interactionElements.find(a=>a.getAttribute("response-identifier")===o.responseIdentifier);n&&(n.correctResponse=e?o.response:"")}}processResponse(e=!0){this.validate();let r=this.querySelector("qti-response-processing");return!r||!r.process?!1:(r.process(),this.adaptive==="false"&&this.updateOutcomeVariable("completionStatus",this._getCompletionStatus()),e&&this.updateOutcomeVariable("numAttempts",(+this._context.variables.find(i=>i.identifier==="numAttempts")?.value+1).toString()),this._emit("qti-response-processed"),!0)}resetResponses(){this._context=this._initialContext}getResponse(e){return this.getVariable(e)}getOutcome(e){return this.getVariable(e)}getVariable(e){return this._context.variables.find(r=>r.identifier===e)||null}handleUpdateResponseVariable(e){let{responseIdentifier:r,response:i}=e.detail;this.updateResponseVariable(r,i)}updateResponseVariable(e,r){this._context={...this._context,variables:this._context.variables.map(i=>i.identifier!==e?i:{...i,value:r})},this._emit("qti-interaction-changed",{item:this.identifier,responseIdentifier:e,response:Array.isArray(r)?[...r]:r}),this.adaptive==="false"&&this.updateOutcomeVariable("completionStatus",this._getCompletionStatus())}updateOutcomeVariable(e,r){let i=this.getOutcome(e);if(!i){console.warn(`Can not set qti-outcome-identifier: ${e}, it is not available`);return}this._context={...this._context,variables:this._context.variables.map(o=>o.identifier!==e?o:{...o,value:i.cardinality==="single"?r:[...o.value,r]})},this._feedbackElements.forEach(o=>o.checkShowFeedback(e)),this._emit("qti-outcome-changed",{item:this.identifier,outcomeIdentifier:e,value:this._context.variables.find(o=>o.identifier===e)?.value})}validate(){return this._interactionElements.every(e=>e.validate())?!0:this._interactionElements.some(e=>e.validate())?!1:null}_getCompletionStatus(){let e=this.validate();return e===!0?"completed":e===!1?"incomplete":"not_attempted"}_emit(e,r=null){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:r}))}};l([p({type:String})],I.prototype,"title",2),l([p({type:String})],I.prototype,"identifier",2),l([p({type:String})],I.prototype,"adaptive",2),l([p({type:String})],I.prototype,"timeDependent",2),l([p({type:Boolean})],I.prototype,"disabled",2),l([A("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"_handleDisabledChange",2),l([p({type:Boolean})],I.prototype,"readonly",2),l([A("readonly",{waitUntilFirstUpdate:!0})],I.prototype,"_handleReadonlyChange",2),l([Le({context:$})],I.prototype,"_context",2),I=l([g("qti-assessment-item")],I);var Ue=class extends v{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0});if(this.dispatchEvent(e)){let o=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);o?await this.updateStimulusRef(o):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async updateStimulusRef(e){let r=await Zt().load(this.href).then(i=>i.htmlDoc());if(r){let i=r.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.innerHTML="",e.append(...i)}}};l([p({type:String})],Ue.prototype,"identifier",2),l([p({type:String})],Ue.prototype,"href",2),Ue=l([g("qti-assessment-stimulus-ref")],Ue);var Es={toAttribute:s=>s?"true":"false",fromAttribute:s=>s==="true"};function Z(s,t){class e extends s{constructor(...o){super(...o);this.identifier="";this.tabIndex=0;this.disabled=!1;this.readonly=!1;this.internals=this.attachInternals()}handleDisabledChange(o,n){this.tabIndex=n?-1:0,n&&this.blur()}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`register-${t}`,{bubbles:!0,composed:!0}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`unregister-${t}`,{bubbles:!0,composed:!0}))}_onKeyUp(o){o.altKey||o.code==="Space"&&(o.preventDefault(),this._activate())}_onClick(){this.disabled||this.readonly||(this.focus(),this._activate())}_activate(){this.disabled||this.readonly||this.dispatchEvent(new CustomEvent(`activate-${t}`,{bubbles:!0,composed:!0,detail:{identifier:this.identifier}}))}render(){return h`<slot></slot>`}}return l([p({type:String})],e.prototype,"identifier",2),l([p({type:Number,reflect:!0,attribute:"tabindex"})],e.prototype,"tabIndex",2),l([p({type:Boolean,reflect:!0,attribute:"aria-disabled",converter:Es})],e.prototype,"disabled",2),l([p({type:Boolean,reflect:!0,attribute:"aria-readonly",converter:Es})],e.prototype,"readonly",2),l([A("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e}var Cs=b`
3644
+ :host {
3645
+ display: block;
3646
+ }
3647
+ `;var yt=class extends v{render(){return h`<slot name="qti-rubric-block"></slot><slot></slot>`}};yt.styles=Cs,yt=l([g("qti-item-body")],yt);var ur=class extends v{render(){return h`<slot></slot>`}connectedCallback(){this.parentElement.tagName.endsWith("INTERACTION")&&this.setAttribute("slot","prompt")}};ur=l([g("qti-prompt")],ur);var mr=class extends v{constructor(){super(...arguments);this.styleElement=null}firstUpdated(e){super.firstUpdated(e);let r=this.getAttribute("href");if(r!==null&&fetch(r).then(i=>i.text()).then(i=>{let o=this.minifyCss(i);this.styleElement=document.createElement("style"),this.styleElement.media="screen",this.styleElement.textContent=`@scope {${o}}`,this.parentElement?this.parentElement.appendChild(this.styleElement):console.warn("No parent element to append the scoped stylesheet to.")}).catch(i=>{console.error("Failed to load stylesheet:",i)}),this.textContent!==null&&this.textContent.trim()!==""){let i=this.minifyCss(this.textContent);this.styleElement=document.createElement("style"),this.styleElement.media="screen",this.styleElement.textContent=`@scope {${i}}`,this.parentElement?this.parentElement.appendChild(this.styleElement):console.warn("No parent element to append the scoped stylesheet to.")}}minifyCss(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;])\s*/g,"$1").trim()}disconnectedCallback(){if(this.styleElement)try{this.styleElement.remove()}catch(e){console.error("Could not remove stylesheet:",e)}super.disconnectedCallback()}};mr=l([g("qti-stylesheet")],mr);var me=class extends v{render(){return h`<slot></slot>`}defaultValues(t){let e=Array.from(this.querySelectorAll("qti-default-value > qti-value"));if(e.length===0)return null;let r=e.map(i=>i.innerHTML.trim());return r.length>1||t.cardinality==="multiple"||t.cardinality==="ordered"?r:r[0]}};me=l([g("qti-variabledeclaration")],me);var J=class extends me{constructor(){super(...arguments);this.externalScored=null}render(){let e=this.itemContext?.variables.find(r=>r.identifier===this.identifier)?.value;return h`${JSON.stringify(e,null,2)}`}get interpolationTable(){let e=this.querySelector("qti-interpolation-table");if(e){let r=new Map;for(let i of e.querySelectorAll("qti-interpolation-table-entry")){!i.getAttribute("source-value")&&i.getAttribute("target-value")&&console.error("source-value or target-value is missing in qti-interpolation-table-entry");let o=parseInt(i.getAttribute("source-value")),n=parseInt(i.getAttribute("target-value"));(isNaN(o)||isNaN(n))&&console.error("source-value or target-value is not a number in qti-interpolation-table-entry"),r.set(o,n)}return r}return null}connectedCallback(){super.connectedCallback();let e={identifier:this.identifier,cardinality:this.cardinality,baseType:this.baseType,type:"outcome",value:null,interpolationTable:this.interpolationTable,externalScored:this.externalScored};e.value=this.defaultValues(e),this.dispatchEvent(new CustomEvent("qti-register-variable",{bubbles:!0,composed:!0,detail:{variable:e}}))}};J.styles=[b`
3648
+ :host {
3649
+ display: none;
3650
+ }
3651
+ `],l([p({type:String,attribute:"base-type"})],J.prototype,"baseType",2),l([p({type:String,attribute:"external-scored"})],J.prototype,"externalScored",2),l([p({type:String})],J.prototype,"identifier",2),l([p({type:String})],J.prototype,"cardinality",2),l([T({context:$,subscribe:!0}),q()],J.prototype,"itemContext",2),J=l([g("qti-outcome-declaration")],J);var ne=class extends me{render(){let t=this.itemContext?.variables.find(e=>e.identifier===this.identifier)?.value;return h`${JSON.stringify(t,null,2)}`}connectedCallback(){super.connectedCallback();let t={baseType:this.baseType,identifier:this.identifier,correctResponse:this.correctResponse,cardinality:this.cardinality||"single",mapping:this.mapping,value:null,type:"response",candidateResponse:null};t.value=this.defaultValues(t),this.dispatchEvent(new CustomEvent("qti-register-variable",{bubbles:!0,composed:!0,detail:{variable:t}}))}get correctResponse(){let t,e=this.querySelector("qti-correct-response");if(e){let r=e.querySelectorAll("qti-value");if(this.cardinality==="single"&&r.length>0)t=r[0].textContent,r[0].remove();else if(this.cardinality!=="single"){t=[];for(let i=0;i<r.length;i++)t.push(r[i].textContent),r[i].remove()}}return t}get mapping(){return this.querySelector("qti-mapping")}};ne.styles=[b`
3652
+ :host {
3653
+ display: none;
3654
+ }
3655
+ `],l([p({type:String,attribute:"base-type"})],ne.prototype,"baseType",2),l([p({type:String})],ne.prototype,"identifier",2),l([p({type:String})],ne.prototype,"cardinality",2),l([T({context:$,subscribe:!0}),q()],ne.prototype,"itemContext",2),ne=l([g("qti-response-declaration")],ne);var gr=class extends v{};gr=l([g("qti-companion-materials-info")],gr);var fr=class extends v{render(){return h`<slot></slot>`}};fr=l([g("qti-content-body")],fr);var Q=class extends v{handleclassNamesChange(){this.classNames.split(" ").forEach(e=>{switch(e){case"qti-rubric-discretionary-placement":this.setAttribute("slot","qti-rubric-block");break;case"qti-rubric-inline":this.setAttribute("slot","");break;default:break}})}render(){return h`<slot></slot>`}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-rubric-block")}};Q.styles=b`
3656
+ :host {
3657
+ display: block;
3658
+ }
3659
+ `,l([p({type:String})],Q.prototype,"id",2),l([p({type:String})],Q.prototype,"use",2),l([p({type:String})],Q.prototype,"view",2),l([p({type:String,attribute:"class"})],Q.prototype,"classNames",2),l([A("classNames",{waitUntilFirstUpdate:!0})],Q.prototype,"handleclassNamesChange",1),Q=l([g("qti-rubric-block")],Q);var Do=()=>new Intl.NumberFormat().format(.1).replace(/\d/g,""),xt=s=>{if(typeof s=="string")return s;let t=Do();return t==="."?s.toLocaleString():s.toString().replace(".","").replace(t,".")};function Yr(s){return s==null}function qt(s){return s.replace(/([^:]\/)\/+/g,"$1").replace(/\/\//g,"/").replace("http:/","http://").replace("https:/","https://")}var N=class extends v{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-feedback",{bubbles:!0,composed:!0,detail:this}))}checkShowFeedback(t){let e=this._context.variables.find(i=>i.identifier===t)||null;if(this.outcomeIdentifier!==t||!e)return;let r=!1;Array.isArray(e.value)?r=e.value.includes(this.identifier):r=!Yr(this.identifier)&&!Yr(e?.value)&&this.identifier===e.value||!1,this.showFeedback(r)}showFeedback(t){this.showStatus=t&&this.showHide==="show"||!t&&this.showHide==="hide"?"on":"off"}};l([p({type:String,attribute:"show-hide"})],N.prototype,"showHide",2),l([p({type:String,attribute:"outcome-identifier"})],N.prototype,"outcomeIdentifier",2),l([p({type:String})],N.prototype,"identifier",2),l([p({type:String,attribute:!1})],N.prototype,"showStatus",2),l([T({context:$,subscribe:!0}),q()],N.prototype,"_context",2);var wt=class extends N{render(){return h` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `}firstUpdated(t){this.checkShowFeedback(this.outcomeIdentifier)}};wt.styles=b`
3660
+ :host {
3661
+ display: block;
3662
+ }
3663
+ .on {
3664
+ display: block;
3665
+ }
3666
+ .off {
3667
+ display: none;
3668
+ }
3669
+ `,wt=l([g("qti-feedback-block")],wt);var Et=class extends N{constructor(){super(...arguments);this.render=()=>h` <slot part="feedback" class="${this.showStatus}"></slot> `}};Et.styles=b`
3670
+ .on {
3671
+ display: inline-block;
3672
+ }
3673
+ .off {
3674
+ display: none;
3675
+ }
3676
+ `,Et=l([g("qti-feedback-inline")],Et);var Ct=class extends N{constructor(){super(...arguments);this.render=()=>h` <slot part="feedback" class="${this.showStatus}"></slot> `}};Ct.styles=b`
3677
+ .on {
3678
+ display: inline-block;
3679
+ }
3680
+ .off {
3681
+ display: none;
3682
+ }
3683
+ `,Ct=l([g("qti-modal-feedback")],Ct);var ge=s=>s??k;var E=class extends v{constructor(){super();this.disabled=!1;this.readonly=!1;this._internals=this.attachInternals()}reportValidity(){return this._internals.reportValidity()}reset(){this.value=""}get correctResponse(){return this._correctResponse}set correctResponse(e){this._correctResponse=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-interaction",{bubbles:!0,composed:!0,cancelable:!1,detail:{responseIdentifier:this.responseIdentifier}}))}saveResponse(e){this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,cancelable:!1,detail:{responseIdentifier:this.responseIdentifier,response:Array.isArray(e)?[...e]:e}}))}};E.formAssociated=!0,l([p({type:String,attribute:"response-identifier"})],E.prototype,"responseIdentifier",2),l([p({reflect:!0,type:Boolean})],E.prototype,"disabled",2),l([p({reflect:!0,type:Boolean})],E.prototype,"readonly",2),l([q()],E.prototype,"_correctResponse",2);var H=class extends E{constructor(){super(...arguments);this._rows=5;this._value=""}handleclassNamesChange(e,r){let i=r.split(" "),o=!1;if(i.forEach(n=>{if(n.startsWith("qti-height-lines-")){let a=n.replace("qti-height-lines-","");this._rows=parseInt(a),o=!0}}),!o&&this.expectedLength){let n=Math.ceil(this.expectedLength/50);this._rows=n}}get value(){return this._value}set value(e){if(typeof e=="string"){this._value=e;let r=new FormData;r.append(this.responseIdentifier,e),this._internals.setFormValue(r),this.validate()}else throw new Error("Value must be a string")}validate(){let e=this.shadowRoot.querySelector("textarea");if(!e)return!1;if(this.patternMask&&this.dataPatternmaskMessage){this._internals.setValidity({}),e.setCustomValidity("");let r=this.patternMask.startsWith("^")&&this.patternMask.endsWith("$")?this.patternMask:`^${this.patternMask}$`,i=new RegExp(r);e.checkValidity()&&i.test(e.value)||(this._internals.setValidity({customError:!0},this.dataPatternmaskMessage),e.setCustomValidity(this.dataPatternmaskMessage))}else{let r=e.checkValidity();this._internals.setValidity(r?{}:{customError:!1})}return this._value!==""&&e.checkValidity()}reportValidity(){let e=this.shadowRoot.querySelector("textarea");if(!e)return!1;let r=this.validate();return r||e.reportValidity(),r}static get styles(){return[b`
3684
+ /* PK: display host as block, else design will be collapsed */
3685
+ :host {
3686
+ display: block;
3687
+ }
3688
+ textarea {
3689
+ box-sizing: border-box;
3690
+ width: 100%;
3691
+ height: 100%;
3692
+ border: 0;
3693
+ }
3694
+ `]}render(){return h`<slot name="prompt"></slot
3695
+ ><textarea
3696
+ part="textarea"
3697
+ name="${this.responseIdentifier}"
3698
+ spellcheck="false"
3699
+ autocomplete="off"
3700
+ maxlength="${5e3}"
3701
+ @keydown="${e=>e.stopImmediatePropagation()}"
3702
+ @keyup="${this.textChanged}"
3703
+ @change="${this.textChanged}"
3704
+ @blur="${e=>{this.reportValidity()}}"
3705
+ placeholder="${ge(this.placeholderText?this.placeholderText:void 0)}"
3706
+ rows="${this._rows}"
3707
+ ?disabled="${this.disabled}"
3708
+ ?readonly="${this.readonly}"
3709
+ .value=${this._value}
3710
+ ></textarea>`}textChanged(e){if(this.disabled||this.readonly)return;let r=e.target;this.setEmptyAttribute(r.value),this._value!==r.value&&(this.value=r.value,this.saveResponse(r.value))}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};l([q()],H.prototype,"_rows",2),l([p({type:Number,attribute:"expected-length"})],H.prototype,"expectedLength",2),l([p({type:String,attribute:"pattern-mask"})],H.prototype,"patternMask",2),l([p({type:String,attribute:"placeholder-text"})],H.prototype,"placeholderText",2),l([p({type:String,attribute:"data-patternmask-message"})],H.prototype,"dataPatternmaskMessage",2),l([q()],H.prototype,"_value",2),l([p({type:String,attribute:"class"})],H.prototype,"classNames",2),l([A("classNames")],H.prototype,"handleclassNamesChange",1),H=l([g("qti-extended-text-interaction")],H);var _s=()=>new Kr,Kr=class{},Gr=new WeakMap,Oh=F(class extends Oe{render(s){return k}update(s,[t]){let e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),k}rt(s){if(this.isConnected||(s=void 0),typeof this.Y=="function"){let t=this.ht??globalThis,e=Gr.get(t);e===void 0&&(e=new WeakMap,Gr.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){return typeof this.Y=="function"?Gr.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ks=b`
3711
+ :host {
3712
+ display: inline-block;
3713
+ }
3714
+ [part='correct'] {
3715
+ position: absolute;
3716
+ width: 100%;
3717
+ }
3718
+ :host(.qti-input-width-1) [part='input'] {
3719
+ width: 1.1rem;
3720
+ min-width: 1.1rem;
3721
+ }
3722
+
3723
+ :host(.qti-input-width-2) [part='input'] {
3724
+ width: 2.3rem;
3725
+ min-width: 2.3rem;
3726
+ }
3727
+
3728
+ :host(.qti-input-width-3) [part='input'] {
3729
+ width: 3.3rem;
3730
+ min-width: 3.3rem;
3731
+ }
3732
+
3733
+ :host(.qti-input-width-4) [part='input'] {
3734
+ width: 4.2rem;
3735
+ min-width: 4.2rem;
3736
+ }
3737
+
3738
+ :host(.qti-input-width-6) [part='input'] {
3739
+ width: 6.6rem;
3740
+ min-width: 6.6rem;
3741
+ }
3742
+
3743
+ :host(.qti-input-width-10) [part='input'] {
3744
+ width: 8rem;
3745
+ min-width: 8rem;
3746
+ }
3747
+
3748
+ :host(.qti-input-width-15) [part='input'] {
3749
+ width: 12rem;
3750
+ min-width: 12rem;
3751
+ }
3752
+
3753
+ :host(.qti-input-width-20) [part='input'] {
3754
+ width: 17rem;
3755
+ min-width: 17rem;
3756
+ }
3757
+
3758
+ :host(.qti-input-width-25) [part='input'] {
3759
+ width: 20rem;
3760
+ min-width: 20rem;
3761
+ }
3762
+
3763
+ :host(.qti-input-width-30) [part='input'] {
3764
+ width: 24rem;
3765
+ min-width: 24rem;
3766
+ }
3767
+
3768
+ :host(.qti-input-width-35) [part='input'] {
3769
+ width: 28rem;
3770
+ min-width: 28rem;
3771
+ }
3772
+
3773
+ :host(.qti-input-width-40) [part='input'] {
3774
+ width: 32rem;
3775
+ min-width: 32rem;
3776
+ }
3777
+
3778
+ :host(.qti-input-width-45) [part='input'] {
3779
+ width: 36rem;
3780
+ min-width: 36rem;
3781
+ }
3782
+
3783
+ :host(.qti-input-width-50) [part='input'] {
3784
+ width: 40rem;
3785
+ min-width: 40rem;
3786
+ }
3787
+
3788
+ :host(.qti-input-width-72) [part='input'] {
3789
+ width: 57rem;
3790
+ min-width: 57rem;
3791
+ }
3792
+ `;var ee=class extends E{constructor(){super(...arguments);this._value="";this.inputRef=_s()}get value(){return this._value}set value(e){if(typeof e=="string"){this._value=e;let r=new FormData;r.append(this.responseIdentifier,e),this._internals.setFormValue(r),this.validate()}else throw new Error("Value must be a string")}validate(){let e=this.shadowRoot.querySelector("input");if(!e)return!1;if(this.patternMask&&this.dataPatternmaskMessage)this._internals.setValidity({}),e.setCustomValidity(""),e.checkValidity()||(this._internals.setValidity({customError:!0},this.dataPatternmaskMessage),e.setCustomValidity(this.dataPatternmaskMessage));else{let r=e.checkValidity();this._internals.setValidity(r?{}:{customError:!1})}return this._value!==""&&e.checkValidity()}render(){return h`
3793
+ <input
3794
+ part="input"
3795
+ name="${this.responseIdentifier}"
3796
+ spellcheck="false"
3797
+ autocomplete="off"
3798
+ @blur="${e=>{this.reportValidity()}}"
3799
+ @keydown="${e=>e.stopImmediatePropagation()}"
3800
+ @keyup="${this.textChanged}"
3801
+ @change="${this.textChanged}"
3802
+ type="${this.patternMask=="[0-9]*"?"number":"text"}"
3803
+ placeholder="${ge(this.placeholderText?this.placeholderText:void 0)}"
3804
+ .value="${this._value}"
3805
+ pattern="${ge(this.patternMask?this.patternMask:void 0)}"
3806
+ maxlength=${1e3}
3807
+ ?disabled="${this.disabled}"
3808
+ ?readonly="${this.readonly}"
3809
+ />
3810
+ <div part="correct">${this._correctResponse}</div>
3811
+ `}textChanged(e){if(this.disabled||this.readonly)return;let r=e.target;this.setEmptyAttribute(r.value),this._value!==r.value&&(this.value=r.value,this.saveResponse(r.value))}reportValidity(){let e=this.shadowRoot.querySelector("input");if(!e)return!1;let r=this.validate();return r||e.reportValidity(),r}reset(){this._value=""}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};ee.styles=ks,l([p({type:Number,attribute:"expected-length"})],ee.prototype,"expectedLength",2),l([p({type:String,attribute:"pattern-mask"})],ee.prototype,"patternMask",2),l([p({type:String,attribute:"placeholder-text"})],ee.prototype,"placeholderText",2),l([p({type:String,attribute:"data-patternmask-message"})],ee.prototype,"dataPatternmaskMessage",2),l([q()],ee.prototype,"_value",2),ee=l([g("qti-text-entry-interaction")],ee);var fe=(s,t)=>{class e extends s{constructor(){super(...arguments);this._choiceElements=[];this.minChoices=0;this.maxChoices=1;this._handleDisabledChange=(o,n)=>{this._choiceElements.forEach(a=>a.disabled=n)};this._handleReadonlyChange=(o,n)=>{this._choiceElements.forEach(a=>a.readonly=n)};this._value=""}_handleMaxChoicesChange(o,n){this._determineInputType()}get value(){return Array.isArray(this._value)?this._value.join(","):this._value}set value(o){if(this.maxChoices>1&&typeof o=="string"?this._value=o.split(","):this._value=o,Array.isArray(this._value)){let n=new FormData;this._value.forEach(a=>{n.append(this.responseIdentifier,a)}),this._internals.setFormValue(n)}else this._internals.setFormValue(this._value);this._updateChoiceSelection()}get correctResponse(){return this._correctResponse}set correctResponse(o){this._correctResponse=o;let n=Array.isArray(o)?o:[o];this._choiceElements.forEach(a=>{a.internals.states.delete("correct-response"),a.internals.states.delete("incorrect-response"),n.length>0&&(n.includes(a.identifier)?a.internals.states.add("correct-response"):a.internals.states.add("incorrect-response"))})}connectedCallback(){super.connectedCallback(),this.addEventListener(`register-${t}`,this._registerChoiceElement),this.addEventListener(`unregister-${t}`,this._unregisterChoiceElement),this.addEventListener(`activate-${t}`,this._choiceElementSelectedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`register-${t}`,this._registerChoiceElement),this.removeEventListener(`unregister-${t}`,this._unregisterChoiceElement),this.removeEventListener(`activate-${t}`,this._choiceElementSelectedHandler)}validate(){let o=this._choiceElements.filter(d=>this._getChoiceChecked(d)),n=o.length,a=!0,c="";return this.maxChoices!==0&&n>this.maxChoices?(a=!1,c=this.dataset.maxSelectionsMessage||`You can select at most ${this.maxChoices} choices.`):n<this.minChoices&&(a=!1,c=this.dataset.minSelectionsMessage||`You must select at least ${this.minChoices} choices.`),o.length>0&&this._internals.setValidity(a?{}:{customError:!0},c,o[n-1]||this._choiceElements[0]||this),this.reportValidity(),a}reportValidity(){return this._validationMessageElement&&(this._internals.validity.valid?(this._validationMessageElement.textContent="",this._validationMessageElement.style.display="none"):(this._validationMessageElement.textContent=this._internals.validationMessage,this._validationMessageElement.style.display="block")),this._internals.validity.valid}_registerChoiceElement(o){o.stopPropagation();let n=o.target;n.disabled=this.disabled,this._choiceElements.push(n),this._setInputType(n)}_unregisterChoiceElement(o){o.stopPropagation();let n=o.target;this._choiceElements=this._choiceElements.filter(a=>a!==n)}_determineInputType(){this._choiceElements.forEach(o=>{this._setInputType(o)})}_setInputType(o){this._internals.ariaLabel=this.maxChoices===1?"radio-group":"checkbox-group";let n=this.maxChoices===1?"radio":"checkbox";o.internals.role=n,o.internals.states.delete(n==="radio"?"checkbox":"radio"),o.internals.states.add(n)}_choiceElementSelectedHandler(o){this._toggleChoiceChecked(o.target),this.maxChoices===1&&this._choiceElements.forEach(n=>{n.identifier!==o.detail.identifier&&this._setChoiceChecked(n,!1)}),this._handleChoiceSelection()}_setChoiceChecked(o,n){o.internals?.states&&(n?(o.internals.states.add("--checked"),o.internals.ariaChecked="true"):(o.internals.states.delete("--checked"),o.internals.ariaChecked="false"))}_getChoiceChecked(o){return o.internals.states.has("--checked")}_toggleChoiceChecked(o){let n=this._getChoiceChecked(o);this._setChoiceChecked(o,!n)}_handleChoiceSelection(){let n=this._choiceElements.filter(a=>this._getChoiceChecked(a)).map(a=>a.identifier);this.value=this.maxChoices===1?n[0]||"":n,this.validate(),this.saveResponse(this._value)}_updateChoiceSelection(){let o=Array.isArray(this._value)?this._value:[this._value];this._choiceElements.forEach(n=>{let a=o.includes(n.identifier);this._setChoiceChecked(n,a)})}}return l([Ie("#validationMessage")],e.prototype,"_validationMessageElement",2),l([p({type:Number,attribute:"min-choices"})],e.prototype,"minChoices",2),l([p({type:Number,attribute:"max-choices"})],e.prototype,"maxChoices",2),l([A("maxChoices",{waitUntilFirstUpdate:!0})],e.prototype,"_handleMaxChoicesChange",1),l([A("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"_handleDisabledChange",2),l([A("readonly",{waitUntilFirstUpdate:!0})],e.prototype,"_handleReadonlyChange",2),e};var br=class extends fe(E,"qti-hottext"){constructor(){super(...arguments);this.render=()=>h`<slot></slot>`}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-hottext-interaction","")}};br=l([g("qti-hottext-interaction")],br);var _t=class extends G{constructor(t){if(super(t),this.it=k,t.type!==ue.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===k||t==null)return this._t=void 0,this.it=t;if(t===R)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};_t.directiveName="unsafeHTML",_t.resultType=1;var be=F(_t);var ve=class extends E{constructor(){super(...arguments);this.options=[];this.correctOption="";this.dataPrompt="select"}static get styles(){return[b`
3812
+ :host {
3813
+ display: inline-block;
3814
+ }
3815
+ slot {
3816
+ display: flex;
3817
+ flex-direction: column;
3818
+ }
3819
+ [role='menu'] {
3820
+ position: absolute;
3821
+ z-index: 1000;
3822
+ }
3823
+ .anchor {
3824
+ /* anchor-name: --infobox; */
3825
+ width: fit-content;
3826
+ }
3827
+
3828
+ .positionedElement {
3829
+ position: absolute;
3830
+ /* position-anchor: --infobox; */
3831
+ /* top: anchor(bottom); */
3832
+ }
3833
+ `]}render(){return h`
3834
+ <select part="select" @change="${this.choiceSelected}" ?disabled="${this.disabled}" ?readonly="${this.readonly}">
3835
+ ${this.options.map(e=>h`
3836
+ <option value="${e.value}" ?selected="${e.selected}">${be(e.textContent)}</option>
3837
+ `)}
3838
+ </select>
3839
+
3840
+ ${be(this.correctOption)}
3841
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("on-dropdown-selected",this.choiceSelected);let e=Array.from(this.querySelectorAll("qti-inline-choice"));this.options=[{textContent:this.dataPrompt,value:"",selected:!1},...e.map(r=>({textContent:r.innerHTML,value:r.getAttribute("identifier"),selected:!1}))]}disconnectedCallback(){this.removeEventListener("on-dropdown-selected",this.choiceSelected)}validate(){let e=this.options.find(r=>r.selected);return e?e.value!=="":!1}reset(){this.options=this.options.map((e,r)=>({...e,selected:r===0}))}set value(e){this.options=this.options.map(r=>(e===r.value&&(r.selected=!0),r))}get value(){return this.options.find(e=>e.selected).value}set correctResponse(e){if(e===""){this.correctOption="";return}this.correctOption=`<span part="correct-option">${this.options.find(r=>e===r.value).textContent}</span>`}choiceSelected(e){let r=e.target.value;this.options=this.options.map(i=>({...i,selected:i.value===r})),this.saveResponse(r)}};ve.inputWidthClass=["","qti-input-width-2","qti-input-width-1","qti-input-width-3","qti-input-width-4","qti-input-width-6","qti-input-width-10","qti-input-width-15","qti-input-width-20","qti-input-width-72"],l([q()],ve.prototype,"options",2),l([q()],ve.prototype,"correctOption",2),l([p({attribute:"data-prompt",type:String})],ve.prototype,"dataPrompt",2),ve=l([g("qti-inline-choice-interaction")],ve);var vr=(s,t)=>{class e extends s{constructor(){super(...arguments);this.shuffle="false"}connectedCallback(){super.connectedCallback(),this._applyShuffle()}updated(o){o.has("shuffle")&&this._applyShuffle()}_applyShuffle(){this.shuffle==="true"?this._shuffleChoices():this._resetShuffleChoices()}_shuffleChoices(){let o=Array.from(this.querySelectorAll(t)),n=o.filter(f=>f.hasAttribute("fixed")),a=o.filter(f=>!f.hasAttribute("fixed"));if(a.length<=1){console.warn("Shuffling is not possible with fewer than 2 non-fixed elements.");return}let c=[...a],d=!1,u=0;for(;!d&&u<10;){u++;for(let f=a.length-1;f>0;f--){let y=Math.floor(Math.random()*(f+1));[a[f],a[y]]=[a[y],a[f]]}d=!a.every((f,y)=>f===c[y])}d||console.warn("Failed to shuffle the choices after multiple attempts.");let m=1;[...n,...a].forEach(f=>{f.style.setProperty("order",String(m++))})}_resetShuffleChoices(){this.querySelectorAll(t).forEach(o=>{o.style.setProperty("order","initial")})}}return l([p({type:String,reflect:!0})],e.prototype,"shuffle",2),e};var Ts=(s,t)=>{class e extends s{constructor(){super(...arguments);this._classes=[];this._allLabels=["qti-labels-decimal","qti-labels-lower-alpha","qti-labels-upper-alpha"];this._allLabelSuffixes=["qti-labels-suffix-period","qti-labels-suffix-parenthesis"]}set class(o){o&&(this._classes=o.split(" "),this._addLabels())}get class(){return this._classes?.join(" ")||""}updated(o){super.updated(o),o.has("shuffle")&&this._addLabels()}_addLabels(){let o=this._classes.some(a=>this._allLabels.includes(a)||this._allLabelSuffixes.includes(a)),n=a=>!isNaN(+a);if(o){let c=Array.from(this.querySelectorAll("qti-simple-choice")).map(d=>d).map((d,u)=>({el:d,order:n(d.style.order)?+d.style.order:u+1})).sort((d,u)=>d.order-u.order).map(d=>d.el);for(let d=0;d<c.length;d++)c[d].marker=this._getLabel(d+1)}}_getLabel(o){let n=this._classes.filter(d=>this._allLabels.includes(d)).pop(),a=this._classes.filter(d=>this._allLabelSuffixes.includes(d)).pop();!n&&a&&(n="qti-labels-upper-alpha");let c="";switch(n){case"qti-labels-decimal":c=`${o}`;break;case"qti-labels-lower-alpha":c=`${String.fromCharCode(97+o-1)}`;break;case"qti-labels-upper-alpha":c=`${String.fromCharCode(65+o-1)}`;break}return a==="qti-labels-suffix-period"?c+=".":a==="qti-labels-suffix-parenthesis"&&(c+=")"),c}}return l([p({type:String,reflect:!0})],e.prototype,"class",1),e};var As=b`
3842
+ [part='slot'] {
3843
+ display: flex;
3844
+ flex-direction: column;
3845
+ gap: var(--qti-gap-size);
3846
+ flex-wrap: wrap;
3847
+ }
3848
+
3849
+ ::slotted(qti-simple-choice) {
3850
+ flex: 0 0
3851
+ calc((100% - (var(--qti-gap-size) * var(--choice-interactions-stacking))) / var(--choice-interactions-stacking)) !important;
3852
+ box-sizing: border-box !important;
3853
+ }
3854
+
3855
+ :host(.qti-choices-stacking-1) [part='slot'] {
3856
+ flex-direction: row;
3857
+ --choice-interactions-stacking: 1;
3858
+ }
3859
+
3860
+ :host(.qti-choices-stacking-2) [part='slot'] {
3861
+ flex-direction: row;
3862
+ --choice-interactions-stacking: 2;
3863
+ }
3864
+ :host(.qti-choices-stacking-3) [part='slot'] {
3865
+ flex-direction: row;
3866
+ --choice-interactions-stacking: 3;
3867
+ }
3868
+ :host(.qti-choices-stacking-4) [part='slot'] {
3869
+ flex-direction: row;
3870
+ --choice-interactions-stacking: 4;
3871
+ }
3872
+ :host(.qti-choices-stacking-5) [part='slot'] {
3873
+ flex-direction: row;
3874
+ --choice-interactions-stacking: 5;
3875
+ }
3876
+ :host([orientation='horizontal']) [part='slot'] {
3877
+ flex-direction: row;
3878
+ }
3879
+ `;var Fe=class extends Ts(vr(fe(E,"qti-simple-choice"),"qti-simple-choice"),"qti-simple-choice"){constructor(){super(),this._internals.role="group"}render(){return h`
3880
+ <slot part="prompt" name="prompt"></slot><slot part="slot"></slot>
3881
+ <div part="message" role="alert" id="validationMessage"></div>
3882
+ `}};Fe.styles=As,l([p({type:String})],Fe.prototype,"orientation",2),Fe=l([g("qti-choice-interaction")],Fe);var kt=class extends v{render(){return h`<slot></slot>`}process(){let t=new Zr,e=[...this.children];t.process(e)}};kt.styles=[b`
3883
+ :host {
3884
+ display: none;
3885
+ }
3886
+ `],kt=l([g("qti-outcome-processing")],kt);var Zr=class{process(t){for(let e of t)e.process()}};var Ss=`<qti-response-processing>
3887
+ <qti-response-condition>
3888
+ <qti-response-if>
3889
+ <qti-match>
3890
+ <qti-variable identifier="RESPONSE"></qti-variable>
3891
+ <qti-correct identifier="RESPONSE"></qti-correct>
3892
+ </qti-match>
3893
+ <qti-set-outcome-value identifier="SCORE">
3894
+ <qti-base-value base-type="float">1</qti-base-value>
3895
+ </qti-set-outcome-value>
3896
+ </qti-response-if>
3897
+ <qti-response-else>
3898
+ <qti-set-outcome-value identifier="SCORE">
3899
+ <qti-base-value base-type="float">0</qti-base-value>
3900
+ </qti-set-outcome-value>
3901
+ </qti-response-else>
3902
+ </qti-response-condition>
3903
+ </qti-response-processing>`,Rs=`<qti-response-processing>
3904
+ <qti-response-condition>
3905
+ <qti-response-if>
3906
+ <qti-is-null>
3907
+ <qti-variable identifier="RESPONSE"></qti-variable>
3908
+ </qti-is-null>
3909
+ <qti-set-outcome-value identifier="SCORE">
3910
+ <qti-base-value base-type="float">0.0</qti-base-value>
3911
+ </qti-set-outcome-value>
3912
+ </qti-response-if>
3913
+ <qti-response-else>
3914
+ <qti-set-outcome-value identifier="SCORE">
3915
+ <qti-map-response identifier="RESPONSE"> </qti-map-response>
3916
+ </qti-set-outcome-value>
3917
+ </qti-response-else>
3918
+ </qti-response-condition>
3919
+ </qti-response-processing>`,Ms=`<qti-response-processing>
3920
+ <qti-response-condition>
3921
+ <qti-response-if>
3922
+ <qti-is-null>
3923
+ <qti-variable identifier="RESPONSE"></qti-variable>
3924
+ </qti-is-null>
3925
+ <qti-set-outcome-value identifier="SCORE">
3926
+ <qti-base-value base-type="float">0</qti-base-value>
3927
+ </qti-set-outcome-value>
3928
+ </qti-response-if>
3929
+ <qti-response-else>
3930
+ <qti-set-outcome-value identifier="SCORE">
3931
+ <qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
3932
+ </qti-set-outcome-value>
3933
+ </qti-response-else>
3934
+ </qti-response-condition>
3935
+ </qti-response-processing>`;var Ae=class extends v{render(){return h`<slot></slot>`}process(){if(!this.closest("qti-assessment-item"))return;let e=[...this.children];for(let r of e)r.process()}firstUpdated(t){if(this.getAttribute("template")){let e=this.getAttribute("template").split("/"),r=e[e.length-1].replace(".xml","");switch(this.innerHTML="",r){case"map_response":{this.appendChild(this.fragmentFromString(Rs).firstElementChild.firstElementChild);break}case"map_response_point":{this.appendChild(this.fragmentFromString(Ms).firstElementChild.firstElementChild);break}case"match_correct":this.appendChild(this.fragmentFromString(Ss).firstElementChild.firstElementChild);break}}}fragmentFromString(t){return document.createRange().createContextualFragment(t)}};Ae.styles=[b`
3936
+ :host {
3937
+ display: none;
3938
+ }
3939
+ `],Ae=l([g("qti-response-processing")],Ae);var te=class extends v{render(){return h`<slot></slot>`}process(){throw new Error("Not implemented")}};te=l([g("qti-rule")],te);var yr=class extends te{get childExpression(){return this.firstElementChild}process(){let t=this.getAttribute("identifier"),e=this.closest("qti-assessment-item").getVariable(t),r;return e.interpolationTable&&(r=e.interpolationTable.get(parseInt(this.childExpression.calculate()))),r==null?(console.warn("lookupOutcomeValue: value is null or undefined"),0):(this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:this.identifier,value:xt(r)}})),r)}};l([p({type:String})],yr.prototype,"identifier",2);customElements.define("qti-lookup-outcome-value",yr);var Jr=class extends te{render(){return h`<slot></slot>`}process(){let t=[...this.children];for(let e=0;e<t.length;e++){let r=t[e];if(r.calculate()){r.process();return}}}};customElements.define("qti-response-condition",Jr);var Qr=class extends te{process(){let t=this.getAttribute("identifier"),e=this.firstElementChild,i=new ei(e).process();this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:t,value:Array.isArray(i)?i.map(o=>xt(o)):xt(i)}}))}},ei=class{constructor(t){this.expression=t}process(){let t=this.expression?this.expression.calculate():null;if(t==null){console.warn("setOutcomeValue: value is null or undefined");return}return t}};customElements.define("qti-set-outcome-value",Qr);var Tt=class extends v{render(){return h`<slot></slot>`}calculate(){return!0}getSubRules(){return[...this.children]}process(){let t=this.getSubRules();for(let e=0;e<t.length;e++)t[e].process()}};customElements.define("qti-response-else",Tt);var At=class extends Tt{calculate(){return this.firstElementChild.calculate()}getSubRules(){let t=[];for(let e=1;e<this.children.length;e++)t.push(this.children[e]);return t}};customElements.define("qti-response-if",At);var ti=class extends At{render(){return h`${super.render()}`}};customElements.define("qti-response-else-if",ti);var C=class extends v{constructor(){super(...arguments);this.getVariables=()=>Array.from(this.children).map(e=>{switch(e.tagName.toLowerCase()){case"qti-base-value":return{baseType:e.getAttribute("base-type"),value:e.textContent.trim(),cardinality:"single"};case"qti-variable":{let r=e.getAttribute("identifier")||"";return this.context.variables.find(o=>o.identifier===r)||null}case"qti-multiple":{let i=e.getResult();return i.length>0?{identifier:"",baseType:i[0].baseType,value:i.map(o=>o.value),cardinality:"multiple",type:"response"}:null}case"qti-correct":{let r=e.getAttribute("identifier")||"",i=this.context.variables.find(o=>o.identifier===r)||null;return{baseType:i.baseType,value:i.correctResponse,cardinality:i.cardinality}}default:{try{return{baseType:"integer",value:e.getResult().toString(),cardinality:"single"}}catch{console.warn("default not sufficient")}return null}}}).filter(e=>e!==null)}render(){return h`<pre>${JSON.stringify(this.result,null,2)}</pre>
3940
+ <slot></slot>`}calculate(){return this.result=this.getResult(),this.result}getResult(){throw new Error("Not implemented")}};C.styles=b`
3941
+ slot {
3942
+ display: none;
3943
+ }
3944
+ `,l([q()],C.prototype,"result",2),l([T({context:$,subscribe:!0}),q()],C.prototype,"context",2);var O=class extends C{calculate(){return this.result=this.getResult(),this.result}getResult(){throw new Error("Not implemented")}};var xr=class extends Io(O){calculate(){return this.calculateChildren(Array.from(this.children))}};function Io(s){return class extends s{calculateChildren(e){return e.map(i=>{let o=i;if(!o.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let n=o.calculate(),a=!1;if(typeof n=="string")if(n==="true")a=!0;else if(n==="false")a=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof n=="boolean"&&(a=n);return a}).every(i=>typeof i=="boolean"&&i)}}}customElements.define("qti-and",xr);var qr=class extends C{constructor(){super(...arguments);this.baseType="string"}getResult(){return this.textContent.trim()}};l([p({type:String,attribute:"base-type"})],qr.prototype,"baseType",2);customElements.define("qti-base-value",qr);var ri=class extends O{getResult(){let t=this.getVariables();if(this.children.length===2){let e=t[0],r=t[1];if(e.baseType==="directedPair"&&r.baseType==="directedPair"&&e.cardinality==="multiple"){let i=e.value,o=r.value;return i.filter(c=>o.includes(c)).length>0}else if(e.baseType==="directedPair"&&r.baseType==="directedPair"&&e.cardinality==="single"){let i=e.value;return r.value.includes(i)}else console.error("unsupported baseType or cardinality in qti contains, only baseType: directedPair and cardinality: multiple is supported")}else console.error("unexpected number of children in qti contains");return!1}};customElements.define("qti-contains",ri);var ii=class extends C{get interpretation(){return this.getAttribute("interpretation")||""}getResult(){let t=this.getAttribute("identifier")||"",e=this.context.variables.find(r=>r.identifier===t)||null;return e.cardinality!=="single"?e.correctResponse.length>0?e.correctResponse[0]:"":e.correctResponse}};customElements.define("qti-correct",ii);var wr=class extends C{constructor(){super(...arguments);this.roundingMode="significantFigures"}get figures(){if(!this.getAttribute("figures"))return console.error("figures attribute is missing"),null;let r=parseInt(this.getAttribute("figures")||"0");return isNaN(r)?(console.error("figures attribute is not a number"),null):r<0?(console.error("figures attribute is negative"),null):r<1&&this.roundingMode==="significantFigures"?(console.error("figures cannot be smaller than 1 for RoundingMode significantFigures"),null):r}getResult(){if(this.children.length===2){let e=this.getVariables(),r=e[0],i=e[1];if(this.roundingMode===null)return null;if(r.cardinality!=="single"||i.cardinality!=="single"||Array.isArray(r.value)||Array.isArray(i.value))return console.error("unexpected cardinality in qti equal"),!1;switch(e[0].baseType){case"integer":case"float":{let o=parseFloat(r.value),n=parseFloat(i.value);if(!isNaN(o)&&!isNaN(n))return this.roundingMode==="significantFigures"?o.toPrecision(this.figures)===n.toPrecision(this.figures):Math.round(o*Math.pow(10,this.figures))/Math.pow(10,this.figures)===Math.round(n*Math.pow(10,this.figures))/Math.pow(10,this.figures);console.error(`value cannot be casted to numeric value in equalRounded operator: ${o}, ${n}`);break}default:{console.error("values other than float and int cannot be used in equalRounded operator.");break}}return!1}return console.error("unexpected number of children in qti-equal-rounded"),null}};l([p({type:String})],wr.prototype,"roundingMode",2);customElements.define("qti-equal-rounded",wr);var V=class{static compareSingleValues(t,e,r){switch(r){case"identifier":case"string":return t===e;case"integer":{let i=parseInt(t,10),o=parseInt(e,10);if(!isNaN(i)&&!isNaN(o))return i===o;console.error(`Cannot convert ${t} and/or ${e} to int.`);break}case"float":{let i=parseFloat(t),o=parseFloat(e);if(!isNaN(i)&&!isNaN(o))return i===o;console.error(`couldn't convert ${t} and/or ${e} to float.`);break}case"pair":case"directedPair":{let i=t.split(" ").sort(),o=e.split(" ").sort();if(i.length===2&&o.length===2)return r==="pair"&&(i.sort(),o.sort()),i.join(" ")===o.join(" ");console.error(`compared two pair but one of the values does not have 2 values: 1: ${t} 2: ${e}`);break}}return!1}};var Er=class extends C{constructor(){super(...arguments);this.toleranceMode="exact"}getResult(){if(this.children.length===2){let e=this.getVariables(),r=e[0],i=e[1];return this.toleranceMode!=="exact"?(console.error("toleranceMode is not supported yet"),!1):r.cardinality!=="single"||i.cardinality!=="single"||Array.isArray(r.value)||Array.isArray(i.value)?(console.error("unexpected cardinality in qti equal"),!1):V.compareSingleValues(r.value,i.value,r.baseType)}return console.error("unexpected number of children in qti-equal"),null}};l([p({type:String})],Er.prototype,"toleranceMode",2);customElements.define("qti-equal",Er);var si=class extends C{getResult(){if(this.children.length===2){let t=this.getVariables(),e=t[0],r=t[1];if((e.baseType==="integer"||e.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+e.value>+r.value;console.error("unexpected baseType or cardinality in qti gt")}return console.error("unexpected number of children in qt"),null}};customElements.define("qti-gt",si);var oi=class extends O{getResult(){if(this.children.length===2){let t=this.getVariables(),e=t[0],r=t[1];return(e.baseType==="integer"||e.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+e.value>=+r.value:(console.error("unexpected baseType or cardinality in qti gte"),null)}return console.log("unexpected number of children in qte"),null}};customElements.define("qti-gte",oi);var ni=class extends C{getResult(){if(this.children.length===1){let t=this.getVariables();if(!t)return!0;let e=t[0].value;return e==null||e==null||e===""}return console.error("unexpected number of children in qti Null"),null}};customElements.define("qti-is-null",ni);var ai=class extends C{getResult(){if(this.children.length===2){let t=this.getVariables(),e=t[0],r=t[1];if((e.baseType==="integer"||e.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+e.value<+r.value;console.error("unexpected baseType or cardinality in qti lt")}return console.error("unexpected number of children in lt"),null}};customElements.define("qti-lt",ai);var li=class extends O{getResult(){if(this.children.length===2){let t=this.getVariables(),e=t[0],r=t[1];return(e.baseType==="integer"||e.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+e.value<=+r.value:(console.error("unexpected baseType or cardinality in qti lte"),null)}return console.log("unexpected number of children in lte"),null}};customElements.define("qti-lte",li);var Cr=class extends C{getResult(){let t=this.context.variables.find(o=>o.identifier===this.identifier);if(!t)return console.warn(`Response ${this.identifier} can not be found`),null;let e=t.mapping,r=Array.isArray(t.value)?t.value:[t.value],i=0;for(let o of r){let n=e.mapEntries.find(a=>V.compareSingleValues(a.mapKey,o,t.baseType));n==null||n.mappedValue==null?i+=e.defaultValue:i+=n.mappedValue}return e.lowerBound!=null&&(i=Math.max(e.lowerBound,i)),e.upperBound!=null&&(i=Math.min(e.upperBound,i)),i}};l([p({type:String})],Cr.prototype,"identifier",2);customElements.define("qti-map-response",Cr);var Be=class extends v{constructor(){super(...arguments);this.defaultValue=0}get mapEntries(){return Array.from(this.querySelectorAll("qti-map-entry")).map(e=>({mapKey:e.getAttribute("map-key"),mappedValue:+e.getAttribute("mapped-value")}))}};l([p({attribute:"default-value",type:Number})],Be.prototype,"defaultValue",2),l([p({attribute:"lower-bound",type:Number})],Be.prototype,"lowerBound",2),l([p({attribute:"upper-bound",type:Number})],Be.prototype,"upperBound",2);customElements.define("qti-mapping",Be);var ci=class s extends C{getResult(){if(this.children.length===2){let t=this.getVariables(),e=t[0],r=t[1];return s.match(e,r)}return console.error("unexpected number of children in match"),null}static match(t,e){switch(e.cardinality){case"single":return t.value===null?!1:Array.isArray(t.value)||Array.isArray(e.value)?(console.error("unexpected cardinality in qti match"),!1):V.compareSingleValues(t.value?.toString(),e.value.toString(),e.baseType);case"ordered":{if(!Array.isArray(t.value)||!Array.isArray(e.value))return console.error("unexpected cardinality in qti match"),!1;if(t.value.length!==e.value.length)return!1;for(let r=0;r<t.value.length;r++)if(!V.compareSingleValues(e.value[r],t.value[r],e.baseType))return!1;return!0}case"multiple":{if(!Array.isArray(t.value)||!Array.isArray(e.value))return console.error("unexpected cardinality in qti match"),!1;if(t.value.length!==e.value.length)return!1;let r=0;for(let i of e.value){let o=null,n=[...t.value];for(let a of n)if(V.compareSingleValues(i,a,e.baseType)){o=a;break}if(o!==null)n.splice(n.indexOf(o),1);else return!1;r++}return!0}default:return console.error("unexpected cardinality in qti match"),!1}}};customElements.define("qti-match",ci);var di=class extends C{getResult(){let t=this.getVariables();this.children.length!==2&&console.warn("The member operator takes two sub-expressions");let[e,r]=t;if(e.baseType===r.baseType||e.baseType==="integer"&&r.baseType==="float"||e.baseType==="float"&&r.baseType==="integer"||console.warn("Which must both have the same base-type"),r.cardinality==="multiple"||r.cardinality==="ordered"||console.warn("and the second must be a multiple or ordered container"),(e.baseType==="float"||r.baseType==="float")&&console.warn("The member operator should not be used on sub-expressions with a base-type of float"),(e.baseType==="duration"||r.baseType==="duration")&&console.warn("It must not be used on sub-expressions with a base-type of duration"),e.value===null||r.value===null)return null;let i=e.value;return r.value.includes(i)}};customElements.define("qti-member",di);var pi=class extends C{getResult(){let t=this.getVariables();if(t.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let e of t)if(e.cardinality!=="multiple"&&e.cardinality!=="single")return console.error("unexpected cardinality in qti multiple"),[];return t}};customElements.define("qti-multiple",pi);var hi=class extends C{render(){return h`${super.render()}`}getResult(){return!this.firstElementChild.calculate()}};customElements.define("qti-not",hi);var ui=class extends O{getResult(){return Array.from(this.children).map(e=>{let r=e;if(!r.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let i=r.calculate(),o=!1;if(typeof i=="string")if(i==="true")o=!0;else if(i==="false")o=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof i=="boolean"&&(o=i);return o}).some(e=>typeof e=="boolean"&&e)}};customElements.define("qti-or",ui);var mi=class extends C{getResult(){let t=this.getVariables();if(t.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let e of t)if(e.cardinality!=="ordered"&&e.cardinality!=="single")return console.error("unexpected cardinality in qti ordered"),[];return t}};customElements.define("qti-ordered",mi);var St=class extends v{render(){let t=this.context?.variables.find(e=>e.identifier===this.identifier)?.value;return h`${JSON.stringify(t,null,2)}`}calculate(){return this.context.variables.find(e=>e.identifier===this.identifier)||null}};l([p({type:String})],St.prototype,"identifier",2),l([T({context:$,subscribe:!0}),q()],St.prototype,"context",2);customElements.define("qti-printed-variable",St);var gi=class extends C{getResult(){return this.getVariables().reduce((r,i)=>{if(i.baseType=="float"||i.baseType=="integer")try{return r*parseInt(i.value.toString())}catch{console.warn("can not convert to number")}else console.warn(`has another baseType ${i.baseType}`);return r},1)}};customElements.define("qti-product",gi);var _r=class extends No(C){getResult(){return this.calculateChildren(Array.from(this.children))}};function No(s){return class extends s{calculateChildren(e){let r=e.map(i=>{if(!i.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let o=i.calculate();return Number.isNaN(o)?(console.error("Unexpected value in qti-subtract, expected number"),null):Number(o)});return r.some(i=>i===null)?(console.error("One or more child expressions returned invalid values"),0):r[0]-r[1]}}}customElements.define("qti-subtract",_r);var kr=class extends C{constructor(){super(...arguments);this.caseSensitive="true"}getResult(){if(this.children.length===2){let e=this.getVariables(),r=e[0],i=e[1];if(r.cardinality!=="single"||i.cardinality!=="single"||Array.isArray(r.value)||Array.isArray(i.value))return console.error("unexpected cardinality in qti string-match"),!1;let o=this.caseSensitive==="true"?r.value:r.value.toLowerCase(),n=this.caseSensitive==="true"?i.value:i.value.toLowerCase();return V.compareSingleValues(o,n,r.baseType)}return console.error("unexpected number of children in qti-string-match"),null}};l([p({type:String,attribute:"case-sensitive"})],kr.prototype,"caseSensitive",2);customElements.define("qti-string-match",kr);var fi=class extends C{constructor(){super(),this._expression=new bi(Array.from(this.children))}getResult(){return this._expression.calculate()}},bi=class{constructor(t){this.expressions=t}calculate(){return this.expressions.map(e=>{if(!e.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let r=e.calculate();return Number.isNaN(r)?(console.error("unexpected value in qti-sum, expected number"),null):Number(r)}).reduce((e,r)=>e+r,0)}};customElements.define("qti-sum",fi);var vi=class extends C{getResult(){let t=this.getAttribute("identifier");return this.context.variables.find(r=>r.identifier===t).value}};customElements.define("qti-variable",vi);var Se=class extends E{constructor(){super(...arguments);this._errorMessage=null;this.loadConfig=async(e,r)=>{e=this.removeDoubleSlashes(e);try{let i=await fetch(e);if(i.ok){let n=await i.json();for(let a in n.paths)r&&(n.paths[a]=this.getResolvablePath(n.paths[a],r));return n}}catch{}return null};this.getResolvablePathString=(e,r)=>(e=e.replace(/\.js$/,""),e?.toLocaleLowerCase().startsWith("http")||!r?e:this.removeDoubleSlashes(`${r}/${e}`));this.getResolvablePath=(e,r)=>Array.isArray(e)?e.map(i=>this.getResolvablePathString(i,r)):this.getResolvablePathString(e,r)}convertQtiVariableJSON(e){for(let r in e)if(e.hasOwnProperty(r)){let i=e[r];if(i){for(let o in i)if(i.hasOwnProperty(o)){let n=i[o];if(Array.isArray(n))return n.map(String);if(n!=null)return String(n)}}}return null}startChecking(){this.intervalId=setInterval(()=>{let e=this.pci.getResponse(),r=this.pci.getResponse(),i=JSON.stringify(e);if(i!==this.rawResponse){this.rawResponse=i;let o=this.convertQtiVariableJSON(r);this.value=o,this.saveResponse(o)}},200)}stopChecking(){this.intervalId!==void 0&&clearInterval(this.intervalId)}validate(){return!0}set value(e){}get value(){return this.rawResponse}getTAOConfig(e){let r=e.querySelectorAll("properties"),i={},o=a=>{let c={},d=a.getAttribute("key");if(d){let u=Array.from(a.children),m=u.map(y=>y.getAttribute("key"));m.length>0&&!m.find(y=>!Number.isInteger(+y))?c[d]=u.map(y=>n(y)):c[d]=a.textContent}return c},n=a=>{if(a){let c={};for(let d of a.children)c={...c,...o(d)};return c}};for(let a of r)return a.getAttribute("key")||(i={...i,...n(a)}),i;return console.log("Can not find qti-custom-interaction config"),null}register(e){this.pci=e;let r=this.parentElement.tagName==="QTI-CUSTOM-INTERACTION"?"TAO":"IMS",i=r=="IMS"?this.querySelector("qti-interaction-markup"):this.querySelector("markup");i.classList.add("qti-customInteraction"),r=="TAO"&&this.querySelector("properties")&&(this.querySelector("properties").style.display="none");let o=r=="IMS"?{properties:this.dataset,onready:()=>{console.log("onready")}}:this.getTAOConfig(this);r=="IMS"?e.getInstance(i,o,void 0):e.initialize(this.customInteractionTypeIdentifier,i.firstElementChild,o),r=="TAO"&&Array.from(this.querySelectorAll("link")).map(a=>a.getAttribute("href")).forEach(a=>{let c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.media="screen",c.href=a,i.appendChild(c)}),this.startChecking()}connectedCallback(){super.connectedCallback(),define("qtiCustomInteractionContext",()=>({register:i=>{this.register(i)},notifyReady:()=>{}}));let e=this.buildRequireConfig();requirejs.config(e)(["require"],i=>{i([this.module])})}disconnectedCallback(){super.disconnectedCallback(),requirejs.undef(this.customInteractionTypeIdentifier);let e=requirejs.s.contexts;delete e[this.customInteractionTypeIdentifier],this.stopChecking()}buildRequireConfig(){let e={context:this.customInteractionTypeIdentifier,catchError:!0,paths:window.requirePaths||{},shim:window.requireShim||{}};if(!globalThis.require)return this._errorMessage="RequireJS not found. Please load it via CDN: https://cdnjs.com/libraries/require.js",null;let r=this.getAttribute("data-base-url"),i=this.querySelector("qti-interaction-modules");if(i){let o=i.querySelectorAll("qti-interaction-module");for(let n of o){let a=n.getAttribute("id"),c=n.getAttribute("primary-path"),d=n.getAttribute("fallback-path");if(a&&c){let u=d?this.combineRequireResolvePaths(this.getResolvablePath(c,r),this.getResolvablePath(d,r)):this.getResolvablePath(c,r),m=e.paths[a]||[];e.paths[a]=this.combineRequireResolvePaths(m,u)}}}return e}combineRequireResolvePaths(e,r){let i=Array.isArray(e)?e:[e],o=Array.isArray(r)?r:[r];return i.concat(o)}removeDoubleSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1").replace(/\/\//g,"/").replace("http:/","http://").replace("https:/","https://")}render(){return h`<slot></slot>${this._errorMessage&&h`<div style="color:red">
3945
+ <h1>Error</h1>
3946
+ ${this._errorMessage}
3947
+ </div>`}`}};l([p({type:String,attribute:"module"})],Se.prototype,"module",2),l([p({type:String,attribute:"custom-interaction-type-identifier"})],Se.prototype,"customInteractionTypeIdentifier",2),l([q()],Se.prototype,"_errorMessage",2),Se=l([g("qti-portable-custom-interaction")],Se);var Tr=class s{constructor(){this.draggables=[];this.droppables=[];this.dragContainers=[];this.touchStartPoint=null;this.isDraggable=!1;this.dragSource=null;this.dragClone=null;this.touchEndTriggered=!1;this.isDragging=!1;this.initialTransform="";this.hasDispatchedDragStart=!1;this.rootNode=null;this.allDropzones=[];this.dataTransfer={data:{},setData(t,e){this.data[t]=e},getData(t){return this.data[t]},effectAllowed:"move"};this.cloneOffset={x:0,y:0};this.lastTarget=null;this.currentDropTarget=null;this.copyStylesForDragClone=!0;this.dragOnClickEnabled=!1;this.useDragClone=!1;this.MIN_DRAG_DISTANCE=5;this.DRAG_CLONE_OPACITY=1;if(s.instance)return s.instance;s.instance=this,document.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),document.addEventListener("mousemove",this.handleTouchMove.bind(this),{passive:!1}),document.addEventListener("touchend",this.handleTouchEnd.bind(this),{passive:!1}),document.addEventListener("mouseup",this.handleTouchEnd.bind(this),{passive:!1}),document.addEventListener("touchcancel",this.handleTouchCancel.bind(this),{passive:!1})}dragContainersModified(t,e){for(let r of e)this.dragContainers.includes(r)&&(this.dragContainers=this.dragContainers.filter(i=>i!==r),this.allDropzones=this.allDropzones.filter(i=>i!==r));for(let r of t)this.dragContainers.includes(r)||(this.dragContainers.push(r),this.allDropzones.push(r))}draggablesModified(t,e){for(let r of e)this.draggables.includes(r)&&(this.draggables=this.draggables.filter(i=>i!==r),r.removeAttribute("tabindex"),r.removeEventListener("touchstart",this.handleTouchStart.bind(this)),r.removeEventListener("mousedown",this.handleTouchStart.bind(this)));for(let r of t)this.draggables.includes(r)||(this.draggables.push(r),r.setAttribute("tabindex","0"),r.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),r.addEventListener("mousedown",this.handleTouchStart.bind(this),{passive:!1}))}droppablesModified(t,e){for(let r of e)this.droppables.includes(r)&&(this.droppables=this.droppables.filter(i=>i!==r),this.allDropzones=this.allDropzones.filter(i=>i!==r));for(let r of t)this.droppables.includes(r)||(this.droppables.push(r),this.allDropzones.push(r))}handleTouchStart(t){let{x:e,y:r}=this.getEventCoordinates(t);if(this.touchStartPoint={x:e,y:r},this.dragSource=t.currentTarget,this.isDraggable=!0,this.rootNode=this.dragSource.getRootNode(),this.dragOnClickEnabled&&(this.isDragging=!0,this.createDragClone(t,{clientX:e,clientY:r})),!this.useDragClone){let i=window.getComputedStyle(this.dragSource);this.initialTransform=i.transform==="none"?"":i.transform,this.initialTransition=i.transition||"",this.dragSource.style.transition="none";let o=this.dragSource.getBoundingClientRect();this.cloneOffset.x=e-o.left,this.cloneOffset.y=r-o.top,this.dragSource.style.zIndex="9999",this.dragSource.focus()}t.preventDefault()}handleTouchMove(t){if(this.isDraggable&&this.dragSource){let{x:e,y:r}=this.getEventCoordinates(t),i={clientX:e,clientY:r};this.calculateDragDistance(i)>=this.MIN_DRAG_DISTANCE&&(this.dragSource.style.pointerEvents="none",this.isDragging=!0),this.createDragClone(t,i),t.preventDefault();let o=this.findClosestDropzone();this.currentDropTarget=o,o!==this.lastTarget&&(this.lastTarget&&this.dispatchCustomEvent(this.lastTarget,"dragleave"),o&&this.dispatchCustomEvent(o,"dragenter"),this.lastTarget=o),this.lastTarget&&this.dispatchCustomEvent(this.lastTarget,"dragover")}}createDragClone(t,e){if(!this.isDragging)return;if(this.useDragClone){if(!this.dragClone){if(this.dragSource.style.opacity=this.DRAG_CLONE_OPACITY.toString(),this.dragClone=this.dragSource.cloneNode(!0),this.copyStylesForDragClone){let i=window.getComputedStyle(this.dragSource);for(let o of i)this.dragClone.style[o]=i.getPropertyValue(o)}this.rootNode instanceof ShadowRoot?this.rootNode.host.appendChild(this.dragClone):this.rootNode instanceof Document&&document.body.appendChild(this.dragClone),this.calculateClonePosition(e),this.setDragCloneStyles(e),this.dispatchCustomEvent(this.dragSource,"dragstart")}this.updateDragClonePosition(e)}else if(this.touchStartPoint){let i=e.clientX-this.touchStartPoint.x,o=e.clientY-this.touchStartPoint.y;this.dragSource.style.transform=`${this.initialTransform} translate(${i}px, ${o}px)`,this.hasDispatchedDragStart||(this.dispatchCustomEvent(this.dragSource,"dragstart"),this.hasDispatchedDragStart=!0)}let r=this.currentDropTarget;r!==this.lastTarget&&(this.dispatchCustomEvent(r,"dragenter"),this.dispatchCustomEvent(this.lastTarget,"dragleave"),this.lastTarget=r),this.currentDropTarget=r,this.currentDropTarget&&this.dispatchCustomEvent(r,"dragover")}handleTouchEnd(t){this.touchEndTriggered=!0,this.isDraggable=!1;let e=!1;if(this.currentDropTarget)this.dispatchCustomEvent(this.currentDropTarget,"drop"),this.dispatchCustomEvent(this.dragSource,"dragend"),e=!0;else if(this.isDragging){let r=new CustomEvent("dragend",{bubbles:!0,cancelable:!0});r.dataTransfer={dropEffect:"none"},this.dragSource?.dispatchEvent(r)}this.resetDragState(e)}handleTouchCancel(t){this.resetDragState()}findClosestDropzone(){if(!this.dragSource||this.allDropzones.length===0)return null;let t=this.dragSource.getBoundingClientRect(),e=this.getCorners(t),r=this.getCenter(t),i=null,o=1/0;for(let n of this.allDropzones){let a=n.getBoundingClientRect(),c=this.getCorners(a),d=this.getCenter(a),u=this.calculateTotalCornerDistance(e,c)/this.getRectDiagonal(a),m=this.calculateDistance(r,d),f=u*.5+m*.5;f<o&&(o=f,i=n)}return i}getCenter(t){return{x:t.left+t.width/2,y:t.top+t.height/2}}getRectDiagonal(t){return Math.sqrt(t.width**2+t.height**2)}getCorners(t){return{topLeft:{x:t.left,y:t.top},topRight:{x:t.right,y:t.top},bottomLeft:{x:t.left,y:t.bottom},bottomRight:{x:t.right,y:t.bottom}}}calculateTotalCornerDistance(t,e){return this.calculateDistance(t.topLeft,e.topLeft)+this.calculateDistance(t.topRight,e.topRight)+this.calculateDistance(t.bottomLeft,e.bottomLeft)+this.calculateDistance(t.bottomRight,e.bottomRight)}calculateDistance(t,e){let r=t.x-e.x,i=t.y-e.y;return Math.sqrt(r*r+i*i)}getEventCoordinates(t,e=!1){let r=t.touches?t.touches[0]:t;return{x:e?r.pageX:r.clientX,y:e?r.pageY:r.clientY}}calculateClonePosition(t){let e=this.dragSource.getBoundingClientRect();this.cloneOffset.x=t.clientX-e.left,this.cloneOffset.y=t.clientY-e.top}setDragCloneStyles(t){this.dragClone.style.position="fixed",this.dragClone.style.top=`${t.clientY-this.cloneOffset.y}px`,this.dragClone.style.left=`${t.clientX-this.cloneOffset.x}px`,this.dragClone.style.pointerEvents="none",this.dragClone.style.zIndex="999999"}updateDragClonePosition(t){requestAnimationFrame(()=>{if(this.touchEndTriggered||!this.dragClone)return;let e=t.clientX-this.cloneOffset.x,r=t.clientY-this.cloneOffset.y,{newLeft:i,newTop:o}=this.applyBoundaries(e,r,this.dragClone);this.dragClone.style.left=`${i}px`,this.dragClone.style.top=`${o}px`})}applyBoundaries(t,e,r){let i;this.rootNode instanceof ShadowRoot?i=this.rootNode.host.getBoundingClientRect():this.rootNode instanceof Document?i=document.documentElement.getBoundingClientRect():i=new DOMRect(0,0,window.innerWidth,window.innerHeight);let o=r.getBoundingClientRect(),n=o.width,a=o.height,c=Math.max(i.left,Math.min(t,i.right-n)),d=Math.max(i.top,Math.min(e,i.bottom-a));return{newLeft:c,newTop:d}}calculateDragDistance(t){let e=Math.abs(t.clientX-this.touchStartPoint.x),r=Math.abs(t.clientY-this.touchStartPoint.y);return e+r}dispatchCustomEvent(t,e,r=!0){if(!t)return;let i=new CustomEvent(e,{bubbles:r,cancelable:!0});i.dataTransfer=this.dataTransfer,t.dispatchEvent(i)}resetDragState(t=!1){this.isDragging&&(this.useDragClone?(this.dragSource.style.opacity="1.0",this.dragClone?.parentElement.removeChild(this.dragClone)):(t||(this.dragSource.style.transform="translate(0, 0)"),this.dragSource.style.zIndex="",this.dragSource.style.pointerEvents="",this.dragSource.style.transition=this.initialTransition,this.initialTransition="")),this.isDragging=!1,this.dragSource=null,this.dragClone=null,this.isDraggable=!1,this.touchStartPoint=null,this.touchEndTriggered=!1,this.dataTransfer={data:{},setData(e,r){this.data[e]=r},getData(e){return this.data[e]},effectAllowed:"move"},this.cloneOffset={x:0,y:0},this.lastTarget=null,this.currentDropTarget=null,this.initialTransform="",this.hasDispatchedDragStart=!1,this.rootNode=null}};var Ls=(s,t)=>{class e extends s{constructor(){super(...arguments);this.disabled=!1}firstUpdated(o){if(this.isMatchTabular())return;super.firstUpdated(o);let n=this.getDroppableElements();this.initializeEventHandlers(),n.forEach(a=>{this.prepareDroppable(a),this.observeDroppableAttributes(a)})}isMatchTabular(){return this.classList.contains("qti-match-tabular")}getDroppableElements(){return Array.from(this.shadowRoot?.querySelectorAll(t)||[]).concat(Array.from(this.querySelectorAll(t)||[]))}initializeEventHandlers(){this.dragoverHandler=this.dragoverHandler.bind(this),this.dragleaveHandler=this.dragleaveHandler.bind(this),this.dragenterHandler=this.dragenterHandler.bind(this),this.dropHandler=this.dropHandler.bind(this)}prepareDroppable(o){o.addEventListener("dragleave",this.dragleaveHandler),this.attachEventListeners(o)}observeDroppableAttributes(o){this.observer=new MutationObserver(n=>{n.forEach(({attributeName:a})=>{a==="disabled"&&this.toggleDroppableHandlers(o)})}),this.observer.observe(o,{attributes:!0})}toggleDroppableHandlers(o){o.hasAttribute("disabled")?this.removeEventListeners(o):this.attachEventListeners(o)}attachEventListeners(o){o.addEventListener("dragover",this.dragoverHandler),o.addEventListener("dragenter",this.dragenterHandler),o.addEventListener("drop",this.dropHandler)}removeEventListeners(o){o.removeEventListener("dragover",this.dragoverHandler),o.removeEventListener("dragenter",this.dragenterHandler),o.removeEventListener("drop",this.dropHandler)}disconnectedCallback(){this.isMatchTabular()||(super.disconnectedCallback(),this.observer?.disconnect())}dragenterHandler(o){o.preventDefault()}dragoverHandler(o){let n=o.dataTransfer.getData("responseIdentifier");return o.preventDefault(),n===this.responseIdentifier&&(this.activateDroppable(o.currentTarget),o.dataTransfer.dropEffect="move"),!1}activateDroppable(o){this._internals.states.delete("--dragzone-active"),o.setAttribute("active","")}async dropHandler(o){o.preventDefault();let n=o.currentTarget,a=o.dataTransfer.getData("text"),c=o.dataTransfer.getData("responseIdentifier"),d=this.findDraggable(c,a);return d?d&&!this.isValidDrop(n,d,c)?(d.style.transform="translate(0, 0)",!1):(await this.moveDraggableToDroppable(d,n),this.deactivateDroppable(n,!1),!1):!1}findDraggable(o,n){return n?o===this.responseIdentifier?this.querySelector(`[identifier=${n}]`)||this.shadowRoot.querySelector(`[identifier=${n}]`):this.closest("qti-assessment-item").querySelector(`[response-identifier=${o}]`).querySelector(`[identifier=${n}]`):null}isValidDrop(o,n,a){return this.responseIdentifier===a}async moveDraggableToDroppable(o,n){console.log(`moveDraggableToDroppable, draggable: ${o.tagName}, droppable: ${n.tagName}`);let a=()=>{o.style.transform="translate(0, 0)",n.tagName==="SLOT"?o.setAttribute("slot",n.getAttribute("name")):n.appendChild(o),this.checkMaxAssociations(),this.saveResponse(null)};if(!document.startViewTransition){a();return}await document.startViewTransition(a).finished}deactivateDroppable(o,n=!0){n&&this._internals.states.add("--dragzone-active"),o.removeAttribute("active")}dragleaveHandler(o){return o.preventDefault(),this.deactivateDroppable(o.currentTarget),o.dataTransfer.dropEffect="none",!1}}return l([p({type:Boolean,reflect:!0})],e.prototype,"disabled",2),e};var $s=(s,t,e)=>{class r extends s{}return r};var re=(s,t,e,r)=>{class i extends $s(Ls(s,e),e,t){constructor(){super(...arguments);this.draggables=new Map;this.configuration={copyStylesDragClone:!0,dragCanBePlacedBack:!0,dragOnClick:!1};this.minAssociations=1;this.maxAssociations=1;this.dragContainersModified=(a,c)=>{this.dragDropApi.dragContainersModified(a,c)};this.draggablesModified=(a,c)=>{this.dragDropApi.draggablesModified(a,c),this.dragDropApi.draggables.forEach(d=>{this.storeDraggable(d)})};this.droppablesModified=(a,c)=>{this.dragDropApi.droppablesModified(a,c);for(let d of this.dragDropApi.droppables)this.dataset.choicesContainerWidth&&(d.style.width=`${this.dataset.choicesContainerWidth}px`,d.style.boxSizing="border-box")};this.handleDragStart=a=>{let c=a.currentTarget;a.dataTransfer.setData("text",c.getAttribute("identifier")),this.responseIdentifier&&a.dataTransfer.setData("responseIdentifier",this.responseIdentifier),this._internals.states.add("--dragzone-enabled"),this._internals.states.add("--dragzone-active"),c.setAttribute("dragging",""),this.activateDragLocation(),this.activateDroppables(c)};this.handleDragEnd=async a=>{a.preventDefault(),this._internals.states.delete("--dragzone-enabled"),this._internals.states.delete("--dragzone-active"),this.deactivateDragLocation(),this.deactivateDroppables();let c=a.currentTarget;c.removeAttribute("dragging"),await this.wasDropped(a)||this.configuration.dragCanBePlacedBack&&this.restoreInitialDraggablePosition(c)}}handleDraggableContainerChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.dragContainersModified(a||[],c||[])}handleDraggablesChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.draggablesModified(a||[],c||[])}handleDroppablesChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.droppablesModified(a||[],c||[])}firstUpdated(a){super.firstUpdated(a);let c=Array.from(this.querySelectorAll(t)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(t)||[])),d=Array.from(this.querySelectorAll(e)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(e)||[])),u=Array.from(this.querySelectorAll(r)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(r)||[]));this.dragContainersModified(u,[]),this.droppablesModified(d,[]),this.draggablesModified(c,[])}connectedCallback(){super.connectedCallback(),this.initializeDragDropApi()}initializeDragDropApi(){this.dragDropApi=new Tr,this.dispatchEvent(new CustomEvent("qti-register-interaction",{bubbles:!0,composed:!0,detail:this}))}isMatchTabular(){return this.classList.contains("qti-match-tabular")}storeDraggable(a){let c=Array.from(a.parentNode.children).indexOf(a);this.draggables.has(a)||this.draggables.set(a,{parent:a.parentElement,index:c}),a.style.viewTransitionName=`drag-${c}-${this.getAttribute("identifier")||crypto.randomUUID()}`,a.setAttribute("qti-draggable","true"),a.addEventListener("dragstart",this.handleDragStart),a.addEventListener("dragend",this.handleDragEnd)}activateDroppables(a){this.dragDropApi.dragContainers.forEach(d=>{d.setAttribute("enabled",""),d.hasAttribute("disabled")&&(d.contains(a)||d.shadowRoot&&d.shadowRoot.contains(a))&&d.removeAttribute("disabled")}),this.dragDropApi.droppables.forEach(d=>{d.setAttribute("enabled",""),d.hasAttribute("disabled")&&(d.contains(a)||d.shadowRoot&&d.shadowRoot.contains(a))&&d.removeAttribute("disabled")})}activateDragLocation(){this._internals.states.add("--dragzone-enabled")}deactivateDragLocation(){this._internals.states.delete("--dragzone-enabled")}deactivateDroppables(){this.dragDropApi.dragContainers.forEach(c=>{c.removeAttribute("enabled")}),this.dragDropApi.droppables.forEach(c=>c.removeAttribute("enabled"))}async wasDropped(a){return a.dataTransfer.dropEffect!=="none"}async restoreInitialDraggablePosition(a){let{parent:c,index:d}=this.draggables.get(a),u=(m,f,y)=>{console.log("moveDraggable",m,f,y);let x=Math.min(y,f.children.length);f.insertBefore(m,f.children[x]),m.style.transform="translate(0, 0)",this.checkMaxAssociations()};if(!document.startViewTransition){u(a,c,d);return}}validate(){let a=this.getValidAssociations(),c=!0,d="";this.maxAssociations>0&&a>this.maxAssociations?(c=!1,d=this.dataset.maxSelectionsMessage||`You've selected too many associations. Maximum allowed is ${this.maxAssociations}.`):this.minAssociations>0&&a<this.minAssociations&&(c=!1,d=this.dataset.minSelectionsMessage||`You haven't selected enough associations. Minimum required is ${this.minAssociations}.`);let u=this.lastElementChild;return this._internals.setValidity(c?{}:{customError:!0},d,u),this.reportValidity(),c}reportValidity(){let a=this.shadowRoot.querySelector("#validationMessage");return a&&(this._internals.validity.valid?(a.textContent="",a.style.display="none"):(a.textContent=this._internals.validationMessage,a.style.display="block")),this._internals.validity.valid}checkMaxAssociations(){this.dragDropApi.droppables.forEach(a=>{let c=+(a.getAttribute("match-max")||1);a.querySelectorAll('[qti-draggable="true"]').length>=c?this.disableDroppable(a):this.enableDroppable(a)})}disableDroppable(a){a.setAttribute("disabled","")}enableDroppable(a){a.removeAttribute("disabled")}get value(){return this.collectResponseData()}set value(a){if(!this.isMatchTabular())if(this.resetDroppables(),a?.forEach(c=>this.placeResponse(c)),Array.isArray(a)){let c=new FormData;a.forEach(d=>{c.append(this.responseIdentifier,d)}),this._internals.setFormValue(c)}else this._internals.setFormValue(a)}placeResponse(a){let[c,...d]=a.split(" ").reverse(),u=this.findDroppableById(c);d.forEach(m=>this.placeDraggableInDroppable(m,u))}findDroppableById(a){return this.dragDropApi.droppables.find(c=>c.getAttribute("identifier")===a)}async placeDraggableInDroppable(a,c){let d=this.querySelector(`[identifier=${a}]`);if(!c||!d){console.error(`Cannot find draggable or droppable with the given identifier: ${a}`);return}let u=()=>{d.style.transform="translate(0, 0)",c.appendChild(d),this.checkMaxAssociations()};document.startViewTransition?await document.startViewTransition(u).finished:u()}getValidAssociations(){return this.dragDropApi.droppables.filter(a=>a.childElementCount>0).length}saveResponse(){this.validate();let a=this.collectResponseData();this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,response:a}}))}collectResponseData(){return this.dragDropApi.droppables.map(c=>{let d=c.querySelectorAll('[qti-draggable="true"]'),u=Array.from(d).map(f=>f.getAttribute("identifier")),m=c.getAttribute("identifier");return u.map(f=>`${f} ${m}`)}).flat()}reset(a=!0){this.resetDroppables(),a&&this.saveResponse()}async resetDroppables(){let a=(d,u,m)=>{d.style.transform="translate(0, 0)";let f=Math.min(m,u.children.length);u.insertBefore(d,u.children[f])};if(!document.startViewTransition){this.draggables.forEach(({parent:d,index:u},m)=>{a(m,d,u)});return}await document.startViewTransition(()=>{this.draggables.forEach(({parent:d,index:u},m)=>{a(m,d,u)})}).finished}}return l([p({attribute:!1,type:Object})],i.prototype,"configuration",2),l([p({type:Number,reflect:!0,attribute:"min-associations"})],i.prototype,"minAssociations",2),l([p({type:Number,reflect:!0,attribute:"max-associations"})],i.prototype,"maxAssociations",2),l([tr(r)],i.prototype,"handleDraggableContainerChange",1),l([tr(t)],i.prototype,"handleDraggablesChange",1),l([tr(e)],i.prototype,"handleDroppablesChange",1),i};var Ds=b`
3948
+ :host {
3949
+ display: block; /* necessary to calculate scaling position */
3950
+ }
3951
+ slot[name='qti-simple-associable-choice'] {
3952
+ display: flex;
3953
+ flex-wrap: wrap;
3954
+ gap: 0.5rem;
3955
+ }
3956
+
3957
+ :host::part(associables-container) {
3958
+ display: flex;
3959
+ justify-content: space-between;
3960
+ background: linear-gradient(
3961
+ 180deg,
3962
+ rgb(0 0 0 / 0%) calc(50% - 1px),
3963
+ var(--qti-border-color-gray) calc(50%),
3964
+ rgb(0 0 0 / 0%) calc(50% + 1px)
3965
+ );
3966
+ }
3967
+ `;var je=class extends re(E,"qti-simple-associable-choice",".dl","slot[name='qti-simple-associable-choice']"){constructor(){super();this._childrenMap=[];this._registerChoiceHandler=this._registerChoice.bind(this),this.addEventListener("register-qti-simple-associable-choice",this._registerChoiceHandler)}_registerChoice(e){let r=e.target;this._childrenMap.push(r)}render(){return h` <slot name="prompt"></slot>
3968
+ <slot name="qti-simple-associable-choice"></slot>
3969
+ <div part="drop-container">
3970
+ ${this._childrenMap.length>0&&Array.from(Array(Math.ceil(this._childrenMap.length/2)).keys()).map((e,r)=>h`<div part="associables-container">
3971
+ <div name="left${r}" part="drop-list" class="dl" identifier="droplist${r}_left"></div>
3972
+ <div name="right${r}" part="drop-list" class="dl" identifier="droplist${r}_right"></div>
3973
+ </div>
3974
+ <div role="alert" id="validationMessage"></div>`)}
3975
+ </div>`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("register-qti-simple-associable-choice",this._registerChoiceHandler)}};je.styles=Ds,l([q()],je.prototype,"_childrenMap",2),je=l([g("qti-associate-interaction")],je);var ae=class extends E{constructor(){super();this._errorMessage=null;this.handlePostMessage=this.handlePostMessage.bind(this)}connectedCallback(){super.connectedCallback();let e=this.data.startsWith("http")?this.data:qt(this.baseItemUrl+"/"+this.data);fetch(e).then(r=>r.json()).then(r=>{this.manifest=r,this.setupCES()}).catch(r=>{this._errorMessage=r})}setupCES(){let e=this.shadowRoot.querySelector("#pciContainer"),r=e.contentDocument;window.addEventListener("message",this.handlePostMessage),r.open(),r.write(`
3976
+ <html>
3977
+ <head>
3978
+ <link href='${qt(`${this.baseRefUrl}/${this.manifest.style[0]}`)}' rel="stylesheet" />
3979
+ <script src='${qt(`${this.baseRefUrl}/${this.manifest.script[0]}`)}'></script>
3980
+ </head>
3981
+ <body></body>
3982
+ </html>
3983
+ `),r.close()}getIFrames(){let e=this.shadowRoot.querySelectorAll("iframe"),r=this.querySelectorAll("iframe"),i=[...e,...r];for(let o of i){let n=o.src;if(new URL(n,window.location.href).origin===window.location.origin)try{let c=o.contentDocument||o.contentWindow.document;c&&this.getInnerIFrames(c,i)}catch(c){console.error("Error accessing nested iframe:",c)}}return i.forEach((o,n)=>{i.indexOf(o)!==n&&i.splice(n,1)}),i}getInnerIFrames(e,r=[]){return e.querySelectorAll("iframe").forEach(o=>{r.push(o);let n=o.src;if(new URL(n,window.location.href).origin===window.location.origin)try{let c=o.contentDocument||o.contentWindow.document;this.getInnerIFrames(c,r)}catch(c){console.error("Error accessing nested iframe:",c)}else console.warn("Skipped cross-origin iframe:",n)}),r}postToWindowAndIframes(e,r){window.postMessage({type:e,data:r},"*");let i=this.getIFrames();for(let o of i)o.contentWindow&&o.contentWindow.postMessage({type:e,data:r},"*")}handlePostMessage(e){let{type:r,data:i}=e.data;switch(r){case"setResponse":this.rawResponse=i,this.saveResponse(i);break;case"getResponse":{this.postToWindowAndIframes("responseData",this.rawResponse);break}case"getMedia":{let o=this.manifest.media.map(n=>n.startsWith("http")?n:qt(this.baseRefUrl+"/"+n));this.postToWindowAndIframes("mediaData",o);break}case"setStageHeight":console.log("setStageHeight not implemented");break}}validate(){return this.rawResponse!==""}get value(){return this.rawResponse}set value(e){if(typeof e=="string")this.rawResponse=e,this.saveResponse(e);else throw new Error("Value must be a string")}disconnectedCallback(){window.removeEventListener("message",this.handlePostMessage),super.disconnectedCallback()}render(){return h`<iframe
3984
+ width=${this.getAttribute("width")}
3985
+ height=${this.getAttribute("height")}
3986
+ frameborder="0"
3987
+ title="pciContainer"
3988
+ id="pciContainer"
3989
+ >
3990
+ </iframe>
3991
+ ${this._errorMessage&&h`<div style="color:red">
3992
+ <h1>Error</h1>
3993
+ ${this._errorMessage}
3994
+ </div>`}`}};l([p({type:String,attribute:"data"})],ae.prototype,"data",2),l([p({type:String,attribute:"data-base-item"})],ae.prototype,"baseItemUrl",2),l([p({type:String,attribute:"data-base-ref"})],ae.prototype,"baseRefUrl",2),l([p({type:String,attribute:"id"})],ae.prototype,"id",2),l([q()],ae.prototype,"_errorMessage",2),ae=l([g("qti-custom-interaction")],ae);var We=class extends E{constructor(){super(...arguments);this.countAttempt="true"}validate(){return!0}get value(){return""}set value(e){}render(){return h`<button ?disabled=${this.disabled} part="button" @click=${this.endAttempt}>${this.title}</button>`}endAttempt(e){this.dispatchEvent(new CustomEvent("end-attempt",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,countAttempt:this.countAttempt==="true"}}))}};l([p({type:String,attribute:"count-attempt"})],We.prototype,"countAttempt",2),l([p({type:String})],We.prototype,"title",2),We=l([g("qti-end-attempt-interaction")],We);var Is=b`
3995
+ :host {
3996
+ display: flex;
3997
+ align-items: flex-start;
3998
+ flex-direction: column;
3999
+ flex-wrap: wrap;
4000
+ gap: 0.5rem;
4001
+ }
4002
+
4003
+ :host(.qti-choices-top) {
4004
+ flex-direction: column;
4005
+ }
4006
+ :host(.qti-choices-bottom) {
4007
+ flex-direction: column-reverse;
4008
+ }
4009
+ :host(.qti-choices-left) {
4010
+ flex-direction: row;
4011
+ }
4012
+ :host(.qti-choices-right) {
4013
+ flex-direction: row-reverse;
4014
+ }
4015
+ /* [part='drops'] , */
4016
+ [name='prompt'] {
4017
+ width: 100%;
4018
+ }
4019
+ [name='drags'] {
4020
+ display: flex;
4021
+ align-items: flex-start;
4022
+ flex: 1;
4023
+ border: 2px solid transparent;
4024
+ padding: 0.3rem;
4025
+ border-radius: 0.3rem;
4026
+ gap: 0.5rem;
4027
+ }
4028
+ `;var Rt=class extends re(E,"qti-gap-text","qti-gap","slot[part='drags']"){constructor(){super(...arguments);this.observer=null;this.resizeObserver=null}render(){return h`<slot name="prompt"> </slot>
4029
+ <slot part="drags" name="drags"></slot>
4030
+ <slot part="drops"></slot>
4031
+ <div role="alert" id="validationMessage"></div>`}firstUpdated(e){super.firstUpdated(e),this.updateMinDimensionsForDrowZones(),this.observer=new MutationObserver(()=>this.updateMinDimensionsForDrowZones()),this.observer.observe(this,{childList:!0,subtree:!0}),this.resizeObserver=new ResizeObserver(()=>this.updateMinDimensionsForDrowZones()),this.querySelectorAll("qti-gap-text").forEach(i=>this.resizeObserver?.observe(i))}disconnectedCallback(){super.disconnectedCallback(),this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}updateMinDimensionsForDrowZones(){let e=this.querySelectorAll("qti-gap-text"),r=this.querySelectorAll("qti-gap"),i=0,o=0;e.forEach(a=>{let c=a.getBoundingClientRect();i=Math.max(i,c.height),o=Math.max(o,c.width)});let n=this.shadowRoot?.querySelector('[part="drags"]');n&&(n.style.minHeight=`${i}px`,n.style.minWidth=`${o}px`);for(let a of r)a.style.minHeight=`${i}px`,a.style.minWidth=`${o}px`}set correctResponse(e){let r=[],i=Array.isArray(e)?e:[e];i&&(r=i.map(n=>{let a=n.split(" ");return{text:a[0],gap:a[1]}})),this.querySelectorAll("qti-gap").forEach(n=>{let a=n.getAttribute("identifier"),c=r.find(u=>u.gap===a)?.text,d=this.querySelector(`qti-gap-text[identifier="${c}"]`)?.textContent.trim();if(c&&d){if(!n.nextElementSibling?.classList.contains("correct-option")){let u=document.createElement("span");u.classList.add("correct-option"),u.textContent=d,n.insertAdjacentElement("afterend",u)}}else n.nextElementSibling?.classList.contains("correct-option")&&n.nextElementSibling.remove()})}};Rt.styles=Is,Rt=l([g("qti-gap-match-interaction")],Rt);var Ns=(s,t,e)=>{let r=new Map;for(let i=t;i<=e;i++)r.set(s[i],i);return r},Ar=F(class extends G{constructor(s){if(super(s),s.type!==ue.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,t,e){let r;e===void 0?e=t:t!==void 0&&(r=t);let i=[],o=[],n=0;for(let a of s)i[n]=r?r(a,n):n,o[n]=e(a,n),n++;return{values:o,keys:i}}render(s,t,e){return this.dt(s,t,e).values}update(s,[t,e,r]){let i=os(s),{values:o,keys:n}=this.dt(t,e,r);if(!Array.isArray(i))return this.ut=n,o;let a=this.ut??(this.ut=[]),c=[],d,u,m=0,f=i.length-1,y=0,x=o.length-1;for(;m<=f&&y<=x;)if(i[m]===null)m++;else if(i[f]===null)f--;else if(a[m]===n[y])c[y]=he(i[m],o[y]),m++,y++;else if(a[f]===n[x])c[x]=he(i[f],o[x]),f--,x--;else if(a[m]===n[x])c[x]=he(i[m],o[x]),He(s,c[x+1],i[m]),m++,x--;else if(a[f]===n[y])c[y]=he(i[f],o[y]),He(s,i[m],i[f]),f--,y++;else if(d===void 0&&(d=Ns(n,y,x),u=Ns(a,m,f)),d.has(a[m]))if(d.has(a[f])){let _=u.get(n[y]),S=_!==void 0?i[_]:null;if(S===null){let D=He(s,i[m]);he(D,o[y]),c[y]=D}else c[y]=he(S,o[y]),He(s,i[m],S),i[_]=null;y++}else rr(i[f]),f--;else rr(i[m]),m++;for(;y<=x;){let _=He(s,c[x+1]);he(_,o[y]),c[y++]=_}for(;m<=f;){let _=i[m++];_!==null&&rr(_)}return this.ut=n,ss(s,c),R}});function Xe(s,t,e,r){switch(s){case"circle":{let[i,o,n]=t,a=i/e.width*100,c=o/e.height*100,d=n/e.width*100;r.style.left=a-d+"%",r.style.top=c-d+"%",r.style.width=r.style.height=4*d+"px",r.style.borderRadius="9999px"}break;case"rect":{let[i,o,n,a]=t,c=i/e.width*100,d=o/e.height*100,u=n/e.width*100,m=a/e.height*100;r.style.left=c+"%",r.style.top=d+"%",r.style.width=u-c+"%",r.style.height=m-d+"%"}break;case"poly":{let i=t.reduce((_,S,D,Qe)=>{if(D%2===1){let ce=_.pop();_[_.length]={x:ce,y:Qe[D]}}else _.push(S);return _},[]),o=Math.min(...i.map(_=>_.x)),n=Math.max(...i.map(_=>_.x)),a=Math.min(...i.map(_=>_.y)),c=Math.max(...i.map(_=>_.y)),d=o/e.width*100,u=a/e.height*100,m=n/e.width*100,f=c/e.height*100;r.style.left=o/e.width*100+"%",r.style.top=a/e.height*100+"%",r.style.width=m-d+"%",r.style.height=f-u+"%";let x=i.map(_=>({x:(_.x-o)/(n-o)*100,y:(_.y-a)/(c-a)*100})).map(_=>Math.round(_.x)+"% "+Math.round(_.y)+"%").join(",");r.style.clipPath=`polygon(${x})`}break;default:break}}var ie=class extends E{constructor(){super();this.startPoint=null;this.endPoint=null;this._lines=[];this.addEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}reset(){this._lines=[]}validate(){return this._lines.length>0}set value(e){Array.isArray(e)&&(this._lines=e)}get value(){return this._lines}render(){return h`<slot name="prompt"></slot>
4032
+ <line-container>
4033
+ <svg
4034
+ width=${ge(this.grImage[0]?.width)}
4035
+ height=${ge(this.grImage[0]?.height)}
4036
+ viewbox="0 0 ${this.grImage[0]?.width} ${this.grImage[0]?.height}"
4037
+ >
4038
+ ${Ar(this._lines,e=>e,(e,r)=>Hr`
4039
+ <line
4040
+ part="line"
4041
+ x1=${parseInt(this.querySelector("[identifier="+e.split(" ")[0]+"]").style.left)}
4042
+ y1=${parseInt(this.querySelector("[identifier="+e.split(" ")[0]+"]").style.top)}
4043
+ x2=${parseInt(this.querySelector("[identifier="+e.split(" ")[1]+"]").style.left)}
4044
+ y2=${parseInt(this.querySelector("[identifier="+e.split(" ")[1]+"]").style.top)}
4045
+ stroke="red"
4046
+ stroke-width="3"
4047
+ @click=${i=>{i.stopPropagation(),this._lines=this._lines.filter((o,n)=>n!==r),this.saveResponse(this._lines)}}
4048
+ />
4049
+ `)}
4050
+ ${this.startPoint&&Hr`<line
4051
+ part="point"
4052
+ x1=${this.startCoord.x}
4053
+ y1=${this.startCoord.y}
4054
+ x2=${this.mouseCoord.x}
4055
+ y2=${this.mouseCoord.y}
4056
+ stroke="red"
4057
+ stroke-width="3"
4058
+ />`}
4059
+ </svg>
4060
+ <slot></slot>
4061
+ </line-container>
4062
+ <div role="alert" id="validationMessage"></div>`}positionHotspotOnRegister(e){let r=this.querySelector("img"),i=e.target,o=i.getAttribute("coords"),n=i.getAttribute("shape"),a=o.split(",").map(c=>parseInt(c));Xe(n,a,r,i)}firstUpdated(e){super.firstUpdated(e),this.hotspots=this.querySelectorAll("qti-associable-hotspot"),document.addEventListener("mousemove",r=>{this.mouseCoord={x:r.clientX-this.grImage[0].getBoundingClientRect().left,y:r.clientY-this.grImage[0].getBoundingClientRect().top}}),this.hotspots.forEach(r=>{r.style.left=r.getAttribute("coords").split(",")[0]+"px",r.style.top=r.getAttribute("coords").split(",")[1]+"px",r.addEventListener("click",i=>{this.startPoint?this.endPoint||(this.endPoint=i.target,this._lines=[...this._lines,this.startPoint.getAttribute("identifier")+" "+this.endPoint.getAttribute("identifier")],this.saveResponse(this._lines),this.startPoint=null,this.endPoint=null):(this.startPoint=i.target,this.startCoord={x:this.startPoint.getAttribute("coords").split(",")[0],y:this.startPoint.getAttribute("coords").split(",")[1]})})})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}};ie.styles=[b`
4063
+ slot:not([name='prompt']) {
4064
+ // position: relative; /* qti-hotspot-choice relative to the slot */
4065
+ display: block;
4066
+ width: fit-content; /* hotspots not stretching further if image is at max size */
4067
+ }
4068
+ ::slotted(img) {
4069
+ /* image not selectable anymore */
4070
+ pointer-events: none;
4071
+ user-select: none;
4072
+ }
4073
+ ::slotted(qti-associable-hotspot) {
4074
+ transform: translate(-50%, -50%);
4075
+ }
4076
+ line-container {
4077
+ display: block;
4078
+ position: relative;
4079
+ }
4080
+ svg {
4081
+ position: absolute;
4082
+ top: 0px;
4083
+ left: 0px;
4084
+ }
4085
+ `],l([q()],ie.prototype,"_lines",2),l([q()],ie.prototype,"startCoord",2),l([q()],ie.prototype,"mouseCoord",2),l([Ie("svg")],ie.prototype,"svgContainer",2),l([Oi({selector:"img"})],ie.prototype,"grImage",2),ie=l([g("qti-graphic-associate-interaction")],ie);var Ps=b`
4086
+ :host {
4087
+ display: flex;
4088
+ align-items: flex-start;
4089
+ flex-direction: column;
4090
+ flex-wrap: wrap;
4091
+ gap: 0.5rem;
4092
+ }
4093
+
4094
+ :host(.qti-choices-top) {
4095
+ flex-direction: column-reverse;
4096
+ }
4097
+ :host(.qti-choices-bottom) {
4098
+ flex-direction: column;
4099
+ }
4100
+ :host(.qti-choices-left) {
4101
+ flex-direction: row-reverse;
4102
+ & [name='drags'] {
4103
+ width: 25%;
4104
+ }
4105
+ & [part='image'] {
4106
+ width: 75%;
4107
+ }
4108
+ }
4109
+ :host(.qti-choices-right) {
4110
+ flex-direction: row;
4111
+ & [name='drags'] {
4112
+ width: 25%;
4113
+ }
4114
+ & [part='image'] {
4115
+ width: 75%;
4116
+ }
4117
+ }
4118
+ [part='image'] {
4119
+ display: block;
4120
+ position: relative;
4121
+ }
4122
+ /* [part='drops'] , */
4123
+
4124
+ [name='drags'] {
4125
+ display: flex;
4126
+ align-items: flex-start;
4127
+ flex-wrap: wrap;
4128
+ flex: 1;
4129
+ border: 2px solid transparent;
4130
+ padding: 0.3rem;
4131
+ border-radius: 0.3rem;
4132
+ gap: 0.5rem;
4133
+ }
4134
+ ::slotted(img) {
4135
+ display: inline-block;
4136
+ user-select: none;
4137
+ pointer-events: none;
4138
+ }
4139
+ `;var Mt=class extends re(E,"qti-gap-img, qti-gap-text","qti-associable-hotspot","slot[part='drags']"){constructor(){super(...arguments);this.observer=null;this.resizeObserver=null}render(){return h` <slot name="prompt"></slot>
4140
+ <slot part="image"></slot>
4141
+ <slot part="drags" name="drags" class="hover-border"></slot>
4142
+ <div role="alert" id="validationMessage"></div>`}firstUpdated(e){super.firstUpdated(e),this.updateMinDimensionsForDrowZones(),this.observer=new MutationObserver(()=>this.updateMinDimensionsForDrowZones()),this.observer.observe(this,{childList:!0,subtree:!0}),this.resizeObserver=new ResizeObserver(()=>this.updateMinDimensionsForDrowZones()),this.querySelectorAll("qti-gap-img, qti-gap-text").forEach(i=>this.resizeObserver?.observe(i))}updateMinDimensionsForDrowZones(){let e=this.querySelectorAll("qti-gap-img, qti-gap-text"),r=this.querySelectorAll("qti-associable-hotspot"),i=0,o=0;e.forEach(c=>{let d=c.getBoundingClientRect();i=Math.max(i,d.height),o=Math.max(o,d.width)});let n=this.shadowRoot.querySelectorAll("slot"),a=Array.from(n).find(c=>c.name==="drags");a&&(a.style.minHeight=`${i}px`,a.style.minWidth=`${o}px`);for(let c of r)c.style.minHeight=`${i}px`,c.style.minWidth=`${o}px`}positionHotspotOnRegister(e){let r=e.target,i=r.getAttribute("coords"),o=r.getAttribute("shape"),n=i.split(",").map(a=>parseInt(a));switch(o){case"circle":{let[a,c,d]=n;r.style.left=a-d+"px",r.style.top=c-d+"px",r.style.width=r.style.height=2*d+"px"}break;case"rect":{let[a,c,d,u]=n;r.style.left=a+"px",r.style.top=c+"px",r.style.width=d-a+"px",r.style.height=u-c+"px"}break;default:break}}connectedCallback(){super.connectedCallback(),this.addEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}};Mt.styles=Ps,Mt=l([g("qti-graphic-gap-match-interaction")],Mt);var Lt=class extends fe(E,"qti-hotspot-choice"){constructor(){super(...arguments);this._choiceElements=[]}render(){return h`
4143
+ <slot name="prompt"></slot>
4144
+ <!-- slot for the prompt -->
4145
+ <slot></slot>
4146
+ <!-- slot for the image and hotspots -->
4147
+ <div role="alert" id="validationMessage"></div>
4148
+ `}setHotspotOrder(e){let{identifier:r}=e.detail,i=this._choiceElements.find(n=>n.getAttribute("identifier")===r),o=this._choiceElements.length;if(!this.choiceOrdering){if(this.choiceOrdering=!0,i.order==null){if(this._choiceElements.filter(n=>n.order>0).length>=o){this.choiceOrdering=!1;return}i.order=this._choiceElements.filter(n=>!!n.order).length+1,this.choiceOrdering=!1;return}else this._choiceElements.forEach(n=>(n.order>n.order&&n.order--,n)),i.order=null;this.choiceOrdering=!1}}positionHotspotOnRegister(e){let r=this.querySelector("img"),i=e.target,o=i.getAttribute("coords"),n=i.getAttribute("shape"),a=o.split(",").map(c=>parseInt(c));Xe(n,a,r,i)}connectedCallback(){super.connectedCallback(),this.addEventListener("activate-qti-hotspot-choice",this.setHotspotOrder),this.addEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("activate-qti-hotspot-choice",this.setHotspotOrder),this.removeEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}};Lt.styles=[b`
4149
+ slot:not([name='prompt']) {
4150
+ position: relative; /* qti-hotspot-choice relative to the slot */
4151
+ display: block;
4152
+ width: fit-content; /* hotspots not stretching further if image is at max size */
4153
+ }
4154
+ ::slotted(img) {
4155
+ /* image not selectable anymore */
4156
+ pointer-events: none;
4157
+ user-select: none;
4158
+ }
4159
+ `],Lt=l([g("qti-graphic-order-interaction")],Lt);var $t=class extends fe(E,"qti-hotspot-choice"){render(){return h`
4160
+ <slot name="prompt"></slot>
4161
+ <!-- slot for the prompt -->
4162
+ <slot></slot>
4163
+ <!-- slot for the image and hotspots -->
4164
+ `}positionHotspotOnRegister(t){let e=this.querySelector("img"),r=t.target,i=r.getAttribute("coords"),o=r.getAttribute("shape"),n=i.split(",").map(a=>parseInt(a));Xe(o,n,e,r)}connectedCallback(){super.connectedCallback(),this.addEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("unregister-qti-hotspot-choice",this.positionHotspotOnRegister)}};$t.styles=[b`
4165
+ slot:not([name='prompt']) {
4166
+ position: relative; /* qti-hotspot-choice relative to the slot */
4167
+ display: block;
4168
+ width: fit-content; /* hotspots not stretching further if image is at max size */
4169
+ }
4170
+ ::slotted(img) {
4171
+ /* image not selectable anymore */
4172
+ pointer-events: none;
4173
+ user-select: none;
4174
+ /* width:100%; */
4175
+ }
4176
+ `],$t=l([g("qti-hotspot-interaction")],$t);var ye=class extends Z(v,"qti-simple-associable-choice"){constructor(){super(...arguments);this.matchMin=0;this.matchMax=1;this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-simple-associable-choice"),this.setAttribute("part","qti-simple-associable-choice")}render(){return h`
4177
+ <slot part="slot"></slot>
4178
+ <slot part="dropslot" name="qti-simple-associable-choice"></slot>
4179
+ `}};ye.styles=b`
4180
+ :host {
4181
+ display: flex;
4182
+ user-select: none;
4183
+ }
4184
+ slot {
4185
+ width: 100%;
4186
+ display: block;
4187
+ }
4188
+ slot[name='qti-simple-associable-choice'] {
4189
+ width: 100%;
4190
+ }
4191
+ `,l([p({type:Number,attribute:"match-min"})],ye.prototype,"matchMin",2),l([p({type:Number,attribute:"match-max"})],ye.prototype,"matchMax",2),l([p({type:Boolean,attribute:"fixed"})],ye.prototype,"fixed",2),ye=l([g("qti-simple-associable-choice")],ye);var Hs=b`
4192
+ slot {
4193
+ /* slot where the */
4194
+ display: flex;
4195
+ flex-direction: column;
4196
+ gap: 0.5rem;
4197
+ align-items: flex-start; /* prevents the drag and drop container slots having the same height */
4198
+ }
4199
+ :host(.qti-choices-top) slot {
4200
+ flex-direction: column;
4201
+ }
4202
+ :host(.qti-choices-bottom) slot {
4203
+ flex-direction: column-reverse;
4204
+ }
4205
+ :host(.qti-choices-left) slot {
4206
+ flex-direction: row;
4207
+ }
4208
+ :host(.qti-choices-right) slot {
4209
+ flex-direction: row-reverse;
4210
+ }
4211
+ slot[name='prompt'] {
4212
+ display: block;
4213
+ }
4214
+ ::slotted(qti-simple-match-set) {
4215
+ /* Make sure the drag and drop container slots have the same width */
4216
+ flex: 1;
4217
+ }
4218
+ `;var xe=class extends re(E,"qti-simple-match-set:first-of-type qti-simple-associable-choice","qti-simple-match-set:last-of-type qti-simple-associable-choice","qti-simple-match-set"){constructor(){super(...arguments);this.lastCheckedRadio=null;this._response=[];this.correctOptions=[];this.responseIdentifier="";this.handleRadioClick=e=>{let r=e.target;this.lastCheckedRadio===r?(r.checked=!1,this.lastCheckedRadio=null,this.handleRadioChange(e)):this.lastCheckedRadio=r};this.handleRadioChange=e=>{let r=e.target,i=r.value,o=r.name,n=r.type;r.checked?(this.value?this.value.indexOf(i)===-1&&(n==="radio"&&(this.value=this.value.filter(a=>a.indexOf(o)===-1)),this.value=[...this.value,i]):this.value=[i],this.lastCheckedRadio=r):(this.value=this.value.filter(a=>a!==i),this.lastCheckedRadio=null),this.requestUpdate(),this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,response:Array.isArray(this.value)?[...this.value]:this.value}}))}}get value(){return this.classList.contains("qti-match-tabular")?this._response:super.value}set value(e){this.classList.contains("qti-match-tabular")?this._response=e:super.value=e}async connectedCallback(){super.connectedCallback(),this.rows=Array.from(this.querySelectorAll("qti-simple-match-set:first-of-type qti-simple-associable-choice")),this.cols=Array.from(this.querySelectorAll("qti-simple-match-set:last-of-type qti-simple-associable-choice")),this.value=[]}set correctResponse(e){if(e===""){this.correctOptions=[];return}else Array.isArray(e)&&(this.correctOptions=e)}render(){return this.classList.contains("qti-match-tabular")?h`
4219
+ <slot name="prompt"></slot>
4220
+ <table>
4221
+ <tr>
4222
+ <td></td>
4223
+ ${this.cols.map(e=>h`<th part="r-header">${be(e.innerHTML)}</th>`)}
4224
+ </tr>
4225
+
4226
+ ${this.rows.map(e=>h`<tr>
4227
+ <td part="c-header">${be(e.innerHTML)}</td>
4228
+ ${this.cols.map(r=>{let i=e.getAttribute("identifier"),o=r.getAttribute("identifier"),n=`${i} ${o}`,a=this.value.filter(m=>m.split(" ")[0]===i).length||0,c=this.value.includes(n),d=`rb ${c?"rb-checked":""} ${this.correctOptions.includes(n)?"rb-correct":""}`,u=this.correctOptions.length>0?!0:e.matchMax===1?!1:a>=e.matchMax&&!c;return h`<td>
4229
+ <input
4230
+ type=${e.matchMax===1?"radio":"checkbox"}
4231
+ part=${d}
4232
+ name=${i}
4233
+ value=${n}
4234
+ .disabled=${u}
4235
+ @change=${m=>this.handleRadioChange(m)}
4236
+ @click=${m=>e.matchMax===1?this.handleRadioClick(m):null}
4237
+ />
4238
+ </td>`})}
4239
+ </tr>`)}
4240
+ </table>
4241
+ `:h`<slot name="prompt"></slot> <slot></slot>
4242
+ <div role="alert" id="validationMessage"></div>`}};xe.styles=Hs,l([q()],xe.prototype,"_response",2),l([q()],xe.prototype,"correctOptions",2),l([p({type:String,attribute:"response-identifier"})],xe.prototype,"responseIdentifier",2),xe=l([g("qti-match-interaction")],xe);var Dt=class extends E{constructor(){super();this._value=0}reset(){}validate(){return!0}get value(){return this._value.toString()}set value(e){if(!isNaN(parseInt(e.toString())))this._value=parseInt(e.toString());else throw new Error("Value must be a number")}static get properties(){return{...E.properties,step:{type:Number,attribute:"step",default:10}}}render(){return h` <slot name="prompt"></slot>
4243
+ <slot></slot>`}connectedCallback(){super.connectedCallback();let e=this.querySelector("audio")||this.querySelector("video")||this.querySelector("object");e&&e.addEventListener("ended",()=>{this._value++,this.saveResponse(this.value)})}};Dt.styles=[b``],Dt=l([g("qti-media-interaction")],Dt);var Os=b`
4244
+ [part='drags'] {
4245
+ display: flex;
4246
+ align-items: flex-start;
4247
+ flex: 1;
4248
+ border: 2px solid transparent;
4249
+ }
4250
+
4251
+ [part='drops'] {
4252
+ flex: 1;
4253
+ display: grid;
4254
+ grid-auto-flow: column;
4255
+ grid-auto-columns: 1fr;
4256
+ }
4257
+
4258
+ :host([orientation='horizontal']) [part='drags'] {
4259
+ flex-direction: row;
4260
+ }
4261
+ :host([orientation='horizontal']) [part='drops'] {
4262
+ grid-auto-flow: column;
4263
+ }
4264
+ :host([orientation='vertical']) [part='drags'] {
4265
+ flex-direction: column;
4266
+ }
4267
+ :host([orientation='vertical']) [part='drops'] {
4268
+ grid-auto-flow: row;
4269
+ }
4270
+
4271
+ [part='drop-list'] {
4272
+ display: block;
4273
+ flex: 1;
4274
+ }
4275
+
4276
+ [part='container'] {
4277
+ display: flex;
4278
+ gap: 0.5rem;
4279
+ }
4280
+ :host(.qti-choices-top) [part='container'] {
4281
+ flex-direction: column;
4282
+ }
4283
+ :host(.qti-choices-bottom) [part='container'] {
4284
+ flex-direction: column-reverse;
4285
+ }
4286
+ :host(.qti-choices-left) [part='container'] {
4287
+ flex-direction: row;
4288
+ }
4289
+ :host(.qti-choices-right) [part='container'] {
4290
+ flex-direction: row-reverse;
4291
+ }
4292
+ `;var le=class extends vr(re(E,"qti-simple-choice","drop-list","slot[part='drags']"),"qti-simple-choice"){constructor(){super(...arguments);this.nrChoices=0;this.correctResponses=[];this.showCorrectResponses=!1}render(){let e=Array.from(this.querySelectorAll("qti-simple-choice"));return this.nrChoices<e.length&&(this.nrChoices=e.length),h` <slot name="prompt"> </slot>
4293
+ <div part="container">
4294
+ <slot part="drags"> </slot>
4295
+ <div part="drops">
4296
+ ${Array.from(Array(this.nrChoices)).map((r,i)=>h`<drop-list part="drop-list" identifier="droplist${i}"></drop-list>${this.showCorrectResponses&&this.correctResponses.length>i?be(`<span part='correct-response'>${this.correctResponses[i]}</span>`):""}`)}
4297
+ </div>
4298
+ </div>`}set correctResponse(e){if(e===""){this.showCorrectResponses=!1;return}this.correctResponses.length===0&&(Array.isArray(e)?e:[e]).forEach(i=>{let o=this.querySelector(`qti-simple-choice[identifier="${i}"]`);o||(o=this.shadowRoot.querySelector(`qti-simple-choice[identifier="${i}"]`));let n=o?.textContent.trim();this.correctResponses=[...this.correctResponses,n]}),this.showCorrectResponses=!0}getResponse(){return Array.from(this.shadowRoot.querySelectorAll("drop-list")).map(i=>{let o=i.querySelectorAll('[qti-draggable="true"]');return[...Array.from(o).map(a=>a.getAttribute("identifier"))].join(" ")})}async firstUpdated(e){super.firstUpdated(e),this.childrenMap=Array.from(this.querySelectorAll("qti-simple-choice")),this.childrenMap.forEach(r=>r.setAttribute("part","qti-simple-choice"))}};le.styles=Os,l([q()],le.prototype,"nrChoices",2),l([q()],le.prototype,"correctResponses",2),l([q()],le.prototype,"showCorrectResponses",2),l([p({type:String})],le.prototype,"orientation",2),le=l([g("qti-order-interaction")],le);var Sr=class extends v{render(){return h`<slot></slot>`}};Sr.styles=[b`
4299
+ :host {
4300
+ display: block;
4301
+ }
4302
+ ::slotted(img) {
4303
+ position: absolute;
4304
+ cursor: move;
4305
+ user-select: none;
4306
+ left: 50%;
4307
+ transform: translateX(-50%);
4308
+ }
4309
+ `];customElements.define("qti-position-object-interaction",Sr);var It=class extends v{render(){return h`<slot></slot>`}constructor(){super(),this.removeMoveListener=this.removeMoveListener.bind(this),this.dragElementHandler=this.dragElementHandler.bind(this)}dragElementHandler(t){t.preventDefault();let e=t.clientX-this.startX,r=t.clientY-this.startY;this.dragElement.style.left=this.dragElement.offsetLeft+e+"px",this.dragElement.style.top=this.dragElement.offsetTop+r+"px",this.startX=t.clientX,this.startY=t.clientY}firstUpdated(t){super.firstUpdated(t),this.dragElement=this.querySelector("qti-position-object-interaction>img"),this.startX=0,this.startY=0,this.dragElement.addEventListener("mousedown",e=>{this.startX=e.clientX,this.startY=e.clientY,document.addEventListener("mousemove",this.dragElementHandler,!0)}),document.addEventListener("mouseup",this.removeMoveListener)}removeMoveListener(){document.removeEventListener("mousemove",this.dragElementHandler,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousemove",this.dragElementHandler),document.removeEventListener("mouseup",this.removeMoveListener)}};It.styles=[b`
4310
+ :host {
4311
+ display: inline-block;
4312
+ position: relative;
4313
+ }
4314
+ `],It=l([g("qti-position-object-stage")],It);var Vs="important",Po=" !"+Vs,zs=F(class extends G{constructor(s){if(super(s),s.type!==ue.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let r=s[e];return r==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?e.removeProperty(r):e[r]=null);for(let r in t){let i=t[r];if(i!=null){this.ft.add(r);let o=typeof i=="string"&&i.endsWith(Po);r.includes("-")||o?e.setProperty(r,o?i.slice(0,-11):i,o?Vs:""):e[r]=i}}return R}});var qe=class extends E{constructor(){super(...arguments);this.maxChoices=1/0;this.minChoices=0;this._points=[];this._imgElement=null;this._onImageClick=e=>{if(this._points.length<this.maxChoices){let r=e.offsetX,i=e.offsetY;this._points=[...this._points,`${r} ${i}`],this.saveResponse(this._points)}}}render(){return h` <slot name="prompt"></slot>
4315
+ <point-container>
4316
+ ${Ar(this._points,e=>e,(e,r)=>h`
4317
+ <button
4318
+ part="point"
4319
+ style=${zs({position:"absolute",transform:"translate(-50%, -50%)",left:`${e.split(" ")[0]}px`,top:`${e.split(" ")[1]}px`})}
4320
+ aria-label="Remove point at ${e}"
4321
+ @click=${i=>{i.stopPropagation(),this._points=this._points.filter((o,n)=>n!==r),this.saveResponse(this._points)}}
4322
+ ></button>
4323
+ `)}
4324
+ <slot></slot>
4325
+ </point-container>`}reset(){this._points=[]}validate(){return this._points.length>=this.minChoices&&this._points.length<=this.maxChoices}set value(e){this._points=Array.isArray(e)?e:[e]}get value(){return this._points}firstUpdated(){this._imgElement=this.querySelector("img"),this._imgElement?this._imgElement.addEventListener("click",this._onImageClick):console.warn("No <img> element found in <qti-select-point-interaction>")}disconnectedCallback(){super.disconnectedCallback(),this._imgElement&&this._imgElement.removeEventListener("click",this._onImageClick)}};qe.styles=[b`
4326
+ :host {
4327
+ display: block;
4328
+ }
4329
+ point-container {
4330
+ display: block;
4331
+ position: relative;
4332
+ }
4333
+ `],l([p({type:Number,attribute:"max-choices"})],qe.prototype,"maxChoices",2),l([p({type:Number,attribute:"min-choices"})],qe.prototype,"minChoices",2),l([q()],qe.prototype,"_points",2),qe=l([g("qti-select-point-interaction")],qe);var P=class extends E{constructor(){super();this._value=0;this.stepLabel=!1;this.reverse=!1;this._handleDisabledChange=()=>{};this._handleReadonlyChange=()=>{};this.csLive=getComputedStyle(this)}set min(e){this._min=e,this._value=e,this.style.setProperty("--min",`${this._min}`)}get min(){return this._min}set max(e){this._max=e,this.style.setProperty("--max",`${this._max}`)}get max(){return this._max}set step(e){this._step=e,this.style.setProperty("--step",`${this._step}`)}get step(){return this._step}reset(){}validate(){return!0}get value(){return this._value.toString()}set value(e){if(!isNaN(parseInt(e.toString())))this._value=parseInt(e.toString());else throw new Error("Value must be a number")}set response(e){if(Array.isArray(e)){console.error("QtiSliderInteraction: response is an array, but should be a single value");return}let r=parseInt(e);if(Number.isNaN(r)){console.error("QtiSliderInteraction: response is not a number");return}this._value=r}render(){this._value<this.min&&(this._value=this.min),this._value>this.max&&(this._value=this.max);let e=(this._value-this.min)/(this.max-this.min)*100;return this.style.setProperty("--value-percentage",`${e}%`),this.setAttribute("aria-valuenow",this.value.toString()),h`<slot name="prompt"></slot>
4334
+ <div id="slider" part="slider">
4335
+ ${this.csLive.getPropertyValue("--show-bounds")=="true"?h`<div id="bounds" part="bounds">
4336
+ <div>${this._min}</div>
4337
+ <div>${this._max}</div>
4338
+ </div>`:k}
4339
+ ${this.csLive.getPropertyValue("--show-ticks")=="true"?h`<div id="ticks" part="ticks"></div>`:k}
4340
+ <div id="rail" part="rail" @mousedown=${this._onMouseDown} @touchstart=${this._onTouchMove}>
4341
+ <div id="knob" part="knob">
4342
+ ${this.csLive.getPropertyValue("--show-value")=="true"?h`<div id="value" part="value">${this.value}</div>`:k}
4343
+ </div>
4344
+ </div>
4345
+ </div>`}connectedCallback(){super.connectedCallback(),this.step=1,this.setAttribute("tabindex","0"),this.setAttribute("role","slider")}_onTouchMove(e){let r=a=>{let{x:c}=this.getPositionFromEvent(a),d=c-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(d),a.stopPropagation()},i=()=>{document.removeEventListener("touchmove",r),document.removeEventListener("touchend",i),this.saveResponse(this.value.toString())};document.addEventListener("touchmove",r),document.addEventListener("touchend",i);let{x:o}=this.getPositionFromEvent(e),n=o-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(n),e.stopPropagation()}_onMouseDown(e){let r=n=>{let a=n.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(a),n.preventDefault(),n.stopPropagation()},i=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i),this.saveResponse(this.value.toString())};document.addEventListener("mousemove",r),document.addEventListener("mouseup",i);let o=e.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(o),e.preventDefault(),e.stopPropagation()}calculateValue(e){let r=this.min+(this.max-this.min)*e/this._rail.getBoundingClientRect().width,i=this.min+Math.round((r-this.min)/this._step)*this._step;this._value=i}getPositionFromEvent(e){let r;if(e.type=="touchstart"||e.type=="touchmove"||e.type=="touchend"||e.type=="touchcancel"){let i=typeof e.originalEvent>"u"?e:e.originalEvent,o=i.touches[0]||i.changedTouches[0];r={x:o.pageX,y:o.pageY}}else(e.type=="mousedown"||e.type=="mouseup"||e.type=="mousemove"||e.type=="mouseover"||e.type=="mouseout"||e.type=="mouseenter"||e.type=="mouseleave")&&(r={x:e.clientX,y:e.clientY});return r}};P.styles=[b``],l([Ie("#rail")],P.prototype,"_rail",2),l([p({type:Boolean,attribute:"step-label"})],P.prototype,"stepLabel",2),l([p({type:Boolean})],P.prototype,"reverse",2),l([p({type:Number,attribute:"lower-bound"})],P.prototype,"min",1),l([p({type:Number,attribute:"upper-bound"})],P.prototype,"max",1),l([p({type:Number,attribute:"step"})],P.prototype,"step",1),l([A("disabled",{waitUntilFirstUpdate:!0})],P.prototype,"_handleDisabledChange",2),l([A("readonly",{waitUntilFirstUpdate:!0})],P.prototype,"_handleReadonlyChange",2),P=l([g("qti-slider-interaction")],P);var Nt=class extends v{render(){return h`<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(){let t=Array.from(this.firstElementChild?.childNodes??[]).find(e=>e.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","fn","item",t.textContent??"")}catch(e){console.error("custom-operator contains invalid javascript code",e)}}calculate(){let t={variable:r=>this._context?.variables.find(i=>i.identifier===r)?.value??"",correct:r=>this._context?.variables.find(i=>i.identifier===r)?.correctResponse??""},e={getVariable:r=>this._context?.variables.find(i=>i.identifier===r),updateOutcomeVariable:(r,i)=>{this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:r,value:i}}))},updateResponseVariable:(r,i)=>{this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:r,response:i}}))}};return this.operatorFunction(this._context,t,e)}};l([T({context:$,subscribe:!0}),q()],Nt.prototype,"_context",2),Nt=l([g("qti-custom-operator")],Nt);var Pt=class extends v{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-hotspot",{bubbles:!0,composed:!0,cancelable:!1}))}render(){return h` <slot name="drags"></slot> `}};Pt.styles=b`
4346
+ :host {
4347
+ display: flex;
4348
+ user-select: none;
4349
+ position: absolute;
4350
+ }
4351
+ `,Pt=l([g("qti-associable-hotspot")],Pt);var Ye=class extends v{constructor(){super(...arguments);this.tabindex=0}render(){return h` <slot name="drags"></slot>`}};Ye.styles=b`
4352
+ :host {
4353
+ display: flex;
4354
+ user-select: none;
4355
+ }
4356
+ `,l([p({type:Number,reflect:!0})],Ye.prototype,"tabindex",2),Ye=l([g("qti-gap")],Ye);var Ge=class extends v{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){this.setAttribute("slot","drags")}};Ge.styles=b`
4357
+ :host {
4358
+ display: flex;
4359
+ user-select: none;
4360
+ }
4361
+ `,l([p({type:Number,reflect:!0})],Ge.prototype,"tabindex",2),Ge=l([g("qti-gap-img")],Ge);var Ke=class extends Z(v,"qti-gap-text"){constructor(){super(...arguments);this.tabindex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","drags")}render(){return h`<slot></slot>`}};Ke.styles=b`
4362
+ :host {
4363
+ display: inline-flex;
4364
+ user-select: none;
4365
+ }
4366
+ `,l([p({type:Number,reflect:!0})],Ke.prototype,"tabindex",2),Ke=l([g("qti-gap-text")],Ke);var Ze=class extends Z(v,"qti-hotspot-choice"){};Ze.styles=b`
4367
+ :host {
4368
+ display: flex;
4369
+ user-select: none;
4370
+ position: absolute;
4371
+ }
4372
+ `,l([p({attribute:"aria-ordervalue",type:Number,reflect:!0})],Ze.prototype,"order",2),Ze=l([g("qti-hotspot-choice")],Ze);var Ht=class extends Z(v,"qti-hottext"){render(){return h`<div part="ch"><div part="cha"></div></div>
4373
+ <slot></slot> `}};Ht.styles=b`
4374
+ :host {
4375
+ display: flex;
4376
+ user-select: none;
4377
+ }
4378
+ `,Ht=l([g("qti-hottext")],Ht);var Ot=class extends v{static get styles(){return[b`
4379
+ :host {
4380
+ display: block;
4381
+ cursor: pointer;
4382
+ }
4383
+ `]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onSelectInlineChoice),this.dispatchEvent(new CustomEvent("qti-inline-choice-register",{bubbles:!0,composed:!0,cancelable:!1}))}disconnectedCallback(){this.removeEventListener("click",this._onSelectInlineChoice)}render(){return h` <slot></slot> `}_onSelectInlineChoice(){this.dispatchEvent(new CustomEvent("qti-inline-choice-select",{bubbles:!0,cancelable:!1,composed:!0,detail:{identifier:this.identifier}}))}};l([p({type:String})],Ot.prototype,"identifier",2),Ot=l([g("qti-inline-choice")],Ot);var Je=class extends Z(v,"qti-simple-choice"){get checked(){return this.internals.states.has("--checked")}render(){return h`<div part="ch">
4384
+ <div part="cha"></div>
4385
+ </div>
4386
+ ${this.marker?h`<div id="label">${this.marker}</div>`:k}
4387
+ <slot part="slot"></slot> `}};Je.styles=b`
4388
+ :host {
4389
+ display: flex;
4390
+ align-items: center;
4391
+ user-select: none;
4392
+ }
4393
+ slot {
4394
+ width: 100%;
4395
+ display: flex;
4396
+ align-items: center;
4397
+ }
4398
+ [part='ch'] {
4399
+ display: flex;
4400
+ flex-shrink: 0;
4401
+ align-items: center;
4402
+ justify-content: center;
4403
+ }
4404
+ `,l([p({type:String,attribute:!1})],Je.prototype,"marker",2),Je=l([g("qti-simple-choice")],Je);console.log("%cC\xBFTO%cLab%c: qti-components loaded","font-weight:bold; color:green",'font-family: "PT Sans", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',"font-weight:unset");export{Z as ActiveElementMixin,E as Interaction,xr as QtiAnd,I as QtiAssessmentItem,j as QtiAssessmentItemRef,W as QtiAssessmentSection,Ue as QtiAssessmentStimulusRef,Te as QtiAssessmentTest,Pt as QtiAssociableHotspot,je as QtiAssociateInteraction,qr as QtiBaseValue,Fe as QtiChoiceInteraction,gr as QtiCompanionMaterialsInfo,O as QtiConditionExpression,ri as QtiContains,fr as QtiContentBody,ii as QtiCorrect,ae as QtiCustomInteraction,Nt as QtiCustomOperator,We as QtiEndAttemptInteraction,Er as QtiEqual,wr as QtiEqualRounded,C as QtiExpression,H as QtiExtendedTextInteraction,wt as QtiFeedbackBlock,Et as QtiFeedbackInline,Ye as QtiGap,Ge as QtiGapImg,Rt as QtiGapMatchInteraction,Ke as QtiGapText,ie as QtiGraphicAssociateInteraction,Mt as QtiGraphicGapMatchInteraction,Lt as QtiGraphicOrderInteraction,si as QtiGt,oi as QtiGte,Ze as QtiHotspotChoice,$t as QtiHotspotInteraction,Ht as QtiHottext,br as QtiHottextInteraction,Ot as QtiInlineChoice,ve as QtiInlineChoiceInteraction,ni as QtiIsNull,hr as QtiItem,yt as QtiItemBody,qs as QtiItemMixin,yr as QtiLookupOutcomeValue,ai as QtiLt,li as QtiLte,Cr as QtiMapResponse,Be as QtiMapping,ci as QtiMatch,xe as QtiMatchInteraction,Dt as QtiMediaInteraction,di as QtiMember,Ct as QtiModalFeedback,pi as QtiMultiple,hi as QtiNot,ui as QtiOr,le as QtiOrderInteraction,mi as QtiOrdered,J as QtiOutcomeDeclaration,kt as QtiOutcomeProcessing,Zr as QtiOutcomeProcessingProcessor,Se as QtiPortableCustomInteraction,Sr as QtiPositionObjectInteraction,It as QtiPositionObjectStage,St as QtiPrintedVariable,gi as QtiProduct,ur as QtiPrompt,Jr as QtiResponseCondition,ne as QtiResponseDeclaration,Tt as QtiResponseElse,ti as QtiResponseElseIf,At as QtiResponseIf,Ae as QtiResponseProcessing,Q as QtiRubricBlock,te as QtiRule,qe as QtiSelectPointInteraction,Qr as QtiSetOutcomeValue,ei as QtiSetOutcomeValueRule,ye as QtiSimpleAssociableChoice,Je as QtiSimpleChoice,P as QtiSliderInteraction,kr as QtiStringMatch,mr as QtiStylesheet,_r as QtiSubtract,fi as QtiSum,bi as QtiSumExpression,Jt as QtiTest,X as QtiTestPart,ee as QtiTextEntryInteraction,vi as QtiVariable,Ve as TestContainer,ut as TestItemLink,pt as TestNext,ze as TestPagingButtonsStamp,ht as TestPrev,Y as TestView,$ as itemContext,ws as itemContextVariables,Io as qtiAndMixin,No as qtiSubtractMixin};
4405
+ /*! Bundled license information:
4406
+
4407
+ @lit/context/lib/context-request-event.js:
4408
+ (**
4409
+ * @license
4410
+ * Copyright 2021 Google LLC
4411
+ * SPDX-License-Identifier: BSD-3-Clause
4412
+ *)
4413
+
4414
+ @lit/context/lib/create-context.js:
4415
+ (**
4416
+ * @license
4417
+ * Copyright 2021 Google LLC
4418
+ * SPDX-License-Identifier: BSD-3-Clause
4419
+ *)
4420
+
4421
+ @lit/context/lib/controllers/context-consumer.js:
4422
+ (**
4423
+ * @license
4424
+ * Copyright 2021 Google LLC
4425
+ * SPDX-License-Identifier: BSD-3-Clause
4426
+ *)
4427
+
4428
+ @lit/context/lib/value-notifier.js:
4429
+ (**
4430
+ * @license
4431
+ * Copyright 2021 Google LLC
4432
+ * SPDX-License-Identifier: BSD-3-Clause
4433
+ *)
4434
+
4435
+ @lit/context/lib/controllers/context-provider.js:
4436
+ (**
4437
+ * @license
4438
+ * Copyright 2021 Google LLC
4439
+ * SPDX-License-Identifier: BSD-3-Clause
4440
+ *)
4441
+
4442
+ @lit/context/lib/context-root.js:
4443
+ (**
4444
+ * @license
4445
+ * Copyright 2021 Google LLC
4446
+ * SPDX-License-Identifier: BSD-3-Clause
4447
+ *)
4448
+
4449
+ @lit/context/lib/decorators/provide.js:
4450
+ (**
4451
+ * @license
4452
+ * Copyright 2017 Google LLC
4453
+ * SPDX-License-Identifier: BSD-3-Clause
4454
+ *)
4455
+
4456
+ @lit/context/lib/decorators/consume.js:
4457
+ (**
4458
+ * @license
4459
+ * Copyright 2022 Google LLC
4460
+ * SPDX-License-Identifier: BSD-3-Clause
4461
+ *)
4462
+
4463
+ @lit-labs/ssr-dom-shim/lib/element-internals.js:
4464
+ (**
4465
+ * @license
4466
+ * Copyright 2023 Google LLC
4467
+ * SPDX-License-Identifier: BSD-3-Clause
4468
+ *)
4469
+
4470
+ @lit-labs/ssr-dom-shim/index.js:
4471
+ (**
4472
+ * @license
4473
+ * Copyright 2019 Google LLC
4474
+ * SPDX-License-Identifier: BSD-3-Clause
4475
+ *)
4476
+
4477
+ @lit/reactive-element/node/css-tag.js:
4478
+ (**
4479
+ * @license
4480
+ * Copyright 2019 Google LLC
4481
+ * SPDX-License-Identifier: BSD-3-Clause
4482
+ *)
4483
+
4484
+ lit-html/node/lit-html.js:
4485
+ (**
4486
+ * @license
4487
+ * Copyright 2017 Google LLC
4488
+ * SPDX-License-Identifier: BSD-3-Clause
4489
+ *)
4490
+
4491
+ lit-element/lit-element.js:
4492
+ (**
4493
+ * @license
4494
+ * Copyright 2017 Google LLC
4495
+ * SPDX-License-Identifier: BSD-3-Clause
4496
+ *)
4497
+
4498
+ lit-html/node/is-server.js:
4499
+ (**
4500
+ * @license
4501
+ * Copyright 2022 Google LLC
4502
+ * SPDX-License-Identifier: BSD-3-Clause
4503
+ *)
4504
+
4505
+ @lit/reactive-element/node/decorators/custom-element.js:
4506
+ (**
4507
+ * @license
4508
+ * Copyright 2017 Google LLC
4509
+ * SPDX-License-Identifier: BSD-3-Clause
4510
+ *)
4511
+
4512
+ @lit/reactive-element/node/decorators/property.js:
4513
+ (**
4514
+ * @license
4515
+ * Copyright 2017 Google LLC
4516
+ * SPDX-License-Identifier: BSD-3-Clause
4517
+ *)
4518
+
4519
+ @lit/reactive-element/node/decorators/state.js:
4520
+ (**
4521
+ * @license
4522
+ * Copyright 2017 Google LLC
4523
+ * SPDX-License-Identifier: BSD-3-Clause
4524
+ *)
4525
+
4526
+ @lit/reactive-element/node/decorators/event-options.js:
4527
+ (**
4528
+ * @license
4529
+ * Copyright 2017 Google LLC
4530
+ * SPDX-License-Identifier: BSD-3-Clause
4531
+ *)
4532
+
4533
+ @lit/reactive-element/node/decorators/base.js:
4534
+ (**
4535
+ * @license
4536
+ * Copyright 2017 Google LLC
4537
+ * SPDX-License-Identifier: BSD-3-Clause
4538
+ *)
4539
+
4540
+ @lit/reactive-element/node/decorators/query.js:
4541
+ (**
4542
+ * @license
4543
+ * Copyright 2017 Google LLC
4544
+ * SPDX-License-Identifier: BSD-3-Clause
4545
+ *)
4546
+
4547
+ @lit/reactive-element/node/decorators/query-all.js:
4548
+ (**
4549
+ * @license
4550
+ * Copyright 2017 Google LLC
4551
+ * SPDX-License-Identifier: BSD-3-Clause
4552
+ *)
4553
+
4554
+ @lit/reactive-element/node/decorators/query-async.js:
4555
+ (**
4556
+ * @license
4557
+ * Copyright 2017 Google LLC
4558
+ * SPDX-License-Identifier: BSD-3-Clause
4559
+ *)
4560
+
4561
+ @lit/reactive-element/node/decorators/query-assigned-elements.js:
4562
+ (**
4563
+ * @license
4564
+ * Copyright 2021 Google LLC
4565
+ * SPDX-License-Identifier: BSD-3-Clause
4566
+ *)
4567
+
4568
+ @lit/reactive-element/node/decorators/query-assigned-nodes.js:
4569
+ (**
4570
+ * @license
4571
+ * Copyright 2017 Google LLC
4572
+ * SPDX-License-Identifier: BSD-3-Clause
4573
+ *)
4574
+
4575
+ lit-html/node/directive-helpers.js:
4576
+ (**
4577
+ * @license
4578
+ * Copyright 2020 Google LLC
4579
+ * SPDX-License-Identifier: BSD-3-Clause
4580
+ *)
4581
+
4582
+ lit-html/node/directive.js:
4583
+ (**
4584
+ * @license
4585
+ * Copyright 2017 Google LLC
4586
+ * SPDX-License-Identifier: BSD-3-Clause
4587
+ *)
4588
+
4589
+ lit-html/node/async-directive.js:
4590
+ (**
4591
+ * @license
4592
+ * Copyright 2017 Google LLC
4593
+ * SPDX-License-Identifier: BSD-3-Clause
4594
+ *)
4595
+
4596
+ lit-html/node/directives/private-async-helpers.js:
4597
+ (**
4598
+ * @license
4599
+ * Copyright 2021 Google LLC
4600
+ * SPDX-License-Identifier: BSD-3-Clause
4601
+ *)
4602
+
4603
+ lit-html/node/directives/until.js:
4604
+ (**
4605
+ * @license
4606
+ * Copyright 2017 Google LLC
4607
+ * SPDX-License-Identifier: BSD-3-Clause
4608
+ *)
4609
+
4610
+ jexpr/lib/constants.js:
4611
+ (*
4612
+ * @license
4613
+ * Portions Copyright (c) 2013, the Dart project authors.
4614
+ *)
4615
+
4616
+ jexpr/lib/tokenizer.js:
4617
+ (*
4618
+ * @license
4619
+ * Portions Copyright (c) 2013, the Dart project authors.
4620
+ *)
4621
+
4622
+ jexpr/lib/parser.js:
4623
+ (*
4624
+ * @license
4625
+ * Portions Copyright (c) 2013, the Dart project authors.
4626
+ *)
4627
+
4628
+ jexpr/lib/ast_factory.js:
4629
+ (*
4630
+ * @license
4631
+ * Portions Copyright (c) 2013, the Dart project authors.
4632
+ *)
4633
+
4634
+ jexpr/lib/eval.js:
4635
+ (*
4636
+ * @license
4637
+ * Portions Copyright (c) 2013, the Dart project authors.
4638
+ *)
4639
+
4640
+ lit-html/node/private-ssr-support.js:
4641
+ (**
4642
+ * @license
4643
+ * Copyright 2019 Google LLC
4644
+ * SPDX-License-Identifier: BSD-3-Clause
4645
+ *)
4646
+
4647
+ lit-html/node/directives/if-defined.js:
4648
+ (**
4649
+ * @license
4650
+ * Copyright 2018 Google LLC
4651
+ * SPDX-License-Identifier: BSD-3-Clause
4652
+ *)
4653
+
4654
+ lit-html/node/directives/ref.js:
4655
+ (**
4656
+ * @license
4657
+ * Copyright 2020 Google LLC
4658
+ * SPDX-License-Identifier: BSD-3-Clause
4659
+ *)
4660
+
4661
+ lit-html/node/directives/unsafe-html.js:
4662
+ (**
4663
+ * @license
4664
+ * Copyright 2017 Google LLC
4665
+ * SPDX-License-Identifier: BSD-3-Clause
4666
+ *)
4667
+
4668
+ lit-html/node/directives/repeat.js:
4669
+ (**
4670
+ * @license
4671
+ * Copyright 2017 Google LLC
4672
+ * SPDX-License-Identifier: BSD-3-Clause
4673
+ *)
4674
+
4675
+ lit-html/node/directives/style-map.js:
4676
+ (**
4677
+ * @license
4678
+ * Copyright 2018 Google LLC
4679
+ * SPDX-License-Identifier: BSD-3-Clause
4680
+ *)
4681
+ */