index-e28a216f-1715840129614.js 142 KB

1
  1. import{b as Zu,l as mu,a as Ju,c as Hu,t as Qu,d as Yu,C as Xu,e as es,f as ts,g as us,h as fu,i as ss,j as as,k as os,m as ns}from"./api-4261a394-1715840129614.js";import{B as ls,A as rs}from"./index-28ccaf7b-1715840129614.js";import{u as Je,d as It}from"./catchData-ee7bbce5-1715840129614.js";import{a0 as is,a1 as cs,a2 as ds,a3 as ps,a4 as hu,a5 as gs,a6 as ms,a7 as fs,a8 as hs,d as W,a9 as it,r as R,aa as Cs,ab as ee,ac as Fs,S as O,p as X,o as Cu,ad as Es,ae as V,af as Ce,ag as M,ah as Qt,ai as ws,aj as As,ak as Bs,al as vs,y as xe,am as Fu,an as ys,ao as _s,ap as Yt,aq as Xt,_ as Vt,ar as bs,Y as Ss,as as Is,at as Ds,au as qe,Q as Te,av as Ze,n as ks,b as ct,e as K,f as e,h as He,G as eu,C as ge,w as ae,v as ie,F as me,j as N,k as C,l as se,Z as re,A as k,R as be,$ as Eu,a as wu,c as Rt,V as Au,aw as tu,ax as Bu,ay as Ls,az as xs,m as Dt,B as Se,D as Ts,u as We,q as Ge,t as Oe,P as dt,aA as vu,N as Vs,x as Rs,g as Ms,T as ye,aB as uu,aC as vt,aD as js}from"./index-27f38392-1715840129614.js";import{a as pt}from"./index-95d27d49-1715840129614.js";import{N as Mt}from"./Cascader-1e2d657d-1715840129614.js";import{N as Fe}from"./Scrollbar-b72aeac2-1715840129614.js";import{T as fe}from"./index-f592738f-1715840129614.js";import{u as _e,i as Ps}from"./index-618fa48e-1715840129614.js";import{T as kt}from"./index-f4afcac5-1715840129614.js";import{g as Lt,s as ne}from"./index-db345329-1715840129614.js";import{g as yu,s as rt}from"./api-642b417f-1715840129614.js";import{D as Ns,C as _u,b as Ws,R as bu}from"./index-179890b4-1715840129614.js";import{C as gt,s as j}from"./index-28769104-1715840129614.js";import{P as Su}from"./index-4e28d06b-1715840129614.js";import{T as xt}from"./index-5b211554-1715840129614.js";import{T as jt}from"./index-63751212-1715840129614.js";import{b as Iu}from"./browser-504037ee-1715840129614.js";import{a as Pt,b as Nt,c as Gs,d as Os}from"./api-279396c0-1715840129614.js";import{i as Us,a as $s,b as zs}from"./icon-plus-t-35f4cdeb-1715840129614.js";import{N as Ks}from"./Slider-17a69cd3-1715840129614.js";import{i as qs}from"./icon_default-d1bcaf5f-1715840129614.js";import{i as Zs}from"./icon-select-23609858-1715840129614.js";import{U as Js,S as Hs,f as Qs}from"./index-b1440f38-1715840129614.js";import{a as Ys}from"./add-efe8238e-1715840129614.js";import{s as yt}from"./state-bac02a99-1715840129614.js";import{u as Tt}from"./index-64303d0e-1715840129614.js";import{A as Xs}from"./index-b49ef3da-1715840129614.js";import"./icon-collect-active-4272e308-1715840129614.js";import"./index-53b18b72-1715840129614.js";import"./urlUtils-a03c114e-1715840129614.js";import"./ding-8e9054d5-1715840129614.js";import"./searchArray-d5f42180-1715840129614.js";import"./api-0aa82bae-1715840129614.js";import"./api-f974413a-1715840129614.js";import"./teacherIcon-b8e3946d-1715840129614.js";import"./index-717042f2-1715840129614.js";import"./api-ada3b0f5-1715840129614.js";import"./icon-pan-16e35a82-1715840129614.js";import"./updateSubject-87ed0d83-1715840129614.js";import"./index.module-18dca782-1715840129614.js";function ea(s){return is(cs(s).toLowerCase())}var ta=ds(function(s,l,t){return l=l.toLowerCase(),s+(t?ea(l):l)});const su=ta,ua=s=>({dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"}),sa={name:"Carousel",common:ps,self:ua},aa=sa;function oa(s){const{length:l}=s;return l>1&&(s.push(au(s[0],0,"append")),s.unshift(au(s[l-1],l-1,"prepend"))),s}function au(s,l,t){return hu(s,{key:"carousel-item-duplicate-".concat(l,"-").concat(t)})}function ou(s,l,t){return l===1?0:t?s===0?l-3:s===l-1?0:s-1:s}function _t(s,l){return l?s+1:s}function na(s,l,t){return s<0?null:s===0?t?l-1:null:s-1}function la(s,l,t){return s>l-1?null:s===l-1?t?0:null:s+1}function ra(s,l){return l&&s>3?s-2:s}function nu(s){return window.TouchEvent&&s instanceof window.TouchEvent}function lu(s,l){let{offsetWidth:t,offsetHeight:c}=s;if(l){const a=getComputedStyle(s);t=t-parseFloat(a.getPropertyValue("padding-left"))-parseFloat(a.getPropertyValue("padding-right")),c=c-parseFloat(a.getPropertyValue("padding-top"))-parseFloat(a.getPropertyValue("padding-bottom"))}return{width:t,height:c}}function at(s,l,t){return s<l?l:s>t?t:s}function ia(s){if(s===void 0)return 0;if(typeof s=="number")return s;const l=/^((\d+)?\.?\d+?)(ms|s)?$/,t=s.match(l);if(t){const[,c,,a="ms"]=t;return Number(c)*(a==="ms"?1:1e3)}return 0}const Du=hs("n-carousel-methods"),ca=s=>{gs(Du,s)},Wt=(s="unknown",l="component")=>{const t=ms(Du);return t||fs(s,"`".concat(l,"` must be placed inside `n-carousel`.")),t},da={total:{type:Number,default:0},currentIndex:{type:Number,default:0},dotType:{type:String,default:"dot"},trigger:{type:String,default:"click"},keyboard:Boolean},pa=W({name:"CarouselDots",props:da,setup(s){const{mergedClsPrefixRef:l}=it(s),t=R([]),c=Wt();function a(i,g){switch(i.key){case"Enter":case" ":i.preventDefault(),c.to(g);return}s.keyboard&&n(i)}function u(i){s.trigger==="hover"&&c.to(i)}function o(i){s.trigger==="click"&&c.to(i)}function n(i){var g;if(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey)return;const r=(g=document.activeElement)===null||g===void 0?void 0:g.nodeName.toLowerCase();if(r==="input"||r==="textarea")return;const{code:d}=i,F=d==="PageUp"||d==="ArrowUp",y=d==="PageDown"||d==="ArrowDown",B=d==="PageUp"||d==="ArrowRight",_=d==="PageDown"||d==="ArrowLeft",b=c.isVertical(),m=b?F:B,E=b?y:_;!m&&!E||(i.preventDefault(),m&&!c.isNextDisabled()?(c.next(),p(c.currentIndexRef.value)):E&&!c.isPrevDisabled()&&(c.prev(),p(c.currentIndexRef.value)))}function p(i){var g;(g=t.value[i])===null||g===void 0||g.focus()}return Cs(()=>t.value.length=0),{mergedClsPrefix:l,dotEls:t,handleKeydown:a,handleMouseenter:u,handleClick:o}},render(){const{mergedClsPrefix:s,dotEls:l}=this;return ee("div",{class:["".concat(s,"-carousel__dots"),"".concat(s,"-carousel__dots--").concat(this.dotType)],role:"tablist"},Fs(this.total,t=>{const c=t===this.currentIndex;return ee("div",{"aria-selected":c,ref:a=>l.push(a),role:"button",tabindex:"0",class:["".concat(s,"-carousel__dot"),c&&"".concat(s,"-carousel__dot--active")],key:t,onClick:()=>{this.handleClick(t)},onMouseenter:()=>{this.handleMouseenter(t)},onKeydown:a=>{this.handleKeydown(a,t)}})}))}}),ga=ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},ee("g",{fill:"none"},ee("path",{d:"M10.26 3.2a.75.75 0 0 1 .04 1.06L6.773 8l3.527 3.74a.75.75 0 1 1-1.1 1.02l-4-4.25a.75.75 0 0 1 0-1.02l4-4.25a.75.75 0 0 1 1.06-.04z",fill:"currentColor"}))),ma=ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},ee("g",{fill:"none"},ee("path",{d:"M5.74 3.2a.75.75 0 0 0-.04 1.06L9.227 8L5.7 11.74a.75.75 0 1 0 1.1 1.02l4-4.25a.75.75 0 0 0 0-1.02l-4-4.25a.75.75 0 0 0-1.06-.04z",fill:"currentColor"}))),fa=W({name:"CarouselArrow",setup(s){const{mergedClsPrefixRef:l}=it(s),{isVertical:t,isPrevDisabled:c,isNextDisabled:a,prev:u,next:o}=Wt();return{mergedClsPrefix:l,isVertical:t,isPrevDisabled:c,isNextDisabled:a,prev:u,next:o}},render(){const{mergedClsPrefix:s}=this;return ee("div",{class:"".concat(s,"-carousel__arrow-group")},ee("div",{class:["".concat(s,"-carousel__arrow"),this.isPrevDisabled()&&"".concat(s,"-carousel__arrow--disabled")],role:"button",onClick:this.prev},ga),ee("div",{class:["".concat(s,"-carousel__arrow"),this.isNextDisabled()&&"".concat(s,"-carousel__arrow--disabled")],role:"button",onClick:this.next},ma))}}),lt="CarouselItem",ha=s=>{var l;return((l=s.type)===null||l===void 0?void 0:l.name)===lt},mt=W({name:lt,setup(s){const{mergedClsPrefixRef:l}=it(s),t=Wt(su(lt),"n-".concat(su(lt))),c=R(),a=O(()=>{const{value:g}=c;return g?t.getSlideIndex(g):-1}),u=O(()=>t.isPrev(a.value)),o=O(()=>t.isNext(a.value)),n=O(()=>t.isActive(a.value)),p=O(()=>t.getSlideStyle(a.value));X(()=>{t.addSlide(c.value)}),Cu(()=>{t.removeSlide(c.value)});function i(g){const{value:r}=a;r!==void 0&&(t==null||t.onCarouselItemClick(r,g))}return{mergedClsPrefix:l,selfElRef:c,isPrev:u,isNext:o,isActive:n,index:a,style:p,handleClick:i}},render(){var s;const{$slots:l,mergedClsPrefix:t,isPrev:c,isNext:a,isActive:u,index:o,style:n}=this,p=["".concat(t,"-carousel__slide"),{["".concat(t,"-carousel__slide--current")]:u,["".concat(t,"-carousel__slide--prev")]:c,["".concat(t,"-carousel__slide--next")]:a}];return ee("div",{ref:"selfElRef",class:p,role:"option",tabindex:"-1","data-index":o,"aria-hidden":!u,style:n,onClickCapture:this.handleClick},(s=l.default)===null||s===void 0?void 0:s.call(l,{isPrev:c,isNext:a,isActive:u,index:o}))}}),Ca=Es("carousel","\n position: relative;\n width: 100%;\n height: 100%;\n touch-action: pan-y;\n overflow: hidden;\n",[V("slides","\n display: flex;\n width: 100%;\n height: 100%;\n transition-timing-function: var(--n-bezier);\n transition-property: transform;\n ",[V("slide","\n flex-shrink: 0;\n position: relative;\n width: 100%;\n height: 100%;\n outline: none;\n overflow: hidden;\n ",[Ce("> img","\n display: block;\n ")])]),V("dots","\n position: absolute;\n display: flex;\n flex-wrap: nowrap;\n ",[M("dot",[V("dot","\n height: var(--n-dot-size);\n width: var(--n-dot-size);\n background-color: var(--n-dot-color);\n border-radius: 50%;\n cursor: pointer;\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n outline: none;\n ",[Ce("&:focus","\n background-color: var(--n-dot-color-focus);\n "),M("active","\n background-color: var(--n-dot-color-active);\n ")])]),M("line",[V("dot","\n border-radius: 9999px;\n width: var(--n-dot-line-width);\n height: 4px;\n background-color: var(--n-dot-color);\n cursor: pointer;\n transition:\n width .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n outline: none;\n ",[Ce("&:focus","\n background-color: var(--n-dot-color-focus);\n "),M("active","\n width: var(--n-dot-line-width-active);\n background-color: var(--n-dot-color-active);\n ")])])]),V("arrow","\n transition: background-color .3s var(--n-bezier);\n cursor: pointer;\n height: 28px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, .2);\n color: var(--n-arrow-color);\n border-radius: 8px;\n user-select: none;\n -webkit-user-select: none;\n font-size: 18px;\n ",[Ce("svg","\n height: 1em;\n width: 1em;\n "),Ce("&:hover","\n background-color: rgba(255, 255, 255, .3);\n ")]),M("vertical","\n touch-action: pan-x;\n ",[V("slides","\n flex-direction: column;\n "),M("fade",[V("slide","\n top: 50%;\n left: unset;\n transform: translateY(-50%);\n ")]),M("card",[V("slide","\n top: 50%;\n left: unset;\n transform: translateY(-50%) translateZ(-400px);\n ",[M("current","\n transform: translateY(-50%) translateZ(0);\n "),M("prev","\n transform: translateY(-100%) translateZ(-200px);\n "),M("next","\n transform: translateY(0%) translateZ(-200px);\n ")])])]),M("usercontrol",[V("slides",[Ce(">",[Ce("div","\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n height: 100%;\n transform: translate(-50%, -50%);\n ")])])]),M("left",[V("dots","\n transform: translateY(-50%);\n top: 50%;\n left: 12px;\n flex-direction: column;\n ",[M("line",[V("dot","\n width: 4px;\n height: var(--n-dot-line-width);\n margin: 4px 0;\n transition:\n height .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n outline: none;\n ",[M("active","\n height: var(--n-dot-line-width-active);\n ")])])]),V("dot","\n margin: 4px 0;\n ")]),V("arrow-group","\n position: absolute;\n display: flex;\n flex-wrap: nowrap;\n "),M("vertical",[V("arrow","\n transform: rotate(90deg);\n ")]),M("show-arrow",[M("bottom",[V("dots","\n transform: translateX(0);\n bottom: 18px;\n left: 18px;\n ")]),M("top",[V("dots","\n transform: translateX(0);\n top: 18px;\n left: 18px;\n ")]),M("left",[V("dots","\n transform: translateX(0);\n top: 18px;\n left: 18px;\n ")]),M("right",[V("dots","\n transform: translateX(0);\n top: 18px;\n right: 18px;\n ")])]),M("left",[V("arrow-group","\n bottom: 12px;\n left: 12px;\n flex-direction: column;\n ",[Ce("> *:first-child","\n margin-bottom: 12px;\n ")])]),M("right",[V("dots","\n transform: translateY(-50%);\n top: 50%;\n right: 12px;\n flex-direction: column;\n ",[M("line",[V("dot","\n width: 4px;\n height: var(--n-dot-line-width);\n margin: 4px 0;\n transition:\n height .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n outline: none;\n ",[M("active","\n height: var(--n-dot-line-width-active);\n ")])])]),V("dot","\n margin: 4px 0;\n "),V("arrow-group","\n bottom: 12px;\n right: 12px;\n flex-direction: column;\n ",[Ce("> *:first-child","\n margin-bottom: 12px;\n ")])]),M("top",[V("dots","\n transform: translateX(-50%);\n top: 12px;\n left: 50%;\n ",[M("line",[V("dot","\n margin: 0 4px;\n ")])]),V("dot","\n margin: 0 4px;\n "),V("arrow-group","\n top: 12px;\n right: 12px;\n ",[Ce("> *:first-child","\n margin-right: 12px;\n ")])]),M("bottom",[V("dots","\n transform: translateX(-50%);\n bottom: 12px;\n left: 50%;\n ",[M("line",[V("dot","\n margin: 0 4px;\n ")])]),V("dot","\n margin: 0 4px;\n "),V("arrow-group","\n bottom: 12px;\n right: 12px;\n ",[Ce("> *:first-child","\n margin-right: 12px;\n ")])]),M("fade",[V("slide","\n position: absolute;\n opacity: 0;\n transition-property: opacity;\n pointer-events: none;\n ",[M("current","\n opacity: 1;\n pointer-events: auto;\n ")])]),M("card",[V("slides","\n perspective: 1000px;\n "),V("slide","\n position: absolute;\n left: 50%;\n opacity: 0;\n transform: translateX(-50%) translateZ(-400px);\n transition-property: opacity, transform;\n ",[M("current","\n opacity: 1;\n transform: translateX(-50%) translateZ(0);\n z-index: 1;\n "),M("prev","\n opacity: 0.4;\n transform: translateX(-100%) translateZ(-200px);\n "),M("next","\n opacity: 0.4;\n transform: translateX(0%) translateZ(-200px);\n ")])])]),Fa=["transitionDuration","transitionTimingFunction"],Ea=Object.assign(Object.assign({},Fu.props),{defaultIndex:{type:Number,default:0},currentIndex:Number,showArrow:Boolean,dotType:{type:String,default:"dot"},dotPlacement:{type:String,default:"bottom"},slidesPerView:{type:[Number,String],default:1},spaceBetween:{type:Number,default:0},centeredSlides:Boolean,direction:{type:String,default:"horizontal"},autoplay:Boolean,interval:{type:Number,default:5e3},loop:{type:Boolean,default:!0},effect:{type:String,default:"slide"},showDots:{type:Boolean,default:!0},trigger:{type:String,default:"click"},transitionStyle:{type:Object,default:()=>({transitionDuration:"300ms"})},transitionProps:Object,draggable:Boolean,prevSlideStyle:[Object,String],nextSlideStyle:[Object,String],touchable:{type:Boolean,default:!0},mousewheel:Boolean,keyboard:Boolean,"onUpdate:currentIndex":Function,onUpdateCurrentIndex:Function});let bt=!1;const Gt=W({name:"Carousel",props:Ea,setup(s){const{mergedClsPrefixRef:l,inlineThemeDisabled:t}=it(s),c=R(null),a=R(null),u=R([]),o={value:[]},n=O(()=>s.direction==="vertical"),p=O(()=>n.value?"height":"width"),i=O(()=>n.value?"bottom":"right"),g=O(()=>s.effect==="slide"),r=O(()=>s.loop&&s.slidesPerView===1&&g.value),d=O(()=>s.effect==="custom"),F=O(()=>!g.value||s.centeredSlides?1:s.slidesPerView),y=O(()=>d.value?1:s.slidesPerView),B=O(()=>F.value==="auto"||s.slidesPerView==="auto"&&s.centeredSlides),_=R({width:0,height:0}),b=O(()=>{const{value:h}=u;if(!h.length)return[];const{value:A}=B;if(A)return h.map(Q=>lu(Q));const{value:I}=y,{value:x}=_,{value:T}=p;let L=x[T];if(I!=="auto"){const{spaceBetween:Q}=s,de=L-(I-1)*Q,st=1/Math.max(1,I);L=de*st}const Z=Object.assign(Object.assign({},x),{[T]:L});return h.map(()=>Z)}),m=O(()=>{const{value:h}=b;if(!h.length)return[];const{centeredSlides:A,spaceBetween:I}=s,{value:x}=p,{[x]:T}=_.value;let L=0;return h.map(({[x]:Z})=>{let Q=L;return A&&(Q+=(Z-T)/2),L+=Z+I,Q})}),E=R(!1),D=O(()=>{const{transitionStyle:h}=s;return h?Qt(h,Fa):{}}),J=O(()=>d.value?0:ia(D.value.transitionDuration)),f=O(()=>{const{value:h}=u;if(!h.length)return[];const A=!(B.value||y.value===1),I=Z=>{if(A){const{value:Q}=p;return{[Q]:"".concat(b.value[Z][Q],"px")}}};if(d.value)return h.map((Z,Q)=>I(Q));const{effect:x,spaceBetween:T}=s,{value:L}=i;return h.reduce((Z,Q,de)=>{const st=Object.assign(Object.assign({},I(de)),{["margin-".concat(L)]:"".concat(T,"px")});return Z.push(st),E.value&&(x==="fade"||x==="card")&&Object.assign(st,D.value),Z},[])}),w=O(()=>{const{value:h}=F,{length:A}=u.value;if(h!=="auto")return Math.max(A-h,0)+1;{const{value:I}=b,{length:x}=I;if(!x)return A;const{value:T}=m,{value:L}=p,Z=_.value[L];let Q=I[I.length-1][L],de=x;for(;de>1&&Q<Z;)de--,Q+=T[de]-T[de-1];return at(de+1,1,x)}}),v=O(()=>ra(w.value,r.value)),S=_t(s.defaultIndex,r.value),$=R(ou(S,w.value,r.value)),H=ws(As(s,"currentIndex"),$),q=O(()=>_t(H.value,r.value));function Ee(h){var A,I;h=at(h,0,w.value-1);const x=ou(h,w.value,r.value),{value:T}=H;x!==H.value&&($.value=x,(A=s["onUpdate:currentIndex"])===null||A===void 0||A.call(s,x,T),(I=s.onUpdateCurrentIndex)===null||I===void 0||I.call(s,x,T))}function Ue(h=q.value){return na(h,w.value,s.loop)}function we(h=q.value){return la(h,w.value,s.loop)}function Ot(h){const A=Ve(h);return A!==null&&Ue()===A}function $e(h){const A=Ve(h);return A!==null&&we()===A}function Ut(h){return q.value===Ve(h)}function ku(h){return H.value===h}function $t(){return Ue()===null}function zt(){return we()===null}function ft(h){const A=at(_t(h,r.value),0,w.value);(h!==H.value||A!==q.value)&&Ee(A)}function ht(){const h=Ue();h!==null&&Ee(h)}function Qe(){const h=we();h!==null&&Ee(h)}function Lu(){(!he||!r.value)&&ht()}function xu(){(!he||!r.value)&&Qe()}let he=!1,Ie=0;const Ct=R({});function Ye(h,A=0){Ct.value=Object.assign({},D.value,{transform:n.value?"translateY(".concat(-h,"px)"):"translateX(".concat(-h,"px)"),transitionDuration:"".concat(A,"ms")})}function ze(h=0){g.value?Ft(q.value,h):Ie!==0&&(!he&&h>0&&(he=!0),Ye(Ie=0,h))}function Ft(h,A){const I=Kt(h);I!==Ie&&A>0&&(he=!0),Ie=Kt(q.value),Ye(I,A)}function Kt(h){let A;return h>=w.value-1?A=qt():A=m.value[h]||0,A}function qt(){if(F.value==="auto"){const{value:h}=p,{[h]:A}=_.value,{value:I}=m,x=I[I.length-1];let T;if(x===void 0)T=A;else{const{value:L}=b;T=x+L[L.length-1][h]}return T-A}else{const{value:h}=m;return h[w.value-1]||0}}const Ke={currentIndexRef:H,to:ft,prev:Lu,next:xu,isVertical:()=>n.value,isHorizontal:()=>!n.value,isPrev:Ot,isNext:$e,isActive:Ut,isPrevDisabled:$t,isNextDisabled:zt,getSlideIndex:Ve,getSlideStyle:Ru,addSlide:Tu,removeSlide:Vu,onCarouselItemClick:Mu};ca(Ke);function Tu(h){h&&u.value.push(h)}function Vu(h){if(!h)return;const A=Ve(h);A!==-1&&u.value.splice(A,1)}function Ve(h){return typeof h=="number"?h:h?u.value.indexOf(h):-1}function Ru(h){const A=Ve(h);if(A!==-1){const I=[f.value[A]],x=Ke.isPrev(A),T=Ke.isNext(A);return x&&I.push(s.prevSlideStyle||""),T&&I.push(s.nextSlideStyle||""),Is(I)}}function Mu(h,A){let I=!he&&!tt&&!Bt;s.effect==="card"&&I&&!Ut(h)&&(ft(h),I=!1),I||(A.preventDefault(),A.stopPropagation())}let Xe=null;function et(){Xe&&(clearInterval(Xe),Xe=null)}function Re(){et(),!s.autoplay||v.value<2||(Xe=window.setInterval(Qe,s.interval))}let Et=0,wt=0,Be=0,At=0,tt=!1,Bt=!1;function Zt(h){var A;if(bt||!(!((A=a.value)===null||A===void 0)&&A.contains(Ds(h))))return;bt=!0,tt=!0,Bt=!1,At=Date.now(),et(),h.type!=="touchstart"&&!h.target.isContentEditable&&h.preventDefault();const I=nu(h)?h.touches[0]:h;n.value?wt=I.clientY:Et=I.clientX,s.touchable&&(qe("touchmove",document,ut),qe("touchend",document,Me),qe("touchcancel",document,Me)),s.draggable&&(qe("mousemove",document,ut),qe("mouseup",document,Me))}function ut(h){const{value:A}=n,{value:I}=p,x=nu(h)?h.touches[0]:h,T=A?x.clientY-wt:x.clientX-Et,L=_.value[I];Be=at(T,-L,L),h.cancelable&&h.preventDefault(),g.value&&Ye(Ie-Be,0)}function Me(){const{value:h}=q;let A=h;if(!he&&Be!==0&&g.value){const I=Ie-Be,x=[...m.value.slice(0,w.value-1),qt()];let T=null;for(let L=0;L<x.length;L++){const Z=Math.abs(x[L]-I);if(T!==null&&T<Z)break;T=Z,A=L}}if(A===h){const I=Date.now()-At,{value:x}=p,T=_.value[x];Be>T/2||Be/I>.4?A=Ue(h):(Be<-T/2||Be/I<-.4)&&(A=we(h))}A!==null&&A!==h?(Bt=!0,Ee(A),Te(()=>{(!r.value||$.value!==H.value)&&ze(J.value)})):ze(J.value),Jt(),Re()}function Jt(){tt&&(bt=!1),tt=!1,Et=0,wt=0,Be=0,At=0,Ze("touchmove",document,ut),Ze("touchend",document,Me),Ze("touchcancel",document,Me),Ze("mousemove",document,ut),Ze("mouseup",document,Me)}function ju(){if(g.value&&he){const{value:h}=q;Ft(h,0)}else Re();g.value&&(Ct.value.transitionDuration="0ms"),he=!1}function Pu(h){if(h.preventDefault(),he)return;let{deltaX:A,deltaY:I}=h;h.shiftKey&&!A&&(A=I);const x=-1,T=1,L=(A||I)>0?T:x;let Z=0,Q=0;n.value?Q=L:Z=L;const de=10;(Q*I>=de||Z*A>=de)&&(L===T&&!zt()?Qe():L===x&&!$t()&&ht())}function Nu(){_.value=lu(c.value,!0),Re()}function Wu(){var h,A;B.value&&((A=(h=b.effect).scheduler)===null||A===void 0||A.call(h),b.effect.run())}function Gu(){s.autoplay&&et()}function Ou(){s.autoplay&&Re()}X(()=>{Bs(Re),requestAnimationFrame(()=>E.value=!0)}),Cu(()=>{Jt(),et()}),vs(()=>{const{value:h}=u,{value:A}=o,I=new Map,x=L=>I.has(L)?I.get(L):-1;let T=!1;for(let L=0;L<h.length;L++){const Z=A.findIndex(Q=>Q.el===h[L]);Z!==L&&(T=!0),I.set(h[L],Z)}T&&h.sort((L,Z)=>x(L)-x(Z))}),xe(q,(h,A)=>{if(h!==A)if(Re(),g.value){if(r.value){const{value:I}=w;v.value>2&&h===I-2&&A===1?h=0:h===1&&A===I-2&&(h=I-1)}Ft(h,J.value)}else ze()},{immediate:!0}),xe([r,F],()=>void Te(()=>{Ee(q.value)})),xe(m,()=>{g.value&&ze()},{deep:!0}),xe(g,h=>{h?ze():(he=!1,Ye(Ie=0))});const Uu=O(()=>({onTouchstartPassive:s.touchable?Zt:void 0,onMousedown:s.draggable?Zt:void 0,onWheel:s.mousewheel?Pu:void 0})),$u=O(()=>Object.assign(Object.assign({},Qt(Ke,["to","prev","next","isPrevDisabled","isNextDisabled"])),{total:v.value,currentIndex:H.value})),zu=O(()=>({total:v.value,currentIndex:H.value,to:Ke.to})),Ku={getCurrentIndex:()=>H.value,to:ft,prev:ht,next:Qe},qu=Fu("Carousel","-carousel",Ca,aa,s,l),Ht=O(()=>{const{common:{cubicBezierEaseInOut:h},self:{dotSize:A,dotColor:I,dotColorActive:x,dotColorFocus:T,dotLineWidth:L,dotLineWidthActive:Z,arrowColor:Q}}=qu.value;return{"--n-bezier":h,"--n-dot-color":I,"--n-dot-color-focus":T,"--n-dot-color-active":x,"--n-dot-size":A,"--n-dot-line-width":L,"--n-dot-line-width-active":Z,"--n-arrow-color":Q}}),je=t?ys("carousel",void 0,Ht,s):void 0;return Object.assign(Object.assign({mergedClsPrefix:l,selfElRef:c,slidesElRef:a,slideVNodes:o,duplicatedable:r,userWantsControl:d,autoSlideSize:B,realIndex:q,slideStyles:f,translateStyle:Ct,slidesControlListeners:Uu,handleTransitionEnd:ju,handleResize:Nu,handleSlideResize:Wu,handleMouseenter:Gu,handleMouseleave:Ou,isActive:ku,arrowSlotProps:$u,dotSlotProps:zu},Ku),{cssVars:t?void 0:Ht,themeClass:je==null?void 0:je.themeClass,onRender:je==null?void 0:je.onRender})},render(){var s;const{mergedClsPrefix:l,showArrow:t,userWantsControl:c,slideStyles:a,dotType:u,dotPlacement:o,slidesControlListeners:n,transitionProps:p={},arrowSlotProps:i,dotSlotProps:g,$slots:{default:r,dots:d,arrow:F}}=this,y=r&&_s(r())||[];let B=wa(y);return B.length||(B=y.map(_=>ee(mt,null,{default:()=>hu(_)}))),this.duplicatedable&&(B=oa(B)),this.slideVNodes.value=B,this.autoSlideSize&&(B=B.map(_=>ee(Yt,{onResize:this.handleSlideResize},{default:()=>_}))),(s=this.onRender)===null||s===void 0||s.call(this),ee("div",Object.assign({ref:"selfElRef",class:[this.themeClass,"".concat(l,"-carousel"),this.direction==="vertical"&&"".concat(l,"-carousel--vertical"),this.showArrow&&"".concat(l,"-carousel--show-arrow"),"".concat(l,"-carousel--").concat(o),"".concat(l,"-carousel--").concat(this.direction),"".concat(l,"-carousel--").concat(this.effect),c&&"".concat(l,"-carousel--usercontrol")],style:this.cssVars},n,{onMouseenter:this.handleMouseenter,onMouseleave:this.handleMouseleave}),ee(Yt,{onResize:this.handleResize},{default:()=>ee("div",{ref:"slidesElRef",class:"".concat(l,"-carousel__slides"),role:"listbox",style:this.translateStyle,onTransitionend:this.handleTransitionEnd},c?B.map((_,b)=>ee("div",{style:a[b],key:b},Vt(ee(Ss,Object.assign({},p),{default:()=>_}),[[bs,this.isActive(b)]]))):B)}),this.showDots&&g.total>1&&Xt(d,g,()=>[ee(pa,{key:u+o,total:g.total,currentIndex:g.currentIndex,dotType:u,trigger:this.trigger,keyboard:this.keyboard})]),t&&Xt(F,i,()=>[ee(fa,null)]))}});function wa(s){return s.reduce((l,t)=>(ha(t)&&l.push(t),l),[])}const Aa="_prepareLessons_1b8gi_1",Ba="_directoryMain_1b8gi_7",va="_resourceMain_1b8gi_8",ya="_lessonMain_1b8gi_16",_a="_resourceClose_1b8gi_25",ba="_showSideBar_1b8gi_31",Sa="_hideSideBar_1b8gi_43",Pe={prepareLessons:Aa,directoryMain:Ba,resourceMain:va,lessonMain:ya,resourceClose:_a,showSideBar:ba,hideSideBar:Sa},Ia="_directoryList_1q4ni_1",Da="_scrollBar_1q4ni_8",ka="_iconArrow_1q4ni_32",La="_itemImg_1q4ni_42",xa="_itemBg_1q4ni_79",Ta="_itemContent_1q4ni_104",Va="_subjects_1q4ni_114",Ra="_changeDir_1q4ni_124",Ma="_treeParent_1q4ni_149",ja="_treeChild_1q4ni_152",Pa="_treeItem_1q4ni_155",Na="_childItem_1q4ni_165",Wa="_title_1q4ni_165",Ga="_dir_1q4ni_1",Oa="_titleSelect_1q4ni_187",Ua="_arrow_1q4ni_194",$a="_arrowSelect_1q4ni_201",za="_childArrow_1q4ni_205",Ka="_childSelect_1q4ni_215",qa="_coursewareModal_1q4ni_221",z={directoryList:Ia,scrollBar:Da,"select-directory":"_select-directory_1q4ni_13",iconArrow:ka,"select-directory-info":"_select-directory-info_1q4ni_35",itemImg:La,itemBg:xa,itemContent:Ta,subjects:Va,changeDir:Ra,treeParent:Ma,treeChild:ja,treeItem:Pa,childItem:Na,title:Wa,dir:Ga,titleSelect:Oa,arrow:Ua,arrowSelect:$a,childArrow:za,childSelect:Ka,coursewareModal:qa},Za="_attendClassSearch_xg94n_1",Ja="_iconSearch_xg94n_20",Ha="_classList_xg94n_24",Qa="_content_xg94n_28",Ya="_item_xg94n_32",Xa="_cover_xg94n_38",eo="_iconCustom_xg94n_52",to="_editContainer_xg94n_62",uo="_editBtnGroup_xg94n_75",so="_delBtn_xg94n_78",ao="_editBtn_xg94n_75",oo="_itemImg_xg94n_102",no="_itemBg_xg94n_133",lo="_itemName_xg94n_158",ro="_teachingModal_xg94n_165",io="_removeVisiable_xg94n_168",co="_studentRemove_xg94n_174",po="_btnGroup_xg94n_186",Y={attendClassSearch:Za,iconSearch:Ja,classList:Ha,content:Qa,item:Ya,cover:Xa,iconCustom:eo,editContainer:to,editBtnGroup:uo,delBtn:so,editBtn:ao,itemImg:oo,itemBg:no,itemName:lo,teachingModal:ro,removeVisiable:io,studentRemove:co,btnGroup:po},go="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdoAAAKgCAMAAAALa0ynAAAAZlBMVEX4+fuFm9SJn9bq7veuvOKltt/19/qXqtvy9PnH0erN1u3BzOmNotfU2++fsN3n6/bW3fCbrdyUp9nu8fijs96ywOS5xua+yujR2e68yOfb4vLf5fKQpNipueDj6PTK1OzY3/G2w+XPOG7OAAANa0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGB26+A0YiCIgujMCCF02KPyT9UXY4xXDkC176VQNP0BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgg2znfqx17Oc2KNmu+eMSN+S15i/rNYg45x/nIOE137jbhG3NN8u/LbjmjWvweNu85Wyf73tDWVI9+7y1D57umLeOwdOteWsNnm7+Y/B00mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0n6xdwcnDgNRFAQZCWN80FH5p7rgGGbxp1WVQmMxlgZelrTjfVdK10/ZSP0P572GsJG613WsMWyk7vRZo1j22uZaw/jdbnIOehrbSN1qzAnKRupm5xrIzzZ4hnKS2ue1BrKRusN7DWQjdYdx52MbqdLigfxUjlFZ/vxkeWXR5UVjls8DXT7qdQ07STlDuUCDa2/P5rIqrpg/hbRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mZJmyVtlrRZ0mYdVkqr3lZKq15WSqs+FraqTiulWbeV0qrzsFJadVkpzfo4Q2Vdh5XSqvO2Upr13Ui1UgoAAAAAAAAAAAAAAAAAAAAAAAD8sQcHAgAAAABA/q+NoKqqqqqqqqqqqqqqqqqqCrtm2qUmDAXQdwOGoAiyuIwsjv//T/YULYQoVFrb43jmfhGVJXDJy3uEb7755ptvvvlmHibPjfwRTZnLHPJjeJ6zhZE/JcknWtE0ychWZZnIi/KpZT4+BPJHxBDLDE7A6mGvYVbIQyyiaC9DCqqdjLACNbIjKOQ1CUkTuWA2ozTPUusBocxAZ5DNuG/YPbqmu2IFb6U2BNRBWhJGqZ+lNgRlZG633chjJBGwFpsy2C7NtNow/RSRHFi+k1qvADj/L7U6g/P8TRbyIGtAJY4Ukkm1JmqdHoHkndSKfADUur3nOwAVWWyfpHYJNDJFuXbxgeXaoZw4m8AML30lFtpviSD4+RmKnCHTl3gi76VWPiugMGKhFayelkaZfUcG0f4GM9jzQ/gywgLY2mfirGvccJQABxHZQvxuasULgFTbtoFmnlrj4KROk3h/q/bYR9I8A479P8ByUm19VRrA+e3USp7CSSx2UMk8tYoBi79Qq4Lf4PTEpLa/boBAy5W9s3vRYUsGxc/PzSdQXhsZZT3pe6gVE5/EJgD/uWqzdITMVftA0rQYNi8Y7sIH9n2xSjZV/OTVNX4vGRK9iVoHDzjc/2d5IYZq+YvjA2qXMsLy79WGwId05FGfJRtgO6W2hsq0x72rtkkvVEDaspHDwqaCqF1o5HXRHSfA0w5dcXHD9qp2f7yy+L9qdQWRGVbCRW/9MKrWLporKMKWLagwvISxEpeDrLjLp7wsSyaJf6/20On5v2pl5TziKlA7/StWKzOuNulG7WPfvU+XGP7l1TZp8/XVmggyLR3JORdLmEVZX4kgqOsMKOp61R6WuMu84q7pfdHGZamRzbanAKjaxVebJGgq1PpBtTZ190P6AmrlY2QOwQdKsVhzj1qMAqLRFmgFaiSdfNU0akd3UbzPKyvg/HOhBrX+vFKKTQGLf6jWqAkS8avqLDa5AtXvxf45lUfUnqwirLjNvNbcV+vxumolvKn/dQCVvqSaozVQCv4stSc9wslRmyeJJ4YJkpHT8MVlBZzEpvnoCYCiXTpIag2XAezudc7ybs+oXlatbJRzVfz+ehxGZ+D6p/zBQ2qn8cRhtloJgOOdiQVlpm7qQvehI/11rgpOt/EYohu3JiJ+5bq2yQZuQzvC1GO1QwT77pqen65Wbyx8wP5+V9YRSGXI3k2i3B6dmv4eqA/XlfPbDnqCu25DOLyyWvEy6xIsgSqXKyYFTnILED5Z7cznty7+TSblKSCZmCHK8l6RSjyIf9U7xg0J0V23AdmLP43yKvB7s8oKbHkA7MUlB5az1K68EVZPUpsrNyTXwIfckPxkB6hNckE+YCeSofTFcyADDnAGdYaocTrz6sXVSlL5fQhjc9Ol48TdANj0o+6TMuT5at2oWeXD2avKyA24VCKLyrStXl8S5NrNGf0VKB1D5Q0eaCrz6mrFu7R1AZfTC+s6/PVXDKhQi00JlJ3a3T9Quzufknlqxcc+rA6co06pNZvLveFfAlLoVj5l24a8giC3j7f7ItMD6wpQm7bVVmKlzwDVQO66H8Wqf6JWK9jPVGsCYGUPpvFIBmi9Q0LfRxtQum1P4uTZ6bUNRyA1fVSI8i+h1qsBskY6tR0HBZCZQRKidKf24/lqj8BxplppVD9OHEYqUfEWAGd9ncyEuDuvCtaygMBNuJa/2rAHyj4qLL/GpN4WYJHLHbXi+QxlFRBbZdDz1e5ByVy1cgLUZ2f5LLeslPUKpxcMIuwZfKOcBxaJItJdGwp2fQvjLzBfe9x7olPUScRSa1PGgy4Q9ddNwer5aguoLbUcB5ip+1OV17doCi0uJgW6F6+bbuzsI/LSybN1DDvp1Hqx7t/laL6AWh/OktSe3FO79tuU/+gkyId5ahcfIyzuqdVA2KmdMX9WA1Gj465qdQhBreTCMYJ4sFIMlROPdxDlvVo79u++wFsWP9g5t+1GQSgM86sBPEcx1niM7/+SM8GgiHGSdHKRrMV30Xa1NgW/CpvNJlr94nByNbW8V8U0+0+alPDmlIUK015XSw8A2g6A05N7lAd3GWlR8DtZp8FoyLCdFEQO5PwL1FbLjWTAoNSmndNS2V8zpzMCLXm7WrN4+GW1KjCSxOQBzdIvrj7LrT263ghOtvM9TQCn+YbaqA7IlhmkUWr5ZIu2m0xssqijAIIn1CbeDolSa/yC91LKwpxO8UOeVJtWY4ZONdxMYDGgN9qgUuvfUPamLdIPQEKUWlV0vUkFCm39yAFU7w6jQgDJL9WKAldOnDygBtBljn7uhTMzX+Fj3LSBegDKr6hoXHZMU+lgVtsDaKZhajR3VBpNW/xutTkA+L9S2+SYyGtyB9pcqiEsvYJFdwrWO5hHhkTOzTbwAsDhO4pVk7lxJ6ClWhiVTJ9KwBHrO8/0YPnyZrVHqFv8strBAYACKi1h0mMD84Z+NaknRCM12+BmABj/CrXLiVfhAGeiqQ0ACHXF6s4P+r1q3qyWAU4BMPGqWuEBgBOTOJLSamJCsWKserrql9OZ87TeBrW7nbvfUWJ+lv7Ugt/V1dIICKfmZ6vOOFyfsdL3qvUB/HAGZPw1tcMkNJ13OlBSYpAjYoVX+nFzVC3XFkOoaAag2VUrIgBMfMfpARopDw0Ab52yGAF2Wx31uqhxtfATb1XLI6DlchM5S19Q2ye40nEi8R3p2bQk6Gbxo4VQP5Nhxnef2gLIxJccDAnmlHoCOO5abS2dSv2jXgSZ6n2Gykp5/o3sf9SWAIbb33aCZ9WmHq5EwfKdbFJdky1btT0D4M1nD/jugIyEf8uZnwxo53tcmonGaJp9T8tKvsaqLwXAnjnOdSh3MBONNdQrygkz9/kTansPEk+spxpJFtCHauUzntA5Ts7EjloS0G85ztWosIG3QMtNtScgl1ep4ZbnAC6r0OP0zkOYbrtszIkOV9pHausOkvxido5B0oaGKSOZyTuopLPqIhM7ak3yj1XrAXBVUO8bZcZLeooB4Xz9SBRBBCBWatv8hvNrtTRZVSFWEW60STf++ENQHev6GAeDH8ZEkp7zm9iBkg1VBolzSu/1XCxRL5K5Fal06z5QywUnhE8F0J+IwGyBntn1YxDXTTiPzTSavvLLqaeVOj9/jlrGHKhh7GEYlSc75Cu1p+UFJSJMsMNZxU6GWINjMV+vCA7eaWRQthrHXAW7DEBO/622guKHfCKhXuZGp9l1YlCWilqPXlUq4YIbkfTyrgi5VJVlC2IYEwdbKlVBLKdTsk9jJplq3Cjnegmn2rxNQPfgqXVxwxHkE2k65JuwANr/bN+bIgatoB5OKcg71ZICDbmDewnC0jskGWN5G0lSVaHUlv0TUVZoHgYAPK5UM3O45gXSR3NtDglryIeSGrGHz/6SjILc5+ip21XH1SWlRCGEoDvv4CiKojiSHY5/fyi0a2PyGmFMyWPckGjU8V9qQRR3Qmgar1t5Oo3EoG+ufOYja7FYLBaLxWKxWCwWi8VisVgsFovFYrFYLH/YgwMBAAAAACD/10ZQVVVVVVVVVVVVVVVVVVVhDw4EAAAAAID8XxtBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXagwMBAAAAAEH+1isMUAEAAAAAAAAAAAAAAABwBVauu45O9vfzAAAAAElFTkSuQmCC",mo=W({name:"select-lessonware",emits:["close","confirm"],setup(s,{emit:l}){const t=Je();ks();const c=ct(),a=K({loading:!1,list:[],teachingStatus:!1,musicTagList:[],selectItem:{},bookVersionId:null,keyword:null,currentGradeNum:null,instrumentId:null,removeVisiable:!1,removeRow:{}}),u=async()=>{a.loading=!0;try{const{data:i}=await mu({page:1,rows:99,type:"COURSEWARE",enableFlag:1,bookVersionId:a.bookVersionId,keyword:a.keyword,currentGradeNum:a.currentGradeNum,instrumentId:a.instrumentId});a.list=i.rows}catch(i){}a.loading=!1},o=async i=>{try{await Ju({id:a.removeRow.id}),c.success("删除成功"),u(),a.removeVisiable=!1}catch(g){console.log(g)}},n=pt(()=>u(),500),p=i=>{l("confirm",i),l("close")};return X(async()=>{try{await t.getSubjects();const{data:i}=await Zu({page:1,rows:99,type:"COURSEWARE"});(i.rows||[]).forEach(r=>{a.musicTagList.push({id:r.id,name:r.name})})}catch(i){}u()}),()=>e("div",{class:Y.selectLessonware},[e("div",{class:Y.attendClassSearch},[e(He,{placeholder:"请输入教材名称",clearable:!0,value:a.keyword,"onUpdate:value":i=>a.keyword=i,onKeyup:i=>{i.code==="Enter"&&n()},onClear:()=>{a.keyword=null,n()}},{prefix:()=>e("span",{class:"icon-search-input",onClick:()=>n()},null)}),e(Mt,{placeholder:"请选择乐器",value:a.instrumentId,"onUpdate:value":[i=>a.instrumentId=i,()=>n()],options:[{name:"全部乐器",id:null},...t.getSubjectList],checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null),e(eu,{placeholder:"全部版本",clearable:!0,options:[{id:null,name:"全部版本"},...a.musicTagList],labelField:"name",valueField:"id",value:a.bookVersionId,"onUpdate:value":[i=>a.bookVersionId=i,()=>n()]},null),e(eu,{placeholder:"全部年级",options:[{label:"全部年级",value:null},...ls.grades],value:a.currentGradeNum,"onUpdate:value":[i=>a.currentGradeNum=i,()=>n()],clearable:!0,filterable:!0},null)]),e(Fe,{class:Y.classList},{default:()=>[e(ge,{show:a.loading,class:Y.content},{default:()=>[e(ae,{size:[50,40]},{default:()=>[e("div",{class:Y.item,key:"item--1",onClick:()=>{a.selectItem={},a.teachingStatus=!0}},[e("div",{class:Y.cover},[e("div",{class:Y.itemImg},[e("div",{class:Y.itemBg},null),e(ie,{objectFit:"cover",src:go,lazy:!0,previewDisabled:!0,onLoad:i=>{i.target.dataset.loaded="true"}},null)])])]),a.list.map((i,g)=>e("div",{class:Y.item,key:"item-".concat(g),onClick:()=>p(i)},[e("div",{class:Y.cover},[e("div",{class:Y.itemImg},[e("div",{class:Y.itemBg},null),e(ie,{objectFit:"cover",src:i.coverImg,lazy:!0,previewDisabled:!0,onLoad:r=>{r.target.dataset.loaded="true"}},null),i.customFlag&&e(me,null,[e("div",{class:Y.iconCustom},null),e("div",{class:Y.editContainer},[e("div",{class:Y.editBtnGroup},[e(N,{size:"small",class:Y.delBtn,color:"#EA4132",onClick:r=>{r.stopPropagation(),a.removeVisiable=!0,a.removeRow=i}},{default:()=>[C("删除")]}),e(N,{size:"small",class:Y.editBtn,color:"#FFFFFF",onClick:r=>{r.stopPropagation(),a.selectItem=i,a.teachingStatus=!0}},{default:()=>[C("编辑")]})])])])])]),e("div",{class:Y.itemName},[i.name])]))]})]})]}),e(se,{show:a.teachingStatus,"onUpdate:show":i=>a.teachingStatus=i,preset:"card",showIcon:!1,class:["modalTitle background",Y.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(rs,{item:a.selectItem,onClose:()=>a.teachingStatus=!1,onConfirm:()=>{u(),a.selectItem={}}},null)]}),e(se,{show:a.removeVisiable,"onUpdate:show":i=>a.removeVisiable=i,preset:"card",class:["modalTitle",Y.removeVisiable],title:"删除教材"},{default:()=>[e("div",{class:Y.studentRemove},[e("p",null,[C("是否删除该教材")]),e(ae,{class:Y.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,type:"primary",onClick:o},{default:()=>[C("确定")]}),e(N,{round:!0,onClick:()=>a.removeVisiable=!1},{default:()=>[C("取消")]})]})])]})])}}),fo=W({name:"lessons-guide",emits:["close"],setup(s,{emit:l}){const t=K({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Lt("lessons1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:re(-4),left:re(-50),width:re(420),height:re(228)},btnsStyle:{bottom:re(35),left:re(111)},eleRectPadding:{left:7,top:7,width:14,height:-18}}],step:0}),c=R(!1),a=R({});(async()=>{var r;try{const d=await yu({guideTag:"teacher-guideInfo"});d.data?a.value=JSON.parse((r=d.data)==null?void 0:r.guideValue)||null:a.value={},a.value&&a.value.lessonsGuide?c.value=!1:c.value=!0}catch(d){console.log(d)}})();const o=()=>{var d,F,y,B;const r=document.getElementById("lessons-".concat(t.step));if(r){const _=r.getBoundingClientRect(),b=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.left)||0,m=((F=t.steps[t.step].eleRectPadding)==null?void 0:F.top)||0,E=((y=t.steps[t.step].eleRectPadding)==null?void 0:y.width)||0,D=((B=t.steps[t.step].eleRectPadding)==null?void 0:B.height)||0;t.box={left:_.x-b+"px",top:_.y-m+"px",width:_.width+E+"px",height:_.height+D+"px"}}else i()},n=async r=>{try{if(r!=="prepare-lessons")return;a.value?a.value.lessonsGuide=!1:a.value={lessonsGuide:!1};try{await rt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(d){console.log(d)}t.step=0,o(),c.value=!0}catch(d){}};X(()=>{setTimeout(()=>{o()},0),window.addEventListener("resize",p),k.on("teacher-guideInfo",n)});const p=()=>{o()};be(()=>{window.removeEventListener("resize",p),k.off("teacher-guideInfo",n)});const i=()=>{if(t.step>=4){g();return}t.step=t.step+1,o()},g=async()=>{a.value?a.value.lessonsGuide=!0:a.value={lessonsGuide:!0};try{const r=await rt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(r){console.log(r)}c.value=!1};return()=>e(me,null,[c.value?Vt(e("div",{"onUpdate:show":r=>c.value=r,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:ne.content,onClick:()=>i()},[e("div",{class:ne.backBtn,onClick:r=>{r.stopPropagation(),g()}},[C("跳过")]),e("div",{class:ne.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((r,d)=>{var F,y,B,_,b,m;return e("div",{onClick:E=>E.stopPropagation(),class:ne.item,style:r.type=="bottom"?{display:d===t.step?"":"none",left:"".concat((F=r.eleRect)==null?void 0:F.left,"px"),top:"-".concat((y=r.imgStyle)==null?void 0:y.height)}:r.type=="left"?{display:d===t.step?"":"none",top:"".concat(parseFloat((B=t.box)==null?void 0:B.height)/2-parseFloat((_=r.imgStyle)==null?void 0:_.height)*1920/100/2-14,"px")}:{display:d===t.step?"":"none",left:"".concat((b=r.eleRect)==null?void 0:b.left,"px"),top:"".concat((m=t.box)==null?void 0:m.height)}},[e("img",{class:ne.img,style:r.imgStyle,src:r.img},null),e("div",{class:ne.btns,style:r.btnsStyle},[t.step+1==t.steps.length?e(me,null,[e("div",{class:[ne.btn],onClick:()=>g()},[C("完成")])]):e("div",{class:ne.btn,onClick:()=>i()},[C("下一步 ("),t.step+1,C("/"),t.steps.length,C(")")])])])})])])]),[[Eu,c.value,"show"]]):null])}}),ho=W({name:"directory-main",setup(){const s=wu(),l=_e(),t=Rt(),c=R(!0),a=K({lastUseCoursewareId:s.query.lastUseCoursewareId?s.query.lastUseCoursewareId+"":null,unit:s.query.unit?s.query.unit+"":null,showSelectBookStatus:!1,coursewareStatus:!1}),u=async()=>{var F;try{const{data:y}=await mu({page:1,rows:99,type:"COURSEWARE",enableFlag:1}),B=y.rows||[];if(B.length>0){const _=B.find(E=>{var D;return E.id===(a.lastUseCoursewareId||((D=t.getUserInfo)==null?void 0:D.lastUseCoursewareId))});let b=null,m=null;if(_?(l.setBaseCourseware(_),b=_.id,m=_.instrumentIds):(l.setBaseCourseware(B[0]),b=(F=B[0])==null?void 0:F.id,m=B[0].instrumentIds),p(b),m){const{data:E}=await tu({instrumentIds:m});l.setInstrumentList(E)}}a.showSelectBookStatus=!0}catch(y){}},o=async()=>{try{const F=l.getBaseCourseware;if(!F.id)return;const{data:y}=await Hu({id:F.id}),B=y.lessonList||[],_=n(a.unit,B);B.forEach((b,m)=>{if(b.selected=!1,_.length>1)b.id===_[0]&&(b.selected=!0,b.knowledgeList.forEach(E=>{E.id===_[1]&&(l.setSelectKey(E==null?void 0:E.id),l.setLessonCoursewareId(E==null?void 0:E.lessonCoursewareId),l.setLessonCoursewareDetailId(E==null?void 0:E.lessonCoursewareDetailId))}));else if(m===0){b.selected=!0;const E=b.knowledgeList[0];l.setSelectKey(E==null?void 0:E.id),l.setLessonCoursewareId(E==null?void 0:E.lessonCoursewareId),l.setLessonCoursewareDetailId(E==null?void 0:E.lessonCoursewareDetailId)}}),l.setTreeList(B)}catch(F){}},n=(F,y,B=[])=>{for(const _ of y){if(_.knowledgeList&&_.knowledgeList.length>0){const b=n(F,_.knowledgeList,[...B,_.id]);if(b.includes(F))return b}if(_.id===F)return[...B,F]}return B},p=async F=>{try{await Qu({coursewareId:F}),t.getInfo()}catch(y){}},i=F=>{l.setSelectKey(F.id),l.setLessonCoursewareId(F.lessonCoursewareId),l.setLessonCoursewareDetailId(F.lessonCoursewareDetailId)},g=async F=>{c.value=!0,a.lastUseCoursewareId=F.lastUseCoursewareId,a.unit=F.unit,await u(),await o(),c.value=!1},r=async F=>{if(l.setBaseCourseware(F),F.instrumentIds){const{data:y}=await tu({instrumentIds:F.instrumentIds});l.setInstrumentList(y);let B=!1,_=null;if(y.forEach((b,m)=>{Array.isArray(b.instruments)&&b.instruments.forEach((E,D)=>{E.id===l.getInstrumentId&&(B=!0),m===0&&D===0&&(_=E.id)})}),B){const b=_;sessionStorage.removeItem("prepareLessonCourseWareSubjectIsNull"),l.setInstrumentId(b)}}o(),p(F.id)},d=O(()=>{const F=l.getBaseCourseware.instrumentNames;return F?F.split(",").join("、"):""});return X(async()=>{c.value=!0,await u(),await o(),c.value=!1,k.on("onChangeClass",async F=>{g(F)})}),()=>e(me,null,[e("div",{class:z.directoryList},[a.showSelectBookStatus&&(l.getBaseCourseware.id?e("div",{id:"lessons-0",class:z["select-directory-info"]},[e("div",{class:z.itemImg,onClick:()=>a.coursewareStatus=!0},[e(ie,{objectFit:"cover",src:l.getBaseCourseware.coverImg,lazy:!0,previewDisabled:!0,onLoad:F=>{F.target.dataset.loaded="true"}},null)]),e("div",{class:z.itemContent},[e("h2",null,[e(kt,{text:l.getBaseCourseware.name},null)]),e("div",{class:z.subjects},[e(kt,{text:d.value,time:d.value.length>15?10:5},null)]),e("div",{class:z.changeDir,onClick:()=>a.coursewareStatus=!0},[e("svg",{width:"11px",height:"10px",viewBox:"0 0 11 10",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("title",null,[C("切片")]),e("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{transform:"translate(-279.000000, -210.000000)",fill:"#0378EC","fill-rule":"nonzero"},[e("g",{transform:"translate(132.000000, 96.000000)"},[e("g",{transform:"translate(32.000000, 24.000000)"},[e("g",{transform:"translate(103.000000, 10.000000)"},[e("g",{transform:"translate(0.000000, 71.000000)"},[e("g",{transform:"translate(12.000000, 9.000000)"},[e("path",{d:"M10.4116565,3.89985699 C10.6551462,3.89985699 10.8747497,3.75140792 10.9680437,3.52360884 C11.0613377,3.29606287 11.0096883,3.03384082 10.8376072,2.85944797 L8.08018279,0.0692888872 C7.98888976,-0.0230962957 7.8410701,-0.0230962957 7.74977708,0.0692888872 L7.22840639,0.59689687 C7.13711336,0.689282053 7.13711336,0.838996672 7.22840639,0.931255299 L8.95772133,2.68113191 L0.230858792,2.68113191 C0.103423738,2.68113191 0,2.78566638 0,2.91475252 L0,3.66636293 C0,3.79532253 0.10329868,3.89998355 0.230858792,3.89998355 L10.4116565,3.89998355 L10.4116565,3.89985699 Z M10.877501,6.10001645 L0.699579677,6.10001645 C0.456089932,6.10001645 0.236486444,6.24846552 0.143192479,6.4762646 C0.0498985147,6.70381057 0.101547854,6.96603263 0.273628948,7.14042548 L3.03105338,9.93071111 C3.12234641,10.0230963 3.27016607,10.0230963 3.36145909,9.93071111 L3.88282978,9.40310313 C3.97412281,9.31071795 3.97412281,9.16100333 3.88282978,9.0687447 L2.15351484,7.31874154 L10.877501,7.31874154 C11.0065618,7.31874154 11.1111111,7.21281496 11.1111111,7.08233671 L11.1111111,6.33654783 C11.1111111,6.20594302 11.0065618,6.10001645 10.877501,6.10001645 Z"},null)])])])])])])])]),e("span",null,[C("切换教材")])])])]):e("div",{id:"lessons-0",class:z["select-directory"],onClick:()=>a.coursewareStatus=!0},[e("span",{class:["cr-ellipsis"],title:l.getBaseCourseware.name},[l.getBaseCourseware.name||"请选择教材"]),e(Au,{class:z.iconArrow},{default:()=>[e("svg",{width:"11px",height:"15px",viewBox:"0 0 11 15",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd",opacity:"0.699999988"},[e("g",{transform:"translate(-445.000000, -137.000000)",fill:"#131415"},[e("g",{transform:"translate(152.000000, 120.000000)"},[e("path",{d:"M299.326227,20.2118001 L304.934089,28.4366632 C305.245211,28.8929759 305.127511,29.515105 304.671198,29.8262273 C304.505147,29.9394437 304.308836,30 304.107861,30 L292.892139,30 C292.339854,30 291.892139,29.5522847 291.892139,29 C291.892139,28.7990254 291.952695,28.6027139 292.065911,28.4366632 L297.673773,20.2118001 C297.984895,19.7554873 298.607024,19.6377872 299.063337,19.9489096 C299.16663,20.0193364 299.255801,20.1085074 299.326227,20.2118001 Z",id:"三角形",transform:"translate(298.500000, 24.500000) rotate(-270.000000) translate(-298.500000, -24.500000) "},null)])])])])]})])),e(Fe,{class:z.scrollBar},{default:()=>[e(ge,{show:c.value},{default:()=>[e("div",{class:[z.listSection,!c.value&&l.getTreeList.length<=0?z.emptySection:""]},[l.getTreeList.map((F,y)=>e("div",{class:z.treeParent,key:"parent"+y},[e("div",{class:[z.treeItem,z.parentItem],onClick:()=>{l.getTreeList.forEach(B=>{F.id!==B.id&&(B.selected=!1)}),F.selected=!F.selected}},[F.knowledgeList&&F.knowledgeList.length>0&&e("span",{class:[z.arrow,F.selected?z.arrowSelect:""]},null),e("p",{class:[z.title,F.selected?z.titleSelect:""]},[e("span",{class:[z.dir,F.selected?z.dirSelect:""]},null),F.name])]),F.selected&&F.knowledgeList&&F.knowledgeList.map((B,_)=>e("div",{key:"child"+_,class:[z.treeItem,z.childItem,z.animation,l.getSelectKey===B.id?z.childSelect:""],onClick:()=>{l.getIsEditResource?k.emit("pageBeforeLeave",()=>i(B)):i(B)}},[e("span",{class:z.childArrow},null),e("p",{class:z.title},[B.name])]))]))]),!c.value&&l.getTreeList.length<=0&&e(fe,null,null)]})]}),e(se,{show:a.coursewareStatus,"onUpdate:show":F=>a.coursewareStatus=F,preset:"card",showIcon:!1,class:["modalTitle background",z.coursewareModal],title:"切换教材",blockScroll:!1},{default:()=>[e(mo,{onClose:()=>a.coursewareStatus=!1,onConfirm:F=>{l.getIsEditResource?k.emit("pageBeforeLeave",()=>r(F)):r(F)}},null)]})]),a.showSelectBookStatus&&e(fo,null,null)])}}),Co="_coursewareSection_fhk2d_1",Fo="_coursewareHeader_fhk2d_5",Eo="_coursewareFooter_fhk2d_71",ot={coursewareSection:Co,coursewareHeader:Fo,"lesson-main":"_lesson-main_fhk2d_11",coursewareFooter:Eo},wo="_tipsContainer_1rshs_1",Ao="_tipsLeft_1rshs_13",Bo="_tips_1rshs_1",vo="_iconTips_1rshs_22",yo="_btnNoTips_1rshs_27",_o="_btnGroupClass_1rshs_33",bo="_listContainer_1rshs_36",So="_listSection_1rshs_40",Io="_emptySection_1rshs_43",Do="_listItems_1rshs_47",ko="_knowledgePoint_1rshs_56",Lo="_btnItem_1rshs_56",xo="_btnTitle_1rshs_61",To="_operationGroup_1rshs_83",Vo="_iconCUp_1rshs_94",Ro="_iconCDown_1rshs_102",Mo="_iconCRemove_1rshs_110",jo="_addKnowledgePoint_1rshs_118",Po="_iconCAdd_1rshs_128",No="_list_1rshs_36",Wo="_itemWrap_1rshs_142",Go="_itemWrapBox_1rshs_147",Oo="_itemOperation_1rshs_155",Uo="_iconDelete_1rshs_170",$o="_attendClassModal_1rshs_179",zo="_addCourseware_1rshs_184",Ko="_removeVisiable1_1rshs_190",qo="_studentRemove_1rshs_196",Zo="_btnGroupModal_1rshs_207",Jo="_addMusicItem_1rshs_214",Ho="_addMusicName_1rshs_235",Qo="_addOtherSource_1rshs_245",P={tipsContainer:wo,tipsLeft:Ao,tips:Bo,iconTips:vo,btnNoTips:yo,btnGroupClass:_o,listContainer:bo,listSection:So,emptySection:Io,listItems:Do,knowledgePoint:ko,btnItem:Lo,btnTitle:xo,operationGroup:To,iconCUp:Vo,iconCDown:Ro,iconCRemove:Mo,addKnowledgePoint:jo,iconCAdd:Po,list:No,itemWrap:Wo,itemWrapBox:Go,itemOperation:Oo,iconDelete:Uo,attendClassModal:$o,addCourseware:zo,removeVisiable1:Ko,studentRemove:qo,btnGroupModal:Zo,addMusicItem:Jo,addMusicName:Ho,addOtherSource:Qo},ru="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAaVBMVEUAAAAajP8ZjP8ZjP8ajf8ekv8Zjf8ajP8ajf8bjf8fkv8bkf8Zjf8aj/8Zjf8ajf8ajf8ajv8bjv8ajv8ajv8ajv8bj/8akP8bkv8nnf8ZjP8ZjP7////1+v7z+f7P5/6azP5brf5Io/7PduV3AAAAG3RSTlMA+O/IkCHn2p1eGBLfOtK8roeFbFhPMCccDeBOkeRQAAACE0lEQVRo3rTVB3KDMBCF4ZVELy5gDM4zLfc/ZCIyDOPYlgVovwv8AytpyVaax+eTOmRSCJkd1Okc5ym5lMRRhheyKE7IiboIYRAWNe2UlgofqXLPj2s8ASvCa2gbPxKwJiKf1rt5WMm70UqXAKsFl3V/6ohNjj5ZqyQ2khVZ8rCDRzYShV1UYjGOEDuFHwdzDbBbcCWjXMIBmRu/Q8IJeTXMI4Ajwdu5JCGcCRN6TcEhteMO7ryVFRyrXgxdwjH5PPwjnDs+7Q8wuPzbgwEYBDfDyeI5YT6Y+LSIwCRaGo2Ate9h+IY10WyZyHj/NWL9VFIBa72O9LAmUvpTwl6nIx3slRte31ZHWthTNKkB8EVQk1ZAY4sUpIXQ2CLhtHSh8UWgF3GMCV8kXp4UjsjytHxhwhfJiFLMuCJIKceMLZIvc+eLxHTGjC1yphNmbJHT8jryRRQdMGOLHCiDwdh37aP7pH3U9aP5okjTPr9bM+19SQLvDfaRAe+Jn2bt2AhgEAaCYB/0XyghCQEgZvUVeMY2Qv935CHkdZEPT35hchjJWCEDkox6cmmR61csEmQlIssdWVPFwk2iAwlBIs6RYEoitigLSO0hChxSRYlSjdSDougUlS0pn0WNLoCAQBsE0gjcJMCZQID9MPMPls0AzGVUngT9K/pCmojxqJRkyjG3mk+2sGTUqyWRbTPyOJTIiA43AZS9OIpLRy6gAAAAAElFTkSuQmCC",Yo="_addCoursewareItem_13slg_1",Xo="_btnGroupModal_13slg_12",iu={addCoursewareItem:Yo,btnGroupModal:Xo};function en(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const tn=W({name:"add-courseware-item",props:{coursewareList:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(s,{emit:l}){const t=R([]);return()=>{let c;return e("div",{class:iu.addCoursewareItem},[e(Bu,{value:t.value,"onUpdate:value":a=>t.value=a},{default:()=>[e(Ls,{yGap:18,cols:2},en(c=s.coursewareList.map((a,u)=>e(xs,null,{default:()=>[e(Dt,{value:u},{default:()=>[a.name]})]})))?c:{default:()=>[c]})]}),e(ae,{class:iu.btnGroupModal,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:()=>{l("confirm",t.value)}},{default:()=>[C("确定")]})]})])}}}),un="_addOtherSource_1c8g7_1",sn="_sourceItem_1c8g7_8",an="_coverImg_1c8g7_11",on="_name_1c8g7_24",nn="_addOtherSourceModal_1c8g7_31",ln="_instrumentModal_1c8g7_34",rn="_musicModal_1c8g7_35",cn="_theoryModal_1c8g7_53",dn="_subjectSyncModal_1c8g7_57",pn="_attendClassModal_1c8g7_60",gn="_attendClassSaveModal_1c8g7_66",pe={addOtherSource:un,sourceItem:sn,coverImg:an,name:on,addOtherSourceModal:nn,instrumentModal:ln,musicModal:rn,theoryModal:cn,subjectSyncModal:dn,attendClassModal:pn,attendClassSaveModal:gn},mn=""+new URL("icon1-75d0865e.png",import.meta.url).href,fn=""+new URL("icon2-0917d8de.png",import.meta.url).href,hn=""+new URL("icon3-20aef624.png",import.meta.url).href,Cn=""+new URL("icon4-74cdf5a7.png",import.meta.url).href,Fn=""+new URL("icon5-817119a1.png",import.meta.url).href,En=""+new URL("icon6-3e36ae41.png",import.meta.url).href,wn=""+new URL("icon8-a98128fc.png",import.meta.url).href,An="_sourceRhythm_c7wm9_1",Bn="_btnGroup_c7wm9_12",St={sourceRhythm:An,btnGroup:Bn},vn=W({name:"source-rhythm",emits:["close","confirm"],setup(s,{emit:l}){const t=Rt(),c=R(),a=R(!0);let u="".concat(origin,"/classroom-app/#/tempo-practice?v=").concat(Date.now(),"&Authorization=").concat(t.getToken,"&platform=modal");/(localhost|192)/.test(location.host)&&(u="http://localhost:9002/#/tempo-practice?v=".concat(Date.now(),"&Authorization=").concat(t.getToken,"&platform=modal"));const o=()=>{var p,i;(i=(p=c.value)==null?void 0:p.contentWindow)==null||i.postMessage({api:"getTempoSetting"},"*")},n=p=>{var i;if(((i=p.data)==null?void 0:i.api)==="getTempoSetting"){const g=p.data.data?JSON.parse(p.data.data):{};l("confirm",{dataJson:JSON.stringify(g.setting),coverImg:"https://oss.dayaedu.com/ktqy/171013700931689a322a6.png"})}};return X(()=>{window.addEventListener("message",n)}),be(()=>{window.removeEventListener("message",n)}),()=>e("div",{class:St.sourceRhythm},[e(ge,{show:a.value},{default:()=>[e("iframe",{ref:c,onLoad:p=>{a.value=!1,Ts(p.target)},class:[St.container,"musicIframe"],frameborder:"0",src:u},null),e(ae,{class:St.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:o},{default:()=>[C("确认添加")]})]})]})])}}),yn="_container_19ipk_1",_n="_iconBack_19ipk_1",bn="_separator_19ipk_40",Sn="_wrap_19ipk_45",In="_listWrap_19ipk_49",Dn="_listWrapEmpty_19ipk_54",kn="_btnGroup_19ipk_91",De={container:yn,iconBack:_n,separator:bn,wrap:Sn,listWrap:In,listWrapEmpty:Dn,btnGroup:kn},Ln="_searchGroup_1n8vo_1",xn="_btnType_1n8vo_5",Tn="_swipeControll_1n8vo_13",Vn="_leftIcon_1n8vo_16",Rn="_disabled_1n8vo_28",Mn="_carouselGroup_1n8vo_42",jn="_carouselContainer_1n8vo_46",Pn="_inputSearch_1n8vo_57",Nn="_searchCatatory_1n8vo_78",Wn="_addTrain_1n8vo_85",Gn="_searchGroups_1n8vo_97",On="_instrumentList_1n8vo_100",Un="_list_1n8vo_104",$n="_itemWrap_1n8vo_114",zn="_itemWrapBox_1n8vo_119",Kn="_itemCard_1n8vo_127",qn="_itemImgSection_1n8vo_131",Zn="_itemTag_1n8vo_137",Jn="_iconCheck_1n8vo_164",Hn="_img_1n8vo_173",Qn="_itemImgSectionSelected_1n8vo_183",Yn="_itemTitle_1n8vo_190",te={searchGroup:Ln,btnType:xn,swipeControll:Tn,leftIcon:Vn,disabled:Rn,carouselGroup:Mn,carouselContainer:jn,inputSearch:Pn,searchCatatory:Nn,addTrain:Wn,searchGroups:Gn,instrumentList:On,list:Un,itemWrap:$n,itemWrapBox:zn,itemCard:Kn,itemImgSection:qn,itemTag:Zn,iconCheck:Jn,img:Hn,itemImgSectionSelected:Qn,itemTitle:Yn},Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAABApJREFUaEPlm8FrHFUcx3/f2Zk6M03xUBBE1KRQWgU9KFYQSw9pwOZgFfEgVKjYP0CsF2uhCBovFrwngmjRS8VEMB700FoVKtiDpWmKBwsigukKpWbeZGd2vvZtdsNms5udnZ3dCS8Le9l97/veZ3+/eb/3fu+3kJxfJEtBFD2BGAcJ7odgvwgfJLELkF16OFLuALwjgj8pXASxSJuXfMe5AqCa55SQhxhJJ6hUJ1HlMUImhLw3ky5wG5TvWMI5f0dpHkCUSaepU1+AJL0wjN9IKCdFuLvfyazvj7IFOeu69kcAVFbtTIDaDcOwepzkuxQ+kHXwNP0g+AvAGdctfZLFfXsGDMP4SJXJh0J5NM0Ec2sDWSjBest17W970UwNeNdaCML4PSFP9TJA7m2BKd+1T9+1KtNopwIkOaJUfI7Co2lEB90GgjnPs48B+K/bWF0BleJoItHXQnmsm9hQv4dctcR53vNwc7NxNwWswTG+LML7hjr51IPhHwv205tBdgTUbhmE0c9bznKt8JCrvus808ld2wLqBUWp+Kut8sx1M2j9mXyx3cLTFnBZRe8Xvlp2o9pgSUzt9Jx3Nhq45ZNanEuS+V71t0L7kmVNtsbJdRasbZTD6LehB/G8fh3Igu86jzfveNYBKhW/njCZyWu8InQsWCc8z/64MfYaoN44KxX/ntfeMkkSsSxr6Ix67+p59t7GBn0NUKno7YScymNGC9dvyIULP4nj2DIxfkhGxx7OQza1hgWc8jznA92hBlg7z6n477yOPNMzn0oYrtQmpK145Llx2bNnNPUE+2+Isu/Z9+vzZA1weSU+KtVktn/hVYXPv/hSyuV/1+QKgSxZL+y8x56rAQZBdJ7Cl/ICXFoqy+zcN2tWLMKSEJz3fedlrIaGuJw5zdDhV1lauiWzc/PFQQK3fdfejaBSOcBYLudlvWadwiFtOYAgiN6k8OwgALVmkZAQnMSyqkwL5cSgAAuFhMwgUNEPJA8OErAoSACXEKjKH6QMJUgN210BuYnlILqVV4BP4wWdICcnJ2Rs9KE0Ej20QVm76ArJHT306rtpO8iRkRF57fgrfWs3CwComA+4DVzU8EXG+DBheKCf3gZbtUrlKYnll1zX57rYsAP7Bga92Tb+uGT8gXdbpCyMTzppK+aZNry2sCgXL+q0oSOHxw/JWNFpQw04iMQvANHvYb46Jn5XrWhw6r5uRbMvXzSk0ddnjWfF6AvQuquafYVdhzS3CKHhqkaXkayDNLUQqAFpdClXE6S5xXjNWy1jyymbIY0uiG0BNbOkufV00FSU/iohhzPfFq8WpX/PEj7bEkXp7Y5B2n1VFD0pMZ4l+AgE+7r8reAGiOti80fPcX7NUpe92XHsf6EH9ozNKnEhAAAAAElFTkSuQmCC";function Xn(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const el=W({name:"search-group",props:{categoryChildList:{type:Array,default:()=>[]},wikiCategoryId:{type:String,default:""}},emits:["search","add"],expose:["init"],setup(s,{emit:l}){const t=K({currentIndex:0,keyword:"",wikiCategoryId:s.wikiCategoryId||"",maxIndex:0}),c=K({showSlide:!1}),a=()=>{l("search",t)},u=R(),o=n=>{var p,i;n==="left"?(p=u.value)==null||p.prev():n==="right"&&((i=u.value)==null||i.next())};return X(async()=>{Iu.nextTick(()=>{const n=document.querySelector(".carouselContainer"),p=n&&n.getBoundingClientRect().width||0,i=document.querySelectorAll(".n-carousel__slide");let g=0;i.forEach(r=>{const d=r.getBoundingClientRect();g+=d.width}),g>=p&&(c.showSlide=!0)})}),()=>{let n;return e("div",{class:te.searchGroup},[e("div",{class:[te.searchCatatory]},[e(ae,{size:"small",class:te.btnType},{default:()=>[s.categoryChildList.length>0?e(N,{type:t.wikiCategoryId===s.wikiCategoryId?"primary":"default",secondary:t.wikiCategoryId!==s.wikiCategoryId,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=s.wikiCategoryId,a()}},{default:()=>[C("全部")]}):"",e("div",{class:[te.carouselGroup]},[e(Gt,{ref:u,slidesPerView:"auto",loop:!1,class:[te.carouselContainer,"carouselContainer"],showDots:!1,draggable:c.showSlide,currentIndex:t.currentIndex,"onUpdate:currentIndex":p=>{t.currentIndex=p}},Xn(n=s.categoryChildList.map(p=>e(mt,null,{default:()=>[e(N,{type:t.wikiCategoryId===p.id?"primary":"default",secondary:t.wikiCategoryId!==p.id,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=p.id,a()}},{default:()=>[p.name]})]})))?n:{default:()=>[n]}),c.showSlide&&e(ae,{class:te.swipeControll},{default:()=>[e("div",{onClick:()=>o("left")},[e(ie,{previewDisabled:!0,class:[te.leftIcon],src:Ne},null)]),e("div",{onClick:()=>o("right")},[e(ie,{previewDisabled:!0,src:Ne},null)])]})])]}),e(jt,{class:te.inputSearch,placeholder:"请输入乐器名称",round:!0,onSearch:p=>{t.keyword=p,a()}},null)])])}}}),tl=W({name:"instrument-list",props:{categoryId:{type:String,default:""},categoryChildList:{type:Array,default:()=>[]},selectItems:{type:Array,default:()=>[]}},emits:["confirm"],setup(s,{emit:l}){We();const t=K({searchWord:"",loading:!1,pageTotal:0,finshed:!1,pagination:{page:1,rows:18},searchGroup:{type:"INSTRUMENT",keyword:"",wikiCategoryId:s.categoryId},tableList:[],teachingStatus:!1,show:!1,item:{}}),c=async()=>{t.loading=!0;try{const{data:o}=await Pt({...t.pagination,...t.searchGroup}),n=o.rows||[];n.forEach(p=>{p.knowledgeWikiCategories&&p.knowledgeWikiCategories.length&&(p.categories=p.knowledgeWikiCategories[0].knowledgeWikiCategoryTypeName)}),t.tableList.push(...n),t.pageTotal=Number(o.total),t.finshed=o.pages<=o.current}catch(o){}t.loading=!1},a=async o=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,o),t.tableList=[],c()},u=o=>{const n=s.selectItems||[],p=n.findIndex(i=>i.id===o.id);p!==-1?n.splice(p,1):n.push(o),l("confirm",n)};return X(()=>{c()}),()=>e("div",{class:te.instrumentList},[e(el,{class:te.searchGroups,categoryChildList:s.categoryChildList||[],onSearch:o=>a(o),wikiCategoryId:s.categoryId},null),e(Fe,{class:te.listContainer,style:{"max-height":"50vh"},onScroll:o=>{var g,r,d;const n=(g=o.target)==null?void 0:g.clientHeight,p=(r=o.target)==null?void 0:r.scrollTop,i=(d=o.target)==null?void 0:d.scrollHeight;n+p+20>=i&&!t.finshed&&!t.loading&&(t.pagination.page=t.pagination.page+1,c())}},{default:()=>[e(ge,{show:t.loading,"onUpdate:show":o=>t.loading=o,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:te.list},[t.tableList.map(o=>e("div",{class:te.itemWrap,onClick:()=>{t.item={content:o.id,title:o.name,type:"INSTRUMENT"},t.show=!0}},[e("div",{class:te.itemWrapBox},[e("div",{class:te.itemCard},[e("div",{class:[te.itemImgSection,s.selectItems.findIndex(n=>n.id===o.id)!==-1&&te.itemImgSectionSelected]},[e(ie,{src:o.avatar+"?imageMogr2/strip/format/jpg/size-limit/15k!",class:te.img,objectFit:"cover",previewDisabled:!0},null),e("i",{class:[te.iconCheck],onClick:n=>{n.stopPropagation(),u(o)}},null)]),e("div",{class:te.itemTitle},[o.name])])])])),!t.loading&&t.tableList.length<=0&&e(fe,{style:{minHeight:"50vh"},description:"暂无乐器百科"},null)])]})]}),e(gt,{size:"large",show:t.show,"onUpdate:show":o=>t.show=o,item:t.item},null)])}});function ul(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const sl=W({name:"content-instrument",emits:["confirm","close"],setup(s,{emit:l}){We();const t=K({tabValue:"",categoryList:[],loading:!1,selectItems:[]});(async()=>{t.loading=!0;try{const{data:u}=await Nt({type:"INSTRUMENT",page:1,rows:99});t.categoryList=u.rows||[],t.categoryList.length&&Te(()=>{t.tabValue="name-"+t.categoryList[0].id})}catch(u){}t.loading=!1})();const a=async()=>{const u=[];t.selectItems.forEach(o=>{u.push({coverImg:dt.INSTRUMENT_DEFAULT_COVER,title:"乐器百科-"+o.name,materialId:o.id,content:o.id})}),l("confirm",u)};return()=>{let u;return e("div",{class:De.container},[e("div",{class:De.wrap},[e("div",{class:[De.listWrap,!t.loading&&t.categoryList.length<=0&&De.listWrapEmpty]},[!t.loading&&t.categoryList.length<=0&&e(fe,{description:"暂无乐器百科"},null),e("div",{style:{minHeight:"55vh"}},[e(Ge,{defaultValue:"myResources",paneClass:De.paneTitle,justifyContent:"center",paneWrapperClass:De.paneWrapperContainer,value:t.tabValue,"onUpdate:value":o=>t.tabValue=o},ul(u=t.categoryList.map(o=>e(Oe,{name:"name-".concat(o.id),tab:o.name},{default:()=>[e(tl,{selectItems:t.selectItems,categoryId:o.id,categoryChildList:o.childrenList,onConfirm:n=>{t.selectItems=n||[]}},null)]})))?u:{default:()=>[u]})])])]),e(ae,{class:De.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:a},{default:()=>[C("确认添加")]})]})])}}}),al=W({name:"cotnent-knowledge",emits:["close","confirm"],setup(s,{emit:l}){const t=R(!1),c=R(!1),a=R(),u=K({fontSize:18,tableList:[],selectKey:null,details:{},selectCheckboxs:[]}),o=async()=>{t.value=!0,c.value=!0;try{const{data:i}=await Gs({type:"COURSEWARE"});if(u.tableList=i||[],u.tableList.length>0){const g=u.tableList[0].lessonCoursewareDetailKnowledgeDetailList;if(u.tableList[0].selected=!0,g&&g.length){const r=g[0];u.selectKey=r.id,await n()}u.tableList.forEach(r=>{r.checked=!1,r.indeterminate=!1})}}catch(i){}c.value=!1,t.value=!1},n=async()=>{c.value=!0;try{const{data:i}=await Os({id:u.selectKey});u.details=i}catch(i){}c.value=!1},p=()=>{const i=[];for(const r in u.selectCheckboxs){const d=u.selectCheckboxs[r],F=u.tableList[r];Array.isArray(F.lessonCoursewareDetailKnowledgeDetailList)&&F.lessonCoursewareDetailKnowledgeDetailList.forEach(y=>{d.includes(y.id)&&i.push(y)})}const g=[];i.forEach(r=>{g.push({coverImg:dt.THEORY_DEFAULT_COVER,title:"乐理知识-"+r.name,materialId:r.id,content:r.id})}),l("confirm",g)};return X(()=>{o()}),()=>{var i;return e("div",{class:j.container},[e("div",{class:[j.wrap]},[e("div",{class:j.content},[e("div",{class:j.contentWrap},[e("div",{class:j.directoryList},[e("div",{class:[j.scrollBar,!t.value&&u.tableList.length<=0?j.empty:""],style:{height:"100%"}},[e(ge,{show:t.value,style:{height:"100%"}},{default:()=>[e("div",{class:[j.listSection]},[u.tableList.map((g,r)=>e("div",{class:[j.treeParent,g.selected&&j.treeParentSelected],key:"parent"+r},[e("div",{class:[j.treeItem,j.parentItem],onClick:()=>{u.tableList.forEach(d=>{g.id!==d.id&&(d.selected=!1)}),g.selected=!g.selected}},[g.lessonCoursewareDetailKnowledgeDetailList&&g.lessonCoursewareDetailKnowledgeDetailList.length>0&&e("span",{class:[j.arrow,g.selected?j.arrowSelect:""]},null),e("p",{class:[j.title,g.selected?j.titleSelect:""]},[e("span",{class:[j.dir,g.selected?j.dirSelect:""]},null),e("p",null,[g.name])]),e("div",{class:j.checkbox,onClick:d=>{d.stopPropagation()}},[e(Dt,{checked:g.checked,indeterminate:g.indeterminate,"onUpdate:checked":d=>{g.checked=d;const F=g.lessonCoursewareDetailKnowledgeDetailList||[];if(d){const y=[];F.forEach(B=>{y.push(B.id)}),u.selectCheckboxs[r]=y}else u.selectCheckboxs[r]=[];g.indeterminate=!1}},null)])]),e(Bu,{value:u.selectCheckboxs[r],"onUpdate:value":d=>{u.selectCheckboxs[r]=d;const F=g.lessonCoursewareDetailKnowledgeDetailList||[];d.length<=0?(g.checked=!1,g.indeterminate=!1):d.length===F.length?(g.checked=!0,g.indeterminate=!1):(g.checked=!1,g.indeterminate=!0)}},{default:()=>[g.selected&&g.lessonCoursewareDetailKnowledgeDetailList&&g.lessonCoursewareDetailKnowledgeDetailList.map((d,F)=>e("div",{key:"child"+F,class:[j.treeItem,j.childItem,j.animation,u.selectKey===d.id?j.childSelect:""],onClick:()=>{u.selectKey!==d.id&&(u.selectKey=d.id,n(),a.value.$el.scrollTo(0,0))}},[e("span",{class:j.childArrow},null),e("p",{class:j.title},[d.name]),e("div",{class:j.checkbox,onClick:y=>y.stopPropagation()},[e(Dt,{value:d.id},null)])]))]})]))])]}),!t.value&&u.tableList.length<=0&&e(fe,{style:{height:"100%"}},null)])]),e("div",{class:j.musicStaff},[e(ge,{show:c.value,ref:a,class:!c.value&&!((i=u.details)!=null&&i.desc)?j.empty:""},{default:()=>{var g,r,d;return[(g=u.details)!=null&&g.desc?e("div",{class:j.musicContent,innerHTML:(r=u.details)==null?void 0:r.desc,style:{fontSize:u.fontSize+"px"}},null):"",!c.value&&!((d=u.details)!=null&&d.desc)&&e(fe,null,null)]}})]),e("div",{class:j.changeSizeSection},[e("img",{src:Us,class:j.iconT},null),e("img",{src:$s,class:j.iconAddT,onClick:()=>{u.fontSize>=32||(u.fontSize+=1)}},null),e(Ks,{value:u.fontSize,"onUpdate:value":g=>u.fontSize=g,vertical:!0,min:12,max:32},null),e("img",{src:zs,class:j.iconPlusT,onClick:()=>{u.fontSize<=12||(u.fontSize-=1)}},null)])])])]),e(ae,{class:j.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:p},{default:()=>[C("确认添加")]})]})])}}}),ol="_container_19ipk_1",nl="_iconBack_19ipk_1",ll="_separator_19ipk_40",rl="_wrap_19ipk_45",il="_listWrap_19ipk_49",cl="_listWrapEmpty_19ipk_54",dl="_btnGroup_19ipk_91",ke={container:ol,iconBack:nl,separator:ll,wrap:rl,listWrap:il,listWrapEmpty:cl,btnGroup:dl},pl="_searchGroup_1euh7_1",gl="_btnType_1euh7_5",ml="_swipeControll_1euh7_13",fl="_leftIcon_1euh7_16",hl="_disabled_1euh7_28",Cl="_carouselGroup_1euh7_42",Fl="_carouselContainer_1euh7_46",El="_inputSearch_1euh7_57",wl="_searchCatatory_1euh7_78",Al="_addTrain_1euh7_85",Bl="_searchGroups_1euh7_97",vl="_list_1euh7_100",yl="_itemWrap_1euh7_111",_l="_itemWrapBox_1euh7_116",bl="_itemCard_1euh7_124",Sl="_itemImgSection_1euh7_128",Il="_itemTag_1euh7_134",Dl="_iconCheck_1euh7_161",kl="_img_1euh7_170",Ll="_itemImgSectionSelected_1euh7_180",xl="_itemTitle_1euh7_187",ue={searchGroup:pl,btnType:gl,swipeControll:ml,leftIcon:fl,disabled:hl,carouselGroup:Cl,carouselContainer:Fl,inputSearch:El,searchCatatory:wl,addTrain:Al,searchGroups:Bl,list:vl,itemWrap:yl,itemWrapBox:_l,itemCard:bl,itemImgSection:Sl,itemTag:Il,iconCheck:Dl,img:kl,itemImgSectionSelected:Ll,itemTitle:xl};function Tl(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const Vl=W({name:"search-group",props:{categoryChildList:{type:Array,default:()=>[]},wikiCategoryId:{type:String,default:""}},emits:["search","add"],expose:["init"],setup(s,{emit:l}){const t=K({currentIndex:0,keyword:"",wikiCategoryId:s.wikiCategoryId||"",maxIndex:0}),c=K({showSlide:!1}),a=()=>{l("search",t)},u=R(),o=n=>{var p,i;n==="left"?(p=u.value)==null||p.prev():n==="right"&&((i=u.value)==null||i.next())};return X(async()=>{Iu.nextTick(()=>{const n=document.querySelector(".carouselContainer"),p=n&&n.getBoundingClientRect().width||0,i=document.querySelectorAll(".n-carousel__slide");let g=0;i.forEach(r=>{const d=r.getBoundingClientRect();g+=d.width}),g>=p&&(c.showSlide=!0)})}),()=>{let n;return e("div",{class:ue.searchGroup},[e("div",{class:[ue.searchCatatory]},[e(ae,{size:"small",class:ue.btnType},{default:()=>[s.categoryChildList.length>0?e(N,{type:t.wikiCategoryId===s.wikiCategoryId?"primary":"default",secondary:t.wikiCategoryId!==s.wikiCategoryId,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=s.wikiCategoryId,a()}},{default:()=>[C("全部")]}):"",e("div",{class:ue.carouselGroup},[e(Gt,{ref:u,slidesPerView:"auto",loop:!1,class:[ue.carouselContainer,"carouselContainer"],showDots:!1,draggable:c.showSlide,currentIndex:t.currentIndex,"onUpdate:currentIndex":p=>{t.currentIndex=p}},Tl(n=s.categoryChildList.map(p=>e(mt,null,{default:()=>[e(N,{type:t.wikiCategoryId===p.id?"primary":"default",secondary:t.wikiCategoryId!==p.id,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=p.id,a()}},{default:()=>[p.name]})]})))?n:{default:()=>[n]}),c.showSlide&&e(ae,{class:ue.swipeControll},{default:()=>[e("div",{onClick:()=>o("left")},[e(ie,{previewDisabled:!0,class:[ue.leftIcon],src:Ne},null)]),e("div",{onClick:()=>o("right")},[e(ie,{previewDisabled:!0,src:Ne},null)])]})])]}),e(jt,{class:ue.inputSearch,placeholder:"请输入音乐家名称",round:!0,onSearch:p=>{t.keyword=p,a()}},null)])])}}}),Rl=W({name:"musician-list",props:{categoryId:{type:String,default:""},categoryChildList:{type:Array,default:()=>[]},selectItems:{type:Array,default:()=>[]}},emits:["confirm"],setup(s,{emit:l}){We();const t=K({searchWord:"",loading:!1,pageTotal:0,finshed:!1,pagination:{page:1,rows:18},searchGroup:{type:"MUSICIAN",keyword:"",wikiCategoryId:s.categoryId},tableList:[],teachingStatus:!1,show:!1,item:{}}),c=async(o=!0)=>{o&&(t.loading=!0);try{const{data:n}=await Pt({...t.pagination,...t.searchGroup}),p=n.rows||[];p.forEach(i=>{i.knowledgeWikiCategories&&i.knowledgeWikiCategories.length&&(i.categories=i.knowledgeWikiCategories[0].knowledgeWikiCategoryTypeName)}),t.tableList.push(...p),t.pageTotal=Number(n.total),t.finshed=n.pages<=n.current}catch(n){}t.loading=!1},a=async o=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,o),t.tableList=[],c()},u=o=>{const n=s.selectItems||[],p=n.findIndex(i=>i.id===o.id);p!==-1?n.splice(p,1):n.push(o),l("confirm",n)};return X(()=>{c()}),()=>e("div",{class:ue.instrumentList},[e(Vl,{class:ue.searchGroups,categoryChildList:s.categoryChildList||[],onSearch:o=>a(o),wikiCategoryId:s.categoryId},null),e(Fe,{class:ue.listContainer,style:{"max-height":"50vh"},onScroll:o=>{var g,r,d;const n=(g=o.target)==null?void 0:g.clientHeight,p=(r=o.target)==null?void 0:r.scrollTop,i=(d=o.target)==null?void 0:d.scrollHeight;n+p+20>=i&&!t.finshed&&!t.loading&&(t.pagination.page=t.pagination.page+1,c(!1))}},{default:()=>[e(ge,{show:t.loading,"onUpdate:show":o=>t.loading=o,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:ue.list},[t.tableList.map(o=>e("div",{class:ue.itemWrap,onClick:()=>{t.item={content:o.id,title:o.name,type:"MUSICIAN"},t.show=!0}},[e("div",{class:ue.itemWrapBox},[e("div",{class:ue.itemCard},[e("div",{class:[ue.itemImgSection,s.selectItems.findIndex(n=>n.id===o.id)!==-1&&ue.itemImgSectionSelected]},[e(ie,{src:o.avatar,class:ue.img,objectFit:"cover",previewDisabled:!0},null),e("i",{class:[ue.iconCheck],onClick:n=>{n.stopPropagation(),u(o)}},null)]),e("div",{class:ue.itemTitle},[o.name])])])])),!t.loading&&t.tableList.length<=0&&e(fe,{style:{minHeight:"50vh"},description:"暂无音乐家"},null)])]})]}),e(gt,{size:"large",show:t.show,"onUpdate:show":o=>t.show=o,item:t.item},null)])}});function Ml(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const jl=W({name:"content-instrument",emits:["confirm","close"],setup(s,{emit:l}){const t=K({tabValue:"",categoryList:[],loading:!1,selectItems:[]});(async()=>{t.loading=!0;try{const{data:u}=await Nt({type:"MUSICIAN",page:1,rows:99});t.categoryList=u.rows||[],t.categoryList.length&&Te(()=>{t.tabValue="name-"+t.categoryList[0].id})}catch(u){}t.loading=!1})();const a=async()=>{const u=[];t.selectItems.forEach(o=>{u.push({coverImg:dt.MUSICIAN_DEFAULT_COVER,title:"音乐家-"+o.name,materialId:o.id,content:o.id})}),l("confirm",u)};return()=>{let u;return e("div",{class:ke.container},[e("div",{class:ke.wrap},[e("div",{class:[ke.listWrap,!t.loading&&t.categoryList.length<=0&&ke.listWrapEmpty]},[!t.loading&&t.categoryList.length<=0&&e(fe,{description:"暂无音乐家"},null),e("div",{style:{minHeight:"55vh"}},[e(Ge,{defaultValue:"myResources",paneClass:ke.paneTitle,justifyContent:"center",paneWrapperClass:ke.paneWrapperContainer,"onUpdate:value":[o=>{sessionStorage.setItem("content-instrument-tab",o)},o=>t.tabValue=o],value:t.tabValue},Ml(u=t.categoryList.map(o=>e(Oe,{name:"name-".concat(o.id),tab:o.name},{default:()=>[e(Rl,{selectItems:t.selectItems,categoryId:o.id,categoryChildList:o.childrenList,onConfirm:n=>{t.selectItems=n||[]}},null)]})))?u:{default:()=>[u]})])])]),e(ae,{class:ke.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:a},{default:()=>[C("确认添加")]})]})])}}}),Pl="_container_1o74q_1",Nl="_separator_1o74q_36",Wl="_wrap_1o74q_41",Gl="_listWrap_1o74q_44",Ol="_listWrapEmpty_1o74q_49",Ul="_btnGroup_1o74q_60",Le={container:Pl,separator:Nl,wrap:Wl,listWrap:Gl,listWrapEmpty:Ol,btnGroup:Ul},$l="_searchGroup_gol4m_1",zl="_btnType_gol4m_5",Kl="_swipeControll_gol4m_12",ql="_leftIcon_gol4m_15",Zl="_disabled_gol4m_27",Jl="_carouselGroup_gol4m_41",Hl="_carouselContainer_gol4m_44",Ql="_inputSearch_gol4m_55",Yl="_searchCatatory_gol4m_76",Xl="_border_gol4m_83",er="_addTrain_gol4m_87",tr="_searchGroups_gol4m_99",ur="_instrumentList_gol4m_102",sr="_list_gol4m_106",ar="_itemWrap_gol4m_115",or="_itemWrapBox_gol4m_122",nr="_iconCheck_gol4m_130",lr="_itemCard_gol4m_139",rr="_musicBg_gol4m_157",ir="_itemName_gol4m_163",cr="_itemImgSectionSelected_gol4m_168",dr="_popSelect_gol4m_171",pr="_spaceSection_gol4m_181",gr="_textBtn_gol4m_184",mr="_iconArrow_gol4m_195",fr="_textBtnActive_gol4m_204",U={searchGroup:$l,btnType:zl,swipeControll:Kl,leftIcon:ql,disabled:Zl,carouselGroup:Jl,carouselContainer:Hl,inputSearch:Ql,searchCatatory:Yl,border:Xl,addTrain:er,searchGroups:tr,instrumentList:ur,list:sr,itemWrap:ar,itemWrapBox:or,iconCheck:nr,itemCard:lr,musicBg:rr,itemName:ir,itemImgSectionSelected:cr,popSelect:dr,spaceSection:pr,textBtn:gr,iconArrow:mr,textBtnActive:fr};function cu(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const hr=W({name:"search-group",props:{categoryChildList:{type:Array,default:()=>[]},wikiCategoryId:{type:String,default:""}},emits:["search","add"],expose:["init"],setup(s,{emit:l}){const t=K({keyword:"",wikiCategoryId:s.wikiCategoryId||"",wikiCategoryIdChild:"",childIds:[],currentIndex:0}),c=R(),a=()=>{l("search",t)},u=(i,g)=>{const r={};return i==null||i.forEach(d=>{d.id===t.wikiCategoryIdChild&&(r.selected=!0,r.name=d.name)}),r},o=O(()=>{const g=(s.categoryChildList||[]).find(r=>r.id===t.wikiCategoryId);if(g&&g.childrenList.length){const r=[];return g.childrenList.forEach(d=>{const F=d.childrenList,y=[];F&&F.length>0&&(y.push({label:"全部",value:d.id,name:d.name,id:d.id}),F.forEach(B=>{y.push({label:B.name,value:B.id,name:B.name,id:B.id})})),r.push({...d,childrenList:y})}),[{label:"全部",value:"",id:"",name:"全部",childrenList:[]},...r]}return[]}),n=K({showSlide:!1}),p=i=>{var g,r;i==="left"?(g=c.value)==null||g.prev():i==="right"&&((r=c.value)==null||r.next())};return X(()=>{Te(()=>{const i=document.querySelector(".carouselContainer"),g=i&&i.getBoundingClientRect().width||0,r=document.querySelectorAll(".n-carousel__slide");let d=0;r.forEach(F=>{const y=F.getBoundingClientRect();d+=y.width}),d>=g&&(n.showSlide=!0)})}),()=>{let i,g;return e("div",{class:U.searchGroup},[e("div",{class:[U.searchCatatory,o.value.length>0?U.border:""]},[e(ae,{size:"small",class:U.btnType},{default:()=>[s.categoryChildList.length>0?e(N,{type:t.wikiCategoryId===s.wikiCategoryId?"primary":"default",secondary:t.wikiCategoryId!==s.wikiCategoryId,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=s.wikiCategoryId,t.wikiCategoryIdChild="",a()}},{default:()=>[C("全部")]}):e("span",null,null),e("div",{class:[U.carouselGroup]},[e(Gt,{ref:c,slidesPerView:"auto",loop:!1,class:[U.carouselContainer,"carouselContainer"],showDots:!1,draggable:n.showSlide,currentIndex:t.currentIndex,"onUpdate:currentIndex":r=>{t.currentIndex=r}},cu(i=s.categoryChildList.map(r=>e(mt,null,{default:()=>[e(N,{type:t.wikiCategoryId===r.id?"primary":"default",secondary:t.wikiCategoryId!==r.id,round:!0,size:"small",focusable:!1,onClick:()=>{t.wikiCategoryId=r.id,a()}},{default:()=>[r.name]})]})))?i:{default:()=>[i]}),n.showSlide&&e(ae,{class:U.swipeControll},{default:()=>[e("div",{onClick:()=>p("left")},[e(ie,{previewDisabled:!0,class:[U.leftIcon],src:Ne},null)]),e("div",{onClick:()=>p("right")},[e(ie,{previewDisabled:!0,src:Ne},null)])]})])]}),e(jt,{class:U.inputSearch,placeholder:"请输入曲目名称",round:!0,onSearch:r=>{t.keyword=r,a()}},null)]),o.value.length>0&&e("div",{class:[U.collapseWrap]},[e(ae,{class:[U.spaceSection]},cu(g=o.value.map((r,d)=>e(me,null,[r.childrenList.length>0?e(vu,{options:r.childrenList,trigger:"hover",value:t.wikiCategoryIdChild,"onUpdate:value":[F=>t.wikiCategoryIdChild=F,()=>{a()}],key:r.id,class:U.popSelect},{default:()=>[e("span",{class:[U.textBtn,u(r.childrenList).selected&&U.textBtnActive]},[u(r.childrenList).name||r.name,e("i",{class:U.iconArrow},null)])]}):e("span",{class:[U.textBtn,t.wikiCategoryIdChild===r.id&&U.textBtnActive],onClick:()=>{t.wikiCategoryIdChild=r.id,a()}},[r.name])])))?g:{default:()=>[g]})])])}}}),Cr=W({name:"music-list",props:{categoryId:{type:String,default:""},categoryChildList:{type:Array,default:()=>[]},selectItems:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(s,{emit:l}){We();const t=K({searchWord:"",loading:!1,finshed:!1,pageTotal:0,pagination:{page:1,rows:18},searchGroup:{type:"MUSIC",keyword:"",wikiCategoryId:s.categoryId},tableList:[],teachingStatus:!1,show:!1,item:{}}),c=async()=>{t.loading=!0;try{const{data:o}=await Pt({...t.pagination,...t.searchGroup});t.tableList.push(...o.rows),t.pageTotal=Number(o.total),t.finshed=o.pages<=o.current}catch(o){}t.loading=!1},a=async o=>{t.pagination.page=1,t.tableList=[];const{wikiCategoryIdChild:n,wikiCategoryId:p,keyword:i}=o;t.searchGroup=Object.assign(t.searchGroup,{wikiCategoryId:n||p,keyword:i}),c()},u=o=>{const n=s.selectItems||[],p=n.findIndex(i=>i.id===o.id);p!==-1?n.splice(p,1):n.push(o),l("confirm",n)};return X(()=>{c()}),()=>e("div",{class:U.instrumentList},[e(hr,{class:U.searchGroups,categoryChildList:s.categoryChildList||[],wikiCategoryId:s.categoryId,onSearch:o=>a(o)},null),e(Fe,{class:U.listContainer,style:{"max-height":"50vh"},onScroll:o=>{var g,r,d;const n=(g=o.target)==null?void 0:g.clientHeight,p=(r=o.target)==null?void 0:r.scrollTop,i=(d=o.target)==null?void 0:d.scrollHeight;n+p+20>=i&&!t.finshed&&!t.loading&&(t.pagination.page=t.pagination.page+1,c())}},{default:()=>[e(ge,{show:t.loading,"onUpdate:show":o=>t.loading=o,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:U.list},[t.tableList.map(o=>e("div",{class:U.itemWrap,onClick:()=>{t.item={content:o.id,title:o.name,type:"MUSIC_WIKI"},t.show=!0}},[e("div",{class:U.itemWrapBox},[e("div",{class:[U.itemCard,s.selectItems.findIndex(n=>n.id===o.id)!==-1&&U.itemImgSectionSelected]},[e("div",{class:U.itemName},[e("img",{src:o.avatar||qs,class:U.musicBg},null),e("span",{class:U.name},[o.name])]),e("i",{class:[U.iconCheck],onClick:n=>{n.stopPropagation(),u(o)}},null)])])])),!t.loading&&t.tableList.length<=0&&e(fe,{style:{minHeight:"50vh"},description:"暂无名曲鉴赏"},null)])]})]}),e(gt,{size:"large",show:t.show,"onUpdate:show":o=>t.show=o,item:t.item},null)])}});function Fr(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const Er=W({name:"content-music",emits:["close","confirm"],setup(s,{emit:l}){const t=K({tabValue:"",categoryList:[],loading:!1,selectItems:[]});(async()=>{t.loading=!0;try{const{data:u}=await Nt({type:"MUSIC",page:1,rows:99});t.categoryList=u.rows||[],t.categoryList.length&&Te(()=>{t.tabValue="name-"+t.categoryList[0].id})}catch(u){}t.loading=!1})();const a=async()=>{const u=[];t.selectItems.forEach(o=>{u.push({coverImg:dt.MUSIC_DEFAULT_COVER,title:"名曲鉴赏-"+o.name,materialId:o.id,content:o.id})}),l("confirm",u)};return()=>{let u;return e("div",{class:Le.container},[e("div",{class:Le.wrap},[e("div",{class:[Le.listWrap,!t.loading&&t.categoryList.length<=0&&Le.listWrapEmpty]},[!t.loading&&t.categoryList.length<=0&&e(fe,{description:"暂无名曲鉴赏"},null),e("div",{style:{minHeight:"55vh"}},[e(Ge,{defaultValue:"myResources",paneClass:Le.paneTitle,justifyContent:"center",paneWrapperClass:Le.paneWrapperContainer,value:t.tabValue,"onUpdate:value":o=>t.tabValue=o},Fr(u=t.categoryList.map(o=>e(Oe,{name:"name-".concat(o.id),tab:o.name},{default:()=>[e(Cr,{selectItems:t.selectItems,categoryId:o.id,categoryChildList:o.childrenList,onConfirm:n=>{t.selectItems=n||[]}},null)]})))?u:{default:()=>[u]})])])]),e(ae,{class:Le.btnGroup,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:a},{default:()=>[C("确认添加")]})]})])}}}),wr="_btnGroupModal_1ug7x_1",Ar="_subjectSync_1ug7x_8",Br="_tips_1ug7x_11",vr="_subjectList_1ug7x_49",yr="_subjectItem_1ug7x_56",_r="_imgSection_1ug7x_56",br="_iconSelect_1ug7x_77",Sr="_subjectName_1ug7x_85",Ir="_subjectSelect_1ug7x_89",Ae={btnGroupModal:wr,subjectSync:Ar,tips:Br,subjectList:vr,subjectItem:yr,imgSection:_r,iconSelect:br,subjectName:Sr,subjectSelect:Ir};function Dr(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Se(s)}const kr=W({name:"subject-sync",props:{subjectId:{type:[String,Number],default:""}},emits:["close","confirm"],setup(s,{emit:l}){const t=Je();_e();const c=R(""),a=ct(),u=R([]),o=R([]),n={Panpipes:"https://oss.dayaedu.com/ktqy/17103860536976fd4a751.png",Ocarina:"https://oss.dayaedu.com/ktqy/17143623857205dba41a5.png",Whistling:"https://oss.dayaedu.com/ktqy/1714362351692fcf8c0b8.png",Woodwind:"https://oss.dayaedu.com/ktqy/17103860536966826c50d.png","Tenor Recorder":"https://oss.dayaedu.com/ktqy/17103860536950592e357.png",Nai:"https://oss.dayaedu.com/ktqy/1710386053697af4aa985.png","Baroque Recorder":"https://oss.dayaedu.com/ktqy/1710386053698031e847a.png"},p=()=>{if(u.value.length<=0){a.error("至少选择一个声部进行同步");return}const g=[];u.value.forEach(r=>{const d=o.value.find(F=>F.id===r);console.log(d,"item"),d&&g.push({materialId:d.id,coverImg:n[d.code]||n.Panpipes,dataJson:null,title:d.name,isCollect:!1,isSelected:!1,content:d.code})}),l("confirm",{subjectIds:u.value,subjectCode:g})},i=()=>{const g=t.getEnableSubjects,r=[];g.forEach(d=>{c.value===""&&d.instruments?r.push(...d.instruments):c.value&&d.instruments&&Number(c.value)===d.id&&r.push(...d.instruments)}),o.value=r};return X(async()=>{await t.getSubjects(),i(),s.subjectId&&(u.value=[Number(s.subjectId)])}),()=>{let g;return e("div",{class:Ae.subjectSync},[e(Ge,{defaultValue:"",paneClass:Ae.paneTitle,justifyContent:"start",paneWrapperClass:Ae.paneWrapperContainer,value:c.value,"onUpdate:value":r=>{c.value=r,i()}},Dr(g=[{name:"全部声部",id:""},...t.getEnableSubjects].map(r=>e(Oe,{name:"".concat(r.id),tab:r.name,displayDirective:"if"},null)))?g:{default:()=>[g]}),e(Fe,{style:{maxHeight:"50vh",minHeight:"50vh"}},{default:()=>[e("div",{class:Ae.subjectList},[o.value.map(r=>e("div",{class:[Ae.subjectItem,u.value.includes(r.id)?Ae.subjectSelect:""],onClick:()=>{if(u.value.includes(r.id)){const d=u.value.indexOf(r.id);u.value.splice(d,1)}else u.value.push(r.id)}},[e("div",{class:Ae.imgSection},[e("img",{src:r.img},null),u.value.includes(r.id)&&e("img",{src:Zs,class:Ae.iconSelect},null)]),e("p",{class:Ae.subjectName},[r.name])]))])]}),e(ae,{class:Ae.btnGroupModal,justify:"center"},{default:()=>[e(N,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{round:!0,type:"primary",onClick:p},{default:()=>[C("确定")]})]})])}}}),Lr=W({name:"add-other-source",emits:["close","comfirm"],setup(s,{emit:l}){_e();const t=We(),c=R([{image:wn,name:"上传资源",index:7},{image:mn,name:"听音练习",index:0},{image:fn,name:"节奏练习",index:1},{image:hn,name:"乐器百科",index:2},{image:En,name:"名曲鉴赏",index:3},{image:Fn,name:"音乐家",index:4},{image:Cn,name:"乐理知识",index:5}]),a=K({listenStatus:!1,rhythmStatus:!1,theoryStatus:!1,musicStatus:!1,instrumentStatus:!1,musicianStatus:!1,uploadStatus:!1,saveStatus:!1,editStatus:!1,editList:[],editIds:[],editOverIds:[]}),u=o=>{switch(o.index){case 0:a.listenStatus=!0;break;case 1:a.rhythmStatus=!0;break;case 2:a.instrumentStatus=!0;break;case 3:a.musicStatus=!0;break;case 4:a.musicianStatus=!0;break;case 5:a.theoryStatus=!0;break;case 6:k.emit("pageBeforeLeave",()=>{sessionStorage.setItem("notation-open-create","1"),t.push("/notation")});break;case 7:a.saveStatus=!0;break}};return()=>e(me,null,[e("div",{class:pe.addOtherSource},[c.value.map(o=>e("div",{class:pe.sourceItem,onClick:()=>u(o)},[e(ie,{class:pe.coverImg,src:o.image,previewDisabled:!0},null),e("p",{class:pe.name},[o.name])]))]),e(se,{show:a.rhythmStatus,"onUpdate:show":o=>a.rhythmStatus=o,preset:"card",class:["modalTitle background",pe.addOtherSourceModal],title:"节奏练习"},{default:()=>[e(vn,{onClose:()=>a.rhythmStatus=!1,onConfirm:o=>{a.rhythmStatus=!1,l("comfirm",{materialId:null,coverImg:o.coverImg,dataJson:o.dataJson,title:"节奏练习",isCollect:!1,isSelected:!1,content:null,type:"RHYTHM"}),l("close")}},null)]}),e(se,{show:a.instrumentStatus,"onUpdate:show":o=>a.instrumentStatus=o,preset:"card",class:["modalTitle",pe.instrumentModal],title:"乐器百科"},{default:()=>[e(sl,{onClose:()=>a.instrumentStatus=!1,onConfirm:o=>{a.instrumentStatus=!1;const n=o||[],p=[];n.forEach(i=>{p.push({materialId:i.materialId,coverImg:i.coverImg,dataJson:null,title:i.title,isCollect:!1,isSelected:!1,content:i.content,type:"INSTRUMENT"})}),l("comfirm",p),l("close")}},null)]}),e(se,{show:a.theoryStatus,"onUpdate:show":o=>a.theoryStatus=o,preset:"card",class:["modalTitle",pe.theoryModal],title:"乐理知识"},{default:()=>[e(al,{onClose:()=>a.theoryStatus=!1,onConfirm:o=>{a.theoryStatus=!1;const n=o||[],p=[];n.forEach(i=>{p.push({materialId:i.materialId,coverImg:i.coverImg,dataJson:null,title:i.title,isCollect:!1,isSelected:!1,content:i.content,type:"THEORY"})}),l("comfirm",p),l("close")}},null)]}),e(se,{show:a.musicianStatus,"onUpdate:show":o=>a.musicianStatus=o,preset:"card",class:["modalTitle",pe.instrumentModal],title:"音乐家"},{default:()=>[e(jl,{onClose:()=>a.musicianStatus=!1,onConfirm:o=>{a.musicianStatus=!1;const n=o||[],p=[];n.forEach(i=>{p.push({materialId:i.materialId,coverImg:i.coverImg,dataJson:null,title:i.title,isCollect:!1,isSelected:!1,content:i.content,type:"MUSICIAN"})}),l("comfirm",p),l("close")}},null)]}),e(se,{show:a.musicStatus,"onUpdate:show":o=>a.musicStatus=o,preset:"card",class:["modalTitle",pe.musicModal],title:"名曲鉴赏"},{default:()=>[e(Er,{onClose:()=>a.musicStatus=!1,onConfirm:o=>{a.musicStatus=!1;const n=o||[],p=[];n.forEach(i=>{p.push({materialId:i.materialId,coverImg:i.coverImg,dataJson:null,title:i.title,isCollect:!1,isSelected:!1,content:i.content,type:"MUSIC_WIKI"})}),l("comfirm",p),l("close")}},null)]}),e(se,{show:a.listenStatus,"onUpdate:show":o=>a.listenStatus=o,preset:"card",class:["modalTitle background",pe.subjectSyncModal],title:"选择乐器"},{default:()=>[e(kr,{onClose:()=>a.listenStatus=!1,onConfirm:async o=>{try{a.musicStatus=!1;const n=o.subjectCode||[],p=[];n.forEach(i=>{p.push({materialId:i.materialId,coverImg:i.coverImg,dataJson:null,title:i.title,isCollect:!1,isSelected:!1,content:i.content,type:"LISTEN"})}),a.listenStatus=!1,l("comfirm",p),l("close")}catch(n){}}},null)]}),e(se,{show:a.uploadStatus,"onUpdate:show":o=>a.uploadStatus=o,preset:"card",showIcon:!1,class:["modalTitle background",pe.attendClassModal],title:a.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[e(Js,{editStatus:a.editStatus,onClose:()=>{a.uploadStatus=!1},onConfirm:o=>{a.editIds=[],a.editList=[],a.editOverIds=[],a.saveStatus=!1;try{a.musicStatus=!1;const n=o||[],p=[];n.forEach(i=>{p.push({materialId:i.id,coverImg:i.coverImg,dataJson:null,title:i.name,isCollect:!1,isSelected:!1,content:i.content,type:i.type})}),l("comfirm",p),l("close")}catch(n){}},list:a.editList},null)]}),e(se,{show:a.saveStatus,"onUpdate:show":o=>a.saveStatus=o,preset:"card",showIcon:!1,class:["modalTitle background",pe.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[e(Hs,{onClose:()=>a.saveStatus=!1,onConfrim:o=>{const n=o||[],p=[];n.forEach(i=>{p.push({subjectIds:null,openFlag:!1,coverImg:i.coverImg,title:i.name||"",type:Qs(i.content),enableFlag:1,content:i.content,id:null})}),a.editList=p,a.uploadStatus=!0,a.editStatus=!1}},null)]})])}}),xr="_protocolModal_6k92d_1",Tr="_dingPng_6k92d_4",Vr="_downMove_6k92d_13",Rr="_downMoveBg_6k92d_21",Mr="_closeAble_6k92d_28",jr="_submitAppBtn_6k92d_54",Pr="_cancelBtn_6k92d_55",Nr="_protocolGroup_6k92d_65",Wr="_checkbox_6k92d_75",Gr="_checkboxActive_6k92d_83",Or="_protocolSection_6k92d_90",Ur="_protocolContent_6k92d_123",$r="_child_6k92d_134",oe={protocolModal:xr,dingPng:Tr,downMove:Vr,downMoveBg:Rr,closeAble:Mr,submitAppBtn:jr,cancelBtn:Pr,protocolGroup:Nr,checkbox:Wr,checkboxActive:Gr,protocolSection:Or,protocolContent:Ur,child:$r},zr=""+new URL("dingPng-b63c3ae2.png",import.meta.url).href,du=""+new URL("moveTop-6b6421db.png",import.meta.url).href,pu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAi9JREFUaEPt2a9LBEEUwPHvBUFEg0EQ0SD+BTaLSbCYTAo2k0WDlvMHCCJisWgwWRVMJoNgMtj8CwSDv8BgUhEElYFdWZe7nbcz78Fx7Na7ebOfeTtvZnZrtMlVaxMHFaTVMlllpMqI0QhIHq0hYBx4Ay6AT6N7ScN2ApNAN3AF3Ev680GGgT2gIwn2AKwDr5LgAf/pBXaAwaTtF7AC3Pli+SALwFQuyCOwZoDJI9Juz4HDWMg8MN0giDamGcJ1fQYcxUL6gP3kec3H0sIUId6BJeAlFuLajwDbRhgfYgO49SHc7745ksawwKghykC0M6OKKAvRwqgjQiCxGBNEKCQUY4aIgfgwT8BqZtE0RcRCpJif3LYjW03dOiEusUVlWFp+i2IUlWaXme/M3skEoZERyTrTaBDUMpEG18hIWYw6QjMjUowJwgLiqtMuMNBkUj0DdYMjgHivJdm3FZXYbHutXfO/e9KaI1JE2rk6RgPiW+zcOuLO3/lLFRML8SHcYucgVueZv8GJgUgQ6aHI4jyjMkfKICSlOfoxC8lICMIcUxYSgzDFlIFoIMwwUogmwgQjgVgg1DE+SFfy7jd9F2txnvCV5mXgw7dH8kFmgbkGQbR3sUWYE+A4FrKYvOK3yET+3pph3KeMg1jIKLCVCaKdCQlmE7iJhbj2Y8BE8qHnFHBnCsurH5gBeoBL4FrSmW+OSGK0xH8qSEukIXMTVUaqjBiNQPVoGQ1scNi2ycgvTfaxM/Rb2jIAAAAASUVORK5CYII=",Kr=W({name:"add-courseware-protocol",emits:["close","confirm"],setup(s,{emit:l}){const t=K({status:!1,protocolShow:!1});return()=>e("div",{class:oe.protocolModal},[e("img",{src:zr,class:oe.dingPng,alt:""},null),t.protocolShow?e("div",{class:oe.protocolSection},[e("img",{src:du,class:oe.downMoveBg,alt:""},null),e("img",{src:pu,class:oe.closeAble,onClick:()=>{t.protocolShow=!1},alt:""},null),e("h2",null,[C("《音乐数字课堂课件与作业公开服务协议》")]),e(Fe,{style:{maxHeight:"45vh"}},{default:()=>[e("div",{class:oe.protocolContent},[e("p",{style:{paddingTop:"0"}},[C("欢迎使用音乐数字课堂!")]),e("p",null,[C("重要须知")]),C("武汉酷乐秀网络科技有限公司(以下统称“平台方”,或称“我们”),在此特别提醒,为使用音乐数字课堂(包括手机端、网页端等,以下称“软件”或“平台”)与相关信息化教育产品、内容及服务,您务必仔细阅读、充分理解并遵守《音乐数字课堂课件与作业公开服务协议》(以下简称“本协议”)中各项条款,包括免除或者限制责任的条款,并选择接受或不接受。本协议所述服务条款构成您(个人或者单位、组织、团体等)使用平台方提供的相关服务(以下简称“该服务”)的先决条件。若您不接受本协议中所述服务条款或其后对协议条款的修改,您应不使用或主动取消平台方提供的相关服务。 您自愿使用平台方提供的网络存储空间进行培训课件与作业及相关智力成果的上传及传播服务。如果您未满18周岁,请在法定监护人的陪同下阅读本协议。"),e("br",null,null),C("本协议是您(或称“用户”,指注册、登录、使用、浏览本服务的个人或组织)与平台方之间关于音乐数字课堂与相关信息化教育产品、内容及服务所订立的协议。"),e("br",null,null),e("p",null,[C("1 权利声明")]),C("音乐数字课堂由武汉酷乐秀网络科技有限公司(以下简称“酷乐秀”)独立开发,一切知识产权以及音乐数字课堂自有的所有信息内容包括但不限于:文字表述及其组合、图标、图饰、图像、图表、色彩、界面设计、版面框架、有关数据、附加程序、印刷材料或电子文档等均为酷乐秀所有,受著作权法和国际著作权条约以及其他知识产权法律法规的保护。"),e("br",null,null),C("音乐数字课堂由武汉酷乐秀网络科技有限公司(以下简称“音乐数字课堂”)提供运营管理服务。"),e("br",null,null),e("p",null,[C("2 服务说明 ")]),C("2.1 您可以通过音乐数字课堂主页【网址:https://kt.colexiu.com/classroom-admin/#/login】、手机客户端(及其他由音乐数字课堂运营的任何网站)、音乐数字课堂公众号,访问音乐数字课堂并使用相关服务。"),e("br",null,null),C("2.2 您知悉并同意,在注册成为音乐数字课堂用户或使用本服务时,需提供一些必要信息,包括但不限于手机号码、头像等。若国家法律法规或政策有特殊规定的,平台方会根据相关特殊规定要求您提供相关信息,如真实的身份信息等,若您提供的信息不完整,您将无法使用本服务或本服务中的相关功能,由此为您带来不便或损失的,平台方完全免责。如个人信息发生变更,您有权随时与平台方联系并要求修改相关个人信息。在您向平台方提出前述删除请求前,平台方可在本协议约定范围内合理利用相关个人信息。"),e("br",null,null),C("您应承诺合法使用平台方提供的服务,您使用该服务的行为应符合当地的法律法规及政策的要求,否则由此带来的责任由您自行承担。"),e("br",null,null),e("p",null,[C("3 权利授予 ")]),C("3.1 您理解并同意,您将课件与作业及相关智力成果上传至音乐数字课堂,即视为您授予了平台方无期限限制的、全球范围内的、不可撤销的信息网络传播权和其他形式的使用权。为了更好地对课件与作业进行宣传和推广,平台方可以将上述权利转让或者转授予给其关联公司或者合作伙伴,而无须征得您的同意。您如果不同意上述条款,请不要将作品上传至音乐数字课堂。"),e("br",null,null),C("3.2 平台方仅对您提交的资料和信息进行审核,并不对您的主体资质和上传的课件与作业内容的真实性、正确性、合法性承担任何责任或提供任何担保。"),e("br",null,null),C("3.3 如果任何第三方侵犯音乐数字课堂用户相关的权利,用户同意授权平台方或其指定的代理人代表平台方自身或用户对该第三方提出警告、投诉、发起行政执法、诉讼、进行上诉,或谈判和解,并且用户同意在平台方认为必要的情况下参与共同维权。"),e("br",null,null),e("p",null,[C("4 权利限制 ")]),C("4.1 平台方通过音乐数字课堂所提供的服务,均限于在音乐数字课堂平台内使用,禁止任何以恶意破解等非法手段将音乐数字课堂内的服务与音乐数字课堂平台分离的行为,否则,由此引起的一切后果由行为人负责,平台方将保留依法追究行为人法律责任的权利。"),e("br",null,null),C("4.2 未经平台方书面同意,您不得将已上传至音乐数字课堂平台上的培训课件与作业的任何资料文件直接、间接或经修改后提供给任何第三方。"),e("br",null,null),C("4.3 保留权利:本协议未明示许可的其他一切权利仍归平台方所有,您使用其他权利时必须获得平台方的书面同意。"),e("br",null,null),C("4.4 除本协议有明确规定外,本协议并未对平台方其他服务规定相关的服务条款,对于这些服务可能有单独的服务条款加以规范,请您在使用有关服务时另行了解与确认。如您使用该服务,视为对相关服务条款的接受。"),e("br",null,null),e("p",null,[C("5 用户使用须知")]),C("5.1 您承诺您具有履行本协议义务的权利能力及资格,因您自身职务或职业要求导致本协议无法履行或合同目的无法实现的,您应当及时通知平台方,并共同协商解决办法,以保证将事件影响性降到最低。"),e("br",null,null),C("5.2 您保证,您上传的课件与作业所涉的创意、脚本、资料、课件与作业等全部文件资料不违反国家相关法律法规、不侵犯第三方权益,且平台方按照约定行使授权内容的相关权利不会侵犯任何第三方的合法权益,也无须另行取得任何第三方的同意,更无须对任何第三方承担责任。如您违反前述保证,平台方有权采取包括但不限于删除相关课件与作业内容、中止或终止向您提供服务等措施。如您上传的课件与作业侵犯了第三方的合法权利,第三方向平台方提出举报,平台方有权删除相关的内容。当权利人发现音乐数字课堂上相关课件与作业侵犯其合法权益时,权利人可向平台方举报,平台方将根据中国法律法规和规范性文件的规定采取移除相关内容等合理措施。"),e("br",null,null),C("5.3 您保证上传的课件与作业中不含以下内容:"),e("br",null,null),e("div",{class:oe.child},[C("1. 反对宪法所确定的基本原则;"),e("br",null,null),C("2. 危害国家安全,泄漏国家秘密,颠覆国家政权,破坏国家统一;"),e("br",null,null),C("3. 损害国家荣誉和利益; "),e("br",null,null),C("4. 煽动民族仇恨、民族歧视,破坏民族团结;"),e("br",null,null),C("5. 破坏国家宗教政策,宣扬邪教和封建迷信;"),e("br",null,null),C("6. 散布谣言,扰乱社会秩序,破坏社会稳定;"),e("br",null,null),C("7. 散布淫秽、色情、赌博、暴力、凶杀、恐怖或教唆犯罪;"),e("br",null,null),C("8. 侮辱或者诽谤他人,侵害他人合法权益;"),e("br",null,null),C("9. 含有法律、行政法规严令禁止的其他内容。"),e("br",null,null)]),C("5.4 上述承诺与保证不受本协议期限的限制,您违反上述任一的保证与承诺的,平台方有权即时解除本协议并要求您承担由此产生的全部责任。"),e("br",null,null),e("p",null,[C("6 隐私政策 ")]),C("6.1 目的 为改善平台方服务,提升用户体验,在您使用音乐数字课堂时,平台方可能对您使用音乐数字课堂的使用信息进行统计与分析,例如:平台方会根据您上传并通过审核的某单元的课件与作业数量显示您在该单元全国范围内的排名,同时显示您的头像、昵称信息及通过审核的课件与作业数量。平台方将采取必要的保护措施,以保护您的相关信息。您可以选择不提供或只提供部分信息,但平台方可能将无法为您提供完整的产品功能或服务。"),e("p",null,[C("7 免责与责任限制")]),C("7.1 音乐数字课堂不含有任何旨在破坏您计算机数据和获取您隐私信息的恶意代码。音乐数字课堂经过详细的测试,但不能保证与所有的软硬件系统完全兼容,不能保证音乐数字课堂完全没有错误。如果出现不兼容及软件错误的情况,您可拨打技术支持电话将情况报告平台方,以获得技术支持。如果无法解决兼容性问题,您可以删除音乐数字课堂。由此给您造成损失的,您同意平台方免责。"),e("br",null,null),C("7.2 在适用法律允许的最大范围内,对因使用或不能使用音乐数字课堂所产生的损害及风险,包括但不限于直接或间接的个人损害、商业赢利的丧失、贸易中断、商业信息的丢失或任何其它经济损失,平台方不承担任何责任。"),e("br",null,null),C("7.3 对于因电信系统或互联网网络故障、计算机故障或病毒、信息损坏或丢失、计算机系统问题或其它任何不可抗力原因而产生损失,平台方不承担任何责任。"),e("br",null,null),C("7.4 您知悉并同意,为实现部分软件功能,平台方有权将您在使用该服务过程当中产生的部分或全部数据信息,上传、保存至第三方云服务存储器,并根据您发出的功能指令需求,自行调取相关数据信息。因第三方云服务发生中断等功能障碍事故导致平台方无法正常提供服务的,平台方会尽其商业上的合理努力负责协调解决,但由此给您造成损失的,您同意平台方免责。"),e("br",null,null),C("7.5 您违反本协议规定,对平台方造成损害的。平台方有权采取包括但不限于中断使用许可、停止提供服务、限制使用、法律追究等措施。"),e("br",null,null),e("p",null,[C("8 法律及争议解决")]),C("8.1 本协议适用中华人民共和国法律。"),e("br",null,null),C(" 8.2 因本协议引起的或与本协议有关的任何争议,各方应友好协商解决;协商不成的,任何一方均可将有关争议提交至平台方所在地有管辖权的人民法院管辖。"),e("br",null,null),e("p",null,[C("9 其他条款")]),C("9.1 如果本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,或违反任何适用的法律,则该条款被视为删除,但本协议的其余条款仍有效并且具有约束力。"),e("br",null,null),C("9.2 如果本协议中的任何条款与音乐数字课堂中某具体软件的协议条款相矛盾的,以该具体软件的协议条款为准。"),e("br",null,null),C("平台方有权随时根据有关法律、法规的变化以及公司经营状况和经营策略的调整等修改本协议。修改后的协议会在平台方指定网站上公布,并随附于新版音乐数字课堂。当发生有关争议时,以最新的协议文本为准。如果不同意改动的内容,您可以自行删除音乐数字课堂。如果您继续使用音乐数字课堂,则视为您接受本协议的变动。"),e("br",null,null),C("至此,用户已经详细阅读并已理解本协议,并同意严格遵守各条款和条件。如果用户对本《协议》有任何疑问或者希望获得与本软件相关的任何信息,请按下列地址和方式与酷乐秀联系,酷乐秀将在15日内答复用户。"),e("br",null,null),C("技术支持方:武汉酷乐秀网络科技有限公司"),e("br",null,null),C("运营方:武汉酷乐秀网络科技有限公司")])]}),e(ae,{style:{padding:"25px 0 0 0"},justify:"center"},{default:()=>[e(N,{class:oe.cancelBtn,round:!0,type:"default",onClick:()=>{t.protocolShow=!1}},{default:()=>[C("取消授权")]}),e(N,{class:oe.submitAppBtn,bordered:!1,round:!0,type:"primary",onClick:()=>{t.protocolShow=!1,t.status=!0}},{default:()=>[C("同意授权")]})]})]):e("div",{class:oe.downMove},[e("img",{src:du,class:oe.downMoveBg,alt:""},null),e("img",{src:pu,class:oe.closeAble,onClick:()=>{l("close")},alt:""},null),e("h2",null,[C("课件公开须知")]),e("p",null,[C("公开课件后,您课件中的资源及作业都可被其他教师查看、使用,具体信息请查看服务协议")]),e("div",{class:oe.protocolGroup,onClick:()=>{t.status=!t.status}},[e("i",{class:[oe.checkbox,t.status&&oe.checkboxActive]},null),e("p",null,[C("我已阅读并同意"),e("span",{onClick:c=>{c.stopPropagation(),t.protocolShow=!0}},[C("《音乐数字课堂课件与作业公开服务协议》")])])]),e(ae,{style:{padding:"25px 0 0 0"},justify:"center"},{default:()=>[e(N,{class:oe.cancelBtn,round:!0,type:"default",onClick:()=>l("close")},{default:()=>[C("取消")]}),e(N,{class:oe.submitAppBtn,bordered:!1,round:!0,type:"primary",disabled:!t.status,onClick:()=>{l("confirm")}},{default:()=>[C("确定")]})]})])])}}),qr=W({name:"courseware-modal",props:{groupItem:{type:Object,default:()=>({})}},emits:["change"],setup(s,{emit:l}){const t=Rt(),c=_e(),a=ct(),u=K({subjects:[],openFlagEnable:!0,autoPlay:!1,name:"",openFlag:!1,createId:null,baseCoursewareList:[{name:"",id:null,list:[]}],baseInfo:{subjects:[],autoPlay:!1,name:"",openFlag:!1},coursewareList:[{name:"",id:null,list:[]}],loadingStatus:!1,showAttendClass:!1,attendClassType:"change",removeIds:[],editSubjectIds:"",addCoursewareVisiable:!1,addCoursewareItem:{},messageCallBack:null,messageOperation:{visiable:!1,loading:!1,type:"delete",contentDirection:"center",title:"删除知识点",content:"请确认是否删除该知识点,删除知识点后将同步删除知识点下的资源",cancelButtonText:"取消",confirmButtonText:"确认",index:0},show:!1,item:{},previewModal:!1,previewParams:{type:"",subjectId:"",detailId:""},addOtherSource:!1,addOtherIndex:0}),o=R(),n=R(!1),p=async()=>{u.loadingStatus=!0;try{if(!s.groupItem.id)return u.loadingStatus=!1;const{data:f}=await Yu(s.groupItem.id),w=f.chapterKnowledgeList||[];u.name=f.name,u.subjects=f.instrumentIds?f.instrumentIds.split(",").map(S=>S):[],u.openFlag=f.openFlag,u.openFlagEnable=f.openFlagEnable,u.autoPlay=f.autoPlay;const v=[];w.forEach(S=>{const $=S.chapterKnowledgeMaterialList,H=[];Array.isArray($)&&$.length>0&&$.forEach(q=>{H.push({id:q.id,materialId:q.bizId,coverImg:q.bizInfo.coverImg,type:q.type,title:q.bizInfo.name,dataJson:q.dataJson,isSelected:q.source==="PLATFORM",content:q.bizInfo.content,removeFlag:q.removeFlag})}),v.push({name:S.name,id:S.id,list:[...H]})}),u.coursewareList=v,u.baseCoursewareList=It(v),u.baseInfo=It({subjects:u.subjects,autoPlay:u.autoPlay,name:u.name,openFlag:u.openFlag}),k.emit("updateCoursewareHeadInfo",{name:u.name,subjects:u.subjects,openFlag:u.openFlag,openFlagEnable:u.openFlagEnable,autoPlay:u.autoPlay})}catch(f){console.log(f)}u.loadingStatus=!1},i=(f,w)=>{const v=u.coursewareList[w];v&&(v.list.splice(f,1),k.emit("onCoursewareUpdate"))},g=(f,w,v)=>{const S=f.getBoundingClientRect();return w>=S.left&&w<=S.right&&v>=S.top&&v<=S.bottom},r=(f,w)=>{const v=f.getBoundingClientRect(),S=v.left+v.width/2;return w<S},d=(f,w,v)=>{if(f==="up"){if(w===0)return;const S=u.coursewareList[w-1];u.coursewareList[w-1]=u.coursewareList[w],u.coursewareList[w]=S}else if(f==="down"){if(w>=u.coursewareList.length-1)return;const S=u.coursewareList[w+1];u.coursewareList[w+1]=u.coursewareList[w],u.coursewareList[w]=S}else f==="remove"&&(u.messageOperation={visiable:!0,type:"delete",contentDirection:"left",title:"删除知识点",loading:!1,content:"请确认是否删除".concat(v.name?"【"+v.name+"】":"该知识点",",删除知识点后将同步删除知识点下的资源"),cancelButtonText:"取消",confirmButtonText:"确认",index:w})},F=async()=>{const f=u.messageOperation.type;if(f==="delete")u.coursewareList.splice(u.messageOperation.index,1),k.emit("onCoursewareUpdate");else if(f==="addItem")u.coursewareList.push({name:"",list:[]}),B(u.addCoursewareItem);else if(f==="save"||f==="pageLive"){if(u.messageOperation.loading)return;if(!u.name){a.error("请输入课件标题"),u.messageOperation.visiable=!1;return}if(u.subjects.length<=0){a.error("请选择声部"),u.messageOperation.visiable=!1;return}if(u.coursewareList.length<=0){a.error("未配置知识点"),u.messageOperation.visiable=!1;return}let w=!1;for(const S of u.coursewareList){if(!S.name){a.error("请输入知识点名称"),u.messageOperation.visiable=!1;return}Array.isArray(S.list)&&S.list.length<=0&&(w=!0)}if(w){a.error("请至少添加一个资源"),u.messageOperation.visiable=!1;return}u.messageOperation.loading=!0;const v=await b();u.messageOperation.loading=!1,v&&(f==="pageLive"&&typeof u.messageCallBack=="function"&&u.messageCallBack(),l("change",{status:!1,addParam:{isAdd:!s.groupItem.id,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1))}u.messageOperation.visiable=!1};let y=null;const B=async(f,w)=>{clearTimeout(y);const v=[];try{const{data:S}=await es(f.materialId);Array.isArray(S.materialRefs)&&S.materialRefs.forEach($=>{if($.refType==="STRONG"){const H=$.relateMaterialInfo||{};v.push({content:H.content,coverImg:H.coverImg,isSelected:H.sourceFrom==="PLATFORM",materialId:H.id,title:H.name,type:H.type})}})}catch(S){}Te(()=>{if(w){const $=document.querySelectorAll(".row-group")[f.index].querySelectorAll(".row-nav");let H=!1;$.forEach((q,Ee)=>{if(g(q,w.x,w.y)){const we=u.coursewareList[f.index||0].list||[];r(q,w.x)?(v.forEach($e=>{we.splice(Ee,0,$e)}),we.splice(Ee,0,f)):(we.splice(Ee+1,0,f),v.forEach($e=>{we.splice(Ee+1,0,$e)})),H=!0,u.coursewareList[f.index||0].list=we}}),H||(u.coursewareList[f.index||0].list.push(f),v.forEach(q=>{u.coursewareList[f.index||0].list.push(q)}))}else u.coursewareList[f.index||0].list.push(f),v.forEach(S=>{u.coursewareList[f.index||0].list.push(S)}),a.success("添加成功");y=setTimeout(()=>{k.emit("onCoursewareUpdate")},100)})},_=async()=>{try{if(o.value.validate(),k.emit("checkCoursewareForm"),!u.name){a.error("请输入课件标题");return}if(u.subjects.length<=0){a.error("请选择声部");return}if(u.coursewareList.length<=0){a.error("请至少添加一个知识点");return}let f=!1;for(const v of u.coursewareList){if(!v.name){a.error("请输入知识点名称");return}Array.isArray(v.list)&&v.list.length<=0&&(f=!0)}if(f){a.error("请至少添加一个资源");return}if(u.openFlag&&!t.getReadCoursewareOpenAgreement){n.value=!0;return}await b()&&(l("change",{status:!1,addParam:{isAdd:!s.groupItem.id,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1))}catch(f){}},b=async()=>{var f;try{const w={name:u.name,instrumentIds:u.subjects.join(","),openFlag:u.openFlag,autoPlay:u.autoPlay,coursewareDetailKnowledgeId:c.getSelectKey,chapterKnowledgeList:[]};if(u.coursewareList.forEach(v=>{let S=[];Array.isArray(v.list)&&v.list.length>0&&(S=v.list.map($=>({bizId:$.materialId,type:$.type,dataJson:["IMG","VIDEO","SONG","MUSIC","PPT"].includes($.type)?"":JSON.stringify({setting:$.dataJson,coverImg:$.coverImg,bizId:$.bizId,content:$.content,name:$.title})}))),w.chapterKnowledgeList.push({name:v.name,chapterKnowledgeMaterialList:S})}),(f=s.groupItem)!=null&&f.id)await ts({id:s.groupItem.id,...w}),a.success("保存成功");else{const{data:v}=await us(w);u.createId=v.id}return!0}catch(w){return!1}},m=(f,w)=>{u.coursewareList.length<=0?(u.addCoursewareItem=f,u.messageOperation={visiable:!0,type:"addItem",contentDirection:"center",title:"添加到知识点",loading:!1,content:"当前课件暂无知识点,请添加知识点后操作",cancelButtonText:"取消",confirmButtonText:"添加知识点",index:0}):u.coursewareList.length>1&&f.addType!=="drag"?(u.addCoursewareVisiable=!0,u.addCoursewareItem=f):B(f,w)},E=f=>{const w=JSON.stringify(u.coursewareList),v=JSON.stringify(u.baseCoursewareList),S=JSON.stringify({subjects:u.subjects,autoPlay:u.autoPlay,name:u.name,openFlag:u.openFlag}),$=JSON.stringify(u.baseInfo);w===v&&S===$?typeof f=="function"&&(f(),l("change",{status:!1,addParam:{isAdd:!1,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1)):(u.messageCallBack=f,u.messageOperation={visiable:!0,type:"pageLive",loading:!1,contentDirection:"center",title:"保存课件",content:"当前课件暂未保存,是否保存?",cancelButtonText:"不保存",confirmButtonText:"保存",index:0})},D=f=>{u.subjects=f.subjects,u.openFlagEnable=f.openFlagEnable,u.autoPlay=f.autoPlay,u.name=f.name,u.openFlag=f.openFlag;const w=JSON.stringify(u.coursewareList),v=JSON.stringify(u.baseCoursewareList),S=JSON.stringify({subjects:u.subjects,autoPlay:u.autoPlay,name:u.name,openFlag:u.openFlag}),$=JSON.stringify(u.baseInfo);w===v&&S===$?(l("change",{status:!1,addParam:{isAdd:!1,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1)):u.messageOperation={visiable:!0,type:"save",loading:!1,contentDirection:"center",title:"保存课件",content:"当前课件暂未保存,是否保存?",cancelButtonText:"不保存",confirmButtonText:"保存",index:0}},J=f=>{u.subjects=f.subjects,u.openFlagEnable=f.openFlagEnable,u.autoPlay=f.autoPlay,u.name=f.name,u.openFlag=f.openFlag,_()};return X(async()=>{var f;(f=s.groupItem)!=null&&f.id&&(u.coursewareList=[],u.baseCoursewareList=[]),await p(),k.on("onPrepareAddItem",m),k.on("pageBeforeLeave",E),k.on("coursewareClosed",D),k.on("coursewareSave",J)}),be(()=>{k.off("onPrepareAddItem",m),k.off("pageBeforeLeave",E),k.off("coursewareClosed",D),k.off("coursewareSave",J)}),xe(()=>u.coursewareList,()=>{c.setCoursewareList(u.coursewareList)},{deep:!0}),()=>e(Vs,{class:P.coursewareModal,model:u,ref:o},{default:()=>[e(Fe,Rs({class:[P.listContainer,"listContainerWrap"]},{id:"lessonsIn-1"}),{default:()=>[e(ge,{show:u.loadingStatus},{default:()=>[e("div",{class:[P.listSection,"listSectionWrap"]},[u.coursewareList.map((f,w)=>e("div",{class:[P.listItems,"row-group"],onDragenter:v=>{v.preventDefault()},onDragover:v=>{v.preventDefault()},onDrop:v=>{let S=v.dataTransfer.getData("text");S=S&&v.dataTransfer.effectAllowed==="all"?JSON.parse(S):{},S.id&&k.emit("onPrepareAddItem",{materialId:S.id,coverImg:S.coverImg,type:S.type,title:S.title,refFlag:S.refFlag,isCollect:S.isCollect,isSelected:S.isSelected,content:S.content,removeFlag:!1,index:w,addType:"drag"},{x:v.clientX,y:v.clientY})}},[e("div",{class:P.knowledgePoint},[e(Ms,{class:P.btnItem,label:"知识点名称",showFeedback:!1,requireMarkPlacement:"left",path:"coursewareList.".concat(w,".name"),rule:[{required:!0,trigger:["input","blur"]}]},{default:()=>[e(He,{placeholder:"未命名知识点",value:f.name,"onUpdate:value":v=>f.name=v,maxlength:15,clearable:!0},null)]})]),e(ae,{class:P.operationGroup},{default:()=>[w>0&&e(ye,{showArrow:!1},{trigger:()=>e("i",{class:P.iconCUp,onClick:()=>d("up",w)},null),default:()=>"上移知识点"}),w<u.coursewareList.length-1&&e(ye,{showArrow:!1},{trigger:()=>e("i",{class:P.iconCDown,onClick:()=>d("down",w)},null),default:()=>"下移知识点"}),e(ye,{showArrow:!1},{trigger:()=>e("i",{class:P.iconCRemove,onClick:()=>d("remove",w,f)},null),default:()=>"删除知识点"})]}),f.list.length>0&&e(Ns,{modelValue:f.list,"onUpdate:modelValue":v=>f.list=v,itemKey:"id",componentData:{itemKey:"id",tag:"div",animation:200,group:"description",disabled:!1},class:P.list},{item:v=>{const S=v.element;return e("div",{"data-id":S.id,class:[P.itemWrap,P.itemBlock,"row-nav"]},[e("div",{class:P.itemWrapBox},[e(Xu,{class:[P.itemContent],isShowCollect:!1,offShelf:!!S.removeFlag,item:S,disabledMouseHover:!1,onClick:()=>{S.type!=="IMG"&&(u.show=!0,u.item=S)}},null),e("div",{class:P.itemOperation},[e("img",{src:Ps,class:P.iconDelete,onClick:$=>{$.stopPropagation(),i(v.index,w)}},null)])])])},footer:()=>e("div",{class:P.itemWrap},[e("div",{class:P.itemWrapBox},[e("div",{class:[P.itemContent,P.addMusicItem,"handle"],onClick:()=>{u.addOtherSource=!0,u.addOtherIndex=w}},[e("img",{src:ru},null),e("p",{class:P.addMusicName},[C("添加资源")])])])])}),f.list<=0&&e("div",{class:P.list},[e("div",{class:P.itemWrap},[e("div",{class:P.itemWrapBox},[e("div",{class:[P.itemContent,P.addMusicItem,"handle"],onClick:()=>{u.addOtherSource=!0,u.addOtherIndex=w}},[e("img",{src:ru},null),e("p",{class:P.addMusicName},[C("添加资源")])])])])])])),!u.loadingStatus&&e(N,{block:!0,type:"primary",secondary:!0,class:P.addKnowledgePoint,onClick:()=>{u.coursewareList.push({name:"",list:[]})}},{default:()=>[e("i",{class:P.iconCAdd},null),C("添加知识点")]})])]})]}),e(gt,{size:["INSTRUMENT","THEORY","MUSIC_WIKI","MUSICIAN"].includes(u.item.type)?"large":"",show:u.show,"onUpdate:show":f=>u.show=f,item:u.item},null),e(se,{show:u.addCoursewareVisiable,"onUpdate:show":f=>u.addCoursewareVisiable=f,preset:"card",class:["modalTitle",P.addCourseware],title:"添加到知识点"},{default:()=>[e(tn,{coursewareList:u.coursewareList,onClose:()=>u.addCoursewareVisiable=!1,onConfirm:f=>{Array.isArray(f)&&f.length>0?(f.forEach(w=>{B({...u.addCoursewareItem,index:w})}),u.addCoursewareVisiable=!1):a.error("请选择需要添加的知识点")}},null)]}),e(se,{show:u.messageOperation.visiable,"onUpdate:show":f=>u.messageOperation.visiable=f,preset:"card",class:["modalTitle",P.removeVisiable1],title:u.messageOperation.title},{default:()=>[e(xt,{content:u.messageOperation.content,contentDirection:u.messageOperation.contentDirection,cancelButtonText:u.messageOperation.cancelButtonText,confirmButtonText:u.messageOperation.confirmButtonText,loading:u.messageOperation.loading,onClose:()=>{u.messageOperation.visiable=!1,(u.messageOperation.type==="save"||u.messageOperation.type==="pageLive")&&(l("change",{status:!1,addParam:{isAdd:!1,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1),u.messageOperation.type==="pageLive"&&typeof u.messageCallBack=="function"&&u.messageCallBack())},onConfirm:()=>F()},null)]}),e(Su,{show:u.previewModal,"onUpdate:show":f=>u.previewModal=f,type:"attend",params:u.previewParams},null),e(se,{show:u.addOtherSource,"onUpdate:show":f=>u.addOtherSource=f,preset:"card",class:["modalTitle background",P.addOtherSource],title:"添加资源"},{default:()=>[e(Lr,{onClose:()=>u.addOtherSource=!1,onComfirm:f=>{Array.isArray(f)?f.forEach(w=>{B({...w,index:u.addOtherIndex})}):B({...f,index:u.addOtherIndex})}},null)]}),e(se,{show:n.value,"onUpdate:show":f=>n.value=f},{default:()=>[e(Kr,{onClose:()=>n.value=!1,onConfirm:async()=>{try{await b()&&(t.setReadCoursewareOpenAgreement(!0),l("change",{status:!1,addParam:{isAdd:!s.groupItem.id,name:u.name,id:u.createId}}),k.emit("teacher-slideshow",!1))}catch(f){}}},null)]})]})}}),Zr="_coursewarePresetsContainer_19sge_1",Jr="_rightLineShow_19sge_5",Hr="_presetsRight_19sge_5",Qr="_presetsLeft_19sge_32",Yr="_presetsArrar_19sge_49",Xr="_presetsArrarActive_19sge_71",ei="_openLoading_19sge_74",ti="_coursewarePresets_19sge_1",ui="_btnSubjectList_19sge_81",si="_addBtnIcon_19sge_84",ai="_addBtn_19sge_84",oi="_title_19sge_115",ni="_titleLeft_19sge_128",li="_icon_19sge_132",ri="_iconWork_19sge_138",ii="_iconCourseware_19sge_142",ci="_line_19sge_146",di="_more_19sge_151",pi="_iconP_19sge_163",gi="_swipeControll_19sge_175",mi="_leftIcon_19sge_178",fi="_disabled_19sge_186",hi="_list_19sge_190",Ci="_listEmpty_19sge_198",Fi="_listSame_19sge_202",Ei="_itemWrap_19sge_206",wi="_itemWrapBox_19sge_209",Ai="_attendClassModal1_19sge_215",Bi="_removeVisiable1_19sge_220",vi="_studentRemove_19sge_226",yi="_btnGroupModal_19sge_237",_i="_attendClassModal_19sge_215",bi="_workVisiable_19sge_249",Si="_workContainer_19sge_252",Ii="_workTrain_19sge_256",Di="_resourceMain_19sge_269",ki="_popSelect_19sge_274",Li="_textBtn_19sge_284",xi="_iconArrow_19sge_291",Ti="_textBtnActive_19sge_299",G={coursewarePresetsContainer:Zr,rightLineShow:Jr,presetsRight:Hr,presetsLeft:Qr,presetsArrar:Yr,presetsArrarActive:Xr,openLoading:ei,coursewarePresets:ti,btnSubjectList:ui,addBtnIcon:si,addBtn:ai,title:oi,titleLeft:ni,icon:li,iconWork:ri,iconCourseware:ii,line:ci,more:di,iconP:pi,swipeControll:gi,leftIcon:mi,disabled:fi,list:hi,listEmpty:Ci,listSame:Fi,itemWrap:Ei,itemWrapBox:wi,attendClassModal1:Ai,removeVisiable1:Bi,studentRemove:vi,btnGroupModal:yi,attendClassModal:_i,workVisiable:bi,workContainer:Si,workTrain:Ii,resourceMain:Di,popSelect:ki,textBtn:Li,iconArrow:xi,textBtnActive:Ti},Vi="_relatedClass_c6wpx_1",Ri="_attendClassSearch_c6wpx_4",Mi="_iconSearch_c6wpx_20",ji="_classList_c6wpx_24",Pi="_listSection_c6wpx_28",Ni="_emptySection_c6wpx_32",Wi="_list_c6wpx_28",Gi="_listSame_c6wpx_45",Oi="_itemWrap_c6wpx_49",Ui="_itemWrapBox_c6wpx_52",ve={relatedClass:Vi,attendClassSearch:Ri,iconSearch:Mi,classList:ji,listSection:Pi,emptySection:Ni,list:Wi,listSame:Gi,itemWrap:Oi,itemWrapBox:Ui},$i=W({name:"related-class",props:{tableList:{type:Array,default:()=>[]},instrumentList:{type:Array,default:()=>[]},instrumentId:{type:[String,Number],default:""},coursewareDetailKnowledgeId:{type:[String,Number],default:""}},emits:["close","add","click"],setup(s,{emit:l}){const t=K({loading:!1,finshed:!1,pagination:{page:1,rows:20},tableList:[],searchGroup:{instrumentId:s.instrumentId?s.instrumentId:"",keyword:null}}),c=async()=>{try{t.pagination.page===1&&(t.loading=!0);const{data:u}=await fu({coursewareDetailKnowledgeId:s.coursewareDetailKnowledgeId,...t.searchGroup,...t.pagination}),o=u.rows||[],n=[];o.forEach(p=>{var g;const i=(g=p.chapterKnowledgeList[0])==null?void 0:g.chapterKnowledgeMaterialList[0];n.push({id:p.id,openFlag:p.openFlag,openFlagEnable:p.openFlagEnable,instrumentNames:p.instrumentNames,fromChapterLessonCoursewareId:p.fromChapterLessonCoursewareId,name:p.name,coverImg:i==null?void 0:i.bizInfo.coverImg,type:i==null?void 0:i.bizInfo.type,isAdd:p.addFlag,isNotWork:p.lessonPreTrainingNum<=0})}),t.loading=!1,t.tableList.push(...n),t.finshed=u.pages<=u.current}catch(u){t.loading=!1}},a=pt(()=>{t.pagination.page=1,t.tableList=[],c()},500);return X(()=>{c(),k.on("openCoursewareChanged",a)}),be(()=>{k.off("openCoursewareChanged",a)}),()=>e("div",{class:ve.relatedClass},[e("div",{class:ve.attendClassSearch},[e(Mt,{placeholder:"全部乐器",clearable:!0,options:[{name:"全部乐器",id:""},...s.instrumentList],value:t.searchGroup.instrumentId,"onUpdate:value":[u=>t.searchGroup.instrumentId=u,()=>a()],checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",filterable:!0,style:{width:"200px"}},null),e(He,{placeholder:"请输入课件标题关键词",clearable:!0,value:t.searchGroup.keyword,"onUpdate:value":u=>t.searchGroup.keyword=u,onKeyup:u=>{u.code==="Enter"&&a()},onClear:()=>a()},{prefix:()=>e("span",{class:"icon-search-input",style:{cursor:"pointer"},onClick:()=>a()},null)})]),e(ge,{show:t.loading,size:"small"},{default:()=>[e(Fe,{class:ve.classList,style:{"max-height":"60vh"},onScroll:u=>{var i,g,r;const o=(i=u.target)==null?void 0:i.clientHeight,n=(g=u.target)==null?void 0:g.scrollTop,p=(r=u.target)==null?void 0:r.scrollHeight;o+n+20>=p&&!t.finshed&&!t.loading&&a()}},{default:()=>[e("div",{style:{"min-height":"60vh)"},class:[ve.listSection,!t.loading&&t.tableList.length<=0?ve.emptySection:""]},[t.tableList.length>0&&e("div",{class:[ve.list]},[t.tableList.map(u=>e("div",{class:[ve.itemWrap,ve.itemBlock,"row-nav"]},[e("div",{class:ve.itemWrapBox},[e(_u,{isHoverShowAdd:!1,isShowOpenFlag:!1,isShowAdd:!0,item:u,onAdd:()=>{l("add",u)},onLook:()=>l("click",u)},null)])]))]),!t.loading&&t.tableList.length<=0&&e(fe,null,null)])]})]})])}}),zi="_related_93qg8_1",Ki="_iconScreen_93qg8_40",qi="_homerowkTabs_93qg8_51",nt={related:zi,iconScreen:Ki,homerowkTabs:qi},Zi="_searchGroup_5ue74_1",Ji="_searchSelect_5ue74_4",Hi="_inputSearch_5ue74_18",Qi="_searchBtn_5ue74_22",Yi="_btnType_5ue74_28",gu={searchGroup:Zi,searchSelect:Ji,inputSearch:Hi,searchBtn:Qi,btnType:Yi},Xi=W({name:"resource-search-group",emits:["search"],setup(s,{emit:l}){Je();const t=K({keyword:""}),c=()=>{l("search",t)},a=pt(()=>c(),500);return()=>e(me,null,[e("div",{class:gu.searchGroup},[e(He,{type:"text",placeholder:"请输入课件标题关键词",clearable:!0,value:t.keyword,"onUpdate:value":u=>t.keyword=u,class:gu.inputSearch,onKeyup:u=>{u.code==="Enter"&&a()},onClear:()=>{t.keyword="",a()}},{prefix:()=>e("span",{class:"icon-search-input",onClick:()=>a()},null)})])])}}),ec="_listContainer_1eh3e_1",tc="_listNoMusic_1eh3e_5",uc="_listSection_1eh3e_8",sc="_emptySection_1eh3e_14",ac="_list_1eh3e_1",oc="_trainEditModal_1eh3e_28",nc="_itemModal_1eh3e_31",lc="_itemCover_1eh3e_36",rc="_iconLook_1eh3e_67",ic="_iconAdd_1eh3e_68",cc="_itemContent_1eh3e_94",dc="_itemTitle_1eh3e_98",pc="_itemSubject_1eh3e_108",ce={listContainer:ec,listNoMusic:tc,listSection:uc,emptySection:sc,list:ac,trainEditModal:oc,itemModal:nc,itemCover:lc,function:"_function_1eh3e_53",iconLook:rc,iconAdd:ic,itemContent:cc,itemTitle:dc,itemSubject:pc},gc=W({name:"item-modal",props:{item:{type:Object,default:()=>({})}},emits:["look","add"],setup(s,{emit:l}){return()=>e("div",{class:ce.itemModal},[e("div",{class:ce.itemCover},[e(ie,{src:s.item.coverImg,objectFit:"cover",previewDisabled:!0},null),e("div",{class:ce.function},[e(ye,{showArrow:!1},{trigger:()=>e("i",{class:ce.iconLook,onClick:()=>l("look")},null),default:()=>"预览课件"}),e(ye,{showArrow:!1},{trigger:()=>e("i",{class:ce.iconAdd,onClick:()=>l("add")},null),default:()=>"添加到我的课件"})])]),e("div",{class:ce.itemContent},[e("p",{class:ce.itemTitle,onClick:()=>l("look")},[e(kt,{text:s.item.name},null)]),e("div",{class:ce.itemSubject},[s.item.instrumentNames])])])}}),mc=W({name:"share-resources",emits:["look","add"],setup(s,{emit:l}){const t=_e(),c=K({loading:!1,finshed:!1,pagination:{page:1,rows:10},searchGroup:{keyword:""},tableList:[],editStatus:!1,editItem:{},show:!1,item:{}}),a=async()=>{try{if(!t.getSelectKey)return;c.pagination.page===1&&(c.loading=!0);const{data:p}=await fu({instrumentId:t.getInstrumentId,coursewareDetailKnowledgeId:t.getSelectKey,...c.searchGroup,...c.pagination});c.pagination.page===1&&c.tableList.length>0&&(c.tableList=[]);const i=p.rows||[],g=[];i.forEach(r=>{var F;const d=(F=r.chapterKnowledgeList[0])==null?void 0:F.chapterKnowledgeMaterialList[0];g.push({id:r.id,openFlag:r.openFlag,openFlagEnable:r.openFlagEnable,instrumentNames:r.instrumentNames,fromChapterLessonCoursewareId:r.fromChapterLessonCoursewareId,name:r.name,coverImg:d==null?void 0:d.bizInfo.coverImg,type:d==null?void 0:d.bizInfo.type,isAdd:r.addFlag})}),c.loading=!1,c.tableList.push(...g),c.finshed=p.pages<=p.current}catch(p){c.loading=!1}},u=async p=>{c.pagination.page=1,c.tableList=[],c.searchGroup=Object.assign(c.searchGroup,p),a()},o=pt(()=>{c.pagination.page=c.pagination.page+1,a()},500),n=()=>{u(c.searchGroup)};return X(()=>{a(),k.on("openCoursewareChanged",n)}),be(()=>{k.off("openCoursewareChanged",n)}),()=>e("div",null,[e(Xi,{onSearch:p=>u(p)},null),e(Fe,{class:[ce.listContainer,ce.listNoMusic],onScroll:p=>{var d,F,y;const i=(d=p.target)==null?void 0:d.clientHeight,g=(F=p.target)==null?void 0:F.scrollTop,r=(y=p.target)==null?void 0:y.scrollHeight;i+g+20>=r&&!c.finshed&&!c.loading&&o()}},{default:()=>[e(ge,{show:c.loading,size:"small"},{default:()=>[e("div",{class:[ce.listSection,!c.loading&&c.tableList.length<=0?ce.emptySection:""]},[c.tableList.length>0&&e("div",{class:ce.list},[c.tableList.map(p=>e(gc,{item:p,onAdd:()=>l("add",p),onLook:()=>l("look",p)},null))]),!c.loading&&c.tableList.length<=0&&e(fe,null,null)])]})]})])}}),fc=W({name:"related-modal",emits:["more","add","look"],setup(s,{emit:l}){return()=>e("div",{class:nt.related},[e(Ge,{animated:!0,paneClass:nt.paneTitle,paneWrapperClass:nt.paneWrapperContainer,justifyContent:"center"},{suffix:()=>e("div",{class:nt.iconScreen,onClick:()=>{l("more")}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e("g",{fill:"none"},[e("path",{d:"M5 6a1 1 0 0 1 1-1h2a1 1 0 0 0 0-2H6a3 3 0 0 0-3 3v2a1 1 0 0 0 2 0V6zm0 12a1 1 0 0 0 1 1h2a1 1 0 1 1 0 2H6a3 3 0 0 1-3-3v-2a1 1 0 1 1 2 0v2zM18 5a1 1 0 0 1 1 1v2a1 1 0 1 0 2 0V6a3 3 0 0 0-3-3h-2a1 1 0 1 0 0 2h2zm1 13a1 1 0 0 1-1 1h-2a1 1 0 1 0 0 2h2a3 3 0 0 0 3-3v-2a1 1 0 1 0-2 0v2z",fill:"#198CFE"},null)])])]),default:()=>e(me,null,[e(Oe,{name:"myMusic",tab:"相关课件"},{default:()=>[e(mc,{onAdd:t=>l("add",t),onLook:t=>l("look",t)},null)]})])})])}}),hc=W({name:"courseware-presets",props:{addParam:{type:Object,default:()=>({})}},emits:["change"],setup(s,{emit:l}){const t=_e(),c=ct(),a=wu(),u=We(),o=localStorage.getItem("prepareLessonSubjectId"),n=K({leftWidth:"100%",rightWidth:"0",messageLoading:!1,instrumentId:a.query.instrumentId?Number(a.query.instrumentId):o?Number(o):"",courseScheduleSubjectId:a.query.courseScheduleSubjectId,classGroupId:a.query.classGroupId,preStudentNum:a.query.preStudentNum,bodyWidth:"100%",loading:!1,openLoading:!1,showRelatedClass:!1,tableList:[],openTableShow:!0,openTableList:[],selectItem:{},editTitleVisiable:!1,editTitle:null,editBtnLoading:!1,preRemoveVisiable:!1,addVisiable:!1,carouselIndex:0,showAttendClass:!1,attendClassType:"change",attendClassItem:{},previewModal:!1,previewParams:{type:"",courseId:"",instrumentId:"",detailId:""},workVisiable:!1,wikiCategoryIdChild:null}),p=async()=>{n.loading=!0;try{if(!t.getSelectKey)return n.loading=!1;const{data:m}=await ss({instrumentId:t.getInstrumentId,coursewareDetailKnowledgeId:t.getSelectKey});if(!Array.isArray(m))return;const E=[];m.forEach(D=>{var f,w,v;const J=(f=D.chapterKnowledgeList[0])==null?void 0:f.chapterKnowledgeMaterialList;E.push({id:D.id,lessonPreTrainingId:D.lessonPreTrainingId,openFlag:D.openFlag,openFlagEnable:D.openFlagEnable,instrumentNames:D.instrumentNames,fromChapterLessonCoursewareId:D.fromChapterLessonCoursewareId,name:D.name,coverImg:J&&((w=J[0])==null?void 0:w.bizInfo.coverImg),type:J&&((v=J[0])==null?void 0:v.bizInfo.type),isNotWork:D.lessonPreTrainingNum<=0})}),n.tableList=E}catch(m){}n.loading=!1};xe(()=>[t.getSelectKey,t.getInstrumentId],async()=>{var m;k.emit("openCoursewareChanged"),await p(),(m=r.value)==null||m.syncBarPosition()}),xe(()=>t.getInstrumentList,()=>{i()});const i=()=>{var E;const m=t.getSingleInstrumentList;if(m.length>0){if(sessionStorage.getItem("prepareLessonCourseWareSubjectIsNull")==="true"){t.setInstrumentId("");return}const J=localStorage.getItem("prepareLessonSubjectId");let f=null,w=-1;n.courseScheduleSubjectId&&(w=m.findIndex(v=>v.id==n.courseScheduleSubjectId),w>=0&&(f=Number(n.courseScheduleSubjectId))),n.instrumentId&&!f&&(w=m.findIndex(v=>v.id==n.instrumentId),w>=0&&(f=Number(n.instrumentId))),J&&!f&&(w=m.findIndex(v=>v.id==J),w>=0&&(f=Number(J))),f&&w>=0&&t.setSubjectId(f),localStorage.setItem("prepareLessonSubjectId",t.getInstrumentId),(E=r.value)==null||E.syncBarPosition()}},g=()=>{let m="";t.getInstrumentList.forEach(E=>{Array.isArray(E.instruments)&&E.instruments.forEach(D=>{D.id===t.getInstrumentId&&(m=D.id)})}),m&&(n.wikiCategoryIdChild=m)},r=R();X(async()=>{Tt(document.querySelector("#presetsLeftRef"),m=>{const E=m[0],{width:D}=E.contentRect;n.leftWidth=D+"px"}),Tt(document.querySelector("#presetsRightRef"),m=>{const E=m[0],{width:D}=E.contentRect;n.rightWidth=D+"px"}),t.setClassGroupId(a.query.classGroupId),t.getInstrumentId?g():i(),await p(),s.addParam.isAdd&&(n.addVisiable=!0)});const d=async()=>{n.messageLoading=!0;try{await as({id:n.selectItem.id}),c.success("删除成功"),p(),k.emit("openCoursewareChanged"),n.preRemoveVisiable=!1}catch(m){}setTimeout(()=>{n.messageLoading=!1},100)},F=async m=>{if(!n.messageLoading){n.messageLoading=!0;try{await os({id:m.id}),c.success("添加成功"),p(),k.emit("openCoursewareChanged")}catch(E){}setTimeout(()=>{n.messageLoading=!1},100)}},y=m=>{if(window.matchMedia("(display-mode: standalone)").matches)yt.application=window.matchMedia("(display-mode: standalone)").matches,n.previewModal=!0,uu(),n.previewParams={type:"preview",courseId:m,instrumentId:t.getInstrumentId,detailId:t.getSelectKey,lessonCourseId:t.getBaseCourseware.id};else{const{href:E}=u.resolve({path:"/attend-class",query:{type:"preview",courseId:m,instrumentId:t.getInstrumentId,detailId:t.getSelectKey,lessonCourseId:t.getBaseCourseware.id}});window.open(E,+new Date+"")}},B=async(m,E,D)=>{if(E){const J=await ns({lessonCoursewareKnowledgeDetailId:t.selectKey,classGroupId:E,useChapterLessonCoursewareId:m.id});if(window.matchMedia("(display-mode: standalone)").matches)yt.application=window.matchMedia("(display-mode: standalone)").matches,n.previewModal=!0,uu(),n.previewParams={type:"class",classGroupId:E,courseId:m.id,instrumentId:D||a.query.instrumentId,detailId:t.getSelectKey,classId:J.data,lessonCourseId:t.getBaseCourseware.id,preStudentNum:n.preStudentNum};else{const{href:f}=u.resolve({path:"/attend-class",query:{type:"class",classGroupId:E,courseId:m.id,instrumentId:D||a.query.instrumentId,detailId:t.getSelectKey,classId:J.data,lessonCourseId:t.getBaseCourseware.id,preStudentNum:n.preStudentNum}});window.open(f,+new Date+"")}}else n.showAttendClass=!0,n.attendClassType="change",n.attendClassItem=m},_=m=>{const E={};return m==null||m.forEach(D=>{D.id===n.wikiCategoryIdChild&&(E.selected=!0,E.name=D.name,E.label=D.name)}),E},b=O(()=>{let m=t.getInstrumentId?t.getInstrumentId:"";return t.getFormatInstrumentList.forEach(E=>{Array.isArray(E.instruments)&&E.instruments.forEach(D=>{D.id===t.getInstrumentId&&(m=E.id+"")})}),m});return()=>e("div",{class:[G.coursewarePresetsContainer,n.openTableShow&&G.rightLineShow]},[e("div",{class:G.presetsLeft,id:"presetsLeftRef",style:{width:"calc(".concat(n.leftWidth," - ").concat(n.rightWidth,")")}},[e(Ge,{ref:r,defaultValue:"",paneClass:G.paneTitle,justifyContent:"start",paneWrapperClass:G.paneWrapperContainer,value:b.value,"onUpdate:value":m=>{console.log(m,"item.id",t.getFormatInstrumentList),t.getFormatInstrumentList.forEach(E=>{E.value.toString()===m.toString()&&(t.setInstrumentId(m),n.instrumentId=m,n.wikiCategoryIdChild=null)}),m||(t.setInstrumentId(m),n.instrumentId=m,n.wikiCategoryIdChild=null,sessionStorage.setItem("prepareLessonCourseWareSubjectIsNull",m?"false":"true"))}},{default:()=>[[{name:"全部乐器",id:"",label:"全部乐器",value:""},...t.getFormatInstrumentList].map((m,E)=>{var D;return e(Oe,{name:"".concat(m.value),tab:m.label,disabled:((D=m.instruments)==null?void 0:D.length)>0,displayDirective:"if"},{tab:()=>{var J;return((J=m.instruments)==null?void 0:J.length)>0?e(vu,{options:m.instruments,trigger:"hover",value:n.wikiCategoryIdChild,"onUpdate:value":[f=>n.wikiCategoryIdChild=f,f=>{t.setInstrumentId(f),n.instrumentId=f,f||sessionStorage.setItem("prepareLessonCourseWareSubjectIsNull",f?"false":"true")}],key:m.id,class:G.popSelect},{default:()=>[e("span",{class:[G.textBtn,_(m.instruments).selected&&G.textBtnActive]},[_(m.instruments).label||m.label,e("i",{class:G.iconArrow},null)])]}):m.label}})})],suffix:()=>e(N,{class:G.addBtn,type:"primary",bordered:!1,onClick:()=>{k.emit("teacher-slideshow",!0),l("change",{status:!0,type:"create"})}},{default:()=>[e(ie,{class:G.addBtnIcon,previewDisabled:!0,src:Ys},null),C("创建课件")]})}),e(ge,{show:n.loading},{default:()=>[e(Fe,{class:G.coursewarePresets},{default:()=>[e("div",{style:{overflow:"hidden"}},[e("div",{class:[G.list,!n.loading&&n.tableList.length<=0&&G.listEmpty]},[n.tableList.map(m=>e("div",{class:[G.itemWrap,G.itemBlock,"row-nav"]},[e("div",{class:G.itemWrapBox},[e(_u,{operate:!0,isEditName:!0,item:m,onClick:()=>y(m.id),onEdit:()=>{k.emit("teacher-slideshow",!0),l("change",{status:!0,type:"update",groupItem:{id:m.id}})},onStartClass:()=>B(m,n.classGroupId),onDelete:()=>{n.selectItem=m,n.preRemoveVisiable=!0},onWork:()=>{n.workVisiable=!0,n.selectItem=m}},null)])])),!n.loading&&n.tableList.length<=0&&e(fe,{class:G.empty1,description:"当前章节暂无课件,快点击右上角创建课件吧"},null)])])]})]})]),e("div",{class:G.presetsRight,id:"presetsRightRef"},[e(ye,{showArrow:!1,animated:!1,duration:0,delay:0},{trigger:()=>e("div",{class:[G.presetsArrar,!n.openTableShow&&G.presetsArrarActive],onClick:()=>n.openTableShow=!n.openTableShow},[e(Au,null,{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e("path",{d:"M16.62 2.99a1.25 1.25 0 0 0-1.77 0L6.54 11.3a.996.996 0 0 0 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z",fill:"currentColor"},null)])]})]),default:()=>e("div",null,[n.openTableShow?"收起":"展开"])}),e(fc,{onMore:()=>n.showRelatedClass=!0,onAdd:m=>{F(m)},onLook:m=>{y(m.id)}},null)]),e(se,{show:n.showRelatedClass,"onUpdate:show":m=>n.showRelatedClass=m,preset:"card",showIcon:!1,class:["modalTitle background",G.attendClassModal1],title:"相关课件",blockScroll:!1},{default:()=>[e($i,{tableList:n.tableList,instrumentList:t.getInstrumentList,instrumentId:t.getInstrumentId,coursewareDetailKnowledgeId:t.getSelectKey,onClose:()=>n.showRelatedClass=!1,onAdd:m=>F(m),onClick:m=>{y(m.id),n.showRelatedClass=!1}},null)]}),e(se,{show:n.preRemoveVisiable,"onUpdate:show":m=>n.preRemoveVisiable=m,preset:"card",class:["modalTitle",G.removeVisiable1],title:"删除课件"},{default:()=>[e(xt,{content:'<p style="text-align: left;">请确认是否删除【'.concat(n.selectItem.name,"】,删除后不可恢复</p>"),cancelButtonText:"取消",confirmButtonText:"确认",loading:n.messageLoading,onClose:()=>n.preRemoveVisiable=!1,onConfirm:()=>d()},null)]}),e(se,{show:n.addVisiable,"onUpdate:show":m=>n.addVisiable=m,preset:"card",class:["modalTitle",G.removeVisiable1],title:"保存成功"},{default:()=>[e(xt,{content:'<p style="text-align: left;">【'.concat(s.addParam.name,"】暂未设置课件作业,是否现在去设置课件作业</p>"),cancelButtonText:"稍后设置",confirmButtonText:"立即设置",onClose:()=>n.addVisiable=!1,onConfirm:()=>{n.addVisiable=!1,n.workVisiable=!0,n.selectItem={id:s.addParam.id,name:s.addParam.name}}},null)]}),e(Su,{show:n.previewModal,"onUpdate:show":m=>n.previewModal=m,type:"attend",params:n.previewParams},null),e(se,{show:n.showAttendClass,"onUpdate:show":m=>n.showAttendClass=m,preset:"card",showIcon:!1,class:["modalTitle background",G.attendClassModal],title:"选择班级",blockScroll:!1},{default:()=>[e(Xs,{onClose:()=>n.showAttendClass=!1,type:n.attendClassType,onPreview:m=>{if(window.matchMedia("(display-mode: standalone)").matches)yt.application=window.matchMedia("(display-mode: standalone)").matches,n.previewModal=!0,n.previewParams={...m};else{const{href:E}=u.resolve({path:"/attend-class",query:{...m}});window.open(E,+new Date+"")}},onConfirm:async m=>{B(n.attendClassItem,m.classGroupId,m.instrumentId)}},null)]}),e(se,{show:n.workVisiable,"onUpdate:show":m=>n.workVisiable=m,preset:"card",class:["modalTitle background",G.workVisiable],title:n.selectItem.lessonPreTrainingId?"编辑作业":"创建作业"},{default:()=>[e("div",{id:"model-homework-height",class:G.workContainer},[e("div",{class:G.workTrain},[e(Ws,{cardType:"prepare",lessonPreTraining:{title:n.selectItem.name+"-课后作业",chapterId:n.selectItem.id,id:n.selectItem.lessonPreTrainingId},onChange:m=>{n.workVisiable=m.status,p()}},null)]),e("div",{class:G.resourceMain},[e(bu,{cardType:"prepare"},null)])])]})])}}),Cc="_headerTitle_1prp1_1",Fc="_iconBook_1prp1_12",Ec="_formContainer_1prp1_29",wc="_btnSubjectList_1prp1_32",Ac="_btnItem_1prp1_55",Bc="_block_1prp1_61",vc="_btnTitle_1prp1_65",yc="_iconQuestion_1prp1_78",le={headerTitle:Cc,iconBook:Fc,formContainer:Ec,btnSubjectList:wc,btnItem:Ac,block:Bc,btnTitle:vc,iconQuestion:yc},_c=W({name:"courseware-head",setup(s,{emit:l,expose:t}){const c=_e(),a=R(["",""]),u=R([]),o=K({subjects:[],openFlagEnable:!0,autoPlay:!1,name:"",openFlag:!1}),n=d=>{const F=[];d.map(y=>{Array.isArray(y.instruments)&&y.instruments.forEach(B=>{F.push(B.value)})}),o.subjects=F},p=()=>o,i=d=>{o.subjects=d.subjects,o.openFlagEnable=d.openFlagEnable,o.autoPlay=d.autoPlay,o.name=d.name,o.openFlag=d.openFlag,r(d.subjects||[])},g=()=>{var d;a.value[0]=o.name?"":"error",a.value[1]=((d=o.subjects)==null?void 0:d.length)>0?"":"error"},r=d=>{d=d||[];const F=[];c.getInstrumentList.forEach(b=>{Array.isArray(b.instruments)&&b.instruments.forEach(m=>{F.push(m.id)})});const y=[...new Set([...F,...d])],B=[];Je().getSubjectList.forEach(b=>{const m=It(b);m.enableFlag=!1,Array.isArray(m.instruments)&&m.instruments.forEach(E=>{E.enableFlag=!1,y.includes(E.id)&&(E.enableFlag=!0,m.enableFlag=!0)}),B.push(m)});const _=[];B.forEach(b=>{if(b.enableFlag){const{instruments:m,...E}=b;if(m&&m.length>0){const D=[];m==null||m.forEach(J=>{J.enableFlag&&D.push(J)}),D.length>0&&_.push({...E,instruments:D})}}}),u.value=_};return X(async()=>{await Je().getSubjects(),r(),k.on("updateCoursewareHeadInfo",i),k.on("checkCoursewareForm",g)}),t({getForms:p}),()=>e(me,null,[e("div",{class:le.headerTitle},[e("i",{class:le.iconBook},null),e("span",null,[c.getSelectName])]),e("div",{class:le.formContainer},[e("div",{class:[le.btnItem,le.block]},[e("span",{class:[le.btnTitle]},[e("span",null,[C("*")]),C("课件标题")]),e(He,{placeholder:"请输入课件标题",value:o.name,"onUpdate:value":[d=>o.name=d,()=>{a.value[0]=o.name?"":"error"}],maxlength:20,clearable:!0,status:a.value[0]},null)]),e("div",{class:[le.btnItem,le.block]},[e("span",{class:[le.btnTitle]},[e("span",null,[C("*")]),C("课件乐器")]),e(Mt,{status:a.value[1],placeholder:"请选择乐器(可多选)",class:le.btnSubjectList,options:u.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,multiple:!0,maxTagCount:1,value:o.subjects,"onUpdate:value":[d=>o.subjects=d,()=>{var d;a.value[1]=((d=o.subjects)==null?void 0:d.length)>0?"":"error"}]},{action:()=>e(me,null,[e(N,{text:!0,style:" --n-width: 100% ",size:"small",onClick:()=>n(u.value)},{default:()=>[C("全选")]})])})]),e("div",{class:le.btnItem},[e("span",{class:le.btnTitle},[C("自动播放"),e(ye,{style:{maxWidth:"200px"},showArrow:!1},{trigger:()=>e("i",{class:le.iconQuestion},null),default:()=>"开启自动播放后,课件内视频、音频资源将自动播放"})]),e(vt,{value:o.autoPlay,"onUpdate:value":d=>o.autoPlay=d},null)]),e("div",{class:le.btnItem},[e("span",{class:le.btnTitle},[C("公开课件"),e(ye,{style:{maxWidth:"200px"},showArrow:!1},{trigger:()=>e("i",{class:le.iconQuestion},null),default:()=>"公开课件后,其它老师可以使用该课件上课"})]),o.openFlagEnable?e(vt,{value:o.openFlag,"onUpdate:value":d=>o.openFlag=d,disabled:!o.openFlagEnable},null):e(ye,{style:{maxWidth:"200px"},showArrow:!1},{trigger:()=>e(vt,{value:o.openFlag,"onUpdate:value":d=>o.openFlag=d,disabled:!o.openFlagEnable},null),default:()=>"为尊重课件原作者,在“相关课件”中添加的课件不支持公开"})])])])}}),bc=W({name:"lesson-main",setup(){const s=_e(),l=K({editCoursewareShow:!1,coursewareType:"create",addParam:{isAdd:!1,id:null,addName:""},editCourseware:{},editWork:{}}),t=R(),c=()=>{var u;k.emit("coursewareClosed",(u=t.value)==null?void 0:u.getForms())},a=()=>{var u;k.emit("coursewareSave",(u=t.value)==null?void 0:u.getForms())};return()=>e("div",{class:[l.editCoursewareShow&&ot.coursewareSection],style:{height:"100%"}},[l.editCoursewareShow&&e("div",{class:ot.coursewareHeader},[e(_c,{ref:t},null)]),e("div",{class:ot["lesson-main"]},[l.editCoursewareShow?e(qr,{groupItem:l.editCourseware,onChange:u=>{u.addParam&&(l.addParam=u.addParam),l.editCoursewareShow=u.status,s.setIsEditResource(u.status),u.status||k.emit("teacher-slideshow",!1)}},null):e(hc,{addParam:l.addParam,onChange:u=>{l.coursewareType=u.type,l.editCoursewareShow=u.status,s.setIsEditResource(u.status),l.editCourseware=u.groupItem,l.addParam={isAdd:!1,id:null,addName:""}}},null)]),l.editCoursewareShow&&e("div",{class:ot.coursewareFooter},[e(ae,null,{default:()=>[e(N,{bordered:!1,type:"error",onClick:c},{default:()=>[C("取消")]}),e(N,{type:"primary",onClick:a},{default:()=>[C("保存课件")]})]})])])}}),Sc=W({name:"lessons-guide",emits:["close"],setup(s,{emit:l}){const t=K({box:{height:"0px"},show:!1,steps:[{ele:"",img:Lt("lessons2.png"),imgStyle:{left:re(-647),width:re(647),height:re(223)},btnsStyle:{bottom:"30px",left:re(-488)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"left"},{ele:"",img:Lt("lessons3.png"),imgStyle:{top:re(-4),left:re(-471),width:re(471),height:re(223)},btnsStyle:{bottom:re(20),left:re(-310)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"left"}],step:0}),c=R(!1),a=R({});(async()=>{var r;try{const d=await yu({guideTag:"teacher-guideInfo"});d.data?a.value=JSON.parse((r=d.data)==null?void 0:r.guideValue)||null:a.value={},a.value&&a.value.lessonsGuideIn?c.value=!1:c.value=!0}catch(d){console.log(d)}})();const o=()=>{var d,F,y,B;const r=document.getElementById("lessonsIn-".concat(t.step));if(r){const _=r.getBoundingClientRect(),b=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.left)||0,m=((F=t.steps[t.step].eleRectPadding)==null?void 0:F.top)||0,E=((y=t.steps[t.step].eleRectPadding)==null?void 0:y.width)||0,D=((B=t.steps[t.step].eleRectPadding)==null?void 0:B.height)||0;t.box={left:_.x-b+"px",top:_.y-m+"px",width:_.width+E+"px",height:_.height+D+"px"}}else i()},n=async r=>{try{if(r!=="prepare-lessons")return;a.value?a.value.lessonsGuideIn=!1:a.value={lessonsGuideIn:!1};try{await rt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(d){console.log(d)}t.step=0,o(),c.value=!0}catch(d){}};X(()=>{setTimeout(()=>{o()},500),window.addEventListener("resize",p),k.on("teacher-guideInfo",n)});const p=()=>{o()};be(()=>{window.removeEventListener("resize",p),k.off("teacher-guideInfo",n)});const i=()=>{if(t.step>=4){g();return}t.step=t.step+1,o()},g=async()=>{a.value?a.value.lessonsGuideIn=!0:a.value={lessonsGuideIn:!0};try{const r=await rt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(r){console.log(r)}c.value=!1};return()=>e(me,null,[c.value?Vt(e("div",{"onUpdate:show":r=>c.value=r,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:ne.content,onClick:()=>i()},[e("div",{class:ne.backBtn,onClick:r=>{r.stopPropagation(),g()}},[C("跳过")]),e("div",{class:ne.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((r,d)=>{var F,y,B,_,b,m;return e("div",{onClick:E=>E.stopPropagation(),class:ne.item,style:r.type=="bottom"?{display:d===t.step?"":"none",left:"".concat((F=r.eleRect)==null?void 0:F.left,"px"),top:"-".concat((y=r.imgStyle)==null?void 0:y.height)}:r.type=="left"?{display:d===t.step?"":"none",top:"".concat(parseFloat((B=t.box)==null?void 0:B.height)/2-parseFloat((_=r.imgStyle)==null?void 0:_.height)*1920/100/2-14,"px")}:{display:d===t.step?"":"none",left:"".concat((b=r.eleRect)==null?void 0:b.left,"px"),top:"".concat((m=t.box)==null?void 0:m.height)}},[e("img",{class:ne.img,style:r.imgStyle,src:r.img},null),e("div",{class:ne.btns,style:r.btnsStyle},[t.step+1==t.steps.length?e(me,null,[e("div",{class:[ne.endBtn],onClick:()=>g()},[C("完成")]),e("div",{class:ne.nextBtn,onClick:()=>{t.step=0,o()}},[C("再看一遍")])]):e("div",{class:ne.btn,onClick:()=>i()},[C("下一步 ("),t.step+1,C("/"),t.steps.length,C(")")])])])})])])]),[[Eu,c.value,"show"]]):null])}}),fd=W({name:"prepare-lessons",setup(){const s=K({sidebarShow:!1}),l=_e(),t=R(),c=R(),a=u=>{var o;console.log(u,"val"),s.sidebarShow=u,(o=t.value)==null||o.resetTabPosition()};return X(()=>{k.on("teacher-slideshow",a)}),be(()=>{k.off("teacher-slideshow",a)}),X(()=>{Tt(document.querySelector("#lessons-height"),u=>{const o=u[0],{height:n}=o.contentRect;document.documentElement.style.setProperty("--window-page-lesson-height",n+"px")})}),js(()=>{l.setTabType("courseware"),l.setSelectMusicStatus(!1),l.setSelectResourceStatus(!1),l.setIsAddResource(!1),l.setIsAddTrain(!1),l.setIsEditResource(!1),l.setIsEditTrain(!1),sessionStorage.removeItem("prepareLessonCourseWareSubjectIsNull")}),be(()=>{l.setSubjectId("")}),()=>e("div",{class:[Pe.prepareLessons,s.sidebarShow?Pe.showSideBar:Pe.hideSideBar],id:"lessons-height"},[e("div",{class:Pe.directoryMain,ref:c.value},[e(ho,null,null)]),e("div",{class:Pe.lessonMain},[e(bc,null,null)]),e("div",{class:[Pe.resourceMain]},[s.sidebarShow&&e(bu,{ref:t},null)]),s.sidebarShow&&e(Sc,null,null)])}});export{fd as default};