var Pt=Object.defineProperty,Tt=Object.defineProperties;var Bt=Object.getOwnPropertyDescriptors;var st=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable;var it=(e,l,n)=>l in e?Pt(e,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[l]=n,Y=(e,l)=>{for(var n in l||(l={}))Ft.call(l,n)&&it(e,n,l[n]);if(st)for(var n of st(l))Qt.call(l,n)&&it(e,n,l[n]);return e},Ne=(e,l)=>Tt(e,Bt(l));import{c as W,w as J,r as H,o as Qe,a as ut,d as rt,i as ce,t as Je,h as Me,b as Le,p as pe,e as dt,E as Ue,u as ct,T as pt,f as qe,g as Jt,j as Xt,k as Yt,l as Gt,m as ht,n as Kt,q as Zt,s as el,v as ft,x as tl,y as ll,z as mt,A as C,B as le,C as _,D as s,F as t,G as w,H as S,I as E,J as B,K as X,L as gt,M as Ie,N as se,O as Xe,P as q,Q as Ye,R as vt,S as _t,U as nl,V as ol,W as ye,X as al,Y as sl,Z as il,_ as ul,$ as rl,a0 as Ge,a1 as yt,a2 as dl,a3 as cl,a4 as pl,a5 as hl,a6 as fl,a7 as ml,a8 as gl,a9 as vl,aa as _l,ab as xt,ac as De,ad as bt,ae as yl,af as xl,ag as bl,ah as wl,ai as Vl,aj as We,ak as Cl,al as kl}from"./vendor.fb7751d4.js";const zl=function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const p of i)if(p.type==="childList")for(const h of p.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function n(i){const p={};return i.integrity&&(p.integrity=i.integrity),i.referrerpolicy&&(p.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?p.credentials="include":i.crossorigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(i){if(i.ep)return;i.ep=!0;const p=n(i);fetch(i.href,p)}};zl();const wt=Symbol("Vue3DraggableResizable");function Vt(e){const l=window.getComputedStyle(e);return{width:parseFloat(l.getPropertyValue("width")),height:parseFloat(l.getPropertyValue("height"))}}function Ct(e){return(l,n,o)=>{!l||(typeof n=="string"&&(n=[n]),n.forEach(i=>l[e](i,o,{passive:!1})))}}const xe=Ct("addEventListener"),ie=Ct("removeEventListener");function kt(e){if(e&&e.length>0){const l=[];return e.forEach(n=>{zt.includes(n)&&!l.includes(n)&&l.push(n)}),l}else return[]}function $l(){return String(Math.random()).substr(2)+String(Date.now())}function Sl(e,l,n){if(e.disabled.value)return null;const o={row:[],col:[]},{parentWidth:i,parentHeight:p}=l;o.row.push(...e.adsorbRows),o.col.push(...e.adsorbCols),e.adsorbParent.value&&(o.row.push(0,p.value,p.value/2),o.col.push(0,i.value,i.value/2));const h=e.getPositionStore(n);return Object.values(h).forEach(({x:b,y:u,w:V,h:x})=>{o.row.push(u,u+x,u+x/2),o.col.push(b,b+V,b+V/2)}),{row:o.row.reduce((b,u)=>Ne(Y({},b),{[u]:{min:u-5,max:u+5,value:u}}),{}),col:o.col.reduce((b,u)=>Ne(Y({},b),{[u]:{min:u-5,max:u+5,value:u}}),{})}}function K(e){const l=H(e);return[l,o=>(l.value=o,o)]}function Ml(e,l){const[n,o]=K(e.initW),[i,p]=K(e.initH),[h,d]=K(e.x),[b,u]=K(e.y),[V,x]=K(e.active),[c,a]=K(!1),[k,f]=K(!1),[z,$]=K(""),[I,M]=K(1/0),[A,D]=K(1/0),[m,P]=K(e.minW),[g,v]=K(e.minH),L=W(()=>i.value/n.value);return J(n,U=>{l("update:w",U)},{immediate:!0}),J(i,U=>{l("update:h",U)},{immediate:!0}),J(b,U=>{l("update:y",U)}),J(h,U=>{l("update:x",U)}),J(V,(U,oe)=>{l("update:active",U),!oe&&U?l("activated"):oe&&!U&&l("deactivated")}),J(()=>e.active,U=>{x(U)}),{id:$l(),width:n,height:i,top:b,left:h,enable:V,dragging:c,resizing:k,resizingHandle:z,resizingMaxHeight:A,resizingMaxWidth:I,resizingMinWidth:m,resizingMinHeight:g,aspectRatio:L,setEnable:x,setDragging:a,setResizing:f,setResizingHandle:$,setResizingMaxHeight:D,setResizingMaxWidth:M,setResizingMinWidth:P,setResizingMinHeight:v,setWidth:U=>o(Math.floor(U)),setHeight:U=>p(Math.floor(U)),setTop:U=>u(Math.floor(U)),setLeft:U=>d(Math.floor(U))}}function Ll(e){const l=H(0),n=H(0);return Qe(()=>{if(e.value&&e.value.parentElement){const{width:o,height:i}=Vt(e.value.parentElement);l.value=o,n.value=i}}),{parentWidth:l,parentHeight:n}}function Ul(e,l,n){const{width:o,height:i,left:p,top:h,resizingMaxWidth:d,resizingMaxHeight:b,resizingMinWidth:u,resizingMinHeight:V}=n,{setWidth:x,setHeight:c,setTop:a,setLeft:k}=n,{parentWidth:f,parentHeight:z}=l,$={minWidth:W(()=>u.value),minHeight:W(()=>V.value),maxWidth:W(()=>{let M=1/0;return e.parent&&(M=Math.min(f.value,d.value)),M}),maxHeight:W(()=>{let M=1/0;return e.parent&&(M=Math.min(z.value,b.value)),M}),minLeft:W(()=>e.parent?0:-1/0),minTop:W(()=>e.parent?0:-1/0),maxLeft:W(()=>e.parent?f.value-o.value:1/0),maxTop:W(()=>e.parent?z.value-i.value:1/0)},I={setWidth(M){return e.disabledW?o.value:x(Math.min($.maxWidth.value,Math.max($.minWidth.value,M)))},setHeight(M){return e.disabledH?i.value:c(Math.min($.maxHeight.value,Math.max($.minHeight.value,M)))},setTop(M){return e.disabledY?h.value:a(Math.min($.maxTop.value,Math.max($.minTop.value,M)))},setLeft(M){return e.disabledX?p.value:k(Math.min($.maxLeft.value,Math.max($.minLeft.value,M)))}};return Y(Y({},$),I)}const Ke=["mousedown","touchstart"],be=["mouseup","touchend"],we=["mousemove","touchmove"];function Ee(e){return"touches"in e?[e.touches[0].pageX,e.touches[0].pageY]:[e.pageX,e.pageY]}function ql(e,l,n,o,i,p,h){const{left:d,top:b,width:u,height:V,dragging:x,id:c}=l,{setDragging:a,setEnable:k,setResizing:f,setResizingHandle:z}=l,{setTop:$,setLeft:I}=n;let M=0,A=0,D=0,m=0,P=null;const g=document.documentElement,v=j=>{var te;const G=j.target;((te=e.value)==null?void 0:te.contains(G))||(k(!1),a(!1),f(!1),z(""))},L=()=>{a(!1),ie(g,be,L),ie(g,we,U),P=null,p&&(p.updatePosition(c,{x:d.value,y:b.value,w:u.value,h:V.value}),p.setMatchedLine(null))},U=j=>{if(j.preventDefault(),!(x.value&&e.value))return;const[G,te]=Ee(j),$e=G-D,Se=te-m;let ae=M+$e,re=A+Se;if(P!==null){const de={col:[ae,ae+u.value/2,ae+u.value],row:[re,re+V.value/2,re+V.value]},fe={row:de.row.map((T,N)=>{let R=null;return Object.values(P.row).forEach(Q=>{T>=Q.min&&T<=Q.max&&(R=Q.value)}),R!==null&&(N===0?re=R:N===1?re=Math.floor(R-V.value/2):N===2&&(re=Math.floor(R-V.value))),R}).filter(T=>T!==null),col:de.col.map((T,N)=>{let R=null;return Object.values(P.col).forEach(Q=>{T>=Q.min&&T<=Q.max&&(R=Q.value)}),R!==null&&(N===0?ae=R:N===1?ae=Math.floor(R-u.value/2):N===2&&(ae=Math.floor(R-u.value))),R}).filter(T=>T!==null)};p.setMatchedLine(fe)}i("dragging",{x:I(ae),y:$(re)})},oe=j=>{!o.value||(a(!0),M=d.value,A=b.value,D=Ee(j)[0],m=Ee(j)[1],xe(g,we,U),xe(g,be,L),p&&!p.disabled.value&&(P=Sl(p,h,c)))};return J(x,(j,G)=>{!G&&j?(i("drag-start",{x:d.value,y:b.value}),k(!0),a(!0)):(i("drag-end",{x:d.value,y:b.value}),a(!1))}),Qe(()=>{const j=e.value;!j||(j.style.left=d+"px",j.style.top=b+"px",xe(g,Ke,v),xe(j,Ke,oe))}),ut(()=>{!e.value||(ie(g,Ke,v),ie(g,be,L),ie(g,we,U))}),{containerRef:e}}function El(e,l,n,o,i){const{setWidth:p,setHeight:h,setLeft:d,setTop:b}=l,{width:u,height:V,left:x,top:c,aspectRatio:a}=e,{setResizing:k,setResizingHandle:f,setResizingMaxWidth:z,setResizingMaxHeight:$,setResizingMinWidth:I,setResizingMinHeight:M}=e,{parentWidth:A,parentHeight:D}=n;let m=0,P=0,g=0,v=0,L=0,U=0,oe=1,j="",G="";const te=document.documentElement,$e=de=>{de.preventDefault();let[fe,T]=Ee(de),N=fe-L,R=T-U,Q=N,me=R;o.lockAspectRatio&&(N=Math.abs(N),R=N*oe,(Q<0||G==="m"&&me<0)&&(N=-N,R=-R)),j==="t"?(h(P-R),b(v-(V.value-P))):j==="b"&&h(P+R),G==="l"?(p(m-N),d(g-(u.value-m))):G==="r"&&p(m+N),i("resizing",{x:x.value,y:c.value,w:u.value,h:V.value})},Se=()=>{i("resize-end",{x:x.value,y:c.value,w:u.value,h:V.value}),f(""),k(!1),z(1/0),$(1/0),I(o.minW),M(o.minH),ie(te,we,$e),ie(te,be,Se)},ae=(de,fe)=>{if(!o.resizable)return;de.stopPropagation(),f(fe),k(!0),j=fe[0],G=fe[1];let T=o.minH,N=o.minW;if(T/N>a.value?N=T/a.value:T=N*a.value,I(N),M(T),parent){let Q=j==="t"?c.value+V.value:D.value-c.value,me=G==="l"?x.value+u.value:A.value-x.value;o.lockAspectRatio&&(Q/me{ie(te,be,Se),ie(te,we,$e)}),{handlesFiltered:W(()=>o.resizable?kt(o.handles):[]),resizeHandleDown:ae}}function jl(e,l){const{setWidth:n,setHeight:o,setLeft:i,setTop:p}=l;J(()=>e.w,h=>{n(h)}),J(()=>e.h,h=>{o(h)}),J(()=>e.x,h=>{i(h)}),J(()=>e.y,h=>{p(h)})}const zt=["tl","tm","tr","ml","mr","bl","bm","br"],Hl={initW:{type:Number,default:null},initH:{type:Number,default:null},w:{type:Number,default:0},h:{type:Number,default:0},x:{type:Number,default:0},y:{type:Number,default:0},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disabledX:{type:Boolean,default:!1},disabledY:{type:Boolean,default:!1},disabledW:{type:Boolean,default:!1},disabledH:{type:Boolean,default:!1},minW:{type:Number,default:0},minH:{type:Number,default:0},active:{type:Boolean,default:!1},parent:{type:Boolean,default:!1},handles:{type:Array,default:zt,validator:e=>kt(e).length===e.length},classNameDraggable:{type:String,default:"draggable"},classNameResizable:{type:String,default:"resizable"},classNameDragging:{type:String,default:"dragging"},classNameResizing:{type:String,default:"resizing"},classNameActive:{type:String,default:"active"},classNameHandle:{type:String,default:"handle"},lockAspectRatio:{type:Boolean,default:!1}},Al=["activated","deactivated","drag-start","resize-start","dragging","resizing","drag-end","resize-end","update:w","update:h","update:x","update:y","update:active"],Rl=rt({name:"Vue3DraggableResizable",props:Hl,emits:Al,setup(e,{emit:l}){const n=Ml(e,l),o=ce("identity");let i=null;o===wt&&(i={updatePosition:ce("updatePosition"),getPositionStore:ce("getPositionStore"),disabled:ce("disabled"),adsorbParent:ce("adsorbParent"),adsorbCols:ce("adsorbCols"),adsorbRows:ce("adsorbRows"),setMatchedLine:ce("setMatchedLine")});const p=H(),h=Ll(p),d=Ul(e,h,n);ql(p,n,d,Je(e,"draggable"),l,i,h);const b=El(n,d,h,e,l);return jl(e,d),Y(Y(Y(Y({containerRef:p,containerProvider:i},n),h),d),b)},computed:{style(){return{width:this.width+"px",height:this.height+"px",top:this.top+"px",left:this.left+"px"}},klass(){return{[this.classNameActive]:this.enable,[this.classNameDragging]:this.dragging,[this.classNameResizing]:this.resizing,[this.classNameDraggable]:this.draggable,[this.classNameResizable]:this.resizable}}},mounted(){if(!this.containerRef)return;this.containerRef.ondragstart=()=>!1;const{width:e,height:l}=Vt(this.containerRef);this.setWidth(this.initW===null?this.w||e:this.initW),this.setHeight(this.initH===null?this.h||l:this.initH),this.containerProvider&&this.containerProvider.updatePosition(this.id,{x:this.left,y:this.top,w:this.width,h:this.height})},render(){return Me("div",{ref:"containerRef",class:["vdr-container",this.klass],style:this.style},[this.$slots.default&&this.$slots.default(),...this.handlesFiltered.map(e=>Me("div",{class:["vdr-handle","vdr-handle-"+e,this.classNameHandle,`${this.classNameHandle}-${e}`],style:{display:this.enable?"block":"none"},onMousedown:l=>this.resizeHandleDown(l,e),onTouchstart:l=>this.resizeHandleDown(l,e)}))])}});var $t=rt({name:"DraggableContainer",props:{disabled:{type:Boolean,default:!0},adsorbParent:{type:Boolean,default:!0},adsorbCols:{type:Array,default:null},adsorbRows:{type:Array,default:null},referenceLineVisible:{type:Boolean,default:!0},referenceLineColor:{type:String,default:"#f00"}},setup(e){const l=Le({}),n=(b,u)=>{l[b]=u},o=b=>{const u=Object.assign({},l);return b&&delete u[b],u},i=Le({matchedLine:null}),p=W(()=>i.matchedLine&&i.matchedLine.row||[]),h=W(()=>i.matchedLine&&i.matchedLine.col||[]),d=b=>{i.matchedLine=b};return pe("identity",wt),pe("updatePosition",n),pe("getPositionStore",o),pe("setMatchedLine",d),pe("disabled",Je(e,"disabled")),pe("adsorbParent",Je(e,"adsorbParent")),pe("adsorbCols",e.adsorbCols||[]),pe("adsorbRows",e.adsorbRows||[]),{matchedRows:p,matchedCols:h}},methods:{renderReferenceLine(){return this.referenceLineVisible?[...this.matchedCols.map(e=>Me("div",{style:{width:"0",height:"100%",top:"0",left:e+"px",borderLeft:`1px dashed ${this.referenceLineColor}`,position:"absolute"}})),...this.matchedRows.map(e=>Me("div",{style:{width:"100%",height:"0",left:"0",top:e+"px",borderTop:`1px dashed ${this.referenceLineColor}`,position:"absolute"}}))]:[]}},render(){return Me("div",{style:{width:"100%",height:"100%",position:"relative"}},[this.$slots.default&&this.$slots.default(),...this.renderReferenceLine()])}});const Oe=JSON.parse(localStorage.getItem("userInfo")).token,{ze_id:Nl,zs_id:ha,ykl_id:Il}=JSON.parse(sessionStorage.getItem("ykl_lc")),ge=dt.create({baseURL:window.GLOBAL_CONFIG.api,timeout:180*1e3,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post"});ge.interceptors.request.use(async e=>{var l,n,o;return((l=e.method)==null?void 0:l.toLocaleLowerCase())==="get"?e.params=Object.assign({token:Oe},e.params):e.data=Object.assign({token:Oe,client:"web",api:"json",issubmit:((n=e.url)==null?void 0:n.endsWith("add"))||((o=e.url)==null?void 0:o.endsWith("edit"))?"1":void 0},e.data),e},e=>(console.error("request error: ",e),Promise.reject(e)));ge.interceptors.response.use(e=>{var o,i;e.data.code=(i=(o=e.data)==null?void 0:o.code)==null?void 0:i.toString(),e.data.msg=e.data.msg.replaceAll(/<.*?>/g," ");const{code:l,msg:n}=e.data;return l!=="1"&&Ue.error(n),e.data},e=>(console.error(`response error: ${e}`),Promise.reject(e)));var St=e=>ge.request(e);function Mt(e){const l=new FormData;return Object.keys(e).forEach(n=>l.append(n,e[n])),l}const Dl={empty:dt,default:ge,import:e=>ge(Y({timeout:10*60*1e3,transformRequest:[Mt]},e)),upload:e=>ge(Y({timeout:3*60*1e3,transformRequest:[Mt]},e)),download:e=>ge({timeout:1*60*1e3,method:"get",params:Y({token:Oe,limit:1e4,page:1,api:"xls"},e)})},{yzy:Lt}=window.GLOBAL_CONFIG;function Wl(){return St({url:Lt+"/yzy/kmksyjlc/format",data:{ze_id:Nl}})}function Ol(e){const{gid:l,pid:n,cid:o}=JSON.parse(sessionStorage.getItem("StepId")),i=JSON.parse(sessionStorage.getItem("ykl_lc"));return i.processList[l][n][o]=1,St({method:"post",url:Lt+"/yzy/kmksyjlc/save",data:{api:"json",version:2,token:Oe,client:"web",ykl_id:i.ykl_id,yk:{ykl_dtkmb:JSON.stringify(e),ykl_lc:JSON.stringify(i)}}}).then(p=>(p.code==="1"&&sessionStorage.setItem("stepsMap",JSON.stringify(i.processList)),Promise.resolve(p))).catch(()=>{Ue({message:"\u64CD\u4F5C\u5931\u8D25",type:"error",grouping:!0})})}const Pe=220,je=H(!0),Ze=H(Pe),Pl=ct(Ze,{duration:300,transition:pt.easeInOutCubic}),Tl=W(()=>Pl.value+"px");function Bl(){je.value=!0,Ze.value=Pe}function Fl(){je.value=!1,Ze.value=0}const Te=300,He=H(!0),et=H(Te),Ql=ct(et,{duration:300,transition:pt.easeInOutCubic}),Jl=W(()=>Ql.value+"px");function Xl(){He.value=!0,et.value=Te}function Yl(){He.value=!1,et.value=0}const ue=H(100),Gl=W(()=>`scale(${(ue.value/100).toFixed(2)})`);function Kl(){ue.value=Ut(ue.value+10)}function Zl(){ue.value<=10||(ue.value=Ut(ue.value-10))}function Ut(e){return e.toFixed(2)*1}const Z=Le([]),ve=H(0);function Be(e){ve.value=e}function en(){const e=(ve.value+1)%Z.length;Be(e)}function tn(){const e=(ve.value+Z.length-1)%Z.length;Be(e)}const y=H({}),Fe=W(()=>Object.keys(y.value)),qt=H({});function Ae(){const e={};let l={};console.log("updateQuestionMap AreaList :>> ",F),F.value.forEach(n=>{n.questions!=null?n.questions.forEach(o=>e[o._name]=o):l[n.noquestions]=n}),y.value=e,qt.value=l}const F=H([]);function ln(e){const n=F.value.splice(e,1)[0];if(n.form&&n.form.areatype===10&&!n.disuse)if(n.questions&&n.questions.length>0){const o=n.questions[0];if(Array.isArray(o.follow)&&o.follow.length>0){const i=o.follow[0],p=Ne(Y({},o),{hash:i,follow:o.follow.slice(1)});F.value.find(d=>d.hash===i).questions.push(p),Ae()}}else console.info("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u9898\u76EE");else n.questions&&n.questions.length>0&&Ae()}function nn(){const e={};return F.value.forEach(l=>{e[l.hash]=l}),e}const r=H({}),O=Le({}),ee=Le({base:{ttcc_w:20,ttcc_h:12},6:{tmsl:5,thjg:1,xxsl:4,plfx:1},7:{tmsl:5,thjg:1,xxsl:4,plfx:1},8:{tmsl:5,thjg:1,xxsl:2,plfx:1}}),he=H(0);async function Et(e,l){try{if(O.mode==="add"&&typeof e=="function"&&!await e())return;he.value++,O.mode==="add"&&typeof l=="function"&&await l()}catch(n){console.error("error :>> ",n)}}function tt(e,l){he.value--}function lt(e,l){return e===""||e===void 0?l.toString():e+"_"+l}const Re=H(!1);function jt(e,l){O.idx=e,O.info=l;try{const{paper:n,x:o,y:i,w:p,h}=l;O.imgsrc=Z[n].img,l.form?(O.mode="edit",r.value=JSON.parse(JSON.stringify(l.form))):(O.mode="add",r.value={}),Re.value=!0}catch(n){console.error(n)}}function Ht(){var a,k,f,z;F.value[O.idx].form=JSON.parse(JSON.stringify(r.value));const e=F.value[O.idx],{hash:l}=e,n=(k=(a=e==null?void 0:e.questions)==null?void 0:a.map($=>$._name))!=null?k:[],{areatype:o,qsth:i,jsth:p,thjg:h,ssdt:d,rows:b,cols:u,plfx:V,ttcc_w:x,ttcc_h:c}=r.value;if([6,7,8,9,10].includes(o)){if(e.questions=[],[6,7,8].includes(o)){const $=[],I=[];for(let M=i;M<=p;M+=h){const A=lt(d,M);$.push(A),I.push({_name:A,_type:o-5,options:V?u.length:b.length,answer:o===7?[]:void 0,hash:l,idx:(M-i)/h})}$.some(M=>y.value[M]&&!n.some(A=>A===M))?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(e.questions.push(...I),Reflect.deleteProperty(e,"disuse"))}else if(o===9){const $=lt(d,i);y.value[$]&&!n.some(I=>I===$)?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(e.questions.push({_name:$,_type:9-5,options:1,answer:[],hash:l}),Reflect.deleteProperty(e,"disuse"))}else if(o===10){const $=lt(d,i);y.value[$]?y.value[$]._type!==5?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u4E14\u672C\u6B21\u8BD5\u9898\u7C7B\u578B\u4E0E\u4E0A\u6B21\u8BD5\u9898\u7C7B\u578B\u4E0D\u5339\u914D\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(y.value[$].follow=(f=y.value[$].follow)!=null?f:[],y.value[$].follow.push(l),Reflect.deleteProperty(e,"disuse")):(e.questions.push({_name:$,_type:10-5,answer:"",hash:l}),Reflect.deleteProperty(e,"disuse"))}}else e.questions=null,e.noquestions=(z=e.noquestions)!=null?z:o;Ae(),At(),Re.value=!1}function on(e){qe.confirm("\u662F\u5426\u653E\u5F03\u672C\u6B21\u8BBE\u7F6E?").then(()=>{e(),At()}).catch(()=>{})}function At(){he.value=0,r.value={}}let Rt=0;const Nt=new Image(0,0),nt=document.createElement("canvas");nt.width=1;nt.height=1;Nt.src=nt.toDataURL("image/jpeg",0);function an(e){e.dataTransfer.setDragImage(Nt,0,0),Rt=F.value.push({paper:ve.value,x:e.offsetX,y:e.offsetY,w:0,h:0,x2:e.offsetX,y2:e.offsetY,ready:!1,hash:Date.now()})-1}function sn({offsetX:e,offsetY:l}){if(e<0||l<0)return;const n=F.value.length-1,o=F.value[n];o.x2=e,o.y2=l}function un({offsetX:e,offsetY:l}){if(e<0||l<0)return;const n=F.value.length-1,o=F.value[n];o.x2=e,o.y2=l;const{x:i,y:p,x2:h,y2:d}=o;o.x=Math.min(i,h),o.x2=Math.max(i,h),o.y=Math.min(p,d),o.y2=Math.max(p,d),o.w=o.x2-o.x,o.h=o.y2-o.y,o.ready=!0,jt(Rt,o)}function rn(e){e.preventDefault(),e.dataTransfer.dropEffect="move"}const{width:It,height:dn}=Jt(),cn=It.value-Pe-Te-4,pn=W(()=>`${cn}px`);W(()=>dn.value-52-4);const Dt=W(()=>It.value-(je.value?Pe:0)-(He.value?Te:0));W(()=>`${Dt.value}px`);J(()=>Dt.value,()=>{});const Ve=H(void 0),Ce=H(void 0),hn=W(()=>`${Ve.value}px`),fn=W(()=>`${Ce.value}px`);function mn(e){return new Promise(l=>{const n=new Image;n.src=e,n.onload=()=>{Ve.value=n.width,Ce.value=n.height,l()}})}const{toggle:gn}=Xt();function vn(){window.location.href="https://yzy.dev.bozedu.net/webapps/page/liankao/#/step/"+Il}const ot={},ne={num2opt(e){if(ot[e]===void 0){const l=String.fromCharCode(65+e-1);ot[e]=l}return ot[e]},num2pdopt(e){return["T","F"][e-1]},blank2ans(e){return e.join("\u203B")},multi2ans(e){return e.sort().map(l=>ne.num2opt(l)).sort().join("")},judgeAnsByType(e,l){if(l===1)return ne.num2opt(e);if(l===2)return ne.multi2ans(e);if(l===3)return ne.num2pdopt(e);if(l===4)return ne.blank2ans(e);if(l===5)return e},judgeOptByType(e,l){if(l===1||l===2)return ne.num2opt(e);if(l===3)return ne.num2pdopt(e)}};function _n(){qe.confirm("\u662F\u5426\u786E\u8BA4\u7B54\u9898\u5361\u5DF2\u914D\u7F6E\u5B8C\u5168\uFF08\u5305\u62EC\u8BD5\u9898\u5206\u503C\u548C\u7B54\u6848\uFF09\uFF0C\u51C6\u5907\u63D0\u4EA4",{confirmButtonText:"\u786E\u8BA4\u65E0\u8BEF\uFF0C\u63D0\u4EA4",cancelButtonText:"\u6211\u518D\u770B\u770B\uFF0C\u6682\u4E0D\u63D0\u4EA4"}).then(()=>{const e=Ve.value<=Ce.value?"A4":"A3",l={width:Ve.value,height:Ce.value,hq_type:[{type:"1",name:"\u5355\u9009\u9898"},{type:"2",name:"\u591A\u9009\u9898"},{type:"3",name:"\u5224\u65AD\u9898"},{type:"4",name:"\u586B\u7A7A\u9898"},{type:"5",name:"\u95EE\u7B54\u8BA1\u7B97\u9898"}],totalPage:Z.length,locationType:0,pages:[{pageNo:1,rotate:e==="A4"?0:270,imge:{width:Ve.value,height:Ce.value},cut:[],location:0,locationType:0,questions:[],QrCode:{object:{x:0,y:0,width:0,height:0}},studentcode_bar:{object:{x:0,y:0,width:0,height:0}},absent:{x:0,y:0,width:100,height:100},studentcode_fill:{object:[]}},{pageNo:2,rotate:e==="A4"?0:90,imge:{width:Ve.value,height:Ce.value},cut:[],location:0,locationType:0,questions:[]}].splice(0,Z.length),useQrCode:0,info:{area:F.value}},n=nn(),o=l.pages;Object.entries(qt.value).forEach(([p,h])=>{const d=h.form;if(p*1==1&&(o[h.paper].studentcode_bar={object:{x:h.x,y:h.y,width:h.w,height:h.h}}),p*1==2&&(l.useQrCode=1,o[h.paper].QrCode={object:{x:h.x,y:h.y,width:h.w,height:h.h}}),p*1==4&&(o[h.paper].absent={x:h.x,y:h.y,width:h.w,height:h.h}),p*1==5&&(o[h.paper].disciplinary={x:h.x,y:h.y,width:h.w,height:h.h}),p*1==3){const b={};d.plfx===0?b.object=d.cols.map((u,V)=>({group:d.rows.map((x,c)=>({optName:c,x:h.x+u,y:h.y+x,width:d.ttcc_w,height:d.ttcc_h}))})):b.object=d.rows.map((u,V)=>({group:d.cols.map((x,c)=>({optName:c,x:h.x+x,y:h.y+u,width:d.ttcc_w,height:d.ttcc_h}))})),o[h.paper].studentcode_fill=b}});const i={};console.log("QuestionKeyList :>> ",Fe.value),console.log("AreaHashMap :>> ",n),Fe.value.forEach((p,h)=>{const d=y.value[p],b=[[],[]],u=n[d.hash],V=u.form,x={answer:ne.judgeAnsByType(d.answer,d._type),id:(h+1).toString(),modelId:"topicType"+d._type,name:d._name.replaceAll("_","-"),type:d._type,score:{full:d.score,half_full:0}};if([1,2,3].includes(d._type))d._type===3&&(x.type=1),d._type===2&&(x.score_part=d.score_part.map(({right_num:c,score:a})=>({right_num:c+"",score:a+""}))),i[u.hash]||(o[u.paper].cut.push({x:u.x,y:u.y,width:u.w,height:u.h,name:u.questions.map(({_name:c})=>c).join()}),i[u.hash]=!0),V.plfx?x.opt=V.cols.map((c,a)=>({optName:ne.judgeOptByType(a+1,d._type),x:u.x+c,y:u.y+V.rows[d.idx],width:V.ttcc_w,height:V.ttcc_h})):x.opt=V.rows.map((c,a)=>({optName:ne.judgeOptByType(a+1,d._type),x:u.x+V.cols[d.idx],y:u.y+c,width:V.ttcc_w,height:V.ttcc_h}));else if([4].includes(d._type)){const c={cut:{x:u.x,y:u.y,width:u.w,height:u.h},scorebox:{x:u.x,y:u.y,width:0,height:0,Score:[""],type:d._type},column:2,rowLinHeight:u.h,scoreStyle:""};Object.assign(x,c)}else if([5].includes(d._type)){const c={cut:{x:u.x,y:u.y,width:u.w,height:u.h,linkparm:1},scorebox:{x:u.x,y:u.y,width:0,height:0,type:d._type,limit:d.score,point:d.score>10?1:0},editorId:d._type+"",marktype:d._type};Object.assign(x,c),Array.isArray(d.follow)&&d.follow.forEach(a=>{const k=JSON.parse(JSON.stringify(x)),f=n[a];delete k.scorebox,k.cut={x:f.x,y:f.y,width:f.w,height:f.h,linkparm:0},u.paper===f.paper?b[0].push(k):u.paper===f.paper-1?b[1].push(k):console.error("\u5B58\u5728\u7B80\u7B54\u9898\u9875\u7801\u95EE\u9898:",f)})}console.log("object :>> "),o[u.paper].questions.push(x),o[u.paper].questions.push(...b[0]),u.paper+1> ",l),Ol(l).then(p=>{p.code==="1"?Ue.success("\u4FDD\u5B58\u6210\u529F"):Ue.error(p.msg)})}).catch(e=>{console.error(e)})}function yn(){gn()}function xn(e){var l;F.value=(l=e.area)!=null?l:[],Ae()}const Wt=H();function bn(e,l){Wt.value=e==null?void 0:e.hash}const Ot={1:"\u6761\u5F62\u7801\u533A\u57DF",2:"\u4E8C\u7EF4\u7801\u533A\u57DF",3:"\u586B\u6D82\u7801\u533A\u57DF",4:"\u7F3A\u8003\u6807\u8BC6\u533A\u57DF",5:"\u8FDD\u7EAA\u6807\u8BC6\u533A\u57DF",6:"\u5355\u9009\u9898\u533A\u57DF",7:"\u591A\u9009\u9898\u533A\u57DF",8:"\u5224\u65AD\u9898\u533A\u57DF",9:"\u586B\u7A7A\u9898\u533A\u57DF",10:"\u7B80\u7B54\u9898\u533A\u57DF"},wn=Object.entries(Ot).map(([e,l])=>({value:e*1,label:l}));var at=(e,l)=>{const n=e.__vccOpts||e;for(const[o,i]of l)n[o]=i;return n};const _e=e=>(vt("data-v-f0d2c87e"),e=e(),_t(),e),Vn={style:{padding:"10px 0px"}},Cn={class:"flex justify-end"},kn=q("\u4E0B\u4E00\u6B65"),zn={class:"flex flex-col justify-center"},$n={class:"flex justify-between"},Sn=q("\u4E0A\u4E00\u6B65"),Mn=q("\u4E0B\u4E00\u6B65"),Ln={class:"flex flex-col justify-start"},Un=_e(()=>w("div",{style:{"font-size":"12px","margin-top":"-12px","margin-bottom":"18px"}}," \uFF08\u53EA\u6709\u590D\u5408\u9898\u4E2D\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u8BE5\u9879\uFF0C\u5176\u4ED6\u9898\u76EE\u4E0D\u7528\uFF1B\u540C\u4E00\u7B80\u7B54\u9898\u4E0B\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u76F8\u540C\u7684\u8BE5\u9009\u9879\uFF09",-1)),qn=_e(()=>w("div",{style:{"font-size":"12px","margin-top":"-12px","margin-bottom":"18px"}}," \uFF08\u53EA\u6709\u590D\u5408\u9898\u4E2D\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u8BE5\u9879\uFF0C\u5176\u4ED6\u9898\u76EE\u4E0D\u7528\uFF1B\u540C\u4E00\u7B80\u7B54\u9898\u4E0B\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u76F8\u540C\u7684\u8BE5\u9009\u9879\uFF09",-1)),En={class:"flex justify-between"},jn=q("\u4E0A\u4E00\u6B65"),Hn=q("\u5B8C\u6210"),An=["src"],Rn={class:"flex",style:{width:"550px"}},Nn={class:"flex flex-col w-200"},In=_e(()=>w("div",{class:"mb-6"},"\u884C\u5750\u6807\uFF1A",-1)),Dn={class:"mb-6 tagrow"},Wn={class:"flex flex-col w-200"},On=_e(()=>w("div",{class:"mb-6"},"\u5217\u5750\u6807\uFF1A",-1)),Pn={class:"mb-6 tagrow"},Tn={class:"flex flex-col w-200"},Bn=_e(()=>w("div",{class:"mb-6"},"\u586B\u6D82\u5C3A\u5BF8\uFF1A",-1)),Fn={class:"mb-6 tagrow"},Qn=_e(()=>w("span",null,"\u5BBD\uFF1A",-1)),Jn={class:"mb-6 tagrow"},Xn=_e(()=>w("span",null,"\u9AD8\uFF1A",-1)),Yn={class:"flex justify-between"},Gn=q("\u4E0A\u4E00\u6B65"),Kn=q("\u5B8C\u6210"),Zn={setup(e){const l=H();function n(){return l.value.validateField("areatype",c=>{if(c)r.value.areatype===3?(r.value.xhws=8,r.value.plfx=0):[6,7,8].includes(r.value.areatype)?(r.value.tmsl=ee[r.value.areatype].tmsl,r.value.thjg=ee[r.value.areatype].thjg,r.value.xxsl=ee[r.value.areatype].xxsl,r.value.plfx=ee[r.value.areatype].plfx):console.info("area type is not support get row & col number");else return!1;return!0})}function o(){r.value.jsth=(r.value.tmsl-1)*r.value.thjg+r.value.qsth}function i(){return l.value.validate(c=>{if(c){r.value.ttcc_w=ee.base.ttcc_w,r.value.ttcc_h=ee.base.ttcc_h;let a,k;r.value.areatype===3?(a=r.value.xhws,k=10):[6,7,8].includes(r.value.areatype)&&(a=r.value.tmsl,k=r.value.xxsl),r.value.plfx===0?(r.value.rows=Array.from({length:k},(f,z)=>Math.round(O.info.h/k*z)),r.value.cols=Array.from({length:a},(f,z)=>Math.round(O.info.w/a*z))):(r.value.rows=Array.from({length:a},(f,z)=>Math.round(O.info.h/a*z)),r.value.cols=Array.from({length:k},(f,z)=>Math.round(O.info.w/k*z)))}else return!1;return!0})}function p(c,a){if(c===1){const k=r.value[a][1]-r.value[a][0];r.value[a].forEach((f,z)=>{r.value[a][z]=r.value[a][0]+k*z})}}function h(c){ee.base.ttcc_w=c}function d(c){ee.base.ttcc_h=c}function b(c){ee[r.value.areatype].tmsl=c}function u(c){ee[r.value.areatype].thjg=c}function V(c){ee[r.value.areatype].xxsl=c}function x(c){ee[r.value.areatype].plfx=c}return(c,a)=>{const k=Yt,f=Gt,z=Ye,$=ht,I=Kt,M=Zt,A=el,D=ft,m=tl,P=ll,g=mt;return C(),le(g,{width:"720px",modelValue:t(Re),"onUpdate:modelValue":a[21]||(a[21]=v=>Xe(Re)?Re.value=v:null),"before-close":t(on),"append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,draggable:""},{default:_(()=>[s(f,{active:t(he),simple:"","finish-status":"success"},{default:_(()=>[s(k,{title:"\u533A\u57DF\u7C7B\u578B\u8BBE\u7F6E"}),s(k,{title:"\u5C5E\u6027\u8BBE\u7F6E"}),s(k,{title:"\u5750\u6807\u8BBE\u7F6E"})]),_:1},8,["active"]),w("div",Vn,[s(P,{ref_key:"formRef",ref:l,model:t(r),"label-width":"100px","label-suffix":":",size:"small"},{default:_(()=>[t(he)===0?(C(),S(E,{key:0},[w("div",Cn,[s(z,{type:"primary",onClick:a[0]||(a[0]=v=>t(Et)(n))},{default:_(()=>[kn]),_:1})]),s($),w("div",zn,[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"areatype",label:"\u533A\u57DF\u7C7B\u578B"},{default:_(()=>[s(M,{modelValue:t(r).areatype,"onUpdate:modelValue":a[1]||(a[1]=v=>t(r).areatype=v),placeholder:""},{default:_(()=>[(C(!0),S(E,null,B(t(wn),({label:v,value:L})=>(C(),le(I,{label:v,value:L},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})])],64)):X("",!0),t(he)===1?(C(),S(E,{key:1},[w("div",$n,[s(z,{type:"primary",onClick:a[2]||(a[2]=v=>t(tt)())},{default:_(()=>[Sn]),_:1}),s(z,{type:"primary",onClick:a[3]||(a[3]=v=>t(Et)(i))},{default:_(()=>[Mn]),_:1})]),s($),w("div",Ln,[t(r).areatype===3?(C(),S(E,{key:0},[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"xhws",label:"\u5B66\u53F7\u4F4D\u6570"},{default:_(()=>[s(D,{modelValue:t(r).xhws,"onUpdate:modelValue":a[4]||(a[4]=v=>t(r).xhws=v)},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"plfx",label:"\u5B66\u53F7\u6392\u5217\u65B9\u5411"},{default:_(()=>[s(M,{modelValue:t(r).plfx,"onUpdate:modelValue":a[5]||(a[5]=v=>t(r).plfx=v),placeholder:""},{default:_(()=>[(C(),S(E,null,B([{label:"\u6A2A\u5411",value:0},{label:"\u7EB5\u5411",value:1}],({label:v,value:L})=>s(I,{label:v,value:L},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})],64)):X("",!0),[6,7,8].includes(t(r).areatype)?(C(),S(E,{key:1},[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"tmsl",label:"\u9898\u76EE\u6570\u91CF"},{default:_(()=>[s(D,{modelValue:t(r).tmsl,"onUpdate:modelValue":a[6]||(a[6]=v=>t(r).tmsl=v),onChange:b},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"thjg",label:"\u9898\u53F7\u95F4\u9694"},{default:_(()=>[s(D,{modelValue:t(r).thjg,"onUpdate:modelValue":a[7]||(a[7]=v=>t(r).thjg=v),onChange:u},null,8,["modelValue"])]),_:1}),s(A,{label:"\u6240\u5C5E\u590D\u5408\u9898"},{default:_(()=>[s(D,{modelValue:t(r).ssdt,"onUpdate:modelValue":a[8]||(a[8]=v=>t(r).ssdt=v)},null,8,["modelValue"])]),_:1}),Un,s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"qsth",label:"\u8D77\u59CB\u9898\u53F7"},{default:_(()=>[s(D,{modelValue:t(r).qsth,"onUpdate:modelValue":a[9]||(a[9]=v=>t(r).qsth=v),onChange:o},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"jsth",label:"\u7ED3\u675F\u9898\u53F7"},{default:_(()=>[s(D,{modelValue:t(r).jsth,"onUpdate:modelValue":a[10]||(a[10]=v=>t(r).jsth=v)},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"xxsl",label:"\u9009\u9879\u6570\u91CF"},{default:_(()=>[s(D,{modelValue:t(r).xxsl,"onUpdate:modelValue":a[11]||(a[11]=v=>t(r).xxsl=v),onChange:V},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"plfx",label:"\u9898\u53F7\u6392\u5217\u65B9\u5411"},{default:_(()=>[s(M,{modelValue:t(r).plfx,"onUpdate:modelValue":a[12]||(a[12]=v=>t(r).plfx=v),placeholder:"",onChange:x},{default:_(()=>[(C(),S(E,null,B([{label:"\u6A2A\u5411",value:0},{label:"\u7EB5\u5411",value:1}],({label:v,value:L})=>s(I,{label:v,value:L},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})],64)):X("",!0),[9,10].includes(t(r).areatype)?(C(),S(E,{key:2},[s(A,{label:"\u6240\u5C5E\u590D\u5408\u9898"},{default:_(()=>[s(D,{modelValue:t(r).ssdt,"onUpdate:modelValue":a[13]||(a[13]=v=>t(r).ssdt=v)},null,8,["modelValue"])]),_:1}),qn,s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"qsth",label:"\u8D77\u59CB\u9898\u53F7"},{default:_(()=>[s(D,{modelValue:t(r).qsth,"onUpdate:modelValue":a[14]||(a[14]=v=>t(r).qsth=v)},null,8,["modelValue"])]),_:1})],64)):X("",!0),[3,6,7,8,9,10].includes(t(r).areatype)?X("",!0):(C(),le(m,{key:3,description:"\u65E0\u5176\u4ED6\u914D\u7F6E\u9879"}))])],64)):X("",!0),t(he)===2?(C(),S(E,{key:2},[w("div",En,[s(z,{type:"primary",onClick:a[15]||(a[15]=v=>t(tt)())},{default:_(()=>[jn]),_:1}),s(z,{type:"primary",onClick:t(Ht)},{default:_(()=>[Hn]),_:1},8,["onClick"])]),s($),[3,6,7,8].includes(t(r).areatype)?(C(),S("div",{key:1,class:gt(["flex flex-col",{"flex-col":t(O).info.w>1060-600}])},[w("div",{class:"relative overhide",style:Ie({width:t(O).info.w+"px",height:t(O).info.h+"px"})},[w("img",{src:t(O).imgsrc,class:"absolute",style:Ie({left:-t(O).info.x+"px",top:-t(O).info.y+"px"}),alt:""},null,12,An),s(t($t),null,{default:_(()=>[(C(!0),S(E,null,B(t(r).rows,(v,L)=>(C(),S(E,null,[(C(!0),S(E,null,B(t(r).cols,(U,oe)=>(C(),le(t(Rl),{initW:t(r).ttcc_w,initH:t(r).ttcc_h,x:t(r).cols[oe],"onUpdate:x":j=>t(r).cols[oe]=j,y:t(r).rows[L],"onUpdate:y":j=>t(r).rows[L]=j,w:t(r).ttcc_w,"onUpdate:w":a[16]||(a[16]=j=>t(r).ttcc_w=j),h:t(r).ttcc_h,"onUpdate:h":a[17]||(a[17]=j=>t(r).ttcc_h=j),style:{backgroundColor:"#409eff50"}},null,8,["initW","initH","x","onUpdate:x","y","onUpdate:y","w","h"]))),256))],64))),256))]),_:1})],4),s($),w("div",Rn,[w("div",Nn,[In,(C(!0),S(E,null,B(t(r).rows,(v,L)=>(C(),S("div",Dn,[w("span",null,"\u7B2C"+se(L+1)+"\u884C",1),s(D,{size:"small",onChange:U=>p(L,"rows"),modelValue:t(r).rows[L],"onUpdate:modelValue":U=>t(r).rows[L]=U,min:L===0?0:t(r).rows[L-1]+t(r).ttcc_h},null,8,["onChange","modelValue","onUpdate:modelValue","min"])]))),256))]),w("div",Wn,[On,(C(!0),S(E,null,B(t(r).cols,(v,L)=>(C(),S("div",Pn,[w("span",null,"\u7B2C"+se(L+1)+"\u5217",1),s(D,{size:"small",onChange:U=>p(L,"cols"),modelValue:t(r).cols[L],"onUpdate:modelValue":U=>t(r).cols[L]=U,min:L===0?0:t(r).cols[L-1]+t(r).ttcc_w},null,8,["onChange","modelValue","onUpdate:modelValue","min"])]))),256))]),w("div",Tn,[Bn,w("div",Fn,[Qn,s(D,{size:"small",modelValue:t(r).ttcc_w,"onUpdate:modelValue":a[18]||(a[18]=v=>t(r).ttcc_w=v),onChange:h},null,8,["modelValue"])]),w("div",Jn,[Xn,s(D,{size:"small",modelValue:t(r).ttcc_h,"onUpdate:modelValue":a[19]||(a[19]=v=>t(r).ttcc_h=v),onChange:d},null,8,["modelValue"])])])])],2)):(C(),le(m,{key:0,description:"\u65E0\u5176\u4ED6\u914D\u7F6E\u9879"}))],64)):X("",!0),t(he)===3?(C(),S(E,{key:3},[w("div",Yn,[s(z,{type:"primary",onClick:a[20]||(a[20]=v=>t(tt)())},{default:_(()=>[Gn]),_:1}),s(z,{type:"primary",onClick:t(Ht)},{default:_(()=>[Kn]),_:1},8,["onClick"])]),s($)],64)):X("",!0)]),_:1},8,["model"])])]),_:1},8,["modelValue","before-close"])}}};var eo=at(Zn,[["__scopeId","data-v-f0d2c87e"]]);const ke=H(!1);function to(){try{Ae(),ke.value=!0}catch(e){console.error(e)}}const lo=["id"],no={props:{id:{type:String,default:`tiny-${Date.now()}-${~~(Math.random()*1e4)}`},htmlClass:{default:"",type:String},modelValue:{default:""},plugins:{default(){return["advlist autolink lists link image charmap preview anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table directionality","template help emoticons"]},type:Array},toolbar1:{default:"formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat",type:String},toolbar2:{default:"",type:String},other_options:{default(){return{}},type:Object}},emits:["update:modelValue"],setup(e,{emit:l}){const n=e,o=H("");J(()=>n.modelValue,(b,u)=>{o.value=b,h()},{immediate:!0});let i=null,p=null;function h(){const b={selector:`#${n.id}`,base_url:"/tiny",language:"zh-Hans",toolbar1:n.toolbar1,toolbar2:n.toolbar2,plugins:n.plugins.join(" "),autosave_restore_when_empty:!0,init_instance_callback:u=>{u.on("KeyUp",V=>{d()}),u.on("Change",V=>{u.getContent()!==n.modelValue&&d()}),u.on("init",V=>{u.setContent(o.value)}),i=u},images_upload_handler:(u,V)=>{const x=u.blob();return Dl.upload({url:"upload/main/file",data:{filedata:x},onUploadProgress(c){V(~~(c.loaded/c.total*100|0))}}).then(c=>c.code==="1"?window.GLOBAL_CONFIG.oss+c.data.url:"")}};nl.init(Object.assign(b,n.other_options))}function d(){p!==null&&clearTimeout(p),p=setTimeout(()=>{},300),l("update:modelValue",i.getContent())}return Qe(()=>{o.value=n.modelValue,h()}),ol(()=>{i.destroy()}),(b,u)=>(C(),S("div",null,[ye(w("textarea",{id:e.id,"onUpdate:modelValue":u[0]||(u[0]=V=>o.value=V)},null,8,lo),[[al,o.value]])]))}};const ze=e=>(vt("data-v-bbad25c6"),e=e(),_t(),e),oo={style:{display:"flex","justify-content":"space-between","margin-bottom":"6px"}},ao=q("\u5168\u9009/\u5168\u4E0D\u9009"),so=q("\u6279\u91CF\u8BBE\u7F6E"),io={style:{"text-align":"right"}},uo=q("\u786E\u8BA4"),ro=q("\u5206\u503C\u8BBE\u7F6E"),co=q("\u591A\u9009\u9898\u5224\u5206\u89C4\u5219"),po=q("\u6DFB\u52A0\u89C4\u5219"),ho={style:{"text-align":"left","margin-bottom":"1px"}},fo=q("\u9009\u5BF9"),mo=q("\u9898\u5F97"),go=q(" \u5206\uFF1B"),vo={class:"q_row"},_o={class:"q_id"},yo={class:"q_options"},xo={class:"q_score"},bo=ze(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),wo={class:"q_options"},Vo={class:"q_score"},Co=q("\u5224\u5206\u89C4\u5219"),ko=q("\u6DFB\u52A0\u89C4\u5219"),zo={style:{"text-align":"left","margin-bottom":"1px"}},$o=q("\u9009\u5BF9 "),So=q("\u9898\u5F97"),Mo=q(" \u5206\uFF1B"),Lo=ze(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Uo={class:"q_options"},qo={class:"q_score"},Eo=ze(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),jo={class:"q_options tk"},Ho={class:"q_num"},Ao=ze(()=>w("span",null,"\u586B\u7A7A\u6570\uFF1A",-1)),Ro={class:"q_score"},No=ze(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Io={class:"q_options q_text"},Do={class:"q_score"},Wo=ze(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Oo={style:{"text-align":"center"}},Po=q("\u786E\u8BA4"),To={setup(e){const l=H(!1),n=H(0),o=H([]),i=H({});let p=!1;function h(){p=!p,Fe.value.forEach(x=>{i.value[x]=p})}function d(){Object.keys(i.value).forEach(x=>{i.value[x]===!0&&(y.value[x].score=n.value,y.value[x].score_part=o.value)}),l.value=!1,n.value=0,o.value=[]}J(()=>ke.value,x=>{x||(l.value=!1)});function b(x,c){const a=x.substr(-1).toLocaleUpperCase(),k=a.charCodeAt()-64;k<=y.value[c].options&&k>0&&(y.value[c].answerstr=a,y.value[c].answer=k)}function u(x,c){const k=[...new Set(x.toLocaleUpperCase().split("").map(f=>f.trim()).sort())].map(f=>f.charCodeAt()-64).filter(f=>f<=y.value[c].options&&f>0);y.value[c].answerstr=k.map(f=>String.fromCharCode(f+64)).join(""),y.value[c].answer=k}function V(x,c){const k=x.substr(-1).toLocaleUpperCase().charCodeAt()-64;k===6&&(y.value[c].answerstr="F",y.value[c].answer=2),k===20&&(y.value[c].answerstr="T",y.value[c].answer=1)}return(x,c)=>{const a=Ye,k=ht,f=ft,z=sl,$=il,I=yt,M=ul,A=rl,D=mt;return C(),le(D,{width:"1060px",modelValue:t(ke),"onUpdate:modelValue":c[5]||(c[5]=m=>Xe(ke)?ke.value=m:null),"append-to-body":"","destroy-on-close":""},{default:_(()=>[w("div",oo,[s(a,{onClick:h},{default:_(()=>[ao]),_:1}),s(z,{placement:"bottom-end",title:"\u6279\u91CF\u8BBE\u7F6E",width:365,visible:l.value,"onUpdate:visible":c[3]||(c[3]=m=>l.value=m)},{reference:_(()=>[s(a,{onClick:c[0]||(c[0]=m=>l.value=!l.value)},{default:_(()=>[so]),_:1})]),default:_(()=>[w("div",io,[s(a,{type:"primary",onClick:d,size:"small"},{default:_(()=>[uo]),_:1})]),s(k,{"content-position":"left"},{default:_(()=>[ro]),_:1}),s(f,{min:0,precision:1,modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=m=>n.value=m)},null,8,["modelValue"]),s(k,{"content-position":"left"},{default:_(()=>[co]),_:1}),s(a,{style:{"margin-bottom":"4px"},onClick:c[2]||(c[2]=m=>o.value.push({}))},{default:_(()=>[po]),_:1}),(C(!0),S(E,null,B(o.value,(m,P)=>(C(),S("div",ho,[fo,s(f,{size:"small",min:0,precision:0,modelValue:m.right_num,"onUpdate:modelValue":g=>m.right_num=g},null,8,["modelValue","onUpdate:modelValue"]),mo,s(f,{size:"small",min:0,precision:1,modelValue:m.score,"onUpdate:modelValue":g=>m.score=g},null,8,["modelValue","onUpdate:modelValue"]),go,s(a,{type:"danger",plain:"",size:"small",icon:t(Ge),onClick:g=>o.value.splice(P,1)},null,8,["icon","onClick"])]))),256))]),_:1},8,["visible"])]),(C(!0),S(E,null,B(t(Fe),(m,P)=>(C(),S("div",{key:P},[w("div",vo,[s($,{modelValue:i.value[m],"onUpdate:modelValue":g=>i.value[m]=g},{default:_(()=>[w("div",_o,se(m)+".",1)]),_:2},1032,["modelValue","onUpdate:modelValue"]),t(y)[m]._type===1?(C(),S(E,{key:0},[s(I,{modelValue:t(y)[m].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:g=>b(g,m),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",yo,[(C(!0),S(E,null,B(t(y)[m].options,g=>(C(),le(M,{modelValue:t(y)[m].answer,"onUpdate:modelValue":v=>t(y)[m].answer=v,label:g,border:""},{default:_(()=>[q(se(String.fromCharCode(65+g-1)),1)]),_:2},1032,["modelValue","onUpdate:modelValue","label"]))),256))]),w("div",xo,[bo,s(f,{min:0,precision:1,modelValue:t(y)[m].score,"onUpdate:modelValue":g=>t(y)[m].score=g},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(y)[m]._type===2?(C(),S(E,{key:1},[s(I,{modelValue:t(y)[m].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:g=>u(g,m),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",wo,[s(A,{modelValue:t(y)[m].answer,"onUpdate:modelValue":g=>t(y)[m].answer=g},{default:_(()=>[(C(!0),S(E,null,B(t(y)[m].options,g=>(C(),le($,{label:g,border:""},{default:_(()=>[q(se(String.fromCharCode(65+g-1)),1)]),_:2},1032,["label"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),w("div",Vo,[s(z,{placement:"bottom-end",title:"\u5224\u5206\u89C4\u5219",width:370,trigger:"click"},{reference:_(()=>[s(a,{type:"text",style:{"margin-right":"8px"},onClick:g=>{var v;return t(y)[m].score_part=(v=t(y)[m].score_part)!=null?v:[]}},{default:_(()=>[Co]),_:2},1032,["onClick"])]),default:_(()=>[s(a,{style:{"margin-bottom":"4px"},onClick:g=>t(y)[m].score_part.push({})},{default:_(()=>[ko]),_:2},1032,["onClick"]),(C(!0),S(E,null,B(t(y)[m].score_part,(g,v)=>(C(),S("div",zo,[$o,s(f,{size:"small",min:0,precision:0,modelValue:g.right_num,"onUpdate:modelValue":L=>g.right_num=L},null,8,["modelValue","onUpdate:modelValue"]),So,s(f,{size:"small",min:0,precision:1,modelValue:g.score,"onUpdate:modelValue":L=>g.score=L},null,8,["modelValue","onUpdate:modelValue"]),Mo,s(a,{type:"danger",plain:"",size:"small",icon:t(Ge),onClick:L=>t(y)[m].score_part.splice(v,1)},null,8,["icon","onClick"])]))),256))]),_:2},1024),Lo,s(f,{min:0,precision:1,modelValue:t(y)[m].score,"onUpdate:modelValue":g=>t(y)[m].score=g},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(y)[m]._type===3?(C(),S(E,{key:2},[s(I,{modelValue:t(y)[m].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:g=>V(g,m),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",Uo,[(C(!0),S(E,null,B(t(y)[m].options,g=>(C(),le(M,{modelValue:t(y)[m].answer,"onUpdate:modelValue":v=>t(y)[m].answer=v,label:g,border:""},{default:_(()=>[q(se(["T","F"][g-1]),1)]),_:2},1032,["modelValue","onUpdate:modelValue","label"]))),256))]),w("div",qo,[Eo,s(f,{min:0,precision:1,modelValue:t(y)[m].score,"onUpdate:modelValue":g=>t(y)[m].score=g},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(y)[m]._type===4?(C(),S(E,{key:3},[w("div",jo,[(C(!0),S(E,null,B(t(y)[m].options,g=>(C(),le(I,{modelValue:t(y)[m].answer[g-1],"onUpdate:modelValue":v=>t(y)[m].answer[g-1]=v,class:"tk_input",placeholder:`\u7B2C${g}\u7A7A`},{default:_(()=>[q(se(g),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]))),256))]),w("div",Ho,[Ao,s(f,{min:0,precision:0,modelValue:t(y)[m].options,"onUpdate:modelValue":g=>t(y)[m].options=g},null,8,["modelValue","onUpdate:modelValue"])]),w("div",Ro,[No,s(f,{min:0,precision:1,modelValue:t(y)[m].score,"onUpdate:modelValue":g=>t(y)[m].score=g},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(y)[m]._type===5?(C(),S(E,{key:4},[w("div",Io,[s(no,{modelValue:t(y)[m].answer,"onUpdate:modelValue":g=>t(y)[m].answer=g},null,8,["modelValue","onUpdate:modelValue"])]),w("div",Do,[Wo,s(f,{min:0,precision:1,modelValue:t(y)[m].score,"onUpdate:modelValue":g=>t(y)[m].score=g},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0)])]))),128)),w("div",Oo,[s(a,{size:"large",type:"primary",onClick:c[4]||(c[4]=m=>ke.value=!1)},{default:_(()=>[Po]),_:1})])]),_:1},8,["modelValue"])}}};var Bo=at(To,[["__scopeId","data-v-bbad25c6"]]);const Fo={class:"container"},Qo={class:"aside la"},Jo=["onClick"],Xo=["src"],Yo={class:"main"},Go={class:"toolbar"},Ko=q("%"),Zo=q("\u4E0A\u4E00\u9875"),ea=q(" \u4E0B\u4E00\u9875 "),ta=q("\u8FD4\u56DE"),la=q("\u8BBE\u7F6E\u8BD5\u9898\u7B54\u6848"),na=q("\u63D0\u4EA4"),oa={class:"handleWrapper"},aa=["src"],sa={class:"aside ra"},ia=q("> "),ua={setup(e){dl(i=>({"9af03d48":t(Tl),"6108f6da":t(Jl),e57e43f6:t(pn),d01140ce:t(hn),"09d319a0":t(fn),"5feda958":t(Gl)}));const l=H(!0);Wl().then(i=>{var d,b,u;const p=(d=i.data)==null?void 0:d.exam,h=(u=(b=i.data)==null?void 0:b.format)==null?void 0:u.info;if(h!==void 0&&xn(h),!Array.isArray(p.fj_content)||p.fj_content.length===0)throw new Error(0);Z.length=0,p.fj_content.forEach(({url:V,name:x},c)=>{if(typeof V=="string"&&V.length!==0)Z.push({idx:c,img:V,name:x});else throw console.error("\u56FE\u7247url\u9519\u8BEF",V),new Error(0)})}).then(()=>mn(Z[0].img)).then(()=>{l.value=!1}).then(()=>Be(0)).catch(()=>{Ue.error("\u672A\u68C0\u6D4B\u5230\u7B54\u9898\u5361"),l.value=!1});function n(i,p){return i===""||i===void 0?p:i+"_"+p}function o(i){var h,d,b,u,V,x,c,a,k,f;const p=(d=(h=i.row)==null?void 0:h.form)==null?void 0:d.areatype;if(p===void 0)return"\u672A\u8BBE\u7F6E";{const z=Ot[(u=(b=i.row)==null?void 0:b.form)==null?void 0:u.areatype];return[6,7,8].includes(p)?z+" [\u9898\u53F7"+n((V=i.row)==null?void 0:V.form.ssdt,(x=i.row)==null?void 0:x.form.qsth)+"-"+n((c=i.row)==null?void 0:c.form.ssdt,(a=i.row)==null?void 0:a.form.jsth)+"]":[9,10].includes(p)?z+" [\u9898\u53F7"+n((k=i.row)==null?void 0:k.form.ssdt,(f=i.row)==null?void 0:f.form.qsth)+"]":z}}return(i,p)=>{const h=cl,d=Ye,b=yt,u=pl,V=hl,x=fl,c=ml,a=gl,k=vl;return C(),le(a,{locale:t(_l),zIndex:300},{default:_(()=>[ye((C(),S("section",Fo,[l.value?X("",!0):(C(),S(E,{key:0},[w("aside",Qo,[s(h,{class:"scrollbar"},{default:_(()=>[(C(!0),S(E,null,B(t(Z),f=>(C(),S("div",{key:f.idx,class:gt(["paperItem",{actived:t(ve)===f.idx}]),onClick:z=>t(Be)(f.idx)},[w("img",{class:"paperImg",src:f.img,draggable:"false"},null,8,Xo)],10,Jo))),128))]),_:1})]),w("main",Yo,[w("div",Go,[ye(s(d,{icon:t(xt),onClick:t(Bl)},null,8,["icon","onClick"]),[[De,!t(je)]]),ye(s(d,{icon:t(bt),onClick:t(Fl)},null,8,["icon","onClick"]),[[De,t(je)]]),w("div",null,[s(d,{icon:t(yl),onClick:t(Zl)},null,8,["icon","onClick"]),s(b,{style:{width:"140px"},modelValue:t(ue),"onUpdate:modelValue":p[0]||(p[0]=f=>Xe(ue)?ue.value=f:null)},{append:_(()=>[Ko]),_:1},8,["modelValue"]),s(d,{icon:t(xl),onClick:t(Kl)},null,8,["icon","onClick"])]),s(d,{icon:t(bl),onClick:t(yn)},null,8,["icon","onClick"]),s(V,null,{default:_(()=>[s(d,{icon:t(wl),onClick:t(tn)},{default:_(()=>[Zo]),_:1},8,["icon","onClick"]),s(d,{onClick:t(en)},{default:_(()=>[ea,s(u,{class:"el-icon--right"},{default:_(()=>[s(t(Vl))]),_:1})]),_:1},8,["onClick"])]),_:1}),s(d,{onClick:t(vn)},{default:_(()=>[ta]),_:1},8,["onClick"]),s(d,{onClick:t(to),type:"primary"},{default:_(()=>[la]),_:1},8,["onClick"]),s(d,{onClick:t(_n),type:"primary"},{default:_(()=>[na]),_:1},8,["onClick"]),ye(s(d,{icon:t(bt),onClick:t(Xl)},null,8,["icon","onClick"]),[[De,!t(He)]]),ye(s(d,{icon:t(xt),onClick:t(Yl)},null,8,["icon","onClick"]),[[De,t(He)]])]),w("div",oa,[s(t($t),{class:"handleBar",onDragstart:We(t(an),["stop"]),onDrag:We(t(sn),["stop"]),onDragend:We(t(un),["stop"]),onDragover:We(t(rn),["stop"]),draggable:"true"},{default:_(()=>[w("img",{class:"mainImg",src:t(Z)[t(ve)].img},null,8,aa),(C(!0),S(E,null,B(t(F).filter(f=>f.paper===t(ve)),(f,z)=>(C(),S("div",{style:Ie({position:"absolute",left:Math.min(f.x,f.x2)+"px",top:Math.min(f.y,f.y2)+"px",width:Math.abs(f.x2-f.x)+"px",height:Math.abs(f.y2-f.y)+"px",backgroundColor:t(Wt)===f.hash?"#409eff80":"#409eff30",zIndex:15})},null,4))),256))]),_:1},8,["onDragstart","onDrag","onDragend","onDragover"])])]),w("aside",sa,[s(h,{style:{height:"100%"}},{default:_(()=>[s(c,{data:t(F),"highlight-current-row":"",onCurrentChange:t(bn),size:"small"},{default:_(()=>[s(x,{type:"index",label:"\u5E8F\u53F7",width:"44"}),s(x,{label:"\u7C7B\u578B",width:"auto"},{default:_(f=>[w("span",{style:Ie(f.row.disuse&&"text-decoration:line-through;color:var(--el-text-color-disabled)")},se(o(f)),5)]),_:1}),ia,s(x,{prop:"paper",label:"\u9875\u7801",width:"44"},{default:_(f=>[w("span",null,se(f.row.paper+1),1)]),_:1}),s(x,{fixed:"right",label:"\u64CD\u4F5C",width:"60"},{default:_(f=>[s(d,{type:"text",size:"small",icon:t(Cl),onClick:z=>t(jt)(f.$index,f.row)},null,8,["icon","onClick"]),s(d,{type:"text",size:"small",icon:t(Ge),onClick:z=>t(ln)(f.$index)},null,8,["icon","onClick"])]),_:1})]),_:1},8,["data","onCurrentChange"])]),_:1})]),s(eo),s(Bo)],64))])),[[k,l.value]])]),_:1},8,["locale"])}}};var ra=at(ua,[["__scopeId","data-v-0f8d0854"]]);const da=kl(ra);da.mount("#app");