labmaker-plugin 0.0.369 → 0.0.370
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/dist/labmaker-plugin.js
CHANGED
|
@@ -1358,7 +1358,7 @@ const ju = {
|
|
|
1358
1358
|
return this.stepperStore.getShowFeedbackAttempts;
|
|
1359
1359
|
},
|
|
1360
1360
|
imageSrc() {
|
|
1361
|
-
return this.content.quiz_image.src.slice(-3) === "gif" ? `${this.content.quiz_image.src}?src=${Math.round(Math.random() * Date.now())}` : this.content.src;
|
|
1361
|
+
return this.content.quiz_image.src.slice(-3) === "gif" ? `${this.content.quiz_image.src}?src=${Math.round(Math.random() * Date.now())}` : this.content.quiz_image.src;
|
|
1362
1362
|
}
|
|
1363
1363
|
},
|
|
1364
1364
|
methods: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(n,M0){typeof exports=="object"&&typeof module<"u"?module.exports=M0(require("vue")):typeof define=="function"&&define.amd?define(["vue"],M0):(n=typeof globalThis<"u"?globalThis:n||self,n.LabmakerPlugin=M0(n.Vue))})(this,function(n){"use strict";const M0="",P=(A,c)=>{const e=A.__vccOpts||A;for(const[t,l]of c)e[t]=l;return e},ii={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(A){const e=A.target.files[0];this.fileProcess(e)},fileProcess(A){this.imgSRC=URL.createObjectURL(A)}},mounted(){}},fi={class:"image-uploader"},mi={class:"your-file"},ui=["src"];function pi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock(n.Fragment,null,[c[2]||(c[2]=n.createElementVNode("h1",null,"File Uploader",-1)),n.createElementVNode("div",fi,[c[1]||(c[1]=n.createElementVNode("h1",null,"File Uploader",-1)),n.createElementVNode("input",{onChange:c[0]||(c[0]=(...a)=>s.fileUpload&&s.fileUpload(...a)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),n.createElementVNode("div",mi,[n.createElementVNode("img",{src:l.imgSRC,alt:"",scrset:""},null,8,ui)])])],64)}const di=P(ii,[["render",pi]]),i22="",hi={props:["title"],data(){return{}},computed:{}};function gi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("header",null,[n.createElementVNode("h1",null,n.toDisplayString(e.title),1)])}const Ci=P(hi,[["render",gi]]),f22="",Bi={props:["content","image"],data(){return{}},computed:{imageSrc(){return this.content.src.slice(-3)==="gif"?`${this.content.src}?src=${Math.round(Math.random()*Date.now())}`:this.content.src}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)}},mounted(){var A;(A=this.image)!=null&&A.supportImage||this.stepperStore.finishSteps()},beforeMount(){this.stepperStore=this.stepperMain()}},Li={class:"image-container"},zi={class:"image"},Mi=["src","alt"],wi=["innerHTML"],Qi=["innerHTML"],xi=["innerHTML"];function Fi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",Li,[n.createElementVNode("div",zi,[n.createElementVNode("img",{src:s.imageSrc,alt:e.content.alt,class:n.normalizeClass(e.content.class)},null,10,Mi),e.content.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.captionHeader},null,8,wi)):n.createCommentVNode("",!0),e.content.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.caption},null,8,Qi)):n.createCommentVNode("",!0),e.content.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.copyright,class:"copyright"},null,8,xi)):n.createCommentVNode("",!0)])])}const yi=P(Bi,[["render",Fi],["__scopeId","data-v-3cf7df18"]]),m22="",bi={props:["content"],data(){return{showGif:!1,showPause:!1,tempGif:"",tempImage:"",alphanum:"",imgWidth:"",imgHeight:""}},computed:{altText(){return!this.content.altText&&this.content.textVersion?"Select text version for a more detailed description.":this.content.altText},imageSrc(){return this.content.src},pngImageSrc(){return!this.tempImage||this.tempImage===" "?this.content.posterSrc?this.content.posterSrc:"//cdn.flvs.net/course_view/1_0/dist/images/placeholder.png":this.tempImage}},methods:{process(){this.tempGif=document.getElementById("giffyGif_"+this.alphanum),this.tempGif.onload=()=>{this.imgHeight=this.tempGif.height,this.imgWidth=this.tempGif.width;let A=document.createElement("canvas");A.width=this.imgWidth,A.height=this.imgHeight,A.getContext("2d").drawImage(this.tempGif,0,0),this.tempImage=A.toDataURL("image/png")}},playGif(){this.showGif=!this.showGif,this.content.animDuration&&this.showGif&&setTimeout(()=>{this.showGif=!1},this.content.animDuration),this.stepperStore.finishSteps()},pauseGif(){this.showGif&&(this.showPause=!0)},pauseGifHide(){this.showPause=!1},updateGifSize(){let A=document.getElementById("giffyPng_"+this.alphanum);A.complete?(this.imgWidth=A.width,this.imgHeight=A.height):A.onload=function(){this.imgWidth=A.width,this.imgHeight=A.height,A.onload=null}}},mounted(){this.process()},beforeMount(){this.stepperStore=this.stepperMain(),this.alphanum=Math.random().toString(36).replace("0.","")}},Ui={class:"image-container"},vi={class:"image"},Si=["id","alt","src"],Ni=["id","src","alt"],Ei=["innerHTML"],ki=["innerHTML"],Hi=["innerHTML"];function Ii(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",Ui,[n.createElementVNode("div",vi,[n.createElementVNode("a",{href:"javascript:void(0)","aria-label":"play","aria-hidden":"true",class:"gAnimBg",onMouseover:c[0]||(c[0]=(...a)=>s.pauseGif&&s.pauseGif(...a)),onMouseout:c[1]||(c[1]=(...a)=>s.pauseGifHide&&s.pauseGifHide(...a)),onClick:c[2]||(c[2]=(...a)=>s.playGif&&s.playGif(...a))},[c[3]||(c[3]=n.createElementVNode("span",{class:"screenReaderAlt","aria-hidden":"true"},"Start Animation",-1)),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["playButtonStyles",{dark:e.content.animButton==="dark"}])},[n.createElementVNode("div",{class:n.normalizeClass(["playButtonIconStyles",{dark:e.content.animButton==="dark"}])},null,2)],2),[[n.vShow,l.showGif===!1]]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["pauseButtonStyles",{dark:e.content.animButton==="dark"}])},[n.createElementVNode("div",{class:n.normalizeClass(["pauseButtonIconStyles",{dark:e.content.animButton==="dark"}])},null,2)],2),[[n.vShow,l.showPause]]),n.withDirectives(n.createElementVNode("img",{id:"giffyPng_"+l.alphanum,class:n.normalizeClass(["giffyPng",e.content.class]),alt:s.altText,src:s.pngImageSrc},null,10,Si),[[n.vShow,l.showGif===!1]]),n.withDirectives(n.createElementVNode("img",{id:"giffyGif_"+l.alphanum,src:s.imageSrc,alt:s.altText,class:n.normalizeClass(["giffyGif",e.content.class])},null,10,Ni),[[n.vShow,l.showGif]])],32),e.content.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.captionHeader},null,8,Ei)):n.createCommentVNode("",!0),e.content.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.caption},null,8,ki)):n.createCommentVNode("",!0),e.content.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.copyright,class:"copyright"},null,8,Hi)):n.createCommentVNode("",!0)])])}const Ti=P(bi,[["render",Ii],["__scopeId","data-v-8a2b22b7"]]),u22="",Di={props:["content"],data(){return{showingKaltura:!1,showingText:!1,buttonText:!1,hasText:!1,video:{width:640,height:480},audio:{width:260,height:80},audioBtn:{width:40,height:40},textversionArray:{}}},watch:{content:function(){this.tvCleaner()}},computed:{kHeight(){if(this.content.kalturaType==="video")if(this.content.height&&this.content.height!=""){let A=this.content.height;return A.slice(-2)==="px"?A.slice(0,-2):this.content.height}else return this.video.height;else if(this.content.kalturaType==="audio")if(this.content.height&&this.content.height!=""){let A=this.content.height;return A.slice(-2)==="px"?A.slice(0,-2):this.content.height}else return this.audio.height;else if(this.content.kalturaType==="audiobtn")return this.audioBtn.height},kWidth(){if(this.content.kalturaType==="video")if(this.content.width&&this.content.width!=""){let A=this.content.width;return A.slice(-2)==="px"?A.slice(0,-2):this.content.width}else return this.video.width;else{if(this.content.kalturaType==="audio")return this.audio.width;if(this.content.kalturaType==="audiobtn")return this.audioBtn.width}}},methods:{getButtonText(A){return A==="video"?this.showingText?"Show Video":"Show Text Version":this.showingText?"Show Audio":"Show Text Version"},textVersionCheck(){this.content.textVersion&&this.content.textVersion.length>1&&(this.hasText=!0)},kalturaLoad(){this.textVersionCheck()},kalturaMedia(A){let c={uiconf_id:"54575302",partner_id:"2061901",entry_id:"",height:"400",width:"640",type:"video"};return c.entry_id=this.content.kalturaEntryId,this.content.kalturaType&&(c.type=this.content.kalturaType),c.type==="audio"?c.uiconf_id="54576672":c.type==="audiobtn"?c.uiconf_id="54811142":c.type==="videoNoCC"&&(c.uiconf_id="54575422"),this.content.standalone&&(this.stepperStore.stepHold=!1),`https://cdnapisec.kaltura.com/p/${c.partner_id}/embedPlaykitJs/uiconf_id/${c.uiconf_id}?iframeembed=true&entry_id=${c.entry_id}`},showKaltura(){this.showingKaltura=!0},showText(){this.showingText=!this.showingText,this.buttonText=!this.buttonText},tvCleaner(){let A=document.createElement("div");A.innerHTML=this.content.textVersion;for(let c=0;c<A.children.length;c++){let e=A.children[c];if(e.tagName=="DIV"&&e.className=="panel-default"&&e.children[0].dataset.toggle)for(let t=0;t<e.children.length;t++){let l=e.children[t];if(l.dataset.toggle=="collapse"){let s={heading:l.innerHTML,body:e.children[t+1].innerHTML};this.textversionArray[c]=s}}else this.textversionArray[c]=e.outerHTML}}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("vidText"),this.kalturaLoad(),this.tvCleaner()},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("vidText");setTimeout(()=>{A[0].focus()})}this.stepperStore.finishSteps()}},_i={key:0,class:"textVersion"},Ki=["innerHTML"],Oi=["src","width","height"],Vi=["src","width","height"],Ri=["src","width","height"],Pi={key:2,class:"alert alert-danger"};function Gi(A,c,e,t,l,s){const a=n.resolveComponent("el-button");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["kContainer",e.content.class])},[e.content.textVersion&&l.showingText?(n.openBlock(),n.createElementBlock("div",_i,[c[4]||(c[4]=n.createElementVNode("h1",null,"Text Version",-1)),n.createElementVNode("div",{innerHTML:e.content.textVersion},null,8,Ki)])):n.createCommentVNode("",!0),!l.showingText&&e.content.kalturaEntryId?(n.openBlock(),n.createElementBlock("div",{key:1,class:"mainVersion",style:n.normalizeStyle({width:s.kWidth+"px",height:s.kHeight+"px"})},[e.content.kalturaType=="video"&&!l.showingKaltura?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["kPoster",{active:l.showingKaltura==!0}]),style:n.normalizeStyle({width:s.kWidth+"px",height:s.kHeight+"px"})},[n.createElementVNode("iframe",{onClick:c[0]||(c[0]=(...r)=>s.showKaltura&&s.showKaltura(...r)),class:"videoIframe",src:s.kalturaMedia(e.content),width:s.kWidth+"px",height:s.kHeight+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Oi)],6)):n.createCommentVNode("",!0),e.content.kalturaType=="audio"?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["kAudio",{active:l.showingKaltura==!0}]),onClick:c[1]||(c[1]=(...r)=>s.showKaltura&&s.showKaltura(...r))},[n.createElementVNode("iframe",{id:"my_iframe",src:s.kalturaMedia(e.content),width:s.kWidth+"px",height:s.kHeight+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Vi)],2)):n.createCommentVNode("",!0),e.content.kalturaType=="audiobtn"?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["kAudiobtn",{active:l.showingKaltura==!0}]),onClick:c[2]||(c[2]=(...r)=>s.showKaltura&&s.showKaltura(...r))},[n.createElementVNode("iframe",{src:s.kalturaMedia(e.content),width:l.audioBtn.width+"px",height:l.audioBtn.height+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Ri)],2)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),e.content.kalturaEntryId==""?(n.openBlock(),n.createElementBlock("div",Pi,"There is no Kaltura Entry ID")):n.createCommentVNode("",!0),e.content.textVersion?(n.openBlock(),n.createBlock(a,{key:3,size:"medium",type:"primary","aria-label":"text version",class:"toggleSwitch ftSwitch btn btn-primary vidText",onClick:c[3]||(c[3]=n.withModifiers(r=>s.showText(e.content.kalturaType),["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.getButtonText(e.content.kalturaType)),1)]),_:1})):n.createCommentVNode("",!0)],2)}const Wi=P(Di,[["render",Gi]]),p22="",Xi={props:["content"],data(){return{value1:50,styleObject:{height:"",width:""}}},computed:{dark(){return this.content.dark?"dark":!1},vertical(){return!!this.content.vertical},verticalClass(){return this.content.vertical?"is-vertical":!1},style(){return this.content.vertical?(this.styleObject.height=100-this.value1+"%",this.styleObject.width=""):(this.styleObject.height="",this.styleObject.width=this.value1+"%"),this.styleObject},captionWidth(){return this.value1<=30&&!this.content.vertical?"200px":"100%"}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},updateStartHeight(){return this.content.startHeight&&(this.value1=this.content.startHeight),!1}},mounted(){this.stepperStore.finishSteps(),this.updateStartHeight()},beforeMount(){this.stepperStore=this.stepperMain()}},qi={class:"image-compare"},Yi={class:"image"},Ji=["src","alt"],ji=["innerHTML"],$i=["innerHTML"],Zi=["innerHTML"],Af=["src","alt"],cf={class:"captionAreaRight"},ef=["innerHTML"],tf=["innerHTML"],lf=["innerHTML"];function sf(A,c,e,t,l,s){const a=n.resolveComponent("el-slider");return n.openBlock(),n.createElementBlock("div",qi,[n.createVNode(a,{class:n.normalizeClass(["imageSlide",s.dark]),modelValue:l.value1,"onUpdate:modelValue":c[0]||(c[0]=r=>l.value1=r),step:5,"show-tooltip":!1,vertical:s.vertical},null,8,["class","modelValue","vertical"]),n.createElementVNode("div",Yi,[n.createElementVNode("div",{class:n.normalizeClass(["imageLeft",s.dark,s.verticalClass]),style:n.normalizeStyle(s.style)},[n.createElementVNode("img",{src:e.content.image.srcLeft,alt:e.content.image.altLeft,class:n.normalizeClass(e.content.image.classLeft)},null,10,Ji),n.createElementVNode("div",{class:"captionAreaLeft",style:n.normalizeStyle({width:s.captionWidth})},[e.content.image.captionHeaderLeft?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image.captionHeaderLeft},null,8,ji)):n.createCommentVNode("",!0),e.content.image.captionLeft?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image.captionLeft},null,8,$i)):n.createCommentVNode("",!0),e.content.image.copyrightLeft?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image.copyrightLeft,class:"copyright"},null,8,Zi)):n.createCommentVNode("",!0)],4)],6),n.createElementVNode("img",{class:n.normalizeClass(["imageRight",e.content.image.classRight]),src:e.content.image.srcRight,alt:e.content.image.altRight},null,10,Af),n.createElementVNode("div",cf,[e.content.image.captionHeaderRight?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image.captionHeaderRight},null,8,ef)):n.createCommentVNode("",!0),e.content.image.captionRight?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image.captionRight},null,8,tf)):n.createCommentVNode("",!0),e.content.image.copyrightRight?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image.copyrightRight,class:"copyright"},null,8,lf)):n.createCommentVNode("",!0)])])])}const nf=P(Xi,[["render",sf],["__scopeId","data-v-ca834e68"]]),d22="",af={components:{},inject:["message"],props:["content"],data(){return{dialogVisible:!1,feedbackVisibility:[],feedbackIndex:0}},computed:{},methods:{spotDone(A){var c;return(c=this.stepperStore.getStepPage[A])!=null&&c.completed?"check-done":!1},showSpot(A){var c;if((c=this.stepperStore.getStepPage[A])!=null&&c.testPage){let e=!0;return this.stepperStore.getStepPage.forEach((t,l)=>{t.testPage!==!0&&!t.completed&&(e=!1)}),!!e}return!0},pixelFormat(A){return this.stepperStore.pixelFormat(A)},changePage(A,c){A.pageLink?this.stepperStore.currentPage=A.pageLink:A.feedback&&(this.feedbackIndex=c,this.feedbackVisibility.indexOf(c)===-1&&this.feedbackVisibility.push(c),this.stepperStore.showFeedback=!0,this.content.hotspots.length-1===this.feedbackVisibility.length-1&&this.stepperStore.finishSteps(),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()}))},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)},hotspots(){if(this.stepperStore.randomResults)return this.stepperStore.randomResults;if(this.content.showCount){let A=function(c,e){return[...c].sort(()=>.5-Math.random()).slice(0,e)};if(this.content.showByGroup){let c=[];this.content.hotspots.forEach(t=>{c.indexOf(t.group)===-1&&c.push(t.group)});let e=[];return c.forEach(t=>{let l=this.content.hotspots.filter(s=>s.group===t);e.push(A(l,1)[0])}),this.stepperStore.randomResults=e,e}else{let c=A(this.content.hotspots,this.content.showCount);return this.stepperStore.randomResults=c,c}}else return this.content.hotspots},imgAlt(A,c){return c?"Button Marker "+Number(A+1)+": "+c:"Button Marker "+Number(A+1)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("hotspot");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("hotspot")}},rf={class:"imageMarker"},of=["src","alt"],ff={class:"hotspotArea"},mf=["src","alt"],uf=["innerHTML"],pf={key:1,class:"big_green"};function df(A,c,e,t,l,s){const a=n.resolveComponent("el-button"),r=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",rf,[n.createElementVNode("img",{src:e.content.image,alt:e.content.imageAlt},null,8,of),n.createElementVNode("div",ff,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.hotspots(),(o,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s.showSpot(f)?(n.openBlock(),n.createBlock(a,{key:0,type:o.buttonType,onClick:n.withModifiers(i=>s.changePage(o,f),["stop"]),id:"hotspot_"+f,class:n.normalizeClass([["is-"+o.buttonShape,{noBG:o.buttonImage},o.class,s.spotDone(f)],"hotspot"]),style:n.normalizeStyle({top:s.pixelFormat(o.cordinatesX),left:s.pixelFormat(o.cordinatesY),width:s.pixelFormat(o.dimensionsW),height:s.pixelFormat(o.dimensionsH)}),icon:o.buttonIcon},{default:n.withCtx(()=>[o.buttonImage?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:o.buttonImage,alt:s.imgAlt(f,o.buttonImageAlt)},null,8,mf)):n.createCommentVNode("",!0),n.createElementVNode("span",{class:"im-buttonText",innerHTML:o.name},null,8,uf),s.spotDone(f)?(n.openBlock(),n.createElementBlock("div",pf)):n.createCommentVNode("",!0)]),_:2},1032,["type","onClick","id","class","style","icon"])):n.createCommentVNode("",!0),s.showFeedback(f)?(n.openBlock(),n.createBlock(r,{key:1,content:o},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))])])}const hf=P(af,[["render",df],["__scopeId","data-v-1c0c8a92"]]),h22="",gf={props:["content"],data(){return{imageReplaced:!1,imageSrc:this.content.image,imageAlt:this.content.imageAlt}},computed:{},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},async changeImage(A){this.imageReplaced=!0,this.imageSrc=this.content.hotspots[A].imageOverlay,this.imageAlt=this.content.hotspots[A].imageOverlayAlt,await this.stepperStore.finishSteps(),this.stepperStore.lastPageFocus()}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("instructions");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("instructions")}},Cf=["innerHTML"],Bf=["src","alt"],Lf={class:"hotspotArea"};function zf(A,c,e,t,l,s){const a=n.resolveComponent("el-col"),r=n.resolveComponent("el-button"),o=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(o,{class:"imageReplacer"},{default:n.withCtx(()=>[n.createVNode(a,{span:12},{default:n.withCtx(()=>[n.createElementVNode("p",{class:"imageReplacerDescription",innerHTML:e.content.description},null,8,Cf)]),_:1}),n.createVNode(a,{span:12},{default:n.withCtx(()=>[n.createElementVNode("img",{class:"im-ButtonImage",src:l.imageSrc,alt:l.imageAlt},null,8,Bf),n.createElementVNode("div",Lf,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.hotspots,(f,i)=>(n.openBlock(),n.createBlock(r,{type:f.buttonType,onClick:n.withModifiers(m=>s.changeImage(i),["stop"]),class:"hotspot",style:n.normalizeStyle({top:s.pixelFormat(f.cordinatesX),left:s.pixelFormat(f.cordinatesY),width:s.pixelFormat(f.dimensionsW),height:s.pixelFormat(f.dimensionsH)}),icon:f.buttonIcon},null,8,["type","onClick","style","icon"]))),256))])]),_:1})]),_:1})}const Mf=P(gf,[["render",zf],["__scopeId","data-v-d6c87f03"]]),g22="",wf={props:["content"],data(){return{value1:0,marks:{}}},computed:{dark(){return this.content.dark?"dark":!1},imageCount(){return this.content.image.length-1},vertical(){return!!this.content.vertical},verticalClass(){return this.content.vertical?"is-vertical":!1}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},populateMArks(){this.content.image.forEach((A,c)=>{this.marks[c]=A.mark})}},mounted(){this.stepperStore.finishSteps(),this.populateMArks()},beforeMount(){this.stepperStore=this.stepperMain()}},Qf={class:"image"},xf=["src","alt"],Ff=["innerHTML"],yf=["innerHTML"],bf=["innerHTML"];function Uf(A,c,e,t,l,s){const a=n.resolveComponent("el-slider");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["image-slider",[{verticalSlider:s.vertical},e.content.class]])},[n.createVNode(a,{class:n.normalizeClass(["imageSlide",s.dark]),modelValue:l.value1,"onUpdate:modelValue":c[0]||(c[0]=r=>l.value1=r),"show-tooltip":!1,vertical:s.vertical,step:1,"show-stops":"",max:s.imageCount,marks:l.marks},null,8,["class","modelValue","vertical","max","marks"]),n.createElementVNode("div",Qf,[n.createElementVNode("img",{src:e.content.image[l.value1].src,alt:e.content.image[l.value1].alt,class:n.normalizeClass(e.content.image[l.value1].class)},null,10,xf),n.createElementVNode("div",{class:"captionArea",style:n.normalizeStyle({width:A.captionWidth})},[e.content.image[l.value1].captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image[l.value1].captionHeader},null,8,Ff)):n.createCommentVNode("",!0),e.content.image[l.value1].caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image[l.value1].caption},null,8,yf)):n.createCommentVNode("",!0),e.content.image[l.value1].copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image[l.value1].copyright,class:"copyright"},null,8,bf)):n.createCommentVNode("",!0)],4)])],2)}const vf=P(wf,[["render",Uf],["__scopeId","data-v-87555ec2"]]),C22="",Sf={props:["content"],data(){return{showOverlay:!0}},computed:{overlayButtonText(){return this.showOverlay?"Hide Overlay":"Show Overlay"}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},getSavedImage(){document.getElementById("canvasBlob").appendChild(this.stepperStore.getCanvasImage)}},mounted(){this.getSavedImage(),this.stepperStore.finishSteps()},beforeMount(){this.stepperStore=this.stepperMain()}},Nf={class:"imageCompare"},Ef={class:"hideCompareButtons"};function kf(A,c,e,t,l,s){const a=n.resolveComponent("el-button");return n.openBlock(),n.createElementBlock("div",Nf,[l.showOverlay?(n.openBlock(),n.createElementBlock("div",{key:0,class:"overlay",style:n.normalizeStyle("background: url("+e.content.overlay+")")},null,4)):n.createCommentVNode("",!0),c[1]||(c[1]=n.createElementVNode("div",{id:"canvasBlob"},null,-1)),n.createElementVNode("div",Ef,[n.createVNode(a,{size:"medium",type:"primary",onClick:c[0]||(c[0]=r=>l.showOverlay=!l.showOverlay)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.overlayButtonText),1)]),_:1})])])}const Hf=P(Sf,[["render",kf],["__scopeId","data-v-0f3f694e"]]);var Z4=n.defineComponent({name:"CloseBold"});const If={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Tf=n.createVNode("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"},null,-1);function Df(A,c,e,t,l,s){return n.openBlock(),n.createBlock("svg",If,[Tf])}Z4.render=Df,Z4.__file="packages/components/CloseBold.vue";const _f=Z4;var A3=n.defineComponent({name:"Histogram"});const Kf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Of=n.createVNode("path",{fill:"currentColor",d:"M416 896V128h192v768H416zm-288 0V448h192v448H128zm576 0V320h192v576H704z"},null,-1);function Vf(A,c,e,t,l,s){return n.openBlock(),n.createBlock("svg",Kf,[Of])}A3.render=Vf,A3.__file="packages/components/Histogram.vue";const sA=A3,B22="",Rf={components:{CloseBold:_f},props:["content"],data(){return{show:!0}},computed:{getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},feedbackHeader(){return this.stepperStore.getShowFeedbackAttempts?"Too Many Attempts":this.content.feedbackHeader},feedbackWidth(){return this.content.feedbackWidth?this.content.feedbackWidth:"50%"}},methods:{feedbackClose(){this.content.finalInstructions&&(this.stepperStore.completedDirections[this.stepperStore.currentPage].display=!1),this.content.instructions&&(this.stepperStore.directions[this.stepperStore.currentPage].display=!1),this.content.stepDirections&&(this.stepperStore.stepDirectionsArray[this.stepperStore.stepPage].display=!1),this.stepperStore.showFeedback=!1,this.stepperStore.showFeedbackAttempts=!1,this.stepperStore.lastPageFocus()},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})}},mounted(){this.renderMath()},beforeMount(){var A,c;this.stepperStore=this.stepperMain(),((A=this.content.feedbackContent)==null?void 0:A.type)==="media"&&((c=this.content.feedbackContent.fieldValues)==null?void 0:c.kalturaType)==="video"&&(this.content.feedbackContent.fieldValues.width="480",this.content.feedbackContent.fieldValues.height="360",this.content.feedbackWidth="80%")}},Pf={key:0,class:"el-overlay",style:{"z-index":"5000"}},Gf={"aria-modal":"true",class:"el-overlay-dialog",role:"dialog"},Wf={class:"el-dialog__header"},Xf={class:"my-header"},qf=["id","innerHTML"],Yf={class:"el-dialog__body"},Jf=["innerHTML"],jf={key:1},$f={key:0},Zf=["innerHTML"],Am=["src"],cm=["innerHTML"],em={class:"el-dialog__footer"},tm={class:"dialog-footer"};function lm(A,c,e,t,l,s){var m;const a=n.resolveComponent("CloseBold"),r=n.resolveComponent("el-icon"),o=n.resolveComponent("el-button"),f=n.resolveComponent("lab-kaltura"),i=n.resolveComponent("lab-image");return l.show?(n.openBlock(),n.createElementBlock("div",Pf,[n.createElementVNode("div",Gf,[n.createElementVNode("div",{class:n.normalizeClass(["el-dialog",[((m=e.content.feedbackContent)==null?void 0:m.type)==="media"?"video_dialog":""]]),style:n.normalizeStyle({width:s.feedbackWidth}),tabindex:"-1"},[n.createElementVNode("header",Wf,[n.createElementVNode("div",Xf,[n.createElementVNode("h4",{id:A.titleId,class:n.normalizeClass(["el-dialog__title",A.titleClass]),innerHTML:s.feedbackHeader},null,10,qf)]),n.createVNode(o,{class:"el-dialog__headerbtn",size:"small",type:"primary",onClick:c[0]||(c[0]=n.withModifiers(u=>s.feedbackClose(),["stop"]))},{default:n.withCtx(()=>[n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(a)]),_:1})]),_:1})]),n.createElementVNode("div",Yf,[s.getShowFeedbackAttempts?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[e.content.feedbackAttempts?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.feedbackAttempts},null,8,Jf)):(n.openBlock(),n.createElementBlock("p",jf,"You have tried too many times, the correct answer has been provided for you."))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[e.content.feedbackContent?(n.openBlock(),n.createElementBlock("div",$f,[e.content.feedbackContent.type==="media"?(n.openBlock(),n.createBlock(f,{key:0,content:e.content.feedbackContent.fieldValues,class:n.normalizeClass([e.content.feedbackContent.fieldValues.class,{video:e.content.feedbackContent.fieldValues.kalturaType==="video"}])},null,8,["content","class"])):n.createCommentVNode("",!0),e.content.feedbackContent.type==="image"?(n.openBlock(),n.createBlock(i,{key:1,content:e.content.feedbackContent.fieldValues},null,8,["content"])):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:e.content.feedbackContent.directions},null,8,Zf)])):n.createCommentVNode("",!0),e.content.feedbackImage?(n.openBlock(),n.createElementBlock("img",{key:1,class:"im-ButtonImage",src:e.content.feedbackImage,alt:"button image"},null,8,Am)):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:e.content.feedback},null,8,cm)],64))]),n.createElementVNode("footer",em,[n.createElementVNode("span",tm,[n.createVNode(o,{size:"small",id:"feedbackClose",type:"primary",onClick:c[1]||(c[1]=n.withModifiers(u=>s.feedbackClose(),["stop"]))},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Close",-1)])]),_:1})])])],6)])])):n.createCommentVNode("",!0)}const nA=P(Rf,[["render",lm]]),L22="",sm={components:{},props:["content"],data(){return{quizArray:[],quizOptions:[],quizItemCompleted:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{},value1:""}},watch:{},computed:{quizArrayCount(){return this.quizArray.length-1},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},textResultAnswer(){const A="page",c=this.content.textResultsPage;return this.stepperStore.results.find(l=>l[A]===c).correctAnswer[0]}},methods:{quizArrayCompleted(A){return!(this.quizItemCompleted.includes(A)||A===0)},prepareQuiz(){this.quizArray=this.content.quiz.split("*_").filter(A=>A),this.content.options.forEach((A,c)=>{A.options?A.random?this.quizOptions.push(this.shuffle(A.options)):this.quizOptions.push(A.options):this.quizOptions.push(!1)})},quizType(A){return this.content.options[A]&&this.content.options[A].type?this.content.options[A].type:!1},quizDisplay(A){return this.content.options[A]&&this.content.options[A].display?this.content.options[A].display:"Select"},quizClass(A){return this.content.options[A]&&this.content.options[A].class?this.content.options[A].class:""},shuffle(A){let c=A.length,e;for(;c!=0;)e=Math.floor(Math.random()*c),c--,[A[c],A[e]]=[A[e],A[c]];return A},choicesCheck(){if(this.content.attempts===0||this.getAttempt<this.content.attempts){let A=!0,c=!1;this.input.length===0?this.content.options[0].stopFlow&&(c=!0,this.feedbackObject.feedbackHeader=this.content.options[0].notSelectedHeader,this.feedbackObject.feedback=this.content.options[0].notSelectedBody):this.content.options.forEach((e,t)=>{this.input[t]?this.input[t]!==this.content.options[t].answer&&(A=!1):this.content.options[this.input.length].stopFlow&&(c=!0,this.feedbackObject.feedbackHeader=this.content.options[this.input.length].notSelectedHeader,this.feedbackObject.feedback=this.content.options[this.input.length].notSelectedBody)}),this.stepperStore.attempts=this.getAttempt+1,A===!0&&this.input.length===this.quizArray.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(c||(this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback),this.content.attempts===0&&this.choicesComplete(!0),this.stepperStore.attempts=this.getAttempt+1)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.quizArray.forEach((a,r)=>{this.input[r]?this.input[r]=this.content.options[r].answer:this.input.push(this.content.options[r].answer),c.push(this.content.options[r].answer),this.quizItemCompleted.push(r+1)}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},choicesMade(A){this.quizItemCompleted.includes(A+1)===!1&&this.quizItemCompleted.push(A+1)},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.prepareQuiz(),this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-input__inner");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-input__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},nm={key:0,class:"textResults"},am=["innerHTML"],rm=["innerHTML"];function om(A,c,e,t,l,s){const a=n.resolveComponent("el-option"),r=n.resolveComponent("el-select"),o=n.resolveComponent("el-date-picker"),f=n.resolveComponent("el-button"),i=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["drop-down",e.content.class])},[e.content.textResults?(n.openBlock(),n.createElementBlock("div",nm,[e.content.textResultsHeader?(n.openBlock(),n.createElementBlock("p",{key:0,class:"textResultsHeader",innerHTML:e.content.textResultsHeader},null,8,am)):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:s.textResultAnswer},null,8,rm),c[1]||(c[1]=n.createElementVNode("hr",null,null,-1))])):n.createCommentVNode("",!0),n.createElementVNode("p",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(m,u)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("span",{class:n.normalizeClass(s.quizClass(u))},[n.createElementVNode("span",{class:n.normalizeClass("quizText quizSection_"+u)},n.toDisplayString(m)+" ",3),s.quizType(u)==="choose"?(n.openBlock(),n.createBlock(r,{key:0,onChange:d=>s.choicesMade(u),modelValue:l.input[u],"onUpdate:modelValue":d=>l.input[u]=d,placeholder:s.quizDisplay(u)},{default:n.withCtx(()=>[s.quizArrayCompleted(u)?n.createCommentVNode("",!0):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(l.quizOptions[u],d=>(n.openBlock(),n.createBlock(a,{key:d,label:d,value:d},null,8,["label","value"]))),128))]),_:2},1032,["onChange","modelValue","onUpdate:modelValue","placeholder"])):n.createCommentVNode("",!0),s.quizType(u)==="date"?(n.openBlock(),n.createBlock(o,{key:1,onChange:d=>s.choicesMade(u),modelValue:l.input[u],"onUpdate:modelValue":d=>l.input[u]=d,type:"date",placeholder:s.quizDisplay(u),format:e.content.options[u].format,"value-format":e.content.options[u].format,disabled:s.quizArrayCompleted(u)},null,8,["onChange","modelValue","onUpdate:modelValue","placeholder","format","value-format","disabled"])):n.createCommentVNode("",!0)],2),c[2]||(c[2]=n.createTextVNode(" ",-1))],64))),256))]),n.createVNode(f,{size:"small",type:"primary",class:"drop-down-submit",onClick:c[0]||(c[0]=m=>s.choicesCheck())},{default:n.withCtx(()=>[...c[3]||(c[3]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const im=P(sm,[["render",om]]),z22="",fm={components:{},props:["content"],data(){return{quizArray:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{},computed:{quizArrayCount(){return this.quizArray.length-1},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{prepareQuiz(){this.quizArray=this.content.quiz.split("*_")},choicesCheck(){this.getAttempt<this.content.attempts?(this.input.forEach((A,c)=>{if(this.content.answers[c]===A)this.correctChoices.includes(c)===!1&&this.correctChoices.push(c);else if(this.correctChoices.includes(c)===!0){let e=this.correctChoices.indexOf(c);this.correctChoices.splice(e,1)}}),this.input.length===0?(this.feedbackObject.feedbackHeader="You did not enter an answer",this.feedbackObject.feedback="Please enter your choice in the input field"):this.correctChoices.length===this.content.answers.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)):(this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1)),this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.input.forEach((a,r)=>{this.input[r]=this.content.answers[r],c.push(this.content.answers[r])}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.prepareQuiz(),this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-input__inner");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-input__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}};function mm(A,c,e,t,l,s){const a=n.resolveComponent("el-input"),r=n.resolveComponent("el-button"),o=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["fill-blank",e.content.class])},[n.createElementVNode("p",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(f,i)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createTextVNode(n.toDisplayString(f),1),i<s.quizArrayCount?(n.openBlock(),n.createBlock(a,{key:0,modelValue:l.input[i],"onUpdate:modelValue":m=>l.input[i]=m,placeholder:"Please input",size:"small"},null,8,["modelValue","onUpdate:modelValue"])):n.createCommentVNode("",!0)],64))),256))]),n.createVNode(r,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=f=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(o,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const um=P(fm,[["render",mm]]),M22="",pm={components:{Feedback:nA},props:["content"],data(){return{quizArray:[],quizArrayInputKeys:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{input:{handler:function(A){},deep:!0}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},imageSrc(){return this.content.quiz_image.src.slice(-3)==="gif"?`${this.content.quiz_image.src}?src=${Math.round(Math.random()*Date.now())}`:this.content.src}},methods:{prepareQuiz(){this.quizArray=this.content.quiz.split("*"),this.quizArray.forEach((A,c)=>{A==="_"&&this.quizArrayInputKeys.push(c),this.input[c]=""})},keyBoardLayout(){let A="";return this.content.keyboard==="geometry"?A=[{label:"123",rows:[[{label:"x",shift:"y"},{label:"s",shift:"m"},{label:"[separator]",width:.5},"7","8","9","[/]",{label:"[separator]",width:.5},"\\frac{#?}{#?}","#@^{#?}","#@_{#?}"],["\\lt","\\gt",{label:"[separator]",width:.5},"4","5","6","[*]",{label:"[separator]",width:.5},"\\sqrt{#?}","\\sqrt[#?]{#?}","\\imaginaryI"],["\\le","\\ge",{label:"[separator]",width:.5},"1","2","3","[-]",{label:"[separator]",width:.5},{label:"\\sin",shift:"\\arcsin"},{label:"\\cos",shift:"\\arccos"},{label:"\\tan",shift:"\\arctan"}],["(",")",{label:"[separator]",width:.5},"0",".","[=]","[+]",{label:"[separator]",width:.5},"\\pi",{label:"[backspace]",width:2}],[{label:"[shift]",width:2},{label:"[separator]",width:.5},"[left]",{label:" ",width:2},"[right]",{label:"[separator]",width:1.5},{label:"[separator]",width:1},{label:"[return]",width:1}]]},"alphabetic"]:this.content.keyboard==="numberpad"&&(A=[{label:"123",rows:[["7","8","9","[/]",{label:"[separator]",width:.5},{label:"[backspace]",width:1}],["4","5","6","[*]",{label:"[separator]",width:.5},"\\frac{#?}{#?}"],["1","2","3","[-]",{label:"[separator]",width:.5},"#@^{#?}"],["0",".","[=]","[+]",{label:"[separator]",width:.5},"#@_{#?}"],["[left]",{label:" ",width:2},"[right]",{label:"[separator]",width:.5},{label:"[return]",width:1}]]}]),A},prepareMathLive(){mathVirtualKeyboard.show(),this.quizArray.forEach((A,c)=>{if(A==="_"){let e=document.getElementById("mf_"+c);e.mathVirtualKeyboardPolicy="sandboxed",e.addEventListener("click",t=>{mathVirtualKeyboard.layouts=this.keyBoardLayout(),mathVirtualKeyboard.show()}),e.addEventListener("focus",t=>{mathVirtualKeyboard.layouts=this.keyBoardLayout(),mathVirtualKeyboard.show()}),e.addEventListener("focusout",t=>{mathVirtualKeyboard.hide()}),e.addEventListener("blur",t=>{mathVirtualKeyboard.hide()}),e.addEventListener("input",t=>{let l=e.getValue();this.input[c]=l,this.renderMath(),e.setValue(l,{silenceNotifications:!0})})}})},choicesCheck(){if(this.getAttempt<this.content.attempts){let A=!0,c=0;this.quizArrayInputKeys.forEach((e,t)=>{if(this.input[e]!==""&&(A=!1),this.content.answers[c]===this.input[e])this.correctChoices.includes(e)===!1&&this.correctChoices.push(e);else if(this.correctChoices.includes(e)===!0){let l=this.correctChoices.indexOf(e);this.correctChoices.splice(l,1)}c++}),A?(this.feedbackObject.feedbackHeader="You did not enter an answer",this.feedbackObject.feedback="Please enter your choice in the input field"):this.correctChoices.length===this.content.answers.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.quizArrayInputKeys.forEach((a,r)=>{this.input[a]=this.content.answers[r],c.push(this.content.answers[r]),document.getElementById("mf_"+a).setValue(this.content.answers[r],{silenceNotifications:!0})}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})},leftColWidth(A){return A?Number(A):12},rightColWidth(A){return A?24-Number(A):A?12:24}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("quizInput");setTimeout(()=>{A[0].focus()})}this.prepareMathLive(),this.renderMath()},beforeMount(){this.prepareQuiz(),this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("quizInput"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},dm=["src","alt"],hm=["innerHTML"],gm=["innerHTML"],Cm=["innerHTML"],Bm=["innerHTML"],Lm={key:0};function zm(A,c,e,t,l,s){const a=n.resolveComponent("el-col"),r=n.resolveComponent("math-field"),o=n.resolveComponent("el-row"),f=n.resolveComponent("el-button"),i=n.resolveComponent("feedback");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(o,{class:n.normalizeClass(["fill-blank",e.content.class])},{default:n.withCtx(()=>{var m;return[e.content.quiz_image?(n.openBlock(),n.createBlock(a,{key:0,span:s.leftColWidth(e.content.quiz_image.colWidth)},{default:n.withCtx(()=>[n.createElementVNode("img",{src:s.imageSrc,alt:e.content.quiz_image.alt,class:n.normalizeClass(e.content.quiz_image.class)},null,10,dm),e.content.quiz_image.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.quiz_image.captionHeader},null,8,hm)):n.createCommentVNode("",!0),e.content.quiz_image.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.quiz_image.caption},null,8,gm)):n.createCommentVNode("",!0),e.content.quiz_image.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.quiz_image.copyright,class:"copyright"},null,8,Cm)):n.createCommentVNode("",!0)]),_:1},8,["span"])):n.createCommentVNode("",!0),n.createVNode(a,{span:s.rightColWidth((m=e.content.quiz_image)==null?void 0:m.colWidth)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(u,d)=>(n.openBlock(),n.createElementBlock("p",null,[u!=="_"?(n.openBlock(),n.createElementBlock("span",{key:0,class:"quizText",innerHTML:u},null,8,Bm)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createVNode(r,{class:"quizInput",id:"mf_"+d,style:{},"default-mode":e.content.mathMode},null,8,["id","default-mode"]),e.content.showLatext?(n.openBlock(),n.createElementBlock("span",Lm,n.toDisplayString(l.input[d]),1)):n.createCommentVNode("",!0)],64))]))),256))]),_:1},8,["span"])]}),_:1},8,["class"]),n.createVNode(f,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=m=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],64)}const Mm=P(pm,[["render",zm]]),w22="",wm={components:{},props:["content"],data(){return{feedbackIndex:-1,totalAttempts:99}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{leftColWidth(){return this.content.leftColWidth?Number(this.content.leftColWidth):12},rightColWidth(){return this.content.leftColWidth?this.content.leftColWidth<24?24-this.content.leftColWidth:24:12},pixelFormat(A){return this.stepperStore.pixelFormat(A)},choicesComplete(A){let c,e="not correct",t=document.querySelectorAll(".selectableButton");for(let r=0;r<t.length;r++)t[r].classList.add("is-failure"),t[r].setAttribute("disabled",!0),this.content.choices[r].correct&&(t[r].classList.add("is-success"),c=this.content.choices[r].text);A&&(e="correct");let l={page:this.stepperStore.stepPage,result:e,correctAnswer:c},s=this.stepperStore.results.find(r=>r.page===this.stepperStore.stepPage),a=this.stepperStore.results.indexOf(s);s?this.stepperStore.results.fill(s.result=e,a,a++):this.stepperStore.results.push(l),this.stepperStore.finishSteps()},choicesCheck(A){this.getAttempt<Number(this.content.attempts)?this.content.choices[A].correct===!0?this.choicesComplete(!0):this.stepperStore.attempts=this.getAttempt+1:(this.content.choices[A].correct!==!0&&(this.stepperStore.showFeedbackAttempts=!0),this.choicesComplete(!1)),this.feedbackIndex=A,this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},shuffledChoices(){let A=this.content.choices;for(let c=A.length-1;c>0;c--){const e=Math.floor(Math.random()*(c+1));[A[c],A[e]]=[A[e],A[c]]}this.content.choices=A},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("selectableButton");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("selectableButton"),this.feedbackIndex=-1,this.content.ordered||this.shuffledChoices(),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Qm=["innerHTML"],xm={class:"selectArea"},Fm={class:"buttonSpan"},ym=["src","alt"],bm={class:"selectable-buttonText"},Um=["innerHTML"],vm={class:"buttonSpan"},Sm=["src","alt"],Nm={class:"selectable-buttonText"};function Em(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("el-divider"),f=n.resolveComponent("el-button"),i=n.resolveComponent("lab-feedback"),m=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(m,{id:e.content.id,class:n.normalizeClass(["selectable",e.content.classes])},{default:n.withCtx(()=>[e.content.image?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(r,{span:s.leftColWidth(A.index)},{default:n.withCtx(()=>[e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0)]),_:1},8,["span"]),n.createVNode(r,{span:s.rightColWidth(A.index)},{default:n.withCtx(()=>[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,Qm)):n.createCommentVNode("",!0),n.createElementVNode("div",xm,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.choices,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[!e.content.noDivider&&d>0?(n.openBlock(),n.createBlock(o,{key:0})):n.createCommentVNode("",!0),n.createVNode(f,{size:"small",type:"primary",class:"selectableButton",style:n.normalizeStyle({width:s.pixelFormat(e.content.choiceWidth),height:s.pixelFormat(e.content.choiceHeight)}),onClick:p=>s.choicesCheck(d)},{default:n.withCtx(()=>[n.createElementVNode("div",Fm,[u.image?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:u.image,alt:u.alt?u.alt:"button image"},null,8,ym)):n.createCommentVNode("",!0),n.createElementVNode("span",bm,n.toDisplayString(u.text),1)])]),_:2},1032,["style","onClick"]),s.showFeedback(d)?(n.openBlock(),n.createBlock(i,{key:1,content:u},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))])]),_:1},8,["span"])],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createVNode(r,{span:12},{default:n.withCtx(()=>[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,Um)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(r,{span:12,class:"selectArea"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.choices,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[!e.content.noDivider&&d>0?(n.openBlock(),n.createBlock(o,{key:0})):n.createCommentVNode("",!0),n.createVNode(f,{size:"small",type:"primary",class:"selectableButton",style:n.normalizeStyle({width:s.pixelFormat(e.content.choiceWidth),height:s.pixelFormat(e.content.choiceHeight)}),onClick:p=>s.choicesCheck(d)},{default:n.withCtx(()=>[n.createElementVNode("div",vm,[u.image?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:u.image,alt:u.alt?u.alt:"button image"},null,8,Sm)):n.createCommentVNode("",!0),n.createElementVNode("span",Nm,n.toDisplayString(u.text),1)])]),_:2},1032,["style","onClick"]),s.showFeedback(d)?(n.openBlock(),n.createBlock(i,{key:1,content:u},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))]),_:1})],64))]),_:1},8,["id","class"])}const km=P(wm,[["render",Em],["__scopeId","data-v-a874847a"]]),Q22="",Hm={components:{},props:["content"],data(){return{input:"",totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{choicesCheck(){if(this.content.noGrade)this.choicesComplete(!0,this.input),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback;else if(this.getAttempt<this.content.attempts){let A=!1;this.content.answers.forEach((c,e)=>{let t=c.toLowerCase();this.input.toLowerCase().includes(t)||(A=!0)}),A?(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback):(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A,c){let e=[],t="not correct";this.content.noGrade?e.push(c):this.content.answers.forEach(r=>{e.push(r)}),A&&(t="correct");let l={page:this.stepperStore.stepPage,result:t,correctAnswer:e},s=this.stepperStore.results.find(r=>r.page===this.stepperStore.stepPage),a=this.stepperStore.results.indexOf(s);s?this.stepperStore.results.fill(s.result=t,a,a++):this.stepperStore.results.push(l),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-textarea__inner");setTimeout(()=>{A[0].focus()})}this.content.input&&(this.input=this.content.input,this.choicesComplete(!0,this.content.input),this.stepperStore.finishSteps()),this.renderMath()},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-textarea__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Im=["innerHTML"];function Tm(A,c,e,t,l,s){const a=n.resolveComponent("el-input"),r=n.resolveComponent("el-button"),o=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["textbox",e.content.class])},[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,Im),n.createVNode(a,{modelValue:l.input,"onUpdate:modelValue":c[0]||(c[0]=f=>l.input=f),autosize:{minRows:4,maxRows:8},type:"textarea",placeholder:"Please input"},null,8,["modelValue"]),this.content.input?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(r,{key:0,size:"small",type:"primary",class:"fill-blank-submit",onClick:c[1]||(c[1]=f=>s.choicesCheck())},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Submit",-1)])]),_:1})),s.showFeedback()?(n.openBlock(),n.createBlock(o,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const Dm=P(Hm,[["render",Tm]]),x22="",_m={components:{},props:["content"],data(){return{quizArray:[],quizOptions:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{},value1:"",showMenuOverlay:!1}},watch:{},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{showSub(A){let c=document.getElementById(A);c.classList.contains("jl-menu-sub_show")?(this.showMenuOverlay=!1,this.hideSubs()):(this.showMenuOverlay=!0,c.classList.add("jl-menu-sub_show"))},showSubSub(A){let c=document.getElementById(A);c.classList.contains("jl-menu-sub-sub_show")?(this.showMenuOverlay=!1,this.hideSubs()):(this.showMenuOverlay=!0,c.classList.add("jl-menu-sub-sub_show"))},hideSubs(){this.showMenuOverlay=!1;let A=document.getElementsByClassName("jl-menu-sub_show");for(;A.length>0;)A[0].classList.remove("jl-menu-sub_show");let c=document.getElementsByClassName("jl-menu-sub-sub_show");for(;c.length>0;)c[0].classList.remove("jl-menu-sub-sub_show")},choicesCheck(A){this.hideSubs();let c=!1,e="";if(this.getAttempt<this.content.attempts){if(console.log("got some left"),typeof A=="string"){let t=A.split("-");t.forEach((l,s)=>{t[s]=Number(l)}),t.length===2?this.content.menu[t[0]].subMenu[t[1]].correct&&(this.content.menu[t[0]].subMenu[t[1]].page&&(e=this.content.menu[t[0]].subMenu[t[1]].page),c=!0):t.length===3&&this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].correct&&(this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].page&&(e=this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].page),c=!0)}else this.content.menu[A].correct&&(this.content.menu[A].page&&(e=this.content.menu[A].page),c=!0);c?(this.choicesComplete(e),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)}else this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.feedbackAttempts,this.choicesComplete();e===""&&(this.stepperStore.showFeedback=!0),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){this.stepperStore.finishSteps(),typeof A<"u"&&A!==""&&(this.stepperStore.currentPage=A)},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){this.stepperStore.getDirections.display===!1&&(document.getElementsByClassName("jl-menu-sub"),setTimeout(()=>{}))},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("jl-menu-sub"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Km={key:0},Om=["index","onClick"],Vm={class:"jl-menu-sub__title"},Rm=["id"],Pm=["index","onClick"],Gm={class:"jl-menu-sub-sub__title"},Wm=["id"],Xm=["index","onClick"],qm=["onClick"],Ym={key:1,class:"jl-menu-item"},Jm=["index","onClick"];function jm(A,c,e,t,l,s){const a=n.resolveComponent("CaretBottom"),r=n.resolveComponent("el-icon"),o=n.resolveComponent("CaretRight"),f=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["menu-chooser",e.content.class])},[l.showMenuOverlay?(n.openBlock(),n.createElementBlock("div",{key:0,class:"nav-mask",onClick:c[0]||(c[0]=(...i)=>s.hideSubs&&s.hideSubs(...i))})):n.createCommentVNode("",!0),n.createElementVNode("p",null,n.toDisplayString(e.content.quiz),1),n.createElementVNode("div",{class:"jl-menu",onSelect:c[1]||(c[1]=(...i)=>s.choicesCheck&&s.choicesCheck(...i))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.menu,(i,m)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[i.subMenu?(n.openBlock(),n.createElementBlock("div",Km,[n.createElementVNode("button",{class:n.normalizeClass("jl-menu-sub sub-"+m),index:m,tabindex:"0",role:"menuitem",onClick:n.withModifiers(u=>s.showSub("sub-"+m),["stop"])},[n.createElementVNode("div",Vm,[n.createTextVNode(n.toDisplayString(i.name)+" ",1),n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(a)]),_:1})])],10,Om),n.createElementVNode("div",{class:"jl-menu-sub-menu",id:"sub-"+m},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.subMenu,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[u.subMenu?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("button",{class:n.normalizeClass("jl-menu-sub-sub sub-sub-"+d),index:m+"-"+d,tabindex:"0",role:"menuitem",onClick:n.withModifiers(p=>s.showSubSub("sub-sub-"+m),["stop"])},[n.createElementVNode("div",Gm,[n.createTextVNode(n.toDisplayString(u.name),1),n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(o)]),_:1})])],10,Pm),n.createElementVNode("div",{class:"jl-menu-sub-sub-menu",id:"sub-sub-"+m},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.subMenu,(p,h)=>(n.openBlock(),n.createElementBlock("button",{class:"jl-menu-sub-sub-item",index:m+"-"+d+"-"+h,tabindex:"0",role:"menuitem",onClick:n.withModifiers(B=>s.choicesCheck(m+"-"+d+"-"+h),["stop"])},[n.createElementVNode("div",null,n.toDisplayString(p.name),1)],8,Xm))),256))],8,Wm)],64)):(n.openBlock(),n.createElementBlock("button",{key:1,class:"jl-menu-sub-item",tabindex:"0",role:"menuitem",onClick:n.withModifiers(p=>s.choicesCheck(m+"-"+d),["stop"])},[n.createElementVNode("div",null,n.toDisplayString(u.name),1)],8,qm))],64))),256))],8,Rm)])):(n.openBlock(),n.createElementBlock("div",Ym,[n.createElementVNode("button",{class:"jl-menu-sub",index:m,tabindex:"0",role:"menuitem",onClick:n.withModifiers(u=>s.choicesCheck(m),["stop"])},n.toDisplayString(i.name),9,Jm)]))],64))),256))],32),s.showFeedback()?(n.openBlock(),n.createBlock(f,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const $m=P(_m,[["render",jm]]),F22="",Zm={components:{},props:["content"],data(){return{feedbackIndex:-1,totalAttempts:99,selected:[],correctChoices:[],feedbackObject:{}}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{createCorrectChoices(){for(let A=0;A<this.content.options.length;A++)this.content.options[A].isCorrect===!0&&this.correctChoices.push(A)},pixelFormat(A){return this.stepperStore.pixelFormat(A)},choicesComplete(A){let c="not correct";A&&(c="correct");let e={page:this.stepperStore.stepPage,result:c,correctAnswer:this.correctChoices},t=this.stepperStore.results.find(s=>s.page===this.stepperStore.stepPage),l=this.stepperStore.results.indexOf(t);t?this.stepperStore.results.fill(t.result=c,l,l++):this.stepperStore.results.push(e),this.stepperStore.finishSteps()},choicesMark(A){this.selected.includes(A)?this.selected=this.selected.filter(c=>c!==A):this.selected.push(A)},choicesCheck(A){function c(e,t){if(e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}this.getAttempt<Number(this.content.attempts)?c(this.selected,this.correctChoices)?(this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback,this.choicesComplete(!0)):(this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback,this.stepperStore.attempts=this.getAttempt+1):(c(this.selected,this.correctChoices)||(this.stepperStore.showFeedbackAttempts=!0,this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.selected=this.correctChoices),this.choicesComplete(!1)),this.feedbackIndex=A,this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("selectableButton");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("selectableButton"),this.feedbackIndex=-1,this.content.attempts&&(this.totalAttempts=this.content.attempts),this.createCorrectChoices()}},Au=["innerHTML"],cu={class:"multiSentance"},eu=["innerHTML","onClick"],tu=["innerHTML"];function lu(A,c,e,t,l,s){const a=n.resolveComponent("el-button"),r=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["textbox",e.content.class])},[n.createElementVNode("p",{innerHTML:e.content.quiz},null,8,Au),n.createElementVNode("div",cu,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.options,(o,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[o.button?(n.openBlock(),n.createElementBlock("a",{key:0,role:"button",class:n.normalizeClass(["multiSentanceButton el-button",{"el-button--success":l.selected.includes(f),"el-button--primary":!l.selected.includes(f)}]),innerHTML:o.content,tabindex:"1",onClick:i=>s.choicesMark(f),href:"javascript:void(0)"},null,10,eu)):(n.openBlock(),n.createElementBlock("span",{key:1,innerHTML:o.content},null,8,tu))],64))),256))]),n.createVNode(a,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=o=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(r,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const su=P(Zm,[["render",lu],["__scopeId","data-v-38862b63"]]),y22="",aA={y:{t:"top",m:"marginTop",b:"bottom"},x:{l:"left",m:"marginLeft",r:"right"}};function nu(A){A.forEach((c,e)=>{document.documentElement.addEventListener(e,c)})}function au(A){A.forEach((c,e)=>{document.documentElement.removeEventListener(e,c)})}const ru={name:"vue-drag-resize",emits:["clicked","dragging","dragstop","resizing","resizestop","activated","deactivated"],props:{stickSize:{type:Number,default:8},parentScaleX:{type:Number,default:1},parentScaleY:{type:Number,default:1},isActive:{type:Boolean,default:!1},preventActiveBehavior:{type:Boolean,default:!1},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},aspectRatio:{type:Boolean,default:!1},parentLimitation:{type:Boolean,default:!1},snapToGrid:{type:Boolean,default:!1},gridX:{type:Number,default:50,validator(A){return A>=0}},gridY:{type:Number,default:50,validator(A){return A>=0}},parentW:{type:Number,default:0,validator(A){return A>=0}},parentH:{type:Number,default:0,validator(A){return A>=0}},w:{type:[String,Number],default:200,validator(A){return typeof A=="string"?A==="auto":A>=0}},h:{type:[String,Number],default:200,validator(A){return typeof A=="string"?A==="auto":A>=0}},minw:{type:Number,default:50,validator(A){return A>=0}},minh:{type:Number,default:50,validator(A){return A>=0}},x:{type:Number,default:0,validator(A){return typeof A=="number"}},y:{type:Number,default:0,validator(A){return typeof A=="number"}},z:{type:[String,Number],default:"auto",validator(A){return typeof A=="string"?A==="auto":A>=0}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},sticks:{type:Array,default(){return["tl","tm","tr","mr","br","bm","bl","ml"]}},axis:{type:String,default:"both",validator(A){return["x","y","both","none"].indexOf(A)!==-1}},contentClass:{type:String,required:!1,default:""}},data(){return{fixAspectRatio:null,active:null,zIndex:null,parentWidth:null,parentHeight:null,left:null,top:null,right:null,bottom:null,minHeight:null}},beforeCreate(){this.stickDrag=!1,this.bodyDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.currentStick=null},mounted(){this.parentElement=this.$el.parentNode,this.parentWidth=this.parentW?this.parentW:this.parentElement.clientWidth,this.parentHeight=this.parentH?this.parentH:this.parentElement.clientHeight,this.left=this.x,this.top=this.y,this.right=this.parentWidth-(this.w==="auto"?this.$refs.container.scrollWidth:this.w)-this.left,this.bottom=this.parentHeight-(this.h==="auto"?this.$refs.container.scrollHeight:this.h)-this.top,this.domEvents=new Map([["mousemove",this.move],["mouseup",this.up],["mouseleave",this.up],["mousedown",this.deselect],["touchmove",this.move],["touchend",this.up],["touchcancel",this.up],["touchstart",this.up]]),nu(this.domEvents),this.dragHandle&&[...this.$el.querySelectorAll(this.dragHandle)].forEach(A=>{A.setAttribute("data-drag-handle",this._uid)}),this.dragCancel&&[...this.$el.querySelectorAll(this.dragCancel)].forEach(A=>{A.setAttribute("data-drag-cancel",this._uid)})},beforeUnmount(){au(this.domEvents)},methods:{deselect(){this.preventActiveBehavior||(this.active=!1)},move(A){if(!this.stickDrag&&!this.bodyDrag)return;A.stopPropagation();const c=typeof A.pageX<"u"?A.pageX:A.touches[0].pageX,e=typeof A.pageY<"u"?A.pageY:A.touches[0].pageY,{dimensionsBeforeMove:t}=this,l={x:(t.pointerX-c)/this.parentScaleX,y:(t.pointerY-e)/this.parentScaleY};if(this.stickDrag&&this.stickMove(l),this.bodyDrag){if(this.axis==="x")l.y=0;else if(this.axis==="y")l.x=0;else if(this.axis==="none")return;this.bodyMove(l)}},up(A){this.stickDrag?this.stickUp(A):this.bodyDrag&&this.bodyUp(A)},bodyDown(A){const{target:c,button:e}=A;if(this.preventActiveBehavior||(this.active=!0),e&&e!==0||(this.$emit("clicked",A),!this.active)||this.dragHandle&&c.getAttribute("data-drag-handle")!==this._uid.toString()||this.dragCancel&&c.getAttribute("data-drag-cancel")===this._uid.toString())return;typeof A.stopPropagation<"u"&&A.stopPropagation(),typeof A.preventDefault<"u"&&A.preventDefault(),this.isDraggable&&(this.bodyDrag=!0);const t=typeof A.pageX<"u"?A.pageX:A.touches[0].pageX,l=typeof A.pageY<"u"?A.pageY:A.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:t,pointerY:l}),this.parentLimitation&&(this.limits=this.calcDragLimitation())},bodyMove(A){const{dimensionsBeforeMove:c,parentWidth:e,parentHeight:t,gridX:l,gridY:s,width:a,height:r}=this;let o=c.top-A.y,f=c.bottom+A.y,i=c.left-A.x,m=c.right+A.x;if(this.snapToGrid){let u=!0,d=!0,p=o-Math.floor(o/s)*s,h=t-f-Math.floor((t-f)/s)*s,B=i-Math.floor(i/l)*l,C=e-m-Math.floor((e-m)/l)*l;p>s/2&&(p-=s),h>s/2&&(h-=s),B>l/2&&(B-=l),C>l/2&&(C-=l),Math.abs(h)<Math.abs(p)&&(u=!1),Math.abs(C)<Math.abs(B)&&(d=!1),o-=u?p:h,f=t-r-o,i-=d?B:C,m=e-a-i}({newLeft:this.left,newRight:this.right,newTop:this.top,newBottom:this.bottom}=this.rectCorrectionByLimit({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.$emit("dragging",this.rect)},bodyUp(){this.bodyDrag=!1,this.$emit("dragging",this.rect),this.$emit("dragstop",this.rect),this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}}},stickDown(A,c,e=!1){if((!this.isResizable||!this.active)&&!e)return;this.stickDrag=!0;const t=typeof c.pageX<"u"?c.pageX:c.touches[0].pageX,l=typeof c.pageY<"u"?c.pageY:c.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:t,pointerY:l}),this.currentStick=A,this.limits=this.calcResizeLimits()},saveDimensionsBeforeMove({pointerX:A,pointerY:c}){this.dimensionsBeforeMove.pointerX=A,this.dimensionsBeforeMove.pointerY=c,this.dimensionsBeforeMove.left=this.left,this.dimensionsBeforeMove.right=this.right,this.dimensionsBeforeMove.top=this.top,this.dimensionsBeforeMove.bottom=this.bottom,this.dimensionsBeforeMove.width=this.width,this.dimensionsBeforeMove.height=this.height,this.aspectFactor=this.width/this.height},stickMove(A){const{currentStick:c,dimensionsBeforeMove:e,gridY:t,gridX:l,snapToGrid:s,parentHeight:a,parentWidth:r}=this;let o=e.top,f=e.bottom,i=e.left,m=e.right;switch(c[0]){case"b":f=e.bottom+A.y,s&&(f=a-Math.round((a-f)/t)*t);break;case"t":o=e.top-A.y,s&&(o=Math.round(o/t)*t);break}switch(c[1]){case"r":m=e.right+A.x,s&&(m=r-Math.round((r-m)/l)*l);break;case"l":i=e.left-A.x,s&&(i=Math.round(i/l)*l);break}({newLeft:i,newRight:m,newTop:o,newBottom:f}=this.rectCorrectionByLimit({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.aspectRatio&&({newLeft:i,newRight:m,newTop:o,newBottom:f}=this.rectCorrectionByAspectRatio({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.left=i,this.right=m,this.top=o,this.bottom=f,this.$emit("resizing",this.rect)},stickUp(){this.stickDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.$emit("resizing",this.rect),this.$emit("resizestop",this.rect)},calcDragLimitation(){const{parentWidth:A,parentHeight:c}=this;return{left:{min:0,max:A-this.width},right:{min:0,max:A-this.width},top:{min:0,max:c-this.height},bottom:{min:0,max:c-this.height}}},calcResizeLimits(){const{aspectFactor:A,width:c,height:e,bottom:t,top:l,left:s,right:a}=this;let{minh:r,minw:o}=this;const f=this.parentLimitation?0:null;this.aspectRatio&&(o/r>A?r=o/A:o=A*r);const i={left:{min:f,max:s+(c-o)},right:{min:f,max:a+(c-o)},top:{min:f,max:l+(e-r)},bottom:{min:f,max:t+(e-r)}};if(this.aspectRatio){const m={left:{min:s-Math.min(l,t)*A*2,max:s+(e-r)/2*A*2},right:{min:a-Math.min(l,t)*A*2,max:a+(e-r)/2*A*2},top:{min:l-Math.min(s,a)/A*2,max:l+(c-o)/2/A*2},bottom:{min:t-Math.min(s,a)/A*2,max:t+(c-o)/2/A*2}};this.currentStick[0]==="m"?(i.left={min:Math.max(i.left.min,m.left.min),max:Math.min(i.left.max,m.left.max)},i.right={min:Math.max(i.right.min,m.right.min),max:Math.min(i.right.max,m.right.max)}):this.currentStick[1]==="m"&&(i.top={min:Math.max(i.top.min,m.top.min),max:Math.min(i.top.max,m.top.max)},i.bottom={min:Math.max(i.bottom.min,m.bottom.min),max:Math.min(i.bottom.max,m.bottom.max)})}return i},sideCorrectionByLimit(A,c){let e=c;return A.min!==null&&c<A.min?e=A.min:A.max!==null&&A.max<c&&(e=A.max),e},rectCorrectionByLimit(A){const{limits:c}=this;let{newRight:e,newLeft:t,newBottom:l,newTop:s}=A;return t=this.sideCorrectionByLimit(c.left,t),e=this.sideCorrectionByLimit(c.right,e),s=this.sideCorrectionByLimit(c.top,s),l=this.sideCorrectionByLimit(c.bottom,l),{newLeft:t,newRight:e,newTop:s,newBottom:l}},rectCorrectionByAspectRatio(A){let{newLeft:c,newRight:e,newTop:t,newBottom:l}=A;const{parentWidth:s,parentHeight:a,currentStick:r,aspectFactor:o,dimensionsBeforeMove:f}=this;let i=s-c-e,m=a-t-l;if(r[1]==="m"){const u=m-f.height;c-=u*o/2,e-=u*o/2}else if(r[0]==="m"){const u=i-f.width;t-=u/o/2,l-=u/o/2}else i/m>o?(i=o*m,r[1]==="l"?c=s-e-i:e=s-c-i):(m=i/o,r[0]==="t"?t=a-l-m:l=a-t-m);return{newLeft:c,newRight:e,newTop:t,newBottom:l}}},computed:{positionStyle(){return{top:this.top+"px",left:this.left+"px",zIndex:this.zIndex}},sizeStyle(){return{width:this.width+"px",height:this.height+"px"}},vdrStick(){return A=>{const c={width:`${this.stickSize/this.parentScaleX}px`,height:`${this.stickSize/this.parentScaleY}px`};return c[aA.y[A[0]]]=`${this.stickSize/this.parentScaleX/-2}px`,c[aA.x[A[1]]]=`${this.stickSize/this.parentScaleX/-2}px`,c}},width(){return this.parentWidth-this.left-this.right},height(){return this.parentHeight-this.top-this.bottom},rect(){return{left:Math.round(this.left),top:Math.round(this.top),width:Math.round(this.width),height:Math.round(this.height)}}},watch:{active(A){A?this.$emit("activated"):this.$emit("deactivated")},isActive:{immediate:!0,handler(A){this.active=A}},z:{immediate:!0,handler(A){(A>=0||A==="auto")&&(this.zIndex=A)}},x:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.left)return;const e=c-A;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:e,y:0}),this.$nextTick(()=>{this.bodyUp()})}},y:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.top)return;const e=c-A;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:0,y:e}),this.$nextTick(()=>{this.bodyUp()})}},w:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.width)return;const e="mr",t=c-A;this.stickDown(e,{pageX:this.right,pageY:this.top+this.height/2},!0),this.stickMove({x:t,y:0}),this.$nextTick(()=>{this.stickUp()})}},h:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.height)return;const e="bm",t=c-A;this.stickDown(e,{pageX:this.left+this.width/2,pageY:this.bottom},!0),this.stickMove({x:0,y:t}),this.$nextTick(()=>{this.stickUp()})}},parentW(A){this.right=A-this.width-this.left,this.parentWidth=A},parentH(A){this.bottom=A-this.height-this.top,this.parentHeight=A}}},ou=["onMousedown","onTouchstart"];function iu(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["vdr",`${l.active||e.isActive?"active":"inactive"} ${e.contentClass?e.contentClass:""}`]),style:n.normalizeStyle(s.positionStyle),onMousedown:c[0]||(c[0]=a=>s.bodyDown(a)),onTouchstart:c[1]||(c[1]=a=>s.bodyDown(a)),onTouchend:c[2]||(c[2]=a=>s.up(a)),ref:"container",tabindex:"0"},[n.createElementVNode("div",{style:n.normalizeStyle(s.sizeStyle),class:"content-container",ref:"container2"},[n.renderSlot(A.$slots,"default")],4),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.sticks,a=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["vdr-stick",["vdr-stick-"+a,e.isResizable?"":"not-resizable"]]),onMousedown:n.withModifiers(r=>s.stickDown(a,r),["stop","prevent"]),onTouchstart:n.withModifiers(r=>s.stickDown(a,r),["stop","prevent"]),style:n.normalizeStyle(s.vdrStick(a))},null,46,ou))),256))],38)}const rA=P(ru,[["render",iu]]),b22="",fu={components:{VueDragResize:rA},props:["content"],data(){return{}},watch:{},computed:{},methods:{onResizstop(A){console.log("i have stopped resizing",A)},onDragstop(A){},reset(){this.listOne=[]},getParentWidth(){let A=document.getElementsByClassName("fridgemagnet");setTimeout(()=>A[0].offsetWidth)},getParentHeight(){let A=document.getElementsByClassName("fridgemagnet");setTimeout(()=>A[0].offsetHeight)},keyboardMove(A){for(let c of A)document.getElementById(c.id).addEventListener("focusin",t=>{let l=document.getElementsByClassName("fridgemagnet");addEventListener("keydown",function(s){let a=document.getElementById(s.target.id);if(s.altKey&&s.key==="ArrowLeft"){let r=Number(a.style.left.slice(0,-2));r-10<0?a.style.left=`${r}px`:a.style.left=`${r-10}px`}if(s.altKey&&s.key==="ArrowRight"){let r=Number(a.style.left.slice(0,-2));r+10>l[0].offsetWidth-50?a.style.left=`${r}px`:a.style.left=`${r+10}px`}if(s.altKey&&s.key==="ArrowUp"){let r=Number(a.style.top.slice(0,-2));r+10<0?a.style.top=`${r}px`:a.style.top=`${r-10}px`}if(s.altKey&&s.key==="ArrowDown"){let r=Number(a.style.top.slice(0,-2));r+10>l[0].offsetHeight-80?a.style.top=`${r}px`:a.style.top=`${r+10}px`}})})}},mounted(){let A=document.getElementsByClassName("vdr");setTimeout(()=>{A[0].focus()}),this.keyboardMove(A)},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("vdr")}},mu={class:"fridgemagnet"},uu=["innerHTML"],pu=["src","alt"],du=["id","src","alt"],hu=["innerHTML"];function gu(A,c,e,t,l,s){const a=n.resolveComponent("VueDragResize");return n.openBlock(),n.createElementBlock("div",mu,[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,uu)):n.createCommentVNode("",!0),n.createElementVNode("img",{src:e.content.image,alt:e.content.imageAlt},null,8,pu),n.createElementVNode("div",{class:n.normalizeClass(["fridge",e.content.class,e.content.noOutline?"no_outline":""])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.magnets,(r,o)=>(n.openBlock(),n.createBlock(a,{id:"vdr_"+o,isActive:!0,w:r.width?r.width:50,minw:r.minWidth?r.minWidth:50,h:r.height?r.height:50,minh:r.minHeight?r.minHeight:50,x:r.x?r.x:0,y:r.y?r.y:60*o,class:n.normalizeClass(r.class),parentLimitation:!0,parentW:r.parentwidth?r.parentwidth:s.getParentWidth(),parentH:r.parentheight?r.parentheight:s.getParentHeight(),isResizable:r.resizable,isDraggable:r.draggable,snapToGrid:r.snap,gridX:r.snapX,gridY:r.snapY,dragHandle:r.handle,onResizing:A.resize,onDragging:A.resize,aspectRatio:!0,onResizestop:s.onResizstop,onDragstop:s.onDragstop,sticks:["tl","bl","tr","br"]},{default:n.withCtx(()=>[r.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:r.index,src:r.image,alt:r.imageAlt},null,8,du)):n.createCommentVNode("",!0),r.text?(n.openBlock(),n.createElementBlock("p",{key:1,innerHTML:r.text},null,8,hu)):n.createCommentVNode("",!0)]),_:2},1032,["id","w","minw","h","minh","x","y","class","parentW","parentH","isResizable","isDraggable","snapToGrid","gridX","gridY","dragHandle","onResizing","onDragging","onResizestop","onDragstop"]))),256))],2)])}const Cu=P(fu,[["render",gu]]),U22="",Bu={components:{},props:["content"],data(){return{binCount:0,listOne:[]}},watch:{},computed:{binColumns(){return Math.round(24/this.binCount)},myList:{get(){return this.listOne}}},methods:{createItems(){this.binCount=this.content.bins.length,this.content.bins.forEach(A=>{this.listOne.push(A.items)})},dragBackground(A){return`white url(${A}) 0 0 no-repeat`},pixelFormat(A){return this.stepperStore.pixelFormat(A)},checkMove(A){var c;if(this.content.sound){let e=document.getElementById("myAudio");setTimeout(()=>{e.play()},1e3)}if(A!=="clicked"&&((c=A.draggedContext.element)!=null&&c.relSwap)&&setTimeout(()=>{let e=A.draggedContext.element.id,t=document.getElementById(e);t.src=A.draggedContext.element.relSwap,t.classList.add("imageSwapped")},1500),this.stepperStore.stepHold=!1,this.stepperStore.finishSteps(),this.stepperStore.lastPageFocus(),A!=="clicked")return!A.from.classList.contains("preventMove")},reset(){this.listOne=[],this.createItems()},keyboardDrag(A,c){if(A.class.indexOf("preventMove")>-1)return!1;A.class+=" preventMove",this.listOne[c].splice(A),this.listOne[c+1].push(A),A.relSwap&&setTimeout(()=>{this.listOne[c+1][0].image=this.listOne[c+1][0].relSwap},1500),this.checkMove("clicked")}},mounted(){let A=document.getElementsByClassName("dragItems-button");setTimeout(()=>{A[0].focus()})},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("dragItems-button"),this.createItems()}},Lu=["innerHTML"],zu={key:1,id:"myAudio"},Mu=["src"],wu={class:"list-group-item"},Qu=["onChange"],xu=["id","src","alt","data-swap"],Fu=["src","alt","data-swap"];function yu(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("draggable"),f=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(f,{class:n.normalizeClass(["dragDrop",e.content.handle])},{default:n.withCtx(()=>[n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,Lu),e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0),e.content.sound?(n.openBlock(),n.createElementBlock("audio",zu,[n.createElementVNode("source",{src:e.content.sound,type:"audio/mpeg"},null,8,Mu),c[0]||(c[0]=n.createTextVNode(" Your browser does not support the audio element. ",-1))])):n.createCommentVNode("",!0)]),_:1}),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(i,m)=>(n.openBlock(),n.createBlock(r,{span:s.binColumns},{default:n.withCtx(()=>[n.createVNode(o,{class:n.normalizeClass(["draggable list-group",e.content.bins[m].class]),style:n.normalizeStyle({width:s.pixelFormat(e.content.bins[m].width),height:s.pixelFormat(e.content.bins[m].height),background:s.dragBackground(e.content.bins[m].bgImage)}),modelValue:s.myList[m],"onUpdate:modelValue":u=>s.myList[m]=u,move:s.checkMove,group:"people",forceFallback:"true"},{item:n.withCtx(({element:u})=>[n.createElementVNode("div",wu,[n.createElementVNode("button",{class:"dragItems-button",onChange:n.withModifiers(d=>s.keyboardDrag(u,m),["stop"])},[n.createTextVNode(n.toDisplayString(u.text)+" ",1),u.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:u.id,src:u.image,alt:u.imageAlt,"data-swap":u.relSwap},null,8,xu)):n.createCommentVNode("",!0),u.relSwap?(n.openBlock(),n.createElementBlock("img",{key:1,id:"preload",src:u.relSwap,alt:u.imageAlt,"data-swap":u.relSwap},null,8,Fu)):n.createCommentVNode("",!0)],40,Qu)])]),_:2},1032,["class","style","modelValue","onUpdate:modelValue","move"])]),_:2},1032,["span"]))),256))]),_:1},8,["class"])}const bu=P(Bu,[["render",yu]]),v22="",Uu={components:{},props:["content"],data(){return{binCount:0,listOne:[],listTwo:[],listTwoCompleted:[],totalAttempts:99,choice:{header:"",feedback:""},chooseBin:{},chooseVisibility:!1,kbCurrentId:"",feedbackObject:{}}},watch:{},computed:{binColumns(){return Math.round(24/this.binCount)},myList:{get(){return this.listOne}},myList2:{get(){return this.listTwo}},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{recordResults(A){let c=[];this.content.bins.forEach(s=>{let a=[];s.items.forEach(o=>{let f={text:o.text,imageAlt:o.imageAlt};a.push(f)});let r={header:s.header,description:s.description,items:a};c.push(r)});let e={page:this.stepperStore.stepPage,result:A,correctAnswer:c},t=this.stepperStore.results.find(s=>s.page===this.stepperStore.stepPage),l=this.stepperStore.results.indexOf(t);t?this.stepperStore.results.fill(t.result=A,l,l++):this.stepperStore.results.push(e)},failed(){this.listTwo.length>0&&(this.listTwo.forEach(A=>{this.listOne.forEach(c=>{c.forEach(e=>{A.id===e.id&&c.push(A)})})}),this.listTwo="",this.choice.header=this.content.failedHeader,this.choice.feedback=this.content.failedFeedback,this.feedbackVisibility=!0),this.recordResults("not correct"),this.stepperStore.finishSteps()},createItems(){this.binCount=this.content.bins.length,this.content.bins.forEach((A,c)=>{let e=Math.round(Date.now()/Math.random());A.items.forEach(t=>{t.hide=!0,t.id=e,t.oldKey=c,this.listTwo.push(t)}),this.listOne.push(JSON.parse(JSON.stringify(A.items)))}),this.listTwo.forEach(A=>{A.hide=!1}),this.content.random&&this.listTwo.sort(()=>Math.random()-.5)},dragBackground(A){return`white url(${A}) 0 0 no-repeat`},pixelFormat(A){return this.stepperStore.pixelFormat(A)},checkMove(A){if(A.to.dataset.index){let c=this.listOne[A.to.dataset.index],e=A.oldIndex,t=!1;c.forEach(l=>{l.hide===!0&&l.id===A.item._underlying_vm_.id&&(t=!0)}),t?(this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=A.item._underlying_vm_.correctHeader,this.feedbackObject.feedback=A.item._underlying_vm_.correctFeedback,this.feedbackObject.feedbackImage=A.item._underlying_vm_.correctFeedbackImage,this.listTwoCompleted.push(e),this.myList2.length===0&&(this.stepperStore.finishSteps(),this.recordResults("correct"))):(this.feedbackObject.feedbackHeader=A.item._underlying_vm_.incorrectHeader,this.feedbackObject.feedback=A.item._underlying_vm_.incorrectFeedback,this.feedbackObject.feedbackImage=A.item._underlying_vm_.incorrectFeedbackImage,this.listTwo.push(A.item._underlying_vm_),this.getAttempt<this.content.attempts?this.stepperStore.attempts=this.getAttempt+1:(this.stepperStore.showFeedbackAttempts=!0,this.failed()),this.stepperStore.showFeedback=!0,c.forEach((l,s)=>{l.id===A.item._underlying_vm_.id&&c.splice(s,1)})),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})}},stopMove(){return!1},kbCheckMove(A,c){if(typeof A>"u")this.chooseVisibility=!1;else{if(this.listOne[A][c].id===this.kbCurrentId){let t=-1;this.listTwo.forEach((l,s)=>{l.id===this.kbCurrentId&&(t=s)}),this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=this.listOne[A][c].correctHeader,this.feedbackObject.feedback=this.listOne[A][c].correctFeedback,this.feedbackObject.feedbackImage=this.listOne[A][c].correctFeedbackImage,this.chooseVisibility=!1,this.listTwoCompleted.push(A),this.listTwo.splice(t,1),this.myList2.length===0&&this.stepperStore.finishSteps(),this.listOne[A][c].hide=!1}else this.feedbackObject.feedbackHeader=this.listOne[A][c].incorrectHeader,this.feedbackObject.feedback=this.listOne[A][c].incorrectFeedback,this.feedbackObject.feedbackImage=this.listOne[A][c].incorrectFeedbackImage,this.chooseVisibility=!1,this.stepperStore.showFeedback=!0,this.getAttempt<this.content.attempts?this.stepperStore.attempts=this.getAttempt+1:(this.chooseVisibility=!1,this.stepperStore.showFeedbackAttempts=!0,this.failed());setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})}},keyboardDrag(A){if(A.class.indexOf("preventMove")>0)return!1;this.chooseVisibility=!0,this.kbCurrentId=A.id,setTimeout(()=>{document.getElementById("firstBin").focus()})},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("dragItems-button");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("dragItems-button"),this.stepperStore.attempts=0,this.content.attempts&&(this.totalAttempts=this.content.attempts),this.createItems()}},vu=["innerHTML"],Su=["onClick"],Nu=["id","src","alt"],Eu={key:0,class:"dropBin"},ku={class:"dragItems-button"},Hu=["id","src","alt"],Iu={class:"dialog-footer"};function Tu(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("draggable"),f=n.resolveComponent("el-row"),i=n.resolveComponent("lab-feedback"),m=n.resolveComponent("el-button"),u=n.resolveComponent("el-dialog");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(f,{class:n.normalizeClass(["dragDrop",e.content.handle]),id:"dragItemDiv"},{default:n.withCtx(()=>[n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,vu),e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0)]),_:1}),n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createVNode(o,{class:"dragItems",list:l.listTwo,group:"put",forceFallback:"true",itemKey:"image",sort:!1,onEnd:s.checkMove},{item:n.withCtx(({element:d})=>[n.createElementVNode("div",{class:n.normalizeClass(["dragItem",d.class])},[n.createElementVNode("button",{class:"dragItems-button",onClick:n.withModifiers(p=>s.keyboardDrag(d),["stop"])},[n.createTextVNode(n.toDisplayString(d.text)+" ",1),d.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:d.id,src:d.image,alt:d.imageAlt},null,8,Nu)):n.createCommentVNode("",!0)],8,Su)],2)]),_:1},8,["list","onEnd"])]),_:1}),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(d,p)=>(n.openBlock(),n.createBlock(r,{class:"bins",span:s.binColumns},{default:n.withCtx(()=>[n.createElementVNode("h4",null,n.toDisplayString(e.content.bins[p].header),1),n.createVNode(o,{class:n.normalizeClass(["dropBins el-row",e.content.bins[p].class]),"data-index":p,list:l.listOne[p],group:"put",forceFallback:"true",itemKey:"text",sort:!1,move:s.stopMove},{item:n.withCtx(({element:h})=>[h.hide?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Eu,[n.createElementVNode("button",ku,[n.createTextVNode(n.toDisplayString(h.text)+" ",1),h.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:h.id,src:h.droppedImage,alt:h.imageAlt},null,8,Hu)):n.createCommentVNode("",!0)])]))]),_:1},8,["class","data-index","list","move"])]),_:2},1032,["span"]))),256))]),_:1},8,["class"]),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0),n.createVNode(u,{title:e.content.kbModalQuestion,modelValue:l.chooseVisibility,"onUpdate:modelValue":c[1]||(c[1]=d=>l.chooseVisibility=d),width:"50%"},{footer:n.withCtx(()=>[n.createElementVNode("span",Iu,[n.createVNode(m,{size:"small",id:"visibilityClose",type:"primary",onClick:c[0]||(c[0]=d=>s.kbCheckMove())},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Close",-1)])]),_:1})])]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(d,p)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d,(h,B)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[p===0?(n.openBlock(),n.createBlock(m,{key:0,id:"firstBin",size:"small",type:"primary",onClick:C=>s.kbCheckMove(p,B)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.content.bins[p].header),1)]),_:2},1032,["onClick"])):(n.openBlock(),n.createBlock(m,{key:1,size:"small",type:"primary",onClick:C=>s.kbCheckMove(p,B)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.content.bins[p].header),1)]),_:2},1032,["onClick"]))],64))),256))],64))),256))]),_:1},8,["title","modelValue"])],64)}const Du=P(Uu,[["render",Tu]]),_u="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M12.5%208c-2.65%200-5.05.99-6.9%202.6L2%207v9h9l-3.62-3.62c1.39-1.16%203.16-1.88%205.12-1.88c3.54%200%206.55%202.31%207.6%205.5l2.37-.78C21.08%2011.03%2017.15%208%2012.5%208'/%3e%3c/svg%3e",Ku="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M18.4%2010.6C16.55%208.99%2014.15%208%2011.5%208c-4.65%200-8.58%203.03-9.96%207.22L3.9%2016a8.002%208.002%200%200%201%207.6-5.5c1.95%200%203.73.72%205.12%201.88L13%2016h9V7z'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M19%204h-3.5l-1-1h-5l-1%201H5v2h14M6%2019a2%202%200%200%200%202%202h8a2%202%200%200%200%202-2V7H6z'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M21%207v12q0%20.825-.587%201.413T19%2021H5q-.825%200-1.412-.587T3%2019V5q0-.825.588-1.412T5%203h12zm-9%2011q1.25%200%202.125-.875T15%2015t-.875-2.125T12%2012t-2.125.875T9%2015t.875%202.125T12%2018m-6-8h9V6H6z'/%3e%3c/svg%3e",Ru={class:"vp-toolbar"},Pu={class:"vp-tools"},Gu=["onClick","title","innerHTML"],Wu={class:"vp-settings"},Xu={class:"vp-actions"},qu=n.createElementVNode("img",{src:_u},null,-1),Yu=[qu],Ju=n.createElementVNode("img",{src:Ku},null,-1),ju=[Ju],$u=n.createElementVNode("img",{src:Ou},null,-1),Zu=[$u],Ap=n.createElementVNode("img",{src:Vu},null,-1),cp=[Ap],ep=n.defineComponent({__name:"VpToolbar",props:n.mergeModels({tools:{}},{settings:{default:()=>({tool:"freehand",thickness:5,color:"#c82d2d"})},settingsModifiers:{}}),emits:n.mergeModels(["set-tool","save","undo","redo","reset"],["update:settings"]),setup(A,{emit:c}){const e=c,t=n.useModel(A,"settings");return(l,s)=>(n.openBlock(),n.createElementBlock("div",Ru,[n.renderSlot(l.$slots,"default",{},()=>[n.renderSlot(l.$slots,"tools",{},()=>[n.createElementVNode("div",Pu,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.tools.filter(a=>a.icon),a=>n.renderSlot(l.$slots,`tool-${a.type}`,{},()=>[(n.openBlock(),n.createElementBlock("button",{key:a.type,class:n.normalizeClass([t.value.tool===a.type?"active":"",`vp-tool-${a.type}`]),onClick:r=>e("set-tool",a.type),title:a.type,innerHTML:a.icon},null,10,Gu))])),256))])]),n.renderSlot(l.$slots,"settings",{},()=>[n.createElementVNode("div",Wu,[n.renderSlot(l.$slots,"setting-thickness",{},()=>[n.withDirectives(n.createElementVNode("input",{type:"range",min:"1",max:"10",class:"vp-setting-thickness","onUpdate:modelValue":s[0]||(s[0]=a=>t.value.thickness=a)},null,512),[[n.vModelText,t.value.thickness]])]),n.renderSlot(l.$slots,"setting-color",{},()=>[n.withDirectives(n.createElementVNode("input",{type:"color",class:"vp-setting-color","onUpdate:modelValue":s[1]||(s[1]=a=>t.value.color=a)},null,512),[[n.vModelText,t.value.color]])])])]),n.renderSlot(l.$slots,"actions",{},()=>[n.createElementVNode("div",Xu,[n.renderSlot(l.$slots,"action-undo",{},()=>[n.createElementVNode("button",{onClick:s[2]||(s[2]=a=>e("undo")),class:"vp-action-undo"},Yu)]),n.renderSlot(l.$slots,"action-redo",{},()=>[n.createElementVNode("button",{onClick:s[3]||(s[3]=a=>e("redo")),class:"vp-action-redo"},ju)]),n.renderSlot(l.$slots,"action-reset",{},()=>[n.createElementVNode("button",{onClick:s[4]||(s[4]=a=>e("reset")),class:"vp-action-reset"},Zu)]),n.renderSlot(l.$slots,"action-save",{},()=>[n.createElementVNode("button",{onClick:s[5]||(s[5]=a=>e("save")),class:"vp-action-save"},cp)])])])])]))}});function w0({history:A,tools:c,activeShape:e,includeActiveShape:t}){return{simplifiedHistory:n.computed(()=>{const l=e!=null&&e.value?[...A.value,e.value]:[...A.value];return c.value.reduce((s,a)=>{var r;return((r=a.simplifyHistory)==null?void 0:r.call(a,s,c.value))??s},l).filter(s=>{var a;return t||s.id!==((a=e==null?void 0:e.value)==null?void 0:a.id)})})}}function c3(){return[26,36,36,36,36,36,36].map(A=>Math.floor(Math.random()*A+(36-A)).toString(36)).join("")}const tp=["viewBox","id"],lp=n.defineComponent({__name:"VpImage",props:{tools:{},activeShape:{},history:{},width:{},height:{}},setup(A,{expose:c}){const e=A,t=n.ref(),l=n.ref(c3());c({svg:t});function s(i){return e.tools.find(m=>m.type===i)}const a=n.computed(()=>e.tools.map(i=>i.svgStyle?typeof i.svgStyle=="function"?i.svgStyle({svgId:l.value}):n.unref(i.svgStyle):"").join(`
|
|
1
|
+
(function(n,M0){typeof exports=="object"&&typeof module<"u"?module.exports=M0(require("vue")):typeof define=="function"&&define.amd?define(["vue"],M0):(n=typeof globalThis<"u"?globalThis:n||self,n.LabmakerPlugin=M0(n.Vue))})(this,function(n){"use strict";const M0="",P=(A,c)=>{const e=A.__vccOpts||A;for(const[t,l]of c)e[t]=l;return e},ii={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(A){const e=A.target.files[0];this.fileProcess(e)},fileProcess(A){this.imgSRC=URL.createObjectURL(A)}},mounted(){}},fi={class:"image-uploader"},mi={class:"your-file"},ui=["src"];function pi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock(n.Fragment,null,[c[2]||(c[2]=n.createElementVNode("h1",null,"File Uploader",-1)),n.createElementVNode("div",fi,[c[1]||(c[1]=n.createElementVNode("h1",null,"File Uploader",-1)),n.createElementVNode("input",{onChange:c[0]||(c[0]=(...a)=>s.fileUpload&&s.fileUpload(...a)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),n.createElementVNode("div",mi,[n.createElementVNode("img",{src:l.imgSRC,alt:"",scrset:""},null,8,ui)])])],64)}const di=P(ii,[["render",pi]]),i22="",hi={props:["title"],data(){return{}},computed:{}};function gi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("header",null,[n.createElementVNode("h1",null,n.toDisplayString(e.title),1)])}const Ci=P(hi,[["render",gi]]),f22="",Bi={props:["content","image"],data(){return{}},computed:{imageSrc(){return this.content.src.slice(-3)==="gif"?`${this.content.src}?src=${Math.round(Math.random()*Date.now())}`:this.content.src}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)}},mounted(){var A;(A=this.image)!=null&&A.supportImage||this.stepperStore.finishSteps()},beforeMount(){this.stepperStore=this.stepperMain()}},Li={class:"image-container"},zi={class:"image"},Mi=["src","alt"],wi=["innerHTML"],Qi=["innerHTML"],xi=["innerHTML"];function Fi(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",Li,[n.createElementVNode("div",zi,[n.createElementVNode("img",{src:s.imageSrc,alt:e.content.alt,class:n.normalizeClass(e.content.class)},null,10,Mi),e.content.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.captionHeader},null,8,wi)):n.createCommentVNode("",!0),e.content.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.caption},null,8,Qi)):n.createCommentVNode("",!0),e.content.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.copyright,class:"copyright"},null,8,xi)):n.createCommentVNode("",!0)])])}const yi=P(Bi,[["render",Fi],["__scopeId","data-v-3cf7df18"]]),m22="",bi={props:["content"],data(){return{showGif:!1,showPause:!1,tempGif:"",tempImage:"",alphanum:"",imgWidth:"",imgHeight:""}},computed:{altText(){return!this.content.altText&&this.content.textVersion?"Select text version for a more detailed description.":this.content.altText},imageSrc(){return this.content.src},pngImageSrc(){return!this.tempImage||this.tempImage===" "?this.content.posterSrc?this.content.posterSrc:"//cdn.flvs.net/course_view/1_0/dist/images/placeholder.png":this.tempImage}},methods:{process(){this.tempGif=document.getElementById("giffyGif_"+this.alphanum),this.tempGif.onload=()=>{this.imgHeight=this.tempGif.height,this.imgWidth=this.tempGif.width;let A=document.createElement("canvas");A.width=this.imgWidth,A.height=this.imgHeight,A.getContext("2d").drawImage(this.tempGif,0,0),this.tempImage=A.toDataURL("image/png")}},playGif(){this.showGif=!this.showGif,this.content.animDuration&&this.showGif&&setTimeout(()=>{this.showGif=!1},this.content.animDuration),this.stepperStore.finishSteps()},pauseGif(){this.showGif&&(this.showPause=!0)},pauseGifHide(){this.showPause=!1},updateGifSize(){let A=document.getElementById("giffyPng_"+this.alphanum);A.complete?(this.imgWidth=A.width,this.imgHeight=A.height):A.onload=function(){this.imgWidth=A.width,this.imgHeight=A.height,A.onload=null}}},mounted(){this.process()},beforeMount(){this.stepperStore=this.stepperMain(),this.alphanum=Math.random().toString(36).replace("0.","")}},Ui={class:"image-container"},vi={class:"image"},Si=["id","alt","src"],Ni=["id","src","alt"],Ei=["innerHTML"],ki=["innerHTML"],Hi=["innerHTML"];function Ii(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",Ui,[n.createElementVNode("div",vi,[n.createElementVNode("a",{href:"javascript:void(0)","aria-label":"play","aria-hidden":"true",class:"gAnimBg",onMouseover:c[0]||(c[0]=(...a)=>s.pauseGif&&s.pauseGif(...a)),onMouseout:c[1]||(c[1]=(...a)=>s.pauseGifHide&&s.pauseGifHide(...a)),onClick:c[2]||(c[2]=(...a)=>s.playGif&&s.playGif(...a))},[c[3]||(c[3]=n.createElementVNode("span",{class:"screenReaderAlt","aria-hidden":"true"},"Start Animation",-1)),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["playButtonStyles",{dark:e.content.animButton==="dark"}])},[n.createElementVNode("div",{class:n.normalizeClass(["playButtonIconStyles",{dark:e.content.animButton==="dark"}])},null,2)],2),[[n.vShow,l.showGif===!1]]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["pauseButtonStyles",{dark:e.content.animButton==="dark"}])},[n.createElementVNode("div",{class:n.normalizeClass(["pauseButtonIconStyles",{dark:e.content.animButton==="dark"}])},null,2)],2),[[n.vShow,l.showPause]]),n.withDirectives(n.createElementVNode("img",{id:"giffyPng_"+l.alphanum,class:n.normalizeClass(["giffyPng",e.content.class]),alt:s.altText,src:s.pngImageSrc},null,10,Si),[[n.vShow,l.showGif===!1]]),n.withDirectives(n.createElementVNode("img",{id:"giffyGif_"+l.alphanum,src:s.imageSrc,alt:s.altText,class:n.normalizeClass(["giffyGif",e.content.class])},null,10,Ni),[[n.vShow,l.showGif]])],32),e.content.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.captionHeader},null,8,Ei)):n.createCommentVNode("",!0),e.content.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.caption},null,8,ki)):n.createCommentVNode("",!0),e.content.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.copyright,class:"copyright"},null,8,Hi)):n.createCommentVNode("",!0)])])}const Ti=P(bi,[["render",Ii],["__scopeId","data-v-8a2b22b7"]]),u22="",Di={props:["content"],data(){return{showingKaltura:!1,showingText:!1,buttonText:!1,hasText:!1,video:{width:640,height:480},audio:{width:260,height:80},audioBtn:{width:40,height:40},textversionArray:{}}},watch:{content:function(){this.tvCleaner()}},computed:{kHeight(){if(this.content.kalturaType==="video")if(this.content.height&&this.content.height!=""){let A=this.content.height;return A.slice(-2)==="px"?A.slice(0,-2):this.content.height}else return this.video.height;else if(this.content.kalturaType==="audio")if(this.content.height&&this.content.height!=""){let A=this.content.height;return A.slice(-2)==="px"?A.slice(0,-2):this.content.height}else return this.audio.height;else if(this.content.kalturaType==="audiobtn")return this.audioBtn.height},kWidth(){if(this.content.kalturaType==="video")if(this.content.width&&this.content.width!=""){let A=this.content.width;return A.slice(-2)==="px"?A.slice(0,-2):this.content.width}else return this.video.width;else{if(this.content.kalturaType==="audio")return this.audio.width;if(this.content.kalturaType==="audiobtn")return this.audioBtn.width}}},methods:{getButtonText(A){return A==="video"?this.showingText?"Show Video":"Show Text Version":this.showingText?"Show Audio":"Show Text Version"},textVersionCheck(){this.content.textVersion&&this.content.textVersion.length>1&&(this.hasText=!0)},kalturaLoad(){this.textVersionCheck()},kalturaMedia(A){let c={uiconf_id:"54575302",partner_id:"2061901",entry_id:"",height:"400",width:"640",type:"video"};return c.entry_id=this.content.kalturaEntryId,this.content.kalturaType&&(c.type=this.content.kalturaType),c.type==="audio"?c.uiconf_id="54576672":c.type==="audiobtn"?c.uiconf_id="54811142":c.type==="videoNoCC"&&(c.uiconf_id="54575422"),this.content.standalone&&(this.stepperStore.stepHold=!1),`https://cdnapisec.kaltura.com/p/${c.partner_id}/embedPlaykitJs/uiconf_id/${c.uiconf_id}?iframeembed=true&entry_id=${c.entry_id}`},showKaltura(){this.showingKaltura=!0},showText(){this.showingText=!this.showingText,this.buttonText=!this.buttonText},tvCleaner(){let A=document.createElement("div");A.innerHTML=this.content.textVersion;for(let c=0;c<A.children.length;c++){let e=A.children[c];if(e.tagName=="DIV"&&e.className=="panel-default"&&e.children[0].dataset.toggle)for(let t=0;t<e.children.length;t++){let l=e.children[t];if(l.dataset.toggle=="collapse"){let s={heading:l.innerHTML,body:e.children[t+1].innerHTML};this.textversionArray[c]=s}}else this.textversionArray[c]=e.outerHTML}}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("vidText"),this.kalturaLoad(),this.tvCleaner()},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("vidText");setTimeout(()=>{A[0].focus()})}this.stepperStore.finishSteps()}},_i={key:0,class:"textVersion"},Ki=["innerHTML"],Oi=["src","width","height"],Vi=["src","width","height"],Ri=["src","width","height"],Pi={key:2,class:"alert alert-danger"};function Gi(A,c,e,t,l,s){const a=n.resolveComponent("el-button");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["kContainer",e.content.class])},[e.content.textVersion&&l.showingText?(n.openBlock(),n.createElementBlock("div",_i,[c[4]||(c[4]=n.createElementVNode("h1",null,"Text Version",-1)),n.createElementVNode("div",{innerHTML:e.content.textVersion},null,8,Ki)])):n.createCommentVNode("",!0),!l.showingText&&e.content.kalturaEntryId?(n.openBlock(),n.createElementBlock("div",{key:1,class:"mainVersion",style:n.normalizeStyle({width:s.kWidth+"px",height:s.kHeight+"px"})},[e.content.kalturaType=="video"&&!l.showingKaltura?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["kPoster",{active:l.showingKaltura==!0}]),style:n.normalizeStyle({width:s.kWidth+"px",height:s.kHeight+"px"})},[n.createElementVNode("iframe",{onClick:c[0]||(c[0]=(...r)=>s.showKaltura&&s.showKaltura(...r)),class:"videoIframe",src:s.kalturaMedia(e.content),width:s.kWidth+"px",height:s.kHeight+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Oi)],6)):n.createCommentVNode("",!0),e.content.kalturaType=="audio"?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["kAudio",{active:l.showingKaltura==!0}]),onClick:c[1]||(c[1]=(...r)=>s.showKaltura&&s.showKaltura(...r))},[n.createElementVNode("iframe",{id:"my_iframe",src:s.kalturaMedia(e.content),width:s.kWidth+"px",height:s.kHeight+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Vi)],2)):n.createCommentVNode("",!0),e.content.kalturaType=="audiobtn"?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["kAudiobtn",{active:l.showingKaltura==!0}]),onClick:c[2]||(c[2]=(...r)=>s.showKaltura&&s.showKaltura(...r))},[n.createElementVNode("iframe",{src:s.kalturaMedia(e.content),width:l.audioBtn.width+"px",height:l.audioBtn.height+"px",allowfullscreen:"",webkitallowfullscreen:"",mozAllowFullScreen:"",frameborder:"0"},null,8,Ri)],2)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),e.content.kalturaEntryId==""?(n.openBlock(),n.createElementBlock("div",Pi,"There is no Kaltura Entry ID")):n.createCommentVNode("",!0),e.content.textVersion?(n.openBlock(),n.createBlock(a,{key:3,size:"medium",type:"primary","aria-label":"text version",class:"toggleSwitch ftSwitch btn btn-primary vidText",onClick:c[3]||(c[3]=n.withModifiers(r=>s.showText(e.content.kalturaType),["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.getButtonText(e.content.kalturaType)),1)]),_:1})):n.createCommentVNode("",!0)],2)}const Wi=P(Di,[["render",Gi]]),p22="",Xi={props:["content"],data(){return{value1:50,styleObject:{height:"",width:""}}},computed:{dark(){return this.content.dark?"dark":!1},vertical(){return!!this.content.vertical},verticalClass(){return this.content.vertical?"is-vertical":!1},style(){return this.content.vertical?(this.styleObject.height=100-this.value1+"%",this.styleObject.width=""):(this.styleObject.height="",this.styleObject.width=this.value1+"%"),this.styleObject},captionWidth(){return this.value1<=30&&!this.content.vertical?"200px":"100%"}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},updateStartHeight(){return this.content.startHeight&&(this.value1=this.content.startHeight),!1}},mounted(){this.stepperStore.finishSteps(),this.updateStartHeight()},beforeMount(){this.stepperStore=this.stepperMain()}},qi={class:"image-compare"},Yi={class:"image"},Ji=["src","alt"],ji=["innerHTML"],$i=["innerHTML"],Zi=["innerHTML"],Af=["src","alt"],cf={class:"captionAreaRight"},ef=["innerHTML"],tf=["innerHTML"],lf=["innerHTML"];function sf(A,c,e,t,l,s){const a=n.resolveComponent("el-slider");return n.openBlock(),n.createElementBlock("div",qi,[n.createVNode(a,{class:n.normalizeClass(["imageSlide",s.dark]),modelValue:l.value1,"onUpdate:modelValue":c[0]||(c[0]=r=>l.value1=r),step:5,"show-tooltip":!1,vertical:s.vertical},null,8,["class","modelValue","vertical"]),n.createElementVNode("div",Yi,[n.createElementVNode("div",{class:n.normalizeClass(["imageLeft",s.dark,s.verticalClass]),style:n.normalizeStyle(s.style)},[n.createElementVNode("img",{src:e.content.image.srcLeft,alt:e.content.image.altLeft,class:n.normalizeClass(e.content.image.classLeft)},null,10,Ji),n.createElementVNode("div",{class:"captionAreaLeft",style:n.normalizeStyle({width:s.captionWidth})},[e.content.image.captionHeaderLeft?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image.captionHeaderLeft},null,8,ji)):n.createCommentVNode("",!0),e.content.image.captionLeft?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image.captionLeft},null,8,$i)):n.createCommentVNode("",!0),e.content.image.copyrightLeft?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image.copyrightLeft,class:"copyright"},null,8,Zi)):n.createCommentVNode("",!0)],4)],6),n.createElementVNode("img",{class:n.normalizeClass(["imageRight",e.content.image.classRight]),src:e.content.image.srcRight,alt:e.content.image.altRight},null,10,Af),n.createElementVNode("div",cf,[e.content.image.captionHeaderRight?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image.captionHeaderRight},null,8,ef)):n.createCommentVNode("",!0),e.content.image.captionRight?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image.captionRight},null,8,tf)):n.createCommentVNode("",!0),e.content.image.copyrightRight?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image.copyrightRight,class:"copyright"},null,8,lf)):n.createCommentVNode("",!0)])])])}const nf=P(Xi,[["render",sf],["__scopeId","data-v-ca834e68"]]),d22="",af={components:{},inject:["message"],props:["content"],data(){return{dialogVisible:!1,feedbackVisibility:[],feedbackIndex:0}},computed:{},methods:{spotDone(A){var c;return(c=this.stepperStore.getStepPage[A])!=null&&c.completed?"check-done":!1},showSpot(A){var c;if((c=this.stepperStore.getStepPage[A])!=null&&c.testPage){let e=!0;return this.stepperStore.getStepPage.forEach((t,l)=>{t.testPage!==!0&&!t.completed&&(e=!1)}),!!e}return!0},pixelFormat(A){return this.stepperStore.pixelFormat(A)},changePage(A,c){A.pageLink?this.stepperStore.currentPage=A.pageLink:A.feedback&&(this.feedbackIndex=c,this.feedbackVisibility.indexOf(c)===-1&&this.feedbackVisibility.push(c),this.stepperStore.showFeedback=!0,this.content.hotspots.length-1===this.feedbackVisibility.length-1&&this.stepperStore.finishSteps(),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()}))},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)},hotspots(){if(this.stepperStore.randomResults)return this.stepperStore.randomResults;if(this.content.showCount){let A=function(c,e){return[...c].sort(()=>.5-Math.random()).slice(0,e)};if(this.content.showByGroup){let c=[];this.content.hotspots.forEach(t=>{c.indexOf(t.group)===-1&&c.push(t.group)});let e=[];return c.forEach(t=>{let l=this.content.hotspots.filter(s=>s.group===t);e.push(A(l,1)[0])}),this.stepperStore.randomResults=e,e}else{let c=A(this.content.hotspots,this.content.showCount);return this.stepperStore.randomResults=c,c}}else return this.content.hotspots},imgAlt(A,c){return c?"Button Marker "+Number(A+1)+": "+c:"Button Marker "+Number(A+1)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("hotspot");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("hotspot")}},rf={class:"imageMarker"},of=["src","alt"],ff={class:"hotspotArea"},mf=["src","alt"],uf=["innerHTML"],pf={key:1,class:"big_green"};function df(A,c,e,t,l,s){const a=n.resolveComponent("el-button"),r=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",rf,[n.createElementVNode("img",{src:e.content.image,alt:e.content.imageAlt},null,8,of),n.createElementVNode("div",ff,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.hotspots(),(o,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s.showSpot(f)?(n.openBlock(),n.createBlock(a,{key:0,type:o.buttonType,onClick:n.withModifiers(i=>s.changePage(o,f),["stop"]),id:"hotspot_"+f,class:n.normalizeClass([["is-"+o.buttonShape,{noBG:o.buttonImage},o.class,s.spotDone(f)],"hotspot"]),style:n.normalizeStyle({top:s.pixelFormat(o.cordinatesX),left:s.pixelFormat(o.cordinatesY),width:s.pixelFormat(o.dimensionsW),height:s.pixelFormat(o.dimensionsH)}),icon:o.buttonIcon},{default:n.withCtx(()=>[o.buttonImage?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:o.buttonImage,alt:s.imgAlt(f,o.buttonImageAlt)},null,8,mf)):n.createCommentVNode("",!0),n.createElementVNode("span",{class:"im-buttonText",innerHTML:o.name},null,8,uf),s.spotDone(f)?(n.openBlock(),n.createElementBlock("div",pf)):n.createCommentVNode("",!0)]),_:2},1032,["type","onClick","id","class","style","icon"])):n.createCommentVNode("",!0),s.showFeedback(f)?(n.openBlock(),n.createBlock(r,{key:1,content:o},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))])])}const hf=P(af,[["render",df],["__scopeId","data-v-1c0c8a92"]]),h22="",gf={props:["content"],data(){return{imageReplaced:!1,imageSrc:this.content.image,imageAlt:this.content.imageAlt}},computed:{},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},async changeImage(A){this.imageReplaced=!0,this.imageSrc=this.content.hotspots[A].imageOverlay,this.imageAlt=this.content.hotspots[A].imageOverlayAlt,await this.stepperStore.finishSteps(),this.stepperStore.lastPageFocus()}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("instructions");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("instructions")}},Cf=["innerHTML"],Bf=["src","alt"],Lf={class:"hotspotArea"};function zf(A,c,e,t,l,s){const a=n.resolveComponent("el-col"),r=n.resolveComponent("el-button"),o=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(o,{class:"imageReplacer"},{default:n.withCtx(()=>[n.createVNode(a,{span:12},{default:n.withCtx(()=>[n.createElementVNode("p",{class:"imageReplacerDescription",innerHTML:e.content.description},null,8,Cf)]),_:1}),n.createVNode(a,{span:12},{default:n.withCtx(()=>[n.createElementVNode("img",{class:"im-ButtonImage",src:l.imageSrc,alt:l.imageAlt},null,8,Bf),n.createElementVNode("div",Lf,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.hotspots,(f,i)=>(n.openBlock(),n.createBlock(r,{type:f.buttonType,onClick:n.withModifiers(m=>s.changeImage(i),["stop"]),class:"hotspot",style:n.normalizeStyle({top:s.pixelFormat(f.cordinatesX),left:s.pixelFormat(f.cordinatesY),width:s.pixelFormat(f.dimensionsW),height:s.pixelFormat(f.dimensionsH)}),icon:f.buttonIcon},null,8,["type","onClick","style","icon"]))),256))])]),_:1})]),_:1})}const Mf=P(gf,[["render",zf],["__scopeId","data-v-d6c87f03"]]),g22="",wf={props:["content"],data(){return{value1:0,marks:{}}},computed:{dark(){return this.content.dark?"dark":!1},imageCount(){return this.content.image.length-1},vertical(){return!!this.content.vertical},verticalClass(){return this.content.vertical?"is-vertical":!1}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},populateMArks(){this.content.image.forEach((A,c)=>{this.marks[c]=A.mark})}},mounted(){this.stepperStore.finishSteps(),this.populateMArks()},beforeMount(){this.stepperStore=this.stepperMain()}},Qf={class:"image"},xf=["src","alt"],Ff=["innerHTML"],yf=["innerHTML"],bf=["innerHTML"];function Uf(A,c,e,t,l,s){const a=n.resolveComponent("el-slider");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["image-slider",[{verticalSlider:s.vertical},e.content.class]])},[n.createVNode(a,{class:n.normalizeClass(["imageSlide",s.dark]),modelValue:l.value1,"onUpdate:modelValue":c[0]||(c[0]=r=>l.value1=r),"show-tooltip":!1,vertical:s.vertical,step:1,"show-stops":"",max:s.imageCount,marks:l.marks},null,8,["class","modelValue","vertical","max","marks"]),n.createElementVNode("div",Qf,[n.createElementVNode("img",{src:e.content.image[l.value1].src,alt:e.content.image[l.value1].alt,class:n.normalizeClass(e.content.image[l.value1].class)},null,10,xf),n.createElementVNode("div",{class:"captionArea",style:n.normalizeStyle({width:A.captionWidth})},[e.content.image[l.value1].captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.image[l.value1].captionHeader},null,8,Ff)):n.createCommentVNode("",!0),e.content.image[l.value1].caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.image[l.value1].caption},null,8,yf)):n.createCommentVNode("",!0),e.content.image[l.value1].copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.image[l.value1].copyright,class:"copyright"},null,8,bf)):n.createCommentVNode("",!0)],4)])],2)}const vf=P(wf,[["render",Uf],["__scopeId","data-v-87555ec2"]]),C22="",Sf={props:["content"],data(){return{showOverlay:!0}},computed:{overlayButtonText(){return this.showOverlay?"Hide Overlay":"Show Overlay"}},methods:{pixelFormat(A){return this.stepperStore.pixelFormat(A)},getSavedImage(){document.getElementById("canvasBlob").appendChild(this.stepperStore.getCanvasImage)}},mounted(){this.getSavedImage(),this.stepperStore.finishSteps()},beforeMount(){this.stepperStore=this.stepperMain()}},Nf={class:"imageCompare"},Ef={class:"hideCompareButtons"};function kf(A,c,e,t,l,s){const a=n.resolveComponent("el-button");return n.openBlock(),n.createElementBlock("div",Nf,[l.showOverlay?(n.openBlock(),n.createElementBlock("div",{key:0,class:"overlay",style:n.normalizeStyle("background: url("+e.content.overlay+")")},null,4)):n.createCommentVNode("",!0),c[1]||(c[1]=n.createElementVNode("div",{id:"canvasBlob"},null,-1)),n.createElementVNode("div",Ef,[n.createVNode(a,{size:"medium",type:"primary",onClick:c[0]||(c[0]=r=>l.showOverlay=!l.showOverlay)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.overlayButtonText),1)]),_:1})])])}const Hf=P(Sf,[["render",kf],["__scopeId","data-v-0f3f694e"]]);var Z4=n.defineComponent({name:"CloseBold"});const If={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Tf=n.createVNode("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"},null,-1);function Df(A,c,e,t,l,s){return n.openBlock(),n.createBlock("svg",If,[Tf])}Z4.render=Df,Z4.__file="packages/components/CloseBold.vue";const _f=Z4;var A3=n.defineComponent({name:"Histogram"});const Kf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Of=n.createVNode("path",{fill:"currentColor",d:"M416 896V128h192v768H416zm-288 0V448h192v448H128zm576 0V320h192v576H704z"},null,-1);function Vf(A,c,e,t,l,s){return n.openBlock(),n.createBlock("svg",Kf,[Of])}A3.render=Vf,A3.__file="packages/components/Histogram.vue";const sA=A3,B22="",Rf={components:{CloseBold:_f},props:["content"],data(){return{show:!0}},computed:{getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},feedbackHeader(){return this.stepperStore.getShowFeedbackAttempts?"Too Many Attempts":this.content.feedbackHeader},feedbackWidth(){return this.content.feedbackWidth?this.content.feedbackWidth:"50%"}},methods:{feedbackClose(){this.content.finalInstructions&&(this.stepperStore.completedDirections[this.stepperStore.currentPage].display=!1),this.content.instructions&&(this.stepperStore.directions[this.stepperStore.currentPage].display=!1),this.content.stepDirections&&(this.stepperStore.stepDirectionsArray[this.stepperStore.stepPage].display=!1),this.stepperStore.showFeedback=!1,this.stepperStore.showFeedbackAttempts=!1,this.stepperStore.lastPageFocus()},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})}},mounted(){this.renderMath()},beforeMount(){var A,c;this.stepperStore=this.stepperMain(),((A=this.content.feedbackContent)==null?void 0:A.type)==="media"&&((c=this.content.feedbackContent.fieldValues)==null?void 0:c.kalturaType)==="video"&&(this.content.feedbackContent.fieldValues.width="480",this.content.feedbackContent.fieldValues.height="360",this.content.feedbackWidth="80%")}},Pf={key:0,class:"el-overlay",style:{"z-index":"5000"}},Gf={"aria-modal":"true",class:"el-overlay-dialog",role:"dialog"},Wf={class:"el-dialog__header"},Xf={class:"my-header"},qf=["id","innerHTML"],Yf={class:"el-dialog__body"},Jf=["innerHTML"],jf={key:1},$f={key:0},Zf=["innerHTML"],Am=["src"],cm=["innerHTML"],em={class:"el-dialog__footer"},tm={class:"dialog-footer"};function lm(A,c,e,t,l,s){var m;const a=n.resolveComponent("CloseBold"),r=n.resolveComponent("el-icon"),o=n.resolveComponent("el-button"),f=n.resolveComponent("lab-kaltura"),i=n.resolveComponent("lab-image");return l.show?(n.openBlock(),n.createElementBlock("div",Pf,[n.createElementVNode("div",Gf,[n.createElementVNode("div",{class:n.normalizeClass(["el-dialog",[((m=e.content.feedbackContent)==null?void 0:m.type)==="media"?"video_dialog":""]]),style:n.normalizeStyle({width:s.feedbackWidth}),tabindex:"-1"},[n.createElementVNode("header",Wf,[n.createElementVNode("div",Xf,[n.createElementVNode("h4",{id:A.titleId,class:n.normalizeClass(["el-dialog__title",A.titleClass]),innerHTML:s.feedbackHeader},null,10,qf)]),n.createVNode(o,{class:"el-dialog__headerbtn",size:"small",type:"primary",onClick:c[0]||(c[0]=n.withModifiers(u=>s.feedbackClose(),["stop"]))},{default:n.withCtx(()=>[n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(a)]),_:1})]),_:1})]),n.createElementVNode("div",Yf,[s.getShowFeedbackAttempts?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[e.content.feedbackAttempts?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.feedbackAttempts},null,8,Jf)):(n.openBlock(),n.createElementBlock("p",jf,"You have tried too many times, the correct answer has been provided for you."))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[e.content.feedbackContent?(n.openBlock(),n.createElementBlock("div",$f,[e.content.feedbackContent.type==="media"?(n.openBlock(),n.createBlock(f,{key:0,content:e.content.feedbackContent.fieldValues,class:n.normalizeClass([e.content.feedbackContent.fieldValues.class,{video:e.content.feedbackContent.fieldValues.kalturaType==="video"}])},null,8,["content","class"])):n.createCommentVNode("",!0),e.content.feedbackContent.type==="image"?(n.openBlock(),n.createBlock(i,{key:1,content:e.content.feedbackContent.fieldValues},null,8,["content"])):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:e.content.feedbackContent.directions},null,8,Zf)])):n.createCommentVNode("",!0),e.content.feedbackImage?(n.openBlock(),n.createElementBlock("img",{key:1,class:"im-ButtonImage",src:e.content.feedbackImage,alt:"button image"},null,8,Am)):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:e.content.feedback},null,8,cm)],64))]),n.createElementVNode("footer",em,[n.createElementVNode("span",tm,[n.createVNode(o,{size:"small",id:"feedbackClose",type:"primary",onClick:c[1]||(c[1]=n.withModifiers(u=>s.feedbackClose(),["stop"]))},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Close",-1)])]),_:1})])])],6)])])):n.createCommentVNode("",!0)}const nA=P(Rf,[["render",lm]]),L22="",sm={components:{},props:["content"],data(){return{quizArray:[],quizOptions:[],quizItemCompleted:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{},value1:""}},watch:{},computed:{quizArrayCount(){return this.quizArray.length-1},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},textResultAnswer(){const A="page",c=this.content.textResultsPage;return this.stepperStore.results.find(l=>l[A]===c).correctAnswer[0]}},methods:{quizArrayCompleted(A){return!(this.quizItemCompleted.includes(A)||A===0)},prepareQuiz(){this.quizArray=this.content.quiz.split("*_").filter(A=>A),this.content.options.forEach((A,c)=>{A.options?A.random?this.quizOptions.push(this.shuffle(A.options)):this.quizOptions.push(A.options):this.quizOptions.push(!1)})},quizType(A){return this.content.options[A]&&this.content.options[A].type?this.content.options[A].type:!1},quizDisplay(A){return this.content.options[A]&&this.content.options[A].display?this.content.options[A].display:"Select"},quizClass(A){return this.content.options[A]&&this.content.options[A].class?this.content.options[A].class:""},shuffle(A){let c=A.length,e;for(;c!=0;)e=Math.floor(Math.random()*c),c--,[A[c],A[e]]=[A[e],A[c]];return A},choicesCheck(){if(this.content.attempts===0||this.getAttempt<this.content.attempts){let A=!0,c=!1;this.input.length===0?this.content.options[0].stopFlow&&(c=!0,this.feedbackObject.feedbackHeader=this.content.options[0].notSelectedHeader,this.feedbackObject.feedback=this.content.options[0].notSelectedBody):this.content.options.forEach((e,t)=>{this.input[t]?this.input[t]!==this.content.options[t].answer&&(A=!1):this.content.options[this.input.length].stopFlow&&(c=!0,this.feedbackObject.feedbackHeader=this.content.options[this.input.length].notSelectedHeader,this.feedbackObject.feedback=this.content.options[this.input.length].notSelectedBody)}),this.stepperStore.attempts=this.getAttempt+1,A===!0&&this.input.length===this.quizArray.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(c||(this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback),this.content.attempts===0&&this.choicesComplete(!0),this.stepperStore.attempts=this.getAttempt+1)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.quizArray.forEach((a,r)=>{this.input[r]?this.input[r]=this.content.options[r].answer:this.input.push(this.content.options[r].answer),c.push(this.content.options[r].answer),this.quizItemCompleted.push(r+1)}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},choicesMade(A){this.quizItemCompleted.includes(A+1)===!1&&this.quizItemCompleted.push(A+1)},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.prepareQuiz(),this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-input__inner");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-input__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},nm={key:0,class:"textResults"},am=["innerHTML"],rm=["innerHTML"];function om(A,c,e,t,l,s){const a=n.resolveComponent("el-option"),r=n.resolveComponent("el-select"),o=n.resolveComponent("el-date-picker"),f=n.resolveComponent("el-button"),i=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["drop-down",e.content.class])},[e.content.textResults?(n.openBlock(),n.createElementBlock("div",nm,[e.content.textResultsHeader?(n.openBlock(),n.createElementBlock("p",{key:0,class:"textResultsHeader",innerHTML:e.content.textResultsHeader},null,8,am)):n.createCommentVNode("",!0),n.createElementVNode("p",{innerHTML:s.textResultAnswer},null,8,rm),c[1]||(c[1]=n.createElementVNode("hr",null,null,-1))])):n.createCommentVNode("",!0),n.createElementVNode("p",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(m,u)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("span",{class:n.normalizeClass(s.quizClass(u))},[n.createElementVNode("span",{class:n.normalizeClass("quizText quizSection_"+u)},n.toDisplayString(m)+" ",3),s.quizType(u)==="choose"?(n.openBlock(),n.createBlock(r,{key:0,onChange:d=>s.choicesMade(u),modelValue:l.input[u],"onUpdate:modelValue":d=>l.input[u]=d,placeholder:s.quizDisplay(u)},{default:n.withCtx(()=>[s.quizArrayCompleted(u)?n.createCommentVNode("",!0):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(l.quizOptions[u],d=>(n.openBlock(),n.createBlock(a,{key:d,label:d,value:d},null,8,["label","value"]))),128))]),_:2},1032,["onChange","modelValue","onUpdate:modelValue","placeholder"])):n.createCommentVNode("",!0),s.quizType(u)==="date"?(n.openBlock(),n.createBlock(o,{key:1,onChange:d=>s.choicesMade(u),modelValue:l.input[u],"onUpdate:modelValue":d=>l.input[u]=d,type:"date",placeholder:s.quizDisplay(u),format:e.content.options[u].format,"value-format":e.content.options[u].format,disabled:s.quizArrayCompleted(u)},null,8,["onChange","modelValue","onUpdate:modelValue","placeholder","format","value-format","disabled"])):n.createCommentVNode("",!0)],2),c[2]||(c[2]=n.createTextVNode(" ",-1))],64))),256))]),n.createVNode(f,{size:"small",type:"primary",class:"drop-down-submit",onClick:c[0]||(c[0]=m=>s.choicesCheck())},{default:n.withCtx(()=>[...c[3]||(c[3]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const im=P(sm,[["render",om]]),z22="",fm={components:{},props:["content"],data(){return{quizArray:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{},computed:{quizArrayCount(){return this.quizArray.length-1},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{prepareQuiz(){this.quizArray=this.content.quiz.split("*_")},choicesCheck(){this.getAttempt<this.content.attempts?(this.input.forEach((A,c)=>{if(this.content.answers[c]===A)this.correctChoices.includes(c)===!1&&this.correctChoices.push(c);else if(this.correctChoices.includes(c)===!0){let e=this.correctChoices.indexOf(c);this.correctChoices.splice(e,1)}}),this.input.length===0?(this.feedbackObject.feedbackHeader="You did not enter an answer",this.feedbackObject.feedback="Please enter your choice in the input field"):this.correctChoices.length===this.content.answers.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)):(this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1)),this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.input.forEach((a,r)=>{this.input[r]=this.content.answers[r],c.push(this.content.answers[r])}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.prepareQuiz(),this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-input__inner");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-input__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}};function mm(A,c,e,t,l,s){const a=n.resolveComponent("el-input"),r=n.resolveComponent("el-button"),o=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["fill-blank",e.content.class])},[n.createElementVNode("p",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(f,i)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createTextVNode(n.toDisplayString(f),1),i<s.quizArrayCount?(n.openBlock(),n.createBlock(a,{key:0,modelValue:l.input[i],"onUpdate:modelValue":m=>l.input[i]=m,placeholder:"Please input",size:"small"},null,8,["modelValue","onUpdate:modelValue"])):n.createCommentVNode("",!0)],64))),256))]),n.createVNode(r,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=f=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(o,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const um=P(fm,[["render",mm]]),M22="",pm={components:{Feedback:nA},props:["content"],data(){return{quizArray:[],quizArrayInputKeys:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{input:{handler:function(A){},deep:!0}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts},imageSrc(){return this.content.quiz_image.src.slice(-3)==="gif"?`${this.content.quiz_image.src}?src=${Math.round(Math.random()*Date.now())}`:this.content.quiz_image.src}},methods:{prepareQuiz(){this.quizArray=this.content.quiz.split("*"),this.quizArray.forEach((A,c)=>{A==="_"&&this.quizArrayInputKeys.push(c),this.input[c]=""})},keyBoardLayout(){let A="";return this.content.keyboard==="geometry"?A=[{label:"123",rows:[[{label:"x",shift:"y"},{label:"s",shift:"m"},{label:"[separator]",width:.5},"7","8","9","[/]",{label:"[separator]",width:.5},"\\frac{#?}{#?}","#@^{#?}","#@_{#?}"],["\\lt","\\gt",{label:"[separator]",width:.5},"4","5","6","[*]",{label:"[separator]",width:.5},"\\sqrt{#?}","\\sqrt[#?]{#?}","\\imaginaryI"],["\\le","\\ge",{label:"[separator]",width:.5},"1","2","3","[-]",{label:"[separator]",width:.5},{label:"\\sin",shift:"\\arcsin"},{label:"\\cos",shift:"\\arccos"},{label:"\\tan",shift:"\\arctan"}],["(",")",{label:"[separator]",width:.5},"0",".","[=]","[+]",{label:"[separator]",width:.5},"\\pi",{label:"[backspace]",width:2}],[{label:"[shift]",width:2},{label:"[separator]",width:.5},"[left]",{label:" ",width:2},"[right]",{label:"[separator]",width:1.5},{label:"[separator]",width:1},{label:"[return]",width:1}]]},"alphabetic"]:this.content.keyboard==="numberpad"&&(A=[{label:"123",rows:[["7","8","9","[/]",{label:"[separator]",width:.5},{label:"[backspace]",width:1}],["4","5","6","[*]",{label:"[separator]",width:.5},"\\frac{#?}{#?}"],["1","2","3","[-]",{label:"[separator]",width:.5},"#@^{#?}"],["0",".","[=]","[+]",{label:"[separator]",width:.5},"#@_{#?}"],["[left]",{label:" ",width:2},"[right]",{label:"[separator]",width:.5},{label:"[return]",width:1}]]}]),A},prepareMathLive(){mathVirtualKeyboard.show(),this.quizArray.forEach((A,c)=>{if(A==="_"){let e=document.getElementById("mf_"+c);e.mathVirtualKeyboardPolicy="sandboxed",e.addEventListener("click",t=>{mathVirtualKeyboard.layouts=this.keyBoardLayout(),mathVirtualKeyboard.show()}),e.addEventListener("focus",t=>{mathVirtualKeyboard.layouts=this.keyBoardLayout(),mathVirtualKeyboard.show()}),e.addEventListener("focusout",t=>{mathVirtualKeyboard.hide()}),e.addEventListener("blur",t=>{mathVirtualKeyboard.hide()}),e.addEventListener("input",t=>{let l=e.getValue();this.input[c]=l,this.renderMath(),e.setValue(l,{silenceNotifications:!0})})}})},choicesCheck(){if(this.getAttempt<this.content.attempts){let A=!0,c=0;this.quizArrayInputKeys.forEach((e,t)=>{if(this.input[e]!==""&&(A=!1),this.content.answers[c]===this.input[e])this.correctChoices.includes(e)===!1&&this.correctChoices.push(e);else if(this.correctChoices.includes(e)===!0){let l=this.correctChoices.indexOf(e);this.correctChoices.splice(l,1)}c++}),A?(this.feedbackObject.feedbackHeader="You did not enter an answer",this.feedbackObject.feedback="Please enter your choice in the input field"):this.correctChoices.length===this.content.answers.length?(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){let c=[],e="not correct";this.quizArrayInputKeys.forEach((a,r)=>{this.input[a]=this.content.answers[r],c.push(this.content.answers[r]),document.getElementById("mf_"+a).setValue(this.content.answers[r],{silenceNotifications:!0})}),A&&(e="correct");let t={page:this.stepperStore.stepPage,result:e,correctAnswer:c},l=this.stepperStore.results.find(a=>a.page===this.stepperStore.stepPage),s=this.stepperStore.results.indexOf(l);l?this.stepperStore.results.fill(l.result=e,s,s++):this.stepperStore.results.push(t),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})},leftColWidth(A){return A?Number(A):12},rightColWidth(A){return A?24-Number(A):A?12:24}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("quizInput");setTimeout(()=>{A[0].focus()})}this.prepareMathLive(),this.renderMath()},beforeMount(){this.prepareQuiz(),this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("quizInput"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},dm=["src","alt"],hm=["innerHTML"],gm=["innerHTML"],Cm=["innerHTML"],Bm=["innerHTML"],Lm={key:0};function zm(A,c,e,t,l,s){const a=n.resolveComponent("el-col"),r=n.resolveComponent("math-field"),o=n.resolveComponent("el-row"),f=n.resolveComponent("el-button"),i=n.resolveComponent("feedback");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(o,{class:n.normalizeClass(["fill-blank",e.content.class])},{default:n.withCtx(()=>{var m;return[e.content.quiz_image?(n.openBlock(),n.createBlock(a,{key:0,span:s.leftColWidth(e.content.quiz_image.colWidth)},{default:n.withCtx(()=>[n.createElementVNode("img",{src:s.imageSrc,alt:e.content.quiz_image.alt,class:n.normalizeClass(e.content.quiz_image.class)},null,10,dm),e.content.quiz_image.captionHeader?(n.openBlock(),n.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:e.content.quiz_image.captionHeader},null,8,hm)):n.createCommentVNode("",!0),e.content.quiz_image.caption?(n.openBlock(),n.createElementBlock("span",{key:1,class:"caption",innerHTML:e.content.quiz_image.caption},null,8,gm)):n.createCommentVNode("",!0),e.content.quiz_image.copyright?(n.openBlock(),n.createElementBlock("span",{key:2,innerHTML:e.content.quiz_image.copyright,class:"copyright"},null,8,Cm)):n.createCommentVNode("",!0)]),_:1},8,["span"])):n.createCommentVNode("",!0),n.createVNode(a,{span:s.rightColWidth((m=e.content.quiz_image)==null?void 0:m.colWidth)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.quizArray,(u,d)=>(n.openBlock(),n.createElementBlock("p",null,[u!=="_"?(n.openBlock(),n.createElementBlock("span",{key:0,class:"quizText",innerHTML:u},null,8,Bm)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createVNode(r,{class:"quizInput",id:"mf_"+d,style:{},"default-mode":e.content.mathMode},null,8,["id","default-mode"]),e.content.showLatext?(n.openBlock(),n.createElementBlock("span",Lm,n.toDisplayString(l.input[d]),1)):n.createCommentVNode("",!0)],64))]))),256))]),_:1},8,["span"])]}),_:1},8,["class"]),n.createVNode(f,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=m=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],64)}const Mm=P(pm,[["render",zm]]),w22="",wm={components:{},props:["content"],data(){return{feedbackIndex:-1,totalAttempts:99}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{leftColWidth(){return this.content.leftColWidth?Number(this.content.leftColWidth):12},rightColWidth(){return this.content.leftColWidth?this.content.leftColWidth<24?24-this.content.leftColWidth:24:12},pixelFormat(A){return this.stepperStore.pixelFormat(A)},choicesComplete(A){let c,e="not correct",t=document.querySelectorAll(".selectableButton");for(let r=0;r<t.length;r++)t[r].classList.add("is-failure"),t[r].setAttribute("disabled",!0),this.content.choices[r].correct&&(t[r].classList.add("is-success"),c=this.content.choices[r].text);A&&(e="correct");let l={page:this.stepperStore.stepPage,result:e,correctAnswer:c},s=this.stepperStore.results.find(r=>r.page===this.stepperStore.stepPage),a=this.stepperStore.results.indexOf(s);s?this.stepperStore.results.fill(s.result=e,a,a++):this.stepperStore.results.push(l),this.stepperStore.finishSteps()},choicesCheck(A){this.getAttempt<Number(this.content.attempts)?this.content.choices[A].correct===!0?this.choicesComplete(!0):this.stepperStore.attempts=this.getAttempt+1:(this.content.choices[A].correct!==!0&&(this.stepperStore.showFeedbackAttempts=!0),this.choicesComplete(!1)),this.feedbackIndex=A,this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},shuffledChoices(){let A=this.content.choices;for(let c=A.length-1;c>0;c--){const e=Math.floor(Math.random()*(c+1));[A[c],A[e]]=[A[e],A[c]]}this.content.choices=A},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("selectableButton");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("selectableButton"),this.feedbackIndex=-1,this.content.ordered||this.shuffledChoices(),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Qm=["innerHTML"],xm={class:"selectArea"},Fm={class:"buttonSpan"},ym=["src","alt"],bm={class:"selectable-buttonText"},Um=["innerHTML"],vm={class:"buttonSpan"},Sm=["src","alt"],Nm={class:"selectable-buttonText"};function Em(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("el-divider"),f=n.resolveComponent("el-button"),i=n.resolveComponent("lab-feedback"),m=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(m,{id:e.content.id,class:n.normalizeClass(["selectable",e.content.classes])},{default:n.withCtx(()=>[e.content.image?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(r,{span:s.leftColWidth(A.index)},{default:n.withCtx(()=>[e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0)]),_:1},8,["span"]),n.createVNode(r,{span:s.rightColWidth(A.index)},{default:n.withCtx(()=>[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,Qm)):n.createCommentVNode("",!0),n.createElementVNode("div",xm,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.choices,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[!e.content.noDivider&&d>0?(n.openBlock(),n.createBlock(o,{key:0})):n.createCommentVNode("",!0),n.createVNode(f,{size:"small",type:"primary",class:"selectableButton",style:n.normalizeStyle({width:s.pixelFormat(e.content.choiceWidth),height:s.pixelFormat(e.content.choiceHeight)}),onClick:p=>s.choicesCheck(d)},{default:n.withCtx(()=>[n.createElementVNode("div",Fm,[u.image?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:u.image,alt:u.alt?u.alt:"button image"},null,8,ym)):n.createCommentVNode("",!0),n.createElementVNode("span",bm,n.toDisplayString(u.text),1)])]),_:2},1032,["style","onClick"]),s.showFeedback(d)?(n.openBlock(),n.createBlock(i,{key:1,content:u},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))])]),_:1},8,["span"])],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createVNode(r,{span:12},{default:n.withCtx(()=>[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,Um)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(r,{span:12,class:"selectArea"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.choices,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[!e.content.noDivider&&d>0?(n.openBlock(),n.createBlock(o,{key:0})):n.createCommentVNode("",!0),n.createVNode(f,{size:"small",type:"primary",class:"selectableButton",style:n.normalizeStyle({width:s.pixelFormat(e.content.choiceWidth),height:s.pixelFormat(e.content.choiceHeight)}),onClick:p=>s.choicesCheck(d)},{default:n.withCtx(()=>[n.createElementVNode("div",vm,[u.image?(n.openBlock(),n.createElementBlock("img",{key:0,class:"im-ButtonImage",src:u.image,alt:u.alt?u.alt:"button image"},null,8,Sm)):n.createCommentVNode("",!0),n.createElementVNode("span",Nm,n.toDisplayString(u.text),1)])]),_:2},1032,["style","onClick"]),s.showFeedback(d)?(n.openBlock(),n.createBlock(i,{key:1,content:u},null,8,["content"])):n.createCommentVNode("",!0)],64))),256))]),_:1})],64))]),_:1},8,["id","class"])}const km=P(wm,[["render",Em],["__scopeId","data-v-a874847a"]]),Q22="",Hm={components:{},props:["content"],data(){return{input:"",totalAttempts:99,correctChoices:[],feedbackObject:{}}},watch:{},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{choicesCheck(){if(this.content.noGrade)this.choicesComplete(!0,this.input),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback;else if(this.getAttempt<this.content.attempts){let A=!1;this.content.answers.forEach((c,e)=>{let t=c.toLowerCase();this.input.toLowerCase().includes(t)||(A=!0)}),A?(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback):(this.choicesComplete(!0),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback)}else this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.stepperStore.showFeedbackAttempts=!0,this.choicesComplete(!1);this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A,c){let e=[],t="not correct";this.content.noGrade?e.push(c):this.content.answers.forEach(r=>{e.push(r)}),A&&(t="correct");let l={page:this.stepperStore.stepPage,result:t,correctAnswer:e},s=this.stepperStore.results.find(r=>r.page===this.stepperStore.stepPage),a=this.stepperStore.results.indexOf(s);s?this.stepperStore.results.fill(s.result=t,a,a++):this.stepperStore.results.push(l),this.stepperStore.finishSteps()},showFeedback(){return!!this.stepperStore.getShowFeedback},renderMath(){this.$mathjax&&MathJax.typesetPromise().then(()=>{console.log("MathJax typesetting done!")}).catch(A=>{console.error("MathJax typesetting failed:",A)})}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("el-textarea__inner");setTimeout(()=>{A[0].focus()})}this.content.input&&(this.input=this.content.input,this.choicesComplete(!0,this.content.input),this.stepperStore.finishSteps()),this.renderMath()},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("el-textarea__inner"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Im=["innerHTML"];function Tm(A,c,e,t,l,s){const a=n.resolveComponent("el-input"),r=n.resolveComponent("el-button"),o=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["textbox",e.content.class])},[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,Im),n.createVNode(a,{modelValue:l.input,"onUpdate:modelValue":c[0]||(c[0]=f=>l.input=f),autosize:{minRows:4,maxRows:8},type:"textarea",placeholder:"Please input"},null,8,["modelValue"]),this.content.input?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(r,{key:0,size:"small",type:"primary",class:"fill-blank-submit",onClick:c[1]||(c[1]=f=>s.choicesCheck())},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Submit",-1)])]),_:1})),s.showFeedback()?(n.openBlock(),n.createBlock(o,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const Dm=P(Hm,[["render",Tm]]),x22="",_m={components:{},props:["content"],data(){return{quizArray:[],quizOptions:[],input:[],totalAttempts:99,correctChoices:[],feedbackObject:{},value1:"",showMenuOverlay:!1}},watch:{},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{showSub(A){let c=document.getElementById(A);c.classList.contains("jl-menu-sub_show")?(this.showMenuOverlay=!1,this.hideSubs()):(this.showMenuOverlay=!0,c.classList.add("jl-menu-sub_show"))},showSubSub(A){let c=document.getElementById(A);c.classList.contains("jl-menu-sub-sub_show")?(this.showMenuOverlay=!1,this.hideSubs()):(this.showMenuOverlay=!0,c.classList.add("jl-menu-sub-sub_show"))},hideSubs(){this.showMenuOverlay=!1;let A=document.getElementsByClassName("jl-menu-sub_show");for(;A.length>0;)A[0].classList.remove("jl-menu-sub_show");let c=document.getElementsByClassName("jl-menu-sub-sub_show");for(;c.length>0;)c[0].classList.remove("jl-menu-sub-sub_show")},choicesCheck(A){this.hideSubs();let c=!1,e="";if(this.getAttempt<this.content.attempts){if(console.log("got some left"),typeof A=="string"){let t=A.split("-");t.forEach((l,s)=>{t[s]=Number(l)}),t.length===2?this.content.menu[t[0]].subMenu[t[1]].correct&&(this.content.menu[t[0]].subMenu[t[1]].page&&(e=this.content.menu[t[0]].subMenu[t[1]].page),c=!0):t.length===3&&this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].correct&&(this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].page&&(e=this.content.menu[t[0]].subMenu[t[1]].subMenu[t[2]].page),c=!0)}else this.content.menu[A].correct&&(this.content.menu[A].page&&(e=this.content.menu[A].page),c=!0);c?(this.choicesComplete(e),this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback):(this.stepperStore.attempts=this.getAttempt+1,this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback)}else this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.feedbackAttempts,this.choicesComplete();e===""&&(this.stepperStore.showFeedback=!0),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},choicesComplete(A){this.stepperStore.finishSteps(),typeof A<"u"&&A!==""&&(this.stepperStore.currentPage=A)},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){this.stepperStore.getDirections.display===!1&&(document.getElementsByClassName("jl-menu-sub"),setTimeout(()=>{}))},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("jl-menu-sub"),this.content.attempts&&(this.totalAttempts=this.content.attempts)}},Km={key:0},Om=["index","onClick"],Vm={class:"jl-menu-sub__title"},Rm=["id"],Pm=["index","onClick"],Gm={class:"jl-menu-sub-sub__title"},Wm=["id"],Xm=["index","onClick"],qm=["onClick"],Ym={key:1,class:"jl-menu-item"},Jm=["index","onClick"];function jm(A,c,e,t,l,s){const a=n.resolveComponent("CaretBottom"),r=n.resolveComponent("el-icon"),o=n.resolveComponent("CaretRight"),f=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["menu-chooser",e.content.class])},[l.showMenuOverlay?(n.openBlock(),n.createElementBlock("div",{key:0,class:"nav-mask",onClick:c[0]||(c[0]=(...i)=>s.hideSubs&&s.hideSubs(...i))})):n.createCommentVNode("",!0),n.createElementVNode("p",null,n.toDisplayString(e.content.quiz),1),n.createElementVNode("div",{class:"jl-menu",onSelect:c[1]||(c[1]=(...i)=>s.choicesCheck&&s.choicesCheck(...i))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.menu,(i,m)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[i.subMenu?(n.openBlock(),n.createElementBlock("div",Km,[n.createElementVNode("button",{class:n.normalizeClass("jl-menu-sub sub-"+m),index:m,tabindex:"0",role:"menuitem",onClick:n.withModifiers(u=>s.showSub("sub-"+m),["stop"])},[n.createElementVNode("div",Vm,[n.createTextVNode(n.toDisplayString(i.name)+" ",1),n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(a)]),_:1})])],10,Om),n.createElementVNode("div",{class:"jl-menu-sub-menu",id:"sub-"+m},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.subMenu,(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[u.subMenu?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("button",{class:n.normalizeClass("jl-menu-sub-sub sub-sub-"+d),index:m+"-"+d,tabindex:"0",role:"menuitem",onClick:n.withModifiers(p=>s.showSubSub("sub-sub-"+m),["stop"])},[n.createElementVNode("div",Gm,[n.createTextVNode(n.toDisplayString(u.name),1),n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(o)]),_:1})])],10,Pm),n.createElementVNode("div",{class:"jl-menu-sub-sub-menu",id:"sub-sub-"+m},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.subMenu,(p,h)=>(n.openBlock(),n.createElementBlock("button",{class:"jl-menu-sub-sub-item",index:m+"-"+d+"-"+h,tabindex:"0",role:"menuitem",onClick:n.withModifiers(B=>s.choicesCheck(m+"-"+d+"-"+h),["stop"])},[n.createElementVNode("div",null,n.toDisplayString(p.name),1)],8,Xm))),256))],8,Wm)],64)):(n.openBlock(),n.createElementBlock("button",{key:1,class:"jl-menu-sub-item",tabindex:"0",role:"menuitem",onClick:n.withModifiers(p=>s.choicesCheck(m+"-"+d),["stop"])},[n.createElementVNode("div",null,n.toDisplayString(u.name),1)],8,qm))],64))),256))],8,Rm)])):(n.openBlock(),n.createElementBlock("div",Ym,[n.createElementVNode("button",{class:"jl-menu-sub",index:m,tabindex:"0",role:"menuitem",onClick:n.withModifiers(u=>s.choicesCheck(m),["stop"])},n.toDisplayString(i.name),9,Jm)]))],64))),256))],32),s.showFeedback()?(n.openBlock(),n.createBlock(f,{key:1,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const $m=P(_m,[["render",jm]]),F22="",Zm={components:{},props:["content"],data(){return{feedbackIndex:-1,totalAttempts:99,selected:[],correctChoices:[],feedbackObject:{}}},computed:{getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{createCorrectChoices(){for(let A=0;A<this.content.options.length;A++)this.content.options[A].isCorrect===!0&&this.correctChoices.push(A)},pixelFormat(A){return this.stepperStore.pixelFormat(A)},choicesComplete(A){let c="not correct";A&&(c="correct");let e={page:this.stepperStore.stepPage,result:c,correctAnswer:this.correctChoices},t=this.stepperStore.results.find(s=>s.page===this.stepperStore.stepPage),l=this.stepperStore.results.indexOf(t);t?this.stepperStore.results.fill(t.result=c,l,l++):this.stepperStore.results.push(e),this.stepperStore.finishSteps()},choicesMark(A){this.selected.includes(A)?this.selected=this.selected.filter(c=>c!==A):this.selected.push(A)},choicesCheck(A){function c(e,t){if(e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}this.getAttempt<Number(this.content.attempts)?c(this.selected,this.correctChoices)?(this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=this.content.correctHeader,this.feedbackObject.feedback=this.content.correctFeedback,this.choicesComplete(!0)):(this.feedbackObject.feedbackHeader=this.content.incorrectHeader,this.feedbackObject.feedback=this.content.incorrectFeedback,this.stepperStore.attempts=this.getAttempt+1):(c(this.selected,this.correctChoices)||(this.stepperStore.showFeedbackAttempts=!0,this.feedbackObject.feedbackAttempts=this.content.feedbackAttempts,this.selected=this.correctChoices),this.choicesComplete(!1)),this.feedbackIndex=A,this.stepperStore.showFeedback=!0,setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})},showFeedback(A){return!!(this.stepperStore.getShowFeedback&&this.feedbackIndex===A)}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("selectableButton");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("selectableButton"),this.feedbackIndex=-1,this.content.attempts&&(this.totalAttempts=this.content.attempts),this.createCorrectChoices()}},Au=["innerHTML"],cu={class:"multiSentance"},eu=["innerHTML","onClick"],tu=["innerHTML"];function lu(A,c,e,t,l,s){const a=n.resolveComponent("el-button"),r=n.resolveComponent("lab-feedback");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["textbox",e.content.class])},[n.createElementVNode("p",{innerHTML:e.content.quiz},null,8,Au),n.createElementVNode("div",cu,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.options,(o,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[o.button?(n.openBlock(),n.createElementBlock("a",{key:0,role:"button",class:n.normalizeClass(["multiSentanceButton el-button",{"el-button--success":l.selected.includes(f),"el-button--primary":!l.selected.includes(f)}]),innerHTML:o.content,tabindex:"1",onClick:i=>s.choicesMark(f),href:"javascript:void(0)"},null,10,eu)):(n.openBlock(),n.createElementBlock("span",{key:1,innerHTML:o.content},null,8,tu))],64))),256))]),n.createVNode(a,{size:"small",type:"primary",class:"fill-blank-submit",onClick:c[0]||(c[0]=o=>s.choicesCheck())},{default:n.withCtx(()=>[...c[1]||(c[1]=[n.createTextVNode("Submit",-1)])]),_:1}),s.showFeedback()?(n.openBlock(),n.createBlock(r,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0)],2)}const su=P(Zm,[["render",lu],["__scopeId","data-v-38862b63"]]),y22="",aA={y:{t:"top",m:"marginTop",b:"bottom"},x:{l:"left",m:"marginLeft",r:"right"}};function nu(A){A.forEach((c,e)=>{document.documentElement.addEventListener(e,c)})}function au(A){A.forEach((c,e)=>{document.documentElement.removeEventListener(e,c)})}const ru={name:"vue-drag-resize",emits:["clicked","dragging","dragstop","resizing","resizestop","activated","deactivated"],props:{stickSize:{type:Number,default:8},parentScaleX:{type:Number,default:1},parentScaleY:{type:Number,default:1},isActive:{type:Boolean,default:!1},preventActiveBehavior:{type:Boolean,default:!1},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},aspectRatio:{type:Boolean,default:!1},parentLimitation:{type:Boolean,default:!1},snapToGrid:{type:Boolean,default:!1},gridX:{type:Number,default:50,validator(A){return A>=0}},gridY:{type:Number,default:50,validator(A){return A>=0}},parentW:{type:Number,default:0,validator(A){return A>=0}},parentH:{type:Number,default:0,validator(A){return A>=0}},w:{type:[String,Number],default:200,validator(A){return typeof A=="string"?A==="auto":A>=0}},h:{type:[String,Number],default:200,validator(A){return typeof A=="string"?A==="auto":A>=0}},minw:{type:Number,default:50,validator(A){return A>=0}},minh:{type:Number,default:50,validator(A){return A>=0}},x:{type:Number,default:0,validator(A){return typeof A=="number"}},y:{type:Number,default:0,validator(A){return typeof A=="number"}},z:{type:[String,Number],default:"auto",validator(A){return typeof A=="string"?A==="auto":A>=0}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},sticks:{type:Array,default(){return["tl","tm","tr","mr","br","bm","bl","ml"]}},axis:{type:String,default:"both",validator(A){return["x","y","both","none"].indexOf(A)!==-1}},contentClass:{type:String,required:!1,default:""}},data(){return{fixAspectRatio:null,active:null,zIndex:null,parentWidth:null,parentHeight:null,left:null,top:null,right:null,bottom:null,minHeight:null}},beforeCreate(){this.stickDrag=!1,this.bodyDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.currentStick=null},mounted(){this.parentElement=this.$el.parentNode,this.parentWidth=this.parentW?this.parentW:this.parentElement.clientWidth,this.parentHeight=this.parentH?this.parentH:this.parentElement.clientHeight,this.left=this.x,this.top=this.y,this.right=this.parentWidth-(this.w==="auto"?this.$refs.container.scrollWidth:this.w)-this.left,this.bottom=this.parentHeight-(this.h==="auto"?this.$refs.container.scrollHeight:this.h)-this.top,this.domEvents=new Map([["mousemove",this.move],["mouseup",this.up],["mouseleave",this.up],["mousedown",this.deselect],["touchmove",this.move],["touchend",this.up],["touchcancel",this.up],["touchstart",this.up]]),nu(this.domEvents),this.dragHandle&&[...this.$el.querySelectorAll(this.dragHandle)].forEach(A=>{A.setAttribute("data-drag-handle",this._uid)}),this.dragCancel&&[...this.$el.querySelectorAll(this.dragCancel)].forEach(A=>{A.setAttribute("data-drag-cancel",this._uid)})},beforeUnmount(){au(this.domEvents)},methods:{deselect(){this.preventActiveBehavior||(this.active=!1)},move(A){if(!this.stickDrag&&!this.bodyDrag)return;A.stopPropagation();const c=typeof A.pageX<"u"?A.pageX:A.touches[0].pageX,e=typeof A.pageY<"u"?A.pageY:A.touches[0].pageY,{dimensionsBeforeMove:t}=this,l={x:(t.pointerX-c)/this.parentScaleX,y:(t.pointerY-e)/this.parentScaleY};if(this.stickDrag&&this.stickMove(l),this.bodyDrag){if(this.axis==="x")l.y=0;else if(this.axis==="y")l.x=0;else if(this.axis==="none")return;this.bodyMove(l)}},up(A){this.stickDrag?this.stickUp(A):this.bodyDrag&&this.bodyUp(A)},bodyDown(A){const{target:c,button:e}=A;if(this.preventActiveBehavior||(this.active=!0),e&&e!==0||(this.$emit("clicked",A),!this.active)||this.dragHandle&&c.getAttribute("data-drag-handle")!==this._uid.toString()||this.dragCancel&&c.getAttribute("data-drag-cancel")===this._uid.toString())return;typeof A.stopPropagation<"u"&&A.stopPropagation(),typeof A.preventDefault<"u"&&A.preventDefault(),this.isDraggable&&(this.bodyDrag=!0);const t=typeof A.pageX<"u"?A.pageX:A.touches[0].pageX,l=typeof A.pageY<"u"?A.pageY:A.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:t,pointerY:l}),this.parentLimitation&&(this.limits=this.calcDragLimitation())},bodyMove(A){const{dimensionsBeforeMove:c,parentWidth:e,parentHeight:t,gridX:l,gridY:s,width:a,height:r}=this;let o=c.top-A.y,f=c.bottom+A.y,i=c.left-A.x,m=c.right+A.x;if(this.snapToGrid){let u=!0,d=!0,p=o-Math.floor(o/s)*s,h=t-f-Math.floor((t-f)/s)*s,B=i-Math.floor(i/l)*l,C=e-m-Math.floor((e-m)/l)*l;p>s/2&&(p-=s),h>s/2&&(h-=s),B>l/2&&(B-=l),C>l/2&&(C-=l),Math.abs(h)<Math.abs(p)&&(u=!1),Math.abs(C)<Math.abs(B)&&(d=!1),o-=u?p:h,f=t-r-o,i-=d?B:C,m=e-a-i}({newLeft:this.left,newRight:this.right,newTop:this.top,newBottom:this.bottom}=this.rectCorrectionByLimit({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.$emit("dragging",this.rect)},bodyUp(){this.bodyDrag=!1,this.$emit("dragging",this.rect),this.$emit("dragstop",this.rect),this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}}},stickDown(A,c,e=!1){if((!this.isResizable||!this.active)&&!e)return;this.stickDrag=!0;const t=typeof c.pageX<"u"?c.pageX:c.touches[0].pageX,l=typeof c.pageY<"u"?c.pageY:c.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:t,pointerY:l}),this.currentStick=A,this.limits=this.calcResizeLimits()},saveDimensionsBeforeMove({pointerX:A,pointerY:c}){this.dimensionsBeforeMove.pointerX=A,this.dimensionsBeforeMove.pointerY=c,this.dimensionsBeforeMove.left=this.left,this.dimensionsBeforeMove.right=this.right,this.dimensionsBeforeMove.top=this.top,this.dimensionsBeforeMove.bottom=this.bottom,this.dimensionsBeforeMove.width=this.width,this.dimensionsBeforeMove.height=this.height,this.aspectFactor=this.width/this.height},stickMove(A){const{currentStick:c,dimensionsBeforeMove:e,gridY:t,gridX:l,snapToGrid:s,parentHeight:a,parentWidth:r}=this;let o=e.top,f=e.bottom,i=e.left,m=e.right;switch(c[0]){case"b":f=e.bottom+A.y,s&&(f=a-Math.round((a-f)/t)*t);break;case"t":o=e.top-A.y,s&&(o=Math.round(o/t)*t);break}switch(c[1]){case"r":m=e.right+A.x,s&&(m=r-Math.round((r-m)/l)*l);break;case"l":i=e.left-A.x,s&&(i=Math.round(i/l)*l);break}({newLeft:i,newRight:m,newTop:o,newBottom:f}=this.rectCorrectionByLimit({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.aspectRatio&&({newLeft:i,newRight:m,newTop:o,newBottom:f}=this.rectCorrectionByAspectRatio({newLeft:i,newRight:m,newTop:o,newBottom:f})),this.left=i,this.right=m,this.top=o,this.bottom=f,this.$emit("resizing",this.rect)},stickUp(){this.stickDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.$emit("resizing",this.rect),this.$emit("resizestop",this.rect)},calcDragLimitation(){const{parentWidth:A,parentHeight:c}=this;return{left:{min:0,max:A-this.width},right:{min:0,max:A-this.width},top:{min:0,max:c-this.height},bottom:{min:0,max:c-this.height}}},calcResizeLimits(){const{aspectFactor:A,width:c,height:e,bottom:t,top:l,left:s,right:a}=this;let{minh:r,minw:o}=this;const f=this.parentLimitation?0:null;this.aspectRatio&&(o/r>A?r=o/A:o=A*r);const i={left:{min:f,max:s+(c-o)},right:{min:f,max:a+(c-o)},top:{min:f,max:l+(e-r)},bottom:{min:f,max:t+(e-r)}};if(this.aspectRatio){const m={left:{min:s-Math.min(l,t)*A*2,max:s+(e-r)/2*A*2},right:{min:a-Math.min(l,t)*A*2,max:a+(e-r)/2*A*2},top:{min:l-Math.min(s,a)/A*2,max:l+(c-o)/2/A*2},bottom:{min:t-Math.min(s,a)/A*2,max:t+(c-o)/2/A*2}};this.currentStick[0]==="m"?(i.left={min:Math.max(i.left.min,m.left.min),max:Math.min(i.left.max,m.left.max)},i.right={min:Math.max(i.right.min,m.right.min),max:Math.min(i.right.max,m.right.max)}):this.currentStick[1]==="m"&&(i.top={min:Math.max(i.top.min,m.top.min),max:Math.min(i.top.max,m.top.max)},i.bottom={min:Math.max(i.bottom.min,m.bottom.min),max:Math.min(i.bottom.max,m.bottom.max)})}return i},sideCorrectionByLimit(A,c){let e=c;return A.min!==null&&c<A.min?e=A.min:A.max!==null&&A.max<c&&(e=A.max),e},rectCorrectionByLimit(A){const{limits:c}=this;let{newRight:e,newLeft:t,newBottom:l,newTop:s}=A;return t=this.sideCorrectionByLimit(c.left,t),e=this.sideCorrectionByLimit(c.right,e),s=this.sideCorrectionByLimit(c.top,s),l=this.sideCorrectionByLimit(c.bottom,l),{newLeft:t,newRight:e,newTop:s,newBottom:l}},rectCorrectionByAspectRatio(A){let{newLeft:c,newRight:e,newTop:t,newBottom:l}=A;const{parentWidth:s,parentHeight:a,currentStick:r,aspectFactor:o,dimensionsBeforeMove:f}=this;let i=s-c-e,m=a-t-l;if(r[1]==="m"){const u=m-f.height;c-=u*o/2,e-=u*o/2}else if(r[0]==="m"){const u=i-f.width;t-=u/o/2,l-=u/o/2}else i/m>o?(i=o*m,r[1]==="l"?c=s-e-i:e=s-c-i):(m=i/o,r[0]==="t"?t=a-l-m:l=a-t-m);return{newLeft:c,newRight:e,newTop:t,newBottom:l}}},computed:{positionStyle(){return{top:this.top+"px",left:this.left+"px",zIndex:this.zIndex}},sizeStyle(){return{width:this.width+"px",height:this.height+"px"}},vdrStick(){return A=>{const c={width:`${this.stickSize/this.parentScaleX}px`,height:`${this.stickSize/this.parentScaleY}px`};return c[aA.y[A[0]]]=`${this.stickSize/this.parentScaleX/-2}px`,c[aA.x[A[1]]]=`${this.stickSize/this.parentScaleX/-2}px`,c}},width(){return this.parentWidth-this.left-this.right},height(){return this.parentHeight-this.top-this.bottom},rect(){return{left:Math.round(this.left),top:Math.round(this.top),width:Math.round(this.width),height:Math.round(this.height)}}},watch:{active(A){A?this.$emit("activated"):this.$emit("deactivated")},isActive:{immediate:!0,handler(A){this.active=A}},z:{immediate:!0,handler(A){(A>=0||A==="auto")&&(this.zIndex=A)}},x:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.left)return;const e=c-A;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:e,y:0}),this.$nextTick(()=>{this.bodyUp()})}},y:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.top)return;const e=c-A;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:0,y:e}),this.$nextTick(()=>{this.bodyUp()})}},w:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.width)return;const e="mr",t=c-A;this.stickDown(e,{pageX:this.right,pageY:this.top+this.height/2},!0),this.stickMove({x:t,y:0}),this.$nextTick(()=>{this.stickUp()})}},h:{handler(A,c){if(this.stickDrag||this.bodyDrag||A===this.height)return;const e="bm",t=c-A;this.stickDown(e,{pageX:this.left+this.width/2,pageY:this.bottom},!0),this.stickMove({x:0,y:t}),this.$nextTick(()=>{this.stickUp()})}},parentW(A){this.right=A-this.width-this.left,this.parentWidth=A},parentH(A){this.bottom=A-this.height-this.top,this.parentHeight=A}}},ou=["onMousedown","onTouchstart"];function iu(A,c,e,t,l,s){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["vdr",`${l.active||e.isActive?"active":"inactive"} ${e.contentClass?e.contentClass:""}`]),style:n.normalizeStyle(s.positionStyle),onMousedown:c[0]||(c[0]=a=>s.bodyDown(a)),onTouchstart:c[1]||(c[1]=a=>s.bodyDown(a)),onTouchend:c[2]||(c[2]=a=>s.up(a)),ref:"container",tabindex:"0"},[n.createElementVNode("div",{style:n.normalizeStyle(s.sizeStyle),class:"content-container",ref:"container2"},[n.renderSlot(A.$slots,"default")],4),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.sticks,a=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["vdr-stick",["vdr-stick-"+a,e.isResizable?"":"not-resizable"]]),onMousedown:n.withModifiers(r=>s.stickDown(a,r),["stop","prevent"]),onTouchstart:n.withModifiers(r=>s.stickDown(a,r),["stop","prevent"]),style:n.normalizeStyle(s.vdrStick(a))},null,46,ou))),256))],38)}const rA=P(ru,[["render",iu]]),b22="",fu={components:{VueDragResize:rA},props:["content"],data(){return{}},watch:{},computed:{},methods:{onResizstop(A){console.log("i have stopped resizing",A)},onDragstop(A){},reset(){this.listOne=[]},getParentWidth(){let A=document.getElementsByClassName("fridgemagnet");setTimeout(()=>A[0].offsetWidth)},getParentHeight(){let A=document.getElementsByClassName("fridgemagnet");setTimeout(()=>A[0].offsetHeight)},keyboardMove(A){for(let c of A)document.getElementById(c.id).addEventListener("focusin",t=>{let l=document.getElementsByClassName("fridgemagnet");addEventListener("keydown",function(s){let a=document.getElementById(s.target.id);if(s.altKey&&s.key==="ArrowLeft"){let r=Number(a.style.left.slice(0,-2));r-10<0?a.style.left=`${r}px`:a.style.left=`${r-10}px`}if(s.altKey&&s.key==="ArrowRight"){let r=Number(a.style.left.slice(0,-2));r+10>l[0].offsetWidth-50?a.style.left=`${r}px`:a.style.left=`${r+10}px`}if(s.altKey&&s.key==="ArrowUp"){let r=Number(a.style.top.slice(0,-2));r+10<0?a.style.top=`${r}px`:a.style.top=`${r-10}px`}if(s.altKey&&s.key==="ArrowDown"){let r=Number(a.style.top.slice(0,-2));r+10>l[0].offsetHeight-80?a.style.top=`${r}px`:a.style.top=`${r+10}px`}})})}},mounted(){let A=document.getElementsByClassName("vdr");setTimeout(()=>{A[0].focus()}),this.keyboardMove(A)},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("vdr")}},mu={class:"fridgemagnet"},uu=["innerHTML"],pu=["src","alt"],du=["id","src","alt"],hu=["innerHTML"];function gu(A,c,e,t,l,s){const a=n.resolveComponent("VueDragResize");return n.openBlock(),n.createElementBlock("div",mu,[e.content.quiz?(n.openBlock(),n.createElementBlock("p",{key:0,innerHTML:e.content.quiz},null,8,uu)):n.createCommentVNode("",!0),n.createElementVNode("img",{src:e.content.image,alt:e.content.imageAlt},null,8,pu),n.createElementVNode("div",{class:n.normalizeClass(["fridge",e.content.class,e.content.noOutline?"no_outline":""])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.content.magnets,(r,o)=>(n.openBlock(),n.createBlock(a,{id:"vdr_"+o,isActive:!0,w:r.width?r.width:50,minw:r.minWidth?r.minWidth:50,h:r.height?r.height:50,minh:r.minHeight?r.minHeight:50,x:r.x?r.x:0,y:r.y?r.y:60*o,class:n.normalizeClass(r.class),parentLimitation:!0,parentW:r.parentwidth?r.parentwidth:s.getParentWidth(),parentH:r.parentheight?r.parentheight:s.getParentHeight(),isResizable:r.resizable,isDraggable:r.draggable,snapToGrid:r.snap,gridX:r.snapX,gridY:r.snapY,dragHandle:r.handle,onResizing:A.resize,onDragging:A.resize,aspectRatio:!0,onResizestop:s.onResizstop,onDragstop:s.onDragstop,sticks:["tl","bl","tr","br"]},{default:n.withCtx(()=>[r.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:r.index,src:r.image,alt:r.imageAlt},null,8,du)):n.createCommentVNode("",!0),r.text?(n.openBlock(),n.createElementBlock("p",{key:1,innerHTML:r.text},null,8,hu)):n.createCommentVNode("",!0)]),_:2},1032,["id","w","minw","h","minh","x","y","class","parentW","parentH","isResizable","isDraggable","snapToGrid","gridX","gridY","dragHandle","onResizing","onDragging","onResizestop","onDragstop"]))),256))],2)])}const Cu=P(fu,[["render",gu]]),U22="",Bu={components:{},props:["content"],data(){return{binCount:0,listOne:[]}},watch:{},computed:{binColumns(){return Math.round(24/this.binCount)},myList:{get(){return this.listOne}}},methods:{createItems(){this.binCount=this.content.bins.length,this.content.bins.forEach(A=>{this.listOne.push(A.items)})},dragBackground(A){return`white url(${A}) 0 0 no-repeat`},pixelFormat(A){return this.stepperStore.pixelFormat(A)},checkMove(A){var c;if(this.content.sound){let e=document.getElementById("myAudio");setTimeout(()=>{e.play()},1e3)}if(A!=="clicked"&&((c=A.draggedContext.element)!=null&&c.relSwap)&&setTimeout(()=>{let e=A.draggedContext.element.id,t=document.getElementById(e);t.src=A.draggedContext.element.relSwap,t.classList.add("imageSwapped")},1500),this.stepperStore.stepHold=!1,this.stepperStore.finishSteps(),this.stepperStore.lastPageFocus(),A!=="clicked")return!A.from.classList.contains("preventMove")},reset(){this.listOne=[],this.createItems()},keyboardDrag(A,c){if(A.class.indexOf("preventMove")>-1)return!1;A.class+=" preventMove",this.listOne[c].splice(A),this.listOne[c+1].push(A),A.relSwap&&setTimeout(()=>{this.listOne[c+1][0].image=this.listOne[c+1][0].relSwap},1500),this.checkMove("clicked")}},mounted(){let A=document.getElementsByClassName("dragItems-button");setTimeout(()=>{A[0].focus()})},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("dragItems-button"),this.createItems()}},Lu=["innerHTML"],zu={key:1,id:"myAudio"},Mu=["src"],wu={class:"list-group-item"},Qu=["onChange"],xu=["id","src","alt","data-swap"],Fu=["src","alt","data-swap"];function yu(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("draggable"),f=n.resolveComponent("el-row");return n.openBlock(),n.createBlock(f,{class:n.normalizeClass(["dragDrop",e.content.handle])},{default:n.withCtx(()=>[n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,Lu),e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0),e.content.sound?(n.openBlock(),n.createElementBlock("audio",zu,[n.createElementVNode("source",{src:e.content.sound,type:"audio/mpeg"},null,8,Mu),c[0]||(c[0]=n.createTextVNode(" Your browser does not support the audio element. ",-1))])):n.createCommentVNode("",!0)]),_:1}),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(i,m)=>(n.openBlock(),n.createBlock(r,{span:s.binColumns},{default:n.withCtx(()=>[n.createVNode(o,{class:n.normalizeClass(["draggable list-group",e.content.bins[m].class]),style:n.normalizeStyle({width:s.pixelFormat(e.content.bins[m].width),height:s.pixelFormat(e.content.bins[m].height),background:s.dragBackground(e.content.bins[m].bgImage)}),modelValue:s.myList[m],"onUpdate:modelValue":u=>s.myList[m]=u,move:s.checkMove,group:"people",forceFallback:"true"},{item:n.withCtx(({element:u})=>[n.createElementVNode("div",wu,[n.createElementVNode("button",{class:"dragItems-button",onChange:n.withModifiers(d=>s.keyboardDrag(u,m),["stop"])},[n.createTextVNode(n.toDisplayString(u.text)+" ",1),u.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:u.id,src:u.image,alt:u.imageAlt,"data-swap":u.relSwap},null,8,xu)):n.createCommentVNode("",!0),u.relSwap?(n.openBlock(),n.createElementBlock("img",{key:1,id:"preload",src:u.relSwap,alt:u.imageAlt,"data-swap":u.relSwap},null,8,Fu)):n.createCommentVNode("",!0)],40,Qu)])]),_:2},1032,["class","style","modelValue","onUpdate:modelValue","move"])]),_:2},1032,["span"]))),256))]),_:1},8,["class"])}const bu=P(Bu,[["render",yu]]),v22="",Uu={components:{},props:["content"],data(){return{binCount:0,listOne:[],listTwo:[],listTwoCompleted:[],totalAttempts:99,choice:{header:"",feedback:""},chooseBin:{},chooseVisibility:!1,kbCurrentId:"",feedbackObject:{}}},watch:{},computed:{binColumns(){return Math.round(24/this.binCount)},myList:{get(){return this.listOne}},myList2:{get(){return this.listTwo}},getAttempt(){return this.stepperStore.getAttempts},getShowFeedbackAttempts(){return this.stepperStore.getShowFeedbackAttempts}},methods:{recordResults(A){let c=[];this.content.bins.forEach(s=>{let a=[];s.items.forEach(o=>{let f={text:o.text,imageAlt:o.imageAlt};a.push(f)});let r={header:s.header,description:s.description,items:a};c.push(r)});let e={page:this.stepperStore.stepPage,result:A,correctAnswer:c},t=this.stepperStore.results.find(s=>s.page===this.stepperStore.stepPage),l=this.stepperStore.results.indexOf(t);t?this.stepperStore.results.fill(t.result=A,l,l++):this.stepperStore.results.push(e)},failed(){this.listTwo.length>0&&(this.listTwo.forEach(A=>{this.listOne.forEach(c=>{c.forEach(e=>{A.id===e.id&&c.push(A)})})}),this.listTwo="",this.choice.header=this.content.failedHeader,this.choice.feedback=this.content.failedFeedback,this.feedbackVisibility=!0),this.recordResults("not correct"),this.stepperStore.finishSteps()},createItems(){this.binCount=this.content.bins.length,this.content.bins.forEach((A,c)=>{let e=Math.round(Date.now()/Math.random());A.items.forEach(t=>{t.hide=!0,t.id=e,t.oldKey=c,this.listTwo.push(t)}),this.listOne.push(JSON.parse(JSON.stringify(A.items)))}),this.listTwo.forEach(A=>{A.hide=!1}),this.content.random&&this.listTwo.sort(()=>Math.random()-.5)},dragBackground(A){return`white url(${A}) 0 0 no-repeat`},pixelFormat(A){return this.stepperStore.pixelFormat(A)},checkMove(A){if(A.to.dataset.index){let c=this.listOne[A.to.dataset.index],e=A.oldIndex,t=!1;c.forEach(l=>{l.hide===!0&&l.id===A.item._underlying_vm_.id&&(t=!0)}),t?(this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=A.item._underlying_vm_.correctHeader,this.feedbackObject.feedback=A.item._underlying_vm_.correctFeedback,this.feedbackObject.feedbackImage=A.item._underlying_vm_.correctFeedbackImage,this.listTwoCompleted.push(e),this.myList2.length===0&&(this.stepperStore.finishSteps(),this.recordResults("correct"))):(this.feedbackObject.feedbackHeader=A.item._underlying_vm_.incorrectHeader,this.feedbackObject.feedback=A.item._underlying_vm_.incorrectFeedback,this.feedbackObject.feedbackImage=A.item._underlying_vm_.incorrectFeedbackImage,this.listTwo.push(A.item._underlying_vm_),this.getAttempt<this.content.attempts?this.stepperStore.attempts=this.getAttempt+1:(this.stepperStore.showFeedbackAttempts=!0,this.failed()),this.stepperStore.showFeedback=!0,c.forEach((l,s)=>{l.id===A.item._underlying_vm_.id&&c.splice(s,1)})),setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})}},stopMove(){return!1},kbCheckMove(A,c){if(typeof A>"u")this.chooseVisibility=!1;else{if(this.listOne[A][c].id===this.kbCurrentId){let t=-1;this.listTwo.forEach((l,s)=>{l.id===this.kbCurrentId&&(t=s)}),this.stepperStore.showFeedback=!0,this.feedbackObject.feedbackHeader=this.listOne[A][c].correctHeader,this.feedbackObject.feedback=this.listOne[A][c].correctFeedback,this.feedbackObject.feedbackImage=this.listOne[A][c].correctFeedbackImage,this.chooseVisibility=!1,this.listTwoCompleted.push(A),this.listTwo.splice(t,1),this.myList2.length===0&&this.stepperStore.finishSteps(),this.listOne[A][c].hide=!1}else this.feedbackObject.feedbackHeader=this.listOne[A][c].incorrectHeader,this.feedbackObject.feedback=this.listOne[A][c].incorrectFeedback,this.feedbackObject.feedbackImage=this.listOne[A][c].incorrectFeedbackImage,this.chooseVisibility=!1,this.stepperStore.showFeedback=!0,this.getAttempt<this.content.attempts?this.stepperStore.attempts=this.getAttempt+1:(this.chooseVisibility=!1,this.stepperStore.showFeedbackAttempts=!0,this.failed());setTimeout(()=>{document.getElementById("feedbackClose")&&document.getElementById("feedbackClose").focus()})}},keyboardDrag(A){if(A.class.indexOf("preventMove")>0)return!1;this.chooseVisibility=!0,this.kbCurrentId=A.id,setTimeout(()=>{document.getElementById("firstBin").focus()})},showFeedback(){return!!this.stepperStore.getShowFeedback}},mounted(){if(this.stepperStore.getDirections.display===!1){let A=document.getElementsByClassName("dragItems-button");setTimeout(()=>{A[0].focus()})}},beforeMount(){this.stepperStore=this.stepperMain(),this.stepperStore.resetSteps("dragItems-button"),this.stepperStore.attempts=0,this.content.attempts&&(this.totalAttempts=this.content.attempts),this.createItems()}},vu=["innerHTML"],Su=["onClick"],Nu=["id","src","alt"],Eu={key:0,class:"dropBin"},ku={class:"dragItems-button"},Hu=["id","src","alt"],Iu={class:"dialog-footer"};function Tu(A,c,e,t,l,s){const a=n.resolveComponent("lab-image"),r=n.resolveComponent("el-col"),o=n.resolveComponent("draggable"),f=n.resolveComponent("el-row"),i=n.resolveComponent("lab-feedback"),m=n.resolveComponent("el-button"),u=n.resolveComponent("el-dialog");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(f,{class:n.normalizeClass(["dragDrop",e.content.handle]),id:"dragItemDiv"},{default:n.withCtx(()=>[n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createElementVNode("div",{innerHTML:e.content.quiz},null,8,vu),e.content.image?(n.openBlock(),n.createBlock(a,{key:0,content:e.content.image,image:{supportImage:!0}},null,8,["content"])):n.createCommentVNode("",!0)]),_:1}),n.createVNode(r,{span:24},{default:n.withCtx(()=>[n.createVNode(o,{class:"dragItems",list:l.listTwo,group:"put",forceFallback:"true",itemKey:"image",sort:!1,onEnd:s.checkMove},{item:n.withCtx(({element:d})=>[n.createElementVNode("div",{class:n.normalizeClass(["dragItem",d.class])},[n.createElementVNode("button",{class:"dragItems-button",onClick:n.withModifiers(p=>s.keyboardDrag(d),["stop"])},[n.createTextVNode(n.toDisplayString(d.text)+" ",1),d.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:d.id,src:d.image,alt:d.imageAlt},null,8,Nu)):n.createCommentVNode("",!0)],8,Su)],2)]),_:1},8,["list","onEnd"])]),_:1}),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(d,p)=>(n.openBlock(),n.createBlock(r,{class:"bins",span:s.binColumns},{default:n.withCtx(()=>[n.createElementVNode("h4",null,n.toDisplayString(e.content.bins[p].header),1),n.createVNode(o,{class:n.normalizeClass(["dropBins el-row",e.content.bins[p].class]),"data-index":p,list:l.listOne[p],group:"put",forceFallback:"true",itemKey:"text",sort:!1,move:s.stopMove},{item:n.withCtx(({element:h})=>[h.hide?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Eu,[n.createElementVNode("button",ku,[n.createTextVNode(n.toDisplayString(h.text)+" ",1),h.image?(n.openBlock(),n.createElementBlock("img",{key:0,id:h.id,src:h.droppedImage,alt:h.imageAlt},null,8,Hu)):n.createCommentVNode("",!0)])]))]),_:1},8,["class","data-index","list","move"])]),_:2},1032,["span"]))),256))]),_:1},8,["class"]),s.showFeedback()?(n.openBlock(),n.createBlock(i,{key:0,content:l.feedbackObject},null,8,["content"])):n.createCommentVNode("",!0),n.createVNode(u,{title:e.content.kbModalQuestion,modelValue:l.chooseVisibility,"onUpdate:modelValue":c[1]||(c[1]=d=>l.chooseVisibility=d),width:"50%"},{footer:n.withCtx(()=>[n.createElementVNode("span",Iu,[n.createVNode(m,{size:"small",id:"visibilityClose",type:"primary",onClick:c[0]||(c[0]=d=>s.kbCheckMove())},{default:n.withCtx(()=>[...c[2]||(c[2]=[n.createTextVNode("Close",-1)])]),_:1})])]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.listOne,(d,p)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d,(h,B)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[p===0?(n.openBlock(),n.createBlock(m,{key:0,id:"firstBin",size:"small",type:"primary",onClick:C=>s.kbCheckMove(p,B)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.content.bins[p].header),1)]),_:2},1032,["onClick"])):(n.openBlock(),n.createBlock(m,{key:1,size:"small",type:"primary",onClick:C=>s.kbCheckMove(p,B)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.content.bins[p].header),1)]),_:2},1032,["onClick"]))],64))),256))],64))),256))]),_:1},8,["title","modelValue"])],64)}const Du=P(Uu,[["render",Tu]]),_u="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M12.5%208c-2.65%200-5.05.99-6.9%202.6L2%207v9h9l-3.62-3.62c1.39-1.16%203.16-1.88%205.12-1.88c3.54%200%206.55%202.31%207.6%205.5l2.37-.78C21.08%2011.03%2017.15%208%2012.5%208'/%3e%3c/svg%3e",Ku="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M18.4%2010.6C16.55%208.99%2014.15%208%2011.5%208c-4.65%200-8.58%203.03-9.96%207.22L3.9%2016a8.002%208.002%200%200%201%207.6-5.5c1.95%200%203.73.72%205.12%201.88L13%2016h9V7z'/%3e%3c/svg%3e",Ou="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M19%204h-3.5l-1-1h-5l-1%201H5v2h14M6%2019a2%202%200%200%200%202%202h8a2%202%200%200%200%202-2V7H6z'/%3e%3c/svg%3e",Vu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M21%207v12q0%20.825-.587%201.413T19%2021H5q-.825%200-1.412-.587T3%2019V5q0-.825.588-1.412T5%203h12zm-9%2011q1.25%200%202.125-.875T15%2015t-.875-2.125T12%2012t-2.125.875T9%2015t.875%202.125T12%2018m-6-8h9V6H6z'/%3e%3c/svg%3e",Ru={class:"vp-toolbar"},Pu={class:"vp-tools"},Gu=["onClick","title","innerHTML"],Wu={class:"vp-settings"},Xu={class:"vp-actions"},qu=n.createElementVNode("img",{src:_u},null,-1),Yu=[qu],Ju=n.createElementVNode("img",{src:Ku},null,-1),ju=[Ju],$u=n.createElementVNode("img",{src:Ou},null,-1),Zu=[$u],Ap=n.createElementVNode("img",{src:Vu},null,-1),cp=[Ap],ep=n.defineComponent({__name:"VpToolbar",props:n.mergeModels({tools:{}},{settings:{default:()=>({tool:"freehand",thickness:5,color:"#c82d2d"})},settingsModifiers:{}}),emits:n.mergeModels(["set-tool","save","undo","redo","reset"],["update:settings"]),setup(A,{emit:c}){const e=c,t=n.useModel(A,"settings");return(l,s)=>(n.openBlock(),n.createElementBlock("div",Ru,[n.renderSlot(l.$slots,"default",{},()=>[n.renderSlot(l.$slots,"tools",{},()=>[n.createElementVNode("div",Pu,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.tools.filter(a=>a.icon),a=>n.renderSlot(l.$slots,`tool-${a.type}`,{},()=>[(n.openBlock(),n.createElementBlock("button",{key:a.type,class:n.normalizeClass([t.value.tool===a.type?"active":"",`vp-tool-${a.type}`]),onClick:r=>e("set-tool",a.type),title:a.type,innerHTML:a.icon},null,10,Gu))])),256))])]),n.renderSlot(l.$slots,"settings",{},()=>[n.createElementVNode("div",Wu,[n.renderSlot(l.$slots,"setting-thickness",{},()=>[n.withDirectives(n.createElementVNode("input",{type:"range",min:"1",max:"10",class:"vp-setting-thickness","onUpdate:modelValue":s[0]||(s[0]=a=>t.value.thickness=a)},null,512),[[n.vModelText,t.value.thickness]])]),n.renderSlot(l.$slots,"setting-color",{},()=>[n.withDirectives(n.createElementVNode("input",{type:"color",class:"vp-setting-color","onUpdate:modelValue":s[1]||(s[1]=a=>t.value.color=a)},null,512),[[n.vModelText,t.value.color]])])])]),n.renderSlot(l.$slots,"actions",{},()=>[n.createElementVNode("div",Xu,[n.renderSlot(l.$slots,"action-undo",{},()=>[n.createElementVNode("button",{onClick:s[2]||(s[2]=a=>e("undo")),class:"vp-action-undo"},Yu)]),n.renderSlot(l.$slots,"action-redo",{},()=>[n.createElementVNode("button",{onClick:s[3]||(s[3]=a=>e("redo")),class:"vp-action-redo"},ju)]),n.renderSlot(l.$slots,"action-reset",{},()=>[n.createElementVNode("button",{onClick:s[4]||(s[4]=a=>e("reset")),class:"vp-action-reset"},Zu)]),n.renderSlot(l.$slots,"action-save",{},()=>[n.createElementVNode("button",{onClick:s[5]||(s[5]=a=>e("save")),class:"vp-action-save"},cp)])])])])]))}});function w0({history:A,tools:c,activeShape:e,includeActiveShape:t}){return{simplifiedHistory:n.computed(()=>{const l=e!=null&&e.value?[...A.value,e.value]:[...A.value];return c.value.reduce((s,a)=>{var r;return((r=a.simplifyHistory)==null?void 0:r.call(a,s,c.value))??s},l).filter(s=>{var a;return t||s.id!==((a=e==null?void 0:e.value)==null?void 0:a.id)})})}}function c3(){return[26,36,36,36,36,36,36].map(A=>Math.floor(Math.random()*A+(36-A)).toString(36)).join("")}const tp=["viewBox","id"],lp=n.defineComponent({__name:"VpImage",props:{tools:{},activeShape:{},history:{},width:{},height:{}},setup(A,{expose:c}){const e=A,t=n.ref(),l=n.ref(c3());c({svg:t});function s(i){return e.tools.find(m=>m.type===i)}const a=n.computed(()=>e.tools.map(i=>i.svgStyle?typeof i.svgStyle=="function"?i.svgStyle({svgId:l.value}):n.unref(i.svgStyle):"").join(`
|
|
2
2
|
`)),{simplifiedHistory:r}=w0({...n.toRefs(e),includeActiveShape:!1}),o=n.computed(()=>e.tools.filter(i=>i.ToolSvgComponent&&(i.ToolSvgComponent.layer??0)<=0).sort((i,m)=>{var u,d;return(((u=i.ToolSvgComponent)==null?void 0:u.layer)??0)-(((d=m.ToolSvgComponent)==null?void 0:d.layer)??0)})),f=n.computed(()=>e.tools.filter(i=>i.ToolSvgComponent&&(i.ToolSvgComponent.layer??0)>0).sort((i,m)=>{var u,d;return(((u=i.ToolSvgComponent)==null?void 0:u.layer)??0)-(((d=m.ToolSvgComponent)==null?void 0:d.layer)??0)}));return(i,m)=>{var u;return n.openBlock(),n.createElementBlock("svg",{ref_key:"svg",ref:t,viewBox:`0 0 ${i.width} ${i.height}`,id:l.value,xmlns:"http://www.w3.org/2000/svg",class:"vp-image"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,d=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.ToolSvgComponent),{key:d.type,history:i.history,tools:i.tools,activeShape:i.activeShape,width:i.width,height:i.height},null,8,["history","tools","activeShape","width","height"]))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r),d=>{var p,h,B;return n.openBlock(),n.createBlock(n.resolveDynamicComponent((p=s(d.type))==null?void 0:p.ShapeSvgComponent),{key:d.id+d.id===((h=i.activeShape)==null?void 0:h.id),id:d.id,shape:d,history:i.history,tools:i.tools,width:i.width,height:i.height,"is-active":d.id===((B=i.activeShape)==null?void 0:B.id)},null,8,["id","shape","history","tools","width","height","is-active"])}),128)),i.activeShape?(n.openBlock(),n.createBlock(n.resolveDynamicComponent((u=s(i.activeShape.type))==null?void 0:u.ShapeSvgComponent),{key:0,id:i.activeShape.id,shape:i.activeShape,history:i.history,tools:i.tools,width:i.width,height:i.height,"is-active":""},null,8,["id","shape","history","tools","width","height"])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,d=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.ToolSvgComponent),{key:d.type,history:i.history,tools:i.tools,activeShape:i.activeShape,width:i.width,height:i.height},null,8,["history","tools","activeShape","width","height"]))),128)),n.createElementVNode("svg:style",null,n.toDisplayString(a.value),1)],8,tp)}}}),oA={tool:"freehand",thickness:5,color:"#c82d2d",angleSnap:!1};function iA(A,c={}){const e=A.find(t=>t.icon);return n.ref(Object.assign({},oA,{tool:(e==null?void 0:e.type)??"freehand"},c))}function fA({snapAngles:A,posStart:c,x:e,y:t}){if(!(A!=null&&A.value))return{x:e,y:t};const l=e-c.x,s=t-c.y,a=Math.sqrt(Math.pow(l,2)+Math.pow(s,2)),r=Math.atan2(s,l),o=A.value.map(f=>(180-f)*Math.PI/180).map(f=>({angle:f,diff:sp(r,f)})).sort((f,i)=>f.diff-i.diff)[0].angle;return{x:c.x+a*Math.cos(o),y:c.y+a*Math.sin(o)}}function sp(A,c){return Math.PI-Math.abs(Math.abs(A-c)-Math.PI)}function e3(A){return n.getCurrentScope()?(n.onScopeDispose(A),!0):!1}function r1(A){return typeof A=="function"?A():n.unref(A)}const np=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ap=A=>A!=null,rp=Object.prototype.toString,op=A=>rp.call(A)==="[object Object]",mA=()=>{};function ip(A,c,e=!1){return c.reduce((t,l)=>(l in A&&(!e||A[l]!==void 0)&&(t[l]=A[l]),t),{})}function fp(A){return n.getCurrentInstance()}function mp(A,c={}){if(!n.isRef(A))return n.toRefs(A);const e=Array.isArray(A.value)?Array.from({length:A.value.length}):{};for(const t in A.value)e[t]=n.customRef(()=>({get(){return A.value[t]},set(l){var s;if((s=r1(c.replaceRef))==null||s)if(Array.isArray(A.value)){const a=[...A.value];a[t]=l,A.value=a}else{const a={...A.value,[t]:l};Object.setPrototypeOf(a,Object.getPrototypeOf(A.value)),A.value=a}else A.value[t]=l}}));return e}function up(A,c=!0,e){fp()?n.onMounted(A,e):c?A():n.nextTick(A)}function pp(A,c,e){return n.watch(A,(t,l,s)=>{t&&c(t,l,s)},{...e,once:!1})}function o1(A){var c;const e=r1(A);return(c=e==null?void 0:e.$el)!=null?c:e}const i1=np?window:void 0;function c2(...A){let c,e,t,l;if(typeof A[0]=="string"||Array.isArray(A[0])?([e,t,l]=A,c=i1):[c,e,t,l]=A,!c)return mA;Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);const s=[],a=()=>{s.forEach(i=>i()),s.length=0},r=(i,m,u,d)=>(i.addEventListener(m,u,d),()=>i.removeEventListener(m,u,d)),o=n.watch(()=>[o1(c),r1(l)],([i,m])=>{if(a(),!i)return;const u=op(m)?{...m}:m;s.push(...e.flatMap(d=>t.map(p=>r(i,d,p,u))))},{immediate:!0,flush:"post"}),f=()=>{o(),a()};return e3(f),f}function dp(){const A=n.ref(!1),c=n.getCurrentInstance();return c&&n.onMounted(()=>{A.value=!0},c),A}function uA(A){const c=dp();return n.computed(()=>(c.value,!!A()))}function pA(A,c,e={}){const{window:t=i1,...l}=e;let s;const a=uA(()=>t&&"MutationObserver"in t),r=()=>{s&&(s.disconnect(),s=void 0)},o=n.computed(()=>{const u=r1(A),d=(Array.isArray(u)?u:[u]).map(o1).filter(ap);return new Set(d)}),f=n.watch(()=>o.value,u=>{r(),a.value&&u.size&&(s=new MutationObserver(c),u.forEach(d=>s.observe(d,l)))},{immediate:!0,flush:"post"}),i=()=>s==null?void 0:s.takeRecords(),m=()=>{r(),f()};return e3(m),{isSupported:a,stop:m,takeRecords:i}}function hp(A={}){var c;const{window:e=i1,deep:t=!0,triggerOnRemoval:l=!1}=A,s=(c=A.document)!=null?c:e==null?void 0:e.document,a=()=>{var f;let i=s==null?void 0:s.activeElement;if(t)for(;i!=null&&i.shadowRoot;)i=(f=i==null?void 0:i.shadowRoot)==null?void 0:f.activeElement;return i},r=n.ref(),o=()=>{r.value=a()};return e&&(c2(e,"blur",f=>{f.relatedTarget===null&&o()},!0),c2(e,"focus",o,!0)),l&&pA(s,f=>{f.filter(i=>i.removedNodes.length).map(i=>Array.from(i.removedNodes)).flat().forEach(i=>{i===r.value&&o()})},{childList:!0,subtree:!0}),o(),r}function gp(A,c,e={}){const{window:t=i1,...l}=e;let s;const a=uA(()=>t&&"ResizeObserver"in t),r=()=>{s&&(s.disconnect(),s=void 0)},o=n.computed(()=>Array.isArray(A)?A.map(m=>o1(m)):[o1(A)]),f=n.watch(o,m=>{if(r(),a.value&&t){s=new ResizeObserver(c);for(const u of m)u&&s.observe(u,l)}},{immediate:!0,flush:"post"}),i=()=>{r(),f()};return e3(i),{isSupported:a,stop:i}}function Cp(A,c={}){const{reset:e=!0,windowResize:t=!0,windowScroll:l=!0,immediate:s=!0}=c,a=n.ref(0),r=n.ref(0),o=n.ref(0),f=n.ref(0),i=n.ref(0),m=n.ref(0),u=n.ref(0),d=n.ref(0);function p(){const h=o1(A);if(!h){e&&(a.value=0,r.value=0,o.value=0,f.value=0,i.value=0,m.value=0,u.value=0,d.value=0);return}const B=h.getBoundingClientRect();a.value=B.height,r.value=B.bottom,o.value=B.left,f.value=B.right,i.value=B.top,m.value=B.width,u.value=B.x,d.value=B.y}return gp(A,p),n.watch(()=>o1(A),h=>!h&&p()),pA(A,p,{attributeFilter:["style","class"]}),l&&c2("scroll",p,{capture:!0,passive:!0}),t&&c2("resize",p,{passive:!0}),up(()=>{s&&p()}),{height:a,bottom:r,left:o,right:f,top:i,width:m,x:u,y:d,update:p}}const Bp={ctrl:"control",command:"meta",cmd:"meta",option:"alt",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright"};function Lp(A={}){const{reactive:c=!1,target:e=i1,aliasMap:t=Bp,passive:l=!0,onEventFired:s=mA}=A,a=n.reactive(new Set),r={toJSON(){return{}},current:a},o=c?n.reactive(r):r,f=new Set,i=new Set;function m(h,B){h in o&&(c?o[h]=B:o[h].value=B)}function u(){a.clear();for(const h of i)m(h,!1)}function d(h,B){var C,g;const L=(C=h.key)==null?void 0:C.toLowerCase(),M=[(g=h.code)==null?void 0:g.toLowerCase(),L].filter(Boolean);L&&(B?a.add(L):a.delete(L));for(const w of M)i.add(w),m(w,B);L==="meta"&&!B?(f.forEach(w=>{a.delete(w),m(w,!1)}),f.clear()):typeof h.getModifierState=="function"&&h.getModifierState("Meta")&&B&&[...a,...M].forEach(w=>f.add(w))}c2(e,"keydown",h=>(d(h,!0),s(h)),{passive:l}),c2(e,"keyup",h=>(d(h,!1),s(h)),{passive:l}),c2("blur",u,{passive:!0}),c2("focus",u,{passive:!0});const p=new Proxy(o,{get(h,B,C){if(typeof B!="string")return Reflect.get(h,B,C);if(B=B.toLowerCase(),B in t&&(B=t[B]),!(B in o))if(/[+_-]/.test(B)){const L=B.split(/[+_-]/g).map(M=>M.trim());o[B]=n.computed(()=>L.every(M=>r1(p[M])))}else o[B]=n.ref(!1);const g=Reflect.get(h,B,C);return c?r1(g):g}});return p}function zp(A={}){const{touch:c=!0,drag:e=!0,capture:t=!1,initialValue:l=!1,window:s=i1}=A,a=n.ref(l),r=n.ref(null);if(!s)return{pressed:a,sourceType:r};const o=m=>()=>{a.value=!0,r.value=m},f=()=>{a.value=!1,r.value=null},i=n.computed(()=>o1(A.target)||s);return c2(i,"mousedown",o("mouse"),{passive:!0,capture:t}),c2(s,"mouseleave",f,{passive:!0,capture:t}),c2(s,"mouseup",f,{passive:!0,capture:t}),e&&(c2(i,"dragstart",o("mouse"),{passive:!0,capture:t}),c2(s,"drop",f,{passive:!0,capture:t}),c2(s,"dragend",f,{passive:!0,capture:t})),c&&(c2(i,"touchstart",o("touch"),{passive:!0,capture:t}),c2(s,"touchend",f,{passive:!0,capture:t}),c2(s,"touchcancel",f,{passive:!0,capture:t})),{pressed:a,sourceType:r}}const dA={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Mp=Object.keys(dA);function wp(A={}){const{target:c=i1}=A,e=n.ref(!1),t=n.ref(A.initialValue||{});Object.assign(t.value,dA,t.value);const l=s=>{e.value=!0,!(A.pointerTypes&&!A.pointerTypes.includes(s.pointerType))&&(t.value=ip(s,Mp,!1))};if(c){const s={passive:!0};c2(c,["pointerdown","pointermove","pointerup"],l,s),c2(c,"pointerleave",()=>e.value=!1,s)}return{...mp(t),isInside:e}}let t3=!1;function Qp({target:A,onDrawStart:c,onDraw:e,onDrawEnd:t,width:l,height:s,snapAngles:a}){const{x:r,y:o,pressure:f}=wp(),{pressed:i,sourceType:m}=zp(),{top:u,left:d,right:p,bottom:h,width:B,height:C,update:g}=Cp(A),L=n.ref(!1),M=n.reactive({x:0,y:0}),w=n.reactive({x:0,y:0}),z=n.reactive({x:0,y:0,left:0,top:0}),b=n.computed(()=>fA({snapAngles:a,posStart:M,x:Math.round((r.value-d.value)*l.value/B.value),y:Math.round((o.value-u.value)*s.value/C.value)})),v=n.computed(()=>b.value.x),F=n.computed(()=>b.value.y),U=n.computed(()=>Math.max(0,Math.min(M.x,v.value))),T=n.computed(()=>Math.max(0,Math.min(M.y,F.value))),O=n.computed(()=>Math.min(l.value,Math.max(M.x,v.value))),E=n.computed(()=>Math.min(s.value,Math.max(M.y,F.value))),_=n.computed(()=>r.value>=d.value&&r.value<=p.value&&o.value>=u.value&&o.value<=h.value),r2=n.computed(()=>Math.floor(r.value)!==z.x||Math.floor(o.value)!==z.y);return n.watchEffect(()=>{const A2=!L.value&&r.value===z.x&&o.value===z.y&&(d.value!==z.left||u.value!==z.top);let H=f.value;f.value===0&&i.value&&m.value==="touch"&&(H=.5),H&&!L.value&&_.value&&r2.value&&!t3&&!A2?(g(),L.value=!0,t3=!0,M.x=v.value,M.y=F.value,w.x=v.value,w.y=F.value,c==null||c()):H&&L.value?(w.x=v.value,w.y=F.value,e==null||e()):!H&&L.value&&(L.value=!1,t3=!1,t==null||t()),z.x=Math.floor(r.value),z.y=Math.floor(o.value),z.left=Math.floor(d.value),z.top=Math.floor(u.value)}),{x:v,y:F,minX:U,minY:T,maxX:O,maxY:E,top:u,left:d,bottom:h,right:p,width:l,height:s,posStart:M,posEnd:w,isDrawing:L,isInside:_,absoluteX:r,absoluteY:o,isMoving:r2}}let hA;function gA(){function A(e){hA=e}function c(){return hA}return{setActiveEditor:A,getActiveEditor:c}}function xp({vpImage:A,tools:c,history:e,settings:t,width:l,height:s,emit:a}){const r=n.ref([]),o=n.ref(),f=n.ref();function i(){return c==null?void 0:c.find(k=>k.type===(f.value??t.value.tool))}const m=n.computed(()=>{var k;return t.value.angleSnap?(k=i())==null?void 0:k.snapAngles:void 0}),u=n.computed(()=>{var k;return{settings:t.value,activeShape:o.value,id:((k=o.value)==null?void 0:k.id)??c3(),isDrawing:F.value,tools:c,posStart:b,posEnd:v,left:M.value,right:z.value,top:L.value,bottom:w.value,width:l,height:s,x:d.value,y:p.value,minX:h.value,maxX:C.value,minY:B.value,maxY:g.value,absoluteX:U.value,absoluteY:T.value}}),{x:d,y:p,minX:h,minY:B,maxX:C,maxY:g,top:L,left:M,bottom:w,right:z,posStart:b,posEnd:v,isDrawing:F,absoluteX:U,absoluteY:T}=Qp({target:A,width:l,height:s,snapAngles:m,onDrawStart(){var k,R,t2,B2,l2,L2;f.value=(B2=(t2=(R=(k=document.elementsFromPoint(U.value,T.value))==null?void 0:k[0])==null?void 0:R.getAttribute("class"))==null?void 0:t2.split(" ").find(d2=>d2.startsWith("use-tool-")))==null?void 0:B2.substring(9),o.value=((L2=(l2=i())==null?void 0:l2.onDrawStart)==null?void 0:L2.call(l2,u.value))??o.value,a==null||a("drawStart",u.value),J(H)},onDraw(){var k,R;o.value=((R=(k=i())==null?void 0:k.onDraw)==null?void 0:R.call(k,u.value))??o.value,a==null||a("draw",u.value),J(H)},async onDrawEnd(){var k,R,t2;o.value=(k=i())!=null&&k.onDrawEnd?await((t2=(R=i())==null?void 0:R.onDrawEnd)==null?void 0:t2.call(R,u.value)):o.value,f.value=void 0,a==null||a("drawEnd",u.value),J(H),o.value&&(e.value.push(o.value),r.value=[],o.value=void 0)}});function O(k){t.value.tool=k,J(H)}function E(){e.value.length&&(r.value.push(...e.value.slice(-1)),e.value=e.value.slice(0,-1)),J(H)}function _(){r.value.length&&(e.value.push(...r.value.slice(-1)),r.value=r.value.slice(0,-1)),J(H)}function r2(){const k=A.value.$refs.svg;if(!k)throw new Error("Couldn't find the svg");a==null||a("save",{svg:k,tools:c,history:e.value}),J(H)}async function A2(){r.value=e.value.reverse(),e.value=[];const k=await Promise.all(c.filter(R=>"onInitialize"in R).flatMap(async R=>{var t2;return await((t2=R.onInitialize)==null?void 0:t2.call(R,{tools:c,settings:t,history:e}))}));e.value=[...k.filter(Boolean),...e.value],a==null||a("reset"),J(H)}const H={settings:t,activeShape:o,setTool:O,undo:E,redo:_,save:r2,reset:A2,x:d,y:p,minX:h,minY:B,maxX:C,maxY:g,top:L,left:M,bottom:w,right:z,posStart:b,posEnd:v,isDrawing:F,absoluteX:U,absoluteY:T},{setActiveEditor:J}=gA();return J(H),H}const CA=n.defineComponent({__name:"VpEditor",props:n.mergeModels({tools:{},width:{default:1280},height:{default:720}},{settings:{default:()=>oA},settingsModifiers:{},history:{default:[]},historyModifiers:{}}),emits:n.mergeModels(["save","drawStart","draw","drawEnd","reset"],["update:settings","update:history"]),setup(A,{emit:c}){const e=c,t=n.useModel(A,"settings"),l=A,s=n.ref(l.width),a=n.ref(l.height),r=n.useModel(A,"history"),o=n.ref(),{activeShape:f,setTool:i,undo:m,redo:u,save:d,reset:p}=xp({vpImage:o,tools:l.tools,history:n.toRef(r),settings:n.toRef(t),width:s,height:a,emit:e});return n.onMounted(()=>{var h;(h=r.value)!=null&&h.length||p()}),(h,B)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["vue-paint vp-editor",`active-tool-${t.value.tool}`])},[n.createVNode(lp,{ref_key:"vpImage",ref:o,tools:h.tools,activeShape:n.unref(f),history:r.value,width:s.value,height:a.value},null,8,["tools","activeShape","history","width","height"]),n.renderSlot(h.$slots,"toolbar",{setTool:n.unref(i),undo:n.unref(m),redo:n.unref(u),save:n.unref(d),reset:n.unref(p),settings:t.value},()=>[n.createVNode(ep,{settings:t.value,"onUpdate:settings":B[0]||(B[0]=C=>t.value=C),onSetTool:n.unref(i),onUndo:n.unref(m),onRedo:n.unref(u),onSave:n.unref(d),onReset:n.unref(p),tools:h.tools},null,8,["settings","onSetTool","onUndo","onRedo","onSave","onReset","tools"])])],2))}});function L1(A){return{props:{history:Array,shape:Object,width:Number,height:Number,isActive:Boolean,tools:Array},setup(c){return()=>A(c.shape,c)}}}const Fp=1e-12,BA=112e-18,yp=A=>A>=-BA&&A<=BA,LA=(A,c)=>Math.sqrt(A*A+c*c),z1=(A,c)=>({x:A,y:c}),bp=A=>LA(A.x,A.y),Up=A=>z1(-A.x,-A.y),D1=(A,c)=>z1(A.x+c.x,A.y+c.y),z2=(A,c)=>z1(A.x-c.x,A.y-c.y),f1=(A,c)=>z1(A.x*c,A.y*c),v2=(A,c)=>A.x*c.x+A.y*c.y,l3=(A,c)=>LA(A.x-c.x,A.y-c.y),W2=(A,c=1)=>f1(A,c/(bp(A)||1/0)),zA=(A,c)=>({p:A,i:c}),vp=(A,c,e)=>{c&&(A.unshift(A[A.length-1]),A.push(A[1]));const t=A.length;if(t===0)return[];const l=[zA(A[0])];return s3(A,l,e,0,t-1,z2(A[1],A[0]),z2(A[t-2],A[t-1])),c&&(l.shift(),l.pop()),l},s3=(A,c,e,t,l,s,a)=>{if(l-t===1){const u=A[t],d=A[l],p=l3(u,d)/3;MA(c,[u,D1(u,W2(s,p)),D1(d,W2(a,p)),d]);return}const r=kp(A,t,l);let o=Math.max(e,e*e),f,i=!0;for(let u=0;u<=4;u++){const d=Sp(A,t,l,r,s,a),p=Hp(A,t,l,d,r);if(p.error<e&&i){MA(c,d);return}if(f=p.index,p.error>=o)break;i=Np(A,t,l,r,d),o=p.error}const m=z2(A[f-1],A[f+1]);s3(A,c,e,t,f,s,m),s3(A,c,e,f,l,Up(m),a)},MA=(A,c)=>{const e=A[A.length-1];e.o=z2(c[1],c[0]),A.push(zA(c[3],z2(c[2],c[3])))},Sp=(A,c,e,t,l,s)=>{const a=Fp,r=Math.abs,o=A[c],f=A[e],i=[[0,0],[0,0]],m=[0,0];for(let L=0,M=e-c+1;L<M;L++){const w=t[L],z=1-w,b=3*w*z,v=z*z*z,F=b*z,U=b*w,T=w*w*w,O=W2(l,F),E=W2(s,U),_=z2(z2(A[c+L],f1(o,v+F)),f1(f,U+T));i[0][0]+=v2(O,O),i[0][1]+=v2(O,E),i[1][0]=i[0][1],i[1][1]+=v2(E,E),m[0]+=v2(O,_),m[1]+=v2(E,_)}const u=i[0][0]*i[1][1]-i[1][0]*i[0][1];let d,p;if(r(u)>a){const L=i[0][0]*m[1]-i[1][0]*m[0];d=(m[0]*i[1][1]-m[1]*i[0][1])/u,p=L/u}else{const L=i[0][0]+i[0][1],M=i[1][0]+i[1][1];d=p=r(L)>a?m[0]/L:r(M)>a?m[1]/M:0}const h=l3(f,o),B=a*h;let C,g;if(d<B||p<B)d=p=h/3;else{const L=z2(f,o);C=W2(l,d),g=W2(s,p),v2(C,L)-v2(g,L)>h*h&&(d=p=h/3,C=g=null)}return[o,D1(o,C||W2(l,d)),D1(f,g||W2(s,p)),f]},Np=(A,c,e,t,l)=>{for(let s=c;s<=e;s++)t[s-c]=Ep(l,A[s],t[s-c]);for(let s=1,a=t.length;s<a;s++)if(t[s]<=t[s-1])return!1;return!0},Ep=(A,c,e)=>{const t=[],l=[];for(let i=0;i<=2;i++)t[i]=f1(z2(A[i+1],A[i]),3);for(let i=0;i<=1;i++)l[i]=f1(z2(t[i+1],t[i]),2);const s=Q0(3,A,e),a=Q0(2,t,e),r=Q0(1,l,e),o=z2(s,c),f=v2(a,a)+v2(o,r);return yp(f)?e:e-v2(o,a)/f},Q0=(A,c,e)=>{const t=c.slice();for(let l=1;l<=A;l++)for(let s=0;s<=A-l;s++)t[s]=D1(f1(t[s],1-e),f1(t[s+1],e));return t[0]},kp=(A,c,e)=>{const t=[0];for(let l=c+1;l<=e;l++)t[l-c]=t[l-c-1]+l3(A[l],A[l-1]);for(let l=1,s=e-c;l<=s;l++)t[l]/=t[s];return t},Hp=(A,c,e,t,l)=>{let s=Math.floor((e-c+1)/2),a=0;for(let r=c+1;r<e;r++){const o=Q0(3,t,l[r-c]),f=z2(o,A[r]),i=f.x*f.x+f.y*f.y;i>=a&&(a=i,s=r)}return{error:a,index:s}},Ip=(A,c,e)=>{const t=A.length,l=10**e,s=e<16?p=>Math.round(p*l)/l:p=>p,a=(p,h)=>s(p)+","+s(h);let r=!0,o,f,i,m;const u=[],d=(p,h)=>{var B,C,g,L;const M=p.p.x,w=p.p.y;if(r)u.push("M"+a(M,w)),r=!1;else{const z=M+(((B=p.i)==null?void 0:B.x)??0),b=w+(((C=p.i)==null?void 0:C.y)??0);if(z===M&&b===w&&i===o&&m===f){if(!h){const v=M-o,F=w-f;u.push(v===0?"v"+s(F):F===0?"h"+s(v):"l"+a(v,F))}}else u.push("c"+a(i-o,m-f)+" "+a(z-o,b-f)+" "+a(M-o,w-f))}o=M,f=w,i=M+(((g=p.o)==null?void 0:g.x)??0),m=w+(((L=p.o)==null?void 0:L.y)??0)};if(!t)return"";for(let p=0;p<t;p++)d(A[p]);return c&&t>0&&(d(A[0],!0),u.push("z")),u.join("")},wA=(A,c={})=>A.length===0?"":Ip(vp(A.map(typeof A[0].x=="number"?e=>z1(e.x,e.y):e=>z1(e[0],e[1])),c.closed,c.tolerance??2.5),c.closed,c.precision??5);function n3(){const A="freehand",c='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 14 14"><path fill="currentColor" fill-rule="evenodd" d="M8.61 2.66c-.227-.198-.817-.365-1.602.129c-2.508 1.58-4.693 4.43-5.432 5.463a.75.75 0 1 1-1.22-.873c.75-1.047 3.078-4.112 5.853-5.86C7.41.763 8.75.795 9.594 1.527c.421.365.684.89.688 1.486c.004.591-.246 1.177-.702 1.698c-1.427 1.632-3.312 3.845-4.104 4.925c-.104.142-.111.25-.102.312c.01.07.047.136.11.183a.411.411 0 0 0 .299.067c.14-.017.36-.094.628-.339c.226-.208.461-.43.703-.657c.745-.701 1.55-1.46 2.356-2.053c.838-.616 1.818-.787 2.561-.333c.371.227.632.59.723 1.024c.09.43.004.878-.213 1.29c-.232.442-.434.76-.615 1.046l-.014.023a10.6 10.6 0 0 0-.485.819a.506.506 0 0 0-.024.415c.024.06.047.089.06.101c.092.007.172-.016.299-.114c.178-.139.377-.374.676-.766a.75.75 0 0 1 1.192.911c-.285.373-.594.764-.948 1.04c-.392.304-.867.489-1.444.413c-.633-.082-1.048-.57-1.231-1.037a2.007 2.007 0 0 1 .09-1.658c.19-.364.37-.647.541-.916l.021-.034c.177-.279.352-.556.555-.942c.085-.162.077-.255.071-.284a.068.068 0 0 0-.036-.051c-.043-.027-.347-.138-.89.262c-.726.533-1.433 1.2-2.16 1.884c-.255.24-.513.483-.775.723c-.923.846-2.047.959-2.838.367c-.77-.576-.981-1.68-.32-2.582c.837-1.142 2.767-3.405 4.185-5.026l.513.448l-.513-.448c.271-.31.332-.555.331-.702a.468.468 0 0 0-.171-.362Zm2.863 8.883l-.003-.002c.002 0 .003.001.003.002" clip-rule="evenodd"/></svg>',e=[];function t({settings:a,id:r,x:o,y:f}){return e.length=0,e.push([o,f],[o,f]),{type:A,id:r,x:o,y:f,path:wA(e,{tolerance:1,precision:1}).replace(/^M\d+,\d+/,""),thickness:a.thickness,color:a.color}}function l({settings:a,id:r,x:o,y:f}){return e.push([o,f]),{type:A,id:r,x:e[0][0],y:e[0][1],path:wA(e,{tolerance:1,precision:1}).replace(/^M\d+,\d+/,""),thickness:a.thickness,color:a.color}}const s=L1(a=>n.h("path",{d:`M${a.x},${a.y}${a.path}`,class:"freehand",stroke:a.color,"stroke-width":a.thickness}));return{type:A,icon:c,onDrawStart:t,onDraw:l,ShapeSvgComponent:s,svgStyle:`
|
|
3
3
|
.freehand {
|
|
4
4
|
stroke-linecap: round;
|