!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(A){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),u=new C(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(A){return{type:"throw",arg:A}}}r.wrap=f;var p={};function v(){}function h(){}function y(){}var m={};s(m,u,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==n&&o.call(b,u)&&(m=b);var w=y.prototype=v.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(e,r){function n(a,i,u,c){var l=d(e[a],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}})}function L(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return I()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=j(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},r}function r(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,c,"next",t)}function c(t){r(i,o,a,u,c,"throw",t)}u(void 0)}))}}function o(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(s){l=!0,o=s}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{};if(!t.accordion){"boolean"==typeof e&&(e={expanded:e});var r=e,n=r.expanded,o=r.skipDisabled,a=u.filter((function(t){return t.disabled&&o?t.expanded.value:null!=n?n:!t.expanded.value})).map((function(t){return t.itemName.value}));d(a)}}}),i({toggle:function(e,r){var n=t.accordion,o=t.modelValue;d(n?e===o?"":e:r?o.concat(e):o.filter((function(t){return t!==e})))},isExpanded:function(e){var r=t.accordion,n=t.modelValue;return!!function(t,e){return e&&Array.isArray(t)?(console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode'),!1):!(!e&&!Array.isArray(t)&&(console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode'),1))}(n,r)&&(r?n===e:n.includes(e))}}),function(){var e;return s("div",{class:[H(),o({},f,t.border)]},[null==(e=n.default)?void 0:e.call(n)])}}}),J=p($),Q=a(i("collapse-item"),2),Z=Q[0],tt=Q[1],et=["icon","title","value","label","right-icon"],rt=v({},z,{name:h,isLink:d,disabled:Boolean,readonly:Boolean,lazyRender:d}),nt=u({name:Z,props:rt,setup:function(t,e){var r=e.slots,n=y(),o=y(),a=m(W),i=a.parent,u=a.index;if(i){var c=g((function(){var e;return null!=(e=t.name)?e:u.value})),f=g((function(){return i.isExpanded(c.value)})),d=y(f.value),p=b((function(){return d.value||!t.lazyRender})),v=function(){f.value?n.value&&(n.value.style.height=""):d.value=!1};w(f,(function(t,e){null!==e&&(t&&(d.value=!0),(t?k:L)((function(){if(o.value&&n.value){var e=o.value.offsetHeight;if(e){var r="".concat(e,"px");n.value.style.height=t?"0":r,x((function(){n.value&&(n.value.style.height=t?r:"0")}))}else v()}})))}));var h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!f.value;i.toggle(c.value,t)},O=function(){t.disabled||t.readonly||h()},I=p((function(){var t;return S(s("div",{ref:n,class:tt("wrapper"),onTransitionend:v},[s("div",{ref:o,class:tt("content")},[null==(t=r.default)?void 0:t.call(r)])]),[[C,d.value]])}));return l({toggle:h,expanded:f,itemName:c}),function(){return s("div",{class:[tt({border:u.value&&t.border})]},[(e=t.border,n=t.disabled,o=t.readonly,a=j(t,Object.keys(z)),o&&(a.isLink=!1),(n||o)&&(a.clickable=!1),s(B,E({role:"button",class:tt("title",{disabled:n,expanded:f.value,borderless:!e}),"aria-expanded":String(f.value),onClick:O},a),j(r,et))),I()]);var e,n,o,a}}console.error("[Vant] must be a child component of .")}}),ot=p(nt),at=""+new URL("library-1-96754f77.png",r.meta.url).href,it=""+new URL("library-2-18c7f885.png",r.meta.url).href,ut=""+new URL("library-3-784f5dd5.png",r.meta.url).href;t("default",u({name:"knowledge-ligrary",setup:function(){var t=O(),r=I(),o=A({cid:r.query.cid,list:[],activeNames:null,background:"transparent",color:"#fff"}),a=function(){var t=n(e().mark((function t(){var r,n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,D.post("/edu-app/lessonCourseware/queryStudentLessonDetail",{requestType:"form",data:{lessonCoursewareId:o.cid}});case 3:r=t.sent,n=r.data,o.list=n,n&&n.length>0&&(o.activeNames=n[0].lessonCoursewareDetailId),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),i=function(t){return t%3==1?at:t%3==2?it:t%3==0?ut:void 0},u=function(){var r=n(e().mark((function r(n){var a;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:o.cid}});case 3:if(a=e.sent,a.data){e.next=8;break}return setTimeout((function(){G("暂无题目")}),100),e.abrupt("return");case 8:"TEST"===n?t.push({path:"/examination-mode",query:{lessonCoursewareId:o.cid}}):t.push({path:"/practice-mode",query:{lessonCoursewareId:o.cid}}),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),r,null,[[0,11]])})));return function(t){return r.apply(this,arguments)}}();return N((function(){U(document,"scroll",(function(){F().y.value>52?(o.background="#fff",o.color="#323333"):(o.background="transparent",o.color="#fff")})),a()})),function(){var e,r;return s("div",{class:R.knowledgeLibrary},[s(q,{position:"top"},{default:function(){return[s(T,{border:!1,background:o.background,color:o.color},{right:function(){return s("div",{class:[R.wroingBtn],onClick:function(){return t.push("/wroing-book")}},[s("i",{class:R.iconWroing},null),P("错题本")])}})]}}),s("div",{class:R.btnGroup},[s(_,{class:R.btnPractice,round:!0,onClick:function(){return u("PRACTICE")}},null),s(_,{class:R.btnTest,round:!0,onClick:function(){return u("TEST")}},null)]),s("div",{class:[R.containerSection,R.librarySection]},[s(J,{modelValue:o.activeNames,"onUpdate:modelValue":function(t){return o.activeNames=t},accordion:!0,border:!1},(r=e=o.list.map((function(e){return s(ot,{title:e.lessonCoursewareDetailName,name:e.lessonCoursewareDetailId,value:1===o.activeNames?"收起":"展开",border:!1},{default:function(){return[e.knowledgeDetails&&e.knowledgeDetails.map((function(e,r){return s("div",{class:R.unitItem,onClick:function(){return t.push({path:"/unit-detail",query:{detailId:e.lessonCoursewareKnowledgeDetailId}})}},[s(K,{class:R.unitImg,lazyLoad:!0,src:i(r)},null),s("p",{class:R.name},[s("span",null,[e.name])])])}))]}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!V(r)?e:{default:function(){return[e]}}))])])}}}))}}}))}();