@liascript/exporter 2.6.10--0.12.2 → 2.6.11--0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/assets/indexeddb/{index.157b64ad.js → index.2224a6d9.js} +1 -1
  2. package/dist/assets/{scorm2004/index.99dfc593.js → indexeddb/index.8dc73f80.js} +1 -1
  3. package/dist/assets/indexeddb/index.f20e2b00.js +1 -0
  4. package/dist/assets/indexeddb/index.ff53f23d.js +1 -0
  5. package/dist/assets/indexeddb/index.html +1 -1
  6. package/dist/assets/scorm1.2/{index.157b64ad.js → index.2224a6d9.js} +1 -1
  7. package/dist/assets/scorm1.2/index.5e6cbc36.js +1 -0
  8. package/dist/assets/{web/index.99dfc593.js → scorm1.2/index.8dc73f80.js} +1 -1
  9. package/dist/assets/scorm1.2/index.bff5c7bc.js +1 -0
  10. package/dist/assets/scorm1.2/index.html +1 -1
  11. package/dist/assets/scorm2004/SCORM2004.25f0b6df.js +1 -0
  12. package/dist/assets/scorm2004/SCORM2004.c8a2ae23.js +1 -0
  13. package/dist/assets/scorm2004/index.006b6891.js +1 -0
  14. package/dist/assets/scorm2004/{index.157b64ad.js → index.2224a6d9.js} +1 -1
  15. package/dist/assets/{indexeddb/index.99dfc593.js → scorm2004/index.8dc73f80.js} +1 -1
  16. package/dist/assets/scorm2004/index.d9ab5143.js +1 -0
  17. package/dist/assets/scorm2004/index.html +1 -1
  18. package/dist/assets/web/{index.157b64ad.js → index.2224a6d9.js} +1 -1
  19. package/dist/assets/web/index.49109980.js +1 -0
  20. package/dist/assets/{scorm1.2/index.99dfc593.js → web/index.8dc73f80.js} +1 -1
  21. package/dist/assets/web/index.bdcb92e3.js +1 -0
  22. package/dist/assets/web/index.html +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +1 -1
  25. package/src/index.ts +1 -1
  26. package/dist/assets/indexeddb/Beaker.b5a58e13.js +0 -1
  27. package/dist/assets/indexeddb/Beaker.e4f26404.js +0 -1
  28. package/dist/assets/indexeddb/index.4ff802e3.js +0 -1
  29. package/dist/assets/indexeddb/index.b9638e3b.js +0 -1
  30. package/dist/assets/scorm1.2/Beaker.b5a58e13.js +0 -1
  31. package/dist/assets/scorm1.2/Beaker.e4f26404.js +0 -1
  32. package/dist/assets/scorm1.2/index.35f0f6e8.js +0 -1
  33. package/dist/assets/scorm1.2/index.e5220016.js +0 -1
  34. package/dist/assets/scorm2004/Beaker.b5a58e13.js +0 -1
  35. package/dist/assets/scorm2004/Beaker.e4f26404.js +0 -1
  36. package/dist/assets/scorm2004/SCORM2004.47565262.js +0 -1
  37. package/dist/assets/scorm2004/SCORM2004.d926349f.js +0 -1
  38. package/dist/assets/scorm2004/index.2d9c06a8.js +0 -1
  39. package/dist/assets/scorm2004/index.f487a577.js +0 -1
  40. package/dist/assets/web/Beaker.b5a58e13.js +0 -1
  41. package/dist/assets/web/Beaker.e4f26404.js +0 -1
  42. package/dist/assets/web/index.51f22a3b.js +0 -1
  43. package/dist/assets/web/index.b501e141.js +0 -1
  44. /package/dist/assets/indexeddb/{Beaker.becbdce1.js → Edrys.becbdce1.js} +0 -0
  45. /package/dist/assets/indexeddb/{Beaker.fb6f1ed7.js → Edrys.fb6f1ed7.js} +0 -0
  46. /package/dist/assets/scorm1.2/{Beaker.becbdce1.js → Edrys.becbdce1.js} +0 -0
  47. /package/dist/assets/scorm1.2/{Beaker.fb6f1ed7.js → Edrys.fb6f1ed7.js} +0 -0
  48. /package/dist/assets/scorm2004/{Beaker.becbdce1.js → Edrys.becbdce1.js} +0 -0
  49. /package/dist/assets/scorm2004/{Beaker.fb6f1ed7.js → Edrys.fb6f1ed7.js} +0 -0
  50. /package/dist/assets/web/{Beaker.becbdce1.js → Edrys.becbdce1.js} +0 -0
  51. /package/dist/assets/web/{Beaker.fb6f1ed7.js → Edrys.fb6f1ed7.js} +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><title>Lia</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><script src="index.0153c984.js"></script><script defer type="module" src="index.157b64ad.js"></script><script defer src="index.99dfc593.js" nomodule></script><script defer type="module" src="index.27b12c92.js"></script><script defer src="index.4d4d0d19.js" nomodule></script><script defer type="module" src="index.8ef64c13.js"></script><script defer src="index.7c2099c2.js" nomodule></script><script defer type="module" src="index.e5220016.js"></script><script defer src="index.35f0f6e8.js" nomodule></script><script defer type="module" src="index.766104df.js"></script><script defer src="index.ab5cf70c.js" nomodule></script><script defer type="module" src="index.453aa9bb.js"></script><script defer src="index.82f3fa50.js" nomodule></script><script defer type="module" src="index.dbeb5a32.js"></script><script defer src="index.31b1e318.js" nomodule></script><script defer type="module" src="index.1df2912f.js"></script><script defer src="index.02e1e0e7.js" nomodule></script><script defer type="module" src="index.95b0d75c.js"></script><script defer src="index.8e9af83f.js" nomodule></script><link rel="icon shortcut" sizes="192x192" href="up_/up_/assets/logo_192.png"><meta name="mobile-web-app-capable" content="yes"><meta name="application-name" content="Lia"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="apple-mobile-web-app-title" content="LiaScript"><meta name="msapplication-TileImage" content="up_/up_/assets/logo_192.png"><meta name="msapplication-TileColor" content="#0071c5"><meta name="msapplication-tap-highlight" content="no"><meta name="theme-color" content="#000000"><meta name="description" content="LiaScript is a service for running free and interactive online courses, build with its own Markup-language. So check out the following course ;-)"><link rel="apple-touch-icon" href="logo.abbc2cae.png"><link rel="icon" href="logo.abbc2cae.png" type="image/png"><style>.lds-dual-ring{width:150px;height:150px;display:inline-block}.lds-dual-ring:after{content:" ";width:128px;height:128px;border:5px solid #000;border-color:#000 transparent;border-radius:50%;margin:1px;-webkit-animation:1.2s linear infinite lds-dual-ring;animation:1.2s linear infinite lds-dual-ring;display:block}@-webkit-keyframes lds-dual-ring{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lds-dual-ring{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><link rel="stylesheet" href="index.9d0c93a8.css"></head><body> <noscript> This page requires JavaScript to be enabled! </noscript> <div id="IE-message" hidden> <h1>LiaScript - Problem</h1> <p> Hello! Welcome to LiaScript. This site is not fully supported in Internet Explorer 11 (and earlier) versions. </p> <p> As an alternative, you can use either of the options below to browse the site: </p> <ol> <li>Use Firefox browser. Here is the <a href="http://www.mozilla.org/en-US/firefox/new/">download link.</a></li> <li>Use Google Chrome browser. Here is the <a href="https://support.google.com/chrome/answer/95346?hl=en">download link.</a></li> </ol> <p> Thanks. </p> </div> </body></html>
1
+ <!DOCTYPE html><html lang="en"><head><title>Lia</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><script src="index.0153c984.js"></script><script defer type="module" src="index.2224a6d9.js"></script><script defer src="index.8dc73f80.js" nomodule></script><script defer type="module" src="index.27b12c92.js"></script><script defer src="index.4d4d0d19.js" nomodule></script><script defer type="module" src="index.8ef64c13.js"></script><script defer src="index.7c2099c2.js" nomodule></script><script defer type="module" src="index.5e6cbc36.js"></script><script defer src="index.bff5c7bc.js" nomodule></script><script defer type="module" src="index.766104df.js"></script><script defer src="index.ab5cf70c.js" nomodule></script><script defer type="module" src="index.453aa9bb.js"></script><script defer src="index.82f3fa50.js" nomodule></script><script defer type="module" src="index.dbeb5a32.js"></script><script defer src="index.31b1e318.js" nomodule></script><script defer type="module" src="index.1df2912f.js"></script><script defer src="index.02e1e0e7.js" nomodule></script><script defer type="module" src="index.95b0d75c.js"></script><script defer src="index.8e9af83f.js" nomodule></script><link rel="icon shortcut" sizes="192x192" href="up_/up_/assets/logo_192.png"><meta name="mobile-web-app-capable" content="yes"><meta name="application-name" content="Lia"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="apple-mobile-web-app-title" content="LiaScript"><meta name="msapplication-TileImage" content="up_/up_/assets/logo_192.png"><meta name="msapplication-TileColor" content="#0071c5"><meta name="msapplication-tap-highlight" content="no"><meta name="theme-color" content="#000000"><meta name="description" content="LiaScript is a service for running free and interactive online courses, build with its own Markup-language. So check out the following course ;-)"><link rel="apple-touch-icon" href="logo.abbc2cae.png"><link rel="icon" href="logo.abbc2cae.png" type="image/png"><style>.lds-dual-ring{width:150px;height:150px;display:inline-block}.lds-dual-ring:after{content:" ";width:128px;height:128px;border:5px solid #000;border-color:#000 transparent;border-radius:50%;margin:1px;-webkit-animation:1.2s linear infinite lds-dual-ring;animation:1.2s linear infinite lds-dual-ring;display:block}@-webkit-keyframes lds-dual-ring{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lds-dual-ring{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><link rel="stylesheet" href="index.9d0c93a8.css"></head><body> <noscript> This page requires JavaScript to be enabled! </noscript> <div id="IE-message" hidden> <h1>LiaScript - Problem</h1> <p> Hello! Welcome to LiaScript. This site is not fully supported in Internet Explorer 11 (and earlier) versions. </p> <p> As an alternative, you can use either of the options below to browse the site: </p> <ol> <li>Use Firefox browser. Here is the <a href="http://www.mozilla.org/en-US/firefox/new/">download link.</a></li> <li>Use Google Chrome browser. Here is the <a href="https://support.google.com/chrome/answer/95346?hl=en">download link.</a></li> </ol> <p> Thanks. </p> </div> </body></html>
@@ -0,0 +1 @@
1
+ function t(t,e,i,s){Object.defineProperty(t,e,{get:i,set:s,enumerable:!0,configurable:!0})}var e=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire55a5;e.register("1jVc2",(function(i,s){t(i.exports,"Connector",(function(){return c}));var n=e("jXXgq"),r=e("ayIBF"),o=e("5aa3i");class c extends n.Connector{scanForAPI(t){let e=0;for(;null==t.API_1484_11&&null!=t.parent&&t.parent!=t;){if(e++,e>500)return null;t=t.parent}return t.API_1484_11}getAPI(t){let e=null;return null!=t.parent&&t.parent!=t&&(e=this.scanForAPI(t.parent)),null==e&&null!=t.opener&&(e=this.scanForAPI(t.opener)),e}initSettings(t,e=!1){return r.Settings.init(t,!1,this.setSettings)}setSettings(t){this.active&&this.scorm?this.write("cmi.suspend_data",JSON.stringify(t)):l('cannot write to "cmi.suspend_data"')}getSettings(){let t="";try{var e;t=(null===(e=this.scorm)||void 0===e?void 0:e.GetValue("cmi.suspend_data"))||null}catch(t){l("cannot write settings to cmi.suspend_data")}let i=null;if("string"==typeof t){try{i=JSON.parse(t)}catch(t){l("getSettings =>",t)}i||(i=r.Settings.data),window.innerWidth<=768&&(i.table_of_contents=!1)}return i}init(){if(this.scorm){a("Initialize ",this.scorm.Initialize(""));let t=this.scorm.GetValue("cmi.mode");if(this.active="normal"===t,l("Running in",t,"mode, results will ",this.active?"":"NOT","be stored!"),this.scaled_passing_score=JSON.parse(this.scorm.GetValue("cmi.scaled_passing_score")),a("open location ..."),this.location=o.jsonParse(this.scorm.GetValue("cmi.location")),a("... ",this.location),null===this.location){this.slide(0);let t=0;t=this.initFirst("quiz",t),t=this.initFirst("survey",t),t=this.initFirst("task",t)}else{let t=0;t=this.initSecond("quiz",t),t=this.initSecond("survey",t),t=this.initSecond("task",t)}window.SCORE=0,this.score()}}initFirst(t,e){for(let i=0;i<this.db[t].length;i++){this.id[t].push([]);for(let s=0;s<this.db[t][i].length;s++)this.setInteraction(e,`${t}:${i}-${s}`),this.id[t][i].push(e),e++}return e}initSecond(t,e){for(let i=0;i<this.db[t].length;i++){this.id[t].push([]);for(let s=0;s<this.db[t][i].length;s++){let n=this.getInteraction(e);n&&(this.db[t][i][s]=n),this.id[t][i].push(e),e++}}return e}open(t,e,i){null!==this.location&&window.LIA.goto(this.location)}load(t){if(this.active)switch(t.table){case"quiz":case"survey":case"task":return a("loading ",t.table,t.id,this.db.task[t.id]),this.db[t.table][t.id]}}store(t){if(this.active)switch(t.table){case"quiz":this.storeHelper(t),this.score();break;case"survey":case"task":this.storeHelper(t)}}storeHelper(t){for(let e=0;e<this.db[t.table][t.id].length;e++)o.neq(t.data[e],this.db[t.table][t.id][e])&&(this.updateInteraction(this.id[t.table][t.id][e],t.data[e]),this.db[t.table][t.id][e]=t.data[e],"quiz"==t.table&&this.updateQuiz(this.id[t.table][t.id][e],t.data[e]))}score(){if(!this.active||!this.scaled_passing_score)return;let t=0,e=0,i=0,s=0;for(let n=0;n<this.db.quiz.length;n++)for(let r=0;r<this.db.quiz[n].length;r++)switch(s=this.db.quiz[n][r].score,t+=s,this.db.quiz[n][r].solved){case 1:e+=s;case-1:i+=s}const n=0===e?0:e/t;this.write("cmi.score.min","0"),this.write("cmi.score.max",JSON.stringify(t)),this.write("cmi.score.scaled",JSON.stringify(n)),this.write("cmi.score.raw",JSON.stringify(e)),n>=this.scaled_passing_score?(this.write("cmi.success_status","passed"),this.write("cmi.completion_status","completed")):i+e===t?(this.write("cmi.success_status","failed"),this.write("cmi.completion_status","completed")):this.write("cmi.completion_status","incomplete"),window.SCORE=n}write(t,e){if(this.scorm){if(a("write: ",t,e),"false"===this.scorm.SetValue(t,e)){l("error occurred for",t,e);let i=this.scorm.GetLastError();l("GetLastError:",i),i?(l("GetErrorString:",this.scorm.GetErrorString(i)),l("GetDiagnostic:",this.scorm.GetDiagnostic(i))):l("GetDiagnostic:",this.scorm.GetDiagnostic(""))}this.scorm.Commit("")}}slide(t){this.location=t,this.write("cmi.location",JSON.stringify(t))}setInteraction(t,e){this.write(`cmi.interactions.${t}.id`,e),this.write(`cmi.interactions.${t}.type`,"long-fill-in")}updateQuiz(t,e){if(this.active)switch(e.solved){case 0:e.trial>0&&this.write(`cmi.interactions.${t}.result`,"incorrect");break;case 1:this.write(`cmi.interactions.${t}.result`,"correct");break;case-1:this.write(`cmi.interactions.${t}.result`,"neutral")}}updateInteraction(t,e){this.write(`cmi.interactions.${t}.learner_response`,o.encodeJSON(e))}getInteraction(t){if(!this.active)return null;try{if(this.scorm){let e=this.scorm.GetValue(`cmi.interactions.${t}.learner_response`);if(""!==e)return o.decodeJSON(e)}}catch(t){l("getInteraction => ",t)}return null}constructor(){super(),this.active=!1,this.scaled_passing_score=null,this.db={quiz:[],survey:[],task:[]},this.id={quiz:[],survey:[],task:[]};let t=this.getAPI(window);if(t){a("successfully opened API"),this.scorm=t,a("loading quizzes ...");try{this.db.quiz=window.config_.quiz||[[]],a(" ... done")}catch(t){l("... failed",t)}a("loading surveys ...");try{this.db.survey=window.config_.survey||[[]],a(" ... done")}catch(t){l("... failed",t)}a("loading tasks ...");try{this.db.task=window.config_.task||[[]],a(" ... done")}catch(t){l("... failed",t)}this.init()}else l("Could not find API")}}function a(...t){console.log("SCORM2004: ",...t)}function l(...t){console.log("SCORM2004: ",...t)}})),e.register("jXXgq",(function(i,s){t(i.exports,"Connector",(function(){return o}));var n=e("3MPaZ"),r=e("ayIBF");class o{hasIndex(){return!1}storage(){return new n.LiaStorage}initSettings(t,e=!1){return r.Settings.init(t,e,this.setSettings)}setSettings(t){try{localStorage.setItem(r.Settings.PORT,JSON.stringify(t))}catch(t){console.warn("cannot write to localStorage")}}getSettings(){let t="";try{t=localStorage.getItem(r.Settings.PORT)}catch(t){console.warn("cannot write to localStorage")}let e=null;if("string"==typeof t){try{e=JSON.parse(t)}catch(t){console.warn("getSettings =>",t)}e||(e=r.Settings.data),window.innerWidth<=768&&(e.table_of_contents=!1)}return e}open(t,e,i){}load(t){}store(t){}update(t,e){}slide(t){}getIndex(){}deleteFromIndex(t){}storeToIndex(t){}restoreFromIndex(t,e){}reset(t,e){this.initSettings(null,!0)}async getFromIndex(t){return null}constructor(){}}})),e.register("3MPaZ",(function(e,i){t(e.exports,"LiaStorage",(function(){return s}));class s{getItems(t=[]){"string"==typeof t&&(t=[t]);let e={};for(let i=0;i<t.length;i++){let s=localStorage.getItem(t[i]);e[t[i]]=s?JSON.parse(s):s}return e}setItems(t){this._setLocal(t)}_setLocal(t){if("object"==typeof t)for(const[e,i]of Object.entries(t))localStorage.setItem(e,JSON.stringify(i))}constructor(){}}})),e.register("5aa3i",(function(e,i){t(e.exports,"encodeJSON",(function(){return o})),t(e.exports,"decodeJSON",(function(){return c})),t(e.exports,"jsonParse",(function(){return a})),t(e.exports,"neq",(function(){return l}));const s={SingleChoice:"sc",MultipleChoice:"mc",Text:"tx",Select:"st",Matrix:"mx",Generic:"gn",error_msg:"err"},n=Object.entries(s).reduce(((t,[e,i])=>(t[i]=e,t)),{});function r(t,e){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map((t=>r(t,e)));const i={};for(const[s,n]of Object.entries(t)){i[e[s]||s]=r(n,e)}return i}function o(t){return JSON.stringify(r(t,s))}function c(t){return r(JSON.parse(t),n)}function a(t){try{return JSON.parse(t)}catch(t){}return null}function l(t,e){return JSON.stringify(t)!=JSON.stringify(e)}}));
@@ -0,0 +1 @@
1
+ !function(){function t(t,e,i,n){Object.defineProperty(t,e,{get:i,set:n,enumerable:!0,configurable:!0})}var e=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire55a5;e.register("8MvA8",(function(i,n){t(i.exports,"Connector",(function(){return d}));var r=e("9Klpk"),s=e("3bWnf"),a=e("kb0qF"),o=e("6Wo7Q"),c=e("bWNdT"),u=e("knzCS"),l=e("cRTHJ"),f=e("jxbaN"),d=function(t){"use strict";(0,a.default)(i,t);var e=(0,c.default)(i);function i(){var t;(0,r.default)(this,i),(t=e.call(this)).active=!1,t.scaled_passing_score=null,t.db={quiz:[],survey:[],task:[]},t.id={quiz:[],survey:[],task:[]};var n=t.getAPI(window);if(n){h("successfully opened API"),t.scorm=n,h("loading quizzes ...");try{t.db.quiz=window.config_.quiz||[[]],h(" ... done")}catch(t){v("... failed",t)}h("loading surveys ...");try{t.db.survey=window.config_.survey||[[]],h(" ... done")}catch(t){v("... failed",t)}h("loading tasks ...");try{t.db.task=window.config_.task||[[]],h(" ... done")}catch(t){v("... failed",t)}t.init()}else v("Could not find API");return t}return(0,s.default)(i,[{key:"scanForAPI",value:function(t){for(var e=0;null==t.API_1484_11&&null!=t.parent&&t.parent!=t;){if(++e>500)return null;t=t.parent}return t.API_1484_11}},{key:"getAPI",value:function(t){var e=null;return null!=t.parent&&t.parent!=t&&(e=this.scanForAPI(t.parent)),null==e&&null!=t.opener&&(e=this.scanForAPI(t.opener)),e}},{key:"initSettings",value:function(t){return l.Settings.init(t,!1,this.setSettings)}},{key:"setSettings",value:function(t){this.active&&this.scorm?this.write("cmi.suspend_data",JSON.stringify(t)):v('cannot write to "cmi.suspend_data"')}},{key:"getSettings",value:function(){var t="";try{var e;t=(null===(e=this.scorm)||void 0===e?void 0:e.GetValue("cmi.suspend_data"))||null}catch(t){v("cannot write settings to cmi.suspend_data")}var i=null;if("string"==typeof t){try{i=JSON.parse(t)}catch(t){v("getSettings =>",t)}i||(i=l.Settings.data),window.innerWidth<=768&&(i.table_of_contents=!1)}return i}},{key:"init",value:function(){if(this.scorm){h("Initialize ",this.scorm.Initialize(""));var t=this.scorm.GetValue("cmi.mode");if(this.active="normal"===t,v("Running in",t,"mode, results will ",this.active?"":"NOT","be stored!"),this.scaled_passing_score=JSON.parse(this.scorm.GetValue("cmi.scaled_passing_score")),h("open location ..."),this.location=f.jsonParse(this.scorm.GetValue("cmi.location")),h("... ",this.location),null===this.location){this.slide(0);var e=0;e=this.initFirst("quiz",e),e=this.initFirst("survey",e),e=this.initFirst("task",e)}else{var i=0;i=this.initSecond("quiz",i),i=this.initSecond("survey",i),i=this.initSecond("task",i)}window.SCORE=0,this.score()}}},{key:"initFirst",value:function(t,e){for(var i=0;i<this.db[t].length;i++){this.id[t].push([]);for(var n=0;n<this.db[t][i].length;n++)this.setInteraction(e,"".concat(t,":").concat(i,"-").concat(n)),this.id[t][i].push(e),e++}return e}},{key:"initSecond",value:function(t,e){for(var i=0;i<this.db[t].length;i++){this.id[t].push([]);for(var n=0;n<this.db[t][i].length;n++){var r=this.getInteraction(e);r&&(this.db[t][i][n]=r),this.id[t][i].push(e),e++}}return e}},{key:"open",value:function(t,e,i){null!==this.location&&window.LIA.goto(this.location)}},{key:"load",value:function(t){if(this.active)switch(t.table){case"quiz":case"survey":case"task":return h("loading ",t.table,t.id,this.db.task[t.id]),this.db[t.table][t.id]}}},{key:"store",value:function(t){if(this.active)switch(t.table){case"quiz":this.storeHelper(t),this.score();break;case"survey":case"task":this.storeHelper(t)}}},{key:"storeHelper",value:function(t){for(var e=0;e<this.db[t.table][t.id].length;e++)f.neq(t.data[e],this.db[t.table][t.id][e])&&(this.updateInteraction(this.id[t.table][t.id][e],t.data[e]),this.db[t.table][t.id][e]=t.data[e],"quiz"==t.table&&this.updateQuiz(this.id[t.table][t.id][e],t.data[e]))}},{key:"score",value:function(){if(this.active&&this.scaled_passing_score){for(var t=0,e=0,i=0,n=0,r=0;r<this.db.quiz.length;r++)for(var s=0;s<this.db.quiz[r].length;s++)switch(t+=n=this.db.quiz[r][s].score,this.db.quiz[r][s].solved){case 1:e+=n;case-1:i+=n}var a=0===e?0:e/t;this.write("cmi.score.min","0"),this.write("cmi.score.max",JSON.stringify(t)),this.write("cmi.score.scaled",JSON.stringify(a)),this.write("cmi.score.raw",JSON.stringify(e)),a>=this.scaled_passing_score?(this.write("cmi.success_status","passed"),this.write("cmi.completion_status","completed")):i+e===t?(this.write("cmi.success_status","failed"),this.write("cmi.completion_status","completed")):this.write("cmi.completion_status","incomplete"),window.SCORE=a}}},{key:"write",value:function(t,e){if(this.scorm){if(h("write: ",t,e),"false"===this.scorm.SetValue(t,e)){v("error occurred for",t,e);var i=this.scorm.GetLastError();v("GetLastError:",i),i?(v("GetErrorString:",this.scorm.GetErrorString(i)),v("GetDiagnostic:",this.scorm.GetDiagnostic(i))):v("GetDiagnostic:",this.scorm.GetDiagnostic(""))}this.scorm.Commit("")}}},{key:"slide",value:function(t){this.location=t,this.write("cmi.location",JSON.stringify(t))}},{key:"setInteraction",value:function(t,e){this.write("cmi.interactions.".concat(t,".id"),e),this.write("cmi.interactions.".concat(t,".type"),"long-fill-in")}},{key:"updateQuiz",value:function(t,e){if(this.active)switch(e.solved){case 0:e.trial>0&&this.write("cmi.interactions.".concat(t,".result"),"incorrect");break;case 1:this.write("cmi.interactions.".concat(t,".result"),"correct");break;case-1:this.write("cmi.interactions.".concat(t,".result"),"neutral")}}},{key:"updateInteraction",value:function(t,e){this.write("cmi.interactions.".concat(t,".learner_response"),f.encodeJSON(e))}},{key:"getInteraction",value:function(t){if(!this.active)return null;try{if(this.scorm){var e=this.scorm.GetValue("cmi.interactions.".concat(t,".learner_response"));if(""!==e)return f.decodeJSON(e)}}catch(t){v("getInteraction => ",t)}return null}}]),i}(u.Connector);function h(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;(n=console).log.apply(n,["SCORM2004: "].concat((0,o.default)(e)))}function v(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;(n=console).log.apply(n,["SCORM2004: "].concat((0,o.default)(e)))}})),e.register("knzCS",(function(i,n){t(i.exports,"Connector",(function(){return l}));var r=e("hnmIs"),s=e("9Klpk"),a=e("3bWnf"),o=e("32Euv"),c=e("87lFe"),u=e("cRTHJ"),l=function(){"use strict";function t(){(0,s.default)(this,t)}return(0,a.default)(t,[{key:"hasIndex",value:function(){return!1}},{key:"storage",value:function(){return new c.LiaStorage}},{key:"initSettings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u.Settings.init(t,e,this.setSettings)}},{key:"setSettings",value:function(t){try{localStorage.setItem(u.Settings.PORT,JSON.stringify(t))}catch(t){console.warn("cannot write to localStorage")}}},{key:"getSettings",value:function(){var t="";try{t=localStorage.getItem(u.Settings.PORT)}catch(t){console.warn("cannot write to localStorage")}var e=null;if("string"==typeof t){try{e=JSON.parse(t)}catch(t){console.warn("getSettings =>",t)}e||(e=u.Settings.data),window.innerWidth<=768&&(e.table_of_contents=!1)}return e}},{key:"open",value:function(t,e,i){}},{key:"load",value:function(t){}},{key:"store",value:function(t){}},{key:"update",value:function(t,e){}},{key:"slide",value:function(t){}},{key:"getIndex",value:function(){}},{key:"deleteFromIndex",value:function(t){}},{key:"storeToIndex",value:function(t){}},{key:"restoreFromIndex",value:function(t,e){}},{key:"reset",value:function(t,e){this.initSettings(null,!0)}},{key:"getFromIndex",value:function(t){return(0,r.default)((function(){return(0,o.__generator)(this,(function(t){return[2,null]}))}))()}}]),t}()})),e.register("87lFe",(function(i,n){t(i.exports,"LiaStorage",(function(){return o}));var r=e("9Klpk"),s=e("3bWnf"),a=e("5ENmm"),o=function(){"use strict";function t(){(0,r.default)(this,t)}return(0,s.default)(t,[{key:"getItems",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"==typeof t&&(t=[t]);for(var e={},i=0;i<t.length;i++){var n=localStorage.getItem(t[i]);e[t[i]]=n?JSON.parse(n):n}return e}},{key:"setItems",value:function(t){this._setLocal(t)}},{key:"_setLocal",value:function(t){var e=!0,i=!1,n=void 0;if("object"==typeof t)try{for(var r,s=Object.entries(t)[Symbol.iterator]();!(e=(r=s.next()).done);e=!0){var o=(0,a.default)(r.value,2),c=o[0],u=o[1];localStorage.setItem(c,JSON.stringify(u))}}catch(t){i=!0,n=t}finally{try{e||null==s.return||s.return()}finally{if(i)throw n}}}}]),t}()})),e.register("jxbaN",(function(i,n){t(i.exports,"encodeJSON",(function(){return c})),t(i.exports,"decodeJSON",(function(){return u})),t(i.exports,"jsonParse",(function(){return l})),t(i.exports,"neq",(function(){return f}));var r=e("5ENmm"),s={SingleChoice:"sc",MultipleChoice:"mc",Text:"tx",Select:"st",Matrix:"mx",Generic:"gn",error_msg:"err"},a=Object.entries(s).reduce((function(t,e){var i=(0,r.default)(e,2),n=i[0];return t[i[1]]=n,t}),{});function o(t,e){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map((function(t){return o(t,e)}));var i={},n=!0,s=!1,a=void 0;try{for(var c,u=Object.entries(t)[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var l=(0,r.default)(c.value,2),f=l[0],d=l[1];i[e[f]||f]=o(d,e)}}catch(t){s=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(s)throw a}}return i}function c(t){return JSON.stringify(o(t,s))}function u(t){return o(JSON.parse(t),a)}function l(t){try{return JSON.parse(t)}catch(t){}return null}function f(t,e){return JSON.stringify(t)!=JSON.stringify(e)}}))}();