diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..3d8d6f0 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +dev-hex-admin.hexschool.io diff --git a/assets/AssistantDetail.1fffdb7f.css b/assets/AssistantDetail.1fffdb7f.css new file mode 100644 index 0000000..1d70afb --- /dev/null +++ b/assets/AssistantDetail.1fffdb7f.css @@ -0,0 +1 @@ +.card-body-height{height:300px;overflow:hidden;overflow-y:auto}.vs__dropdown-menu{max-height:200px} diff --git a/assets/AssistantDetail.37da153c.js b/assets/AssistantDetail.37da153c.js new file mode 100644 index 0000000..ff73aba --- /dev/null +++ b/assets/AssistantDetail.37da153c.js @@ -0,0 +1 @@ +import{l as ps,D as bs,r as n,s as H,m as J,o as ms,z as K,a as d,c,b as s,A as Q,f as gs,h as v,g as P,F as b,q as m,w as G,C as D,p as ks,x as g,E as fs,G as ys,$ as ws}from"./index.4c40fcfd.js";/* empty css */import{b as Ls}from"./bsTab.b84f3f29.js";import{a as xs}from"./assistant.0e96b47d.js";import{a as Ts}from"./task.e3c4a5ae.js";import"./tab.1217c1f2.js";const Cs={class:"about px-4 mt-4"},As={class:"border-bottom border-light pb-2 mb-4"},$s={"aria-label":"breadcrumb"},Gs={class:"breadcrumb"},Ds={class:"breadcrumb-item"},Vs=s("li",{class:"breadcrumb-item active","aria-current":"page"},"\u7DE8\u8F2F\u52A9\u6559",-1),Es=s("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559",-1),Ss={id:"assistantDetail",class:"col-md-5"},Ns={class:"assistant card shadow-sm rounded-4 overflow-hidden mb-4"},Us={class:"card-header bg-white py-3"},Ms=s("div",{style:{width:"60px",height:"60px"},class:"rounded-circle mx-auto bg-light mb-1"},null,-1),Ps={class:"text-center mb-0"},zs={class:"card-body"},Bs={class:"d-flex align-items-center"},js=s("span",{class:"material-icons-outlined me-1"},"email",-1),Fs={class:"d-flex"},Is=s("span",{class:"material-icons-outlined me-1"},"face",-1),Rs={class:"col-md-12"},qs={class:"nav nav-tabs",role:"tablist"},Os=["id","aria-controls","data-bs-target","onClick"],Hs={class:"tab-content mb-5",id:"myTabContent"},Js={class:"tab-pane fade show active",id:"assistantTab",role:"tabpanel","aria-labelledby":"assistant-tab"},Ks={class:"mt-4 card shadow-sm rounded-4 overflow-hidden mb-4"},Qs=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u52A9\u6559\u7A31\u865F")],-1),Ws={class:"card-body card-body-height"},Xs={class:"list list-unstyled"},Ys={class:"form-check"},Zs=["id","value","checked"],se=["for"],ee=s("hr",null,null,-1),te={class:"card-footer bg-white text-end py-3"},ae={class:"tab-pane fade",id:"coursesTab",role:"tabpanel","aria-labelledby":"courses-tab"},oe={class:"mt-4 row position-relative align-items-start"},le={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},ie={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4F5C\u696D\u5217\u8868")],-1),de={class:"card-body card-body-height"},ce={class:"list list-unstyled"},re=s("hr",null,null,-1),ue={class:"col-md-8"},he={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},_e={class:"card-header bg-white py-3"},ve={class:"form-check"},pe=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"assistantAll"},"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",-1),be={class:"card-body card-body-height"},me={class:"list list-unstyled"},ge={class:"form-check"},ke=["id","value","checked"],fe=["for"],ye=s("hr",null,null,-1),we={class:"card-footer bg-white text-end py-3"},Le={class:"tab-pane fade",id:"tasksTab",role:"tabpanel","aria-labelledby":"tasks-tab"},xe={class:"mt-4 row position-relative align-items-start"},Te={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},Ce={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ae=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4EFB\u52D9\u5217\u8868")],-1),$e={class:"card-body card-body-height"},Ge={id:"task-group",class:"list-unstyled mb-0"},De=["aria-controls","href"],Ve={class:"fw-bold"},Ee=["id"],Se={class:"list list-unstyled"},Ne={class:"col-md-8"},Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Me=s("div",{class:"card-header bg-white py-3 fw-bold"}," \u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A ",-1),Pe={class:"card-body card-body-height"},ze={key:0,class:"form-check"},Be=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"tasksAll"},"\u5168\u9078",-1),je={id:"task-list",class:"list list-unstyled mt-3"},Fe={class:"form-check"},Ie=["id","value"],Re=["for"],qe=s("hr",null,null,-1),Oe={class:"card-footer bg-white text-end py-3"},st={__name:"AssistantDetail",setup(He){const{apiGetVideoCoursesList:W,apiGetAssistantDetail:X,apiPutAssistantDetail:Y,apiGetAssistantsTitles:Z,apiPutAssistantTasks:ss,apiDeleteAssistantTasks:es}=xs,{apiGetTaskGroupsList:ts,apiGetTasks:as}=Ts,os=ps(),k=bs.useLoading(),S=(a,t,o)=>a.map(r=>(r[t]=o,r)),y=n([]),h=n([]),_=n([]),w=n(!1),ls=()=>{w.value?(_.value=[],y.value.forEach(a=>{_.value.push(a.id)})):_.value=[]};H(()=>_.value,()=>{y.value.length!==0&&_.value.length===y.value.length?w.value=!0:w.value=!1},{deep:!0});const is=()=>{y.value.forEach(a=>{h.value.video_courses.forEach(t=>{a.id===t.id&&(a.isChecked=!0,_.value.push(a.id))})})},ns=async()=>{const a=k.show();try{_.value=[];const{courses:t}=await W();y.value=S(t,"isChecked",!1),is()}catch(t){g("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},N=n([]),L=n([]),ds=()=>{N.value.forEach(a=>{h.value.assistant_titles.forEach(t=>{a.id===t.id&&(a.isChecked=!0,L.value.push(a.id))})})},cs=async()=>{const a=k.show();try{L.value=[];const{assistant_titles:t}=await Z();N.value=S(t,"isChecked",!1),ds()}catch(t){g("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},p=n(""),U=n([]),x=n({taskGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),V=n(1),rs=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{task_groups:l,pagination:f}=await ts({count:150,page:a});x.value.taskGroupsList=l,x.value.pagination=f,V.value=f.current_page,U.value=[...U.value,...x.value.taskGroupsList]}catch(l){g("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},z=async(a=1)=>{await rs(a),x.value.pagination.total_page!==0&&V.value!==x.value.pagination.total_page&&(V.value+=1,z(V.value))},T=n([]),C=n({tasksList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),E=n(1),B=n(null),us=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{tasks:l,pagination:f}=await as({count:100,page:a,scoped:B.value});C.value.tasksList=S(l,"isChecked",!1),C.value.tasksList=l,C.value.pagination=f,E.value=f.current_page,T.value=[...T.value,...l]}catch(l){g("danger","\u53D6\u5F97\u6307\u5B9A\u7684\u4EFB\u52D9\u7FA4\u7D44\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},j=n(""),u=n([]),M=async a=>{var o,r;const t=k.show();try{const e=await X(a);h.value=e,u.value=[],e.task_groups.forEach(i=>{i.tasks&&i.tasks.forEach(l=>{u.value.push({id:l.id,task_group_id:i.id})})}),ns(),cs()}catch(e){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${(o=e.response)==null?void 0:o.data.statusCode}:${(r=e.response)==null?void 0:r.data.message}`)}finally{t.hide()}},F=async(a=1)=>{await us(a),C.value.pagination.total_page!==0&&E.value!==C.value.pagination.total_page&&(E.value+=1,F(E.value))},hs=async a=>{j.value=a,B.value=`&filter=task_group&task_group_id=${j.value}`,T.value=[],await F()},I=async a=>{const t=k.show();try{const o={video_course_list:_.value,assistant_title_list:L.value};await Y(a,o),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u52A9\u6559\u8A2D\u5B9A"),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},A=n([]),$=n(!1),R=()=>{var a;if(A.value=T.value.map(t=>({id:t.id,task_group_id:p.value})),$.value)u.value.length===0&&u.value.push(...A.value),A.value.forEach(t=>{u.value.findIndex(r=>r.id===t.id)===-1&&u.value.push(t)});else{const t=A.value.map(o=>o.id);u.value=(a=u.value)==null?void 0:a.filter(o=>{if(!t.includes(o.id))return o}),A.value=[]}},_s=()=>{u.value.some(t=>p.value===t.task_group_id)?($.value=!0,R()):$.value=!1},vs=async a=>{const t=k.show();try{let o=[];u.value.length>0?(o=u.value.reduce((e,i)=>{let l=e.find(f=>f.task_group_id===i.task_group_id);return l||(l={id:i.task_group_id,task_ids:[]},e.push(l)),l.task_ids.push(i.id),e},[]),await ss(a,{task_groups:o})):await es(a),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u53EF\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},q=J([]),O=J([{id:"assistant-tab",name:"\u52A9\u6559\u7A31\u865F\u8A2D\u5B9A",target:"assistantTab",active:!0,danger:!1,element:null},{id:"courses-tab",name:"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",target:"coursesTab",active:!1,danger:!1,element:null},{id:"tasks-tab",name:"\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A",target:"tasksTab",active:!1,danger:!1,element:null}]);return ms(()=>{const a=os.params.id;M(a),z(),Ls(q,O)}),H(()=>p.value,async()=>{p.value&&(await hs(p.value),_s())}),(a,t)=>{const o=K("router-link"),r=K("v-select");return d(),c("div",Cs,[s("header",As,[s("nav",$s,[s("ol",Gs,[s("li",Ds,[Q(o,{to:"/admin/assistants/list"},{default:gs(()=>[P(" \u52A9\u6559\u7BA1\u7406 ")]),_:1})]),Vs])]),Es]),s("div",Ss,[s("div",Ns,[s("div",Us,[Ms,s("h5",Ps,v(h.value.nickname),1)]),s("div",zs,[s("p",Bs,[js,P(" "+v(h.value.email),1)]),s("div",Fs,[Is,s("div",null,[(d(!0),c(b,null,m(h.value.assistant_titles,e=>(d(),c("span",{key:e.id,class:"badge bg-light text-dark me-1"},v(e.name),1))),128))])])])])]),s("div",Rs,[s("ul",qs,[(d(!0),c(b,null,m(O,e=>(d(),c("li",{class:"nav-item",role:"presentation",key:e.id},[s("button",{class:fs(["nav-link border",{active:e.active,"text-danger bg-danger bg-opacity-10":e.danger}]),id:e.id,type:"button",role:"tab","aria-controls":e.id,"aria-selected":"true","data-bs-target":`#${e.target}`,ref_for:!0,ref:i=>q.push(i),onClick:ys(i=>e.element.show(),["prevent"])},v(e.name),11,Os)]))),128))])]),s("div",Hs,[s("div",Js,[s("div",Ks,[Qs,s("div",Ws,[s("ul",Xs,[(d(!0),c(b,null,m(N.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",Ys,[G(s("input",{id:e.name,"onUpdate:modelValue":t[0]||(t[0]=i=>L.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,Zs),[[D,L.value]]),s("span",{class:"d-inline-block rounded-pill me-1",style:ws([{width:"10px",height:"10px"},`background-color:${e.color_code}`])},null,4),s("label",{class:"form-check-label",for:e.name},v(e.name),9,se)]),ee]))),128))])]),s("div",te,[s("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])]),s("div",ae,[s("div",oe,[s("div",le,[s("div",ie,[ne,s("div",de,[s("ul",ce,[(d(!0),c(b,null,m(h.value.video_courses,e=>(d(),c("li",{key:e.id,class:"list-item"},[P(v(e.name)+" ",1),re]))),128))])])])]),s("div",ue,[s("div",he,[s("div",_e,[s("div",ve,[G(s("input",{id:"assistantAll","onUpdate:modelValue":t[2]||(t[2]=e=>w.value=e),class:"form-check-input",type:"checkbox",onChange:ls},null,544),[[D,w.value]]),pe])]),s("div",be,[s("ul",me,[(d(!0),c(b,null,m(y.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",ge,[G(s("input",{id:e.id,"onUpdate:modelValue":t[3]||(t[3]=i=>_.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,ke),[[D,_.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,fe)]),ye]))),128))])]),s("div",we,[s("button",{type:"button",class:"btn btn-primary",onClick:t[4]||(t[4]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])])])]),s("div",Le,[s("div",xe,[s("div",Te,[s("div",Ce,[Ae,s("div",$e,[s("ul",Ge,[(d(!0),c(b,null,m(h.value.task_groups,e=>(d(),c("li",{key:e.id,class:"mb-2 task-group"},[s("a",{class:"d-flex justify-content-between align-items-center text-decoration-none bg-light text-primary rounded mb-1 px-2 py-1","data-bs-toggle":"collapse",role:"button","aria-expanded":"false","aria-controls":e.id,href:`#checkedTaskList-${e.id}`},[s("span",Ve,v(e.name),1)],8,De),s("div",{class:"collapse",id:`checkedTaskList-${e.id}`},[s("ul",Se,[(d(!0),c(b,null,m(e.tasks,i=>(d(),c("li",{key:i.id,class:"list-item px-1 mb-1 task-item"},v(i.name),1))),128))])],8,Ee)]))),128))])])])]),s("div",Ne,[s("div",Ue,[Me,s("div",Pe,[Q(r,{id:"v-select",class:"mb-2",modelValue:p.value,"onUpdate:modelValue":t[5]||(t[5]=e=>p.value=e),options:U.value,label:"name",clearable:!1,reduce:e=>e.id},null,8,["modelValue","options","reduce"]),p.value?(d(),c("div",ze,[G(s("input",{id:"tasksAll","onUpdate:modelValue":t[6]||(t[6]=e=>$.value=e),class:"form-check-input",type:"checkbox",onChange:R},null,544),[[D,$.value]]),Be])):ks("",!0),s("ul",je,[(d(!0),c(b,null,m(T.value,e=>(d(),c("li",{class:"list-item",key:e.id},[s("div",Fe,[G(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[7]||(t[7]=i=>u.value=i),id:e.id,value:{task_group_id:p.value,id:e.id}},null,8,Ie),[[D,u.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,Re)]),qe]))),128))])]),s("div",Oe,[s("button",{type:"button",class:"btn btn-primary",onClick:t[8]||(t[8]=e=>vs(h.value.user_id))}," \u66F4\u65B0\u4EFB\u52D9 ")])])])])])])])}}};export{st as default}; diff --git a/assets/AssistantList.4b32c3bd.js b/assets/AssistantList.4b32c3bd.js new file mode 100644 index 0000000..5d429fd --- /dev/null +++ b/assets/AssistantList.4b32c3bd.js @@ -0,0 +1 @@ +import{_ as w,D as k,r as b,o as L,z as A,a as t,c as e,b as s,F as p,q as u,x as g,h as r,G as C,A as $,f as B,g as I,S,T as D}from"./index.4c40fcfd.js";import{a as G}from"./assistant.0e96b47d.js";const _=i=>(S("data-v-07e438cb"),i=i(),D(),i),M={class:"about px-4 mt-4 position-relative"},N=_(()=>s("header",{class:"d-flex align-items-center justify-content-between border-bottom border-light pb-2 mb-4"},[s("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7BA1\u7406 ")],-1)),V={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},z={class:"card-body p-0"},F={class:"table-responsive"},T={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},j=_(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u66B1\u7A31 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u6279\u6539\u5217\u8868 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u7A31\u865F "),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1)),q={class:"text-nowrap"},E={scope:"row",class:"ps-4"},O={class:"fs-6 mb-0"},H={class:"mb-0 text-muted"},J={class:"dropdown"},K=["onClick"],P={class:"dropdown-menu","aria-labelledby":"dropdownCourseButton"},Q={key:1,class:"p-1"},R=_(()=>s("small",null,"\u9084\u6C92\u6709\u52A0\u5165\u8AB2\u7A0B\u5594\uFF01",-1)),U=[R],W={style:{"max-width":"100px"}},X={class:"d-flex flex-wrap"},Y={class:"pe-3"},Z=_(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),ss={__name:"AssistantList",setup(i){const{apiGetAssistantList:v,apiGetAssistantDetail:y}=G,h=k.useLoading(),m=b([]);L(async()=>{const l=h.show();try{const{assistants:o}=await v();m.value=o}catch(o){g("danger","\u53D6\u5F97\u52A9\u6559\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{l.hide()}});const c=b([]),f=async l=>{const o=h.show();try{c.value={};const{video_courses:a}=await y(l);c.value=a}catch(a){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{o.hide()}};return(l,o)=>{const a=A("router-link");return t(),e("div",M,[N,s("div",V,[s("div",z,[s("div",F,[s("table",T,[j,s("tbody",q,[(t(!0),e(p,null,u(m.value,n=>(t(),e("tr",{key:n.user_id,class:"align-middle"},[s("td",E,[s("h5",O,r(n.nickname),1),s("p",H,r(n.email),1)]),s("td",null,[s("div",J,[s("a",{id:"dropdownCourseButton",href:"#","data-bs-toggle":"dropdown",onClick:C(d=>f(n.user_id),["prevent"])}," \u5C55\u958B\u5217\u8868 ",8,K),s("ul",P,[c.value.length?(t(!0),e(p,{key:0},u(c.value,d=>(t(),e("li",{key:d.id,class:"p-1"},[s("small",null,r(d.name),1)]))),128)):(t(),e("li",Q,U))])])]),s("td",W,[s("div",X,[(t(!0),e(p,null,u(n.assistant_titles,(d,x)=>(t(),e("span",{key:x,class:"badge bg-light text-dark me-1 mb-1"},r(d),1))),128))])]),s("td",Y,[$(a,{to:`/admin/assistants/list/${n.user_id}`,class:"btn btn-sm btn-outline-gray"},{default:B(()=>[Z,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"])])]))),128))])])])])])])}}},as=w(ss,[["__scopeId","data-v-07e438cb"]]);export{as as default}; diff --git a/assets/AssistantList.90a8bcc8.css b/assets/AssistantList.90a8bcc8.css new file mode 100644 index 0000000..2126960 --- /dev/null +++ b/assets/AssistantList.90a8bcc8.css @@ -0,0 +1 @@ +.dropdown-menu[data-v-07e438cb]{max-height:150px;overflow:auto} diff --git a/assets/CourseDetail.4d285140.js b/assets/CourseDetail.4d285140.js new file mode 100644 index 0000000..fca8440 --- /dev/null +++ b/assets/CourseDetail.4d285140.js @@ -0,0 +1 @@ +import{l as R,D as j,m as $,r as U,o as z,z as w,a as r,c,b as e,A as o,f as y,F as v,q as f,p as V,x as b,g as H,E as _,G as P,h as p,w as T,R as O,C as J}from"./index.4c40fcfd.js";import{b as K}from"./bsTab.b84f3f29.js";import{a as Q}from"./courses.c7126007.js";import{a as W}from"./assistant.0e96b47d.js";import"./tab.1217c1f2.js";const X={class:"about px-4 mt-4"},Y={class:"border-bottom border-light pb-2 mb-4"},Z={"aria-label":"breadcrumb"},ee={class:"breadcrumb"},se={class:"breadcrumb-item"},ae=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),te=e("h1",{class:"fs-4 mb-0"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),le={class:"row"},oe={class:"col-md-4"},ie={id:"list-tab",class:"list-group mb-3 mb-md-0",role:"tablist"},de=["id","href","aria-controls","onClick"],ne={class:"col-md-8"},re={id:"nav-tabContent",class:"tab-content"},ce={id:"list-home","data-bs-target":"list-home",class:"tab-pane fade show active",role:"tabpanel","aria-labelledby":"list-home-list"},ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},me=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8AB2\u7A0B\u8A2D\u5B9A ")],-1),_e={class:"card-body"},be={class:"mb-3"},he=e("label",{for:"name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),ve={class:"mb-3"},fe=e("label",{for:"assistants",class:"form-label"},"\u9810\u8A2D\u52A9\u6559",-1),pe=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),ye=["value"],ge={class:"text-end"},we=["disabled"],Ve={key:0,id:"udemy_info","data-bs-target":"udemy_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-udemy-list"},ke={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ce=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u8A2D\u5B9A ")],-1),xe={class:"card-body"},De={class:"mb-3"},$e=e("label",{for:"udemy-name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),Ue={class:"mb-3"},Te=e("label",{for:"description",class:"form-label"},"\u8AB2\u7A0B\u63CF\u8FF0",-1),Me=["innerHTML"],qe={class:"mb-3"},Le=e("label",{for:"abbr-name",class:"form-label"},"\u8AB2\u7A0B\u7E2E\u5BEB",-1),Se={class:"mb-3"},Ie=e("label",{for:"amount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Ae={key:1,id:"teachable_info","data-bs-target":"teachable_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-teachable-list"},Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ne=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Teachable \u8A2D\u5B9A ")],-1),Ee={class:"card-body"},Be={class:"mb-3"},Ge=e("label",{for:"teachableId",class:"form-label"},"Teachable ID",-1),Re={class:"mb-3"},je=e("label",{for:"teachableName",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),ze={class:"mb-3"},He=e("label",{for:"teachableAmount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Pe={id:"list-lectures","data-bs-target":"list-teachable",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-lectures-list"},Oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Je=e("div",{class:"card-header bg-white py-3 d-flex"},[e("h2",{class:"fs-6 mb-0 lh-base",style:{"margin-right":"260px"}}," Teachable \u7AE0\u7BC0 "),e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u7AE0\u7BC0 ")],-1),Ke={class:"card-body pt-2"},Qe={class:"row"},We={class:"col-md-6"},Xe={class:"list-group list-group-numbered"},Ye={class:"w-100"},Ze={class:"fw-bold mb-2"},es={class:"list-group mb-3"},ss={class:"col-md-6"},as={class:"list-group list-group-numbered"},ts={class:"w-100"},ls={class:"fw-bold mb-2"},os={class:"list-group mb-3"},is={id:"list-surveys","data-bs-target":"list-surveys",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-surveys-list"},ds={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ns=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8A55\u50F9\u8A2D\u5B9A ")],-1),rs={class:"card-body"},cs={class:"mb-3"},us=e("p",null,"\u8A55\u50F9\u529F\u80FD",-1),ms={class:"form-check form-switch"},_s=e("label",{class:"form-check-label",for:"flexSwitchCheckDefault"},"\u958B\u555F/\u95DC\u9589",-1),bs={class:"mb-3"},hs=e("label",{for:"course-seconds",class:"form-label"},"\u8A72\u8AB2\u7A0B\u6709\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6(\u79D2)",-1),vs=e("div",{class:"form-text"}," \u8ACB\u5230 Teachable \u8A08\u7B97\u4E94\u500B\u7AE0\u7BC0\u7684\u5F71\u97F3\u7AE0\u7BC0\u5F71\u7247\u9577\u5EA6 ",-1),fs={class:"mb-3"},ps=e("label",{for:"course-completion",class:"form-label"},"\u8AB2\u7A0B\u5B8C\u6210\u5EA6(%)",-1),ys={key:1,class:"text-end"},gs=["disabled"],$s={__name:"CourseDetail",setup(ws){const{apiGetCourseDetail:M,apiPutCourseDetail:q,apiPutCourseSurveys:L,apiDeleteCourseSurveys:S}=Q,{apiGetAssistantList:I}=W,A=R(),F=j.useLoading(),k=$([]),C=$([{id:"list-home-list",name:"\u8AB2\u7A0B\u8A2D\u5B9A",target:"list-home",active:!0,danger:!1,element:null},{id:"list-udemy-list",name:"Udemy \u8A2D\u5B9A",target:"udemy_info",active:!1,danger:!1,element:null},{id:"list-teachable-list",name:"Teachable \u8A2D\u5B9A",target:"teachable_info",active:!1,danger:!1,element:null},{id:"list-lectures-list",name:"\u7AE0\u7BC0\u5C0D\u61C9",target:"list-lectures",active:!1,danger:!1,element:null},{id:"list-surveys-list",name:"\u8A55\u50F9\u8A2D\u5B9A",target:"list-surveys",active:!1,danger:!1,element:null}]),s=U({teachable_info:{},udemy_info:{},surveys_info:{},default_assistants:[{}],lectures:[]}),x=U([]),g=async i=>{var m,d;const a=F.show();try{const{course:n}=await M(i),h=n.default_assistants;s.value={...n,default_assistants:h.length===0?[{user_id:""}]:h}}catch(n){b("danger","\u53D6\u5F97\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}finally{a.hide()}},N=async i=>{var m,d;const a={name:s.value.name};s.value.default_assistants&&(a.default_assistant_user_id=s.value.default_assistants[0].user_id);try{await q(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B"),g(i)}catch(n){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}},D=async i=>{const a={review_threshold_sec:s.value.review_threshold_sec||1200,percent_complete_threshold_of_review:s.value.percent_complete_threshold_of_review||5};try{await L(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(m){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${m.response.data.statusCode}:${m.response.data.message}`)}},E=async i=>{try{await S(i),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(a){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}},B=async()=>{try{const{assistants:i}=await I();x.value=i}catch(i){b("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${i.response.data.statusCode}:${i.response.data.message}`)}};z(()=>{const{id:i}=A.params;g(i),B(),K(k,C)});const G=(i,a)=>{let m=!1;return a.forEach(d=>{i===d&&(m=!s.value[d])}),m};return(i,a)=>{const m=w("router-link"),d=w("Field"),n=w("ErrorMessage"),h=w("VForm");return r(),c("div",X,[e("header",Y,[e("nav",Z,[e("ol",ee,[e("li",se,[o(m,{to:"/admin/courses"},{default:y(()=>[H(" \u8AB2\u7A0B\u7BA1\u7406 ")]),_:1})]),ae])]),te]),e("div",le,[e("div",oe,[e("div",ie,[(r(!0),c(v,null,f(C,t=>(r(),c("a",{id:t.id,class:_(["list-group-item list-group-item-action",{active:t.active,disabled:G(t.target,["udemy_info","teachable_info"])}]),href:`#${t.target}`,role:"tab","aria-controls":t.target,key:t.id,ref_for:!0,ref:l=>k.push(l),onClick:P(l=>t.element.show(),["prevent"])},p(t.name),11,de))),128))])]),e("div",ne,[e("div",re,[e("div",ce,[e("div",ue,[me,e("div",_e,[o(h,{onSubmit:a[2]||(a[2]=t=>N(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",be,[he,o(d,{id:"name",modelValue:s.value.name,"onUpdate:modelValue":a[0]||(a[0]=u=>s.value.name=u),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",ve,[fe,T(e("select",{id:"assistants","onUpdate:modelValue":a[1]||(a[1]=u=>s.value.default_assistants[0].user_id=u),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control"},[pe,(r(!0),c(v,null,f(x.value,u=>(r(),c("option",{key:u.user_id,value:u.user_id},p(u.nickname),9,ye))),128))],512),[[O,s.value.default_assistants[0].user_id]])]),e("div",ge,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u5132\u5B58 ",8,we)])]),_:1})])])]),s.value.udemy_info?(r(),c("div",Ve,[e("div",ke,[Ce,e("div",xe,[o(h,null,{default:y(({errors:t})=>[e("div",De,[$e,o(d,{id:"udemy-name",modelValue:s.value.udemy_info.name,"onUpdate:modelValue":a[3]||(a[3]=l=>s.value.udemy_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",Ue,[Te,e("div",{class:"bg-light p-3",innerHTML:s.value.udemy_info.description},null,8,Me)]),e("div",qe,[Le,o(d,{id:"abbr-name",modelValue:s.value.udemy_info.headline,"onUpdate:modelValue":a[4]||(a[4]=l=>s.value.udemy_info.headline=l),name:"\u8AB2\u7A0B\u7E2E\u5BEB",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u7E2E\u5BEB}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u7E2E\u5BEB",class:"invalid-feedback"})]),e("div",Se,[Ie,o(d,{id:"amount",modelValue:s.value.udemy_info.enrollments_count,"onUpdate:modelValue":a[5]||(a[5]=l=>s.value.udemy_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),s.value.teachable_info?(r(),c("div",Ae,[e("div",Fe,[Ne,e("div",Ee,[o(h,null,{default:y(({errors:t})=>[e("div",Be,[Ge,o(d,{id:"teachableId",modelValue:s.value.teachable_info.id,"onUpdate:modelValue":a[6]||(a[6]=l=>s.value.teachable_info.id=l),name:"Teachable ID",type:"text",class:_(["form-control",{"is-invalid":t["Teachable ID"]}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"Teachable ID",class:"invalid-feedback"})]),e("div",Re,[je,o(d,{id:"teachableName",modelValue:s.value.teachable_info.name,"onUpdate:modelValue":a[7]||(a[7]=l=>s.value.teachable_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",ze,[He,o(d,{id:"teachableAmount",modelValue:s.value.teachable_info.enrollments_count,"onUpdate:modelValue":a[8]||(a[8]=l=>s.value.teachable_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),e("div",Pe,[e("div",Oe,[Je,e("div",Ke,[e("div",Qe,[e("div",We,[e("ol",Xe,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",Ye,[e("div",Ze,p(t.name),1),e("ul",es,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasTeachable?l.name:"-"),1))),128))])])]))),128))])]),e("div",ss,[e("ol",as,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",ts,[e("div",ls,p(t.name),1),e("ul",os,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasUdemy?l.name:"-"),1))),128))])])]))),128))])])])])])]),e("div",is,[e("div",ds,[ns,e("div",rs,[o(h,{onSubmit:a[13]||(a[13]=t=>D(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",cs,[us,e("div",ms,[T(e("input",{id:"flexSwitchCheckDefault","onUpdate:modelValue":a[9]||(a[9]=u=>s.value.enable_review=u),class:"form-check-input",type:"checkbox",role:"switch",onClick:a[10]||(a[10]=u=>s.value.enable_review?E(s.value.id):D(s.value.id))},null,512),[[J,s.value.enable_review]]),_s])]),s.value.enable_review?(r(),c(v,{key:0},[e("div",bs,[hs,o(d,{id:"course-seconds",modelValue:s.value.review_threshold_sec,"onUpdate:modelValue":a[11]||(a[11]=u=>s.value.review_threshold_sec=u),modelModifiers:{number:!0},name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",type:"number",min:"1",class:_(["form-control",{"is-invalid":t.\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),vs,o(n,{name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",class:"invalid-feedback"})]),e("div",fs,[ps,o(d,{id:"course-completion",modelValue:s.value.percent_complete_threshold_of_review,"onUpdate:modelValue":a[12]||(a[12]=u=>s.value.percent_complete_threshold_of_review=u),modelModifiers:{number:!0},name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",type:"number",min:"1",max:"100",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u5B8C\u6210\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",class:"invalid-feedback"})])],64)):V("",!0),s.value.enable_review?(r(),c("div",ys,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u7DE8\u8F2F ",8,gs)])):V("",!0)]),_:1})])])])])])])])}}};export{$s as default}; diff --git a/assets/CourseList.2bfce6a5.js b/assets/CourseList.2bfce6a5.js new file mode 100644 index 0000000..0624613 --- /dev/null +++ b/assets/CourseList.2bfce6a5.js @@ -0,0 +1 @@ +import{r,o as F,B as T,z as y,a as o,e as U,f as C,A as h,M as q,b as e,E as G,w as j,c as l,F as V,q as N,h as L,R as I,x as M,D as O,p as w,g as A}from"./index.4c40fcfd.js";import{a as B}from"./courses.c7126007.js";import{a as P}from"./assistant.0e96b47d.js";const H={class:"mb-3"},J=e("label",{for:"addName",class:"form-label text-dark"},"\u8AB2\u7A0B\u540D\u7A31",-1),K={class:"mb-3"},Q=e("label",{for:"addAssistants",class:"form-label text-dark"},"\u9810\u8A2D\u52A9\u6559",-1),W=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),X=["value"],Y=["disabled"],Z={__name:"CreateCourseModal",emits:["createCourseMethod"],setup(D,{expose:g,emit:f}){const{apiPostCreateCourse:b}=B,{apiGetAssistantList:v}=P,c=r(),p=r(""),u=r(""),n=async()=>{try{const t={name:p.value};u.value&&(t.default_assistant_user_id=u.value),await b(t),f("createCourseMethod",{target:"import",type:"\u6210\u529F"}),c.value.resetForm()}catch(t){f("createCourseMethod",{target:"import",type:"\u5931\u6557",error:`${t.response.status}:${t.response.statusText}`})}},a=r([]),k=async()=>{var t,d;try{const{assistants:m}=await v();a.value=m}catch(m){M("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${(t=m.response.data)==null?void 0:t.statusCode}:${(d=m.response.data)==null?void 0:d.message}`)}},s=r(null),_=r(null);return F(()=>{k(),_.value=new T(s.value.hModal)}),g({openModal:()=>{_.value.show()},hideModal:()=>{_.value.hide()}}),(t,d)=>{const m=y("Field"),R=y("ErrorMessage"),E=y("VForm");return o(),U(E,{ref_key:"refs",ref:c,onSubmit:n},{default:C(({errors:z,meta:S})=>[h(q,{id:"createCourseModal",ref_key:"createCourseModalRef",ref:s,"has-footer":!0,title:"\u65B0\u589E\u8AB2\u7A0B","class-list":""},{body:C(()=>[e("div",H,[J,h(m,{id:"addName",modelValue:p.value,"onUpdate:modelValue":d[0]||(d[0]=i=>p.value=i),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:G(["form-control",{"is-invalid":z.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),h(R,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",K,[Q,j(e("select",{id:"addAssistants","onUpdate:modelValue":d[1]||(d[1]=i=>u.value=i),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control text-dark"},[W,(o(!0),l(V,null,N(a.value,i=>(o(),l("option",{key:i.user_id,value:i.user_id},L(i.nickname),9,X))),128))],512),[[I,u.value]])])]),footer:C(()=>[e("button",{type:"submit",disabled:!S.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Y)]),_:2},1536)]),_:1},512)}}},ee={class:"about px-4 mt-4 position-relative"},se={class:"d-flex align-items-center justify-content-between"},te=e("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u7BA1\u7406 ",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne={class:"card-body p-0"},re={class:"table-responsive"},le={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},de=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u8AB2\u7A0B\u540D\u7A31 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u6578 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u5C0D\u61C9\u7684\u8AB2\u7A0B "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),ie={class:"text-nowrap"},ce={scope:"row",class:"ps-4"},ue={class:"fs-6 mb-0"},_e=["href"],me=["href"],pe={class:"pe-3"},he=e("span",{class:"material-icons align-middle fs-6"},"edit",-1),ye={__name:"CourseList",setup(D){const{apiGetCourseList:g}=B,f=O.useLoading(),b=r([]),v=async()=>{const n=f.show();try{const{courses:a}=await g();b.value=a}catch(a){M("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{n.hide()}};F(v);const c=r(null),p=()=>{c.value.openModal()},u=n=>{n.type==="\u6210\u529F"?M("success","\u5EFA\u7ACB\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u8AB2\u7A0B"):n.type==="\u5931\u6557"&&M("danger","\u5EFA\u7ACB\u8AB2\u7A0B\u5931\u6557",n.error),c.value.hideModal(),v()};return(n,a)=>{const k=y("router-link");return o(),l("div",ee,[e("header",se,[te,e("button",{class:"btn btn-primary",onClick:a[0]||(a[0]=s=>p())}," \u65B0\u589E\u8AB2\u7A0B ")]),ae,e("div",oe,[e("div",ne,[e("div",re,[e("table",le,[de,e("tbody",ie,[(o(!0),l(V,null,N(b.value,s=>{var _,x,$,t;return o(),l("tr",{key:s.id,class:"align-middle"},[e("td",ce,[e("h5",ue,L(s.name),1)]),e("td",null,L(s.assistant_count),1),e("td",null,[(_=s.teachable_info)!=null&&_.id?(o(),l("a",{key:0,href:s.teachable_info.url,target:"_blank"}," Teachable \u9023\u7D50 ",8,_e)):w("",!0),((x=s.udemy_info)==null?void 0:x.id)&&(($=s.teachable_info)==null?void 0:$.id)?(o(),l(V,{key:1},[A(" | ")],64)):w("",!0),(t=s.udemy_info)!=null&&t.id?(o(),l("a",{key:2,href:s.udemy_info.url,target:"_blank"}," Udemy \u9023\u7D50 ",8,me)):w("",!0)]),e("td",pe,[h(k,{to:`/admin/courses/${s.id}`,class:"btn btn-sm btn-outline-gray"},{default:C(()=>[he,A("\u7DE8\u8F2F ")]),_:2},1032,["to"])])])}),128))])])])])]),h(Z,{ref_key:"createCourseModalComponentRef",ref:c,onCreateCourseMethod:u},null,512)])}}};export{ye as default}; diff --git a/assets/CoursesSurveys.8ca81c48.css b/assets/CoursesSurveys.8ca81c48.css new file mode 100644 index 0000000..a18f6aa --- /dev/null +++ b/assets/CoursesSurveys.8ca81c48.css @@ -0,0 +1 @@ +.progress[data-v-1bd672ba]{border-radius:24px}.progress-bar[data-v-1bd672ba]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-1bd672ba]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-1bd672ba]{left:0;right:0;bottom:-20px}[data-v-1bd672ba] span.vue-star-rating-star{display:flex} diff --git a/assets/CoursesSurveys.e889c660.js b/assets/CoursesSurveys.e889c660.js new file mode 100644 index 0000000..abdb077 --- /dev/null +++ b/assets/CoursesSurveys.e889c660.js @@ -0,0 +1,6 @@ +import{a0 as K,U as J,_ as X,n as Y,j as q,m as Z,z as Q,a as M,c as j,b as f,A as W,f as $,h as N,i as P,F as D,q as F,$ as U,g as tt,p as H,S as et,T as rt}from"./index.4c40fcfd.js";var G={exports:{}};(function(T){T.exports=function(_){var c={};function s(e){if(c[e])return c[e].exports;var l=c[e]={i:e,l:!1,exports:{}};return _[e].call(l.exports,l,l.exports,s),l.l=!0,l.exports}return s.m=_,s.c=c,s.d=function(e,l,p){s.o(e,l)||Object.defineProperty(e,l,{enumerable:!0,get:p})},s.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,l){if(l&1&&(e=s(e)),l&8||l&4&&typeof e=="object"&&e&&e.__esModule)return e;var p=Object.create(null);if(s.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:e}),l&2&&typeof e!="string")for(var r in e)s.d(p,r,function(h){return e[h]}.bind(null,r));return p},s.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(l,"a",l),l},s.o=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)},s.p="",s(s.s="fb15")}({"0a04":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-f675a548]{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}.vue-star-rating-pointer[data-v-f675a548]{cursor:pointer}.vue-star-rating[data-v-f675a548]{display:flex;align-items:center}.vue-star-rating-inline[data-v-f675a548]{display:inline-flex}.vue-star-rating-rating-text[data-v-f675a548]{margin-left:7px}.vue-star-rating-rtl[data-v-f675a548]{direction:rtl}.vue-star-rating-rtl .vue-star-rating-rating-text[data-v-f675a548]{margin-right:10px;direction:rtl}.sr-only[data-v-f675a548]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}",""]),_.exports=c},"0fde":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-11edf2d6]{overflow:visible!important}.vue-star-rating-star-rotate[data-v-11edf2d6]{transition:all .25s}.vue-star-rating-star-rotate[data-v-11edf2d6]:hover{transition:transform .25s;transform:rotate(-15deg) scale(1.3)}",""]),_.exports=c},"499e":function(_,c,s){s.r(c),s.d(c,"default",function(){return b});function e(i,o){for(var t=[],u={},n=0;nt.parts.length&&(u.parts.length=t.parts.length)}else{for(var a=[],n=0;n([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),x=b.replace(O,"$1").trim());for(var w=0;w[Object(r.createVNode)("span",null,"Rated "+Object(r.toDisplayString)(n.selectedRating)+" stars out of "+Object(r.toDisplayString)(t.maxRating),1)])]),Object(r.createVNode)("div",{class:"vue-star-rating",onMouseleave:o[2]||(o[2]=(...A)=>a.resetRating(...A))},[(Object(r.openBlock)(!0),Object(r.createBlock)(r.Fragment,null,Object(r.renderList)(t.maxRating,A=>(Object(r.openBlock)(),Object(r.createBlock)("span",{key:A,class:[{"vue-star-rating-pointer":!t.readOnly},"vue-star-rating-star"],style:{"margin-right":a.margin+"px"}},[Object(r.createVNode)(g,{fill:n.fillLevel[A-1],size:t.starSize,points:t.starPoints,"star-id":A,step:n.step,"active-color":a.currentActiveColor,"inactive-color":t.inactiveColor,"border-color":t.borderColor,"active-border-color":a.currentActiveBorderColor,"border-width":t.borderWidth,"rounded-corners":t.roundedCorners,rtl:t.rtl,glow:t.glow,"glow-color":t.glowColor,animate:t.animate,"onStar-selected":o[1]||(o[1]=I=>a.setRating(I,!0)),"onStar-mouse-move":a.setRating},null,8,["fill","size","points","star-id","step","active-color","inactive-color","border-color","active-border-color","border-width","rounded-corners","rtl","glow","glow-color","animate","onStar-mouse-move"])],6))),128)),t.showRating?(Object(r.openBlock)(),Object(r.createBlock)("span",{key:0,class:["vue-star-rating-rating-text",t.textClass]},Object(r.toDisplayString)(a.formattedRating),3)):Object(r.createCommentVNode)("",!0)],32)],2)}),R=Object(r.withScopeId)("data-v-11edf2d6");Object(r.pushScopeId)("data-v-11edf2d6");const S=Object(r.createVNode)("feMerge",null,[Object(r.createVNode)("feMergeNode",{in:"coloredBlur"}),Object(r.createVNode)("feMergeNode",{in:"SourceGraphic"})],-1);Object(r.popScopeId)();const B=R(function(i,o,t,u,n,a){return Object(r.openBlock)(),Object(r.createBlock)("svg",{class:["vue-star-rating-star",{"vue-star-rating-star-rotate":a.shouldAnimate}],height:a.starSize,width:a.starSize,viewBox:a.viewBox,onMousemove:o[1]||(o[1]=(...g)=>a.mouseMoving(...g)),onClick:o[2]||(o[2]=(...g)=>a.selected(...g)),onTouchstart:o[3]||(o[3]=(...g)=>a.touchStart(...g)),onTouchend:o[4]||(o[4]=(...g)=>a.touchEnd(...g))},[Object(r.createVNode)("linearGradient",{id:n.grad,x1:"0",x2:"100%",y1:"0",y2:"0"},[Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.inactiveColor):a.getColor(t.activeColor),"stop-opacity":t.rtl?a.getOpacity(t.inactiveColor):a.getOpacity(t.activeColor)},null,8,["offset","stop-color","stop-opacity"]),Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.activeColor):a.getColor(t.inactiveColor),"stop-opacity":t.rtl?a.getOpacity(t.activeColor):a.getOpacity(t.inactiveColor)},null,8,["offset","stop-color","stop-opacity"])],8,["id"]),Object(r.createVNode)("filter",{id:n.glowId,height:"130%",width:"130%",filterUnits:"userSpaceOnUse"},[Object(r.createVNode)("feGaussianBlur",{stdDeviation:t.glow,result:"coloredBlur"},null,8,["stdDeviation"]),S],8,["id"]),Object(r.withDirectives)(Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:t.glowColor,filter:"url(#"+n.glowId+")","stroke-width":a.border},null,8,["points","fill","stroke","filter","stroke-width"]),[[r.vShow,t.glowColor&&t.glow>0&&t.fill>0]]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:a.getBorderColor,"stroke-width":a.border,"stroke-linejoin":a.strokeLinejoin},null,8,["points","fill","stroke","stroke-width","stroke-linejoin"]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId},null,8,["points","fill"])],42,["height","width","viewBox"])});var m=s("d4aa"),b=s.n(m),O={name:"Star",props:{fill:{type:Number,default:0},points:{type:Array,default(){return[]}},size:{type:Number,default:50},starId:{type:Number,required:!0},activeColor:{type:String,required:!0},inactiveColor:{type:String,required:!0},borderColor:{type:String,default:"#000"},activeBorderColor:{type:String,default:"#000"},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},glow:{type:Number,default:0},glowColor:{type:String,default:null,required:!1},animate:{type:Boolean,default:!1}},emits:["star-mouse-move","star-selected"],data(){return{starPoints:[19.8,2.2,6.6,43.56,39.6,17.16,0,17.16,33,43.56],grad:"",glowId:"",isStarActive:!0}},computed:{starPointsToString(){return this.starPoints.join(",")},gradId(){return"url(#"+this.grad+")"},starSize(){const d=this.roundedCorners&&this.borderWidth<=0?parseInt(this.size)-parseInt(this.border):this.size;return parseInt(d)+parseInt(this.border)},starFill(){return this.rtl?100-this.fill+"%":this.fill+"%"},border(){return this.roundedCorners&&this.borderWidth<=0?6:this.borderWidth},getBorderColor(){return this.roundedCorners&&this.borderWidth<=0?this.fill<=0?this.inactiveColor:this.activeColor:this.fill<=0?this.borderColor:this.activeBorderColor},maxSize(){return this.starPoints.reduce(function(d,i){return Math.max(d,i)})},viewBox(){return"0 0 "+this.maxSize+" "+this.maxSize},shouldAnimate(){return this.animate&&this.isStarActive},strokeLinejoin(){return this.roundedCorners?"round":"miter"}},created(){this.starPoints=this.points.length?this.points:this.starPoints,this.calculatePoints(),this.grad=this.getRandomId(),this.glowId=this.getRandomId()},methods:{mouseMoving(d){d.touchAction!=="undefined"&&this.$emit("star-mouse-move",{event:d,position:this.getPosition(d),id:this.starId})},touchStart(){this.$nextTick(()=>{this.isStarActive=!0})},touchEnd(){this.$nextTick(()=>{this.isStarActive=!1})},getPosition(d){var i=.92*this.size;const o=this.rtl?Math.min(d.offsetX,45):Math.max(d.offsetX,1);var t=Math.round(100/i*o);return Math.min(t,100)},selected(d){this.$emit("star-selected",{id:this.starId,position:this.getPosition(d)})},getRandomId(){return Math.random().toString(36).substring(7)},calculatePoints(){this.starPoints=this.starPoints.map((d,i)=>{const o=i%2===0?this.border*1.5:0;return this.size/this.maxSize*d+o})},getColor(d){return new b.a(d).parseAlphaColor().color},getOpacity(d){return new b.a(d).parseAlphaColor().opacity}}};s("d1b1"),O.render=B,O.__scopeId="data-v-11edf2d6";var x=O,y={name:"VueStarRating",components:{Star:x},props:{increment:{type:Number,default:1},rating:{type:Number,default:0},roundStartRating:{type:Boolean,default:!0},activeColor:{type:[String,Array],default:"#ffd055"},inactiveColor:{type:String,default:"#d8d8d8"},maxRating:{type:Number,default:5},starPoints:{type:Array,default(){return[]}},starSize:{type:Number,default:50},showRating:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},textClass:{type:String,default:""},inline:{type:Boolean,default:!1},borderColor:{type:String,default:"#999"},activeBorderColor:{type:[String,Array],default:null},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},padding:{type:Number,default:0},rtl:{type:Boolean,default:!1},fixedPoints:{type:Number,default:null},glow:{type:Number,default:0},glowColor:{type:String,default:"#fff"},clearable:{type:Boolean,default:!1},activeOnClick:{type:Boolean,default:!1},animate:{type:Boolean,default:!1}},emits:["update:rating","hover:rating"],data(){return{step:0,fillLevel:[],currentRating:0,selectedRating:0,ratingSelected:!1}},computed:{formattedRating(){return this.fixedPoints===null?this.currentRating:this.currentRating.toFixed(this.fixedPoints)},shouldRound(){return this.ratingSelected||this.roundStartRating},margin(){return this.padding+this.borderWidth},activeColors(){return Array.isArray(this.activeColor)?this.padColors(this.activeColor,this.maxRating,this.activeColor.slice(-1)[0]):new Array(this.maxRating).fill(this.activeColor)},currentActiveColor(){return this.activeOnClick?this.selectedRating>0?this.activeColors[Math.ceil(this.selectedRating)-1]:this.inactiveColor:this.currentRating>0?this.activeColors[Math.ceil(this.currentRating)-1]:this.inactiveColor},activeBorderColors(){if(Array.isArray(this.activeBorderColor))return this.padColors(this.activeBorderColor,this.maxRating,this.activeBorderColor.slice(-1)[0]);let d=this.activeBorderColor?this.activeBorderColor:this.borderColor;return new Array(this.maxRating).fill(d)},currentActiveBorderColor(){return this.activeOnClick?this.selectedRating>0?this.activeBorderColors[Math.ceil(this.selectedRating)-1]:this.borderColor:this.currentRating>0?this.activeBorderColors[Math.ceil(this.currentRating)-1]:this.borderColor}},watch:{rating(d){this.currentRating=d,this.selectedRating=d,this.createStars(this.shouldRound)}},created(){this.step=this.increment*100,this.currentRating=this.rating,this.selectedRating=this.currentRating,this.createStars(this.roundStartRating)},methods:{setRating(d,i){if(!this.readOnly){const o=this.rtl?(100-d.position)/100:d.position/100;this.currentRating=(d.id+o-1).toFixed(2),this.currentRating=this.currentRating>this.maxRating?this.maxRating:this.currentRating,i?(this.createStars(!0,!0),this.clearable&&this.currentRating===this.selectedRating?this.selectedRating=0:this.selectedRating=this.currentRating,this.$emit("update:rating",this.selectedRating),this.ratingSelected=!0):(this.createStars(!0,!this.activeOnClick),this.$emit("hover:rating",this.currentRating))}},resetRating(){this.readOnly||(this.currentRating=this.selectedRating,this.createStars(this.shouldRound))},createStars(d=!0,i=!0){d&&this.round();for(var o=0;o1?100:(this.currentRating-o)*100),i&&(this.fillLevel[o]=Math.round(t))}},round(){var d=1/this.increment;this.currentRating=Math.min(this.maxRating,Math.ceil(this.currentRating*d)/d)},padColors(d,i,o){return Object.assign(new Array(i).fill(o),d)}}};s("9ff5"),y.render=C,y.__scopeId="data-v-f675a548";var w=y,z=w;c.default=z}})})(G);const ot=J(G.exports);const L=T=>(et("data-v-1bd672ba"),T=T(),rt(),T),it={class:"card"},at={class:"card-header bg-primary"},st={class:"h4 m-2"},nt={class:"card-body bg-light"},lt={class:"row"},dt={class:"col-md-4 d-flex"},ct={class:"card w-50 shadow-sm"},ut=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8A55\u50F9 ",-1)),pt={class:"card-body"},_t={class:"card w-50 ms-4 shadow-sm"},ht=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8AB2\u7A0B\u5E73\u5747\u5206\u6578 ",-1)),gt={class:"card-body"},ft={class:"col-md-8"},vt={class:"list-unstyled"},bt={class:"progress w-100 me-3 rounded-pill"},mt={class:"mb-0 text-end",style:{width:"60px"}},yt=L(()=>f("h5",{class:"text-muted mb-0 mt-5"}," \u8AB2\u7A0B\u7D30\u7BC0\u8868\u73FE ",-1)),Ct={class:"list-unstyled mt-3"},St={class:"me-4 mb-0 w-25"},Rt={class:"progress w-100 overflow-visible",style:{height:"24px"}},xt={class:"position-absolute text-dark progress-bar-text"},wt={key:0,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Ot={key:1,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Bt={__name:"CoursesSurveys",props:{data:{type:Object,default(){return{}}}},setup(T){const _=T,c={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},{id:s,name:e,review_count:l,rating_distribution:p,average_rating:r,questionnaires:h}=Y(_.data),v=q(()=>p.value.reverse()),C=Z(["#DADEDD","#B5BEBB","#798B86","#3D5950"]);return(R,S)=>{const B=Q("RouterLink");return M(),j("div",it,[f("div",at,[W(B,{class:"text-white text-decoration-none",to:{name:"SurveysDetail",params:{id:P(s)}}},{default:$(()=>[f("h2",st,N(P(e)),1)]),_:1},8,["to"])]),f("div",nt,[f("div",lt,[f("div",dt,[f("div",ct,[ut,f("div",pt,[f("h2",null,N(P(l)?`${P(l)} \u5247`:"\u7121"),1)])]),f("div",_t,[ht,f("div",gt,[f("h2",null,N(P(r)||"\u7121"),1)])])]),f("div",ft,[f("ul",vt,[(M(!0),j(D,null,F(P(v),(m,b)=>(M(),j("li",{key:`progress-bar${b}`,class:"d-flex align-items-center mb-1"},[f("div",bt,[f("div",{class:"progress-bar bg-primary",role:"progressbar",style:U(`width: ${m.percent}%`)},null,4)]),W(P(ot),{rating:m.rating,"star-size":c.starSize,"read-only":c.readOnly,"show-rating":c.showRating,"active-color":c.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),f("p",mt,N(Math.floor(m.percent))+"% ",1)]))),128))])])]),P(h).length?(M(),j(D,{key:0},[yt,f("ul",Ct,[(M(!0),j(D,null,F(P(h),(m,b)=>{var O;return M(),j("li",{key:`questionnaires${b}`,class:"mb-4 d-flex align-items-center"},[f("p",St,N(m.question),1),f("div",Rt,[(M(!0),j(D,null,F(m.rating_distribution,(x,y)=>(M(),j(D,null,[Number(x.percent)?(M(),j("div",{key:P(p)+y,class:"progress-bar position-relative overflow-visible",style:U(`width: ${x.percent}%; background-color: ${P(C)[y]};`)},[tt(N(Math.floor(x.percent))+"%("+N(x.count)+") ",1),f("span",xt,N(x.rating)+" \u5206",1)],4)):H("",!0)],64))),256))]),(O=m.rating_distribution[b])!=null&&O.avg_rating?(M(),j("p",wt,N(m.rating_distribution[b].avg_rating)+" \u5206 ",1)):(M(),j("p",Ot," \u7121 "))])}),128))])],64)):H("",!0)])])}}},It=X(Bt,[["__scopeId","data-v-1bd672ba"]]);export{It as C,ot as V}; diff --git a/assets/Editor.52546d8d.js b/assets/Editor.52546d8d.js new file mode 100644 index 0000000..79d7731 --- /dev/null +++ b/assets/Editor.52546d8d.js @@ -0,0 +1,54 @@ +import{N as Te,U as nr,V as rr,o as ir,W as or,r as $t,s as Mn,X as ar,Y as lr,a as ur,e as sr,i as fr,x as cr,d as Hn}from"./index.4c40fcfd.js";var Vn={exports:{}};/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */(function(R,B){(function(d,s){R.exports=s()})(typeof self<"u"?self:Te,function(){return function(y){var d={};function s(E){if(d[E])return d[E].exports;var m=d[E]={i:E,l:!1,exports:{}};return y[E].call(m.exports,m,m.exports,s),m.l=!0,m.exports}return s.m=y,s.c=d,s.d=function(E,m,_){s.o(E,m)||Object.defineProperty(E,m,{configurable:!1,enumerable:!0,get:_})},s.n=function(E){var m=E&&E.__esModule?function(){return E.default}:function(){return E};return s.d(m,"a",m),m},s.o=function(E,m){return Object.prototype.hasOwnProperty.call(E,m)},s.p="",s(s.s=109)}([function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(17),m=s(18),_=s(19),p=s(45),g=s(46),h=s(47),o=s(48),e=s(49),t=s(12),f=s(32),a=s(33),u=s(31),r=s(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:E.default,Format:m.default,Leaf:_.default,Embed:o.default,Scroll:p.default,Block:h.default,Inline:g.default,Text:e.default,Attributor:{Attribute:t.default,Class:f.default,Style:a.default,Store:u.default}};d.default=i},function(y,d,s){var E=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])};return function(r,i){u(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=function(u){E(r,u);function r(i){var c=this;return i="[Parchment] "+i,c=u.call(this,i)||this,c.message=i,c.name=c.constructor.name,c}return r}(Error);d.ParchmentError=m;var _={},p={},g={},h={};d.DATA_KEY="__blot";var o;(function(u){u[u.TYPE=3]="TYPE",u[u.LEVEL=12]="LEVEL",u[u.ATTRIBUTE=13]="ATTRIBUTE",u[u.BLOT=14]="BLOT",u[u.INLINE=7]="INLINE",u[u.BLOCK=11]="BLOCK",u[u.BLOCK_BLOT=10]="BLOCK_BLOT",u[u.INLINE_BLOT=6]="INLINE_BLOT",u[u.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",u[u.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",u[u.ANY=15]="ANY"})(o=d.Scope||(d.Scope={}));function e(u,r){var i=f(u);if(i==null)throw new m("Unable to create "+u+" blot");var c=i,n=u instanceof Node||u.nodeType===Node.TEXT_NODE?u:c.create(r);return new c(n,r)}d.create=e;function t(u,r){return r===void 0&&(r=!1),u==null?null:u[d.DATA_KEY]!=null?u[d.DATA_KEY].blot:r?t(u.parentNode,r):null}d.find=t;function f(u,r){r===void 0&&(r=o.ANY);var i;if(typeof u=="string")i=h[u]||_[u];else if(u instanceof Text||u.nodeType===Node.TEXT_NODE)i=h.text;else if(typeof u=="number")u&o.LEVEL&o.BLOCK?i=h.block:u&o.LEVEL&o.INLINE&&(i=h.inline);else if(u instanceof HTMLElement){var c=(u.getAttribute("class")||"").split(/\s+/);for(var n in c)if(i=p[c[n]],i)break;i=i||g[u.tagName]}return i==null?null:r&o.LEVEL&i.scope&&r&o.TYPE&i.scope?i:null}d.query=f;function a(){for(var u=[],r=0;r1)return u.map(function(n){return a(n)});var i=u[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new m("Invalid definition");if(i.blotName==="abstract")throw new m("Cannot register abstract class");if(h[i.blotName||i.attrName]=i,typeof i.keyName=="string")_[i.keyName]=i;else if(i.className!=null&&(p[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var c=Array.isArray(i.tagName)?i.tagName:[i.tagName];c.forEach(function(n){(g[n]==null||i.className==null)&&(g[n]=i)})}return i}d.register=a},function(y,d,s){var E=s(51),m=s(11),_=s(3),p=s(20),g=String.fromCharCode(0),h=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};h.prototype.insert=function(o,e){var t={};return o.length===0?this:(t.insert=o,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},h.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},h.prototype.retain=function(o,e){if(o<=0)return this;var t={retain:o};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},h.prototype.push=function(o){var e=this.ops.length,t=this.ops[e-1];if(o=_(!0,{},o),typeof t=="object"){if(typeof o.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+o.delete},this;if(typeof t.delete=="number"&&o.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(o),this;if(m(o.attributes,t.attributes)){if(typeof o.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+o.insert},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+o.retain},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this}}return e===this.ops.length?this.ops.push(o):this.ops.splice(e,0,o),this},h.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},h.prototype.filter=function(o){return this.ops.filter(o)},h.prototype.forEach=function(o){this.ops.forEach(o)},h.prototype.map=function(o){return this.ops.map(o)},h.prototype.partition=function(o){var e=[],t=[];return this.forEach(function(f){var a=o(f)?e:t;a.push(f)}),[e,t]},h.prototype.reduce=function(o,e){return this.ops.reduce(o,e)},h.prototype.changeLength=function(){return this.reduce(function(o,e){return e.insert?o+p.length(e):e.delete?o-e.delete:o},0)},h.prototype.length=function(){return this.reduce(function(o,e){return o+p.length(e)},0)},h.prototype.slice=function(o,e){o=o||0,typeof e!="number"&&(e=1/0);for(var t=[],f=p.iterator(this.ops),a=0;a0&&t.next(a.retain-u)}for(var r=new h(f);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var i=Math.min(e.peekLength(),t.peekLength()),c=e.next(i),n=t.next(i);if(typeof n.retain=="number"){var v={};typeof c.retain=="number"?v.retain=i:v.insert=c.insert;var O=p.attributes.compose(c.attributes,n.attributes,typeof c.retain=="number");if(O&&(v.attributes=O),r.push(v),!t.hasNext()&&m(r.ops[r.ops.length-1],v)){var A=new h(e.rest());return r.concat(A).chop()}}else typeof n.delete=="number"&&typeof c.retain=="number"&&r.push(n)}return r.chop()},h.prototype.concat=function(o){var e=new h(this.ops.slice());return o.ops.length>0&&(e.push(o.ops[0]),e.ops=e.ops.concat(o.ops.slice(1))),e},h.prototype.diff=function(o,e){if(this.ops===o.ops)return new h;var t=[this,o].map(function(i){return i.map(function(c){if(c.insert!=null)return typeof c.insert=="string"?c.insert:g;var n=i===o?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),f=new h,a=E(t[0],t[1],e),u=p.iterator(this.ops),r=p.iterator(o.ops);return a.forEach(function(i){for(var c=i[1].length;c>0;){var n=0;switch(i[0]){case E.INSERT:n=Math.min(r.peekLength(),c),f.push(r.next(n));break;case E.DELETE:n=Math.min(c,u.peekLength()),u.next(n),f.delete(n);break;case E.EQUAL:n=Math.min(u.peekLength(),r.peekLength(),c);var v=u.next(n),O=r.next(n);m(v.insert,O.insert)?f.retain(n,p.attributes.diff(v.attributes,O.attributes)):f.push(O).delete(n);break}c-=n}}),f.chop()},h.prototype.eachLine=function(o,e){e=e||` +`;for(var t=p.iterator(this.ops),f=new h,a=0;t.hasNext();){if(t.peekType()!=="insert")return;var u=t.peek(),r=p.length(u)-t.peekLength(),i=typeof u.insert=="string"?u.insert.indexOf(e,r)-r:-1;if(i<0)f.push(t.next());else if(i>0)f.push(t.next(i));else{if(o(f,t.next(1).attributes||{},a)===!1)return;a+=1,f=new h}}f.length()>0&&o(f,{},a)},h.prototype.transform=function(o,e){if(e=!!e,typeof o=="number")return this.transformPosition(o,e);for(var t=p.iterator(this.ops),f=p.iterator(o.ops),a=new h;t.hasNext()||f.hasNext();)if(t.peekType()==="insert"&&(e||f.peekType()!=="insert"))a.retain(p.length(t.next()));else if(f.peekType()==="insert")a.push(f.next());else{var u=Math.min(t.peekLength(),f.peekLength()),r=t.next(u),i=f.next(u);if(r.delete)continue;i.delete?a.push(i):a.retain(u,p.attributes.transform(r.attributes,i.attributes,e))}return a.chop()},h.prototype.transformPosition=function(o,e){e=!!e;for(var t=p.iterator(this.ops),f=0;t.hasNext()&&f<=o;){var a=t.peekLength(),u=t.peekType();if(t.next(),u==="delete"){o-=Math.min(a,o-f);continue}else u==="insert"&&(f"u"||s.call(t,u)},h=function(t,f){m&&f.name==="__proto__"?m(t,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):t[f.name]=f.newValue},o=function(t,f){if(f==="__proto__")if(s.call(t,f)){if(_)return _(t,f).value}else return;return t[f]};y.exports=function e(){var t,f,a,u,r,i,c=arguments[0],n=1,v=arguments.length,O=!1;for(typeof c=="boolean"&&(O=c,c=arguments[1]||{},n=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});n0&&(L1&&arguments[1]!==void 0?arguments[1]:!1;if(D&&(L===0||L>=this.length()-A)){var z=this.clone();return L===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var $=m(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"split",this).call(this,L,D);return this.cache={},$}}}]),w}(e.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[u.default,e.default.Embed,i.default];function T(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(w=(0,p.default)(w,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?w:T(b.parent,w)}d.bubbleFormats=T,d.BlockEmbed=N,d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.overload=d.expandConfig=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var F=k.attrName||k.blotName;typeof F=="string"?this.register("formats/"+F,k,I):Object.keys(k).forEach(function(q){M.register(q,k[q],I)})}else this.imports[k]!=null&&!K&&x.warn("Overwriting "+k+" with",I),this.imports[k]=I,(k.startsWith("blots/")||k.startsWith("formats/"))&&I.blotName!=="abstract"?r.default.register(I):k.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function H(j){var k=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w(this,H),this.options=D(j,I),this.container=this.options.container,this.container==null)return x.error("Invalid Quill container",j);this.options.debug&&H.debug(this.options.debug);var M=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new c.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(t.default.events.EDITOR_CHANGE,function(F){F===t.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(F,q){var U=k.selection.lastRange,G=U&&U.length===0?U.index:void 0;z.call(k,function(){return k.editor.update(null,q,G)},F)});var K=this.clipboard.convert(`
`+M+"


");this.setContents(K),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _(H,[{key:"addContainer",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var M=k;k=document.createElement("div"),k.classList.add(M)}return this.container.insertBefore(k,I),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.deleteText(k,I)},M,k,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.default.sources.API;return z.call(this,function(){var F=M.getSelection(!0),q=new g.default;if(F==null)return q;if(r.default.query(k,r.default.Scope.BLOCK))q=M.editor.formatLine(F.index,F.length,b({},k,I));else{if(F.length===0)return M.selection.format(k,I),q;q=M.editor.formatText(F.index,F.length,b({},k,I))}return M.setSelection(F,t.default.sources.SILENT),q},K)}},{key:"formatLine",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatLine(k,I,U)},F,k,0)}},{key:"formatText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatText(k,I,U)},F,k,0)}},{key:"getBounds",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=void 0;typeof k=="number"?M=this.selection.getBounds(k,I):M=this.selection.getBounds(k.index,k.length);var K=this.container.getBoundingClientRect();return{bottom:M.bottom-K.top,height:M.height,left:M.left-K.left,right:M.right-K.left,top:M.top-K.top,width:M.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getContents(k,I)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,I):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,I)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getText(k,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,I,M){var K=this,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return z.call(this,function(){return K.editor.insertEmbed(k,I,M)},F,k)}},{key:"insertText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,0,M,K,F),V=m(G,4);return k=V[0],U=V[2],F=V[3],z.call(this,function(){return q.editor.insertText(k,I,U)},F,k,I.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,I,M){this.clipboard.dangerouslyPasteHTML(k,I,M)}},{key:"removeFormat",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.removeFormat(k,I)},M,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){k=new g.default(k);var K=I.getLength(),F=I.editor.deleteText(0,K),q=I.editor.applyDelta(k),U=q.ops[q.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` +`&&(I.editor.deleteText(I.getLength()-1,1),q.delete(1));var G=F.compose(q);return G},M)}},{key:"setSelection",value:function(k,I,M){if(k==null)this.selection.setRange(null,I||H.sources.API);else{var K=$(k,I,M),F=m(K,4);k=F[0],I=F[1],M=F[3],this.selection.setRange(new i.Range(k,I),M),M!==t.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API,M=new g.default().insert(k);return this.setContents(M,I)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.default.sources.USER,I=this.scroll.update(k);return this.selection.update(k),I}},{key:"updateContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){return k=new g.default(k),I.editor.applyDelta(k,M)},M,!0)}}]),H}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=t.default.events,L.sources=t.default.sources,L.version="1.3.7",L.imports={delta:g.default,parchment:r.default,"core/module":a.default,"core/theme":P.default};function D(H,j){if(j=(0,v.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},j),!j.theme||j.theme===L.DEFAULTS.theme)j.theme=P.default;else if(j.theme=L.import("themes/"+j.theme),j.theme==null)throw new Error("Invalid theme "+j.theme+". Did you register it?");var k=(0,v.default)(!0,{},j.theme.DEFAULTS);[k,j].forEach(function(K){K.modules=K.modules||{},Object.keys(K.modules).forEach(function(F){K.modules[F]===!0&&(K.modules[F]={})})});var I=Object.keys(k.modules).concat(Object.keys(j.modules)),M=I.reduce(function(K,F){var q=L.import("modules/"+F);return q==null?x.error("Cannot load "+F+" module. Are you sure you registered it?"):K[F]=q.DEFAULTS||{},K},{});return j.modules!=null&&j.modules.toolbar&&j.modules.toolbar.constructor!==Object&&(j.modules.toolbar={container:j.modules.toolbar}),j=(0,v.default)(!0,{},L.DEFAULTS,{modules:M},k,j),["bounds","container","scrollingContainer"].forEach(function(K){typeof j[K]=="string"&&(j[K]=document.querySelector(j[K]))}),j.modules=Object.keys(j.modules).reduce(function(K,F){return j.modules[F]&&(K[F]=j.modules[F]),K},{}),j}function z(H,j,k,I){if(this.options.strict&&!this.isEnabled()&&j===t.default.sources.USER)return new g.default;var M=k==null?null:this.getSelection(),K=this.editor.delta,F=H();if(M!=null&&(k===!0&&(k=M.index),I==null?M=J(M,F,j):I!==0&&(M=J(M,k,I,j)),this.setSelection(M,t.default.sources.SILENT)),F.length()>0){var q,U=[t.default.events.TEXT_CHANGE,F,K,j];if((q=this.emitter).emit.apply(q,[t.default.events.EDITOR_CHANGE].concat(U)),j!==t.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,U)}}return F}function $(H,j,k,I,M){var K={};return typeof H.index=="number"&&typeof H.length=="number"?typeof j!="number"?(M=I,I=k,k=j,j=H.length,H=H.index):(j=H.length,H=H.index):typeof j!="number"&&(M=I,I=k,k=j,j=0),(typeof k>"u"?"undefined":E(k))==="object"?(K=k,M=I):typeof k=="string"&&(I!=null?K[k]=I:M=k),M=M||t.default.sources.API,[H,j,K,M]}function J(H,j,k,I){if(H==null)return null;var M=void 0,K=void 0;if(j instanceof g.default){var F=[H.index,H.index+H.length].map(function(V){return j.transformPosition(V,I!==t.default.sources.USER)}),q=m(F,2);M=q[0],K=q[1]}else{var U=[H.index,H.index+H.length].map(function(V){return V=0?V+k:Math.max(j,V+k)}),G=m(U,2);M=G[0],K=G[1]}return new i.Range(M,K-M)}d.expandConfig=D,d.overload=$,d.default=L},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(c,n){var v=r.order.indexOf(c),O=r.order.indexOf(n);return v>=0||O>=0?v-O:c===n?0:c1?O-1:0),N=1;N1&&arguments[1]!==void 0?arguments[1]:{};E(this,_),this.quill=p,this.options=g};m.DEFAULTS={},d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=["error","warn","log","info"],m="warn";function _(g){if(E.indexOf(g)<=E.indexOf(m)){for(var h,o=arguments.length,e=Array(o>1?o-1:0),t=1;t0&&typeof e[0]!="number")}function o(e,t,f){var a,u;if(g(e)||g(t)||e.prototype!==t.prototype)return!1;if(_(e))return _(t)?(e=E.call(e),t=E.call(t),p(e,t,f)):!1;if(h(e)){if(!h(t)||e.length!==t.length)return!1;for(a=0;a=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(u=r[a],!p(e[u],t[u],f))return!1;return typeof e==typeof t}},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p,g,h){h===void 0&&(h={}),this.attrName=p,this.keyName=g;var o=E.Scope.TYPE&E.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&E.Scope.LEVEL|o:this.scope=E.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return _.keys=function(p){return[].map.call(p.attributes,function(g){return g.name})},_.prototype.add=function(p,g){return this.canAdd(p,g)?(p.setAttribute(this.keyName,g),!0):!1},_.prototype.canAdd=function(p,g){var h=E.query(p,E.Scope.BLOT&(this.scope|E.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof g=="string"?this.whitelist.indexOf(g.replace(/["']/g,""))>-1:this.whitelist.indexOf(g)>-1},_.prototype.remove=function(p){p.removeAttribute(this.keyName)},_.prototype.value=function(p){var g=p.getAttribute(this.keyName);return this.canAdd(p,g)&&g?g:""},_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Code=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b=b+w)){var z=this.newlineIndex(b,!0)+1,$=D-z+1,J=this.isolate(z,$),H=J.next;J.format(x,L),H instanceof P&&H.formatAt(0,b-z+w-$,x,L)}}}},{key:"insertAt",value:function(b,w,x){if(x==null){var L=this.descendant(r.default,b),D=E(L,2),z=D[0],$=D[1];z.insertAt($,w)}}},{key:"length",value:function(){var b=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` +`)?b:b+1}},{key:"newlineIndex",value:function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(w)return this.domNode.textContent.slice(0,b).lastIndexOf(` +`);var x=this.domNode.textContent.slice(b).indexOf(` +`);return x>-1?b+x:-1}},{key:"optimize",value:function(b){this.domNode.textContent.endsWith(` +`)||this.appendChild(o.default.create("text",` +`)),_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,b);var w=this.next;w!=null&&w.prev===this&&w.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===w.statics.formats(w.domNode)&&(w.optimize(b),w.moveChildren(this),w.remove())}},{key:"replace",value:function(b){_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,b),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(w){var x=o.default.find(w);x==null?w.parentNode.removeChild(w):x instanceof o.default.Embed?x.remove():x.unwrap()})}}],[{key:"create",value:function(b){var w=_(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,b);return w.setAttribute("spellcheck",!1),w}},{key:"formats",value:function(){return!0}}]),P}(t.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",d.Code=O,d.default=A},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I=K&&!V.endsWith(` +`)&&(M=!0),I.scroll.insertAt(F,V);var X=I.scroll.line(F),ne=m(X,2),ie=ne[0],ae=ne[1],fe=(0,b.default)({},(0,i.bubbleFormats)(ie));if(ie instanceof c.default){var he=ie.descendant(t.default.Leaf,ae),me=m(he,1),ge=me[0];fe=(0,b.default)(fe,(0,i.bubbleFormats)(ge))}G=o.default.attributes.diff(fe,G)||{}}else if(E(q.insert)==="object"){var W=Object.keys(q.insert)[0];if(W==null)return F;I.scroll.insertAt(F,W,q.insert[W])}K+=U}return Object.keys(G).forEach(function(Y){I.scroll.formatAt(F,U,Y,G[Y])}),F+U},0),k.reduce(function(F,q){return typeof q.delete=="number"?(I.scroll.deleteAt(F,q.delete),F):F+(q.retain||q.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,I){return this.scroll.deleteAt(k,I),this.update(new g.default().retain(k).delete(I))}},{key:"formatLine",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(K).forEach(function(F){if(!(M.scroll.whitelist!=null&&!M.scroll.whitelist[F])){var q=M.scroll.lines(k,Math.max(I,1)),U=I;q.forEach(function(G){var V=G.length();if(!(G instanceof a.default))G.format(F,K[F]);else{var X=k-G.offset(M.scroll),ne=G.newlineIndex(X+U)-X+1;G.formatAt(X,ne,F,K[F])}U-=V})}}),this.scroll.optimize(),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"formatText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I,F,K[F])}),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"getContents",value:function(k,I){return this.delta.slice(k,k+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,I){return k.concat(I.delta())},new g.default)}},{key:"getFormat",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=[],K=[];I===0?this.scroll.path(k).forEach(function(q){var U=m(q,1),G=U[0];G instanceof c.default?M.push(G):G instanceof t.default.Leaf&&K.push(G)}):(M=this.scroll.lines(k,I),K=this.scroll.descendants(t.default.Leaf,k,I));var F=[M,K].map(function(q){if(q.length===0)return{};for(var U=(0,i.bubbleFormats)(q.shift());Object.keys(U).length>0;){var G=q.shift();if(G==null)return U;U=$((0,i.bubbleFormats)(G),U)}return U});return b.default.apply(b.default,F)}},{key:"getText",value:function(k,I){return this.getContents(k,I).filter(function(M){return typeof M.insert=="string"}).map(function(M){return M.insert}).join("")}},{key:"insertEmbed",value:function(k,I,M){return this.scroll.insertAt(k,I,M),this.update(new g.default().retain(k).insert(x({},I,M)))}},{key:"insertText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,` +`).replace(/\r/g,` +`),this.scroll.insertAt(k,I),Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I.length,F,K[F])}),this.update(new g.default().retain(k).insert(I,(0,A.default)(K)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==c.default.blotName||k.children.length>1?!1:k.children.head instanceof v.default}},{key:"removeFormat",value:function(k,I){var M=this.getText(k,I),K=this.scroll.line(k+I),F=m(K,2),q=F[0],U=F[1],G=0,V=new g.default;q!=null&&(q instanceof a.default?G=q.newlineIndex(U)-U+1:G=q.length()-U,V=q.delta().slice(U,U+G-1).insert(` +`));var X=this.getContents(k,I+G),ne=X.diff(new g.default().insert(M).concat(V)),ie=new g.default().retain(k).concat(ne);return this.applyDelta(ie)}},{key:"update",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,K=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(D)&&t.default.find(I[0].target)){var F=t.default.find(I[0].target),q=(0,i.bubbleFormats)(F),U=F.offset(this.scroll),G=I[0].oldValue.replace(r.default.CONTENTS,""),V=new g.default().insert(G),X=new g.default().insert(F.value()),ne=new g.default().retain(U).concat(V.diff(X,M));k=ne.reduce(function(ie,ae){return ae.insert?ie.insert(ae.insert,q):ie.push(ae)},new g.default),this.delta=K.compose(k)}else this.delta=this.getDelta(),(!k||!(0,P.default)(K.compose(k),this.delta))&&(k=K.diff(this.delta,M));return k}}]),H}();function $(H,j){return Object.keys(j).reduce(function(k,I){return H[I]==null||(j[I]===H[I]?k[I]=j[I]:Array.isArray(j[I])?j[I].indexOf(H[I])<0&&(k[I]=j[I].concat([H[I]])):k[I]=[j[I],H[I]]),k},{})}function J(H){return H.reduce(function(j,k){if(k.insert===1){var I=(0,A.default)(k.attributes);return delete I.image,j.insert({image:k.attributes.image},I)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var M=k.insert.replace(/\r\n/g,` +`).replace(/\r/g,` +`);return j.insert(M,k.attributes)}return j.push(k)},new g.default)}d.default=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Range=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;c(this,N),this.index=P,this.length=T},O=function(){function N(P,T){var b=this;c(this,N),this.emitter=T,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=p.default.create("cursor",this),this.lastRange=this.savedRange=new v(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,f.default.sources.USER),1)}),this.emitter.on(f.default.events.EDITOR_CHANGE,function(w,x){w===f.default.events.TEXT_CHANGE&&x.length()>0&&b.update(f.default.sources.SILENT)}),this.emitter.on(f.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!b.hasFocus()){var w=b.getNativeRange();w!=null&&w.start.node!==b.cursor.textNode&&b.emitter.once(f.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(w.start.node,w.start.offset,w.end.node,w.end.offset)}catch{}})}}),this.emitter.on(f.default.events.SCROLL_OPTIMIZE,function(w,x){if(x.range){var L=x.range,D=L.startNode,z=L.startOffset,$=L.endNode,J=L.endOffset;b.setNativeRange(D,z,$,J)}}),this.update(f.default.sources.SILENT)}return m(N,[{key:"handleComposition",value:function(){var T=this;this.root.addEventListener("compositionstart",function(){T.composing=!0}),this.root.addEventListener("compositionend",function(){if(T.composing=!1,T.cursor.parent){var b=T.cursor.restore();if(!b)return;setTimeout(function(){T.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var T=this;this.emitter.listenDOM("mousedown",document.body,function(){T.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){T.mouseDown=!1,T.update(f.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(T,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[T])){this.scroll.update();var w=this.getNativeRange();if(!(w==null||!w.native.collapsed||p.default.query(T,p.default.Scope.BLOCK))){if(w.start.node!==this.cursor.textNode){var x=p.default.find(w.start.node,!1);if(x==null)return;if(x instanceof p.default.Leaf){var L=x.split(w.start.offset);x.parent.insertBefore(this.cursor,L)}else x.insertBefore(this.cursor,w.start.node);this.cursor.attach()}this.cursor.format(T,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=this.scroll.length();T=Math.min(T,w-1),b=Math.min(T+b,w-1)-T;var x=void 0,L=this.scroll.leaf(T),D=E(L,2),z=D[0],$=D[1];if(z==null)return null;var J=z.position($,!0),H=E(J,2);x=H[0],$=H[1];var j=document.createRange();if(b>0){j.setStart(x,$);var k=this.scroll.leaf(T+b),I=E(k,2);if(z=I[0],$=I[1],z==null)return null;var M=z.position($,!0),K=E(M,2);return x=K[0],$=K[1],j.setEnd(x,$),j.getBoundingClientRect()}else{var F="left",q=void 0;return x instanceof Text?($0&&(F="right")),{bottom:q.top+q.height,height:q.height,left:q[F],right:q[F],top:q.top,width:0}}}},{key:"getNativeRange",value:function(){var T=document.getSelection();if(T==null||T.rangeCount<=0)return null;var b=T.getRangeAt(0);if(b==null)return null;var w=this.normalizeNative(b);return n.info("getNativeRange",w),w}},{key:"getRange",value:function(){var T=this.getNativeRange();if(T==null)return[null,null];var b=this.normalizedToRange(T);return[b,T]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(T){var b=this,w=[[T.start.node,T.start.offset]];T.native.collapsed||w.push([T.end.node,T.end.offset]);var x=w.map(function(z){var $=E(z,2),J=$[0],H=$[1],j=p.default.find(J,!0),k=j.offset(b.scroll);return H===0?k:j instanceof p.default.Container?k+j.length():k+j.index(J,H)}),L=Math.min(Math.max.apply(Math,i(x)),this.scroll.length()-1),D=Math.min.apply(Math,[L].concat(i(x)));return new v(D,L-D)}},{key:"normalizeNative",value:function(T){if(!A(this.root,T.startContainer)||!T.collapsed&&!A(this.root,T.endContainer))return null;var b={start:{node:T.startContainer,offset:T.startOffset},end:{node:T.endContainer,offset:T.endOffset},native:T};return[b.start,b.end].forEach(function(w){for(var x=w.node,L=w.offset;!(x instanceof Text)&&x.childNodes.length>0;)if(x.childNodes.length>L)x=x.childNodes[L],L=0;else if(x.childNodes.length===L)x=x.lastChild,L=x instanceof Text?x.data.length:x.childNodes.length+1;else break;w.node=x,w.offset=L}),b}},{key:"rangeToNative",value:function(T){var b=this,w=T.collapsed?[T.index]:[T.index,T.index+T.length],x=[],L=this.scroll.length();return w.forEach(function(D,z){D=Math.min(L-1,D);var $=void 0,J=b.scroll.leaf(D),H=E(J,2),j=H[0],k=H[1],I=j.position(k,z!==0),M=E(I,2);$=M[0],k=M[1],x.push($,k)}),x.length<2&&(x=x.concat(x)),x}},{key:"scrollIntoView",value:function(T){var b=this.lastRange;if(b!=null){var w=this.getBounds(b.index,b.length);if(w!=null){var x=this.scroll.length()-1,L=this.scroll.line(Math.min(b.index,x)),D=E(L,1),z=D[0],$=z;if(b.length>0){var J=this.scroll.line(Math.min(b.index+b.length,x)),H=E(J,1);$=H[0]}if(!(z==null||$==null)){var j=T.getBoundingClientRect();w.topj.bottom&&(T.scrollTop+=w.bottom-j.bottom)}}}}},{key:"setNativeRange",value:function(T,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T,x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",T,b,w,x),!(T!=null&&(this.root.parentNode==null||T.parentNode==null||w.parentNode==null))){var D=document.getSelection();if(D!=null)if(T!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||L||T!==z.startContainer||b!==z.startOffset||w!==z.endContainer||x!==z.endOffset){T.tagName=="BR"&&(b=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode),w.tagName=="BR"&&(x=[].indexOf.call(w.parentNode.childNodes,w),w=w.parentNode);var $=document.createRange();$.setStart(T,b),$.setEnd(w,x),D.removeAllRanges(),D.addRange($)}}else D.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof b=="string"&&(w=b,b=!1),n.info("setRange",T),T!=null){var x=this.rangeToNative(T);this.setNativeRange.apply(this,i(x).concat([b]))}else this.setNativeRange(null);this.update(w)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,b=this.lastRange,w=this.getRange(),x=E(w,2),L=x[0],D=x[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,e.default)(b,this.lastRange)){var z;!this.composing&&D!=null&&D.native.collapsed&&D.start.node!==this.cursor.textNode&&this.cursor.restore();var $=[f.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(b),T];if((z=this.emitter).emit.apply(z,[f.default.events.EDITOR_CHANGE].concat($)),T!==f.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,$)}}}}]),N}();function A(N,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),N.contains(P)}d.Range=v,d.default=O},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r0&&(t+=1),[this.parent.domNode,t]},h.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=s(11),m=s(3),_={attributes:{compose:function(g,h,o){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var e=m(!0,{},h);o||(e=Object.keys(e).reduce(function(f,a){return e[a]!=null&&(f[a]=e[a]),f},{}));for(var t in g)g[t]!==void 0&&h[t]===void 0&&(e[t]=g[t]);return Object.keys(e).length>0?e:void 0},diff:function(g,h){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var o=Object.keys(g).concat(Object.keys(h)).reduce(function(e,t){return E(g[t],h[t])||(e[t]=h[t]===void 0?null:h[t]),e},{});return Object.keys(o).length>0?o:void 0},transform:function(g,h,o){if(typeof g!="object")return h;if(typeof h=="object"){if(!o)return h;var e=Object.keys(h).reduce(function(t,f){return g[f]===void 0&&(t[f]=h[f]),t},{});return Object.keys(e).length>0?e:void 0}}},iterator:function(g){return new p(g)},length:function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}};function p(g){this.ops=g,this.index=0,this.offset=0}p.prototype.hasNext=function(){return this.peekLength()<1/0},p.prototype.next=function(g){g||(g=1/0);var h=this.ops[this.index];if(h){var o=this.offset,e=_.length(h);if(g>=e-o?(g=e-o,this.index+=1,this.offset=0):this.offset+=g,typeof h.delete=="number")return{delete:g};var t={};return h.attributes&&(t.attributes=h.attributes),typeof h.retain=="number"?t.retain=g:typeof h.insert=="string"?t.insert=h.insert.substr(o,g):t.insert=h.insert,t}else return{retain:1/0}},p.prototype.peek=function(){return this.ops[this.index]},p.prototype.peekLength=function(){return this.ops[this.index]?_.length(this.ops[this.index])-this.offset:1/0},p.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},p.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var g=this.offset,h=this.index,o=this.next(),e=this.ops.slice(this.index);return this.offset=g,this.index=h,[o].concat(e)}else return[]},y.exports=_},function(y,d){var s=function(){function E(a,u){return u!=null&&a instanceof u}var m;try{m=Map}catch{m=function(){}}var _;try{_=Set}catch{_=function(){}}var p;try{p=Promise}catch{p=function(){}}function g(a,u,r,i,c){typeof u=="object"&&(r=u.depth,i=u.prototype,c=u.includeNonEnumerable,u=u.circular);var n=[],v=[],O=typeof Buffer<"u";typeof u>"u"&&(u=!0),typeof r>"u"&&(r=1/0);function A(N,P){if(N===null)return null;if(P===0)return N;var T,b;if(typeof N!="object")return N;if(E(N,m))T=new m;else if(E(N,_))T=new _;else if(E(N,p))T=new p(function(j,k){N.then(function(I){j(A(I,P-1))},function(I){k(A(I,P-1))})});else if(g.__isArray(N))T=[];else if(g.__isRegExp(N))T=new RegExp(N.source,f(N)),N.lastIndex&&(T.lastIndex=N.lastIndex);else if(g.__isDate(N))T=new Date(N.getTime());else{if(O&&Buffer.isBuffer(N))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(N.length):T=new Buffer(N.length),N.copy(T),T;E(N,Error)?T=Object.create(N):typeof i>"u"?(b=Object.getPrototypeOf(N),T=Object.create(b)):(T=Object.create(i),b=i)}if(u){var w=n.indexOf(N);if(w!=-1)return v[w];n.push(N),v.push(T)}E(N,m)&&N.forEach(function(j,k){var I=A(k,P-1),M=A(j,P-1);T.set(I,M)}),E(N,_)&&N.forEach(function(j){var k=A(j,P-1);T.add(k)});for(var x in N){var L;b&&(L=Object.getOwnPropertyDescriptor(b,x)),!(L&&L.set==null)&&(T[x]=A(N[x],P-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(N),x=0;x0){if($ instanceof e.BlockEmbed||k instanceof e.BlockEmbed){this.optimize();return}if($ instanceof r.default){var I=$.newlineIndex($.length(),!0);if(I>-1&&($=$.split(I+1),$===k)){this.optimize();return}}else if(k instanceof r.default){var M=k.newlineIndex(0);M>-1&&k.split(M+1)}var K=k.children.head instanceof a.default?null:k.children.head;$.moveChildren(k,K),$.remove()}this.optimize()}},{key:"enable",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",x)}},{key:"formatAt",value:function(x,L,D,z){this.whitelist!=null&&!this.whitelist[D]||(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,x,L,D,z),this.optimize())}},{key:"insertAt",value:function(x,L,D){if(!(D!=null&&this.whitelist!=null&&!this.whitelist[L])){if(x>=this.length())if(D==null||g.default.query(L,g.default.Scope.BLOCK)==null){var z=g.default.create(this.statics.defaultChild);this.appendChild(z),D==null&&L.endsWith(` +`)&&(L=L.slice(0,-1)),z.insertAt(0,L,D)}else{var $=g.default.create(L,D);this.appendChild($)}else _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,x,L,D);this.optimize()}}},{key:"insertBefore",value:function(x,L){if(x.statics.scope===g.default.Scope.INLINE_BLOT){var D=g.default.create(this.statics.defaultChild);D.appendChild(x),x=D}_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,x,L)}},{key:"leaf",value:function(x){return this.path(x).pop()||[null,-1]}},{key:"line",value:function(x){return x===this.length()?this.line(x-1):this.descendant(N,x)}},{key:"lines",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,D=function z($,J,H){var j=[],k=H;return $.children.forEachAt(J,H,function(I,M,K){N(I)?j.push(I):I instanceof g.default.Container&&(j=j.concat(z(I,M,k))),k-=K}),j};return D(this,x,L)}},{key:"optimize",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,x,L),x.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,x,L))}},{key:"path",value:function(x){return _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,x).slice(1)}},{key:"update",value:function(x){if(this.batch!==!0){var L=o.default.sources.USER;typeof x=="string"&&(L=x),Array.isArray(x)||(x=this.observer.takeRecords()),x.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,L,x),_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,x.concat([])),x.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,L,x)}}}]),b}(g.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[t.default,e.BlockEmbed,c.default],d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.SHORTKEY=d.default=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},m=function(){function q(U,G){var V=[],X=!0,ne=!1,ie=void 0;try{for(var ae=U[Symbol.iterator](),fe;!(X=(fe=ae.next()).done)&&(V.push(fe.value),!(G&&V.length===G));X=!0);}catch(he){ne=!0,ie=he}finally{try{!X&&ae.return&&ae.return()}finally{if(ne)throw ie}}return V}return function(U,G){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return q(U,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function q(U,G){for(var V=0;V1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=F(V);if(ie==null||ie.key==null)return D.warn("Attempted to add invalid keyboard binding",ie);typeof X=="function"&&(X={handler:X}),typeof ne=="function"&&(ne={handler:ne}),ie=(0,t.default)(ie,X,ne),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var V=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var ne=X.which||X.keyCode,ie=(V.bindings[ne]||[]).filter(function(de){return U.match(X,de)});if(ie.length!==0){var ae=V.quill.getSelection();if(!(ae==null||!V.quill.hasFocus())){var fe=V.quill.getLine(ae.index),he=m(fe,2),me=he[0],ge=he[1],W=V.quill.getLeaf(ae.index),Y=m(W,2),ee=Y[0],te=Y[1],Q=ae.length===0?[ee,te]:V.quill.getLeaf(ae.index+ae.length),se=m(Q,2),oe=se[0],le=se[1],Ne=ee instanceof c.default.Text?ee.value().slice(0,te):"",Oe=oe instanceof c.default.Text?oe.value().slice(le):"",pe={collapsed:ae.length===0,empty:ae.length===0&&me.length()<=1,format:V.quill.getFormat(ae),offset:ge,prefix:Ne,suffix:Oe},Ze=ie.some(function(de){if(de.collapsed!=null&&de.collapsed!==pe.collapsed||de.empty!=null&&de.empty!==pe.empty||de.offset!=null&&de.offset!==pe.offset)return!1;if(Array.isArray(de.format)){if(de.format.every(function(je){return pe.format[je]==null}))return!1}else if(E(de.format)==="object"&&!Object.keys(de.format).every(function(je){return de.format[je]===!0?pe.format[je]!=null:de.format[je]===!1?pe.format[je]==null:(0,o.default)(de.format[je],pe.format[je])}))return!1;return de.prefix!=null&&!de.prefix.test(pe.prefix)||de.suffix!=null&&!de.suffix.test(pe.suffix)?!1:de.handler.call(V,ae,pe)!==!0});Ze&&X.preventDefault()}}}})}}]),U}(P.default);$.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},$.DEFAULTS={bindings:{bold:K("bold"),italic:K("italic"),underline:K("underline"),indent:{key:$.keys.TAB,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",v.default.sources.USER)}},outdent:{key:$.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",v.default.sources.USER)}},"outdent backspace":{key:$.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,G){G.format.indent!=null?this.quill.format("indent","-1",v.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,v.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:$.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,v.default.sources.USER)}},tab:{key:$.keys.TAB,handler:function(U){this.quill.history.cutoff();var G=new a.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(G,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,v.default.sources.SILENT)}},"list empty enter":{key:$.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,G){this.quill.format("list",!1,v.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,v.default.sources.USER)}},"checklist enter":{key:$.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=(0,t.default)({},X.formats(),{list:"checked"}),ae=new a.default().retain(U.index).insert(` +`,ie).retain(X.length()-ne-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:$.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(U,G){var V=this.quill.getLine(U.index),X=m(V,2),ne=X[0],ie=X[1],ae=new a.default().retain(U.index).insert(` +`,G.format).retain(ne.length()-ie-1).retain(1,{header:null});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(U,G){var V=G.prefix.length,X=this.quill.getLine(U.index),ne=m(X,2),ie=ne[0],ae=ne[1];if(ae>V)return!0;var fe=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":fe="unchecked";break;case"[x]":fe="checked";break;case"-":case"*":fe="bullet";break;default:fe="ordered"}this.quill.insertText(U.index," ",v.default.sources.USER),this.quill.history.cutoff();var he=new a.default().retain(U.index-ae).delete(V+1).retain(ie.length()-2-ae).retain(1,{list:fe});this.quill.updateContents(he,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-V,v.default.sources.SILENT)}},"code exit":{key:$.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=new a.default().retain(U.index+X.length()-ne-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,v.default.sources.USER)}},"embed left":J($.keys.LEFT,!1),"embed left shift":J($.keys.LEFT,!0),"embed right":J($.keys.RIGHT,!1),"embed right shift":J($.keys.RIGHT,!0)}};function J(q,U){var G,V=q===$.keys.LEFT?"prefix":"suffix";return G={key:q,shiftKey:U,altKey:null},b(G,V,/^$/),b(G,"handler",function(ne){var ie=ne.index;q===$.keys.RIGHT&&(ie+=ne.length+1);var ae=this.quill.getLeaf(ie),fe=m(ae,1),he=fe[0];return he instanceof c.default.Embed?(q===$.keys.LEFT?U?this.quill.setSelection(ne.index-1,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index-1,v.default.sources.USER):U?this.quill.setSelection(ne.index,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index+ne.length+1,v.default.sources.USER),!1):!0}),G}function H(q,U){if(!(q.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(q.index),V=m(G,1),X=V[0],ne={};if(U.offset===0){var ie=this.quill.getLine(q.index-1),ae=m(ie,1),fe=ae[0];if(fe!=null&&fe.length()>1){var he=X.formats(),me=this.quill.getFormat(q.index-1,1);ne=r.default.attributes.diff(he,me)||{}}}var ge=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(U.prefix)?2:1;this.quill.deleteText(q.index-ge,ge,v.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(q.index-ge,ge,ne,v.default.sources.USER),this.quill.focus()}}function j(q,U){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(U.suffix)?2:1;if(!(q.index>=this.quill.getLength()-G)){var V={},X=0,ne=this.quill.getLine(q.index),ie=m(ne,1),ae=ie[0];if(U.offset>=ae.length()-1){var fe=this.quill.getLine(q.index+1),he=m(fe,1),me=he[0];if(me){var ge=ae.formats(),W=this.quill.getFormat(q.index,1);V=r.default.attributes.diff(ge,W)||{},X=me.length()}}this.quill.deleteText(q.index,G,v.default.sources.USER),Object.keys(V).length>0&&this.quill.formatLine(q.index+X-1,G,V,v.default.sources.USER)}}function k(q){var U=this.quill.getLines(q),G={};if(U.length>1){var V=U[0].formats(),X=U[U.length-1].formats();G=r.default.attributes.diff(X,V)||{}}this.quill.deleteText(q,v.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(q.index,1,G,v.default.sources.USER),this.quill.setSelection(q.index,v.default.sources.SILENT),this.quill.focus()}function I(q,U){var G=this;q.length>0&&this.quill.scroll.deleteAt(q.index,q.length);var V=Object.keys(U.format).reduce(function(X,ne){return c.default.query(ne,c.default.Scope.BLOCK)&&!Array.isArray(U.format[ne])&&(X[ne]=U.format[ne]),X},{});this.quill.insertText(q.index,` +`,V,v.default.sources.USER),this.quill.setSelection(q.index+1,v.default.sources.SILENT),this.quill.focus(),Object.keys(U.format).forEach(function(X){V[X]==null&&(Array.isArray(U.format[X])||X!=="link"&&G.quill.format(X,U.format[X],v.default.sources.USER))})}function M(q){return{key:$.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(G){var V=c.default.query("code-block"),X=G.index,ne=G.length,ie=this.quill.scroll.descendant(V,X),ae=m(ie,2),fe=ae[0],he=ae[1];if(fe!=null){var me=this.quill.getIndex(fe),ge=fe.newlineIndex(he,!0)+1,W=fe.newlineIndex(me+he+ne),Y=fe.domNode.textContent.slice(ge,W).split(` +`);he=0,Y.forEach(function(ee,te){q?(fe.insertAt(ge+he,V.TAB),he+=V.TAB.length,te===0?X+=V.TAB.length:ne+=V.TAB.length):ee.startsWith(V.TAB)&&(fe.deleteAt(ge+he,V.TAB.length),he-=V.TAB.length,te===0?X-=V.TAB.length:ne-=V.TAB.length),he+=ee.length+1}),this.quill.update(v.default.sources.USER),this.quill.setSelection(X,ne,v.default.sources.SILENT)}}}}function K(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(G,V){this.quill.format(q,!V.format[q],v.default.sources.USER)}}}function F(q){if(typeof q=="string"||typeof q=="number")return F({key:q});if((typeof q>"u"?"undefined":E(q))==="object"&&(q=(0,g.default)(q,!1)),typeof q.key=="string")if($.keys[q.key.toUpperCase()]!=null)q.key=$.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[z]=q.shortKey,delete q.shortKey),q}d.default=$,d.SHORTKEY=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function r(i,c){var n=[],v=!0,O=!1,A=void 0;try{for(var N=i[Symbol.iterator](),P;!(v=(P=N.next()).done)&&(n.push(P.value),!(c&&n.length===c));v=!0);}catch(T){O=!0,A=T}finally{try{!v&&N.return&&N.return()}finally{if(O)throw A}}return n}return function(i,c){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function r(i,c,n){i===null&&(i=Function.prototype);var v=Object.getOwnPropertyDescriptor(i,c);if(v===void 0){var O=Object.getPrototypeOf(i);return O===null?void 0:r(O,c,n)}else{if("value"in v)return v.value;var A=v.get;return A===void 0?void 0:A.call(n)}},_=function(){function r(i,c){for(var n=0;n-1}d.default=t,d.sanitize=f},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},m=function(){function u(r,i){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),c))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":E(Event))==="object"){var v=document.createEvent("Event");v.initEvent("change",!0,!0),this.select.dispatchEvent(v)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var c=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(c)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),u}();d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(0),m=D(E),_=s(5),p=D(_),g=s(4),h=D(g),o=s(16),e=D(o),t=s(25),f=D(t),a=s(24),u=D(a),r=s(35),i=D(r),c=s(6),n=D(c),v=s(22),O=D(v),A=s(7),N=D(A),P=s(55),T=D(P),b=s(42),w=D(b),x=s(23),L=D(x);function D(z){return z&&z.__esModule?z:{default:z}}p.default.register({"blots/block":h.default,"blots/block/embed":g.BlockEmbed,"blots/break":e.default,"blots/container":f.default,"blots/cursor":u.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":O.default,"blots/text":N.default,"modules/clipboard":T.default,"modules/history":w.default,"modules/keyboard":L.default}),m.default.register(h.default,e.default,u.default,n.default,O.default,N.default),d.default=p.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p){this.domNode=p,this.domNode[E.DATA_KEY]={blot:this}}return Object.defineProperty(_.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),_.create=function(p){if(this.tagName==null)throw new E.ParchmentError("Blot definition missing tagName");var g;return Array.isArray(this.tagName)?(typeof p=="string"&&(p=p.toUpperCase(),parseInt(p).toString()===p&&(p=parseInt(p))),typeof p=="number"?g=document.createElement(this.tagName[p-1]):this.tagName.indexOf(p)>-1?g=document.createElement(p):g=document.createElement(this.tagName[0])):g=document.createElement(this.tagName),this.className&&g.classList.add(this.className),g},_.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},_.prototype.clone=function(){var p=this.domNode.cloneNode(!1);return E.create(p)},_.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[E.DATA_KEY]},_.prototype.deleteAt=function(p,g){var h=this.isolate(p,g);h.remove()},_.prototype.formatAt=function(p,g,h,o){var e=this.isolate(p,g);if(E.query(h,E.Scope.BLOT)!=null&&o)e.wrap(h,o);else if(E.query(h,E.Scope.ATTRIBUTE)!=null){var t=E.create(this.statics.scope);e.wrap(t),t.format(h,o)}},_.prototype.insertAt=function(p,g,h){var o=h==null?E.create("text",g):E.create(g,h),e=this.split(p);this.parent.insertBefore(o,e)},_.prototype.insertInto=function(p,g){g===void 0&&(g=null),this.parent!=null&&this.parent.children.remove(this);var h=null;p.children.insertBefore(this,g),g!=null&&(h=g.domNode),(this.domNode.parentNode!=p.domNode||this.domNode.nextSibling!=h)&&p.domNode.insertBefore(this.domNode,h),this.parent=p,this.attach()},_.prototype.isolate=function(p,g){var h=this.split(p);return h.split(g),h},_.prototype.length=function(){return 1},_.prototype.offset=function(p){return p===void 0&&(p=this.parent),this.parent==null||this==p?0:this.parent.children.offset(this)+this.parent.offset(p)},_.prototype.optimize=function(p){this.domNode[E.DATA_KEY]!=null&&delete this.domNode[E.DATA_KEY].mutations},_.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},_.prototype.replace=function(p){p.parent!=null&&(p.parent.insertBefore(this,p.next),p.remove())},_.prototype.replaceWith=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return h.replace(this),h},_.prototype.split=function(p,g){return p===0?this:this.next},_.prototype.update=function(p,g){},_.prototype.wrap=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},_.blotName="abstract",_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(12),m=s(32),_=s(33),p=s(1),g=function(){function h(o){this.attributes={},this.domNode=o,this.build()}return h.prototype.attribute=function(o,e){e?o.add(this.domNode,e)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},h.prototype.build=function(){var o=this;this.attributes={};var e=E.default.keys(this.domNode),t=m.default.keys(this.domNode),f=_.default.keys(this.domNode);e.concat(t).concat(f).forEach(function(a){var u=p.query(a,p.Scope.ATTRIBUTE);u instanceof E.default&&(o.attributes[u.attrName]=u)})},h.prototype.copy=function(o){var e=this;Object.keys(this.attributes).forEach(function(t){var f=e.attributes[t].value(e.domNode);o.format(t,f)})},h.prototype.move=function(o){var e=this;this.copy(o),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},h.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(e,t){return e[t]=o.attributes[t].value(o.domNode),e},{})},h}();d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g,h){var o=g.getAttribute("class")||"";return o.split(/\s+/).filter(function(e){return e.indexOf(h+"-")===0})}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(this.remove(o),o.classList.add(this.keyName+"-"+e),!0):!1},h.prototype.remove=function(o){var e=_(o,this.keyName);e.forEach(function(t){o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")},h.prototype.value=function(o){var e=_(o,this.keyName)[0]||"",t=e.slice(this.keyName.length+1);return this.canAdd(o,t)?t:""},h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g){var h=g.split("-"),o=h.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return h[0]+o}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(e){var t=e.split(":");return t[0].trim()})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(o.style[_(this.keyName)]=e,!0):!1},h.prototype.remove=function(o){o.style[_(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},h.prototype.value=function(o){var e=o.style[_(this.keyName)];return this.canAdd(o,e)?e:""},h}(m.default);d.default=p},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function p(g,h){for(var o=0;oP&&this.stack.undo.length>0){var T=this.stack.undo.pop();N=N.compose(T.undo),O=T.redo.compose(O)}else this.lastRecorded=P;this.stack.undo.push({redo:O,undo:N}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(O){this.stack.undo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(o.default);u.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(c){var n=c.ops[c.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(` +`):n.attributes!=null?Object.keys(n.attributes).some(function(v){return _.default.query(v,_.default.Scope.BLOCK)!=null}):!1}function i(c){var n=c.reduce(function(O,A){return O+=A.delete||0,O},0),v=c.length()-n;return r(c)&&(v-=1),v}d.default=u,d.getLastChangeIndex=i},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BaseTooltip=void 0;var E=function(){function I(M,K){for(var F=0;F0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:F!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+F)||""),this.root.setAttribute("data-mode",F)}},{key:"restoreFocus",value:function(){var F=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=F}},{key:"save",value:function(){var F=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",F,e.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",F,e.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":F=j(F);case"formula":{if(!F)break;var U=this.quill.getSelection(!0);if(U!=null){var G=U.index+U.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),F,e.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",e.default.sources.USER),this.quill.setSelection(G+2,e.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),M}(N.default);function j(I){var M=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return M?(M[1]||"https")+"://www.youtube.com/embed/"+M[2]+"?showinfo=0":(M=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(M[1]||"https")+"://player.vimeo.com/video/"+M[2]+"/":I}function k(I,M){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;M.forEach(function(F){var q=document.createElement("option");F===K?q.setAttribute("selected","selected"):q.setAttribute("value",F),I.appendChild(q)})}d.BaseTooltip=H,d.default=J},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function m(){this.head=this.tail=null,this.length=0}return m.prototype.append=function(){for(var _=[],p=0;p1&&this.append.apply(this,_.slice(1))},m.prototype.contains=function(_){for(var p,g=this.iterator();p=g();)if(p===_)return!0;return!1},m.prototype.insertBefore=function(_,p){!_||(_.next=p,p!=null?(_.prev=p.prev,p.prev!=null&&(p.prev.next=_),p.prev=_,p===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1)},m.prototype.offset=function(_){for(var p=0,g=this.head;g!=null;){if(g===_)return p;p+=g.length(),g=g.next}return-1},m.prototype.remove=function(_){!this.contains(_)||(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1)},m.prototype.iterator=function(_){return _===void 0&&(_=this.head),function(){var p=_;return _!=null&&(_=_.next),p}},m.prototype.find=function(_,p){p===void 0&&(p=!1);for(var g,h=this.iterator();g=h();){var o=g.length();if(_f?g(t,_-f,Math.min(p,f+u-_)):g(t,0,Math.min(u,_+p-f)),f+=u}},m.prototype.map=function(_){return this.reduce(function(p,g){return p.push(_(g)),p},[])},m.prototype.reduce=function(_,p){for(var g,h=this.iterator();g=h();)p=_(p,g);return p},m}();d.default=E},function(y,d,s){var E=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var f in t)t.hasOwnProperty(f)&&(e[f]=t[f])};return function(e,t){o(e,t);function f(){this.constructor=e}e.prototype=t===null?Object.create(t):(f.prototype=t.prototype,new f)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(17),_=s(1),p={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},g=100,h=function(o){E(e,o);function e(t){var f=o.call(this,t)||this;return f.scroll=f,f.observer=new MutationObserver(function(a){f.update(a)}),f.observer.observe(f.domNode,p),f.attach(),f}return e.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(t,f){this.update(),t===0&&f===this.length()?this.children.forEach(function(a){a.remove()}):o.prototype.deleteAt.call(this,t,f)},e.prototype.formatAt=function(t,f,a,u){this.update(),o.prototype.formatAt.call(this,t,f,a,u)},e.prototype.insertAt=function(t,f,a){this.update(),o.prototype.insertAt.call(this,t,f,a)},e.prototype.optimize=function(t,f){var a=this;t===void 0&&(t=[]),f===void 0&&(f={}),o.prototype.optimize.call(this,f);for(var u=[].slice.call(this.observer.takeRecords());u.length>0;)t.push(u.pop());for(var r=function(v,O){O===void 0&&(O=!0),!(v==null||v===a)&&v.domNode.parentNode!=null&&(v.domNode[_.DATA_KEY].mutations==null&&(v.domNode[_.DATA_KEY].mutations=[]),O&&r(v.parent))},i=function(v){v.domNode[_.DATA_KEY]==null||v.domNode[_.DATA_KEY].mutations==null||(v instanceof m.default&&v.children.forEach(i),v.optimize(f))},c=t,n=0;c.length>0;n+=1){if(n>=g)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(v){var O=_.find(v.target,!0);O!=null&&(O.domNode===v.target&&(v.type==="childList"?(r(_.find(v.previousSibling,!1)),[].forEach.call(v.addedNodes,function(A){var N=_.find(A,!1);r(N,!1),N instanceof m.default&&N.children.forEach(function(P){r(P,!1)})})):v.type==="attributes"&&r(O.prev)),r(O))}),this.children.forEach(i),c=[].slice.call(this.observer.takeRecords()),u=c.slice();u.length>0;)t.push(u.pop())}},e.prototype.update=function(t,f){var a=this;f===void 0&&(f={}),t=t||this.observer.takeRecords(),t.map(function(u){var r=_.find(u.target,!0);return r==null?null:r.domNode[_.DATA_KEY].mutations==null?(r.domNode[_.DATA_KEY].mutations=[u],r):(r.domNode[_.DATA_KEY].mutations.push(u),null)}).forEach(function(u){u==null||u===a||u.domNode[_.DATA_KEY]==null||u.update(u.domNode[_.DATA_KEY].mutations||[],f)}),this.domNode[_.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[_.DATA_KEY].mutations,f),this.optimize(t,f)},e.blotName="scroll",e.defaultChild="block",e.scope=_.Scope.BLOCK_BLOT,e.tagName="DIV",e}(m.default);d.default=h},function(y,d,s){var E=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t])};return function(o,e){h(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1);function p(h,o){if(Object.keys(h).length!==Object.keys(o).length)return!1;for(var e in h)if(h[e]!==o[e])return!1;return!0}var g=function(h){E(o,h);function o(){return h!==null&&h.apply(this,arguments)||this}return o.formats=function(e){if(e.tagName!==o.tagName)return h.formats.call(this,e)},o.prototype.format=function(e,t){var f=this;e===this.statics.blotName&&!t?(this.children.forEach(function(a){a instanceof m.default||(a=a.wrap(o.blotName,!0)),f.attributes.copy(a)}),this.unwrap()):h.prototype.format.call(this,e,t)},o.prototype.formatAt=function(e,t,f,a){if(this.formats()[f]!=null||_.query(f,_.Scope.ATTRIBUTE)){var u=this.isolate(e,t);u.format(f,a)}else h.prototype.formatAt.call(this,e,t,f,a)},o.prototype.optimize=function(e){h.prototype.optimize.call(this,e);var t=this.formats();if(Object.keys(t).length===0)return this.unwrap();var f=this.next;f instanceof o&&f.prev===this&&p(t,f.formats())&&(f.moveChildren(this),f.remove())},o.blotName="inline",o.scope=_.Scope.INLINE_BLOT,o.tagName="SPAN",o}(m.default);d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1),p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.formats=function(o){var e=_.query(h.blotName).tagName;if(o.tagName!==e)return g.formats.call(this,o)},h.prototype.format=function(o,e){_.query(o,_.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!e?this.replaceWith(h.blotName):g.prototype.format.call(this,o,e))},h.prototype.formatAt=function(o,e,t,f){_.query(t,_.Scope.BLOCK)!=null?this.format(t,f):g.prototype.formatAt.call(this,o,e,t,f)},h.prototype.insertAt=function(o,e,t){if(t==null||_.query(e,_.Scope.INLINE)!=null)g.prototype.insertAt.call(this,o,e,t);else{var f=this.split(o),a=_.create(e,t);f.parent.insertBefore(a,f)}},h.prototype.update=function(o,e){navigator.userAgent.match(/Trident/)?this.build():g.prototype.update.call(this,o,e)},h.blotName="block",h.scope=_.Scope.BLOCK_BLOT,h.tagName="P",h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,h){g.__proto__=h}||function(g,h){for(var o in h)h.hasOwnProperty(o)&&(g[o]=h[o])};return function(g,h){p(g,h);function o(){this.constructor=g}g.prototype=h===null?Object.create(h):(o.prototype=h.prototype,new o)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=function(p){E(g,p);function g(){return p!==null&&p.apply(this,arguments)||this}return g.formats=function(h){},g.prototype.format=function(h,o){p.prototype.formatAt.call(this,0,this.length(),h,o)},g.prototype.formatAt=function(h,o,e,t){h===0&&o===this.length()?this.format(e,t):p.prototype.formatAt.call(this,h,o,e,t)},g.prototype.formats=function(){return this.statics.formats(this.domNode)},g}(m.default);d.default=_},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=s(1),p=function(g){E(h,g);function h(o){var e=g.call(this,o)||this;return e.text=e.statics.value(e.domNode),e}return h.create=function(o){return document.createTextNode(o)},h.value=function(o){var e=o.data;return e.normalize&&(e=e.normalize()),e},h.prototype.deleteAt=function(o,e){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+e)},h.prototype.index=function(o,e){return this.domNode===o?e:-1},h.prototype.insertAt=function(o,e,t){t==null?(this.text=this.text.slice(0,o)+e+this.text.slice(o),this.domNode.data=this.text):g.prototype.insertAt.call(this,o,e,t)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(o){g.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(o,e){return[this.domNode,o]},h.prototype.split=function(o,e){if(e===void 0&&(e=!1),!e){if(o===0)return this;if(o===this.length())return this.next}var t=_.create(this.domNode.splitText(o));return this.parent.insertBefore(t,this.next),this.text=this.statics.value(this.domNode),t},h.prototype.update=function(o,e){var t=this;o.some(function(f){return f.type==="characterData"&&f.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=document.createElement("div");if(E.classList.toggle("test-class",!1),E.classList.contains("test-class")){var m=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(_,p){return arguments.length>1&&!this.contains(_)==!p?p:m.call(this,_)}}String.prototype.startsWith||(String.prototype.startsWith=function(_,p){return p=p||0,this.substr(p,_.length)===_}),String.prototype.endsWith||(String.prototype.endsWith=function(_,p){var g=this.toString();(typeof p!="number"||!isFinite(p)||Math.floor(p)!==p||p>g.length)&&(p=g.length),p-=_.length;var h=g.indexOf(_,p);return h!==-1&&h===p}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(p){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof p!="function")throw new TypeError("predicate must be a function");for(var g=Object(this),h=g.length>>>0,o=arguments[1],e,t=0;tv.length?n:v,N=n.length>v.length?v:n,P=A.indexOf(N);if(P!=-1)return O=[[E,A.substring(0,P)],[m,N],[E,A.substring(P+N.length)]],n.length>v.length&&(O[0][0]=O[2][0]=s),O;if(N.length==1)return[[s,n],[E,v]];var T=t(n,v);if(T){var b=T[0],w=T[1],x=T[2],L=T[3],D=T[4],z=_(b,x),$=_(w,L);return z.concat([[m,D]],$)}return g(n,v)}function g(n,v){for(var O=n.length,A=v.length,N=Math.ceil((O+A)/2),P=N,T=2*N,b=new Array(T),w=new Array(T),x=0;xO)$+=2;else if(K>A)z+=2;else if(D){var F=P+L-k;if(F>=0&&F=q)return h(n,v,M,K)}}}for(var U=-j+J;U<=j-H;U+=2){var F=P+U,q;U==-j||U!=j&&w[F-1]O)H+=2;else if(G>A)J+=2;else if(!D){var I=P+L-U;if(I>=0&&I=q)return h(n,v,M,K)}}}}return[[s,n],[E,v]]}function h(n,v,O,A){var N=n.substring(0,O),P=v.substring(0,A),T=n.substring(O),b=v.substring(A),w=_(N,P),x=_(T,b);return w.concat(x)}function o(n,v){if(!n||!v||n.charAt(0)!=v.charAt(0))return 0;for(var O=0,A=Math.min(n.length,v.length),N=A,P=0;Ov.length?n:v,A=n.length>v.length?v:n;if(O.length<4||A.length*2=$.length?[M,K,F,q,I]:null}var P=N(O,A,Math.ceil(O.length/4)),T=N(O,A,Math.ceil(O.length/2)),b;if(!P&&!T)return null;T?P?b=P[4].length>T[4].length?P:T:b=T:b=P;var w,x,L,D;n.length>v.length?(w=b[0],x=b[1],L=b[2],D=b[3]):(L=b[0],D=b[1],w=b[2],x=b[3]);var z=b[4];return[w,x,L,D,z]}function f(n){n.push([m,""]);for(var v=0,O=0,A=0,N="",P="",T;v1?(O!==0&&A!==0&&(T=o(P,N),T!==0&&(v-O-A>0&&n[v-O-A-1][0]==m?n[v-O-A-1][1]+=P.substring(0,T):(n.splice(0,0,[m,P.substring(0,T)]),v++),P=P.substring(T),N=N.substring(T)),T=e(P,N),T!==0&&(n[v][1]=P.substring(P.length-T)+n[v][1],P=P.substring(0,P.length-T),N=N.substring(0,N.length-T))),O===0?n.splice(v-A,O+A,[E,P]):A===0?n.splice(v-O,O+A,[s,N]):n.splice(v-O-A,O+A,[s,N],[E,P]),v=v-O-A+(O?1:0)+(A?1:0)+1):v!==0&&n[v-1][0]==m?(n[v-1][1]+=n[v][1],n.splice(v,1)):v++,A=0,O=0,N="",P="";break}n[n.length-1][1]===""&&n.pop();var b=!1;for(v=1;v0&&A.splice(N+2,0,[T[0],b]),c(A,N,3)}else return n}function i(n){for(var v=!1,O=function(T){return T.charCodeAt(0)>=56320&&T.charCodeAt(0)<=57343},A=function(T){return T.charCodeAt(T.length-1)>=55296&&T.charCodeAt(T.length-1)<=56319},N=2;N0&&P.push(n[N]);return P}function c(n,v,O){for(var A=v+O-1;A>=0&&A>=v-1;A--)if(A+1\r?\n +\<"),this.convert();var Q=this.quill.getFormat(this.quill.selection.savedRange.index);if(Q[A.default.blotName]){var se=this.container.innerText;return this.container.innerHTML="",new o.default().insert(se,x({},A.default.blotName,Q[A.default.blotName]))}var oe=this.prepareMatching(),le=m(oe,2),Ne=le[0],Oe=le[1],pe=U(this.container,Ne,Oe);return F(pe,` +`)&&pe.ops[pe.ops.length-1].attributes==null&&(pe=pe.compose(new o.default().retain(pe.length()-1).delete(1))),$.log("convert",this.container.innerHTML,pe),this.container.innerHTML="",pe}},{key:"dangerouslyPasteHTML",value:function(te,Q){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;if(typeof te=="string")this.quill.setContents(this.convert(te),Q),this.quill.setSelection(0,a.default.sources.SILENT);else{var oe=this.convert(Q);this.quill.updateContents(new o.default().retain(te).concat(oe),se),this.quill.setSelection(te+oe.length(),a.default.sources.SILENT)}}},{key:"onPaste",value:function(te){var Q=this;if(!(te.defaultPrevented||!this.quill.isEnabled())){var se=this.quill.getSelection(),oe=new o.default().retain(se.index),le=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(a.default.sources.SILENT),setTimeout(function(){oe=oe.concat(Q.convert()).delete(se.length),Q.quill.updateContents(oe,a.default.sources.USER),Q.quill.setSelection(oe.length()-se.length,a.default.sources.SILENT),Q.quill.scrollingContainer.scrollTop=le,Q.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var te=this,Q=[],se=[];return this.matchers.forEach(function(oe){var le=m(oe,2),Ne=le[0],Oe=le[1];switch(Ne){case Node.TEXT_NODE:se.push(Oe);break;case Node.ELEMENT_NODE:Q.push(Oe);break;default:[].forEach.call(te.container.querySelectorAll(Ne),function(pe){pe[J]=pe[J]||[],pe[J].push(Oe)});break}}),[Q,se]}}]),Y}(c.default);I.DEFAULTS={matchers:[],matchVisual:!0};function M(W,Y,ee){return(typeof Y>"u"?"undefined":E(Y))==="object"?Object.keys(Y).reduce(function(te,Q){return M(te,Q,Y[Q])},W):W.reduce(function(te,Q){return Q.attributes&&Q.attributes[Y]?te.push(Q):te.insert(Q.insert,(0,g.default)({},x({},Y,ee),Q.attributes))},new o.default)}function K(W){if(W.nodeType!==Node.ELEMENT_NODE)return{};var Y="__ql-computed-style";return W[Y]||(W[Y]=window.getComputedStyle(W))}function F(W,Y){for(var ee="",te=W.ops.length-1;te>=0&&ee.length-1}function U(W,Y,ee){return W.nodeType===W.TEXT_NODE?ee.reduce(function(te,Q){return Q(W,te)},new o.default):W.nodeType===W.ELEMENT_NODE?[].reduce.call(W.childNodes||[],function(te,Q){var se=U(Q,Y,ee);return Q.nodeType===W.ELEMENT_NODE&&(se=Y.reduce(function(oe,le){return le(Q,oe)},se),se=(Q[J]||[]).reduce(function(oe,le){return le(Q,oe)},se)),te.concat(se)},new o.default):new o.default}function G(W,Y,ee){return M(ee,W,!0)}function V(W,Y){var ee=t.default.Attributor.Attribute.keys(W),te=t.default.Attributor.Class.keys(W),Q=t.default.Attributor.Style.keys(W),se={};return ee.concat(te).concat(Q).forEach(function(oe){var le=t.default.query(oe,t.default.Scope.ATTRIBUTE);le!=null&&(se[le.attrName]=le.value(W),se[le.attrName])||(le=j[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(se[le.attrName]=le.value(W)||void 0),le=k[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(le=k[oe],se[le.attrName]=le.value(W)||void 0))}),Object.keys(se).length>0&&(Y=M(Y,se)),Y}function X(W,Y){var ee=t.default.query(W);if(ee==null)return Y;if(ee.prototype instanceof t.default.Embed){var te={},Q=ee.value(W);Q!=null&&(te[ee.blotName]=Q,Y=new o.default().insert(te,ee.formats(W)))}else typeof ee.formats=="function"&&(Y=M(Y,ee.blotName,ee.formats(W)));return Y}function ne(W,Y){return F(Y,` +`)||Y.insert(` +`),Y}function ie(){return new o.default}function ae(W,Y){var ee=t.default.query(W);if(ee==null||ee.blotName!=="list-item"||!F(Y,` +`))return Y;for(var te=-1,Q=W.parentNode;!Q.classList.contains("ql-clipboard");)(t.default.query(Q)||{}).blotName==="list"&&(te+=1),Q=Q.parentNode;return te<=0?Y:Y.compose(new o.default().retain(Y.length()-1).retain(1,{indent:te}))}function fe(W,Y){return F(Y,` +`)||(q(W)||Y.length()>0&&W.nextSibling&&q(W.nextSibling))&&Y.insert(` +`),Y}function he(W,Y){if(q(W)&&W.nextElementSibling!=null&&!F(Y,` + +`)){var ee=W.offsetHeight+parseFloat(K(W).marginTop)+parseFloat(K(W).marginBottom);W.nextElementSibling.offsetTop>W.offsetTop+ee*1.5&&Y.insert(` +`)}return Y}function me(W,Y){var ee={},te=W.style||{};return te.fontStyle&&K(W).fontStyle==="italic"&&(ee.italic=!0),te.fontWeight&&(K(W).fontWeight.startsWith("bold")||parseInt(K(W).fontWeight)>=700)&&(ee.bold=!0),Object.keys(ee).length>0&&(Y=M(Y,ee)),parseFloat(te.textIndent||0)>0&&(Y=new o.default().insert(" ").concat(Y)),Y}function ge(W,Y){var ee=W.data;if(W.parentNode.tagName==="O:P")return Y.insert(ee.trim());if(ee.trim().length===0&&W.parentNode.classList.contains("ql-clipboard"))return Y;if(!K(W.parentNode).whiteSpace.startsWith("pre")){var te=function(se,oe){return oe=oe.replace(/[^\u00a0]/g,""),oe.length<1&&se?" ":oe};ee=ee.replace(/\r\n/g," ").replace(/\n/g," "),ee=ee.replace(/\s\s+/g,te.bind(te,!0)),(W.previousSibling==null&&q(W.parentNode)||W.previousSibling!=null&&q(W.previousSibling))&&(ee=ee.replace(/^\s+/,te.bind(te,!1))),(W.nextSibling==null&&q(W.parentNode)||W.nextSibling!=null&&q(W.nextSibling))&&(ee=ee.replace(/\s+$/,te.bind(te,!1)))}return Y.insert(ee)}d.default=I,d.matchAttributor=V,d.matchBlot=X,d.matchNewline=fe,d.matchSpacing=he,d.matchText=ge},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;rt.right&&(a=t.right-f.right,this.root.style.left=o+a+"px"),f.leftt.bottom){var u=f.bottom-f.top,r=h.bottom-h.top+u;this.root.style.top=e-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),p}();d.default=_},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function T(b,w){var x=[],L=!0,D=!1,z=void 0;try{for(var $=b[Symbol.iterator](),J;!(L=(J=$.next()).done)&&(x.push(J.value),!(w&&x.length===w));L=!0);}catch(H){D=!0,z=H}finally{try{!L&&$.return&&$.return()}finally{if(D)throw z}}return x}return function(b,w){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return T(b,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function T(b,w,x){b===null&&(b=Function.prototype);var L=Object.getOwnPropertyDescriptor(b,w);if(L===void 0){var D=Object.getPrototypeOf(b);return D===null?void 0:T(D,w,x)}else{if("value"in L)return L.value;var z=L.get;return z===void 0?void 0:z.call(x)}},_=function(){function T(b,w){for(var x=0;x','','',''].join(""),d.default=N},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(29),m=Q(E),_=s(36),p=s(38),g=s(64),h=s(65),o=Q(h),e=s(66),t=Q(e),f=s(67),a=Q(f),u=s(37),r=s(26),i=s(39),c=s(40),n=s(56),v=Q(n),O=s(68),A=Q(O),N=s(27),P=Q(N),T=s(69),b=Q(T),w=s(70),x=Q(w),L=s(71),D=Q(L),z=s(72),$=Q(z),J=s(73),H=Q(J),j=s(13),k=Q(j),I=s(74),M=Q(I),K=s(75),F=Q(K),q=s(57),U=Q(q),G=s(41),V=Q(G),X=s(28),ne=Q(X),ie=s(59),ae=Q(ie),fe=s(60),he=Q(fe),me=s(61),ge=Q(me),W=s(108),Y=Q(W),ee=s(62),te=Q(ee);function Q(se){return se&&se.__esModule?se:{default:se}}m.default.register({"attributors/attribute/direction":p.DirectionAttribute,"attributors/class/align":_.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":p.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":c.SizeClass,"attributors/style/align":_.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":p.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":c.SizeStyle},!0),m.default.register({"formats/align":_.AlignClass,"formats/direction":p.DirectionClass,"formats/indent":g.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":c.SizeClass,"formats/blockquote":o.default,"formats/code-block":k.default,"formats/header":t.default,"formats/list":a.default,"formats/bold":v.default,"formats/code":j.Code,"formats/italic":A.default,"formats/link":P.default,"formats/script":b.default,"formats/strike":x.default,"formats/underline":D.default,"formats/image":$.default,"formats/video":H.default,"formats/list/item":f.ListItem,"modules/formula":M.default,"modules/syntax":F.default,"modules/toolbar":U.default,"themes/bubble":Y.default,"themes/snow":te.default,"ui/icons":V.default,"ui/picker":ne.default,"ui/icon-picker":he.default,"ui/color-picker":ae.default,"ui/tooltip":ge.default},!0),d.default=m.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.IndentClass=void 0;var E=function(){function a(u,r){for(var i=0;i0&&this.children.tail.format(A,N)}},{key:"formats",value:function(){return f({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,N){if(A instanceof i)m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,A,N);else{var P=N==null?this.length():N.offset(this),T=this.split(P);T.parent.insertBefore(A,T)}}},{key:"optimize",value:function(A){m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,A);var N=this.next;N!=null&&N.prev===this&&N.statics.blotName===this.statics.blotName&&N.domNode.tagName===this.domNode.tagName&&N.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(N.moveChildren(this),N.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var N=p.default.create(this.statics.defaultChild);A.moveChildren(N),this.appendChild(N)}m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"replace",this).call(this,A)}}]),v}(e.default);c.blotName="list",c.scope=p.default.Scope.BLOCK_BLOT,c.tagName=["OL","UL"],c.defaultChild="list-item",c.allowedChildren=[i],d.ListItem=i,d.default=c},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(56),m=_(E);function _(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function h(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(e){h(t,e);function t(){return p(this,t),g(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(m.default);o.blotName="italic",o.tagName=["EM","I"],d.default=o},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return typeof c=="string"&&n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"match",value:function(c){return/\.(jpe?g|gif|png)$/.test(c)||/^data:image\/.+;base64/.test(c)}},{key:"sanitize",value:function(c){return(0,g.sanitize)(c,["http","https","data"])?c:"//:0"}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(p.default.Embed);a.blotName="image",a.tagName="IMG",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"sanitize",value:function(c){return g.default.sanitize(c)}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(_.BlockEmbed);a.blotName="video",a.className="ql-video",a.tagName="IFRAME",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.FormulaBlot=void 0;var E=function(){function c(n,v){for(var O=0;O0||this.cachedText==null)&&(this.domNode.innerHTML=P(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),A}(f.default);c.className="ql-syntax";var n=new p.default.Attributor.Class("token","hljs",{scope:p.default.Scope.INLINE}),v=function(O){i(A,O),E(A,null,[{key:"register",value:function(){h.default.register(n,!0),h.default.register(c,!0)}}]);function A(N,P){u(this,A);var T=r(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,N,P));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var b=null;return T.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(b),b=setTimeout(function(){T.highlight(),b=null},T.options.interval)}),T.highlight(),T}return E(A,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(c).forEach(function(b){b.highlight(P.options.highlight)}),this.quill.update(h.default.sources.SILENT),T!=null&&this.quill.setSelection(T,h.default.sources.SILENT)}}}]),A}(e.default);v.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var A=window.hljs.highlightAuto(O);return A.value}}(),interval:1e3},d.CodeBlock=c,d.CodeToken=n,d.default=v},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BubbleTooltip=void 0;var E=function A(N,P,T){N===null&&(N=Function.prototype);var b=Object.getOwnPropertyDescriptor(N,P);if(b===void 0){var w=Object.getPrototypeOf(N);return w===null?void 0:A(w,P,T)}else{if("value"in b)return b.value;var x=b.get;return x===void 0?void 0:x.call(T)}},m=function(){function A(N,P){for(var T=0;T0&&D===h.default.sources.USER){b.show(),b.root.style.left="0px",b.root.style.width="",b.root.style.width=b.root.offsetWidth+"px";var z=b.quill.getLines(x.index,x.length);if(z.length===1)b.position(b.quill.getBounds(x));else{var $=z[z.length-1],J=b.quill.getIndex($),H=Math.min($.length()-1,x.index+x.length-J),j=b.quill.getBounds(new t.Range(J,H));b.position(j)}}else document.activeElement!==b.textbox&&b.quill.hasFocus()&&b.hide()}),b}return m(N,[{key:"listen",value:function(){var T=this;E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var b=T.quill.getSelection();b!=null&&T.position(T.quill.getBounds(b))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var b=E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"position",this).call(this,T),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",b===0)return b;w.style.marginLeft=-1*b-w.offsetWidth/2+"px"}}]),N}(o.BaseTooltip);O.TEMPLATE=['','
','','',"
"].join(""),d.BubbleTooltip=O,d.default=v},function(y,d,s){y.exports=s(63)}]).default})})(Vn);const tt=nr(Vn.exports);var Ue=-1,De=1,Re=0;function wt(R,B,y,d){if(R===B)return R?[[Re,R]]:[];if(y!=null){var s=yr(R,B,y);if(s)return s}var E=Bn(R,B),m=R.substring(0,E);R=R.substring(E),B=B.substring(E),E=Cn(R,B);var _=R.substring(R.length-E);R=R.substring(0,R.length-E),B=B.substring(0,B.length-E);var p=hr(R,B);return m&&p.unshift([Re,m]),_&&p.push([Re,_]),Zn(p,d),p}function hr(R,B){var y;if(!R)return[[De,B]];if(!B)return[[Ue,R]];var d=R.length>B.length?R:B,s=R.length>B.length?B:R,E=d.indexOf(s);if(E!==-1)return y=[[De,d.substring(0,E)],[Re,s],[De,d.substring(E+s.length)]],R.length>B.length&&(y[0][0]=y[2][0]=Ue),y;if(s.length===1)return[[Ue,R],[De,B]];var m=vr(R,B);if(m){var _=m[0],p=m[1],g=m[2],h=m[3],o=m[4],e=wt(_,g),t=wt(p,h);return e.concat([[Re,o]],t)}return dr(R,B)}function dr(R,B){for(var y=R.length,d=B.length,s=Math.ceil((y+d)/2),E=s,m=2*s,_=new Array(m),p=new Array(m),g=0;gy)t+=2;else if(n>d)e+=2;else if(o){var v=E+h-r;if(v>=0&&v=O)return zn(R,B,c,n)}}}for(var A=-u+f;A<=u-a;A+=2){var v=E+A,O;A===-u||A!==u&&p[v-1]y)a+=2;else if(N>d)f+=2;else if(!o){var i=E+h-A;if(i>=0&&i=O)return zn(R,B,c,n)}}}}return[[Ue,R],[De,B]]}function zn(R,B,y,d){var s=R.substring(0,y),E=B.substring(0,d),m=R.substring(y),_=B.substring(d),p=wt(s,E),g=wt(m,_);return p.concat(g)}function Bn(R,B){if(!R||!B||R.charAt(0)!==B.charAt(0))return 0;for(var y=0,d=Math.min(R.length,B.length),s=d,E=0;yB.length?R:B,d=R.length>B.length?B:R;if(y.length<4||d.length*2=t.length?[c,n,v,O,i]:null}var E=s(y,d,Math.ceil(y.length/4)),m=s(y,d,Math.ceil(y.length/2)),_;if(!E&&!m)return null;m?E?_=E[4].length>m[4].length?E:m:_=m:_=E;var p,g,h,o;R.length>B.length?(p=_[0],g=_[1],h=_[2],o=_[3]):(h=_[0],o=_[1],p=_[2],g=_[3]);var e=_[4];return[p,g,h,o,e]}function Zn(R,B){R.push([Re,""]);for(var y=0,d=0,s=0,E="",m="",_;y=0&&Qn(R[p][1])){var g=R[p][1].slice(-1);if(R[p][1]=R[p][1].slice(0,-1),E=g+E,m=g+m,!R[p][1]){R.splice(p,1),y--;var h=p-1;R[h]&&R[h][0]===De&&(s++,m=R[h][1]+m,h--),R[h]&&R[h][0]===Ue&&(d++,E=R[h][1]+E,h--),p=h}}if(Xn(R[y][1])){var g=R[y][1].charAt(0);R[y][1]=R[y][1].slice(1),E+=g,m+=g}}if(y0||m.length>0){E.length>0&&m.length>0&&(_=Bn(m,E),_!==0&&(p>=0?R[p][1]+=m.substring(0,_):(R.splice(0,0,[Re,m.substring(0,_)]),y++),m=m.substring(_),E=E.substring(_)),_=Cn(m,E),_!==0&&(R[y][1]=m.substring(m.length-_)+R[y][1],m=m.substring(0,m.length-_),E=E.substring(0,E.length-_)));var o=s+d;E.length===0&&m.length===0?(R.splice(y-o,o),y=y-o):E.length===0?(R.splice(y-o,o,[De,m]),y=y-o+1):m.length===0?(R.splice(y-o,o,[Ue,E]),y=y-o+1):(R.splice(y-o,o,[Ue,E],[De,m]),y=y-o+2)}y!==0&&R[y-1][0]===Re?(R[y-1][1]+=R[y][1],R.splice(y,1)):y++,s=0,d=0,E="",m="";break}}R[R.length-1][1]===""&&R.pop();var e=!1;for(y=1;y=55296&&R<=56319}function Yn(R){return R>=56320&&R<=57343}function Xn(R){return Yn(R.charCodeAt(0))}function Qn(R){return Wn(R.charCodeAt(R.length-1))}function pr(R){for(var B=[],y=0;y0&&B.push(R[y]);return B}function jn(R,B,y,d){return Qn(R)||Xn(d)?null:pr([[Re,R],[Ue,B],[De,y],[Re,d]])}function yr(R,B,y){var d=typeof y=="number"?{index:y,length:0}:y.oldRange,s=typeof y=="number"?null:y.newRange,E=R.length,m=B.length;if(d.length===0&&(s===null||s.length===0)){var _=d.index,p=R.slice(0,_),g=R.slice(_),h=s?s.index:null;e:{var o=_+m-E;if(h!==null&&h!==o||o<0||o>m)break e;var e=B.slice(0,o),t=B.slice(o);if(t!==g)break e;var f=Math.min(_,o),a=p.slice(0,f),u=e.slice(0,f);if(a!==u)break e;var r=p.slice(f),i=e.slice(f);return jn(a,r,i,g)}e:{if(h!==null&&h!==_)break e;var c=_,e=B.slice(0,c),t=B.slice(c);if(e!==p)break e;var n=Math.min(E-c,m-c),v=g.slice(g.length-n),O=t.slice(t.length-n);if(v!==O)break e;var r=g.slice(0,g.length-n),i=t.slice(0,t.length-n);return jn(p,r,i,v)}}if(d.length>0&&s&&s.length===0){e:{var a=R.slice(0,d.index),v=R.slice(d.index+d.length),f=a.length,n=v.length;if(m-1}function rn(l,S){var C=this.__data__,Z=at(C,l);return Z<0?C.push([l,S]):C[Z][1]=S,this}Ee.prototype.clear=Jt,Ee.prototype.delete=en,Ee.prototype.get=tn,Ee.prototype.has=nn,Ee.prototype.set=rn;function ke(l){var S=-1,C=l?l.length:0;for(this.clear();++S-1&&l%1==0&&l-1&&l%1==0&&l<=s}function Fe(l){var S=typeof l;return!!l&&(S=="object"||S=="function")}function Ct(l){return!!l&&typeof l=="object"}function Et(l){return st(l)?ot(l):bn(l)}function qn(){return[]}function Rn(){return!1}R.exports=It})(Gt,Gt.exports);var Vt={exports:{}};(function(R,B){var y=200,d="__lodash_hash_undefined__",s=1,E=2,m=9007199254740991,_="[object Arguments]",p="[object Array]",g="[object AsyncFunction]",h="[object Boolean]",o="[object Date]",e="[object Error]",t="[object Function]",f="[object GeneratorFunction]",a="[object Map]",u="[object Number]",r="[object Null]",i="[object Object]",c="[object Promise]",n="[object Proxy]",v="[object RegExp]",O="[object Set]",A="[object String]",N="[object Symbol]",P="[object Undefined]",T="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",$="[object Int32Array]",J="[object Uint8Array]",H="[object Uint8ClampedArray]",j="[object Uint16Array]",k="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,F={};F[x]=F[L]=F[D]=F[z]=F[$]=F[J]=F[H]=F[j]=F[k]=!0,F[_]=F[p]=F[b]=F[h]=F[w]=F[o]=F[e]=F[t]=F[a]=F[u]=F[i]=F[v]=F[O]=F[A]=F[T]=!1;var q=typeof Te=="object"&&Te&&Te.Object===Object&&Te,U=typeof self=="object"&&self&&self.Object===Object&&self,G=q||U||Function("return this")(),V=B&&!B.nodeType&&B,X=V&&!0&&R&&!R.nodeType&&R,ne=X&&X.exports===V,ie=ne&&q.process,ae=function(){try{return ie&&ie.binding&&ie.binding("util")}catch{}}(),fe=ae&&ae.isTypedArray;function he(l,S){for(var C=-1,Z=l==null?0:l.length,ue=0,re=[];++C-1}function sn(l,S){var C=this.__data__,Z=lt(C,l);return Z<0?(++this.size,C.push([l,S])):C[Z][1]=S,this}ke.prototype.clear=on,ke.prototype.delete=an,ke.prototype.get=ln,ke.prototype.has=un,ke.prototype.set=sn;function Le(l){var S=-1,C=l==null?0:l.length;for(this.clear();++Sve))return!1;var ye=re.get(l);if(ye&&re.get(S))return ye==S;var Se=-1,qe=!0,_e=C&E?new ot:void 0;for(re.set(l,S),re.set(S,l);++Se-1&&l%1==0&&l-1&&l%1==0&&l<=m}function Bt(l){var S=typeof l;return l!=null&&(S=="object"||S=="function")}function Fe(l){return l!=null&&typeof l=="object"}var Ct=fe?Y(fe):En;function Et(l){return _t(l)?bn(l):An(l)}function qn(){return[]}function Rn(){return!1}R.exports=Ln})(Vt,Vt.exports);var Fn={},Jn=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Fn,"__esModule",{value:!0});var mr=Jn(Gt.exports),br=Jn(Vt.exports),Dn;(function(R){function B(E,m,_){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var p=mr.default(m);_||(p=Object.keys(p).reduce(function(h,o){return p[o]!=null&&(h[o]=p[o]),h},{}));for(var g in E)E[g]!==void 0&&m[g]===void 0&&(p[g]=E[g]);return Object.keys(p).length>0?p:void 0}R.compose=B;function y(E,m){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var _=Object.keys(E).concat(Object.keys(m)).reduce(function(p,g){return br.default(E[g],m[g])||(p[g]=m[g]===void 0?null:m[g]),p},{});return Object.keys(_).length>0?_:void 0}R.diff=y;function d(E,m){E===void 0&&(E={}),m===void 0&&(m={}),E=E||{};var _=Object.keys(m).reduce(function(p,g){return m[g]!==E[g]&&E[g]!==void 0&&(p[g]=m[g]),p},{});return Object.keys(E).reduce(function(p,g){return E[g]!==m[g]&&m[g]===void 0&&(p[g]=null),p},_)}R.invert=d;function s(E,m,_){if(_===void 0&&(_=!1),typeof E!="object")return m;if(typeof m=="object"){if(!_)return m;var p=Object.keys(m).reduce(function(g,h){return E[h]===void 0&&(g[h]=m[h]),g},{});return Object.keys(p).length>0?p:void 0}}R.transform=s})(Dn||(Dn={}));Fn.default=Dn;var Ht={},zt={},Kn;function _r(){if(Kn)return zt;Kn=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(zt,"__esModule",{value:!0});var B=R(er()),y=function(){function d(s){this.ops=s,this.index=0,this.offset=0}return d.prototype.hasNext=function(){return this.peekLength()<1/0},d.prototype.next=function(s){s||(s=1/0);var E=this.ops[this.index];if(E){var m=this.offset,_=B.default.length(E);if(s>=_-m?(s=_-m,this.index+=1,this.offset=0):this.offset+=s,typeof E.delete=="number")return{delete:s};var p={};return E.attributes&&(p.attributes=E.attributes),typeof E.retain=="number"?p.retain=s:typeof E.insert=="string"?p.insert=E.insert.substr(m,s):p.insert=E.insert,p}else return{retain:1/0}},d.prototype.peek=function(){return this.ops[this.index]},d.prototype.peekLength=function(){return this.ops[this.index]?B.default.length(this.ops[this.index])-this.offset:1/0},d.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},d.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,E=this.index,m=this.next(),_=this.ops.slice(this.index);return this.offset=s,this.index=E,[m].concat(_)}else return[]},d}();return zt.default=y,zt}var $n;function er(){if($n)return Ht;$n=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ht,"__esModule",{value:!0});var B=R(_r()),y;return function(d){function s(m){return new B.default(m)}d.iterator=s;function E(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}d.length=E}(y||(y={})),Ht.default=y,Ht}var Tt=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}},Kt=Tt(gr),Or=Tt(Gt.exports),In=Tt(Vt.exports),At=Tt(Fn),we=Tt(er()),Er=String.fromCharCode(0);(function(){function R(B){Array.isArray(B)?this.ops=B:B!=null&&Array.isArray(B.ops)?this.ops=B.ops:this.ops=[]}return R.prototype.insert=function(B,y){var d={};return typeof B=="string"&&B.length===0?this:(d.insert=B,y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d))},R.prototype.delete=function(B){return B<=0?this:this.push({delete:B})},R.prototype.retain=function(B,y){if(B<=0)return this;var d={retain:B};return y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d)},R.prototype.push=function(B){var y=this.ops.length,d=this.ops[y-1];if(B=Or.default(B),typeof d=="object"){if(typeof B.delete=="number"&&typeof d.delete=="number")return this.ops[y-1]={delete:d.delete+B.delete},this;if(typeof d.delete=="number"&&B.insert!=null&&(y-=1,d=this.ops[y-1],typeof d!="object"))return this.ops.unshift(B),this;if(In.default(B.attributes,d.attributes)){if(typeof B.insert=="string"&&typeof d.insert=="string")return this.ops[y-1]={insert:d.insert+B.insert},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this;if(typeof B.retain=="number"&&typeof d.retain=="number")return this.ops[y-1]={retain:d.retain+B.retain},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this}}return y===this.ops.length?this.ops.push(B):this.ops.splice(y,0,B),this},R.prototype.chop=function(){var B=this.ops[this.ops.length-1];return B&&B.retain&&!B.attributes&&this.ops.pop(),this},R.prototype.filter=function(B){return this.ops.filter(B)},R.prototype.forEach=function(B){this.ops.forEach(B)},R.prototype.map=function(B){return this.ops.map(B)},R.prototype.partition=function(B){var y=[],d=[];return this.forEach(function(s){var E=B(s)?y:d;E.push(s)}),[y,d]},R.prototype.reduce=function(B,y){return this.ops.reduce(B,y)},R.prototype.changeLength=function(){return this.reduce(function(B,y){return y.insert?B+we.default.length(y):y.delete?B-y.delete:B},0)},R.prototype.length=function(){return this.reduce(function(B,y){return B+we.default.length(y)},0)},R.prototype.slice=function(B,y){B===void 0&&(B=0),y===void 0&&(y=1/0);for(var d=[],s=we.default.iterator(this.ops),E=0;E0&&d.next(E.retain-m)}for(var _=new R(s);y.hasNext()||d.hasNext();)if(d.peekType()==="insert")_.push(d.next());else if(y.peekType()==="delete")_.push(y.next());else{var p=Math.min(y.peekLength(),d.peekLength()),g=y.next(p),h=d.next(p);if(typeof h.retain=="number"){var o={};typeof g.retain=="number"?o.retain=p:o.insert=g.insert;var e=At.default.compose(g.attributes,h.attributes,typeof g.retain=="number");if(e&&(o.attributes=e),_.push(o),!d.hasNext()&&In.default(_.ops[_.ops.length-1],o)){var t=new R(y.rest());return _.concat(t).chop()}}else typeof h.delete=="number"&&typeof g.retain=="number"&&_.push(h)}return _.chop()},R.prototype.concat=function(B){var y=new R(this.ops.slice());return B.ops.length>0&&(y.push(B.ops[0]),y.ops=y.ops.concat(B.ops.slice(1))),y},R.prototype.diff=function(B,y){if(this.ops===B.ops)return new R;var d=[this,B].map(function(p){return p.map(function(g){if(g.insert!=null)return typeof g.insert=="string"?g.insert:Er;var h=p===B?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),s=new R,E=Kt.default(d[0],d[1],y),m=we.default.iterator(this.ops),_=we.default.iterator(B.ops);return E.forEach(function(p){for(var g=p[1].length;g>0;){var h=0;switch(p[0]){case Kt.default.INSERT:h=Math.min(_.peekLength(),g),s.push(_.next(h));break;case Kt.default.DELETE:h=Math.min(g,m.peekLength()),m.next(h),s.delete(h);break;case Kt.default.EQUAL:h=Math.min(m.peekLength(),_.peekLength(),g);var o=m.next(h),e=_.next(h);In.default(o.insert,e.insert)?s.retain(h,At.default.diff(o.attributes,e.attributes)):s.push(e).delete(h);break}g-=h}}),s.chop()},R.prototype.eachLine=function(B,y){y===void 0&&(y=` +`);for(var d=we.default.iterator(this.ops),s=new R,E=0;d.hasNext();){if(d.peekType()!=="insert")return;var m=d.peek(),_=we.default.length(m)-d.peekLength(),p=typeof m.insert=="string"?m.insert.indexOf(y,_)-_:-1;if(p<0)s.push(d.next());else if(p>0)s.push(d.next(p));else{if(B(s,d.next(1).attributes||{},E)===!1)return;E+=1,s=new R}}s.length()>0&&B(s,{},E)},R.prototype.invert=function(B){var y=new R;return this.reduce(function(d,s){if(s.insert)y.delete(we.default.length(s));else{if(s.retain&&s.attributes==null)return y.retain(s.retain),d+s.retain;if(s.delete||s.retain&&s.attributes){var E=s.delete||s.retain,m=B.slice(d,d+E);return m.forEach(function(_){s.delete?y.push(_):s.retain&&s.attributes&&y.retain(we.default.length(_),At.default.invert(s.attributes,_.attributes))}),d+E}}return d},0),y.chop()},R.prototype.transform=function(B,y){if(y===void 0&&(y=!1),y=!!y,typeof B=="number")return this.transformPosition(B,y);for(var d=B,s=we.default.iterator(this.ops),E=we.default.iterator(d.ops),m=new R;s.hasNext()||E.hasNext();)if(s.peekType()==="insert"&&(y||E.peekType()!=="insert"))m.retain(we.default.length(s.next()));else if(E.peekType()==="insert")m.push(E.next());else{var _=Math.min(s.peekLength(),E.peekLength()),p=s.next(_),g=E.next(_);if(p.delete)continue;g.delete?m.push(g):m.retain(_,At.default.transform(p.attributes,g.attributes,y))}return m.chop()},R.prototype.transformPosition=function(B,y){y===void 0&&(y=!1),y=!!y;for(var d=we.default.iterator(this.ops),s=0;d.hasNext()&&s<=B;){var E=d.peekLength(),m=d.peekType();if(d.next(),m==="delete"){B-=Math.min(E,B-s);continue}else m==="insert"&&(s{}},contentType:{type:String,default:"delta",validator:R=>["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys(Gn).indexOf(R)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(R,B)=>{ir(()=>{E()}),or(()=>{y=null});let y,d;const s=$t(),E=()=>{var O;if(!!s.value){if(d=m(),R.modules)if(Array.isArray(R.modules))for(const A of R.modules)tt.register(`modules/${A.name}`,A.module);else tt.register(`modules/${R.modules.name}`,R.modules.module);y=new tt(s.value,d),a(R.content),y.on("text-change",_),y.on("selection-change",g),y.on("editor-change",h),R.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),R.theme!=="snow"&&s.value.classList.remove("ql-snow"),(O=y.getModule("toolbar"))===null||O===void 0||O.container.addEventListener("mousedown",A=>{A.preventDefault()}),B.emit("ready",y)}},m=()=>{const O={};if(R.theme!==""&&(O.theme=R.theme),R.readOnly&&(O.readOnly=R.readOnly),R.placeholder&&(O.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(O.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:Gn[R.toolbar]})()}),R.modules){const A=(()=>{var N,P;const T={};if(Array.isArray(R.modules))for(const b of R.modules)T[b.name]=(N=b.options)!==null&&N!==void 0?N:{};else T[R.modules.name]=(P=R.modules.options)!==null&&P!==void 0?P:{};return T})();O.modules=Object.assign({},O.modules,A)}return Object.assign({},R.globalOptions,R.options,O)},_=(O,A,N)=>{B.emit("update:content",f()),B.emit("textChange",{delta:O,oldContents:A,source:N})},p=$t(),g=(O,A,N)=>{p.value=!!(y!=null&&y.hasFocus()),B.emit("selectionChange",{range:O,oldRange:A,source:N})};Mn(p,O=>{O?B.emit("focus",s):B.emit("blur",s)});const h=(...O)=>{O[0]==="text-change"&&B.emit("editorChange",{name:O[0],delta:O[1],oldContents:O[2],source:O[3]}),O[0]==="selection-change"&&B.emit("editorChange",{name:O[0],range:O[1],oldRange:O[2],source:O[3]})},o=()=>s.value,e=()=>{var O;return(O=y==null?void 0:y.getModule("toolbar"))===null||O===void 0?void 0:O.container},t=()=>{if(y)return y;throw`The quill editor hasn't been instantiated yet, + make sure to call this method when the editor ready + or use v-on:ready="onReady(quill)" event instead.`},f=(O,A)=>R.contentType==="html"?i():R.contentType==="text"?u(O,A):y==null?void 0:y.getContents(O,A),a=(O,A="api")=>{R.contentType==="html"?c(O):R.contentType==="text"?r(O,A):y==null||y.setContents(O,A)},u=(O,A)=>{var N;return(N=y==null?void 0:y.getText(O,A))!==null&&N!==void 0?N:""},r=(O,A="api")=>{y==null||y.setText(O,A)},i=()=>{var O;return(O=y==null?void 0:y.root.innerHTML)!==null&&O!==void 0?O:""},c=O=>{y&&(y.root.innerHTML=O)},n=(O,A="api")=>{const N=y==null?void 0:y.clipboard.convert(O);N&&(y==null||y.setContents(N,A))},v=()=>{lr(()=>{var O;!B.slots.toolbar&&y&&((O=y.getModule("toolbar"))===null||O===void 0||O.container.remove()),E()})};return Mn(()=>R.enable,O=>{y&&y.enable(O)}),{editor:s,getEditor:o,getToolbar:e,getQuill:t,getContents:f,setContents:a,getHTML:i,setHTML:c,pasteHTML:n,getText:u,setText:r,reinit:v}},render(){var R,B;return[(B=(R=this.$slots).toolbar)===null||B===void 0?void 0:B.call(R),ar("div",{ref:"editor",...this.$attrs})]}});const wr=tt.import("blots/block");class Nt extends wr{static create(B){const y=super.create(B);if(B===!0)return y;const d=document.createElement("img");return d.setAttribute("src",B),y.appendChild(d),y}deleteAt(B,y){super.deleteAt(B,y),this.cache={}}static value(B){const{src:y,custom:d}=B.dataset;return{src:y,custom:d}}}Nt.blotName="imageBlot";Nt.className="image-uploading";Nt.tagName="span";tt.register({"formats/imageBlot":Nt});class tr{constructor(B,y){this.quill=B,this.options=y,this.range=null,typeof this.options.upload!="function"&&console.warn("[Missing config] upload function that returns a promise is required");var d=this.quill.getModule("toolbar");d.addHandler("image",this.selectLocalImage.bind(this)),this.handleDrop=this.handleDrop.bind(this),this.handlePaste=this.handlePaste.bind(this),this.quill.root.addEventListener("drop",this.handleDrop,!1),this.quill.root.addEventListener("paste",this.handlePaste,!1)}selectLocalImage(){this.quill.focus(),this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=this.fileChanged.bind(this),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{document.body.removeChild(this.fileHolder)})}handleDrop(B){if(B.stopPropagation(),B.preventDefault(),B.dataTransfer&&B.dataTransfer.files&&B.dataTransfer.files.length){if(document.caretRangeFromPoint){const d=document.getSelection(),s=document.caretRangeFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.startContainer,s.startOffset,s.startContainer,s.startOffset)}else{const d=document.getSelection(),s=document.caretPositionFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.offsetNode,s.offset,s.offsetNode,s.offset)}this.quill.focus(),this.range=this.quill.getSelection();let y=B.dataTransfer.files[0];setTimeout(()=>{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(y)},0)}}handlePaste(B){let y=B.clipboardData||window.clipboardData;if(y&&(y.items||y.files)){let d=y.items||y.files;const s=/^image\/(jpe?g|gif|png|svg|webp)$/i;for(let E=0;E{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(m)},0))}}}readAndUploadFile(B){let y=!1;const d=new FileReader;d.addEventListener("load",()=>{if(!y){let s=d.result;this.insertBase64Image(s)}},!1),B&&d.readAsDataURL(B),this.options.upload(B).then(s=>{this.insertToEditor(s)},s=>{y=!0,this.removeBase64Image(),console.warn(s)})}fileChanged(){const B=this.fileHolder.files[0];this.readAndUploadFile(B)}insertBase64Image(B){const y=this.range;this.quill.insertEmbed(y.index,Nt.blotName,`${B}`,"user")}insertToEditor(B){const y=this.range;this.quill.deleteText(y.index,3,"user"),this.quill.insertEmbed(y.index,"image",`${B}`,"user"),y.index++,this.quill.setSelection(y,"user")}removeBase64Image(){const B=this.range;this.quill.deleteText(B.index,3,"user")}}window.ImageUploader=tr;const Nr={__name:"Editor",props:{content:{type:String,default:""}},setup(R,{expose:B}){const y=R;tt.imports["modules/ImageUploader"]||tt.register("modules/ImageUploader",tr);const d=$t(null),s=$t("");Mn(()=>y.content,()=>{s.value=y.content,d.value.setHTML(s.value)});const E=o=>({"image/png":"png","image/jpeg":"jpeg"})[o],m=(o,e)=>{cr("danger",o,e)},_=o=>new Promise((e,t)=>{const f=new FileReader;f.readAsArrayBuffer(o),f.onload=a=>{const{result:u}=a.target;e(u)},f.onerror=t}),h={modules:{ImageUploader:{upload(o){return new Promise((e,t)=>{const{type:f,size:a}=o;if(!E(f)){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),t(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const u=1024*1024*3;if(a>=u){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),t(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}async function r(){if(o){const i=new FileReader;i.onload=c=>{const n=new Image;n.onload=()=>{const O=`/v1/common/upload/image/${o.type.split("/")[1]}`;(async()=>{try{const N=await _(o),{data:P}=await Hn.get(O),T=P.image_url,b=P.upload_url,w={transformRequest(x,L){return delete L.common.Authorization,x},headers:{"Content-Type":o.type},withCredentials:!1};await Hn.put(b,N,w),e(T)}catch{m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),t(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"))}})()},n.src=c.target.result},i.readAsDataURL(o)}}r()})}},toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],["code","code-block"],[{list:"ordered"},{list:"bullet"}],["image","link"],["clean"]]},placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9..."};return B({editorContent:s}),(o,e)=>(ur(),sr(fr(Ar),{ref_key:"editorRef",ref:d,content:s.value,"onUpdate:content":e[0]||(e[0]=t=>s.value=t),theme:"snow","content-type":"html",options:h,placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9...",class:"quill-height-300px"},null,8,["content"]))}};export{tr as I,Nr as _}; diff --git a/assets/Editor.86746698.css b/assets/Editor.86746698.css new file mode 100644 index 0000000..39e5590 --- /dev/null +++ b/assets/Editor.86746698.css @@ -0,0 +1 @@ +.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\2022"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\2610"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px;margin-left:1px;margin-right:1px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover{background-color:#f3f4f6}.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{background-color:#dbeafe;color:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#2563eb}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#4b5563}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#4b5563;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#4b5563;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#4b5563}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#4b5563;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle;margin-right:1px;margin-left:1px}.ql-snow .ql-picker-label{cursor:pointer;display:flex;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding:5px 8px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#d1d5db;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:3px}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px;margin:2px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #d1d5db;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#d1d5db}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #d1d5db;box-shadow:0 0 5px #d1d5db;color:#4b5563;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #d1d5db;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #d1d5db;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#2563eb}.ql-container.ql-snow{border:1px solid #d1d5db}.image-uploading{position:relative;display:inline-block}.image-uploading img{max-width:98%!important;filter:blur(5px);opacity:.3}.image-uploading:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:3px solid #ccc;border-top-color:#1e986c;z-index:1;animation:spinner .6s linear infinite}@keyframes spinner{to{transform:rotate(360deg)}}.quill-height-300px{height:300px} diff --git a/assets/Email.9733385a.js b/assets/Email.9733385a.js new file mode 100644 index 0000000..572781a --- /dev/null +++ b/assets/Email.9733385a.js @@ -0,0 +1 @@ +import{n as D,a as r,c as u,b as e,h as v,i as a,F as $,q as x,w as f,v as y,R as U,Z as g,r as p,o as T,A as V,x as h,L as C,E as G,G as S}from"./index.4c40fcfd.js";const A={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},B={class:"card-body"},I={class:"card-title mb-3"},R={class:"mb-3 border-bottom"},q=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),z={class:"mb-3 border-bottom"},F=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),H={class:"table table-borderless"},N=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),O=["id","onUpdate:modelValue"],Z={class:"row"},J={class:"col-md-6"},K={class:"mb-3"},Q=e("label",{for:"mail_to",class:"form-label"},"\u767C\u9001\u4FE1\u7BB1",-1),W={class:"mb-3"},X=e("label",{for:"mail_title",class:"form-label"},"\u4FE1\u4EF6\u6A19\u984C",-1),Y={class:"mb-3"},ee=e("label",{for:"mail_time",class:"form-label"},"\u767C\u9001\u9031\u671F",-1),te=["value"],se={class:"mb-3"},le=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ae=e("br",null,null,-1),oe=["innerHTML"],ne={class:"d-flex justify-content-between mt-5"},ie={__name:"Email",props:{data:{type:Object,default:()=>({})},schedulesList:{type:Array,default:()=>[]}},emits:["emailTest","editEmail"],setup(m,{emit:c}){const E=m,{data:l}=D(E),w=(_,s)=>{const t=[];s.forEach(d=>{t.push({id:d.id,content:d.replace_keyword})}),c("emailTest",_,t)},i=(_,s)=>{const t={cht_name:s.cht_name,content:s.content,subject:s.subject,schedule_id:s.schedule_id};c("editEmail",_,t)};return(_,s)=>(r(),u("div",A,[e("div",B,[e("h4",I,v(a(l).cht_name)+"\u56DE\u994B ",1),e("div",R,[q,e("p",null,v(a(l).trigger_description),1)]),e("div",z,[F,e("table",H,[N,e("tbody",null,[(r(!0),u($,null,x(a(l).variables,t=>(r(),u("tr",{key:`email_${t.id}`},[e("td",null,v(t.cht_name),1),e("td",null,"{% "+v(t.name)+" %}",1),e("td",null,[f(e("input",{id:t.name,"onUpdate:modelValue":d=>t.replace_keyword=d,type:"text",class:"form-control"},null,8,O),[[y,t.replace_keyword]])])]))),128))])])]),e("div",Z,[e("div",J,[e("div",K,[Q,f(e("input",{id:"mail_to","onUpdate:modelValue":s[0]||(s[0]=t=>a(l).sender_mail=t),disabled:"",type:"text",class:"form-control",placeholder:"no-reply@hexschool.com"},null,512),[[y,a(l).sender_mail]])]),e("div",W,[X,f(e("input",{id:"mail_title","onUpdate:modelValue":s[1]||(s[1]=t=>a(l).subject=t),type:"text",class:"form-control",placeholder:"\u4F5C\u696D\u88AB\u6279\u6539"},null,512),[[y,a(l).subject]])]),e("div",Y,[ee,f(e("select",{id:"mail_time","onUpdate:modelValue":s[2]||(s[2]=t=>a(l).schedule_id=t),class:"form-select","aria-label":"Default select example"},[(r(!0),u($,null,x(m.schedulesList,t=>(r(),u("option",{key:`schedule_${t.id}`,value:t.id},v(t.cht_name),9,te))),128))],512),[[U,a(l).schedule_id]])])])]),e("div",se,[le,f(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=t=>a(l).content=t),class:"form-control",rows:"20"},null,512),[[y,a(l).content]]),ae,e("div",{innerHTML:a(l).content},null,8,oe)]),e("div",ne,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:s[4]||(s[4]=t=>w(a(l).id,a(l).variables,a(l).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:s[5]||(s[5]=t=>i(a(l).id,a(l)))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}},ce=()=>g.get("/v1/notify/email/list"),de=(m,c)=>g.put(`/v1/notify/email/template/${m}`,c),re=()=>g.get("/v1/notify/email/template/schedules"),ue=(m,c)=>g.post(`/v1/notify/email/template/${m}/test`,{variables:c}),me={apiGetEmailList:ce,apiPutEmailTemplate:de,apiGetSchedules:re,apiPostEmailTest:ue},_e={class:"px-4 mt-4"},pe=e("h4",{class:"mb-3"}," Email \u8A0A\u606F\u7BA1\u7406 ",-1),he={class:"row"},ve={class:"col-md-3"},fe={class:"list-group"},be=["onClick"],ye={class:"col-md-9"},we={__name:"Email",setup(m){const{apiGetEmailList:c,apiPutEmailTemplate:E,apiGetSchedules:l,apiPostEmailTest:w}=me,i=p(!1),_=p(!0),s=p(1),t=p(null),d=p({}),L=async()=>{try{i.value=!0;const{templates:o}=await c();t.value=o,[d.value]=o}catch(o){h("success","Email \u5217\u8868\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};T(()=>{L()});const k=p(null),M=async()=>{try{i.value=!0;const{schedules:o}=await l();k.value=o}catch(o){h("danger","\u9031\u671F\u6E05\u55AE\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};T(()=>{M()});const P=async(o,b)=>{try{i.value=!0;const{message:n}=await w(o,b);h("success","Email \u767C\u9001\u7D50\u679C",n)}catch(n){h("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}},j=async(o,b)=>{try{i.value=!0;const{message:n}=await E(o,b);h("success","Eamil \u6A23\u677F\u7DE8\u8F2F\u7D50\u679C",n),s.value=1,L()}catch(n){h("danger","\u7DE8\u8F2F Email \u6A23\u677F\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}};return(o,b)=>(r(),u("div",_e,[V(a(C),{active:i.value,"is-full-page":_.value,"z-index":1021},null,8,["active","is-full-page"]),pe,e("div",he,[e("div",ve,[e("div",fe,[(r(!0),u($,null,x(t.value,n=>(r(),u("a",{key:n.id,href:"#",class:G(["list-group-item",s.value===n.id?"active":""]),"aria-current":"true",onClick:S(ge=>(d.value=n,s.value=n.id),["prevent"])},v(n.cht_name),11,be))),128))])]),e("div",ye,[V(ie,{data:d.value,"schedules-list":k.value,onEmailTest:P,onEditEmail:j},null,8,["data","schedules-list"])])])]))}};export{we as default}; diff --git a/assets/Group.dcc9abfa.js b/assets/Group.dcc9abfa.js new file mode 100644 index 0000000..891ea4c --- /dev/null +++ b/assets/Group.dcc9abfa.js @@ -0,0 +1 @@ +import{r as d,s as X,z as P,a as c,e as j,f as C,A as u,b as e,E as L,w as K,C as H,M as Y,_ as Z,D as ee,o as se,c as _,v as te,O as ae,F as N,q as R,i as oe,x as B,B as le,G as ne,h as x,p as z,g as I,P as ie,S as de,T as re}from"./index.4c40fcfd.js";import{a as J}from"./task.e3c4a5ae.js";import{a as ce}from"./task-tags.c6557800.js";const ue={class:"row"},pe={class:"col-6"},ve={class:"mb-3"},me=e("label",{for:"taskGroupName",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1),_e={class:"col-6"},ke={class:"mb-3"},be=e("label",{for:"taskGroupKeyword",class:"form-label text-dark"},"\u82F1\u6587\u540D\u7A31",-1),fe={class:"mb-3"},ge=e("label",{for:"taskGroupDescription",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",-1),ye={class:"mb-3"},he=e("label",{for:"taskGroupEndDate",class:"form-label text-dark"},"\u5230\u671F\u65E5",-1),we={class:"form-check"},xe=e("label",{for:"taskGroupEnable",class:"form-check-label text-dark"},"\u662F\u5426\u986F\u793A",-1),Ge=["disabled"],$e={__name:"CreateTaskGroupModal",props:{tempTaskGroupData:{type:Object,default(){return{}}}},emits:["createTaskGroupMethod"],setup(G,{expose:q,emit:S}){const E=G,{apiPostTaskGroup:k}=J,m=d(),t=d({name:"",keyword:"",description:"",expired_at:"",enable:!1}),U=d(null);X(()=>{t.value=E.tempTaskGroupData});const V=async()=>{let g={};try{t.value.expired_at?g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),enable:t.value.enable}:g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,enable:t.value.enable},await k(g),S("createTaskGroupMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm(),t.value.enable=!1}catch(n){S("createTaskGroupMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.status}:${n.response.data.message}`})}};return q({createTaskGroupModalRef:U}),(g,n)=>{const y=P("Field"),$=P("ErrorMessage"),T=P("VForm");return c(),j(T,{ref_key:"formRef",ref:m,onSubmit:V},{default:C(({errors:b,invalid:M})=>[u(Y,{id:"createTaskGroupModal",ref_key:"createTaskGroupModalRef",ref:U,"has-footer":!0,title:"\u65B0\u589E\u4EFB\u52D9\u7FA4\u7D44","class-list":""},{body:C(()=>[e("div",ue,[e("div",pe,[e("div",ve,[me,u(y,{id:"taskGroupName",modelValue:t.value.name,"onUpdate:modelValue":n[0]||(n[0]=p=>t.value.name=p),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",class:"invalid-feedback"})])]),e("div",_e,[e("div",ke,[be,u(y,{id:"taskGroupKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":n[1]||(n[1]=p=>t.value.keyword=p),name:"\u82F1\u6587\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u82F1\u6587\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u82F1\u6587\u540D\u7A31",class:"invalid-feedback"})])])]),e("div",fe,[ge,u(y,{id:"taskGroupDescription",modelValue:t.value.description,"onUpdate:modelValue":n[2]||(n[2]=p=>t.value.description=p),as:"textarea",name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",class:"invalid-feedback"})]),e("div",ye,[he,u(y,{id:"taskGroupEndDate",modelValue:t.value.expired_at,"onUpdate:modelValue":n[3]||(n[3]=p=>t.value.expired_at=p),name:"\u5230\u671F\u65E5",type:"date",class:L(["form-control",{"is-invalid":b.\u5230\u671F\u65E5}])},null,8,["modelValue","class"]),u($,{name:"\u5230\u671F\u65E5",class:"invalid-feedback"})]),e("div",we,[K(e("input",{type:"checkbox",id:"taskGroupEnable",class:"form-check-input","onUpdate:modelValue":n[4]||(n[4]=p=>t.value.enable=p)},null,512),[[H,t.value.enable]]),xe])]),footer:C(()=>[e("button",{type:"submit",disabled:M,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Ge)]),_:2},1536)]),_:1},512)}}};const D=G=>(de("data-v-9c41d8b7"),G=G(),re(),G),Te={class:"taskGroups px-4 mt-4"},Me=D(()=>e("h1",{class:"fs-4 mb-3"},"\u4EFB\u52D9\u7FA4\u7D44",-1)),Ve={class:"d-flex justify-content-between align-items-center mb-3"},Le={class:"row w-75"},Ce={class:"col-md-6"},De=D(()=>e("p",{class:"mb-1"},"\u6A19\u7C64\u7BE9\u9078",-1)),Se={class:"list-unstyled d-flex flex-wrap mb-2"},Ee=["value","onClick","id"],Ue=["for"],Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ne={class:"card-body p-0"},Re={class:"table-responsive"},Be={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=D(()=>e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7FA4\u7D44\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u82F1\u6587\u540D\u7A31"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u662F\u5426\u986F\u793A"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1)),qe={class:"text-nowrap"},Ae={scope:"row",class:"ps-4"},Ie={scope:"row",class:"ps-4"},Ke={scope:"row",class:"ps-4"},Oe={key:0},ze={key:0},je={scope:"row",class:"ps-4"},He={scope:"row",class:"ps-4"},Je={scope:"row",class:"ps-4"},Qe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),We=["onClick"],Xe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Ye={class:"card-footer bg-white py-3"},Ze={class:"d-flex flex-wrap align-items-start"},es={__name:"Group",setup(G){const{apiGetTaskGroupsList:q}=J,{apiGetTaskTags:S}=ce,E=ee.useLoading(),k=d({taskGroupsList:[],pagination:{total:10,count:10,total_page:10,current_page:1}}),m=d(""),t=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_groups:l,pagination:F}=await q({page:o,scoped:m.value});k.value.taskGroupsList=l,k.value.pagination=F}catch(l){B("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode} : ${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},U=o=>{t(o)},V=d(""),g=d(null),n=d({}),y=(o,a)=>{o==="copy"?n.value={...a}:o==="add"&&(n.value={}),V.value.show()},$=o=>{o.type==="\u6210\u529F"?B("success","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44"):o.type==="\u5931\u6557"&&B("danger","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",o.error),V.value.hide(),t()},T=d({tagList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),b=d([]),M=d(1),p=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_tags:l,pagination:F}=await S({page:o,count:100});T.value.tagList=l,T.value.pagination=F,M.value=F.current_page,b.value=[...b.value,...l]}catch(l){B("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode}:${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},O=async(o=1)=>{await p(o),T.value.pagination.total_page!==0&&M.value!==T.value.pagination.total_page&&(M.value+=1,O(M.value))},A=d(!1),r=d(""),h=d([]),v=d(""),Q=()=>{r.value=r.value.trim(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()},W=o=>{h.value.includes(o)?h.value=h.value.filter(a=>a!==o):h.value.push(o),v.value=h.value.toString(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()};return se(async()=>{await t(),O(),V.value=new le(g.value.createTaskGroupModalRef.hModal)}),(o,a)=>{const f=P("router-link");return c(),_("div",Te,[Me,e("div",Ve,[e("div",Le,[e("div",Ce,[K(e("input",{onCompositionstart:a[0]||(a[0]=s=>A.value=!0),onCompositionend:a[1]||(a[1]=s=>A.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31\u3001\u82F1\u6587\u540D\u7A31",class:"form-control",type:"text","onUpdate:modelValue":a[2]||(a[2]=s=>r.value=s),onKeydown:a[3]||(a[3]=ae(ne(()=>{A.value||Q()},["prevent"]),["enter"]))},null,544),[[te,r.value]])])]),e("button",{type:"button",class:"btn btn-primary",onClick:a[4]||(a[4]=s=>y("add"))}," \u65B0\u589E\u7FA4\u7D44 ")]),De,e("ul",Se,[(c(!0),_(N,null,R(b.value,s=>(c(),_("li",{key:s.id,class:"me-2 mb-2"},[K(e("input",{type:"checkbox",class:"btn-check","onUpdate:modelValue":a[5]||(a[5]=i=>h.value=i),value:s.id,onClick:i=>W(s.id),id:`btn-tag-${s.id}`},null,8,Ee),[[H,h.value]]),e("label",{class:"btn btn-sm custom-btn-primary-tag",for:`btn-tag-${s.id}`},x(s.name),9,Ue)]))),128))]),e("div",Fe,[e("div",Ne,[e("div",Re,[e("table",Be,[Pe,e("tbody",qe,[(c(!0),_(N,null,R(k.value.taskGroupsList,s=>(c(),_("tr",{key:s.id,class:"align-middle"},[e("td",Ae,x(s.name),1),e("td",Ie,x(s.keyword),1),e("td",Ke,[s.user_groups.length===0?(c(),_("span",Oe,"\u7121")):z("",!0),(c(!0),_(N,null,R(s.user_groups,(i,w)=>(c(),j(f,{key:i.id,target:"_blank",to:`/admin/users/groups/${i.id}`},{default:C(()=>[I(x(i.name)+" ",1),s.user_groups.length>1&&w(c(),_("span",{key:i,class:"badge bg-light text-primary me-1"},x(i),1))),128))]),e("td",{scope:"row",class:L(["ps-4",{"text-success":s.enable}])},x(s.enable?"\u662F":"\u5426"),3),e("td",He,x(new Date(s.expired_at).toLocaleDateString("sv-SE")),1),e("td",Je,[u(f,{to:`/admin/task/group/${s.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:C(()=>[Qe,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),e("button",{class:"btn btn-sm btn-outline-gray ms-1",type:"button",onClick:i=>y("copy",s)},[Xe,I(" \u8907\u88FD ")],8,We)])]))),128))])])])]),e("div",Ye,[e("div",Ze,[u(oe(ie),{modelValue:k.value.pagination.current_page,"onUpdate:modelValue":a[6]||(a[6]=s=>k.value.pagination.current_page=s),records:k.value.pagination.total,"per-page":10,options:{chunk:6},onPaginate:U},null,8,["modelValue","records"])])])]),u($e,{ref_key:"createTaskGroupModalComponentRef",ref:g,"temp-task-group-data":n.value,onCreateTaskGroupMethod:$},null,8,["temp-task-group-data"])])}}},ls=Z(es,[["__scopeId","data-v-9c41d8b7"]]);export{ls as default}; diff --git a/assets/Group.ef60d323.css b/assets/Group.ef60d323.css new file mode 100644 index 0000000..5300a16 --- /dev/null +++ b/assets/Group.ef60d323.css @@ -0,0 +1 @@ +.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-gray-100);color:var(--bs-primary)}.custom-btn-primary-tag[data-v-9c41d8b7]:hover{background-color:var(--bs-gray-200)}.btn-check:checked+.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-primary);color:var(--bs-gray-300)} diff --git a/assets/GroupDetail.6e8f4b29.css b/assets/GroupDetail.6e8f4b29.css new file mode 100644 index 0000000..dcef1b0 --- /dev/null +++ b/assets/GroupDetail.6e8f4b29.css @@ -0,0 +1 @@ +.card-body[data-v-1ed1d075]{height:200px;overflow-y:auto} diff --git a/assets/GroupDetail.7239180e.js b/assets/GroupDetail.7239180e.js new file mode 100644 index 0000000..6c134e5 --- /dev/null +++ b/assets/GroupDetail.7239180e.js @@ -0,0 +1 @@ +import{_ as le,l as ne,D as ie,r,s as re,o as ce,z as D,a as _,c as v,b as e,A as m,f as z,x as k,g as j,E as T,F as S,q as $,w as h,C as N,h as F,v as M,R as de,S as ue,T as pe,y as _e}from"./index.4c40fcfd.js";import{a as ve}from"./task.e3c4a5ae.js";import{a as he}from"./task-tags.c6557800.js";const i=y=>(ue("data-v-1ed1d075"),y=y(),pe(),y),me={class:"taskGroupDetail px-4 mt-4"},fe={class:"border-bottom border-light pb-2 mb-3"},ge={"aria-label":"breadcrumb"},be={class:"breadcrumb"},ke={class:"breadcrumb-item"},ye=i(()=>e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44 ",-1)),Ge=i(()=>e("h1",{class:"fs-4"},"\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44",-1)),Le={class:"row"},we={class:"col-md-6"},xe={class:"mb-3"},De=i(()=>e("label",{for:"taskGroupInfoName",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1)),Ce={class:"col-md-6"},Ee={class:"mb-3"},Ve=i(()=>e("label",{for:"taskGroupInfoKeyword",class:"form-label"},"\u82F1\u6587\u540D\u7A31",-1)),Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-3"},Ie=i(()=>e("div",{class:"card-header bg-white py-3"}," \u5206\u985E\u6A19\u7C64 ",-1)),Te={class:"list-unstyled mb-0"},Se={class:"form-check"},$e=["value","id","checked"],Ne=["for"],Fe=i(()=>e("hr",null,null,-1)),Me={class:"mb-3"},Re=i(()=>e("label",{for:"taskGroupDescription",class:"form-label"},"\u63CF\u8FF0",-1)),Ke={class:"row"},He={class:"col-md-6"},qe={class:"mb-3"},Ae=i(()=>e("label",{class:"form-label",for:"groupEnd"},"\u5230\u671F\u65E5",-1)),Be={class:"form-check mb-3"},Oe=["checked"],Pe=i(()=>e("label",{class:"form-check-label",for:"showCheck"}," \u662F\u5426\u986F\u793A ",-1)),ze=i(()=>e("hr",null,null,-1)),je={class:"my-3"},Je=i(()=>e("label",{class:"form-label",for:"userGroup"},"\u5C0D\u61C9\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),Qe=i(()=>e("option",{value:"choose"},"\u9078\u64C7\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),We=i(()=>e("option",{value:""},"\u4E0D\u8A2D\u5B9A",-1)),Xe=[Qe,We],Ye={class:"card-header bg-white py-3"},Ze={class:"row align-items-center justify-content-between"},es={class:"col"},ss=i(()=>e("p",{class:"mb-sm-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868",-1)),as={class:"small my-1"},os={class:"col-sm-6"},ts={class:"input-group"},ls={class:"list-unstyled mb-0"},ns={class:"form-check"},is=["value","id","checked"],rs=["for"],cs=i(()=>e("hr",null,null,-1)),ds=i(()=>e("button",{type:"submit",class:"btn btn-primary d-block ms-auto"}," \u78BA\u8A8D\u66F4\u65B0 ",-1)),us={__name:"GroupDetail",setup(y){const{apiGetTaskGroupDetail:J,apiPutTaskGroupDetail:Q}=ve,{apiGetUserGroups:W}=_e,{apiGetTaskTags:X}=he,Y=ne(),C=ie.useLoading(),u=r(""),p=r([]),t=r({}),R=async a=>{var c,n;const s=C.show();try{const{task_group:l}=await J(a);t.value={...l},t.value.expired_at=new Date(t.value.expired_at).toLocaleDateString("sv-SE"),t.value.user_groups.length!==0&&(u.value="choose",t.value.user_groups.forEach(d=>{p.value.push(d.id)}))}catch(l){k("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide()}},Z=()=>{u.value===""&&(p.value=[])},f=r([]),ee=()=>{f.value.forEach(a=>{t.value.user_groups.forEach(s=>{a.id===s.id&&(a.isChecked=!0,p.value.includes(a.id)||p.value.push(a.id))})})},G=r({userGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),K=r(1),E=r(!1),L=r(""),V=async({page:a=1,keyword:s=""}={})=>{const c=C.show();E.value=!0;try{const{groups:n,pagination:l}=await W({page:a,keyword:s});n.forEach(d=>{d.isChecked=!1}),G.value.userGroupsList=n,G.value.pagination=l,K.value=l.current_page,a===1?f.value=n:f.value=[...f.value,...n],ee()}catch(n){k("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${n.response.data.statusCode}:${n.response.data.message}`)}finally{c.hide(),E.value=!1}},H=r(null),q=()=>{const a=H.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(E.value||G.value.pagination.current_page===G.value.pagination.total_page)return;V({page:K.value+1,keyword:L.value})}})};re(u,a=>{a==="choose"&&q()});const g=r([]),w=r([]),se=()=>{w.value.forEach(a=>{t.value.tags.forEach(s=>{a.name===s&&g.value.indexOf(a.id)===-1&&(a.isChecked=!0,g.value.push(a.id))})})},x=r({tagsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),A=r(1),U=r(!1),B=async(a=1)=>{var c,n;const s=C.show();U.value=!0;try{const{task_tags:l,pagination:d}=await X({page:a});l.forEach(b=>{b.isChecked=!1}),x.value.tagsList=l,x.value.pagination=d,A.value=d.current_page,w.value=[...w.value,...l],se()}catch(l){k("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide(),U.value=!1}},O=r(null),ae=()=>{const a=O.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(U.value||x.value.pagination.current_page===x.value.pagination.total_page)return;B(A.value+1)}})},oe=async a=>{try{const s={name:t.value.name,tag_ids:[...g.value],description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),user_group_ids:[...p.value],enable:!!t.value.enable};await Q(a,s),k("success","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44"),R(a)}catch(s){k("danger","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${s.response.data.statusCode}:${s.response.data.message}`)}},te=()=>{V({page:1,keyword:L.value})};return ce(async()=>{const{id:a}=Y.params;await R(a),V(),B(),u.value==="choose"&&q(),ae()}),(a,s)=>{const c=D("router-link"),n=D("Field"),l=D("ErrorMessage"),d=D("VForm");return _(),v("div",me,[e("header",fe,[e("nav",ge,[e("ol",be,[e("li",ke,[m(c,{to:"/admin/task/group"},{default:z(()=>[j(" \u4EFB\u52D9\u7FA4\u7D44 ")]),_:1})]),ye])]),Ge]),m(d,{ref:"taskGroupForm",onSubmit:s[9]||(s[9]=b=>oe(t.value.id))},{default:z(({errors:b})=>{var P;return[e("div",Le,[e("div",we,[e("div",xe,[De,m(n,{id:"taskGroupInfoName",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=o=>t.value.name=o),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoName}]),rules:"required"},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoName",class:"invalid-feedback"})])]),e("div",Ce,[e("div",Ee,[Ve,m(n,{disabled:"",id:"taskGroupInfoKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":s[1]||(s[1]=o=>t.value.keyword=o),name:"taskGroupInfoKeyword",label:"\u82F1\u6587\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoKeyword}]),rules:{required:!0}},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoKeyword",class:"invalid-feedback"})])])]),e("div",Ue,[Ie,e("div",{class:"card-body",ref_key:"tagListRef",ref:O},[e("ul",Te,[(_(!0),v(S,null,$(w.value,o=>(_(),v("li",{key:o.id},[e("div",Se,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=I=>g.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,$e),[[N,g.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,Ne)]),Fe]))),128))])],512)]),e("div",Me,[Re,h(e("textarea",{class:"form-control",id:"taskGroupDescription","onUpdate:modelValue":s[3]||(s[3]=o=>t.value.description=o),placeholder:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0"},null,512),[[M,t.value.description]])]),e("div",Ke,[e("div",He,[e("div",qe,[Ae,h(e("input",{type:"date",class:"form-control",id:"groupEnd","onUpdate:modelValue":s[4]||(s[4]=o=>t.value.expired_at=o)},null,512),[[M,t.value.expired_at]])])])]),e("div",Be,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=o=>t.value.enable=o),checked:t.value.enable,id:"showCheck"},null,8,Oe),[[N,t.value.enable]]),Pe]),ze,e("div",je,[Je,h(e("select",{class:"form-select",id:"userGroup",onChange:Z,"onUpdate:modelValue":s[6]||(s[6]=o=>u.value=o)},Xe,544),[[de,u.value]])]),e("div",{class:T(["card shadow-sm rounded-4 overflow-hidden mb-4",u.value?"d-block":"d-none"])},[e("div",Ye,[e("div",Ze,[e("div",es,[ss,e("p",as,[j(" \u5DF2\u9078\u64C7\u7684\u7FA4\u7D44\uFF1A "),(_(!0),v(S,null,$((P=t.value)==null?void 0:P.user_groups,o=>(_(),v("span",{key:o.id,class:"badge rounded-pill bg-dark mx-1"},F(o.name),1))),128))])]),e("div",os,[e("div",ts,[h(e("input",{type:"text",class:"form-control",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":s[7]||(s[7]=o=>L.value=o)},null,512),[[M,L.value]]),e("button",{class:"btn btn-secondary",type:"button",onClick:te},"\u641C\u5C0B")])])])]),e("div",{class:"card-body",ref_key:"userGroupsListRef",ref:H},[e("ul",ls,[(_(!0),v(S,null,$(f.value,o=>(_(),v("li",{key:o.id},[e("div",ns,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=I=>p.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,is),[[N,p.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,rs)]),cs]))),128))])],512)],2),ds]}),_:1},512)])}}},ms=le(us,[["__scopeId","data-v-1ed1d075"]]);export{ms as default}; diff --git a/assets/LoginVertify.97d3e7f5.js b/assets/LoginVertify.97d3e7f5.js new file mode 100644 index 0000000..ea47b34 --- /dev/null +++ b/assets/LoginVertify.97d3e7f5.js @@ -0,0 +1 @@ +import{_ as c,r as d,u as r,o as l,a as _,c as f,b as e,w as u,v as m,d as v}from"./index.4c40fcfd.js";const y={name:"LoginVertify",setup(){const s=d(""),o=d(""),i=r();function t(){v.put("/v1/user/login/verify",{account:s.value,verify_code:o.value}).then(n=>{n.data.message==="\u6210\u529F"&&(document.cookie=`h_MqhC49RxFRI6pR3Z_token=${n.data.access_token};`,i.push("/"))})}return l(()=>{s.value=window.sessionStorage.getItem("H_temp_mail_store")}),{verifyCode:o,verify:t}}},h={class:"container"},p={class:"row justify-content-center"},b={class:"col-md-6"},w={class:"card shadow-sm rounded-4 overflow-hidden mt-5"},g=e("div",{class:"card-header bg-white d-flex justify-content-between align-items-center py-3"},[e("h5",{class:"mb-0"}," \u767B\u5165\u9A57\u8B49 ")],-1),x={class:"card-body display-12 fw-normal"},k={class:"mb-3"},C=e("label",{for:"add_mail",class:"form-label"},"\u9A57\u8B49\u78BC",-1),R={class:"d-flex justify-content-end"};function V(s,o,i,t,n,j){return _(),f("div",h,[e("div",p,[e("div",b,[e("div",w,[g,e("div",x,[e("div",k,[C,u(e("input",{id:"add_mail","onUpdate:modelValue":o[0]||(o[0]=a=>t.verifyCode=a),type:"email",class:"form-control"},null,512),[[m,t.verifyCode]])]),e("div",R,[e("button",{class:"btn btn-primary",onClick:o[1]||(o[1]=(...a)=>t.verify&&t.verify(...a))}," \u9A57\u8B49 ")])])])])])])}const M=c(y,[["render",V]]);export{M as default}; diff --git a/assets/Message.adb2400d.js b/assets/Message.adb2400d.js new file mode 100644 index 0000000..8486254 --- /dev/null +++ b/assets/Message.adb2400d.js @@ -0,0 +1 @@ +import{r as m,n as V,a as r,c as u,b as e,h as g,i as d,F as k,q as C,w as S,v as F,A as $,k as A,_ as E,j as D,G as w,E as M,p as U,S as H,T as N,o as I,d as b,x as f,L as z}from"./index.4c40fcfd.js";import{_ as B}from"./Editor.52546d8d.js";import{g as R}from"./date.67a388f5.js";const P={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},q={class:"card-body"},G={class:"card-title mb-3"},O={class:"mb-3 border-bottom"},J=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),K={class:"mb-3 border-bottom"},Q=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),W={class:"table table-borderless"},X=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),Y=["id","onUpdate:modelValue"],Z=A('
',1),ee={class:"mb-3"},se=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),te={class:"d-flex justify-content-between mt-5"},ae={__name:"Message",props:{data:{type:Object,default:()=>({})}},emits:["messageTest","editMessage"],setup(h,{emit:t}){const x=h,p=m(null),{data:o}=V(x),_=(v,n)=>{const s=[];n.forEach(a=>{s.push({id:a.id,content:a.replace_keyword})}),t("messageTest",v,s)},y=(v,n)=>{const s={cht_name:n.cht_name,content:p.value.editorContent};t("editMessage",v,s)};return(v,n)=>(r(),u("div",P,[e("div",q,[e("h4",G,g(d(o).cht_name)+"\u56DE\u994B ",1),e("div",O,[J,e("p",null,g(d(o).trigger_description),1)]),e("div",K,[Q,e("table",W,[X,e("tbody",null,[(r(!0),u(k,null,C(d(o).variables,s=>(r(),u("tr",{key:`message_${s.id}`},[e("td",null,g(s.cht_name),1),e("td",null,"{% "+g(s.name)+" %}",1),e("td",null,[S(e("input",{id:s.name,"onUpdate:modelValue":a=>s.replace_keyword=a,type:"text",class:"form-control"},null,8,Y),[[F,s.replace_keyword]])])]))),128))])])]),Z,e("div",ee,[se,$(B,{ref_key:"editorRef",ref:p,content:d(o).content},null,8,["content"])]),e("div",te,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:n[0]||(n[0]=s=>_(d(o).id,d(o).variables,d(o).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:n[1]||(n[1]=s=>y(d(o).id,h.data))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}};const T=h=>(H("data-v-05efe2fc"),h=h(),N(),h),ne={class:"mt-5"},oe={class:"right dropdown-container expanded"},le={id:"notification",class:"position-fixed",style:{bottom:"30px",right:"40px","z-index":"10000"}},ie=T(()=>e("span",{class:"material-icons"}," notifications ",-1)),ce=[ie],de={class:"tabs"},re={class:"h_tabs-nav d-flex p-0 list-unstyled"},ue={class:"h_notice_content"},_e={key:0,id:"h_unread_notice",class:"h_notice_area"},he={class:"d-flex"},pe=T(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),ve={class:"media-body ms-2"},me=["innerHTML"],fe={class:"d-inline-block text-muted"},ge={style:{width:"10px"}},ye=["onClick"],be={key:1,d:"h_all_notice",class:"h_notice_area"},xe={class:"d-flex"},$e=T(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),we={class:"media-body ms-2"},Me=["innerHTML"],ke={class:"d-inline-block text-muted"},Ce=["onClick"],Le={__name:"MessageFront",props:{data:{type:Array}},emits:["readMessage","unreadMessage"],setup(h,{emit:t}){const x=h,{data:p}=V(x),o=m(!1),_=m("h_unread_notice"),y=D(()=>p.value.filter(n=>!!n.has_read).reverse()),v=D(()=>p.value.filter(n=>!n.has_read).reverse());return(n,s)=>(r(),u("div",ne,[e("div",oe,[e("div",le,[e("a",{href:"#","data-dropdown":"notificationMenu",class:"notification-icon d-flex align-items-center justify-content-center rounded-circle text-decoration-none text-primary",onClick:s[0]||(s[0]=w(a=>o.value=!o.value,["prevent"]))},ce)]),e("ul",{name:"notificationMenu",class:M(["h_dropdown shadow bg-white m-0 p-0 rounded-4 overflow-hidden",{show:o.value}])},[e("div",de,[e("ul",re,[e("li",{class:M(["flex-fill",{"tab-active":_.value=="h_unread_notice"}])},[e("a",{href:"#h_unread_notice",onClick:s[1]||(s[1]=w(a=>_.value="h_unread_notice",["prevent"]))}," \u672A\u8B80\u901A\u77E5 ")],2),e("li",{class:M(["flex-fill",{"tab-active":_.value=="h_all_notice"}])},[e("a",{href:"#h_all_notice",onClick:s[2]||(s[2]=w(a=>_.value="h_all_notice",["prevent"]))}," \u5DF2\u8B80\u901A\u77E5 ")],2)]),e("div",ue,[_.value=="h_unread_notice"?(r(),u("div",_e,[e("div",null,[(r(!0),u(k,null,C(d(v),a=>(r(),u("li",{key:a.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",he,[pe,e("div",ve,[e("p",{class:"mt-0 mb-0",innerHTML:a.content},null,8,me),e("small",null,[e("span",fe,g(d(R)(a.create_time)),1)])])]),e("div",ge,[e("span",{class:"un read",onClick:L=>t("readMessage",a.id)},null,8,ye)])]))),128))])])):U("",!0),_.value=="h_all_notice"?(r(),u("div",be,[e("div",null,[(r(!0),u(k,null,C(d(y),a=>(r(),u("li",{key:a.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",xe,[$e,e("div",we,[e("p",{class:"mt-0 mb-0",innerHTML:a.content},null,8,Me),e("small",null,[e("span",ke,g(d(R)(a.create_time)),1)])])]),e("span",{class:"read",onClick:L=>t("unreadMessage",a.id)},null,8,Ce)]))),128))])])):U("",!0)])])],2)])]))}},Te=E(Le,[["__scopeId","data-v-05efe2fc"]]),De={class:"px-4 mt-4"},Ue=e("h4",{class:"mb-3"}," \u7AD9\u5167\u901A\u77E5\u8A0A\u606F ",-1),Ie={class:"row"},Re={class:"col-md-3"},Ve={class:"list-group"},je=["onClick"],Se={class:"col-md-9"},Ne={__name:"Message",setup(h){const t=m(!1),x=m(!0),p=m(1),o=m(null),_=m({}),y=async()=>{try{t.value=!0;const l=await b.get("/v1/notify/message/list");o.value=l.data.templates,[_.value]=o.value}catch(l){f("danger","\u901A\u77E5\u5217\u8868\u51FA\u73FE\u932F\u8AA4",l.response.data.message)}finally{t.value=!1}};I(()=>{y()});const v=m([]),n=async()=>{try{t.value=!0;const l="https://dev-hexsystem-user.hexschool.io/v1/notify/message/list",i=await b.get(l);v.value=i.data.messages}catch(l){f("danger","\u53D6\u5F97\u7AD9\u5167\u8A0A\u606F\u5931\u6557",l.response.data.message)}finally{t.value=!1}};I(()=>{n()});const s=async l=>{try{t.value=!0;const i=`https://dev-hexsystem-user.hexschool.io/v1/notify/message/${l}/read`;await b.put(i),n()}catch(i){f("danger","\u5DF2\u8B80\u5931\u6557",i.response.data.message)}finally{t.value=!1}},a=async l=>{try{t.value=!0;const i=`https://dev-hexsystem-user.hexschool.io/v1/notify/message/${l}/unread`;await b.put(i),n()}catch(i){f("danger","\u5DF2\u8B80\u5931\u6557",i.response.data.message)}finally{t.value=!1}},L=async(l,i)=>{try{t.value=!0;const c=await b.post(`/v1/notify/message/template/${l}/test`,{variables:i});f("success","\u901A\u77E5\u6E2C\u8A66\u7D50\u679C",c.data.message),n()}catch(c){f("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",c.response.data.message)}finally{t.value=!1}},j=async(l,i)=>{try{t.value=!0;const c=await b.put(`/v1/notify/message/template/${l}`,i);f("success","\u901A\u77E5\u6A23\u677F\u66F4\u65B0\u7D50\u679C",c.data.message),p.value=1,y()}catch(c){f("danger","\u7DE8\u8F2F\u7AD9\u5167\u8A0A\u606F\u6A23\u677F\u51FA\u73FE\u932F\u8AA4",c.response.data.message)}finally{t.value=!1}};return(l,i)=>(r(),u("div",De,[$(d(z),{active:t.value,"is-full-page":x.value,"z-index":1021},null,8,["active","is-full-page"]),Ue,e("div",Ie,[e("div",Re,[e("div",Ve,[(r(!0),u(k,null,C(o.value,c=>(r(),u("a",{key:c.id,href:"#",class:M(["list-group-item",p.value===c.id?"active":""]),onClick:w(Fe=>(_.value=c,p.value=c.id),["prevent"])},g(c.cht_name),11,je))),128))])]),e("div",Se,[$(ae,{data:_.value,onMessageTest:L,onEditMessage:j},null,8,["data"]),$(Te,{data:v.value,onReadMessage:s,onUnreadMessage:a},null,8,["data"])])])]))}};export{Ne as default}; diff --git a/assets/Message.e7732d7d.css b/assets/Message.e7732d7d.css new file mode 100644 index 0000000..29edfc1 --- /dev/null +++ b/assets/Message.e7732d7d.css @@ -0,0 +1 @@ +.notification-icon[data-v-05efe2fc]{width:52px;height:52px;font-size:22px;border:4px solid;background-color:var(--bs-gray-100)}.notification-icon[data-v-05efe2fc]:hover{background-color:var(--bs-gray-300)}.h_dropdown[data-v-05efe2fc]{z-index:100000;position:fixed;right:40px;bottom:110px;max-width:350px;min-width:350px;display:none}.h_dropdown.show[data-v-05efe2fc]{display:block}.h_tabs-nav li.tab-active a[data-v-05efe2fc]{background:transparent;border-bottom:2px solid var(--bs-primary);color:var(--bs-primary);cursor:default}.h_tabs-nav li a[data-v-05efe2fc]{background:var(--bs-gray-300);border-bottom:2px solid var(--bs-gray-300);color:var(--bs-secondary);display:block;padding:10px 0;text-align:center;text-decoration:none}.h_notice_content[data-v-05efe2fc]{height:auto;max-height:250px;overflow-y:auto}.notification-group[data-v-05efe2fc]{border-bottom:1px solid #e9ecef;overflow:hidden;min-height:65px;cursor:pointer}.read[data-v-05efe2fc]{width:12px;display:block;height:12px;border-radius:50%;border:2px solid var(--bs-primary)}.read.un[data-v-05efe2fc]{background:var(--bs-primary)} diff --git a/assets/SurveysDetail.0a67fffd.css b/assets/SurveysDetail.0a67fffd.css new file mode 100644 index 0000000..bbf1035 --- /dev/null +++ b/assets/SurveysDetail.0a67fffd.css @@ -0,0 +1 @@ +.rounded-box[data-v-84aaa1f9]{min-width:36px;min-height:36px}.progress[data-v-84aaa1f9]{border-radius:24px}.progress-bar[data-v-84aaa1f9]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-84aaa1f9]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-84aaa1f9]{left:0;right:0;bottom:-20px}[data-v-84aaa1f9] span.vue-star-rating-star{display:flex}.pre-line[data-v-84aaa1f9]{white-space:pre-line}.rotate-90[data-v-84aaa1f9]{transform:rotate(-90deg)}.transition-all[data-v-84aaa1f9]{transition:all .5s} diff --git a/assets/SurveysDetail.59f295aa.js b/assets/SurveysDetail.59f295aa.js new file mode 100644 index 0000000..d48379c --- /dev/null +++ b/assets/SurveysDetail.59f295aa.js @@ -0,0 +1,3 @@ +import{d as We,a1 as Fe,_ as Ae,D as He,l as Xe,r as C,m as Ye,o as Ze,a as c,c as u,b as t,F,q as A,e as Je,p as f,A as Ce,i as q,x as w,Y as H,h as b,g as P,G as X,w as ke,v as $e,E as z,P as Ke,S as Qe,T as Ie,a2 as es}from"./index.4c40fcfd.js";import{C as ss,V as ts}from"./CoursesSurveys.e889c660.js";import{g as Y}from"./date.67a388f5.js";import{a as as}from"./surveys.9338b3b0.js";const Z=We.create({baseURL:"https://dev-hexsystem-user.hexschool.io",withCredentials:!0,xsrfHeaderName:"xsrf-token",xsrfCookieName:"xsrf-token",withXSRFToken:!0,headers:{Authorization:`Bearer ${Fe("h_MqhC49RxFRI6pR3Z_token")}`}}),ls=g=>{const[B,E]=window.location.href.split("#"),{status:G}=g.response;switch(G){case 401:window.location.href=`https://dev-hex-user.hexschool.io/#/login?h_redirect=${B}&h_path=${E}`;break}return Promise.reject(g)};Z.interceptors.request.use(g=>g,g=>Promise.reject(g));Z.interceptors.response.use(g=>g.data,g=>ls(g));const is=()=>Z.get("/v1/user/personal/profile"),os={apiGetUserPersonalInfo:is};const k=g=>(Qe("data-v-84aaa1f9"),g=g(),Ie(),g),ns={class:"surveys px-4 mt-4 position-relative"},ds=k(()=>t("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9 ",-1)),rs={class:"row gx-3 gy-2 align-items-center my-2"},cs={class:"col-md-6"},us={class:"row gx-3 gy-2 align-items-center"},ps={class:"col-md-8 d-flex align-items-center"},hs=k(()=>t("label",{for:"inputState",class:"form-label flex-shrink-0 me-2 mb-0"},"\u7BE9\u9078\u65B9\u5F0F",-1)),vs=k(()=>t("option",{value:""}," \u5168\u90E8\u8A55\u50F9 ",-1)),_s=k(()=>t("option",{value:"has_reply=0"}," \u672A\u56DE\u8986 ",-1)),ys=k(()=>t("option",{value:"has_reply=1"}," \u5DF2\u56DE\u8986 ",-1)),ws=k(()=>t("option",{value:"has_content=1"}," \u6709\u8A55\u8AD6 ",-1)),gs=["value"],fs={class:"card mt-4"},bs=k(()=>t("div",{class:"card-header bg-primary text-white"},[t("h2",{class:"h4 m-2"}," \u5B78\u54E1\u56DE\u994B ")],-1)),Cs={class:"card-body bg-light"},ks={class:"list-unstyled"},$s={class:"card"},xs={class:"card-body d-flex shadow-sm"},ms=["src","alt"],Vs={class:"ms-2"},Rs={class:"d-flex align-items-center m-0",style:{height:"40px"}},Ss=["onClick"],Ds=k(()=>t("span",{class:"material-icons align-bottom ms-2 text-muted"}," disabled_visible ",-1)),Ps=[Ds],Ts=["onClick"],Ls=k(()=>t("span",{class:"material-icons align-bottom ms-2"}," disabled_visible ",-1)),qs={class:"d-flex align-items-center my-2"},Us={class:"text-muted ms-1"},js=["onClick"],zs={key:1,class:"card bg-light",style:{width:"752px"}},Bs={class:"card-body"},Es={class:"d-flex align-items-center"},Gs=["src"],Ms={class:"ms-2 mb-0"},Os={key:0,class:"text-muted"},Ns={key:0,class:"mt-3"},Ws={class:"pre-line"},Fs={key:1},As=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),Hs=["onClick"],Xs={key:3,class:"d-flex justify-content-between"},Ys=["onClick"],Zs={class:"mb-0"},Js=["onClick"],Ks={class:"card-footer bg-white d-flex"},Qs={class:"ms-5"},Is={class:"my-3"},et=["onClick"],st={key:0},tt={class:"row"},at={class:"rounded-box bg-primary text-white d-flex justify-content-center align-items-center rounded-pill me-2"},lt={class:"m-0"},it={key:0},ot=k(()=>t("p",{class:"text-muted"}," \u7D66\u8001\u5E2B\u7684\u6084\u6084\u8A71 ",-1)),nt=["onClick"],dt={key:1,class:"card bg-light",style:{width:"752px"}},rt={class:"card-body"},ct={class:"d-flex align-items-center"},ut=["src"],pt={class:"ms-2 mb-0"},ht={key:0,class:"text-muted"},vt={key:0,class:"mt-3"},_t={class:"pre-line"},yt={key:1},wt=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),gt=["onClick"],ft={key:3,class:"d-flex justify-content-between"},bt=["onClick"],Ct={class:"mb-0"},kt=["onClick"],$t={class:"d-flex justify-content-end"},xt={__name:"SurveysDetail",setup(g){const{apiGetVideoCoursesDetail:B,apiGetVideoCoursesComments:E,apiGetVideoCoursesComment:G,apiPutVideoCoursesCommentsDisplay:xe,apiDeleteVideoCoursesCommentsDisplay:me,apiPostVideoCoursesCommentsReplys:Ve,apiPutVideoCoursesCommentsReplys:Re,apiPostVideoCoursesWhispers:Se,apiPutVideoCoursesWhispers:De}=as,{apiGetUserPersonalInfo:Pe}=os,x=He.useLoading(),Te=Xe(),U={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},p=C({new:!1,edit:!1,id:null}),h=C({new:!1,edit:!1,id:null}),J=C(null),K=C(null),M=Ye({}),m=C(null),O=C({}),Le=async l=>{var e,s,r,i;const d=x.show();try{const{review:a}=await B(l);O.value=a}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},Q=C([]);let N=[];const qe=()=>{const l=[];Q.value.forEach(e=>{e&&l.push(e)}),N=[].slice.call(l).map(e=>new es(e))},I=C([]),V=C({current_page:1,total:0}),D=async(l,d=M.name)=>{var s,r,i,a;const e=x.show();try{const{comments:o,pagination:_}=await E({videoCourseId:m.value,page:l,scoped:d});I.value=o,V.value=_}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await H(),qe()}},T=C({}),Ue=async()=>{var d,e,s,r;const l=x.show();try{const{profile:i}=await Pe();T.value=i}catch(i){w("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u8CC7\u8A0A\u5931\u6557",`${(e=(d=i==null?void 0:i.response)==null?void 0:d.data)==null?void 0:e.statusCode}:${(r=(s=i==null?void 0:i.response)==null?void 0:s.data)==null?void 0:r.message}`)}finally{l.hide()}};Ze(async()=>{const{id:l}=Te.params;m.value=l,await D(),Le(l),Ue()});const je=async l=>{var e,s,r,i;const d=x.show();try{await xe(m.value,l),await D(V.value.current_page),w("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u89E3\u9664\u96B1\u85CF")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},ze=async l=>{var e,s,r,i;const d=x.show();try{await me(m.value,l),await D(V.value.current_page),w("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u96B1\u85CF")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},R=C(""),Be=async l=>{var e,s,r,i;const d=x.show();try{await Ve(m.value,l,{content:R.value}),p.value.new=!1,p.value.id="",await D(V.value.current_page),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},Ee=async(l,d)=>{var s,r,i,a;const e=x.show();try{const o={videoCourseId:m.value,commentId:l,replyId:d,body:{content:R.value}};await Re(o),p.value.edit=!1,p.value.id="",await D(V.value.current_page),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide()}},j=async l=>{await H(),l==="whisper"&&K.value[0].focus(),l==="comment"&&J.value[0].focus()},n=C([]),W=async(l,d)=>{var s,r,i,a;const e=x.show();try{const{review:o}=await G(m.value,l);o.status=!0,n.value[d]=o}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await H(),N[d].show()}},Ge=l=>{M.name=l.target.value,n.value=[],D(1,M.name)},S=C(""),Me=async(l,d,e)=>{var r,i,a,o;const s=x.show();try{const _={videoCourseId:m.value,commentId:l,whisperId:d,body:{content:S.value}};await Se(_),h.value.new=!1,h.value.id=null,await W(l,e),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(_){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(i=(r=_==null?void 0:_.response)==null?void 0:r.data)==null?void 0:i.statusCode}:${(o=(a=_==null?void 0:_.response)==null?void 0:a.data)==null?void 0:o.message}`)}finally{s.hide()}},Oe=async(l,d,e,s)=>{var i,a,o,_;const r=x.show();try{const $={videoCourseId:m.value,commentId:l,whisperId:d,replyId:e,body:{content:S.value}};await De($),h.value.edit=!1,h.value.id=null,await W(l,s),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch($){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(a=(i=$==null?void 0:$.response)==null?void 0:i.data)==null?void 0:a.statusCode}:${(_=(o=$==null?void 0:$.response)==null?void 0:o.data)==null?void 0:_.message}`)}finally{r.hide()}},Ne=l=>{n.value[l].status=!n.value[l].status,N[l].toggle()},ee=(l,d,e)=>l?d||"https://fakeimg.pl/300/":e&&e||"https://fakeimg.pl/300/";return(l,d)=>(c(),u("div",ns,[ds,t("form",rs,[t("div",cs,[t("div",us,[t("div",ps,[hs,t("select",{class:"form-select",onChange:d[0]||(d[0]=e=>Ge(e))},[vs,_s,ys,ws,(c(),u(F,null,A(5,e=>t("option",{key:`sating${e}`,value:`rating=${6-e}`},b(6-e)+"\u661F\u8A55\u8AD6 ",9,gs)),64))],32)])])])]),O.value.id?(c(),Je(ss,{key:0,data:O.value},null,8,["data"])):f("",!0),t("div",fs,[bs,t("div",Cs,[t("ul",ks,[(c(!0),u(F,null,A(I.value,(e,s)=>{var r,i,a,o,_,$,se,te,ae,le,ie,oe,ne,de,re,ce,ue,pe,he,ve,_e,ye,we,ge,fe;return c(),u("li",{key:e.id,class:"mb-4"},[t("div",$s,[t("div",xs,[t("img",{src:e.avatar,width:"40",height:"40",class:"rounded-pill",alt:e.nickname},null,8,ms),t("div",Vs,[t("p",Rs,[P(b(e.nickname)+" ",1),e.display?(c(),u("a",{key:0,href:"#",title:"\u96B1\u85CF\u8A55\u8AD6",onClick:X(v=>ze(e.id),["prevent"])},Ps,8,Ss)):(c(),u("a",{key:1,href:"#",title:"\u986F\u793A\u8A55\u8AD6",class:"text-danger text-decoration-none",onClick:X(v=>je(e.id),["prevent"])},[Ls,P(" \u53D6\u6D88\u96B1\u85CF ")],8,Ts))]),t("p",qs,[Ce(q(ts),{rating:e.rating,"star-size":U.starSize,"read-only":U.readOnly,"show-rating":U.showRating,"active-color":U.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),t("span",Us,b(q(Y)(e.create_time)),1)]),t("p",null,b(e.content),1),p.value.id!==e.id&&!e.reply?(c(),u("button",{key:0,type:"button",class:"btn btn-outline-primary",onClick:v=>{p.value.new=!0,p.value.edit=!1,p.value.id=e.id,R.value="",j("comment")}}," \u56DE\u8986 ",8,js)):f("",!0),p.value.new&&p.value.id===e.id||e.reply?(c(),u("div",zs,[t("div",Bs,[t("div",Es,[t("img",{src:ee((r=e.reply)==null?void 0:r.id,(i=e.reply)==null?void 0:i.avatar,T.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,Gs),t("p",Ms,[P(b(((a=e.reply)==null?void 0:a.nickname)||T.value.nickname)+" ",1),p.value.new?f("",!0):(c(),u("span",Os,b(q(Y)((o=e.reply)==null?void 0:o.create_time)),1))])]),((_=e.reply)==null?void 0:_.content)&&!p.value.edit||p.value.id!==e.id?(c(),u("p",Ns,[t("pre",Ws," "+b(($=e.reply)==null?void 0:$.content)+` + `,1)])):(c(),u("div",Fs,[ke(t("textarea",{ref_for:!0,ref_key:"commentTextareaRef",ref:J,"onUpdate:modelValue":d[1]||(d[1]=v=>R.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",rows:"3"},null,512),[[$e,R.value]]),As])),p.value.new&&p.value.id===e.id?(c(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Be(e.id)}," \u65B0\u589E\u56DE\u8986 ",8,Hs)):f("",!0),p.value.edit&&((se=e.reply)==null?void 0:se.content)&&p.value.id===e.id?(c(),u("div",Xs,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>Ee(e.id,e.reply.id)}," \u9001\u51FA\u56DE\u8986 ",8,Ys),t("p",Zs,[t("span",{class:z({"text-danger":R.value.length>200})},b(R.value.length),3),P("/200 ")])])):f("",!0),!p.value.edit&&((te=e.reply)==null?void 0:te.content)||p.value.id!==e.id?(c(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y;p.value.new=!1,p.value.edit=!0,p.value.id=e.id,R.value=(y=e.reply)==null?void 0:y.content,j("comment")}}," \u4FEE\u6539\u56DE\u8986 ",8,Js)):f("",!0)])])):f("",!0)])]),t("div",Ks,[t("div",Qs,[t("p",Is,[t("a",{class:"d-flex fw-bold text-dark text-decoration-none",href:"#",role:"button","aria-expanded":"false","aria-controls":"collapseExample",onClick:X(v=>{var y;return(y=n.value[s])!=null&&y.id?Ne(s):W(e.id,s)},["prevent"])},[t("span",{class:z(["material-icons align-middle transition-all",{"rotate-90":!((ae=n.value[s])!=null&&ae.status)}])}," keyboard_arrow_down ",2),P(" \u67E5\u770B\u500B\u5225\u8A55\u5206 "),e.has_whisper?(c(),u("span",st,"(\u6709\u6084\u6084\u8A71)")):f("",!0)],8,et)]),t("div",{ref_for:!0,ref:v=>Q.value[s]=v,class:"collapse show mt-3"},[t("div",tt,[(c(!0),u(F,null,A((le=n.value[s])==null?void 0:le.questionnaires,(v,y)=>{var L,be;return c(),u("div",{key:`questionnaires${y}`,class:z(["d-flex align-items-center mb-3",{"col-md-6":((L=n.value[s])==null?void 0:L.questionnaires.length)<=2,"col-md-4":((be=n.value[s])==null?void 0:be.questionnaires.length)>=3}])},[t("span",at,b(v.rating),1),t("p",lt,b(v.question),1)],2)}),128))]),(ie=n.value[s])!=null&&ie.whisper?(c(),u("div",it,[ot,t("p",null,b(n.value[s].whisper.content),1),h.value.id!==((oe=n.value[s])==null?void 0:oe.whisper.id)&&!n.value[s].whisper.reply?(c(),u("button",{key:0,class:"btn btn-outline-primary",type:"button",onClick:v=>{var y;h.value.new=!0,h.value.edit=!1,h.value.id=(y=n.value[s])==null?void 0:y.whisper.id,S.value="",j("whisper")}}," \u56DE\u8986 ",8,nt)):f("",!0),h.value.new&&h.value.id===((ne=n.value[s])==null?void 0:ne.whisper.id)||n.value[s].whisper.reply?(c(),u("div",dt,[t("div",rt,[t("div",ct,[t("img",{src:ee((de=n.value[s].whisper.reply)==null?void 0:de.id,(re=n.value[s].whisper.reply)==null?void 0:re.avatar,T.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,ut),t("p",pt,[P(b(((ce=n.value[s].whisper.reply)==null?void 0:ce.nickname)||T.value.nickname)+" ",1),h.value.new?f("",!0):(c(),u("span",ht,b(q(Y)((ue=n.value[s].whisper.reply)==null?void 0:ue.create_time)),1))])]),((pe=n.value[s].whisper.reply)==null?void 0:pe.content)&&!h.value.edit||h.value.id!==((he=n.value[s].whisper)==null?void 0:he.id)?(c(),u("p",vt,[t("pre",_t," "+b((ve=n.value[s].whisper.reply)==null?void 0:ve.content)+` + `,1)])):(c(),u("div",yt,[ke(t("textarea",{ref_for:!0,ref_key:"whisperTextareaRef",ref:K,"onUpdate:modelValue":d[2]||(d[2]=v=>S.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",type:"text",rows:"3"},null,512),[[$e,S.value]]),wt])),h.value.new&&h.value.id===((_e=n.value[s])==null?void 0:_e.whisper.id)?(c(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Me(e.id,n.value[s].whisper.id,s)}," \u65B0\u589E\u56DE\u8986 ",8,gt)):f("",!0),h.value.edit&&((ye=n.value[s].whisper.reply)==null?void 0:ye.content)&&h.value.id===((we=n.value[s].whisper)==null?void 0:we.id)?(c(),u("div",ft,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>{var y;return Oe(e.id,n.value[s].whisper.id,(y=n.value[s].whisper.reply)==null?void 0:y.id,s)}}," \u9001\u51FA\u56DE\u8986 ",8,bt),t("p",Ct,[t("span",{class:z({"text-danger":S.value.length>200})},b(S.value.length),3),P("/200 ")])])):f("",!0),!h.value.edit&&((ge=n.value[s].whisper.reply)==null?void 0:ge.content)||h.value.id!==((fe=n.value[s].whisper)==null?void 0:fe.id)?(c(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y,L;h.value.new=!1,h.value.edit=!0,h.value.id=(y=n.value[s].whisper)==null?void 0:y.id,S.value=(L=n.value[s].whisper.reply)==null?void 0:L.content,j("whisper")}}," \u4FEE\u6539\u56DE\u8986 ",8,kt)):f("",!0)])])):f("",!0)])):f("",!0)],512)])])])])}),128))]),t("div",$t,[Ce(q(Ke),{modelValue:V.value.current_page,"onUpdate:modelValue":d[3]||(d[3]=e=>V.value.current_page=e),records:V.value.total,"per-page":20,options:{chunk:6},onPaginate:D},null,8,["modelValue","records"])])])])]))}},Pt=Ae(xt,[["__scopeId","data-v-84aaa1f9"]]);export{Pt as default}; diff --git a/assets/SurveysList.5c8b01a7.js b/assets/SurveysList.5c8b01a7.js new file mode 100644 index 0000000..4beb0cf --- /dev/null +++ b/assets/SurveysList.5c8b01a7.js @@ -0,0 +1 @@ +import{D as S,r as _,o as b,a as d,c as u,b as o,F as h,q as f,A as C,i as B,x as v,h as D,P as G}from"./index.4c40fcfd.js";import{C as P}from"./CoursesSurveys.e889c660.js";import{a as A}from"./surveys.9338b3b0.js";const F={class:"surveys px-4 mt-4 position-relative"},M=o("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9\u5217\u8868 ",-1),N={class:"row gx-3 gy-2 align-items-center my-2"},j={class:"col-md-12"},q={class:"row"},E={class:"col-md-4"},O=["value"],U={class:"list-unstyled mb-0"},z={class:"d-flex justify-content-end"},R={__name:"SurveysList",setup(H){const{apiGetVideoCoursesList:w,apiGetVideoCoursesDetail:V,apiGetVideoCoursesSelector:L}=A,g=S.useLoading(),m=_([]),r=_({current_page:1,total:0}),p=async(c,t)=>{var n,l,e,a;const s=g.show();try{const{courses:i,pagination:x}=await w(c,t);m.value=i,r.value=x}catch(i){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(l=(n=i==null?void 0:i.response)==null?void 0:n.data)==null?void 0:l.statusCode}:${(a=(e=i==null?void 0:i.response)==null?void 0:e.data)==null?void 0:a.message}`)}finally{s.hide()}},y=_([]),$=async()=>{var t,s,n,l;const c=g.show();try{const{courses:e}=await L();y.value=e}catch(e){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(s=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(l=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:l.message}`)}finally{c.hide()}},k=async c=>{var s,n,l,e;const t=g.show();try{if(c.target.value){const{review:a}=await V(c.target.value);m.value=Array(a)}else p()}catch(a){v("danger","\u8AB2\u7A0B\u8CC7\u8A0A\u53D6\u5F97\u5931\u6557",`${(n=(s=a==null?void 0:a.response)==null?void 0:s.data)==null?void 0:n.statusCode}:${(e=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{t.hide()}};return b(async()=>{await p(),await $()}),(c,t)=>(d(),u("div",F,[M,o("form",N,[o("div",j,[o("div",q,[o("div",E,[o("select",{class:"form-select w-50",onChange:k},[o("option",{selected:"",value:"",onClick:p}," \u5168\u90E8\u8AB2\u7A0B "),(d(!0),u(h,null,f(y.value,s=>(d(),u("option",{key:s.id,value:s.id},D(s.name),9,O))),128))],32)])])])]),o("ul",U,[(d(!0),u(h,null,f(m.value,s=>(d(),u("li",{key:s,class:"mb-4"},[C(P,{data:s},null,8,["data"])]))),128))]),o("div",z,[C(B(G),{modelValue:r.value.current_page,"onUpdate:modelValue":t[0]||(t[0]=s=>r.value.current_page=s),records:r.value.total,"per-page":20,options:{chunk:6},onPaginate:p},null,8,["modelValue","records"])])]))}};export{R as default}; diff --git a/assets/SurveysManage.93985e0c.js b/assets/SurveysManage.93985e0c.js new file mode 100644 index 0000000..5fa8e02 --- /dev/null +++ b/assets/SurveysManage.93985e0c.js @@ -0,0 +1 @@ +import{r as g,a as i,e as I,f as P,b as s,M as A,D as F,o as Q,c as u,F as O,q as S,g as T,A as j,B as E,x as c,w as M,C as G,p as y,v as z}from"./index.4c40fcfd.js";import{a as H}from"./surveys.9338b3b0.js";const J=s("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),K={class:"d-flex justify-content-end"},W=s("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),X={__name:"AlertModal",emits:["deleteQuestionnaire"],setup(V,{expose:f,emit:w}){const r=g(null);return f({modalRef:r}),(k,b)=>(i(),I(A,{ref_key:"modalRef",ref:r,title:"\u662F\u5426\u522A\u9664\u6B64\u554F\u5238\uFF1F","has-footer":!0},{body:P(()=>[J,s("div",K,[W,s("button",{type:"button",class:"btn btn-danger",onClick:b[0]||(b[0]=v=>w("deleteQuestionnaire"))}," \u522A\u9664 ")])]),_:1},512))}},Y={class:"px-4 mt-4"},Z=s("h1",{class:"fs-4 mb-3"}," \u8A55\u50F9\u7BA1\u7406 ",-1),q={class:"card shadow-sm rounded"},ee=s("div",{class:"card-header"},[s("h5",{class:"text-secondary my-2"}," \u8A55\u50F9\u5167\u5BB9\u8A2D\u5B9A ")],-1),te={class:"card-body"},se={class:"table table-borderless"},ae=s("thead",null,[s("tr",{class:"text-secondary"},[s("th",{style:{width:"100px"}}," \u555F\u7528\u72C0\u614B "),s("th",null,"\u8A55\u50F9\u540D\u7A31"),s("th",{class:"w-25"})])],-1),oe={class:"align-middle"},ne={class:"form-check form-switch"},le=["onUpdate:modelValue","checked","onChange"],de=["onUpdate:modelValue","disabled"],ce={class:"d-flex align-items-center"},ie=["onClick"],ue=["onClick"],he=["onClick"],pe=s("span",{class:"material-icons-outlined"}," close ",-1),_e=[pe],re=s("td",null,null,-1),be=s("span",{class:"material-icons-outlined me-1"}," add_circle_outline ",-1),we={__name:"SurveysManage",setup(V){const{apiGetVideoCoursesQuestionnaires:f,apiPostVideoCoursesQuestionnaires:w,apiPutVideoCoursesQuestionnaires:r,apiDeleteVideoCoursesQuestionnaires:k,apiPutVideoCoursesOpenQuestionnaires:b,apiDeleteVideoCoursesCloseQuestionnaires:v}=H,h=F.useLoading(),$=g(null);let C=null;Q(()=>{C=new E($.value.modalRef.hModal)});const m=g([]),p=async()=>{var l,e,n,a;const d=h.show();try{const{questionnaires:t}=await f();m.value=t}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}};Q(p);const B=async d=>{var e,n,a,t;const l=h.show();try{await w(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u65B0\u589E\u554F\u5377")}catch(o){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},D=async(d,l)=>{var n,a,t,o;const e=h.show();try{await r(d,{question:l.question}),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u554F\u5377")}catch(_){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(a=(n=_==null?void 0:_.response)==null?void 0:n.data)==null?void 0:a.statusCode}:${(o=(t=_==null?void 0:_.response)==null?void 0:t.data)==null?void 0:o.message}`)}finally{e.hide()}};let x=null;const R=async()=>{var l,e,n,a;const d=h.show();try{C.hide(),await k(x),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u554F\u5377")}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}},L=async d=>{var e,n,a,t;const l=h.show();try{await b(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u958B\u555F\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u958B\u555F\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},N=async d=>{var e,n,a,t;const l=h.show();try{await v(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u95DC\u9589\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},U=d=>{x=d,C.show()};return(d,l)=>(i(),u("div",Y,[Z,s("div",q,[ee,s("div",te,[s("table",se,[ae,s("tbody",null,[(i(!0),u(O,null,S(m.value,(e,n)=>(i(),u("tr",{key:e.id},[s("td",oe,[s("div",ne,[e.id?M((i(),u("input",{key:0,id:"flexSwitchCheckDefault","onUpdate:modelValue":a=>e.enable=a,class:"form-check-input",type:"checkbox",role:"switch","true-value":1,"false-value":0,checked:e.enable,onChange:a=>e.enable?L(e.id):N(e.id)},null,40,le)),[[G,e.enable]]):y("",!0)])]),s("td",null,[M(s("input",{"onUpdate:modelValue":a=>e.question=a,type:"text",class:"form-control",placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9",disabled:e.id?e.enable:null},null,8,de),[[z,e.question]])]),s("td",ce,[e.id&&!e.enable?(i(),u("button",{key:0,type:"button",class:"btn btn-outline-dark",onClick:a=>D(e.id,e)}," \u5B8C\u6210 ",8,ie)):y("",!0),e.id?y("",!0):(i(),u("button",{key:1,type:"button",class:"btn btn-outline-primary",onClick:a=>B(e)}," \u65B0\u589E ",8,ue)),!e.enable||!e.id?(i(),u("button",{key:2,type:"button",class:"btn d-flex",onClick:a=>e.id?U(e.id):m.value.splice(n,1)},_e,8,he)):y("",!0)])]))),128)),s("tr",null,[re,s("td",null,[s("button",{type:"button",class:"btn d-flex text-primary d-flex",onClick:l[0]||(l[0]=e=>m.value.push({question:""}))},[be,T(" \u65B0\u589E\u8A55\u50F9 ")])])])])])])]),j(X,{ref_key:"alertRef",ref:$,onDeleteQuestionnaire:R},null,512)]))}};export{we as default}; diff --git a/assets/Tag.b930dcfd.js b/assets/Tag.b930dcfd.js new file mode 100644 index 0000000..26fab76 --- /dev/null +++ b/assets/Tag.b930dcfd.js @@ -0,0 +1 @@ +import{r as n,a as r,e as W,f as A,b as e,h as V,M as X,s as K,o as N,z as G,A as f,E as Q,c as _,F as P,q as U,g as Y,p as j,D as ee,m as te,w as se,v as ae,O as oe,i as le,B as H,x as I,G as ne,P as ie}from"./index.4c40fcfd.js";import{B as de}from"./tab.1217c1f2.js";import{a as Z}from"./task-tags.c6557800.js";const ce={class:"h4 text-dark mb-3 fw-bold"},re=e("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),pe={class:"d-flex justify-content-end"},ue=e("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),me={__name:"TagDeleteModal",props:{name:{type:String,default:""}},emits:["delete"],setup(D,{expose:B,emit:w}){const b=D,g=n(null);return B({modalRef:g}),(x,v)=>(r(),W(X,{ref_key:"modalRef",ref:g,title:"\u662F\u5426\u522A\u9664\u6B64\u6A19\u7C64\uFF1F","has-footer":!0},{body:A(()=>[e("h5",ce,V(b.name),1),re,e("div",pe,[ue,e("button",{type:"button",class:"btn btn-danger",onClick:v[0]||(v[0]=y=>w("delete"))}," \u522A\u9664 ")])]),_:1},512))}},_e={class:"mb-3"},be=e("label",{for:"name",class:"form-label"},"\u6A19\u7C64\u540D\u7A31",-1),ve={class:"mb-3"},ye=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={key:0,class:"mt-4"},ge={class:"card shadow-sm rounded-4 overflow-hidden h-100"},he=e("div",{class:"card-header bg-white py-2 d-flex align-items-center justify-content-between"},[e("h2",{class:"h6 mb-0 lh-base"},"\u5DF2\u5957\u7528\u6B64\u6A19\u7C64"),e("ul",{class:"nav nav-pills",id:"pills-tab",role:"tablist"},[e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link active",id:"pills-home-tab","data-bs-toggle":"pill","data-bs-target":"#pills-home",type:"button",role:"tab","aria-controls":"pills-home","aria-selected":"true"}," \u4EFB\u52D9\u7FA4\u7D44 ")]),e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link",id:"pills-profile-tab","data-bs-toggle":"pill","data-bs-target":"#pills-profile",type:"button",role:"tab","aria-controls":"pills-profile","aria-selected":"false"}," \u4EFB\u52D9 ")])])],-1),ke={class:"card-body",style:{"max-height":"230px","overflow-y":"scroll"}},$e={class:"tab-content",id:"pills-tabContent"},we={class:"tab-pane fade show active",id:"pills-home",role:"tabpanel","aria-labelledby":"pills-home-tab",tabindex:"0"},xe={class:"list-unstyled"},Te={class:"tab-pane fade",id:"pills-profile",role:"tabpanel","aria-labelledby":"pills-profile-tab",tabindex:"0"},Me={class:"list-unstyled"},Ce=e("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),Ve=["disabled"],Be={__name:"TagModal",props:{type:{type:String,default:""},data:{type:Object,default:()=>({id:"",name:"",description:""})}},emits:["update"],setup(D,{expose:B,emit:w}){const b=D,{apiGetTaskTagById:g,apiPostTaskTags:x,apiPutTaskTagById:v}=Z,y=n(null),R=n(null);B({tagContentModalRef:R});const i=n("create"),T=n(""),p=n({name:"",description:""});K(()=>{var o;return(o=b.data)==null?void 0:o.id},()=>{var o;(o=b.data)!=null&&o.id?(i.value="edit",T.value=b.data.id,p.value=JSON.parse(JSON.stringify(b.data))):(i.value="create",T.value="",p.value={name:"",description:""},y.value.resetForm())});const h=n({tasksApply:[],taskGroupsApply:[]}),L=async o=>{var d,l,m,c;try{const{task_tag:u}=await g(o);h.value={tasksApply:u.tasks_apply,taskGroupsApply:u.task_groups_apply}}catch(u){w("update",{type:"\u5931\u6557",status:i.value,error:`${(l=(d=u==null?void 0:u.response)==null?void 0:d.data)==null?void 0:l.statusCode}:${(c=(m=u==null?void 0:u.response)==null?void 0:m.data)==null?void 0:c.message}`})}};K(()=>T.value,o=>{o&&L(o)});const k=n(!1),E=async()=>{var o,d,l,m;k.value=!0;try{if(i.value==="create")await x(p.value),p.value={name:"",description:""};else{const c={name:p.value.name,description:p.value.description};await v(T.value,c)}k.value=!1,w("update",{type:"\u6210\u529F",status:i.value})}catch(c){k.value=!1,p.value.name=b.data.name,p.value.description=b.data.description,w("update",{type:"\u5931\u6557",status:i.value,error:`${(d=(o=c==null?void 0:c.response)==null?void 0:o.data)==null?void 0:d.statusCode}: ${(m=(l=c==null?void 0:c.response)==null?void 0:l.data)==null?void 0:m.message}`})}},F=n();return N(()=>{F.value=document.querySelectorAll("#myTab button"),F.value.forEach(o=>{const d=new de(o);o.addEventListener("click",l=>{l.preventDefault(),d.show()})})}),(o,d)=>{const l=G("Field"),m=G("ErrorMessage"),c=G("router-link"),u=G("VForm");return r(),W(u,{ref_key:"tagForm",ref:y,onSubmit:E},{default:A(({errors:S})=>[f(X,{ref_key:"tagContentModalRef",ref:R,title:i.value==="create"?"\u65B0\u589E\u6A19\u7C64":"\u7DE8\u8F2F\u6A19\u7C64","has-footer":!0},{body:A(()=>[e("div",_e,[be,f(l,{id:"name",modelValue:p.value.name,"onUpdate:modelValue":d[0]||(d[0]=t=>p.value.name=t),name:"name",label:"\u6A19\u7C64\u540D\u7A31",type:"text",class:Q(["form-control",{"is-invalid":S.name}]),rules:{required:!0}},null,8,["modelValue","class"]),f(m,{name:"name",class:"invalid-feedback"})]),e("div",ve,[ye,f(l,{as:"textarea",id:"description",modelValue:p.value.description,"onUpdate:modelValue":d[1]||(d[1]=t=>p.value.description=t),name:"description",label:"\u63CF\u8FF0",type:"text",rules:{required:!0},class:Q(["form-control",{"is-invalid":S.description}])},null,8,["modelValue","class"]),f(m,{name:"description",class:"invalid-feedback"})]),i.value==="edit"?(r(),_("div",fe,[e("div",ge,[he,e("div",ke,[e("div",$e,[e("div",we,[e("ul",xe,[(r(!0),_(P,null,U(h.value.taskGroupsApply,t=>(r(),_("li",{class:"mb-2",key:t.id},V(t.name),1))),128))])]),e("div",Te,[e("ul",Me,[(r(!0),_(P,null,U(h.value.tasksApply,t=>(r(),_("li",{class:"mb-2",key:t.id},[f(c,{target:"_blank",to:`/admin/task/list/${t.id}`},{default:A(()=>[Y(V(t.name),1)]),_:2},1032,["to"])]))),128))])])])])])])):j("",!0)]),footer:A(()=>[Ce,e("button",{type:"submit",class:"btn btn-primary",disabled:k.value},V(i.value==="create"?"\u65B0\u589E":"\u7DE8\u8F2F"),9,Ve)]),_:2},1032,["title"])]),_:1},512)}}},Re={class:"taskTag px-4 mt-4"},Fe=e("h1",{class:"fs-4 mb-3"},"\u6A19\u7C64\u7BA1\u7406",-1),Ie={class:"d-flex justify-content-between align-items-center mb-3"},Ae={class:"row w-75"},De={class:"col-md-6"},Le={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Se={class:"card-body p-0"},Ge={class:"table-responsive"},Ne={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u6A19\u7C64\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u63CF\u8FF0"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u72C0\u614B"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1),Ue={class:"text-nowrap"},je={scope:"row",class:"ps-4"},Ee={scope:"row",class:"ps-4"},Oe={scope:"row",class:"ps-4"},qe={key:0,class:"text-success"},ze={key:1,class:"text-secondary"},Je={scope:"row",class:"ps-4"},Ke=["onClick"],Qe=e("span",{class:"material-icons align-middle fs-6"}," edit ",-1),He=["onClick"],We={key:0,class:"card-footer bg-white py-3"},Xe={class:"d-flex flex-wrap align-items-start"},tt={__name:"Tag",setup(D){const{apiGetTaskTags:B,apiDeleteTaskTagById:w}=Z,b=ee.useLoading(),g=n(!1),x=n(""),v=n(""),y=n({current_page:1,total_page:0,total:30}),R=n([]),i=async(t=1,s=10)=>{var O,q,z,J;v.value!==""?x.value=`name=${v.value}`:x.value="";const a=b.show(),{task_tags:M,pagination:$}=await B({page:t,count:s,scoped:x.value});try{R.value=M,y.value=$}catch(C){I("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(q=(O=C==null?void 0:C.response)==null?void 0:O.data)==null?void 0:q.statusCode}:${(J=(z=C==null?void 0:C.response)==null?void 0:z.data)==null?void 0:J.message}`)}finally{a.hide()}},T=t=>{i(t)};N(async()=>{await i()});const h=te({type:"",data:{}}),L=n(null);let k=null;N(()=>{k=new H(L.value.tagContentModalRef.hModal)});const F=(t,s={})=>{h.type=t,h.data=s,k.show()},o=t=>{const s=t.status==="created"?"\u5EFA\u7ACB":"\u7DE8\u8F2F";t.type==="\u6210\u529F"?I("success",`${s}\u6A19\u7C64\u6210\u529F`,`\u5DF2\u6210\u529F${s}\u6A19\u7C64`):t.type==="\u5931\u6557"&&I("danger",`${s}\u6A19\u7C64\u5931\u6557`,t.error),k.hide(),i()},d=n(null),l=n({id:"",name:""});let m=null;N(()=>{m=new H(d.value.modalRef.hModal)});const u=(t,s)=>{l.value.id=t,l.value.name=s,m.show()},S=async()=>{var t,s,a,M;try{await w(l.value.id),I("success","\u522A\u9664\u6A19\u7C64\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u6A19\u7C64")}catch($){I("danger","\u522A\u9664\u6A19\u7C64\u5931\u6557",`${(s=(t=$==null?void 0:$.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(M=(a=$==null?void 0:$.response)==null?void 0:a.data)==null?void 0:M.message}`)}finally{m.hide(),l.value.id="",l.value.name="",i()}};return(t,s)=>(r(),_("div",Re,[Fe,e("div",Ie,[e("div",Ae,[e("div",De,[se(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>v.value=a),onCompositionstart:s[1]||(s[1]=a=>g.value=!0),onCompositionend:s[2]||(s[2]=a=>g.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u6A19\u7C64",class:"form-control",onKeydown:s[3]||(s[3]=oe(ne(()=>{g.value||i(1)},["prevent"]),["enter"]))},null,544),[[ae,v.value]])])]),e("button",{class:"btn btn-primary",onClick:s[4]||(s[4]=a=>F("create"))}," \u65B0\u589E\u6A19\u7C64 ")]),e("div",Le,[e("div",Se,[e("div",Ge,[e("table",Ne,[Pe,e("tbody",Ue,[(r(!0),_(P,null,U(R.value,a=>(r(),_("tr",{key:a.id,class:"align-middle"},[e("td",je,V(a.name),1),e("td",Ee,V(a.description),1),e("td",Oe,[a.is_used?(r(),_("span",qe,"\u5DF2\u4F7F\u7528")):(r(),_("span",ze,"\u672A\u4F7F\u7528"))]),e("td",Je,[e("button",{class:"btn btn-sm btn-outline-gray ms-1",onClick:M=>F("edit",a)},[Qe,Y(" \u7DE8\u8F2F ")],8,Ke),a.is_used?j("",!0):(r(),_("button",{key:0,class:"btn btn-sm btn-outline-danger ms-2",onClick:M=>u(a.id,a.name)},"\u522A\u9664",8,He))])]))),128))])])])]),y.value.total_page>1?(r(),_("div",We,[e("div",Xe,[f(le(ie),{modelValue:y.value.current_page,"onUpdate:modelValue":s[5]||(s[5]=a=>y.value.current_page=a),records:y.value.total,"per-page":10,options:{chunk:6},onPaginate:T},null,8,["modelValue","records"])])])):j("",!0)]),f(me,{ref_key:"alertRef",ref:d,onDelete:S,name:l.value.name},null,8,["name"]),f(Be,{ref_key:"tagModalRef",ref:L,type:h.type,data:h.data,onUpdate:o},null,8,["type","data"])]))}};export{tt as default}; diff --git a/assets/TaskDetail.5b81e0f0.css b/assets/TaskDetail.5b81e0f0.css new file mode 100644 index 0000000..6a2fd90 --- /dev/null +++ b/assets/TaskDetail.5b81e0f0.css @@ -0,0 +1 @@ +@charset "UTF-8";.card-body-height{height:250px;overflow:hidden;overflow-y:auto}.nav-tabs .nav-link.active{background-color:#b0cc9759;color:#3d5950;font-weight:500}.preview-block{width:300px;height:157px;background-color:#b0cc9759;position:relative}.preview-block:after{content:"\8acb\4e0a\50b3\4e00\5f35\4efb\52d9\5716\7247";position:absolute;top:50%;left:50%;color:#3d5950;transform:translate(-50%,-50%);display:block}.task-detail .vs__dropdown-toggle{border:0!important} diff --git a/assets/TaskDetail.e8948933.js b/assets/TaskDetail.e8948933.js new file mode 100644 index 0000000..9d94cb4 --- /dev/null +++ b/assets/TaskDetail.e8948933.js @@ -0,0 +1 @@ +import{d as O,D as pe,l as ve,u as be,r as g,s as ge,o as he,z as F,a as r,c as d,b as e,A as _,f as E,h as k,x as N,g as W,E as j,F as C,q as $,a3 as fe,a4 as ke,i as se,L as ye,w as v,v as I,p as R,C as G,R as we}from"./index.4c40fcfd.js";import{I as xe,_ as Ve}from"./Editor.52546d8d.js";/* empty css */import{a as Ue}from"./task.e3c4a5ae.js";import{a as Te}from"./task-tags.c6557800.js";const ae=f=>({"image/png":"png","image/jpg":"jpeg","image/jpeg":"jpeg"})[f],Ce=f=>new Promise((m,y)=>{const h=new FileReader;h.readAsArrayBuffer(f),h.onload=L=>{const{result:S}=L.target;m(S)},h.onerror=y}),$e={name:"ImageUploader",module:xe,options:{upload(f){return new Promise((m,y)=>{const{type:h,size:L}=f;if(!ae(h)){postMessage("danger","\u5716\u7247\u683C\u5F0F\u932F\u8AA4","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),y(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const S=1024*1024*3;if(L>=S){postMessage("danger","\u5716\u7247\u904E\u5927","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),y(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}const P=`/v1/common/upload/image/${ae(h)}`;(async()=>{try{const w=await Ce(f),{data:x}=await O.get(P),z=x.image_url,q=x.upload_url,V={transformRequest(a,M){return delete M.common.Authorization,a},headers:{"Content-Type":h},withCredentials:!1};await O.put(q,w,V),m(z)}catch{postMessage("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),y(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\u3002"))}})()})}}};const Ie={class:"about task-detail px-4 mt-4"},Le={class:"border-bottom border-light pb-2 mb-4"},Se={"aria-label":"breadcrumb"},Me={class:"breadcrumb"},Be={class:"breadcrumb-item"},Fe={class:"breadcrumb-item active","aria-current":"page"},je={class:"fs-4 mb-3"},qe={class:"my-3"},Ae={class:"row"},Ee={class:"col-md-6"},Ne={class:"mb-3"},Re=e("label",{class:"form-label",for:"name"},"\u4EFB\u52D9\u540D\u7A31",-1),Ge={class:"col-md-6"},Oe={class:"mb-3"},Pe=e("label",{class:"form-label",for:"taskGroupName"},"\u6240\u5C6C\u7FA4\u7D44",-1),ze={class:"position-relative"},De=["value"],Je=["required"],He={class:"col-md-6"},Ke={class:"mb-3"},Qe=e("label",{class:"form-label",for:"image_url"},"\u4EFB\u52D9\u5716\u7247 (1200 x 628)",-1),We={class:"position-relative"},Xe={class:"mt-2"},Ye=["src"],Ze={key:1,class:"preview-block"},et={class:"col-md-6"},tt={class:"mb-3"},st=e("label",{class:"form-label",for:"taskPoint"},"\u4EFB\u52D9\u7A4D\u5206",-1),at={class:"mb-3"},ot=e("label",{class:"form-label",for:"abstract"},"\u6458\u8981",-1),lt={class:"mb-3"},nt=e("label",{class:"form-label",for:"description"},"\u4EFB\u52D9\u5167\u5BB9\u8AAA\u660E",-1),it={class:"mt-3 position-relative"},rt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},dt={class:"card-header bg-white py-3"},ct={key:0},ut={class:"card-body card-body-height"},_t={class:"list list-unstyled"},mt={class:"form-check"},pt=["id","value"],vt=["for"],bt=e("hr",null,null,-1),gt={class:"row"},ht={class:"col-md-6"},ft={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},kt=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u5F8C\u6703\u7372\u5F97\u7684\u6280\u80FD",-1),yt={class:"card-body card-body-height"},wt={class:"mb-3"},xt=e("label",{class:"form-label d-block h5",for:"summary"},null,-1),Vt=["onUpdate:modelValue"],Ut=["onClick"],Tt={class:"col-md-6"},Ct={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},$t=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u689D\u4EF6",-1),It={class:"card-body card-body-height"},Lt={class:"mb-3"},St=["onUpdate:modelValue"],Mt=["onClick"],Bt=e("hr",null,null,-1),Ft=e("h5",null,"\u662F\u5426\u5305\u542B\u7B49\u7D1A",-1),jt={class:"form-check mb-3"},qt=e("label",{class:"form-check-label",for:"task-has-level"}," \u986F\u793A\u4EFB\u52D9\u5206\u968E\u7B49\u7D1A ",-1),At={key:0,class:"my-3"},Et=["onUpdate:modelValue"],Nt=["onClick"],Rt=e("hr",null,null,-1),Gt=e("h5",null,"\u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9",-1),Ot={class:"form-check mb-3"},Pt=e("label",{class:"form-check-label",for:"beforeStart"}," \u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9 ",-1),zt={key:1,class:"mb-3"},Dt=e("label",{class:"form-label",for:"predecessor_task_id"},"\u524D\u7F6E\u4EFB\u52D9",-1),Jt=["value"],Ht=e("hr",null,null,-1),Kt={class:"row"},Qt={class:"col-md-6"},Wt={class:"mb-3"},Xt=e("label",{class:"form-label",for:"task_start_at"},"\u958B\u59CB\u6642\u9593",-1),Yt={class:"col-md-6"},Zt={class:"mb-3"},es=e("label",{class:"form-label",for:"task_expired_at"},"\u5230\u671F\u6642\u9593",-1),ts={class:"form-check mb-3"},ss=e("label",{class:"form-check-label",for:"enable"}," \u662F\u5426\u555F\u7528\u4EFB\u52D9 ",-1),as={class:"d-flex justify-content-end"},os={class:"d-flex flex-column align-items-end"},ls=["disabled"],ns=e("i",{class:"fas fa-save"},null,-1),is={key:0,class:"mb-0 mt-2 text-danger"},ps={__name:"TaskDetail",props:{type:{type:String}},setup(f){const m=f,{apiGetTasks:y,apiGetTaskGroupsList:h,apiGetTaskById:L,apiPostTask:S,apiPutTaskById:P}=Ue,{apiGetTaskTags:X}=Te,w=pe.useLoading(),x=ve(),z=be(),q=g(null),V=g(!1),a=g({name:"",task_group_id:"",image_url:"",tag_ids:[],rewarded_skills:[{content:""}],completion_criteria:[{content:""}],level:[]}),M=l=>{a.value[l].push({content:""})},D=(l,t)=>{a.value[l].splice(t,1)},A=g(""),J=g([]),H=g([]),K=g({current_page:1,total_page:1,total:0}),oe=async()=>{const l=w.show(),{task_groups:t}=await h({page:1,count:150}),{task_tags:o,pagination:i}=await X({page:1,count:150});J.value=t,H.value=o,K.value=i,l.hide()},U=g(!1),Y=g([]),le=async l=>{const t=w.show(),{tasks:o}=await y({count:100,page:1,scoped:l});Y.value=o.filter(i=>i.id!==A.value),t.hide()};ge(()=>U.value,l=>{if(l){const t=a.value.task_group_id;if(!t)N("danger","\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44","\u56E0\u524D\u7F6E\u4EFB\u52D9\u8981\u548C\u6B64\u4EFB\u52D9\u5728\u540C\u4E00\u500B\u7FA4\u7D44\u4E0B\uFF0C\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44");else{const o=`&filter=task_group&task_group_id=${t}`;le(o)}}});const Z=async l=>{var i,n,b,T;const t=w.show(),{task:o}=await L(l);a.value={name:o.name,task_group_id:(i=o==null?void 0:o.task_group)==null?void 0:i.id,predecessor_task_id:(n=o==null?void 0:o.predecessor_task)==null?void 0:n.id,tag_ids:o.tags.map(c=>c.id),rewarded_point:o.rewarded_point,abstract:o.abstract,description:o.description,rewarded_skills:o.rewarded_skills.map(c=>({content:c})),completion_criteria:o.completion_criteria.map(c=>({content:c})),level:o.level?o.level.map(c=>({content:c})):[],start_at:o.start_at?new Date(o.start_at).toLocaleDateString("sv-SE"):null,expired_at:o.expired_at?new Date(o.expired_at).toLocaleDateString("sv-SE"):null,enable:o.enable,image_url:o.image_url},(o==null?void 0:o.level)&&((b=o.level)==null?void 0:b.length)>0&&(V.value=!0),(o==null?void 0:o.predecessor_task)&&((T=o.predecessor_task)==null?void 0:T.id)&&(U.value=!0),t.hide()};he(async()=>{const{id:l}=x.params,{task_copy_id:t}=x.query;oe(),A.value=l,A.value&&Z(l),t&&!l&&Z(t)});const ne=async()=>{var i;a.value.description=q.value.editorContent,U.value||delete a.value.predecessor_task_id;const l=JSON.parse(JSON.stringify(a.value.completion_criteria.filter(n=>n.content!=="")));a.value.completion_criteria=l.map(n=>n.content);const t=JSON.parse(JSON.stringify(a.value.rewarded_skills.filter(n=>n.content!=="")));a.value.rewarded_skills=t==null?void 0:t.map(n=>n.content),((i=a.value.level)==null?void 0:i.length)===0?delete a.value.level:a.value.level=a.value.level?a.value.level.map(n=>n.content):[];const o=m.type==="create"?"\u65B0\u589E":"\u7DE8\u8F2F";try{Object.keys(a.value).forEach(n=>{a.value[n]===null&&delete a.value[n]}),m.type==="create"&&await S(a.value),m.type==="edit"&&await P(A.value,a.value),N("success",`${o}\u6210\u529F`,`${o}\u4EFB\u52D9\u6210\u529F`),z.push({name:"TaskList",query:x.query})}catch(n){N("danger",`${o}\u5931\u6557`,`${n.response.data.statusCode}:${n.response.data.message}`)}},B=g(!1),ie=l=>new Promise((t,o)=>{const i=new FileReader;i.readAsArrayBuffer(l),i.onload=n=>{const{result:b}=n.target;t(b)},i.onerror=o}),Q=(l,t)=>{B.value=!1,l.target.value="",N("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557",`${t}`)},re=l=>{B.value=!0;const t=l.target.files[0],o=3*1024*1024;if(t.size>o){Q(l,"\u5716\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E 3MB");return}if(t){const i=new FileReader;i.onload=n=>{const b=new Image;b.onload=()=>{const{width:T,height:c}=b;if(T===1200&&c===628){const u=`/v1/common/upload/image/${t.type.split("/")[1]}`;(async()=>{try{const ee=await ie(t),{data:te}=await O.get(u),de=te.image_url,ce=te.upload_url,ue={transformRequest(_e,me){return delete me.common.Authorization,_e},headers:{"Content-Type":t.type},withCredentials:!1};await O.put(ce,ee,ue),a.value.image_url=de,B.value=!1}catch{Q(l,"\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002")}})()}else Q(l,"\u5716\u7247\u5BEC\u9AD8\u9700\u7B26\u5408 1200 x 628")},b.src=n.target.result},i.readAsDataURL(t)}};return(l,t)=>{const o=F("router-link"),i=F("Field"),n=F("ErrorMessage"),b=F("v-select"),T=F("VForm");return r(),d("div",Ie,[e("header",Le,[e("nav",Se,[e("ol",Me,[e("li",Be,[_(o,{to:"/admin/task/list"},{default:E(()=>[W(" \u4EFB\u52D9\u5217\u8868 ")]),_:1})]),e("li",Fe,k(m.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1)])])]),e("h1",je,k(m.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1),e("div",qe,[_(T,{ref:"myForm",onSubmit:ne},{default:E(({errors:c})=>[e("div",Ae,[e("div",Ee,[e("div",Ne,[Re,_(i,{id:"name",modelValue:a.value.name,"onUpdate:modelValue":t[0]||(t[0]=s=>a.value.name=s),name:"name",label:"\u4EFB\u52D9\u540D\u7A31",type:"text",class:j(["form-control",{"is-invalid":c.name}]),rules:{required:!0}},null,8,["modelValue","class"]),_(n,{name:"name",class:"invalid-feedback"})])]),e("div",Ge,[e("div",Oe,[Pe,e("div",ze,[_(i,{as:"select",id:"taskGroupName",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[1]||(t[1]=s=>a.value.task_group_id=s),name:"task_group_id",class:j(["form-select",{"is-invalid":c.task_group_id}]),label:"\u6240\u5C6C\u7FA4\u7D44",rules:{required:!0}},{default:E(()=>[(r(!0),d(C,null,$(J.value,s=>(r(),d("option",{key:s.id,value:s.id},k(s.name),9,De))),128))]),_:2},1032,["modelValue","class"]),_(b,{options:J.value,label:"name",class:"form-select position-absolute",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[2]||(t[2]=s=>a.value.task_group_id=s),clearable:!1,reduce:s=>s.id,style:{border:"0",padding:"0",background:"white",width:"calc(100% - 2px)",left:"1px",top:"1px"}},{search:E(({attributes:s,events:u})=>[e("input",fe({class:"vs__search",required:!a.value.task_group_id},s,ke(u,!0)),null,16,Je)]),_:1},8,["options","modelValue","reduce"])]),_(n,{name:"task_group_id",class:"invalid-feedback"}),e("span",{class:j(["invalid-feedback",{"d-block":c.task_group_id}])},"\u6240\u5C6C\u7FA4\u7D44 \u70BA\u5FC5\u586B",2)])]),e("div",He,[e("div",Ke,[Qe,e("div",We,[_(se(ye),{active:B.value,"is-full-page":!1,width:30,height:30},null,8,["active"]),e("input",{ref:"uploadTaskImageRef",type:"file",class:"form-control mb-2",accept:".png,.jpg,.jpeg",onChange:re},null,544)]),_(i,{id:"image_url",modelValue:a.value.image_url,"onUpdate:modelValue":t[3]||(t[3]=s=>a.value.image_url=s),name:"image_url",label:"\u4EFB\u52D9\u5716\u7247",type:"text",disabled:B.value,class:j(["form-control",{"is-invalid":c.image_url}]),rules:{required:!0}},null,8,["modelValue","disabled","class"]),_(n,{name:"image_url",class:"invalid-feedback"}),e("div",Xe,[a.value.image_url?(r(),d("img",{key:0,src:a.value.image_url,alt:"\u4EFB\u52D9\u5716\u7247",width:"300"},null,8,Ye)):(r(),d("div",Ze))])])]),e("div",et,[e("div",tt,[st,_(i,{id:"taskPoint",modelValue:a.value.rewarded_point,"onUpdate:modelValue":t[4]||(t[4]=s=>a.value.rewarded_point=s),modelModifiers:{number:!0},name:"rewarded_point",label:"\u4EFB\u52D9\u7A4D\u5206",type:"number",class:j(["form-control",{"is-invalid":c.rewarded_point}]),rules:{required:!0,min_value:10}},null,8,["modelValue","class"]),_(n,{name:"rewarded_point",class:"invalid-feedback"})])])]),e("div",at,[ot,v(e("textarea",{class:"form-control",id:"abstract",placeholder:"","onUpdate:modelValue":t[5]||(t[5]=s=>a.value.abstract=s)},null,512),[[I,a.value.abstract]])]),e("div",lt,[nt,_(Ve,{ref_key:"editorRef",ref:q,content:a.value.description,modules:se($e)},null,8,["content","modules"])]),e("div",it,[e("div",rt,[e("div",dt,[W("\u4EFB\u52D9\u6A19\u7C64 "),K.value.total>0?(r(),d("small",ct," \uFF5C\u5DF2\u8F09\u5165 "+k(H.value.length)+" \u500B / \u5171 "+k(K.value.total)+" \u500B",1)):R("",!0)]),e("div",ut,[e("ul",_t,[(r(!0),d(C,null,$(H.value,(s,u)=>(r(),d("li",{key:`group-${u}`,class:"list-item"},[e("div",mt,[v(e("input",{"onUpdate:modelValue":t[6]||(t[6]=p=>a.value.tag_ids=p),name:"tag_ids",id:s.id,class:"form-check-input",type:"checkbox",value:s.id},null,8,pt),[[G,a.value.tag_ids]]),e("label",{class:"form-check-label",for:s.id},k(s.name),9,vt)]),bt]))),128))])])])]),e("div",gt,[e("div",ht,[e("div",ft,[kt,e("div",yt,[e("div",wt,[xt,(r(!0),d(C,null,$(a.value.rewarded_skills,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`skill_${u}`},[v(e("input",{type:"text",class:"form-control","onUpdate:modelValue":p=>s.content=p,placeholder:"\u6280\u80FD\u63CF\u8FF0","aria-label":"\u6280\u80FD\u63CF\u8FF0","aria-describedby":"button-addon2"},null,8,Vt),[[I,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:p=>D("rewarded_skills",u)}," \u522A\u9664 ",8,Ut)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[7]||(t[7]=s=>M("rewarded_skills"))}," \u65B0\u589E\u4E00\u5217 ")])])])]),e("div",Tt,[e("div",Ct,[$t,e("div",It,[e("div",Lt,[(r(!0),d(C,null,$(a.value.completion_criteria,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`complete_${u}`},[v(e("input",{type:"text",class:"form-control",placeholder:"\u5B8C\u6210\u689D\u4EF6","aria-label":"\u5B8C\u6210\u689D\u4EF6","onUpdate:modelValue":p=>s.content=p,"aria-describedby":"button-addon2"},null,8,St),[[I,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:p=>D("completion_criteria",u)}," \u522A\u9664 ",8,Mt)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[8]||(t[8]=s=>M("completion_criteria"))}," \u65B0\u589E\u4E00\u5217 ")])])])])]),Bt,Ft,e("div",jt,[v(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[9]||(t[9]=s=>V.value=s),id:"task-has-level","true-value":!0,"false-value":!1},null,512),[[G,V.value]]),qt]),V.value?(r(),d("div",At,[(r(!0),d(C,null,$(a.value.level,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`level_${u}`},[v(e("input",{type:"text",class:"form-control",placeholder:"\u7B49\u7D1A\u5167\u5BB9","aria-label":"\u7B49\u7D1A\u5167\u5BB9","onUpdate:modelValue":p=>s.content=p,"aria-describedby":"button-addon2"},null,8,Et),[[I,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:p=>D("level",u)}," \u522A\u9664 ",8,Nt)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[10]||(t[10]=s=>M("level"))}," \u65B0\u589E\u4E00\u5217 ")])):R("",!0),Rt,Gt,e("div",Ot,[v(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[11]||(t[11]=s=>U.value=s),id:"beforeStart","true-value":!0,"false-value":!1},null,512),[[G,U.value]]),Pt]),U.value?(r(),d("div",zt,[Dt,v(e("select",{class:"form-select",id:"predecessor_task_id","onUpdate:modelValue":t[12]||(t[12]=s=>a.value.predecessor_task_id=s),"aria-label":"Floating label select example"},[(r(!0),d(C,null,$(Y.value,s=>(r(),d("option",{value:s.id,key:s.id},k(s.name),9,Jt))),128))],512),[[we,a.value.predecessor_task_id]])])):R("",!0),Ht,e("div",Kt,[e("div",Qt,[e("div",Wt,[Xt,v(e("input",{type:"date",class:"form-control",id:"task_start_at","onUpdate:modelValue":t[13]||(t[13]=s=>a.value.start_at=s),placeholder:""},null,512),[[I,a.value.start_at]])])]),e("div",Yt,[e("div",Zt,[es,v(e("input",{type:"date",class:"form-control",id:"task_expired_at","onUpdate:modelValue":t[14]||(t[14]=s=>a.value.expired_at=s),placeholder:""},null,512),[[I,a.value.expired_at]])])])]),e("div",ts,[v(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[15]||(t[15]=s=>a.value.enable=s),id:"enable","true-value":!0,"false-value":!1},null,512),[[G,a.value.enable]]),ss]),e("div",as,[e("div",os,[e("button",{type:"submit",class:"btn btn-lg btn-primary mt-2",disabled:Object.keys(c).length>0},[ns,W(" "+k(m.type==="create"?"\u5EFA\u7ACB\u4EFB\u52D9":"\u5132\u5B58\u66F4\u65B0"),1)],8,ls),Object.keys(c).length>0?(r(),d("p",is," \u8ACB\u78BA\u8A8D\u4EFB\u52D9\u5FC5\u586B\u9805\u76EE\u662F\u5426\u586B\u5BEB\u5B8C\u6574\u3002 ")):R("",!0)])])]),_:1},512)])])}}};export{ps as default}; diff --git a/assets/TaskList.67e68dbf.js b/assets/TaskList.67e68dbf.js new file mode 100644 index 0000000..1465064 --- /dev/null +++ b/assets/TaskList.67e68dbf.js @@ -0,0 +1 @@ +import{_ as K,D as Q,u as W,l as X,r,s as R,m as Y,o as Z,z as U,a as o,c as l,b as s,w as B,R as ss,A as b,f as L,v as ts,p as $,F as G,q as V,i as es,g as h,E as as,h as g,G as os,P as ls,S as ns,T as cs,x as is}from"./index.4c40fcfd.js";/* empty css */import{a as ds}from"./task.e3c4a5ae.js";import{a as rs}from"./task-tags.c6557800.js";const u=f=>(ns("data-v-daeda8d6"),f=f(),cs(),f),_s={class:"task px-4 mt-4 position-relative"},us=u(()=>s("h1",{class:"fs-4 mb-0"},"\u4EFB\u52D9\u5217\u8868",-1)),ps={class:"d-flex align-items-center justify-content-between my-3"},ms={class:"row align-items-center w-75"},vs={class:"col-md-6"},gs=u(()=>s("option",{selected:"",value:"default"},"\u5168\u90E8\u4EFB\u52D9",-1)),hs=u(()=>s("option",{value:"task_group"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u7FA4\u7D44"),h("\u7BE9\u9078")],-1)),ks=u(()=>s("option",{value:"task_tags"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u6A19\u7C64"),h("\u7BE9\u9078")],-1)),ys=[gs,hs,ks],bs={key:0},fs={class:"row align-items-center w-75 my-3"},ws=u(()=>s("p",{class:"mb-1"},"\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44\u5F8C\uFF0C\u518D\u8F38\u5165\u4EFB\u52D9\u540D\u7A31\u3002",-1)),xs={class:"col-lg-6"},Ts={class:"col-lg-4"},Ls={class:"mb-0"},$s=["disabled"],Gs={key:1,class:"w-75 my-3"},Vs={class:"d-flex flex-wrap"},Cs=["onClick"],Ss={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},qs={class:"card-body p-0"},Ds={class:"table-responsive"},Ms={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Rs=u(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",width:"60",class:"ps-4 py-3 text-muted border-0"}),s("th",{scope:"col",width:"130",class:"ps-4 py-3 text-muted border-0"}," \u5206\u985E\u7FA4\u7D44 "),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u540D\u7A31"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u662F\u5426\u555F\u7528"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u958B\u59CB\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"},"\u7DE8\u8F2F")])],-1)),Us={class:"text-nowrap"},Bs={scope:"row",class:"ps-4"},Es={scope:"row",class:"ps-4"},Is={scope:"row",class:"ps-2"},Ns=["onClick"],Ps={scope:"row",class:"ps-2"},zs={scope:"row",class:"ps-2"},As={key:0,class:"text-success"},js={key:1,class:"text-muted"},Fs={scope:"row",class:"ps-2"},Os={key:0},Hs={key:1,class:"text-muted"},Js={scope:"row",class:"ps-2"},Ks={key:0},Qs={key:1,class:"text-muted"},Ws={class:"pe-3"},Xs=u(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),Ys=u(()=>s("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Zs={key:0,class:"card-footer bg-white py-3"},st={class:"d-flex flex-wrap align-items-start"},tt={__name:"TaskList",setup(f){const{apiGetTaskGroupsList:E,apiGetTasks:I}=ds,{apiGetTaskTags:N}=rs,x=Q.useLoading(),C=W(),w=X(),T=r([]),d=r(null),p=r({current_page:1,total_page:1}),k=async(e=1)=>{var i,v,t,y;const a=x.show();try{const{tasks:c,pagination:J}=await I({count:20,page:e,scoped:d.value});T.value=c,p.value=J}catch(c){is("danger","\u53D6\u5F97\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(v=(i=c==null?void 0:c.response)==null?void 0:i.data)==null?void 0:v.statusCode}:${(y=(t=c==null?void 0:c.response)==null?void 0:t.data)==null?void 0:y.message}`)}finally{a.hide()}},P=r([]);R(T,e=>{const a=e.map(i=>i.category);P.value=[...new Set(a)]});const _=r("default"),S=r([]),q=r(!1),z=async()=>{const e=x.show(),{task_groups:a}=await E({page:1,count:150});S.value=a,q.value=!0,e.hide()},D=r([]),M=r(!1),A=async()=>{const e=x.show(),{task_tags:a}=await N({page:1,count:150});D.value=a,M.value=!0,e.hide()};R(_,async e=>{e==="task_group"&&!q.value&&await z(),e==="task_tags"&&!M.value&&await A(),e==="default"&&(d.value="",C.replace({name:"TaskList",query:{}}),k())});const j=e=>{k(e),C.replace({name:"TaskList",query:{}})},n=Y({task_group_id:"",task_name:"",task_tags:""}),F=()=>{d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`),k()};Z(async()=>{var e,a,i,v;((e=w.query)==null?void 0:e.filter)==="task_group"&&(_.value="task_group",n.task_group_id=(a=w.query)==null?void 0:a.task_group_id,n.task_name=(i=w.query)==null?void 0:i.task_name,d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`)),await k(((v=w.query)==null?void 0:v.page)||1)});const m=r([]),O=e=>{m.value.includes(e)?m.value=m.value.filter(a=>a!==e):m.value.push(e),m.value.length>0?(n.task_tags=m.value.join(","),d.value=`&filter=${_.value}&task_tags=${n.task_tags}`,k()):(d.value=null,k())},H=e=>{window.open(`https://dev-hex-user.hexschool.io/#/tasks/${e}?preview=1`,"_blank")};return(e,a)=>{const i=U("router-link"),v=U("v-select");return o(),l("div",_s,[us,s("div",ps,[s("div",ms,[s("div",vs,[B(s("select",{class:"form-select w-100",placeholder:"\u9078\u64C7\u8981\u7BE9\u9078\u7684\u985E\u5225","onUpdate:modelValue":a[0]||(a[0]=t=>_.value=t)},ys,512),[[ss,_.value]])])]),b(i,{to:"/admin/task/list/create",class:"btn btn-primary"},{default:L(()=>[h(" \u65B0\u589E\u4EFB\u52D9 ")]),_:1})]),_.value==="task_group"?(o(),l("div",bs,[s("div",fs,[ws,s("div",xs,[b(v,{modelValue:n.task_group_id,"onUpdate:modelValue":a[1]||(a[1]=t=>n.task_group_id=t),options:S.value,label:"name",clearable:!1,reduce:t=>t.id},null,8,["modelValue","options","reduce"])]),s("div",Ts,[s("div",Ls,[B(s("input",{id:"search","onUpdate:modelValue":a[2]||(a[2]=t=>n.task_name=t),type:"text",placeholder:"\u641C\u5C0B\u4EFB\u52D9\uFF08\u540D\u7A31\uFF09",class:"form-control",disabled:!n.task_group_id},null,8,$s),[[ts,n.task_name]])])])]),s("div",{class:"mb-4"},[s("button",{type:"button",class:"btn btn-primary",onClick:F}," \u641C\u5C0B ")])])):$("",!0),_.value==="task_tags"?(o(),l("div",Gs,[s("div",Vs,[(o(!0),l(G,null,V(D.value,t=>(o(),l("button",{key:t.id,type:"button",onClick:y=>O(t.id),class:as([{active:m.value.includes(t.id)},"btn btn-sm btn-outline-primary custom-btn-tag border-0 mx-2 mb-1"])},g(t.name),11,Cs))),128))])])):$("",!0),s("div",Ss,[s("div",qs,[s("div",Ds,[s("table",Ms,[Rs,s("tbody",Us,[(o(!0),l(G,null,V(T.value,(t,y)=>(o(),l("tr",{key:t.id,class:"align-middle"},[s("td",Bs,g((p.value.current_page-1)*20+(y+1)),1),s("td",Es,g(t.task_group_name),1),s("td",Is,[s("a",{href:"#",onClick:os(c=>H(t.id),["prevent"])},g(t.name),9,Ns)]),s("td",Ps,[(o(!0),l(G,null,V(t.tags,c=>(o(),l("span",{key:c,class:"badge bg-light text-dark me-1"},g(c),1))),128))]),s("td",zs,[t.enable?(o(),l("span",As,"\u662F")):(o(),l("span",js,"\u5426"))]),s("td",Fs,[t.start_at?(o(),l("span",Os,g(new Date(t.start_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Hs,"\u672A\u8A2D\u5B9A"))]),s("td",Js,[t.expired_at?(o(),l("span",Ks,g(new Date(t.expired_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Qs,"\u672A\u8A2D\u5B9A"))]),s("td",Ws,[b(i,{to:`/admin/task/list/${t.id}?page=${p.value.current_page}${d.value?d.value:""}`,class:"btn btn-sm btn-outline-gray"},{default:L(()=>[Xs,h(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),b(i,{to:`/admin/task/list/create?task_copy_id=${t.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:L(()=>[Ys,h(" \u8907\u88FD ")]),_:2},1032,["to"])])]))),128))])])])]),p.value.total_page>1?(o(),l("div",Zs,[s("div",st,[b(es(ls),{modelValue:p.value.current_page,"onUpdate:modelValue":a[3]||(a[3]=t=>p.value.current_page=t),records:p.value.total,"per-page":10,options:{chunk:6},onPaginate:j},null,8,["modelValue","records"])])])):$("",!0)])])}}},ct=K(tt,[["__scopeId","data-v-daeda8d6"]]);export{ct as default}; diff --git a/assets/TaskList.7a05c82b.css b/assets/TaskList.7a05c82b.css new file mode 100644 index 0000000..3786661 --- /dev/null +++ b/assets/TaskList.7a05c82b.css @@ -0,0 +1 @@ +.custom-btn-tag[data-v-daeda8d6]{background-color:#f8f9fa;color:var(--bs-dark-rgb)}.custom-btn-tag[data-v-daeda8d6]:hover{background-color:#ececec}.custom-btn-tag.active[data-v-daeda8d6]{background-color:var(--bs-dark);color:#f8f9fa} diff --git a/assets/Title.1be41d24.js b/assets/Title.1be41d24.js new file mode 100644 index 0000000..a13d51a --- /dev/null +++ b/assets/Title.1be41d24.js @@ -0,0 +1 @@ +import{a as C}from"./assistant.0e96b47d.js";import{r as d,s as F,z as f,a as h,e as A,f as y,A as l,b as e,E as v,M as B,D,o as V,B as q,c as x,F as R,q as z,x as k,$ as E,g as M,h as w}from"./index.4c40fcfd.js";const N={class:"mb-3"},U=e("label",{for:"addTitle",class:"form-label text-dark"},"\u7A31\u865F",-1),S={class:"mb-3"},j=e("label",{for:"titleLevel",class:"form-label text-dark"},"\u7B49\u7D1A",-1),O={class:"mb-3"},G=e("label",{for:"titleColor",class:"form-label text-dark"},"\u4EE3\u8868\u8272",-1),P={class:"mb-3"},H=e("label",{for:"titleDescription",class:"form-label text-dark"},"\u63CF\u8FF0",-1),I=["disabled"],J={__name:"CreateTitleModal",props:{tempTitle:{type:Object,default(){return{}}}},emits:["createTitleMethod"],setup($,{expose:g,emit:r}){const _=$,{apiPostAssistantTitleDetail:b}=C,m=d(),s=d({}),u=d(null);F(()=>_.tempTitle.name,()=>{s.value=_.tempTitle});const T=async()=>{try{const n={name:s.value.name,level:Number(s.value.level),color_code:s.value.color_code,description:s.value.description};await b(n),r("createTitleMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm()}catch(n){r("createTitleMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.data.statusCode}:${n.response.data.message}`})}};return g({createTitleModalRef:u}),(n,t)=>{const o=f("Field"),c=f("ErrorMessage"),a=f("VForm");return h(),A(a,{ref_key:"refs",ref:m,onSubmit:T},{default:y(({errors:p,meta:L})=>[l(B,{ref_key:"createTitleModalRef",ref:u,"has-footer":!0,title:"\u65B0\u589E\u52A9\u6559\u7A31\u865F","class-list":""},{body:y(()=>[e("div",N,[U,l(o,{id:"addTitle",modelValue:s.value.name,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value.name=i),name:"\u7A31\u865F",type:"text",class:v(["form-control",{"is-invalid":p.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",S,[j,l(o,{id:"titleLevel",modelValue:s.value.level,"onUpdate:modelValue":t[1]||(t[1]=i=>s.value.level=i),name:"\u7B49\u7D1A",type:"text",class:v(["form-control",{"is-invalid":p.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),l(c,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",O,[G,l(o,{id:"titleColor",modelValue:s.value.color_code,"onUpdate:modelValue":t[2]||(t[2]=i=>s.value.color_code=i),name:"\u4EE3\u8868\u8272",type:"color",class:v(["form-control form-control-color",{"is-invalid":p.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",P,[H,l(o,{id:"titleDescription",modelValue:s.value.description,"onUpdate:modelValue":t[3]||(t[3]=i=>s.value.description=i),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:v(["form-control",{"is-invalid":p.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),footer:y(()=>[e("button",{type:"submit",disabled:!L.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,I)]),_:2},1536)]),_:1},512)}}},K={class:"about px-4 mt-4 position-relative"},Q={class:"d-flex align-items-center justify-content-between"},W=e("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7A31\u865F ",-1),X=e("hr",null,null,-1),Y={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Z={class:"card-body p-0"},ee={class:"table-responsive"},te={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},se=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7A31\u865F "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u7B49\u7D1A "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),oe={class:"text-nowrap"},le={scope:"row",class:"ps-4"},ae={class:"pe-3"},ne=e("span",{class:"material-icons align-middle fs-6"}," edit",-1),ie=["onClick"],de=e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1),me={__name:"Title",setup($){const{apiGetAssistantsTitles:g}=C,r=d(""),_=D.useLoading(),b=d([]),m=async()=>{const t=_.show();try{const{assistant_titles:o}=await g();b.value=o}catch(o){k("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}};V(m);const s=d({}),u=(t,o)=>{t==="copy"?s.value={...o}:t==="add"&&(s.value={}),r.value.show()},T=t=>{t.type==="\u6210\u529F"?k("success","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F"):t.type==="\u5931\u6557"&&k("danger","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u5931\u6557",t.error),r.value.hide(),m()},n=d(null);return V(()=>{r.value=new q(n.value.createTitleModalRef.hModal)}),(t,o)=>{const c=f("router-link");return h(),x("div",K,[e("header",Q,[W,e("button",{type:"button",class:"btn btn-primary",onClick:o[0]||(o[0]=a=>u("add"))}," \u65B0\u589E\u7A31\u865F ")]),X,e("div",Y,[e("div",Z,[e("div",ee,[e("table",te,[se,e("tbody",oe,[(h(!0),x(R,null,z(b.value,a=>(h(),x("tr",{key:a.id,class:"align-middle"},[e("td",le,[e("span",{class:"d-inline-block rounded-pill",style:E([{width:"10px",height:"10px"},`background-color:${a.color_code}`])},null,4),M(" "+w(a.name),1)]),e("td",null,w(a.level),1),e("td",ae,[l(c,{to:`/admin/assistants/title/${a.id}`,class:"btn btn-sm btn-outline-gray me-2"},{default:y(()=>[M(" \u7DE8\u8F2F"),ne]),_:2},1032,["to"]),e("button",{type:"button",class:"btn btn-sm btn-outline-gray me-2",onClick:p=>u("copy",a)},[M(" \u8907\u88FD"),de],8,ie)])]))),128))])])])])]),l(J,{ref_key:"createTitleModalComponentRef",ref:n,"temp-title":s.value,onCreateTitleMethod:T},null,8,["temp-title"])])}}};export{me as default}; diff --git a/assets/TitleDetail.8195e4b0.js b/assets/TitleDetail.8195e4b0.js new file mode 100644 index 0000000..3e3e6db --- /dev/null +++ b/assets/TitleDetail.8195e4b0.js @@ -0,0 +1 @@ +import{t as I,r as m,o as $,B as L,j as R,a as U,e as q,f as w,b as e,h as _,i as p,w as F,v as j,M as N,D as S,l as z,u as O,z as V,c as G,A as o,x as v,g as P,E as k}from"./index.4c40fcfd.js";import{a as H}from"./assistant.0e96b47d.js";const J={class:"mb-4"},K={for:"title"},Q=["disabled"],W={__name:"DangerActionsModal",props:{body:{type:Object,default(){return{userId:String,type:String}}}},emits:["danger-user-method"],setup(A,{expose:x,emit:T}){const d=I(A,"body"),r=m(""),b=m(null),t=m(null);$(()=>{b.value=new L(t.value.hModal),t.value.hModal.addEventListener("hidden.bs.modal",()=>{r.value=""})});const i=R(()=>{const{type:c}=d.value;return c==="deleteTitle"?{title:"\u662F\u5426\u522A\u9664\u4EE5\u4E0B\u52A9\u6559\u7A31\u865F\uFF1F",body:{label:"\u8ACB\u518D\u6B21\u8F38\u5165\u52A9\u6559\u7A31\u865F",btn:"\u522A\u9664"}}:{body:{}}}),f=()=>{b.value.show()},h=()=>{b.value.hide()},D=()=>{const{type:c,userId:u}=d.value;T("danger-user-method",{userId:u,type:c})};return x({openModal:f,hideModal:h}),(c,u)=>(U(),q(N,{id:"userDangerActions",ref_key:"myModal",ref:t,"has-footer":!0,title:p(i).title},{body:w(()=>[e("p",J,_(p(d).name),1),e("label",K,_(p(i).body.label),1),F(e("input",{id:"title","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),type:"text",class:"form-control"},null,512),[[j,r.value]])]),footer:w(()=>[e("button",{type:"button",class:"btn btn-primary",onClick:h},"\u53D6\u6D88"),e("button",{disabled:r.value!==p(d).name,type:"button",class:"btn btn-danger",onClick:D},_(p(i).body.btn),9,Q)]),_:1},8,["title"]))}},X={class:"about px-4 mt-4"},Y={"aria-label":"breadcrumb"},Z={class:"breadcrumb"},ee={class:"breadcrumb-item"},te=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u52A9\u6559\u7A31\u865F ",-1),se=e("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559\u7A31\u865F",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},le={class:"card-header bg-white py-3"},ne={class:"fs-6 mb-0 lh-base"},de={class:"mb-0"},ie={class:"card-body"},re={class:"mb-3"},ce=e("label",{for:"name",class:"form-label"},"\u7A31\u865F",-1),ue={class:"mb-3"},me=e("label",{for:"level",class:"form-label"},"\u7B49\u7D1A",-1),be={class:"mb-3"},pe=e("label",{for:"colorCode",class:"form-label"},"\u4EE3\u8868\u8272",-1),ve={class:"mb-3"},_e=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={class:"card-footer bg-white py-3 d-flex justify-content-between"},he=["disabled"],Me={__name:"TitleDetail",setup(A){const{apiGetAssistantTitleDetail:x,apiPutAssistantTitleDetail:T,apiDeleteAssistantTitle:C}=H,d=S.useLoading(),r=z(),b=O(),t=m({}),i=m(null),f=m({}),h=({type:l,name:s})=>{i.value.openModal(),f.value={type:l,name:s}},D=async({type:l})=>{try{l==="deleteTitle"&&await C(t.value.id),v("success","\u5371\u96AA\u64CD\u4F5C\u6210\u529F\uFF0C3 \u79D2\u5F8C\u8DF3\u56DE\u52A9\u6559\u7A31\u865F, \u52A9\u6559\u7A31\u865F\u5DF2\u7D93\u88AB\u522A\u9664\u3002"),setTimeout(()=>{b.push("/admin/assistants/title")},3e3)}catch(s){v("danger","\u5371\u96AA\u64CD\u4F5C\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u64CD\u4F5C",s)}finally{i.value.hideModal()}},c=async l=>{const s=d.show();try{const a={name:t.value.name,level:t.value.level,color_code:t.value.color_code,description:t.value.description};await T(l,a),v("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u52A9\u6559\u7A31\u865F")}catch(a){v("danger","\u64CD\u4F5C\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}},u=async l=>{const s=d.show();try{const{assistant_title_info:a}=await x(l);t.value=a}catch(a){v("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}};return $(()=>{u(r.params.id)}),(l,s)=>{const a=V("router-link"),y=V("Field"),g=V("ErrorMessage"),B=V("VForm");return U(),G("div",X,[e("header",null,[e("nav",Y,[e("ol",Z,[e("li",ee,[o(a,{to:"/admin/assistants/title"},{default:w(()=>[P(" \u52A9\u6559\u7A31\u865F ")]),_:1})]),te])]),se,ae]),o(B,{ref:"refs"},{default:w(({errors:M,meta:E})=>[e("div",oe,[e("div",le,[e("h2",ne,_(t.value.name),1),e("p",de,[e("small",null,"\u76EE\u524D\u5171\u6709 "+_(t.value.apply_count)+" \u4EBA\u5957\u7528\u6B64\u7A31\u865F",1)])]),e("div",ie,[e("div",re,[ce,o(y,{id:"name",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=n=>t.value.name=n),name:"\u7A31\u865F",type:"text",class:k(["form-control",{"is-invalid":M.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",ue,[me,o(y,{id:"level",modelValue:t.value.level,"onUpdate:modelValue":s[1]||(s[1]=n=>t.value.level=n),name:"\u7B49\u7D1A",type:"text",class:k(["form-control",{"is-invalid":M.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),o(g,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",be,[pe,o(y,{id:"colorCode",modelValue:t.value.color_code,"onUpdate:modelValue":s[2]||(s[2]=n=>t.value.color_code=n),name:"\u4EE3\u8868\u8272",type:"color",class:k(["form-control form-control-color",{"is-invalid":M.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",ve,[_e,o(y,{id:"description",modelValue:t.value.description,"onUpdate:modelValue":s[3]||(s[3]=n=>t.value.description=n),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:k(["form-control",{"is-invalid":M.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),e("div",fe,[e("button",{type:"button",class:"btn btn-outline-danger",onClick:s[4]||(s[4]=n=>h({type:"deleteTitle",name:t.value.name}))}," \u522A\u9664 "),e("button",{type:"button",disabled:!E.valid,class:"btn btn-primary",onClick:s[5]||(s[5]=n=>c(t.value.id))}," \u66F4\u65B0 ",8,he)])])]),_:1},512),o(W,{ref_key:"dangerActionsModalRef",ref:i,body:f.value,onDangerUserMethod:D},null,8,["body"])])}}};export{Me as default}; diff --git a/assets/TrainingDetail.463889be.css b/assets/TrainingDetail.463889be.css new file mode 100644 index 0000000..2be61a7 --- /dev/null +++ b/assets/TrainingDetail.463889be.css @@ -0,0 +1 @@ +[data-v-50d0b977] .content img{max-width:100%;display:block}[data-v-50d0b977] .content code,[data-v-50d0b977] .content pre{background-color:#f0f0f0;padding:2px;border-radius:3px}[data-v-50d0b977] .content pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}[data-v-50d0b977] .content pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.custom-form-check-input[data-v-3a8382f7]{font-size:22px;transform:translateY(50%)}.form-check-input[data-v-3a8382f7]:checked{background-color:#fff;border-color:var(--bs-success);border-width:2px}.form-check-input:checked[type=radio][data-v-3a8382f7]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%232A8356'/%3e%3c/svg%3e")}.checked .form-check-label[data-v-3a8382f7],.checked .btn-link[data-v-3a8382f7]{color:var(--bs-success)}.form-check-label[data-v-3a8382f7]:hover,.form-check-label:hover+.btn-link[data-v-3a8382f7]{color:var(--bs-success);cursor:pointer}.list-group[data-v-a71f8236]{border-radius:0}.list-group-item[data-v-a71f8236]{border:none}.list-group-item.active[data-v-a71f8236],.list-group-item[data-v-a71f8236]:hover{background-color:#edf0ef;color:#00251a}.cursor-grabbing[data-v-93322c6e]{cursor:grabbing!important}.cursor-not-allowed[data-v-93322c6e]{cursor:not-allowed!important}.ghost[data-v-93322c6e]{opacity:.5;background:#c8ebfb}.drag[data-v-93322c6e]{height:74px!important;border:1px solid var(--bs-primary)!important;border-radius:var(--bs-border-radius)!important}input[type=radio][data-v-bdb3b034]{visibility:hidden}input[data-v-1c1cf2ce]{padding-top:9px;padding-bottom:9px}.inputFile[data-v-1c1cf2ce]{position:relative}.inputFile[data-v-1c1cf2ce]::-webkit-file-upload-button{position:absolute;top:0;bottom:0;right:-13px;background-color:#3d5950;color:#fff}.inputFile[data-v-1c1cf2ce]:hover::-webkit-file-upload-button{background-color:#314740!important} diff --git a/assets/TrainingDetail.6dfe4816.js b/assets/TrainingDetail.6dfe4816.js new file mode 100644 index 0000000..69cca99 --- /dev/null +++ b/assets/TrainingDetail.6dfe4816.js @@ -0,0 +1,10 @@ +import{r as X,s as Pn,z as ie,a as B,c as Y,A as W,f as Rt,b as d,E as Dt,h as Ct,x as lt,_ as He,D as on,o as le,F as Vt,q as te,w as ye,a5 as fn,i as Zt,p as Ot,e as ae,M as Me,B as Le,S as rn,T as sn,g as _e,v as ya,a6 as La,u as Na,m as Tn,G as Ae,a7 as Fa,a8 as ja,a0 as Ua,N as Va,U as Ga,Z as Yt,l as ba,j as Sa,Y as Pe,a3 as ta,C as Ba,a2 as Ka,R as ea,L as Ha,d as na}from"./index.4c40fcfd.js";import{a as ln}from"./training.91e0713a.js";import{f as Hn,a as Wn}from"./date.67a388f5.js";import{_ as Wa}from"./Editor.52546d8d.js";import{b as ka}from"./bsTab.b84f3f29.js";/* empty css */import"./tab.1217c1f2.js";const Xa={class:"rounded-4 border border-1 border-custom-color p-4"},Ya={class:"row"},za={class:"col-md-6"},Ja={class:"mb-3"},Za=d("label",{for:"title",class:"form-label"},"\u6D3B\u52D5\u540D\u7A31",-1),Qa={class:"row"},_a={class:"col-md-6"},qa={class:"mb-3"},to=d("label",{for:"start_at",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),eo={class:"col-md-6"},no={class:"mb-3"},ao=d("label",{for:"end_at",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),oo={class:"d-flex justify-content-end mt-3"},ro=["disabled"],aa={__name:"CalendarCreate",props:{id:{type:String,default:""},editData:{type:Object,default:()=>({})}},emits:["refresh","close"],setup(r,{emit:e}){const a=r,{apiPostTrainingCalendar:s,apiPutTrainingCalendar:n}=ln,c=X(null),t=X(""),o=X({name:"",start_at:"",end_at:"",content:""});Pn(()=>a.editData,f=>{f.id&&(t.value=f.id,o.value={name:f.name,start_at:f.start_at,end_at:f.end_at,content:f.content})},{deep:!0});const i=X(null),l=()=>{i.value.resetForm(),e("close")},u=async()=>{const f=t.value!==""?"\u66F4\u65B0":"\u5EFA\u7ACB";o.value.content=c.value.editorContent,o.value.start_at=Hn(o.value.start_at),o.value.end_at=Hn(o.value.end_at);try{t.value!==""?await n(a.id,t.value,o.value):await s(a.id,o.value),lt("success",`\u884C\u4E8B\u66C6${f}\u6210\u529F`,`${o.value.name}\u5DF2\u7D93${f}\u6210\u529F`),e("refresh")}catch(v){const h=v.response.data;lt("danger",`\u884C\u4E8B\u66C6${f}\u5931\u6557`,`${h.statusCode}: ${h.message}`)}l()};return(f,v)=>{const h=ie("Field"),p=ie("ErrorMessage"),g=ie("VForm");return B(),Y("div",Xa,[W(g,{ref_key:"formRef",ref:i,onSubmit:u},{default:Rt(({errors:m,meta:y})=>[d("div",Ya,[d("div",za,[d("div",Ja,[Za,W(h,{id:"title",name:"title",label:"\u57F9\u8A13\u73ED\u540D\u7A31",type:"text",class:Dt([{"is-invalid":m.title},"form-control"]),modelValue:o.value.name,"onUpdate:modelValue":v[0]||(v[0]=S=>o.value.name=S),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required"},null,8,["class","modelValue"]),W(p,{name:"title",class:"invalid-feedback"})])])]),d("div",Qa,[d("div",_a,[d("div",qa,[to,W(h,{id:"start_at",name:"start_at",label:"\u958B\u59CB\u6642\u9593",type:"datetime-local",modelValue:o.value.start_at,"onUpdate:modelValue":v[1]||(v[1]=S=>o.value.start_at=S),class:Dt([{"is-invalid":m.start_at},"form-control"]),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["modelValue","class"]),W(p,{name:"start_at",class:"invalid-feedback"})])]),d("div",eo,[d("div",no,[ao,W(h,{id:"end_at",name:"end_at",label:"\u7D50\u675F\u6642\u9593",type:"datetime-local",class:Dt([{"is-invalid":m.end_at},"form-control"]),modelValue:o.value.end_at,"onUpdate:modelValue":v[2]||(v[2]=S=>o.value.end_at=S),rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["class","modelValue"]),W(p,{name:"end_at",class:"invalid-feedback"})])])]),d("div",null,[W(Wa,{ref_key:"editorComponentRef",ref:c,content:o.value.content},null,8,["content"])]),d("div",oo,[d("button",{type:"button",class:"btn btn-outline-secondary me-2",onClick:l}," \u53D6\u6D88 "),d("button",{type:"submit",class:"btn btn-primary",disabled:!y.valid},Ct(t.value!==""?"\u66F4\u65B0":"\u78BA\u8A8D\u65B0\u589E"),9,ro)])]),_:1},512)])}}};const Ne=r=>(rn("data-v-50d0b977"),r=r(),sn(),r),so={class:"mb-5"},io={class:"table-responsive mb-3"},lo={class:"table custom-table-style mb-0"},co=Ne(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",{width:"150"}),d("th",{width:"200"},"\u6D3B\u52D5\u6642\u9593"),d("th",{width:"150"})])],-1)),uo={class:"text-nowrap"},fo=["onClick"],vo={class:"mt-2"},ho={key:0,colspan:"4",class:"border-0"},po=["onClick"],mo=["onClick"],go={key:0,class:"text-center"},yo=Ne(()=>d("span",{class:"material-icons align-bottom"}," add ",-1)),bo=[yo],So=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u6A19\u984C",-1)),xo={class:"text-primary"},Eo={class:"d-flex mt-3"},Co={class:"col-md-6"},To=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u958B\u59CB\u6642\u9593",-1)),$o={class:"text-primary"},Oo={class:"col-md-6"},Do=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u7D50\u675F\u6642\u9593",-1)),Io={class:"text-primary"},wo={class:"mt-3"},Po=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u5167\u5BB9\u63CF\u8FF0",-1)),Ao=["innerHTML"],Ro={class:"h4 text-dark mb-3 fw-bold"},Mo=Ne(()=>d("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1)),Lo={class:"d-flex justify-content-end"},No={__name:"Calendar",props:{trainingId:{type:String,required:!0}},setup(r,{expose:e}){const a=r,{apiGetTrainingCalendar:s,apiGetTrainingCalendarDetail:n,apiDeleteTrainingCalendar:c}=ln,t=on.useLoading(),o=X([]),i=X({}),l=X(null),u=X(null),f=X(null),v=X(null);le(()=>{f.value=new Le(l.value.hModal),v.value=new Le(u.value.hModal)});const p=()=>{f.value.show()};e({openModal:p,hideModal:()=>{f.value.hide(),i.value={}}});const m=async()=>{const U=t.show(),{calendar:w}=await s(a.trainingId);o.value=w,U.hide()};le(()=>{m()});const y=async U=>{const w=t.show(),{calendar:P}=await n(a.trainingId,U);i.value=P,w.hide()},S=async U=>{await y(U),p()},b=X({name:"",id:""}),x=async U=>{const w=t.show();try{await c(a.trainingId,U),lt("success","\u522A\u9664\u6210\u529F",`${b.value.name}\u5DF2\u7D93\u522A\u9664\u6210\u529F`),m()}catch(P){const H=P.response.data;lt("danger","\u522A\u9664\u5931\u6557",`${H.statusCode}: ${b.value.name}\u522A\u9664\u5931\u6557\uFF5C${H.message}`)}w.hide(),v.value.hide()},I=U=>{v.value.show(),b.value=o.value.find(w=>w.id===U)},E=X(""),A=X(""),D=X({});function C(U){const w=new Date(U),P=w.getFullYear(),H=(w.getMonth()+1).toString().padStart(2,"0"),V=w.getDate().toString().padStart(2,"0"),k=w.getHours().toString().padStart(2,"0"),gt=w.getMinutes().toString().padStart(2,"0");return`${P}-${H}-${V}T${k}:${gt}`}const M=async U=>{await y(U),D.value={id:U,name:i.value.name,start_at:C(i.value.start_at),end_at:C(i.value.end_at),content:i.value.content}},L=(U="",w="")=>{E.value=U,A.value=w,U==="edit"?M(w):(D.value={name:"",start_at:"",end_at:"",content:""},setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight)},300))};return(U,w)=>(B(),Y(Vt,null,[d("div",so,[d("div",io,[d("table",lo,[co,d("tbody",uo,[(B(!0),Y(Vt,null,te(o.value,P=>(B(),Y("tr",{class:"align-middle",key:P.id},[ye(d("td",null,Ct(P.name),513),[[fn,!(E.value==="edit"&&A.value===P.id)]]),ye(d("td",null,[d("button",{type:"button",class:"btn btn-link link-success text-decoration-none fw-bold",onClick:H=>S(P.id)},"\u8A73\u7D30\u5167\u5BB9",8,fo)],512),[[fn,!(E.value==="edit"&&A.value===P.id)]]),ye(d("td",null,[d("p",vo,Ct(Zt(Wn)(P.start_at)),1),d("p",null,Ct(Zt(Wn)(P.end_at)),1)],512),[[fn,!(E.value==="edit"&&A.value===P.id)]]),E.value==="edit"&&A.value===P.id?(B(),Y("td",ho,[W(aa,{id:r.trainingId,"edit-data":D.value,onRefresh:m,onClose:L},null,8,["id","edit-data"])])):Ot("",!0),ye(d("td",null,[d("button",{type:"button",class:"btn btn-outline-dark me-2",onClick:H=>L("edit",P.id)},"\u7DE8\u8F2F",8,po),d("button",{type:"button",class:"btn btn-outline-danger",onClick:H=>I(P.id)},"\u522A\u9664",8,mo)],512),[[fn,!(E.value==="edit"&&A.value===P.id)]])]))),128))])])]),E.value!=="create"?(B(),Y("div",go,[d("button",{type:"button",class:"btn btn-outline-soft border-dashed rounded-circle p-2",onClick:w[0]||(w[0]=P=>L("create"))},bo)])):Ot("",!0),E.value==="create"?(B(),ae(aa,{key:1,id:r.trainingId,"edit-data":{},onRefresh:m,onClose:L},null,8,["id"])):Ot("",!0)]),W(Me,{ref_key:"modalDetailRef",ref:l,title:"",modalSize:"modal-lg","has-footer":!1},{body:Rt(()=>[d("div",null,[So,d("p",xo,Ct(i.value.name),1)]),d("div",Eo,[d("div",Co,[To,d("p",$o,Ct(new Date(i.value.start_at).toLocaleString("sv-SE")),1)]),d("div",Oo,[Do,d("p",Io,Ct(new Date(i.value.end_at).toLocaleString("sv-SE")),1)])]),d("div",wo,[Po,d("div",{class:"content text-primary",innerHTML:i.value.content},null,8,Ao)])]),_:1},512),W(Me,{ref_key:"modalDeleteRef",ref:u,title:"\u662F\u5426\u522A\u9664\u6B64\u6D3B\u52D5\uFF1F",modalSize:"modal-md",hasFooter:!0},{body:Rt(()=>[d("h5",Ro,Ct(b.value.name),1),Mo,d("div",Lo,[d("button",{type:"button",class:"btn btn-primary me-2",onClick:w[1]||(w[1]=P=>v.value.hide())},"\u53D6\u6D88"),d("button",{type:"button",class:"btn btn-danger",onClick:w[2]||(w[2]=P=>x(b.value.id))},"\u522A\u9664\u6D3B\u52D5")])]),_:1},512)],64))}},Fo=He(No,[["__scopeId","data-v-50d0b977"]]);function oa(r){return typeof r=="function"?r():Zt(r)}const ra=()=>{};function jo(r,e){function a(...s){return new Promise((n,c)=>{Promise.resolve(r(()=>e.apply(this,s),{fn:e,thisArg:this,args:s})).then(n).catch(c)})}return a}const Uo=r=>r();function Vo(r,e={}){let a,s,n=ra;const c=o=>{clearTimeout(o),n(),n=ra};return o=>{const i=oa(r),l=oa(e.maxWait);return a&&c(a),i<=0||l!==void 0&&l<=0?(s&&(c(s),s=null),Promise.resolve(o())):new Promise((u,f)=>{n=e.rejectOnCancel?f:u,l&&!s&&(s=setTimeout(()=>{a&&c(a),s=null,u(o())},l)),a=setTimeout(()=>{s&&c(s),s=null,u(o())},i)})}}function Go(r,e,a={}){const{eventFilter:s=Uo,...n}=a;return Pn(r,jo(s,e),n)}function Bo(r,e,a={}){const{debounce:s=0,maxWait:n=void 0,...c}=a;return Go(r,e,{...c,eventFilter:Vo(s,{maxWait:n})})}const We=r=>(rn("data-v-3a8382f7"),r=r(),sn(),r),Ko=We(()=>d("h4",{class:"text-dark mb-3"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u8A2D\u5B9A",-1)),Ho={key:0,class:"text-primary"},Wo=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),ko={class:"row"},Xo={class:"col-lg-4 col-md-7"},Yo={class:"form-floating mb-2"},zo=We(()=>d("label",{for:"training-name"},"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),Jo={class:"card rounded-4"},Zo={class:"card-body"},Qo=["id","value"],_o={class:"d-flex align-items-center"},qo=["for"],tr=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),er={class:"mb-0 text-dark",style:{"font-size":"14px"}},nr={key:0},ar={key:1,class:"text-muted"},or={key:0},rr={class:"my-5"},sr={class:"mb-3"},ir={class:"table custom-table-style mb-0"},lr=We(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",null,"\u4EFB\u52D9\u7FA4\u7D44"),d("th",null,"\u5F8C\u53F0\u9023\u7D50"),d("th",null,"\u524D\u53F0\u9023\u7D50")])],-1)),cr=We(()=>d("td",null,"-",-1)),dr={__name:"UserGroup",props:{trainingId:{type:String,required:!0},userGroups:{type:Array,required:!0}},emits:["refresh"],setup(r,{emit:e}){const a=r,{apiGetTrainingUserGroup:s,apiGetTrainingTask:n,apiPutTrainingUserGroups:c}=ln,t=on.useLoading(),o=X(!1),i=X([]),l=X(""),u=X({total:0,total_page:0,current_page:1}),f=X(""),v=async({keyword:b,page:x}={})=>{const I=t.show();o.value=!0;try{const{user_groups:E,pagination:A}=await s({keyword:b,page:x});x===1?(i.value=[],i.value=E):i.value=[...i.value,...E],u.value=A}catch{lt("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557")}finally{I.hide(),o.value=!1}},h=X([]),p=X(!1),g=async()=>{p.value=!0;const b=t.show();try{const{tasks:x}=await n(a.trainingId);h.value=x}catch{lt("danger","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557")}finally{b.hide(),p.value=!1}};le(()=>{v(),g()}),Pn(()=>a.userGroups,b=>{l.value=b[0].id},{immediate:!0});const m=X(null);le(()=>{const b=m.value;b.addEventListener("scroll",x=>{if(x.target.clientHeight+x.target.scrollTop>b.scrollHeight-1){if(o.value||u.value.current_page===u.value.total_page)return;v({keyword:f.value,page:u.value.current_page+1})}})}),Bo(f,()=>{v({keyword:f.value,page:1})},{debounce:1e3,maxWait:1300});const S=async()=>{const b=[];b.push(l.value);try{await c(a.trainingId,{user_group_ids:b}),lt("success","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F"),g(),e("refresh")}catch{lt("danger","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557")}};return(b,x)=>{const I=ie("router-link");return B(),Y(Vt,null,[d("div",null,[Ko,a.userGroups.length>0?(B(),Y("p",Ho,[_e(" \u76EE\u524D\u5DF2\u9078\u64C7\u7684\u4F7F\u7528\u8005\u7FA4\u7D44\uFF1A"),W(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:a.userGroups[0].id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[d("b",null,Ct(a.userGroups[0].name),1),Wo]),_:1},8,["to"])])):Ot("",!0),d("div",ko,[d("div",Xo,[d("div",Yo,[ye(d("input",{type:"text",class:"form-control",id:"training-name",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":x[0]||(x[0]=E=>f.value=E)},null,512),[[ya,f.value]]),zo])])])]),d("div",Jo,[d("div",Zo,[d("ul",{class:"list-group border-bottom mb-3 overflow-y-scroll",ref_key:"userGroupListRef",ref:m,style:{"max-height":"500px"}},[(B(!0),Y(Vt,null,te(i.value,E=>(B(),Y("li",{class:"list-group-item border-0",key:E.id},[d("div",{class:Dt(["form-check",{checked:l.value===E.id}])},[ye(d("input",{type:"radio",class:"form-check-input custom-form-check-input",name:"user-group",id:E.id,"onUpdate:modelValue":x[1]||(x[1]=A=>l.value=A),value:E.id},null,8,Qo),[[La,l.value]]),d("div",_o,[d("label",{for:E.id,class:"form-check-label"},Ct(E.name),9,qo),W(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:E.id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[tr]),_:2},1032,["to"])]),d("p",er,[E.task_groups.length>0?(B(),Y("span",nr,"\u5DF2\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")):(B(),Y("span",ar,"\u76EE\u524D\u672A\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")),(B(!0),Y(Vt,null,te(E.task_groups,(A,D)=>(B(),Y("span",{key:A.id},[_e(" \u300C"+Ct(A.name)+" \u300D ",1),D(B(),Y("tr",{class:"align-middle",key:E.id},[d("td",null,Ct(E.name),1),d("td",null,Ct(E.task_group_name),1),d("td",null,[W(I,{target:"_blank",to:{name:"TaskDetail",params:{id:E.id}},class:"btn btn-link text-decoration-none link-success fw-bold"},{default:Rt(()=>[_e(" \u9023\u7D50 ")]),_:2},1032,["to"])]),cr]))),128))])])])],64)}}},ur=He(dr,[["__scopeId","data-v-3a8382f7"]]);const fr={key:0,class:"text-dark mb-4"},vr={class:"row"},hr={class:"col-md-3"},pr={class:"list-group"},mr=["href","onClick"],gr={class:"material-icons-outlined me-2"},yr={class:"col-md-9"},br={class:"tab-content"},Sr={__name:"ListGroup",props:{title:{type:String,default:""},tabList:{type:Array,default:()=>[{id:1,name:"home",cht_icon:"settings",cht_name:"\u5217\u88681"}]}},setup(r,{expose:e}){const a=r,s=Na(),n=Tn(a.tabList),c=X(1),t=Tn([]),o=i=>{i.element.show(),c.value=i.id};return le(()=>{ka(t,n)}),e({tabShow:o}),(i,l)=>(B(),Y(Vt,null,[a.title?(B(),Y("h4",fr,Ct(a.title),1)):Ot("",!0),d("div",vr,[d("div",hr,[d("div",pr,[(B(!0),Y(Vt,null,te(n,(u,f)=>(B(),Y("a",{key:u.id,href:`#${u.name}`,ref_for:!0,ref:v=>t.push(v),class:Dt(["list-group-item d-flex align-items-center mb-1",c.value===u.id?"active":""]),onClick:Ae(()=>{o(u),Zt(s).replace({query:{menuId:f}})},["prevent"])},[d("span",gr,Ct(u.cht_icon),1),_e(" "+Ct(u.cht_name),1)],10,mr))),128))])]),d("div",yr,[d("div",br,[Fa(i.$slots,"body",{nowId:c.value},void 0,!0)])])])],64))}},xr=He(Sr,[["__scopeId","data-v-a71f8236"]]);var xa={exports:{}};/**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */function sa(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),a.push.apply(a,s)}return a}function Se(r){for(var e=1;e=0)&&(a[n]=r[n]);return a}function Tr(r,e){if(r==null)return{};var a=Cr(r,e),s,n;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(n=0;n=0)&&(!Object.prototype.propertyIsEnumerable.call(r,s)||(a[s]=r[s]))}return a}function $r(r){return Or(r)||Dr(r)||Ir(r)||wr()}function Or(r){if(Array.isArray(r))return kn(r)}function Dr(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ir(r,e){if(!!r){if(typeof r=="string")return kn(r,e);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return kn(r,e)}}function kn(r,e){(e==null||e>r.length)&&(e=r.length);for(var a=0,s=new Array(e);a"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function Rr(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function pe(r,e,a,s){if(r){a=a||document;do{if(e!=null&&(e[0]===">"?r.parentNode===a&&$n(r,e):$n(r,e))||s&&r===a)return r;if(r===a)break}while(r=Rr(r))}return null}var la=/\s+/g;function Ut(r,e,a){if(r&&e)if(r.classList)r.classList[a?"add":"remove"](e);else{var s=(" "+r.className+" ").replace(la," ").replace(" "+e+" "," ");r.className=(s+(a?" "+e:"")).replace(la," ")}}function _(r,e,a){var s=r&&r.style;if(s){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(a=r.currentStyle),e===void 0?a:a[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=a+(typeof a=="string"?"":"px")}}function Re(r,e){var a="";if(typeof r=="string")a=r;else do{var s=_(r,"transform");s&&s!=="none"&&(a=s+" "+a)}while(!e&&(r=r.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(a)}function Ta(r,e,a){if(r){var s=r.getElementsByTagName(e),n=0,c=s.length;if(a)for(;n=c:t=n<=c,!t)return s;if(s===be())break;s=Oe(s,!1)}return!1}function Ke(r,e,a,s){for(var n=0,c=0,t=r.children;c2&&arguments[2]!==void 0?arguments[2]:{},n=s.evt,c=Tr(s,Vr);dn.pluginEvent.bind(ct)(e,a,Se({dragEl:K,parentEl:Gt,ghostEl:mt,rootEl:Ft,nextEl:we,lastDownEl:Sn,cloneEl:Bt,cloneHidden:$e,dragStarted:Je,putSortable:_t,activeSortable:ct.active,originalEvent:n,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te,hideGhostForTarget:Pa,unhideGhostForTarget:Aa,cloneNowHidden:function(){$e=!0},cloneNowShown:function(){$e=!1},dispatchSortableEvent:function(o){ne({sortable:a,name:o,originalEvent:n})}},c))};function ne(r){ze(Se({putSortable:_t,cloneEl:Bt,targetEl:K,rootEl:Ft,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te},r))}var K,Gt,mt,Ft,we,Sn,Bt,$e,Be,de,en,Te,vn,_t,Ge=!1,On=!1,Dn=[],De,ve,Fn,jn,fa,va,Je,Ue,nn,an=!1,hn=!1,xn,qt,Un=[],Xn=!1,In=[],An=typeof document<"u",pn=Ea,ha=cn||Ce?"cssFloat":"float",Gr=An&&!Ar&&!Ea&&"draggable"in document.createElement("div"),Da=function(){if(!!An){if(Ce)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Ia=function(e,a){var s=_(e),n=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),c=Ke(e,0,a),t=Ke(e,1,a),o=c&&_(c),i=t&&_(t),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+jt(c).width,u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+jt(t).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(c&&o.float&&o.float!=="none"){var f=o.float==="left"?"left":"right";return t&&(i.clear==="both"||i.clear===f)?"vertical":"horizontal"}return c&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||l>=n&&s[ha]==="none"||t&&s[ha]==="none"&&l+u>n)?"vertical":"horizontal"},Br=function(e,a,s){var n=s?e.left:e.top,c=s?e.right:e.bottom,t=s?e.width:e.height,o=s?a.left:a.top,i=s?a.right:a.bottom,l=s?a.width:a.height;return n===o||c===i||n+t/2===o+l/2},Kr=function(e,a){var s;return Dn.some(function(n){var c=n[ee].options.emptyInsertThreshold;if(!(!c||Zn(n))){var t=jt(n),o=e>=t.left-c&&e<=t.right+c,i=a>=t.top-c&&a<=t.bottom+c;if(o&&i)return s=n}}),s},wa=function(e){function a(c,t){return function(o,i,l,u){var f=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(c==null&&(t||f))return!0;if(c==null||c===!1)return!1;if(t&&c==="clone")return c;if(typeof c=="function")return a(c(o,i,l,u),t)(o,i,l,u);var v=(t?o:i).options.group.name;return c===!0||typeof c=="string"&&c===v||c.join&&c.indexOf(v)>-1}}var s={},n=e.group;(!n||bn(n)!="object")&&(n={name:n}),s.name=n.name,s.checkPull=a(n.pull,!0),s.checkPut=a(n.put),s.revertClone=n.revertClone,e.group=s},Pa=function(){!Da&&mt&&_(mt,"display","none")},Aa=function(){!Da&&mt&&_(mt,"display","")};An&&document.addEventListener("click",function(r){if(On)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),On=!1,!1},!0);var Ie=function(e){if(K){e=e.touches?e.touches[0]:e;var a=Kr(e.clientX,e.clientY);if(a){var s={};for(var n in e)e.hasOwnProperty(n)&&(s[n]=e[n]);s.target=s.rootEl=a,s.preventDefault=void 0,s.stopPropagation=void 0,a[ee]._onDragOver(s)}}},Hr=function(e){K&&K.parentNode[ee]._isOutsideThisEl(e.target)};function ct(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=fe({},e),r[ee]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ia(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,o){t.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ct.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};dn.initializePlugins(this,r,a);for(var s in a)!(s in e)&&(e[s]=a[s]);wa(e);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=e.forceFallback?!1:Gr,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?St(r,"pointerdown",this._onTapStart):(St(r,"mousedown",this._onTapStart),St(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(St(r,"dragover",this),St(r,"dragenter",this)),Dn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),fe(this,Fr())}ct.prototype={constructor:ct,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ue=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,K):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var a=this,s=this.el,n=this.options,c=n.preventOnFilter,t=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,i=(o||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||i,u=n.filter;if(Qr(s),!K&&!(/mousedown|pointerdown/.test(t)&&e.button!==0||n.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&qe&&i&&i.tagName.toUpperCase()==="SELECT")&&(i=pe(i,n.draggable,s,!1),!(i&&i.animated)&&Sn!==i)){if(Be=Kt(i),en=Kt(i,n.draggable),typeof u=="function"){if(u.call(this,e,i,this)){ne({sortable:a,rootEl:l,name:"filter",targetEl:i,toEl:s,fromEl:s}),re("filter",a,{evt:e}),c&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=pe(l,f.trim(),s,!1),f)return ne({sortable:a,rootEl:f,name:"filter",targetEl:i,fromEl:s,toEl:s}),re("filter",a,{evt:e}),!0}),u)){c&&e.cancelable&&e.preventDefault();return}n.handle&&!pe(l,n.handle,s,!1)||this._prepareDragStart(e,o,i)}}},_prepareDragStart:function(e,a,s){var n=this,c=n.el,t=n.options,o=c.ownerDocument,i;if(s&&!K&&s.parentNode===c){var l=jt(s);if(Ft=c,K=s,Gt=K.parentNode,we=K.nextSibling,Sn=s,vn=t.group,ct.dragged=K,De={target:K,clientX:(a||e).clientX,clientY:(a||e).clientY},fa=De.clientX-l.left,va=De.clientY-l.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,K.style["will-change"]="all",i=function(){if(re("delayEnded",n,{evt:e}),ct.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!ia&&n.nativeDraggable&&(K.draggable=!0),n._triggerDragStart(e,a),ne({sortable:n,name:"choose",originalEvent:e}),Ut(K,t.chosenClass,!0)},t.ignore.split(",").forEach(function(u){Ta(K,u.trim(),Vn)}),St(o,"dragover",Ie),St(o,"mousemove",Ie),St(o,"touchmove",Ie),St(o,"mouseup",n._onDrop),St(o,"touchend",n._onDrop),St(o,"touchcancel",n._onDrop),ia&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),re("delayStart",this,{evt:e}),t.delay&&(!t.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(cn||Ce))){if(ct.eventCanceled){this._onDrop();return}St(o,"mouseup",n._disableDelayedDrag),St(o,"touchend",n._disableDelayedDrag),St(o,"touchcancel",n._disableDelayedDrag),St(o,"mousemove",n._delayedDragTouchMoveHandler),St(o,"touchmove",n._delayedDragTouchMoveHandler),t.supportPointer&&St(o,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,t.delay)}else i()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Vn(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bt(e,"mouseup",this._disableDelayedDrag),bt(e,"touchend",this._disableDelayedDrag),bt(e,"touchcancel",this._disableDelayedDrag),bt(e,"mousemove",this._delayedDragTouchMoveHandler),bt(e,"touchmove",this._delayedDragTouchMoveHandler),bt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?St(document,"pointermove",this._onTouchMove):a?St(document,"touchmove",this._onTouchMove):St(document,"mousemove",this._onTouchMove):(St(K,"dragend",this),St(Ft,"dragstart",this._onDragStart));try{document.selection?En(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(Ge=!1,Ft&&K){re("dragStarted",this,{evt:a}),this.nativeDraggable&&St(document,"dragover",Hr);var s=this.options;!e&&Ut(K,s.dragClass,!1),Ut(K,s.ghostClass,!0),ct.active=this,e&&this._appendGhost(),ne({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(ve){this._lastX=ve.clientX,this._lastY=ve.clientY,Pa();for(var e=document.elementFromPoint(ve.clientX,ve.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ve.clientX,ve.clientY),e!==a);)a=e;if(K.parentNode[ee]._isOutsideThisEl(e),a)do{if(a[ee]){var s=void 0;if(s=a[ee]._onDragOver({clientX:ve.clientX,clientY:ve.clientY,target:e,rootEl:a}),s&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);Aa()}},_onTouchMove:function(e){if(De){var a=this.options,s=a.fallbackTolerance,n=a.fallbackOffset,c=e.touches?e.touches[0]:e,t=mt&&Re(mt,!0),o=mt&&t&&t.a,i=mt&&t&&t.d,l=pn&&qt&&da(qt),u=(c.clientX-De.clientX+n.x)/(o||1)+(l?l[0]-Un[0]:0)/(o||1),f=(c.clientY-De.clientY+n.y)/(i||1)+(l?l[1]-Un[1]:0)/(i||1);if(!ct.active&&!Ge){if(s&&Math.max(Math.abs(c.clientX-this._lastX),Math.abs(c.clientY-this._lastY))=0&&(ne({rootEl:Gt,name:"add",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"remove",toEl:Gt,originalEvent:e}),ne({rootEl:Gt,name:"sort",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),_t&&_t.save()):de!==Be&&de>=0&&(ne({sortable:this,name:"update",toEl:Gt,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),ct.active&&((de==null||de===-1)&&(de=Be,Te=en),ne({sortable:this,name:"end",toEl:Gt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){re("nulling",this),Ft=K=Gt=mt=we=Bt=Sn=$e=De=ve=Je=de=Te=Be=en=Ue=nn=_t=vn=ct.dragged=ct.ghost=ct.clone=ct.active=null,In.forEach(function(e){e.checked=!0}),In.length=Fn=jn=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),Wr(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,s=this.el.children,n=0,c=s.length,t=this.options;ns.right+n||r.clientX<=s.right&&r.clientY>s.bottom&&r.clientX>=s.left:r.clientX>s.right&&r.clientY>s.top||r.clientX<=s.right&&r.clientY>s.bottom+n}function zr(r,e,a,s,n,c,t,o){var i=s?r.clientY:r.clientX,l=s?a.height:a.width,u=s?a.top:a.left,f=s?a.bottom:a.right,v=!1;if(!t){if(o&&xnu+l*c/2:if-xn)return-nn}else if(i>u+l*(1-n)/2&&if-l*c/2)?i>u+l/2?1:-1:0}function Jr(r){return Kt(K)1&&(pt.forEach(function(o){c.addAnimationState({target:o,rect:se?jt(o):t}),Ln(o),o.fromRect=t,s.removeAnimationState(o)}),se=!1,ns(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(a){var s=a.sortable,n=a.isOwner,c=a.insertion,t=a.activeSortable,o=a.parentEl,i=a.putSortable,l=this.options;if(c){if(n&&t._hideClone(),Xe=!1,l.animation&&pt.length>1&&(se||!n&&!t.options.sort&&!i)){var u=jt(Nt,!1,!0,!0);pt.forEach(function(v){v!==Nt&&(ua(v,u),o.appendChild(v))}),se=!0}if(!n)if(se||yn(),pt.length>1){var f=gn;t._showClone(s),t.options.animation&&!gn&&f&&ce.forEach(function(v){t.addAnimationState({target:v,rect:Ye}),v.fromRect=Ye,v.thisAnimationDuration=null})}else t._showClone(s)}},dragOverAnimationCapture:function(a){var s=a.dragRect,n=a.isOwner,c=a.activeSortable;if(pt.forEach(function(o){o.thisAnimationDuration=null}),c.options.animation&&!n&&c.multiDrag.isMultiDrag){Ye=fe({},s);var t=Re(Nt,!0);Ye.top-=t.f,Ye.left-=t.e}},dragOverAnimationComplete:function(){se&&(se=!1,yn())},drop:function(a){var s=a.originalEvent,n=a.rootEl,c=a.parentEl,t=a.sortable,o=a.dispatchSortableEvent,i=a.oldIndex,l=a.putSortable,u=l||this.sortable;if(!!s){var f=this.options,v=c.children;if(!Ve)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ut(Nt,f.selectedClass,!~pt.indexOf(Nt)),~pt.indexOf(Nt))pt.splice(pt.indexOf(Nt),1),ke=null,ze({sortable:t,rootEl:n,name:"deselect",targetEl:Nt,originalEvt:s});else{if(pt.push(Nt),ze({sortable:t,rootEl:n,name:"select",targetEl:Nt,originalEvt:s}),s.shiftKey&&ke&&t.el.contains(ke)){var h=Kt(ke),p=Kt(Nt);if(~h&&~p&&h!==p){var g,m;for(p>h?(m=h,g=p):(m=p,g=h+1);m1){var y=jt(Nt),S=Kt(Nt,":not(."+this.options.selectedClass+")");if(!Xe&&f.animation&&(Nt.thisAnimationDuration=null),u.captureAnimationState(),!Xe&&(f.animation&&(Nt.fromRect=y,pt.forEach(function(x){if(x.thisAnimationDuration=null,x!==Nt){var I=se?jt(x):y;x.fromRect=I,u.addAnimationState({target:x,rect:I})}})),yn(),pt.forEach(function(x){v[S]?c.insertBefore(x,v[S]):c.appendChild(x),S++}),i===Kt(Nt))){var b=!1;pt.forEach(function(x){if(x.sortableIndex!==Kt(x)){b=!0;return}}),b&&o("update")}pt.forEach(function(x){Ln(x)}),u.animateAll()}he=u}(n===c||l&&l.lastPutMode!=="clone")&&ce.forEach(function(x){x.parentNode&&x.parentNode.removeChild(x)})}},nullingGlobal:function(){this.isMultiDrag=Ve=!1,ce.length=0},destroyGlobal:function(){this._deselectMultiDrag(),bt(document,"pointerup",this._deselectMultiDrag),bt(document,"mouseup",this._deselectMultiDrag),bt(document,"touchend",this._deselectMultiDrag),bt(document,"keydown",this._checkKeyDown),bt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(a){if(!(typeof Ve<"u"&&Ve)&&he===this.sortable&&!(a&&pe(a.target,this.options.draggable,this.sortable.el,!1))&&!(a&&a.button!==0))for(;pt.length;){var s=pt[0];Ut(s,this.options.selectedClass,!1),pt.shift(),ze({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s,originalEvt:a})}},_checkKeyDown:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},fe(r,{pluginName:"multiDrag",utils:{select:function(a){var s=a.parentNode[ee];!s||!s.options.multiDrag||~pt.indexOf(a)||(he&&he!==s&&(he.multiDrag._deselectMultiDrag(),he=s),Ut(a,s.options.selectedClass,!0),pt.push(a))},deselect:function(a){var s=a.parentNode[ee],n=pt.indexOf(a);!s||!s.options.multiDrag||!~n||(Ut(a,s.options.selectedClass,!1),pt.splice(n,1))}},eventProperties:function(){var a=this,s=[],n=[];return pt.forEach(function(c){s.push({multiDragElement:c,index:c.sortableIndex});var t;se&&c!==Nt?t=-1:se?t=Kt(c,":not(."+a.options.selectedClass+")"):t=Kt(c),n.push({multiDragElement:c,index:t})}),{items:$r(pt),clones:[].concat(ce),oldIndicies:s,newIndicies:n}},optionListeners:{multiDragKey:function(a){return a=a.toLowerCase(),a==="ctrl"?a="Control":a.length>1&&(a=a.charAt(0).toUpperCase()+a.substr(1)),a}}})}function ns(r,e){pt.forEach(function(a,s){var n=e.children[a.sortableIndex+(r?Number(s):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function ma(r,e){ce.forEach(function(a,s){var n=e.children[a.sortableIndex+(r?Number(s):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function yn(){pt.forEach(function(r){r!==Nt&&r.parentNode&&r.parentNode.removeChild(r)})}ct.mount(new _r);ct.mount(qn,_n);const as=Object.freeze(Object.defineProperty({__proto__:null,default:ct,MultiDrag:es,Sortable:ct,Swap:qr},Symbol.toStringTag,{value:"Module"})),os=ja(as);(function(r,e){(function(s,n){r.exports=n(Ua,os)})(typeof self<"u"?self:Va,function(a,s){return function(n){var c={};function t(o){if(c[o])return c[o].exports;var i=c[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=c,t.d=function(o,i,l){t.o(o,i)||Object.defineProperty(o,i,{enumerable:!0,get:l})},t.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,i){if(i&1&&(o=t(o)),i&8||i&4&&typeof o=="object"&&o&&o.__esModule)return o;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:o}),i&2&&typeof o!="string")for(var u in o)t.d(l,u,function(f){return o[f]}.bind(null,u));return l},t.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(i,"a",i),i},t.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},t.p="",t(t.s="fb15")}({"00ee":function(n,c,t){var o=t("b622"),i=o("toStringTag"),l={};l[i]="z",n.exports=String(l)==="[object z]"},"0366":function(n,c,t){var o=t("1c0b");n.exports=function(i,l,u){if(o(i),l===void 0)return i;switch(u){case 0:return function(){return i.call(l)};case 1:return function(f){return i.call(l,f)};case 2:return function(f,v){return i.call(l,f,v)};case 3:return function(f,v,h){return i.call(l,f,v,h)}}return function(){return i.apply(l,arguments)}}},"057f":function(n,c,t){var o=t("fc6a"),i=t("241c").f,l={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(v){try{return i(v)}catch{return u.slice()}};n.exports.f=function(h){return u&&l.call(h)=="[object Window]"?f(h):i(o(h))}},"06cf":function(n,c,t){var o=t("83ab"),i=t("d1e7"),l=t("5c6c"),u=t("fc6a"),f=t("c04e"),v=t("5135"),h=t("0cfb"),p=Object.getOwnPropertyDescriptor;c.f=o?p:function(m,y){if(m=u(m),y=f(y,!0),h)try{return p(m,y)}catch{}if(v(m,y))return l(!i.f.call(m,y),m[y])}},"0cfb":function(n,c,t){var o=t("83ab"),i=t("d039"),l=t("cc12");n.exports=!o&&!i(function(){return Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(n,c,t){var o=t("23e7"),i=t("d58f").left,l=t("a640"),u=t("ae40"),f=l("reduce"),v=u("reduce",{1:0});o({target:"Array",proto:!0,forced:!f||!v},{reduce:function(p){return i(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(n,c,t){var o=t("c6b6"),i=t("9263");n.exports=function(l,u){var f=l.exec;if(typeof f=="function"){var v=f.call(l,u);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(o(l)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return i.call(l,u)}},"159b":function(n,c,t){var o=t("da84"),i=t("fdbc"),l=t("17c2"),u=t("9112");for(var f in i){var v=o[f],h=v&&v.prototype;if(h&&h.forEach!==l)try{u(h,"forEach",l)}catch{h.forEach=l}}},"17c2":function(n,c,t){var o=t("b727").forEach,i=t("a640"),l=t("ae40"),u=i("forEach"),f=l("forEach");n.exports=!u||!f?function(h){return o(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(n,c,t){var o=t("d066");n.exports=o("document","documentElement")},"1c0b":function(n,c){n.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(n,c,t){var o=t("b622"),i=o("iterator"),l=!1;try{var u=0,f={next:function(){return{done:!!u++}},return:function(){l=!0}};f[i]=function(){return this},Array.from(f,function(){throw 2})}catch{}n.exports=function(v,h){if(!h&&!l)return!1;var p=!1;try{var g={};g[i]=function(){return{next:function(){return{done:p=!0}}}},v(g)}catch{}return p}},"1d80":function(n,c){n.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(n,c,t){var o=t("d039"),i=t("b622"),l=t("2d00"),u=i("species");n.exports=function(f){return l>=51||!o(function(){var v=[],h=v.constructor={};return h[u]=function(){return{foo:1}},v[f](Boolean).foo!==1})}},"23cb":function(n,c,t){var o=t("a691"),i=Math.max,l=Math.min;n.exports=function(u,f){var v=o(u);return v<0?i(v+f,0):l(v,f)}},"23e7":function(n,c,t){var o=t("da84"),i=t("06cf").f,l=t("9112"),u=t("6eeb"),f=t("ce4e"),v=t("e893"),h=t("94ca");n.exports=function(p,g){var m=p.target,y=p.global,S=p.stat,b,x,I,E,A,D;if(y?x=o:S?x=o[m]||f(m,{}):x=(o[m]||{}).prototype,x)for(I in g){if(A=g[I],p.noTargetGet?(D=i(x,I),E=D&&D.value):E=x[I],b=h(y?I:m+(S?".":"#")+I,p.forced),!b&&E!==void 0){if(typeof A==typeof E)continue;v(A,E)}(p.sham||E&&E.sham)&&l(A,"sham",!0),u(x,I,A,p)}}},"241c":function(n,c,t){var o=t("ca84"),i=t("7839"),l=i.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(f){return o(f,l)}},"25f0":function(n,c,t){var o=t("6eeb"),i=t("825a"),l=t("d039"),u=t("ad6d"),f="toString",v=RegExp.prototype,h=v[f],p=l(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),g=h.name!=f;(p||g)&&o(RegExp.prototype,f,function(){var y=i(this),S=String(y.source),b=y.flags,x=String(b===void 0&&y instanceof RegExp&&!("flags"in v)?u.call(y):b);return"/"+S+"/"+x},{unsafe:!0})},"2ca0":function(n,c,t){var o=t("23e7"),i=t("06cf").f,l=t("50c4"),u=t("5a34"),f=t("1d80"),v=t("ab13"),h=t("c430"),p="".startsWith,g=Math.min,m=v("startsWith"),y=!h&&!m&&!!function(){var S=i(String.prototype,"startsWith");return S&&!S.writable}();o({target:"String",proto:!0,forced:!y&&!m},{startsWith:function(b){var x=String(f(this));u(b);var I=l(g(arguments.length>1?arguments[1]:void 0,x.length)),E=String(b);return p?p.call(x,E,I):x.slice(I,I+E.length)===E}})},"2d00":function(n,c,t){var o=t("da84"),i=t("342f"),l=o.process,u=l&&l.versions,f=u&&u.v8,v,h;f?(v=f.split("."),h=v[0]+v[1]):i&&(v=i.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=i.match(/Chrome\/(\d+)/),v&&(h=v[1]))),n.exports=h&&+h},"342f":function(n,c,t){var o=t("d066");n.exports=o("navigator","userAgent")||""},"35a1":function(n,c,t){var o=t("f5df"),i=t("3f8c"),l=t("b622"),u=l("iterator");n.exports=function(f){if(f!=null)return f[u]||f["@@iterator"]||i[o(f)]}},"37e8":function(n,c,t){var o=t("83ab"),i=t("9bf2"),l=t("825a"),u=t("df75");n.exports=o?Object.defineProperties:function(v,h){l(v);for(var p=u(h),g=p.length,m=0,y;g>m;)i.f(v,y=p[m++],h[y]);return v}},"3bbe":function(n,c,t){var o=t("861d");n.exports=function(i){if(!o(i)&&i!==null)throw TypeError("Can't set "+String(i)+" as a prototype");return i}},"3ca3":function(n,c,t){var o=t("6547").charAt,i=t("69f3"),l=t("7dd0"),u="String Iterator",f=i.set,v=i.getterFor(u);l(String,"String",function(h){f(this,{type:u,string:String(h),index:0})},function(){var p=v(this),g=p.string,m=p.index,y;return m>=g.length?{value:void 0,done:!0}:(y=o(g,m),p.index+=y.length,{value:y,done:!1})})},"3f8c":function(n,c){n.exports={}},4160:function(n,c,t){var o=t("23e7"),i=t("17c2");o({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(n,c,t){var o=t("da84");n.exports=o},"44ad":function(n,c,t){var o=t("d039"),i=t("c6b6"),l="".split;n.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return i(u)=="String"?l.call(u,""):Object(u)}:Object},"44d2":function(n,c,t){var o=t("b622"),i=t("7c73"),l=t("9bf2"),u=o("unscopables"),f=Array.prototype;f[u]==null&&l.f(f,u,{configurable:!0,value:i(null)}),n.exports=function(v){f[u][v]=!0}},"44e7":function(n,c,t){var o=t("861d"),i=t("c6b6"),l=t("b622"),u=l("match");n.exports=function(f){var v;return o(f)&&((v=f[u])!==void 0?!!v:i(f)=="RegExp")}},4930:function(n,c,t){var o=t("d039");n.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(n,c,t){var o=t("fc6a"),i=t("50c4"),l=t("23cb"),u=function(f){return function(v,h,p){var g=o(v),m=i(g.length),y=l(p,m),S;if(f&&h!=h){for(;m>y;)if(S=g[y++],S!=S)return!0}else for(;m>y;y++)if((f||y in g)&&g[y]===h)return f||y||0;return!f&&-1}};n.exports={includes:u(!0),indexOf:u(!1)}},"4de4":function(n,c,t){var o=t("23e7"),i=t("b727").filter,l=t("1dde"),u=t("ae40"),f=l("filter"),v=u("filter");o({target:"Array",proto:!0,forced:!f||!v},{filter:function(p){return i(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(n,c,t){var o=t("0366"),i=t("7b0b"),l=t("9bdd"),u=t("e95a"),f=t("50c4"),v=t("8418"),h=t("35a1");n.exports=function(g){var m=i(g),y=typeof this=="function"?this:Array,S=arguments.length,b=S>1?arguments[1]:void 0,x=b!==void 0,I=h(m),E=0,A,D,C,M,L,U;if(x&&(b=o(b,S>2?arguments[2]:void 0,2)),I!=null&&!(y==Array&&u(I)))for(M=I.call(m),L=M.next,D=new y;!(C=L.call(M)).done;E++)U=x?l(M,b,[C.value,E],!0):C.value,v(D,E,U);else for(A=f(m.length),D=new y(A);A>E;E++)U=x?b(m[E],E):m[E],v(D,E,U);return D.length=E,D}},"4fad":function(n,c,t){var o=t("23e7"),i=t("6f53").entries;o({target:"Object",stat:!0},{entries:function(u){return i(u)}})},"50c4":function(n,c,t){var o=t("a691"),i=Math.min;n.exports=function(l){return l>0?i(o(l),9007199254740991):0}},5135:function(n,c){var t={}.hasOwnProperty;n.exports=function(o,i){return t.call(o,i)}},5319:function(n,c,t){var o=t("d784"),i=t("825a"),l=t("7b0b"),u=t("50c4"),f=t("a691"),v=t("1d80"),h=t("8aa5"),p=t("14c3"),g=Math.max,m=Math.min,y=Math.floor,S=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,x=function(I){return I===void 0?I:String(I)};o("replace",2,function(I,E,A,D){var C=D.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,M=D.REPLACE_KEEPS_$0,L=C?"$":"$0";return[function(P,H){var V=v(this),k=P==null?void 0:P[I];return k!==void 0?k.call(P,V,H):E.call(String(V),P,H)},function(w,P){if(!C&&M||typeof P=="string"&&P.indexOf(L)===-1){var H=A(E,w,this,P);if(H.done)return H.value}var V=i(w),k=String(this),gt=typeof P=="function";gt||(P=String(P));var Z=V.global;if(Z){var G=V.unicode;V.lastIndex=0}for(var at=[];;){var ht=p(V,k);if(ht===null||(at.push(ht),!Z))break;var Tt=String(ht[0]);Tt===""&&(V.lastIndex=h(k,u(V.lastIndex),G))}for(var vt="",xt=0,It=0;It=xt&&(vt+=k.slice(xt,dt)+zt,xt=dt+wt.length)}return vt+k.slice(xt)}];function U(w,P,H,V,k,gt){var Z=H+w.length,G=V.length,at=b;return k!==void 0&&(k=l(k),at=S),E.call(gt,at,function(ht,Tt){var vt;switch(Tt.charAt(0)){case"$":return"$";case"&":return w;case"`":return P.slice(0,H);case"'":return P.slice(Z);case"<":vt=k[Tt.slice(1,-1)];break;default:var xt=+Tt;if(xt===0)return ht;if(xt>G){var It=y(xt/10);return It===0?ht:It<=G?V[It-1]===void 0?Tt.charAt(1):V[It-1]+Tt.charAt(1):ht}vt=V[xt-1]}return vt===void 0?"":vt})}})},5692:function(n,c,t){var o=t("c430"),i=t("c6cd");(n.exports=function(l,u){return i[l]||(i[l]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(n,c,t){var o=t("d066"),i=t("241c"),l=t("7418"),u=t("825a");n.exports=o("Reflect","ownKeys")||function(v){var h=i.f(u(v)),p=l.f;return p?h.concat(p(v)):h}},"5a34":function(n,c,t){var o=t("44e7");n.exports=function(i){if(o(i))throw TypeError("The method doesn't accept regular expressions");return i}},"5c6c":function(n,c){n.exports=function(t,o){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:o}}},"5db7":function(n,c,t){var o=t("23e7"),i=t("a2bf"),l=t("7b0b"),u=t("50c4"),f=t("1c0b"),v=t("65f0");o({target:"Array",proto:!0},{flatMap:function(p){var g=l(this),m=u(g.length),y;return f(p),y=v(g,0),y.length=i(y,g,g,m,0,1,p,arguments.length>1?arguments[1]:void 0),y}})},6547:function(n,c,t){var o=t("a691"),i=t("1d80"),l=function(u){return function(f,v){var h=String(i(f)),p=o(v),g=h.length,m,y;return p<0||p>=g?u?"":void 0:(m=h.charCodeAt(p),m<55296||m>56319||p+1===g||(y=h.charCodeAt(p+1))<56320||y>57343?u?h.charAt(p):m:u?h.slice(p,p+2):(m-55296<<10)+(y-56320)+65536)}};n.exports={codeAt:l(!1),charAt:l(!0)}},"65f0":function(n,c,t){var o=t("861d"),i=t("e8b5"),l=t("b622"),u=l("species");n.exports=function(f,v){var h;return i(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||i(h.prototype))?h=void 0:o(h)&&(h=h[u],h===null&&(h=void 0))),new(h===void 0?Array:h)(v===0?0:v)}},"69f3":function(n,c,t){var o=t("7f9a"),i=t("da84"),l=t("861d"),u=t("9112"),f=t("5135"),v=t("f772"),h=t("d012"),p=i.WeakMap,g,m,y,S=function(C){return y(C)?m(C):g(C,{})},b=function(C){return function(M){var L;if(!l(M)||(L=m(M)).type!==C)throw TypeError("Incompatible receiver, "+C+" required");return L}};if(o){var x=new p,I=x.get,E=x.has,A=x.set;g=function(C,M){return A.call(x,C,M),M},m=function(C){return I.call(x,C)||{}},y=function(C){return E.call(x,C)}}else{var D=v("state");h[D]=!0,g=function(C,M){return u(C,D,M),M},m=function(C){return f(C,D)?C[D]:{}},y=function(C){return f(C,D)}}n.exports={set:g,get:m,has:y,enforce:S,getterFor:b}},"6eeb":function(n,c,t){var o=t("da84"),i=t("9112"),l=t("5135"),u=t("ce4e"),f=t("8925"),v=t("69f3"),h=v.get,p=v.enforce,g=String(String).split("String");(n.exports=function(m,y,S,b){var x=b?!!b.unsafe:!1,I=b?!!b.enumerable:!1,E=b?!!b.noTargetGet:!1;if(typeof S=="function"&&(typeof y=="string"&&!l(S,"name")&&i(S,"name",y),p(S).source=g.join(typeof y=="string"?y:"")),m===o){I?m[y]=S:u(y,S);return}else x?!E&&m[y]&&(I=!0):delete m[y];I?m[y]=S:i(m,y,S)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})},"6f53":function(n,c,t){var o=t("83ab"),i=t("df75"),l=t("fc6a"),u=t("d1e7").f,f=function(v){return function(h){for(var p=l(h),g=i(p),m=g.length,y=0,S=[],b;m>y;)b=g[y++],(!o||u.call(p,b))&&S.push(v?[b,p[b]]:p[b]);return S}};n.exports={entries:f(!0),values:f(!1)}},"73d9":function(n,c,t){var o=t("44d2");o("flatMap")},7418:function(n,c){c.f=Object.getOwnPropertySymbols},"746f":function(n,c,t){var o=t("428f"),i=t("5135"),l=t("e538"),u=t("9bf2").f;n.exports=function(f){var v=o.Symbol||(o.Symbol={});i(v,f)||u(v,f,{value:l.f(f)})}},7839:function(n,c){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(n,c,t){var o=t("1d80");n.exports=function(i){return Object(o(i))}},"7c73":function(n,c,t){var o=t("825a"),i=t("37e8"),l=t("7839"),u=t("d012"),f=t("1be4"),v=t("cc12"),h=t("f772"),p=">",g="<",m="prototype",y="script",S=h("IE_PROTO"),b=function(){},x=function(C){return g+y+p+C+g+"/"+y+p},I=function(C){C.write(x("")),C.close();var M=C.parentWindow.Object;return C=null,M},E=function(){var C=v("iframe"),M="java"+y+":",L;return C.style.display="none",f.appendChild(C),C.src=String(M),L=C.contentWindow.document,L.open(),L.write(x("document.F=Object")),L.close(),L.F},A,D=function(){try{A=document.domain&&new ActiveXObject("htmlfile")}catch{}D=A?I(A):E();for(var C=l.length;C--;)delete D[m][l[C]];return D()};u[S]=!0,n.exports=Object.create||function(M,L){var U;return M!==null?(b[m]=o(M),U=new b,b[m]=null,U[S]=M):U=D(),L===void 0?U:i(U,L)}},"7dd0":function(n,c,t){var o=t("23e7"),i=t("9ed3"),l=t("e163"),u=t("d2bb"),f=t("d44e"),v=t("9112"),h=t("6eeb"),p=t("b622"),g=t("c430"),m=t("3f8c"),y=t("ae93"),S=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,x=p("iterator"),I="keys",E="values",A="entries",D=function(){return this};n.exports=function(C,M,L,U,w,P,H){i(L,M,U);var V=function(It){if(It===w&&at)return at;if(!b&&It in Z)return Z[It];switch(It){case I:return function(){return new L(this,It)};case E:return function(){return new L(this,It)};case A:return function(){return new L(this,It)}}return function(){return new L(this)}},k=M+" Iterator",gt=!1,Z=C.prototype,G=Z[x]||Z["@@iterator"]||w&&Z[w],at=!b&&G||V(w),ht=M=="Array"&&Z.entries||G,Tt,vt,xt;if(ht&&(Tt=l(ht.call(new C)),S!==Object.prototype&&Tt.next&&(!g&&l(Tt)!==S&&(u?u(Tt,S):typeof Tt[x]!="function"&&v(Tt,x,D)),f(Tt,k,!0,!0),g&&(m[k]=D))),w==E&&G&&G.name!==E&&(gt=!0,at=function(){return G.call(this)}),(!g||H)&&Z[x]!==at&&v(Z,x,at),m[M]=at,w)if(vt={values:V(E),keys:P?at:V(I),entries:V(A)},H)for(xt in vt)(b||gt||!(xt in Z))&&h(Z,xt,vt[xt]);else o({target:M,proto:!0,forced:b||gt},vt);return vt}},"7f9a":function(n,c,t){var o=t("da84"),i=t("8925"),l=o.WeakMap;n.exports=typeof l=="function"&&/native code/.test(i(l))},"825a":function(n,c,t){var o=t("861d");n.exports=function(i){if(!o(i))throw TypeError(String(i)+" is not an object");return i}},"83ab":function(n,c,t){var o=t("d039");n.exports=!o(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(n,c,t){var o=t("c04e"),i=t("9bf2"),l=t("5c6c");n.exports=function(u,f,v){var h=o(f);h in u?i.f(u,h,l(0,v)):u[h]=v}},"861d":function(n,c){n.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(n,c,t){var o,i,l;(function(u,f){i=[],o=f,l=typeof o=="function"?o.apply(c,i):o,l!==void 0&&(n.exports=l)})(typeof self<"u"?self:this,function(){function u(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==u&&document.currentScript)return document.currentScript;try{throw new Error}catch(A){var v=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=v.exec(A.stack)||h.exec(A.stack),g=p&&p[1]||!1,m=p&&p[2]||!1,y=document.location.href.replace(document.location.hash,""),S,b,x,I=document.getElementsByTagName("script");g===y&&(S=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]* + + + +
+ + +