zhytech-ui 1.0.14 → 1.0.16
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/dist/zhytech-ui.es.js +0 -1
- package/dist/zhytech-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/zhytech-ui.es.js
CHANGED
|
@@ -21872,7 +21872,6 @@ const AT = { class: "option-wrap" }, PT = { style: { float: "left" } }, LT = { s
|
|
|
21872
21872
|
class: "cursor-move"
|
|
21873
21873
|
})) : N("", !0),
|
|
21874
21874
|
S($, {
|
|
21875
|
-
size: "small",
|
|
21876
21875
|
class: "selector-component",
|
|
21877
21876
|
modelValue: B.value,
|
|
21878
21877
|
"onUpdate:modelValue": (F) => B.value = F,
|
package/dist/zhytech-ui.umd.js
CHANGED
|
@@ -52,4 +52,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
|
|
|
52
52
|
* @author owenm <owen23355@gmail.com>
|
|
53
53
|
* @license MIT
|
|
54
54
|
*/function rp(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,r)}return o}function Tn(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?rp(Object(o),!0).forEach(function(r){Qk(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):rp(Object(o)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))})}return t}function na(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?na=function(n){return typeof n}:na=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},na(t)}function Qk(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function nn(){return nn=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},nn.apply(this,arguments)}function eV(t,n){if(t==null)return{};var o={},r=Object.keys(t),l,a;for(a=0;a<r.length;a++)l=r[a],!(n.indexOf(l)>=0)&&(o[l]=t[l]);return o}function tV(t,n){if(t==null)return{};var o=eV(t,n),r,l;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function nV(t){return oV(t)||rV(t)||lV(t)||aV()}function oV(t){if(Array.isArray(t))return ds(t)}function rV(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lV(t,n){if(t){if(typeof t=="string")return ds(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ds(t,n)}}function ds(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=t[o];return r}function aV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
55
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var iV="1.15.2";function vn(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Hn=vn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Fr=vn(/Edge/i),lp=vn(/firefox/i),vr=vn(/safari/i)&&!vn(/chrome/i)&&!vn(/android/i),ap=vn(/iP(ad|od|hone)/i),ip=vn(/chrome/i)&&vn(/android/i),sp={capture:!1,passive:!1};function $e(t,n,o){t.addEventListener(n,o,!Hn&&sp)}function Ee(t,n,o){t.removeEventListener(n,o,!Hn&&sp)}function oa(t,n){if(n){if(n[0]===">"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch{return!1}return!1}}function sV(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function on(t,n,o,r){if(t){o=o||document;do{if(n!=null&&(n[0]===">"?t.parentNode===o&&oa(t,n):oa(t,n))||r&&t===o)return t;if(t===o)break}while(t=sV(t))}return null}var cp=/\s+/g;function Ye(t,n,o){if(t&&n)if(t.classList)t.classList[o?"add":"remove"](n);else{var r=(" "+t.className+" ").replace(cp," ").replace(" "+n+" "," ");t.className=(r+(o?" "+n:"")).replace(cp," ")}}function de(t,n,o){var r=t&&t.style;if(r){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),n===void 0?o:o[n];!(n in r)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),r[n]=o+(typeof o=="string"?"":"px")}}function So(t,n){var o="";if(typeof t=="string")o=t;else do{var r=de(t,"transform");r&&r!=="none"&&(o=r+" "+o)}while(!n&&(t=t.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(o)}function dp(t,n,o){if(t){var r=t.getElementsByTagName(n),l=0,a=r.length;if(o)for(;l<a;l++)o(r[l],l);return r}return[]}function $n(){var t=document.scrollingElement;return t||document.documentElement}function qe(t,n,o,r,l){if(!(!t.getBoundingClientRect&&t!==window)){var a,i,s,c,d,u,p;if(t!==window&&t.parentNode&&t!==$n()?(a=t.getBoundingClientRect(),i=a.top,s=a.left,c=a.bottom,d=a.right,u=a.height,p=a.width):(i=0,s=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(n||o)&&t!==window&&(l=l||t.parentNode,!Hn))do if(l&&l.getBoundingClientRect&&(de(l,"transform")!=="none"||o&&de(l,"position")!=="static")){var h=l.getBoundingClientRect();i-=h.top+parseInt(de(l,"border-top-width")),s-=h.left+parseInt(de(l,"border-left-width")),c=i+a.height,d=s+a.width;break}while(l=l.parentNode);if(r&&t!==window){var m=So(l||t),g=m&&m.a,f=m&&m.d;m&&(i/=f,s/=g,p/=g,u/=f,c=i+u,d=s+p)}return{top:i,left:s,bottom:c,right:d,width:p,height:u}}}function fp(t,n,o){for(var r=ro(t,!0),l=qe(t)[n];r;){var a=qe(r)[o],i=void 0;if(o==="top"||o==="left"?i=l>=a:i=l<=a,!i)return r;if(r===$n())break;r=ro(r,!1)}return!1}function nr(t,n,o,r){for(var l=0,a=0,i=t.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==fe.ghost&&(r||i[a]!==fe.dragged)&&on(i[a],o.draggable,t,!1)){if(l===n)return i[a];l++}a++}return null}function fs(t,n){for(var o=t.lastElementChild;o&&(o===fe.ghost||de(o,"display")==="none"||n&&!oa(o,n));)o=o.previousElementSibling;return o||null}function Qe(t,n){var o=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==fe.clone&&(!n||oa(t,n))&&o++;return o}function up(t){var n=0,o=0,r=$n();if(t)do{var l=So(t),a=l.a,i=l.d;n+=t.scrollLeft*a,o+=t.scrollTop*i}while(t!==r&&(t=t.parentNode));return[n,o]}function cV(t,n){for(var o in t)if(t.hasOwnProperty(o)){for(var r in n)if(n.hasOwnProperty(r)&&n[r]===t[o][r])return Number(o)}return-1}function ro(t,n){if(!t||!t.getBoundingClientRect)return $n();var o=t,r=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var l=de(o);if(o.clientWidth<o.scrollWidth&&(l.overflowX=="auto"||l.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(l.overflowY=="auto"||l.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return $n();if(r||n)return o;r=!0}}while(o=o.parentNode);return $n()}function dV(t,n){if(t&&n)for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o]);return t}function us(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}var Hr;function pp(t,n){return function(){if(!Hr){var o=arguments,r=this;o.length===1?t.call(r,o[0]):t.apply(r,o),Hr=setTimeout(function(){Hr=void 0},n)}}}function fV(){clearTimeout(Hr),Hr=void 0}function mp(t,n,o){t.scrollLeft+=n,t.scrollTop+=o}function ps(t){var n=window.Polymer,o=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):o?o(t).clone(!0)[0]:t.cloneNode(!0)}function hp(t,n){de(t,"position","absolute"),de(t,"top",n.top),de(t,"left",n.left),de(t,"width",n.width),de(t,"height",n.height)}function ms(t){de(t,"position",""),de(t,"top",""),de(t,"left",""),de(t,"width",""),de(t,"height","")}function gp(t,n,o){var r={};return Array.from(t.children).forEach(function(l){var a,i,s,c;if(!(!on(l,n.draggable,t,!1)||l.animated||l===o)){var d=qe(l);r.left=Math.min((a=r.left)!==null&&a!==void 0?a:1/0,d.left),r.top=Math.min((i=r.top)!==null&&i!==void 0?i:1/0,d.top),r.right=Math.max((s=r.right)!==null&&s!==void 0?s:-1/0,d.right),r.bottom=Math.max((c=r.bottom)!==null&&c!==void 0?c:-1/0,d.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var mt="Sortable"+new Date().getTime();function uV(){var t=[],n;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(l){if(!(de(l,"display")==="none"||l===fe.ghost)){t.push({target:l,rect:qe(l)});var a=Tn({},t[t.length-1].rect);if(l.thisAnimationDuration){var i=So(l,!0);i&&(a.top-=i.f,a.left-=i.e)}l.fromRect=a}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(cV(t,{target:r}),1)},animateAll:function(r){var l=this;if(!this.options.animation){clearTimeout(n),typeof r=="function"&&r();return}var a=!1,i=0;t.forEach(function(s){var c=0,d=s.target,u=d.fromRect,p=qe(d),h=d.prevFromRect,m=d.prevToRect,g=s.rect,f=So(d,!0);f&&(p.top-=f.f,p.left-=f.e),d.toRect=p,d.thisAnimationDuration&&us(h,p)&&!us(u,p)&&(g.top-p.top)/(g.left-p.left)===(u.top-p.top)/(u.left-p.left)&&(c=mV(g,h,m,l.options)),us(p,u)||(d.prevFromRect=u,d.prevToRect=p,c||(c=l.options.animation),l.animate(d,g,p,c)),c&&(a=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(n),a?n=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),t=[]},animate:function(r,l,a,i){if(i){de(r,"transition",""),de(r,"transform","");var s=So(this.el),c=s&&s.a,d=s&&s.d,u=(l.left-a.left)/(c||1),p=(l.top-a.top)/(d||1);r.animatingX=!!u,r.animatingY=!!p,de(r,"transform","translate3d("+u+"px,"+p+"px,0)"),this.forRepaintDummy=pV(r),de(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),de(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){de(r,"transition",""),de(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function pV(t){return t.offsetWidth}function mV(t,n,o,r){return Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))/Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))*r.animation}var or=[],hs={initializeByDefault:!0},jr={mount:function(n){for(var o in hs)hs.hasOwnProperty(o)&&!(o in n)&&(n[o]=hs[o]);or.forEach(function(r){if(r.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),or.push(n)},pluginEvent:function(n,o,r){var l=this;this.eventCanceled=!1,r.cancel=function(){l.eventCanceled=!0};var a=n+"Global";or.forEach(function(i){o[i.pluginName]&&(o[i.pluginName][a]&&o[i.pluginName][a](Tn({sortable:o},r)),o.options[i.pluginName]&&o[i.pluginName][n]&&o[i.pluginName][n](Tn({sortable:o},r)))})},initializePlugins:function(n,o,r,l){or.forEach(function(s){var c=s.pluginName;if(!(!n.options[c]&&!s.initializeByDefault)){var d=new s(n,o,n.options);d.sortable=n,d.options=n.options,n[c]=d,nn(r,d.defaults)}});for(var a in n.options)if(n.options.hasOwnProperty(a)){var i=this.modifyOption(n,a,n.options[a]);typeof i<"u"&&(n.options[a]=i)}},getEventProperties:function(n,o){var r={};return or.forEach(function(l){typeof l.eventProperties=="function"&&nn(r,l.eventProperties.call(o[l.pluginName],n))}),r},modifyOption:function(n,o,r){var l;return or.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[o]=="function"&&(l=a.optionListeners[o].call(n[a.pluginName],r))}),l}};function Ur(t){var n=t.sortable,o=t.rootEl,r=t.name,l=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,c=t.oldIndex,d=t.newIndex,u=t.oldDraggableIndex,p=t.newDraggableIndex,h=t.originalEvent,m=t.putSortable,g=t.extraEventProperties;if(n=n||o&&o[mt],!!n){var f,y=n.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Hn&&!Fr?f=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(r,!0,!0)),f.to=i||o,f.from=s||o,f.item=l||o,f.clone=a,f.oldIndex=c,f.newIndex=d,f.oldDraggableIndex=u,f.newDraggableIndex=p,f.originalEvent=h,f.pullMode=m?m.lastPutMode:void 0;var k=Tn(Tn({},g),jr.getEventProperties(r,n));for(var w in k)f[w]=k[w];o&&o.dispatchEvent(f),y[b]&&y[b].call(n,f)}}var hV=["evt"],$t=function(n,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=r.evt,a=tV(r,hV);jr.pluginEvent.bind(fe)(n,o,Tn({dragEl:J,parentEl:et,ghostEl:ge,rootEl:Ge,nextEl:Bo,lastDownEl:ra,cloneEl:Xe,cloneHidden:lo,dragStarted:Kr,putSortable:st,activeSortable:fe.active,originalEvent:l,oldIndex:rr,oldDraggableIndex:qr,newIndex:qt,newDraggableIndex:ao,hideGhostForTarget:Vp,unhideGhostForTarget:Ep,cloneNowHidden:function(){lo=!0},cloneNowShown:function(){lo=!1},dispatchSortableEvent:function(s){kt({sortable:o,name:s,originalEvent:l})}},a))};function kt(t){Ur(Tn({putSortable:st,cloneEl:Xe,targetEl:J,rootEl:Ge,oldIndex:rr,oldDraggableIndex:qr,newIndex:qt,newDraggableIndex:ao},t))}var J,et,ge,Ge,Bo,ra,Xe,lo,rr,qt,qr,ao,la,st,lr=!1,aa=!1,ia=[],No,hn,gs,bs,bp,yp,Kr,ar,Wr,Gr=!1,sa=!1,ca,ht,ys=[],ws=!1,da=[],fa=typeof document<"u",ua=ap,wp=Fr||Hn?"cssFloat":"float",gV=fa&&!ip&&!ap&&"draggable"in document.createElement("div"),Cp=function(){if(fa){if(Hn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),_p=function(n,o){var r=de(n),l=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=nr(n,0,o),i=nr(n,1,o),s=a&&de(a),c=i&&de(i),d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+qe(a).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+qe(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var p=s.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||d>=l&&r[wp]==="none"||i&&r[wp]==="none"&&d+u>l)?"vertical":"horizontal"},bV=function(n,o,r){var l=r?n.left:n.top,a=r?n.right:n.bottom,i=r?n.width:n.height,s=r?o.left:o.top,c=r?o.right:o.bottom,d=r?o.width:o.height;return l===s||a===c||l+i/2===s+d/2},yV=function(n,o){var r;return ia.some(function(l){var a=l[mt].options.emptyInsertThreshold;if(!(!a||fs(l))){var i=qe(l),s=n>=i.left-a&&n<=i.right+a,c=o>=i.top-a&&o<=i.bottom+a;if(s&&c)return r=l}}),r},kp=function(n){function o(a,i){return function(s,c,d,u){var p=s.options.group.name&&c.options.group.name&&s.options.group.name===c.options.group.name;if(a==null&&(i||p))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return o(a(s,c,d,u),i)(s,c,d,u);var h=(i?s:c).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var r={},l=n.group;(!l||na(l)!="object")&&(l={name:l}),r.name=l.name,r.checkPull=o(l.pull,!0),r.checkPut=o(l.put),r.revertClone=l.revertClone,n.group=r},Vp=function(){!Cp&&ge&&de(ge,"display","none")},Ep=function(){!Cp&&ge&&de(ge,"display","")};fa&&!ip&&document.addEventListener("click",function(t){if(aa)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),aa=!1,!1},!0);var xo=function(n){if(J){n=n.touches?n.touches[0]:n;var o=yV(n.clientX,n.clientY);if(o){var r={};for(var l in n)n.hasOwnProperty(l)&&(r[l]=n[l]);r.target=r.rootEl=o,r.preventDefault=void 0,r.stopPropagation=void 0,o[mt]._onDragOver(r)}}},wV=function(n){J&&J.parentNode[mt]._isOutsideThisEl(n.target)};function fe(t,n){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=nn({},n),t[mt]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _p(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:fe.supportPointer!==!1&&"PointerEvent"in window&&!vr,emptyInsertThreshold:5};jr.initializePlugins(this,t,o);for(var r in o)!(r in n)&&(n[r]=o[r]);kp(n);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=n.forceFallback?!1:gV,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?$e(t,"pointerdown",this._onTapStart):($e(t,"mousedown",this._onTapStart),$e(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($e(t,"dragover",this),$e(t,"dragenter",this)),ia.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),nn(this,uV())}fe.prototype={constructor:fe,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ar=null)},_getDirection:function(n,o){return typeof this.options.direction=="function"?this.options.direction.call(this,n,o,J):this.options.direction},_onTapStart:function(n){if(n.cancelable){var o=this,r=this.el,l=this.options,a=l.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(s||n).target,d=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=l.filter;if(NV(r),!J&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||l.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&vr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=on(c,l.draggable,r,!1),!(c&&c.animated)&&ra!==c)){if(rr=Qe(c),qr=Qe(c,l.draggable),typeof u=="function"){if(u.call(this,n,c,this)){kt({sortable:o,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),$t("filter",o,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(p){if(p=on(d,p.trim(),r,!1),p)return kt({sortable:o,rootEl:p,name:"filter",targetEl:c,fromEl:r,toEl:r}),$t("filter",o,{evt:n}),!0}),u)){a&&n.cancelable&&n.preventDefault();return}l.handle&&!on(d,l.handle,r,!1)||this._prepareDragStart(n,s,c)}}},_prepareDragStart:function(n,o,r){var l=this,a=l.el,i=l.options,s=a.ownerDocument,c;if(r&&!J&&r.parentNode===a){var d=qe(r);if(Ge=a,J=r,et=J.parentNode,Bo=J.nextSibling,ra=r,la=i.group,fe.dragged=J,No={target:J,clientX:(o||n).clientX,clientY:(o||n).clientY},bp=No.clientX-d.left,yp=No.clientY-d.top,this._lastX=(o||n).clientX,this._lastY=(o||n).clientY,J.style["will-change"]="all",c=function(){if($t("delayEnded",l,{evt:n}),fe.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!lp&&l.nativeDraggable&&(J.draggable=!0),l._triggerDragStart(n,o),kt({sortable:l,name:"choose",originalEvent:n}),Ye(J,i.chosenClass,!0)},i.ignore.split(",").forEach(function(u){dp(J,u.trim(),Cs)}),$e(s,"dragover",xo),$e(s,"mousemove",xo),$e(s,"touchmove",xo),$e(s,"mouseup",l._onDrop),$e(s,"touchend",l._onDrop),$e(s,"touchcancel",l._onDrop),lp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),$t("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(Fr||Hn))){if(fe.eventCanceled){this._onDrop();return}$e(s,"mouseup",l._disableDelayedDrag),$e(s,"touchend",l._disableDelayedDrag),$e(s,"touchcancel",l._disableDelayedDrag),$e(s,"mousemove",l._delayedDragTouchMoveHandler),$e(s,"touchmove",l._delayedDragTouchMoveHandler),i.supportPointer&&$e(s,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var o=n.touches?n.touches[0]:n;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&Cs(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Ee(n,"mouseup",this._disableDelayedDrag),Ee(n,"touchend",this._disableDelayedDrag),Ee(n,"touchcancel",this._disableDelayedDrag),Ee(n,"mousemove",this._delayedDragTouchMoveHandler),Ee(n,"touchmove",this._delayedDragTouchMoveHandler),Ee(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,o){o=o||n.pointerType=="touch"&&n,!this.nativeDraggable||o?this.options.supportPointer?$e(document,"pointermove",this._onTouchMove):o?$e(document,"touchmove",this._onTouchMove):$e(document,"mousemove",this._onTouchMove):($e(J,"dragend",this),$e(Ge,"dragstart",this._onDragStart));try{document.selection?ma(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,o){if(lr=!1,Ge&&J){$t("dragStarted",this,{evt:o}),this.nativeDraggable&&$e(document,"dragover",wV);var r=this.options;!n&&Ye(J,r.dragClass,!1),Ye(J,r.ghostClass,!0),fe.active=this,n&&this._appendGhost(),kt({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(hn){this._lastX=hn.clientX,this._lastY=hn.clientY,Vp();for(var n=document.elementFromPoint(hn.clientX,hn.clientY),o=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(hn.clientX,hn.clientY),n!==o);)o=n;if(J.parentNode[mt]._isOutsideThisEl(n),o)do{if(o[mt]){var r=void 0;if(r=o[mt]._onDragOver({clientX:hn.clientX,clientY:hn.clientY,target:n,rootEl:o}),r&&!this.options.dragoverBubble)break}n=o}while(o=o.parentNode);Ep()}},_onTouchMove:function(n){if(No){var o=this.options,r=o.fallbackTolerance,l=o.fallbackOffset,a=n.touches?n.touches[0]:n,i=ge&&So(ge,!0),s=ge&&i&&i.a,c=ge&&i&&i.d,d=ua&&ht&&up(ht),u=(a.clientX-No.clientX+l.x)/(s||1)+(d?d[0]-ys[0]:0)/(s||1),p=(a.clientY-No.clientY+l.y)/(c||1)+(d?d[1]-ys[1]:0)/(c||1);if(!fe.active&&!lr){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(n,!0)}if(ge){i?(i.e+=u-(gs||0),i.f+=p-(bs||0)):i={a:1,b:0,c:0,d:1,e:u,f:p};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");de(ge,"webkitTransform",h),de(ge,"mozTransform",h),de(ge,"msTransform",h),de(ge,"transform",h),gs=u,bs=p,hn=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!ge){var n=this.options.fallbackOnBody?document.body:Ge,o=qe(J,!0,ua,!0,n),r=this.options;if(ua){for(ht=n;de(ht,"position")==="static"&&de(ht,"transform")==="none"&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=$n()),o.top+=ht.scrollTop,o.left+=ht.scrollLeft):ht=$n(),ys=up(ht)}ge=J.cloneNode(!0),Ye(ge,r.ghostClass,!1),Ye(ge,r.fallbackClass,!0),Ye(ge,r.dragClass,!0),de(ge,"transition",""),de(ge,"transform",""),de(ge,"box-sizing","border-box"),de(ge,"margin",0),de(ge,"top",o.top),de(ge,"left",o.left),de(ge,"width",o.width),de(ge,"height",o.height),de(ge,"opacity","0.8"),de(ge,"position",ua?"absolute":"fixed"),de(ge,"zIndex","100000"),de(ge,"pointerEvents","none"),fe.ghost=ge,n.appendChild(ge),de(ge,"transform-origin",bp/parseInt(ge.style.width)*100+"% "+yp/parseInt(ge.style.height)*100+"%")}},_onDragStart:function(n,o){var r=this,l=n.dataTransfer,a=r.options;if($t("dragStart",this,{evt:n}),fe.eventCanceled){this._onDrop();return}$t("setupClone",this),fe.eventCanceled||(Xe=ps(J),Xe.removeAttribute("id"),Xe.draggable=!1,Xe.style["will-change"]="",this._hideClone(),Ye(Xe,this.options.chosenClass,!1),fe.clone=Xe),r.cloneId=ma(function(){$t("clone",r),!fe.eventCanceled&&(r.options.removeCloneOnHide||Ge.insertBefore(Xe,J),r._hideClone(),kt({sortable:r,name:"clone"}))}),!o&&Ye(J,a.dragClass,!0),o?(aa=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Ee(document,"mouseup",r._onDrop),Ee(document,"touchend",r._onDrop),Ee(document,"touchcancel",r._onDrop),l&&(l.effectAllowed="move",a.setData&&a.setData.call(r,l,J)),$e(document,"drop",r),de(J,"transform","translateZ(0)")),lr=!0,r._dragStartId=ma(r._dragStarted.bind(r,o,n)),$e(document,"selectstart",r),Kr=!0,vr&&de(document.body,"user-select","none")},_onDragOver:function(n){var o=this.el,r=n.target,l,a,i,s=this.options,c=s.group,d=fe.active,u=la===c,p=s.sort,h=st||d,m,g=this,f=!1;if(ws)return;function y(D,F){$t(D,g,Tn({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:i,dragRect:l,targetRect:a,canSort:p,fromSortable:h,target:r,completed:k,onMove:function(W,X){return pa(Ge,o,J,l,W,qe(W),n,X)},changed:w},F))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function k(D){return y("dragOverCompleted",{insertion:D}),D&&(u?d._hideClone():d._showClone(g),g!==h&&(Ye(J,st?st.options.ghostClass:d.options.ghostClass,!1),Ye(J,s.ghostClass,!0)),st!==g&&g!==fe.active?st=g:g===fe.active&&st&&(st=null),h===g&&(g._ignoreWhileAnimating=r),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===J&&!J.animated||r===o&&!r.animated)&&(ar=null),!s.dragoverBubble&&!n.rootEl&&r!==document&&(J.parentNode[mt]._isOutsideThisEl(n.target),!D&&xo(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),f=!0}function w(){qt=Qe(J),ao=Qe(J,s.draggable),kt({sortable:g,name:"change",toEl:o,newIndex:qt,newDraggableIndex:ao,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),r=on(r,s.draggable,o,!0),y("dragOver"),fe.eventCanceled)return f;if(J.contains(n.target)||r.animated&&r.animatingX&&r.animatingY||g._ignoreWhileAnimating===r)return k(!1);if(aa=!1,d&&!s.disabled&&(u?p||(i=et!==Ge):st===this||(this.lastPutMode=la.checkPull(this,d,J,n))&&c.checkPut(this,d,J,n))){if(m=this._getDirection(n,r)==="vertical",l=qe(J),y("dragOverValid"),fe.eventCanceled)return f;if(i)return et=Ge,b(),this._hideClone(),y("revert"),fe.eventCanceled||(Bo?Ge.insertBefore(J,Bo):Ge.appendChild(J)),k(!0);var _=fs(o,s.draggable);if(!_||VV(n,m,this)&&!_.animated){if(_===J)return k(!1);if(_&&o===n.target&&(r=_),r&&(a=qe(r)),pa(Ge,o,J,l,r,a,n,!!r)!==!1)return b(),_&&_.nextSibling?o.insertBefore(J,_.nextSibling):o.appendChild(J),et=o,w(),k(!0)}else if(_&&kV(n,m,this)){var C=nr(o,0,s,!0);if(C===J)return k(!1);if(r=C,a=qe(r),pa(Ge,o,J,l,r,a,n,!1)!==!1)return b(),o.insertBefore(J,C),et=o,w(),k(!0)}else if(r.parentNode===o){a=qe(r);var V=0,E,N=J.parentNode!==o,O=!bV(J.animated&&J.toRect||l,r.animated&&r.toRect||a,m),M=m?"top":"left",$=fp(r,"top","top")||fp(J,"top","top"),S=$?$.scrollTop:void 0;ar!==r&&(E=a[M],Gr=!1,sa=!O&&s.invertSwap||N),V=EV(n,r,a,m,O?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,sa,ar===r);var x;if(V!==0){var P=Qe(J);do P-=V,x=et.children[P];while(x&&(de(x,"display")==="none"||x===ge))}if(V===0||x===r)return k(!1);ar=r,Wr=V;var B=r.nextElementSibling,T=!1;T=V===1;var L=pa(Ge,o,J,l,r,a,n,T);if(L!==!1)return(L===1||L===-1)&&(T=L===1),ws=!0,setTimeout(_V,30),b(),T&&!B?o.appendChild(J):r.parentNode.insertBefore(J,T?B:r),$&&mp($,0,S-$.scrollTop),et=J.parentNode,E!==void 0&&!sa&&(ca=Math.abs(E-qe(r)[M])),w(),k(!0)}if(o.contains(J))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ee(document,"mousemove",this._onTouchMove),Ee(document,"touchmove",this._onTouchMove),Ee(document,"pointermove",this._onTouchMove),Ee(document,"dragover",xo),Ee(document,"mousemove",xo),Ee(document,"touchmove",xo)},_offUpEvents:function(){var n=this.el.ownerDocument;Ee(n,"mouseup",this._onDrop),Ee(n,"touchend",this._onDrop),Ee(n,"pointerup",this._onDrop),Ee(n,"touchcancel",this._onDrop),Ee(document,"selectstart",this)},_onDrop:function(n){var o=this.el,r=this.options;if(qt=Qe(J),ao=Qe(J,r.draggable),$t("drop",this,{evt:n}),et=J&&J.parentNode,qt=Qe(J),ao=Qe(J,r.draggable),fe.eventCanceled){this._nulling();return}lr=!1,sa=!1,Gr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_s(this.cloneId),_s(this._dragStartId),this.nativeDraggable&&(Ee(document,"drop",this),Ee(o,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vr&&de(document.body,"user-select",""),de(J,"transform",""),n&&(Kr&&(n.cancelable&&n.preventDefault(),!r.dropBubble&&n.stopPropagation()),ge&&ge.parentNode&&ge.parentNode.removeChild(ge),(Ge===et||st&&st.lastPutMode!=="clone")&&Xe&&Xe.parentNode&&Xe.parentNode.removeChild(Xe),J&&(this.nativeDraggable&&Ee(J,"dragend",this),Cs(J),J.style["will-change"]="",Kr&&!lr&&Ye(J,st?st.options.ghostClass:this.options.ghostClass,!1),Ye(J,this.options.chosenClass,!1),kt({sortable:this,name:"unchoose",toEl:et,newIndex:null,newDraggableIndex:null,originalEvent:n}),Ge!==et?(qt>=0&&(kt({rootEl:et,name:"add",toEl:et,fromEl:Ge,originalEvent:n}),kt({sortable:this,name:"remove",toEl:et,originalEvent:n}),kt({rootEl:et,name:"sort",toEl:et,fromEl:Ge,originalEvent:n}),kt({sortable:this,name:"sort",toEl:et,originalEvent:n})),st&&st.save()):qt!==rr&&qt>=0&&(kt({sortable:this,name:"update",toEl:et,originalEvent:n}),kt({sortable:this,name:"sort",toEl:et,originalEvent:n})),fe.active&&((qt==null||qt===-1)&&(qt=rr,ao=qr),kt({sortable:this,name:"end",toEl:et,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){$t("nulling",this),Ge=J=et=ge=Bo=Xe=ra=lo=No=hn=Kr=qt=ao=rr=qr=ar=Wr=st=la=fe.dragged=fe.ghost=fe.clone=fe.active=null,da.forEach(function(n){n.checked=!0}),da.length=gs=bs=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":J&&(this._onDragOver(n),CV(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],o,r=this.el.children,l=0,a=r.length,i=this.options;l<a;l++)o=r[l],on(o,i.draggable,this.el,!1)&&n.push(o.getAttribute(i.dataIdAttr)||BV(o));return n},sort:function(n,o){var r={},l=this.el;this.toArray().forEach(function(a,i){var s=l.children[i];on(s,this.options.draggable,l,!1)&&(r[a]=s)},this),o&&this.captureAnimationState(),n.forEach(function(a){r[a]&&(l.removeChild(r[a]),l.appendChild(r[a]))}),o&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,o){return on(n,o||this.options.draggable,this.el,!1)},option:function(n,o){var r=this.options;if(o===void 0)return r[n];var l=jr.modifyOption(this,n,o);typeof l<"u"?r[n]=l:r[n]=o,n==="group"&&kp(r)},destroy:function(){$t("destroy",this);var n=this.el;n[mt]=null,Ee(n,"mousedown",this._onTapStart),Ee(n,"touchstart",this._onTapStart),Ee(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ee(n,"dragover",this),Ee(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ia.splice(ia.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!lo){if($t("hideClone",this),fe.eventCanceled)return;de(Xe,"display","none"),this.options.removeCloneOnHide&&Xe.parentNode&&Xe.parentNode.removeChild(Xe),lo=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(lo){if($t("showClone",this),fe.eventCanceled)return;J.parentNode==Ge&&!this.options.group.revertClone?Ge.insertBefore(Xe,J):Bo?Ge.insertBefore(Xe,Bo):Ge.appendChild(Xe),this.options.group.revertClone&&this.animate(J,Xe),de(Xe,"display",""),lo=!1}}};function CV(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function pa(t,n,o,r,l,a,i,s){var c,d=t[mt],u=d.options.onMove,p;return window.CustomEvent&&!Hn&&!Fr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=t,c.dragged=o,c.draggedRect=r,c.related=l||n,c.relatedRect=a||qe(n),c.willInsertAfter=s,c.originalEvent=i,t.dispatchEvent(c),u&&(p=u.call(d,c,i)),p}function Cs(t){t.draggable=!1}function _V(){ws=!1}function kV(t,n,o){var r=qe(nr(o.el,0,o.options,!0)),l=gp(o.el,o.options,ge),a=10;return n?t.clientX<l.left-a||t.clientY<r.top&&t.clientX<r.right:t.clientY<l.top-a||t.clientY<r.bottom&&t.clientX<r.left}function VV(t,n,o){var r=qe(fs(o.el,o.options.draggable)),l=gp(o.el,o.options,ge),a=10;return n?t.clientX>l.right+a||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>l.bottom+a||t.clientX>r.right&&t.clientY>r.top}function EV(t,n,o,r,l,a,i,s){var c=r?t.clientY:t.clientX,d=r?o.height:o.width,u=r?o.top:o.left,p=r?o.bottom:o.right,h=!1;if(!i){if(s&&ca<d*l){if(!Gr&&(Wr===1?c>u+d*a/2:c<p-d*a/2)&&(Gr=!0),Gr)h=!0;else if(Wr===1?c<u+ca:c>p-ca)return-Wr}else if(c>u+d*(1-l)/2&&c<p-d*(1-l)/2)return SV(n)}return h=h||i,h&&(c<u+d*a/2||c>p-d*a/2)?c>u+d/2?1:-1:0}function SV(t){return Qe(J)<Qe(t)?1:-1}function BV(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,o=n.length,r=0;o--;)r+=n.charCodeAt(o);return r.toString(36)}function NV(t){da.length=0;for(var n=t.getElementsByTagName("input"),o=n.length;o--;){var r=n[o];r.checked&&da.push(r)}}function ma(t){return setTimeout(t,0)}function _s(t){return clearTimeout(t)}fa&&$e(document,"touchmove",function(t){(fe.active||lr)&&t.cancelable&&t.preventDefault()}),fe.utils={on:$e,off:Ee,css:de,find:dp,is:function(n,o){return!!on(n,o,n,!1)},extend:dV,throttle:pp,closest:on,toggleClass:Ye,clone:ps,index:Qe,nextTick:ma,cancelNextTick:_s,detectDirection:_p,getChild:nr},fe.get=function(t){return t[mt]},fe.mount=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0].constructor===Array&&(n=n[0]),n.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(fe.utils=Tn(Tn({},fe.utils),r.utils)),jr.mount(r)})},fe.create=function(t,n){return new fe(t,n)},fe.version=iV;var rt=[],Yr,ks,Vs=!1,Es,Ss,ha,Xr;function xV(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return t.prototype={dragStarted:function(o){var r=o.originalEvent;this.sortable.nativeDraggable?$e(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$e(document,"pointermove",this._handleFallbackAutoScroll):r.touches?$e(document,"touchmove",this._handleFallbackAutoScroll):$e(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var r=o.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Ee(document,"dragover",this._handleAutoScroll):(Ee(document,"pointermove",this._handleFallbackAutoScroll),Ee(document,"touchmove",this._handleFallbackAutoScroll),Ee(document,"mousemove",this._handleFallbackAutoScroll)),Sp(),ga(),fV()},nulling:function(){ha=ks=Yr=Vs=Xr=Es=Ss=null,rt.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,r){var l=this,a=(o.touches?o.touches[0]:o).clientX,i=(o.touches?o.touches[0]:o).clientY,s=document.elementFromPoint(a,i);if(ha=o,r||this.options.forceAutoScrollFallback||Fr||Hn||vr){Bs(o,this.options,s,r);var c=ro(s,!0);Vs&&(!Xr||a!==Es||i!==Ss)&&(Xr&&Sp(),Xr=setInterval(function(){var d=ro(document.elementFromPoint(a,i),!0);d!==c&&(c=d,ga()),Bs(o,l.options,d,r)},10),Es=a,Ss=i)}else{if(!this.options.bubbleScroll||ro(s,!0)===$n()){ga();return}Bs(o,this.options,ro(s,!1),!1)}}},nn(t,{pluginName:"scroll",initializeByDefault:!0})}function ga(){rt.forEach(function(t){clearInterval(t.pid)}),rt=[]}function Sp(){clearInterval(Xr)}var Bs=pp(function(t,n,o,r){if(n.scroll){var l=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,i=n.scrollSensitivity,s=n.scrollSpeed,c=$n(),d=!1,u;ks!==o&&(ks=o,ga(),Yr=n.scroll,u=n.scrollFn,Yr===!0&&(Yr=ro(o,!0)));var p=0,h=Yr;do{var m=h,g=qe(m),f=g.top,y=g.bottom,b=g.left,k=g.right,w=g.width,_=g.height,C=void 0,V=void 0,E=m.scrollWidth,N=m.scrollHeight,O=de(m),M=m.scrollLeft,$=m.scrollTop;m===c?(C=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),V=_<N&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(C=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"),V=_<N&&(O.overflowY==="auto"||O.overflowY==="scroll"));var S=C&&(Math.abs(k-l)<=i&&M+w<E)-(Math.abs(b-l)<=i&&!!M),x=V&&(Math.abs(y-a)<=i&&$+_<N)-(Math.abs(f-a)<=i&&!!$);if(!rt[p])for(var P=0;P<=p;P++)rt[P]||(rt[P]={});(rt[p].vx!=S||rt[p].vy!=x||rt[p].el!==m)&&(rt[p].el=m,rt[p].vx=S,rt[p].vy=x,clearInterval(rt[p].pid),(S!=0||x!=0)&&(d=!0,rt[p].pid=setInterval((function(){r&&this.layer===0&&fe.active._onTouchMove(ha);var B=rt[this.layer].vy?rt[this.layer].vy*s:0,T=rt[this.layer].vx?rt[this.layer].vx*s:0;typeof u=="function"&&u.call(fe.dragged.parentNode[mt],T,B,t,ha,rt[this.layer].el)!=="continue"||mp(rt[this.layer].el,T,B)}).bind({layer:p}),24))),p++}while(n.bubbleScroll&&h!==c&&(h=ro(h,!1)));Vs=d}},30),Bp=function(n){var o=n.originalEvent,r=n.putSortable,l=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(o){var d=r||a;s();var u=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,p=document.elementFromPoint(u.clientX,u.clientY);c(),d&&!d.el.contains(p)&&(i("spill"),this.onSpill({dragEl:l,putSortable:r}))}};function Ns(){}Ns.prototype={startIndex:null,dragStart:function(n){var o=n.oldDraggableIndex;this.startIndex=o},onSpill:function(n){var o=n.dragEl,r=n.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var l=nr(this.sortable.el,this.startIndex,this.options);l?this.sortable.el.insertBefore(o,l):this.sortable.el.appendChild(o),this.sortable.animateAll(),r&&r.animateAll()},drop:Bp},nn(Ns,{pluginName:"revertOnSpill"});function xs(){}xs.prototype={onSpill:function(n){var o=n.dragEl,r=n.putSortable,l=r||this.sortable;l.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),l.animateAll()},drop:Bp},nn(xs,{pluginName:"removeOnSpill"});var rn;function TV(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(o){var r=o.dragEl;rn=r},dragOverValid:function(o){var r=o.completed,l=o.target,a=o.onMove,i=o.activeSortable,s=o.changed,c=o.cancel;if(i.options.swap){var d=this.sortable.el,u=this.options;if(l&&l!==d){var p=rn;a(l)!==!1?(Ye(l,u.swapClass,!0),rn=l):rn=null,p&&p!==rn&&Ye(p,u.swapClass,!1)}s(),r(!0),c()}},drop:function(o){var r=o.activeSortable,l=o.putSortable,a=o.dragEl,i=l||this.sortable,s=this.options;rn&&Ye(rn,s.swapClass,!1),rn&&(s.swap||l&&l.options.swap)&&a!==rn&&(i.captureAnimationState(),i!==r&&r.captureAnimationState(),$V(a,rn),i.animateAll(),i!==r&&r.animateAll())},nulling:function(){rn=null}},nn(t,{pluginName:"swap",eventProperties:function(){return{swapItem:rn}}})}function $V(t,n){var o=t.parentNode,r=n.parentNode,l,a;!o||!r||o.isEqualNode(n)||r.isEqualNode(t)||(l=Qe(t),a=Qe(n),o.isEqualNode(r)&&l<a&&a++,o.insertBefore(n,o.children[l]),r.insertBefore(t,r.children[a]))}var be=[],Kt=[],Zr,gn,Jr=!1,Ot=!1,ir=!1,He,Qr,ba;function OV(){function t(n){for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?$e(document,"pointerup",this._deselectMultiDrag):($e(document,"mouseup",this._deselectMultiDrag),$e(document,"touchend",this._deselectMultiDrag))),$e(document,"keydown",this._checkKeyDown),$e(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(l,a){var i="";be.length&&gn===n?be.forEach(function(s,c){i+=(c?", ":"")+s.textContent}):i=a.textContent,l.setData("Text",i)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(o){var r=o.dragEl;He=r},delayEnded:function(){this.isMultiDrag=~be.indexOf(He)},setupClone:function(o){var r=o.sortable,l=o.cancel;if(this.isMultiDrag){for(var a=0;a<be.length;a++)Kt.push(ps(be[a])),Kt[a].sortableIndex=be[a].sortableIndex,Kt[a].draggable=!1,Kt[a].style["will-change"]="",Ye(Kt[a],this.options.selectedClass,!1),be[a]===He&&Ye(Kt[a],this.options.chosenClass,!1);r._hideClone(),l()}},clone:function(o){var r=o.sortable,l=o.rootEl,a=o.dispatchSortableEvent,i=o.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||be.length&&gn===r&&(Np(!0,l),a("clone"),i()))},showClone:function(o){var r=o.cloneNowShown,l=o.rootEl,a=o.cancel;this.isMultiDrag&&(Np(!1,l),Kt.forEach(function(i){de(i,"display","")}),r(),ba=!1,a())},hideClone:function(o){var r=this;o.sortable;var l=o.cloneNowHidden,a=o.cancel;this.isMultiDrag&&(Kt.forEach(function(i){de(i,"display","none"),r.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),l(),ba=!0,a())},dragStartGlobal:function(o){o.sortable,!this.isMultiDrag&&gn&&gn.multiDrag._deselectMultiDrag(),be.forEach(function(r){r.sortableIndex=Qe(r)}),be=be.sort(function(r,l){return r.sortableIndex-l.sortableIndex}),ir=!0},dragStarted:function(o){var r=this,l=o.sortable;if(this.isMultiDrag){if(this.options.sort&&(l.captureAnimationState(),this.options.animation)){be.forEach(function(i){i!==He&&de(i,"position","absolute")});var a=qe(He,!1,!0,!0);be.forEach(function(i){i!==He&&hp(i,a)}),Ot=!0,Jr=!0}l.animateAll(function(){Ot=!1,Jr=!1,r.options.animation&&be.forEach(function(i){ms(i)}),r.options.sort&&ya()})}},dragOver:function(o){var r=o.target,l=o.completed,a=o.cancel;Ot&&~be.indexOf(r)&&(l(!1),a())},revert:function(o){var r=o.fromSortable,l=o.rootEl,a=o.sortable,i=o.dragRect;be.length>1&&(be.forEach(function(s){a.addAnimationState({target:s,rect:Ot?qe(s):i}),ms(s),s.fromRect=i,r.removeAnimationState(s)}),Ot=!1,MV(!this.options.removeCloneOnHide,l))},dragOverCompleted:function(o){var r=o.sortable,l=o.isOwner,a=o.insertion,i=o.activeSortable,s=o.parentEl,c=o.putSortable,d=this.options;if(a){if(l&&i._hideClone(),Jr=!1,d.animation&&be.length>1&&(Ot||!l&&!i.options.sort&&!c)){var u=qe(He,!1,!0,!0);be.forEach(function(h){h!==He&&(hp(h,u),s.appendChild(h))}),Ot=!0}if(!l)if(Ot||ya(),be.length>1){var p=ba;i._showClone(r),i.options.animation&&!ba&&p&&Kt.forEach(function(h){i.addAnimationState({target:h,rect:Qr}),h.fromRect=Qr,h.thisAnimationDuration=null})}else i._showClone(r)}},dragOverAnimationCapture:function(o){var r=o.dragRect,l=o.isOwner,a=o.activeSortable;if(be.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!l&&a.multiDrag.isMultiDrag){Qr=nn({},r);var i=So(He,!0);Qr.top-=i.f,Qr.left-=i.e}},dragOverAnimationComplete:function(){Ot&&(Ot=!1,ya())},drop:function(o){var r=o.originalEvent,l=o.rootEl,a=o.parentEl,i=o.sortable,s=o.dispatchSortableEvent,c=o.oldIndex,d=o.putSortable,u=d||this.sortable;if(r){var p=this.options,h=a.children;if(!ir)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ye(He,p.selectedClass,!~be.indexOf(He)),~be.indexOf(He))be.splice(be.indexOf(He),1),Zr=null,Ur({sortable:i,rootEl:l,name:"deselect",targetEl:He,originalEvent:r});else{if(be.push(He),Ur({sortable:i,rootEl:l,name:"select",targetEl:He,originalEvent:r}),r.shiftKey&&Zr&&i.el.contains(Zr)){var m=Qe(Zr),g=Qe(He);if(~m&&~g&&m!==g){var f,y;for(g>m?(y=m,f=g):(y=g,f=m+1);y<f;y++)~be.indexOf(h[y])||(Ye(h[y],p.selectedClass,!0),be.push(h[y]),Ur({sortable:i,rootEl:l,name:"select",targetEl:h[y],originalEvent:r}))}}else Zr=He;gn=u}if(ir&&this.isMultiDrag){if(Ot=!1,(a[mt].options.sort||a!==l)&&be.length>1){var b=qe(He),k=Qe(He,":not(."+this.options.selectedClass+")");if(!Jr&&p.animation&&(He.thisAnimationDuration=null),u.captureAnimationState(),!Jr&&(p.animation&&(He.fromRect=b,be.forEach(function(_){if(_.thisAnimationDuration=null,_!==He){var C=Ot?qe(_):b;_.fromRect=C,u.addAnimationState({target:_,rect:C})}})),ya(),be.forEach(function(_){h[k]?a.insertBefore(_,h[k]):a.appendChild(_),k++}),c===Qe(He))){var w=!1;be.forEach(function(_){if(_.sortableIndex!==Qe(_)){w=!0;return}}),w&&(s("update"),s("sort"))}be.forEach(function(_){ms(_)}),u.animateAll()}gn=u}(l===a||d&&d.lastPutMode!=="clone")&&Kt.forEach(function(_){_.parentNode&&_.parentNode.removeChild(_)})}},nullingGlobal:function(){this.isMultiDrag=ir=!1,Kt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Ee(document,"pointerup",this._deselectMultiDrag),Ee(document,"mouseup",this._deselectMultiDrag),Ee(document,"touchend",this._deselectMultiDrag),Ee(document,"keydown",this._checkKeyDown),Ee(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(o){if(!(typeof ir<"u"&&ir)&&gn===this.sortable&&!(o&&on(o.target,this.options.draggable,this.sortable.el,!1))&&!(o&&o.button!==0))for(;be.length;){var r=be[0];Ye(r,this.options.selectedClass,!1),be.shift(),Ur({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvent:o})}},_checkKeyDown:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},nn(t,{pluginName:"multiDrag",utils:{select:function(o){var r=o.parentNode[mt];!r||!r.options.multiDrag||~be.indexOf(o)||(gn&&gn!==r&&(gn.multiDrag._deselectMultiDrag(),gn=r),Ye(o,r.options.selectedClass,!0),be.push(o))},deselect:function(o){var r=o.parentNode[mt],l=be.indexOf(o);!r||!r.options.multiDrag||!~l||(Ye(o,r.options.selectedClass,!1),be.splice(l,1))}},eventProperties:function(){var o=this,r=[],l=[];return be.forEach(function(a){r.push({multiDragElement:a,index:a.sortableIndex});var i;Ot&&a!==He?i=-1:Ot?i=Qe(a,":not(."+o.options.selectedClass+")"):i=Qe(a),l.push({multiDragElement:a,index:i})}),{items:nV(be),clones:[].concat(Kt),oldIndicies:r,newIndicies:l}},optionListeners:{multiDragKey:function(o){return o=o.toLowerCase(),o==="ctrl"?o="Control":o.length>1&&(o=o.charAt(0).toUpperCase()+o.substr(1)),o}}})}function MV(t,n){be.forEach(function(o,r){var l=n.children[o.sortableIndex+(t?Number(r):0)];l?n.insertBefore(o,l):n.appendChild(o)})}function Np(t,n){Kt.forEach(function(o,r){var l=n.children[o.sortableIndex+(t?Number(r):0)];l?n.insertBefore(o,l):n.appendChild(o)})}function ya(){be.forEach(function(t){t!==He&&t.parentNode&&t.parentNode.removeChild(t)})}fe.mount(new xV),fe.mount(xs,Ns);function To(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function el(t,n,o){const r=o===0?t.children[0]:t.children[o-1].nextSibling;t.insertBefore(n,r)}function IV(){return typeof window<"u"?window.console:global.console}const zV=IV();function DV(t){const n=Object.create(null);return function(r){return n[r]||(n[r]=t(r))}}const LV=/-(\w)/g,PV=DV(t=>t.replace(LV,(n,o)=>o.toUpperCase())),xp=["Start","Add","Remove","Update","End"],Tp=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],$p=["Move"],AV=[$p,xp,Tp].flatMap(t=>t).map(t=>`on${t}`),Ts={manage:$p,manageAndEmit:xp,emit:Tp};function RV(t){return AV.indexOf(t)!==-1}const FV=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function vV(t){return FV.includes(t)}function HV(t){return["transition-group","TransitionGroup"].includes(t)}function Op(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function Mp(t){return t.reduce((n,[o,r])=>(n[o]=r,n),{})}function jV({$attrs:t,componentData:n={}}){return{...Mp(Object.entries(t).filter(([r,l])=>Op(r))),...n}}function UV({$attrs:t,callBackBuilder:n}){const o=Mp(Ip(t));Object.entries(n).forEach(([l,a])=>{Ts[l].forEach(i=>{o[`on${i}`]=a(i)})});const r=`>[data-draggable]${o.draggable||""}`;return{...o,draggable:r}}function Ip(t){return Object.entries(t).filter(([n,o])=>!Op(n)).map(([n,o])=>[PV(n),o]).filter(([n,o])=>!RV(n))}const zp=({el:t})=>t,qV=(t,n)=>t.__draggable_context=n,Dp=t=>t.__draggable_context;class KV{constructor({nodes:{header:n,default:o,footer:r},root:l,realList:a}){this.defaultNodes=o,this.children=[...n,...o,...r],this.externalComponent=l.externalComponent,this.rootTransition=l.transition,this.tag=l.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,o){const{tag:r,children:l,_isRootComponent:a}=this;return n(r,o,a?{default:()=>l}:l)}updated(){const{defaultNodes:n,realList:o}=this;n.forEach((r,l)=>{qV(zp(r),{element:o[l],index:l})})}getUnderlyingVm(n){return Dp(n)}getVmIndexFromDomIndex(n,o){const{defaultNodes:r}=this,{length:l}=r,a=o.children,i=a.item(n);if(i===null)return l;const s=Dp(i);if(s)return s.index;if(l===0)return 0;const c=zp(r[0]),d=[...a].findIndex(u=>u===c);return n<d?0:l}}function WV(t,n){const o=t[n];return o?o():[]}function GV({$slots:t,realList:n,getKey:o,itemDataSet:r}){let l;switch(typeof r){case"function":l=r;break;case"object":l=()=>r;break}const a=n||[],[i,s]=["header","footer"].map(u=>WV(t,u)),{item:c}=t;if(!c)throw new Error("draggable element must have an item slot");const d=a.flatMap((u,p)=>c({element:u,index:p}).map(h=>{h.key=o(u);const m=l==null?void 0:l(u);return m?h.props={...h.props||{},"data-draggable":!0,...m}:h.props={...h.props||{},"data-draggable":!0},h}));if(d.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:d}}function YV(t){const n=HV(t),o=!vV(t)&&!n;return{transition:n,externalComponent:o,tag:o?e.resolveComponent(t):n?e.TransitionGroup:t}}function XV({$slots:t,tag:n,realList:o,getKey:r,itemDataSet:l}){const a=GV({$slots:t,realList:o,getKey:r,itemDataSet:l}),i=YV(n);return new KV({nodes:a,root:i,realList:o})}function Lp(t,n){e.nextTick(()=>this.$emit(t.toLowerCase(),n))}function Pp(t){return(n,o)=>{if(this.realList!==null)return this[`onDrag${t}`](n,o)}}function ZV(t){const n=Pp.call(this,t);return(o,r)=>{n.call(this,o,r),Lp.call(this,t,o)}}function $s(t,n){const o=new fe(t,n);return n.swap&&!o.swap?(fe.mount(new TV),o.destroy(),$s(t,n)):n.multiDrag&&!o.multiDrag?(fe.mount(new OV),o.destroy(),$s(t,n)):o}function JV(t,n){return Array.from(t).reverse().map(({index:o})=>o-n)}let Os=null;const QV={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},eE=["update:modelValue","change",...[...Ts.manageAndEmit,...Ts.emit].map(t=>t.toLowerCase())],tl=e.defineComponent({name:"draggable",inheritAttrs:!1,props:QV,emits:eE,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:t,$attrs:n,tag:o,componentData:r,realList:l,getKey:a}=this,i=XV({$slots:t,tag:o,realList:l,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=jV({$attrs:n,componentData:r});return i.render(e.h,s)}catch(t){return this.error=!0,e.h("pre",{style:{color:"red"}},t.stack)}},created(){this.list!==null&&this.modelValue!==null&&zV.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:t,$el:n,componentStructure:o}=this;o.updated();const r=UV({$attrs:t,callBackBuilder:{manageAndEmit:a=>ZV.call(this,a),emit:a=>Lp.bind(this,a),manage:a=>Pp.call(this,a)}}),l=n.nodeType===1?n:n.parentElement;this._sortable=$s(l,r),this.targetDomElement=l,l.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:t}=this;return t||this.modelValue},getKey(){const{itemKey:t}=this;return typeof t=="function"?t:n=>n[t]}},watch:{$attrs:{handler(t){const{_sortable:n}=this;n&&Ip(t).forEach(([o,r])=>{n.option(o,r)})},deep:!0}},methods:{getUnderlyingVm(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent(t){return t.__draggable_component__},emitChanges(t){e.nextTick(()=>this.$emit("change",t))},alterList(t){if(this.list){t(this.list);return}const n=[...this.modelValue];t(n),this.$emit("update:modelValue",n)},spliceList(){const t=n=>n.splice(...arguments);this.alterList(t)},removeAllFromList(t){const n=o=>t.forEach(r=>o.splice(r,1));this.alterList(n)},swapPosition(t,n){const o=r=>{const l=r[t];r[t]=r[n],r[n]=l};this.alterList(o)},updatePosition(t,n){const o=r=>r.splice(n,0,r.splice(t,1)[0]);this.alterList(o)},updatePositions(t,n){const o=r=>{const l=t.sort().reverse().flatMap(a=>r.splice(a,1)).reverse();return r.splice(n,0,...l)};this.alterList(o)},getRelatedContextFromMoveEvent({to:t,related:n}){const o=this.getUnderlyingPotencialDraggableComponent(t);if(!o)return{component:o};const r=o.realList,l={list:r,component:o};return t!==n&&r?{...o.getUnderlyingVm(n)||{},...l}:l},getVmIndexFromDomIndex(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart(t){if(Array.isArray(t.items)&&t.items.length){this.multidragContexts=t.items.map(o=>this.getUnderlyingVm(o));const n=this.multidragContexts.sort(({index:o},{index:r})=>o-r).map(o=>o.element);t.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),Os=t.item},onDragAdd(t){Array.isArray(t.items)&&t.items.length?this.onDragAddMulti(t):this.onDragAddSingle(t)},onDragAddMulti(t){const n=t.item._underlying_vm_multidrag_;if(n===void 0)return;t.items.forEach(l=>To(l));const o=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(o,0,...n);const r=n.map((l,a)=>({element:l,newIndex:o+a}));this.emitChanges({added:r})},onDragAddSingle(t){const n=this._sortable.options&&this._sortable.options.swap,o=t.item._underlying_vm_;if(o===void 0)return;const r=n?t.from.children[t.oldIndex]:null;To(t.item);let l=this.getVmIndexFromDomIndex(t.newIndex);n&&(l=l===0?0:l-1),this.spliceList(l,n?1:0,o);const a={element:o,newIndex:l,from:t.from,to:t.to};if(t.swap||(this.emitChanges({added:a}),!n))return;const i={to:t.from,from:t.to,item:r,oldIndex:t.newIndex,newIndex:t.oldIndex,swap:!0};e.nextTick(()=>{const s=i.to.__draggable_component__;s.onDragStart(i),s.onDragAdd(i)})},onDragRemove(t){Array.isArray(t.items)&&t.items.length?this.onDragRemoveMulti(t):this.onDragRemoveSingle(t)},onDragRemoveMulti(t){const n=(this.$slots.header?this.$slots.header():[]).length||0,o=t.oldIndicies.sort(({index:a},{index:i})=>a-i);if(o.forEach(({multiDragElement:a,index:i})=>{el(this.$el,a,i),a.parentNode&&fe.utils.deselect(a)}),t.pullMode==="clone"){t.clones.forEach(a=>To(a));return}const r=JV(o,n);this.removeAllFromList(r);const l=r.sort().map(a=>({element:this.multidragContexts.find(s=>s.index===a).element,oldIndex:a}));this.emitChanges({removed:l})},onDragRemoveSingle(t){const{index:n,element:o}=this.context,r={element:o,oldIndex:n,from:t.from,to:t.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:r});if(el(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){To(t.clone);return}this.spliceList(n,1),this.emitChanges({removed:r})},onDragUpdate(t){Array.isArray(t.items)&&t.items.length?t.pullMode||this.onDragUpdateMulti(t):this.onDragUpdateSingle(t)},onDragUpdateMulti(t){const{items:n,from:o}=t,r=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(c=>To(c));const l=Array.from(t.oldIndicies).sort(({index:c},{index:d})=>c-d);l.forEach(c=>el(o,c.multiDragElement,c.index));const a=l.map(({index:c})=>c-r),i=this.getVmIndexFromDomIndex(t.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((c,d)=>({element:this.multidragContexts.find(p=>p.index===c).element,oldIndex:c,newIndex:i+d}));this.emitChanges({moved:s})},onDragUpdateSingle(t){const n=this._sortable.options&&this._sortable.options.swap,o=n?t.from.children[t.oldIndex]:null;To(t.item),el(t.from,t.item,t.oldIndex),n&&(To(o),el(t.from,o,t.newIndex));const r=this.context.index,l=this.getVmIndexFromDomIndex(t.newIndex);n?this.swapPosition(r,l):this.updatePosition(r,l);const a={element:this.context.element,oldIndex:r,newIndex:l};this.emitChanges({moved:a})},computeFutureIndex(t,n){if(!t.element)return 0;const o=[...n.to.children].filter(i=>i.style.display!=="none"),r=o.indexOf(n.related),l=t.component.getVmIndexFromDomIndex(r);return o.indexOf(Os)!==-1||!n.willInsertAfter?l:l+1},onDragMove(t,n){const{move:o,realList:r}=this;if(!o||!r)return!0;const l=this.getRelatedContextFromMoveEvent(t),a=this.computeFutureIndex(l,t),i={...this.context,futureIndex:a},s={...t,relatedContext:l,draggedContext:i};return o(s,n)},onDragEnd(){Os=null},select(t){fe.utils.select(t)},deselect(t){fe.utils.deselect(t)}}}),kx="",Vx="",Ex="",{getTempID:tE}=pt();let On=class{constructor(n,o,r=!1,l=!1){Lt(this,"isEdit");Lt(this,"isInput");Lt(this,"type");Lt(this,"name");Lt(this,"id");Lt(this,"itemID");Lt(this,"itemSourceType");Lt(this,"rules");Lt(this,"props");Lt(this,"excludeFilterConditions");Lt(this,"filterConditionProps");Lt(this,"isLayout",!1);Lt(this,"children");this.type=n,this.name=o,this.isEdit=r,this.isInput=l,this.id=tE(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Sx="",Bx="",nE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;return(r,l)=>{const a=gu,i=Tt,s=tn,c=xn,d=Nn,u=Bn,p=xt;return e.openBlock(),e.createBlock(p,{"label-width":"80px","label-suffix":":",class:"group-layout-props-editor"},{default:e.withCtx(()=>[e.createVNode(i,{label:"背景色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(o).backgroundColor,"onUpdate:modelValue":l[0]||(l[0]=h=>e.unref(o).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(o).showBorder,"onUpdate:modelValue":l[1]||(l[1]=h=>e.unref(o).showBorder=h)},null,8,["modelValue"])]),_:1}),e.unref(o).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(d,{class:"file-size-unit-select",modelValue:e.unref(o).borderStyle,"onUpdate:modelValue":l[2]||(l[2]=h=>e.unref(o).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(c,{label:"实线边框",value:"solid"}),e.createVNode(c,{label:"虚线边框",value:"dashed"}),e.createVNode(c,{label:"点线边框",value:"dotted"}),e.createVNode(c,{label:"双线边框",value:"double"}),e.createVNode(c,{label:"凹槽边框",value:"groove"}),e.createVNode(c,{label:"脊状边框",value:"ridge"}),e.createVNode(c,{label:"内凹边框",value:"inset"}),e.createVNode(c,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(o).borderColor,"onUpdate:modelValue":l[3]||(l[3]=h=>e.unref(o).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).borderWidth,"onUpdate:modelValue":l[4]||(l[4]=h=>e.unref(o).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).borderRadius,"onUpdate:modelValue":l[5]||(l[5]=h=>e.unref(o).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),Nx="",oE=["onClick"],rE={key:2,class:"operates"},Ap=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(t,{emit:n}){const o={...ll,...il,...al},{getTempID:r,clone:l}=pt();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=t,{components:c}=e.toRefs(s),d=n;e.watch(c,()=>d("update:components",c),{immediate:!0,deep:!0});const u=f=>{f.added?p(f.added.element):f.moved&&p(f.moved.element)},p=f=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=f)},h=f=>{const y=m(f);c.value.push(y),p(y)},m=f=>{var b,k;let y=l(f);if(y.id=r(),delete y.itemID,(b=y.props.options)!=null&&b.length){y.props.options.forEach(_=>{_.value.includes("temp-")&&(_.value=r())});let w=new o[f.type].component;y.filterConditionProps=w.getFilterConditionProps(y.props)}if(y.isLayout&&((k=y.children)!=null&&k.length)){let w=[];y.children.forEach(_=>{w.push(m(_))}),y.children=w}return y},g=f=>{let y=l(c.value[f]);c.value.splice(f,1),i.selectComponent=void 0,d("deleteComponent",y)};return(f,y)=>{const b=Tt,k=Je;return e.openBlock(),e.createBlock(e.unref(tl),{list:e.unref(c),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:u},{item:e.withCtx(({element:w,index:_})=>[e.createElementVNode("div",{onClick:e.withModifiers(C=>p(w),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==w},{"is-hidden":!w.props.showFlag}]),style:e.normalizeStyle({width:`${w.props.width*100/e.unref(a).props.column}%`,"padding-left":`${w.props.paddingLeft}px`})},[w.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[w.type].renderer),{key:0,isDesigner:"",componentID:w.id,component:e.unref(c)[_],"onUpdate:component":C=>e.unref(c)[_]=C,onDeleteComponent:y[0]||(y[0]=C=>d("deleteComponent",C))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(b,{key:1,prop:w.id,class:e.normalizeClass(["form-item",{"label-new-line":w.props.labelNewLine}]),"label-width":w.props.showLabel?w.props.labelWidth:"0",rules:w.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:w.props.color||"#000000","font-size":w.props.fontSize+"px","font-weight":w.props.isBold?"bold":"normal"})},e.toDisplayString(w.props.showLabel?w.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[w.type].renderer),{isDesigner:"",componentID:w.id,componentProps:w.props,"onUpdate:componentProps":C=>w.props=C,datas:e.unref(a).datas,"onUpdate:datas":y[1]||(y[1]=C=>e.unref(a).datas=C)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==w?(e.openBlock(),e.createElementBlock("div",rE,[w.allowRepeat?(e.openBlock(),e.createBlock(k,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(C=>h(w),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(k,{name:"delete",color:"#ff0000",onClick:e.withModifiers(C=>g(_),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,oE)]),_:1},8,["list"])}}}),xx="",lE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent"],setup(t,{emit:n}){const o=t,{component:r,showDescription:l}=e.toRefs(o);!r.value.children&&(r.value.children=[]);const a=e.computed(()=>{let c={"background-color":r.value.props.backgroundColor||""};return r.value.props.showBorder&&(c.border=`${r.value.props.borderWidth}px ${r.value.props.borderStyle} ${r.value.props.borderColor}`),r.value.props.borderRadius&&(c["border-radius"]=`${r.value.props.borderRadius}px`),c}),i=n,s=c=>{i("deleteComponent",c)};return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":t.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(r).props.color,"font-size":e.unref(r).props.fontSize+"px","font-weight":e.unref(r).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(r).props.label),5)):e.createCommentVNode("",!0),t.isDesigner?(e.openBlock(),e.createBlock(Ap,{key:1,components:e.unref(r).children,"onUpdate:components":d[0]||(d[0]=u=>e.unref(r).children=u),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(Hp,{key:2,components:e.unref(r).children,showDescription:e.unref(l)},null,8,["components","showDescription"]))],6))}}),Tx="",aE={component:class extends On{constructor(){super("groupLayout","分组面板"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"分组面板",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,backgroundColor:"#ffffff",showBorder:!1,borderStyle:"solid",borderColor:"#cccccc",borderWidth:1,borderRadius:0},this.isLayout=!0,this.children=[]}},renderer:lE,propEditor:nE},iE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;const r=e.ref(o.fileSize);return e.watch(r,()=>o.fileSize=Number(r.value)),(l,a)=>{const i=tn,s=Tt,c=Bn,d=xn,u=Nn,p=ut,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o).multiple=m)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(o).fileLimit=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(p,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(r),"onUpdate:modelValue":a[3]||(a[3]=m=>e.isRef(r)?r.value=m:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(u,{class:"file-size-unit-select",modelValue:e.unref(o).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(o).fileSizeUnit=m)},{default:e.withCtx(()=>[e.createVNode(d,{value:"KB"}),e.createVNode(d,{value:"MB"}),e.createVNode(d,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).fileType,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).fileType=m),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ox="",Mx="",Ix="",sE={class:"upload-component"},cE=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),dE={key:0,class:"description"},fE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(t){const{checkFile:n}=pt(),o=t;let r=e.inject("uploadOptions"),l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref();a.value[o.componentID]||(a.value[o.componentID]=[]);const c=h=>{if(h.status==="ready"&&!n(h.raw,a.value[o.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){d(h);return}if(h.status==="success"&&h.response.code===0){_t("error",h.response.message||"文件上传失败!"),d(h);return}r.autoUpload?a.value[o.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[o.componentID].push({name:h.name,url:h.url,file:h.raw})},d=(h,m=!0)=>{m&&s.value.handleRemove(h);const g=a.value[o.componentID].findIndex(f=>f.url===h.url);g!==-1&&a.value[o.componentID].splice(g,1)},u=h=>{d(h,!1)},p=()=>{var m;let h=`最多只能上传${i.value.fileLimit}个文件`;(m=a.value[o.componentID])!=null&&m.length&&(h+=`,您已上传了${a.value[o.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[o.componentID].length}个文件`),_t("error",h)};return(h,m)=>{const g=Je,f=mn,y=op;return e.openBlock(),e.createElementBlock("div",sE,[e.createVNode(y,{ref_key:"uploadRef",ref:s,action:e.unref(r).serverApi,headers:e.unref(r).headers,data:e.unref(r).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[t.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(r).autoUpload,"on-exceed":p,"on-change":c,"on-remove":u},{default:e.withCtx(()=>{var b;return[e.unref(i).fileLimit>(((b=e.unref(a)[t.componentID])==null?void 0:b.length)||0)?(e.openBlock(),e.createBlock(f,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[cE]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",dE,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),zx="",uE={component:class extends On{constructor(){super("upload","文件上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"文件上传",fontSize:12,isBold:!1,color:"#000000",showFlag:!0,multiple:!1,fileLimit:1,fileSize:30,fileSizeUnit:"MB",fileType:".jpg,.txt,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf"}}},renderer:fE,propEditor:iE},pE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;const r=e.ref(o.fileSize);return e.watch(r,()=>o.fileSize=Number(r.value)),(l,a)=>{const i=tn,s=Tt,c=Bn,d=xn,u=Nn,p=ut,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o).multiple=m)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(o).fileLimit=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(p,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(r),"onUpdate:modelValue":a[3]||(a[3]=m=>e.isRef(r)?r.value=m:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(u,{class:"file-size-unit-select",modelValue:e.unref(o).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(o).fileSizeUnit=m),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(d,{value:"KB"}),e.createVNode(d,{value:"MB"}),e.createVNode(d,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).fileType,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).fileType=m),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Lx="",Px="",Ax="",mE={class:"upload-image-component"},hE={class:"el-upload-list__item-actions"},gE={class:"el-upload-list__item-preview"},bE={class:"el-upload-list__item-delete"},yE={key:0,class:"description"},wE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(t){const{checkFile:n}=pt(),o=t;let r=e.inject("uploadOptions"),l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref(),c=e.ref();a.value[o.componentID]||(a.value[o.componentID]=[]);const d=m=>{if(m.status==="ready"&&!n(m.raw,a.value[o.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){u(m);return}if(m.status==="success"&&m.response.code===0){_t("error",m.response.message||"图片上传失败!"),u(m);return}r.autoUpload?a.value[o.componentID].push({name:m.name,url:m.response.data.url,id:m.response.data.id}):a.value[o.componentID].push({name:m.name,url:m.url,file:m.raw})},u=m=>{s.value.handleRemove(m);const g=a.value[o.componentID].findIndex(f=>f.url===m.url);g!==-1&&a.value[o.componentID].splice(g,1)},p=()=>{c.value.$el.children[0].click()},h=()=>{var g;let m=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[o.componentID])!=null&&g.length&&(m+=`,您已上传了${a.value[o.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[o.componentID].length}个图片`),_t("error",m)};return(m,g)=>{var k;const f=Je,y=ry,b=op;return e.openBlock(),e.createElementBlock("div",mE,[e.createVNode(b,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((k=e.unref(a)[t.componentID])==null?void 0:k.length)||0)}),"list-type":"picture-card",action:e.unref(r).serverApi,headers:e.unref(r).headers,data:e.unref(r).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[t.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(r).autoUpload,"on-change":d,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(f,{name:"add",size:"30"})]),file:e.withCtx(({file:w})=>[e.createVNode(y,{ref_key:"imageRef",ref:c,style:{width:"100px",height:"100px"},src:w.url,"preview-src-list":[w.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",hE,[e.createElementVNode("span",gE,[e.createVNode(f,{name:"previewImage",color:"#00ff00",onClick:p})]),e.createElementVNode("span",bE,[e.createVNode(f,{name:"delete",color:"#ff0000",onClick:_=>u(w)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",yE,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Rx="",CE={component:class extends On{constructor(){super("uploadImage","图片上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"图片上传",fontSize:12,isBold:!1,showFlag:!0,multiple:!1,fileLimit:1,fileSize:10,fileSizeUnit:"MB",fileType:".jpg,.jpeg,.png,.bmp"}}},renderer:wE,propEditor:pE},vx="",Hx="",jx="";function wa(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _E=t=>typeof t<"u",Rp=()=>{};function kE(t,n){function o(...r){return new Promise((l,a)=>{Promise.resolve(t(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})).then(l).catch(a)})}return o}function VE(t,n={}){let o,r,l=Rp;const a=s=>{clearTimeout(s),l(),l=Rp};return s=>{const c=wa(t),d=wa(n.maxWait);return o&&a(o),c<=0||d!==void 0&&d<=0?(r&&(a(r),r=null),Promise.resolve(s())):new Promise((u,p)=>{l=n.rejectOnCancel?p:u,d&&!r&&(r=setTimeout(()=>{o&&a(o),r=null,u(s())},d)),o=setTimeout(()=>{r&&a(r),r=null,u(s())},c)})}}function EE(t,n=200,o={}){return kE(VE(n,o),t)}function SE(t,n){return e.computed(()=>wa(t).map(o=>wa(o)).filter(n))}function BE(t){return JSON.parse(JSON.stringify(t))}function NE(t,n,o,r={}){var l,a,i;const{clone:s=!1,passive:c=!1,eventName:d,deep:u=!1,defaultValue:p,shouldEmit:h}=r,m=e.getCurrentInstance(),g=o||(m==null?void 0:m.emit)||((l=m==null?void 0:m.$emit)==null?void 0:l.bind(m))||((i=(a=m==null?void 0:m.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(m==null?void 0:m.proxy));let f=d;n||(n="modelValue"),f=f||`update:${n.toString()}`;const y=w=>s?typeof s=="function"?s(w):BE(w):w,b=()=>_E(t[n])?y(t[n]):p,k=w=>{h?h(w)&&g(f,w):g(f,w)};if(c){const w=b(),_=e.ref(w);let C=!1;return e.watch(()=>t[n],V=>{C||(C=!0,_.value=y(V),e.nextTick(()=>C=!1))}),e.watch(_,V=>{!C&&(V!==t[n]||u)&&k(V)},{deep:u}),_}else return e.computed({get(){return b()},set(w){k(w)}})}const xE={class:"option-wrap"},TE={style:{float:"left"}},$E={style:{float:"right",color:"#8492a6"}},OE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;const r=e.ref([]);e.watch(()=>o.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:o.options}});const l=()=>{o.type==="radio"?(o.defaultValue="",o.min=void 0,o.max=void 0,o.multiple=void 0):o.type==="checkbox"?(o.defaultValue=[],o.multiple=void 0):o.type==="selector"&&(o.defaultValue="",o.min=void 0,o.max=void 0)},a=()=>{o.options.push({label:"",value:""})},i=h=>{o.options.splice(h,1)},s=e.ref(!1);let c=e.ref(o.options);const d=EE(async h=>await n.selectComponent.searchEmployeeMethod(h),500),u=h=>{if(!h)return[];s.value=!0,d(h).then(m=>{c.value=m,s.value=!1})},p=(h,m)=>{const g=c.value.find(f=>f.value===h);o.options[m]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},c.value=o.options};return(h,m)=>{const g=Wl,f=oo,y=Tt,b=tn,k=Bn,w=Yi,_=Je,C=xn,V=Nn,E=mn,N=xt;return e.openBlock(),e.createBlock(N,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(y,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(o).type,"onUpdate:modelValue":m[0]||(m[0]=O=>e.unref(o).type=O),onChange:l},{default:e.withCtx(()=>[e.createVNode(g,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(g,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(g,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(o).type!=="selector"?(e.openBlock(),e.createBlock(y,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":m[1]||(m[1]=O=>e.unref(o).newLine=O)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(y,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":m[2]||(m[2]=O=>e.unref(o).multiple=O)},null,8,["modelValue"])]),_:1})),e.unref(o).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(y,{label:"最少选择"},{default:e.withCtx(()=>{var O;return[e.createVNode(k,{modelValue:e.unref(o).min,"onUpdate:modelValue":m[3]||(m[3]=M=>e.unref(o).min=M),step:1,min:0,max:((O=e.unref(r))==null?void 0:O.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(y,{label:"最多选择"},{default:e.withCtx(()=>{var O;return[e.createVNode(k,{modelValue:e.unref(o).max,"onUpdate:modelValue":m[4]||(m[4]=M=>e.unref(o).max=M),step:1,min:0,max:((O=e.unref(r))==null?void 0:O.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(w,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(y,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"checkbox-options",handle:".cursor-move",list:e.unref(o).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:O,index:M})=>[e.createElementVNode("div",xE,[e.unref(o).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(V,{size:"small",class:"selector-component",modelValue:O.value,"onUpdate:modelValue":$=>O.value=$,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":u,loading:e.unref(s),"loading-text":"加载中……",onChange:$=>p($,M)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),($,S)=>(e.openBlock(),e.createBlock(C,{key:S,label:$.label,value:$.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:S,label:$.label,suffix:$.suffix},()=>[e.createElementVNode("span",TE,e.toDisplayString($.label),1),e.createElementVNode("span",$E,e.toDisplayString($.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:$=>i(M)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(y,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(E,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Ux="",qx="",ME={class:"employee-component"},IE={key:3,class:"description"},zE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>u?l.value[o.componentID]=u:delete l.value[o.componentID]);const s=n;e.watch(l,u=>s("update:datas",u));const c=e.ref(!0);e.watch(a,u=>{c.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,o.isDesigner&&(i.value=a.value.defaultValue),c.value=!0}),s("update:componentProps",u)},{immediate:!0});const d=(u,p)=>{a.value.clearable&&l.value[o.componentID]===p&&(i.value=void 0,u.preventDefault())};return(u,p)=>{const h=zr,m=oo,g=no,f=ji,y=xn,b=Nn,k=Je;return e.openBlock(),e.createElementBlock("div",ME,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(h,{key:_,value:w.value,onClick:C=>d(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[1]||(p[1]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(g,{value:w.value,key:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":p[2]||(p[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(y,{key:_,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",IE,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Kx="",DE={component:class extends On{constructor(){super("employee","人员",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"人员",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[],showRemark:!0,remarkLabel:"实习生"},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:zE,propEditor:OE};function Ms(){return{getGradeItems(t){let n=[];if(!t.maxScore)return n;t.showVeto&&n.push({value:"-2",label:"单项否决"}),t.showNotGrade&&n.push({value:"-1",label:"不考评"}),t.showZero&&n.push({value:"0",label:"0分"});let o=Number(t.maxScore);for(let r=1;r<=o;r++)n.push({value:String(r),label:`${String(r)}分`});return t.scoreReverseFlag&&n.reverse(),n}}}const LE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;const{getGradeItems:r}=Ms(),l=e.ref([]);return e.watch(o,()=>{l.value=r(o),n.selectComponent.filterConditionProps.options=l.value},{immediate:!0}),(a,i)=>{const s=xn,c=Nn,d=Tt,u=Bn,p=tn,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(d,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=m=>e.unref(o).defaultValue=m),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:m.label,value:m.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).maxScore,"onUpdate:modelValue":i[1]||(i[1]=m=>e.unref(o).maxScore=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showZero,"onUpdate:modelValue":i[2]||(i[2]=m=>e.unref(o).showZero=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=m=>e.unref(o).showNotGrade=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=m=>e.unref(o).scoreReverseFlag=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":i[5]||(i[5]=m=>e.unref(o).newLine=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showProblem,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(o).showProblem=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=m=>e.unref(o).showBrightSpot=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showRemark,"onUpdate:modelValue":i[8]||(i[8]=m=>e.unref(o).showRemark=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showVeto,"onUpdate:modelValue":i[9]||(i[9]=m=>e.unref(o).showVeto=m)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Gx="",PE={class:"auto-complete"},AE={key:0},RE=e.defineComponent({__name:"autoComplete",props:{modelValue:{type:String,default:()=>{}},options:{type:Array,default:()=>[],required:!1},label:{type:String,default:()=>"备注:"},selectWhenUnmatched:{type:Boolean,default:()=>!0},matchMode:{type:String,default:"start"},width:{type:Number,default:500},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){e.useCssVars(m=>({e00bfd70:e.unref(h)}));const o=e.ref(),r=t;let{options:l,width:a}=e.toRefs(r);const i=n,s=NE(r,"modelValue",i),c=()=>{i("change",s.value)},d=(m,g)=>{const f=m?SE(l,u(m)):l.value;g(e.unref(f))},u=m=>({start:f=>f.value.toLowerCase().indexOf(m.toLowerCase())===0,random:f=>f.value.indexOf(m)>=0})[r.matchMode],p=e.inject("convertPX"),h=e.computed(()=>`${p(a.value)}px`);return(m,g)=>{const f=d7;return e.openBlock(),e.createElementBlock("div",PE,[t.label?(e.openBlock(),e.createElementBlock("span",AE,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"autoCompleteRef",ref:o,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=y=>e.isRef(s)?s.value=y:null),"select-when-unmatched":t.selectWhenUnmatched,"fetch-suggestions":d,"value-key":"value",clearable:"",disabled:t.disabled,onBlur:c},{default:e.withCtx(({item:y})=>[e.createElementVNode("span",null,e.toDisplayString(y.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Yx="",FE={class:"grade-component"},vE={key:3,class:"description"},HE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t,{getGradeItems:r}=Ms();let l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref(a.value[o.componentID]||{});e.watch(s,p=>{a.value[o.componentID]=p,Object.keys(a.value[o.componentID]||{}).length&&(a.value[o.componentID].maxScore=i.value.maxScore)},{deep:!0});const c=e.computed(()=>r(i.value)),d=n;e.watch(a,p=>d("update:datas",p)),e.watch(i,()=>{o.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const u=(p,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,p.preventDefault())};return(p,h)=>{const m=zr,g=oo,f=RE,y=Je;return e.openBlock(),e.createElementBlock("div",FE,[e.createVNode(g,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(s).score,"onUpdate:modelValue":h[0]||(h[0]=b=>e.unref(s).score=b),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(b,k)=>(e.openBlock(),e.createBlock(m,{key:k,value:b.value,onClick:w=>u(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(f,{key:0,class:"problem",modelValue:e.unref(s).problem,"onUpdate:modelValue":h[1]||(h[1]=b=>e.unref(s).problem=b),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(f,{key:1,class:"bright-spot",modelValue:e.unref(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=b=>e.unref(s).brightSpot=b),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(f,{key:2,class:"bright-spot",modelValue:e.unref(s).remark,"onUpdate:modelValue":h[3]||(h[3]=b=>e.unref(s).remark=b),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",vE,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Xx="",{isEmpty:jE}=pt(),{getGradeItems:UE}=Ms(),qE={component:class extends On{constructor(){super("grade","考评分数",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"考评分数",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,maxScore:5,showZero:!0,showNotGrade:!0,showProblem:!0,showBrightSpot:!0,scoreReverseFlag:!0,showVeto:!1},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage,validator:(o,r,l)=>{if(!r||jE(r)){l(n.requiredMessage);return}l()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&UE(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:HE,propEditor:LE},KE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;e.watch(()=>o.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:o.options}});const r=()=>{o.type==="radio"?(o.defaultValue="",o.min=void 0,o.max=void 0,o.multiple=void 0):o.type==="checkbox"?(o.defaultValue=[],o.multiple=void 0):o.type==="selector"&&(o.defaultValue="",o.min=void 0,o.max=void 0)};return(l,a)=>{const i=Wl,s=oo,c=Tt,d=tn,u=Bn,p=xt;return e.openBlock(),e.createBlock(p,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(o).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(o).type=h),onChange:r},{default:e.withCtx(()=>[e.createVNode(i,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(i,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(i,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(o).type!=="selector"?(e.openBlock(),e.createBlock(c,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(o).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(c,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(o).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(o).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(c,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(u,{modelValue:e.unref(o).min,"onUpdate:modelValue":a[3]||(a[3]=m=>e.unref(o).min=m),step:1,min:0,max:((h=e.unref(o).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(c,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(u,{modelValue:e.unref(o).max,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).max=m),step:1,min:0,max:((h=e.unref(o).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),WE={class:"post-component"},GE={key:3,class:"description"},YE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>u?l.value[o.componentID]=u:delete l.value[o.componentID]);const s=n;e.watch(l,u=>s("update:datas",u));const c=e.ref(!0);e.watch(a,u=>{c.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,o.isDesigner&&(i.value=a.value.defaultValue),c.value=!0}),s("update:componentProps",u)},{immediate:!0});const d=(u,p)=>{a.value.clearable&&l.value[o.componentID]===p&&(i.value=void 0,u.preventDefault())};return(u,p)=>{const h=zr,m=oo,g=no,f=ji,y=xn,b=Nn,k=Je;return e.openBlock(),e.createElementBlock("div",WE,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(h,{key:_,value:w.value,onClick:C=>d(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[1]||(p[1]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(g,{value:w.value,key:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":p[2]||(p[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(y,{key:_,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",GE,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Jx="",XE={component:class extends On{constructor(){super("post","岗位",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"岗位",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:YE,propEditor:KE},eT="",tT="",nT="",ZE={class:"dictionary-binder"},JE={class:"item"},QE={class:"label"},eS={key:0,class:"item-souce-type"},Is=e.defineComponent({__name:"dictionaryBinder",props:{modelValue:{type:String,required:!0},dictionary:{type:Object,default:()=>{}},placeholder:{type:String,default:"请输入内容"},itemHeight:{type:Number,default:34},height:{type:String,default:"20px"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){var m;e.useCssVars(g=>({"4f018582":t.height}));let o=e.inject("defaultSourceType");const r=t,l=e.ref(),a=e.ref(r.modelValue),i=(m=r.dictionary)==null?void 0:m.souceTypeMap;l.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const c=g=>{s.value=g?d(g):r.dictionary.dictionaryItems},d=g=>r.dictionary.dictionaryItems.filter(f=>f.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),u=n,{getTempID:p}=pt(),h=g=>{let f=s.value.find(y=>y.value===g);f||(f={value:p(),label:g,itemSourceType:o}),u("update:modelValue",f.label),u("change",f)};return(g,f)=>{var k;const y=Ew,b=ut;return e.openBlock(),e.createElementBlock("div",ZE,[(k=t.dictionary)!=null&&k.dictionaryItems.length?(e.openBlock(),e.createBlock(y,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(a)?a.value=w:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":c,placeholder:t.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":t.itemHeight,height:t.itemHeight*8,disabled:t.disabled,onChange:h},{default:e.withCtx(({item:w})=>[e.createElementVNode("div",JE,[e.createElementVNode("span",QE,e.toDisplayString(w.label),1),e.unref(l)?(e.openBlock(),e.createElementBlock("span",eS,e.toDisplayString(e.unref(i).get(w.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(b,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(a)?a.value=w:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:t.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),oT="",tS={class:"option-wrap"},nS=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){let n=e.inject("formDesignerData"),o=e.inject("defaultSourceType"),r=n.selectComponent.props;e.watch(r.options,()=>{n.selectComponent.filterConditionProps.options=r.options});const{getTempID:l}=pt(),a=()=>{r.options.push({label:`选项${r.options.length+1}`,value:l(),itemSourceType:o})},i=c=>{r.options.splice(c,1)},s=(c,d)=>{d.value=c.value,d.itemSourceType=c.itemSourceType};return(c,d)=>{const u=xn,p=Nn,h=Tt,m=tn,g=Bn,f=Yi,y=Je,b=no,k=Sn,w=mn,_=xt;return e.openBlock(),e.createBlock(_,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=C=>e.unref(r).defaultValue=C),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).options,(C,V)=>(e.openBlock(),e.createBlock(u,{key:V,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).newLine,"onUpdate:modelValue":d[1]||(d[1]=C=>e.unref(r).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).min,"onUpdate:modelValue":d[2]||(d[2]=C=>e.unref(r).min=C),step:1,min:0,max:e.unref(r).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).max,"onUpdate:modelValue":d[3]||(d[3]=C=>e.unref(r).max=C),step:1,min:1,max:e.unref(r).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"checkbox-options",handle:".cursor-move",list:e.unref(r).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:V})=>[e.createElementVNode("div",tS,[e.unref(r).options.length>1?(e.openBlock(),e.createBlock(y,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Is,{modelValue:C.label,"onUpdate:modelValue":E=>C.label=E,dictionary:t.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:E=>s(E,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(k,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(b,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":E=>C.inputEnable=E},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(y,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:E=>i(V)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(w,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(y,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),rT="",oS={class:"checkbox-component"},rS={key:0,class:"description"},lS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,d=>l.value[o.componentID]=d);const s=n;e.watch(l,d=>s("update:datas",d)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const c=d=>{a.value.options.forEach(u=>{const p=`${o.componentID}||${u.value}`;!d.includes(u.value)&&l.value[p]&&delete l.value[p]})};return(d,u)=>{const p=no,h=ut,m=ji,g=Je;return e.openBlock(),e.createElementBlock("div",oS,[e.createVNode(m,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=f=>e.isRef(i)?i.value=f:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(f,y)=>{var b;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:y},[e.createVNode(p,{value:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["value"]),f.inputEnable&&(t.isDesigner||(b=e.unref(i))!=null&&b.includes(f.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(l)[`${t.componentID}||${f.value}`],"onUpdate:modelValue":k=>e.unref(l)[`${t.componentID}||${f.value}`]=k},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",rS,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),lT="",{getTempID:Fp}=pt(),aS={component:class extends On{constructor(){super("checkbox","多选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"多选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:[],required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:Fp(),label:"选项1"},{value:Fp(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}},renderer:lS,propEditor:nS},iS=e.defineComponent({__name:"propsEditor",setup(t){const{computedExpression:n}=pt();let o=e.inject("formDesignerData"),r=o.selectComponent.props,l=o.selectComponent.rules;const a=c=>{c&&(l[1].pattern=n(c))},i=c=>{l[1].message=c},s=c=>{c==="text"&&(r.showPassword=!1)};return(c,d)=>{const u=ut,p=Tt,h=Wl,m=oo,g=tn,f=xt;return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(p,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=y=>e.unref(r).defaultValue=y),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).type,"onUpdate:modelValue":d[1]||(d[1]=y=>e.unref(r).type=y),onChange:s},{default:e.withCtx(()=>[e.createVNode(h,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(h,{value:"password"},{default:e.withCtx(()=>[e.createTextVNode("密码")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(r).type=="password"?(e.openBlock(),e.createBlock(p,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).showPassword,"onUpdate:modelValue":d[2]||(d[2]=y=>e.unref(r).showPassword=y)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(p,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(u,{onChange:a,modelValue:e.unref(r).pattern,"onUpdate:modelValue":d[3]||(d[3]=y=>e.unref(r).pattern=y)},null,8,["modelValue"])]),_:1}),e.unref(r).pattern?(e.openBlock(),e.createBlock(p,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(u,{onChange:i,modelValue:e.unref(r).patternMessage,"onUpdate:modelValue":d[4]||(d[4]=y=>e.unref(r).patternMessage=y)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),sS={class:"input-component"},cS={key:0,class:"description"},dS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,c=>l.value[o.componentID]=c);const s=n;return e.watch(l,c=>s("update:datas",c)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(c,d)=>{const u=ut,p=Je;return e.openBlock(),e.createElementBlock("div",sS,[e.createVNode(u,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":d[0]||(d[0]=h=>e.isRef(i)?i.value=h:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:t.disabled,readonly:t.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",cS,[e.createVNode(p,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),iT="",fS={component:class extends On{constructor(){super("input","文本框",!0,!0),this.props={type:"text",label:"文本框",width:12,showLabel:!0,fontSize:12,isBold:!1,color:"#000000",showFlag:!0,statisticsFlag:!1,labelNewLine:!1,labelWidth:void 0,defaultValue:"",placeholder:"",required:!1,requiredMessage:"必填项",pattern:"",patternMessage:"格式不正确",disabled:!1,clearable:!1,readonly:!1,showPassword:!1},this.rules=this.getRules(this.props),this.filterConditionProps={type:"input"},this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage},{pattern:n.pattern,message:n.patternMessage}]}getFilterConditionProps(n){return{type:"input"}}getExcludeFilterConditions(){return["RANGE"]}},renderer:dS,propEditor:iS},uS={component:class extends On{constructor(){super("label","标签"),this.props={width:12,showLabel:!1,label:"标签",showFlag:!0,labelNewLine:!1,isBold:!0,fontSize:14,color:"#000000"}}},renderer:e.defineComponent({__name:"renderer",props:{componentProps:{type:Object,required:!0}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:t.componentProps.color,"font-size":t.componentProps.fontSize+"px","font-weight":t.componentProps.isBold?"bold":"normal"})},e.toDisplayString(t.componentProps.label),5))}}),undefined:void 0},pS={class:"option-wrap"},mS=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){let n=e.inject("formDesignerData"),o=e.inject("defaultSourceType"),r=n.selectComponent.props;e.watch(r.options,()=>{n.selectComponent.filterConditionProps.options=r.options});const{getTempID:l}=pt(),a=()=>{r.options.push({label:`选项${r.options.length+1}`,value:l(),itemSourceType:o})},i=c=>{r.options.splice(c,1)},s=(c,d)=>{d.value=c.value,d.itemSourceType=c.itemSourceType};return(c,d)=>{const u=xn,p=Nn,h=Tt,m=tn,g=Yi,f=Je,y=no,b=Sn,k=mn,w=xt;return e.openBlock(),e.createBlock(w,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=_=>e.unref(r).defaultValue=_),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).options,(_,C)=>(e.openBlock(),e.createBlock(u,{key:C,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).newLine,"onUpdate:modelValue":d[1]||(d[1]=_=>e.unref(r).newLine=_)},null,8,["modelValue"])]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"radio-options",handle:".cursor-move",list:e.unref(r).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:_,index:C})=>[e.createElementVNode("div",pS,[e.unref(r).options.length>1?(e.openBlock(),e.createBlock(f,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Is,{modelValue:_.label,"onUpdate:modelValue":V=>_.label=V,dictionary:t.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:V=>s(V,_)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(b,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(y,{class:"input-enable",modelValue:_.inputEnable,"onUpdate:modelValue":V=>_.inputEnable=V},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(f,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:V=>i(C)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(k,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(f,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),fT="",hS={class:"radio-component"},gS={key:0,class:"description"},bS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>l.value[o.componentID]=u);const s=n;e.watch(l,u=>s("update:datas",u)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const c=u=>{a.value.options.forEach(p=>{const h=`${o.componentID}||${p.value}`;u!==p.value&&l.value[h]&&delete l.value[h]})},d=(u,p)=>{if(a.value.clearable&&i.value===p){i.value=void 0;const h=`${o.componentID}||${p}`;l.value[h]&&delete l.value[h],u.preventDefault()}};return(u,p)=>{const h=zr,m=ut,g=oo,f=Je;return e.openBlock(),e.createElementBlock("div",hS,[e.createVNode(g,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=y=>e.isRef(i)?i.value=y:null),disabled:t.disabled,onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,b)=>{var k;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:b},[e.createVNode(h,{value:y.value,onClick:w=>d(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["value","onClick"]),y.inputEnable&&(t.isDesigner||(k=e.unref(i))!=null&&k.includes(y.value))?(e.openBlock(),e.createBlock(m,{key:0,class:"option-input",modelValue:e.unref(l)[`${t.componentID}||${y.value}`],"onUpdate:modelValue":w=>e.unref(l)[`${t.componentID}||${y.value}`]=w},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",gS,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),uT="",{getTempID:vp}=pt();class yS extends On{constructor(){super("radio","单选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"单选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:vp(),label:"选项1"},{value:vp(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}}const wS={component:yS,renderer:bS,propEditor:mS},CS={key:0,class:"component-readonly-mask"},Hp=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(t,{emit:n}){const o={...ll,...il,...al},{computedExpression:r}=pt();let l=e.inject("formData");const a=t,{components:i,showDescription:s,selectMode:c}=e.toRefs(a),d={show:m=>{if(m.showFlag===void 0)return String(!0);let g="";return m.showFlag?g=m.hiddenConditionExpression?`!(${m.hiddenConditionExpression})`:String(m.showFlag):g=m.showConditionExpression||String(m.showFlag),g},disabled:m=>m.disabledConditionExpression||String(m.disabled===void 0?!1:m.disabled),readonly:m=>m.readonlyConditionExpression||String(m.readonly===void 0?!1:m.readonly)},u=(m,g)=>{var b;let f=d[g](m.props);if(!f)return;["true","false"].includes(f)||f.match(/{(.*?)}/g).forEach(w=>{var E;const _=w.replace(/\{|}/g,"");let C=l.value.datas[_];const V=i.value.find(N=>N.id===_);(V==null?void 0:V.type)==="grade"&&(C=(E=l.value.datas[_])==null?void 0:E.score),f=f.replace(w,C||"")});const y=r(f);if(g==="show"&&!y){let k=[];m.isLayout&&((b=m.children)!=null&&b.length)?k=m.children:k=[m],k.forEach(w=>{l.value.datas[w.id]&&(w.type==="grade"?delete l.value.datas[w.id].score:delete l.value.datas[w.id])})}return y},p=n,h=m=>{p("select",m)};return(m,g)=>{const f=no,y=Tt;return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(b,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k},[e.unref(c)||u(b,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(c)},{"is-hidden":!b.props.showFlag},{selected:b.selected}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(l).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[u(b,"readonly")?(e.openBlock(),e.createElementBlock("div",CS)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createBlock(f,{key:1,class:"select-item",modelValue:b.selected,"onUpdate:modelValue":w=>b.selected=w,label:"选择",onChange:w=>h(b)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[b.type].renderer),{key:2,componentID:b.id,showDescription:e.unref(s),component:e.unref(i)[k],"onUpdate:component":w=>e.unref(i)[k]=w},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(y,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),prop:b.id,"label-width":b.props.showLabel?b.props.labelWidth:"0",rules:b.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:b.props.color||"#000000","font-size":b.props.fontSize+"px","font-weight":b.props.isBold?"bold":"normal"})},e.toDisplayString(b.props.showLabel?b.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[b.type].renderer),{componentID:b.id,disabled:u(b,"disabled"),showDescription:e.unref(s),componentProps:b.props,"onUpdate:componentProps":w=>b.props=w,datas:e.unref(l).datas,"onUpdate:datas":g[0]||(g[0]=w=>e.unref(l).datas=w)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),pT="",_S={key:0,class:"select-title"},kS=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),VS={key:1,class:"title"},ES={key:0,class:"readonly-mask"},SS={key:2,class:"mobile-key"},BS={name:"zhy-form-renderer"},$o=e.defineComponent({...BS,props:{formData:{type:Object,default:()=>({components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formType:"1"},datas:{}}),required:!0},uploadOptions:{type:Object,default:()=>({serverApi:"",autoUpload:!1})},device:{type:String,default:"pc"},watching:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1},selectComponents:{type:Array,default:()=>[]}},emits:["change","select"],setup(t,{expose:n,emit:o}){const{removeEmptyAttribute:r}=pt(),l={...ll,...il,...al},a=e.ref(),i=e.ref(!1),s=e.ref(!1),c=e.ref(!1),d=t,u=o,{formData:p,selectMode:h}=e.toRefs(d),m=e.ref(d.selectComponents);e.provide("uploadOptions",d.uploadOptions),e.provide("formData",p),e.provide("formType",p.value.props.formType);const g=_=>{var C,V,E,N;if((C=m.value)!=null&&C.length||(m.value=[]),!_){m.value=[],p.value.components.forEach(O=>{O.selected=s.value,s.value&&m.value.push(O)}),c.value=!1,u("select",m.value);return}if(_.selected)(V=m.value)==null||V.push(_);else{const O=(E=m.value)==null?void 0:E.findIndex(M=>M.id===_.id);O!==-1&&((N=m.value)==null||N.splice(O,1))}u("select",m.value),f()},f=()=>{var _,C;if(!((_=m.value)!=null&&_.length)){c.value=!1,s.value=!1;return}if(((C=m.value)==null?void 0:C.length)<p.value.components.length){c.value=!0;return}s.value=!0,c.value=!1},y=_=>{_!=null&&_.length&&(_.forEach(C=>{var E,N;let V=new l[C.type].component;V.isEdit&&(C.props.required||C.props.pattern)&&(C.rules=V.getRules(C.props)),d.selectMode&&((E=m.value)!=null&&E.length)&&m.value.findIndex(M=>M.id===C.id)!==-1&&(C.selected=!0),C.isLayout&&((N=C==null?void 0:C.children)!=null&&N.length)&&y(C.children)}),d.selectMode&&f())};e.watch(p,()=>y(p.value.components),{immediate:!0});const b=()=>{let _=r(p.value.datas),C=[],V=[];const E=Object.keys(_);for(let N of E){if(N.includes("||")){let O=N.split("||"),M=O[0],$=O[1],S=C.findIndex(x=>x.id===$&&x.groupID===M);if(S!==-1)C[S].value=_[N];else{const x={parentID:M,id:$,value:_[N]};C.push(x)}continue}k(p.value.components,C,V,N,_)}return{data:C,fileList:V}},k=(_,C,V,E,N)=>{var $;let O,M;for(let S=0;S<_.length;S++){const x=_[S];if(x.id===E){O=x,w(C,V,E,N,O);break}if(x.isLayout&&(($=x==null?void 0:x.children)!=null&&$.length)){if(O=x.children.find(P=>P.id===E),O){M=x.id,w(C,V,E,N,O,M);break}k(x.children,C,V,E,N)}}},w=(_,C,V,E,N,O)=>{var $,S;let M=-1;switch(N.type){case"radio":M=_.findIndex(x=>x.id===E[V]),M===-1&&_.push({groupID:O,parentID:V,id:E[V],value:""});break;case"checkbox":E[V].forEach(x=>{M=_.findIndex(P=>P.id===P),M===-1&&_.push({groupID:O,parentID:V,id:x,value:""})});break;case"upload":case"uploadImage":if(!(($=d.uploadOptions)!=null&&$.autoUpload)&&((S=E[V])!=null&&S.length)){const x=E[V].map(B=>(B.file&&(B.file.id=V),B.file)),P=E[V].map(B=>{if(B.fileID)return B.fileID}).filter(B=>B!==void 0);C.push({id:V,groupID:O,fileIDs:P,files:x})}break;default:_.push({groupID:O,parentID:V,id:V,value:E[V]});break}};return d.watching&&e.watch(()=>p.value.datas,()=>{const _=b();u("change",_.data,_.fileList)},{immediate:!0,deep:!0}),n({getDatas:b,async validate(_=()=>{}){return await a.value.validate(_)},resetFields(){a.value.resetFields()},clearValidate(_){a.value.clearValidate(_)},scrollToField(_){a.value.scrollToField(_)},toggleDescription(){i.value=!i.value}}),(_,C)=>{const V=no,E=xt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",t.device,{"examination-paper":e.unref(p).props.formType==="2"},{"select-mode":e.unref(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",_S,[kS,e.createVNode(V,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":C[0]||(C[0]=N=>e.isRef(s)?s.value=N:null),label:"全选",indeterminate:e.unref(c),onChange:C[1]||(C[1]=N=>g())},null,8,["modelValue","indeterminate"])])):e.unref(p).props.formName?(e.openBlock(),e.createElementBlock("h1",VS,e.toDisplayString(e.unref(p).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(E,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(p).datas,"label-position":e.unref(p).props.labelPosition,"label-width":e.unref(p).props.labelWidth,size:e.unref(p).props.size,"scroll-to-error":"",disabled:t.disabled},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",ES)):e.createCommentVNode("",!0),e.createVNode(Hp,{components:e.unref(p).components,showDescription:e.unref(i),selectMode:e.unref(h),onSelect:g},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),t.device==="mobile"?(e.openBlock(),e.createElementBlock("div",SS)):e.createCommentVNode("",!0)],2)}}}),mT="",NS={class:"form-list-wrap"},xS={class:"form-list"},TS=["onClick"],$S=["title"],OS={class:"form-template"},MS={class:"dialog-footer"},IS={class:"left-wrap"},zS={class:"select-count-wrap"},DS={class:"count"},LS={class:"right-wrap"},PS=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:n}){const o=e.inject("formData"),r=o.value.props.formType==="2"?"试卷":"表单",l=o.value.props.formType==="2"?"题目":"项目",a=e.useModel(t,"modelValue"),i=t,{params:s}=e.toRefs(i),c=e.ref(""),d=e.ref(""),u=e.ref({datas:{},components:[],props:{}}),p=e.ref(s.value.formList),h=()=>{p.value=s.value.formList,c.value&&(p.value=s.value.formList.filter(N=>N.formName.includes(c.value)))},m=async N=>{d.value!==N&&(d.value=N,u.value={datas:{},components:[],props:{}},s.value.getFormTemplateMethod&&(u.value=await s.value.getFormTemplateMethod(N)))},g=e.ref(new Map),f=e.computed(()=>{let N=0;for(const[,O]of g.value)N+=O.length;return N}),y=N=>{g.value.has(d.value)?N.length?g.value.set(d.value,N):g.value.delete(d.value):g.value.set(d.value,N)},{clone:b}=pt(),k=()=>{let N=[];for(const[,O]of g.value)O.forEach(M=>{let $=b(M);delete $.selected,N.push($)});return N},w=e.ref(!1),_=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:o.value.props.formType}}),C=()=>{_.value.components=k(),w.value=!0},V=n,E=()=>{const N=k();V("select",N),a.value=!1};return(N,O)=>{const M=Je,$=ut,S=wu,x=$o,P=hy,B=mn,T=Gi;return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(T,{modelValue:a.value,"onUpdate:modelValue":O[2]||(O[2]=L=>a.value=L),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(l)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",MS,[e.createElementVNode("div",IS,[e.createElementVNode("span",zS,[e.createTextVNode(" 已选 "),e.createElementVNode("span",DS,e.toDisplayString(` ${e.unref(f)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(l)}`),1)]),e.createVNode(P,{type:"primary",disabled:e.unref(g).size===0,onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(l)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",LS,[e.createVNode(B,{onClick:O[1]||(O[1]=L=>a.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(B,{type:"primary",onClick:E},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var L,D;return[e.createElementVNode("div",NS,[e.createVNode($,{modelValue:e.unref(c),"onUpdate:modelValue":O[0]||(O[0]=F=>e.isRef(c)?c.value=F:null),placeholder:`搜索${e.unref(r)}`,class:"form-name-input",onChange:h},{append:e.withCtx(()=>[e.createVNode(M,{name:"search",color:"#08c979"})]),_:1},8,["modelValue","placeholder"]),e.createElementVNode("div",xS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(F,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(d)===F.formID}]),key:R,onClick:W=>m(F.formID)},[e.createVNode(M,{name:e.unref(o).props.formType==="1"?"form":"examination",color:e.unref(g).has(F.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:F.formName},e.toDisplayString(F.formName),9,$S)],10,TS))),128))])]),e.createElementVNode("div",OS,[e.unref(d)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(S,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(D=(L=e.unref(u))==null?void 0:L.components)!=null&&D.length?(e.openBlock(),e.createBlock(x,{key:1,formData:e.unref(u),selectMode:"",selectComponents:e.unref(g).get(e.unref(d)),onSelect:y},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(T,{modelValue:e.unref(w),"onUpdate:modelValue":O[4]||(O[4]=L=>e.isRef(w)?w.value=L:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(l)}预览`},{footer:e.withCtx(()=>[e.createVNode(B,{onClick:O[3]||(O[3]=L=>w.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var L,D;return[(D=(L=e.unref(_))==null?void 0:L.components)!=null&&D.length?(e.openBlock(),e.createBlock(x,{key:0,formData:e.unref(_)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),hT="",AS={key:1,class:"tip"},RS=["innerHTML"],Ca=e.defineComponent({__name:"conditionInput",props:{title:{type:String,default:"条件设置"},content:{type:String,default:""},showStyle:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},defaultValue:{type:Array,default:()=>[]}},emits:["result","clear"],setup(t,{emit:n}){let o=e.inject("formDesignerData"),r=e.inject("formData"),l=o.selectComponent;const a=e.ref(),i=e.ref(!1),s=e.ref([]),c=e.ref({}),d=e.ref({}),u=()=>{s.value=[],c.value={},d.value={},p(r.value.components),i.value=!0},p=y=>{y.forEach(b=>{var k;if(l.id!==b.id){if(b.isLayout&&((k=b.children)!=null&&k.length)){p(b.children);return}b.isEdit&&(s.value.push({label:b.props.label,id:b.id}),c.value[b.id]=h(b.excludeFilterConditions),d.value[b.id]=b.filterConditionProps)}})},h=y=>Object.keys(filterConditionTypes).filter(k=>!y.includes(k)),m=n,g=()=>{const y=a.value.getFilterData();y.message||(i.value=!1,m("result",y))},f=()=>{m("clear")};return(y,b)=>{const k=mn,w=Gi;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:u},[t.clearable&&t.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(f,["stop"])},"x")):e.createCommentVNode("",!0),t.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.content},null,8,RS)):(e.openBlock(),e.createElementBlock("span",AS,"单击设置条件"))]),e.createVNode(w,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=_=>e.isRef(i)?i.value=_:null),"destroy-on-close":"",title:t.title},{footer:e.withCtx(()=>[e.createVNode(k,{onClick:b[0]||(b[0]=_=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(k,{type:"primary",onClick:g},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(tr,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(c),conditionProps:e.unref(d),defaultValue:t.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),gT="",FS=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(t){let o=e.inject("formDesignerData").selectComponent;const r=(a,i)=>{o.props[`${i}Conditions`]=a.filterConditions,o.props[`${i}ConditionContent`]=a.filterConditionContent,o.props[`${i}ConditionExpression`]=a.filterConditionExpression},l=a=>{o.props[`${a}Conditions`]=void 0,o.props[`${a}ConditionContent`]=void 0,o.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const s=Tt,c=tn,d=xt;return e.openBlock(),e.createBlock(d,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(o).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.showConditionContent,defaultValue:e.unref(o).props.showConditions,onResult:i[0]||(i[0]=u=>r(u,"show")),onClear:i[1]||(i[1]=u=>l("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(o).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.hiddenConditionContent,defaultValue:e.unref(o).props.hiddenConditions,onResult:i[2]||(i[2]=u=>r(u,"hidden")),onClear:i[3]||(i[3]=u=>l("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(o).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.readonlyConditionContent,defaultValue:e.unref(o).props.readonlyConditions,onResult:i[4]||(i[4]=u=>r(u,"readonly")),onClear:i[5]||(i[5]=u=>l("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(o).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=u=>e.unref(o).props.statisticsFlag=u)},null,8,["modelValue"])]),_:1}),e.unref(o).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.disabledConditionContent,defaultValue:e.unref(o).props.disabledConditions,onResult:i[7]||(i[7]=u=>r(u,"disabled")),onClear:i[8]||(i[8]=u=>l("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),bT="",vS=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){const n=e.inject("formData"),o=e.inject("formDesignerData");let r=e.computed(()=>n.value.props.formType),l=o.selectComponent,a=o.selectComponent.rules;l.props.showLabel&&!l.props.labelWidth&&(l.props.labelWidth=n.value.props.labelWidth);const i=()=>{l.props.showConditionContent=void 0,l.props.showConditionExpression=void 0,l.props.showConditions=void 0,l.props.hiddenConditionContent=void 0,l.props.hiddenConditionExpression=void 0,l.props.hiddenConditions=void 0},s=()=>{l.props.readonlyConditionContent=void 0,l.props.readonlyConditionExpression=void 0,l.props.readonlyConditions=void 0},c=()=>{l.props.disabledConditionContent=void 0,l.props.disabledConditionExpression=void 0,l.props.disabledConditions=void 0},d=h=>{a[0].required=h},u=h=>{a[0].message=h},p=h=>{typeof h.value!="string"&&(l.itemID=h.value),l.id=h.value,l.itemSourceType=h.itemSourceType};return(h,m)=>{const g=tn,f=Tt,y=Bn,b=gu,k=Zw,w=ut,_=xt;return e.openBlock(),e.createBlock(_,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(r)==="1"&&e.unref(l).type!=="label"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.showLabel,"onUpdate:modelValue":m[0]||(m[0]=C=>e.unref(l).props.showLabel=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(l).props.showLabel||e.unref(l).type==="label"?(e.openBlock(),e.createBlock(f,{key:1,label:e.unref(l).type==="label"?"标签":e.unref(r)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(Is,{modelValue:e.unref(l).props.label,"onUpdate:modelValue":m[1]||(m[1]=C=>e.unref(l).props.label=C),dictionary:t.dictionary,placeholder:e.unref(l).type==="label"?"标签内容":e.unref(r)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:p},null,8,["modelValue","dictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(f,{label:e.unref(l).type==="label"?"字体大小":e.unref(r)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.fontSize,"onUpdate:modelValue":m[2]||(m[2]=C=>e.unref(l).props.fontSize=C),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(r)==="1"&&e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(f,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.labelWidth,"onUpdate:modelValue":m[3]||(m[3]=C=>e.unref(l).props.labelWidth=C),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.labelNewLine,"onUpdate:modelValue":m[4]||(m[4]=C=>e.unref(l).props.labelNewLine=C)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(l).props.showLabel||e.unref(l).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(f,{label:e.unref(l).type==="label"?"字体加粗":e.unref(r)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.isBold,"onUpdate:modelValue":m[5]||(m[5]=C=>e.unref(l).props.isBold=C)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(f,{label:e.unref(l).type==="label"?"字体颜色":e.unref(r)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(l).props.color,"onUpdate:modelValue":m[6]||(m[6]=C=>e.unref(l).props.color=C)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(f,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(l).props.width,"onUpdate:modelValue":m[7]||(m[7]=C=>e.unref(l).props.width=C),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(f,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.paddingLeft,"onUpdate:modelValue":m[8]||(m[8]=C=>e.unref(l).props.paddingLeft=C),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.showFlag,"onUpdate:modelValue":m[9]||(m[9]=C=>e.unref(l).props.showFlag=C),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(l).isInput?(e.openBlock(),e.createBlock(f,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(l).props.placeholder,"onUpdate:modelValue":m[10]||(m[10]=C=>e.unref(l).props.placeholder=C),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(l).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(f,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.clearable,"onUpdate:modelValue":m[11]||(m[11]=C=>e.unref(l).props.clearable=C)},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.readonly,"onUpdate:modelValue":m[12]||(m[12]=C=>e.unref(l).props.readonly=C),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:d,modelValue:e.unref(l).props.required,"onUpdate:modelValue":m[13]||(m[13]=C=>e.unref(l).props.required=C)},null,8,["modelValue"])]),_:1}),e.unref(l).props.required?(e.openBlock(),e.createBlock(f,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(w,{onChange:u,modelValue:e.unref(l).props.requiredMessage,"onUpdate:modelValue":m[14]||(m[14]=C=>e.unref(l).props.requiredMessage=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.disabled,"onUpdate:modelValue":m[15]||(m[15]=C=>e.unref(l).props.disabled=C),onChange:c},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(l).type!=="label"&&!e.unref(l).isLayout?(e.openBlock(),e.createBlock(f,{key:6,label:e.unref(r)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(l).props.description,"onUpdate:modelValue":m[16]||(m[16]=C=>e.unref(l).props.description=C),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),HS=e.defineComponent({__name:"formPropsEditor",setup(t,{expose:n}){const o=e.inject("formData"),r=e.ref(),l=()=>{o.value.props.formType==="2"&&(o.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await r.value.validate(a)}}),(a,i)=>{const s=Wl,c=oo,d=Tt,u=ut,p=Bn,h=xt;return e.openBlock(),e.createBlock(h,{ref_key:"formRef",ref:r,model:e.unref(o).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(d,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.formType,"onUpdate:modelValue":i[0]||(i[0]=m=>e.unref(o).props.formType=m),onChange:l},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"formName",label:e.unref(o).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).props.formName,"onUpdate:modelValue":i[1]||(i[1]=m=>e.unref(o).props.formName=m),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(o).props.formType==="1"?(e.openBlock(),e.createBlock(d,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=m=>e.unref(o).props.labelPosition=m)},{default:e.withCtx(()=>[e.createVNode(s,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=m=>e.unref(o).props.labelWidth=m),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.size,"onUpdate:modelValue":i[4]||(i[4]=m=>e.unref(o).props.size=m)},{default:e.withCtx(()=>[e.createVNode(s,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(s,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(s,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),yT="",wT="",jS={class:"toolbar"},US=e.createElementVNode("div",{class:"devices"},null,-1),qS={class:"operates"},KS=e.createElementVNode("span",null,"清空",-1),WS=e.createElementVNode("span",null,"批量添加",-1),GS=e.createElementVNode("span",null,"查看JSON",-1),YS=e.createElementVNode("span",null,"预览",-1),XS=e.createElementVNode("span",null,"保存",-1),ZS=e.createElementVNode("span",null,"验证表单",-1),JS=e.createElementVNode("span",null,"重置表单",-1),QS=e.createElementVNode("span",null,"表单数据",-1),jp=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(t,{emit:n}){const o=e.inject("formData"),r=n,l=()=>{r("clearComponents")},a=()=>{r("batchAdd")},i=()=>{r("viewFormJson")},s=()=>{r("previewFrom")},c=()=>{r("saveFrom")},d=()=>{r("validateForm")},u=()=>{r("resetForm")},p=()=>{r("viewDataJson")},h=e.ref(!1),m=()=>{h.value=!h.value,r("toggleDescription",h.value)};return(g,f)=>{var w;const y=Je,b=mn,k=Ly;return e.openBlock(),e.createElementBlock("div",jS,[US,e.createElementVNode("div",qS,[t.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(k,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:l},{reference:e.withCtx(()=>{var _;return[e.createVNode(b,{text:"",type:"danger",disabled:((_=e.unref(o).components)==null?void 0:_.length)==0},{default:e.withCtx(()=>[e.createVNode(y,{name:"clear",color:"#ff0000"}),KS]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),t.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(b,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(y,{name:"batchAdd",color:"#116fff",size:"16"}),WS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(b,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(y,{name:"json"}),GS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(b,{key:3,text:"",type:"primary",disabled:((w=e.unref(o).components)==null?void 0:w.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(y,{name:"preview",color:"#116fff"}),YS]),_:1},8,["disabled"])):e.createCommentVNode("",!0),t.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(b,{key:4,text:"",type:"primary",onClick:c},{default:e.withCtx(()=>[e.createVNode(y,{name:"save",size:"14px",color:"#08c979"}),XS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("validateForm")?(e.openBlock(),e.createBlock(b,{key:5,text:"",type:"warning",onClick:d},{default:e.withCtx(()=>[e.createVNode(y,{name:"validate",color:"#e6a23c"}),ZS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("resetForm")?(e.openBlock(),e.createBlock(b,{key:6,text:"",type:"danger",onClick:u},{default:e.withCtx(()=>[e.createVNode(y,{name:"reset",color:"#ff0000"}),JS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(b,{key:7,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(y,{name:"previewData",color:"#116fff"}),QS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(b,{key:8,text:"",type:"primary",onClick:m},{default:e.withCtx(()=>[e.createVNode(y,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(o).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),CT="",eB={class:"form-designer"},tB={class:"left-wrap"},nB=["onClick"],oB={class:"component-name"},rB={key:2,class:"no-component-tip"},lB={key:3,class:"mobile-key"},aB=["title"],iB={key:1,class:"right-wrap"},sB={class:"preview-wrap"},cB={name:"zhy-form-designer"},nl=e.defineComponent({...cB,props:{formData:{type:Object,required:!0},componentGroups:{type:Array,default:()=>[]},mergeGroup:{type:Boolean,default:!1},uploadOptions:{type:Object},dictionary:{type:Object,default:()=>{}},defaultSourceType:{type:String,default:void 0},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},setup(t){const n=t,{getTempID:o,clone:r,stringifyJson:l,isEmpty:a}=pt(),i={...ll,...il,...al},{formData:s,componentGroups:c,mergeGroup:d,batchAddComponentParams:u}=e.toRefs(n),p=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),m=e.ref([]),g=e.computed(()=>f.value.map(j=>j.expand&&j.name)),f=e.ref([]),y=e.ref(!1),b={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},k=[{name:"基础组件",expand:!0,components:[{type:"label",allowRepeat:!0,allowModify:!0},{type:"input",allowRepeat:!0,allowModify:!0},{type:"radio",allowRepeat:!0,allowModify:!0},{type:"checkbox",allowRepeat:!0,allowModify:!0}]},{name:"高级组件",expand:!0,components:[{type:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",allowRepeat:!0,allowModify:!0}]},{name:"应用组件",expand:!0,components:[{type:"employee",allowRepeat:!0,allowModify:!0},{type:"post",allowRepeat:!0,allowModify:!0},{type:"grade",allowRepeat:!0,allowModify:!0}]}],w=e.computed(()=>{let j=["clearComponents","previewFrom"];return u.value&&Object.keys(u.value).length&&j.push("batchAdd"),n.testMode&&j.push("viewFormJson"),n.saveMethod&&j.push("saveFrom"),j});e.onMounted(()=>{V(),_()}),e.watch(()=>p.selectComponent,j=>{if(p.propTab="component",!j){m.value=[];return}m.value=["base"],i[p.selectComponent.type].propEditor&&m.value.push("exclusive")}),e.watch([c,d],()=>{V()},{deep:!0}),e.watch(s,()=>{_()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",p),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType),e.provide("formType",s.value.props.formType);const _=()=>{p.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?C(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(b,s.value.props):s.value.props=b,y.value=!s.value.props.formName},C=j=>{j.forEach(async z=>{var oe;let ee=new i[z.type].component;z.name=ee.name,z.isEdit=ee.isEdit,z.isInput=ee.isInput,z.props=Object.assign(ee.props,z.props),z.isEdit&&((z.props.required||z.props.pattern)&&(z.rules=ee.getRules(z.props)),z.filterConditionProps=await ee.getFilterConditionProps(z.props),z.excludeFilterConditions=ee.getExcludeFilterConditions()),f.value.forEach(ye=>{const De=ye.types.findIndex(_e=>_e!=null&&_e.id.includes("temp")?_e.type===z.type:(_e==null?void 0:_e.id)===z.id);De!==-1&&(z.allowRepeat=ye.types[De].allowRepeat,z.allowModify=ye.types[De].allowModify,E(z,ye.types[De],!0),$(De,ye))}),z.isLayout&&((oe=z==null?void 0:z.children)!=null&&oe.length)&&C(z.children)})},V=()=>{var j;if(f.value=[],!((j=c.value)!=null&&j.length)){k.forEach(z=>{f.value.push(N(z))});return}if(n.mergeGroup){k.forEach(oe=>{let ye=oe;const De=c.value.find(_e=>oe.name===_e.name);if(De){let _e=[];oe.components.forEach(Be=>{const Ke=De.components.find(We=>We.type===Be.type);Ke?_e.push(Ke):_e.push(Be)}),ye.components=_e}f.value.push(N(ye))});const z=k.map(oe=>oe.name);c.value.filter(oe=>!z.includes(oe.name)).forEach(oe=>{f.value.push(N(oe))})}else c.value.forEach(z=>{f.value.push(N(z))})},E=(j,z,ee)=>{const oe={employee:[{label:"人员1",value:o()}],post:[{label:"部门1",value:o()}],grade:[]};switch(j.type){case"employee":j.props.options=(ee?z.props.options:z.options)||oe.employee,z.searchEmployeeMethod?j.searchEmployeeMethod=z.searchEmployeeMethod:j.searchEmployeeMethod=ye=>[];break;case"post":j.props.options=(ee?z.props.options:z.options)||oe.post;break;case"grade":j.props.remarkOptions=(ee?z.props.remarkOptions:z.options)||oe.grade;break}},N=j=>{let z=r(j);return z.types=z.components.map(ee=>{var ye;let oe=new i[ee.type].component;return oe.allowRepeat=ee.allowRepeat===void 0?!0:ee.allowRepeat,oe.allowModify=ee.allowModify===void 0?!0:ee.allowModify,E(oe,ee),!((ye=ee.id)!=null&&ye.includes("temp"))&&!a(ee.props)&&(oe.props=Object.assign(oe.props,ee.props),oe.id=ee.id,oe.name=ee.name),oe}),z.dynamicTypes=r(z.types),z.components=z.components.map(ee=>ee.type),z},O=(j,z)=>{const ee=M(j);s.value.components.push(ee);const oe=z.types.findIndex(ye=>j!=null&&j.id.includes("temp")?ye.type===j.type:(ye==null?void 0:ye.id)===j.id);oe!==-1&&$(oe,z),p.selectComponent=void 0,e.nextTick(()=>p.selectComponent=ee)},M=j=>{var oe,ye;let z=r(j);z.itemSourceType=n.defaultSourceType;let ee=new i[j.type].component;return ee.isEdit&&(z.filterConditionProps=ee.getFilterConditionProps(z.props)),!((oe=z.id)!=null&&oe.includes("temp"))||(z.id=o(),!((ye=z.props.options)!=null&&ye.length)||["employee","post"].includes(z.type))||z.props.options.forEach(De=>{De.value=o(),De.itemSourceType=n.defaultSourceType}),z},$=(j,z)=>{z.types[j].allowRepeat||z.types.splice(j,1)},S=j=>{j.allowRepeat||f.value.forEach(z=>{let ee=[];z.dynamicTypes.forEach((oe,ye)=>{z.types.findIndex(_e=>oe!=null&&oe.id.includes("temp")?oe.type===_e.type:(oe==null?void 0:oe.id)===_e.id)!==-1&&ee.push(r(z.dynamicTypes[ye])),(oe!=null&&oe.id.includes("temp")&&oe.type===j.type||(oe==null?void 0:oe.id)===j.id)&&ee.push(r(z.dynamicTypes[ye]))}),z.types=ee})},x=()=>{s.value.components.splice(0,s.value.components.length),p.selectComponent=void 0},P=e.ref(!1),B=()=>{P.value=!0},T=j=>{j!=null&&j.length&&(C(j),j.forEach(z=>s.value.components.push(z)))},L=()=>{Z.value=l(s.value),H.value=!0},D=e.ref(),F=async()=>{if(n.saveMethod){if(!s.value.components.length){_t("error","未发现需要保存的数据!");return}const j=await U();j&&n.saveMethod(j)}},R=e.ref(),W=e.ref(!1),X=()=>{W.value=!0};e.watch(()=>W.value,()=>{s.value.datas={},s.value.components.forEach(j=>{!s.value.datas[j.id]&&!a(j.props.defaultValue)&&(j.type==="grade"?s.value.datas[j.id]={score:j.props.defaultValue}:s.value.datas[j.id]=j.props.defaultValue)})});const H=e.ref(!1),Z=e.ref(),Q=async()=>{await R.value.validate()?_t("success","通过验证"):_t("error","未通过验证")},ue=()=>{R.value.resetFields()},I=()=>{const{data:j,fileList:z}=R.value.getDatas();console.log(j,z)},G=()=>{R.value.toggleDescription()},U=async()=>{if(!await D.value.validate()){_t("error","请将表单属性填写完整!"),p.propTab="form";return}let z=["单选框","多选框","选项","标签","文本框","分组面板"],ee=r(s.value);if(ee.datas={},le(z,ee.components))return ee},le=(j,z,ee)=>{var ye,De;let oe=!0;for(let _e=0;_e<z.length;_e++){let Be=z[_e];if(delete Be.isEdit,delete Be.isInput,delete Be.name,delete Be.rules,delete Be.excludeFilterConditions,delete Be.filterConditionProps,j.find(Ke=>Be.props.label.indexOf(Ke)===0)){_t("error",`请将${ee?`【${ee}】中`:""}第${_e+1}个项目的【${Be.props.label}】调整为合理描述!`),oe=!1;break}if((ye=Be.props.options)!=null&&ye.length){for(let Ke=0;Ke<Be.props.options.length;Ke++){let We=Be.props.options[Ke];if(j.find(ct=>We.label.indexOf(ct)===0)){_t("error",`请将【${Be.props.label}】的第${Ke+1}个选项的【${We.label}】调整为合理描述!`),oe=!1;break}}if(!oe)break}a(z[_e].props.defaultValue)&&(z[_e].props.defaultValue=void 0),Be.isLayout&&((De=Be==null?void 0:Be.children)!=null&&De.length)&&(oe=le(j,Be.children,Be.props.label))}return oe};return(j,z)=>{var Mt;const ee=Je,oe=X9,ye=Y9,De=ut,_e=xt,Be=wu,Ke=bC,We=gC,ct=Gi;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",eB,[e.createElementVNode("div",tB,[e.createVNode(ye,{modelValue:e.unref(g),"onUpdate:modelValue":z[0]||(z[0]=ke=>e.isRef(g)?g.value=ke:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(ke,It)=>(e.openBlock(),e.createBlock(oe,{key:It,title:ke.name,name:ke.name},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{list:ke.types,"item-key":"type",tag:"div",class:"component-list",clone:Y=>M(Y),sort:!1,onRemove:Y=>$(Y.oldIndex,ke),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Y})=>[e.createElementVNode("div",{class:"component-item",onClick:Oe=>O(Y,ke)},[e.createVNode(ee,{name:Y.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",oB,e.toDisplayString(Y.name),1)],8,nB)]),_:2},1032,["list","clone","onRemove"])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),e.unref(s).props?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["center-wrap",{"open-props":e.unref(h)}])},[e.createVNode(jp,{operates:e.unref(w),onClearComponents:x,onBatchAdd:B,onViewFormJson:L,onPreviewFrom:X,onSaveFrom:F},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(p).device])},[e.unref(y)?(e.openBlock(),e.createBlock(De,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":z[1]||(z[1]=ke=>e.unref(s).props.formName=ke),placeholder:"单击输入标题",onBlur:z[2]||(z[2]=ke=>y.value=!1),onKeydown:z[3]||(z[3]=e.withKeys(ke=>y.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:z[4]||(z[4]=ke=>y.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(Mt=e.unref(s).components)!=null&&Mt.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rB,"从左侧拖拽组件")),e.createVNode(_e,{class:"designer-form","label-position":e.unref(s).props.labelPosition,"label-width":e.unref(s).props.labelWidth,size:e.unref(s).props.size,"status-icon":!1,"show-message":!1,disabled:""},{default:e.withCtx(()=>[e.createVNode(Ap,{components:e.unref(s).components,"onUpdate:components":z[5]||(z[5]=ke=>e.unref(s).components=ke),onDeleteComponent:S},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(p).device==="mobile"?(e.openBlock(),e.createElementBlock("div",lB)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(h)?"show":"hidden"]),title:e.unref(h)?"隐藏属性配置面板":"打开属性配置面板",onClick:z[6]||(z[6]=ke=>h.value=!e.unref(h))},null,10,aB),e.unref(h)?(e.openBlock(),e.createElementBlock("div",iB,[e.createVNode(We,{class:"prop-tabs",modelValue:e.unref(p).propTab,"onUpdate:modelValue":z[9]||(z[9]=ke=>e.unref(p).propTab=ke),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ke,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(p).selectComponent?(e.openBlock(),e.createBlock(ye,{key:1,modelValue:e.unref(m),"onUpdate:modelValue":z[8]||(z[8]=ke=>e.isRef(m)?m.value=ke:null)},{default:e.withCtx(()=>[e.createVNode(oe,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(vS,{dictionary:t.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(p).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(oe,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(p).selectComponent.type].propEditor),{componentProps:e.unref(p).selectComponent.props,"onUpdate:componentProps":z[7]||(z[7]=ke=>e.unref(p).selectComponent.props=ke),dictionary:t.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(oe,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(FS)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(Be,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ke,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(HS,{key:0,ref_key:"formPropsEditorRef",ref:D},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(j.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(j.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(ct,{modelValue:e.unref(W),"onUpdate:modelValue":z[10]||(z[10]=ke=>e.isRef(W)?W.value=ke:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",sB,[e.createVNode(jp,{operates:["validateForm","resetForm",t.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Q,onResetForm:ue,onViewDataJson:I,onToggleDescription:G},null,8,["operates"]),e.createVNode($o,{watching:"",ref_key:"rendererForm",ref:R,formData:e.unref(s),uploadOptions:t.uploadOptions,device:e.unref(p).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(ct,{modelValue:e.unref(H),"onUpdate:modelValue":z[11]||(z[11]=ke=>e.isRef(H)?H.value=ke:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Z)),1)]),_:1},8,["modelValue"]),e.unref(P)?(e.openBlock(),e.createBlock(PS,{key:0,modelValue:e.unref(P),"onUpdate:modelValue":z[12]||(z[12]=ke=>e.isRef(P)?P.value=ke:null),params:e.unref(u),onSelect:T},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),_T="";nl.install=function(t){t.component(nl.name,nl)},$o.install=function(t){t.component($o.name,$o)},Je.install=function(t){t.component(Je.name,Je)};const dB=[Je,nl,$o,tr],fB={install:function(t,n){dB.forEach(o=>{t.component(o.name,o)})}};Le.ZhyDynamicFilter=tr,Le.ZhyFormDesigner=nl,Le.ZhyFormRenderer=$o,Le.ZhyIcon=Je,Le.default=fB,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var iV="1.15.2";function vn(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Hn=vn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Fr=vn(/Edge/i),lp=vn(/firefox/i),vr=vn(/safari/i)&&!vn(/chrome/i)&&!vn(/android/i),ap=vn(/iP(ad|od|hone)/i),ip=vn(/chrome/i)&&vn(/android/i),sp={capture:!1,passive:!1};function $e(t,n,o){t.addEventListener(n,o,!Hn&&sp)}function Ee(t,n,o){t.removeEventListener(n,o,!Hn&&sp)}function oa(t,n){if(n){if(n[0]===">"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch{return!1}return!1}}function sV(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function on(t,n,o,r){if(t){o=o||document;do{if(n!=null&&(n[0]===">"?t.parentNode===o&&oa(t,n):oa(t,n))||r&&t===o)return t;if(t===o)break}while(t=sV(t))}return null}var cp=/\s+/g;function Ye(t,n,o){if(t&&n)if(t.classList)t.classList[o?"add":"remove"](n);else{var r=(" "+t.className+" ").replace(cp," ").replace(" "+n+" "," ");t.className=(r+(o?" "+n:"")).replace(cp," ")}}function de(t,n,o){var r=t&&t.style;if(r){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),n===void 0?o:o[n];!(n in r)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),r[n]=o+(typeof o=="string"?"":"px")}}function So(t,n){var o="";if(typeof t=="string")o=t;else do{var r=de(t,"transform");r&&r!=="none"&&(o=r+" "+o)}while(!n&&(t=t.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(o)}function dp(t,n,o){if(t){var r=t.getElementsByTagName(n),l=0,a=r.length;if(o)for(;l<a;l++)o(r[l],l);return r}return[]}function $n(){var t=document.scrollingElement;return t||document.documentElement}function qe(t,n,o,r,l){if(!(!t.getBoundingClientRect&&t!==window)){var a,i,s,c,d,u,p;if(t!==window&&t.parentNode&&t!==$n()?(a=t.getBoundingClientRect(),i=a.top,s=a.left,c=a.bottom,d=a.right,u=a.height,p=a.width):(i=0,s=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(n||o)&&t!==window&&(l=l||t.parentNode,!Hn))do if(l&&l.getBoundingClientRect&&(de(l,"transform")!=="none"||o&&de(l,"position")!=="static")){var h=l.getBoundingClientRect();i-=h.top+parseInt(de(l,"border-top-width")),s-=h.left+parseInt(de(l,"border-left-width")),c=i+a.height,d=s+a.width;break}while(l=l.parentNode);if(r&&t!==window){var m=So(l||t),g=m&&m.a,f=m&&m.d;m&&(i/=f,s/=g,p/=g,u/=f,c=i+u,d=s+p)}return{top:i,left:s,bottom:c,right:d,width:p,height:u}}}function fp(t,n,o){for(var r=ro(t,!0),l=qe(t)[n];r;){var a=qe(r)[o],i=void 0;if(o==="top"||o==="left"?i=l>=a:i=l<=a,!i)return r;if(r===$n())break;r=ro(r,!1)}return!1}function nr(t,n,o,r){for(var l=0,a=0,i=t.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==fe.ghost&&(r||i[a]!==fe.dragged)&&on(i[a],o.draggable,t,!1)){if(l===n)return i[a];l++}a++}return null}function fs(t,n){for(var o=t.lastElementChild;o&&(o===fe.ghost||de(o,"display")==="none"||n&&!oa(o,n));)o=o.previousElementSibling;return o||null}function Qe(t,n){var o=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==fe.clone&&(!n||oa(t,n))&&o++;return o}function up(t){var n=0,o=0,r=$n();if(t)do{var l=So(t),a=l.a,i=l.d;n+=t.scrollLeft*a,o+=t.scrollTop*i}while(t!==r&&(t=t.parentNode));return[n,o]}function cV(t,n){for(var o in t)if(t.hasOwnProperty(o)){for(var r in n)if(n.hasOwnProperty(r)&&n[r]===t[o][r])return Number(o)}return-1}function ro(t,n){if(!t||!t.getBoundingClientRect)return $n();var o=t,r=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var l=de(o);if(o.clientWidth<o.scrollWidth&&(l.overflowX=="auto"||l.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(l.overflowY=="auto"||l.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return $n();if(r||n)return o;r=!0}}while(o=o.parentNode);return $n()}function dV(t,n){if(t&&n)for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o]);return t}function us(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}var Hr;function pp(t,n){return function(){if(!Hr){var o=arguments,r=this;o.length===1?t.call(r,o[0]):t.apply(r,o),Hr=setTimeout(function(){Hr=void 0},n)}}}function fV(){clearTimeout(Hr),Hr=void 0}function mp(t,n,o){t.scrollLeft+=n,t.scrollTop+=o}function ps(t){var n=window.Polymer,o=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):o?o(t).clone(!0)[0]:t.cloneNode(!0)}function hp(t,n){de(t,"position","absolute"),de(t,"top",n.top),de(t,"left",n.left),de(t,"width",n.width),de(t,"height",n.height)}function ms(t){de(t,"position",""),de(t,"top",""),de(t,"left",""),de(t,"width",""),de(t,"height","")}function gp(t,n,o){var r={};return Array.from(t.children).forEach(function(l){var a,i,s,c;if(!(!on(l,n.draggable,t,!1)||l.animated||l===o)){var d=qe(l);r.left=Math.min((a=r.left)!==null&&a!==void 0?a:1/0,d.left),r.top=Math.min((i=r.top)!==null&&i!==void 0?i:1/0,d.top),r.right=Math.max((s=r.right)!==null&&s!==void 0?s:-1/0,d.right),r.bottom=Math.max((c=r.bottom)!==null&&c!==void 0?c:-1/0,d.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var mt="Sortable"+new Date().getTime();function uV(){var t=[],n;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(l){if(!(de(l,"display")==="none"||l===fe.ghost)){t.push({target:l,rect:qe(l)});var a=Tn({},t[t.length-1].rect);if(l.thisAnimationDuration){var i=So(l,!0);i&&(a.top-=i.f,a.left-=i.e)}l.fromRect=a}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(cV(t,{target:r}),1)},animateAll:function(r){var l=this;if(!this.options.animation){clearTimeout(n),typeof r=="function"&&r();return}var a=!1,i=0;t.forEach(function(s){var c=0,d=s.target,u=d.fromRect,p=qe(d),h=d.prevFromRect,m=d.prevToRect,g=s.rect,f=So(d,!0);f&&(p.top-=f.f,p.left-=f.e),d.toRect=p,d.thisAnimationDuration&&us(h,p)&&!us(u,p)&&(g.top-p.top)/(g.left-p.left)===(u.top-p.top)/(u.left-p.left)&&(c=mV(g,h,m,l.options)),us(p,u)||(d.prevFromRect=u,d.prevToRect=p,c||(c=l.options.animation),l.animate(d,g,p,c)),c&&(a=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(n),a?n=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),t=[]},animate:function(r,l,a,i){if(i){de(r,"transition",""),de(r,"transform","");var s=So(this.el),c=s&&s.a,d=s&&s.d,u=(l.left-a.left)/(c||1),p=(l.top-a.top)/(d||1);r.animatingX=!!u,r.animatingY=!!p,de(r,"transform","translate3d("+u+"px,"+p+"px,0)"),this.forRepaintDummy=pV(r),de(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),de(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){de(r,"transition",""),de(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function pV(t){return t.offsetWidth}function mV(t,n,o,r){return Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))/Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))*r.animation}var or=[],hs={initializeByDefault:!0},jr={mount:function(n){for(var o in hs)hs.hasOwnProperty(o)&&!(o in n)&&(n[o]=hs[o]);or.forEach(function(r){if(r.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),or.push(n)},pluginEvent:function(n,o,r){var l=this;this.eventCanceled=!1,r.cancel=function(){l.eventCanceled=!0};var a=n+"Global";or.forEach(function(i){o[i.pluginName]&&(o[i.pluginName][a]&&o[i.pluginName][a](Tn({sortable:o},r)),o.options[i.pluginName]&&o[i.pluginName][n]&&o[i.pluginName][n](Tn({sortable:o},r)))})},initializePlugins:function(n,o,r,l){or.forEach(function(s){var c=s.pluginName;if(!(!n.options[c]&&!s.initializeByDefault)){var d=new s(n,o,n.options);d.sortable=n,d.options=n.options,n[c]=d,nn(r,d.defaults)}});for(var a in n.options)if(n.options.hasOwnProperty(a)){var i=this.modifyOption(n,a,n.options[a]);typeof i<"u"&&(n.options[a]=i)}},getEventProperties:function(n,o){var r={};return or.forEach(function(l){typeof l.eventProperties=="function"&&nn(r,l.eventProperties.call(o[l.pluginName],n))}),r},modifyOption:function(n,o,r){var l;return or.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[o]=="function"&&(l=a.optionListeners[o].call(n[a.pluginName],r))}),l}};function Ur(t){var n=t.sortable,o=t.rootEl,r=t.name,l=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,c=t.oldIndex,d=t.newIndex,u=t.oldDraggableIndex,p=t.newDraggableIndex,h=t.originalEvent,m=t.putSortable,g=t.extraEventProperties;if(n=n||o&&o[mt],!!n){var f,y=n.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Hn&&!Fr?f=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(r,!0,!0)),f.to=i||o,f.from=s||o,f.item=l||o,f.clone=a,f.oldIndex=c,f.newIndex=d,f.oldDraggableIndex=u,f.newDraggableIndex=p,f.originalEvent=h,f.pullMode=m?m.lastPutMode:void 0;var k=Tn(Tn({},g),jr.getEventProperties(r,n));for(var w in k)f[w]=k[w];o&&o.dispatchEvent(f),y[b]&&y[b].call(n,f)}}var hV=["evt"],$t=function(n,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=r.evt,a=tV(r,hV);jr.pluginEvent.bind(fe)(n,o,Tn({dragEl:J,parentEl:et,ghostEl:ge,rootEl:Ge,nextEl:Bo,lastDownEl:ra,cloneEl:Xe,cloneHidden:lo,dragStarted:Kr,putSortable:st,activeSortable:fe.active,originalEvent:l,oldIndex:rr,oldDraggableIndex:qr,newIndex:qt,newDraggableIndex:ao,hideGhostForTarget:Vp,unhideGhostForTarget:Ep,cloneNowHidden:function(){lo=!0},cloneNowShown:function(){lo=!1},dispatchSortableEvent:function(s){kt({sortable:o,name:s,originalEvent:l})}},a))};function kt(t){Ur(Tn({putSortable:st,cloneEl:Xe,targetEl:J,rootEl:Ge,oldIndex:rr,oldDraggableIndex:qr,newIndex:qt,newDraggableIndex:ao},t))}var J,et,ge,Ge,Bo,ra,Xe,lo,rr,qt,qr,ao,la,st,lr=!1,aa=!1,ia=[],No,hn,gs,bs,bp,yp,Kr,ar,Wr,Gr=!1,sa=!1,ca,ht,ys=[],ws=!1,da=[],fa=typeof document<"u",ua=ap,wp=Fr||Hn?"cssFloat":"float",gV=fa&&!ip&&!ap&&"draggable"in document.createElement("div"),Cp=function(){if(fa){if(Hn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),_p=function(n,o){var r=de(n),l=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=nr(n,0,o),i=nr(n,1,o),s=a&&de(a),c=i&&de(i),d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+qe(a).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+qe(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var p=s.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||d>=l&&r[wp]==="none"||i&&r[wp]==="none"&&d+u>l)?"vertical":"horizontal"},bV=function(n,o,r){var l=r?n.left:n.top,a=r?n.right:n.bottom,i=r?n.width:n.height,s=r?o.left:o.top,c=r?o.right:o.bottom,d=r?o.width:o.height;return l===s||a===c||l+i/2===s+d/2},yV=function(n,o){var r;return ia.some(function(l){var a=l[mt].options.emptyInsertThreshold;if(!(!a||fs(l))){var i=qe(l),s=n>=i.left-a&&n<=i.right+a,c=o>=i.top-a&&o<=i.bottom+a;if(s&&c)return r=l}}),r},kp=function(n){function o(a,i){return function(s,c,d,u){var p=s.options.group.name&&c.options.group.name&&s.options.group.name===c.options.group.name;if(a==null&&(i||p))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return o(a(s,c,d,u),i)(s,c,d,u);var h=(i?s:c).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var r={},l=n.group;(!l||na(l)!="object")&&(l={name:l}),r.name=l.name,r.checkPull=o(l.pull,!0),r.checkPut=o(l.put),r.revertClone=l.revertClone,n.group=r},Vp=function(){!Cp&&ge&&de(ge,"display","none")},Ep=function(){!Cp&&ge&&de(ge,"display","")};fa&&!ip&&document.addEventListener("click",function(t){if(aa)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),aa=!1,!1},!0);var xo=function(n){if(J){n=n.touches?n.touches[0]:n;var o=yV(n.clientX,n.clientY);if(o){var r={};for(var l in n)n.hasOwnProperty(l)&&(r[l]=n[l]);r.target=r.rootEl=o,r.preventDefault=void 0,r.stopPropagation=void 0,o[mt]._onDragOver(r)}}},wV=function(n){J&&J.parentNode[mt]._isOutsideThisEl(n.target)};function fe(t,n){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=nn({},n),t[mt]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _p(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:fe.supportPointer!==!1&&"PointerEvent"in window&&!vr,emptyInsertThreshold:5};jr.initializePlugins(this,t,o);for(var r in o)!(r in n)&&(n[r]=o[r]);kp(n);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=n.forceFallback?!1:gV,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?$e(t,"pointerdown",this._onTapStart):($e(t,"mousedown",this._onTapStart),$e(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($e(t,"dragover",this),$e(t,"dragenter",this)),ia.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),nn(this,uV())}fe.prototype={constructor:fe,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ar=null)},_getDirection:function(n,o){return typeof this.options.direction=="function"?this.options.direction.call(this,n,o,J):this.options.direction},_onTapStart:function(n){if(n.cancelable){var o=this,r=this.el,l=this.options,a=l.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(s||n).target,d=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=l.filter;if(NV(r),!J&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||l.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&vr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=on(c,l.draggable,r,!1),!(c&&c.animated)&&ra!==c)){if(rr=Qe(c),qr=Qe(c,l.draggable),typeof u=="function"){if(u.call(this,n,c,this)){kt({sortable:o,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),$t("filter",o,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(p){if(p=on(d,p.trim(),r,!1),p)return kt({sortable:o,rootEl:p,name:"filter",targetEl:c,fromEl:r,toEl:r}),$t("filter",o,{evt:n}),!0}),u)){a&&n.cancelable&&n.preventDefault();return}l.handle&&!on(d,l.handle,r,!1)||this._prepareDragStart(n,s,c)}}},_prepareDragStart:function(n,o,r){var l=this,a=l.el,i=l.options,s=a.ownerDocument,c;if(r&&!J&&r.parentNode===a){var d=qe(r);if(Ge=a,J=r,et=J.parentNode,Bo=J.nextSibling,ra=r,la=i.group,fe.dragged=J,No={target:J,clientX:(o||n).clientX,clientY:(o||n).clientY},bp=No.clientX-d.left,yp=No.clientY-d.top,this._lastX=(o||n).clientX,this._lastY=(o||n).clientY,J.style["will-change"]="all",c=function(){if($t("delayEnded",l,{evt:n}),fe.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!lp&&l.nativeDraggable&&(J.draggable=!0),l._triggerDragStart(n,o),kt({sortable:l,name:"choose",originalEvent:n}),Ye(J,i.chosenClass,!0)},i.ignore.split(",").forEach(function(u){dp(J,u.trim(),Cs)}),$e(s,"dragover",xo),$e(s,"mousemove",xo),$e(s,"touchmove",xo),$e(s,"mouseup",l._onDrop),$e(s,"touchend",l._onDrop),$e(s,"touchcancel",l._onDrop),lp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),$t("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(Fr||Hn))){if(fe.eventCanceled){this._onDrop();return}$e(s,"mouseup",l._disableDelayedDrag),$e(s,"touchend",l._disableDelayedDrag),$e(s,"touchcancel",l._disableDelayedDrag),$e(s,"mousemove",l._delayedDragTouchMoveHandler),$e(s,"touchmove",l._delayedDragTouchMoveHandler),i.supportPointer&&$e(s,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var o=n.touches?n.touches[0]:n;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&Cs(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Ee(n,"mouseup",this._disableDelayedDrag),Ee(n,"touchend",this._disableDelayedDrag),Ee(n,"touchcancel",this._disableDelayedDrag),Ee(n,"mousemove",this._delayedDragTouchMoveHandler),Ee(n,"touchmove",this._delayedDragTouchMoveHandler),Ee(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,o){o=o||n.pointerType=="touch"&&n,!this.nativeDraggable||o?this.options.supportPointer?$e(document,"pointermove",this._onTouchMove):o?$e(document,"touchmove",this._onTouchMove):$e(document,"mousemove",this._onTouchMove):($e(J,"dragend",this),$e(Ge,"dragstart",this._onDragStart));try{document.selection?ma(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,o){if(lr=!1,Ge&&J){$t("dragStarted",this,{evt:o}),this.nativeDraggable&&$e(document,"dragover",wV);var r=this.options;!n&&Ye(J,r.dragClass,!1),Ye(J,r.ghostClass,!0),fe.active=this,n&&this._appendGhost(),kt({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(hn){this._lastX=hn.clientX,this._lastY=hn.clientY,Vp();for(var n=document.elementFromPoint(hn.clientX,hn.clientY),o=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(hn.clientX,hn.clientY),n!==o);)o=n;if(J.parentNode[mt]._isOutsideThisEl(n),o)do{if(o[mt]){var r=void 0;if(r=o[mt]._onDragOver({clientX:hn.clientX,clientY:hn.clientY,target:n,rootEl:o}),r&&!this.options.dragoverBubble)break}n=o}while(o=o.parentNode);Ep()}},_onTouchMove:function(n){if(No){var o=this.options,r=o.fallbackTolerance,l=o.fallbackOffset,a=n.touches?n.touches[0]:n,i=ge&&So(ge,!0),s=ge&&i&&i.a,c=ge&&i&&i.d,d=ua&&ht&&up(ht),u=(a.clientX-No.clientX+l.x)/(s||1)+(d?d[0]-ys[0]:0)/(s||1),p=(a.clientY-No.clientY+l.y)/(c||1)+(d?d[1]-ys[1]:0)/(c||1);if(!fe.active&&!lr){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(n,!0)}if(ge){i?(i.e+=u-(gs||0),i.f+=p-(bs||0)):i={a:1,b:0,c:0,d:1,e:u,f:p};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");de(ge,"webkitTransform",h),de(ge,"mozTransform",h),de(ge,"msTransform",h),de(ge,"transform",h),gs=u,bs=p,hn=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!ge){var n=this.options.fallbackOnBody?document.body:Ge,o=qe(J,!0,ua,!0,n),r=this.options;if(ua){for(ht=n;de(ht,"position")==="static"&&de(ht,"transform")==="none"&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=$n()),o.top+=ht.scrollTop,o.left+=ht.scrollLeft):ht=$n(),ys=up(ht)}ge=J.cloneNode(!0),Ye(ge,r.ghostClass,!1),Ye(ge,r.fallbackClass,!0),Ye(ge,r.dragClass,!0),de(ge,"transition",""),de(ge,"transform",""),de(ge,"box-sizing","border-box"),de(ge,"margin",0),de(ge,"top",o.top),de(ge,"left",o.left),de(ge,"width",o.width),de(ge,"height",o.height),de(ge,"opacity","0.8"),de(ge,"position",ua?"absolute":"fixed"),de(ge,"zIndex","100000"),de(ge,"pointerEvents","none"),fe.ghost=ge,n.appendChild(ge),de(ge,"transform-origin",bp/parseInt(ge.style.width)*100+"% "+yp/parseInt(ge.style.height)*100+"%")}},_onDragStart:function(n,o){var r=this,l=n.dataTransfer,a=r.options;if($t("dragStart",this,{evt:n}),fe.eventCanceled){this._onDrop();return}$t("setupClone",this),fe.eventCanceled||(Xe=ps(J),Xe.removeAttribute("id"),Xe.draggable=!1,Xe.style["will-change"]="",this._hideClone(),Ye(Xe,this.options.chosenClass,!1),fe.clone=Xe),r.cloneId=ma(function(){$t("clone",r),!fe.eventCanceled&&(r.options.removeCloneOnHide||Ge.insertBefore(Xe,J),r._hideClone(),kt({sortable:r,name:"clone"}))}),!o&&Ye(J,a.dragClass,!0),o?(aa=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Ee(document,"mouseup",r._onDrop),Ee(document,"touchend",r._onDrop),Ee(document,"touchcancel",r._onDrop),l&&(l.effectAllowed="move",a.setData&&a.setData.call(r,l,J)),$e(document,"drop",r),de(J,"transform","translateZ(0)")),lr=!0,r._dragStartId=ma(r._dragStarted.bind(r,o,n)),$e(document,"selectstart",r),Kr=!0,vr&&de(document.body,"user-select","none")},_onDragOver:function(n){var o=this.el,r=n.target,l,a,i,s=this.options,c=s.group,d=fe.active,u=la===c,p=s.sort,h=st||d,m,g=this,f=!1;if(ws)return;function y(D,F){$t(D,g,Tn({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:i,dragRect:l,targetRect:a,canSort:p,fromSortable:h,target:r,completed:k,onMove:function(W,X){return pa(Ge,o,J,l,W,qe(W),n,X)},changed:w},F))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function k(D){return y("dragOverCompleted",{insertion:D}),D&&(u?d._hideClone():d._showClone(g),g!==h&&(Ye(J,st?st.options.ghostClass:d.options.ghostClass,!1),Ye(J,s.ghostClass,!0)),st!==g&&g!==fe.active?st=g:g===fe.active&&st&&(st=null),h===g&&(g._ignoreWhileAnimating=r),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===J&&!J.animated||r===o&&!r.animated)&&(ar=null),!s.dragoverBubble&&!n.rootEl&&r!==document&&(J.parentNode[mt]._isOutsideThisEl(n.target),!D&&xo(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),f=!0}function w(){qt=Qe(J),ao=Qe(J,s.draggable),kt({sortable:g,name:"change",toEl:o,newIndex:qt,newDraggableIndex:ao,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),r=on(r,s.draggable,o,!0),y("dragOver"),fe.eventCanceled)return f;if(J.contains(n.target)||r.animated&&r.animatingX&&r.animatingY||g._ignoreWhileAnimating===r)return k(!1);if(aa=!1,d&&!s.disabled&&(u?p||(i=et!==Ge):st===this||(this.lastPutMode=la.checkPull(this,d,J,n))&&c.checkPut(this,d,J,n))){if(m=this._getDirection(n,r)==="vertical",l=qe(J),y("dragOverValid"),fe.eventCanceled)return f;if(i)return et=Ge,b(),this._hideClone(),y("revert"),fe.eventCanceled||(Bo?Ge.insertBefore(J,Bo):Ge.appendChild(J)),k(!0);var _=fs(o,s.draggable);if(!_||VV(n,m,this)&&!_.animated){if(_===J)return k(!1);if(_&&o===n.target&&(r=_),r&&(a=qe(r)),pa(Ge,o,J,l,r,a,n,!!r)!==!1)return b(),_&&_.nextSibling?o.insertBefore(J,_.nextSibling):o.appendChild(J),et=o,w(),k(!0)}else if(_&&kV(n,m,this)){var C=nr(o,0,s,!0);if(C===J)return k(!1);if(r=C,a=qe(r),pa(Ge,o,J,l,r,a,n,!1)!==!1)return b(),o.insertBefore(J,C),et=o,w(),k(!0)}else if(r.parentNode===o){a=qe(r);var V=0,E,N=J.parentNode!==o,O=!bV(J.animated&&J.toRect||l,r.animated&&r.toRect||a,m),M=m?"top":"left",$=fp(r,"top","top")||fp(J,"top","top"),S=$?$.scrollTop:void 0;ar!==r&&(E=a[M],Gr=!1,sa=!O&&s.invertSwap||N),V=EV(n,r,a,m,O?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,sa,ar===r);var x;if(V!==0){var P=Qe(J);do P-=V,x=et.children[P];while(x&&(de(x,"display")==="none"||x===ge))}if(V===0||x===r)return k(!1);ar=r,Wr=V;var B=r.nextElementSibling,T=!1;T=V===1;var L=pa(Ge,o,J,l,r,a,n,T);if(L!==!1)return(L===1||L===-1)&&(T=L===1),ws=!0,setTimeout(_V,30),b(),T&&!B?o.appendChild(J):r.parentNode.insertBefore(J,T?B:r),$&&mp($,0,S-$.scrollTop),et=J.parentNode,E!==void 0&&!sa&&(ca=Math.abs(E-qe(r)[M])),w(),k(!0)}if(o.contains(J))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ee(document,"mousemove",this._onTouchMove),Ee(document,"touchmove",this._onTouchMove),Ee(document,"pointermove",this._onTouchMove),Ee(document,"dragover",xo),Ee(document,"mousemove",xo),Ee(document,"touchmove",xo)},_offUpEvents:function(){var n=this.el.ownerDocument;Ee(n,"mouseup",this._onDrop),Ee(n,"touchend",this._onDrop),Ee(n,"pointerup",this._onDrop),Ee(n,"touchcancel",this._onDrop),Ee(document,"selectstart",this)},_onDrop:function(n){var o=this.el,r=this.options;if(qt=Qe(J),ao=Qe(J,r.draggable),$t("drop",this,{evt:n}),et=J&&J.parentNode,qt=Qe(J),ao=Qe(J,r.draggable),fe.eventCanceled){this._nulling();return}lr=!1,sa=!1,Gr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_s(this.cloneId),_s(this._dragStartId),this.nativeDraggable&&(Ee(document,"drop",this),Ee(o,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vr&&de(document.body,"user-select",""),de(J,"transform",""),n&&(Kr&&(n.cancelable&&n.preventDefault(),!r.dropBubble&&n.stopPropagation()),ge&&ge.parentNode&&ge.parentNode.removeChild(ge),(Ge===et||st&&st.lastPutMode!=="clone")&&Xe&&Xe.parentNode&&Xe.parentNode.removeChild(Xe),J&&(this.nativeDraggable&&Ee(J,"dragend",this),Cs(J),J.style["will-change"]="",Kr&&!lr&&Ye(J,st?st.options.ghostClass:this.options.ghostClass,!1),Ye(J,this.options.chosenClass,!1),kt({sortable:this,name:"unchoose",toEl:et,newIndex:null,newDraggableIndex:null,originalEvent:n}),Ge!==et?(qt>=0&&(kt({rootEl:et,name:"add",toEl:et,fromEl:Ge,originalEvent:n}),kt({sortable:this,name:"remove",toEl:et,originalEvent:n}),kt({rootEl:et,name:"sort",toEl:et,fromEl:Ge,originalEvent:n}),kt({sortable:this,name:"sort",toEl:et,originalEvent:n})),st&&st.save()):qt!==rr&&qt>=0&&(kt({sortable:this,name:"update",toEl:et,originalEvent:n}),kt({sortable:this,name:"sort",toEl:et,originalEvent:n})),fe.active&&((qt==null||qt===-1)&&(qt=rr,ao=qr),kt({sortable:this,name:"end",toEl:et,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){$t("nulling",this),Ge=J=et=ge=Bo=Xe=ra=lo=No=hn=Kr=qt=ao=rr=qr=ar=Wr=st=la=fe.dragged=fe.ghost=fe.clone=fe.active=null,da.forEach(function(n){n.checked=!0}),da.length=gs=bs=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":J&&(this._onDragOver(n),CV(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],o,r=this.el.children,l=0,a=r.length,i=this.options;l<a;l++)o=r[l],on(o,i.draggable,this.el,!1)&&n.push(o.getAttribute(i.dataIdAttr)||BV(o));return n},sort:function(n,o){var r={},l=this.el;this.toArray().forEach(function(a,i){var s=l.children[i];on(s,this.options.draggable,l,!1)&&(r[a]=s)},this),o&&this.captureAnimationState(),n.forEach(function(a){r[a]&&(l.removeChild(r[a]),l.appendChild(r[a]))}),o&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,o){return on(n,o||this.options.draggable,this.el,!1)},option:function(n,o){var r=this.options;if(o===void 0)return r[n];var l=jr.modifyOption(this,n,o);typeof l<"u"?r[n]=l:r[n]=o,n==="group"&&kp(r)},destroy:function(){$t("destroy",this);var n=this.el;n[mt]=null,Ee(n,"mousedown",this._onTapStart),Ee(n,"touchstart",this._onTapStart),Ee(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ee(n,"dragover",this),Ee(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ia.splice(ia.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!lo){if($t("hideClone",this),fe.eventCanceled)return;de(Xe,"display","none"),this.options.removeCloneOnHide&&Xe.parentNode&&Xe.parentNode.removeChild(Xe),lo=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(lo){if($t("showClone",this),fe.eventCanceled)return;J.parentNode==Ge&&!this.options.group.revertClone?Ge.insertBefore(Xe,J):Bo?Ge.insertBefore(Xe,Bo):Ge.appendChild(Xe),this.options.group.revertClone&&this.animate(J,Xe),de(Xe,"display",""),lo=!1}}};function CV(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function pa(t,n,o,r,l,a,i,s){var c,d=t[mt],u=d.options.onMove,p;return window.CustomEvent&&!Hn&&!Fr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=t,c.dragged=o,c.draggedRect=r,c.related=l||n,c.relatedRect=a||qe(n),c.willInsertAfter=s,c.originalEvent=i,t.dispatchEvent(c),u&&(p=u.call(d,c,i)),p}function Cs(t){t.draggable=!1}function _V(){ws=!1}function kV(t,n,o){var r=qe(nr(o.el,0,o.options,!0)),l=gp(o.el,o.options,ge),a=10;return n?t.clientX<l.left-a||t.clientY<r.top&&t.clientX<r.right:t.clientY<l.top-a||t.clientY<r.bottom&&t.clientX<r.left}function VV(t,n,o){var r=qe(fs(o.el,o.options.draggable)),l=gp(o.el,o.options,ge),a=10;return n?t.clientX>l.right+a||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>l.bottom+a||t.clientX>r.right&&t.clientY>r.top}function EV(t,n,o,r,l,a,i,s){var c=r?t.clientY:t.clientX,d=r?o.height:o.width,u=r?o.top:o.left,p=r?o.bottom:o.right,h=!1;if(!i){if(s&&ca<d*l){if(!Gr&&(Wr===1?c>u+d*a/2:c<p-d*a/2)&&(Gr=!0),Gr)h=!0;else if(Wr===1?c<u+ca:c>p-ca)return-Wr}else if(c>u+d*(1-l)/2&&c<p-d*(1-l)/2)return SV(n)}return h=h||i,h&&(c<u+d*a/2||c>p-d*a/2)?c>u+d/2?1:-1:0}function SV(t){return Qe(J)<Qe(t)?1:-1}function BV(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,o=n.length,r=0;o--;)r+=n.charCodeAt(o);return r.toString(36)}function NV(t){da.length=0;for(var n=t.getElementsByTagName("input"),o=n.length;o--;){var r=n[o];r.checked&&da.push(r)}}function ma(t){return setTimeout(t,0)}function _s(t){return clearTimeout(t)}fa&&$e(document,"touchmove",function(t){(fe.active||lr)&&t.cancelable&&t.preventDefault()}),fe.utils={on:$e,off:Ee,css:de,find:dp,is:function(n,o){return!!on(n,o,n,!1)},extend:dV,throttle:pp,closest:on,toggleClass:Ye,clone:ps,index:Qe,nextTick:ma,cancelNextTick:_s,detectDirection:_p,getChild:nr},fe.get=function(t){return t[mt]},fe.mount=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0].constructor===Array&&(n=n[0]),n.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(fe.utils=Tn(Tn({},fe.utils),r.utils)),jr.mount(r)})},fe.create=function(t,n){return new fe(t,n)},fe.version=iV;var rt=[],Yr,ks,Vs=!1,Es,Ss,ha,Xr;function xV(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return t.prototype={dragStarted:function(o){var r=o.originalEvent;this.sortable.nativeDraggable?$e(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$e(document,"pointermove",this._handleFallbackAutoScroll):r.touches?$e(document,"touchmove",this._handleFallbackAutoScroll):$e(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var r=o.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Ee(document,"dragover",this._handleAutoScroll):(Ee(document,"pointermove",this._handleFallbackAutoScroll),Ee(document,"touchmove",this._handleFallbackAutoScroll),Ee(document,"mousemove",this._handleFallbackAutoScroll)),Sp(),ga(),fV()},nulling:function(){ha=ks=Yr=Vs=Xr=Es=Ss=null,rt.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,r){var l=this,a=(o.touches?o.touches[0]:o).clientX,i=(o.touches?o.touches[0]:o).clientY,s=document.elementFromPoint(a,i);if(ha=o,r||this.options.forceAutoScrollFallback||Fr||Hn||vr){Bs(o,this.options,s,r);var c=ro(s,!0);Vs&&(!Xr||a!==Es||i!==Ss)&&(Xr&&Sp(),Xr=setInterval(function(){var d=ro(document.elementFromPoint(a,i),!0);d!==c&&(c=d,ga()),Bs(o,l.options,d,r)},10),Es=a,Ss=i)}else{if(!this.options.bubbleScroll||ro(s,!0)===$n()){ga();return}Bs(o,this.options,ro(s,!1),!1)}}},nn(t,{pluginName:"scroll",initializeByDefault:!0})}function ga(){rt.forEach(function(t){clearInterval(t.pid)}),rt=[]}function Sp(){clearInterval(Xr)}var Bs=pp(function(t,n,o,r){if(n.scroll){var l=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,i=n.scrollSensitivity,s=n.scrollSpeed,c=$n(),d=!1,u;ks!==o&&(ks=o,ga(),Yr=n.scroll,u=n.scrollFn,Yr===!0&&(Yr=ro(o,!0)));var p=0,h=Yr;do{var m=h,g=qe(m),f=g.top,y=g.bottom,b=g.left,k=g.right,w=g.width,_=g.height,C=void 0,V=void 0,E=m.scrollWidth,N=m.scrollHeight,O=de(m),M=m.scrollLeft,$=m.scrollTop;m===c?(C=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),V=_<N&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(C=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"),V=_<N&&(O.overflowY==="auto"||O.overflowY==="scroll"));var S=C&&(Math.abs(k-l)<=i&&M+w<E)-(Math.abs(b-l)<=i&&!!M),x=V&&(Math.abs(y-a)<=i&&$+_<N)-(Math.abs(f-a)<=i&&!!$);if(!rt[p])for(var P=0;P<=p;P++)rt[P]||(rt[P]={});(rt[p].vx!=S||rt[p].vy!=x||rt[p].el!==m)&&(rt[p].el=m,rt[p].vx=S,rt[p].vy=x,clearInterval(rt[p].pid),(S!=0||x!=0)&&(d=!0,rt[p].pid=setInterval((function(){r&&this.layer===0&&fe.active._onTouchMove(ha);var B=rt[this.layer].vy?rt[this.layer].vy*s:0,T=rt[this.layer].vx?rt[this.layer].vx*s:0;typeof u=="function"&&u.call(fe.dragged.parentNode[mt],T,B,t,ha,rt[this.layer].el)!=="continue"||mp(rt[this.layer].el,T,B)}).bind({layer:p}),24))),p++}while(n.bubbleScroll&&h!==c&&(h=ro(h,!1)));Vs=d}},30),Bp=function(n){var o=n.originalEvent,r=n.putSortable,l=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(o){var d=r||a;s();var u=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,p=document.elementFromPoint(u.clientX,u.clientY);c(),d&&!d.el.contains(p)&&(i("spill"),this.onSpill({dragEl:l,putSortable:r}))}};function Ns(){}Ns.prototype={startIndex:null,dragStart:function(n){var o=n.oldDraggableIndex;this.startIndex=o},onSpill:function(n){var o=n.dragEl,r=n.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var l=nr(this.sortable.el,this.startIndex,this.options);l?this.sortable.el.insertBefore(o,l):this.sortable.el.appendChild(o),this.sortable.animateAll(),r&&r.animateAll()},drop:Bp},nn(Ns,{pluginName:"revertOnSpill"});function xs(){}xs.prototype={onSpill:function(n){var o=n.dragEl,r=n.putSortable,l=r||this.sortable;l.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),l.animateAll()},drop:Bp},nn(xs,{pluginName:"removeOnSpill"});var rn;function TV(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(o){var r=o.dragEl;rn=r},dragOverValid:function(o){var r=o.completed,l=o.target,a=o.onMove,i=o.activeSortable,s=o.changed,c=o.cancel;if(i.options.swap){var d=this.sortable.el,u=this.options;if(l&&l!==d){var p=rn;a(l)!==!1?(Ye(l,u.swapClass,!0),rn=l):rn=null,p&&p!==rn&&Ye(p,u.swapClass,!1)}s(),r(!0),c()}},drop:function(o){var r=o.activeSortable,l=o.putSortable,a=o.dragEl,i=l||this.sortable,s=this.options;rn&&Ye(rn,s.swapClass,!1),rn&&(s.swap||l&&l.options.swap)&&a!==rn&&(i.captureAnimationState(),i!==r&&r.captureAnimationState(),$V(a,rn),i.animateAll(),i!==r&&r.animateAll())},nulling:function(){rn=null}},nn(t,{pluginName:"swap",eventProperties:function(){return{swapItem:rn}}})}function $V(t,n){var o=t.parentNode,r=n.parentNode,l,a;!o||!r||o.isEqualNode(n)||r.isEqualNode(t)||(l=Qe(t),a=Qe(n),o.isEqualNode(r)&&l<a&&a++,o.insertBefore(n,o.children[l]),r.insertBefore(t,r.children[a]))}var be=[],Kt=[],Zr,gn,Jr=!1,Ot=!1,ir=!1,He,Qr,ba;function OV(){function t(n){for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?$e(document,"pointerup",this._deselectMultiDrag):($e(document,"mouseup",this._deselectMultiDrag),$e(document,"touchend",this._deselectMultiDrag))),$e(document,"keydown",this._checkKeyDown),$e(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(l,a){var i="";be.length&&gn===n?be.forEach(function(s,c){i+=(c?", ":"")+s.textContent}):i=a.textContent,l.setData("Text",i)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(o){var r=o.dragEl;He=r},delayEnded:function(){this.isMultiDrag=~be.indexOf(He)},setupClone:function(o){var r=o.sortable,l=o.cancel;if(this.isMultiDrag){for(var a=0;a<be.length;a++)Kt.push(ps(be[a])),Kt[a].sortableIndex=be[a].sortableIndex,Kt[a].draggable=!1,Kt[a].style["will-change"]="",Ye(Kt[a],this.options.selectedClass,!1),be[a]===He&&Ye(Kt[a],this.options.chosenClass,!1);r._hideClone(),l()}},clone:function(o){var r=o.sortable,l=o.rootEl,a=o.dispatchSortableEvent,i=o.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||be.length&&gn===r&&(Np(!0,l),a("clone"),i()))},showClone:function(o){var r=o.cloneNowShown,l=o.rootEl,a=o.cancel;this.isMultiDrag&&(Np(!1,l),Kt.forEach(function(i){de(i,"display","")}),r(),ba=!1,a())},hideClone:function(o){var r=this;o.sortable;var l=o.cloneNowHidden,a=o.cancel;this.isMultiDrag&&(Kt.forEach(function(i){de(i,"display","none"),r.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),l(),ba=!0,a())},dragStartGlobal:function(o){o.sortable,!this.isMultiDrag&&gn&&gn.multiDrag._deselectMultiDrag(),be.forEach(function(r){r.sortableIndex=Qe(r)}),be=be.sort(function(r,l){return r.sortableIndex-l.sortableIndex}),ir=!0},dragStarted:function(o){var r=this,l=o.sortable;if(this.isMultiDrag){if(this.options.sort&&(l.captureAnimationState(),this.options.animation)){be.forEach(function(i){i!==He&&de(i,"position","absolute")});var a=qe(He,!1,!0,!0);be.forEach(function(i){i!==He&&hp(i,a)}),Ot=!0,Jr=!0}l.animateAll(function(){Ot=!1,Jr=!1,r.options.animation&&be.forEach(function(i){ms(i)}),r.options.sort&&ya()})}},dragOver:function(o){var r=o.target,l=o.completed,a=o.cancel;Ot&&~be.indexOf(r)&&(l(!1),a())},revert:function(o){var r=o.fromSortable,l=o.rootEl,a=o.sortable,i=o.dragRect;be.length>1&&(be.forEach(function(s){a.addAnimationState({target:s,rect:Ot?qe(s):i}),ms(s),s.fromRect=i,r.removeAnimationState(s)}),Ot=!1,MV(!this.options.removeCloneOnHide,l))},dragOverCompleted:function(o){var r=o.sortable,l=o.isOwner,a=o.insertion,i=o.activeSortable,s=o.parentEl,c=o.putSortable,d=this.options;if(a){if(l&&i._hideClone(),Jr=!1,d.animation&&be.length>1&&(Ot||!l&&!i.options.sort&&!c)){var u=qe(He,!1,!0,!0);be.forEach(function(h){h!==He&&(hp(h,u),s.appendChild(h))}),Ot=!0}if(!l)if(Ot||ya(),be.length>1){var p=ba;i._showClone(r),i.options.animation&&!ba&&p&&Kt.forEach(function(h){i.addAnimationState({target:h,rect:Qr}),h.fromRect=Qr,h.thisAnimationDuration=null})}else i._showClone(r)}},dragOverAnimationCapture:function(o){var r=o.dragRect,l=o.isOwner,a=o.activeSortable;if(be.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!l&&a.multiDrag.isMultiDrag){Qr=nn({},r);var i=So(He,!0);Qr.top-=i.f,Qr.left-=i.e}},dragOverAnimationComplete:function(){Ot&&(Ot=!1,ya())},drop:function(o){var r=o.originalEvent,l=o.rootEl,a=o.parentEl,i=o.sortable,s=o.dispatchSortableEvent,c=o.oldIndex,d=o.putSortable,u=d||this.sortable;if(r){var p=this.options,h=a.children;if(!ir)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ye(He,p.selectedClass,!~be.indexOf(He)),~be.indexOf(He))be.splice(be.indexOf(He),1),Zr=null,Ur({sortable:i,rootEl:l,name:"deselect",targetEl:He,originalEvent:r});else{if(be.push(He),Ur({sortable:i,rootEl:l,name:"select",targetEl:He,originalEvent:r}),r.shiftKey&&Zr&&i.el.contains(Zr)){var m=Qe(Zr),g=Qe(He);if(~m&&~g&&m!==g){var f,y;for(g>m?(y=m,f=g):(y=g,f=m+1);y<f;y++)~be.indexOf(h[y])||(Ye(h[y],p.selectedClass,!0),be.push(h[y]),Ur({sortable:i,rootEl:l,name:"select",targetEl:h[y],originalEvent:r}))}}else Zr=He;gn=u}if(ir&&this.isMultiDrag){if(Ot=!1,(a[mt].options.sort||a!==l)&&be.length>1){var b=qe(He),k=Qe(He,":not(."+this.options.selectedClass+")");if(!Jr&&p.animation&&(He.thisAnimationDuration=null),u.captureAnimationState(),!Jr&&(p.animation&&(He.fromRect=b,be.forEach(function(_){if(_.thisAnimationDuration=null,_!==He){var C=Ot?qe(_):b;_.fromRect=C,u.addAnimationState({target:_,rect:C})}})),ya(),be.forEach(function(_){h[k]?a.insertBefore(_,h[k]):a.appendChild(_),k++}),c===Qe(He))){var w=!1;be.forEach(function(_){if(_.sortableIndex!==Qe(_)){w=!0;return}}),w&&(s("update"),s("sort"))}be.forEach(function(_){ms(_)}),u.animateAll()}gn=u}(l===a||d&&d.lastPutMode!=="clone")&&Kt.forEach(function(_){_.parentNode&&_.parentNode.removeChild(_)})}},nullingGlobal:function(){this.isMultiDrag=ir=!1,Kt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Ee(document,"pointerup",this._deselectMultiDrag),Ee(document,"mouseup",this._deselectMultiDrag),Ee(document,"touchend",this._deselectMultiDrag),Ee(document,"keydown",this._checkKeyDown),Ee(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(o){if(!(typeof ir<"u"&&ir)&&gn===this.sortable&&!(o&&on(o.target,this.options.draggable,this.sortable.el,!1))&&!(o&&o.button!==0))for(;be.length;){var r=be[0];Ye(r,this.options.selectedClass,!1),be.shift(),Ur({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvent:o})}},_checkKeyDown:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},nn(t,{pluginName:"multiDrag",utils:{select:function(o){var r=o.parentNode[mt];!r||!r.options.multiDrag||~be.indexOf(o)||(gn&&gn!==r&&(gn.multiDrag._deselectMultiDrag(),gn=r),Ye(o,r.options.selectedClass,!0),be.push(o))},deselect:function(o){var r=o.parentNode[mt],l=be.indexOf(o);!r||!r.options.multiDrag||!~l||(Ye(o,r.options.selectedClass,!1),be.splice(l,1))}},eventProperties:function(){var o=this,r=[],l=[];return be.forEach(function(a){r.push({multiDragElement:a,index:a.sortableIndex});var i;Ot&&a!==He?i=-1:Ot?i=Qe(a,":not(."+o.options.selectedClass+")"):i=Qe(a),l.push({multiDragElement:a,index:i})}),{items:nV(be),clones:[].concat(Kt),oldIndicies:r,newIndicies:l}},optionListeners:{multiDragKey:function(o){return o=o.toLowerCase(),o==="ctrl"?o="Control":o.length>1&&(o=o.charAt(0).toUpperCase()+o.substr(1)),o}}})}function MV(t,n){be.forEach(function(o,r){var l=n.children[o.sortableIndex+(t?Number(r):0)];l?n.insertBefore(o,l):n.appendChild(o)})}function Np(t,n){Kt.forEach(function(o,r){var l=n.children[o.sortableIndex+(t?Number(r):0)];l?n.insertBefore(o,l):n.appendChild(o)})}function ya(){be.forEach(function(t){t!==He&&t.parentNode&&t.parentNode.removeChild(t)})}fe.mount(new xV),fe.mount(xs,Ns);function To(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function el(t,n,o){const r=o===0?t.children[0]:t.children[o-1].nextSibling;t.insertBefore(n,r)}function IV(){return typeof window<"u"?window.console:global.console}const zV=IV();function DV(t){const n=Object.create(null);return function(r){return n[r]||(n[r]=t(r))}}const LV=/-(\w)/g,PV=DV(t=>t.replace(LV,(n,o)=>o.toUpperCase())),xp=["Start","Add","Remove","Update","End"],Tp=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],$p=["Move"],AV=[$p,xp,Tp].flatMap(t=>t).map(t=>`on${t}`),Ts={manage:$p,manageAndEmit:xp,emit:Tp};function RV(t){return AV.indexOf(t)!==-1}const FV=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function vV(t){return FV.includes(t)}function HV(t){return["transition-group","TransitionGroup"].includes(t)}function Op(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function Mp(t){return t.reduce((n,[o,r])=>(n[o]=r,n),{})}function jV({$attrs:t,componentData:n={}}){return{...Mp(Object.entries(t).filter(([r,l])=>Op(r))),...n}}function UV({$attrs:t,callBackBuilder:n}){const o=Mp(Ip(t));Object.entries(n).forEach(([l,a])=>{Ts[l].forEach(i=>{o[`on${i}`]=a(i)})});const r=`>[data-draggable]${o.draggable||""}`;return{...o,draggable:r}}function Ip(t){return Object.entries(t).filter(([n,o])=>!Op(n)).map(([n,o])=>[PV(n),o]).filter(([n,o])=>!RV(n))}const zp=({el:t})=>t,qV=(t,n)=>t.__draggable_context=n,Dp=t=>t.__draggable_context;class KV{constructor({nodes:{header:n,default:o,footer:r},root:l,realList:a}){this.defaultNodes=o,this.children=[...n,...o,...r],this.externalComponent=l.externalComponent,this.rootTransition=l.transition,this.tag=l.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,o){const{tag:r,children:l,_isRootComponent:a}=this;return n(r,o,a?{default:()=>l}:l)}updated(){const{defaultNodes:n,realList:o}=this;n.forEach((r,l)=>{qV(zp(r),{element:o[l],index:l})})}getUnderlyingVm(n){return Dp(n)}getVmIndexFromDomIndex(n,o){const{defaultNodes:r}=this,{length:l}=r,a=o.children,i=a.item(n);if(i===null)return l;const s=Dp(i);if(s)return s.index;if(l===0)return 0;const c=zp(r[0]),d=[...a].findIndex(u=>u===c);return n<d?0:l}}function WV(t,n){const o=t[n];return o?o():[]}function GV({$slots:t,realList:n,getKey:o,itemDataSet:r}){let l;switch(typeof r){case"function":l=r;break;case"object":l=()=>r;break}const a=n||[],[i,s]=["header","footer"].map(u=>WV(t,u)),{item:c}=t;if(!c)throw new Error("draggable element must have an item slot");const d=a.flatMap((u,p)=>c({element:u,index:p}).map(h=>{h.key=o(u);const m=l==null?void 0:l(u);return m?h.props={...h.props||{},"data-draggable":!0,...m}:h.props={...h.props||{},"data-draggable":!0},h}));if(d.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:d}}function YV(t){const n=HV(t),o=!vV(t)&&!n;return{transition:n,externalComponent:o,tag:o?e.resolveComponent(t):n?e.TransitionGroup:t}}function XV({$slots:t,tag:n,realList:o,getKey:r,itemDataSet:l}){const a=GV({$slots:t,realList:o,getKey:r,itemDataSet:l}),i=YV(n);return new KV({nodes:a,root:i,realList:o})}function Lp(t,n){e.nextTick(()=>this.$emit(t.toLowerCase(),n))}function Pp(t){return(n,o)=>{if(this.realList!==null)return this[`onDrag${t}`](n,o)}}function ZV(t){const n=Pp.call(this,t);return(o,r)=>{n.call(this,o,r),Lp.call(this,t,o)}}function $s(t,n){const o=new fe(t,n);return n.swap&&!o.swap?(fe.mount(new TV),o.destroy(),$s(t,n)):n.multiDrag&&!o.multiDrag?(fe.mount(new OV),o.destroy(),$s(t,n)):o}function JV(t,n){return Array.from(t).reverse().map(({index:o})=>o-n)}let Os=null;const QV={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},eE=["update:modelValue","change",...[...Ts.manageAndEmit,...Ts.emit].map(t=>t.toLowerCase())],tl=e.defineComponent({name:"draggable",inheritAttrs:!1,props:QV,emits:eE,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:t,$attrs:n,tag:o,componentData:r,realList:l,getKey:a}=this,i=XV({$slots:t,tag:o,realList:l,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=jV({$attrs:n,componentData:r});return i.render(e.h,s)}catch(t){return this.error=!0,e.h("pre",{style:{color:"red"}},t.stack)}},created(){this.list!==null&&this.modelValue!==null&&zV.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:t,$el:n,componentStructure:o}=this;o.updated();const r=UV({$attrs:t,callBackBuilder:{manageAndEmit:a=>ZV.call(this,a),emit:a=>Lp.bind(this,a),manage:a=>Pp.call(this,a)}}),l=n.nodeType===1?n:n.parentElement;this._sortable=$s(l,r),this.targetDomElement=l,l.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:t}=this;return t||this.modelValue},getKey(){const{itemKey:t}=this;return typeof t=="function"?t:n=>n[t]}},watch:{$attrs:{handler(t){const{_sortable:n}=this;n&&Ip(t).forEach(([o,r])=>{n.option(o,r)})},deep:!0}},methods:{getUnderlyingVm(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent(t){return t.__draggable_component__},emitChanges(t){e.nextTick(()=>this.$emit("change",t))},alterList(t){if(this.list){t(this.list);return}const n=[...this.modelValue];t(n),this.$emit("update:modelValue",n)},spliceList(){const t=n=>n.splice(...arguments);this.alterList(t)},removeAllFromList(t){const n=o=>t.forEach(r=>o.splice(r,1));this.alterList(n)},swapPosition(t,n){const o=r=>{const l=r[t];r[t]=r[n],r[n]=l};this.alterList(o)},updatePosition(t,n){const o=r=>r.splice(n,0,r.splice(t,1)[0]);this.alterList(o)},updatePositions(t,n){const o=r=>{const l=t.sort().reverse().flatMap(a=>r.splice(a,1)).reverse();return r.splice(n,0,...l)};this.alterList(o)},getRelatedContextFromMoveEvent({to:t,related:n}){const o=this.getUnderlyingPotencialDraggableComponent(t);if(!o)return{component:o};const r=o.realList,l={list:r,component:o};return t!==n&&r?{...o.getUnderlyingVm(n)||{},...l}:l},getVmIndexFromDomIndex(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart(t){if(Array.isArray(t.items)&&t.items.length){this.multidragContexts=t.items.map(o=>this.getUnderlyingVm(o));const n=this.multidragContexts.sort(({index:o},{index:r})=>o-r).map(o=>o.element);t.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),Os=t.item},onDragAdd(t){Array.isArray(t.items)&&t.items.length?this.onDragAddMulti(t):this.onDragAddSingle(t)},onDragAddMulti(t){const n=t.item._underlying_vm_multidrag_;if(n===void 0)return;t.items.forEach(l=>To(l));const o=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(o,0,...n);const r=n.map((l,a)=>({element:l,newIndex:o+a}));this.emitChanges({added:r})},onDragAddSingle(t){const n=this._sortable.options&&this._sortable.options.swap,o=t.item._underlying_vm_;if(o===void 0)return;const r=n?t.from.children[t.oldIndex]:null;To(t.item);let l=this.getVmIndexFromDomIndex(t.newIndex);n&&(l=l===0?0:l-1),this.spliceList(l,n?1:0,o);const a={element:o,newIndex:l,from:t.from,to:t.to};if(t.swap||(this.emitChanges({added:a}),!n))return;const i={to:t.from,from:t.to,item:r,oldIndex:t.newIndex,newIndex:t.oldIndex,swap:!0};e.nextTick(()=>{const s=i.to.__draggable_component__;s.onDragStart(i),s.onDragAdd(i)})},onDragRemove(t){Array.isArray(t.items)&&t.items.length?this.onDragRemoveMulti(t):this.onDragRemoveSingle(t)},onDragRemoveMulti(t){const n=(this.$slots.header?this.$slots.header():[]).length||0,o=t.oldIndicies.sort(({index:a},{index:i})=>a-i);if(o.forEach(({multiDragElement:a,index:i})=>{el(this.$el,a,i),a.parentNode&&fe.utils.deselect(a)}),t.pullMode==="clone"){t.clones.forEach(a=>To(a));return}const r=JV(o,n);this.removeAllFromList(r);const l=r.sort().map(a=>({element:this.multidragContexts.find(s=>s.index===a).element,oldIndex:a}));this.emitChanges({removed:l})},onDragRemoveSingle(t){const{index:n,element:o}=this.context,r={element:o,oldIndex:n,from:t.from,to:t.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:r});if(el(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){To(t.clone);return}this.spliceList(n,1),this.emitChanges({removed:r})},onDragUpdate(t){Array.isArray(t.items)&&t.items.length?t.pullMode||this.onDragUpdateMulti(t):this.onDragUpdateSingle(t)},onDragUpdateMulti(t){const{items:n,from:o}=t,r=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(c=>To(c));const l=Array.from(t.oldIndicies).sort(({index:c},{index:d})=>c-d);l.forEach(c=>el(o,c.multiDragElement,c.index));const a=l.map(({index:c})=>c-r),i=this.getVmIndexFromDomIndex(t.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((c,d)=>({element:this.multidragContexts.find(p=>p.index===c).element,oldIndex:c,newIndex:i+d}));this.emitChanges({moved:s})},onDragUpdateSingle(t){const n=this._sortable.options&&this._sortable.options.swap,o=n?t.from.children[t.oldIndex]:null;To(t.item),el(t.from,t.item,t.oldIndex),n&&(To(o),el(t.from,o,t.newIndex));const r=this.context.index,l=this.getVmIndexFromDomIndex(t.newIndex);n?this.swapPosition(r,l):this.updatePosition(r,l);const a={element:this.context.element,oldIndex:r,newIndex:l};this.emitChanges({moved:a})},computeFutureIndex(t,n){if(!t.element)return 0;const o=[...n.to.children].filter(i=>i.style.display!=="none"),r=o.indexOf(n.related),l=t.component.getVmIndexFromDomIndex(r);return o.indexOf(Os)!==-1||!n.willInsertAfter?l:l+1},onDragMove(t,n){const{move:o,realList:r}=this;if(!o||!r)return!0;const l=this.getRelatedContextFromMoveEvent(t),a=this.computeFutureIndex(l,t),i={...this.context,futureIndex:a},s={...t,relatedContext:l,draggedContext:i};return o(s,n)},onDragEnd(){Os=null},select(t){fe.utils.select(t)},deselect(t){fe.utils.deselect(t)}}}),kx="",Vx="",Ex="",{getTempID:tE}=pt();let On=class{constructor(n,o,r=!1,l=!1){Lt(this,"isEdit");Lt(this,"isInput");Lt(this,"type");Lt(this,"name");Lt(this,"id");Lt(this,"itemID");Lt(this,"itemSourceType");Lt(this,"rules");Lt(this,"props");Lt(this,"excludeFilterConditions");Lt(this,"filterConditionProps");Lt(this,"isLayout",!1);Lt(this,"children");this.type=n,this.name=o,this.isEdit=r,this.isInput=l,this.id=tE(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Sx="",Bx="",nE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;return(r,l)=>{const a=gu,i=Tt,s=tn,c=xn,d=Nn,u=Bn,p=xt;return e.openBlock(),e.createBlock(p,{"label-width":"80px","label-suffix":":",class:"group-layout-props-editor"},{default:e.withCtx(()=>[e.createVNode(i,{label:"背景色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(o).backgroundColor,"onUpdate:modelValue":l[0]||(l[0]=h=>e.unref(o).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(o).showBorder,"onUpdate:modelValue":l[1]||(l[1]=h=>e.unref(o).showBorder=h)},null,8,["modelValue"])]),_:1}),e.unref(o).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(d,{class:"file-size-unit-select",modelValue:e.unref(o).borderStyle,"onUpdate:modelValue":l[2]||(l[2]=h=>e.unref(o).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(c,{label:"实线边框",value:"solid"}),e.createVNode(c,{label:"虚线边框",value:"dashed"}),e.createVNode(c,{label:"点线边框",value:"dotted"}),e.createVNode(c,{label:"双线边框",value:"double"}),e.createVNode(c,{label:"凹槽边框",value:"groove"}),e.createVNode(c,{label:"脊状边框",value:"ridge"}),e.createVNode(c,{label:"内凹边框",value:"inset"}),e.createVNode(c,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(o).borderColor,"onUpdate:modelValue":l[3]||(l[3]=h=>e.unref(o).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).borderWidth,"onUpdate:modelValue":l[4]||(l[4]=h=>e.unref(o).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).borderRadius,"onUpdate:modelValue":l[5]||(l[5]=h=>e.unref(o).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),Nx="",oE=["onClick"],rE={key:2,class:"operates"},Ap=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(t,{emit:n}){const o={...ll,...il,...al},{getTempID:r,clone:l}=pt();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=t,{components:c}=e.toRefs(s),d=n;e.watch(c,()=>d("update:components",c),{immediate:!0,deep:!0});const u=f=>{f.added?p(f.added.element):f.moved&&p(f.moved.element)},p=f=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=f)},h=f=>{const y=m(f);c.value.push(y),p(y)},m=f=>{var b,k;let y=l(f);if(y.id=r(),delete y.itemID,(b=y.props.options)!=null&&b.length){y.props.options.forEach(_=>{_.value.includes("temp-")&&(_.value=r())});let w=new o[f.type].component;y.filterConditionProps=w.getFilterConditionProps(y.props)}if(y.isLayout&&((k=y.children)!=null&&k.length)){let w=[];y.children.forEach(_=>{w.push(m(_))}),y.children=w}return y},g=f=>{let y=l(c.value[f]);c.value.splice(f,1),i.selectComponent=void 0,d("deleteComponent",y)};return(f,y)=>{const b=Tt,k=Je;return e.openBlock(),e.createBlock(e.unref(tl),{list:e.unref(c),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:u},{item:e.withCtx(({element:w,index:_})=>[e.createElementVNode("div",{onClick:e.withModifiers(C=>p(w),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==w},{"is-hidden":!w.props.showFlag}]),style:e.normalizeStyle({width:`${w.props.width*100/e.unref(a).props.column}%`,"padding-left":`${w.props.paddingLeft}px`})},[w.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[w.type].renderer),{key:0,isDesigner:"",componentID:w.id,component:e.unref(c)[_],"onUpdate:component":C=>e.unref(c)[_]=C,onDeleteComponent:y[0]||(y[0]=C=>d("deleteComponent",C))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(b,{key:1,prop:w.id,class:e.normalizeClass(["form-item",{"label-new-line":w.props.labelNewLine}]),"label-width":w.props.showLabel?w.props.labelWidth:"0",rules:w.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:w.props.color||"#000000","font-size":w.props.fontSize+"px","font-weight":w.props.isBold?"bold":"normal"})},e.toDisplayString(w.props.showLabel?w.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[w.type].renderer),{isDesigner:"",componentID:w.id,componentProps:w.props,"onUpdate:componentProps":C=>w.props=C,datas:e.unref(a).datas,"onUpdate:datas":y[1]||(y[1]=C=>e.unref(a).datas=C)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==w?(e.openBlock(),e.createElementBlock("div",rE,[w.allowRepeat?(e.openBlock(),e.createBlock(k,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(C=>h(w),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(k,{name:"delete",color:"#ff0000",onClick:e.withModifiers(C=>g(_),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,oE)]),_:1},8,["list"])}}}),xx="",lE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent"],setup(t,{emit:n}){const o=t,{component:r,showDescription:l}=e.toRefs(o);!r.value.children&&(r.value.children=[]);const a=e.computed(()=>{let c={"background-color":r.value.props.backgroundColor||""};return r.value.props.showBorder&&(c.border=`${r.value.props.borderWidth}px ${r.value.props.borderStyle} ${r.value.props.borderColor}`),r.value.props.borderRadius&&(c["border-radius"]=`${r.value.props.borderRadius}px`),c}),i=n,s=c=>{i("deleteComponent",c)};return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":t.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(r).props.color,"font-size":e.unref(r).props.fontSize+"px","font-weight":e.unref(r).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(r).props.label),5)):e.createCommentVNode("",!0),t.isDesigner?(e.openBlock(),e.createBlock(Ap,{key:1,components:e.unref(r).children,"onUpdate:components":d[0]||(d[0]=u=>e.unref(r).children=u),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(Hp,{key:2,components:e.unref(r).children,showDescription:e.unref(l)},null,8,["components","showDescription"]))],6))}}),Tx="",aE={component:class extends On{constructor(){super("groupLayout","分组面板"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"分组面板",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,backgroundColor:"#ffffff",showBorder:!1,borderStyle:"solid",borderColor:"#cccccc",borderWidth:1,borderRadius:0},this.isLayout=!0,this.children=[]}},renderer:lE,propEditor:nE},iE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;const r=e.ref(o.fileSize);return e.watch(r,()=>o.fileSize=Number(r.value)),(l,a)=>{const i=tn,s=Tt,c=Bn,d=xn,u=Nn,p=ut,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o).multiple=m)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(o).fileLimit=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(p,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(r),"onUpdate:modelValue":a[3]||(a[3]=m=>e.isRef(r)?r.value=m:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(u,{class:"file-size-unit-select",modelValue:e.unref(o).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(o).fileSizeUnit=m)},{default:e.withCtx(()=>[e.createVNode(d,{value:"KB"}),e.createVNode(d,{value:"MB"}),e.createVNode(d,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).fileType,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).fileType=m),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ox="",Mx="",Ix="",sE={class:"upload-component"},cE=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),dE={key:0,class:"description"},fE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(t){const{checkFile:n}=pt(),o=t;let r=e.inject("uploadOptions"),l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref();a.value[o.componentID]||(a.value[o.componentID]=[]);const c=h=>{if(h.status==="ready"&&!n(h.raw,a.value[o.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){d(h);return}if(h.status==="success"&&h.response.code===0){_t("error",h.response.message||"文件上传失败!"),d(h);return}r.autoUpload?a.value[o.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[o.componentID].push({name:h.name,url:h.url,file:h.raw})},d=(h,m=!0)=>{m&&s.value.handleRemove(h);const g=a.value[o.componentID].findIndex(f=>f.url===h.url);g!==-1&&a.value[o.componentID].splice(g,1)},u=h=>{d(h,!1)},p=()=>{var m;let h=`最多只能上传${i.value.fileLimit}个文件`;(m=a.value[o.componentID])!=null&&m.length&&(h+=`,您已上传了${a.value[o.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[o.componentID].length}个文件`),_t("error",h)};return(h,m)=>{const g=Je,f=mn,y=op;return e.openBlock(),e.createElementBlock("div",sE,[e.createVNode(y,{ref_key:"uploadRef",ref:s,action:e.unref(r).serverApi,headers:e.unref(r).headers,data:e.unref(r).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[t.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(r).autoUpload,"on-exceed":p,"on-change":c,"on-remove":u},{default:e.withCtx(()=>{var b;return[e.unref(i).fileLimit>(((b=e.unref(a)[t.componentID])==null?void 0:b.length)||0)?(e.openBlock(),e.createBlock(f,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[cE]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",dE,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),zx="",uE={component:class extends On{constructor(){super("upload","文件上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"文件上传",fontSize:12,isBold:!1,color:"#000000",showFlag:!0,multiple:!1,fileLimit:1,fileSize:30,fileSizeUnit:"MB",fileType:".jpg,.txt,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf"}}},renderer:fE,propEditor:iE},pE=e.defineComponent({__name:"propsEditor",props:{},setup(t){let o=e.inject("formDesignerData").selectComponent.props;const r=e.ref(o.fileSize);return e.watch(r,()=>o.fileSize=Number(r.value)),(l,a)=>{const i=tn,s=Tt,c=Bn,d=xn,u=Nn,p=ut,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o).multiple=m)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(o).fileLimit=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(p,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(r),"onUpdate:modelValue":a[3]||(a[3]=m=>e.isRef(r)?r.value=m:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(u,{class:"file-size-unit-select",modelValue:e.unref(o).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(o).fileSizeUnit=m),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(d,{value:"KB"}),e.createVNode(d,{value:"MB"}),e.createVNode(d,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).fileType,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).fileType=m),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Lx="",Px="",Ax="",mE={class:"upload-image-component"},hE={class:"el-upload-list__item-actions"},gE={class:"el-upload-list__item-preview"},bE={class:"el-upload-list__item-delete"},yE={key:0,class:"description"},wE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(t){const{checkFile:n}=pt(),o=t;let r=e.inject("uploadOptions"),l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref(),c=e.ref();a.value[o.componentID]||(a.value[o.componentID]=[]);const d=m=>{if(m.status==="ready"&&!n(m.raw,a.value[o.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){u(m);return}if(m.status==="success"&&m.response.code===0){_t("error",m.response.message||"图片上传失败!"),u(m);return}r.autoUpload?a.value[o.componentID].push({name:m.name,url:m.response.data.url,id:m.response.data.id}):a.value[o.componentID].push({name:m.name,url:m.url,file:m.raw})},u=m=>{s.value.handleRemove(m);const g=a.value[o.componentID].findIndex(f=>f.url===m.url);g!==-1&&a.value[o.componentID].splice(g,1)},p=()=>{c.value.$el.children[0].click()},h=()=>{var g;let m=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[o.componentID])!=null&&g.length&&(m+=`,您已上传了${a.value[o.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[o.componentID].length}个图片`),_t("error",m)};return(m,g)=>{var k;const f=Je,y=ry,b=op;return e.openBlock(),e.createElementBlock("div",mE,[e.createVNode(b,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((k=e.unref(a)[t.componentID])==null?void 0:k.length)||0)}),"list-type":"picture-card",action:e.unref(r).serverApi,headers:e.unref(r).headers,data:e.unref(r).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[t.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(r).autoUpload,"on-change":d,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(f,{name:"add",size:"30"})]),file:e.withCtx(({file:w})=>[e.createVNode(y,{ref_key:"imageRef",ref:c,style:{width:"100px",height:"100px"},src:w.url,"preview-src-list":[w.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",hE,[e.createElementVNode("span",gE,[e.createVNode(f,{name:"previewImage",color:"#00ff00",onClick:p})]),e.createElementVNode("span",bE,[e.createVNode(f,{name:"delete",color:"#ff0000",onClick:_=>u(w)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",yE,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Rx="",CE={component:class extends On{constructor(){super("uploadImage","图片上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"图片上传",fontSize:12,isBold:!1,showFlag:!0,multiple:!1,fileLimit:1,fileSize:10,fileSizeUnit:"MB",fileType:".jpg,.jpeg,.png,.bmp"}}},renderer:wE,propEditor:pE},vx="",Hx="",jx="";function wa(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _E=t=>typeof t<"u",Rp=()=>{};function kE(t,n){function o(...r){return new Promise((l,a)=>{Promise.resolve(t(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})).then(l).catch(a)})}return o}function VE(t,n={}){let o,r,l=Rp;const a=s=>{clearTimeout(s),l(),l=Rp};return s=>{const c=wa(t),d=wa(n.maxWait);return o&&a(o),c<=0||d!==void 0&&d<=0?(r&&(a(r),r=null),Promise.resolve(s())):new Promise((u,p)=>{l=n.rejectOnCancel?p:u,d&&!r&&(r=setTimeout(()=>{o&&a(o),r=null,u(s())},d)),o=setTimeout(()=>{r&&a(r),r=null,u(s())},c)})}}function EE(t,n=200,o={}){return kE(VE(n,o),t)}function SE(t,n){return e.computed(()=>wa(t).map(o=>wa(o)).filter(n))}function BE(t){return JSON.parse(JSON.stringify(t))}function NE(t,n,o,r={}){var l,a,i;const{clone:s=!1,passive:c=!1,eventName:d,deep:u=!1,defaultValue:p,shouldEmit:h}=r,m=e.getCurrentInstance(),g=o||(m==null?void 0:m.emit)||((l=m==null?void 0:m.$emit)==null?void 0:l.bind(m))||((i=(a=m==null?void 0:m.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(m==null?void 0:m.proxy));let f=d;n||(n="modelValue"),f=f||`update:${n.toString()}`;const y=w=>s?typeof s=="function"?s(w):BE(w):w,b=()=>_E(t[n])?y(t[n]):p,k=w=>{h?h(w)&&g(f,w):g(f,w)};if(c){const w=b(),_=e.ref(w);let C=!1;return e.watch(()=>t[n],V=>{C||(C=!0,_.value=y(V),e.nextTick(()=>C=!1))}),e.watch(_,V=>{!C&&(V!==t[n]||u)&&k(V)},{deep:u}),_}else return e.computed({get(){return b()},set(w){k(w)}})}const xE={class:"option-wrap"},TE={style:{float:"left"}},$E={style:{float:"right",color:"#8492a6"}},OE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;const r=e.ref([]);e.watch(()=>o.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:o.options}});const l=()=>{o.type==="radio"?(o.defaultValue="",o.min=void 0,o.max=void 0,o.multiple=void 0):o.type==="checkbox"?(o.defaultValue=[],o.multiple=void 0):o.type==="selector"&&(o.defaultValue="",o.min=void 0,o.max=void 0)},a=()=>{o.options.push({label:"",value:""})},i=h=>{o.options.splice(h,1)},s=e.ref(!1);let c=e.ref(o.options);const d=EE(async h=>await n.selectComponent.searchEmployeeMethod(h),500),u=h=>{if(!h)return[];s.value=!0,d(h).then(m=>{c.value=m,s.value=!1})},p=(h,m)=>{const g=c.value.find(f=>f.value===h);o.options[m]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},c.value=o.options};return(h,m)=>{const g=Wl,f=oo,y=Tt,b=tn,k=Bn,w=Yi,_=Je,C=xn,V=Nn,E=mn,N=xt;return e.openBlock(),e.createBlock(N,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(y,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(o).type,"onUpdate:modelValue":m[0]||(m[0]=O=>e.unref(o).type=O),onChange:l},{default:e.withCtx(()=>[e.createVNode(g,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(g,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(g,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(o).type!=="selector"?(e.openBlock(),e.createBlock(y,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":m[1]||(m[1]=O=>e.unref(o).newLine=O)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(y,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":m[2]||(m[2]=O=>e.unref(o).multiple=O)},null,8,["modelValue"])]),_:1})),e.unref(o).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(y,{label:"最少选择"},{default:e.withCtx(()=>{var O;return[e.createVNode(k,{modelValue:e.unref(o).min,"onUpdate:modelValue":m[3]||(m[3]=M=>e.unref(o).min=M),step:1,min:0,max:((O=e.unref(r))==null?void 0:O.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(y,{label:"最多选择"},{default:e.withCtx(()=>{var O;return[e.createVNode(k,{modelValue:e.unref(o).max,"onUpdate:modelValue":m[4]||(m[4]=M=>e.unref(o).max=M),step:1,min:0,max:((O=e.unref(r))==null?void 0:O.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(w,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(y,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"checkbox-options",handle:".cursor-move",list:e.unref(o).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:O,index:M})=>[e.createElementVNode("div",xE,[e.unref(o).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(V,{class:"selector-component",modelValue:O.value,"onUpdate:modelValue":$=>O.value=$,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":u,loading:e.unref(s),"loading-text":"加载中……",onChange:$=>p($,M)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),($,S)=>(e.openBlock(),e.createBlock(C,{key:S,label:$.label,value:$.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:S,label:$.label,suffix:$.suffix},()=>[e.createElementVNode("span",TE,e.toDisplayString($.label),1),e.createElementVNode("span",$E,e.toDisplayString($.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:$=>i(M)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(y,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(E,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Ux="",qx="",ME={class:"employee-component"},IE={key:3,class:"description"},zE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>u?l.value[o.componentID]=u:delete l.value[o.componentID]);const s=n;e.watch(l,u=>s("update:datas",u));const c=e.ref(!0);e.watch(a,u=>{c.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,o.isDesigner&&(i.value=a.value.defaultValue),c.value=!0}),s("update:componentProps",u)},{immediate:!0});const d=(u,p)=>{a.value.clearable&&l.value[o.componentID]===p&&(i.value=void 0,u.preventDefault())};return(u,p)=>{const h=zr,m=oo,g=no,f=ji,y=xn,b=Nn,k=Je;return e.openBlock(),e.createElementBlock("div",ME,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(h,{key:_,value:w.value,onClick:C=>d(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[1]||(p[1]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(g,{value:w.value,key:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":p[2]||(p[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(y,{key:_,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",IE,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Kx="",DE={component:class extends On{constructor(){super("employee","人员",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"人员",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[],showRemark:!0,remarkLabel:"实习生"},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:zE,propEditor:OE};function Ms(){return{getGradeItems(t){let n=[];if(!t.maxScore)return n;t.showVeto&&n.push({value:"-2",label:"单项否决"}),t.showNotGrade&&n.push({value:"-1",label:"不考评"}),t.showZero&&n.push({value:"0",label:"0分"});let o=Number(t.maxScore);for(let r=1;r<=o;r++)n.push({value:String(r),label:`${String(r)}分`});return t.scoreReverseFlag&&n.reverse(),n}}}const LE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;const{getGradeItems:r}=Ms(),l=e.ref([]);return e.watch(o,()=>{l.value=r(o),n.selectComponent.filterConditionProps.options=l.value},{immediate:!0}),(a,i)=>{const s=xn,c=Nn,d=Tt,u=Bn,p=tn,h=xt;return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(d,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=m=>e.unref(o).defaultValue=m),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:m.label,value:m.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).maxScore,"onUpdate:modelValue":i[1]||(i[1]=m=>e.unref(o).maxScore=m),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showZero,"onUpdate:modelValue":i[2]||(i[2]=m=>e.unref(o).showZero=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=m=>e.unref(o).showNotGrade=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=m=>e.unref(o).scoreReverseFlag=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":i[5]||(i[5]=m=>e.unref(o).newLine=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showProblem,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(o).showProblem=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=m=>e.unref(o).showBrightSpot=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showRemark,"onUpdate:modelValue":i[8]||(i[8]=m=>e.unref(o).showRemark=m)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).showVeto,"onUpdate:modelValue":i[9]||(i[9]=m=>e.unref(o).showVeto=m)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Gx="",PE={class:"auto-complete"},AE={key:0},RE=e.defineComponent({__name:"autoComplete",props:{modelValue:{type:String,default:()=>{}},options:{type:Array,default:()=>[],required:!1},label:{type:String,default:()=>"备注:"},selectWhenUnmatched:{type:Boolean,default:()=>!0},matchMode:{type:String,default:"start"},width:{type:Number,default:500},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){e.useCssVars(m=>({e00bfd70:e.unref(h)}));const o=e.ref(),r=t;let{options:l,width:a}=e.toRefs(r);const i=n,s=NE(r,"modelValue",i),c=()=>{i("change",s.value)},d=(m,g)=>{const f=m?SE(l,u(m)):l.value;g(e.unref(f))},u=m=>({start:f=>f.value.toLowerCase().indexOf(m.toLowerCase())===0,random:f=>f.value.indexOf(m)>=0})[r.matchMode],p=e.inject("convertPX"),h=e.computed(()=>`${p(a.value)}px`);return(m,g)=>{const f=d7;return e.openBlock(),e.createElementBlock("div",PE,[t.label?(e.openBlock(),e.createElementBlock("span",AE,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"autoCompleteRef",ref:o,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=y=>e.isRef(s)?s.value=y:null),"select-when-unmatched":t.selectWhenUnmatched,"fetch-suggestions":d,"value-key":"value",clearable:"",disabled:t.disabled,onBlur:c},{default:e.withCtx(({item:y})=>[e.createElementVNode("span",null,e.toDisplayString(y.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Yx="",FE={class:"grade-component"},vE={key:3,class:"description"},HE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t,{getGradeItems:r}=Ms();let l=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(o),s=e.ref(a.value[o.componentID]||{});e.watch(s,p=>{a.value[o.componentID]=p,Object.keys(a.value[o.componentID]||{}).length&&(a.value[o.componentID].maxScore=i.value.maxScore)},{deep:!0});const c=e.computed(()=>r(i.value)),d=n;e.watch(a,p=>d("update:datas",p)),e.watch(i,()=>{o.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const u=(p,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,p.preventDefault())};return(p,h)=>{const m=zr,g=oo,f=RE,y=Je;return e.openBlock(),e.createElementBlock("div",FE,[e.createVNode(g,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(s).score,"onUpdate:modelValue":h[0]||(h[0]=b=>e.unref(s).score=b),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(b,k)=>(e.openBlock(),e.createBlock(m,{key:k,value:b.value,onClick:w=>u(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(f,{key:0,class:"problem",modelValue:e.unref(s).problem,"onUpdate:modelValue":h[1]||(h[1]=b=>e.unref(s).problem=b),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(f,{key:1,class:"bright-spot",modelValue:e.unref(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=b=>e.unref(s).brightSpot=b),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(f,{key:2,class:"bright-spot",modelValue:e.unref(s).remark,"onUpdate:modelValue":h[3]||(h[3]=b=>e.unref(s).remark=b),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:t.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(i).description||t.showDescription&&(e.unref(l)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",vE,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Xx="",{isEmpty:jE}=pt(),{getGradeItems:UE}=Ms(),qE={component:class extends On{constructor(){super("grade","考评分数",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"考评分数",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,maxScore:5,showZero:!0,showNotGrade:!0,showProblem:!0,showBrightSpot:!0,scoreReverseFlag:!0,showVeto:!1},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage,validator:(o,r,l)=>{if(!r||jE(r)){l(n.requiredMessage);return}l()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&UE(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:HE,propEditor:LE},KE=e.defineComponent({__name:"propsEditor",setup(t){let n=e.inject("formDesignerData"),o=n.selectComponent.props;e.watch(()=>o.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:o.options}});const r=()=>{o.type==="radio"?(o.defaultValue="",o.min=void 0,o.max=void 0,o.multiple=void 0):o.type==="checkbox"?(o.defaultValue=[],o.multiple=void 0):o.type==="selector"&&(o.defaultValue="",o.min=void 0,o.max=void 0)};return(l,a)=>{const i=Wl,s=oo,c=Tt,d=tn,u=Bn,p=xt;return e.openBlock(),e.createBlock(p,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(o).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(o).type=h),onChange:r},{default:e.withCtx(()=>[e.createVNode(i,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(i,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(i,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(o).type!=="selector"?(e.openBlock(),e.createBlock(c,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(o).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(o).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(c,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(o).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(o).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(o).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(c,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(u,{modelValue:e.unref(o).min,"onUpdate:modelValue":a[3]||(a[3]=m=>e.unref(o).min=m),step:1,min:0,max:((h=e.unref(o).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(c,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(u,{modelValue:e.unref(o).max,"onUpdate:modelValue":a[4]||(a[4]=m=>e.unref(o).max=m),step:1,min:0,max:((h=e.unref(o).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),WE={class:"post-component"},GE={key:3,class:"description"},YE=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>u?l.value[o.componentID]=u:delete l.value[o.componentID]);const s=n;e.watch(l,u=>s("update:datas",u));const c=e.ref(!0);e.watch(a,u=>{c.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,o.isDesigner&&(i.value=a.value.defaultValue),c.value=!0}),s("update:componentProps",u)},{immediate:!0});const d=(u,p)=>{a.value.clearable&&l.value[o.componentID]===p&&(i.value=void 0,u.preventDefault())};return(u,p)=>{const h=zr,m=oo,g=no,f=ji,y=xn,b=Nn,k=Je;return e.openBlock(),e.createElementBlock("div",WE,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(h,{key:_,value:w.value,onClick:C=>d(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":p[1]||(p[1]=w=>e.isRef(i)?i.value=w:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(g,{value:w.value,key:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":p[2]||(p[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,_)=>(e.openBlock(),e.createBlock(y,{key:_,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",GE,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Jx="",XE={component:class extends On{constructor(){super("post","岗位",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"岗位",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:YE,propEditor:KE},eT="",tT="",nT="",ZE={class:"dictionary-binder"},JE={class:"item"},QE={class:"label"},eS={key:0,class:"item-souce-type"},Is=e.defineComponent({__name:"dictionaryBinder",props:{modelValue:{type:String,required:!0},dictionary:{type:Object,default:()=>{}},placeholder:{type:String,default:"请输入内容"},itemHeight:{type:Number,default:34},height:{type:String,default:"20px"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){var m;e.useCssVars(g=>({"4f018582":t.height}));let o=e.inject("defaultSourceType");const r=t,l=e.ref(),a=e.ref(r.modelValue),i=(m=r.dictionary)==null?void 0:m.souceTypeMap;l.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const c=g=>{s.value=g?d(g):r.dictionary.dictionaryItems},d=g=>r.dictionary.dictionaryItems.filter(f=>f.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),u=n,{getTempID:p}=pt(),h=g=>{let f=s.value.find(y=>y.value===g);f||(f={value:p(),label:g,itemSourceType:o}),u("update:modelValue",f.label),u("change",f)};return(g,f)=>{var k;const y=Ew,b=ut;return e.openBlock(),e.createElementBlock("div",ZE,[(k=t.dictionary)!=null&&k.dictionaryItems.length?(e.openBlock(),e.createBlock(y,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(a)?a.value=w:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":c,placeholder:t.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":t.itemHeight,height:t.itemHeight*8,disabled:t.disabled,onChange:h},{default:e.withCtx(({item:w})=>[e.createElementVNode("div",JE,[e.createElementVNode("span",QE,e.toDisplayString(w.label),1),e.unref(l)?(e.openBlock(),e.createElementBlock("span",eS,e.toDisplayString(e.unref(i).get(w.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(b,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(a)?a.value=w:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:t.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),oT="",tS={class:"option-wrap"},nS=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){let n=e.inject("formDesignerData"),o=e.inject("defaultSourceType"),r=n.selectComponent.props;e.watch(r.options,()=>{n.selectComponent.filterConditionProps.options=r.options});const{getTempID:l}=pt(),a=()=>{r.options.push({label:`选项${r.options.length+1}`,value:l(),itemSourceType:o})},i=c=>{r.options.splice(c,1)},s=(c,d)=>{d.value=c.value,d.itemSourceType=c.itemSourceType};return(c,d)=>{const u=xn,p=Nn,h=Tt,m=tn,g=Bn,f=Yi,y=Je,b=no,k=Sn,w=mn,_=xt;return e.openBlock(),e.createBlock(_,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=C=>e.unref(r).defaultValue=C),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).options,(C,V)=>(e.openBlock(),e.createBlock(u,{key:V,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).newLine,"onUpdate:modelValue":d[1]||(d[1]=C=>e.unref(r).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).min,"onUpdate:modelValue":d[2]||(d[2]=C=>e.unref(r).min=C),step:1,min:0,max:e.unref(r).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).max,"onUpdate:modelValue":d[3]||(d[3]=C=>e.unref(r).max=C),step:1,min:1,max:e.unref(r).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"checkbox-options",handle:".cursor-move",list:e.unref(r).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:V})=>[e.createElementVNode("div",tS,[e.unref(r).options.length>1?(e.openBlock(),e.createBlock(y,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Is,{modelValue:C.label,"onUpdate:modelValue":E=>C.label=E,dictionary:t.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:E=>s(E,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(k,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(b,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":E=>C.inputEnable=E},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(y,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:E=>i(V)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(w,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(y,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),rT="",oS={class:"checkbox-component"},rS={key:0,class:"description"},lS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,d=>l.value[o.componentID]=d);const s=n;e.watch(l,d=>s("update:datas",d)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const c=d=>{a.value.options.forEach(u=>{const p=`${o.componentID}||${u.value}`;!d.includes(u.value)&&l.value[p]&&delete l.value[p]})};return(d,u)=>{const p=no,h=ut,m=ji,g=Je;return e.openBlock(),e.createElementBlock("div",oS,[e.createVNode(m,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=f=>e.isRef(i)?i.value=f:null),disabled:t.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(f,y)=>{var b;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:y},[e.createVNode(p,{value:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["value"]),f.inputEnable&&(t.isDesigner||(b=e.unref(i))!=null&&b.includes(f.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(l)[`${t.componentID}||${f.value}`],"onUpdate:modelValue":k=>e.unref(l)[`${t.componentID}||${f.value}`]=k},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",rS,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),lT="",{getTempID:Fp}=pt(),aS={component:class extends On{constructor(){super("checkbox","多选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"多选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:[],required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:Fp(),label:"选项1"},{value:Fp(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}},renderer:lS,propEditor:nS},iS=e.defineComponent({__name:"propsEditor",setup(t){const{computedExpression:n}=pt();let o=e.inject("formDesignerData"),r=o.selectComponent.props,l=o.selectComponent.rules;const a=c=>{c&&(l[1].pattern=n(c))},i=c=>{l[1].message=c},s=c=>{c==="text"&&(r.showPassword=!1)};return(c,d)=>{const u=ut,p=Tt,h=Wl,m=oo,g=tn,f=xt;return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(p,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=y=>e.unref(r).defaultValue=y),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).type,"onUpdate:modelValue":d[1]||(d[1]=y=>e.unref(r).type=y),onChange:s},{default:e.withCtx(()=>[e.createVNode(h,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(h,{value:"password"},{default:e.withCtx(()=>[e.createTextVNode("密码")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(r).type=="password"?(e.openBlock(),e.createBlock(p,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).showPassword,"onUpdate:modelValue":d[2]||(d[2]=y=>e.unref(r).showPassword=y)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(p,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(u,{onChange:a,modelValue:e.unref(r).pattern,"onUpdate:modelValue":d[3]||(d[3]=y=>e.unref(r).pattern=y)},null,8,["modelValue"])]),_:1}),e.unref(r).pattern?(e.openBlock(),e.createBlock(p,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(u,{onChange:i,modelValue:e.unref(r).patternMessage,"onUpdate:modelValue":d[4]||(d[4]=y=>e.unref(r).patternMessage=y)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),sS={class:"input-component"},cS={key:0,class:"description"},dS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,c=>l.value[o.componentID]=c);const s=n;return e.watch(l,c=>s("update:datas",c)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(c,d)=>{const u=ut,p=Je;return e.openBlock(),e.createElementBlock("div",sS,[e.createVNode(u,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":d[0]||(d[0]=h=>e.isRef(i)?i.value=h:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:t.disabled,readonly:t.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",cS,[e.createVNode(p,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),iT="",fS={component:class extends On{constructor(){super("input","文本框",!0,!0),this.props={type:"text",label:"文本框",width:12,showLabel:!0,fontSize:12,isBold:!1,color:"#000000",showFlag:!0,statisticsFlag:!1,labelNewLine:!1,labelWidth:void 0,defaultValue:"",placeholder:"",required:!1,requiredMessage:"必填项",pattern:"",patternMessage:"格式不正确",disabled:!1,clearable:!1,readonly:!1,showPassword:!1},this.rules=this.getRules(this.props),this.filterConditionProps={type:"input"},this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage},{pattern:n.pattern,message:n.patternMessage}]}getFilterConditionProps(n){return{type:"input"}}getExcludeFilterConditions(){return["RANGE"]}},renderer:dS,propEditor:iS},uS={component:class extends On{constructor(){super("label","标签"),this.props={width:12,showLabel:!1,label:"标签",showFlag:!0,labelNewLine:!1,isBold:!0,fontSize:14,color:"#000000"}}},renderer:e.defineComponent({__name:"renderer",props:{componentProps:{type:Object,required:!0}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:t.componentProps.color,"font-size":t.componentProps.fontSize+"px","font-weight":t.componentProps.isBold?"bold":"normal"})},e.toDisplayString(t.componentProps.label),5))}}),undefined:void 0},pS={class:"option-wrap"},mS=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){let n=e.inject("formDesignerData"),o=e.inject("defaultSourceType"),r=n.selectComponent.props;e.watch(r.options,()=>{n.selectComponent.filterConditionProps.options=r.options});const{getTempID:l}=pt(),a=()=>{r.options.push({label:`选项${r.options.length+1}`,value:l(),itemSourceType:o})},i=c=>{r.options.splice(c,1)},s=(c,d)=>{d.value=c.value,d.itemSourceType=c.itemSourceType};return(c,d)=>{const u=xn,p=Nn,h=Tt,m=tn,g=Yi,f=Je,y=no,b=Sn,k=mn,w=xt;return e.openBlock(),e.createBlock(w,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).defaultValue,"onUpdate:modelValue":d[0]||(d[0]=_=>e.unref(r).defaultValue=_),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).options,(_,C)=>(e.openBlock(),e.createBlock(u,{key:C,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(r).newLine,"onUpdate:modelValue":d[1]||(d[1]=_=>e.unref(r).newLine=_)},null,8,["modelValue"])]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{class:"radio-options",handle:".cursor-move",list:e.unref(r).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:_,index:C})=>[e.createElementVNode("div",pS,[e.unref(r).options.length>1?(e.openBlock(),e.createBlock(f,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Is,{modelValue:_.label,"onUpdate:modelValue":V=>_.label=V,dictionary:t.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:V=>s(V,_)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(b,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(y,{class:"input-enable",modelValue:_.inputEnable,"onUpdate:modelValue":V=>_.inputEnable=V},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(f,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:V=>i(C)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(k,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(f,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),fT="",hS={class:"radio-component"},gS={key:0,class:"description"},bS=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(t,{emit:n}){const o=t;let r=e.inject("formType");const{datas:l,componentProps:a}=e.toRefs(o),i=e.ref(l.value[o.componentID]);e.watch(i,u=>l.value[o.componentID]=u);const s=n;e.watch(l,u=>s("update:datas",u)),e.watch(a,()=>{o.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const c=u=>{a.value.options.forEach(p=>{const h=`${o.componentID}||${p.value}`;u!==p.value&&l.value[h]&&delete l.value[h]})},d=(u,p)=>{if(a.value.clearable&&i.value===p){i.value=void 0;const h=`${o.componentID}||${p}`;l.value[h]&&delete l.value[h],u.preventDefault()}};return(u,p)=>{const h=zr,m=ut,g=oo,f=Je;return e.openBlock(),e.createElementBlock("div",hS,[e.createVNode(g,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":p[0]||(p[0]=y=>e.isRef(i)?i.value=y:null),disabled:t.disabled,onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,b)=>{var k;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:b},[e.createVNode(h,{value:y.value,onClick:w=>d(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["value","onClick"]),y.inputEnable&&(t.isDesigner||(k=e.unref(i))!=null&&k.includes(y.value))?(e.openBlock(),e.createBlock(m,{key:0,class:"option-input",modelValue:e.unref(l)[`${t.componentID}||${y.value}`],"onUpdate:modelValue":w=>e.unref(l)[`${t.componentID}||${y.value}`]=w},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),t.isDesigner&&e.unref(a).description||t.showDescription&&(e.unref(r)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",gS,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),uT="",{getTempID:vp}=pt();class yS extends On{constructor(){super("radio","单选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"单选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:vp(),label:"选项1"},{value:vp(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}}const wS={component:yS,renderer:bS,propEditor:mS},CS={key:0,class:"component-readonly-mask"},Hp=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(t,{emit:n}){const o={...ll,...il,...al},{computedExpression:r}=pt();let l=e.inject("formData");const a=t,{components:i,showDescription:s,selectMode:c}=e.toRefs(a),d={show:m=>{if(m.showFlag===void 0)return String(!0);let g="";return m.showFlag?g=m.hiddenConditionExpression?`!(${m.hiddenConditionExpression})`:String(m.showFlag):g=m.showConditionExpression||String(m.showFlag),g},disabled:m=>m.disabledConditionExpression||String(m.disabled===void 0?!1:m.disabled),readonly:m=>m.readonlyConditionExpression||String(m.readonly===void 0?!1:m.readonly)},u=(m,g)=>{var b;let f=d[g](m.props);if(!f)return;["true","false"].includes(f)||f.match(/{(.*?)}/g).forEach(w=>{var E;const _=w.replace(/\{|}/g,"");let C=l.value.datas[_];const V=i.value.find(N=>N.id===_);(V==null?void 0:V.type)==="grade"&&(C=(E=l.value.datas[_])==null?void 0:E.score),f=f.replace(w,C||"")});const y=r(f);if(g==="show"&&!y){let k=[];m.isLayout&&((b=m.children)!=null&&b.length)?k=m.children:k=[m],k.forEach(w=>{l.value.datas[w.id]&&(w.type==="grade"?delete l.value.datas[w.id].score:delete l.value.datas[w.id])})}return y},p=n,h=m=>{p("select",m)};return(m,g)=>{const f=no,y=Tt;return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(b,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k},[e.unref(c)||u(b,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(c)},{"is-hidden":!b.props.showFlag},{selected:b.selected}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(l).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[u(b,"readonly")?(e.openBlock(),e.createElementBlock("div",CS)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createBlock(f,{key:1,class:"select-item",modelValue:b.selected,"onUpdate:modelValue":w=>b.selected=w,label:"选择",onChange:w=>h(b)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[b.type].renderer),{key:2,componentID:b.id,showDescription:e.unref(s),component:e.unref(i)[k],"onUpdate:component":w=>e.unref(i)[k]=w},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(y,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),prop:b.id,"label-width":b.props.showLabel?b.props.labelWidth:"0",rules:b.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:b.props.color||"#000000","font-size":b.props.fontSize+"px","font-weight":b.props.isBold?"bold":"normal"})},e.toDisplayString(b.props.showLabel?b.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o[b.type].renderer),{componentID:b.id,disabled:u(b,"disabled"),showDescription:e.unref(s),componentProps:b.props,"onUpdate:componentProps":w=>b.props=w,datas:e.unref(l).datas,"onUpdate:datas":g[0]||(g[0]=w=>e.unref(l).datas=w)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),pT="",_S={key:0,class:"select-title"},kS=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),VS={key:1,class:"title"},ES={key:0,class:"readonly-mask"},SS={key:2,class:"mobile-key"},BS={name:"zhy-form-renderer"},$o=e.defineComponent({...BS,props:{formData:{type:Object,default:()=>({components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formType:"1"},datas:{}}),required:!0},uploadOptions:{type:Object,default:()=>({serverApi:"",autoUpload:!1})},device:{type:String,default:"pc"},watching:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1},selectComponents:{type:Array,default:()=>[]}},emits:["change","select"],setup(t,{expose:n,emit:o}){const{removeEmptyAttribute:r}=pt(),l={...ll,...il,...al},a=e.ref(),i=e.ref(!1),s=e.ref(!1),c=e.ref(!1),d=t,u=o,{formData:p,selectMode:h}=e.toRefs(d),m=e.ref(d.selectComponents);e.provide("uploadOptions",d.uploadOptions),e.provide("formData",p),e.provide("formType",p.value.props.formType);const g=_=>{var C,V,E,N;if((C=m.value)!=null&&C.length||(m.value=[]),!_){m.value=[],p.value.components.forEach(O=>{O.selected=s.value,s.value&&m.value.push(O)}),c.value=!1,u("select",m.value);return}if(_.selected)(V=m.value)==null||V.push(_);else{const O=(E=m.value)==null?void 0:E.findIndex(M=>M.id===_.id);O!==-1&&((N=m.value)==null||N.splice(O,1))}u("select",m.value),f()},f=()=>{var _,C;if(!((_=m.value)!=null&&_.length)){c.value=!1,s.value=!1;return}if(((C=m.value)==null?void 0:C.length)<p.value.components.length){c.value=!0;return}s.value=!0,c.value=!1},y=_=>{_!=null&&_.length&&(_.forEach(C=>{var E,N;let V=new l[C.type].component;V.isEdit&&(C.props.required||C.props.pattern)&&(C.rules=V.getRules(C.props)),d.selectMode&&((E=m.value)!=null&&E.length)&&m.value.findIndex(M=>M.id===C.id)!==-1&&(C.selected=!0),C.isLayout&&((N=C==null?void 0:C.children)!=null&&N.length)&&y(C.children)}),d.selectMode&&f())};e.watch(p,()=>y(p.value.components),{immediate:!0});const b=()=>{let _=r(p.value.datas),C=[],V=[];const E=Object.keys(_);for(let N of E){if(N.includes("||")){let O=N.split("||"),M=O[0],$=O[1],S=C.findIndex(x=>x.id===$&&x.groupID===M);if(S!==-1)C[S].value=_[N];else{const x={parentID:M,id:$,value:_[N]};C.push(x)}continue}k(p.value.components,C,V,N,_)}return{data:C,fileList:V}},k=(_,C,V,E,N)=>{var $;let O,M;for(let S=0;S<_.length;S++){const x=_[S];if(x.id===E){O=x,w(C,V,E,N,O);break}if(x.isLayout&&(($=x==null?void 0:x.children)!=null&&$.length)){if(O=x.children.find(P=>P.id===E),O){M=x.id,w(C,V,E,N,O,M);break}k(x.children,C,V,E,N)}}},w=(_,C,V,E,N,O)=>{var $,S;let M=-1;switch(N.type){case"radio":M=_.findIndex(x=>x.id===E[V]),M===-1&&_.push({groupID:O,parentID:V,id:E[V],value:""});break;case"checkbox":E[V].forEach(x=>{M=_.findIndex(P=>P.id===P),M===-1&&_.push({groupID:O,parentID:V,id:x,value:""})});break;case"upload":case"uploadImage":if(!(($=d.uploadOptions)!=null&&$.autoUpload)&&((S=E[V])!=null&&S.length)){const x=E[V].map(B=>(B.file&&(B.file.id=V),B.file)),P=E[V].map(B=>{if(B.fileID)return B.fileID}).filter(B=>B!==void 0);C.push({id:V,groupID:O,fileIDs:P,files:x})}break;default:_.push({groupID:O,parentID:V,id:V,value:E[V]});break}};return d.watching&&e.watch(()=>p.value.datas,()=>{const _=b();u("change",_.data,_.fileList)},{immediate:!0,deep:!0}),n({getDatas:b,async validate(_=()=>{}){return await a.value.validate(_)},resetFields(){a.value.resetFields()},clearValidate(_){a.value.clearValidate(_)},scrollToField(_){a.value.scrollToField(_)},toggleDescription(){i.value=!i.value}}),(_,C)=>{const V=no,E=xt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",t.device,{"examination-paper":e.unref(p).props.formType==="2"},{"select-mode":e.unref(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",_S,[kS,e.createVNode(V,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":C[0]||(C[0]=N=>e.isRef(s)?s.value=N:null),label:"全选",indeterminate:e.unref(c),onChange:C[1]||(C[1]=N=>g())},null,8,["modelValue","indeterminate"])])):e.unref(p).props.formName?(e.openBlock(),e.createElementBlock("h1",VS,e.toDisplayString(e.unref(p).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(E,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(p).datas,"label-position":e.unref(p).props.labelPosition,"label-width":e.unref(p).props.labelWidth,size:e.unref(p).props.size,"scroll-to-error":"",disabled:t.disabled},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",ES)):e.createCommentVNode("",!0),e.createVNode(Hp,{components:e.unref(p).components,showDescription:e.unref(i),selectMode:e.unref(h),onSelect:g},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),t.device==="mobile"?(e.openBlock(),e.createElementBlock("div",SS)):e.createCommentVNode("",!0)],2)}}}),mT="",NS={class:"form-list-wrap"},xS={class:"form-list"},TS=["onClick"],$S=["title"],OS={class:"form-template"},MS={class:"dialog-footer"},IS={class:"left-wrap"},zS={class:"select-count-wrap"},DS={class:"count"},LS={class:"right-wrap"},PS=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:n}){const o=e.inject("formData"),r=o.value.props.formType==="2"?"试卷":"表单",l=o.value.props.formType==="2"?"题目":"项目",a=e.useModel(t,"modelValue"),i=t,{params:s}=e.toRefs(i),c=e.ref(""),d=e.ref(""),u=e.ref({datas:{},components:[],props:{}}),p=e.ref(s.value.formList),h=()=>{p.value=s.value.formList,c.value&&(p.value=s.value.formList.filter(N=>N.formName.includes(c.value)))},m=async N=>{d.value!==N&&(d.value=N,u.value={datas:{},components:[],props:{}},s.value.getFormTemplateMethod&&(u.value=await s.value.getFormTemplateMethod(N)))},g=e.ref(new Map),f=e.computed(()=>{let N=0;for(const[,O]of g.value)N+=O.length;return N}),y=N=>{g.value.has(d.value)?N.length?g.value.set(d.value,N):g.value.delete(d.value):g.value.set(d.value,N)},{clone:b}=pt(),k=()=>{let N=[];for(const[,O]of g.value)O.forEach(M=>{let $=b(M);delete $.selected,N.push($)});return N},w=e.ref(!1),_=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:o.value.props.formType}}),C=()=>{_.value.components=k(),w.value=!0},V=n,E=()=>{const N=k();V("select",N),a.value=!1};return(N,O)=>{const M=Je,$=ut,S=wu,x=$o,P=hy,B=mn,T=Gi;return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(T,{modelValue:a.value,"onUpdate:modelValue":O[2]||(O[2]=L=>a.value=L),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(l)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",MS,[e.createElementVNode("div",IS,[e.createElementVNode("span",zS,[e.createTextVNode(" 已选 "),e.createElementVNode("span",DS,e.toDisplayString(` ${e.unref(f)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(l)}`),1)]),e.createVNode(P,{type:"primary",disabled:e.unref(g).size===0,onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(l)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",LS,[e.createVNode(B,{onClick:O[1]||(O[1]=L=>a.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(B,{type:"primary",onClick:E},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var L,D;return[e.createElementVNode("div",NS,[e.createVNode($,{modelValue:e.unref(c),"onUpdate:modelValue":O[0]||(O[0]=F=>e.isRef(c)?c.value=F:null),placeholder:`搜索${e.unref(r)}`,class:"form-name-input",onChange:h},{append:e.withCtx(()=>[e.createVNode(M,{name:"search",color:"#08c979"})]),_:1},8,["modelValue","placeholder"]),e.createElementVNode("div",xS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(F,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(d)===F.formID}]),key:R,onClick:W=>m(F.formID)},[e.createVNode(M,{name:e.unref(o).props.formType==="1"?"form":"examination",color:e.unref(g).has(F.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:F.formName},e.toDisplayString(F.formName),9,$S)],10,TS))),128))])]),e.createElementVNode("div",OS,[e.unref(d)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(S,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(D=(L=e.unref(u))==null?void 0:L.components)!=null&&D.length?(e.openBlock(),e.createBlock(x,{key:1,formData:e.unref(u),selectMode:"",selectComponents:e.unref(g).get(e.unref(d)),onSelect:y},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(T,{modelValue:e.unref(w),"onUpdate:modelValue":O[4]||(O[4]=L=>e.isRef(w)?w.value=L:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(l)}预览`},{footer:e.withCtx(()=>[e.createVNode(B,{onClick:O[3]||(O[3]=L=>w.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var L,D;return[(D=(L=e.unref(_))==null?void 0:L.components)!=null&&D.length?(e.openBlock(),e.createBlock(x,{key:0,formData:e.unref(_)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),hT="",AS={key:1,class:"tip"},RS=["innerHTML"],Ca=e.defineComponent({__name:"conditionInput",props:{title:{type:String,default:"条件设置"},content:{type:String,default:""},showStyle:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},defaultValue:{type:Array,default:()=>[]}},emits:["result","clear"],setup(t,{emit:n}){let o=e.inject("formDesignerData"),r=e.inject("formData"),l=o.selectComponent;const a=e.ref(),i=e.ref(!1),s=e.ref([]),c=e.ref({}),d=e.ref({}),u=()=>{s.value=[],c.value={},d.value={},p(r.value.components),i.value=!0},p=y=>{y.forEach(b=>{var k;if(l.id!==b.id){if(b.isLayout&&((k=b.children)!=null&&k.length)){p(b.children);return}b.isEdit&&(s.value.push({label:b.props.label,id:b.id}),c.value[b.id]=h(b.excludeFilterConditions),d.value[b.id]=b.filterConditionProps)}})},h=y=>Object.keys(filterConditionTypes).filter(k=>!y.includes(k)),m=n,g=()=>{const y=a.value.getFilterData();y.message||(i.value=!1,m("result",y))},f=()=>{m("clear")};return(y,b)=>{const k=mn,w=Gi;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:u},[t.clearable&&t.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(f,["stop"])},"x")):e.createCommentVNode("",!0),t.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.content},null,8,RS)):(e.openBlock(),e.createElementBlock("span",AS,"单击设置条件"))]),e.createVNode(w,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=_=>e.isRef(i)?i.value=_:null),"destroy-on-close":"",title:t.title},{footer:e.withCtx(()=>[e.createVNode(k,{onClick:b[0]||(b[0]=_=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(k,{type:"primary",onClick:g},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(tr,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(c),conditionProps:e.unref(d),defaultValue:t.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),gT="",FS=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(t){let o=e.inject("formDesignerData").selectComponent;const r=(a,i)=>{o.props[`${i}Conditions`]=a.filterConditions,o.props[`${i}ConditionContent`]=a.filterConditionContent,o.props[`${i}ConditionExpression`]=a.filterConditionExpression},l=a=>{o.props[`${a}Conditions`]=void 0,o.props[`${a}ConditionContent`]=void 0,o.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const s=Tt,c=tn,d=xt;return e.openBlock(),e.createBlock(d,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(o).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.showConditionContent,defaultValue:e.unref(o).props.showConditions,onResult:i[0]||(i[0]=u=>r(u,"show")),onClear:i[1]||(i[1]=u=>l("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(o).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.hiddenConditionContent,defaultValue:e.unref(o).props.hiddenConditions,onResult:i[2]||(i[2]=u=>r(u,"hidden")),onClear:i[3]||(i[3]=u=>l("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(o).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.readonlyConditionContent,defaultValue:e.unref(o).props.readonlyConditions,onResult:i[4]||(i[4]=u=>r(u,"readonly")),onClear:i[5]||(i[5]=u=>l("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(o).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=u=>e.unref(o).props.statisticsFlag=u)},null,8,["modelValue"])]),_:1}),e.unref(o).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(Ca,{title:`${e.unref(o).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(o).props.disabledConditionContent,defaultValue:e.unref(o).props.disabledConditions,onResult:i[7]||(i[7]=u=>r(u,"disabled")),onClear:i[8]||(i[8]=u=>l("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),bT="",vS=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(t){const n=e.inject("formData"),o=e.inject("formDesignerData");let r=e.computed(()=>n.value.props.formType),l=o.selectComponent,a=o.selectComponent.rules;l.props.showLabel&&!l.props.labelWidth&&(l.props.labelWidth=n.value.props.labelWidth);const i=()=>{l.props.showConditionContent=void 0,l.props.showConditionExpression=void 0,l.props.showConditions=void 0,l.props.hiddenConditionContent=void 0,l.props.hiddenConditionExpression=void 0,l.props.hiddenConditions=void 0},s=()=>{l.props.readonlyConditionContent=void 0,l.props.readonlyConditionExpression=void 0,l.props.readonlyConditions=void 0},c=()=>{l.props.disabledConditionContent=void 0,l.props.disabledConditionExpression=void 0,l.props.disabledConditions=void 0},d=h=>{a[0].required=h},u=h=>{a[0].message=h},p=h=>{typeof h.value!="string"&&(l.itemID=h.value),l.id=h.value,l.itemSourceType=h.itemSourceType};return(h,m)=>{const g=tn,f=Tt,y=Bn,b=gu,k=Zw,w=ut,_=xt;return e.openBlock(),e.createBlock(_,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(r)==="1"&&e.unref(l).type!=="label"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.showLabel,"onUpdate:modelValue":m[0]||(m[0]=C=>e.unref(l).props.showLabel=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(l).props.showLabel||e.unref(l).type==="label"?(e.openBlock(),e.createBlock(f,{key:1,label:e.unref(l).type==="label"?"标签":e.unref(r)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(Is,{modelValue:e.unref(l).props.label,"onUpdate:modelValue":m[1]||(m[1]=C=>e.unref(l).props.label=C),dictionary:t.dictionary,placeholder:e.unref(l).type==="label"?"标签内容":e.unref(r)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:p},null,8,["modelValue","dictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(f,{label:e.unref(l).type==="label"?"字体大小":e.unref(r)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.fontSize,"onUpdate:modelValue":m[2]||(m[2]=C=>e.unref(l).props.fontSize=C),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(r)==="1"&&e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(f,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.labelWidth,"onUpdate:modelValue":m[3]||(m[3]=C=>e.unref(l).props.labelWidth=C),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.labelNewLine,"onUpdate:modelValue":m[4]||(m[4]=C=>e.unref(l).props.labelNewLine=C)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(l).props.showLabel||e.unref(l).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(f,{label:e.unref(l).type==="label"?"字体加粗":e.unref(r)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.isBold,"onUpdate:modelValue":m[5]||(m[5]=C=>e.unref(l).props.isBold=C)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(f,{label:e.unref(l).type==="label"?"字体颜色":e.unref(r)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(l).props.color,"onUpdate:modelValue":m[6]||(m[6]=C=>e.unref(l).props.color=C)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(f,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(l).props.width,"onUpdate:modelValue":m[7]||(m[7]=C=>e.unref(l).props.width=C),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(f,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).props.paddingLeft,"onUpdate:modelValue":m[8]||(m[8]=C=>e.unref(l).props.paddingLeft=C),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.showFlag,"onUpdate:modelValue":m[9]||(m[9]=C=>e.unref(l).props.showFlag=C),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(l).isInput?(e.openBlock(),e.createBlock(f,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(l).props.placeholder,"onUpdate:modelValue":m[10]||(m[10]=C=>e.unref(l).props.placeholder=C),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(l).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(f,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.clearable,"onUpdate:modelValue":m[11]||(m[11]=C=>e.unref(l).props.clearable=C)},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.readonly,"onUpdate:modelValue":m[12]||(m[12]=C=>e.unref(l).props.readonly=C),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:d,modelValue:e.unref(l).props.required,"onUpdate:modelValue":m[13]||(m[13]=C=>e.unref(l).props.required=C)},null,8,["modelValue"])]),_:1}),e.unref(l).props.required?(e.openBlock(),e.createBlock(f,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(w,{onChange:u,modelValue:e.unref(l).props.requiredMessage,"onUpdate:modelValue":m[14]||(m[14]=C=>e.unref(l).props.requiredMessage=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).props.disabled,"onUpdate:modelValue":m[15]||(m[15]=C=>e.unref(l).props.disabled=C),onChange:c},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(l).type!=="label"&&!e.unref(l).isLayout?(e.openBlock(),e.createBlock(f,{key:6,label:e.unref(r)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(l).props.description,"onUpdate:modelValue":m[16]||(m[16]=C=>e.unref(l).props.description=C),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),HS=e.defineComponent({__name:"formPropsEditor",setup(t,{expose:n}){const o=e.inject("formData"),r=e.ref(),l=()=>{o.value.props.formType==="2"&&(o.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await r.value.validate(a)}}),(a,i)=>{const s=Wl,c=oo,d=Tt,u=ut,p=Bn,h=xt;return e.openBlock(),e.createBlock(h,{ref_key:"formRef",ref:r,model:e.unref(o).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(d,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.formType,"onUpdate:modelValue":i[0]||(i[0]=m=>e.unref(o).props.formType=m),onChange:l},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"formName",label:e.unref(o).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(o).props.formName,"onUpdate:modelValue":i[1]||(i[1]=m=>e.unref(o).props.formName=m),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(o).props.formType==="1"?(e.openBlock(),e.createBlock(d,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=m=>e.unref(o).props.labelPosition=m)},{default:e.withCtx(()=>[e.createVNode(s,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(o).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=m=>e.unref(o).props.labelWidth=m),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(o).props.size,"onUpdate:modelValue":i[4]||(i[4]=m=>e.unref(o).props.size=m)},{default:e.withCtx(()=>[e.createVNode(s,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(s,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(s,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),yT="",wT="",jS={class:"toolbar"},US=e.createElementVNode("div",{class:"devices"},null,-1),qS={class:"operates"},KS=e.createElementVNode("span",null,"清空",-1),WS=e.createElementVNode("span",null,"批量添加",-1),GS=e.createElementVNode("span",null,"查看JSON",-1),YS=e.createElementVNode("span",null,"预览",-1),XS=e.createElementVNode("span",null,"保存",-1),ZS=e.createElementVNode("span",null,"验证表单",-1),JS=e.createElementVNode("span",null,"重置表单",-1),QS=e.createElementVNode("span",null,"表单数据",-1),jp=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(t,{emit:n}){const o=e.inject("formData"),r=n,l=()=>{r("clearComponents")},a=()=>{r("batchAdd")},i=()=>{r("viewFormJson")},s=()=>{r("previewFrom")},c=()=>{r("saveFrom")},d=()=>{r("validateForm")},u=()=>{r("resetForm")},p=()=>{r("viewDataJson")},h=e.ref(!1),m=()=>{h.value=!h.value,r("toggleDescription",h.value)};return(g,f)=>{var w;const y=Je,b=mn,k=Ly;return e.openBlock(),e.createElementBlock("div",jS,[US,e.createElementVNode("div",qS,[t.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(k,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:l},{reference:e.withCtx(()=>{var _;return[e.createVNode(b,{text:"",type:"danger",disabled:((_=e.unref(o).components)==null?void 0:_.length)==0},{default:e.withCtx(()=>[e.createVNode(y,{name:"clear",color:"#ff0000"}),KS]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),t.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(b,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(y,{name:"batchAdd",color:"#116fff",size:"16"}),WS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(b,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(y,{name:"json"}),GS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(b,{key:3,text:"",type:"primary",disabled:((w=e.unref(o).components)==null?void 0:w.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(y,{name:"preview",color:"#116fff"}),YS]),_:1},8,["disabled"])):e.createCommentVNode("",!0),t.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(b,{key:4,text:"",type:"primary",onClick:c},{default:e.withCtx(()=>[e.createVNode(y,{name:"save",size:"14px",color:"#08c979"}),XS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("validateForm")?(e.openBlock(),e.createBlock(b,{key:5,text:"",type:"warning",onClick:d},{default:e.withCtx(()=>[e.createVNode(y,{name:"validate",color:"#e6a23c"}),ZS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("resetForm")?(e.openBlock(),e.createBlock(b,{key:6,text:"",type:"danger",onClick:u},{default:e.withCtx(()=>[e.createVNode(y,{name:"reset",color:"#ff0000"}),JS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(b,{key:7,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(y,{name:"previewData",color:"#116fff"}),QS]),_:1})):e.createCommentVNode("",!0),t.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(b,{key:8,text:"",type:"primary",onClick:m},{default:e.withCtx(()=>[e.createVNode(y,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(o).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),CT="",eB={class:"form-designer"},tB={class:"left-wrap"},nB=["onClick"],oB={class:"component-name"},rB={key:2,class:"no-component-tip"},lB={key:3,class:"mobile-key"},aB=["title"],iB={key:1,class:"right-wrap"},sB={class:"preview-wrap"},cB={name:"zhy-form-designer"},nl=e.defineComponent({...cB,props:{formData:{type:Object,required:!0},componentGroups:{type:Array,default:()=>[]},mergeGroup:{type:Boolean,default:!1},uploadOptions:{type:Object},dictionary:{type:Object,default:()=>{}},defaultSourceType:{type:String,default:void 0},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},setup(t){const n=t,{getTempID:o,clone:r,stringifyJson:l,isEmpty:a}=pt(),i={...ll,...il,...al},{formData:s,componentGroups:c,mergeGroup:d,batchAddComponentParams:u}=e.toRefs(n),p=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),m=e.ref([]),g=e.computed(()=>f.value.map(j=>j.expand&&j.name)),f=e.ref([]),y=e.ref(!1),b={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},k=[{name:"基础组件",expand:!0,components:[{type:"label",allowRepeat:!0,allowModify:!0},{type:"input",allowRepeat:!0,allowModify:!0},{type:"radio",allowRepeat:!0,allowModify:!0},{type:"checkbox",allowRepeat:!0,allowModify:!0}]},{name:"高级组件",expand:!0,components:[{type:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",allowRepeat:!0,allowModify:!0}]},{name:"应用组件",expand:!0,components:[{type:"employee",allowRepeat:!0,allowModify:!0},{type:"post",allowRepeat:!0,allowModify:!0},{type:"grade",allowRepeat:!0,allowModify:!0}]}],w=e.computed(()=>{let j=["clearComponents","previewFrom"];return u.value&&Object.keys(u.value).length&&j.push("batchAdd"),n.testMode&&j.push("viewFormJson"),n.saveMethod&&j.push("saveFrom"),j});e.onMounted(()=>{V(),_()}),e.watch(()=>p.selectComponent,j=>{if(p.propTab="component",!j){m.value=[];return}m.value=["base"],i[p.selectComponent.type].propEditor&&m.value.push("exclusive")}),e.watch([c,d],()=>{V()},{deep:!0}),e.watch(s,()=>{_()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",p),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType),e.provide("formType",s.value.props.formType);const _=()=>{p.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?C(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(b,s.value.props):s.value.props=b,y.value=!s.value.props.formName},C=j=>{j.forEach(async z=>{var oe;let ee=new i[z.type].component;z.name=ee.name,z.isEdit=ee.isEdit,z.isInput=ee.isInput,z.props=Object.assign(ee.props,z.props),z.isEdit&&((z.props.required||z.props.pattern)&&(z.rules=ee.getRules(z.props)),z.filterConditionProps=await ee.getFilterConditionProps(z.props),z.excludeFilterConditions=ee.getExcludeFilterConditions()),f.value.forEach(ye=>{const De=ye.types.findIndex(_e=>_e!=null&&_e.id.includes("temp")?_e.type===z.type:(_e==null?void 0:_e.id)===z.id);De!==-1&&(z.allowRepeat=ye.types[De].allowRepeat,z.allowModify=ye.types[De].allowModify,E(z,ye.types[De],!0),$(De,ye))}),z.isLayout&&((oe=z==null?void 0:z.children)!=null&&oe.length)&&C(z.children)})},V=()=>{var j;if(f.value=[],!((j=c.value)!=null&&j.length)){k.forEach(z=>{f.value.push(N(z))});return}if(n.mergeGroup){k.forEach(oe=>{let ye=oe;const De=c.value.find(_e=>oe.name===_e.name);if(De){let _e=[];oe.components.forEach(Be=>{const Ke=De.components.find(We=>We.type===Be.type);Ke?_e.push(Ke):_e.push(Be)}),ye.components=_e}f.value.push(N(ye))});const z=k.map(oe=>oe.name);c.value.filter(oe=>!z.includes(oe.name)).forEach(oe=>{f.value.push(N(oe))})}else c.value.forEach(z=>{f.value.push(N(z))})},E=(j,z,ee)=>{const oe={employee:[{label:"人员1",value:o()}],post:[{label:"部门1",value:o()}],grade:[]};switch(j.type){case"employee":j.props.options=(ee?z.props.options:z.options)||oe.employee,z.searchEmployeeMethod?j.searchEmployeeMethod=z.searchEmployeeMethod:j.searchEmployeeMethod=ye=>[];break;case"post":j.props.options=(ee?z.props.options:z.options)||oe.post;break;case"grade":j.props.remarkOptions=(ee?z.props.remarkOptions:z.options)||oe.grade;break}},N=j=>{let z=r(j);return z.types=z.components.map(ee=>{var ye;let oe=new i[ee.type].component;return oe.allowRepeat=ee.allowRepeat===void 0?!0:ee.allowRepeat,oe.allowModify=ee.allowModify===void 0?!0:ee.allowModify,E(oe,ee),!((ye=ee.id)!=null&&ye.includes("temp"))&&!a(ee.props)&&(oe.props=Object.assign(oe.props,ee.props),oe.id=ee.id,oe.name=ee.name),oe}),z.dynamicTypes=r(z.types),z.components=z.components.map(ee=>ee.type),z},O=(j,z)=>{const ee=M(j);s.value.components.push(ee);const oe=z.types.findIndex(ye=>j!=null&&j.id.includes("temp")?ye.type===j.type:(ye==null?void 0:ye.id)===j.id);oe!==-1&&$(oe,z),p.selectComponent=void 0,e.nextTick(()=>p.selectComponent=ee)},M=j=>{var oe,ye;let z=r(j);z.itemSourceType=n.defaultSourceType;let ee=new i[j.type].component;return ee.isEdit&&(z.filterConditionProps=ee.getFilterConditionProps(z.props)),!((oe=z.id)!=null&&oe.includes("temp"))||(z.id=o(),!((ye=z.props.options)!=null&&ye.length)||["employee","post"].includes(z.type))||z.props.options.forEach(De=>{De.value=o(),De.itemSourceType=n.defaultSourceType}),z},$=(j,z)=>{z.types[j].allowRepeat||z.types.splice(j,1)},S=j=>{j.allowRepeat||f.value.forEach(z=>{let ee=[];z.dynamicTypes.forEach((oe,ye)=>{z.types.findIndex(_e=>oe!=null&&oe.id.includes("temp")?oe.type===_e.type:(oe==null?void 0:oe.id)===_e.id)!==-1&&ee.push(r(z.dynamicTypes[ye])),(oe!=null&&oe.id.includes("temp")&&oe.type===j.type||(oe==null?void 0:oe.id)===j.id)&&ee.push(r(z.dynamicTypes[ye]))}),z.types=ee})},x=()=>{s.value.components.splice(0,s.value.components.length),p.selectComponent=void 0},P=e.ref(!1),B=()=>{P.value=!0},T=j=>{j!=null&&j.length&&(C(j),j.forEach(z=>s.value.components.push(z)))},L=()=>{Z.value=l(s.value),H.value=!0},D=e.ref(),F=async()=>{if(n.saveMethod){if(!s.value.components.length){_t("error","未发现需要保存的数据!");return}const j=await U();j&&n.saveMethod(j)}},R=e.ref(),W=e.ref(!1),X=()=>{W.value=!0};e.watch(()=>W.value,()=>{s.value.datas={},s.value.components.forEach(j=>{!s.value.datas[j.id]&&!a(j.props.defaultValue)&&(j.type==="grade"?s.value.datas[j.id]={score:j.props.defaultValue}:s.value.datas[j.id]=j.props.defaultValue)})});const H=e.ref(!1),Z=e.ref(),Q=async()=>{await R.value.validate()?_t("success","通过验证"):_t("error","未通过验证")},ue=()=>{R.value.resetFields()},I=()=>{const{data:j,fileList:z}=R.value.getDatas();console.log(j,z)},G=()=>{R.value.toggleDescription()},U=async()=>{if(!await D.value.validate()){_t("error","请将表单属性填写完整!"),p.propTab="form";return}let z=["单选框","多选框","选项","标签","文本框","分组面板"],ee=r(s.value);if(ee.datas={},le(z,ee.components))return ee},le=(j,z,ee)=>{var ye,De;let oe=!0;for(let _e=0;_e<z.length;_e++){let Be=z[_e];if(delete Be.isEdit,delete Be.isInput,delete Be.name,delete Be.rules,delete Be.excludeFilterConditions,delete Be.filterConditionProps,j.find(Ke=>Be.props.label.indexOf(Ke)===0)){_t("error",`请将${ee?`【${ee}】中`:""}第${_e+1}个项目的【${Be.props.label}】调整为合理描述!`),oe=!1;break}if((ye=Be.props.options)!=null&&ye.length){for(let Ke=0;Ke<Be.props.options.length;Ke++){let We=Be.props.options[Ke];if(j.find(ct=>We.label.indexOf(ct)===0)){_t("error",`请将【${Be.props.label}】的第${Ke+1}个选项的【${We.label}】调整为合理描述!`),oe=!1;break}}if(!oe)break}a(z[_e].props.defaultValue)&&(z[_e].props.defaultValue=void 0),Be.isLayout&&((De=Be==null?void 0:Be.children)!=null&&De.length)&&(oe=le(j,Be.children,Be.props.label))}return oe};return(j,z)=>{var Mt;const ee=Je,oe=X9,ye=Y9,De=ut,_e=xt,Be=wu,Ke=bC,We=gC,ct=Gi;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",eB,[e.createElementVNode("div",tB,[e.createVNode(ye,{modelValue:e.unref(g),"onUpdate:modelValue":z[0]||(z[0]=ke=>e.isRef(g)?g.value=ke:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(ke,It)=>(e.openBlock(),e.createBlock(oe,{key:It,title:ke.name,name:ke.name},{default:e.withCtx(()=>[e.createVNode(e.unref(tl),{list:ke.types,"item-key":"type",tag:"div",class:"component-list",clone:Y=>M(Y),sort:!1,onRemove:Y=>$(Y.oldIndex,ke),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Y})=>[e.createElementVNode("div",{class:"component-item",onClick:Oe=>O(Y,ke)},[e.createVNode(ee,{name:Y.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",oB,e.toDisplayString(Y.name),1)],8,nB)]),_:2},1032,["list","clone","onRemove"])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),e.unref(s).props?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["center-wrap",{"open-props":e.unref(h)}])},[e.createVNode(jp,{operates:e.unref(w),onClearComponents:x,onBatchAdd:B,onViewFormJson:L,onPreviewFrom:X,onSaveFrom:F},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(p).device])},[e.unref(y)?(e.openBlock(),e.createBlock(De,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":z[1]||(z[1]=ke=>e.unref(s).props.formName=ke),placeholder:"单击输入标题",onBlur:z[2]||(z[2]=ke=>y.value=!1),onKeydown:z[3]||(z[3]=e.withKeys(ke=>y.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:z[4]||(z[4]=ke=>y.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(Mt=e.unref(s).components)!=null&&Mt.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rB,"从左侧拖拽组件")),e.createVNode(_e,{class:"designer-form","label-position":e.unref(s).props.labelPosition,"label-width":e.unref(s).props.labelWidth,size:e.unref(s).props.size,"status-icon":!1,"show-message":!1,disabled:""},{default:e.withCtx(()=>[e.createVNode(Ap,{components:e.unref(s).components,"onUpdate:components":z[5]||(z[5]=ke=>e.unref(s).components=ke),onDeleteComponent:S},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(p).device==="mobile"?(e.openBlock(),e.createElementBlock("div",lB)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(h)?"show":"hidden"]),title:e.unref(h)?"隐藏属性配置面板":"打开属性配置面板",onClick:z[6]||(z[6]=ke=>h.value=!e.unref(h))},null,10,aB),e.unref(h)?(e.openBlock(),e.createElementBlock("div",iB,[e.createVNode(We,{class:"prop-tabs",modelValue:e.unref(p).propTab,"onUpdate:modelValue":z[9]||(z[9]=ke=>e.unref(p).propTab=ke),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ke,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(p).selectComponent?(e.openBlock(),e.createBlock(ye,{key:1,modelValue:e.unref(m),"onUpdate:modelValue":z[8]||(z[8]=ke=>e.isRef(m)?m.value=ke:null)},{default:e.withCtx(()=>[e.createVNode(oe,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(vS,{dictionary:t.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(p).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(oe,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(p).selectComponent.type].propEditor),{componentProps:e.unref(p).selectComponent.props,"onUpdate:componentProps":z[7]||(z[7]=ke=>e.unref(p).selectComponent.props=ke),dictionary:t.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(oe,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(FS)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(Be,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ke,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(HS,{key:0,ref_key:"formPropsEditorRef",ref:D},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(j.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(j.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(ct,{modelValue:e.unref(W),"onUpdate:modelValue":z[10]||(z[10]=ke=>e.isRef(W)?W.value=ke:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",sB,[e.createVNode(jp,{operates:["validateForm","resetForm",t.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Q,onResetForm:ue,onViewDataJson:I,onToggleDescription:G},null,8,["operates"]),e.createVNode($o,{watching:"",ref_key:"rendererForm",ref:R,formData:e.unref(s),uploadOptions:t.uploadOptions,device:e.unref(p).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(ct,{modelValue:e.unref(H),"onUpdate:modelValue":z[11]||(z[11]=ke=>e.isRef(H)?H.value=ke:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Z)),1)]),_:1},8,["modelValue"]),e.unref(P)?(e.openBlock(),e.createBlock(PS,{key:0,modelValue:e.unref(P),"onUpdate:modelValue":z[12]||(z[12]=ke=>e.isRef(P)?P.value=ke:null),params:e.unref(u),onSelect:T},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),_T="";nl.install=function(t){t.component(nl.name,nl)},$o.install=function(t){t.component($o.name,$o)},Je.install=function(t){t.component(Je.name,Je)};const dB=[Je,nl,$o,tr],fB={install:function(t,n){dB.forEach(o=>{t.component(o.name,o)})}};Le.ZhyDynamicFilter=tr,Le.ZhyFormDesigner=nl,Le.ZhyFormRenderer=$o,Le.ZhyIcon=Je,Le.default=fB,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|