From c3767515f3f8f28dff14252b9f9bf3ace41c3e75 Mon Sep 17 00:00:00 2001 From: GithubAction Date: Tue, 20 Feb 2024 07:02:52 +0000 Subject: [PATCH] deploy with Github Action --- CNAME | 1 + assets/AssistantDetail.1fffdb7f.css | 1 + assets/AssistantDetail.a53fc1b5.js | 1 + assets/AssistantList.90a8bcc8.css | 1 + assets/AssistantList.e36b1e55.js | 1 + assets/CourseDetail.6d02920c.js | 1 + assets/CourseList.aeb09d76.js | 1 + assets/CoursesSurveys.8ca81c48.css | 1 + assets/CoursesSurveys.e914b41e.js | 6 ++ assets/Editor.2f2998f9.js | 54 +++++++++++ assets/Editor.86746698.css | 1 + assets/Email.fd55d389.js | 1 + assets/Group.8a5129a4.js | 1 + assets/Group.ef60d323.css | 1 + assets/GroupDetail.19058b01.js | 1 + assets/GroupDetail.5ebc2d7d.css | 1 + assets/LoginVertify.890b54dd.js | 1 + assets/Message.e7732d7d.css | 1 + assets/Message.eef889cc.js | 1 + assets/SurveysDetail.0a67fffd.css | 1 + assets/SurveysDetail.98911016.js | 3 + assets/SurveysList.6de07287.js | 1 + assets/SurveysManage.e514e1b3.js | 1 + assets/Tag.b74f7417.js | 1 + assets/TaskDetail.5b81e0f0.css | 1 + assets/TaskDetail.8df61f8d.js | 1 + assets/TaskList.730e83e2.js | 1 + assets/TaskList.7a05c82b.css | 1 + assets/Title.b2e184c7.js | 1 + assets/TitleDetail.1e88aae3.js | 1 + assets/TrainingDetail.321b8e16.css | 1 + assets/TrainingDetail.5d04ba99.js | 10 ++ assets/TrainingList.0d8ec858.css | 1 + assets/TrainingList.90488251.js | 1 + assets/UserDetail.5f8969bc.js | 1 + assets/UserGroupDetail.9b3966e7.js | 1 + assets/UserGroupList.88728829.js | 1 + assets/assistant.00b0a3a6.js | 1 + assets/bsTab.5232f6de.js | 1 + assets/courses.f6a332cf.js | 1 + assets/date.4fb02a7a.js | 1 + assets/index.6ce76e2d.js | 88 ++++++++++++++++++ assets/index.c4f23856.css | 6 ++ assets/material-icons-outlined.35dca8a7.woff2 | Bin 0 -> 155276 bytes assets/material-icons-outlined.8e94758c.woff | Bin 0 -> 182028 bytes assets/material-icons-round.1c135b15.woff | Bin 0 -> 206260 bytes assets/material-icons-round.c948f126.woff2 | Bin 0 -> 173620 bytes assets/material-icons-sharp.d31bfb81.woff2 | Bin 0 -> 135984 bytes assets/material-icons-sharp.fa3888ef.woff | Bin 0 -> 156236 bytes assets/material-icons-two-tone.1e673ba8.woff2 | Bin 0 -> 215704 bytes assets/material-icons-two-tone.3d34f30a.woff | Bin 0 -> 339600 bytes assets/material-icons.8265f647.woff2 | Bin 0 -> 128352 bytes assets/material-icons.fd84f88b.woff | Bin 0 -> 164912 bytes assets/surveys.9a9d5d25.js | 1 + assets/tab.979b672c.js | 5 + assets/task-tags.c36d28d7.js | 1 + assets/task.14e7f61a.js | 1 + assets/training.dc983b95.js | 1 + assets/vue-select.b0fac2a1.css | 1 + favicon.ico | Bin 0 -> 4286 bytes font/NotoSansTC-Regular.otf | Bin 0 -> 5766468 bytes images/hexschool_logo.svg | 1 + images/template1.svg | 1 + images/template2.svg | 1 + index.html | 15 +++ 65 files changed, 232 insertions(+) create mode 100644 CNAME create mode 100644 assets/AssistantDetail.1fffdb7f.css create mode 100644 assets/AssistantDetail.a53fc1b5.js create mode 100644 assets/AssistantList.90a8bcc8.css create mode 100644 assets/AssistantList.e36b1e55.js create mode 100644 assets/CourseDetail.6d02920c.js create mode 100644 assets/CourseList.aeb09d76.js create mode 100644 assets/CoursesSurveys.8ca81c48.css create mode 100644 assets/CoursesSurveys.e914b41e.js create mode 100644 assets/Editor.2f2998f9.js create mode 100644 assets/Editor.86746698.css create mode 100644 assets/Email.fd55d389.js create mode 100644 assets/Group.8a5129a4.js create mode 100644 assets/Group.ef60d323.css create mode 100644 assets/GroupDetail.19058b01.js create mode 100644 assets/GroupDetail.5ebc2d7d.css create mode 100644 assets/LoginVertify.890b54dd.js create mode 100644 assets/Message.e7732d7d.css create mode 100644 assets/Message.eef889cc.js create mode 100644 assets/SurveysDetail.0a67fffd.css create mode 100644 assets/SurveysDetail.98911016.js create mode 100644 assets/SurveysList.6de07287.js create mode 100644 assets/SurveysManage.e514e1b3.js create mode 100644 assets/Tag.b74f7417.js create mode 100644 assets/TaskDetail.5b81e0f0.css create mode 100644 assets/TaskDetail.8df61f8d.js create mode 100644 assets/TaskList.730e83e2.js create mode 100644 assets/TaskList.7a05c82b.css create mode 100644 assets/Title.b2e184c7.js create mode 100644 assets/TitleDetail.1e88aae3.js create mode 100644 assets/TrainingDetail.321b8e16.css create mode 100644 assets/TrainingDetail.5d04ba99.js create mode 100644 assets/TrainingList.0d8ec858.css create mode 100644 assets/TrainingList.90488251.js create mode 100644 assets/UserDetail.5f8969bc.js create mode 100644 assets/UserGroupDetail.9b3966e7.js create mode 100644 assets/UserGroupList.88728829.js create mode 100644 assets/assistant.00b0a3a6.js create mode 100644 assets/bsTab.5232f6de.js create mode 100644 assets/courses.f6a332cf.js create mode 100644 assets/date.4fb02a7a.js create mode 100644 assets/index.6ce76e2d.js create mode 100644 assets/index.c4f23856.css create mode 100644 assets/material-icons-outlined.35dca8a7.woff2 create mode 100644 assets/material-icons-outlined.8e94758c.woff create mode 100644 assets/material-icons-round.1c135b15.woff create mode 100644 assets/material-icons-round.c948f126.woff2 create mode 100644 assets/material-icons-sharp.d31bfb81.woff2 create mode 100644 assets/material-icons-sharp.fa3888ef.woff create mode 100644 assets/material-icons-two-tone.1e673ba8.woff2 create mode 100644 assets/material-icons-two-tone.3d34f30a.woff create mode 100644 assets/material-icons.8265f647.woff2 create mode 100644 assets/material-icons.fd84f88b.woff create mode 100644 assets/surveys.9a9d5d25.js create mode 100644 assets/tab.979b672c.js create mode 100644 assets/task-tags.c36d28d7.js create mode 100644 assets/task.14e7f61a.js create mode 100644 assets/training.dc983b95.js create mode 100644 assets/vue-select.b0fac2a1.css create mode 100644 favicon.ico create mode 100644 font/NotoSansTC-Regular.otf create mode 100644 images/hexschool_logo.svg create mode 100644 images/template1.svg create mode 100644 images/template2.svg create mode 100644 index.html diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..98e90d3 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +rpg-admin.hexschool.com 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.a53fc1b5.js b/assets/AssistantDetail.a53fc1b5.js new file mode 100644 index 0000000..af8d486 --- /dev/null +++ b/assets/AssistantDetail.a53fc1b5.js @@ -0,0 +1 @@ +import{l as us,N as hs,r as c,s as q,m as I,o as _s,z as O,a as n,c as d,b as s,A as Z,f as vs,h as _,g as U,F as v,q as p,w as G,C as D,x as b,D as ps,E as bs,Z as ms}from"./index.6ce76e2d.js";/* empty css */import{b as gs}from"./bsTab.5232f6de.js";import{a as ks}from"./assistant.00b0a3a6.js";import{a as fs}from"./task.14e7f61a.js";import"./tab.979b672c.js";const ys={class:"about px-4 mt-4"},ws={class:"border-bottom border-light pb-2 mb-4"},Ls={"aria-label":"breadcrumb"},Ts={class:"breadcrumb"},xs={class:"breadcrumb-item"},Cs=s("li",{class:"breadcrumb-item active","aria-current":"page"},"\u7DE8\u8F2F\u52A9\u6559",-1),$s=s("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559",-1),As={id:"assistantDetail",class:"col-md-5"},Gs={class:"assistant card shadow-sm rounded-4 overflow-hidden mb-4"},Ds={class:"card-header bg-white py-3"},Vs={key:1,style:{width:"60px",height:"60px"},class:"rounded-circle mx-auto bg-light mb-1"},Es={class:"text-center mb-0"},Ss={class:"card-body"},Ns={class:"d-flex align-items-center"},Us=s("span",{class:"material-icons-outlined me-1"},"email",-1),Ms={class:"d-flex"},Ps=s("span",{class:"material-icons-outlined me-1"},"face",-1),zs={class:"col-md-12"},Bs={class:"nav nav-tabs",role:"tablist"},js=["id","aria-controls","data-bs-target","onClick"],Fs={class:"tab-content mb-5",id:"myTabContent"},Rs={class:"tab-pane fade show active",id:"assistantTab",role:"tabpanel","aria-labelledby":"assistant-tab"},qs={class:"mt-4 card shadow-sm rounded-4 overflow-hidden mb-4"},Is=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u52A9\u6559\u7A31\u865F")],-1),Os={class:"card-body card-body-height"},Zs={class:"list list-unstyled"},Hs={class:"form-check"},Js=["id","value","checked"],Ks=["for"],Qs=s("hr",null,null,-1),Ws={class:"card-footer bg-white text-end py-3"},Xs={class:"tab-pane fade",id:"coursesTab",role:"tabpanel","aria-labelledby":"courses-tab"},Ys={class:"mt-4 row position-relative align-items-start"},st={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},tt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},et=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),at={class:"card-body card-body-height"},ot={class:"list list-unstyled"},it=s("hr",null,null,-1),lt={class:"col-md-8"},nt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},dt={class:"card-header bg-white py-3"},ct={class:"form-check"},rt=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"assistantAll"},"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",-1),ut={class:"card-body card-body-height"},ht={class:"list list-unstyled"},_t={class:"form-check"},vt=["id","value","checked"],pt=["for"],bt=s("hr",null,null,-1),mt={class:"card-footer bg-white text-end py-3"},gt={class:"tab-pane fade",id:"tasksTab",role:"tabpanel","aria-labelledby":"tasks-tab"},kt={class:"mt-4 row position-relative align-items-start"},ft={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},yt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},wt=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),Lt={class:"card-body card-body-height"},Tt={class:"list-unstyled mb-0"},xt=["aria-controls","href"],Ct={class:"fw-bold"},$t=["id"],At={class:"list list-unstyled"},Gt={class:"col-md-8"},Dt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Vt=s("div",{class:"card-header bg-white py-3 fw-bold"}," \u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A ",-1),Et={class:"card-body card-body-height"},St={class:"list list-unstyled mt-3"},Nt={class:"form-check"},Ut=["id","value"],Mt=["for"],Pt=s("hr",null,null,-1),zt={class:"card-footer bg-white text-end py-3"},Ht={__name:"AssistantDetail",setup(Bt){const{apiGetVideoCoursesList:H,apiGetAssistantDetail:J,apiPutAssistantDetail:K,apiGetAssistantsTitles:Q,apiPutAssistantTasks:W,apiDeleteAssistantTasks:X}=ks,{apiGetTaskGroupsList:Y,apiGetTasks:ss}=fs,ts=us(),m=hs.useLoading(),V=(a,e,l)=>a.map(r=>(r[e]=l,r)),k=c([]),u=c([]),h=c([]),w=c(!1),es=()=>{w.value?(h.value=[],k.value.forEach(a=>{h.value.push(a.id)})):h.value=[]};q(()=>h.value,()=>{k.value.length!==0&&h.value.length===k.value.length?w.value=!0:w.value=!1},{deep:!0});const as=()=>{k.value.forEach(a=>{u.value.video_courses.forEach(e=>{a.id===e.id&&(a.isChecked=!0,h.value.push(a.id))})})},os=async()=>{const a=m.show();try{h.value=[];const{courses:e}=await H();k.value=V(e,"isChecked",!1),as()}catch(e){b("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${e.response.data.statusCode}:${e.response.data.message}`)}finally{a.hide()}},E=c([]),L=c([]),is=()=>{E.value.forEach(a=>{u.value.assistant_titles.forEach(e=>{a.id===e.id&&(a.isChecked=!0,L.value.push(a.id))})})},ls=async()=>{const a=m.show();try{L.value=[];const{assistant_titles:e}=await Q();E.value=V(e,"isChecked",!1),is()}catch(e){b("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${e.response.data.statusCode}:${e.response.data.message}`)}finally{a.hide()}},f=c(""),S=c([]),T=c({taskGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),C=c(1),ns=async(a=1)=>{var l,r,t,i;const e=m.show();try{const{task_groups:o,pagination:g}=await Y({count:150,page:a});T.value.taskGroupsList=o,T.value.pagination=g,C.value=g.current_page,S.value=[...S.value,...T.value.taskGroupsList]}catch(o){b("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(r=(l=o==null?void 0:o.response)==null?void 0:l.data)==null?void 0:r.statusCode} : ${(i=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:i.message}`)}finally{e.hide()}},M=async(a=1)=>{await ns(a),T.value.pagination.total_page!==0&&C.value!==T.value.pagination.total_page&&(C.value+=1,M(C.value))},$=c([]),x=c({tasksList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),A=c(1),P=c(null),ds=async(a=1)=>{var l,r,t,i;const e=m.show();try{const{tasks:o,pagination:g}=await ss({count:100,page:a,scoped:P.value});x.value.tasksList=V(o,"isChecked",!1),x.value.tasksList=o,x.value.pagination=g,A.value=g.current_page,$.value=[...$.value,...o]}catch(o){b("danger","\u53D6\u5F97\u6307\u5B9A\u7684\u4EFB\u52D9\u7FA4\u7D44\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(r=(l=o==null?void 0:o.response)==null?void 0:l.data)==null?void 0:r.statusCode} : ${(i=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:i.message}`)}finally{e.hide()}},z=c(""),y=c([]),N=async a=>{var l,r;const e=m.show();try{const t=await J(a);u.value=t,y.value=[],t.task_groups.forEach(i=>{i.tasks&&i.tasks.forEach(o=>{y.value.push({id:o.id,task_group_id:i.id})})}),os(),ls()}catch(t){b("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${(l=t.response)==null?void 0:l.data.statusCode}:${(r=t.response)==null?void 0:r.data.message}`)}finally{e.hide()}},B=async(a=1)=>{await ds(a),x.value.pagination.total_page!==0&&A.value!==x.value.pagination.total_page&&(A.value+=1,B(A.value))},cs=async a=>{z.value=a,P.value=`&filter=task_group&task_group_id=${z.value}`,$.value=[],await B()},j=async a=>{const e=m.show();try{const l={video_course_list:h.value,assistant_title_list:L.value};await K(a,l),b("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u52A9\u6559\u8A2D\u5B9A"),N(a)}catch(l){b("danger","\u66F4\u65B0\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${l.response.data.statusCode}:${l.response.data.message}`)}finally{e.hide()}},rs=async a=>{const e=m.show();try{let l=[];y.value.length>0?(l=y.value.reduce((t,i)=>{let o=t.find(g=>g.task_group_id===i.task_group_id);return o||(o={id:i.task_group_id,task_ids:[]},t.push(o)),o.task_ids.push(i.id),t},[]),await W(a,{task_groups:l})):await X(a),N(a)}catch(l){b("danger","\u66F4\u65B0\u52A9\u6559\u53EF\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A\u5931\u6557",`${l.response.data.statusCode}:${l.response.data.message}`)}finally{e.hide()}},F=I([]),R=I([{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 _s(()=>{const a=ts.params.id;N(a),M(),gs(F,R)}),q(()=>f.value,()=>{f.value&&cs(f.value)}),(a,e)=>{const l=O("router-link"),r=O("v-select");return n(),d("div",ys,[s("header",ws,[s("nav",Ls,[s("ol",Ts,[s("li",xs,[Z(l,{to:"/admin/assistants/list"},{default:vs(()=>[U(" \u52A9\u6559\u7BA1\u7406 ")]),_:1})]),Cs])]),$s]),s("div",As,[s("div",Gs,[s("div",Ds,[(n(),d("div",Vs)),s("h5",Es,_(u.value.nickname),1)]),s("div",Ss,[s("p",Ns,[Us,U(" "+_(u.value.email),1)]),s("div",Ms,[Ps,s("div",null,[(n(!0),d(v,null,p(u.value.assistant_titles,t=>(n(),d("span",{key:t.id,class:"badge bg-light text-dark me-1"},_(t.name),1))),128))])])])])]),s("div",zs,[s("ul",Bs,[(n(!0),d(v,null,p(R,t=>(n(),d("li",{class:"nav-item",role:"presentation",key:t.id},[s("button",{class:ps(["nav-link border",{active:t.active,"text-danger bg-danger bg-opacity-10":t.danger}]),id:t.id,type:"button",role:"tab","aria-controls":t.id,"aria-selected":"true","data-bs-target":`#${t.target}`,ref_for:!0,ref:i=>F.push(i),onClick:bs(i=>t.element.show(),["prevent"])},_(t.name),11,js)]))),128))])]),s("div",Fs,[s("div",Rs,[s("div",qs,[Is,s("div",Os,[s("ul",Zs,[(n(!0),d(v,null,p(E.value,t=>(n(),d("li",{key:t.id,class:"list-item"},[s("div",Hs,[G(s("input",{id:t.name,"onUpdate:modelValue":e[0]||(e[0]=i=>L.value=i),class:"form-check-input",type:"checkbox",value:t.id,checked:t.isChecked},null,8,Js),[[D,L.value]]),s("span",{class:"d-inline-block rounded-pill me-1",style:ms([{width:"10px",height:"10px"},`background-color:${t.color_code}`])},null,4),s("label",{class:"form-check-label",for:t.name},_(t.name),9,Ks)]),Qs]))),128))])]),s("div",Ws,[s("button",{type:"button",class:"btn btn-primary",onClick:e[1]||(e[1]=t=>j(u.value.user_id))}," \u66F4\u65B0 ")])])]),s("div",Xs,[s("div",Ys,[s("div",st,[s("div",tt,[et,s("div",at,[s("ul",ot,[(n(!0),d(v,null,p(u.value.video_courses,t=>(n(),d("li",{key:t.id,class:"list-item"},[U(_(t.name)+" ",1),it]))),128))])])])]),s("div",lt,[s("div",nt,[s("div",dt,[s("div",ct,[G(s("input",{id:"assistantAll","onUpdate:modelValue":e[2]||(e[2]=t=>w.value=t),class:"form-check-input",type:"checkbox",onChange:es},null,544),[[D,w.value]]),rt])]),s("div",ut,[s("ul",ht,[(n(!0),d(v,null,p(k.value,t=>(n(),d("li",{key:t.id,class:"list-item"},[s("div",_t,[G(s("input",{id:t.id,"onUpdate:modelValue":e[3]||(e[3]=i=>h.value=i),class:"form-check-input",type:"checkbox",value:t.id,checked:t.isChecked},null,8,vt),[[D,h.value]]),s("label",{class:"form-check-label",for:t.id},_(t.name),9,pt)]),bt]))),128))])]),s("div",mt,[s("button",{type:"button",class:"btn btn-primary",onClick:e[4]||(e[4]=t=>j(u.value.user_id))}," \u66F4\u65B0 ")])])])])]),s("div",gt,[s("div",kt,[s("div",ft,[s("div",yt,[wt,s("div",Lt,[s("ul",Tt,[(n(!0),d(v,null,p(u.value.task_groups,t=>(n(),d("li",{key:t.id,class:"mb-2"},[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":t.id,href:`#checkedTaskList-${t.id}`},[s("span",Ct,_(t.name),1)],8,xt),s("div",{class:"collapse",id:`checkedTaskList-${t.id}`},[s("ul",At,[(n(!0),d(v,null,p(t.tasks,i=>(n(),d("li",{key:i.id,class:"list-item px-1 mb-1"},_(i.name),1))),128))])],8,$t)]))),128))])])])]),s("div",Gt,[s("div",Dt,[Vt,s("div",Et,[Z(r,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=t=>f.value=t),options:S.value,label:"name",clearable:!1,reduce:t=>t.id},null,8,["modelValue","options","reduce"]),s("ul",St,[(n(!0),d(v,null,p($.value,t=>(n(),d("li",{class:"list-item",key:t.id},[s("div",Nt,[G(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=i=>y.value=i),id:t.id,value:{task_group_id:f.value,id:t.id}},null,8,Ut),[[D,y.value]]),s("label",{class:"form-check-label",for:t.id},_(t.name),9,Mt)]),Pt]))),128))])]),s("div",zt,[s("button",{type:"button",class:"btn btn-primary",onClick:e[7]||(e[7]=t=>rs(u.value.user_id))}," \u66F4\u65B0\u4EFB\u52D9 ")])])])])])])])}}};export{Ht 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/AssistantList.e36b1e55.js b/assets/AssistantList.e36b1e55.js new file mode 100644 index 0000000..c412c75 --- /dev/null +++ b/assets/AssistantList.e36b1e55.js @@ -0,0 +1 @@ +import{_ as w,N 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,E as C,A as $,f as B,g as I,R as S,S as N}from"./index.6ce76e2d.js";import{a as M}from"./assistant.00b0a3a6.js";const _=i=>(S("data-v-07e438cb"),i=i(),N(),i),V={class:"about px-4 mt-4 position-relative"},z=_(()=>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)),D={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},E={class:"card-body p-0"},F={class:"table-responsive"},G={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"},O={scope:"row",class:"ps-4"},R={class:"fs-6 mb-0"},T={class:"mb-0 text-muted"},H={class:"dropdown"},J=["onClick"],K={class:"dropdown-menu","aria-labelledby":"dropdownCourseButton"},P={key:1,class:"p-1"},Q=_(()=>s("small",null,"\u9084\u6C92\u6709\u52A0\u5165\u8AB2\u7A0B\u5594\uFF01",-1)),U=[Q],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}=M,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",V,[z,s("div",D,[s("div",E,[s("div",F,[s("table",G,[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",O,[s("h5",R,r(n.nickname),1),s("p",T,r(n.email),1)]),s("td",null,[s("div",H,[s("a",{id:"dropdownCourseButton",href:"#","data-bs-toggle":"dropdown",onClick:C(d=>f(n.user_id),["prevent"])}," \u5C55\u958B\u5217\u8868 ",8,J),s("ul",K,[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",P,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/CourseDetail.6d02920c.js b/assets/CourseDetail.6d02920c.js new file mode 100644 index 0000000..93d5ed2 --- /dev/null +++ b/assets/CourseDetail.6d02920c.js @@ -0,0 +1 @@ +import{l as z,N as G,m as $,r as U,o as H,z as w,a as d,c as n,b as e,A as o,f as p,F as h,q as v,p as V,x as b,g as P,D as m,E as R,h as f,w as T,Q as O,C as Q}from"./index.6ce76e2d.js";import{b as J}from"./bsTab.5232f6de.js";import{a as K}from"./courses.f6a332cf.js";import{a as W}from"./assistant.00b0a3a6.js";import"./tab.979b672c.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"},Ne={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Fe=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"},je=e("label",{for:"teachableId",class:"form-label"},"Teachable ID",-1),ze={class:"mb-3"},Ge=e("label",{for:"teachableName",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),He={class:"mb-3"},Pe=e("label",{for:"teachableAmount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Re={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"},Qe=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),Je={class:"card-body pt-2"},Ke={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:"name",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:"name",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}=K,{apiGetAssistantList:I}=W,A=z(),N=G.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([]),y=async i=>{const a=N.show();try{const{course:r}=await M(i),c=r.default_assistants;s.value={...r,default_assistants:c.length===0?[{user_id:""}]:c}}catch(r){b("danger","\u53D6\u5F97\u8AB2\u7A0B\u5931\u6557",`${r.response.data.statusCode}:${r.response.data.message}`)}finally{a.hide()}},F=async i=>{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"),y(i)}catch(r){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${r.response.data.statusCode}:${r.response.data.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"),y(i)}catch(r){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${r.response.data.statusCode}:${r.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"),y(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}`)}};H(()=>{const{id:i}=A.params;y(i),B(),J(k,C)});const j=(i,a)=>{let r=!1;return a.forEach(c=>{i===c&&(r=!s.value[c])}),r};return(i,a)=>{const r=w("router-link"),c=w("Field"),_=w("ErrorMessage"),g=w("VForm");return d(),n("div",X,[e("header",Y,[e("nav",Z,[e("ol",ee,[e("li",se,[o(r,{to:"/admin/courses"},{default:p(()=>[P(" \u8AB2\u7A0B\u7BA1\u7406 ")]),_:1})]),ae])]),te]),e("div",le,[e("div",oe,[e("div",ie,[(d(!0),n(h,null,v(C,t=>(d(),n("a",{id:t.id,class:m(["list-group-item list-group-item-action",{active:t.active,disabled:j(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:R(l=>t.element.show(),["prevent"])},f(t.name),11,de))),128))])]),e("div",ne,[e("div",re,[e("div",ce,[e("div",ue,[me,e("div",_e,[o(g,{onSubmit:a[2]||(a[2]=t=>F(s.value.id))},{default:p(({errors:t,invalid:l})=>[e("div",be,[he,o(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),o(_,{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,(d(!0),n(h,null,v(x.value,u=>(d(),n("option",{key:u.user_id,value:u.user_id},f(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?(d(),n("div",Ve,[e("div",ke,[Ce,e("div",xe,[o(g,null,{default:p(({errors:t})=>[e("div",De,[$e,o(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{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(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u7E2E\u5BEB}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{name:"\u8AB2\u7A0B\u7E2E\u5BEB",class:"invalid-feedback"})]),e("div",Se,[Ie,o(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),s.value.teachable_info?(d(),n("div",Ae,[e("div",Ne,[Fe,e("div",Ee,[o(g,null,{default:p(({errors:t})=>[e("div",Be,[je,o(c,{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:m(["form-control",{"is-invalid":t["Teachable ID"]}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{name:"Teachable ID",class:"invalid-feedback"})]),e("div",ze,[Ge,o(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",He,[Pe,o(c,{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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(_,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),e("div",Re,[e("div",Oe,[Qe,e("div",Je,[e("div",Ke,[e("div",We,[e("ol",Xe,[(d(!0),n(h,null,v(s.value.lectures,t=>(d(),n("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",Ye,[e("div",Ze,f(t.name),1),e("ul",es,[(d(!0),n(h,null,v(t.sub_lectures,l=>(d(),n("li",{key:l.id,class:"list-group-item"},f(l.hasTeachable?l.name:"-"),1))),128))])])]))),128))])]),e("div",ss,[e("ol",as,[(d(!0),n(h,null,v(s.value.lectures,t=>(d(),n("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",ts,[e("div",ls,f(t.name),1),e("ul",os,[(d(!0),n(h,null,v(t.sub_lectures,l=>(d(),n("li",{key:l.id,class:"list-group-item"},f(l.hasUdemy?l.name:"-"),1))),128))])])]))),128))])])])])])]),e("div",is,[e("div",ds,[ns,e("div",rs,[o(g,{onSubmit:a[13]||(a[13]=t=>D(s.value.id))},{default:p(({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),[[Q,s.value.enable_review]]),_s])]),s.value.enable_review?(d(),n(h,{key:0},[e("div",bs,[hs,o(c,{id:"name",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:m(["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(_,{name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",class:"invalid-feedback"})]),e("div",fs,[ps,o(c,{id:"name",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:m(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u5B8C\u6210\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),o(_,{name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",class:"invalid-feedback"})])],64)):V("",!0),s.value.enable_review?(d(),n("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.aeb09d76.js b/assets/CourseList.aeb09d76.js new file mode 100644 index 0000000..7b6e181 --- /dev/null +++ b/assets/CourseList.aeb09d76.js @@ -0,0 +1 @@ +import{r as n,o as w,z as g,a,e as R,f as C,A as _,M as S,b as e,D as q,w as z,c as r,F as L,q as N,h as V,Q as E,N as U,B as G,$ as j,x as k,p as x,g as A}from"./index.6ce76e2d.js";import{a as B}from"./courses.f6a332cf.js";import{a as I}from"./assistant.00b0a3a6.js";const O={class:"mb-3"},P=e("label",{for:"addName",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),Q={class:"mb-3"},H=e("label",{for:"addAssistants",class:"form-label"},"\u9810\u8A2D\u52A9\u6559",-1),J=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),K=["value"],W=["disabled"],X={__name:"CreateCourseModal",emits:["createCourseMethod"],setup(F,{expose:M,emit:p}){const{apiPostCreateCourse:m}=B,{apiGetAssistantList:h}=I,i=n(),c=n(""),u=n(""),f=n(null),o=async()=>{try{const s={name:c.value};u.value&&(s.default_assistant_user_id=u.value),await m(s),p("createCourseMethod",{target:"import",type:"\u6210\u529F"}),i.value.resetForm()}catch(s){p("createCourseMethod",{target:"import",type:"\u5931\u6557",error:`${s.response.status}:${s.response.statusText}`})}},t=n([]),$=async()=>{try{const{assistants:s}=await h();t.value=s}catch(s){postMessage("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${s.response.data.statusCode}:${s.response.data.message}`)}};return w(()=>{$()}),M({createCourseModalRef:f}),(s,l)=>{const b=g("Field"),y=g("ErrorMessage"),v=g("VForm");return a(),R(v,{ref_key:"refs",ref:i,onSubmit:o},{default:C(({errors:T,invalid:D})=>[_(S,{id:"createCourseModal",ref_key:"createCourseModalRef",ref:f,"has-footer":!0,title:"\u65B0\u589E\u8AB2\u7A0B","class-list":""},{body:C(()=>[e("div",O,[P,_(b,{id:"addName",modelValue:c.value,"onUpdate:modelValue":l[0]||(l[0]=d=>c.value=d),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:q(["form-control",{"is-invalid":T.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),_(y,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",Q,[H,z(e("select",{id:"addAssistants","onUpdate:modelValue":l[1]||(l[1]=d=>u.value=d),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control"},[J,(a(!0),r(L,null,N(t.value,d=>(a(),r("option",{key:d.user_id,value:d.user_id},V(d.nickname),9,K))),128))],512),[[E,u.value]])])]),footer:C(()=>[e("button",{type:"submit",disabled:D,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,W)]),_:2},1536)]),_:1},512)}}},Y={class:"about px-4 mt-4 position-relative"},Z={class:"d-flex align-items-center justify-content-between"},ee=e("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u7BA1\u7406 ",-1),se=e("hr",null,null,-1),te={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},oe={class:"card-body p-0"},ae={class:"table-responsive"},re={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},ne=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),le={class:"text-nowrap"},de={scope:"row",class:"ps-4"},ie={class:"fs-6 mb-0"},ce=["href"],ue=["href"],_e={class:"pe-3"},pe=e("span",{class:"material-icons align-middle fs-6"}," edit ",-1),be={__name:"CourseList",setup(F){const{apiGetCourseList:M}=B,p=U.useLoading(),m=n([]),h=async()=>{const o=p.show();try{const{courses:t}=await M();m.value=t}catch(t){k("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{o.hide()}};w(h);const i=n(""),c=n(null),u=()=>{i.value.show()},f=o=>{o.type==="\u6210\u529F"?k("success","\u5EFA\u7ACB\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u8AB2\u7A0B"):o.type==="\u5931\u6557"&&k("danger","\u5EFA\u7ACB\u8AB2\u7A0B\u5931\u6557",o.error),i.value.hide(),h()};return w(()=>{i.value=new G(c.value.createCourseModalRef.hModal),[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map(t=>new j(t))}),(o,t)=>{const $=g("router-link");return a(),r("div",Y,[e("header",Z,[ee,e("button",{class:"btn btn-primary",onClick:t[0]||(t[0]=s=>u())}," \u65B0\u589E\u8AB2\u7A0B ")]),se,e("div",te,[e("div",oe,[e("div",ae,[e("table",re,[ne,e("tbody",le,[(a(!0),r(L,null,N(m.value,s=>{var l,b,y,v;return a(),r("tr",{key:s.id,class:"align-middle"},[e("td",de,[e("h5",ie,V(s.name),1)]),e("td",null,V(s.assistant_count),1),e("td",null,[(l=s.teachable_info)!=null&&l.id?(a(),r("a",{key:0,href:s.teachable_info.url,target:"_blank"}," Teachable \u9023\u7D50 ",8,ce)):x("",!0),((b=s.udemy_info)==null?void 0:b.id)&&((y=s.teachable_info)==null?void 0:y.id)?(a(),r(L,{key:1},[A(" | ")],64)):x("",!0),(v=s.udemy_info)!=null&&v.id?(a(),r("a",{key:2,href:s.udemy_info.url,target:"_blank"}," Udemy \u9023\u7D50 ",8,ue)):x("",!0)]),e("td",_e,[_($,{to:`/admin/courses/${s.id}`,class:"btn btn-sm btn-outline-gray"},{default:C(()=>[pe,A(" \u7DE8\u8F2F ")]),_:2},1032,["to"])])])}),128))])])])])]),_(X,{ref_key:"createCourseModalComponentRef",ref:c,onCreateCourseMethod:f},null,512)])}}};export{be 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.e914b41e.js b/assets/CoursesSurveys.e914b41e.js new file mode 100644 index 0000000..9899728 --- /dev/null +++ b/assets/CoursesSurveys.e914b41e.js @@ -0,0 +1,6 @@ +import{a0 as K,T as J,_ as X,n as Y,j as Z,m as q,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,Z as U,g as tt,p as H,R as et,S as rt}from"./index.6ce76e2d.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=Z(()=>p.value.reverse()),C=q(["#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.2f2998f9.js b/assets/Editor.2f2998f9.js new file mode 100644 index 0000000..e763fa6 --- /dev/null +++ b/assets/Editor.2f2998f9.js @@ -0,0 +1,54 @@ +import{K as Te,T as nr,U as rr,o as ir,V as or,r as $t,s as Mn,W as ar,X as lr,a as ur,e as sr,i as fr,x as cr,d as Hn}from"./index.6ce76e2d.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.fd55d389.js b/assets/Email.fd55d389.js new file mode 100644 index 0000000..e5a4ae0 --- /dev/null +++ b/assets/Email.fd55d389.js @@ -0,0 +1 @@ +import{n as D,a as d,c,b as e,h,i as a,F as x,q as $,w as v,v as y,Q as M,r as m,o as k,A as L,d as g,x as _,L as T,D as j,E as U}from"./index.6ce76e2d.js";const C={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},A={class:"card-body"},B={class:"card-title mb-3"},I={class:"mb-3 border-bottom"},P=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),S={class:"mb-3 border-bottom"},z=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),F={class:"table table-borderless"},H=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),N=["id","onUpdate:modelValue"],q={class:"row"},O={class:"col-md-6"},Q={class:"mb-3"},R=e("label",{for:"mail_to",class:"form-label"},"\u767C\u9001\u4FE1\u7BB1",-1),G={class:"mb-3"},J=e("label",{for:"mail_title",class:"form-label"},"\u4FE1\u4EF6\u6A19\u984C",-1),K={class:"mb-3"},W=e("label",{for:"mail_time",class:"form-label"},"\u767C\u9001\u9031\u671F",-1),X=["value"],Y={class:"mb-3"},Z=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ee=e("br",null,null,-1),te=["innerHTML"],se={class:"d-flex justify-content-between mt-5"},le={__name:"Email",props:{data:{type:Object,default:()=>({})},schedulesList:{type:Array,default:()=>[]}},emits:["emailTest","editEmail"],setup(w,{emit:i}){const E=w,{data:l}=D(E),f=(r,s)=>{const t=[];s.forEach(u=>{t.push({id:u.id,content:u.replace_keyword})}),i("emailTest",r,t)},p=(r,s)=>{const t={cht_name:s.cht_name,content:s.content,subject:s.subject,schedule_id:s.schedule_id};i("editEmail",r,t)};return(r,s)=>(d(),c("div",C,[e("div",A,[e("h4",B,h(a(l).cht_name)+"\u56DE\u994B ",1),e("div",I,[P,e("p",null,h(a(l).trigger_description),1)]),e("div",S,[z,e("table",F,[H,e("tbody",null,[(d(!0),c(x,null,$(a(l).variables,t=>(d(),c("tr",{key:`email_${t.id}`},[e("td",null,h(t.cht_name),1),e("td",null,"{% "+h(t.name)+" %}",1),e("td",null,[v(e("input",{id:t.name,"onUpdate:modelValue":u=>t.replace_keyword=u,type:"text",class:"form-control"},null,8,N),[[y,t.replace_keyword]])])]))),128))])])]),e("div",q,[e("div",O,[e("div",Q,[R,v(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",G,[J,v(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",K,[W,v(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"},[(d(!0),c(x,null,$(w.schedulesList,t=>(d(),c("option",{key:`schedule_${t.id}`,value:t.id},h(t.cht_name),9,X))),128))],512),[[M,a(l).schedule_id]])])])]),e("div",Y,[Z,v(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=t=>a(l).content=t),class:"form-control",rows:"20"},null,512),[[y,a(l).content]]),ee,e("div",{innerHTML:a(l).content},null,8,te)]),e("div",se,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:s[4]||(s[4]=t=>f(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=>p(a(l).id,a(l)))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}},ae={class:"px-4 mt-4"},oe=e("h4",{class:"mb-3"}," Email \u8A0A\u606F\u7BA1\u7406 ",-1),ne={class:"row"},ie={class:"col-md-3"},de={class:"list-group"},ce=["onClick"],re={class:"col-md-9"},_e={__name:"Email",setup(w){const i=m(!1),E=m(!0),l=m(1),f=m(null),p=m({}),r=async()=>{try{i.value=!0;const o=await g.get("/v1/notify/email/list");f.value=o.data.templates,[p.value]=o.data.templates}catch(o){_("success","Email \u5217\u8868\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};k(()=>{r()});const s=m(null),t=async()=>{try{i.value=!0;const o=await g.get("/v1/notify/email/template/schedules");s.value=o.data.schedules}catch(o){_("danger","\u9031\u671F\u6E05\u55AE\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};k(()=>{t()});const u=async(o,b)=>{try{i.value=!0;const n=await g.post(`/v1/notify/email/template/${o}/test`,{variables:b});_("success","Email \u767C\u9001\u7D50\u679C",n.data.message)}catch(n){_("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}},V=async(o,b)=>{try{i.value=!0;const n=await g.put(`/v1/notify/email/template/${o}`,b);_("success","Eamil \u6A23\u677F\u7DE8\u8F2F\u7D50\u679C",n.data.message),l.value=1,r()}catch(n){_("danger","\u7DE8\u8F2F Email \u6A23\u677F\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}};return(o,b)=>(d(),c("div",ae,[L(a(T),{active:i.value,"is-full-page":E.value,"z-index":1021},null,8,["active","is-full-page"]),oe,e("div",ne,[e("div",ie,[e("div",de,[(d(!0),c(x,null,$(f.value,n=>(d(),c("a",{key:n.id,href:"#",class:j(["list-group-item",l.value===n.id?"active":""]),"aria-current":"true",onClick:U(ue=>(p.value=n,l.value=n.id),["prevent"])},h(n.cht_name),11,ce))),128))])]),e("div",re,[L(le,{data:p.value,"schedules-list":s.value,onEmailTest:u,onEditEmail:V},null,8,["data","schedules-list"])])])]))}};export{_e as default}; diff --git a/assets/Group.8a5129a4.js b/assets/Group.8a5129a4.js new file mode 100644 index 0000000..0c6d5bd --- /dev/null +++ b/assets/Group.8a5129a4.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,D as L,w as K,C as H,M as Y,_ as Z,N as ee,o as se,c as _,v as te,O as ae,F as U,q as F,i as oe,x as B,B as le,E as ne,h as G,p as z,g as I,P as ie,R as de,S as re}from"./index.6ce76e2d.js";import{a as J}from"./task.14e7f61a.js";import{a as ce}from"./task-tags.c36d28d7.js";const ue={class:"row"},pe={class:"col-6"},ve={class:"mb-3"},me=e("label",{for:"taskGroupName",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1),_e={class:"col-6"},ke={class:"mb-3"},be=e("label",{for:"taskGroupKeyword",class:"form-label"},"\u82F1\u6587\u540D\u7A31",-1),fe={class:"mb-3"},ge=e("label",{for:"taskGroupDescription",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",-1),ye={class:"mb-3"},he=e("label",{for:"taskGroupEndDate",class:"form-label"},"\u5230\u671F\u65E5",-1),we={class:"form-check"},Ge=e("label",{for:"taskGroupEnable",class:"form-check-label"},"\u662F\u5426\u986F\u793A",-1),xe=["disabled"],$e={__name:"CreateTaskGroupModal",props:{tempTaskGroupData:{type:Object,default(){return{}}}},emits:["createTaskGroupMethod"],setup(x,{expose:q,emit:S}){const E=x,{apiPostTaskGroup:k}=J,m=d(),t=d({name:"",keyword:"",description:"",expired_at:"",enable:!1}),N=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:N}),(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:N,"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]]),Ge])]),footer:C(()=>[e("button",{type:"submit",disabled:M,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,xe)]),_:2},1536)]),_:1},512)}}};const D=x=>(de("data-v-9c41d8b7"),x=x(),re(),x),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"],Ne=["for"],Re={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ue={class:"card-body p-0"},Fe={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(x){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:R}=await q({page:o,scoped:m.value});k.value.taskGroupsList=l,k.value.pagination=R}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()}},N=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:R}=await S({page:o,count:100});T.value.tagList=l,T.value.pagination=R,M.value=R.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),_(U,null,F(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}`},G(s.name),9,Ne)]))),128))]),e("div",Re,[e("div",Ue,[e("div",Fe,[e("table",Be,[Pe,e("tbody",qe,[(c(!0),_(U,null,F(k.value.taskGroupsList,s=>(c(),_("tr",{key:s.id,class:"align-middle"},[e("td",Ae,G(s.name),1),e("td",Ie,G(s.keyword),1),e("td",Ke,[s.user_groups.length===0?(c(),_("span",Oe,"\u7121")):z("",!0),(c(!0),_(U,null,F(s.user_groups,(i,w)=>(c(),j(f,{key:i.id,target:"_blank",to:`/admin/users/groups/${i.id}`},{default:C(()=>[I(G(i.name)+" ",1),s.user_groups.length>1&&w(c(),_("span",{key:i,class:"badge bg-light text-primary me-1"},G(i),1))),128))]),e("td",{scope:"row",class:L(["ps-4",{"text-success":s.enable}])},G(s.enable?"\u662F":"\u5426"),3),e("td",He,G(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:N},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.19058b01.js b/assets/GroupDetail.19058b01.js new file mode 100644 index 0000000..5cd435b --- /dev/null +++ b/assets/GroupDetail.19058b01.js @@ -0,0 +1 @@ +import{_ as oe,l as te,N as le,r,s as ne,o as ie,z as D,a as g,c as b,b as e,A as v,f as A,x as k,g as re,D as T,F as B,q as O,w as _,C as S,h as P,v as N,Q as ce,R as de,S as ue,y as pe}from"./index.6ce76e2d.js";import{a as _e}from"./task.14e7f61a.js";import{a as ve}from"./task-tags.c36d28d7.js";const i=y=>(de("data-v-e70eaf3a"),y=y(),ue(),y),he={class:"taskGroupDetail px-4 mt-4"},me={class:"border-bottom border-light pb-2 mb-3"},fe={"aria-label":"breadcrumb"},ge={class:"breadcrumb"},be={class:"breadcrumb-item"},ke=i(()=>e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44 ",-1)),ye=i(()=>e("h1",{class:"fs-4"},"\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44",-1)),Ge={class:"row"},Le={class:"col-md-6"},we={class:"mb-3"},xe=i(()=>e("label",{for:"taskGroupInfoName",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1)),De={class:"col-md-6"},Ce={class:"mb-3"},Ve=i(()=>e("label",{for:"taskGroupInfoKeyword",class:"form-label"},"\u82F1\u6587\u540D\u7A31",-1)),Ee={class:"card shadow-sm rounded-4 overflow-hidden mb-3"},Ue=i(()=>e("div",{class:"card-header bg-white py-3"}," \u5206\u985E\u6A19\u7C64 ",-1)),Ie={class:"list-unstyled mb-0"},Te={class:"form-check"},Se=["value","id","checked"],Ne=["for"],$e=i(()=>e("hr",null,null,-1)),Fe={class:"mb-3"},Me=i(()=>e("label",{for:"taskGroupDescription",class:"form-label"},"\u63CF\u8FF0",-1)),Re={class:"row"},Ke={class:"col-md-6"},He={class:"mb-3"},qe=i(()=>e("label",{class:"form-label",for:"groupEnd"},"\u5230\u671F\u65E5",-1)),Ae={class:"form-check mb-3"},Be=["checked"],Oe=i(()=>e("label",{class:"form-check-label",for:"showCheck"}," \u662F\u5426\u986F\u793A ",-1)),Pe=i(()=>e("hr",null,null,-1)),ze={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)),Je=i(()=>e("option",{value:""},"\u4E0D\u8A2D\u5B9A",-1)),We=[Qe,Je],Xe={class:"card-header bg-white py-3"},Ye={class:"row align-items-center justify-content-between"},Ze=i(()=>e("div",{class:"col"},[e("p",{class:"mb-sm-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868")],-1)),es={class:"col-sm-6"},ss={class:"input-group"},as={class:"list-unstyled mb-0"},os={class:"form-check"},ts=["value","id","checked"],ls=["for"],ns=i(()=>e("hr",null,null,-1)),is=i(()=>e("button",{type:"submit",class:"btn btn-primary d-block ms-auto"}," \u78BA\u8A8D\u66F4\u65B0 ",-1)),rs={__name:"GroupDetail",setup(y){const{apiGetTaskGroupDetail:z,apiPutTaskGroupDetail:j}=_e,{apiGetUserGroups:Q}=pe,{apiGetTaskTags:J}=ve,W=te(),C=le.useLoading(),u=r(""),p=r([]),t=r({}),$=async a=>{var c,n;const s=C.show();try{const{task_group:l}=await z(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()}},X=()=>{u.value===""&&(p.value=[])},h=r([]),Y=()=>{h.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}}),F=r(1),V=r(!1),L=r(""),E=async({page:a=1,keyword:s=""}={})=>{const c=C.show();V.value=!0;try{const{groups:n,pagination:l}=await Q({page:a,keyword:s});n.forEach(d=>{d.isChecked=!1}),G.value.userGroupsList=n,G.value.pagination=l,F.value=l.current_page,a===1?h.value=n:h.value=[...h.value,...n],Y()}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(),V.value=!1}},M=r(null),R=()=>{const a=M.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(V.value||G.value.pagination.current_page===G.value.pagination.total_page)return;E({page:F.value+1,keyword:L.value})}})};ne(u,a=>{a==="choose"&&R()});const m=r([]),w=r([]),Z=()=>{w.value.forEach(a=>{t.value.tags.forEach(s=>{a.name===s&&m.value.indexOf(a.id)===-1&&(a.isChecked=!0,m.value.push(a.id))})})},x=r({tagsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),K=r(1),U=r(!1),H=async(a=1)=>{var c,n;const s=C.show();U.value=!0;try{const{task_tags:l,pagination:d}=await J({page:a});l.forEach(f=>{f.isChecked=!1}),x.value.tagsList=l,x.value.pagination=d,K.value=d.current_page,w.value=[...w.value,...l],Z()}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}},q=r(null),ee=()=>{const a=q.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;H(K.value+1)}})},se=async a=>{try{const s={name:t.value.name,tag_ids:[...m.value],description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),user_group_ids:[...p.value],enable:!!t.value.enable};await j(a,s),k("success","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44"),$(a)}catch(s){k("danger","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${s.response.data.statusCode}:${s.response.data.message}`)}},ae=()=>{E({page:1,keyword:L.value})};return ie(async()=>{const{id:a}=W.params;await $(a),E(),H(),u.value==="choose"&&R(),ee()}),(a,s)=>{const c=D("router-link"),n=D("Field"),l=D("ErrorMessage"),d=D("VForm");return g(),b("div",he,[e("header",me,[e("nav",fe,[e("ol",ge,[e("li",be,[v(c,{to:"/admin/task/group"},{default:A(()=>[re(" \u4EFB\u52D9\u7FA4\u7D44 ")]),_:1})]),ke])]),ye]),v(d,{ref:"taskGroupForm",onSubmit:s[9]||(s[9]=f=>se(t.value.id))},{default:A(({errors:f})=>[e("div",Ge,[e("div",Le,[e("div",we,[xe,v(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":f.taskGroupInfoName}]),rules:"required"},null,8,["modelValue","class"]),v(l,{name:"taskGroupInfoName",class:"invalid-feedback"})])]),e("div",De,[e("div",Ce,[Ve,v(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":f.taskGroupInfoKeyword}]),rules:{required:!0}},null,8,["modelValue","class"]),v(l,{name:"taskGroupInfoKeyword",class:"invalid-feedback"})])])]),e("div",Ee,[Ue,e("div",{class:"card-body",ref_key:"tagListRef",ref:q},[e("ul",Ie,[(g(!0),b(B,null,O(w.value,o=>(g(),b("li",{key:o.id},[e("div",Te,[_(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=I=>m.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,Se),[[S,m.value]]),e("label",{class:"form-check-label",for:o.id},P(o.name),9,Ne)]),$e]))),128))])],512)]),e("div",Fe,[Me,_(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),[[N,t.value.description]])]),e("div",Re,[e("div",Ke,[e("div",He,[qe,_(e("input",{type:"date",class:"form-control",id:"groupEnd","onUpdate:modelValue":s[4]||(s[4]=o=>t.value.expired_at=o)},null,512),[[N,t.value.expired_at]])])])]),e("div",Ae,[_(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,Be),[[S,t.value.enable]]),Oe]),Pe,e("div",ze,[je,_(e("select",{class:"form-select",id:"userGroup",onChange:X,"onUpdate:modelValue":s[6]||(s[6]=o=>u.value=o)},We,544),[[ce,u.value]])]),e("div",{class:T(["card shadow-sm rounded-4 overflow-hidden mb-4",u.value?"d-block":"d-none"])},[e("div",Xe,[e("div",Ye,[Ze,e("div",es,[e("div",ss,[_(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),[[N,L.value]]),e("button",{class:"btn btn-secondary",type:"button",onClick:ae},"\u641C\u5C0B")])])])]),e("div",{class:"card-body",ref_key:"userGroupsListRef",ref:M},[e("ul",as,[(g(!0),b(B,null,O(h.value,o=>(g(),b("li",{key:o.id},[e("div",os,[_(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,ts),[[S,p.value]]),e("label",{class:"form-check-label",for:o.id},P(o.name),9,ls)]),ns]))),128))])],512)],2),is]),_:1},512)])}}},_s=oe(rs,[["__scopeId","data-v-e70eaf3a"]]);export{_s as default}; diff --git a/assets/GroupDetail.5ebc2d7d.css b/assets/GroupDetail.5ebc2d7d.css new file mode 100644 index 0000000..b5eafc3 --- /dev/null +++ b/assets/GroupDetail.5ebc2d7d.css @@ -0,0 +1 @@ +.card-body[data-v-e70eaf3a]{height:200px;overflow-y:auto} diff --git a/assets/LoginVertify.890b54dd.js b/assets/LoginVertify.890b54dd.js new file mode 100644 index 0000000..dec06a0 --- /dev/null +++ b/assets/LoginVertify.890b54dd.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.6ce76e2d.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.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/Message.eef889cc.js b/assets/Message.eef889cc.js new file mode 100644 index 0000000..773ff08 --- /dev/null +++ b/assets/Message.eef889cc.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,E as w,D as M,p as R,R as H,S as N,o as U,d as b,x as f,L as z}from"./index.6ce76e2d.js";import{_ as B}from"./Editor.2f2998f9.js";import{g as I}from"./date.4fb02a7a.js";const P={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},q={class:"card-body"},O={class:"card-title mb-3"},G={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",O,g(d(o).cht_name)+"\u56DE\u994B ",1),e("div",G,[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(I)(a.create_time)),1)])])]),e("div",ge,[e("span",{class:"un read",onClick:L=>t("readMessage",a.id)},null,8,ye)])]))),128))])])):R("",!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(I)(a.create_time)),1)])])]),e("span",{class:"read",onClick:L=>t("unreadMessage",a.id)},null,8,Ce)]))),128))])])):R("",!0)])])],2)])]))}},Te=E(Le,[["__scopeId","data-v-05efe2fc"]]),De={class:"px-4 mt-4"},Re=e("h4",{class:"mb-3"}," \u7AD9\u5167\u901A\u77E5\u8A0A\u606F ",-1),Ue={class:"row"},Ie={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}};U(()=>{y()});const v=m([]),n=async()=>{try{t.value=!0;const l="https://best-hex-user.hexschool.com/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}};U(()=>{n()});const s=async l=>{try{t.value=!0;const i=`https://best-hex-user.hexschool.com/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://best-hex-user.hexschool.com/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"]),Re,e("div",Ue,[e("div",Ie,[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/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.98911016.js b/assets/SurveysDetail.98911016.js new file mode 100644 index 0000000..7ba442b --- /dev/null +++ b/assets/SurveysDetail.98911016.js @@ -0,0 +1,3 @@ +import{d as We,a1 as Fe,_ as Ae,N as Xe,l as He,r as C,m as Ze,o as Je,a as r,c as u,b as t,F,q as A,e as Ke,p as f,A as Ce,i as q,x as g,X,h as b,g as P,E as H,w as ke,v as $e,D as z,P as Qe,R as Ye,S as Ie,a2 as es}from"./index.6ce76e2d.js";import{C as ss,V as ts}from"./CoursesSurveys.e914b41e.js";import{g as Z}from"./date.4fb02a7a.js";import{a as as}from"./surveys.9a9d5d25.js";const J=We.create({baseURL:"https://best-hex-user.hexschool.com",withCredentials:!0,xsrfHeaderName:"xsrf-token",xsrfCookieName:"xsrf-token",withXSRFToken:!0,headers:{Authorization:`Bearer ${Fe("h_MqhC49RxFRI6pR3Z_token")}`}}),ls=w=>{const[B,E]=window.location.href.split("#"),{status:M}=w.response;switch(M){case 401:window.location.href=`rpg.hexschool.com/#/login?h_redirect=${B}&h_path=${E}`;break}return Promise.reject(w)};J.interceptors.request.use(w=>w,w=>Promise.reject(w));J.interceptors.response.use(w=>w.data,w=>ls(w));const is=()=>J.get("/v1/user/personal/profile"),os={apiGetUserPersonalInfo:is};const k=w=>(Ye("data-v-84aaa1f9"),w=w(),Ie(),w),ns={class:"surveys px-4 mt-4 position-relative"},ds=k(()=>t("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9 ",-1)),cs={class:"row gx-3 gy-2 align-items-center my-2"},rs={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)),gs=k(()=>t("option",{value:"has_content=1"}," \u6709\u8A55\u8AD6 ",-1)),ws=["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"},ms={class:"card-body d-flex shadow-sm"},xs=["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],Ls=["onClick"],Ts=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"},Ms=["src"],Ns={class:"ms-2 mb-0"},Os={key:0,class:"text-muted"},Gs={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)),Xs=["onClick"],Hs={key:3,class:"d-flex justify-content-between"},Zs=["onClick"],Js={class:"mb-0"},Ks=["onClick"],Qs={class:"card-footer bg-white d-flex"},Ys={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"}},ct={class:"card-body"},rt={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},gt=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)),wt=["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"},mt={__name:"SurveysDetail",setup(w){const{apiGetVideoCoursesDetail:B,apiGetVideoCoursesComments:E,apiGetVideoCoursesComment:M,apiPutVideoCoursesCommentsDisplay:me,apiDeleteVideoCoursesCommentsDisplay:xe,apiPostVideoCoursesCommentsReplys:Ve,apiPutVideoCoursesCommentsReplys:Re,apiPostVideoCoursesWhispers:Se,apiPutVideoCoursesWhispers:De}=as,{apiGetUserPersonalInfo:Pe}=os,m=Xe.useLoading(),Le=He(),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}),K=C(null),Q=C(null),N=Ze({}),x=C(null),O=C({}),Te=async l=>{var e,s,c,i;const d=m.show();try{const{review:a}=await B(l);O.value=a}catch(a){g("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=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},Y=C([]);let G=[];const qe=()=>{const l=[];Y.value.forEach(e=>{e&&l.push(e)}),G=[].slice.call(l).map(e=>new es(e))},I=C([]),V=C({current_page:1,total:0}),D=async(l,d=N.name)=>{var s,c,i,a;const e=m.show();try{const{comments:o,pagination:_}=await E({videoCourseId:x.value,page:l,scoped:d});I.value=o,V.value=_}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await X(),qe()}},L=C({}),Ue=async()=>{var d,e,s,c;const l=m.show();try{const{profile:i}=await Pe();L.value=i}catch(i){g("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}:${(c=(s=i==null?void 0:i.response)==null?void 0:s.data)==null?void 0:c.message}`)}finally{l.hide()}};Je(async()=>{const{id:l}=Le.params;x.value=l,await D(),Te(l),Ue()});const je=async l=>{var e,s,c,i;const d=m.show();try{await me(x.value,l),await D(V.value.current_page),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u89E3\u9664\u96B1\u85CF")}catch(a){g("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=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},ze=async l=>{var e,s,c,i;const d=m.show();try{await xe(x.value,l),await D(V.value.current_page),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u96B1\u85CF")}catch(a){g("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=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},R=C(""),Be=async l=>{var e,s,c,i;const d=m.show();try{await Ve(x.value,l,{content:R.value}),p.value.new=!1,p.value.id="",await D(V.value.current_page),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(a){g("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=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},Ee=async(l,d)=>{var s,c,i,a;const e=m.show();try{const o={videoCourseId:x.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),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.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 X(),l==="whisper"&&Q.value[0].focus(),l==="comment"&&K.value[0].focus()},n=C([]),W=async(l,d)=>{var s,c,i,a;const e=m.show();try{const{review:o}=await M(x.value,l);o.status=!0,n.value[d]=o}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await X(),G[d].show()}},Me=l=>{N.name=l.target.value,n.value=[],D(1,N.name)},S=C(""),Ne=async(l,d,e)=>{var c,i,a,o;const s=m.show();try{const _={videoCourseId:x.value,commentId:l,whisperId:d,body:{content:S.value}};await Se(_),h.value.new=!1,h.value.id=null,await W(l,e),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(_){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(i=(c=_==null?void 0:_.response)==null?void 0:c.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 c=m.show();try{const $={videoCourseId:x.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),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch($){g("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{c.hide()}},Ge=l=>{n.value[l].status=!n.value[l].status,G[l].toggle()},ee=(l,d,e)=>l?d||"https://fakeimg.pl/300/":e&&e||"https://fakeimg.pl/300/";return(l,d)=>(r(),u("div",ns,[ds,t("form",cs,[t("div",rs,[t("div",us,[t("div",ps,[hs,t("select",{class:"form-select",onChange:d[0]||(d[0]=e=>Me(e))},[vs,_s,ys,gs,(r(),u(F,null,A(5,e=>t("option",{key:`sating${e}`,value:`rating=${6-e}`},b(6-e)+"\u661F\u8A55\u8AD6 ",9,ws)),64))],32)])])])]),O.value.id?(r(),Ke(ss,{key:0,data:O.value},null,8,["data"])):f("",!0),t("div",fs,[bs,t("div",Cs,[t("ul",ks,[(r(!0),u(F,null,A(I.value,(e,s)=>{var c,i,a,o,_,$,se,te,ae,le,ie,oe,ne,de,ce,re,ue,pe,he,ve,_e,ye,ge,we,fe;return r(),u("li",{key:e.id,class:"mb-4"},[t("div",$s,[t("div",ms,[t("img",{src:e.avatar,width:"40",height:"40",class:"rounded-pill",alt:e.nickname},null,8,xs),t("div",Vs,[t("p",Rs,[P(b(e.nickname)+" ",1),e.display?(r(),u("a",{key:0,href:"#",title:"\u96B1\u85CF\u8A55\u8AD6",onClick:H(v=>ze(e.id),["prevent"])},Ps,8,Ss)):(r(),u("a",{key:1,href:"#",title:"\u986F\u793A\u8A55\u8AD6",class:"text-danger text-decoration-none",onClick:H(v=>je(e.id),["prevent"])},[Ts,P(" \u53D6\u6D88\u96B1\u85CF ")],8,Ls))]),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(Z)(e.create_time)),1)]),t("p",null,b(e.content),1),p.value.id!==e.id&&!e.reply?(r(),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?(r(),u("div",zs,[t("div",Bs,[t("div",Es,[t("img",{src:ee((c=e.reply)==null?void 0:c.id,(i=e.reply)==null?void 0:i.avatar,L.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,Ms),t("p",Ns,[P(b(((a=e.reply)==null?void 0:a.nickname)||L.value.nickname)+" ",1),p.value.new?f("",!0):(r(),u("span",Os,b(q(Z)((o=e.reply)==null?void 0:o.create_time)),1))])]),((_=e.reply)==null?void 0:_.content)&&!p.value.edit||p.value.id!==e.id?(r(),u("p",Gs,[t("pre",Ws," "+b(($=e.reply)==null?void 0:$.content)+` + `,1)])):(r(),u("div",Fs,[ke(t("textarea",{ref_for:!0,ref_key:"commentTextareaRef",ref:K,"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?(r(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Be(e.id)}," \u65B0\u589E\u56DE\u8986 ",8,Xs)):f("",!0),p.value.edit&&((se=e.reply)==null?void 0:se.content)&&p.value.id===e.id?(r(),u("div",Hs,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>Ee(e.id,e.reply.id)}," \u9001\u51FA\u56DE\u8986 ",8,Zs),t("p",Js,[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?(r(),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,Ks)):f("",!0)])])):f("",!0)])]),t("div",Qs,[t("div",Ys,[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:H(v=>{var y;return(y=n.value[s])!=null&&y.id?Ge(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?(r(),u("span",st,"(\u6709\u6084\u6084\u8A71)")):f("",!0)],8,et)]),t("div",{ref_for:!0,ref:v=>Y.value[s]=v,class:"collapse show mt-3"},[t("div",tt,[(r(!0),u(F,null,A((le=n.value[s])==null?void 0:le.questionnaires,(v,y)=>{var T,be;return r(),u("div",{key:`questionnaires${y}`,class:z(["d-flex align-items-center mb-3",{"col-md-6":((T=n.value[s])==null?void 0:T.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?(r(),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?(r(),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?(r(),u("div",dt,[t("div",ct,[t("div",rt,[t("img",{src:ee((de=n.value[s].whisper.reply)==null?void 0:de.id,(ce=n.value[s].whisper.reply)==null?void 0:ce.avatar,L.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,ut),t("p",pt,[P(b(((re=n.value[s].whisper.reply)==null?void 0:re.nickname)||L.value.nickname)+" ",1),h.value.new?f("",!0):(r(),u("span",ht,b(q(Z)((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)?(r(),u("p",vt,[t("pre",_t," "+b((ve=n.value[s].whisper.reply)==null?void 0:ve.content)+` + `,1)])):(r(),u("div",yt,[ke(t("textarea",{ref_for:!0,ref_key:"whisperTextareaRef",ref:Q,"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]]),gt])),h.value.new&&h.value.id===((_e=n.value[s])==null?void 0:_e.whisper.id)?(r(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Ne(e.id,n.value[s].whisper.id,s)}," \u65B0\u589E\u56DE\u8986 ",8,wt)):f("",!0),h.value.edit&&((ye=n.value[s].whisper.reply)==null?void 0:ye.content)&&h.value.id===((ge=n.value[s].whisper)==null?void 0:ge.id)?(r(),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&&((we=n.value[s].whisper.reply)==null?void 0:we.content)||h.value.id!==((fe=n.value[s].whisper)==null?void 0:fe.id)?(r(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y,T;h.value.new=!1,h.value.edit=!0,h.value.id=(y=n.value[s].whisper)==null?void 0:y.id,S.value=(T=n.value[s].whisper.reply)==null?void 0:T.content,j("whisper")}}," \u4FEE\u6539\u56DE\u8986 ",8,kt)):f("",!0)])])):f("",!0)])):f("",!0)],512)])])])])}),128))]),t("div",$t,[Ce(q(Qe),{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(mt,[["__scopeId","data-v-84aaa1f9"]]);export{Pt as default}; diff --git a/assets/SurveysList.6de07287.js b/assets/SurveysList.6de07287.js new file mode 100644 index 0000000..fe10f12 --- /dev/null +++ b/assets/SurveysList.6de07287.js @@ -0,0 +1 @@ +import{N 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 G,P as N}from"./index.6ce76e2d.js";import{C as P}from"./CoursesSurveys.e914b41e.js";import{a as A}from"./surveys.9a9d5d25.js";const D={class:"surveys px-4 mt-4 position-relative"},F=o("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9\u5217\u8868 ",-1),M={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",D,[F,o("form",M,[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},G(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(N),{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.e514e1b3.js b/assets/SurveysManage.e514e1b3.js new file mode 100644 index 0000000..1f70a9f --- /dev/null +++ b/assets/SurveysManage.e514e1b3.js @@ -0,0 +1 @@ +import{r as k,a as i,e as A,f as Q,g as B,b as a,M as F,N as O,o as M,c as u,F as S,q as T,A as E,B as G,x as c,w as V,C as j,p as m,v as z}from"./index.6ce76e2d.js";import{a as H}from"./surveys.9a9d5d25.js";const J=a("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),K={__name:"AlertModal",emits:["deleteQuestionnaire"],setup(D,{expose:f,emit:w}){const r=k(null);return f({modalRef:r}),(g,b)=>(i(),A(F,{ref_key:"modalRef",ref:r,title:"\u522A\u9664\u554F\u5238","has-footer":!0},{body:Q(()=>[B(" \u4F60\u78BA\u5B9A\u8981\u522A\u9664\uFF1F ")]),footer:Q(()=>[J,a("button",{type:"button",class:"btn btn-danger",onClick:b[0]||(b[0]=v=>w("deleteQuestionnaire"))}," \u522A\u9664 ")]),_:1},512))}},W={class:"px-4 mt-4"},X=a("h1",{class:"fs-4 mb-3"}," \u8A55\u50F9\u7BA1\u7406 ",-1),Y={class:"card shadow-sm rounded"},Z=a("div",{class:"card-header"},[a("h5",{class:"text-secondary my-2"}," \u8A55\u50F9\u5167\u5BB9\u8A2D\u5B9A ")],-1),q={class:"card-body"},ee={class:"table table-borderless"},te=a("thead",null,[a("tr",{class:"text-secondary"},[a("th",{style:{width:"100px"}}," \u555F\u7528\u72C0\u614B "),a("th",null,"\u8A55\u50F9\u540D\u7A31"),a("th",{class:"w-25"})])],-1),se={class:"align-middle"},ae={class:"form-check form-switch"},oe=["onUpdate:modelValue","checked","onChange"],ne=["onUpdate:modelValue","disabled"],le={class:"d-flex align-items-center"},de=["onClick"],ce=["onClick"],ie=["onClick"],ue=a("span",{class:"material-icons-outlined"}," close ",-1),he=[ue],pe=a("td",null,null,-1),_e=a("span",{class:"material-icons-outlined me-1"}," add_circle_outline ",-1),me={__name:"SurveysManage",setup(D){const{apiGetVideoCoursesQuestionnaires:f,apiPostVideoCoursesQuestionnaires:w,apiPutVideoCoursesQuestionnaires:r,apiDeleteVideoCoursesQuestionnaires:g,apiPutVideoCoursesOpenQuestionnaires:b,apiDeleteVideoCoursesCloseQuestionnaires:v}=H,h=O.useLoading(),$=k(null);let C=null;M(()=>{C=new G($.value.modalRef.hModal)});const y=k([]),p=async()=>{var l,e,n,s;const d=h.show();try{const{questionnaires:t}=await f();y.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}:${(s=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:s.message}`)}finally{d.hide()}};M(p);const N=async d=>{var e,n,s,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=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:t.message}`)}finally{l.hide()}},R=async(d,l)=>{var n,s,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",`${(s=(n=_==null?void 0:_.response)==null?void 0:n.data)==null?void 0:s.statusCode}:${(o=(t=_==null?void 0:_.response)==null?void 0:t.data)==null?void 0:o.message}`)}finally{e.hide()}};let x=null;const L=async()=>{var l,e,n,s;const d=h.show();try{C.hide(),await g(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}:${(s=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:s.message}`)}finally{d.hide()}},U=async d=>{var e,n,s,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=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:t.message}`)}finally{l.hide()}},I=async d=>{var e,n,s,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=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:t.message}`)}finally{l.hide()}},P=d=>{x=d,C.show()};return(d,l)=>(i(),u("div",W,[X,a("div",Y,[Z,a("div",q,[a("table",ee,[te,a("tbody",null,[(i(!0),u(S,null,T(y.value,(e,n)=>(i(),u("tr",{key:e.id},[a("td",se,[a("div",ae,[e.id?V((i(),u("input",{key:0,id:"flexSwitchCheckDefault","onUpdate:modelValue":s=>e.enable=s,class:"form-check-input",type:"checkbox",role:"switch","true-value":1,"false-value":0,checked:e.enable,onChange:s=>e.enable?U(e.id):I(e.id)},null,40,oe)),[[j,e.enable]]):m("",!0)])]),a("td",null,[V(a("input",{"onUpdate:modelValue":s=>e.question=s,type:"text",class:"form-control",placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9",disabled:e.id?e.enable:null},null,8,ne),[[z,e.question]])]),a("td",le,[e.id&&!e.enable?(i(),u("button",{key:0,type:"button",class:"btn btn-outline-dark",onClick:s=>R(e.id,e)}," \u5B8C\u6210 ",8,de)):m("",!0),e.id?m("",!0):(i(),u("button",{key:1,type:"button",class:"btn btn-outline-primary",onClick:s=>N(e)}," \u65B0\u589E ",8,ce)),!e.enable||!e.id?(i(),u("button",{key:2,type:"button",class:"btn d-flex",onClick:s=>e.id?P(e.id):y.value.splice(n,1)},he,8,ie)):m("",!0)])]))),128)),a("tr",null,[pe,a("td",null,[a("button",{type:"button",class:"btn d-flex text-primary d-flex",onClick:l[0]||(l[0]=e=>y.value.push({question:""}))},[_e,B(" \u65B0\u589E\u8A55\u50F9 ")])])])])])])]),E(K,{ref_key:"alertRef",ref:$,onDeleteQuestionnaire:L},null,512)]))}};export{me as default}; diff --git a/assets/Tag.b74f7417.js b/assets/Tag.b74f7417.js new file mode 100644 index 0000000..d52170e --- /dev/null +++ b/assets/Tag.b74f7417.js @@ -0,0 +1 @@ +import{r as n,a as r,e as X,f as V,g as U,b as e,h as B,M as Y,s as Q,o as P,z as S,A as f,D as H,c as b,F as E,q as G,p as O,N as ee,m as te,w as se,v as ae,O as oe,i as le,B as W,x as I,E as ne,P as ie}from"./index.6ce76e2d.js";import{B as de}from"./tab.979b672c.js";import{a as Z}from"./task-tags.c36d28d7.js";const ce=e("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),re={__name:"TagDeleteModal",props:{name:{type:String,default:""}},emits:["delete"],setup(A,{expose:L,emit:$}){const v=A,g=n(null);return L({modalRef:g}),(x,_)=>(r(),X(Y,{ref_key:"modalRef",ref:g,title:"\u522A\u9664\u6A19\u7C64",classList:"bg-danger text-white","has-footer":!0},{body:V(()=>[U(" \u4F60\u78BA\u5B9A\u8981\u522A\u9664 "),e("b",null,B(v.name),1),U(" \u6A19\u7C64\u55CE\uFF1F ")]),footer:V(()=>[ce,e("button",{type:"button",class:"btn btn-danger",onClick:_[0]||(_[0]=y=>$("delete"))}," \u522A\u9664 ")]),_:1},512))}},ue={class:"mb-3"},pe=e("label",{for:"name",class:"form-label"},"\u6A19\u7C64\u540D\u7A31",-1),me={class:"mb-3"},be=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),ve={key:0,class:"mt-4"},_e={class:"card shadow-sm rounded-4 overflow-hidden h-100"},ye=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),fe={class:"card-body",style:{"max-height":"230px","overflow-y":"scroll"}},ge={class:"tab-content",id:"pills-tabContent"},he={class:"tab-pane fade show active",id:"pills-home",role:"tabpanel","aria-labelledby":"pills-home-tab",tabindex:"0"},ke={class:"list-unstyled"},we={class:"tab-pane fade",id:"pills-profile",role:"tabpanel","aria-labelledby":"pills-profile-tab",tabindex:"0"},$e={class:"list-unstyled"},xe=e("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),Te=["disabled"],Me={__name:"TagModal",props:{type:{type:String,default:""},data:{type:Object,default:()=>({id:"",name:"",description:""})}},emits:["update"],setup(A,{expose:L,emit:$}){const v=A,{apiGetTaskTagById:g,apiPostTaskTags:x,apiPutTaskTagById:_}=Z,y=n(null),R=n(null);L({tagContentModalRef:R});const i=n("create"),T=n(""),u=n({name:"",description:""});Q(()=>{var o;return(o=v.data)==null?void 0:o.id},()=>{var o;(o=v.data)!=null&&o.id?(i.value="edit",T.value=v.data.id,u.value=JSON.parse(JSON.stringify(v.data))):(i.value="create",T.value="",u.value={name:"",description:""},y.value.resetForm())});const h=n({tasksApply:[],taskGroupsApply:[]}),D=async o=>{var d,l,m,c;try{const{task_tag:p}=await g(o);h.value={tasksApply:p.tasks_apply,taskGroupsApply:p.task_groups_apply}}catch(p){$("update",{type:"\u5931\u6557",status:i.value,error:`${(l=(d=p==null?void 0:p.response)==null?void 0:d.data)==null?void 0:l.statusCode}:${(c=(m=p==null?void 0:p.response)==null?void 0:m.data)==null?void 0:c.message}`})}};Q(()=>T.value,o=>{o&&D(o)});const k=n(!1),j=async()=>{var o,d,l,m;k.value=!0;try{if(i.value==="create")await x(u.value),u.value={name:"",description:""};else{const c={name:u.value.name,description:u.value.description};await _(T.value,c)}k.value=!1,$("update",{type:"\u6210\u529F",status:i.value})}catch(c){k.value=!1,u.value.name=v.data.name,u.value.description=v.data.description,$("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 P(()=>{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=S("Field"),m=S("ErrorMessage"),c=S("router-link"),p=S("VForm");return r(),X(p,{ref_key:"tagForm",ref:y,onSubmit:j},{default:V(({errors:N})=>[f(Y,{ref_key:"tagContentModalRef",ref:R,title:i.value==="create"?"\u65B0\u589E\u6A19\u7C64":"\u7DE8\u8F2F\u6A19\u7C64",classList:"bg-light","has-footer":!0},{body:V(()=>[e("div",ue,[pe,f(l,{id:"name",modelValue:u.value.name,"onUpdate:modelValue":d[0]||(d[0]=t=>u.value.name=t),name:"name",label:"\u6A19\u7C64\u540D\u7A31",type:"text",class:H(["form-control",{"is-invalid":N.name}]),rules:{required:!0}},null,8,["modelValue","class"]),f(m,{name:"name",class:"invalid-feedback"})]),e("div",me,[be,f(l,{as:"textarea",id:"description",modelValue:u.value.description,"onUpdate:modelValue":d[1]||(d[1]=t=>u.value.description=t),name:"description",label:"\u63CF\u8FF0",type:"text",rules:{required:!0},class:H(["form-control",{"is-invalid":N.description}])},null,8,["modelValue","class"]),f(m,{name:"description",class:"invalid-feedback"})]),i.value==="edit"?(r(),b("div",ve,[e("div",_e,[ye,e("div",fe,[e("div",ge,[e("div",he,[e("ul",ke,[(r(!0),b(E,null,G(h.value.taskGroupsApply,t=>(r(),b("li",{class:"mb-2",key:t.id},B(t.name),1))),128))])]),e("div",we,[e("ul",$e,[(r(!0),b(E,null,G(h.value.tasksApply,t=>(r(),b("li",{class:"mb-2",key:t.id},[f(c,{target:"_blank",to:`/admin/task/list/${t.id}`},{default:V(()=>[U(B(t.name),1)]),_:2},1032,["to"])]))),128))])])])])])])):O("",!0)]),footer:V(()=>[xe,e("button",{type:"submit",class:"btn btn-primary",disabled:k.value},B(i.value==="create"?"\u65B0\u589E":"\u7DE8\u8F2F"),9,Te)]),_:2},1032,["title"])]),_:1},512)}}},Ce={class:"taskTag px-4 mt-4"},Ve=e("h1",{class:"fs-4 mb-3"},"\u6A19\u7C64\u7BA1\u7406",-1),Be={class:"d-flex justify-content-between align-items-center mb-3"},Le={class:"row w-75"},Re={class:"col-md-6"},Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ie={class:"card-body p-0"},Ae={class:"table-responsive"},De={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Ne=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),Se={class:"text-nowrap"},Pe={scope:"row",class:"ps-4"},Ue={scope:"row",class:"ps-4"},Ee={scope:"row",class:"ps-4"},Ge={key:0,class:"text-success"},Oe={key:1,class:"text-secondary"},je={scope:"row",class:"ps-4"},qe=["onClick"],ze=e("span",{class:"material-icons align-middle fs-6"}," edit ",-1),Je=["onClick"],Ke={key:0,class:"card-footer bg-white py-3"},Qe={class:"d-flex flex-wrap align-items-start"},Ye={__name:"Tag",setup(A){const{apiGetTaskTags:L,apiDeleteTaskTagById:$}=Z,v=ee.useLoading(),g=n(!1),x=n(""),_=n(""),y=n({current_page:1,total_page:0,total:30}),R=n([]),i=async(t=1,s=10)=>{var q,z,J,K;_.value!==""?x.value=`name=${_.value}`:x.value="";const a=v.show(),{task_tags:M,pagination:w}=await L({page:t,count:s,scoped:x.value});try{R.value=M,y.value=w}catch(C){I("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(z=(q=C==null?void 0:C.response)==null?void 0:q.data)==null?void 0:z.statusCode}:${(K=(J=C==null?void 0:C.response)==null?void 0:J.data)==null?void 0:K.message}`)}finally{a.hide()}},T=t=>{i(t)};P(async()=>{await i()});const h=te({type:"",data:{}}),D=n(null);let k=null;P(()=>{k=new W(D.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;P(()=>{m=new W(d.value.modalRef.hModal)});const p=(t,s)=>{l.value.id=t,l.value.name=s,m.show()},N=async()=>{var t,s,a,M;try{await $(l.value.id),I("success","\u522A\u9664\u6A19\u7C64\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u6A19\u7C64")}catch(w){I("danger","\u522A\u9664\u6A19\u7C64\u5931\u6557",`${(s=(t=w==null?void 0:w.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(M=(a=w==null?void 0:w.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(),b("div",Ce,[Ve,e("div",Be,[e("div",Le,[e("div",Re,[se(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>_.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,_.value]])])]),e("button",{class:"btn btn-primary",onClick:s[4]||(s[4]=a=>F("create"))}," \u65B0\u589E\u6A19\u7C64 ")]),e("div",Fe,[e("div",Ie,[e("div",Ae,[e("table",De,[Ne,e("tbody",Se,[(r(!0),b(E,null,G(R.value,a=>(r(),b("tr",{key:a.id,class:"align-middle"},[e("td",Pe,B(a.name),1),e("td",Ue,B(a.description),1),e("td",Ee,[a.is_used?(r(),b("span",Ge,"\u5DF2\u4F7F\u7528")):(r(),b("span",Oe,"\u672A\u4F7F\u7528"))]),e("td",je,[e("button",{class:"btn btn-sm btn-outline-gray ms-1",onClick:M=>F("edit",a)},[ze,U(" \u7DE8\u8F2F ")],8,qe),a.is_used?O("",!0):(r(),b("button",{key:0,class:"btn btn-sm btn-outline-danger ms-2",onClick:M=>p(a.id,a.name)},"\u522A\u9664",8,Je))])]))),128))])])])]),y.value.total_page>1?(r(),b("div",Ke,[e("div",Qe,[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"])])])):O("",!0)]),f(re,{ref_key:"alertRef",ref:d,onDelete:N,name:l.value.name},null,8,["name"]),f(Me,{ref_key:"tagModalRef",ref:D,type:h.type,data:h.data,onUpdate:o},null,8,["type","data"])]))}};export{Ye 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.8df61f8d.js b/assets/TaskDetail.8df61f8d.js new file mode 100644 index 0000000..e88bfa5 --- /dev/null +++ b/assets/TaskDetail.8df61f8d.js @@ -0,0 +1 @@ +import{d as O,N 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 N,h as k,x as E,g as W,D 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 G,C as R,Q as we}from"./index.6ce76e2d.js";import{I as xe,_ as Ve}from"./Editor.2f2998f9.js";/* empty css */import{a as Ue}from"./task.14e7f61a.js";import{a as Te}from"./task-tags.c36d28d7.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"},Ne={class:"col-md-6"},Ee={class:"mb-3"},Ge=e("label",{class:"form-label",for:"name"},"\u4EFB\u52D9\u540D\u7A31",-1),Re={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"},Qe={class:"mb-3"},Ke=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"},Nt=["onUpdate:modelValue"],Et=["onClick"],Gt=e("hr",null,null,-1),Rt=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),Qt={class:"row"},Kt={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([]),Q=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,Q.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)E("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),E("success",`${o}\u6210\u529F`,`${o}\u4EFB\u52D9\u6210\u529F`),z.push({name:"TaskList",query:x.query})}catch(n){E("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}),K=(l,t)=>{B.value=!1,l.target.value="",E("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){K(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{K(l,"\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002")}})()}else K(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:N(()=>[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:N(({errors:c})=>[e("div",Ae,[e("div",Ne,[e("div",Ee,[Ge,_(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",Re,[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:N(()=>[(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:N(({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",Qe,[Ke,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 "),Q.value.total>0?(r(),d("small",ct," \uFF5C\u5DF2\u8F09\u5165 "+k(H.value.length)+" \u500B / \u5171 "+k(Q.value.total)+" \u500B",1)):G("",!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),[[R,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),[[R,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,Nt),[[I,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:p=>D("level",u)}," \u522A\u9664 ",8,Et)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[10]||(t[10]=s=>M("level"))}," \u65B0\u589E\u4E00\u5217 ")])):G("",!0),Gt,Rt,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),[[R,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]])])):G("",!0),Ht,e("div",Qt,[e("div",Kt,[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),[[R,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 ")):G("",!0)])])]),_:1},512)])])}}};export{ps as default}; diff --git a/assets/TaskList.730e83e2.js b/assets/TaskList.730e83e2.js new file mode 100644 index 0000000..91e3184 --- /dev/null +++ b/assets/TaskList.730e83e2.js @@ -0,0 +1 @@ +import{_ as J,N as K,u as W,l as X,r,s as N,m as Y,o as Z,z as R,a as o,c as l,b as s,w as U,Q as ss,A as b,f as L,v as ts,p as $,F as V,q as C,i as es,g as h,D as as,h as g,E as os,P as ls,R as ns,S as cs,x as is}from"./index.6ce76e2d.js";/* empty css */import{a as ds}from"./task.14e7f61a.js";import{a as rs}from"./task-tags.c36d28d7.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"],Vs={key:1,class:"w-75 my-3"},Cs={class:"d-flex flex-wrap"},Gs=["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"}},Ns=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)),Rs={class:"text-nowrap"},Us={scope:"row",class:"ps-4"},Bs={scope:"row",class:"ps-4"},Es={scope:"row",class:"ps-2"},Is=["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},Qs={key:1,class:"text-muted"},Hs={scope:"row",class:"ps-2"},Js={key:0},Ks={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:B,apiGetTasks:E}=ds,{apiGetTaskTags:I}=rs,x=K.useLoading(),G=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:H}=await E({count:20,page:e,scoped:d.value});T.value=c,p.value=H}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([]);N(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 B({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 I({page:1,count:150});D.value=a,M.value=!0,e.hide()};N(_,async e=>{e==="task_group"&&!q.value&&await z(),e==="task_tags"&&!M.value&&await A(),e==="default"&&(d.value="",G.replace({name:"TaskList",query:{}}),k())});const j=e=>{k(e),G.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())},Q=e=>{window.open(`rpg.hexschool.com/#/tasks/${e}?preview=1`,"_blank")};return(e,a)=>{const i=R("router-link"),v=R("v-select");return o(),l("div",_s,[us,s("div",ps,[s("div",ms,[s("div",vs,[U(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,[U(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",Vs,[s("div",Cs,[(o(!0),l(V,null,C(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,Gs))),128))])])):$("",!0),s("div",Ss,[s("div",qs,[s("div",Ds,[s("table",Ms,[Ns,s("tbody",Rs,[(o(!0),l(V,null,C(T.value,(t,y)=>(o(),l("tr",{key:t.id,class:"align-middle"},[s("td",Us,g((p.value.current_page-1)*20+(y+1)),1),s("td",Bs,g(t.task_group_name),1),s("td",Es,[s("a",{href:"#",onClick:os(c=>Q(t.id),["prevent"])},g(t.name),9,Is)]),s("td",Ps,[(o(!0),l(V,null,C(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",Qs,"\u672A\u8A2D\u5B9A"))]),s("td",Hs,[t.expired_at?(o(),l("span",Js,g(new Date(t.expired_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Ks,"\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=J(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.b2e184c7.js b/assets/Title.b2e184c7.js new file mode 100644 index 0000000..92cc0d8 --- /dev/null +++ b/assets/Title.b2e184c7.js @@ -0,0 +1 @@ +import{a as C}from"./assistant.00b0a3a6.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,D as v,M as B,N as D,o as V,B as q,c as x,F as N,q as R,x as M,Z as z,g as $,h as w}from"./index.6ce76e2d.js";const U={class:"mb-3"},E=e("label",{for:"addTitle",class:"form-label"},"\u7A31\u865F",-1),S={class:"mb-3"},j=e("label",{for:"titleLevel",class:"form-label"},"\u7B49\u7D1A",-1),O={class:"mb-3"},G=e("label",{for:"titleColor",class:"form-label"},"\u4EE3\u8868\u8272",-1),P={class:"mb-3"},Z=e("label",{for:"titleDescription",class:"form-label"},"\u63CF\u8FF0",-1),H=["disabled"],I={__name:"CreateTitleModal",props:{tempTitle:{type:Object,default(){return{}}}},emits:["createTitleMethod"],setup(k,{expose:g,emit:r}){const _=k,{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",U,[E,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,[Z,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,H)]),_:2},1536)]),_:1},512)}}},J={class:"about px-4 mt-4 position-relative"},K={class:"d-flex align-items-center justify-content-between"},Q=e("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7A31\u865F ",-1),W=e("hr",null,null,-1),X={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Y={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(k){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){M("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"?M("success","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F"):t.type==="\u5931\u6557"&&M("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",J,[e("header",K,[Q,e("button",{type:"button",class:"btn btn-primary",onClick:o[0]||(o[0]=a=>u("add"))}," \u65B0\u589E\u7A31\u865F ")]),W,e("div",X,[e("div",Y,[e("div",ee,[e("table",te,[se,e("tbody",oe,[(h(!0),x(N,null,R(b.value,a=>(h(),x("tr",{key:a.id,class:"align-middle"},[e("td",le,[e("span",{class:"d-inline-block rounded-pill",style:z([{width:"10px",height:"10px"},`background-color:${a.color_code}`])},null,4),$(" "+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(()=>[$(" \u7DE8\u8F2F"),ne]),_:2},1032,["to"]),e("button",{type:"button",class:"btn btn-sm btn-outline-gray me-2",onClick:p=>u("copy",a)},[$(" \u8907\u88FD"),de],8,ie)])]))),128))])])])])]),l(I,{ref_key:"createTitleModalComponentRef",ref:n,"temp-title":s.value,onCreateTitleMethod:T},null,8,["temp-title"])])}}};export{me as default}; diff --git a/assets/TitleDetail.1e88aae3.js b/assets/TitleDetail.1e88aae3.js new file mode 100644 index 0000000..af71a4b --- /dev/null +++ b/assets/TitleDetail.1e88aae3.js @@ -0,0 +1 @@ +import{t as L,r as m,o as $,B as R,j as q,a as U,e as E,f as w,b as e,h as _,i as p,w as F,v as N,M as j,N as S,l as z,u as O,z as V,c as G,A as o,x as v,g as P,D as k}from"./index.6ce76e2d.js";import{a as H}from"./assistant.00b0a3a6.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=L(A,"body"),r=m(""),b=m(null),t=m(null);$(()=>{b.value=new R(t.value.hModal),t.value.hModal.addEventListener("hidden.bs.modal",()=>{r.value=""})});const i=q(()=>{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(),E(j,{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),[[N,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:I})=>[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:!I.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.321b8e16.css b/assets/TrainingDetail.321b8e16.css new file mode 100644 index 0000000..9d03968 --- /dev/null +++ b/assets/TrainingDetail.321b8e16.css @@ -0,0 +1 @@ +.border-custom-color[data-v-11dc2c92]{border-color:#dfdfdf!important}[data-v-11dc2c92] .content img{max-width:100%;display:block}[data-v-11dc2c92] .content code,[data-v-11dc2c92] .content pre{background-color:#f0f0f0;padding:2px;border-radius:3px}[data-v-11dc2c92] .content pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}[data-v-11dc2c92] .content pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.custom-form-check-input[data-v-6a06aff4]{font-size:22px;transform:translateY(50%)}.form-check-input[data-v-6a06aff4]:checked{background-color:#fff;border-color:var(--bs-third);border-width:2px}.form-check-input:checked[type=radio][data-v-6a06aff4]{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-6a06aff4],.checked .btn-link[data-v-6a06aff4]{color:var(--bs-third)}.form-check-label[data-v-6a06aff4]:hover,.form-check-label:hover+.btn-link[data-v-6a06aff4]{color:var(--bs-third);cursor:pointer}.list-group[data-v-2afaa96b]{border-radius:0}.list-group-item[data-v-2afaa96b]{border:none}.list-group-item.active[data-v-2afaa96b],.list-group-item[data-v-2afaa96b]:hover{background-color:#edf0ef;color:#00251a}.border-dashed[data-v-9e4bad1b]{border:1px dashed #ced4da}.cursor-grabbing[data-v-9e4bad1b]{cursor:grabbing!important}.cursor-not-allowed[data-v-9e4bad1b]{cursor:not-allowed!important}.ghost[data-v-9e4bad1b]{opacity:.5;background:#c8ebfb}.drag[data-v-9e4bad1b]{height:74px!important;border:1px solid var(--bs-primary)!important;border-radius:var(--bs-border-radius)!important}input[type=radio][data-v-b05944c4]{visibility:hidden}input[data-v-deac5ff8]{padding-top:9px;padding-bottom:9px}.inputFile[data-v-deac5ff8]{position:relative}.inputFile[data-v-deac5ff8]::-webkit-file-upload-button{position:absolute;top:0;bottom:0;right:-13px;background-color:#3d5950;color:#fff}.inputFile[data-v-deac5ff8]:hover::-webkit-file-upload-button{background-color:#314740!important} diff --git a/assets/TrainingDetail.5d04ba99.js b/assets/TrainingDetail.5d04ba99.js new file mode 100644 index 0000000..e276a91 --- /dev/null +++ b/assets/TrainingDetail.5d04ba99.js @@ -0,0 +1,10 @@ +import{r as X,s as Pn,z as ue,a as G,c as W,A as H,f as $t,b as u,D as Ct,h as Tt,x as ct,_ as He,N as on,o as le,g as ne,F as jt,q as te,w as be,a5 as fn,i as _t,p as It,e as oe,M as Le,B as Ne,R as rn,S as sn,v as ya,a6 as La,m as Tn,E as Re,a7 as Na,a8 as Fa,a0 as ja,K as Ua,T as Va,Y as kt,l as ba,j as Sa,X as Ae,a3 as ta,C as Ga,a2 as Ba,Q as ea,L as Ka,d as na}from"./index.6ce76e2d.js";import{a as ln}from"./training.dc983b95.js";import{f as Hn,a as Wn}from"./date.4fb02a7a.js";import{_ as Ha}from"./Editor.2f2998f9.js";import{b as Wa}from"./bsTab.5232f6de.js";import"./tab.979b672c.js";const Xa={class:"rounded-4 border border-1 border-custom-color p-4"},Ya={class:"row"},ka={class:"col-md-6"},za={class:"mb-3"},Ja=u("label",{for:"title",class:"form-label"},"\u6D3B\u52D5\u540D\u7A31",-1),Za={class:"row"},Qa={class:"col-md-6"},_a={class:"mb-3"},qa=u("label",{for:"start_at",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),to={class:"col-md-6"},eo={class:"mb-3"},no=u("label",{for:"end_at",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),ao={class:"d-flex justify-content-end mt-3"},oo=["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,d=>{d.id&&(t.value=d.id,o.value={name:d.name,start_at:d.start_at,end_at:d.end_at,content:d.content})},{deep:!0});const i=X(null),l=()=>{i.value.resetForm(),e("close")},f=async()=>{const d=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),ct("success",`\u884C\u4E8B\u66C6${d}\u6210\u529F`,`${o.value.name}\u5DF2\u7D93${d}\u6210\u529F`),e("refresh")}catch(v){const h=v.response.data;ct("danger",`\u884C\u4E8B\u66C6${d}\u5931\u6557`,`${h.statusCode}: ${h.message}`)}l()};return(d,v)=>{const h=ue("Field"),p=ue("ErrorMessage"),g=ue("VForm");return G(),W("div",Xa,[H(g,{ref_key:"formRef",ref:i,onSubmit:f},{default:$t(({errors:m,meta:y})=>[u("div",Ya,[u("div",ka,[u("div",za,[Ja,H(h,{id:"title",name:"title",label:"\u57F9\u8A13\u73ED\u540D\u7A31",type:"text",class:Ct([{"is-invalid":m.title},"form-control"]),modelValue:o.value.name,"onUpdate:modelValue":v[0]||(v[0]=x=>o.value.name=x),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required"},null,8,["class","modelValue"]),H(p,{name:"title",class:"invalid-feedback"})])])]),u("div",Za,[u("div",Qa,[u("div",_a,[qa,H(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]=x=>o.value.start_at=x),class:Ct([{"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"]),H(p,{name:"start_at",class:"invalid-feedback"})])]),u("div",to,[u("div",eo,[no,H(h,{id:"end_at",name:"end_at",label:"\u7D50\u675F\u6642\u9593",type:"datetime-local",class:Ct([{"is-invalid":m.end_at},"form-control"]),modelValue:o.value.end_at,"onUpdate:modelValue":v[2]||(v[2]=x=>o.value.end_at=x),rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["class","modelValue"]),H(p,{name:"end_at",class:"invalid-feedback"})])])]),u("div",null,[H(Ha,{ref_key:"editorComponentRef",ref:c,content:o.value.content},null,8,["content"])]),u("div",ao,[u("button",{type:"button",class:"btn btn-outline-secondary me-2",onClick:l}," \u53D6\u6D88 "),u("button",{type:"submit",class:"btn btn-primary",disabled:!y.valid},Tt(t.value!==""?"\u66F4\u65B0":"\u78BA\u8A8D\u65B0\u589E"),9,oo)])]),_:1},512)])}}};const We=r=>(rn("data-v-11dc2c92"),r=r(),sn(),r),ro={class:"text-end mb-3"},so=We(()=>u("span",{class:"material-icons align-bottom"}," add ",-1)),io={class:"mb-5"},lo={class:"table-responsive"},co={class:"table custom-table-style mb-0"},uo=We(()=>u("thead",null,[u("tr",{class:"text-nowrap bg-light border-0"},[u("th",null,"\u6A19\u984C"),u("th",{width:"150"}),u("th",{width:"200"},"\u6D3B\u52D5\u6642\u9593"),u("th",{width:"150"})])],-1)),fo={class:"text-nowrap"},vo=["onClick"],ho={class:"mt-2"},po={key:0,colspan:"4",class:"border-0"},mo=["onClick"],go=["onClick"],yo=We(()=>u("p",{class:"text-dark"},"\u6D3B\u52D5\u6A19\u984C",-1)),bo={class:"text-primary"},So={class:"d-flex mt-4"},xo={class:"col-md-6"},Eo=We(()=>u("p",{class:"text-dark"},"\u6D3B\u52D5\u958B\u59CB\u6642\u9593",-1)),Co={class:"text-primary"},To={class:"col-md-6"},Oo=We(()=>u("p",{class:"text-dark"},"\u6D3B\u52D5\u7D50\u675F\u6642\u9593",-1)),$o={class:"text-primary"},Io={class:"mt-3"},Do=We(()=>u("p",{class:"text-dark"},"\u6D3B\u52D5\u5167\u5BB9\u63CF\u8FF0",-1)),wo=["innerHTML"],Po={__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),f=X(null),d=X(null),v=X(null);le(()=>{d.value=new Ne(l.value.hModal),v.value=new Ne(f.value.hModal)});const p=()=>{d.value.show()};e({openModal:p,hideModal:()=>{d.value.hide(),i.value={}}});const m=async()=>{const B=t.show(),{calendar:D}=await s(a.trainingId);o.value=D,B.hide()};le(()=>{m()});const y=async B=>{const D=t.show(),{calendar:w}=await n(a.trainingId,B);i.value=w,D.hide()},x=async B=>{await y(B),p()},S=X({name:"",id:""}),b=async B=>{const D=t.show();try{await c(a.trainingId,B),ct("success","\u522A\u9664\u6210\u529F",`${S.value.name}\u5DF2\u7D93\u522A\u9664\u6210\u529F`),m()}catch(w){const Y=w.response.data;ct("danger","\u522A\u9664\u5931\u6557",`${Y.statusCode}: ${S.value.name}\u522A\u9664\u5931\u6557\uFF5C${Y.message}`)}D.hide(),v.value.hide()},$=B=>{v.value.show(),S.value=o.value.find(D=>D.id===B)},E=X(""),A=X(""),N=X({});function O(B){const D=new Date(B),w=D.getFullYear(),Y=(D.getMonth()+1).toString().padStart(2,"0"),V=D.getDate().toString().padStart(2,"0"),Q=D.getHours().toString().padStart(2,"0"),yt=D.getMinutes().toString().padStart(2,"0");return`${w}-${Y}-${V}T${Q}:${yt}`}const M=async B=>{await y(B),N.value={id:B,name:i.value.name,start_at:O(i.value.start_at),end_at:O(i.value.end_at),content:i.value.content}},R=(B="",D="")=>{E.value=B,A.value=D,B==="edit"?M(D):(N.value={name:"",start_at:"",end_at:"",content:""},setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight)},300))};return(B,D)=>(G(),W(jt,null,[u("div",ro,[u("button",{type:"button",class:"btn btn-dark",onClick:D[0]||(D[0]=w=>R("create"))},[so,ne(" \u65B0\u589E\u6D3B\u52D5 ")])]),u("div",io,[u("div",lo,[u("table",co,[uo,u("tbody",fo,[(G(!0),W(jt,null,te(o.value,w=>(G(),W("tr",{class:"align-middle",key:w.id},[be(u("td",null,Tt(w.name),513),[[fn,!(E.value==="edit"&&A.value===w.id)]]),be(u("td",null,[u("button",{type:"button",class:"btn btn-link link-third text-decoration-none fw-bold",onClick:Y=>x(w.id)},"\u8A73\u7D30\u5167\u5BB9",8,vo)],512),[[fn,!(E.value==="edit"&&A.value===w.id)]]),be(u("td",null,[u("p",ho,Tt(_t(Wn)(w.start_at)),1),u("p",null,Tt(_t(Wn)(w.end_at)),1)],512),[[fn,!(E.value==="edit"&&A.value===w.id)]]),E.value==="edit"&&A.value===w.id?(G(),W("td",po,[H(aa,{id:r.trainingId,"edit-data":N.value,onRefresh:m,onClose:R},null,8,["id","edit-data"])])):It("",!0),be(u("td",null,[u("button",{type:"button",class:"btn btn-outline-dark me-2",onClick:Y=>R("edit",w.id)},"\u7DE8\u8F2F",8,mo),u("button",{type:"button",class:"btn btn-outline-danger",onClick:Y=>$(w.id)},"\u522A\u9664",8,go)],512),[[fn,!(E.value==="edit"&&A.value===w.id)]])]))),128))])])]),E.value==="create"?(G(),oe(aa,{key:0,id:r.trainingId,"edit-data":{},onRefresh:m,onClose:R},null,8,["id"])):It("",!0)]),H(Le,{ref_key:"modalDetailRef",ref:l,title:"",modalSize:"modal-lg","has-footer":!1,classContent:"rounded-4 px-2",classList:"pb-0"},{body:$t(()=>[u("div",null,[yo,u("p",bo,Tt(i.value.name),1)]),u("div",So,[u("div",xo,[Eo,u("p",Co,Tt(new Date(i.value.start_at).toLocaleString("sv-SE")),1)]),u("div",To,[Oo,u("p",$o,Tt(new Date(i.value.end_at).toLocaleString("sv-SE")),1)])]),u("div",Io,[Do,u("div",{class:"content text-primary",innerHTML:i.value.content},null,8,wo)])]),_:1},512),H(Le,{ref_key:"modalDeleteRef",ref:f,title:`\u522A\u9664\u884C\u4E8B\u66C6\u6D3B\u52D5 - ${S.value.name}`,modalSize:"modal-md",hasFooter:!0,classList:"bg-danger text-white"},{body:$t(()=>[ne(" \u78BA\u8A8D\u8981\u522A\u9664 "),u("b",null,Tt(S.value.name),1),ne(" \u55CE\uFF1F ")]),footer:$t(()=>[u("button",{type:"button",class:"btn btn-secondary",onClick:D[1]||(D[1]=w=>v.value.hide())},"\u53D6\u6D88"),u("button",{type:"button",class:"btn btn-danger",onClick:D[2]||(D[2]=w=>b(S.value.id))},"\u522A\u9664")]),_:1},8,["title"])],64))}},Ao=He(Po,[["__scopeId","data-v-11dc2c92"]]);function oa(r){return typeof r=="function"?r():_t(r)}const ra=()=>{};function Ro(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 Mo=r=>r();function Lo(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((f,d)=>{n=e.rejectOnCancel?d:f,l&&!s&&(s=setTimeout(()=>{a&&c(a),s=null,f(o())},l)),a=setTimeout(()=>{s&&c(s),s=null,f(o())},i)})}}function No(r,e,a={}){const{eventFilter:s=Mo,...n}=a;return Pn(r,Ro(s,e),n)}function Fo(r,e,a={}){const{debounce:s=0,maxWait:n=void 0,...c}=a;return No(r,e,{...c,eventFilter:Lo(s,{maxWait:n})})}const Xe=r=>(rn("data-v-6a06aff4"),r=r(),sn(),r),jo=Xe(()=>u("h4",{class:"text-dark mb-3"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u8A2D\u5B9A",-1)),Uo={key:0,class:"text-primary"},Vo=Xe(()=>u("span",{class:"material-icons align-middle"},"open_in_new",-1)),Go={class:"row"},Bo={class:"col-lg-4 col-md-7"},Ko={class:"form-floating mb-2"},Ho=Xe(()=>u("label",{for:"training-name"},"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),Wo={class:"card rounded-4"},Xo={class:"card-body"},Yo=["id","value"],ko={class:"d-flex align-items-center"},zo=["for"],Jo=Xe(()=>u("span",{class:"material-icons align-middle"},"open_in_new",-1)),Zo={class:"mb-0 text-dark",style:{"font-size":"14px"}},Qo={key:0},_o={key:1,class:"text-muted"},qo={key:0},tr={class:"my-5"},er={class:"mb-3"},nr={class:"table custom-table-style mb-0"},ar=Xe(()=>u("thead",null,[u("tr",{class:"text-nowrap bg-light border-0"},[u("th",null,"\u6A19\u984C"),u("th",null,"\u4EFB\u52D9\u7FA4\u7D44"),u("th",null,"\u5F8C\u53F0\u9023\u7D50"),u("th",null,"\u524D\u53F0\u9023\u7D50")])],-1)),or=Xe(()=>u("td",null,"-",-1)),rr={__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(""),f=X({total:0,total_page:0,current_page:1}),d=X(""),v=async({keyword:S,page:b}={})=>{const $=t.show();o.value=!0;try{const{user_groups:E,pagination:A}=await s({keyword:S,page:b});b===1?(i.value=[],i.value=E):i.value=[...i.value,...E],f.value=A}catch{ct("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557")}finally{$.hide(),o.value=!1}},h=X([]),p=X(!1),g=async()=>{p.value=!0;const S=t.show();try{const{tasks:b}=await n(a.trainingId);h.value=b}catch{ct("danger","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557")}finally{S.hide(),p.value=!1}};le(()=>{v(),g()}),Pn(()=>a.userGroups,S=>{l.value=S[0].id},{immediate:!0});const m=X(null);le(()=>{const S=m.value;S.addEventListener("scroll",b=>{if(b.target.clientHeight+b.target.scrollTop>S.scrollHeight-1){if(o.value||f.value.current_page===f.value.total_page)return;v({keyword:d.value,page:f.value.current_page+1})}})}),Fo(d,()=>{v({keyword:d.value,page:1})},{debounce:1e3,maxWait:1300});const x=async()=>{const S=[];S.push(l.value);try{await c(a.trainingId,{user_group_ids:S}),ct("success","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F"),g(),e("refresh")}catch{ct("danger","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557")}};return(S,b)=>{const $=ue("router-link");return G(),W(jt,null,[u("div",null,[jo,a.userGroups.length>0?(G(),W("p",Uo,[ne(" \u76EE\u524D\u5DF2\u9078\u64C7\u7684\u4F7F\u7528\u8005\u7FA4\u7D44\uFF1A"),H($,{target:"_blank",to:{name:"UserGroupDetail",params:{id:a.userGroups[0].id}},class:"btn btn-link p-0 ms-1"},{default:$t(()=>[u("b",null,Tt(a.userGroups[0].name),1),Vo]),_:1},8,["to"])])):It("",!0),u("div",Go,[u("div",Bo,[u("div",Ko,[be(u("input",{type:"text",class:"form-control",id:"training-name",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":b[0]||(b[0]=E=>d.value=E)},null,512),[[ya,d.value]]),Ho])])])]),u("div",Wo,[u("div",Xo,[u("ul",{class:"list-group border-bottom mb-3 overflow-y-scroll",ref_key:"userGroupListRef",ref:m,style:{"max-height":"500px"}},[(G(!0),W(jt,null,te(i.value,E=>(G(),W("li",{class:"list-group-item border-0",key:E.id},[u("div",{class:Ct(["form-check",{checked:l.value===E.id}])},[be(u("input",{type:"radio",class:"form-check-input custom-form-check-input",name:"user-group",id:E.id,"onUpdate:modelValue":b[1]||(b[1]=A=>l.value=A),value:E.id},null,8,Yo),[[La,l.value]]),u("div",ko,[u("label",{for:E.id,class:"form-check-label"},Tt(E.name),9,zo),H($,{target:"_blank",to:{name:"UserGroupDetail",params:{id:E.id}},class:"btn btn-link p-0 ms-1"},{default:$t(()=>[Jo]),_:2},1032,["to"])]),u("p",Zo,[E.task_groups.length>0?(G(),W("span",Qo,"\u5DF2\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")):(G(),W("span",_o,"\u76EE\u524D\u672A\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")),(G(!0),W(jt,null,te(E.task_groups,(A,N)=>(G(),W("span",{key:A.id},[ne(" \u300C"+Tt(A.name)+" \u300D ",1),N(G(),W("tr",{class:"align-middle",key:E.id},[u("td",null,Tt(E.name),1),u("td",null,Tt(E.task_group_name),1),u("td",null,[H($,{target:"_blank",to:{name:"TaskDetail",params:{id:E.id}},class:"btn btn-link text-decoration-none link-third fw-bold"},{default:$t(()=>[ne(" \u9023\u7D50 ")]),_:2},1032,["to"])]),or]))),128))])])])],64)}}},sr=He(rr,[["__scopeId","data-v-6a06aff4"]]);const ir={key:0,class:"text-dark mb-4"},lr={class:"row"},cr={class:"col-md-3"},dr={class:"list-group"},ur=["href","onClick"],fr={class:"material-icons-outlined me-2"},vr={class:"col-md-9"},hr={class:"tab-content"},pr={__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=Tn(a.tabList),n=X(1),c=Tn([]),t=o=>{o.element.show(),n.value=o.id};return le(()=>{Wa(c,s)}),e({tabShow:t}),(o,i)=>(G(),W(jt,null,[a.title?(G(),W("h4",ir,Tt(a.title),1)):It("",!0),u("div",lr,[u("div",cr,[u("div",dr,[(G(!0),W(jt,null,te(s,l=>(G(),W("a",{key:l.id,href:`#${l.name}`,ref_for:!0,ref:f=>c.push(f),class:Ct(["list-group-item d-flex align-items-center mb-1",n.value===l.id?"active":""]),onClick:Re(()=>{t(l)},["prevent"])},[u("span",fr,Tt(l.cht_icon),1),ne(" "+Tt(l.cht_name),1)],10,ur))),128))])]),u("div",vr,[u("div",hr,[Na(o.$slots,"body",{nowId:n.value},void 0,!0)])])])],64))}},mr=He(pr,[["__scopeId","data-v-2afaa96b"]]);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 xe(r){for(var e=1;e=0)&&(a[n]=r[n]);return a}function br(r,e){if(r==null)return{};var a=yr(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 Sr(r){return xr(r)||Er(r)||Cr(r)||Tr()}function xr(r){if(Array.isArray(r))return Xn(r)}function Er(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Cr(r,e){if(!!r){if(typeof r=="string")return Xn(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 Xn(r,e)}}function Xn(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 Ir(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function me(r,e,a,s){if(r){a=a||document;do{if(e!=null&&(e[0]===">"?r.parentNode===a&&On(r,e):On(r,e))||s&&r===a)return r;if(r===a)break}while(r=Ir(r))}return null}var la=/\s+/g;function Vt(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 Z(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 Me(r,e){var a="";if(typeof r=="string")a=r;else do{var s=Z(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===Se())break;s=Ie(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=br(s,Lr);dn.pluginEvent.bind(lt)(e,a,xe({dragEl:K,parentEl:Gt,ghostEl:mt,rootEl:Ft,nextEl:Pe,lastDownEl:Sn,cloneEl:Bt,cloneHidden:$e,dragStarted:Ze,putSortable:Qt,activeSortable:lt.active,originalEvent:n,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Oe,hideGhostForTarget:Pa,unhideGhostForTarget:Aa,cloneNowHidden:function(){$e=!0},cloneNowShown:function(){$e=!1},dispatchSortableEvent:function(o){ae({sortable:a,name:o,originalEvent:n})}},c))};function ae(r){Je(xe({putSortable:Qt,cloneEl:Bt,targetEl:K,rootEl:Ft,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Oe},r))}var K,Gt,mt,Ft,Pe,Sn,Bt,$e,Be,de,en,Oe,vn,Qt,Ge=!1,$n=!1,In=[],De,he,Fn,jn,fa,va,Ze,Ue,nn,an=!1,hn=!1,xn,qt,Un=[],Yn=!1,Dn=[],An=typeof document<"u",pn=Ea,ha=cn||Te?"cssFloat":"float",Nr=An&&!$r&&!Ea&&"draggable"in document.createElement("div"),Ia=function(){if(!!An){if(Te)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Da=function(e,a){var s=Z(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&&Z(c),i=t&&Z(t),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+Ut(c).width,f=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Ut(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 d=o.float==="left"?"left":"right";return t&&(i.clear==="both"||i.clear===d)?"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+f>n)?"vertical":"horizontal"},Fr=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},jr=function(e,a){var s;return In.some(function(n){var c=n[ee].options.emptyInsertThreshold;if(!(!c||Zn(n))){var t=Ut(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,f){var d=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(c==null&&(t||d))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,f),t)(o,i,l,f);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(){!Ia&&mt&&Z(mt,"display","none")},Aa=function(){!Ia&&mt&&Z(mt,"display","")};An&&document.addEventListener("click",function(r){if($n)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),$n=!1,!1},!0);var we=function(e){if(K){e=e.touches?e.touches[0]:e;var a=jr(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)}}},Ur=function(e){K&&K.parentNode[ee]._isOutsideThisEl(e.target)};function lt(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=ve({},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 Da(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:lt.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:Nr,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)),In.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ve(this,Ar())}lt.prototype={constructor:lt,_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,f=n.filter;if(Yr(s),!K&&!(/mousedown|pointerdown/.test(t)&&e.button!==0||n.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&qe&&i&&i.tagName.toUpperCase()==="SELECT")&&(i=me(i,n.draggable,s,!1),!(i&&i.animated)&&Sn!==i)){if(Be=Kt(i),en=Kt(i,n.draggable),typeof f=="function"){if(f.call(this,e,i,this)){ae({sortable:a,rootEl:l,name:"filter",targetEl:i,toEl:s,fromEl:s}),se("filter",a,{evt:e}),c&&e.cancelable&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(d){if(d=me(l,d.trim(),s,!1),d)return ae({sortable:a,rootEl:d,name:"filter",targetEl:i,fromEl:s,toEl:s}),se("filter",a,{evt:e}),!0}),f)){c&&e.cancelable&&e.preventDefault();return}n.handle&&!me(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=Ut(s);if(Ft=c,K=s,Gt=K.parentNode,Pe=K.nextSibling,Sn=s,vn=t.group,lt.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(se("delayEnded",n,{evt:e}),lt.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!ia&&n.nativeDraggable&&(K.draggable=!0),n._triggerDragStart(e,a),ae({sortable:n,name:"choose",originalEvent:e}),Vt(K,t.chosenClass,!0)},t.ignore.split(",").forEach(function(f){Ta(K,f.trim(),Vn)}),St(o,"dragover",we),St(o,"mousemove",we),St(o,"touchmove",we),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),se("delayStart",this,{evt:e}),t.delay&&(!t.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(cn||Te))){if(lt.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){se("dragStarted",this,{evt:a}),this.nativeDraggable&&St(document,"dragover",Ur);var s=this.options;!e&&Vt(K,s.dragClass,!1),Vt(K,s.ghostClass,!0),lt.active=this,e&&this._appendGhost(),ae({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Pa();for(var e=document.elementFromPoint(he.clientX,he.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(he.clientX,he.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:he.clientX,clientY:he.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&&Me(mt,!0),o=mt&&t&&t.a,i=mt&&t&&t.d,l=pn&&qt&&da(qt),f=(c.clientX-De.clientX+n.x)/(o||1)+(l?l[0]-Un[0]:0)/(o||1),d=(c.clientY-De.clientY+n.y)/(i||1)+(l?l[1]-Un[1]:0)/(i||1);if(!lt.active&&!Ge){if(s&&Math.max(Math.abs(c.clientX-this._lastX),Math.abs(c.clientY-this._lastY))=0&&(ae({rootEl:Gt,name:"add",toEl:Gt,fromEl:Ft,originalEvent:e}),ae({sortable:this,name:"remove",toEl:Gt,originalEvent:e}),ae({rootEl:Gt,name:"sort",toEl:Gt,fromEl:Ft,originalEvent:e}),ae({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),Qt&&Qt.save()):de!==Be&&de>=0&&(ae({sortable:this,name:"update",toEl:Gt,originalEvent:e}),ae({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),lt.active&&((de==null||de===-1)&&(de=Be,Oe=en),ae({sortable:this,name:"end",toEl:Gt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){se("nulling",this),Ft=K=Gt=mt=Pe=Bt=Sn=$e=De=he=Ze=de=Oe=Be=en=Ue=nn=Qt=vn=lt.dragged=lt.ghost=lt.clone=lt.active=null,Dn.forEach(function(e){e.checked=!0}),Dn.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),Vr(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 Hr(r,e,a,s,n,c,t,o){var i=s?r.clientY:r.clientX,l=s?a.height:a.width,f=s?a.top:a.left,d=s?a.bottom:a.right,v=!1;if(!t){if(o&&xnf+l*c/2:id-xn)return-nn}else if(i>f+l*(1-n)/2&&id-l*c/2)?i>f+l/2?1:-1:0}function Wr(r){return Kt(K)1&&(vt.forEach(function(o){c.addAnimationState({target:o,rect:ie?Ut(o):t}),Ln(o),o.fromRect=t,s.removeAnimationState(o)}),ie=!1,Qr(!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(),ke=!1,l.animation&&vt.length>1&&(ie||!n&&!t.options.sort&&!i)){var f=Ut(Nt,!1,!0,!0);vt.forEach(function(v){v!==Nt&&(ua(v,f),o.appendChild(v))}),ie=!0}if(!n)if(ie||yn(),vt.length>1){var d=gn;t._showClone(s),t.options.animation&&!gn&&d&&ce.forEach(function(v){t.addAnimationState({target:v,rect:ze}),v.fromRect=ze,v.thisAnimationDuration=null})}else t._showClone(s)}},dragOverAnimationCapture:function(a){var s=a.dragRect,n=a.isOwner,c=a.activeSortable;if(vt.forEach(function(o){o.thisAnimationDuration=null}),c.options.animation&&!n&&c.multiDrag.isMultiDrag){ze=ve({},s);var t=Me(Nt,!0);ze.top-=t.f,ze.left-=t.e}},dragOverAnimationComplete:function(){ie&&(ie=!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,f=l||this.sortable;if(!!s){var d=this.options,v=c.children;if(!Ve)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Vt(Nt,d.selectedClass,!~vt.indexOf(Nt)),~vt.indexOf(Nt))vt.splice(vt.indexOf(Nt),1),Ye=null,Je({sortable:t,rootEl:n,name:"deselect",targetEl:Nt,originalEvt:s});else{if(vt.push(Nt),Je({sortable:t,rootEl:n,name:"select",targetEl:Nt,originalEvt:s}),s.shiftKey&&Ye&&t.el.contains(Ye)){var h=Kt(Ye),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=Ut(Nt),x=Kt(Nt,":not(."+this.options.selectedClass+")");if(!ke&&d.animation&&(Nt.thisAnimationDuration=null),f.captureAnimationState(),!ke&&(d.animation&&(Nt.fromRect=y,vt.forEach(function(b){if(b.thisAnimationDuration=null,b!==Nt){var $=ie?Ut(b):y;b.fromRect=$,f.addAnimationState({target:b,rect:$})}})),yn(),vt.forEach(function(b){v[x]?c.insertBefore(b,v[x]):c.appendChild(b),x++}),i===Kt(Nt))){var S=!1;vt.forEach(function(b){if(b.sortableIndex!==Kt(b)){S=!0;return}}),S&&o("update")}vt.forEach(function(b){Ln(b)}),f.animateAll()}pe=f}(n===c||l&&l.lastPutMode!=="clone")&&ce.forEach(function(b){b.parentNode&&b.parentNode.removeChild(b)})}},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)&&pe===this.sortable&&!(a&&me(a.target,this.options.draggable,this.sortable.el,!1))&&!(a&&a.button!==0))for(;vt.length;){var s=vt[0];Vt(s,this.options.selectedClass,!1),vt.shift(),Je({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)}},ve(r,{pluginName:"multiDrag",utils:{select:function(a){var s=a.parentNode[ee];!s||!s.options.multiDrag||~vt.indexOf(a)||(pe&&pe!==s&&(pe.multiDrag._deselectMultiDrag(),pe=s),Vt(a,s.options.selectedClass,!0),vt.push(a))},deselect:function(a){var s=a.parentNode[ee],n=vt.indexOf(a);!s||!s.options.multiDrag||!~n||(Vt(a,s.options.selectedClass,!1),vt.splice(n,1))}},eventProperties:function(){var a=this,s=[],n=[];return vt.forEach(function(c){s.push({multiDragElement:c,index:c.sortableIndex});var t;ie&&c!==Nt?t=-1:ie?t=Kt(c,":not(."+a.options.selectedClass+")"):t=Kt(c),n.push({multiDragElement:c,index:t})}),{items:Sr(vt),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 Qr(r,e){vt.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(){vt.forEach(function(r){r!==Nt&&r.parentNode&&r.parentNode.removeChild(r)})}lt.mount(new kr);lt.mount(qn,_n);const _r=Object.freeze(Object.defineProperty({__proto__:null,default:lt,MultiDrag:Zr,Sortable:lt,Swap:zr},Symbol.toStringTag,{value:"Module"})),qr=Fa(_r);(function(r,e){(function(s,n){r.exports=n(ja,qr)})(typeof self<"u"?self:Ua,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 f in o)t.d(l,f,function(d){return o[d]}.bind(null,f));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,f){if(o(i),l===void 0)return i;switch(f){case 0:return function(){return i.call(l)};case 1:return function(d){return i.call(l,d)};case 2:return function(d,v){return i.call(l,d,v)};case 3:return function(d,v,h){return i.call(l,d,v,h)}}return function(){return i.apply(l,arguments)}}},"057f":function(n,c,t){var o=t("fc6a"),i=t("241c").f,l={}.toString,f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(v){try{return i(v)}catch{return f.slice()}};n.exports.f=function(h){return f&&l.call(h)=="[object Window]"?d(h):i(o(h))}},"06cf":function(n,c,t){var o=t("83ab"),i=t("d1e7"),l=t("5c6c"),f=t("fc6a"),d=t("c04e"),v=t("5135"),h=t("0cfb"),p=Object.getOwnPropertyDescriptor;c.f=o?p:function(m,y){if(m=f(m),y=d(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"),f=t("ae40"),d=l("reduce"),v=f("reduce",{1:0});o({target:"Array",proto:!0,forced:!d||!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,f){var d=l.exec;if(typeof d=="function"){var v=d.call(l,f);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,f)}},"159b":function(n,c,t){var o=t("da84"),i=t("fdbc"),l=t("17c2"),f=t("9112");for(var d in i){var v=o[d],h=v&&v.prototype;if(h&&h.forEach!==l)try{f(h,"forEach",l)}catch{h.forEach=l}}},"17c2":function(n,c,t){var o=t("b727").forEach,i=t("a640"),l=t("ae40"),f=i("forEach"),d=l("forEach");n.exports=!f||!d?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 f=0,d={next:function(){return{done:!!f++}},return:function(){l=!0}};d[i]=function(){return this},Array.from(d,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"),f=i("species");n.exports=function(d){return l>=51||!o(function(){var v=[],h=v.constructor={};return h[f]=function(){return{foo:1}},v[d](Boolean).foo!==1})}},"23cb":function(n,c,t){var o=t("a691"),i=Math.max,l=Math.min;n.exports=function(f,d){var v=o(f);return v<0?i(v+d,0):l(v,d)}},"23e7":function(n,c,t){var o=t("da84"),i=t("06cf").f,l=t("9112"),f=t("6eeb"),d=t("ce4e"),v=t("e893"),h=t("94ca");n.exports=function(p,g){var m=p.target,y=p.global,x=p.stat,S,b,$,E,A,N;if(y?b=o:x?b=o[m]||d(m,{}):b=(o[m]||{}).prototype,b)for($ in g){if(A=g[$],p.noTargetGet?(N=i(b,$),E=N&&N.value):E=b[$],S=h(y?$:m+(x?".":"#")+$,p.forced),!S&&E!==void 0){if(typeof A==typeof E)continue;v(A,E)}(p.sham||E&&E.sham)&&l(A,"sham",!0),f(b,$,A,p)}}},"241c":function(n,c,t){var o=t("ca84"),i=t("7839"),l=i.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(d){return o(d,l)}},"25f0":function(n,c,t){var o=t("6eeb"),i=t("825a"),l=t("d039"),f=t("ad6d"),d="toString",v=RegExp.prototype,h=v[d],p=l(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),g=h.name!=d;(p||g)&&o(RegExp.prototype,d,function(){var y=i(this),x=String(y.source),S=y.flags,b=String(S===void 0&&y instanceof RegExp&&!("flags"in v)?f.call(y):S);return"/"+x+"/"+b},{unsafe:!0})},"2ca0":function(n,c,t){var o=t("23e7"),i=t("06cf").f,l=t("50c4"),f=t("5a34"),d=t("1d80"),v=t("ab13"),h=t("c430"),p="".startsWith,g=Math.min,m=v("startsWith"),y=!h&&!m&&!!function(){var x=i(String.prototype,"startsWith");return x&&!x.writable}();o({target:"String",proto:!0,forced:!y&&!m},{startsWith:function(S){var b=String(d(this));f(S);var $=l(g(arguments.length>1?arguments[1]:void 0,b.length)),E=String(S);return p?p.call(b,E,$):b.slice($,$+E.length)===E}})},"2d00":function(n,c,t){var o=t("da84"),i=t("342f"),l=o.process,f=l&&l.versions,d=f&&f.v8,v,h;d?(v=d.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"),f=l("iterator");n.exports=function(d){if(d!=null)return d[f]||d["@@iterator"]||i[o(d)]}},"37e8":function(n,c,t){var o=t("83ab"),i=t("9bf2"),l=t("825a"),f=t("df75");n.exports=o?Object.defineProperties:function(v,h){l(v);for(var p=f(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"),f="String Iterator",d=i.set,v=i.getterFor(f);l(String,"String",function(h){d(this,{type:f,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(f){return i(f)=="String"?l.call(f,""):Object(f)}:Object},"44d2":function(n,c,t){var o=t("b622"),i=t("7c73"),l=t("9bf2"),f=o("unscopables"),d=Array.prototype;d[f]==null&&l.f(d,f,{configurable:!0,value:i(null)}),n.exports=function(v){d[f][v]=!0}},"44e7":function(n,c,t){var o=t("861d"),i=t("c6b6"),l=t("b622"),f=l("match");n.exports=function(d){var v;return o(d)&&((v=d[f])!==void 0?!!v:i(d)=="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"),f=function(d){return function(v,h,p){var g=o(v),m=i(g.length),y=l(p,m),x;if(d&&h!=h){for(;m>y;)if(x=g[y++],x!=x)return!0}else for(;m>y;y++)if((d||y in g)&&g[y]===h)return d||y||0;return!d&&-1}};n.exports={includes:f(!0),indexOf:f(!1)}},"4de4":function(n,c,t){var o=t("23e7"),i=t("b727").filter,l=t("1dde"),f=t("ae40"),d=l("filter"),v=f("filter");o({target:"Array",proto:!0,forced:!d||!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"),f=t("e95a"),d=t("50c4"),v=t("8418"),h=t("35a1");n.exports=function(g){var m=i(g),y=typeof this=="function"?this:Array,x=arguments.length,S=x>1?arguments[1]:void 0,b=S!==void 0,$=h(m),E=0,A,N,O,M,R,B;if(b&&(S=o(S,x>2?arguments[2]:void 0,2)),$!=null&&!(y==Array&&f($)))for(M=$.call(m),R=M.next,N=new y;!(O=R.call(M)).done;E++)B=b?l(M,S,[O.value,E],!0):O.value,v(N,E,B);else for(A=d(m.length),N=new y(A);A>E;E++)B=b?S(m[E],E):m[E],v(N,E,B);return N.length=E,N}},"4fad":function(n,c,t){var o=t("23e7"),i=t("6f53").entries;o({target:"Object",stat:!0},{entries:function(f){return i(f)}})},"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"),f=t("50c4"),d=t("a691"),v=t("1d80"),h=t("8aa5"),p=t("14c3"),g=Math.max,m=Math.min,y=Math.floor,x=/\$([$&'`]|\d\d?|<[^>]*>)/g,S=/\$([$&'`]|\d\d?)/g,b=function($){return $===void 0?$:String($)};o("replace",2,function($,E,A,N){var O=N.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,M=N.REPLACE_KEEPS_$0,R=O?"$":"$0";return[function(w,Y){var V=v(this),Q=w==null?void 0:w[$];return Q!==void 0?Q.call(w,V,Y):E.call(String(V),w,Y)},function(D,w){if(!O&&M||typeof w=="string"&&w.indexOf(R)===-1){var Y=A(E,D,this,w);if(Y.done)return Y.value}var V=i(D),Q=String(this),yt=typeof w=="function";yt||(w=String(w));var _=V.global;if(_){var U=V.unicode;V.lastIndex=0}for(var rt=[];;){var pt=p(V,Q);if(pt===null||(rt.push(pt),!_))break;var Dt=String(pt[0]);Dt===""&&(V.lastIndex=h(Q,f(V.lastIndex),U))}for(var ht="",xt=0,wt=0;wt=xt&&(ht+=Q.slice(xt,dt)+zt,xt=dt+Pt.length)}return ht+Q.slice(xt)}];function B(D,w,Y,V,Q,yt){var _=Y+D.length,U=V.length,rt=S;return Q!==void 0&&(Q=l(Q),rt=x),E.call(yt,rt,function(pt,Dt){var ht;switch(Dt.charAt(0)){case"$":return"$";case"&":return D;case"`":return w.slice(0,Y);case"'":return w.slice(_);case"<":ht=Q[Dt.slice(1,-1)];break;default:var xt=+Dt;if(xt===0)return pt;if(xt>U){var wt=y(xt/10);return wt===0?pt:wt<=U?V[wt-1]===void 0?Dt.charAt(1):V[wt-1]+Dt.charAt(1):pt}ht=V[xt-1]}return ht===void 0?"":ht})}})},5692:function(n,c,t){var o=t("c430"),i=t("c6cd");(n.exports=function(l,f){return i[l]||(i[l]=f!==void 0?f:{})})("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"),f=t("825a");n.exports=o("Reflect","ownKeys")||function(v){var h=i.f(f(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"),f=t("50c4"),d=t("1c0b"),v=t("65f0");o({target:"Array",proto:!0},{flatMap:function(p){var g=l(this),m=f(g.length),y;return d(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(f){return function(d,v){var h=String(i(d)),p=o(v),g=h.length,m,y;return p<0||p>=g?f?"":void 0:(m=h.charCodeAt(p),m<55296||m>56319||p+1===g||(y=h.charCodeAt(p+1))<56320||y>57343?f?h.charAt(p):m:f?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"),f=l("species");n.exports=function(d,v){var h;return i(d)&&(h=d.constructor,typeof h=="function"&&(h===Array||i(h.prototype))?h=void 0:o(h)&&(h=h[f],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"),f=t("9112"),d=t("5135"),v=t("f772"),h=t("d012"),p=i.WeakMap,g,m,y,x=function(O){return y(O)?m(O):g(O,{})},S=function(O){return function(M){var R;if(!l(M)||(R=m(M)).type!==O)throw TypeError("Incompatible receiver, "+O+" required");return R}};if(o){var b=new p,$=b.get,E=b.has,A=b.set;g=function(O,M){return A.call(b,O,M),M},m=function(O){return $.call(b,O)||{}},y=function(O){return E.call(b,O)}}else{var N=v("state");h[N]=!0,g=function(O,M){return f(O,N,M),M},m=function(O){return d(O,N)?O[N]:{}},y=function(O){return d(O,N)}}n.exports={set:g,get:m,has:y,enforce:x,getterFor:S}},"6eeb":function(n,c,t){var o=t("da84"),i=t("9112"),l=t("5135"),f=t("ce4e"),d=t("8925"),v=t("69f3"),h=v.get,p=v.enforce,g=String(String).split("String");(n.exports=function(m,y,x,S){var b=S?!!S.unsafe:!1,$=S?!!S.enumerable:!1,E=S?!!S.noTargetGet:!1;if(typeof x=="function"&&(typeof y=="string"&&!l(x,"name")&&i(x,"name",y),p(x).source=g.join(typeof y=="string"?y:"")),m===o){$?m[y]=x:f(y,x);return}else b?!E&&m[y]&&($=!0):delete m[y];$?m[y]=x:i(m,y,x)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||d(this)})},"6f53":function(n,c,t){var o=t("83ab"),i=t("df75"),l=t("fc6a"),f=t("d1e7").f,d=function(v){return function(h){for(var p=l(h),g=i(p),m=g.length,y=0,x=[],S;m>y;)S=g[y++],(!o||f.call(p,S))&&x.push(v?[S,p[S]]:p[S]);return x}};n.exports={entries:d(!0),values:d(!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"),f=t("9bf2").f;n.exports=function(d){var v=o.Symbol||(o.Symbol={});i(v,d)||f(v,d,{value:l.f(d)})}},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"),f=t("d012"),d=t("1be4"),v=t("cc12"),h=t("f772"),p=">",g="<",m="prototype",y="script",x=h("IE_PROTO"),S=function(){},b=function(O){return g+y+p+O+g+"/"+y+p},$=function(O){O.write(b("")),O.close();var M=O.parentWindow.Object;return O=null,M},E=function(){var O=v("iframe"),M="java"+y+":",R;return O.style.display="none",d.appendChild(O),O.src=String(M),R=O.contentWindow.document,R.open(),R.write(b("document.F=Object")),R.close(),R.F},A,N=function(){try{A=document.domain&&new ActiveXObject("htmlfile")}catch{}N=A?$(A):E();for(var O=l.length;O--;)delete N[m][l[O]];return N()};f[x]=!0,n.exports=Object.create||function(M,R){var B;return M!==null?(S[m]=o(M),B=new S,S[m]=null,B[x]=M):B=N(),R===void 0?B:i(B,R)}},"7dd0":function(n,c,t){var o=t("23e7"),i=t("9ed3"),l=t("e163"),f=t("d2bb"),d=t("d44e"),v=t("9112"),h=t("6eeb"),p=t("b622"),g=t("c430"),m=t("3f8c"),y=t("ae93"),x=y.IteratorPrototype,S=y.BUGGY_SAFARI_ITERATORS,b=p("iterator"),$="keys",E="values",A="entries",N=function(){return this};n.exports=function(O,M,R,B,D,w,Y){i(R,M,B);var V=function(wt){if(wt===D&&rt)return rt;if(!S&&wt in _)return _[wt];switch(wt){case $:return function(){return new R(this,wt)};case E:return function(){return new R(this,wt)};case A:return function(){return new R(this,wt)}}return function(){return new R(this)}},Q=M+" Iterator",yt=!1,_=O.prototype,U=_[b]||_["@@iterator"]||D&&_[D],rt=!S&&U||V(D),pt=M=="Array"&&_.entries||U,Dt,ht,xt;if(pt&&(Dt=l(pt.call(new O)),x!==Object.prototype&&Dt.next&&(!g&&l(Dt)!==x&&(f?f(Dt,x):typeof Dt[b]!="function"&&v(Dt,b,N)),d(Dt,Q,!0,!0),g&&(m[Q]=N))),D==E&&U&&U.name!==E&&(yt=!0,rt=function(){return U.call(this)}),(!g||Y)&&_[b]!==rt&&v(_,b,rt),m[M]=rt,D)if(ht={values:V(E),keys:w?rt:V($),entries:V(A)},Y)for(xt in ht)(S||yt||!(xt in _))&&h(_,xt,ht[xt]);else o({target:M,proto:!0,forced:S||yt},ht);return ht}},"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(f,d,v){var h=o(d);h in f?i.f(f,h,l(0,v)):f[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(f,d){i=[],o=d,l=typeof o=="function"?o.apply(c,i):o,l!==void 0&&(n.exports=l)})(typeof self<"u"?self:this,function(){function f(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==f&&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,""),x,S,b,$=document.getElementsByTagName("script");g===y&&(x=document.documentElement.outerHTML,S=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]* + + + +
+ + +