aicfe-answer-card 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/card.js CHANGED
@@ -1,6 +1,6 @@
1
- module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="4089")}({"00ee":function(t,e,n){var r=n("b622"),i=r("toStringTag"),a={};a[i]="z",t.exports="[object z]"===String(a)},"0366":function(t,e,n){var r=n("4625"),i=n("59ed"),a=n("40d5"),o=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},"04f8":function(t,e,n){var r=n("2d00"),i=n("d039"),a=n("da84"),o=a.String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"06cf":function(t,e,n){var r=n("83ab"),i=n("c65b"),a=n("d1e7"),o=n("5c6c"),s=n("fc6a"),c=n("a04b"),u=n("1a2d"),l=n("0cfb"),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=s(t),e=c(e),l)try{return h(t,e)}catch(n){}if(u(t,e))return o(!i(a.f,t,e),t[e])}},"07fa":function(t,e,n){var r=n("50c4");t.exports=function(t){return r(t.length)}},"0b83":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-end-mark-box",class:"mark-".concat(t.type)},[t._v(" "+t._s(t.title)+"请在框中画 ✓"),e("div",{staticClass:"check-box"})])},i=[],a={name:"AcEndMarkBox",props:{title:{type:String,default:""},type:{type:String,default:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),a=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,n){var r=n("e330"),i=Error,a=r("".replace),o=function(t){return String(i(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!i.prepareStackTrace)while(e--)t=a(t,s,"");return t}},"0d51":function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"13d2":function(t,e,n){var r=n("e330"),i=n("d039"),a=n("1626"),o=n("1a2d"),s=n("83ab"),c=n("5e77").CONFIGURABLE,u=n("8925"),l=n("69f3"),h=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=r("".slice),m=r("".replace),y=r([].join),v=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),_=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===g(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||c&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=h(t);return o(r,"source")||(r.source=y(_,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return a(this)&&d(this).source||u(this)}),"toString")},"13d5":function(t,e,n){"use strict";var r=n("23e7"),i=n("d58f").left,a=n("a640"),o=n("2d00"),s=n("605d"),c=!s&&o>79&&o<83,u=c||!a("reduce");r({target:"Array",proto:!0,forced:u},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},"13ed":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mark-point"},[e("div",{staticClass:"mark-point__top-left",style:3===t.layout&&{top:"20px",left:"20px"},attrs:{"data-export_name":"左上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__top-right",style:3===t.layout&&{top:"20px",right:"20px"},attrs:{"data-export_name":"右上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__bottom-left",style:3===t.layout&&{bottom:"20px",left:"20px"},attrs:{"data-export_name":"左下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__bottom-center",style:3===t.layout&&{bottom:"20px"},attrs:{"data-export_name":"底部中心标志点_".concat(t.pageIndex),"data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__full"})]),e("div",{staticClass:"mark-point__bottom-right",style:3===t.layout&&{bottom:"20px",right:"20px"},attrs:{"data-export_name":"右下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),1===t.layout?e("div",{staticClass:"mark-point__top-center__one mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}):t._e(),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-center__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__left mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__right mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}})]):t._e(),e("div",{staticClass:"mark-point__left-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__left-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-left_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e()])},i=[],a={name:"AcMarkPoint",props:{pageIndex:{type:Number}},computed:{pageShiftBinary:function(){var t=this.pageIndex.toString(2).padStart(4,"0");return t.split("")},layout:function(){return this.$store.getters["AC/layout"]},positionStyle:function(){var t={"--coords":3===this.layout?"20px":"30px"};return t}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"14d9":function(t,e,n){"use strict";var r=n("23e7"),i=n("7b0b"),a=n("07fa"),o=n("3a34"),s=n("3511"),c=n("d039"),u=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=u||!l();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),n=a(e),r=arguments.length;s(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return o(e,n),n}})},1626:function(t,e,n){var r=n("8ea1"),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},"182d":function(t,e,n){var r=n("f8cd"),i=RangeError;t.exports=function(t,e){var n=r(t);if(n%e)throw i("Wrong offset");return n}},"19aa":function(t,e,n){var r=n("3a9b"),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},"1a2d":function(t,e,n){var r=n("e330"),i=n("7b0b"),a=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},"1d02":function(t,e,n){"use strict";var r=n("ebb5"),i=n("a258").findLastIndex,a=r.aTypedArray,o=r.exportTypedArrayMethod;o("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"1d80":function(t,e,n){var r=n("7234"),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},"1fb5":function(t,e,n){"use strict";e.byteLength=l,e.toByteArray=d,e.fromByteArray=g;for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function l(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r}function h(t,e,n){return 3*(e+n)/4-n}function d(t){var e,n,r=u(t),o=r[0],s=r[1],c=new a(h(t,o,s)),l=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function p(t,e,n){for(var r,i=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),i.push(f(r));return i.join("")}function g(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,c=n-i;s<c;s+=o)a.push(p(t,s,s+o>c?c:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"21a6":function(t,e,n){(function(n){var r,i,a;(function(n,o){i=[],r=o,a="function"===typeof r?r.apply(e,i):r,void 0===a||(t.exports=a)})(0,(function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function r(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){c(r.response,e,n)},r.onerror=function(){},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,e,n){var s=o.URL||o.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?a(c):i(c.href)?r(t,e,n):a(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){a(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,o){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,o),n);else if(i(t))r(t,n,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){a(s)}))}}:function(t,e,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,c=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&c||s)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(t);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=c.saveAs=c,t.exports=c}))}).call(this,n("c8ba"))},"23cb":function(t,e,n){var r=n("5926"),i=Math.max,a=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):a(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,a=n("9112"),o=n("cb2d"),s=n("6374"),c=n("e893"),u=n("94ca");t.exports=function(t,e){var n,l,h,d,f,p,g=t.target,m=t.global,y=t.stat;if(l=m?r:y?r[g]||s(g,{}):(r[g]||{}).prototype,l)for(h in e){if(f=e[h],t.dontCallGetSet?(p=i(l,h),d=p&&p.value):d=l[h],n=u(m?h:g+(y?".":"#")+h,t.forced),!n&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&a(f,"sham",!0),o(l,h,f,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),a=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,a)}},2638:function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e,n=1;n<arguments.length;n++)for(var r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)}var i=["attrs","props","domProps"],a=["class","style","directives"],o=["on","nativeOn"],s=function(t){return t.reduce((function(t,e){for(var n in e)if(t[n])if(-1!==i.indexOf(n))t[n]=r({},t[n],e[n]);else if(-1!==a.indexOf(n)){var s=t[n]instanceof Array?t[n]:[t[n]],u=e[n]instanceof Array?e[n]:[e[n]];t[n]=[].concat(s,u)}else if(-1!==o.indexOf(n))for(var l in e[n])if(t[n][l]){var h=t[n][l]instanceof Array?t[n][l]:[t[n][l]],d=e[n][l]instanceof Array?e[n][l]:[e[n][l]];t[n][l]=[].concat(h,d)}else t[n][l]=e[n][l];else if("hook"===n)for(var f in e[n])t[n][f]=t[n][f]?c(t[n][f],e[n][f]):e[n][f];else t[n]=e[n];else t[n]=e[n];return t}),{})},c=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=s},2834:function(t,e,n){"use strict";var r=n("ebb5"),i=n("e330"),a=n("59ed"),o=n("dfb9"),s=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,l=i(r.TypedArrayPrototype.sort);u("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),n=o(c(e),e);return l(n,t)}))},2877:function(t,e,n){"use strict";function r(t,e,n,r,i,a,o,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},"2b16":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],style:{"--layout":t.layout},attrs:{visible:t.currentVisible,"custom-class":"ac-preview",top:"20px"},on:{"update:visible":function(e){t.currentVisible=e},opened:t.handleOpen,close:function(e){t.imgList=[]}}},[t._l(t.imgList,(function(t,n){return e("img",{key:n,staticClass:"ac-preview__item",attrs:{src:t}})})),t.imgList.length?e("i",{staticClass:"el-icon-circle-close",attrs:{slot:"footer"},on:{click:function(e){t.currentVisible=!1}},slot:"footer"}):t._e()],2)},i=[],a=n("5dcc"),o={name:"AcPreview",props:{visible:{type:Boolean,default:!1},selector:{type:String,required:!0}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},layout:function(){return this.$store.getters["AC/layout"]}},data:function(){return{imgList:[],loading:!1}},methods:{handleOpen:function(){var t=this,e=$(this.selector);e.length&&(this.loading=!0,Object(a["b"])(e).then((function(e){t.imgList=e,t.loading=!1})).catch((function(){t.loading=!1})))}}},s=o,c=n("2877"),u=Object(c["a"])(s,r,i,!1,null,null,null),l=u.exports;l.install=function(t){t.component(l.name,l)};e["default"]=l},"2ba4":function(t,e,n){var r=n("40d5"),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},"2d00":function(t,e,n){var r,i,a=n("da84"),o=n("342f"),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(r=l.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},"342f":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e){var n=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw n("Maximum allowed index exceeded");return t}},"3a34":function(t,e,n){"use strict";var r=n("83ab"),i=n("e8b5"),a=TypeError,o=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,n){var r=n("e330");t.exports=r({}.isPrototypeOf)},"3bbe":function(t,e,n){var r=n("1626"),i=String,a=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},"3c5d":function(t,e,n){"use strict";var r=n("da84"),i=n("c65b"),a=n("ebb5"),o=n("07fa"),s=n("182d"),c=n("7b0b"),u=n("d039"),l=r.RangeError,h=r.Int8Array,d=h&&h.prototype,f=d&&d.set,p=a.aTypedArray,g=a.exportTypedArrayMethod,m=!u((function(){var t=new Uint8ClampedArray(2);return i(f,t,{length:1,0:3},1),3!==t[1]})),y=m&&a.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=s(arguments.length>1?arguments[1]:void 0,1),n=c(t);if(m)return i(f,this,n,e);var r=this.length,a=o(n),u=0;if(a+e>r)throw l("Wrong length");while(u<a)this[e+u]=n[u++]}),!m||y)},4089:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-card"},[e("div",{staticClass:"ac-card__left"},[e("div",{staticClass:"ac-card__content",style:{width:"".concat(1===t.layout?980:1960,"px")}},[t.paperTree.length?[1===t.acMode?e("ac-lattice",{ref:"latticeCard"}):e("ac-sweep",{ref:"sweepCard"})]:t._e()],2)]),t.showConfig?e("ac-answer-config",t._b({on:{download:t.download,save:t.save}},"ac-answer-config",t.config,!1)):t._e()],1)},i=[];function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"===typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}n("d9e2");function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){return o(t)||s(t)||c(t)||u()}var h=n("639e"),d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-lattice"},[e("ac-virtual",{on:{change:t.setDomList}}),e("ac-panel",{attrs:{"dom-list":t.domList}})],1)},f=[],p=(n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1"),n("a38e"));function g(t,e,n){return e=Object(p["a"])(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v=n("53ca");function _(){
1
+ module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="4089")}({"00ee":function(t,e,n){var r=n("b622"),i=r("toStringTag"),a={};a[i]="z",t.exports="[object z]"===String(a)},"0366":function(t,e,n){var r=n("4625"),i=n("59ed"),a=n("40d5"),o=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},"04f8":function(t,e,n){var r=n("2d00"),i=n("d039"),a=n("da84"),o=a.String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"06cf":function(t,e,n){var r=n("83ab"),i=n("c65b"),a=n("d1e7"),o=n("5c6c"),s=n("fc6a"),c=n("a04b"),u=n("1a2d"),l=n("0cfb"),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=s(t),e=c(e),l)try{return h(t,e)}catch(n){}if(u(t,e))return o(!i(a.f,t,e),t[e])}},"07fa":function(t,e,n){var r=n("50c4");t.exports=function(t){return r(t.length)}},"0b83":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-end-mark-box",class:"mark-".concat(t.type)},[t._v(" "+t._s(t.title)+"请在框中画 ✓"),e("div",{staticClass:"check-box"})])},i=[],a={name:"AcEndMarkBox",props:{title:{type:String,default:""},type:{type:String,default:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),a=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,n){var r=n("e330"),i=Error,a=r("".replace),o=function(t){return String(i(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!i.prepareStackTrace)while(e--)t=a(t,s,"");return t}},"0d51":function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"13d2":function(t,e,n){var r=n("e330"),i=n("d039"),a=n("1626"),o=n("1a2d"),s=n("83ab"),c=n("5e77").CONFIGURABLE,u=n("8925"),l=n("69f3"),h=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=r("".slice),m=r("".replace),y=r([].join),v=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),_=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===g(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||c&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=h(t);return o(r,"source")||(r.source=y(_,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return a(this)&&d(this).source||u(this)}),"toString")},"13d5":function(t,e,n){"use strict";var r=n("23e7"),i=n("d58f").left,a=n("a640"),o=n("2d00"),s=n("605d"),c=!s&&o>79&&o<83,u=c||!a("reduce");r({target:"Array",proto:!0,forced:u},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},"13ed":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mark-point"},[e("div",{staticClass:"mark-point__top-left",style:3===t.layout&&{top:"20px",left:"20px"},attrs:{"data-export_name":"左上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__top-right",style:3===t.layout&&{top:"20px",right:"20px"},attrs:{"data-export_name":"右上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__bottom-left",style:3===t.layout&&{bottom:"20px",left:"20px"},attrs:{"data-export_name":"左下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__bottom-center",style:3===t.layout&&{bottom:"20px"},attrs:{"data-export_name":"底部中心标志点_".concat(t.pageIndex),"data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__full"})]),e("div",{staticClass:"mark-point__bottom-right",style:3===t.layout&&{bottom:"20px",right:"20px"},attrs:{"data-export_name":"右下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),1===t.layout?[e("div",{staticClass:"mark-point__top-left__one mark-point__full",attrs:{"data-export_name":"顶部左侧标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__top-right__one mark-point__full",attrs:{"data-export_name":"顶部右侧标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}})]:t._e(),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-center__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__left mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__right mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}})]):t._e(),e("div",{staticClass:"mark-point__left-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__left-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-left_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e()],2)},i=[],a={name:"AcMarkPoint",props:{pageIndex:{type:Number}},computed:{pageShiftBinary:function(){var t=this.pageIndex.toString(2).padStart(4,"0");return t.split("")},layout:function(){return this.$store.getters["AC/layout"]},positionStyle:function(){var t={"--coords":3===this.layout?"20px":"30px"};return t}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"14d9":function(t,e,n){"use strict";var r=n("23e7"),i=n("7b0b"),a=n("07fa"),o=n("3a34"),s=n("3511"),c=n("d039"),u=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=u||!l();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),n=a(e),r=arguments.length;s(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return o(e,n),n}})},1626:function(t,e,n){var r=n("8ea1"),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},"182d":function(t,e,n){var r=n("f8cd"),i=RangeError;t.exports=function(t,e){var n=r(t);if(n%e)throw i("Wrong offset");return n}},"19aa":function(t,e,n){var r=n("3a9b"),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},"1a2d":function(t,e,n){var r=n("e330"),i=n("7b0b"),a=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},"1d02":function(t,e,n){"use strict";var r=n("ebb5"),i=n("a258").findLastIndex,a=r.aTypedArray,o=r.exportTypedArrayMethod;o("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"1d80":function(t,e,n){var r=n("7234"),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},"1fb5":function(t,e,n){"use strict";e.byteLength=l,e.toByteArray=d,e.fromByteArray=g;for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function l(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r}function h(t,e,n){return 3*(e+n)/4-n}function d(t){var e,n,r=u(t),o=r[0],s=r[1],c=new a(h(t,o,s)),l=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function p(t,e,n){for(var r,i=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),i.push(f(r));return i.join("")}function g(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,c=n-i;s<c;s+=o)a.push(p(t,s,s+o>c?c:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"21a6":function(t,e,n){(function(n){var r,i,a;(function(n,o){i=[],r=o,a="function"===typeof r?r.apply(e,i):r,void 0===a||(t.exports=a)})(0,(function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function r(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){c(r.response,e,n)},r.onerror=function(){},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,e,n){var s=o.URL||o.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?a(c):i(c.href)?r(t,e,n):a(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){a(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,o){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,o),n);else if(i(t))r(t,n,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){a(s)}))}}:function(t,e,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,c=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&c||s)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(t);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=c.saveAs=c,t.exports=c}))}).call(this,n("c8ba"))},"23cb":function(t,e,n){var r=n("5926"),i=Math.max,a=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):a(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,a=n("9112"),o=n("cb2d"),s=n("6374"),c=n("e893"),u=n("94ca");t.exports=function(t,e){var n,l,h,d,f,p,g=t.target,m=t.global,y=t.stat;if(l=m?r:y?r[g]||s(g,{}):(r[g]||{}).prototype,l)for(h in e){if(f=e[h],t.dontCallGetSet?(p=i(l,h),d=p&&p.value):d=l[h],n=u(m?h:g+(y?".":"#")+h,t.forced),!n&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&a(f,"sham",!0),o(l,h,f,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),a=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,a)}},2638:function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e,n=1;n<arguments.length;n++)for(var r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)}var i=["attrs","props","domProps"],a=["class","style","directives"],o=["on","nativeOn"],s=function(t){return t.reduce((function(t,e){for(var n in e)if(t[n])if(-1!==i.indexOf(n))t[n]=r({},t[n],e[n]);else if(-1!==a.indexOf(n)){var s=t[n]instanceof Array?t[n]:[t[n]],u=e[n]instanceof Array?e[n]:[e[n]];t[n]=[].concat(s,u)}else if(-1!==o.indexOf(n))for(var l in e[n])if(t[n][l]){var h=t[n][l]instanceof Array?t[n][l]:[t[n][l]],d=e[n][l]instanceof Array?e[n][l]:[e[n][l]];t[n][l]=[].concat(h,d)}else t[n][l]=e[n][l];else if("hook"===n)for(var f in e[n])t[n][f]=t[n][f]?c(t[n][f],e[n][f]):e[n][f];else t[n]=e[n];else t[n]=e[n];return t}),{})},c=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=s},2834:function(t,e,n){"use strict";var r=n("ebb5"),i=n("e330"),a=n("59ed"),o=n("dfb9"),s=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,l=i(r.TypedArrayPrototype.sort);u("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),n=o(c(e),e);return l(n,t)}))},2877:function(t,e,n){"use strict";function r(t,e,n,r,i,a,o,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},"2b16":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],style:{"--layout":t.layout},attrs:{visible:t.currentVisible,"custom-class":"ac-preview",top:"20px"},on:{"update:visible":function(e){t.currentVisible=e},opened:t.handleOpen,close:function(e){t.imgList=[]}}},[t._l(t.imgList,(function(t,n){return e("img",{key:n,staticClass:"ac-preview__item",attrs:{src:t}})})),t.imgList.length?e("i",{staticClass:"el-icon-circle-close",attrs:{slot:"footer"},on:{click:function(e){t.currentVisible=!1}},slot:"footer"}):t._e()],2)},i=[],a=n("5dcc"),o={name:"AcPreview",props:{visible:{type:Boolean,default:!1},selector:{type:String,required:!0}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},layout:function(){return this.$store.getters["AC/layout"]}},data:function(){return{imgList:[],loading:!1}},methods:{handleOpen:function(){var t=this,e=$(this.selector);e.length&&(this.loading=!0,Object(a["b"])(e).then((function(e){t.imgList=e,t.loading=!1})).catch((function(){t.loading=!1})))}}},s=o,c=n("2877"),u=Object(c["a"])(s,r,i,!1,null,null,null),l=u.exports;l.install=function(t){t.component(l.name,l)};e["default"]=l},"2ba4":function(t,e,n){var r=n("40d5"),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},"2d00":function(t,e,n){var r,i,a=n("da84"),o=n("342f"),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(r=l.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},"342f":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e){var n=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw n("Maximum allowed index exceeded");return t}},"3a34":function(t,e,n){"use strict";var r=n("83ab"),i=n("e8b5"),a=TypeError,o=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,n){var r=n("e330");t.exports=r({}.isPrototypeOf)},"3bbe":function(t,e,n){var r=n("1626"),i=String,a=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},"3c5d":function(t,e,n){"use strict";var r=n("da84"),i=n("c65b"),a=n("ebb5"),o=n("07fa"),s=n("182d"),c=n("7b0b"),u=n("d039"),l=r.RangeError,h=r.Int8Array,d=h&&h.prototype,f=d&&d.set,p=a.aTypedArray,g=a.exportTypedArrayMethod,m=!u((function(){var t=new Uint8ClampedArray(2);return i(f,t,{length:1,0:3},1),3!==t[1]})),y=m&&a.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=s(arguments.length>1?arguments[1]:void 0,1),n=c(t);if(m)return i(f,this,n,e);var r=this.length,a=o(n),u=0;if(a+e>r)throw l("Wrong length");while(u<a)this[e+u]=n[u++]}),!m||y)},4089:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-card"},[e("div",{staticClass:"ac-card__left"},[e("div",{staticClass:"ac-card__content",style:{width:"".concat(1===t.layout?980:1960,"px")}},[t.paperTree.length?[1===t.acMode?e("ac-lattice",{ref:"latticeCard"}):e("ac-sweep",{ref:"sweepCard"})]:t._e()],2)]),t.showConfig?e("ac-answer-config",t._b({on:{download:t.download,save:t.save}},"ac-answer-config",t.config,!1)):t._e()],1)},i=[];function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"===typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}n("d9e2");function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){return o(t)||s(t)||c(t)||u()}var h=n("639e"),d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-lattice"},[e("ac-virtual",{on:{change:t.setDomList}}),e("ac-panel",{attrs:{"dom-list":t.domList}})],1)},f=[],p=(n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1"),n("a38e"));function g(t,e,n){return e=Object(p["a"])(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v=n("53ca");function _(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- _=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),s=new E(i||[]);return r(o,"_invoke",{value:A(t,n,s)}),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var h={};function d(){}function f(){}function p(){}var g={};c(g,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(S([])));y&&y!==e&&n.call(y,a)&&(g=y);var b=p.prototype=d.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function i(r,a,o,s){var c=l(t[r],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==Object(v["a"])(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,o,s)}),(function(t){i("throw",t,o,s)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return i("throw",t,o,s)}))}s(c.arg)}var a;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return a=a?a.then(r,r):r()}})}function A(t,e,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return I()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=p,r(b,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=c(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(C.prototype),c(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new C(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function b(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){b(a,r,i,o,s,"next",t)}function s(t){b(a,r,i,o,s,"throw",t)}o(void 0)}))}}var C=n("d4ec"),A=n("bee2"),x=n("4e0a"),k=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-question ck-content",attrs:{"data-key":t.dataKey}},[t.formatChoices.length||"hand"===t.readType?e("div",{staticClass:"ac-question__prefix"},[e("ac-answer-box",{attrs:{label:t.formatChoices.length?t.showQuestion?"答案":t.plainTitle:"得分",direction:t.formatChoices.length?"column":"row",width:t.formatChoices.length&&!t.showQuestion?144:128}})],1):t._e(),!t.formatChoices.length||t.showQuestion?e("div",{staticClass:"ac-question__content"},[t.formatTitle||t.formatPrefix?e("div",{staticClass:"ac-question__title",style:t.titleAlign?{"text-align":t.titleAlign}:""},[t.formatPrefix?e("div",{staticClass:"ac-question__title-prefix",class:{"is-float":!!t.formatTitle,"is-bold":t.showQuestion},domProps:{innerHTML:t._s(t.formatPrefix)}}):t._e(),t.formatTitle?e("div",{staticClass:"ac-question__title-inner",domProps:{innerHTML:t._s(t.formatTitle)}}):t._e()]):t._e(),t.formatChoices.length?e("ac-choice",{attrs:{list:t.formatChoices,wrap:t.choiceWrap}}):t._e()],1):t._e()])},T=[],E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice"},[t.wrap?[e("div",{staticClass:"ac-choice__list"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1),t.list.length%2?t._e():e("div",{staticClass:"ac-choice__list--half"},t._l(Array(t.list.length/2).fill(""),(function(n,r){return e("div",{key:r,staticClass:"row-direction"},t._l(t.list.slice(2*r,2*r+2),(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)})),0),e("div",{staticClass:"ac-choice__list--all"},[e("div",{staticClass:"row-direction"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)])]:e("div",{staticClass:"ac-choice__list--nowrap"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)],2)},S=[],I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice__item"},[t.identifier?e("div",{staticClass:"ac-choice__prefix"},[t._v(t._s(t.identifier)+".")]):t._e(),t.content?e("div",{staticClass:"ac-choice__content",domProps:{innerHTML:t._s(t.content)}}):t._e()])},O=[],L={name:"AcChoiceItem",props:{identifier:{type:String,default:""},content:{type:String,default:""}}},B=L,P=n("2877"),R=Object(P["a"])(B,I,O,!1,null,null,null),j=R.exports,M={name:"AcChoice",components:{AcChoiceItem:j},props:{list:{type:Array,default:function(){return[]}},wrap:{type:Boolean,default:!0}}},z=M,N=Object(P["a"])(z,E,S,!1,null,null,null),D=N.exports,U=n("fbd7"),H={name:"AcQuestion",components:{AcChoice:D,AcAnswerBox:U["default"]},props:{title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},titleAlign:{type:String,default:""},prefix:{type:String,default:""},prefixEditable:{type:Boolean,default:!1},choices:{type:Array,default:function(){return[]}},choiceEditable:{type:Boolean,default:!0},choiceWrap:{type:Boolean,default:!0},dataKey:{type:String,default:""},plainTitle:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},formatTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||(this.showQuestion?this.title:"")},formatPrefix:function(){return this.showQuestion?this.prefix:this.plainTitle},formatChoices:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).choices||this.choices||[]},readType:function(){return this.$store.getters["AC/readType"]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]}}},F=H,K=Object(P["a"])(F,k,T,!1,null,null,null),W=K.exports;W.install=function(t){t.component(W.name,W)};var V,Y,Z=W,G=n("8f60"),Q=n("e6c4"),X=n("0b83"),q=function(){window.MathJax&&(window.MathJax.Hub.Config({showProcessingMessages:!1,messageStyle:"none",jax:["input/TeX","output/HTML-CSS"],tex2jax:{inlineMath:[["\\(","\\)"],["\\[","\\]"]],displayMath:[],skipTags:["script","noscript","style","textarea","pre"]},"HTML-CSS":{showMathMenu:!1}}),window.isAcMathJaxConfig=!0)},J=function(t){if(window.MathJax)return window.isAcMathJaxConfig||q(),new Promise((function(e){window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,document.getElementById(t)]),window.MathJax.Hub.Queue((function(){e()}))}))},tt=n("5dcc"),et={name:"AcVirtual",components:{AcEssay:x["default"],AcQuestion:Z,AcAnswerBox:U["default"],AcGraffiti:G["default"],AcBasicInfo:Q["default"],AcEndMarkBox:X["default"]},data:function(){return{continueObjectiveCount:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]},readType:function(){return this.$store.getters["AC/readType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},getEditedTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},splitDom:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r=0,i=0,a=[],o=[];if(t){if(t.childNodes.length){var s=t.childNodes[t.childNodes.length-1];t.childNodes.length>1&&(2!==t.childNodes.length||"\n"!==s.textContent)?o=t.childNodes:t.childNodes[0].childNodes.length&&"FIGURE"!==t.childNodes[0].nodeName&&(o=t.childNodes[0].childNodes)}o.length||(o=t.childNodes)}for(var c=0;c<o.length;c++){var u=o[c];if(-1===["P","DIV","IMG","FIGURE"].indexOf(u.nodeName))try{"#text"===u.nodeName?n+=u.textContent:n+=u.outerHTML}catch(g){}else{var l=getComputedStyle(u),h=Number(l.marginTop.replace("px",""))||0,d=Number(l.marginBottom.replace("px",""))||0,f=Object(tt["c"])(u);a.length&&(f-=i),n+=u.outerHTML,r+=f+$(u).outerHeight()+h+d,a.push({type:e,content:n,height:r}),n="",r=0,i=Object(tt["c"])(u)+$(u).outerHeight()+h+d}}if(n){var p=$(t).outerHeight();a.push({type:e,content:n,height:a.length?p-i:p})}return a},getDomList:function(){var t=this,e=function(e,n,i){var a={dataKey:i,children:[],updatePage:e.updatePage,updatePiece:e.updatePiece,editable:e.editable},o=null,s=0;if((e.title||e.prefix)&&(t.showQuestion||!e.choices)){var c=n.find(".ac-question__title")[0],u=n.find(".ac-question__title-inner")[0],l=n.find(".ac-question__title-prefix")[0],h=n.find(".ac-answer-box")[0],d=getComputedStyle(c),f=Number(d.paddingTop.replace("px",""))||0,p=Number(d.paddingBottom.replace("px",""))||0,g=[];if(u?(g=t.splitDom(u,"questionTitleItem"),g.length&&(h&&(s=$(h).outerHeight(),g[0].answerBoxHeight=s,g[0].needAnswerBox=!0,o=g[0]),g[0].prefix=(null===l||void 0===l?void 0:l.outerHTML)||"",g[0].height+=f,g[g.length-1].height+=p,g.forEach((function(t,n){t.hasChoice=e.choices&&e.choices.length,t.titleAlign=e.titleAlign,e.hideMoveUp&&(t.hideMoveUp=e.hideMoveUp),e.hideMoveDown&&(t.hideMoveDown=e.hideMoveDown)})))):l&&(g=[{type:"questionTitleItem",prefix:l.outerHTML,height:Math.max($(l).outerHeight()+f+p,h?$(h).outerHeight():0),content:"",needAnswerBox:!!h}]),g.length){var m={children:g};a.children.push(m)}}if(e.choices)if(t.showQuestion){var y={},v=n.find(".ac-choice")[0];if(!1===e.choiceWrap)Object.assign(y,{type:"choiceItem",height:$(v).outerHeight(),content:v.outerHTML});else{var _=$(v).outerWidth(),b=$(v).find(".ac-choice__list").outerWidth();if(_>=b*e.choices.length)Object.assign(y,{type:"choiceItem",height:$(v).find(".ac-choice__list--all").outerHeight(),content:$(v).find(".ac-choice__list--all")[0].outerHTML});else{y.children=[];var w=$(v).find(".ac-choice__list .ac-choice__item"),C="ac-choice__list";!(e.choices.length%2)&&_>=2*b&&(C="ac-choice__list--half",w=$(v).find(".ac-choice__list--half .row-direction")),Array.from(w).forEach((function(t){y.children.push({type:"choiceItem",height:$(t).outerHeight(),content:t.outerHTML,wrapperClass:C})}))}}a.children.push(y)}else{var A=n.find(".ac-answer-box")[0];a.children.push({type:"plainBox",boxContent:e.plainTitle,height:t.continueObjectiveCount%5===0?$(A).outerHeight():0}),t.continueObjectiveCount++}else t.continueObjectiveCount=0;if(o){var x=0,k=function t(e){e.forEach((function(e){e.children?t(e.children):x+=e.height}))};k(a.children),s-x>0&&(o.height+=s-x)}if(r.push(a),e.essay){var T={type:"essay",essay:Object.assign({rowCount:4},e.essay),dataKey:i};if(e.essay.title){var E=n.find(".ac-essay__title")[0];T.essay.titleChildren=t.splitDom(E)}r.push(T)}e.dimensions&&r.push({type:"dimension",dimensions:e.dimensions,dataKey:i})},n=function n(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];a.forEach((function(a,s){var c=[].concat(l(o),[a[a.idProp||"id"]||s]),u=i.find(".ac-virtual__section[data-key=".concat(c.join("_"),"]"));if(Array.isArray(a.children)&&a.children.length){t.continueObjectiveCount=0;var h=u.find(".ac-virtual__title")[0];if(h||"complex"===a.code){var d={};if("complex"===a.code){var f=u.find(".ac-material__title-prefix")[0],p=u.find(".ac-material__title-inner")[0],g=[];p?(g=t.splitDom(p,"materialItem"),g.length&&(g[0].prefix=(null===f||void 0===f?void 0:f.outerHTML)||"",g[0].height+=16)):f&&(g=[{type:"materialItem",prefix:f.outerHTML,height:$(f).outerHeight()+16,content:""}]),d={dataKey:c.join("_"),children:g,editable:a.editable}}else d={dataKey:c.join("_"),height:$(h).outerHeight(),content:h.innerHTML,updatePage:a.updatePage,updatePiece:a.updatePiece,editable:a.editable};r.push(d)}if(a.prefixMarker){var m=u.find(".ac-end-mark-box.mark-prefix")[0];r.push({dataKey:c.join("_"),height:$(m).outerHeight(),content:m.outerHTML,type:"prefixMarker"})}if(n(a.children,c),a.suffixMarker){var y=u.find(".ac-end-mark-box.mark-suffix")[0];r.push({dataKey:c.join("_"),height:$(y).outerHeight(),content:y.outerHTML,type:"suffixMarker"})}}else{if("graffiti"===t.readType){var v=u.find(".ac-graffiti__wrapper")[0];v&&r.push({type:"graffiti",dataKey:c.join("_"),height:$(v).outerHeight(),content:v.innerHTML})}if(e(a,u,c.join("_")),a.prefixMarker){var _=u.find(".ac-end-mark-box.mark-prefix")[0];r.push({dataKey:c.join("_"),height:$(_).outerHeight(),content:_.outerHTML,type:"prefixMarker"})}}}))},r=[],i=$(".ac-virtual"),a=i.find(".ac-basicInfo");if(a){var o=a.find(".ac-basicInfo__title"),s=a.find(".ac-attention"),c=a.find(".ac-basic-info__edu");r.push({type:"basicInfo",headHeight:null===o||void 0===o?void 0:o.outerHeight(),attentionHeight:null===s||void 0===s?void 0:s.outerHeight(),eduHeight:null===c||void 0===c?void 0:c.outerHeight()})}n(this.paperTree),this.$emit("change",r)},getTitle:function(t,e){var n=this.$createElement,r=t.title,i=t.prefix,a=t.plainTitle,o=t.code,s=this.editTitleList.find((function(t){return t.dataKey===e})),c=s||{},u=c.title,l=c.editKey,h=s?u:this.showQuestion||"complex"!==o?r:"",d=this.showQuestion?i:a;return h||d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title")},[d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title-prefix").concat(this.showQuestion?" is-bold":"").concat(h?" is-float":"")},[n("div",{domProps:{innerHTML:d}})]):null,h?n("div",{key:"virtual_title_".concat(l),class:"ac-".concat("complex"===o?"material":"virtual","__title-inner ck-content"),domProps:{innerHTML:h}}):null]):null},getList:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.$createElement,i=t.map((function(t,i){var a=[].concat(l(n),[t[t.idProp||"id"]||i]);return r("div",{key:"".concat(i,"_").concat(t[t.idProp||"id"]||""),class:"ac-virtual__section",attrs:{"data-key":a.join("_")}},[Array.isArray(t.children)&&t.children.length?r("div",[e.getTitle(t,a.join("_")),t.prefixMarker?r("ac-end-mark-box",{attrs:{type:"prefix",title:t.prefixMarker.title}}):null,e.getList(t.children,a),t.suffixMarker?r("ac-end-mark-box",{attrs:{type:"suffix",title:t.suffixMarker.title}}):null]):r("div",["graffiti"!==e.readType||t.choices?null:r("ac-graffiti",{attrs:{scanName:t.scanName,score:t.score}}),r("ac-question",{key:"virtual_question_".concat(e.getEditedKey(a.join("_"))),props:y({},Object.assign({dataKey:a.join("_")},t))}),t.prefixMarker?r("ac-end-mark-box",{attrs:{type:"prefix",title:t.prefixMarker.title}}):null,t.essay?r("ac-essay",{props:y({},Object.assign(t.essay,{title:e.getEssayTitle(a.join("_"),t.essay.title)}))}):null])])}));return i}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},key:"virtual_"+this.readType},[t("ac-basic-info"),this.getList(this.paperTree)])}},nt=et,rt=Object(P["a"])(nt,V,Y,!1,null,null,null),it=rt.exports;it.install=function(t){t.component(it.name,it)};var at=it,ot=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,r){return e("div",{key:r,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",style:{width:1===t.layout?"980px":"1960px"},attrs:{"data-page":r+1}},[t._l(n,(function(n,i){return e("ac-piece",{key:i,attrs:{"data-piece":r*t.layout+i,"data-page":r,list:n},on:{edit:t.handleEdit}})})),t.layout-n.length?e("div",{staticClass:"ac-piece"},[e("ac-restrict")],1):t._e(),"graffiti"===t.readType||t.scanSheet?e("ac-mark-point",{attrs:{"page-index":r}}):t._e(),e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(r+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")])],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||"",title:t.editorTitle},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},st=[],ct=(n("13d5"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-dimension",attrs:{"data-key":t.dataKey,"data-dimension-index":t.dimensionIndex}},[e("ul",{staticClass:"ac-dimension__inner"},[e("li",{staticClass:"ac-dimension__item"},[t._v(" "+t._s("body"===t.type?t.dimension:"")+" ")]),e("li",{staticClass:"ac-dimension__item"},["header"===t.type?e("span",[t._v("自我评价")]):e("ul",{staticClass:"dimension-stars"},t._l(5,(function(t){return e("i",{key:t,staticClass:"el-icon-star-off"})})),0)]),e("li",{staticClass:"ac-dimension__item"},["header"===t.type?e("span",[t._v("同伴评价")]):e("ul",{staticClass:"dimension-stars"},t._l(5,(function(t){return e("i",{key:t,staticClass:"el-icon-star-off"})})),0)])])])}),ut=[],lt={name:"AcDimension",props:{dimension:{type:String,default:""},type:{type:String,default:"body"},dataKey:{type:String,default:""},dimensionIndex:{type:Number,default:0}}},ht=lt,dt=Object(P["a"])(ht,ct,ut,!1,null,null,null),ft=dt.exports;ft.install=function(t){t.component(ft.name,ft)};var pt,gt,mt=ft,yt={bind:function(t,e){t._handleMouseEnter=function(){return e.value(!0)},t._handleMouseLeave=function(){return e.value(!1)},t.addEventListener("mouseenter",t._handleMouseEnter),t.addEventListener("mouseleave",t._handleMouseLeave)},unbind:function(t){t.removeEventListener("mouseenter",t._handleMouseEnter),t.removeEventListener("mouseleave",t._handleMouseLeave)}},vt={Hover:yt},_t={name:"AcPiece",components:{AcEssay:x["default"],AcAnswerBox:U["default"],AcBasicInfo:Q["default"],AcDimension:mt},props:{list:{type:Array,default:function(){return[]}}},inject:["contentEditable","paddingBlock","movable","deletable","editType","editCallback","deleteCallback","moveCallback","lineCallback"],directives:{hover:vt.Hover},data:function(){return{rowCountList:{},activePrefixKey:""}},computed:{paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){return"K"===this.sizeType?"1357px":"1386px"},piecePadding:function(){return"number"===typeof this.paddingBlock?"".concat(this.paddingBlock,"px 0px"):"".concat(this.paddingBlock[0]||0,"px 0px ").concat(this.paddingBlock[1]||0,"px")},setActivePrefixKey:function(){var t=this;return Object(tt["a"])((function(e){t.activePrefixKey=e}),100)}},methods:{getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},isWithSpace:function(t){var e=!1,n=t.split("_"),r=this.paperTree||[];return n.forEach((function(t,i){var a=r.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};r=a.children||[],i===n.length-1&&(e=a.choices&&a.choices.length)})),e},getSourceNode:function(t){var e=null,n=function n(r){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=0;a<r.length;a++){var o=r[a],s=[].concat(l(i),[o[o.idProp||"id"]||a]);if(t===s.join("_")){e=o;break}o.children&&o.children.length&&n(o.children,s)}};return n(this.paperTree||[]),e},handleClick:function(t,e){"text"===this.editType?this.editCallback&&this.editCallback(this.getSourceNode(t)):this.$emit("edit",t,e)},handleMove:function(t,e){this.moveCallback&&this.moveCallback(t,this.getSourceNode(e))},handleDelete:function(t){this.deleteCallback&&this.deleteCallback(this.getSourceNode(t))},handleLine:function(t,e){this.lineCallback&&this.lineCallback(t,this.getSourceNode(e))},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},handleHover:function(t,e){this.setActivePrefixKey(t?e.charAt(0):"")},getContent:function(t,e){var n=this,r=this.$createElement,i=null;switch(t.type){case"question":this.$set(this.rowCountList,t.dataKey,t.rowCount||void 0),i=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question ck-content".concat(this.activePrefixKey===t.dataKey[0]?" ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[t.answerBoxType?r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:"answer"===t.answerBoxType?"答案":"得分",direction:"answer"===t.answerBoxType?"column":"row"}})]):null,r("div",{class:"ac-question__content"+("hand"!==this.readType&&!this.isWithSpace(t.dataKey)||t.answerBoxType?"":" with-space")},[(this.movable||this.deletable||this.contentEditable)&&t.editable?r("div",{class:"ac-question__operation ac-edit-handler"},[this.movable&&!t.hideMoveUp?r("i",{class:"el-icon-top",on:{click:function(){return n.handleMove("up",t.dataKey)}}}):null,this.movable&&!t.hideMoveDown?r("i",{class:"el-icon-bottom",on:{click:function(){return n.handleMove("down",t.dataKey)}}}):null,this.deletable?r("i",{class:"el-icon-delete",on:{click:function(){return n.handleDelete(t.dataKey)}}}):null,this.contentEditable&&t.editable?r("i",{class:"el-icon-edit-outline",on:{click:function(){return n.handleClick(t.dataKey)}}}):null]):null,t.isTable?r("div",{class:"ac-question__line"},[r("span",["行数:"]),r("el-input-number",{attrs:{size:"small",value:this.rowCountList[t.dataKey],min:1,max:100,step:1,"step-strictly":!0},on:{change:function(e){return n.handleLine(e,t.dataKey)}}})]):null,r("div",{domProps:{innerHTML:t.content.join("")}})])]);break;case"essay":i=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.dataKey||""},props:y({},t.content[0]),class:"".concat(this.activePrefixKey===t.dataKey[0]?"ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]});break;case"dimension":i=t.content.map((function(n,i){return r("ac-dimension",{key:"dimension_".concat(e,"_").concat(i),attrs:{"data-key":t.dataKey||""},props:y({},n)})}));break;case"material":i=r("div",{key:"material_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-material ck-content",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[t.editBtn&&this.contentEditable?r("el-button",{class:"ac-material__edit",attrs:{type:"primary",size:"small"},on:{click:function(){return n.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,r("div",{domProps:{innerHTML:t.content.join("")}})]);break;case"plainBox":i=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question is-box".concat(t.isFollowBox?" is-follow":"")},[r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:this.getPlainTitle(t.dataKey)||t.boxContent,width:144,editable:!0,dataKey:t.dataKey}})])]);break;case"graffiti":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-graffiti__wrapper",domProps:{innerHTML:t.content}});break;case"basicInfo":i=r("ac-basic-info",{props:y({},t)});break;case"prefixMarker":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-prefix-marker",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[r("div",{domProps:{innerHTML:t.content}})]);break;case"suffixMarker":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-suffix-marker",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[r("div",{domProps:{innerHTML:t.content}})]);break;default:i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-piece__section".concat(this.activePrefixKey===t.dataKey[0]?" ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[this.movable||this.deletable||this.contentEditable&&t.editable?r("div",{class:"ac-section__operation ac-edit-handler"},[this.movable&&!t.hideMoveUp?r("i",{class:"el-icon-top",on:{click:function(){return n.handleMove("up",t.dataKey)}}}):null,this.movable&&!t.hideMoveDown?r("i",{class:"el-icon-bottom",on:{click:function(){return n.handleMove("down",t.dataKey)}}}):null,this.deletable?r("i",{class:"el-icon-delete",on:{click:function(){return n.handleDelete(t.dataKey)}}}):null,this.contentEditable&&t.editable?r("i",{class:"el-icon-edit-outline",on:{click:function(){return n.handleClick(t.dataKey)}}}):null]):null,r("div",{domProps:{innerHTML:t.content}})])}return i}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight,padding:this.piecePadding}},[this.list.map((function(e,n){return t.getContent(e,n)}))])}},bt=_t,wt=Object(P["a"])(bt,pt,gt,!1,null,null,null),Ct=wt.exports;Ct.install=function(t){t.component(Ct.name,Ct)};var At=Ct,xt=n("6bdf"),kt=n("13ed"),Tt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-restrict",style:{width:t.$store.getters["AC/layout"]>2?"580px":"868px",height:"number"===typeof t.height?"".concat(t.height,"px"):t.height,marginTop:"".concat(t.marginTop,"px")}})},Et=[],St={name:"AcRestrict",props:{height:{type:[Number,String],default:"100%"},marginTop:{type:Number,default:0}}},It=St,Ot=Object(P["a"])(It,Tt,Et,!1,null,null,null),Lt=Ot.exports;Lt.install=function(t){t.component(Lt.name,Lt)};var Bt=Lt,Pt={name:"AcPanel",components:{AcPiece:At,AcEditor:xt["default"],AcMarkPoint:kt["default"],AcRestrict:Bt},props:{domList:{type:Array,default:function(){return[]}}},inject:["showStudentInfo","paddingBlock","scanSheet"],data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0,editorTitle:"编辑题目"}},computed:{formatPanelList:function(){var t=this,e=[];return this.panelList.forEach((function(n,r){r%t.layout===0?e.push([n]):e[e.length-1].push(n)})),e},paperTree:function(){return this.$store.getters["AC/paperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},layout:function(){return this.$store.getters["AC/layout"]},latticeAttention:function(){return this.$store.getters["AC/latticeAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){var t="number"===typeof this.paddingBlock?2*this.paddingBlock:this.paddingBlock.reduce((function(t,e){return t+e}),0);return("K"===this.sizeType?1357:1386)-(t+10)},rowConfig:function(){return this.$store.getters["AC/rowConfig"]}},watch:{domList:function(t){t.length&&this.getPanelList()},panelFlag:function(){this.getPanelList()}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleEdit:function(t,e){var n={dataKey:t,content:"",hasChoice:!1},r=this.editTitleList.find((function(e){return e.dataKey===t}));if(r){var i=r.title,a=void 0===i?"":i,o=r.choices,s=void 0===o?[]:o;n.content+=a||"",s.length&&(n.hasChoice=!0,n.content+=s.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join(""))}else{var c=t.split("_"),u=this.paperTree||[];c.forEach((function(t,e){var r=u.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};u=r.children||[],e===c.length-1&&(n.content+=r.title||"",r.choices&&r.choices.length&&(n.hasChoice=!0,n.content+=r.choices.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join("")))}))}this.editing=n,this.editorTitle=e,this.visible=!0},handleSubmit:function(t){var e=this.editing,n=e.dataKey,r=e.hasChoice,i={dataKey:n};if(r){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],u=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");u={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(u)}else u?u.content+=t:s+=t})),Object.assign(i,{title:s,choices:c})}else i.title=t;this.$store.dispatch("AC/paper/setEditTitle",i)},getBasicInfo:function(t){var e=null;return t&&!this.scanSheet||(e={hideStudentInfo:!this.showStudentInfo,hideAttention:!this.showAttention,height:this.headHeight+(this.showAttention?this.attentionHeight:0)+this.eduHeight}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var r=this.pieceHeight,i=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(r-=e.height,i.push(Object.assign({type:"basicInfo"},e)))},s=function(){n++,e[n]=[],r=t.pieceHeight,i=e[n],o()},c=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=["","inner"].includes(i)?0:30,o=r-(n?32:0)-a;return Math.floor((o+e)/(t+e))},u=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.editable,o=!1,s="",c="",u=!1,l=!1,h=!1,d=t.map((function(t){var e="";switch(t.type){case"choice":e="<div class=".concat(t.className,">").concat(t.children.join(""),"</div>");break;case"questionTitle":o=t.isFirst,l=t.hideMoveUp,h=t.hideMoveDown,t.needAnswerBox&&(s="score"),t.hasChoice&&t.needAnswerBox&&(s="answer");var r=t.children.join("");e="<div class='ac-question__title' ".concat(t.titleAlign?'style="text-align: '.concat(t.titleAlign,'"'):"",">").concat(t.prefix||"").concat(r?"<div class='ac-question__title-inner'>".concat(r,"</div>"):"","</div>");break;case"essayArea":e=t.essayConfig;break;case"dimensionItem":e=t.payload;break;case"material":o=t.isFirst,n="material";var i=t.children.join("");e="<div class='ac-material__title'>".concat(t.prefix||"").concat(i?"<div class='ac-material__title-inner'>".concat(i,"</div>"):"","</div>");break;case"plainBox":n="plainBox",c=t.boxContent,u=t.isFollow;break;default:e=t.content}return e}));t.length=0,i.push({type:n,dataKey:e,content:d,editable:o&&a,hideMoveUp:!!o&&l,hideMoveDown:!!o&&h,answerBoxType:s,boxContent:c,isFollowBox:u})},l=function(e,n,i){var a=e.rowHeight,o=e.rowGap,l=e.titleChildren,h=e.borderType,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType),p=t.rowConfig[f]||{};a="number"===typeof a?a:p.rowHeight||0,o="number"===typeof o?o:p.rowGap||0,r<30&&s();var g={type:"essayArea"};if(l){var m="";l.forEach((function(t,a){r>=t.height+(a?0:32)?(m+=t.content,r-=t.height+(a?0:32)):(m&&i.push({type:"essayArea",essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d,bgType:f})}),i.length&&u(i,n,"essay"),s(),m=t.content,r-=t.height+32)})),m?Object.assign(g,{essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d})}):g=null}else g=null;if(!d)return g?i.push(g):(i.push({type:"essayArea",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30),void u(i,n,"essay");var y=d;while(y){var v=c(a,o,!g,h);if(v<1)g&&(i.push(g),g=null),i.length&&u(i,n,"essay"),s();else if(v<y)i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:v,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})}),g&&(g=null),u(i,n,"essay"),s(),y-=v;else{i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:y,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})});var _=["","inner"].includes(h)?0:30;r-=y*(a+o)-o+(g?0:32)+_,y=0,g&&(g=null)}}},h=function(t,e,n){var i=t.length+1,a=i;while(a){var o=Math.floor(r/46);if(o<1)n.length&&u(n,e,"dimension"),s();else if(o<a){for(var c=i-a,l=0;l<o;l++){var h=c+l-1;n.push({type:"dimensionItem",payload:{type:c+l===0?"header":"body",dimension:t[h]||"",dimensionIndex:h}})}u(n,e,"dimension"),s(),a-=o}else{for(var d=i-a,f=0;f<a;f++){var p=d+f-1;n.push({type:"dimensionItem",payload:{type:d+f===0?"header":"body",dimension:t[p]||"",dimensionIndex:p}})}r-=46*a,a=0}}},d=function t(e,n,i,a){var o=a.editable;e.forEach((function(e,a){if(e.children)t(e.children,n,i,{editable:o});else{var c=e.height;if(!a&&e.answerBoxHeight&&(c=Math.max(c,e.answerBoxHeight)),r<c&&(i.length&&u(i,n,"question",{editable:o}),s(),["questionTitleItem","materialItem"].includes(e.type)&&a&&(e.height+=16)),r>=e.height){switch(e.type){case"choiceItem":i.length&&"choice"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"choice",className:e.wrapperClass,children:[e.content]});break;case"questionTitleItem":i.length&&"questionTitle"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"questionTitle",prefix:e.prefix,children:[e.content],hideMoveUp:e.hideMoveUp,hideMoveDown:e.hideMoveDown,isFirst:!a,hasChoice:e.hasChoice,needAnswerBox:e.needAnswerBox,titleAlign:e.titleAlign});break;case"materialItem":i.length&&"material"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"material",prefix:e.prefix,children:[e.content],isFirst:!a});break;case"plainBox":i.push({type:"plainBox",isFollow:!e.height,boxContent:e.boxContent});break;default:i.push(e.content)}r-=e.height}}}))},f=JSON.parse(JSON.stringify(this.domList));f.forEach((function(n){if(n){if(n.updatePiece)s();else if(n.updatePage)for(var c=2*t.layout,f=c-(e.length%c||c)+1,p=0;p<f;p++)s();n.children?n.children&&(d(n.children,n.dataKey,a,{editable:n.editable}),a.length&&u(a,n.dataKey,"question",{editable:n.editable})):"essay"===n.type?(l(n.essay,n.dataKey,a),a.length&&u(a,n.dataKey,"essay")):"dimension"===n.type?(h(n.dimensions,n.dataKey,a),a.length&&u(a,n.dataKey,"dimension")):"basicInfo"===n.type?(t.headHeight=n.headHeight||0,t.attentionHeight=t.latticeAttention.height||n.attentionHeight||0,t.showStudentInfo&&(t.showEducationId?t.eduHeight=t.eduIdLength>10&&0!==t.registrationType?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)),o()):(r<n.height&&s(),r>=n.height&&(i.push({type:n.type||"",dataKey:n.dataKey,content:n.content,editable:n.editable}),r-=n.height))}})),this.panelList=e}}},Rt=Pt,jt=Object(P["a"])(Rt,ot,st,!1,null,null,null),Mt=jt.exports;Mt.install=function(t){t.component(Mt.name,Mt)};var zt=Mt,Nt=n("cf03"),Dt=n.n(Nt),Ut=n("c4e3"),$t=n.n(Ut),Ht=n("21a6"),Ft=n.n(Ht),Kt={name:"AcLattice",components:{AcVirtual:at,AcPanel:zt},inject:["uploadOss","paperTitle","scanSheet"],data:function(){return{domList:[],questionRects:[]}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(C["a"])(this,e),this.file=t}return Object(A["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){t(e.file,n)}))}}]),e}()}},methods:{setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(tt["b"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.scanSheet){e.next=4;break}return e.next=3,t.downloadSweep();case 3:return e.abrupt("return",e.sent);case 4:return e.next=6,t.getPositionData();case 6:return n=e.sent,e.next=9,t.getPdfFile();case 9:return r=e.sent,i=r.file,a=r.urlList,o="".concat(("K"===t.sizeType?195:210)*t.layout,"mm*").concat("K"===t.sizeType?270:297,"mm"),s={file:i,positionList:n,paperSize:o,pageImgs:a},e.abrupt("return",s);case 15:case"end":return e.stop()}}),e)})))()},getPdfFile:function(){var t=this;return w(_().mark((function e(){var n,r,i,a;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getPageImage();case 2:return n=e.sent,r="K"===t.sizeType?1===t.layout?[552.76,765.35]:[765.35,1105.51]:1===t.layout?"a4":"a3",i=new Dt.a(1===t.layout?"p":"l","pt",r),n.forEach((function(e,r){var a=1===t.layout?"K"===t.sizeType?552.76:595.28:"K"===t.sizeType?1105.51:1190.55,o="K"===t.sizeType?765.35:841.89;i.addImage(e,"JPEG",0,0,a,o),r!==n.length-1&&i.addPage()})),a=i.output("blob"),e.abrupt("return",{file:a,urlList:n});case 8:case"end":return e.stop()}}),e)})))()},downloadSweep:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"扫描答题卡不能超过16页",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getPdfFile();case 5:return n=e.sent,r=n.file,i=n.urlList,e.next=10,t.getZipContent();case 10:return a=e.sent,o=$(".ac-panel .ac-piece__wrapper")[0],s={questionRects:t.questionRects,intrinsicWidth:$(o).outerWidth(),intrinsicHeight:$(o).outerHeight()},e.abrupt("return",{file:r,pageImgs:i,zipFile:a,rectInfo:s});case 14:case"end":return e.stop()}}),e)})))()},pxToNumber:function(t){return Number((t||"").replace("px",""))},getSweepData:function(){var t=this,e=[],n=function(e,n){var r=n.essayInfo,i=n.isObjective,a=[];return e.forEach((function(e){var n=$(e).parents(".ac-piece__wrapper"),i=$(n).find(".mark-point__top-left")[0],o=$(i).offset(),s=o.left,c=o.top,u=$(e).offset().left-s,l=u+$(e).outerWidth(),h=$(e).offset().top-c,d=h+$(e).outerHeight(),f=Number(n.data("page")),p=a.find((function(t){return t.pageNum===f}));if(p)p.left=Math.min(p.left,u),p.right=Math.max(p.right,l),p.top=Math.min(p.top,h),p.bottom=Math.max(p.bottom,d);else{var g={pageNum:f,left:u,right:l,top:h,bottom:d};if(r&&5===r.bgType){var m=getComputedStyle(e),y=t.pxToNumber(m.getPropertyValue("--row")),v=t.pxToNumber(m.getPropertyValue("--row-height")),_=t.pxToNumber(m.getPropertyValue("--row-gap")),b=t.pxToNumber(m.getPropertyValue("--column"));g.rowInfo={Row:y,RowGap:_,Size:v,Column:b};for(var w=[],C=0;C<y;C++)w.push({Type:"AnswerArea",Page:"第".concat(f,"页"),X:Math.floor(u),Y:Math.floor(h+C*v+(C+1)*_),Width:b*v,Height:v,Index:C});w.length&&(g.children=w)}a.push(g)}})),a.map((function(t){var e=t.pageNum,n=t.left,r=t.right,a=t.top,o=t.bottom,s=t.rowInfo,c=t.children,u={Type:"AnswerArea",Page:"第".concat(e,"页"),X:Math.floor(n),Y:Math.floor(a),Width:Math.ceil(r-n),Height:Math.ceil(o-a)};return i&&(u.QuestionType="Objective"),s&&Object.assign(u,y({},s)),c&&(u.Children=c),u}))},r=function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,a){var o=[].concat(l(i),[r[r.idProp||"id"]||a]);if(r.scanInfo){var s=[],c=$(".ac-panel");if(Array.isArray(r.children)&&r.children.length)r.children.forEach((function(t,e){var n=[].concat(l(o),[t[t.idProp||"id"]||e]),r=c.find("div[data-key=".concat(n.join("_"),"] .ac-essay"));s.push.apply(s,l(r))}));else{var u=o.join("_"),h="div[data-key=".concat(u,"]");r.choices?h="div[data-key=".concat(u,"] .ac-answer-box"):r.essay?h="wrapper"===r.essay.sweepRange?"div[data-key=".concat(u,"] .ac-essay"):"div[data-key=".concat(u,"] .ac-essay__area"):r.table&&(h="div[data-key=".concat(u,"] .ac-table__area-of-piece"));var d=c.find(h);s.push.apply(s,l(d))}var f=n(s,{essayInfo:r.essay,isObjective:Boolean(r.choices)});e.push.apply(e,l(f.map((function(t){return y(y({},t),r.scanInfo)}))))}else Array.isArray(r.children)&&r.children.length&&t(r.children,o)}))};return r(this.paperTree),e},getPositionData:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],r=function(e,n,r){var i=r||$(e).parents(".ac-piece__wrapper"),a=i.offset(),o=a.left,s=a.top,c=$(e).offset(),u=c.left,l=c.top,h=u-o,d=h+$(e).outerWidth(),f=l-s,p=f+$(e).outerHeight(),g={page_left_top:"(".concat(t.pxToAU(h),",").concat(t.pxToAU(f),")"),page_right_bottom:"(".concat(t.pxToAU(d),",").concat(t.pxToAU(p),")"),question_page:i.data("page")};if("hand"===t.readType&&n){var m=$(e).find(".ac-answer-box")[0];if(m){var y=$(m).offset(),v=y.left,_=y.top;Object.assign(g,{mark_left_top:"(".concat(t.pxToAU(v-o),",").concat(t.pxToAU(_-s),")"),mark_right_bottom:"(".concat(t.pxToAU(v-o+$(m).outerWidth()),",").concat(t.pxToAU(_-s+$(m).outerHeight()),")")})}}return g},i=function(e){var n=[];return e.forEach((function(t){var e=$(t).parents(".ac-piece__wrapper"),r=e.data("page"),i=e.offset(),a=i.left,o=i.top,s=$(t).offset(),c=s.left,u=s.top,l=c-a,h=l+$(t).outerWidth(),d=u-o,f=d+$(t).outerHeight(),p=n.find((function(t){return t.question_page===r}));p?(p.leftPosition=Math.min(p.leftPosition,l),p.rightPosition=Math.max(p.rightPosition,h),p.topPosition=Math.min(p.topPosition,d),p.bottomPosition=Math.max(p.bottomPosition,f)):n.push({question_page:r,leftPosition:l,rightPosition:h,topPosition:d,bottomPosition:f})})),n.map((function(e){var n=e.leftPosition,r=e.rightPosition,i=e.topPosition,a=e.bottomPosition,o=e.question_page;return{page_left_top:"(".concat(t.pxToAU(n),",").concat(t.pxToAU(i),")"),page_right_bottom:"(".concat(t.pxToAU(r),",").concat(t.pxToAU(a),")"),question_page:o}}))},a=function(t,e){var a=e.join("_"),o=$(".ac-panel"),s=l(o.find("div[data-key=".concat(a,"]"))),c=[],u={},h={};if(t.prefixMarker){var d=o.find(".ac-prefix-marker[data-key=".concat(a,"]"));Object.assign(u,r(d))}if(t.suffixMarker){var f=o.find(".ac-suffix-marker[data-key=".concat(a,"]"));Object.assign(h,r(f))}var p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];return Array.isArray(e)?(e.forEach((function(e,a){var s=[],u=[].concat(l(n),[a]),h=o.find("div[data-key=".concat(u.join("_"),"]"));if(s.push.apply(s,l(h)),e.children&&s.push.apply(s,l(t(e.children,u))),e.positionInfo){var d=i(s);c.push.apply(c,l(d.map((function(t){return y(y({},t),e.positionInfo)}))))}r.push.apply(r,s)})),r):r};s.push.apply(s,l(p(t.children,e)));var g=i(s);n.push.apply(n,l(g.map((function(e){var n=y(y({subQuestionPositions:c},e),t.positionInfo);return t.prefixMarker&&Object.assign(n,{prefixMarkerInfo:u}),t.suffixMarker&&Object.assign(n,{suffixMarkerInfo:h}),n}))))},o=function e(o){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];o.forEach((function(o,c){var u=[].concat(l(s),[o[o.idProp||"id"]||c]);if(o.prefixMarker||o.suffixMarker)a(o,u);else if(Array.isArray(o.children)&&o.children.length)e(o.children,u);else{var h=u.join("_"),d=$(".ac-panel");if(o.choices){var f=d.find(".ac-question[data-key=".concat(h,"] .ac-answer-box"))[0];f&&n.push(Object.assign(r(f),o.positionInfo||{}))}else if(o.essay){var p=t.editEssayList.find((function(t){return t.dataKey===h}))||{},g="number"===typeof p.row?0===p.row:0===o.essay.rowCount,m=p.title||o.essay.title,v=[];if(g){var _=m?".ac-essay__wrapper[data-key=".concat(h,"]"):".ac-question[data-key=".concat(h,"]");v=d.find(_)}else v=d.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(h,"],"):"",".ac-essay__wrapper[data-key=").concat(h,"]").concat("area"===o.essay.range?" .ac-essay__area":""));for(var b=0;b<v.length;b++){var w=r(v[b],!0);n.push(Object.assign(w,o.positionInfo||{}))}}else if(o.dimensions){for(var C=d.find(".ac-dimension[data-key=".concat(h,"]")),A=i(Array.from(C)),x=[],k={count:5,width:t.pxToAU(32),height:t.pxToAU(32),gap:t.pxToAU(4)},T=0;T<C.length;T++){var E=C[T],S=Number($(E).data("dimension-index"));if(-1!==S){var I=$(E).find(".dimension-stars")[0],O=$(E).find(".dimension-stars")[1],L=$(I).find("i")[0],B=$(O).find("i")[0];x.push({dimension:o.dimensions[S],dimensionIndex:S,selfStars:y(y({},r(L)),k),partnerStars:y(y({},r(B)),k)})}}n.push.apply(n,l(A.map((function(t){return y(y({subQuestionPositions:x},t),o.positionInfo)}))))}else for(var P=d.find(".ac-question[data-key=".concat(h,"]")),R=0;R<P.length;R++){var j=r(P[R],!0);n.push(Object.assign(j,o.positionInfo||{}))}}}))},o(t.paperTree),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))()},pxToAU:function(t){var e="K"===this.sizeType?195:210;return Math.floor(t*e*8/294*100)/100},getZipContent:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=1===t.registrationNumberType,a=new $t.a,o="".concat(n,"模板_").concat(n,"_").concat(2===t.layout?"A3":"A4","_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(r.length,"_").concat(i?"涂点":"条码","_").concat(i?"10":"-1","_").concat(i?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(r).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(tt["b"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,c=new Uint8Array(o);while(o--)c[o]=i.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return u=e.sent,l="".concat(n,"模板.zip"),Ft()(u,l),e.abrupt("return",new File([u],l,{type:"zip"}));case 18:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),r=function(n,r){var i=$(n).offset(),a=i.left,o=i.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var i=$(n),s=i.data("export_name");if(s){var c="absolute"===i.data("scan-type"),h={Type:"AnswerArea",Name:s,Page:r,X:Math.floor(i.offset().left-(c?a:u)),Y:Math.floor(i.offset().top-(c?o:l)),Width:Math.ceil(i.outerWidth()),Height:Math.ceil(i.outerHeight())};"考号"===i.data("export_name")&&(h.Rows=10,h.Columns=t.educationIdValue),e.push(h)}}))};Array.from(n).forEach((function(t,e){r(t,"第".concat(e+1,"页"))})),this.questionRects=this.getSweepData(),e.push.apply(e,l(this.questionRects));var i='<?xml version="1.0" encoding="utf-8"?>';return i+='<answerSheet isNew="true" isTFishProject="true" layout="'.concat(this.layout,'">'),i+=this.getXMLStringFromArray(e),i+="</answerSheet>",i},getXMLStringFromArray:function(t){var e=this,n=function(t){return Object.keys(t).map((function(n){return"Type"===n?"":"Children"===n?"<Children>".concat(e.getXMLStringFromArray(t[n]),"</Children>"):"<".concat(n,">").concat(t[n],"</").concat(n,">")})).join("")};return t.map((function(t){return"<".concat(t.Type,">").concat(n(t),"</").concat(t.Type,">")})).join("")}}},Wt=Kt,Vt=Object(P["a"])(Wt,d,f,!1,null,null,null),Yt=Vt.exports,Zt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-sweep"},[e("ac-sweep-virtual",{attrs:{tree:t.sweepPaperTree},on:{change:t.setDomList}}),e("ac-sweep-panel",{attrs:{"dom-list":t.domList}})],1)},Gt=[],Qt=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__choice",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom"],attrs:{"data-key":t.dataKey}},[Array.isArray(t.listData)?t._l(t.listData,(function(n,r){return e("div",{key:r,staticClass:"ac-sweep__choice-wrapper"},[e("ul",{class:["ac-sweep__choice-box"],style:{gridTemplateColumns:"row"===t.objectiveOrder?"repeat(".concat(n.questionsWidth.length,", auto)"):"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridTemplateRows:"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridAutoFlow:t.objectiveOrder}},t._l(n.questions,(function(n,i){return e("li",{key:"".concat(r,"_").concat(i),ref:"choiceEach_".concat(r,"_").concat(i),refInFor:!0,staticClass:"ac-sweep__choice-each"},[e("span",{staticClass:"choice-title",style:{width:t.isComplex?"50px":"20px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"".concat(r,"_").concat(i))}}},[t._v(" "+t._s(t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n.choices,(function(n,a){return e("span",{key:"".concat(r,"_").concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])})),0)])})):[e("div",{staticClass:"ac-sweep__choice-wrapper"},[e("ul",{staticClass:"ac-sweep__choice-box"},[e("li",[e("span",{staticClass:"choice-title",attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"0")}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,r){return e("span",{key:r,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])])])]],2)},Xt=[],qt={name:"AcSweepChoice",components:{},props:{list:{type:[Array,Object]},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isComplex:{type:Boolean,default:!1},dataKey:{type:[String,Number]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]}},watch:{objectiveOrder:function(t){this.convertTree(this.list)}},mounted:function(){this.convertTree(this.list)},data:function(){return{listData:null}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(this.dataKey,"_").concat(e)})},convertTree:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++){var r=t[n];"single_choice"===r.code?(0!==n&&"single_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r)):"multiple_choice"===r.code?(0!==n&&"multiple_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r)):"judgment"===r.code&&(0!==n&&"judgment"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r))}this.listData=e,this.getChoiceWidth(this.listData)}},getChoiceWidth:function(t){var e=this;t.forEach((function(t){t.questions.forEach((function(n){t.questionsWidth.push(6+(e.isComplex?50:20)+30*n.choices.length-8+28)}))})),this.listData.forEach((function(t){t.questionsWidth=e.designLayout(e.objectiveOrder,t.questionsWidth)}))},designLayout:function(t,e){var n=$(".ac-sweep__choice").innerWidth()-64,r=function(t){return t.reduce((function(t,e){return Math.max(t,e)}),0)},i=function(t){return t.reduce((function(t,e){return Math.min(t,e)}),n)},a=function(t,r){var i=[];return e.forEach((function(n,a){var o="row"===r?a%t:Math.floor(a/(e.length/t));i[o]=Math.max(i[o]||0,n)})),n-i.reduce((function(t,e){return t+e}),0)},o=r(e),s=i(e),c=Math.floor(n/o),u=c,l=!0;while(l){var h=a(u,t);h<s||u>=e.length?l=!1:u+=1}var d=Array(u).fill("").map((function(n,r){return e.filter((function(n,i){if("row"===t)return i%u===r;var a=Math.ceil(e.length/u);return i<(r+1)*a&&i>=r*a}))}));return d}}},Jt=qt,te=Object(P["a"])(Jt,Qt,Xt,!1,null,null,null),ee=te.exports;ee.install=function(t){t.component(ee.name,ee)};var ne=ee,re=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__composite",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom",t.isComplex&&"is-padding",t.isHideBorderTop&&"hide-border-top",t.isPaddingTop&&"is-padding-top",t.isHidePaddingTop&&"is-hide-padding-top"],attrs:{"data-key":t.dataKey,type:"composite","page-index":t.pageIndex}},[t.getLiContent?e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getLiContent)}}):e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getTitle)}}),e("el-button",{staticClass:"edit-btn",attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}})],1)},ie=[],ae={name:"AcSweepComposite",components:{AcEditor:xt["default"]},props:{title:{type:String,default:""},blankNum:{type:Number,default:0},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isHideBorderTop:{type:Boolean,default:!1},dataKey:{type:String,default:""},isComplex:{type:Boolean,default:!1},isPaddingTop:{type:Boolean,default:!1},isHidePaddingTop:{type:Boolean,default:!1},pageIndex:{type:Number,default:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},getTitle:function(){var t=new Array(this.blankNum).fill("").map((function(){return'<span style="display: inline-block; height: 40px; vertical-align: text-top"><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></span>'}));return'<span style="height: 40px;">'.concat(this.title,"</span>").concat(t.join("、"))},getLiContent:function(){var t=this,e=this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},mounted:function(){},data:function(){return{editorVisible:!1,editContent:""}},methods:{getFullTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.$refs.compositeContent.innerHTML},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/paper/setEditTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")}}},oe=ae,se=Object(P["a"])(oe,re,ie,!1,null,null,null),ce=se.exports;ce.install=function(t){t.component(ce.name,ce)};var ue,le,he=ce,de={name:"AcSweepComplex",components:{AcSweepChoice:ne,AcSweepCompletion:he,AcEssay:x["default"],AcEditor:xt["default"]},props:{list:{type:[Array,Object]},isShowBorderBottom:{type:Boolean,default:!1},dataKey:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},created:function(){this.init()},data:function(){return{listTree:null,editorVisible:!1,editContent:""}},methods:{init:function(){this.listTree=this.convertTree(this.list)},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},convertTree:function(t){for(var e=t.children,n=[],r=0;r<e.length;r++){var i=e[r];("single_choice"===i.code||"multiple_choice"===i.code||"judgment"===i.code)&&r<e.length-1&&("single_choice"===e[r+1].code||"multiple_choice"===e[r+1].code||"judgment"===e[r+1].code)?(n.push([i,e[r+1]]),r++):n.push(i)}return t.children=n,t},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.listTree.title},editTitle:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},getList:function(t){var e=this,n=this.$createElement;return t.map((function(t,r){return n("div",{key:"".concat(r,"_").concat(t[t.idProp||"id"]||""),class:!t.code&&!Array.isArray(t)&&"ac-sweep__virtual-section",attrs:{"data-key":t.dataKey,"question-code":t.code}},[Array.isArray(t.children)&&t.children.length&&"complex"!==t.code?n("div",{class:"ac-sweep__virtual-box"},[!t.code&&e.getTitle(t,t.dataKey),e.getList(t.children)]):n("div",[Array.isArray(t)||"single_choice"===t.code||"multiple_choice"===t.code||"judgment"===t.code?n("ac-sweep-choice",{props:y({},{list:t,showBorder:!1,dataKey:t.dataKey,isComplex:!0})}):null,"completion"===t.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(t.dataKey)),props:y({},Object.assign({dataKey:t.dataKey,isComplex:!0},t))}):null,"subjectivity"===t.code?n("ac-essay",{props:y({},Object.assign(t.essay,{title:e.getEssayTitle(t.dataKey,t.title),hiddenBorderBoth:!1}))}):null,"complex"===t.code?n("ac-sweep-complex",{props:y({},{list:t,dataKey:t.dataKey})}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-sweep__complex ".concat(this.isShowBorderBottom&&"is-border-bottom")},[t("p",{class:"ac-sweep__complex-title",on:{click:this.editTitle},domProps:{innerHTML:this.getLiContent?this.getLiContent:this.listTree.title}}),this.getList(this.listTree.children),t("ac-editor",{attrs:{visible:this.editorVisible,content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}})])}},fe=de,pe=Object(P["a"])(fe,ue,le,!1,null,null,null),ge=pe.exports;ge.install=function(t){t.component(ge.name,ge)};var me,ye,ve=ge,_e={name:"AcSweepVirtual",components:{AcSweepChoice:ne,AcSweepCompletion:he,AcSweepComplex:ve,AcEssay:x["default"],AcBasicInfo:Q["default"]},props:{tree:{type:Array,default:function(){return[]}}},computed:{sweepPaperTree:function(){return this.$store.getters["AC/sweepPaperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},layout:function(){return this.$store.getters["AC/layout"]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},readType:function(){return this.$store.getters["AC/readType"]}},watch:{panelFlag:function(){var t=this;this.$nextTick((function(){return t.getDomList()}))}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},data:function(){return{}},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},getTitle:function(t,e){var n=this,r=this.$createElement,i=t.title;return r("div",{class:"ac-sweep__virtual-head",attrs:{contenteditable:!0,"data-key":e},domProps:{innerHTML:i},on:{blur:function(t){return n.handleBlur(t,e)}}})},getList:function(t){var e=this,n=this.$createElement;return t.map((function(r,i){return n("div",{key:"".concat(i,"_").concat(r[r.idProp||"id"]||""),class:!r.code&&!Array.isArray(r)&&"ac-sweep__virtual-section",attrs:{"data-key":r.dataKey||i,"question-code":r.code}},[Array.isArray(r.children)&&r.children.length&&"complex"!==r.code?n("div",{class:"ac-sweep__virtual-box"},[!r.code&&e.getTitle(r,r.dataKey||i),e.getList(r.children)]):n("div",[(e.layout>1?i%(2*e.layout)===0:e.patchwork?(i+1)%4===1:i%2===0)?n("ac-basic-info"):null,Array.isArray(r)||"single_choice"===r.code||"multiple_choice"===r.code||"judgment"===r.code?n("ac-sweep-choice",{props:y({},{list:r,isShowBorderBottom:i===t.length-1,dataKey:r.dataKey||i})}):null,"completion"===r.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(r.dataKey)),props:y({},Object.assign({dataKey:r.dataKey},r,{isShowBorderBottom:i===t.length-1,isPaddingTop:t[i-1]&&"completion"!==t[i-1].code&&"complexTitle"!==t[i-1].code,isHidePaddingTop:t[i-1]&&"completion"===t[i-1].code}))}):null,"subjectivity"===r.code?n("ac-essay",{props:y({},Object.assign(r.essay,{title:e.getEssayTitle(r.dataKey,r.title)}))}):null,"complex"===r.code?n("ac-sweep-complex",{props:y({},{list:r,isShowBorderBottom:i===t.length-1,dataKey:r.dataKey})}):null])])}))},splitDom:function(t){for(var e="",n=0,r=0,i=[],a=t.childNodes||[],o=0;o<a.length;o++){var s=a[o];if(-1===["P","DIV","IMG"].indexOf(s.nodeName))try{"#text"===s.nodeName?e+=s.textContent:e+=s.outerHTML}catch(f){}else{var c=getComputedStyle(s),u=Number(c.marginTop.replace("px",""))||0,l=Number(c.marginBottom.replace("px",""))||0,h=s.offsetTop;i.length&&(h-=r),e+=s.outerHTML,n+=h+$(s).outerHeight()+u+l,i.push({content:e,height:n}),e="",n=0,r=s.offsetTop+$(s).outerHeight()+u+l}}if(e){var d=$(t).outerHeight();i.push({content:e,height:i.length?d-r:d})}return i},getDomList:function(){var t=this,e=function(e){e.forEach((function(e,n){var r=u.find(".ac-sweep__virtual-section[data-key=".concat(n,"]")),i=r.find(".ac-sweep__virtual-head")[0];i&&c.push({type:"sectionHead",height:t.editTitleList.find((function(t){return t.dataKey===n}))?t.editTitleList.find((function(t){return t.dataKey===n})).height:$(i).outerHeight(),content:i.innerHTML,dataKey:$(i).data("key")}),Array.isArray(e.children)&&e.children&&e.children.forEach((function(t,n){var i=t.dataKey,a=r.find("div[data-key=".concat(i,"]"))[0];s(t,a,!1,n===e.children.length-1,i)}))}))},n=function(e,n){var r=t.layout>2?520:808,i=function(t){return t.reduce((function(t,e){return Math.max(t,e.width)}),0)},a=function(t){return t.reduce((function(t,e){return Math.min(t,e.width)}),r)},o=function(t,e){var i=[];return n.forEach((function(r,a){var o="row"===e?a%t:Math.floor(a/(n.length/t));i[o]=Math.max(i[o]||0,r.width)})),r-i.reduce((function(t,e){return t+e}),0)},s=i(n),c=a(n),u=Math.floor(r/s),l=u,h=!0;while(h){var d=o(l,e);d<c||l>=n.length?(h=!1,d<0&&(l-=1)):l+=1}var f=Array(l).fill("").map((function(t,r){return n.filter((function(t,i){if("row"===e)return i%l===r;var a=Math.ceil(n.length/l);return i<(r+1)*a&&i>=r*a}))}));return f.forEach((function(t){var e=i(t);t.forEach((function(t){t.columnWidth=e}))})),f},r=function(e,r){if(Array.isArray(e)){for(var o=[],s=0;s<e.length;s++){var c=e[s];"single_choice"===c.code?(0!==s&&"single_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"multiple_choice"===c.code?(0!==s&&"multiple_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"judgment"===c.code&&(0!==s&&"judgment"===e[s-1].code||o.push([]),o[o.length-1].push(c))}var u=[];return o.forEach((function(e){e.forEach((function(t){t.width=(i(t.title)?a(t.title):23)+6+30*t.choices.length-8+18}));for(var r=n(t.objectiveOrder,e),o=r[0].length,s=function(t){u.push(r.map((function(e){return e.find((function(e,n){return n===t}))})))},c=0;c<o;c++)s(c)})),u}},i=function(t){var e=o(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},a=function(t){var e=o(t).length;return e>6?56:6===e?48:e<6?40:void 0},o=function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},s=function e(n,i,a,o,s){if(Array.isArray(n)){var u=r(n,a);u.forEach((function(t,e){c.push({height:0===e||u.length-1===e?44:24,type:"objective",isComplex:a,isShowBorderBottom:o,dataKey:s,list:t})}))}else switch(n.code){case"single_choice":case"multiple_choice":case"judgment":c.push(Object.assign({height:44,type:"objective",isComplex:a,isShowBorderBottom:o},n));break;case"completion":var l=$(i).find(".ac-sweep__composite-title")[0],h=t.splitDom(l);h.forEach((function(t){t.type="completionItem",t.isComplex=a})),!h.length||a&&"graffiti"!==t.readType||(h[0].height+=15),"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"completion",isComplex:a,isShowBorderBottom:o,dataKey:n.dataKey,height:$(l).outerHeight(),children:h});break;case"subjectivity":var d=$(i).find(".ac-essay__title")[0];"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"essay",dataKey:s,essay:Object.assign({rowCount:4,dataKey:n.dataKey,isComplex:a,titleChildren:t.splitDom(d)},n.essay)});break;case"complex":var f=$(i).find(".ac-sweep__complex-title")[0],p=t.splitDom(f);p.length&&(p[0].type="complexTitleItem"),c.push({type:n.title?"complexTitle":null,children:p}),n.children&&n.children.forEach((function(t,r){var a=$(i).find("div[data-key=".concat(t.dataKey,"]"));e(t,a,!0,r===n.children.length-1,t.dataKey)}));break}},c=[],u=$(".ac-virtual"),l=u.find(".ac-basicInfo");if(l){var h=l.find(".ac-basicInfo__title"),d=l.find(".ac-attention"),f=l.find(".ac-basic-info__edu");c.push({type:"basicInfo",headHeight:null===h||void 0===h?void 0:h.outerHeight(),attentionHeight:null===d||void 0===d?void 0:d.outerHeight(),eduHeight:null===f||void 0===f?void 0:f.outerHeight()})}e(this.tree),this.$emit("change",c)}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},style:{width:this.$store.getters["AC/layout"]>2?"690px":"978px"}},[this.getList(this.tree)])}},be=_e,we=Object(P["a"])(be,me,ye,!1,null,null,null),Ce=we.exports;Ce.install=function(t){t.component(Ce.name,Ce)};var Ae=Ce,xe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,r){return e("div",{key:r,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",attrs:{"data-page-type":n.flat().length?"":"restrict"}},[n.length?t._l(n,(function(n,i){return e("ac-sweep-piece",{key:i,attrs:{"data-piece":r*t.layout+i,"data-page":r,list:n,"page-index":r}})})):e("div",{staticClass:"ac-piece"},[e("ac-restrict",{attrs:{height:1250}})],1),e("ac-mark-point",{attrs:{"page-index":r}}),t.isAddFooter?e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(r+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")]):t._e()],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||""},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},ke=[],Te=n("2638"),Ee=n.n(Te),Se=function(){var t=this,e=t._self._c;return e("div",{class:["objective","is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"is-hide_Border-top"]},[Array.isArray(t.list)?t._l(t.list,(function(n,r){return e("div",{key:r,class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},t._l(n.list,(function(i,a){return e("div",{key:"".concat(r,"_").concat(a),staticClass:"ac-sweep__choice-each",style:{width:i&&"".concat(i.columnWidth,"px"),height:i&&"".concat(n.height,"px"),lineHeight:i&&"".concat(24,"px"),paddingTop:"".concat(0===r&&n.height-24,"px"),paddingBottom:"".concat(r===t.list.length-1&&n.height&&i-24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":i&&i.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:i&&t.isHasBrackets(i.title)?"".concat(t.convertWidth(i.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,i.dataKey)}}},[t._v(" "+t._s(i&&t.getBeforeChinese(i.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(i&&i.choices,(function(n,o){return e("span",{key:"".concat(r,"_").concat(a,"_").concat(o),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==i.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])})),0)})):[t.list.list?e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap",paddingTop:"10px",paddingBottom:"10px"}},t._l(t.list.list,(function(n,r){return e("div",{key:"".concat(r),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(t.list.height-20,"px"),lineHeight:n&&"".concat(24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&t.isHasBrackets(n.title)?"".concat(t.convertWidth(n.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(i,a){return e("span",{key:"".concat(r,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==n.code?i.identifier:t.judgmentMode?"T"===i.identifier?"✓":"×":i.identifier)+" ")])})),0)])})),0):e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},[e("div",{staticClass:"ac-sweep__choice-each",style:{width:"".concat(t.list.columnWidth,"px"),height:"".concat(t.list.height,"px"),lineHeight:"".concat(t.list.height,"px"),whiteSpace:"nowrap"},attrs:{"data-key":t.list.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:t.isHasBrackets(t.list.title)?"".concat(t.convertWidth(t.list.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,t.list.dataKey)}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,r){return e("span",{key:r,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==t.list.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])])]],2)},Ie=[],Oe={name:"AcObjective",components:{},props:{list:{type:[Array,Object]},isHideBorderTop:{type:Boolean,default:!1},isShowBorderBottom:{type:Boolean,default:!1},pageIndex:{type:Number,default:0}},computed:{objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},judgmentMode:function(){return this.$store.getters["AC/judgmentMode"]}},watch:{},mounted:function(){},data:function(){return{}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);if(-1===n)return t;var r=t.slice(0,n);return r.endsWith(".")?r.slice(0,-1):r}},isHasBrackets:function(t){var e=this.getBeforeChinese(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},convertWidth:function(t){var e=this.getBeforeChinese(t).length;return e>6?56:6===e?48:e<6?40:void 0},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(e)})}}},Le=Oe,Be=Object(P["a"])(Le,Se,Ie,!1,null,null,null),Pe=Be.exports;Pe.install=function(t){t.component(Pe.name,Pe)};var Re,je,Me=Pe,ze={name:"AcSweepPiece",components:{AcEssay:x["default"],AcBasicInfo:Q["default"],AcSweepCompletion:he,AcObjective:Me,AcEditor:xt["default"],AcRestrict:Bt,AcGraffiti:G["default"]},props:{list:{type:Array,default:function(){return[]}},pageIndex:{type:Number,default:0}},computed:{pieceHeight:function(){return"1386px"},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sweepList:function(){return this.transformTree(this.list)},layout:function(){return this.$store.getters["AC/layout"]}},data:function(){return{editorVisible:!1,editContent:""}},methods:{handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e,height:t.target.offsetHeight}),this.$store.dispatch("AC/paper/resetPanel")},editTitle:function(t){var e=this;this.editContent=(this.editEssayList.find((function(t){return t.dataKey===e.dataKey}))||{}).title||t,this.editorVisible=!0},getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},transformTree:function(t){var e=this,n=new Set(["objective"]);return t.reduce((function(r,i,a){i.children&&(i.children=e.transformTree(i.children));var o=r[r.length-1];return o&&n.has(t[a-1].type)&&n.has(i.type)?(Array.isArray(o)?o.push(i):r[r.length-1]=[o,i],r):(r.push(i),r)}),[])},getContent:function(t,e){var n=this,r=this.$createElement,i=null;switch(!0){case"basicInfo"===t.type:i=r("ac-basic-info",{props:y({},t)});break;case"complexTitle"===t.type:i=r("div",{class:"ac-sweep__complex",style:{borderBottom:this.sweepList.length-1===e&&"1px solid #000"}},[r("p",{class:"ac-sweep__complex-title",on:{click:function(){return n.editTitle(t.content[0])}},domProps:{innerHTML:this.getLiContent?this.getLiContent:t.content[0]}})]);break;case"sectionHead"===t.type:i=r("div",{class:"ac-sweep__virtual-head",style:{marginTop:t.isMarginTop&&"30px"},attrs:{contenteditable:!0,dataKey:t.dataKey},domProps:{innerHTML:t.content},on:{blur:function(e){return n.handleBlur(e,t.dataKey)}}});break;case"graffiti"===t.type:i=r("ac-graffiti",{props:y({},Object.assign(t,{hideTopBorder:this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type}))});break;case"completion"===t.type:i=r("ac-sweep-completion",{props:y({},Object.assign(t,{dataKey:t.dataKey,title:this.getPlainTitle(t.dataKey)||t.content[0],isHideBorderTop:0!==e&&this.sweepList[e-1]&&["completion","complexTitle"].includes(this.sweepList[e-1].type),isPaddingTop:0==e||this.sweepList[e-1]&&"completion"!==this.sweepList[e-1].type&&"complexTitle"!==this.sweepList[e-1].type,isHidePaddingTop:this.sweepList[e-1]&&"completion"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type)}))});break;case"objective"===t.type||Array.isArray(t):i=r("ac-objective",{props:y({},{list:t,isHideBorderTop:0!==e&&this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||!!this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type)})});break;case"essay"===t.type:i=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.essayConfig.dataKey||"","page-index":this.pageIndex+1,"li-editable":!0},props:y({},y(y({},t.essayConfig),{},{hiddenBorderTop:0!==e&&"complexTitle"===this.sweepList[e-1].type,hiddenBorderBottom:e!==this.sweepList.length-1&&this.sweepList[e+1]&&("essay"===this.sweepList[e+1].type||"completion"===this.sweepList[e+1].type||"complexTitle"===this.sweepList[e+1].type),column:3===this.layout?13:20}))});break;case"restrict"===t.type:i=r("ac-restrict",{props:y({},{height:t.height,marginTop:30})});break}return i}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight}},[e("div",{class:this.$store.getters["AC/layout"]>2?"ac-module__ThreeColumn":"ac-module__column",style:{margin:"0 auto"}},[this.sweepList.length?this.sweepList.map((function(e,n){return t.getContent(e,n)})):e("ac-restrict",{props:y({},{height:1250})}),e("ac-editor",Ee()([{attrs:{visible:this.editorVisible}},{on:{"update:visible":function(e){return t.editorVisible=e}}},{attrs:{content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}}]))])])}},Ne=ze,De=Object(P["a"])(Ne,Re,je,!1,null,null,null),Ue=De.exports;Ue.install=function(t){t.component(Ue.name,Ue)};var $e=Ue,He={name:"AcSweepPanel",components:{AcSweepPiece:$e,AcEditor:xt["default"],AcMarkPoint:kt["default"],AcRestrict:Bt},props:{domList:{type:Array,default:function(){return[]}}},computed:{formatPanelList:function(){var t=this,e=[];if(this.panelList.length)if(this.panelList.forEach((function(n,r){r%t.layout===0?e.push([n]):e[e.length-1].push(n)})),1===this.layout&&e.length%2)e.push([]);else if(2===this.layout)e[e.length-1].length%2&&e[e.length-1].push([]),(1===e.length||e.length%2)&&e.push(l(Array(2).fill([])));else if(3===this.layout){var n;3!==e[e.length-1].length&&(n=e[e.length-1]).push.apply(n,l(Array(3-e[e.length-1].length).fill([]))),(1===e.length||e.length%2)&&e.push(l(Array(3).fill([])))}return e},pieceHeight:function(){return 1240},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},scansionAttention:function(){return this.$store.getters["AC/scansionAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},layout:function(){return this.$store.getters["AC/layout"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},isAddFooter:function(){return this.$store.getters["AC/addFooter"]}},watch:{domList:function(t){t.length&&this.getPanelList()}},mounted:function(){},data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleSubmit:function(t){var e=this.editing,n=e.dataKey,r=e.hasChoice,i={dataKey:n};if(r){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],u=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");u={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(u)}else u?u.content+=t:s+=t})),Object.assign(i,{title:s,choices:c})}else i.title=t;this.$store.dispatch("AC/paper/setEditTitle",i)},getBasicInfo:function(t){var e=null;return(this.layout>1?t%(2*this.layout)===0:this.patchwork?(t+1)%4===1:t%2===0)&&(e={hideAttention:!this.showAttention||0!==t,height:this.headHeight+(this.showAttention&&0===t?this.attentionHeight:0)+this.eduHeight}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var r=this.pieceHeight,i=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(r-=e.height,i.push(Object.assign({type:"basicInfo"},e)))},s=function(){var a=e[n];if(n++,e[n]=[],r=t.pieceHeight,i=e[n],o(),"graffiti"===a[a.length-1].type){var s=a[a.length-1];a.pop(),i.push(s),r-=30}},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=r-(n?62:30);return Math.floor((i+e)/(t+e))},u=function(t,e){var n="",r="",a=t.map((function(t){var e="";switch(t.type){case"completion":n="completion",r=t.height+1,e="".concat(t.children.join(""));break;case"complexTitle":n="complexTitle",r=t.height,e="".concat(t.children.join(""));break}return e}));t.length=0,i.push({height:r,type:n,isComplex:e.isComplex,isShowBorderBottom:e.isShowBorderBottom,dataKey:e.dataKey,content:a})},l=function(t,e){t.forEach((function(t,n){if("completionItem"===t.type&&!t.isComplex){var a=i[i.length-1];a&&("completion"===a.type||n)||(t.height+=15)}if("completionItem"===t.type&&t.isComplex){var o=i[i.length-1];o&&("completion"===o.type||"graffiti"===o.type||n)||(t.height+=15)}if(r<t.height&&(e.length&&u(e,t),s()),r>=t.height){switch(t.type){case"completionItem":e.length&&"completion"===e[e.length-1].type?e[e.length-1].children.push(t.content):e.push({type:"completion",height:t.height,children:[t.content]});break;case"complexTitleItem":e.length&&"complexTitle"===e[e.length-1].type?e[e.length-1].children.push(t.content):e.push({type:"complexTitle",height:t.height,children:[t.content]});break}r-=t.height}}))},h=function(e,n){var a=e.rowHeight,o=void 0===a?40:a,u=e.rowGap,l=void 0===u?15:u,h=e.titleChildren,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType);r<30&&s();var p={type:"essay"};if(h){var g="";h.forEach((function(t,n){r>=t.height+(n?0:32)?(g+=t.content,r-=t.height+(n?0:32)):(g&&i.push({type:"essay",essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d,bgType:f})}),s(),g=t.content,r-=t.height+32)})),g?Object.assign(p,{essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d})}):p=null}else p=null;if(d){var m=d;while(m){var y=c(o,l,!p);y<1?(p&&(i.push(p),p=null),s()):y<m?(i.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:y,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),p&&(p=null),s(),m-=y):(i.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:m,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),r-=m*(o+l)-l+(p?30:62),m=0,p&&(p=null))}}else p?i.push(p):(i.push({type:"essay",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30)},d=JSON.parse(JSON.stringify(this.domList));d.forEach((function(e,n){"essay"===e.type?h(e.essay,e.dataKey):"complexTitle"===e.type?(l(e.children,a,e),a.length&&u(a,e)):"completion"===e.type?(r<e.height&&s(),r>=e.height&&(l(e.children,a,e),a.length&&u(a,e))):"basicInfo"===e.type?(t.headHeight=e.headHeight||0,t.attentionHeight=t.scansionAttention.height||e.attentionHeight||0,t.registrationType?t.layout<3?t.eduHeight=t.eduIdLength>10?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)+14+310:t.eduHeight=t.layout<3?310:48*Math.ceil(t.stuInfoLength/3)+310,o()):(r<e.height&&s(),r>=e.height&&("sectionHead"===e.type&&"basicInfo"!==d[n-1].type&&1240!==r&&(e.height+=30,e.isMarginTop=!0),i.push(e),r-=e.height))})),r>54&&e[e.length-1].push({type:"restrict",height:r-30}),e.length>16&&1===this.layout&&(this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",2),this.$store.dispatch("AC/answerConfig/setDisableOneLayout",!0)),this.panelList=e}}},Fe=He,Ke=Object(P["a"])(Fe,xe,ke,!1,null,null,null),We=Ke.exports;We.install=function(t){t.component(We.name,We)};var Ve=We,Ye={name:"AcSweep",components:{AcSweepVirtual:Ae,AcSweepPanel:Ve},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],sweepPaperTree:[]}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(C["a"])(this,e),this.file=t}return Object(A["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){t(e.file,n)}))}}]),e}()},patchwork:function(){return this.$store.getters["AC/patchwork"]},downloadType:function(){return this.$store.getters["AC/downloadType"]},downloadSize:function(){return this.$store.getters["AC/downloadSize"]}},created:function(){this.init()},methods:{init:function(){this.sweepPaperTree=this.transformTree(this.createDataKey(this.$store.getters["AC/sweepPaperTree"]))},createDataKey:function(t){var e=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.forEach((function(e,r){var i=n?"".concat(n,"_").concat(r):"".concat(r);e.code&&(e.dataKey=i),e.children&&t(e.children,i)}))};return e(t),t},transformTree:function(t){var e=this,n=new Set(["single_choice","multiple_choice","judgment"]);return t.reduce((function(r,i,a){i.children&&(i.children=e.transformTree(i.children));var o=r[r.length-1];return o&&n.has(t[a-1].code)&&n.has(i.code)?(Array.isArray(o)?o.push(i):r[r.length-1]=[o,i],r):(r.push(i),r)}),[])},setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(tt["b"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h,d;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getZipContent();case 5:if(n=e.sent,r=n||"","PDF"!==t.downloadType){e.next=25;break}return e.next=10,t.getPageImage();case 10:return i=e.sent,a=new Dt.a(1===t.layout?"p":"l","pt",1===t.layout?"a4":"a3"),i.forEach((function(e,n){var r=1===t.layout?595.28:1190.55,o=841.89;a.addImage(e,"JPEG",0,0,r,o),n!==i.length-1&&a.addPage()})),o="".concat(t.paperTitle,".pdf"),a.save(o),s=a.output("blob"),s.name=o,c=new t.UploadAdapter(s),e.next=20,c.upload();case 20:return u=e.sent,l="https://"+u.url,e.abrupt("return",{scanZipUrl:r,scanPdfUrl:l});case 25:if("PNG"!==t.downloadType){e.next=31;break}return e.next=28,t.getPngZip();case 28:return h=e.sent,d=h||"",e.abrupt("return",{scanZipUrl:r,scanPdfUrl:d});case 31:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h,d,f;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=1===t.registrationNumberType,a=new $t.a,o="".concat(n,"模板_").concat(n,"_").concat(t.downloadSize,"_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(r.length,"_").concat(i?"涂点":"条码","_").concat(i?"10":"-1","_").concat(i?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(r).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(tt["b"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,c=new Uint8Array(o);while(o--)c[o]=i.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return u=e.sent,l="".concat(n,"模板.zip"),h=new File([u],l,{type:"zip"}),Ft()(u,l),d=new t.UploadAdapter(h),e.next=21,d.upload();case 21:return f=e.sent,e.abrupt("return","https://"+f.url);case 23:case"end":return e.stop()}}),e)})))()},getPngZip:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=new $t.a,a=[],Array.from(r).forEach((function(t,e){a.push({dom:t,name:"".concat(e+1,".png")})})),e.next=7,Object(tt["b"])(a.map((function(t){return t.dom})));case 7:return o=e.sent,o.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],o=atob(n[1]),s=o.length,c=new Uint8Array(s);while(s--)c[s]=o.charCodeAt(s);i.file(a[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=11,i.generateAsync({type:"blob"});case 11:return s=e.sent,c="".concat(n,".zip"),u=new File([s],c,{type:"zip"}),Ft()(s,c),l=new t.UploadAdapter(u),e.next=18,l.upload();case 18:return h=e.sent,e.abrupt("return","https://"+h.url);case 20:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),r=function(n,r){var i=$(n).offset(),a=i.left,o=i.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var i=$(n),s="absolute"===i.data("scan-type"),c={Type:"AnswerArea",Name:i.data("export_name"),Page:r,X:Math.floor(i.offset().left-(s?a:u)),Y:Math.floor(i.offset().top-(s?o:l)),Width:i.outerWidth(),Height:i.outerHeight()};String(c.X).indexOf(".")>-1&&(c.X=Math.floor(c.X),c.Width+=1),String(c.Y).indexOf(".")>-1&&(c.Y=Math.floor(c.Y),c.Height+=1),c.Width=Math.ceil(c.Width),c.Height=Math.ceil(c.Height),"考号"===i.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},i=function(t,n){var r=$(t).find(".mark-point__top-left")[0],i=$(r).offset(),a=i.left,o=i.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var r=$(t),i={Type:"ReviewArea",Name:r.data("scan-name"),Page:n,X:r.offset().left-a,Y:r.offset().top-o,Width:r.outerWidth(),Height:r.outerHeight(),MaxScore:r.data("scan-score")};String(i.X).indexOf(".")>-1&&(i.X=Math.floor(i.X),i.Width+=1),String(i.Y).indexOf(".")>-1&&(i.Y=Math.floor(i.Y),i.Height+=1),i.Width=Math.ceil(i.Width),i.Height=Math.ceil(i.Height),e.push(i)}))},a=[],o=function(t,e){var r=n.find(".ac-sweep__choice-each[data-key=".concat(t.dataKey,"]"))[0],i=($(r).find(".choice-title")[0],$(r).find(".ac-sweep__choice-item")[0]),o=r.getAttribute("page-index"),s=$(e[o-1]).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h={Type:"AnswerArea",Name:t.scanName,Page:"第".concat(o,"页"),X:$(i).offset().left-u+5,Y:$(i).offset().top-l-1,Width:$(i).outerWidth()-3,Height:$(i).outerHeight()+3,Rows:1,Columns:t.choices.length,Horizon:0};String(h.X).indexOf(".")>-1&&(h.X=Math.floor(h.X),h.Width+=1),String(h.Y).indexOf(".")>-1&&(h.Y=Math.floor(h.Y),h.Height+=1),h.Width=Math.ceil(h.Width),h.Height=Math.ceil(h.Height),a.push(h)},s=function t(e){var r=$(".ac-piece__wrapper");e.forEach((function(e){if(e.children)t(e.children);else if("completion"===e.code)for(var i=n.find(".ac-sweep__composite[data-key=".concat(e.dataKey,"]")),s=0;s<i.length;s++){var c=i[s].getAttribute("page-index"),u=$(r[c-1]).find(".mark-point__top-left")[0],l=$(u).offset(),h=l.left,d=l.top,f={Type:"AnswerArea",Name:"".concat(e.scanName).concat(s>0?"_"+s:""),Page:"第".concat(c,"页"),X:Math.floor($(i[s]).offset().left-h),Y:Math.floor($(i[s]).offset().top-d),Width:Math.ceil($(i[s]).outerWidth()),Height:Math.ceil($(i[s]).outerHeight())};a.push(f)}else if(Array.isArray(e)||"single_choice"===e.code||"multiple_choice"===e.code||"judgment"===e.code)Array.isArray(e)?e.forEach((function(t){o(t,r)})):o(e,r);else if("subjectivity"===e.code)for(var p=n.find(".ac-essay__wrapper[data-key=".concat(e.dataKey,"]")),g=0;g<p.length;g++){var m=p[g].getAttribute("page-index"),y=$(r[m-1]).find(".mark-point__top-left")[0],v=$(y).offset(),_=v.left,b=v.top,w={Type:"AnswerArea",Name:"".concat(e.scanName).concat(g>0?"_"+g:""),Page:"第".concat(m,"页"),X:Math.floor($(p[g]).offset().left-_),Y:Math.floor($(p[g]).offset().top-b),Width:Math.ceil($(p[g]).outerWidth()),Height:Math.ceil($(p[g]).outerHeight())};a.push(w)}}))};s(this.sweepPaperTree);var c=function(t){var e={};return t.forEach((function(t){var n=t.Page;e[n]||(e[n]=[]),e[n].push(t)})),Object.values(e)},u=c(a);Array.from(n).forEach((function(t,n){"restrict"!==$(t).data("piece-type")&&(r(t,"第".concat(n+1,"页")),i(t,"第".concat(n+1,"页")),Array.isArray(u[n])?e.push.apply(e,l(u[n])):e.push(u[n]))}));var h='<?xml version="1.0" encoding="utf-8"?>';return h+='<answerSheet isNew="true" isYcProject="true" layout="'.concat(this.layout,'" isScrabbled="').concat(this.patchwork,'">'),h+=this.getXMLStringFromArray(e),h+="</answerSheet>",h},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return t?"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">"):""})).join("")}}},Ze=Ye,Ge=Object(P["a"])(Ze,Zt,Gt,!1,null,null,null),Qe=Ge.exports,Xe={name:"AcCard",components:{AcAnswerConfig:h["default"],AcLattice:Yt,AcSweep:Qe},props:{title:{type:String,default:""},paperTitle:{type:String,default:""},tree:{type:Array,default:function(){return[]}},baseInfoList:{type:Array,default:function(){return[]}},mode:{type:Number,default:0},config:{type:Object,default:function(){return null}},uploadOss:{type:Function,default:function(){}},ClassicEditor:{type:Function,default:function(){}},contentEditable:{type:Boolean,default:!0},showConfig:{type:Boolean,default:!0},showStudentInfo:{type:Boolean,default:!0},saveInfo:{type:Object,default:null},paddingBlock:{type:[Number,Array],default:68},movable:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},editType:{type:String,default:"editor"},essayType:{type:Array,default:function(){return[0,1,2]}},essaySize:{type:Object,default:null},scanSheet:{type:Boolean,default:!1}},provide:function(){return{uploadOss:this.uploadOss,ClassicEditor:this.ClassicEditor,contentEditable:this.contentEditable,showStudentInfo:this.showStudentInfo,paperTitle:this.title||this.paperTitle,paddingBlock:this.paddingBlock,movable:this.movable,deletable:this.deletable,editType:this.editType,editCallback:this.editCallback,deleteCallback:this.deleteCallback,lineCallback:this.lineCallback,moveCallback:this.moveCallback,essayType:this.essayType,scanSheet:this.scanSheet}},data:function(){return{paperTree:[]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{tree:function(){this.initTree()},saveInfo:function(){this.handleSaveInfo()},title:function(){this.$store.dispatch("AC/paper/setTitle",this.title)}},beforeCreate:function(){if(!Promise.allSettled){var t=function(t){return{status:"rejected",reason:t}},e=function(t){return{status:"fulfilled",value:t}};Promise.allSettled=function(n){return Promise.all(n.map((function(n){return Promise.resolve(n).then(e,t)})))}}},created:function(){this.init(),this.baseInfoList&&(this.$store.dispatch("AC/answerConfig/setStudentInfo",[]),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.baseInfoList))},methods:{init:function(){this.essaySize&&this.$store.dispatch("AC/essay/setRowSize",this.essaySize),this.$store.dispatch("AC/essay/resetEssay"),this.$store.dispatch("AC/paper/setTitle",this.title),this.$store.dispatch("AC/answerConfig/setAnswerCardMode",this.mode),this.handleSaveInfo(),this.initTree()},handleSaveInfo:function(){var t=this;if(this.saveInfo){var e={},n={},r={};Object.keys(this.saveInfo).forEach((function(i){switch(i){case"title":case"editTitleList":case"candidateNumColor":case"scansionAttention":case"latticeAttention":e[i]=t.saveInfo[i];break;case"editEssayList":r[i]=t.saveInfo[i];break;case"answerCardMode":case"layout":case"showAttention":case"studentInfo":case"educationIdValue":case"registrationNumberType":case"readType":case"patchwork":case"showQuestion":case"sizeType":case"showEducationId":case"objectiveOrder":case"judgmentMode":case"addFooter":n[i]=t.saveInfo[i];break}})),this.$store.dispatch("AC/paper/setSaveState",e),this.$store.dispatch("AC/essay/setSaveState",r),this.$store.dispatch("AC/answerConfig/setSaveState",n)}},initTree:function(){var t=this,e=this.$store.getters["AC/editTitleList"],n=this.$store.getters["AC/editEssayList"].filter((function(t){return!!t.title}));Object(tt["d"])(this.tree.concat([].concat(l(e),l(n)))).then((function(){t.paperTree=t.tree,t.$store.dispatch(0===t.mode?"AC/paper/setSweepPaperTree":"AC/paper/setPaperTree",t.paperTree)}))},download:function(){var t=this;this.$emit("before-download"),this.save(),1===this.acMode?this.$refs.latticeCard&&this.$refs.latticeCard.download().then((function(e){t.$emit("download",e)})):0===this.acMode&&this.$refs.sweepCard&&this.$refs.sweepCard.download().then((function(e){t.$emit("download",e)}))},save:function(){var t=this,e=["title","editTitleList","candidateNumColor","editEssayList","answerCardMode","layout","showAttention","studentInfo","educationIdValue","registrationNumberType","readType","patchwork"],n=["latticeAttention","showQuestion","sizeType","showEducationId"],r=["scansionAttention","objectiveOrder","judgmentMode","addFooter"],i={},a=this.$store.getters["AC/answerCardMode"];e.concat(0===a?r:n).forEach((function(e){i[e]=t.$store.getters["AC/".concat(e)]})),this.$emit("save",i)},editCallback:function(t){this.$emit("edit-title",t)},deleteCallback:function(t){this.$emit("delete",t)},lineCallback:function(t,e){this.$emit("lineChanged",t,e)},moveCallback:function(t,e){this.$emit("move",t,e)}}},qe=Xe,Je=Object(P["a"])(qe,r,i,!1,null,null,null),tn=Je.exports;tn.install=function(t){t.component(tn.name,tn)};e["default"]=tn},"40d5":function(t,e,n){var r=n("d039");t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,r="/";e.cwd=function(){return r},e.chdir=function(e){t||(t=n("df7c")),r=t.resolve(e,r)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var r=n("e330"),i=n("d039"),a=n("c6b6"),o=Object,s=r("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},4625:function(t,e,n){var r=n("c6b6"),i=n("e330");t.exports=function(t){if("Function"===r(t))return i(t)}},"485a":function(t,e,n){var r=n("c65b"),i=n("1626"),a=n("861d"),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!a(s=r(n,t)))return s;if(i(n=t.valueOf)&&!a(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!a(s=r(n,t)))return s;throw o("Can't convert object to primitive value")}},"4b11":function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"4d64":function(t,e,n){var r=n("fc6a"),i=n("23cb"),a=n("07fa"),o=function(t){return function(e,n,o){var s,c=r(e),u=a(c),l=i(o,u);if(t&&n!=n){while(u>l)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4e0a":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-essay__wrapper",style:{"--padding-inline":t.paddingInline+"px"},attrs:{"data-key":t.dataKey,type:"essay","page-index":t.pageIndex}},[e("div",{staticClass:"ac-essay",class:{"is-wrapper":"outer"===t.borderType,"is-editable":t.editable,"is-hidden__border-both":t.hiddenBorderBoth||!(t.row||t.title),"is-hidden__border-bottom":t.hiddenBorderBottom||!(t.row||t.title),"is-hidden__border-top":t.hiddenBorderTop||!(t.row||t.title)}},[t.title?e("div",{staticClass:"ac-essay__title ck-content",domProps:{innerHTML:t._s(t.title)}}):t._e(),t.row?e("div",{staticClass:"ac-essay__container"},[e("div",{staticClass:"ac-essay__area",class:t.rowClass,style:t.areaStyle},[["empty","block","spell_field"].includes(t.rowType)?t._e():[t._l(t.itemList,(function(n,r){return[t.getLiContent(r)?e("li",{key:"li_".concat(r),staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!r,"is-editable":"line"===t.rowType&&t.liEditable},domProps:{innerHTML:t._s(t.getLiContent(r))},on:{blur:function(e){return t.handleBlur(e,r)}}}):e("li",{key:r,staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!r,"is-editable":"line"===t.rowType&&t.liEditable,"is-first-column":!(r%t.formatColumn)},on:{blur:function(e){return t.handleBlur(e,r)}}},[t.showPrefix&&"line"===t.rowType?e("span",{staticClass:"ac-essay__area-prefix"},[t._v(" 【"+t._s(r+t.startRow+1)+"】 ")]):t._e(),t.wordCountStep&&["write","grid","write_plain"].includes(t.rowType)?e("span",[t._v(" "+t._s(t.getWordCount(r))+" ")]):t._e()])]}))],"spell_field"===t.rowType?t._l(Array(t.row).fill(""),(function(n,r){return e("li",{key:r,staticClass:"ac-essay__area-item"},[e("div",{staticClass:"ac-essay__area-spell"}),t._l(Array(t.formatColumn).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-essay__area-field"})}))],2)})):t._e()],2),t.editable?e("div",{staticClass:"ac-essay__tool ac-edit-handler"},[t.rowEditable?[e("span",[t._v("行数:")]),e("el-input-number",{attrs:{size:"small",min:1,max:100},on:{change:t.handleRowChange},model:{value:t.rowNum,callback:function(e){t.rowNum=e},expression:"rowNum"}})]:t._e(),t.typeEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openType}},[t._v(" 背景风格 ")]):t._e(),t.titleEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]):t._e()],2):t._e()]):t._e()]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}}),e("el-dialog",{attrs:{"custom-class":"ac-essay__dialog",visible:t.typeVisible,title:"设置背景风格",width:"770px"},on:{"update:visible":function(e){t.typeVisible=e}}},[e("div",{staticClass:"ac-bg"},[t.essayType.includes(0)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":0===t.currentType},on:{click:function(e){t.currentType=0}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("空白纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper"})]):t._e(),t.essayType.includes(1)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":1===t.currentType},on:{click:function(e){t.currentType=1}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("横线纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper is-line"},[e("div",{staticClass:"ac-bg__content"})])]):t._e(),t.essayType.includes(2)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":2===t.currentType},on:{click:function(e){t.currentType=2}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("方格纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper is-grid"},t._l(Array(4).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)]):t._e(),t.essayType.includes(3)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":3===t.currentType},on:{click:function(e){t.currentType=3}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-field"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(12).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e(),t.essayType.includes(4)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":4===t.currentType},on:{click:function(e){t.currentType=4}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-block"},[e("div",{staticClass:"ac-bg__content"})])]):t._e(),t.essayType.includes(5)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":5===t.currentType},on:{click:function(e){t.currentType=5}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-write"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(12).fill(""),(function(t,n){return e("li",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e(),t.essayType.includes(6)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":6===t.currentType},on:{click:function(e){t.currentType=6}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-spell-field"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(3).fill(""),(function(n,r){return e("li",{key:r,staticClass:"ac-bg__content-item"},[e("div",{staticClass:"ac-bg__content-item-spell"}),t._l(Array(3).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item-field"})}))],2)})),0)])]):t._e(),t.essayType.includes(7)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":7===t.currentType},on:{click:function(e){t.currentType=7}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-write-plain"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(16).fill(""),(function(t,n){return e("li",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e()]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.typeVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeType}},[t._v("确定")])],1)])],1)},i=[],a=n("6bdf"),o=n("5dcc"),s={name:"AcEssay",components:{AcEditor:a["default"]},props:{editable:{type:Boolean,default:!0},bgType:{type:Number,default:0},typeEditable:{type:Boolean,default:!0},row:{type:Number,default:4},startRow:{type:Number,default:0},rowCount:{type:Number,default:4},rowEditable:{type:Boolean,default:!0},title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},liEditable:{type:Boolean,default:!1},showPrefix:{type:Boolean,default:!1},rowHeight:{type:[Number,String],default:""},rowGap:{type:[Number,String],default:""},width:{type:[Number,String],default:""},borderType:{type:String,default:"outer"},topLineVisible:{type:Boolean,default:!1},wordCountStep:{type:Number,default:100},paddingInline:{type:Number,default:55},dataKey:{type:String,default:""},hiddenBorderBottom:{type:Boolean,default:!1},hiddenBorderBoth:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},hiddenBorderTop:{type:Boolean,default:!1},column:{type:Number,default:0}},inject:["essayType"],data:function(){return{rowNum:4,editorVisible:!1,editContent:"",typeVisible:!1,currentType:0}},computed:{rowConfig:function(){return this.$store.getters["AC/rowConfig"]},rowType:function(){var t=["empty","line","grid","field","block","write","spell_field","write_plain"];return t[this.bgType||0]},rowClass:function(){return"row-".concat(this.rowType).concat("outer"!==this.borderType&&["empty"].includes(this.rowType)?" is-wrapper":"")},areaStyle:function(){var t=this.rowConfig[this.bgType]||{},e="number"===typeof this.rowHeight?this.rowHeight:t.rowHeight||0,n="number"===typeof this.rowGap?this.rowGap:t.rowGap||0;switch(this.rowType){case"write":case"write_plain":n=e/9*2,e-=n;break;case"spell_field":n=e/9*4,e-=n;break}var r={"--row":this.row,"--row-height":e+"px","--row-gap":n+"px","--column":this.formatColumn};return["empty","line"].includes(this.rowType)&&(this.width||0===this.width)&&(r.width="number"===typeof this.width?this.width+"px":this.width),r},formatColumn:function(){var t=(this.rowConfig[this.bgType]||{}).column;return t?this.column||t:0},itemList:function(){return new Array(this.row*(this.formatColumn||1)).fill("")},rowDebounce:function(){return Object(o["a"])(this.commitRowChange,300)},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return function(t){return((e.liList||[]).find((function(e){return e.liIndex===t}))||{}).content}}},watch:{rowCount:function(t){t!==this.rowNum&&(this.rowNum=t)}},created:function(){this.rowNum=this.rowCount},methods:{getWordCount:function(t){var e=this.startRow*this.formatColumn+t+1;return e%this.wordCountStep?"":"".concat(e,"字")},handleRowChange:function(t,e){(t||0===t||(this.rowNum="",e))&&this.rowDebounce()},commitRowChange:function(){this.$store.dispatch("AC/essay/setEssayRow",{dataKey:this.dataKey,row:this.rowNum}),this.$store.dispatch("AC/paper/resetPanel")},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.title},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},handleBlur:function(t,e){this.$store.dispatch("AC/essay/setEssayLi",{dataKey:this.dataKey,liIndex:e+this.startRow,content:t.target.innerHTML})},openType:function(){this.currentType=this.bgType,this.typeVisible=!0},changeType:function(){this.typeVisible=!1,this.$store.dispatch("AC/essay/setEssayBgType",{dataKey:this.dataKey,bgType:this.currentType}),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,u=n("2877"),l=Object(u["a"])(c,r,i,!1,null,null,null),h=l.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"4ea1":function(t,e,n){"use strict";var r=n("d429"),i=n("ebb5"),a=n("bcbf"),o=n("5926"),s=n("f495"),c=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=c(this),i=o(t),l=a(n)?s(e):+e;return r(n,u(n),i,l)}}["with"],!h)},"50c4":function(t,e,n){var r=n("5926"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"53ca":function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,"a",(function(){return r}))},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,n){var r=n("d066"),i=n("e330"),a=n("241c"),o=n("7418"),s=n("825a"),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=a.f(s(t)),n=o.f;return n?c(e,n(t)):e}},"577e":function(t,e,n){var r=n("f5df"),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},5926:function(t,e,n){var r=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},"59ed":function(t,e,n){var r=n("1626"),i=n("0d51"),a=TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5dcc":function(t,e,n){"use strict";n.d(e,"a",(function(){return k})),n.d(e,"d",(function(){return E})),n.d(e,"b",(function(){return S})),n.d(e,"c",(function(){return I}));n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1");var r=b(),i=w(),a=C(),o=A(),s={imagePlaceholder:void 0,cacheBust:!1},c={toSvg:u,toPng:h,toJpeg:d,toBlob:f,toPixelData:l,impl:{fontFaces:a,images:o,util:r,inliner:i,options:{}}};function u(t,e){return e=e||{},p(e),Promise.resolve(t).then((function(t){return m(t,e.filter,!0)})).then(y).then(v).then(n).then((function(n){return _(n,e.width||r.width(t),e.height||r.height(t))}));function n(t){return e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]})),t}}function l(t,e){return g(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,r.width(t),r.height(t)).data}))}function h(t,e){return g(t,e||{}).then((function(t){return t.toDataURL()}))}function d(t,e){return e=e||{},g(t,e).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))}function f(t,e){return g(t,e||{}).then(r.canvasToBlob)}function p(t){"undefined"===typeof t.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=t.imagePlaceholder,"undefined"===typeof t.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=t.cacheBust}function g(t,e){return u(t,e).then(r.makeImage).then(r.delay(100)).then((function(e){var r=n(t);return r.getContext("2d").drawImage(e,0,0),r}));function n(t){var n=document.createElement("canvas"),i=n.getContext("2d");i.mozImageSmoothingEnabled=!1,i.webkitImageSmoothingEnabled=!1,i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1;var a=e.scale||1,o=e.width||r.width(t),s=e.height||r.height(t);return n.width=o*a,n.height=s*a,e.imageWidth&&(a=e.imageWidth/(o||1),n.width=e.imageWidth,n.height=s*a),e.imageHeight&&(a=e.imageHeight/(s||1),n.width=o*a,n.height=e.imageHeight),i.scale(a,a),e.bgcolor&&(i.fillStyle=e.bgcolor,i.fillRect(0,0,n.width,n.height)),n}}function m(t,e,n){return n||!e||e(t)?Promise.resolve(t).then(i).then((function(n){return a(t,n,e)})).then((function(e){return o(t,e)})):Promise.resolve();function i(t){return t instanceof HTMLCanvasElement?r.makeImage(t.toDataURL()):t.cloneNode(!1)}function a(t,e,n){var i=t.childNodes;return 0===i.length?Promise.resolve(e):a(e,r.asArray(i),n).then((function(){return e}));function a(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return m(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}function o(t,e){return e instanceof Element?Promise.resolve().then(n).then(i).then(a).then(o).then((function(){return e})):e;function n(){function n(t,e){function n(t,e){r.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:n(t,e)}n(window.getComputedStyle(t),e.style)}function i(){function n(n){var i=window.getComputedStyle(t,n),a=i.getPropertyValue("content");if(""!==a&&"none"!==a){var o=r.uid();e.className=e.className+" "+o;var s=document.createElement("style");s.appendChild(c(o,n,i)),e.appendChild(s)}function c(t,e,n){var i="."+t+":"+e,a=n.cssText?o(n):s(n);return document.createTextNode(i+"{"+a+"}");function o(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return r.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){n(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function o(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}}function y(t){return a.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function v(t){return o.inlineAll(t).then((function(){return t}))}function _(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(r.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}function b(){return{escape:d,parseExtension:e,mimeType:n,dataAsUrl:h,isDataUrl:r,canvasToBlob:a,resolveUrl:o,getAndEncode:l,uid:s(),delay:f,asArray:p,escapeXhtml:g,makeImage:u,width:m,height:y};function t(){var t="application/font-woff",e="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:e,jpeg:e,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(n){var r=e(n).toLowerCase();return t()[r]||""}function r(t){return-1!==t.search(/^(data:)/)}function i(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}function a(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):i(t)}function o(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href}function s(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function u(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))}function l(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=3e4;return(c.impl.options.cacheBust||n)&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),e&&t.startsWith("http")&&!t.startsWith("https")&&(t=t.replace("http","https")),new Promise((function(e){var n,i=new XMLHttpRequest;if(i.onreadystatechange=o,i.ontimeout=s,i.responseType="blob",i.timeout=r,i.open("GET",t,!0),i.send(),c.impl.options.imagePlaceholder){var a=c.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===i.readyState)if(200===i.status){var r=new FileReader;r.onloadend=function(){var t=r.result.split(/,/)[1];e({content:t,fullUrl:r.result})},r.readAsDataURL(i.response)}else n?e(n):u("cannot fetch resource: "+t+", status: "+i.status)}function s(){n?e(n):u("timeout of "+r+"ms occured while fetching resource: "+t)}function u(t){e("")}}))}function h(t,e){return"data:"+e+";base64,"+t}function d(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function f(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}}function p(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}function g(t){return t.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A").replace(/\v/g," ")}function m(t){var e=v(t,"border-left-width"),n=v(t,"border-right-width");return t.scrollWidth+e+n}function y(t){var e=v(t,"border-top-width"),n=v(t,"border-bottom-width");return t.scrollHeight+e+n}function v(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}function w(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:a,shouldProcess:e,impl:{readUrls:n,inline:i}};function e(e){return-1!==e.search(t)}function n(e){var n,i=[];while(null!==(n=t.exec(e)))i.push(n[1]);return i.filter((function(t){return!r.isDataUrl(t)}))}function i(t,e,n,i){return Promise.resolve(e).then((function(t){return n?r.resolveUrl(t,n):t})).then(i||r.getAndEncode).then((function(t){var n=t.content;t.fullUrl;return r.dataAsUrl(n,r.mimeType(e))})).then((function(n){return t.replace(a(e),"$1"+n+"$3")}));function a(t){return new RegExp("(url\\(['\"]?)("+r.escape(t)+")(['\"]?\\))","g")}}function a(t,r,a){return o()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return"about:blank"===t?Promise.resolve(t):i(e,t,r,a)}))})),n}));function o(){return!e(t)}}}function C(){return{resolveAll:t,impl:{readAll:e}};function t(){return e(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))}function e(){return Promise.resolve(r.asArray(document.styleSheets)).then(e).then(t).then((function(t){return t.map(n)}));function t(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return i.shouldProcess(t.style.getPropertyValue("src"))}))}function e(t){var e=[];return t.forEach((function(t){try{r.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(n){}})),e}function n(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return i.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}function A(){return{inlineAll:e,impl:{newImage:t}};function t(t){return{inline:e};function e(e){return r.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||function(t){return r.getAndEncode(t,!0,!0)}).then((function(t){t.content;var e=t.fullUrl;return e})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))})).catch((function(){return t.src}))}}function e(n){return n instanceof Element?a(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(r.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n);function a(t){var e=t.style.getPropertyValue("background");return e?i.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}}}var x=c,k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=arguments.length>2?arguments[2]:void 0,r=0;return function(){var i=this,a=arguments;r&&clearTimeout(r),n?(r||t.apply(i,a),r=setTimeout((function(){r=0}),e)):r=setTimeout((function(){t.apply(i,a)}),e)}},T=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=0,r=[],i=[],a=function a(){if(n===t.length)return Promise.resolve();var o=t[n++],s=Promise.resolve().then((function(){return o()}));r.push(s);var c=s.then((function(){return i.splice(i.indexOf(c),1)}));i.push(c);var u=i.length>=e?Promise.race(i):Promise.resolve();return u.then((function(){return a()}))};return a().then((function(){return Promise.all(r)}))},E=function(t){var e=[],n=/<img.*?(?:>|\/>)/gi,r=/src=['"]?([^'"]*)['"]?/i,i=function(t){if(t){var i=t.match(n);Array.isArray(i)&&i.forEach((function(t){var n=t.match(r);Array.isArray(n)&&n[1]&&e.push(new Promise((function(t,e){var r=new Image;r.onload=function(){return t()},r.onerror=function(){return e()},r.src=n[1]})))}))}},a=function t(e){e.forEach((function(e){"complex"!==e.code&&e.children||(i(e.title),Array.isArray(e.choices)&&e.choices.forEach((function(t){return i(t.content)}))),e.children&&e.children.length&&t(e.children)}))};return a(t),new Promise((function(t,n){Promise.allSettled(e).then((function(){return t()}))}))},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2?arguments[2]:void 0;if(!t.length)return Promise.resolve([]);for(var r=[],i=function(){var i=t[a];r.push((function(){return x.toJpeg(i,{quality:.95,scale:e,width:i.offsetWidth,height:i.offsetHeight,imageWidth:n,bgcolor:"#ffffff"})}))},a=0;a<t.length;a++)i();return T(r)},I=function(t){var e=0;try{var n=t.getBoundingClientRect(),r=n.top,i=t.parentNode.getBoundingClientRect(),a=i.top;e=r-a}catch(o){e=t.offsetTop}return e}},"5e77":function(t,e,n){var r=n("83ab"),i=n("1a2d"),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},"605d":function(t,e,n){(function(e){var r=n("c6b6");t.exports="undefined"!=typeof e&&"process"==r(e)}).call(this,n("4362"))},6374:function(t,e,n){var r=n("da84"),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},"639e":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__bar"},[e("div",{class:["ac-config__arrow",t.showConfig?"el-icon-caret-right":"el-icon-caret-left"],on:{click:function(e){t.showConfig=!t.showConfig}}}),e("div",{staticClass:"ac-config__wrapper",class:{"is-hidden":!t.showConfig}},[e("div",{staticClass:"container"},[e("div",{staticClass:"config-mainCtrl"},[e("div",{staticClass:"first-row"},[e("el-button",{attrs:{size:"medium",icon:"icon el-icon-download"},on:{click:t.save}},[t._v("保存")]),e("el-button",{attrs:{size:"medium",icon:"icon el-icon-view"},on:{click:function(e){t.previewVisible=!0}}},[t._v(" 预览 ")])],1),e("div",{staticClass:"second-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.download}},[t._v(" 下载并保存 ")])],1)]),t.modeChangeable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode"},[e("el-radio-group",{model:{value:t.answerSheetMode,callback:function(e){t.answerSheetMode=e},expression:"answerSheetMode"}},[e("el-radio",{attrs:{label:0}},[t._v("扫描")]),e("el-radio",{attrs:{label:1}},[t._v("点阵笔")])],1)],1)]):t._e(),t.layoutChangeable?e("change-layout",{attrs:{mode:t.answerSheetMode}}):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("考生须知")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowAttention,callback:function(e){t.isShowAttention=e},expression:"isShowAttention"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("学生信息")]),e("div",{staticClass:"ac-config__item tags-box answer-mode"},[t._l(t.studentInfoTags,(function(n){return e("el-tag",{key:n,staticClass:"tags",attrs:{closable:t.studentInfoTags.length>1,"disable-transitions":!1,effect:"dark",size:"small"},on:{close:function(e){return t.handleClose(n)}}},[t._v(" "+t._s(n)+" ")])})),t.studentInfoTags.length<6&&t.inputVisible?e("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{maxLength:"4",size:"small"},on:{blur:t.handleInputConfirm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm.apply(null,arguments)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e(),t.studentInfoTags.length<6&&!t.inputVisible?e("el-button",{staticClass:"button-new-tag",attrs:{size:"mini"},on:{click:t.showInput}},[e("i",{staticClass:"el-icon-plus"}),t._v(" 添加 ")]):t._e()],2)]):t._e(),1===t.answerSheetMode&&t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowEducationId,callback:function(e){t.isShowEducationId=e},expression:"isShowEducationId"}})],1)]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID位数")]),e("div",{staticClass:"ac-config__item"},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.educationIdValue,callback:function(e){t.educationIdValue=e},expression:"educationIdValue"}},t._l(Array(13),(function(t,n){return e("el-option",{key:n,attrs:{label:n+6,value:n+6}})})),1)],1)]),e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择考号板式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.registrationNumberType,callback:function(e){t.registrationNumberType=e},expression:"registrationNumberType"}},[e("el-radio",{attrs:{label:0}},[t._v("条形码")]),e("el-radio",{attrs:{label:1}},[t._v("教育ID")])],1)],1)])]:t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("客观题排列")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.objectiveOrder,callback:function(e){t.objectiveOrder=e},expression:"objectiveOrder"}},[e("el-radio",{attrs:{label:"row"}},[t._v("横排")]),e("el-radio",{attrs:{label:"column"}},[t._v("竖排")])],1)],1)]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("判断题样式(TF/✓×)")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.judgmentMode,callback:function(e){t.judgmentMode=e},expression:"judgmentMode"}},[e("el-radio",{attrs:{label:0}},[t._v("TF")]),e("el-radio",{attrs:{label:1}},[t._v("✓×")])],1)],1)]):t._e(),1===t.answerSheetMode&&t.titleSwitchable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("显示题目内容")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowQuestion,callback:function(e){t.isShowQuestion=e},expression:"isShowQuestion"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("手工批阅")]),e("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"该试卷存在多个得分点题目,不支持线下批阅,请重新选择试卷",placement:"top-end",disabled:!t.graffitiDisable,"open-delay":200}},[e("div",{staticClass:"ac-config__item"},[e("el-switch",{attrs:{disabled:t.graffitiDisable},model:{value:t.handRead,callback:function(e){t.handRead=e},expression:"handRead"}})],1)])],1),t.readType&&1===t.answerSheetMode?e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("设置给分框样式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.readType,callback:function(e){t.readType=e},expression:"readType"}},[e("el-radio",{attrs:{label:"hand"}},[t._v("手写")]),e("el-radio",{attrs:{label:"graffiti"}},[t._v("涂点")])],1)],1)]):t._e()]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("添加页脚")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isAddFooter,callback:function(e){t.isAddFooter=e},expression:"isAddFooter"}})],1)]):t._e(),0!==t.answerSheetMode&&"graffiti"!==t.readType||1!==t.layout?t._e():e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("答题卡拼凑打印")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isPatchwork,callback:function(e){t.isPatchwork=e},expression:"isPatchwork"}})],1)])],2)]),e("ac-preview",{attrs:{visible:t.previewVisible,selector:".ac-panel .ac-piece__wrapper"},on:{"update:visible":function(e){t.previewVisible=e}}}),t.acMode?t._e():e("el-dialog",{staticClass:"download-dialog",attrs:{title:"下载提示",visible:t.showDownloadModal,width:"520px",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.showDownloadModal=e}}},[e("p",{staticClass:"message"},[t._v(" 选择导出以下内容 "),e("span",{staticClass:"redTip"},[t._v("(为了保证下载内容的质量,建议使用chrome进行下载)")])]),e("div",{staticClass:"tip"},[e("el-radio",{attrs:{label:"sweep"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[t._v("答题卡")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadType,callback:function(e){t.downloadType=e},expression:"downloadType"}},[e("el-option",{attrs:{label:"PDF",value:"PDF"}}),e("el-option",{attrs:{label:"PNG",value:"PNG"}})],1)],1),e("div",{staticClass:"paper-type_selector"},[e("span",{staticClass:"label"},[t._v("请选择纸张大小")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadSize,callback:function(e){t.downloadSize=e},expression:"downloadSize"}},[e("el-option",{attrs:{label:1===t.layout?"A4":"A3",value:1===t.layout?"A4":"A3"}}),e("el-option",{attrs:{label:1===t.layout?"16K":"8K",value:1===t.layout?"16K":"8K"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDownloadModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmDownload}},[t._v("确 定")])],1)])],1)},i=[],a=(n("14d9"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode-other"},[e("p",{staticClass:"ac-card-config__sublabel"},[t._v("适用于"+t._s(t.subLabel)+"纸张")]),e("div",{staticClass:"layout-config"},[e("div",{class:["layout-config-item",t.disableOneLayout&&"disable-style"],attrs:{"aria-disabled":t.disableOneLayout},on:{click:function(e){return t.changeAnswerCardLayout(1)}}},[e("div",{class:["layout-image",1===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("d09a"),alt:"一栏"}})]),e("p",{staticClass:"layout-name"},[t._v("一栏")])]),e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(2)}}},[e("div",{class:["layout-image",2===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("eb33"),alt:"两栏"}})]),e("p",{staticClass:"layout-name"},[t._v("两栏")])]),0===t.mode?e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(3)}}},[e("div",{class:["layout-image",3===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("f714"),alt:"三栏"}})]),e("p",{staticClass:"layout-name"},[t._v("三栏")])]):t._e()]),1===t.mode?e("el-radio-group",{model:{value:t.sizeType,callback:function(e){t.sizeType=e},expression:"sizeType"}},[e("el-radio",{attrs:{label:"A"}},[t._v(t._s(1===t.layout?"A4":"A3"))]),e("el-radio",{attrs:{label:"K"}},[t._v(t._s(1===t.layout?"16K":"8K"))])],1):t._e()],1)])}),o=[],s={name:"ChangeLayout",components:{},props:{mode:{type:Number,default:0}},computed:{sizeType:{get:function(){return this.$store.getters["AC/sizeType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setSizeType",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},disableOneLayout:function(){return this.$store.getters["AC/disableOneLayout"]},subLabel:function(){return 0===this.mode?1===this.layout?"A4、16K":"A3、8K":"A"===this.sizeType?1===this.layout?"A4":"A3":1===this.layout?"16K":"8K"}},watch:{},mounted:function(){},data:function(){return{}},methods:{changeAnswerCardLayout:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",t),t>1&&this.$store.dispatch("AC/answerConfig/setPatchwork",!1),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,u=n("2877"),l=Object(u["a"])(c,a,o,!1,null,null,null),h=l.exports,d=n("2b16"),f={name:"AcAnswerConfig",components:{changeLayout:h,AcPreview:d["default"]},props:{modeChangeable:{type:Boolean,default:!0},layoutChangeable:{type:Boolean,default:!0},titleSwitchable:{type:Boolean,default:!0},graffitiDisable:{type:Boolean,default:!1}},inject:["showStudentInfo"],computed:{answerSheetMode:{get:function(){return this.$store.getters["AC/answerCardMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardMode",t),0===t&&this.$store.dispatch("AC/answerConfig/setSizeType","A")}},isShowAttention:{get:function(){return this.$store.getters["AC/showAttention"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAttention",t),this.$store.dispatch("AC/paper/resetPanel")}},studentInfoArr:function(){return this.$store.getters["AC/studentInfo"]},isShowEducationId:{get:function(){return this.$store.getters["AC/showEducationId"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},educationIdValue:{get:function(){return this.$store.getters["AC/educationIdValue"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},registrationNumberType:{get:function(){return this.$store.getters["AC/registrationNumberType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setRegistrationNumberType",t),this.$store.dispatch("AC/paper/resetPanel")}},objectiveOrder:{get:function(){return this.$store.getters["AC/objectiveOrder"]},set:function(t){this.$store.dispatch("AC/answerConfig/setObjectiveOrder",t),this.$store.dispatch("AC/paper/resetPanel")}},judgmentMode:{get:function(){return this.$store.getters["AC/judgmentMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setJudgmentMode",t)}},isShowQuestion:{get:function(){return this.$store.getters["AC/showQuestion"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowQuestion",t),this.$store.dispatch("AC/paper/resetEditTitle")}},handRead:{get:function(){return!!this.readType},set:function(t){this.readType=t?"graffiti":""}},readType:{get:function(){return this.$store.getters["AC/readType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setReadType",t),this.$store.dispatch("AC/paper/resetPanel")}},isAddFooter:{get:function(){return this.$store.getters["AC/addFooter"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAddFooter",t)}},isPatchwork:{get:function(){return this.$store.getters["AC/patchwork"]},set:function(t){this.$store.dispatch("AC/answerConfig/setPatchwork",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},downloadType:{get:function(){return this.$store.getters["AC/downloadType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadType",t)}},downloadSize:{get:function(){return this.$store.getters["AC/downloadSize"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadSize",t)}},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{studentInfoArr:function(){this.studentInfoTags=this.studentInfoArr}},mounted:function(){this.studentInfoTags=this.studentInfoArr},data:function(){return{studentInfoTags:[],inputVisible:!1,inputValue:"",showConfig:!0,previewVisible:!1,showDownloadModal:!1,radio:"sweep"}},methods:{handleClose:function(t){this.studentInfoTags.splice(this.studentInfoTags.indexOf(t),1),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},showInput:function(){var t=this;this.inputVisible=!0,this.$nextTick((function(e){t.$refs.saveTagInput.$refs.input.focus()}))},handleInputConfirm:function(){var t=this.inputValue;t&&-1===this.studentInfoTags.indexOf(t)&&this.studentInfoTags.push(t),this.inputVisible=!1,this.inputValue="",this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},download:function(){this.acMode?this.$emit("download"):(this.showDownloadModal=!0,this.$store.dispatch("AC/answerConfig/setDownloadSize",1===this.layout?"A4":"A3"))},confirmDownload:function(){this.showDownloadModal=!1,this.$emit("download")},save:function(){this.$emit("save")}}},p=f,g=Object(u["a"])(p,r,i,!1,null,null,null),m=g.exports;m.install=function(t){t.component(m.name,m)};e["default"]=m},"69f3":function(t,e,n){var r,i,a,o=n("cdce"),s=n("da84"),c=n("861d"),u=n("9112"),l=n("1a2d"),h=n("c6cd"),d=n("f772"),f=n("d012"),p="Object already initialized",g=s.TypeError,m=s.WeakMap,y=function(t){return a(t)?i(t):r(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(o||h.state){var _=h.state||(h.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,r=function(t,e){if(_.has(t))throw g(p);return e.facade=t,_.set(t,e),e},i=function(t){return _.get(t)||{}},a=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,r=function(t,e){if(l(t,b))throw g(p);return e.facade=t,u(t,b,e),e},i=function(t){return l(t,b)?t[b]:{}},a=function(t){return l(t,b)}}t.exports={set:r,get:i,has:a,enforce:y,getterFor:v}},"6bdf":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{"custom-class":"ac-editor",visible:t.currentVisible,title:t.title,top:"10vh",width:"868px","close-on-click-modal":!1},on:{"update:visible":function(e){t.currentVisible=e},open:t.handleOpen}},[e("textarea",{attrs:{id:t.editorId}}),e("div",{staticClass:"ac-editor__footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.close}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirm}},[t._v("确定")])],1)])},i=[],a=n("d4ec"),o=n("bee2"),s={name:"AcEditor",props:{title:{type:String,default:"编辑标题"},content:{type:String,default:""},visible:{type:Boolean,default:!1},editorId:{type:String,default:"ac-editor"},editorConstructor:{type:Function,default:function(){}}},inject:["uploadOss","ClassicEditor"],data:function(){return{editor:null}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},uploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(a["a"])(this,e),this.loader=t}return Object(o["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){e.loader.file.then((function(e){return t(e,n)}))}))}}]),e}()},createFn:function(){return this.ClassicEditor||this.editorConstructor}},methods:{handleOpen:function(){var t=this;this.$nextTick((function(){return t.initEditor()}))},close:function(){this.currentVisible=!1},confirm:function(){this.close(),this.editor&&this.$emit("submit",this.editor.getData())},initEditor:function(){var t=this;this.editor?(""===this.content||this.content)&&this.editor.setData(this.content):this.createFn.create(document.querySelector("#".concat(this.editorId)),{isReadOnly:!0,placeholder:"请输入~",image:{resizeUnit:"px",toolbar:[{name:"imageStyle:pictures",items:["imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight"],defaultItem:"imageStyle:alignCenter"},"|","toggleImageCaption","imageStyle:inline"]}}).then((function(e){t.editor=e,t.content&&t.editor.setData(t.content),t.addSpecialCharacters(e),e.plugins.get("FileRepository").createUploadAdapter=function(e){return new t.uploadAdapter(e)},e.on("instanceReady",(function(t){t.editor.execCommand("toolbarCollapse")}))}))},addSpecialCharacters:function(t){t.plugins.get("SpecialCharacters").addItems("编号",[{title:"①",character:"①"},{title:"②",character:"②"},{title:"③",character:"③"},{title:"④",character:"④"},{title:"⑤",character:"⑤"},{title:"⑥",character:"⑥"},{title:"⑦",character:"⑦"},{title:"⑧",character:"⑧"},{title:"⑨",character:"⑨"},{title:"⑩",character:"⑩"},{title:"(1)",character:"(1)"},{title:"(2)",character:"(2)"},{title:"(3)",character:"(3)"},{title:"(4)",character:"(4)"},{title:"(5)",character:"(5)"},{title:"(6)",character:"(6)"},{title:"(7)",character:"(7)"},{title:"(8)",character:"(8)"},{title:"(9)",character:"(9)"},{title:"(10)",character:"(10)"},{title:"1)",character:"1)"},{title:"2)",character:"2)"},{title:"3)",character:"3)"},{title:"4)",character:"4)"},{title:"5)",character:"5)"},{title:"6)",character:"6)"},{title:"7)",character:"7)"},{title:"8)",character:"8)"},{title:"9)",character:"9)"},{title:"10)",character:"10)"},{title:"一",character:"一"},{title:"二",character:"二"},{title:"三",character:"三"},{title:"四",character:"四"},{title:"五",character:"五"},{title:"六",character:"六"},{title:"七",character:"七"},{title:"八",character:"八"},{title:"九",character:"九"},{title:"十",character:"十"},{title:"(一)",character:"(一)"},{title:"(二)",character:"(二)"},{title:"(三)",character:"(三)"},{title:"(四)",character:"(四)"},{title:"(五)",character:"(五)"},{title:"(六)",character:"(六)"},{title:"(七)",character:"(七)"},{title:"(八)",character:"(八)"},{title:"(九)",character:"(九)"},{title:"(十)",character:"(十)"}])}}},c=s,u=n("2877"),l=Object(u["a"])(c,r,i,!1,null,null,null),h=l.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"6ce5":function(t,e,n){"use strict";var r=n("df7e"),i=n("ebb5"),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return r(a(this),s(this))}))},"6f19":function(t,e,n){var r=n("9112"),i=n("0d26"),a=n("b980"),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):r(t,"stack",i(n,s)))}},7156:function(t,e,n){var r=n("1626"),i=n("861d"),a=n("d2bb");t.exports=function(t,e,n){var o,s;return a&&r(o=e.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,n){var r=n("e330"),i=n("59ed");t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(a){}}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80"),i=Object;t.exports=function(t){return i(r(t))}},"825a":function(t,e,n){var r=n("861d"),i=String,a=TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var r=n("1626"),i=n("8ea1"),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===a}:function(t){return"object"==typeof t?null!==t:r(t)}},8925:function(t,e,n){var r=n("e330"),i=n("1626"),a=n("c6cd"),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},"8ea1":function(t,e){var n="object"==typeof document&&document.all,r="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}},"8f60":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{class:["ac-graffiti__wrapper",t.hidePadding&&"is-hide-padding"]},[e("div",{class:["ac-graffiti",t.hideBottomBorder&&"is-hide-bottom",t.hideTopBorder&&"is-hide-top"],attrs:{"data-scan-type":"review","data-scan-name":t.scanName,"data-scan-score":t.score}},t._l(Array(21).fill(""),(function(n,r){return e("span",{key:r,staticClass:"ac-graffiti__item"},[t._v(" "+t._s(t.getItem(r))+" ")])})),0)])},i=[],a={name:"AcGraffiti",props:{score:{type:Number,required:!0},scanName:{type:String},hidePadding:{type:Boolean,required:!1},hideBottomBorder:{type:Boolean,required:!1},hideTopBorder:{type:Boolean,required:!1}},methods:{getItem:function(t){if(20===t)return.5;if(this.score>=20)return t>9||10*t<=this.score?t%10:"";var e=20-this.score-1;return t>=e?20-t-1:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"907a":function(t,e,n){"use strict";var r=n("ebb5"),i=n("07fa"),a=n("5926"),o=r.aTypedArray,s=r.exportTypedArrayMethod;s("at",(function(t){var e=o(this),n=i(e),r=a(t),s=r>=0?r:n+r;return s<0||s>=n?void 0:e[s]}))},"90e3":function(t,e,n){var r=n("e330"),i=0,a=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},9112:function(t,e,n){var r=n("83ab"),i=n("9bf2"),a=n("5c6c");t.exports=r?function(t,e,n){return i.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},9152:function(t,e){
3
+ _=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),s=new E(i||[]);return r(o,"_invoke",{value:A(t,n,s)}),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var h={};function d(){}function f(){}function p(){}var g={};c(g,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(S([])));y&&y!==e&&n.call(y,a)&&(g=y);var b=p.prototype=d.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function i(r,a,o,s){var c=l(t[r],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==Object(v["a"])(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,o,s)}),(function(t){i("throw",t,o,s)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return i("throw",t,o,s)}))}s(c.arg)}var a;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return a=a?a.then(r,r):r()}})}function A(t,e,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return I()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=p,r(b,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=c(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(C.prototype),c(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new C(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function b(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){b(a,r,i,o,s,"next",t)}function s(t){b(a,r,i,o,s,"throw",t)}o(void 0)}))}}var C=n("d4ec"),A=n("bee2"),x=n("4e0a"),k=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-question ck-content",attrs:{"data-key":t.dataKey}},[t.formatChoices.length||"hand"===t.readType?e("div",{staticClass:"ac-question__prefix"},[e("ac-answer-box",{attrs:{label:t.formatChoices.length?t.showQuestion?"答案":t.plainTitle:"得分",direction:t.formatChoices.length?"column":"row",width:t.formatChoices.length&&!t.showQuestion?144:128}})],1):t._e(),!t.formatChoices.length||t.showQuestion?e("div",{staticClass:"ac-question__content"},[t.formatTitle||t.formatPrefix?e("div",{staticClass:"ac-question__title",style:t.titleAlign?{"text-align":t.titleAlign}:""},[t.formatPrefix?e("div",{staticClass:"ac-question__title-prefix",class:{"is-float":!!t.formatTitle,"is-bold":t.showQuestion},domProps:{innerHTML:t._s(t.formatPrefix)}}):t._e(),t.formatTitle?e("div",{staticClass:"ac-question__title-inner",domProps:{innerHTML:t._s(t.formatTitle)}}):t._e()]):t._e(),t.formatChoices.length?e("ac-choice",{attrs:{list:t.formatChoices,wrap:t.choiceWrap}}):t._e()],1):t._e()])},T=[],E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice"},[t.wrap?[e("div",{staticClass:"ac-choice__list"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1),t.list.length%2?t._e():e("div",{staticClass:"ac-choice__list--half"},t._l(Array(t.list.length/2).fill(""),(function(n,r){return e("div",{key:r,staticClass:"row-direction"},t._l(t.list.slice(2*r,2*r+2),(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)})),0),e("div",{staticClass:"ac-choice__list--all"},[e("div",{staticClass:"row-direction"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)])]:e("div",{staticClass:"ac-choice__list--nowrap"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)],2)},S=[],I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice__item"},[t.identifier?e("div",{staticClass:"ac-choice__prefix"},[t._v(t._s(t.identifier)+".")]):t._e(),t.content?e("div",{staticClass:"ac-choice__content",domProps:{innerHTML:t._s(t.content)}}):t._e()])},O=[],L={name:"AcChoiceItem",props:{identifier:{type:String,default:""},content:{type:String,default:""}}},B=L,P=n("2877"),R=Object(P["a"])(B,I,O,!1,null,null,null),j=R.exports,M={name:"AcChoice",components:{AcChoiceItem:j},props:{list:{type:Array,default:function(){return[]}},wrap:{type:Boolean,default:!0}}},z=M,N=Object(P["a"])(z,E,S,!1,null,null,null),D=N.exports,U=n("fbd7"),H={name:"AcQuestion",components:{AcChoice:D,AcAnswerBox:U["default"]},props:{title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},titleAlign:{type:String,default:""},prefix:{type:String,default:""},prefixEditable:{type:Boolean,default:!1},choices:{type:Array,default:function(){return[]}},choiceEditable:{type:Boolean,default:!0},choiceWrap:{type:Boolean,default:!0},dataKey:{type:String,default:""},plainTitle:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},formatTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||(this.showQuestion?this.title:"")},formatPrefix:function(){return this.showQuestion?this.prefix:this.plainTitle},formatChoices:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).choices||this.choices||[]},readType:function(){return this.$store.getters["AC/readType"]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]}}},F=H,K=Object(P["a"])(F,k,T,!1,null,null,null),W=K.exports;W.install=function(t){t.component(W.name,W)};var V,Y,Z=W,G=n("8f60"),Q=n("e6c4"),X=n("0b83"),q=function(){window.MathJax&&(window.MathJax.Hub.Config({showProcessingMessages:!1,messageStyle:"none",jax:["input/TeX","output/HTML-CSS"],tex2jax:{inlineMath:[["\\(","\\)"],["\\[","\\]"]],displayMath:[],skipTags:["script","noscript","style","textarea","pre"]},"HTML-CSS":{showMathMenu:!1}}),window.isAcMathJaxConfig=!0)},J=function(t){if(window.MathJax)return window.isAcMathJaxConfig||q(),new Promise((function(e){window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,document.getElementById(t)]),window.MathJax.Hub.Queue((function(){e()}))}))},tt=n("5dcc"),et={name:"AcVirtual",components:{AcEssay:x["default"],AcQuestion:Z,AcAnswerBox:U["default"],AcGraffiti:G["default"],AcBasicInfo:Q["default"],AcEndMarkBox:X["default"]},data:function(){return{continueObjectiveCount:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]},readType:function(){return this.$store.getters["AC/readType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},getEditedTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},splitDom:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r=0,i=0,a=[],o=[];if(t){if(t.childNodes.length){var s=t.childNodes[t.childNodes.length-1];t.childNodes.length>1&&(2!==t.childNodes.length||"\n"!==s.textContent)?o=t.childNodes:t.childNodes[0].childNodes.length&&"FIGURE"!==t.childNodes[0].nodeName&&(o=t.childNodes[0].childNodes)}o.length||(o=t.childNodes)}for(var c=0;c<o.length;c++){var u=o[c];if(-1===["P","DIV","IMG","FIGURE"].indexOf(u.nodeName))try{"#text"===u.nodeName?n+=u.textContent:n+=u.outerHTML}catch(g){}else{var l=getComputedStyle(u),h=Number(l.marginTop.replace("px",""))||0,d=Number(l.marginBottom.replace("px",""))||0,f=Object(tt["c"])(u);a.length&&(f-=i),n+=u.outerHTML,r+=f+$(u).outerHeight()+h+d,a.push({type:e,content:n,height:r}),n="",r=0,i=Object(tt["c"])(u)+$(u).outerHeight()+h+d}}if(n){var p=$(t).outerHeight();a.push({type:e,content:n,height:a.length?p-i:p})}return a},getDomList:function(){var t=this,e=function(e,n,i){var a={dataKey:i,children:[],updatePage:e.updatePage,updatePiece:e.updatePiece,editable:e.editable},o=null,s=0;if((e.title||e.prefix)&&(t.showQuestion||!e.choices)){var c=n.find(".ac-question__title")[0],u=n.find(".ac-question__title-inner")[0],l=n.find(".ac-question__title-prefix")[0],h=n.find(".ac-answer-box")[0],d=getComputedStyle(c),f=Number(d.paddingTop.replace("px",""))||0,p=Number(d.paddingBottom.replace("px",""))||0,g=[];if(u?(g=t.splitDom(u,"questionTitleItem"),g.length&&(h&&(s=$(h).outerHeight(),g[0].answerBoxHeight=s,g[0].needAnswerBox=!0,o=g[0]),g[0].prefix=(null===l||void 0===l?void 0:l.outerHTML)||"",g[0].height+=f,g[g.length-1].height+=p,g.forEach((function(t,n){t.hasChoice=e.choices&&e.choices.length,t.titleAlign=e.titleAlign,e.hideMoveUp&&(t.hideMoveUp=e.hideMoveUp),e.hideMoveDown&&(t.hideMoveDown=e.hideMoveDown)})))):l&&(g=[{type:"questionTitleItem",prefix:l.outerHTML,height:Math.max($(l).outerHeight()+f+p,h?$(h).outerHeight():0),content:"",needAnswerBox:!!h}]),g.length){var m={children:g};a.children.push(m)}}if(e.choices)if(t.showQuestion){var y={},v=n.find(".ac-choice")[0];if(!1===e.choiceWrap)Object.assign(y,{type:"choiceItem",height:$(v).outerHeight(),content:v.outerHTML});else{var _=$(v).outerWidth(),b=$(v).find(".ac-choice__list").outerWidth();if(_>=b*e.choices.length)Object.assign(y,{type:"choiceItem",height:$(v).find(".ac-choice__list--all").outerHeight(),content:$(v).find(".ac-choice__list--all")[0].outerHTML});else{y.children=[];var w=$(v).find(".ac-choice__list .ac-choice__item"),C="ac-choice__list";!(e.choices.length%2)&&_>=2*b&&(C="ac-choice__list--half",w=$(v).find(".ac-choice__list--half .row-direction")),Array.from(w).forEach((function(t){y.children.push({type:"choiceItem",height:$(t).outerHeight(),content:t.outerHTML,wrapperClass:C})}))}}a.children.push(y)}else{var A=n.find(".ac-answer-box")[0];a.children.push({type:"plainBox",boxContent:e.plainTitle,height:t.continueObjectiveCount%5===0?$(A).outerHeight():0}),t.continueObjectiveCount++}else t.continueObjectiveCount=0;if(o){var x=0,k=function t(e){e.forEach((function(e){e.children?t(e.children):x+=e.height}))};k(a.children),s-x>0&&(o.height+=s-x)}if(r.push(a),e.essay){var T={type:"essay",essay:Object.assign({rowCount:4},e.essay),dataKey:i};if(e.essay.title){var E=n.find(".ac-essay__title")[0];T.essay.titleChildren=t.splitDom(E)}r.push(T)}e.dimensions&&r.push({type:"dimension",dimensions:e.dimensions,dataKey:i})},n=function n(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];a.forEach((function(a,s){var c=[].concat(l(o),[a[a.idProp||"id"]||s]),u=i.find(".ac-virtual__section[data-key=".concat(c.join("_"),"]"));if(Array.isArray(a.children)&&a.children.length){t.continueObjectiveCount=0;var h=u.find(".ac-virtual__title")[0];if(h||"complex"===a.code){var d={};if("complex"===a.code){var f=u.find(".ac-material__title-prefix")[0],p=u.find(".ac-material__title-inner")[0],g=[];p?(g=t.splitDom(p,"materialItem"),g.length&&(g[0].prefix=(null===f||void 0===f?void 0:f.outerHTML)||"",g[0].height+=16)):f&&(g=[{type:"materialItem",prefix:f.outerHTML,height:$(f).outerHeight()+16,content:""}]),d={dataKey:c.join("_"),children:g,editable:a.editable}}else d={dataKey:c.join("_"),height:$(h).outerHeight(),content:h.innerHTML,updatePage:a.updatePage,updatePiece:a.updatePiece,editable:a.editable};r.push(d)}if(a.prefixMarker){var m=u.find(".ac-end-mark-box.mark-prefix")[0];r.push({dataKey:c.join("_"),height:$(m).outerHeight(),content:m.outerHTML,type:"prefixMarker"})}if(n(a.children,c),a.suffixMarker){var y=u.find(".ac-end-mark-box.mark-suffix")[0];r.push({dataKey:c.join("_"),height:$(y).outerHeight(),content:y.outerHTML,type:"suffixMarker"})}}else{if("graffiti"===t.readType){var v=u.find(".ac-graffiti__wrapper")[0];v&&r.push({type:"graffiti",dataKey:c.join("_"),height:$(v).outerHeight(),content:v.innerHTML})}if(e(a,u,c.join("_")),a.prefixMarker){var _=u.find(".ac-end-mark-box.mark-prefix")[0];r.push({dataKey:c.join("_"),height:$(_).outerHeight(),content:_.outerHTML,type:"prefixMarker"})}}}))},r=[],i=$(".ac-virtual"),a=i.find(".ac-basicInfo");if(a){var o=a.find(".ac-basicInfo__title"),s=a.find(".ac-attention"),c=a.find(".ac-basic-info__edu");r.push({type:"basicInfo",headHeight:null===o||void 0===o?void 0:o.outerHeight(),attentionHeight:null===s||void 0===s?void 0:s.outerHeight(),eduHeight:null===c||void 0===c?void 0:c.outerHeight()})}n(this.paperTree),this.$emit("change",r)},getTitle:function(t,e){var n=this.$createElement,r=t.title,i=t.prefix,a=t.plainTitle,o=t.code,s=this.editTitleList.find((function(t){return t.dataKey===e})),c=s||{},u=c.title,l=c.editKey,h=s?u:this.showQuestion||"complex"!==o?r:"",d=this.showQuestion?i:a;return h||d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title")},[d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title-prefix").concat(this.showQuestion?" is-bold":"").concat(h?" is-float":"")},[n("div",{domProps:{innerHTML:d}})]):null,h?n("div",{key:"virtual_title_".concat(l),class:"ac-".concat("complex"===o?"material":"virtual","__title-inner ck-content"),domProps:{innerHTML:h}}):null]):null},getList:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.$createElement,i=t.map((function(t,i){var a=[].concat(l(n),[t[t.idProp||"id"]||i]);return r("div",{key:"".concat(i,"_").concat(t[t.idProp||"id"]||""),class:"ac-virtual__section",attrs:{"data-key":a.join("_")}},[Array.isArray(t.children)&&t.children.length?r("div",[e.getTitle(t,a.join("_")),t.prefixMarker?r("ac-end-mark-box",{attrs:{type:"prefix",title:t.prefixMarker.title}}):null,e.getList(t.children,a),t.suffixMarker?r("ac-end-mark-box",{attrs:{type:"suffix",title:t.suffixMarker.title}}):null]):r("div",["graffiti"!==e.readType||t.choices?null:r("ac-graffiti",{attrs:{scanName:t.scanName,score:t.score}}),r("ac-question",{key:"virtual_question_".concat(e.getEditedKey(a.join("_"))),props:y({},Object.assign({dataKey:a.join("_")},t))}),t.prefixMarker?r("ac-end-mark-box",{attrs:{type:"prefix",title:t.prefixMarker.title}}):null,t.essay?r("ac-essay",{props:y({},Object.assign(t.essay,{title:e.getEssayTitle(a.join("_"),t.essay.title)}))}):null])])}));return i}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},key:"virtual_"+this.readType},[t("ac-basic-info"),this.getList(this.paperTree)])}},nt=et,rt=Object(P["a"])(nt,V,Y,!1,null,null,null),it=rt.exports;it.install=function(t){t.component(it.name,it)};var at=it,ot=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,r){return e("div",{key:r,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",style:{width:1===t.layout?"980px":"1960px"},attrs:{"data-page":r+1}},[t._l(n,(function(n,i){return e("ac-piece",{key:i,attrs:{"data-piece":r*t.layout+i,"data-page":r,list:n},on:{edit:t.handleEdit}})})),t.layout-n.length?e("div",{staticClass:"ac-piece"},[e("ac-restrict")],1):t._e(),"graffiti"===t.readType||t.scanSheet?e("ac-mark-point",{attrs:{"page-index":r}}):t._e(),e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(r+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")])],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||"",title:t.editorTitle},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},st=[],ct=(n("13d5"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-dimension",attrs:{"data-key":t.dataKey,"data-dimension-index":t.dimensionIndex}},[e("ul",{staticClass:"ac-dimension__inner"},[e("li",{staticClass:"ac-dimension__item"},[t._v(" "+t._s("body"===t.type?t.dimension:"")+" ")]),e("li",{staticClass:"ac-dimension__item"},["header"===t.type?e("span",[t._v("自我评价")]):e("ul",{staticClass:"dimension-stars"},t._l(5,(function(t){return e("i",{key:t,staticClass:"el-icon-star-off"})})),0)]),e("li",{staticClass:"ac-dimension__item"},["header"===t.type?e("span",[t._v("同伴评价")]):e("ul",{staticClass:"dimension-stars"},t._l(5,(function(t){return e("i",{key:t,staticClass:"el-icon-star-off"})})),0)])])])}),ut=[],lt={name:"AcDimension",props:{dimension:{type:String,default:""},type:{type:String,default:"body"},dataKey:{type:String,default:""},dimensionIndex:{type:Number,default:0}}},ht=lt,dt=Object(P["a"])(ht,ct,ut,!1,null,null,null),ft=dt.exports;ft.install=function(t){t.component(ft.name,ft)};var pt,gt,mt=ft,yt={bind:function(t,e){t._handleMouseEnter=function(){return e.value(!0)},t._handleMouseLeave=function(){return e.value(!1)},t.addEventListener("mouseenter",t._handleMouseEnter),t.addEventListener("mouseleave",t._handleMouseLeave)},unbind:function(t){t.removeEventListener("mouseenter",t._handleMouseEnter),t.removeEventListener("mouseleave",t._handleMouseLeave)}},vt={Hover:yt},_t={name:"AcPiece",components:{AcEssay:x["default"],AcAnswerBox:U["default"],AcBasicInfo:Q["default"],AcDimension:mt},props:{list:{type:Array,default:function(){return[]}}},inject:["contentEditable","paddingBlock","movable","deletable","editType","editCallback","deleteCallback","moveCallback","lineCallback"],directives:{hover:vt.Hover},data:function(){return{rowCountList:{},activePrefixKey:""}},computed:{paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){return"K"===this.sizeType?"1357px":"1386px"},piecePadding:function(){return"number"===typeof this.paddingBlock?"".concat(this.paddingBlock,"px 0px"):"".concat(this.paddingBlock[0]||0,"px 0px ").concat(this.paddingBlock[1]||0,"px")},setActivePrefixKey:function(){var t=this;return Object(tt["a"])((function(e){t.activePrefixKey=e}),100)}},methods:{getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},isWithSpace:function(t){var e=!1,n=t.split("_"),r=this.paperTree||[];return n.forEach((function(t,i){var a=r.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};r=a.children||[],i===n.length-1&&(e=a.choices&&a.choices.length)})),e},getSourceNode:function(t){var e=null,n=function n(r){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=0;a<r.length;a++){var o=r[a],s=[].concat(l(i),[o[o.idProp||"id"]||a]);if(t===s.join("_")){e=o;break}o.children&&o.children.length&&n(o.children,s)}};return n(this.paperTree||[]),e},handleClick:function(t,e){"text"===this.editType?this.editCallback&&this.editCallback(this.getSourceNode(t)):this.$emit("edit",t,e)},handleMove:function(t,e){this.moveCallback&&this.moveCallback(t,this.getSourceNode(e))},handleDelete:function(t){this.deleteCallback&&this.deleteCallback(this.getSourceNode(t))},handleLine:function(t,e){this.lineCallback&&this.lineCallback(t,this.getSourceNode(e))},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},handleHover:function(t,e){this.setActivePrefixKey(t?e.charAt(0):"")},getContent:function(t,e){var n=this,r=this.$createElement,i=null;switch(t.type){case"question":this.$set(this.rowCountList,t.dataKey,t.rowCount||void 0),i=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question ck-content".concat(this.activePrefixKey===t.dataKey[0]?" ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[t.answerBoxType?r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:"answer"===t.answerBoxType?"答案":"得分",direction:"answer"===t.answerBoxType?"column":"row"}})]):null,r("div",{class:"ac-question__content"+("hand"!==this.readType&&!this.isWithSpace(t.dataKey)||t.answerBoxType?"":" with-space")},[(this.movable||this.deletable||this.contentEditable)&&t.editable?r("div",{class:"ac-question__operation ac-edit-handler"},[this.movable&&!t.hideMoveUp?r("i",{class:"el-icon-top",on:{click:function(){return n.handleMove("up",t.dataKey)}}}):null,this.movable&&!t.hideMoveDown?r("i",{class:"el-icon-bottom",on:{click:function(){return n.handleMove("down",t.dataKey)}}}):null,this.deletable?r("i",{class:"el-icon-delete",on:{click:function(){return n.handleDelete(t.dataKey)}}}):null,this.contentEditable&&t.editable?r("i",{class:"el-icon-edit-outline",on:{click:function(){return n.handleClick(t.dataKey)}}}):null]):null,t.isTable?r("div",{class:"ac-question__line"},[r("span",["行数:"]),r("el-input-number",{attrs:{size:"small",value:this.rowCountList[t.dataKey],min:1,max:100,step:1,"step-strictly":!0},on:{change:function(e){return n.handleLine(e,t.dataKey)}}})]):null,r("div",{domProps:{innerHTML:t.content.join("")}})])]);break;case"essay":i=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.dataKey||""},props:y({},t.content[0]),class:"".concat(this.activePrefixKey===t.dataKey[0]?"ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]});break;case"dimension":i=t.content.map((function(n,i){return r("ac-dimension",{key:"dimension_".concat(e,"_").concat(i),attrs:{"data-key":t.dataKey||""},props:y({},n)})}));break;case"material":i=r("div",{key:"material_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-material ck-content",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[t.editBtn&&this.contentEditable?r("el-button",{class:"ac-material__edit",attrs:{type:"primary",size:"small"},on:{click:function(){return n.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,r("div",{domProps:{innerHTML:t.content.join("")}})]);break;case"plainBox":i=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question is-box".concat(t.isFollowBox?" is-follow":"")},[r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:this.getPlainTitle(t.dataKey)||t.boxContent,width:144,editable:!0,dataKey:t.dataKey}})])]);break;case"graffiti":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-graffiti__wrapper",domProps:{innerHTML:t.content}});break;case"basicInfo":i=r("ac-basic-info",{props:y({},t)});break;case"prefixMarker":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-prefix-marker",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[r("div",{domProps:{innerHTML:t.content}})]);break;case"suffixMarker":i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-suffix-marker",directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[r("div",{domProps:{innerHTML:t.content}})]);break;default:i=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-piece__section".concat(this.activePrefixKey===t.dataKey[0]?" ac-edit-visible":""),directives:[{name:"hover",value:function(e){return n.handleHover(e,t.dataKey)}}]},[this.movable||this.deletable||this.contentEditable&&t.editable?r("div",{class:"ac-section__operation ac-edit-handler"},[this.movable&&!t.hideMoveUp?r("i",{class:"el-icon-top",on:{click:function(){return n.handleMove("up",t.dataKey)}}}):null,this.movable&&!t.hideMoveDown?r("i",{class:"el-icon-bottom",on:{click:function(){return n.handleMove("down",t.dataKey)}}}):null,this.deletable?r("i",{class:"el-icon-delete",on:{click:function(){return n.handleDelete(t.dataKey)}}}):null,this.contentEditable&&t.editable?r("i",{class:"el-icon-edit-outline",on:{click:function(){return n.handleClick(t.dataKey)}}}):null]):null,r("div",{domProps:{innerHTML:t.content}})])}return i}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight,padding:this.piecePadding}},[this.list.map((function(e,n){return t.getContent(e,n)}))])}},bt=_t,wt=Object(P["a"])(bt,pt,gt,!1,null,null,null),Ct=wt.exports;Ct.install=function(t){t.component(Ct.name,Ct)};var At=Ct,xt=n("6bdf"),kt=n("13ed"),Tt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-restrict",style:{width:t.$store.getters["AC/layout"]>2?"580px":"868px",height:"number"===typeof t.height?"".concat(t.height,"px"):t.height,marginTop:"".concat(t.marginTop,"px")}})},Et=[],St={name:"AcRestrict",props:{height:{type:[Number,String],default:"100%"},marginTop:{type:Number,default:0}}},It=St,Ot=Object(P["a"])(It,Tt,Et,!1,null,null,null),Lt=Ot.exports;Lt.install=function(t){t.component(Lt.name,Lt)};var Bt=Lt,Pt={name:"AcPanel",components:{AcPiece:At,AcEditor:xt["default"],AcMarkPoint:kt["default"],AcRestrict:Bt},props:{domList:{type:Array,default:function(){return[]}}},inject:["showStudentInfo","paddingBlock","scanSheet"],data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0,editorTitle:"编辑题目"}},computed:{formatPanelList:function(){var t=this,e=[];return this.panelList.forEach((function(n,r){r%t.layout===0?e.push([n]):e[e.length-1].push(n)})),e},paperTree:function(){return this.$store.getters["AC/paperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},layout:function(){return this.$store.getters["AC/layout"]},latticeAttention:function(){return this.$store.getters["AC/latticeAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){var t="number"===typeof this.paddingBlock?2*this.paddingBlock:this.paddingBlock.reduce((function(t,e){return t+e}),0);return("K"===this.sizeType?1357:1386)-(t+10)},rowConfig:function(){return this.$store.getters["AC/rowConfig"]}},watch:{domList:function(t){t.length&&this.getPanelList()},panelFlag:function(){this.getPanelList()}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleEdit:function(t,e){var n={dataKey:t,content:"",hasChoice:!1},r=this.editTitleList.find((function(e){return e.dataKey===t}));if(r){var i=r.title,a=void 0===i?"":i,o=r.choices,s=void 0===o?[]:o;n.content+=a||"",s.length&&(n.hasChoice=!0,n.content+=s.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join(""))}else{var c=t.split("_"),u=this.paperTree||[];c.forEach((function(t,e){var r=u.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};u=r.children||[],e===c.length-1&&(n.content+=r.title||"",r.choices&&r.choices.length&&(n.hasChoice=!0,n.content+=r.choices.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join("")))}))}this.editing=n,this.editorTitle=e,this.visible=!0},handleSubmit:function(t){var e=this.editing,n=e.dataKey,r=e.hasChoice,i={dataKey:n};if(r){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],u=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");u={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(u)}else u?u.content+=t:s+=t})),Object.assign(i,{title:s,choices:c})}else i.title=t;this.$store.dispatch("AC/paper/setEditTitle",i)},getBasicInfo:function(t){var e=null;return t&&!this.scanSheet||(e={hideStudentInfo:!this.showStudentInfo,hideAttention:!this.showAttention,height:this.headHeight+(this.showAttention?this.attentionHeight:0)+this.eduHeight}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var r=this.pieceHeight,i=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(r-=e.height,i.push(Object.assign({type:"basicInfo"},e)))},s=function(){n++,e[n]=[],r=t.pieceHeight,i=e[n],o()},c=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=["","inner"].includes(i)?0:30,o=r-(n?32:0)-a;return Math.floor((o+e)/(t+e))},u=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.editable,o=!1,s="",c="",u=!1,l=!1,h=!1,d=t.map((function(t){var e="";switch(t.type){case"choice":e="<div class=".concat(t.className,">").concat(t.children.join(""),"</div>");break;case"questionTitle":o=t.isFirst,l=t.hideMoveUp,h=t.hideMoveDown,t.needAnswerBox&&(s="score"),t.hasChoice&&t.needAnswerBox&&(s="answer");var r=t.children.join("");e="<div class='ac-question__title' ".concat(t.titleAlign?'style="text-align: '.concat(t.titleAlign,'"'):"",">").concat(t.prefix||"").concat(r?"<div class='ac-question__title-inner'>".concat(r,"</div>"):"","</div>");break;case"essayArea":e=t.essayConfig;break;case"dimensionItem":e=t.payload;break;case"material":o=t.isFirst,n="material";var i=t.children.join("");e="<div class='ac-material__title'>".concat(t.prefix||"").concat(i?"<div class='ac-material__title-inner'>".concat(i,"</div>"):"","</div>");break;case"plainBox":n="plainBox",c=t.boxContent,u=t.isFollow;break;default:e=t.content}return e}));t.length=0,i.push({type:n,dataKey:e,content:d,editable:o&&a,hideMoveUp:!!o&&l,hideMoveDown:!!o&&h,answerBoxType:s,boxContent:c,isFollowBox:u})},l=function(e,n,i){var a=e.rowHeight,o=e.rowGap,l=e.titleChildren,h=e.borderType,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType),p=t.rowConfig[f]||{};a="number"===typeof a?a:p.rowHeight||0,o="number"===typeof o?o:p.rowGap||0,r<30&&s();var g={type:"essayArea"};if(l){var m="";l.forEach((function(t,a){r>=t.height+(a?0:32)?(m+=t.content,r-=t.height+(a?0:32)):(m&&i.push({type:"essayArea",essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d,bgType:f})}),i.length&&u(i,n,"essay"),s(),m=t.content,r-=t.height+32)})),m?Object.assign(g,{essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d})}):g=null}else g=null;if(!d)return g?i.push(g):(i.push({type:"essayArea",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30),void u(i,n,"essay");var y=d;while(y){var v=c(a,o,!g,h);if(v<1)g&&(i.push(g),g=null),i.length&&u(i,n,"essay"),s();else if(v<y)i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:v,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})}),g&&(g=null),u(i,n,"essay"),s(),y-=v;else{i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:y,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})});var _=["","inner"].includes(h)?0:30;r-=y*(a+o)-o+(g?0:32)+_,y=0,g&&(g=null)}}},h=function(t,e,n){var i=t.length+1,a=i;while(a){var o=Math.floor(r/46);if(o<1)n.length&&u(n,e,"dimension"),s();else if(o<a){for(var c=i-a,l=0;l<o;l++){var h=c+l-1;n.push({type:"dimensionItem",payload:{type:c+l===0?"header":"body",dimension:t[h]||"",dimensionIndex:h}})}u(n,e,"dimension"),s(),a-=o}else{for(var d=i-a,f=0;f<a;f++){var p=d+f-1;n.push({type:"dimensionItem",payload:{type:d+f===0?"header":"body",dimension:t[p]||"",dimensionIndex:p}})}r-=46*a,a=0}}},d=function t(e,n,i,a){var o=a.editable;e.forEach((function(e,a){if(e.children)t(e.children,n,i,{editable:o});else{var c=e.height;if(!a&&e.answerBoxHeight&&(c=Math.max(c,e.answerBoxHeight)),r<c&&(i.length&&u(i,n,"question",{editable:o}),s(),["questionTitleItem","materialItem"].includes(e.type)&&a&&(e.height+=16)),r>=e.height){switch(e.type){case"choiceItem":i.length&&"choice"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"choice",className:e.wrapperClass,children:[e.content]});break;case"questionTitleItem":i.length&&"questionTitle"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"questionTitle",prefix:e.prefix,children:[e.content],hideMoveUp:e.hideMoveUp,hideMoveDown:e.hideMoveDown,isFirst:!a,hasChoice:e.hasChoice,needAnswerBox:e.needAnswerBox,titleAlign:e.titleAlign});break;case"materialItem":i.length&&"material"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"material",prefix:e.prefix,children:[e.content],isFirst:!a});break;case"plainBox":i.push({type:"plainBox",isFollow:!e.height,boxContent:e.boxContent});break;default:i.push(e.content)}r-=e.height}}}))},f=JSON.parse(JSON.stringify(this.domList));f.forEach((function(n){if(n){if(n.updatePiece)s();else if(n.updatePage)for(var c=2*t.layout,f=c-(e.length%c||c)+1,p=0;p<f;p++)s();n.children?n.children&&(d(n.children,n.dataKey,a,{editable:n.editable}),a.length&&u(a,n.dataKey,"question",{editable:n.editable})):"essay"===n.type?(l(n.essay,n.dataKey,a),a.length&&u(a,n.dataKey,"essay")):"dimension"===n.type?(h(n.dimensions,n.dataKey,a),a.length&&u(a,n.dataKey,"dimension")):"basicInfo"===n.type?(t.headHeight=n.headHeight||0,t.attentionHeight=t.latticeAttention.height||n.attentionHeight||0,t.showStudentInfo&&(t.showEducationId?t.eduHeight=t.eduIdLength>10&&0!==t.registrationType?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)),o()):(r<n.height&&s(),r>=n.height&&(i.push({type:n.type||"",dataKey:n.dataKey,content:n.content,editable:n.editable}),r-=n.height))}})),this.panelList=e}}},Rt=Pt,jt=Object(P["a"])(Rt,ot,st,!1,null,null,null),Mt=jt.exports;Mt.install=function(t){t.component(Mt.name,Mt)};var zt=Mt,Nt=n("cf03"),Dt=n.n(Nt),Ut=n("c4e3"),$t=n.n(Ut),Ht={name:"AcLattice",components:{AcVirtual:at,AcPanel:zt},inject:["uploadOss","paperTitle","scanSheet"],data:function(){return{domList:[],questionRects:[]}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(C["a"])(this,e),this.file=t}return Object(A["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){t(e.file,n)}))}}]),e}()}},methods:{setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(tt["b"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.scanSheet){e.next=4;break}return e.next=3,t.downloadSweep();case 3:return e.abrupt("return",e.sent);case 4:return e.next=6,t.getPositionData();case 6:return n=e.sent,e.next=9,t.getPdfFile();case 9:return r=e.sent,i=r.file,a=r.urlList,o="".concat(("K"===t.sizeType?195:210)*t.layout,"mm*").concat("K"===t.sizeType?270:297,"mm"),s={file:i,positionList:n,paperSize:o,pageImgs:a},e.abrupt("return",s);case 15:case"end":return e.stop()}}),e)})))()},getPdfFile:function(){var t=this;return w(_().mark((function e(){var n,r,i,a;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getPageImage();case 2:return n=e.sent,r="K"===t.sizeType?1===t.layout?[552.76,765.35]:[765.35,1105.51]:1===t.layout?"a4":"a3",i=new Dt.a(1===t.layout?"p":"l","pt",r),n.forEach((function(e,r){var a=1===t.layout?"K"===t.sizeType?552.76:595.28:"K"===t.sizeType?1105.51:1190.55,o="K"===t.sizeType?765.35:841.89;i.addImage(e,"JPEG",0,0,a,o),r!==n.length-1&&i.addPage()})),a=i.output("blob"),e.abrupt("return",{file:a,urlList:n});case 8:case"end":return e.stop()}}),e)})))()},downloadSweep:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"扫描答题卡不能超过16页",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getPdfFile();case 5:return n=e.sent,r=n.file,i=n.urlList,e.next=10,t.getZipContent();case 10:return a=e.sent,o=$(".ac-panel .ac-piece__wrapper")[0],s={questionRects:t.questionRects,intrinsicWidth:$(o).outerWidth(),intrinsicHeight:$(o).outerHeight()},c=$(".ac-piece__wrapper").length,e.abrupt("return",{file:r,pageImgs:i,zipFile:a,rectInfo:s,pageSize:c});case 15:case"end":return e.stop()}}),e)})))()},pxToNumber:function(t){return Number((t||"").replace("px",""))},getSweepData:function(){var t=this,e=[],n=function(e,n){var r=n.essayInfo,i=n.isObjective,a=[];return e.forEach((function(e){var n=$(e).parents(".ac-piece__wrapper"),i=$(n).find(".mark-point__top-left")[0],o=$(i).offset(),s=o.left,c=o.top,u=$(e).offset().left-s,l=u+$(e).outerWidth(),h=$(e).offset().top-c,d=h+$(e).outerHeight(),f=Number(n.data("page")),p=a.find((function(t){return t.pageNum===f}));if(p)p.left=Math.min(p.left,u),p.right=Math.max(p.right,l),p.top=Math.min(p.top,h),p.bottom=Math.max(p.bottom,d);else{var g={pageNum:f,left:u,right:l,top:h,bottom:d};if(r&&5===r.bgType){var m=getComputedStyle(e),y=t.pxToNumber(m.getPropertyValue("--row")),v=t.pxToNumber(m.getPropertyValue("--row-height")),_=t.pxToNumber(m.getPropertyValue("--row-gap")),b=t.pxToNumber(m.getPropertyValue("--column"));g.rowInfo={Row:y,RowGap:_,Size:v,Column:b};for(var w=[],C=0;C<y;C++)w.push({Type:"AnswerArea",Page:"第".concat(f,"页"),X:Math.floor(u),Y:Math.floor(h+C*v+(C+1)*_),Width:b*v,Height:v,Index:C});w.length&&(g.children=w)}a.push(g)}})),a.map((function(t){var e=t.pageNum,n=t.left,r=t.right,a=t.top,o=t.bottom,s=t.rowInfo,c=t.children,u={Type:"AnswerArea",Page:"第".concat(e,"页"),X:Math.floor(n),Y:Math.floor(a),Width:Math.ceil(r-n),Height:Math.ceil(o-a)};return i&&(u.QuestionType="Objective"),s&&Object.assign(u,y({},s)),c&&(u.Children=c),u}))},r=function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,a){var o=[].concat(l(i),[r[r.idProp||"id"]||a]);if(r.scanInfo){var s=[],c=$(".ac-panel");if(Array.isArray(r.children)&&r.children.length)r.children.forEach((function(t,e){var n=[].concat(l(o),[t[t.idProp||"id"]||e]),r=c.find("div[data-key=".concat(n.join("_"),"] .ac-essay"));s.push.apply(s,l(r))}));else{var u=o.join("_"),h="div[data-key=".concat(u,"]");r.choices?h="div[data-key=".concat(u,"] .ac-answer-box"):r.essay?h="wrapper"===r.essay.sweepRange?"div[data-key=".concat(u,"] .ac-essay"):"div[data-key=".concat(u,"] .ac-essay__area"):r.table&&(h="div[data-key=".concat(u,"] .ac-table__area-of-piece"));var d=c.find(h);s.push.apply(s,l(d))}var f=n(s,{essayInfo:r.essay,isObjective:Boolean(r.choices)});e.push.apply(e,l(f.map((function(t){return y(y({},t),r.scanInfo)}))))}else Array.isArray(r.children)&&r.children.length&&t(r.children,o)}))};return r(this.paperTree),e},getPositionData:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],r=function(e,n,r){var i=r||$(e).parents(".ac-piece__wrapper"),a=i.offset(),o=a.left,s=a.top,c=$(e).offset(),u=c.left,l=c.top,h=u-o,d=h+$(e).outerWidth(),f=l-s,p=f+$(e).outerHeight(),g={page_left_top:"(".concat(t.pxToAU(h),",").concat(t.pxToAU(f),")"),page_right_bottom:"(".concat(t.pxToAU(d),",").concat(t.pxToAU(p),")"),question_page:i.data("page")};if("hand"===t.readType&&n){var m=$(e).find(".ac-answer-box")[0];if(m){var y=$(m).offset(),v=y.left,_=y.top;Object.assign(g,{mark_left_top:"(".concat(t.pxToAU(v-o),",").concat(t.pxToAU(_-s),")"),mark_right_bottom:"(".concat(t.pxToAU(v-o+$(m).outerWidth()),",").concat(t.pxToAU(_-s+$(m).outerHeight()),")")})}}return g},i=function(e){var n=[];return e.forEach((function(t){var e=$(t).parents(".ac-piece__wrapper"),r=e.data("page"),i=e.offset(),a=i.left,o=i.top,s=$(t).offset(),c=s.left,u=s.top,l=c-a,h=l+$(t).outerWidth(),d=u-o,f=d+$(t).outerHeight(),p=n.find((function(t){return t.question_page===r}));p?(p.leftPosition=Math.min(p.leftPosition,l),p.rightPosition=Math.max(p.rightPosition,h),p.topPosition=Math.min(p.topPosition,d),p.bottomPosition=Math.max(p.bottomPosition,f)):n.push({question_page:r,leftPosition:l,rightPosition:h,topPosition:d,bottomPosition:f})})),n.map((function(e){var n=e.leftPosition,r=e.rightPosition,i=e.topPosition,a=e.bottomPosition,o=e.question_page;return{page_left_top:"(".concat(t.pxToAU(n),",").concat(t.pxToAU(i),")"),page_right_bottom:"(".concat(t.pxToAU(r),",").concat(t.pxToAU(a),")"),question_page:o}}))},a=function(t,e){var a=e.join("_"),o=$(".ac-panel"),s=l(o.find("div[data-key=".concat(a,"]"))),c=[],u={},h={};if(t.prefixMarker){var d=o.find(".ac-prefix-marker[data-key=".concat(a,"]"));Object.assign(u,r(d))}if(t.suffixMarker){var f=o.find(".ac-suffix-marker[data-key=".concat(a,"]"));Object.assign(h,r(f))}var p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];return Array.isArray(e)?(e.forEach((function(e,a){var s=[],u=[].concat(l(n),[a]),h=o.find("div[data-key=".concat(u.join("_"),"]"));if(s.push.apply(s,l(h)),e.children&&s.push.apply(s,l(t(e.children,u))),e.positionInfo){var d=i(s);c.push.apply(c,l(d.map((function(t){return y(y({},t),e.positionInfo)}))))}r.push.apply(r,s)})),r):r};s.push.apply(s,l(p(t.children,e)));var g=i(s);n.push.apply(n,l(g.map((function(e){var n=y(y({subQuestionPositions:c},e),t.positionInfo);return t.prefixMarker&&Object.assign(n,{prefixMarkerInfo:u}),t.suffixMarker&&Object.assign(n,{suffixMarkerInfo:h}),n}))))},o=function e(o){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];o.forEach((function(o,c){var u=[].concat(l(s),[o[o.idProp||"id"]||c]);if(o.prefixMarker||o.suffixMarker)a(o,u);else if(Array.isArray(o.children)&&o.children.length)e(o.children,u);else{var h=u.join("_"),d=$(".ac-panel");if(o.choices){var f=d.find(".ac-question[data-key=".concat(h,"] .ac-answer-box"))[0];f&&n.push(Object.assign(r(f),o.positionInfo||{}))}else if(o.essay){var p=t.editEssayList.find((function(t){return t.dataKey===h}))||{},g="number"===typeof p.row?0===p.row:0===o.essay.rowCount,m=p.title||o.essay.title,v=[];if(g){var _=m?".ac-essay__wrapper[data-key=".concat(h,"]"):".ac-question[data-key=".concat(h,"]");v=d.find(_)}else v=d.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(h,"],"):"",".ac-essay__wrapper[data-key=").concat(h,"]").concat("area"===o.essay.range?" .ac-essay__area":""));for(var b=0;b<v.length;b++){var w=r(v[b],!0);n.push(Object.assign(w,o.positionInfo||{}))}}else if(o.dimensions){for(var C=d.find(".ac-dimension[data-key=".concat(h,"]")),A=i(Array.from(C)),x=[],k={count:5,width:t.pxToAU(32),height:t.pxToAU(32),gap:t.pxToAU(4)},T=0;T<C.length;T++){var E=C[T],S=Number($(E).data("dimension-index"));if(-1!==S){var I=$(E).find(".dimension-stars")[0],O=$(E).find(".dimension-stars")[1],L=$(I).find("i")[0],B=$(O).find("i")[0];x.push({dimension:o.dimensions[S],dimensionIndex:S,selfStars:y(y({},r(L)),k),partnerStars:y(y({},r(B)),k)})}}n.push.apply(n,l(A.map((function(t){return y(y({subQuestionPositions:x},t),o.positionInfo)}))))}else for(var P=d.find(".ac-question[data-key=".concat(h,"]")),R=0;R<P.length;R++){var j=r(P[R],!0);n.push(Object.assign(j,o.positionInfo||{}))}}}))},o(t.paperTree),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))()},pxToAU:function(t){var e="K"===this.sizeType?195:210;return Math.floor(t*e*8/294*100)/100},getZipContent:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=1===t.registrationNumberType,a=new $t.a,o="".concat(n,"模板_").concat(n,"_").concat(2===t.layout?"A3":"A4","_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(r.length,"_").concat(i?"涂点":"条码","_").concat(i?"10":"-1","_").concat(i?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(r).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(tt["b"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,c=new Uint8Array(o);while(o--)c[o]=i.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return u=e.sent,l="".concat(n,"模板.zip"),e.abrupt("return",new File([u],l,{type:"zip"}));case 17:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),r=function(n,r){var i=$(n).offset(),a=i.left,o=i.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var i=$(n),s=i.data("export_name");if(s){var c="absolute"===i.data("scan-type"),h={Type:"AnswerArea",Name:s,Page:r,X:Math.floor(i.offset().left-(c?a:u)),Y:Math.floor(i.offset().top-(c?o:l)),Width:Math.ceil(i.outerWidth()),Height:Math.ceil(i.outerHeight())};"考号"===i.data("export_name")&&(h.Rows=10,h.Columns=t.educationIdValue),e.push(h)}}))};Array.from(n).forEach((function(t,e){r(t,"第".concat(e+1,"页"))})),this.questionRects=this.getSweepData(),e.push.apply(e,l(this.questionRects));var i='<?xml version="1.0" encoding="utf-8"?>';return i+='<answerSheet isNew="true" isTFishProject="true" layout="'.concat(this.layout,'">'),i+=this.getXMLStringFromArray(e),i+="</answerSheet>",i},getXMLStringFromArray:function(t){var e=this,n=function(t){return Object.keys(t).map((function(n){return"Type"===n?"":"Children"===n?"<Children>".concat(e.getXMLStringFromArray(t[n]),"</Children>"):"<".concat(n,">").concat(t[n],"</").concat(n,">")})).join("")};return t.map((function(t){return"<".concat(t.Type,">").concat(n(t),"</").concat(t.Type,">")})).join("")}}},Ft=Ht,Kt=Object(P["a"])(Ft,d,f,!1,null,null,null),Wt=Kt.exports,Vt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-sweep"},[e("ac-sweep-virtual",{attrs:{tree:t.sweepPaperTree},on:{change:t.setDomList}}),e("ac-sweep-panel",{attrs:{"dom-list":t.domList}})],1)},Yt=[],Zt=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__choice",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom"],attrs:{"data-key":t.dataKey}},[Array.isArray(t.listData)?t._l(t.listData,(function(n,r){return e("div",{key:r,staticClass:"ac-sweep__choice-wrapper"},[e("ul",{class:["ac-sweep__choice-box"],style:{gridTemplateColumns:"row"===t.objectiveOrder?"repeat(".concat(n.questionsWidth.length,", auto)"):"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridTemplateRows:"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridAutoFlow:t.objectiveOrder}},t._l(n.questions,(function(n,i){return e("li",{key:"".concat(r,"_").concat(i),ref:"choiceEach_".concat(r,"_").concat(i),refInFor:!0,staticClass:"ac-sweep__choice-each"},[e("span",{staticClass:"choice-title",style:{width:t.isComplex?"50px":"20px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"".concat(r,"_").concat(i))}}},[t._v(" "+t._s(t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n.choices,(function(n,a){return e("span",{key:"".concat(r,"_").concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])})),0)])})):[e("div",{staticClass:"ac-sweep__choice-wrapper"},[e("ul",{staticClass:"ac-sweep__choice-box"},[e("li",[e("span",{staticClass:"choice-title",attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"0")}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,r){return e("span",{key:r,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])])])]],2)},Gt=[],Qt={name:"AcSweepChoice",components:{},props:{list:{type:[Array,Object]},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isComplex:{type:Boolean,default:!1},dataKey:{type:[String,Number]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]}},watch:{objectiveOrder:function(t){this.convertTree(this.list)}},mounted:function(){this.convertTree(this.list)},data:function(){return{listData:null}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(this.dataKey,"_").concat(e)})},convertTree:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++){var r=t[n];"single_choice"===r.code?(0!==n&&"single_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r)):"multiple_choice"===r.code?(0!==n&&"multiple_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r)):"judgment"===r.code&&(0!==n&&"judgment"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(r))}this.listData=e,this.getChoiceWidth(this.listData)}},getChoiceWidth:function(t){var e=this;t.forEach((function(t){t.questions.forEach((function(n){t.questionsWidth.push(6+(e.isComplex?50:20)+30*n.choices.length-8+28)}))})),this.listData.forEach((function(t){t.questionsWidth=e.designLayout(e.objectiveOrder,t.questionsWidth)}))},designLayout:function(t,e){var n=$(".ac-sweep__choice").innerWidth()-64,r=function(t){return t.reduce((function(t,e){return Math.max(t,e)}),0)},i=function(t){return t.reduce((function(t,e){return Math.min(t,e)}),n)},a=function(t,r){var i=[];return e.forEach((function(n,a){var o="row"===r?a%t:Math.floor(a/(e.length/t));i[o]=Math.max(i[o]||0,n)})),n-i.reduce((function(t,e){return t+e}),0)},o=r(e),s=i(e),c=Math.floor(n/o),u=c,l=!0;while(l){var h=a(u,t);h<s||u>=e.length?l=!1:u+=1}var d=Array(u).fill("").map((function(n,r){return e.filter((function(n,i){if("row"===t)return i%u===r;var a=Math.ceil(e.length/u);return i<(r+1)*a&&i>=r*a}))}));return d}}},Xt=Qt,qt=Object(P["a"])(Xt,Zt,Gt,!1,null,null,null),Jt=qt.exports;Jt.install=function(t){t.component(Jt.name,Jt)};var te=Jt,ee=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__composite",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom",t.isComplex&&"is-padding",t.isHideBorderTop&&"hide-border-top",t.isPaddingTop&&"is-padding-top",t.isHidePaddingTop&&"is-hide-padding-top"],attrs:{"data-key":t.dataKey,type:"composite","page-index":t.pageIndex}},[t.getLiContent?e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getLiContent)}}):e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getTitle)}}),e("el-button",{staticClass:"edit-btn",attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}})],1)},ne=[],re={name:"AcSweepComposite",components:{AcEditor:xt["default"]},props:{title:{type:String,default:""},blankNum:{type:Number,default:0},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isHideBorderTop:{type:Boolean,default:!1},dataKey:{type:String,default:""},isComplex:{type:Boolean,default:!1},isPaddingTop:{type:Boolean,default:!1},isHidePaddingTop:{type:Boolean,default:!1},pageIndex:{type:Number,default:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},getTitle:function(){var t=new Array(this.blankNum).fill("").map((function(){return'<span style="display: inline-block; height: 40px; vertical-align: text-top"><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></span>'}));return'<span style="height: 40px;">'.concat(this.title,"</span>").concat(t.join("、"))},getLiContent:function(){var t=this,e=this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},mounted:function(){},data:function(){return{editorVisible:!1,editContent:""}},methods:{getFullTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.$refs.compositeContent.innerHTML},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/paper/setEditTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")}}},ie=re,ae=Object(P["a"])(ie,ee,ne,!1,null,null,null),oe=ae.exports;oe.install=function(t){t.component(oe.name,oe)};var se,ce,ue=oe,le={name:"AcSweepComplex",components:{AcSweepChoice:te,AcSweepCompletion:ue,AcEssay:x["default"],AcEditor:xt["default"]},props:{list:{type:[Array,Object]},isShowBorderBottom:{type:Boolean,default:!1},dataKey:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},created:function(){this.init()},data:function(){return{listTree:null,editorVisible:!1,editContent:""}},methods:{init:function(){this.listTree=this.convertTree(this.list)},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},convertTree:function(t){for(var e=t.children,n=[],r=0;r<e.length;r++){var i=e[r];("single_choice"===i.code||"multiple_choice"===i.code||"judgment"===i.code)&&r<e.length-1&&("single_choice"===e[r+1].code||"multiple_choice"===e[r+1].code||"judgment"===e[r+1].code)?(n.push([i,e[r+1]]),r++):n.push(i)}return t.children=n,t},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.listTree.title},editTitle:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},getList:function(t){var e=this,n=this.$createElement;return t.map((function(t,r){return n("div",{key:"".concat(r,"_").concat(t[t.idProp||"id"]||""),class:!t.code&&!Array.isArray(t)&&"ac-sweep__virtual-section",attrs:{"data-key":t.dataKey,"question-code":t.code}},[Array.isArray(t.children)&&t.children.length&&"complex"!==t.code?n("div",{class:"ac-sweep__virtual-box"},[!t.code&&e.getTitle(t,t.dataKey),e.getList(t.children)]):n("div",[Array.isArray(t)||"single_choice"===t.code||"multiple_choice"===t.code||"judgment"===t.code?n("ac-sweep-choice",{props:y({},{list:t,showBorder:!1,dataKey:t.dataKey,isComplex:!0})}):null,"completion"===t.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(t.dataKey)),props:y({},Object.assign({dataKey:t.dataKey,isComplex:!0},t))}):null,"subjectivity"===t.code?n("ac-essay",{props:y({},Object.assign(t.essay,{title:e.getEssayTitle(t.dataKey,t.title),hiddenBorderBoth:!1}))}):null,"complex"===t.code?n("ac-sweep-complex",{props:y({},{list:t,dataKey:t.dataKey})}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-sweep__complex ".concat(this.isShowBorderBottom&&"is-border-bottom")},[t("p",{class:"ac-sweep__complex-title",on:{click:this.editTitle},domProps:{innerHTML:this.getLiContent?this.getLiContent:this.listTree.title}}),this.getList(this.listTree.children),t("ac-editor",{attrs:{visible:this.editorVisible,content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}})])}},he=le,de=Object(P["a"])(he,se,ce,!1,null,null,null),fe=de.exports;fe.install=function(t){t.component(fe.name,fe)};var pe,ge,me=fe,ye={name:"AcSweepVirtual",components:{AcSweepChoice:te,AcSweepCompletion:ue,AcSweepComplex:me,AcEssay:x["default"],AcBasicInfo:Q["default"]},props:{tree:{type:Array,default:function(){return[]}}},computed:{sweepPaperTree:function(){return this.$store.getters["AC/sweepPaperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},layout:function(){return this.$store.getters["AC/layout"]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},readType:function(){return this.$store.getters["AC/readType"]}},watch:{panelFlag:function(){var t=this;this.$nextTick((function(){return t.getDomList()}))}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},data:function(){return{}},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},getTitle:function(t,e){var n=this,r=this.$createElement,i=t.title;return r("div",{class:"ac-sweep__virtual-head",attrs:{contenteditable:!0,"data-key":e},domProps:{innerHTML:i},on:{blur:function(t){return n.handleBlur(t,e)}}})},getList:function(t){var e=this,n=this.$createElement;return t.map((function(r,i){return n("div",{key:"".concat(i,"_").concat(r[r.idProp||"id"]||""),class:!r.code&&!Array.isArray(r)&&"ac-sweep__virtual-section",attrs:{"data-key":r.dataKey||i,"question-code":r.code}},[Array.isArray(r.children)&&r.children.length&&"complex"!==r.code?n("div",{class:"ac-sweep__virtual-box"},[!r.code&&e.getTitle(r,r.dataKey||i),e.getList(r.children)]):n("div",[(e.layout>1?i%(2*e.layout)===0:e.patchwork?(i+1)%4===1:i%2===0)?n("ac-basic-info"):null,Array.isArray(r)||"single_choice"===r.code||"multiple_choice"===r.code||"judgment"===r.code?n("ac-sweep-choice",{props:y({},{list:r,isShowBorderBottom:i===t.length-1,dataKey:r.dataKey||i})}):null,"completion"===r.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(r.dataKey)),props:y({},Object.assign({dataKey:r.dataKey},r,{isShowBorderBottom:i===t.length-1,isPaddingTop:t[i-1]&&"completion"!==t[i-1].code&&"complexTitle"!==t[i-1].code,isHidePaddingTop:t[i-1]&&"completion"===t[i-1].code}))}):null,"subjectivity"===r.code?n("ac-essay",{props:y({},Object.assign(r.essay,{title:e.getEssayTitle(r.dataKey,r.title)}))}):null,"complex"===r.code?n("ac-sweep-complex",{props:y({},{list:r,isShowBorderBottom:i===t.length-1,dataKey:r.dataKey})}):null])])}))},splitDom:function(t){for(var e="",n=0,r=0,i=[],a=t.childNodes||[],o=0;o<a.length;o++){var s=a[o];if(-1===["P","DIV","IMG"].indexOf(s.nodeName))try{"#text"===s.nodeName?e+=s.textContent:e+=s.outerHTML}catch(f){}else{var c=getComputedStyle(s),u=Number(c.marginTop.replace("px",""))||0,l=Number(c.marginBottom.replace("px",""))||0,h=s.offsetTop;i.length&&(h-=r),e+=s.outerHTML,n+=h+$(s).outerHeight()+u+l,i.push({content:e,height:n}),e="",n=0,r=s.offsetTop+$(s).outerHeight()+u+l}}if(e){var d=$(t).outerHeight();i.push({content:e,height:i.length?d-r:d})}return i},getDomList:function(){var t=this,e=function(e){e.forEach((function(e,n){var r=u.find(".ac-sweep__virtual-section[data-key=".concat(n,"]")),i=r.find(".ac-sweep__virtual-head")[0];i&&c.push({type:"sectionHead",height:t.editTitleList.find((function(t){return t.dataKey===n}))?t.editTitleList.find((function(t){return t.dataKey===n})).height:$(i).outerHeight(),content:i.innerHTML,dataKey:$(i).data("key")}),Array.isArray(e.children)&&e.children&&e.children.forEach((function(t,n){var i=t.dataKey,a=r.find("div[data-key=".concat(i,"]"))[0];s(t,a,!1,n===e.children.length-1,i)}))}))},n=function(e,n){var r=t.layout>2?520:808,i=function(t){return t.reduce((function(t,e){return Math.max(t,e.width)}),0)},a=function(t){return t.reduce((function(t,e){return Math.min(t,e.width)}),r)},o=function(t,e){var i=[];return n.forEach((function(r,a){var o="row"===e?a%t:Math.floor(a/(n.length/t));i[o]=Math.max(i[o]||0,r.width)})),r-i.reduce((function(t,e){return t+e}),0)},s=i(n),c=a(n),u=Math.floor(r/s),l=u,h=!0;while(h){var d=o(l,e);d<c||l>=n.length?(h=!1,d<0&&(l-=1)):l+=1}var f=Array(l).fill("").map((function(t,r){return n.filter((function(t,i){if("row"===e)return i%l===r;var a=Math.ceil(n.length/l);return i<(r+1)*a&&i>=r*a}))}));return f.forEach((function(t){var e=i(t);t.forEach((function(t){t.columnWidth=e}))})),f},r=function(e,r){if(Array.isArray(e)){for(var o=[],s=0;s<e.length;s++){var c=e[s];"single_choice"===c.code?(0!==s&&"single_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"multiple_choice"===c.code?(0!==s&&"multiple_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"judgment"===c.code&&(0!==s&&"judgment"===e[s-1].code||o.push([]),o[o.length-1].push(c))}var u=[];return o.forEach((function(e){e.forEach((function(t){t.width=(i(t.title)?a(t.title):23)+6+30*t.choices.length-8+18}));for(var r=n(t.objectiveOrder,e),o=r[0].length,s=function(t){u.push(r.map((function(e){return e.find((function(e,n){return n===t}))})))},c=0;c<o;c++)s(c)})),u}},i=function(t){var e=o(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},a=function(t){var e=o(t).length;return e>6?56:6===e?48:e<6?40:void 0},o=function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},s=function e(n,i,a,o,s){if(Array.isArray(n)){var u=r(n,a);u.forEach((function(t,e){c.push({height:0===e||u.length-1===e?44:24,type:"objective",isComplex:a,isShowBorderBottom:o,dataKey:s,list:t})}))}else switch(n.code){case"single_choice":case"multiple_choice":case"judgment":c.push(Object.assign({height:44,type:"objective",isComplex:a,isShowBorderBottom:o},n));break;case"completion":var l=$(i).find(".ac-sweep__composite-title")[0],h=t.splitDom(l);h.forEach((function(t){t.type="completionItem",t.isComplex=a})),!h.length||a&&"graffiti"!==t.readType||(h[0].height+=15),"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"completion",isComplex:a,isShowBorderBottom:o,dataKey:n.dataKey,height:$(l).outerHeight(),children:h});break;case"subjectivity":var d=$(i).find(".ac-essay__title")[0];"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"essay",dataKey:s,essay:Object.assign({rowCount:4,dataKey:n.dataKey,isComplex:a,titleChildren:t.splitDom(d)},n.essay)});break;case"complex":var f=$(i).find(".ac-sweep__complex-title")[0],p=t.splitDom(f);p.length&&(p[0].type="complexTitleItem"),c.push({type:n.title?"complexTitle":null,children:p}),n.children&&n.children.forEach((function(t,r){var a=$(i).find("div[data-key=".concat(t.dataKey,"]"));e(t,a,!0,r===n.children.length-1,t.dataKey)}));break}},c=[],u=$(".ac-virtual"),l=u.find(".ac-basicInfo");if(l){var h=l.find(".ac-basicInfo__title"),d=l.find(".ac-attention"),f=l.find(".ac-basic-info__edu");c.push({type:"basicInfo",headHeight:null===h||void 0===h?void 0:h.outerHeight(),attentionHeight:null===d||void 0===d?void 0:d.outerHeight(),eduHeight:null===f||void 0===f?void 0:f.outerHeight()})}e(this.tree),this.$emit("change",c)}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},style:{width:this.$store.getters["AC/layout"]>2?"690px":"978px"}},[this.getList(this.tree)])}},ve=ye,_e=Object(P["a"])(ve,pe,ge,!1,null,null,null),be=_e.exports;be.install=function(t){t.component(be.name,be)};var we=be,Ce=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,r){return e("div",{key:r,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",attrs:{"data-page-type":n.flat().length?"":"restrict"}},[n.length?t._l(n,(function(n,i){return e("ac-sweep-piece",{key:i,attrs:{"data-piece":r*t.layout+i,"data-page":r,list:n,"page-index":r}})})):e("div",{staticClass:"ac-piece"},[e("ac-restrict",{attrs:{height:1250}})],1),e("ac-mark-point",{attrs:{"page-index":r}}),t.isAddFooter?e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(r+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")]):t._e()],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||""},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},Ae=[],xe=n("2638"),ke=n.n(xe),Te=function(){var t=this,e=t._self._c;return e("div",{class:["objective","is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"is-hide_Border-top"]},[Array.isArray(t.list)?t._l(t.list,(function(n,r){return e("div",{key:r,class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},t._l(n.list,(function(i,a){return e("div",{key:"".concat(r,"_").concat(a),staticClass:"ac-sweep__choice-each",style:{width:i&&"".concat(i.columnWidth,"px"),height:i&&"".concat(n.height,"px"),lineHeight:i&&"".concat(24,"px"),paddingTop:"".concat(0===r&&n.height-24,"px"),paddingBottom:"".concat(r===t.list.length-1&&n.height&&i-24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":i&&i.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:i&&t.isHasBrackets(i.title)?"".concat(t.convertWidth(i.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,i.dataKey)}}},[t._v(" "+t._s(i&&t.getBeforeChinese(i.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(i&&i.choices,(function(n,o){return e("span",{key:"".concat(r,"_").concat(a,"_").concat(o),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==i.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])})),0)})):[t.list.list?e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap",paddingTop:"10px",paddingBottom:"10px"}},t._l(t.list.list,(function(n,r){return e("div",{key:"".concat(r),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(t.list.height-20,"px"),lineHeight:n&&"".concat(24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&t.isHasBrackets(n.title)?"".concat(t.convertWidth(n.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(i,a){return e("span",{key:"".concat(r,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==n.code?i.identifier:t.judgmentMode?"T"===i.identifier?"✓":"×":i.identifier)+" ")])})),0)])})),0):e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},[e("div",{staticClass:"ac-sweep__choice-each",style:{width:"".concat(t.list.columnWidth,"px"),height:"".concat(t.list.height,"px"),lineHeight:"".concat(t.list.height,"px"),whiteSpace:"nowrap"},attrs:{"data-key":t.list.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:t.isHasBrackets(t.list.title)?"".concat(t.convertWidth(t.list.title),"px"):"23px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,t.list.dataKey)}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,r){return e("span",{key:r,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s("judgment"!==t.list.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])])]],2)},Ee=[],Se={name:"AcObjective",components:{},props:{list:{type:[Array,Object]},isHideBorderTop:{type:Boolean,default:!1},isShowBorderBottom:{type:Boolean,default:!1},pageIndex:{type:Number,default:0}},computed:{objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},judgmentMode:function(){return this.$store.getters["AC/judgmentMode"]}},watch:{},mounted:function(){},data:function(){return{}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);if(-1===n)return t;var r=t.slice(0,n);return r.endsWith(".")?r.slice(0,-1):r}},isHasBrackets:function(t){var e=this.getBeforeChinese(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},convertWidth:function(t){var e=this.getBeforeChinese(t).length;return e>6?56:6===e?48:e<6?40:void 0},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(e)})}}},Ie=Se,Oe=Object(P["a"])(Ie,Te,Ee,!1,null,null,null),Le=Oe.exports;Le.install=function(t){t.component(Le.name,Le)};var Be,Pe,Re=Le,je={name:"AcSweepPiece",components:{AcEssay:x["default"],AcBasicInfo:Q["default"],AcSweepCompletion:ue,AcObjective:Re,AcEditor:xt["default"],AcRestrict:Bt,AcGraffiti:G["default"]},props:{list:{type:Array,default:function(){return[]}},pageIndex:{type:Number,default:0}},computed:{pieceHeight:function(){return"1386px"},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sweepList:function(){return this.transformTree(this.list)},layout:function(){return this.$store.getters["AC/layout"]}},data:function(){return{editorVisible:!1,editContent:""}},methods:{handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e,height:t.target.offsetHeight}),this.$store.dispatch("AC/paper/resetPanel")},editTitle:function(t){var e=this;this.editContent=(this.editEssayList.find((function(t){return t.dataKey===e.dataKey}))||{}).title||t,this.editorVisible=!0},getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},transformTree:function(t){var e=this,n=new Set(["objective"]);return t.reduce((function(r,i,a){i.children&&(i.children=e.transformTree(i.children));var o=r[r.length-1];return o&&n.has(t[a-1].type)&&n.has(i.type)?(Array.isArray(o)?o.push(i):r[r.length-1]=[o,i],r):(r.push(i),r)}),[])},getContent:function(t,e){var n=this,r=this.$createElement,i=null;switch(!0){case"basicInfo"===t.type:i=r("ac-basic-info",{props:y({},t)});break;case"complexTitle"===t.type:i=r("div",{class:"ac-sweep__complex",style:{borderBottom:this.sweepList.length-1===e&&"1px solid #000"}},[r("p",{class:"ac-sweep__complex-title",on:{click:function(){return n.editTitle(t.content[0])}},domProps:{innerHTML:this.getLiContent?this.getLiContent:t.content[0]}})]);break;case"sectionHead"===t.type:i=r("div",{class:"ac-sweep__virtual-head",style:{marginTop:t.isMarginTop&&"30px"},attrs:{contenteditable:!0,dataKey:t.dataKey},domProps:{innerHTML:t.content},on:{blur:function(e){return n.handleBlur(e,t.dataKey)}}});break;case"graffiti"===t.type:i=r("ac-graffiti",{props:y({},Object.assign(t,{hideTopBorder:this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type}))});break;case"completion"===t.type:i=r("ac-sweep-completion",{props:y({},Object.assign(t,{dataKey:t.dataKey,title:this.getPlainTitle(t.dataKey)||t.content[0],isHideBorderTop:0!==e&&this.sweepList[e-1]&&["completion","complexTitle"].includes(this.sweepList[e-1].type),isPaddingTop:0==e||this.sweepList[e-1]&&"completion"!==this.sweepList[e-1].type&&"complexTitle"!==this.sweepList[e-1].type,isHidePaddingTop:this.sweepList[e-1]&&"completion"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type)}))});break;case"objective"===t.type||Array.isArray(t):i=r("ac-objective",{props:y({},{list:t,isHideBorderTop:0!==e&&this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||!!this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type)})});break;case"essay"===t.type:i=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.essayConfig.dataKey||"","page-index":this.pageIndex+1,"li-editable":!0},props:y({},y(y({},t.essayConfig),{},{hiddenBorderTop:0!==e&&"complexTitle"===this.sweepList[e-1].type,hiddenBorderBottom:e!==this.sweepList.length-1&&this.sweepList[e+1]&&("essay"===this.sweepList[e+1].type||"completion"===this.sweepList[e+1].type||"complexTitle"===this.sweepList[e+1].type),column:3===this.layout?13:20}))});break;case"restrict"===t.type:i=r("ac-restrict",{props:y({},{height:t.height,marginTop:30})});break}return i}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight}},[e("div",{class:this.$store.getters["AC/layout"]>2?"ac-module__ThreeColumn":"ac-module__column",style:{margin:"0 auto"}},[this.sweepList.length?this.sweepList.map((function(e,n){return t.getContent(e,n)})):e("ac-restrict",{props:y({},{height:1250})}),e("ac-editor",ke()([{attrs:{visible:this.editorVisible}},{on:{"update:visible":function(e){return t.editorVisible=e}}},{attrs:{content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}}]))])])}},Me=je,ze=Object(P["a"])(Me,Be,Pe,!1,null,null,null),Ne=ze.exports;Ne.install=function(t){t.component(Ne.name,Ne)};var De=Ne,Ue={name:"AcSweepPanel",components:{AcSweepPiece:De,AcEditor:xt["default"],AcMarkPoint:kt["default"],AcRestrict:Bt},props:{domList:{type:Array,default:function(){return[]}}},computed:{formatPanelList:function(){var t=this,e=[];if(this.panelList.length)if(this.panelList.forEach((function(n,r){r%t.layout===0?e.push([n]):e[e.length-1].push(n)})),1===this.layout&&e.length%2)e.push([]);else if(2===this.layout)e[e.length-1].length%2&&e[e.length-1].push([]),(1===e.length||e.length%2)&&e.push(l(Array(2).fill([])));else if(3===this.layout){var n;3!==e[e.length-1].length&&(n=e[e.length-1]).push.apply(n,l(Array(3-e[e.length-1].length).fill([]))),(1===e.length||e.length%2)&&e.push(l(Array(3).fill([])))}return e},pieceHeight:function(){return 1240},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},scansionAttention:function(){return this.$store.getters["AC/scansionAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},layout:function(){return this.$store.getters["AC/layout"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},isAddFooter:function(){return this.$store.getters["AC/addFooter"]}},watch:{domList:function(t){t.length&&this.getPanelList()}},mounted:function(){},data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleSubmit:function(t){var e=this.editing,n=e.dataKey,r=e.hasChoice,i={dataKey:n};if(r){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],u=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");u={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(u)}else u?u.content+=t:s+=t})),Object.assign(i,{title:s,choices:c})}else i.title=t;this.$store.dispatch("AC/paper/setEditTitle",i)},getBasicInfo:function(t){var e=null;return(this.layout>1?t%(2*this.layout)===0:this.patchwork?(t+1)%4===1:t%2===0)&&(e={hideAttention:!this.showAttention||0!==t,height:this.headHeight+(this.showAttention&&0===t?this.attentionHeight:0)+this.eduHeight}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var r=this.pieceHeight,i=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(r-=e.height,i.push(Object.assign({type:"basicInfo"},e)))},s=function(){var a=e[n];if(n++,e[n]=[],r=t.pieceHeight,i=e[n],o(),"graffiti"===a[a.length-1].type){var s=a[a.length-1];a.pop(),i.push(s),r-=30}},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=r-(n?62:30);return Math.floor((i+e)/(t+e))},u=function(t,e){var n="",r="",a=t.map((function(t){var e="";switch(t.type){case"completion":n="completion",r=t.height+1,e="".concat(t.children.join(""));break;case"complexTitle":n="complexTitle",r=t.height,e="".concat(t.children.join(""));break}return e}));t.length=0,i.push({height:r,type:n,isComplex:e.isComplex,isShowBorderBottom:e.isShowBorderBottom,dataKey:e.dataKey,content:a})},l=function(t,e){t.forEach((function(t,n){if("completionItem"===t.type&&!t.isComplex){var a=i[i.length-1];a&&("completion"===a.type||n)||(t.height+=15)}if("completionItem"===t.type&&t.isComplex){var o=i[i.length-1];o&&("completion"===o.type||"graffiti"===o.type||n)||(t.height+=15)}if(r<t.height&&(e.length&&u(e,t),s()),r>=t.height){switch(t.type){case"completionItem":e.length&&"completion"===e[e.length-1].type?e[e.length-1].children.push(t.content):e.push({type:"completion",height:t.height,children:[t.content]});break;case"complexTitleItem":e.length&&"complexTitle"===e[e.length-1].type?e[e.length-1].children.push(t.content):e.push({type:"complexTitle",height:t.height,children:[t.content]});break}r-=t.height}}))},h=function(e,n){var a=e.rowHeight,o=void 0===a?40:a,u=e.rowGap,l=void 0===u?15:u,h=e.titleChildren,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType);r<30&&s();var p={type:"essay"};if(h){var g="";h.forEach((function(t,n){r>=t.height+(n?0:32)?(g+=t.content,r-=t.height+(n?0:32)):(g&&i.push({type:"essay",essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d,bgType:f})}),s(),g=t.content,r-=t.height+32)})),g?Object.assign(p,{essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d})}):p=null}else p=null;if(d){var m=d;while(m){var y=c(o,l,!p);y<1?(p&&(i.push(p),p=null),s()):y<m?(i.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:y,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),p&&(p=null),s(),m-=y):(i.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:m,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),r-=m*(o+l)-l+(p?30:62),m=0,p&&(p=null))}}else p?i.push(p):(i.push({type:"essay",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30)},d=JSON.parse(JSON.stringify(this.domList));d.forEach((function(e,n){"essay"===e.type?h(e.essay,e.dataKey):"complexTitle"===e.type?(l(e.children,a,e),a.length&&u(a,e)):"completion"===e.type?(r<e.height&&s(),r>=e.height&&(l(e.children,a,e),a.length&&u(a,e))):"basicInfo"===e.type?(t.headHeight=e.headHeight||0,t.attentionHeight=t.scansionAttention.height||e.attentionHeight||0,t.registrationType?t.layout<3?t.eduHeight=t.eduIdLength>10?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)+14+310:t.eduHeight=t.layout<3?310:48*Math.ceil(t.stuInfoLength/3)+310,o()):(r<e.height&&s(),r>=e.height&&("sectionHead"===e.type&&"basicInfo"!==d[n-1].type&&1240!==r&&(e.height+=30,e.isMarginTop=!0),i.push(e),r-=e.height))})),r>54&&e[e.length-1].push({type:"restrict",height:r-30}),e.length>16&&1===this.layout&&(this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",2),this.$store.dispatch("AC/answerConfig/setDisableOneLayout",!0)),this.panelList=e}}},$e=Ue,He=Object(P["a"])($e,Ce,Ae,!1,null,null,null),Fe=He.exports;Fe.install=function(t){t.component(Fe.name,Fe)};var Ke=Fe,We=n("21a6"),Ve=n.n(We),Ye={name:"AcSweep",components:{AcSweepVirtual:we,AcSweepPanel:Ke},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],sweepPaperTree:[]}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(C["a"])(this,e),this.file=t}return Object(A["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){t(e.file,n)}))}}]),e}()},patchwork:function(){return this.$store.getters["AC/patchwork"]},downloadType:function(){return this.$store.getters["AC/downloadType"]},downloadSize:function(){return this.$store.getters["AC/downloadSize"]}},created:function(){this.init()},methods:{init:function(){this.sweepPaperTree=this.transformTree(this.createDataKey(this.$store.getters["AC/sweepPaperTree"]))},createDataKey:function(t){var e=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.forEach((function(e,r){var i=n?"".concat(n,"_").concat(r):"".concat(r);e.code&&(e.dataKey=i),e.children&&t(e.children,i)}))};return e(t),t},transformTree:function(t){var e=this,n=new Set(["single_choice","multiple_choice","judgment"]);return t.reduce((function(r,i,a){i.children&&(i.children=e.transformTree(i.children));var o=r[r.length-1];return o&&n.has(t[a-1].code)&&n.has(i.code)?(Array.isArray(o)?o.push(i):r[r.length-1]=[o,i],r):(r.push(i),r)}),[])},setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(tt["b"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h,d;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getZipContent();case 5:if(n=e.sent,r=n||"","PDF"!==t.downloadType){e.next=25;break}return e.next=10,t.getPageImage();case 10:return i=e.sent,a=new Dt.a(1===t.layout?"p":"l","pt",1===t.layout?"a4":"a3"),i.forEach((function(e,n){var r=1===t.layout?595.28:1190.55,o=841.89;a.addImage(e,"JPEG",0,0,r,o),n!==i.length-1&&a.addPage()})),o="".concat(t.paperTitle,".pdf"),a.save(o),s=a.output("blob"),s.name=o,c=new t.UploadAdapter(s),e.next=20,c.upload();case 20:return u=e.sent,l="https://"+u.url,e.abrupt("return",{scanZipUrl:r,scanPdfUrl:l});case 25:if("PNG"!==t.downloadType){e.next=31;break}return e.next=28,t.getPngZip();case 28:return h=e.sent,d=h||"",e.abrupt("return",{scanZipUrl:r,scanPdfUrl:d});case 31:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h,d,f;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=1===t.registrationNumberType,a=new $t.a,o="".concat(n,"模板_").concat(n,"_").concat(t.downloadSize,"_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(r.length,"_").concat(i?"涂点":"条码","_").concat(i?"10":"-1","_").concat(i?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(r).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(tt["b"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,c=new Uint8Array(o);while(o--)c[o]=i.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return u=e.sent,l="".concat(n,"模板.zip"),h=new File([u],l,{type:"zip"}),Ve()(u,l),d=new t.UploadAdapter(h),e.next=21,d.upload();case 21:return f=e.sent,e.abrupt("return","https://"+f.url);case 23:case"end":return e.stop()}}),e)})))()},getPngZip:function(){var t=this;return w(_().mark((function e(){var n,r,i,a,o,s,c,u,l,h;return _().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),r=$(".ac-piece__wrapper"),i=new $t.a,a=[],Array.from(r).forEach((function(t,e){a.push({dom:t,name:"".concat(e+1,".png")})})),e.next=7,Object(tt["b"])(a.map((function(t){return t.dom})));case 7:return o=e.sent,o.forEach((function(t,e){var n=t.split(","),r=n[0].match(/:(.*?);/)[1],o=atob(n[1]),s=o.length,c=new Uint8Array(s);while(s--)c[s]=o.charCodeAt(s);i.file(a[e].name,new Blob([c],{type:r}),{base64:!0})})),e.next=11,i.generateAsync({type:"blob"});case 11:return s=e.sent,c="".concat(n,".zip"),u=new File([s],c,{type:"zip"}),Ve()(s,c),l=new t.UploadAdapter(u),e.next=18,l.upload();case 18:return h=e.sent,e.abrupt("return","https://"+h.url);case 20:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),r=function(n,r){var i=$(n).offset(),a=i.left,o=i.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var i=$(n),s="absolute"===i.data("scan-type"),c={Type:"AnswerArea",Name:i.data("export_name"),Page:r,X:Math.floor(i.offset().left-(s?a:u)),Y:Math.floor(i.offset().top-(s?o:l)),Width:i.outerWidth(),Height:i.outerHeight()};String(c.X).indexOf(".")>-1&&(c.X=Math.floor(c.X),c.Width+=1),String(c.Y).indexOf(".")>-1&&(c.Y=Math.floor(c.Y),c.Height+=1),c.Width=Math.ceil(c.Width),c.Height=Math.ceil(c.Height),"考号"===i.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},i=function(t,n){var r=$(t).find(".mark-point__top-left")[0],i=$(r).offset(),a=i.left,o=i.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var r=$(t),i={Type:"ReviewArea",Name:r.data("scan-name"),Page:n,X:r.offset().left-a,Y:r.offset().top-o,Width:r.outerWidth(),Height:r.outerHeight(),MaxScore:r.data("scan-score")};String(i.X).indexOf(".")>-1&&(i.X=Math.floor(i.X),i.Width+=1),String(i.Y).indexOf(".")>-1&&(i.Y=Math.floor(i.Y),i.Height+=1),i.Width=Math.ceil(i.Width),i.Height=Math.ceil(i.Height),e.push(i)}))},a=[],o=function(t,e){var r=n.find(".ac-sweep__choice-each[data-key=".concat(t.dataKey,"]"))[0],i=($(r).find(".choice-title")[0],$(r).find(".ac-sweep__choice-item")[0]),o=r.getAttribute("page-index"),s=$(e[o-1]).find(".mark-point__top-left")[0],c=$(s).offset(),u=c.left,l=c.top,h={Type:"AnswerArea",Name:t.scanName,Page:"第".concat(o,"页"),X:$(i).offset().left-u+5,Y:$(i).offset().top-l-1,Width:$(i).outerWidth()-3,Height:$(i).outerHeight()+3,Rows:1,Columns:t.choices.length,Horizon:0};String(h.X).indexOf(".")>-1&&(h.X=Math.floor(h.X),h.Width+=1),String(h.Y).indexOf(".")>-1&&(h.Y=Math.floor(h.Y),h.Height+=1),h.Width=Math.ceil(h.Width),h.Height=Math.ceil(h.Height),a.push(h)},s=function t(e){var r=$(".ac-piece__wrapper");e.forEach((function(e){if(e.children)t(e.children);else if("completion"===e.code)for(var i=n.find(".ac-sweep__composite[data-key=".concat(e.dataKey,"]")),s=0;s<i.length;s++){var c=i[s].getAttribute("page-index"),u=$(r[c-1]).find(".mark-point__top-left")[0],l=$(u).offset(),h=l.left,d=l.top,f={Type:"AnswerArea",Name:"".concat(e.scanName).concat(s>0?"_"+s:""),Page:"第".concat(c,"页"),X:Math.floor($(i[s]).offset().left-h),Y:Math.floor($(i[s]).offset().top-d),Width:Math.ceil($(i[s]).outerWidth()),Height:Math.ceil($(i[s]).outerHeight())};a.push(f)}else if(Array.isArray(e)||"single_choice"===e.code||"multiple_choice"===e.code||"judgment"===e.code)Array.isArray(e)?e.forEach((function(t){o(t,r)})):o(e,r);else if("subjectivity"===e.code)for(var p=n.find(".ac-essay__wrapper[data-key=".concat(e.dataKey,"]")),g=0;g<p.length;g++){var m=p[g].getAttribute("page-index"),y=$(r[m-1]).find(".mark-point__top-left")[0],v=$(y).offset(),_=v.left,b=v.top,w={Type:"AnswerArea",Name:"".concat(e.scanName).concat(g>0?"_"+g:""),Page:"第".concat(m,"页"),X:Math.floor($(p[g]).offset().left-_),Y:Math.floor($(p[g]).offset().top-b),Width:Math.ceil($(p[g]).outerWidth()),Height:Math.ceil($(p[g]).outerHeight())};a.push(w)}}))};s(this.sweepPaperTree);var c=function(t){var e={};return t.forEach((function(t){var n=t.Page;e[n]||(e[n]=[]),e[n].push(t)})),Object.values(e)},u=c(a);Array.from(n).forEach((function(t,n){"restrict"!==$(t).data("piece-type")&&(r(t,"第".concat(n+1,"页")),i(t,"第".concat(n+1,"页")),Array.isArray(u[n])?e.push.apply(e,l(u[n])):e.push(u[n]))}));var h='<?xml version="1.0" encoding="utf-8"?>';return h+='<answerSheet isNew="true" isYcProject="true" layout="'.concat(this.layout,'" isScrabbled="').concat(this.patchwork,'">'),h+=this.getXMLStringFromArray(e),h+="</answerSheet>",h},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return t?"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">"):""})).join("")}}},Ze=Ye,Ge=Object(P["a"])(Ze,Vt,Yt,!1,null,null,null),Qe=Ge.exports,Xe={name:"AcCard",components:{AcAnswerConfig:h["default"],AcLattice:Wt,AcSweep:Qe},props:{title:{type:String,default:""},paperTitle:{type:String,default:""},tree:{type:Array,default:function(){return[]}},baseInfoList:{type:Array,default:function(){return[]}},mode:{type:Number,default:0},config:{type:Object,default:function(){return null}},uploadOss:{type:Function,default:function(){}},ClassicEditor:{type:Function,default:function(){}},contentEditable:{type:Boolean,default:!0},showConfig:{type:Boolean,default:!0},showStudentInfo:{type:Boolean,default:!0},saveInfo:{type:Object,default:null},paddingBlock:{type:[Number,Array],default:68},movable:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},editType:{type:String,default:"editor"},essayType:{type:Array,default:function(){return[0,1,2]}},essaySize:{type:Object,default:null},scanSheet:{type:Boolean,default:!1}},provide:function(){return{uploadOss:this.uploadOss,ClassicEditor:this.ClassicEditor,contentEditable:this.contentEditable,showStudentInfo:this.showStudentInfo,paperTitle:this.title||this.paperTitle,paddingBlock:this.paddingBlock,movable:this.movable,deletable:this.deletable,editType:this.editType,editCallback:this.editCallback,deleteCallback:this.deleteCallback,lineCallback:this.lineCallback,moveCallback:this.moveCallback,essayType:this.essayType,scanSheet:this.scanSheet}},data:function(){return{paperTree:[]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{tree:function(){this.initTree()},saveInfo:function(){this.handleSaveInfo()},title:function(){this.$store.dispatch("AC/paper/setTitle",this.title)}},beforeCreate:function(){if(!Promise.allSettled){var t=function(t){return{status:"rejected",reason:t}},e=function(t){return{status:"fulfilled",value:t}};Promise.allSettled=function(n){return Promise.all(n.map((function(n){return Promise.resolve(n).then(e,t)})))}}},created:function(){this.init(),this.baseInfoList&&(this.$store.dispatch("AC/answerConfig/setStudentInfo",[]),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.baseInfoList))},methods:{init:function(){this.essaySize&&this.$store.dispatch("AC/essay/setRowSize",this.essaySize),this.$store.dispatch("AC/essay/resetEssay"),this.$store.dispatch("AC/paper/setTitle",this.title),this.$store.dispatch("AC/answerConfig/setAnswerCardMode",this.mode),this.handleSaveInfo(),this.initTree()},handleSaveInfo:function(){var t=this;if(this.saveInfo){var e={},n={},r={};Object.keys(this.saveInfo).forEach((function(i){switch(i){case"title":case"editTitleList":case"candidateNumColor":case"scansionAttention":case"latticeAttention":e[i]=t.saveInfo[i];break;case"editEssayList":r[i]=t.saveInfo[i];break;case"answerCardMode":case"layout":case"showAttention":case"studentInfo":case"educationIdValue":case"registrationNumberType":case"readType":case"patchwork":case"showQuestion":case"sizeType":case"showEducationId":case"objectiveOrder":case"judgmentMode":case"addFooter":n[i]=t.saveInfo[i];break}})),this.$store.dispatch("AC/paper/setSaveState",e),this.$store.dispatch("AC/essay/setSaveState",r),this.$store.dispatch("AC/answerConfig/setSaveState",n)}},initTree:function(){var t=this,e=this.$store.getters["AC/editTitleList"],n=this.$store.getters["AC/editEssayList"].filter((function(t){return!!t.title}));Object(tt["d"])(this.tree.concat([].concat(l(e),l(n)))).then((function(){t.paperTree=t.tree,t.$store.dispatch(0===t.mode?"AC/paper/setSweepPaperTree":"AC/paper/setPaperTree",t.paperTree)}))},download:function(){var t=this;this.$emit("before-download"),this.save(),1===this.acMode?this.$refs.latticeCard&&this.$refs.latticeCard.download().then((function(e){t.$emit("download",e)})):0===this.acMode&&this.$refs.sweepCard&&this.$refs.sweepCard.download().then((function(e){t.$emit("download",e)}))},save:function(){var t=this,e=["title","editTitleList","candidateNumColor","editEssayList","answerCardMode","layout","showAttention","studentInfo","educationIdValue","registrationNumberType","readType","patchwork"],n=["latticeAttention","showQuestion","sizeType","showEducationId"],r=["scansionAttention","objectiveOrder","judgmentMode","addFooter"],i={},a=this.$store.getters["AC/answerCardMode"];e.concat(0===a?r:n).forEach((function(e){i[e]=t.$store.getters["AC/".concat(e)]})),this.$emit("save",i)},editCallback:function(t){this.$emit("edit-title",t)},deleteCallback:function(t){this.$emit("delete",t)},lineCallback:function(t,e){this.$emit("lineChanged",t,e)},moveCallback:function(t,e){this.$emit("move",t,e)}}},qe=Xe,Je=Object(P["a"])(qe,r,i,!1,null,null,null),tn=Je.exports;tn.install=function(t){t.component(tn.name,tn)};e["default"]=tn},"40d5":function(t,e,n){var r=n("d039");t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,r="/";e.cwd=function(){return r},e.chdir=function(e){t||(t=n("df7c")),r=t.resolve(e,r)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var r=n("e330"),i=n("d039"),a=n("c6b6"),o=Object,s=r("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},4625:function(t,e,n){var r=n("c6b6"),i=n("e330");t.exports=function(t){if("Function"===r(t))return i(t)}},"485a":function(t,e,n){var r=n("c65b"),i=n("1626"),a=n("861d"),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!a(s=r(n,t)))return s;if(i(n=t.valueOf)&&!a(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!a(s=r(n,t)))return s;throw o("Can't convert object to primitive value")}},"4b11":function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"4d64":function(t,e,n){var r=n("fc6a"),i=n("23cb"),a=n("07fa"),o=function(t){return function(e,n,o){var s,c=r(e),u=a(c),l=i(o,u);if(t&&n!=n){while(u>l)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4e0a":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-essay__wrapper",style:{"--padding-inline":t.paddingInline+"px"},attrs:{"data-key":t.dataKey,type:"essay","page-index":t.pageIndex}},[e("div",{staticClass:"ac-essay",class:{"is-wrapper":"outer"===t.borderType,"is-editable":t.editable,"is-hidden__border-both":t.hiddenBorderBoth||!(t.row||t.title),"is-hidden__border-bottom":t.hiddenBorderBottom||!(t.row||t.title),"is-hidden__border-top":t.hiddenBorderTop||!(t.row||t.title)}},[t.title?e("div",{staticClass:"ac-essay__title ck-content",domProps:{innerHTML:t._s(t.title)}}):t._e(),t.row?e("div",{staticClass:"ac-essay__container"},[e("div",{staticClass:"ac-essay__area",class:t.rowClass,style:t.areaStyle},[["empty","block","spell_field"].includes(t.rowType)?t._e():[t._l(t.itemList,(function(n,r){return[t.getLiContent(r)?e("li",{key:"li_".concat(r),staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!r,"is-editable":"line"===t.rowType&&t.liEditable},domProps:{innerHTML:t._s(t.getLiContent(r))},on:{blur:function(e){return t.handleBlur(e,r)}}}):e("li",{key:r,staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!r,"is-editable":"line"===t.rowType&&t.liEditable,"is-first-column":!(r%t.formatColumn)},on:{blur:function(e){return t.handleBlur(e,r)}}},[t.showPrefix&&"line"===t.rowType?e("span",{staticClass:"ac-essay__area-prefix"},[t._v(" 【"+t._s(r+t.startRow+1)+"】 ")]):t._e(),t.wordCountStep&&["write","grid","write_plain"].includes(t.rowType)?e("span",[t._v(" "+t._s(t.getWordCount(r))+" ")]):t._e()])]}))],"spell_field"===t.rowType?t._l(Array(t.row).fill(""),(function(n,r){return e("li",{key:r,staticClass:"ac-essay__area-item"},[e("div",{staticClass:"ac-essay__area-spell"}),t._l(Array(t.formatColumn).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-essay__area-field"})}))],2)})):t._e()],2),t.editable?e("div",{staticClass:"ac-essay__tool ac-edit-handler"},[t.rowEditable?[e("span",[t._v("行数:")]),e("el-input-number",{attrs:{size:"small",min:1,max:100},on:{change:t.handleRowChange},model:{value:t.rowNum,callback:function(e){t.rowNum=e},expression:"rowNum"}})]:t._e(),t.typeEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openType}},[t._v(" 背景风格 ")]):t._e(),t.titleEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]):t._e()],2):t._e()]):t._e()]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}}),e("el-dialog",{attrs:{"custom-class":"ac-essay__dialog",visible:t.typeVisible,title:"设置背景风格",width:"770px"},on:{"update:visible":function(e){t.typeVisible=e}}},[e("div",{staticClass:"ac-bg"},[t.essayType.includes(0)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":0===t.currentType},on:{click:function(e){t.currentType=0}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("空白纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper"})]):t._e(),t.essayType.includes(1)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":1===t.currentType},on:{click:function(e){t.currentType=1}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("横线纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper is-line"},[e("div",{staticClass:"ac-bg__content"})])]):t._e(),t.essayType.includes(2)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":2===t.currentType},on:{click:function(e){t.currentType=2}}},[e("i",{staticClass:"el-icon-success"}),t.essayType.length<4?e("div",{staticClass:"ac-bg__title"},[t._v("方格纸")]):t._e(),e("div",{staticClass:"ac-bg__wrapper is-grid"},t._l(Array(4).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)]):t._e(),t.essayType.includes(3)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":3===t.currentType},on:{click:function(e){t.currentType=3}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-field"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(12).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e(),t.essayType.includes(4)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":4===t.currentType},on:{click:function(e){t.currentType=4}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-block"},[e("div",{staticClass:"ac-bg__content"})])]):t._e(),t.essayType.includes(5)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":5===t.currentType},on:{click:function(e){t.currentType=5}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-write"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(12).fill(""),(function(t,n){return e("li",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e(),t.essayType.includes(6)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":6===t.currentType},on:{click:function(e){t.currentType=6}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-spell-field"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(3).fill(""),(function(n,r){return e("li",{key:r,staticClass:"ac-bg__content-item"},[e("div",{staticClass:"ac-bg__content-item-spell"}),t._l(Array(3).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item-field"})}))],2)})),0)])]):t._e(),t.essayType.includes(7)?e("div",{staticClass:"ac-bg__item",class:{"is-checked":7===t.currentType},on:{click:function(e){t.currentType=7}}},[e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-write-plain"},[e("div",{staticClass:"ac-bg__content"},t._l(Array(16).fill(""),(function(t,n){return e("li",{key:n,staticClass:"ac-bg__content-item"})})),0)])]):t._e()]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.typeVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeType}},[t._v("确定")])],1)])],1)},i=[],a=n("6bdf"),o=n("5dcc"),s={name:"AcEssay",components:{AcEditor:a["default"]},props:{editable:{type:Boolean,default:!0},bgType:{type:Number,default:0},typeEditable:{type:Boolean,default:!0},row:{type:Number,default:4},startRow:{type:Number,default:0},rowCount:{type:Number,default:4},rowEditable:{type:Boolean,default:!0},title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},liEditable:{type:Boolean,default:!1},showPrefix:{type:Boolean,default:!1},rowHeight:{type:[Number,String],default:""},rowGap:{type:[Number,String],default:""},width:{type:[Number,String],default:""},borderType:{type:String,default:"outer"},topLineVisible:{type:Boolean,default:!1},wordCountStep:{type:Number,default:100},paddingInline:{type:Number,default:55},dataKey:{type:String,default:""},hiddenBorderBottom:{type:Boolean,default:!1},hiddenBorderBoth:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},hiddenBorderTop:{type:Boolean,default:!1},column:{type:Number,default:0}},inject:["essayType"],data:function(){return{rowNum:4,editorVisible:!1,editContent:"",typeVisible:!1,currentType:0}},computed:{rowConfig:function(){return this.$store.getters["AC/rowConfig"]},rowType:function(){var t=["empty","line","grid","field","block","write","spell_field","write_plain"];return t[this.bgType||0]},rowClass:function(){return"row-".concat(this.rowType).concat("outer"!==this.borderType&&["empty"].includes(this.rowType)?" is-wrapper":"")},areaStyle:function(){var t=this.rowConfig[this.bgType]||{},e="number"===typeof this.rowHeight?this.rowHeight:t.rowHeight||0,n="number"===typeof this.rowGap?this.rowGap:t.rowGap||0;switch(this.rowType){case"write":case"write_plain":n=e/9*2,e-=n;break;case"spell_field":n=e/9*4,e-=n;break}var r={"--row":this.row,"--row-height":e+"px","--row-gap":n+"px","--column":this.formatColumn};return["empty","line"].includes(this.rowType)&&(this.width||0===this.width)&&(r.width="number"===typeof this.width?this.width+"px":this.width),r},formatColumn:function(){var t=(this.rowConfig[this.bgType]||{}).column;return t?this.column||t:0},itemList:function(){return new Array(this.row*(this.formatColumn||1)).fill("")},rowDebounce:function(){return Object(o["a"])(this.commitRowChange,300)},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return function(t){return((e.liList||[]).find((function(e){return e.liIndex===t}))||{}).content}}},watch:{rowCount:function(t){t!==this.rowNum&&(this.rowNum=t)}},created:function(){this.rowNum=this.rowCount},methods:{getWordCount:function(t){var e=this.startRow*this.formatColumn+t+1;return e%this.wordCountStep?"":"".concat(e,"字")},handleRowChange:function(t,e){(t||0===t||(this.rowNum="",e))&&this.rowDebounce()},commitRowChange:function(){this.$store.dispatch("AC/essay/setEssayRow",{dataKey:this.dataKey,row:this.rowNum}),this.$store.dispatch("AC/paper/resetPanel")},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.title},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},handleBlur:function(t,e){this.$store.dispatch("AC/essay/setEssayLi",{dataKey:this.dataKey,liIndex:e+this.startRow,content:t.target.innerHTML})},openType:function(){this.currentType=this.bgType,this.typeVisible=!0},changeType:function(){this.typeVisible=!1,this.$store.dispatch("AC/essay/setEssayBgType",{dataKey:this.dataKey,bgType:this.currentType}),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,u=n("2877"),l=Object(u["a"])(c,r,i,!1,null,null,null),h=l.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"4ea1":function(t,e,n){"use strict";var r=n("d429"),i=n("ebb5"),a=n("bcbf"),o=n("5926"),s=n("f495"),c=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=c(this),i=o(t),l=a(n)?s(e):+e;return r(n,u(n),i,l)}}["with"],!h)},"50c4":function(t,e,n){var r=n("5926"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"53ca":function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,"a",(function(){return r}))},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,n){var r=n("d066"),i=n("e330"),a=n("241c"),o=n("7418"),s=n("825a"),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=a.f(s(t)),n=o.f;return n?c(e,n(t)):e}},"577e":function(t,e,n){var r=n("f5df"),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},5926:function(t,e,n){var r=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},"59ed":function(t,e,n){var r=n("1626"),i=n("0d51"),a=TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5dcc":function(t,e,n){"use strict";n.d(e,"a",(function(){return k})),n.d(e,"d",(function(){return E})),n.d(e,"b",(function(){return S})),n.d(e,"c",(function(){return I}));n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1");var r=b(),i=w(),a=C(),o=A(),s={imagePlaceholder:void 0,cacheBust:!1},c={toSvg:u,toPng:h,toJpeg:d,toBlob:f,toPixelData:l,impl:{fontFaces:a,images:o,util:r,inliner:i,options:{}}};function u(t,e){return e=e||{},p(e),Promise.resolve(t).then((function(t){return m(t,e.filter,!0)})).then(y).then(v).then(n).then((function(n){return _(n,e.width||r.width(t),e.height||r.height(t))}));function n(t){return e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]})),t}}function l(t,e){return g(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,r.width(t),r.height(t)).data}))}function h(t,e){return g(t,e||{}).then((function(t){return t.toDataURL()}))}function d(t,e){return e=e||{},g(t,e).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))}function f(t,e){return g(t,e||{}).then(r.canvasToBlob)}function p(t){"undefined"===typeof t.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=t.imagePlaceholder,"undefined"===typeof t.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=t.cacheBust}function g(t,e){return u(t,e).then(r.makeImage).then(r.delay(100)).then((function(e){var r=n(t);return r.getContext("2d").drawImage(e,0,0),r}));function n(t){var n=document.createElement("canvas"),i=n.getContext("2d");i.mozImageSmoothingEnabled=!1,i.webkitImageSmoothingEnabled=!1,i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1;var a=e.scale||1,o=e.width||r.width(t),s=e.height||r.height(t);return n.width=o*a,n.height=s*a,e.imageWidth&&(a=e.imageWidth/(o||1),n.width=e.imageWidth,n.height=s*a),e.imageHeight&&(a=e.imageHeight/(s||1),n.width=o*a,n.height=e.imageHeight),i.scale(a,a),e.bgcolor&&(i.fillStyle=e.bgcolor,i.fillRect(0,0,n.width,n.height)),n}}function m(t,e,n){return n||!e||e(t)?Promise.resolve(t).then(i).then((function(n){return a(t,n,e)})).then((function(e){return o(t,e)})):Promise.resolve();function i(t){return t instanceof HTMLCanvasElement?r.makeImage(t.toDataURL()):t.cloneNode(!1)}function a(t,e,n){var i=t.childNodes;return 0===i.length?Promise.resolve(e):a(e,r.asArray(i),n).then((function(){return e}));function a(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return m(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}function o(t,e){return e instanceof Element?Promise.resolve().then(n).then(i).then(a).then(o).then((function(){return e})):e;function n(){function n(t,e){function n(t,e){r.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:n(t,e)}n(window.getComputedStyle(t),e.style)}function i(){function n(n){var i=window.getComputedStyle(t,n),a=i.getPropertyValue("content");if(""!==a&&"none"!==a){var o=r.uid();e.className=e.className+" "+o;var s=document.createElement("style");s.appendChild(c(o,n,i)),e.appendChild(s)}function c(t,e,n){var i="."+t+":"+e,a=n.cssText?o(n):s(n);return document.createTextNode(i+"{"+a+"}");function o(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return r.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){n(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function o(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}}function y(t){return a.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function v(t){return o.inlineAll(t).then((function(){return t}))}function _(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(r.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}function b(){return{escape:d,parseExtension:e,mimeType:n,dataAsUrl:h,isDataUrl:r,canvasToBlob:a,resolveUrl:o,getAndEncode:l,uid:s(),delay:f,asArray:p,escapeXhtml:g,makeImage:u,width:m,height:y};function t(){var t="application/font-woff",e="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:e,jpeg:e,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(n){var r=e(n).toLowerCase();return t()[r]||""}function r(t){return-1!==t.search(/^(data:)/)}function i(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}function a(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):i(t)}function o(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href}function s(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function u(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))}function l(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=3e4;return(c.impl.options.cacheBust||n)&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),e&&t.startsWith("http")&&!t.startsWith("https")&&(t=t.replace("http","https")),new Promise((function(e){var n,i=new XMLHttpRequest;if(i.onreadystatechange=o,i.ontimeout=s,i.responseType="blob",i.timeout=r,i.open("GET",t,!0),i.send(),c.impl.options.imagePlaceholder){var a=c.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===i.readyState)if(200===i.status){var r=new FileReader;r.onloadend=function(){var t=r.result.split(/,/)[1];e({content:t,fullUrl:r.result})},r.readAsDataURL(i.response)}else n?e(n):u("cannot fetch resource: "+t+", status: "+i.status)}function s(){n?e(n):u("timeout of "+r+"ms occured while fetching resource: "+t)}function u(t){e("")}}))}function h(t,e){return"data:"+e+";base64,"+t}function d(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function f(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}}function p(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}function g(t){return t.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A").replace(/\v/g," ")}function m(t){var e=v(t,"border-left-width"),n=v(t,"border-right-width");return t.scrollWidth+e+n}function y(t){var e=v(t,"border-top-width"),n=v(t,"border-bottom-width");return t.scrollHeight+e+n}function v(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}function w(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:a,shouldProcess:e,impl:{readUrls:n,inline:i}};function e(e){return-1!==e.search(t)}function n(e){var n,i=[];while(null!==(n=t.exec(e)))i.push(n[1]);return i.filter((function(t){return!r.isDataUrl(t)}))}function i(t,e,n,i){return Promise.resolve(e).then((function(t){return n?r.resolveUrl(t,n):t})).then(i||r.getAndEncode).then((function(t){var n=t.content;t.fullUrl;return r.dataAsUrl(n,r.mimeType(e))})).then((function(n){return t.replace(a(e),"$1"+n+"$3")}));function a(t){return new RegExp("(url\\(['\"]?)("+r.escape(t)+")(['\"]?\\))","g")}}function a(t,r,a){return o()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return"about:blank"===t?Promise.resolve(t):i(e,t,r,a)}))})),n}));function o(){return!e(t)}}}function C(){return{resolveAll:t,impl:{readAll:e}};function t(){return e(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))}function e(){return Promise.resolve(r.asArray(document.styleSheets)).then(e).then(t).then((function(t){return t.map(n)}));function t(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return i.shouldProcess(t.style.getPropertyValue("src"))}))}function e(t){var e=[];return t.forEach((function(t){try{r.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(n){}})),e}function n(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return i.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}function A(){return{inlineAll:e,impl:{newImage:t}};function t(t){return{inline:e};function e(e){return r.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||function(t){return r.getAndEncode(t,!0,!0)}).then((function(t){t.content;var e=t.fullUrl;return e})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))})).catch((function(){return t.src}))}}function e(n){return n instanceof Element?a(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(r.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n);function a(t){var e=t.style.getPropertyValue("background");return e?i.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}}}var x=c,k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=arguments.length>2?arguments[2]:void 0,r=0;return function(){var i=this,a=arguments;r&&clearTimeout(r),n?(r||t.apply(i,a),r=setTimeout((function(){r=0}),e)):r=setTimeout((function(){t.apply(i,a)}),e)}},T=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=0,r=[],i=[],a=function a(){if(n===t.length)return Promise.resolve();var o=t[n++],s=Promise.resolve().then((function(){return o()}));r.push(s);var c=s.then((function(){return i.splice(i.indexOf(c),1)}));i.push(c);var u=i.length>=e?Promise.race(i):Promise.resolve();return u.then((function(){return a()}))};return a().then((function(){return Promise.all(r)}))},E=function(t){var e=[],n=/<img.*?(?:>|\/>)/gi,r=/src=['"]?([^'"]*)['"]?/i,i=function(t){if(t){var i=t.match(n);Array.isArray(i)&&i.forEach((function(t){var n=t.match(r);Array.isArray(n)&&n[1]&&e.push(new Promise((function(t,e){var r=new Image;r.onload=function(){return t()},r.onerror=function(){return e()},r.src=n[1]})))}))}},a=function t(e){e.forEach((function(e){"complex"!==e.code&&e.children||(i(e.title),Array.isArray(e.choices)&&e.choices.forEach((function(t){return i(t.content)}))),e.children&&e.children.length&&t(e.children)}))};return a(t),new Promise((function(t,n){Promise.allSettled(e).then((function(){return t()}))}))},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2?arguments[2]:void 0;if(!t.length)return Promise.resolve([]);for(var r=[],i=function(){var i=t[a];r.push((function(){return x.toJpeg(i,{quality:.95,scale:e,width:i.offsetWidth,height:i.offsetHeight,imageWidth:n,bgcolor:"#ffffff"})}))},a=0;a<t.length;a++)i();return T(r)},I=function(t){var e=0;try{var n=t.getBoundingClientRect(),r=n.top,i=t.parentNode.getBoundingClientRect(),a=i.top;e=r-a}catch(o){e=t.offsetTop}return e}},"5e77":function(t,e,n){var r=n("83ab"),i=n("1a2d"),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},"605d":function(t,e,n){(function(e){var r=n("c6b6");t.exports="undefined"!=typeof e&&"process"==r(e)}).call(this,n("4362"))},6374:function(t,e,n){var r=n("da84"),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},"639e":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__bar"},[e("div",{class:["ac-config__arrow",t.showConfig?"el-icon-caret-right":"el-icon-caret-left"],on:{click:function(e){t.showConfig=!t.showConfig}}}),e("div",{staticClass:"ac-config__wrapper",class:{"is-hidden":!t.showConfig}},[e("div",{staticClass:"container"},[e("div",{staticClass:"config-mainCtrl"},[e("div",{staticClass:"first-row"},[e("el-button",{attrs:{size:"medium",icon:"icon el-icon-download"},on:{click:t.save}},[t._v("保存")]),e("el-button",{attrs:{size:"medium",icon:"icon el-icon-view"},on:{click:function(e){t.previewVisible=!0}}},[t._v(" 预览 ")])],1),e("div",{staticClass:"second-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.download}},[t._v(" 下载并保存 ")])],1)]),t.modeChangeable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode"},[e("el-radio-group",{model:{value:t.answerSheetMode,callback:function(e){t.answerSheetMode=e},expression:"answerSheetMode"}},[e("el-radio",{attrs:{label:0}},[t._v("扫描")]),e("el-radio",{attrs:{label:1}},[t._v("点阵笔")])],1)],1)]):t._e(),t.layoutChangeable?e("change-layout",{attrs:{mode:t.answerSheetMode}}):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("考生须知")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowAttention,callback:function(e){t.isShowAttention=e},expression:"isShowAttention"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("学生信息")]),e("div",{staticClass:"ac-config__item tags-box answer-mode"},[t._l(t.studentInfoTags,(function(n){return e("el-tag",{key:n,staticClass:"tags",attrs:{closable:t.studentInfoTags.length>1,"disable-transitions":!1,effect:"dark",size:"small"},on:{close:function(e){return t.handleClose(n)}}},[t._v(" "+t._s(n)+" ")])})),t.studentInfoTags.length<6&&t.inputVisible?e("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{maxLength:"4",size:"small"},on:{blur:t.handleInputConfirm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm.apply(null,arguments)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e(),t.studentInfoTags.length<6&&!t.inputVisible?e("el-button",{staticClass:"button-new-tag",attrs:{size:"mini"},on:{click:t.showInput}},[e("i",{staticClass:"el-icon-plus"}),t._v(" 添加 ")]):t._e()],2)]):t._e(),1===t.answerSheetMode&&t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowEducationId,callback:function(e){t.isShowEducationId=e},expression:"isShowEducationId"}})],1)]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID位数")]),e("div",{staticClass:"ac-config__item"},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.educationIdValue,callback:function(e){t.educationIdValue=e},expression:"educationIdValue"}},t._l(Array(13),(function(t,n){return e("el-option",{key:n,attrs:{label:n+6,value:n+6}})})),1)],1)]),e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择考号板式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.registrationNumberType,callback:function(e){t.registrationNumberType=e},expression:"registrationNumberType"}},[e("el-radio",{attrs:{label:0}},[t._v("条形码")]),e("el-radio",{attrs:{label:1}},[t._v("教育ID")])],1)],1)])]:t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("客观题排列")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.objectiveOrder,callback:function(e){t.objectiveOrder=e},expression:"objectiveOrder"}},[e("el-radio",{attrs:{label:"row"}},[t._v("横排")]),e("el-radio",{attrs:{label:"column"}},[t._v("竖排")])],1)],1)]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("判断题样式(TF/✓×)")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.judgmentMode,callback:function(e){t.judgmentMode=e},expression:"judgmentMode"}},[e("el-radio",{attrs:{label:0}},[t._v("TF")]),e("el-radio",{attrs:{label:1}},[t._v("✓×")])],1)],1)]):t._e(),1===t.answerSheetMode&&t.titleSwitchable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("显示题目内容")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowQuestion,callback:function(e){t.isShowQuestion=e},expression:"isShowQuestion"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("手工批阅")]),e("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"该试卷存在多个得分点题目,不支持线下批阅,请重新选择试卷",placement:"top-end",disabled:!t.graffitiDisable,"open-delay":200}},[e("div",{staticClass:"ac-config__item"},[e("el-switch",{attrs:{disabled:t.graffitiDisable},model:{value:t.handRead,callback:function(e){t.handRead=e},expression:"handRead"}})],1)])],1),t.readType&&1===t.answerSheetMode?e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("设置给分框样式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.readType,callback:function(e){t.readType=e},expression:"readType"}},[e("el-radio",{attrs:{label:"hand"}},[t._v("手写")]),e("el-radio",{attrs:{label:"graffiti"}},[t._v("涂点")])],1)],1)]):t._e()]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("添加页脚")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isAddFooter,callback:function(e){t.isAddFooter=e},expression:"isAddFooter"}})],1)]):t._e(),0!==t.answerSheetMode&&"graffiti"!==t.readType||1!==t.layout?t._e():e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("答题卡拼凑打印")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isPatchwork,callback:function(e){t.isPatchwork=e},expression:"isPatchwork"}})],1)])],2)]),e("ac-preview",{attrs:{visible:t.previewVisible,selector:".ac-panel .ac-piece__wrapper"},on:{"update:visible":function(e){t.previewVisible=e}}}),t.acMode?t._e():e("el-dialog",{staticClass:"download-dialog",attrs:{title:"下载提示",visible:t.showDownloadModal,width:"520px",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.showDownloadModal=e}}},[e("p",{staticClass:"message"},[t._v(" 选择导出以下内容 "),e("span",{staticClass:"redTip"},[t._v("(为了保证下载内容的质量,建议使用chrome进行下载)")])]),e("div",{staticClass:"tip"},[e("el-radio",{attrs:{label:"sweep"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[t._v("答题卡")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadType,callback:function(e){t.downloadType=e},expression:"downloadType"}},[e("el-option",{attrs:{label:"PDF",value:"PDF"}}),e("el-option",{attrs:{label:"PNG",value:"PNG"}})],1)],1),e("div",{staticClass:"paper-type_selector"},[e("span",{staticClass:"label"},[t._v("请选择纸张大小")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadSize,callback:function(e){t.downloadSize=e},expression:"downloadSize"}},[e("el-option",{attrs:{label:1===t.layout?"A4":"A3",value:1===t.layout?"A4":"A3"}}),e("el-option",{attrs:{label:1===t.layout?"16K":"8K",value:1===t.layout?"16K":"8K"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDownloadModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmDownload}},[t._v("确 定")])],1)])],1)},i=[],a=(n("14d9"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode-other"},[e("p",{staticClass:"ac-card-config__sublabel"},[t._v("适用于"+t._s(t.subLabel)+"纸张")]),e("div",{staticClass:"layout-config"},[e("div",{class:["layout-config-item",t.disableOneLayout&&"disable-style"],attrs:{"aria-disabled":t.disableOneLayout},on:{click:function(e){return t.changeAnswerCardLayout(1)}}},[e("div",{class:["layout-image",1===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("d09a"),alt:"一栏"}})]),e("p",{staticClass:"layout-name"},[t._v("一栏")])]),e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(2)}}},[e("div",{class:["layout-image",2===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("eb33"),alt:"两栏"}})]),e("p",{staticClass:"layout-name"},[t._v("两栏")])]),0===t.mode?e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(3)}}},[e("div",{class:["layout-image",3===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("f714"),alt:"三栏"}})]),e("p",{staticClass:"layout-name"},[t._v("三栏")])]):t._e()]),1===t.mode?e("el-radio-group",{model:{value:t.sizeType,callback:function(e){t.sizeType=e},expression:"sizeType"}},[e("el-radio",{attrs:{label:"A"}},[t._v(t._s(1===t.layout?"A4":"A3"))]),e("el-radio",{attrs:{label:"K"}},[t._v(t._s(1===t.layout?"16K":"8K"))])],1):t._e()],1)])}),o=[],s={name:"ChangeLayout",components:{},props:{mode:{type:Number,default:0}},computed:{sizeType:{get:function(){return this.$store.getters["AC/sizeType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setSizeType",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},disableOneLayout:function(){return this.$store.getters["AC/disableOneLayout"]},subLabel:function(){return 0===this.mode?1===this.layout?"A4、16K":"A3、8K":"A"===this.sizeType?1===this.layout?"A4":"A3":1===this.layout?"16K":"8K"}},watch:{},mounted:function(){},data:function(){return{}},methods:{changeAnswerCardLayout:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",t),t>1&&this.$store.dispatch("AC/answerConfig/setPatchwork",!1),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,u=n("2877"),l=Object(u["a"])(c,a,o,!1,null,null,null),h=l.exports,d=n("2b16"),f={name:"AcAnswerConfig",components:{changeLayout:h,AcPreview:d["default"]},props:{modeChangeable:{type:Boolean,default:!0},layoutChangeable:{type:Boolean,default:!0},titleSwitchable:{type:Boolean,default:!0},graffitiDisable:{type:Boolean,default:!1}},inject:["showStudentInfo"],computed:{answerSheetMode:{get:function(){return this.$store.getters["AC/answerCardMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardMode",t),0===t&&this.$store.dispatch("AC/answerConfig/setSizeType","A")}},isShowAttention:{get:function(){return this.$store.getters["AC/showAttention"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAttention",t),this.$store.dispatch("AC/paper/resetPanel")}},studentInfoArr:function(){return this.$store.getters["AC/studentInfo"]},isShowEducationId:{get:function(){return this.$store.getters["AC/showEducationId"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},educationIdValue:{get:function(){return this.$store.getters["AC/educationIdValue"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},registrationNumberType:{get:function(){return this.$store.getters["AC/registrationNumberType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setRegistrationNumberType",t),this.$store.dispatch("AC/paper/resetPanel")}},objectiveOrder:{get:function(){return this.$store.getters["AC/objectiveOrder"]},set:function(t){this.$store.dispatch("AC/answerConfig/setObjectiveOrder",t),this.$store.dispatch("AC/paper/resetPanel")}},judgmentMode:{get:function(){return this.$store.getters["AC/judgmentMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setJudgmentMode",t)}},isShowQuestion:{get:function(){return this.$store.getters["AC/showQuestion"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowQuestion",t),this.$store.dispatch("AC/paper/resetEditTitle")}},handRead:{get:function(){return!!this.readType},set:function(t){this.readType=t?"graffiti":""}},readType:{get:function(){return this.$store.getters["AC/readType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setReadType",t),this.$store.dispatch("AC/paper/resetPanel")}},isAddFooter:{get:function(){return this.$store.getters["AC/addFooter"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAddFooter",t)}},isPatchwork:{get:function(){return this.$store.getters["AC/patchwork"]},set:function(t){this.$store.dispatch("AC/answerConfig/setPatchwork",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},downloadType:{get:function(){return this.$store.getters["AC/downloadType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadType",t)}},downloadSize:{get:function(){return this.$store.getters["AC/downloadSize"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadSize",t)}},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{studentInfoArr:function(){this.studentInfoTags=this.studentInfoArr}},mounted:function(){this.studentInfoTags=this.studentInfoArr},data:function(){return{studentInfoTags:[],inputVisible:!1,inputValue:"",showConfig:!0,previewVisible:!1,showDownloadModal:!1,radio:"sweep"}},methods:{handleClose:function(t){this.studentInfoTags.splice(this.studentInfoTags.indexOf(t),1),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},showInput:function(){var t=this;this.inputVisible=!0,this.$nextTick((function(e){t.$refs.saveTagInput.$refs.input.focus()}))},handleInputConfirm:function(){var t=this.inputValue;t&&-1===this.studentInfoTags.indexOf(t)&&this.studentInfoTags.push(t),this.inputVisible=!1,this.inputValue="",this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},download:function(){this.acMode?this.$emit("download"):(this.showDownloadModal=!0,this.$store.dispatch("AC/answerConfig/setDownloadSize",1===this.layout?"A4":"A3"))},confirmDownload:function(){this.showDownloadModal=!1,this.$emit("download")},save:function(){this.$emit("save")}}},p=f,g=Object(u["a"])(p,r,i,!1,null,null,null),m=g.exports;m.install=function(t){t.component(m.name,m)};e["default"]=m},"69f3":function(t,e,n){var r,i,a,o=n("cdce"),s=n("da84"),c=n("861d"),u=n("9112"),l=n("1a2d"),h=n("c6cd"),d=n("f772"),f=n("d012"),p="Object already initialized",g=s.TypeError,m=s.WeakMap,y=function(t){return a(t)?i(t):r(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(o||h.state){var _=h.state||(h.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,r=function(t,e){if(_.has(t))throw g(p);return e.facade=t,_.set(t,e),e},i=function(t){return _.get(t)||{}},a=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,r=function(t,e){if(l(t,b))throw g(p);return e.facade=t,u(t,b,e),e},i=function(t){return l(t,b)?t[b]:{}},a=function(t){return l(t,b)}}t.exports={set:r,get:i,has:a,enforce:y,getterFor:v}},"6bdf":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{"custom-class":"ac-editor",visible:t.currentVisible,title:t.title,top:"10vh",width:"868px","close-on-click-modal":!1},on:{"update:visible":function(e){t.currentVisible=e},open:t.handleOpen}},[e("textarea",{attrs:{id:t.editorId}}),e("div",{staticClass:"ac-editor__footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.close}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirm}},[t._v("确定")])],1)])},i=[],a=n("d4ec"),o=n("bee2"),s={name:"AcEditor",props:{title:{type:String,default:"编辑标题"},content:{type:String,default:""},visible:{type:Boolean,default:!1},editorId:{type:String,default:"ac-editor"},editorConstructor:{type:Function,default:function(){}}},inject:["uploadOss","ClassicEditor"],data:function(){return{editor:null}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},uploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(a["a"])(this,e),this.loader=t}return Object(o["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,r){e.loader.file.then((function(e){return t(e,n)}))}))}}]),e}()},createFn:function(){return this.ClassicEditor||this.editorConstructor}},methods:{handleOpen:function(){var t=this;this.$nextTick((function(){return t.initEditor()}))},close:function(){this.currentVisible=!1},confirm:function(){this.close(),this.editor&&this.$emit("submit",this.editor.getData())},initEditor:function(){var t=this;this.editor?(""===this.content||this.content)&&this.editor.setData(this.content):this.createFn.create(document.querySelector("#".concat(this.editorId)),{isReadOnly:!0,placeholder:"请输入~",image:{resizeUnit:"px",toolbar:[{name:"imageStyle:pictures",items:["imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight"],defaultItem:"imageStyle:alignCenter"},"|","toggleImageCaption","imageStyle:inline"]}}).then((function(e){t.editor=e,t.content&&t.editor.setData(t.content),t.addSpecialCharacters(e),e.plugins.get("FileRepository").createUploadAdapter=function(e){return new t.uploadAdapter(e)},e.on("instanceReady",(function(t){t.editor.execCommand("toolbarCollapse")}))}))},addSpecialCharacters:function(t){t.plugins.get("SpecialCharacters").addItems("编号",[{title:"①",character:"①"},{title:"②",character:"②"},{title:"③",character:"③"},{title:"④",character:"④"},{title:"⑤",character:"⑤"},{title:"⑥",character:"⑥"},{title:"⑦",character:"⑦"},{title:"⑧",character:"⑧"},{title:"⑨",character:"⑨"},{title:"⑩",character:"⑩"},{title:"(1)",character:"(1)"},{title:"(2)",character:"(2)"},{title:"(3)",character:"(3)"},{title:"(4)",character:"(4)"},{title:"(5)",character:"(5)"},{title:"(6)",character:"(6)"},{title:"(7)",character:"(7)"},{title:"(8)",character:"(8)"},{title:"(9)",character:"(9)"},{title:"(10)",character:"(10)"},{title:"1)",character:"1)"},{title:"2)",character:"2)"},{title:"3)",character:"3)"},{title:"4)",character:"4)"},{title:"5)",character:"5)"},{title:"6)",character:"6)"},{title:"7)",character:"7)"},{title:"8)",character:"8)"},{title:"9)",character:"9)"},{title:"10)",character:"10)"},{title:"一",character:"一"},{title:"二",character:"二"},{title:"三",character:"三"},{title:"四",character:"四"},{title:"五",character:"五"},{title:"六",character:"六"},{title:"七",character:"七"},{title:"八",character:"八"},{title:"九",character:"九"},{title:"十",character:"十"},{title:"(一)",character:"(一)"},{title:"(二)",character:"(二)"},{title:"(三)",character:"(三)"},{title:"(四)",character:"(四)"},{title:"(五)",character:"(五)"},{title:"(六)",character:"(六)"},{title:"(七)",character:"(七)"},{title:"(八)",character:"(八)"},{title:"(九)",character:"(九)"},{title:"(十)",character:"(十)"}])}}},c=s,u=n("2877"),l=Object(u["a"])(c,r,i,!1,null,null,null),h=l.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"6ce5":function(t,e,n){"use strict";var r=n("df7e"),i=n("ebb5"),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return r(a(this),s(this))}))},"6f19":function(t,e,n){var r=n("9112"),i=n("0d26"),a=n("b980"),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):r(t,"stack",i(n,s)))}},7156:function(t,e,n){var r=n("1626"),i=n("861d"),a=n("d2bb");t.exports=function(t,e,n){var o,s;return a&&r(o=e.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,n){var r=n("e330"),i=n("59ed");t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(a){}}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80"),i=Object;t.exports=function(t){return i(r(t))}},"825a":function(t,e,n){var r=n("861d"),i=String,a=TypeError;t.exports=function(t){if(r(t))return t;throw a(i(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var r=n("1626"),i=n("8ea1"),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===a}:function(t){return"object"==typeof t?null!==t:r(t)}},8925:function(t,e,n){var r=n("e330"),i=n("1626"),a=n("c6cd"),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},"8ea1":function(t,e){var n="object"==typeof document&&document.all,r="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}},"8f60":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{class:["ac-graffiti__wrapper",t.hidePadding&&"is-hide-padding"]},[e("div",{class:["ac-graffiti",t.hideBottomBorder&&"is-hide-bottom",t.hideTopBorder&&"is-hide-top"],attrs:{"data-scan-type":"review","data-scan-name":t.scanName,"data-scan-score":t.score}},t._l(Array(21).fill(""),(function(n,r){return e("span",{key:r,staticClass:"ac-graffiti__item"},[t._v(" "+t._s(t.getItem(r))+" ")])})),0)])},i=[],a={name:"AcGraffiti",props:{score:{type:Number,required:!0},scanName:{type:String},hidePadding:{type:Boolean,required:!1},hideBottomBorder:{type:Boolean,required:!1},hideTopBorder:{type:Boolean,required:!1}},methods:{getItem:function(t){if(20===t)return.5;if(this.score>=20)return t>9||10*t<=this.score?t%10:"";var e=20-this.score-1;return t>=e?20-t-1:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"907a":function(t,e,n){"use strict";var r=n("ebb5"),i=n("07fa"),a=n("5926"),o=r.aTypedArray,s=r.exportTypedArrayMethod;s("at",(function(t){var e=o(this),n=i(e),r=a(t),s=r>=0?r:n+r;return s<0||s>=n?void 0:e[s]}))},"90e3":function(t,e,n){var r=n("e330"),i=0,a=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},9112:function(t,e,n){var r=n("83ab"),i=n("9bf2"),a=n("5c6c");t.exports=r?function(t,e,n){return i.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},9152:function(t,e){
4
4
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
5
5
  e.read=function(t,e,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,a=f&(1<<-l)-1,f>>=-l,l+=s;l>0;a=256*a+t[e+h],h+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+t[e+h],h+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=u}return(f?-1:1)*o*Math.pow(2,a-r)},e.write=function(t,e,n,r,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),e+=o+h>=1?d/c:d*Math.pow(2,1-h),e*c>=2&&(o++,c/=2),o+h>=l?(s=0,o=l):o+h>=1?(s=(e*c-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[n+f]=255&o,f+=p,o/=256,u-=8);t[n+f-p]|=128*g}},"94ca":function(t,e,n){var r=n("d039"),i=n("1626"),a=/#|\.prototype\./,o=function(t,e){var n=c[s(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},"986a":function(t,e,n){"use strict";var r=n("ebb5"),i=n("a258").findLast,a=r.aTypedArray,o=r.exportTypedArrayMethod;o("findLast",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"9bf2":function(t,e,n){var r=n("83ab"),i=n("0cfb"),a=n("aed9"),o=n("825a"),s=n("a04b"),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";e.f=r?a?function(t,e,n){if(o(t),e=s(e),o(n),"function"===typeof t&&"prototype"===e&&"value"in n&&f in n&&!n[f]){var r=l(t,e);r&&r[f]&&(t[e]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:h in n?n[h]:r[h],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(o(t),e=s(e),o(n),i)try{return u(t,e,n)}catch(r){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a04b:function(t,e,n){var r=n("c04e"),i=n("d9b5");t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},a258:function(t,e,n){var r=n("0366"),i=n("44ad"),a=n("7b0b"),o=n("07fa"),s=function(t){var e=1==t;return function(n,s,c){var u,l,h=a(n),d=i(h),f=r(s,c),p=o(d);while(p-- >0)if(u=d[p],l=f(u,p,h),l)switch(t){case 0:return u;case 1:return p}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},a38e:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n("53ca");n("d9e2");function i(t,e){if("object"!==Object(r["a"])(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==Object(r["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function a(t){var e=i(t,"string");return"symbol"===Object(r["a"])(e)?e:String(e)}},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},ab36:function(t,e,n){var r=n("861d"),i=n("9112");t.exports=function(t,e){r(e)&&"cause"in e&&i(t,"cause",e.cause)}},aeb0:function(t,e,n){var r=n("9bf2").f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},aed9:function(t,e,n){var r=n("83ab"),i=n("d039");t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b42e:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},b622:function(t,e,n){var r=n("da84"),i=n("5692"),a=n("1a2d"),o=n("90e3"),s=n("04f8"),c=n("fdbf"),u=r.Symbol,l=i("wks"),h=c?u["for"]||u:u&&u.withoutSetter||o;t.exports=function(t){return a(l,t)||(l[t]=s&&a(u,t)?u[t]:h("Symbol."+t)),l[t]}},b639:function(t,e,n){"use strict";(function(t){
6
6
  /*!