zhytech-ui 1.0.25 → 1.0.26
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 +150 -155
- package/dist/zhytech-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/zhytech-ui.umd.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/function Co(o,n){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,l)}return t}function De(o){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Co(Object(t),!0).forEach(function(l){V3(o,l,t[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Co(Object(t)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(t,l))})}return o}function Nt(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nt=function(n){return typeof n}:Nt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nt(o)}function V3(o,n,t){return n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}function Ve(){return Ve=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(o[l]=t[l])}return o},Ve.apply(this,arguments)}function k3(o,n){if(o==null)return{};var t={},l=Object.keys(o),r,a;for(a=0;a<l.length;a++)r=l[a],!(n.indexOf(r)>=0)&&(t[r]=o[r]);return t}function x3(o,n){if(o==null)return{};var t=k3(o,n),l,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);for(r=0;r<a.length;r++)l=a[r],!(n.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(o,l)&&(t[l]=o[l])}return t}function E3(o){return N3(o)||B3(o)||D3(o)||S3()}function N3(o){if(Array.isArray(o))return Jt(o)}function B3(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function D3(o,n){if(o){if(typeof o=="string")return Jt(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jt(o,n)}}function Jt(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,l=new Array(n);t<n;t++)l[t]=o[t];return l}function S3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M3="1.15.2";function Te(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ie=Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),lt=Te(/Edge/i),Vo=Te(/firefox/i),rt=Te(/safari/i)&&!Te(/chrome/i)&&!Te(/android/i),ko=Te(/iP(ad|od|hone)/i),xo=Te(/chrome/i)&&Te(/android/i),Eo={capture:!1,passive:!1};function q(o,n,t){o.addEventListener(n,t,!Ie&&Eo)}function R(o,n,t){o.removeEventListener(n,t,!Ie&&Eo)}function Bt(o,n){if(n){if(n[0]===">"&&(n=n.substring(1)),o)try{if(o.matches)return o.matches(n);if(o.msMatchesSelector)return o.msMatchesSelector(n);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(n)}catch{return!1}return!1}}function z3(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function ke(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&Bt(o,n):Bt(o,n))||l&&o===t)return o;if(o===t)break}while(o=z3(o))}return null}var No=/\s+/g;function Z(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(No," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(No," ")}}function M(o,n,t){var l=o&&o.style;if(l){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),n===void 0?t:t[n];!(n in l)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),l[n]=t+(typeof t=="string"?"":"px")}}function Re(o,n){var t="";if(typeof o=="string")t=o;else do{var l=M(o,"transform");l&&l!=="none"&&(t=l+" "+t)}while(!n&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Bo(o,n,t){if(o){var l=o.getElementsByTagName(n),r=0,a=l.length;if(t)for(;r<a;r++)t(l[r],r);return l}return[]}function Se(){var o=document.scrollingElement;return o||document.documentElement}function Y(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,s,d,c,m,f;if(o!==window&&o.parentNode&&o!==Se()?(a=o.getBoundingClientRect(),i=a.top,s=a.left,d=a.bottom,c=a.right,m=a.height,f=a.width):(i=0,s=0,d=window.innerHeight,c=window.innerWidth,m=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Ie))do if(r&&r.getBoundingClientRect&&(M(r,"transform")!=="none"||t&&M(r,"position")!=="static")){var h=r.getBoundingClientRect();i-=h.top+parseInt(M(r,"border-top-width")),s-=h.left+parseInt(M(r,"border-left-width")),d=i+a.height,c=s+a.width;break}while(r=r.parentNode);if(l&&o!==window){var p=Re(r||o),g=p&&p.a,u=p&&p.d;p&&(i/=u,s/=g,f/=g,m/=u,d=i+m,c=s+f)}return{top:i,left:s,bottom:d,right:c,width:f,height:m}}}function Do(o,n,t){for(var l=Le(o,!0),r=Y(o)[n];l;){var a=Y(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===Se())break;l=Le(l,!1)}return!1}function Ke(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==I.ghost&&(l||i[a]!==I.dragged)&&ke(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function Kt(o,n){for(var t=o.lastElementChild;t&&(t===I.ghost||M(t,"display")==="none"||n&&!Bt(t,n));)t=t.previousElementSibling;return t||null}function te(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==I.clone&&(!n||Bt(o,n))&&t++;return t}function So(o){var n=0,t=0,l=Se();if(o)do{var r=Re(o),a=r.a,i=r.d;n+=o.scrollLeft*a,t+=o.scrollTop*i}while(o!==l&&(o=o.parentNode));return[n,t]}function $3(o,n){for(var t in o)if(o.hasOwnProperty(t)){for(var l in n)if(n.hasOwnProperty(l)&&n[l]===o[t][l])return Number(t)}return-1}function Le(o,n){if(!o||!o.getBoundingClientRect)return Se();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=M(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Se();if(l||n)return t;l=!0}}while(t=t.parentNode);return Se()}function T3(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function Zt(o,n){return Math.round(o.top)===Math.round(n.top)&&Math.round(o.left)===Math.round(n.left)&&Math.round(o.height)===Math.round(n.height)&&Math.round(o.width)===Math.round(n.width)}var at;function Mo(o,n){return function(){if(!at){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),at=setTimeout(function(){at=void 0},n)}}}function I3(){clearTimeout(at),at=void 0}function zo(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function Qt(o){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function $o(o,n){M(o,"position","absolute"),M(o,"top",n.top),M(o,"left",n.left),M(o,"width",n.width),M(o,"height",n.height)}function vt(o){M(o,"position",""),M(o,"top",""),M(o,"left",""),M(o,"width",""),M(o,"height","")}function To(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,s,d;if(!(!ke(r,n.draggable,o,!1)||r.animated||r===t)){var c=Y(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,c.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,c.top),l.right=Math.max((s=l.right)!==null&&s!==void 0?s:-1/0,c.right),l.bottom=Math.max((d=l.bottom)!==null&&d!==void 0?d:-1/0,c.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var pe="Sortable"+new Date().getTime();function L3(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(M(r,"display")==="none"||r===I.ghost)){o.push({target:r,rect:Y(r)});var a=De({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=Re(r,!0);i&&(a.top-=i.f,a.left-=i.e)}r.fromRect=a}})}},addAnimationState:function(l){o.push(l)},removeAnimationState:function(l){o.splice($3(o,{target:l}),1)},animateAll:function(l){var r=this;if(!this.options.animation){clearTimeout(n),typeof l=="function"&&l();return}var a=!1,i=0;o.forEach(function(s){var d=0,c=s.target,m=c.fromRect,f=Y(c),h=c.prevFromRect,p=c.prevToRect,g=s.rect,u=Re(c,!0);u&&(f.top-=u.f,f.left-=u.e),c.toRect=f,c.thisAnimationDuration&&Zt(h,f)&&!Zt(m,f)&&(g.top-f.top)/(g.left-f.left)===(m.top-f.top)/(m.left-f.left)&&(d=O3(g,h,p,r.options)),Zt(f,m)||(c.prevFromRect=m,c.prevToRect=f,d||(d=r.options.animation),r.animate(c,g,f,d)),d&&(a=!0,i=Math.max(i,d),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},d),c.thisAnimationDuration=d)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){M(l,"transition",""),M(l,"transform","");var s=Re(this.el),d=s&&s.a,c=s&&s.d,m=(r.left-a.left)/(d||1),f=(r.top-a.top)/(c||1);l.animatingX=!!m,l.animatingY=!!f,M(l,"transform","translate3d("+m+"px,"+f+"px,0)"),this.forRepaintDummy=A3(l),M(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),M(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){M(l,"transition",""),M(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function A3(o){return o.offsetWidth}function O3(o,n,t,l){return Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*l.animation}var Ze=[],eo={initializeByDefault:!0},it={mount:function(n){for(var t in eo)eo.hasOwnProperty(t)&&!(t in n)&&(n[t]=eo[t]);Ze.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),Ze.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";Ze.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](De({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](De({sortable:t},l)))})},initializePlugins:function(n,t,l,r){Ze.forEach(function(s){var d=s.pluginName;if(!(!n.options[d]&&!s.initializeByDefault)){var c=new s(n,t,n.options);c.sortable=n,c.options=n.options,n[d]=c,Ve(l,c.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,t){var l={};return Ze.forEach(function(r){typeof r.eventProperties=="function"&&Ve(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return Ze.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function st(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,s=o.fromEl,d=o.oldIndex,c=o.newIndex,m=o.oldDraggableIndex,f=o.newDraggableIndex,h=o.originalEvent,p=o.putSortable,g=o.extraEventProperties;if(n=n||t&&t[pe],!!n){var u,_=n.options,y="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Ie&&!lt?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=s||t,u.item=r||t,u.clone=a,u.oldIndex=d,u.newIndex=c,u.oldDraggableIndex=m,u.newDraggableIndex=f,u.originalEvent=h,u.pullMode=p?p.lastPutMode:void 0;var k=De(De({},g),it.getEventProperties(l,n));for(var b in k)u[b]=k[b];t&&t.dispatchEvent(u),_[y]&&_[y].call(n,u)}}var F3=["evt"],ge=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=x3(l,F3);it.pluginEvent.bind(I)(n,t,De({dragEl:E,parentEl:oe,ghostEl:A,rootEl:K,nextEl:Ue,lastDownEl:Dt,cloneEl:Q,cloneHidden:Ae,dragStarted:dt,putSortable:ie,activeSortable:I.active,originalEvent:r,oldIndex:Qe,oldDraggableIndex:ct,newIndex:ye,newDraggableIndex:Oe,hideGhostForTarget:Ro,unhideGhostForTarget:Uo,cloneNowHidden:function(){Ae=!0},cloneNowShown:function(){Ae=!1},dispatchSortableEvent:function(s){fe({sortable:t,name:s,originalEvent:r})}},a))};function fe(o){st(De({putSortable:ie,cloneEl:Q,targetEl:E,rootEl:K,oldIndex:Qe,oldDraggableIndex:ct,newIndex:ye,newDraggableIndex:Oe},o))}var E,oe,A,K,Ue,Dt,Q,Ae,Qe,ye,ct,Oe,St,ie,ve=!1,Mt=!1,zt=[],He,Ne,to,oo,Io,Lo,dt,et,pt,mt=!1,$t=!1,Tt,me,no=[],lo=!1,It=[],Lt=typeof document<"u",At=ko,Ao=lt||Ie?"cssFloat":"float",P3=Lt&&!xo&&!ko&&"draggable"in document.createElement("div"),Oo=function(){if(Lt){if(Ie)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Fo=function(n,t){var l=M(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Ke(n,0,t),i=Ke(n,1,t),s=a&&M(a),d=i&&M(i),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Y(a).width,m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Y(i).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(d.clear==="both"||d.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&l[Ao]==="none"||i&&l[Ao]==="none"&&c+m>r)?"vertical":"horizontal"},R3=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,s=l?t.left:t.top,d=l?t.right:t.bottom,c=l?t.width:t.height;return r===s||a===d||r+i/2===s+c/2},U3=function(n,t){var l;return zt.some(function(r){var a=r[pe].options.emptyInsertThreshold;if(!(!a||Kt(r))){var i=Y(r),s=n>=i.left-a&&n<=i.right+a,d=t>=i.top-a&&t<=i.bottom+a;if(s&&d)return l=r}}),l},Po=function(n){function t(a,i){return function(s,d,c,m){var f=s.options.group.name&&d.options.group.name&&s.options.group.name===d.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return t(a(s,d,c,m),i)(s,d,c,m);var h=(i?s:d).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var l={},r=n.group;(!r||Nt(r)!="object")&&(r={name:r}),l.name=r.name,l.checkPull=t(r.pull,!0),l.checkPut=t(r.put),l.revertClone=r.revertClone,n.group=l},Ro=function(){!Oo&&A&&M(A,"display","none")},Uo=function(){!Oo&&A&&M(A,"display","")};Lt&&!xo&&document.addEventListener("click",function(o){if(Mt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Mt=!1,!1},!0);var qe=function(n){if(E){n=n.touches?n.touches[0]:n;var t=U3(n.clientX,n.clientY);if(t){var l={};for(var r in n)n.hasOwnProperty(r)&&(l[r]=n[r]);l.target=l.rootEl=t,l.preventDefault=void 0,l.stopPropagation=void 0,t[pe]._onDragOver(l)}}},H3=function(n){E&&E.parentNode[pe]._isOutsideThisEl(n.target)};function I(o,n){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=n=Ve({},n),o[pe]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fo(o,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:I.supportPointer!==!1&&"PointerEvent"in window&&!rt,emptyInsertThreshold:5};it.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);Po(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:P3,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?q(o,"pointerdown",this._onTapStart):(q(o,"mousedown",this._onTapStart),q(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(q(o,"dragover",this),q(o,"dragenter",this)),zt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Ve(this,L3())}I.prototype={constructor:I,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(et=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,E):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,d=(s||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||d,m=r.filter;if(K3(l),!E&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&rt&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=ke(d,r.draggable,l,!1),!(d&&d.animated)&&Dt!==d)){if(Qe=te(d),ct=te(d,r.draggable),typeof m=="function"){if(m.call(this,n,d,this)){fe({sortable:t,rootEl:c,name:"filter",targetEl:d,toEl:l,fromEl:l}),ge("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(m&&(m=m.split(",").some(function(f){if(f=ke(c,f.trim(),l,!1),f)return fe({sortable:t,rootEl:f,name:"filter",targetEl:d,fromEl:l,toEl:l}),ge("filter",t,{evt:n}),!0}),m)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!ke(c,r.handle,l,!1)||this._prepareDragStart(n,s,d)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,s=a.ownerDocument,d;if(l&&!E&&l.parentNode===a){var c=Y(l);if(K=a,E=l,oe=E.parentNode,Ue=E.nextSibling,Dt=l,St=i.group,I.dragged=E,He={target:E,clientX:(t||n).clientX,clientY:(t||n).clientY},Io=He.clientX-c.left,Lo=He.clientY-c.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,E.style["will-change"]="all",d=function(){if(ge("delayEnded",r,{evt:n}),I.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Vo&&r.nativeDraggable&&(E.draggable=!0),r._triggerDragStart(n,t),fe({sortable:r,name:"choose",originalEvent:n}),Z(E,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){Bo(E,m.trim(),ro)}),q(s,"dragover",qe),q(s,"mousemove",qe),q(s,"touchmove",qe),q(s,"mouseup",r._onDrop),q(s,"touchend",r._onDrop),q(s,"touchcancel",r._onDrop),Vo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,E.draggable=!0),ge("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(lt||Ie))){if(I.eventCanceled){this._onDrop();return}q(s,"mouseup",r._disableDelayedDrag),q(s,"touchend",r._disableDelayedDrag),q(s,"touchcancel",r._disableDelayedDrag),q(s,"mousemove",r._delayedDragTouchMoveHandler),q(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&q(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,i.delay)}else d()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){E&&ro(E),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;R(n,"mouseup",this._disableDelayedDrag),R(n,"touchend",this._disableDelayedDrag),R(n,"touchcancel",this._disableDelayedDrag),R(n,"mousemove",this._delayedDragTouchMoveHandler),R(n,"touchmove",this._delayedDragTouchMoveHandler),R(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?q(document,"pointermove",this._onTouchMove):t?q(document,"touchmove",this._onTouchMove):q(document,"mousemove",this._onTouchMove):(q(E,"dragend",this),q(K,"dragstart",this._onDragStart));try{document.selection?Ft(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(ve=!1,K&&E){ge("dragStarted",this,{evt:t}),this.nativeDraggable&&q(document,"dragover",H3);var l=this.options;!n&&Z(E,l.dragClass,!1),Z(E,l.ghostClass,!0),I.active=this,n&&this._appendGhost(),fe({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ne){this._lastX=Ne.clientX,this._lastY=Ne.clientY,Ro();for(var n=document.elementFromPoint(Ne.clientX,Ne.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Ne.clientX,Ne.clientY),n!==t);)t=n;if(E.parentNode[pe]._isOutsideThisEl(n),t)do{if(t[pe]){var l=void 0;if(l=t[pe]._onDragOver({clientX:Ne.clientX,clientY:Ne.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=t.parentNode);Uo()}},_onTouchMove:function(n){if(He){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=A&&Re(A,!0),s=A&&i&&i.a,d=A&&i&&i.d,c=At&&me&&So(me),m=(a.clientX-He.clientX+r.x)/(s||1)+(c?c[0]-no[0]:0)/(s||1),f=(a.clientY-He.clientY+r.y)/(d||1)+(c?c[1]-no[1]:0)/(d||1);if(!I.active&&!ve){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(A){i?(i.e+=m-(to||0),i.f+=f-(oo||0)):i={a:1,b:0,c:0,d:1,e:m,f};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");M(A,"webkitTransform",h),M(A,"mozTransform",h),M(A,"msTransform",h),M(A,"transform",h),to=m,oo=f,Ne=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!A){var n=this.options.fallbackOnBody?document.body:K,t=Y(E,!0,At,!0,n),l=this.options;if(At){for(me=n;M(me,"position")==="static"&&M(me,"transform")==="none"&&me!==document;)me=me.parentNode;me!==document.body&&me!==document.documentElement?(me===document&&(me=Se()),t.top+=me.scrollTop,t.left+=me.scrollLeft):me=Se(),no=So(me)}A=E.cloneNode(!0),Z(A,l.ghostClass,!1),Z(A,l.fallbackClass,!0),Z(A,l.dragClass,!0),M(A,"transition",""),M(A,"transform",""),M(A,"box-sizing","border-box"),M(A,"margin",0),M(A,"top",t.top),M(A,"left",t.left),M(A,"width",t.width),M(A,"height",t.height),M(A,"opacity","0.8"),M(A,"position",At?"absolute":"fixed"),M(A,"zIndex","100000"),M(A,"pointerEvents","none"),I.ghost=A,n.appendChild(A),M(A,"transform-origin",Io/parseInt(A.style.width)*100+"% "+Lo/parseInt(A.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(ge("dragStart",this,{evt:n}),I.eventCanceled){this._onDrop();return}ge("setupClone",this),I.eventCanceled||(Q=Qt(E),Q.removeAttribute("id"),Q.draggable=!1,Q.style["will-change"]="",this._hideClone(),Z(Q,this.options.chosenClass,!1),I.clone=Q),l.cloneId=Ft(function(){ge("clone",l),!I.eventCanceled&&(l.options.removeCloneOnHide||K.insertBefore(Q,E),l._hideClone(),fe({sortable:l,name:"clone"}))}),!t&&Z(E,a.dragClass,!0),t?(Mt=!0,l._loopId=setInterval(l._emulateDragOver,50)):(R(document,"mouseup",l._onDrop),R(document,"touchend",l._onDrop),R(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,E)),q(document,"drop",l),M(E,"transform","translateZ(0)")),ve=!0,l._dragStartId=Ft(l._dragStarted.bind(l,t,n)),q(document,"selectstart",l),dt=!0,rt&&M(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,s=this.options,d=s.group,c=I.active,m=St===d,f=s.sort,h=ie||c,p,g=this,u=!1;if(lo)return;function _(ue,We){ge(ue,g,De({evt:n,isOwner:m,axis:p?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:h,target:l,completed:k,onMove:function(ze,Ct){return Ot(K,t,E,r,ze,Y(ze),n,Ct)},changed:b},We))}function y(){_("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function k(ue){return _("dragOverCompleted",{insertion:ue}),ue&&(m?c._hideClone():c._showClone(g),g!==h&&(Z(E,ie?ie.options.ghostClass:c.options.ghostClass,!1),Z(E,s.ghostClass,!0)),ie!==g&&g!==I.active?ie=g:g===I.active&&ie&&(ie=null),h===g&&(g._ignoreWhileAnimating=l),g.animateAll(function(){_("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===E&&!E.animated||l===t&&!l.animated)&&(et=null),!s.dragoverBubble&&!n.rootEl&&l!==document&&(E.parentNode[pe]._isOutsideThisEl(n.target),!ue&&qe(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function b(){ye=te(E),Oe=te(E,s.draggable),fe({sortable:g,name:"change",toEl:t,newIndex:ye,newDraggableIndex:Oe,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=ke(l,s.draggable,t,!0),_("dragOver"),I.eventCanceled)return u;if(E.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||g._ignoreWhileAnimating===l)return k(!1);if(Mt=!1,c&&!s.disabled&&(m?f||(i=oe!==K):ie===this||(this.lastPutMode=St.checkPull(this,c,E,n))&&d.checkPut(this,c,E,n))){if(p=this._getDirection(n,l)==="vertical",r=Y(E),_("dragOverValid"),I.eventCanceled)return u;if(i)return oe=K,y(),this._hideClone(),_("revert"),I.eventCanceled||(Ue?K.insertBefore(E,Ue):K.appendChild(E)),k(!0);var C=Kt(t,s.draggable);if(!C||W3(n,p,this)&&!C.animated){if(C===E)return k(!1);if(C&&t===n.target&&(l=C),l&&(a=Y(l)),Ot(K,t,E,r,l,a,n,!!l)!==!1)return y(),C&&C.nextSibling?t.insertBefore(E,C.nextSibling):t.appendChild(E),oe=t,b(),k(!0)}else if(C&&G3(n,p,this)){var w=Ke(t,0,s,!0);if(w===E)return k(!1);if(l=w,a=Y(l),Ot(K,t,E,r,l,a,n,!1)!==!1)return y(),t.insertBefore(E,w),oe=t,b(),k(!0)}else if(l.parentNode===t){a=Y(l);var x=0,z,F=E.parentNode!==t,T=!R3(E.animated&&E.toRect||r,l.animated&&l.toRect||a,p),D=p?"top":"left",S=Do(l,"top","top")||Do(E,"top","top"),P=S?S.scrollTop:void 0;et!==l&&(z=a[D],mt=!1,$t=!T&&s.invertSwap||F),x=Y3(n,l,a,p,T?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,$t,et===l);var B;if(x!==0){var H=te(E);do H-=x,B=oe.children[H];while(B&&(M(B,"display")==="none"||B===A))}if(x===0||B===l)return k(!1);et=l,pt=x;var X=l.nextElementSibling,le=!1;le=x===1;var he=Ot(K,t,E,r,l,a,n,le);if(he!==!1)return(he===1||he===-1)&&(le=he===1),lo=!0,setTimeout(j3,30),y(),le&&!X?t.appendChild(E):l.parentNode.insertBefore(E,le?X:l),S&&zo(S,0,P-S.scrollTop),oe=E.parentNode,z!==void 0&&!$t&&(Tt=Math.abs(z-Y(l)[D])),b(),k(!0)}if(t.contains(E))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){R(document,"mousemove",this._onTouchMove),R(document,"touchmove",this._onTouchMove),R(document,"pointermove",this._onTouchMove),R(document,"dragover",qe),R(document,"mousemove",qe),R(document,"touchmove",qe)},_offUpEvents:function(){var n=this.el.ownerDocument;R(n,"mouseup",this._onDrop),R(n,"touchend",this._onDrop),R(n,"pointerup",this._onDrop),R(n,"touchcancel",this._onDrop),R(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(ye=te(E),Oe=te(E,l.draggable),ge("drop",this,{evt:n}),oe=E&&E.parentNode,ye=te(E),Oe=te(E,l.draggable),I.eventCanceled){this._nulling();return}ve=!1,$t=!1,mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ao(this.cloneId),ao(this._dragStartId),this.nativeDraggable&&(R(document,"drop",this),R(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rt&&M(document.body,"user-select",""),M(E,"transform",""),n&&(dt&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),A&&A.parentNode&&A.parentNode.removeChild(A),(K===oe||ie&&ie.lastPutMode!=="clone")&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),E&&(this.nativeDraggable&&R(E,"dragend",this),ro(E),E.style["will-change"]="",dt&&!ve&&Z(E,ie?ie.options.ghostClass:this.options.ghostClass,!1),Z(E,this.options.chosenClass,!1),fe({sortable:this,name:"unchoose",toEl:oe,newIndex:null,newDraggableIndex:null,originalEvent:n}),K!==oe?(ye>=0&&(fe({rootEl:oe,name:"add",toEl:oe,fromEl:K,originalEvent:n}),fe({sortable:this,name:"remove",toEl:oe,originalEvent:n}),fe({rootEl:oe,name:"sort",toEl:oe,fromEl:K,originalEvent:n}),fe({sortable:this,name:"sort",toEl:oe,originalEvent:n})),ie&&ie.save()):ye!==Qe&&ye>=0&&(fe({sortable:this,name:"update",toEl:oe,originalEvent:n}),fe({sortable:this,name:"sort",toEl:oe,originalEvent:n})),I.active&&((ye==null||ye===-1)&&(ye=Qe,Oe=ct),fe({sortable:this,name:"end",toEl:oe,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){ge("nulling",this),K=E=oe=A=Ue=Q=Dt=Ae=He=Ne=dt=ye=Oe=Qe=ct=et=pt=ie=St=I.dragged=I.ghost=I.clone=I.active=null,It.forEach(function(n){n.checked=!0}),It.length=to=oo=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":E&&(this._onDragOver(n),q3(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,l=this.el.children,r=0,a=l.length,i=this.options;r<a;r++)t=l[r],ke(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||J3(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var s=r.children[i];ke(s,this.options.draggable,r,!1)&&(l[a]=s)},this),t&&this.captureAnimationState(),n.forEach(function(a){l[a]&&(r.removeChild(l[a]),r.appendChild(l[a]))}),t&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,t){return ke(n,t||this.options.draggable,this.el,!1)},option:function(n,t){var l=this.options;if(t===void 0)return l[n];var r=it.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&Po(l)},destroy:function(){ge("destroy",this);var n=this.el;n[pe]=null,R(n,"mousedown",this._onTapStart),R(n,"touchstart",this._onTapStart),R(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(R(n,"dragover",this),R(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),zt.splice(zt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Ae){if(ge("hideClone",this),I.eventCanceled)return;M(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),Ae=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Ae){if(ge("showClone",this),I.eventCanceled)return;E.parentNode==K&&!this.options.group.revertClone?K.insertBefore(Q,E):Ue?K.insertBefore(Q,Ue):K.appendChild(Q),this.options.group.revertClone&&this.animate(E,Q),M(Q,"display",""),Ae=!1}}};function q3(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function Ot(o,n,t,l,r,a,i,s){var d,c=o[pe],m=c.options.onMove,f;return window.CustomEvent&&!Ie&&!lt?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=n,d.from=o,d.dragged=t,d.draggedRect=l,d.related=r||n,d.relatedRect=a||Y(n),d.willInsertAfter=s,d.originalEvent=i,o.dispatchEvent(d),m&&(f=m.call(c,d,i)),f}function ro(o){o.draggable=!1}function j3(){lo=!1}function G3(o,n,t){var l=Y(Ke(t.el,0,t.options,!0)),r=To(t.el,t.options,A),a=10;return n?o.clientX<r.left-a||o.clientY<l.top&&o.clientX<l.right:o.clientY<r.top-a||o.clientY<l.bottom&&o.clientX<l.left}function W3(o,n,t){var l=Y(Kt(t.el,t.options.draggable)),r=To(t.el,t.options,A),a=10;return n?o.clientX>r.right+a||o.clientY>l.bottom&&o.clientX>l.left:o.clientY>r.bottom+a||o.clientX>l.right&&o.clientY>l.top}function Y3(o,n,t,l,r,a,i,s){var d=l?o.clientY:o.clientX,c=l?t.height:t.width,m=l?t.top:t.left,f=l?t.bottom:t.right,h=!1;if(!i){if(s&&Tt<c*r){if(!mt&&(pt===1?d>m+c*a/2:d<f-c*a/2)&&(mt=!0),mt)h=!0;else if(pt===1?d<m+Tt:d>f-Tt)return-pt}else if(d>m+c*(1-r)/2&&d<f-c*(1-r)/2)return X3(n)}return h=h||i,h&&(d<m+c*a/2||d>f-c*a/2)?d>m+c/2?1:-1:0}function X3(o){return te(E)<te(o)?1:-1}function J3(o){for(var n=o.tagName+o.className+o.src+o.href+o.textContent,t=n.length,l=0;t--;)l+=n.charCodeAt(t);return l.toString(36)}function K3(o){It.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&It.push(l)}}function Ft(o){return setTimeout(o,0)}function ao(o){return clearTimeout(o)}Lt&&q(document,"touchmove",function(o){(I.active||ve)&&o.cancelable&&o.preventDefault()}),I.utils={on:q,off:R,css:M,find:Bo,is:function(n,t){return!!ke(n,t,n,!1)},extend:T3,throttle:Mo,closest:ke,toggleClass:Z,clone:Qt,index:te,nextTick:Ft,cancelNextTick:ao,detectDirection:Fo,getChild:Ke},I.get=function(o){return o[pe]},I.mount=function(){for(var o=arguments.length,n=new Array(o),t=0;t<o;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(l){if(!l.prototype||!l.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));l.utils&&(I.utils=De(De({},I.utils),l.utils)),it.mount(l)})},I.create=function(o,n){return new I(o,n)},I.version=M3;var re=[],ft,io,so=!1,co,po,Pt,ht;function Z3(){function o(){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 o.prototype={dragStarted:function(t){var l=t.originalEvent;this.sortable.nativeDraggable?q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?q(document,"pointermove",this._handleFallbackAutoScroll):l.touches?q(document,"touchmove",this._handleFallbackAutoScroll):q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?R(document,"dragover",this._handleAutoScroll):(R(document,"pointermove",this._handleFallbackAutoScroll),R(document,"touchmove",this._handleFallbackAutoScroll),R(document,"mousemove",this._handleFallbackAutoScroll)),Ho(),Rt(),I3()},nulling:function(){Pt=io=ft=so=ht=co=po=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,l){var r=this,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(a,i);if(Pt=t,l||this.options.forceAutoScrollFallback||lt||Ie||rt){mo(t,this.options,s,l);var d=Le(s,!0);so&&(!ht||a!==co||i!==po)&&(ht&&Ho(),ht=setInterval(function(){var c=Le(document.elementFromPoint(a,i),!0);c!==d&&(d=c,Rt()),mo(t,r.options,c,l)},10),co=a,po=i)}else{if(!this.options.bubbleScroll||Le(s,!0)===Se()){Rt();return}mo(t,this.options,Le(s,!1),!1)}}},Ve(o,{pluginName:"scroll",initializeByDefault:!0})}function Rt(){re.forEach(function(o){clearInterval(o.pid)}),re=[]}function Ho(){clearInterval(ht)}var mo=Mo(function(o,n,t,l){if(n.scroll){var r=(o.touches?o.touches[0]:o).clientX,a=(o.touches?o.touches[0]:o).clientY,i=n.scrollSensitivity,s=n.scrollSpeed,d=Se(),c=!1,m;io!==t&&(io=t,Rt(),ft=n.scroll,m=n.scrollFn,ft===!0&&(ft=Le(t,!0)));var f=0,h=ft;do{var p=h,g=Y(p),u=g.top,_=g.bottom,y=g.left,k=g.right,b=g.width,C=g.height,w=void 0,x=void 0,z=p.scrollWidth,F=p.scrollHeight,T=M(p),D=p.scrollLeft,S=p.scrollTop;p===d?(w=b<z&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),x=C<F&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(w=b<z&&(T.overflowX==="auto"||T.overflowX==="scroll"),x=C<F&&(T.overflowY==="auto"||T.overflowY==="scroll"));var P=w&&(Math.abs(k-r)<=i&&D+b<z)-(Math.abs(y-r)<=i&&!!D),B=x&&(Math.abs(_-a)<=i&&S+C<F)-(Math.abs(u-a)<=i&&!!S);if(!re[f])for(var H=0;H<=f;H++)re[H]||(re[H]={});(re[f].vx!=P||re[f].vy!=B||re[f].el!==p)&&(re[f].el=p,re[f].vx=P,re[f].vy=B,clearInterval(re[f].pid),(P!=0||B!=0)&&(c=!0,re[f].pid=setInterval((function(){l&&this.layer===0&&I.active._onTouchMove(Pt);var X=re[this.layer].vy?re[this.layer].vy*s:0,le=re[this.layer].vx?re[this.layer].vx*s:0;typeof m=="function"&&m.call(I.dragged.parentNode[pe],le,X,o,Pt,re[this.layer].el)!=="continue"||zo(re[this.layer].el,le,X)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==d&&(h=Le(h,!1)));so=c}},30),qo=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,d=n.unhideGhostForTarget;if(t){var c=l||a;s();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(m.clientX,m.clientY);d(),c&&!c.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function fo(){}fo.prototype={startIndex:null,dragStart:function(n){var t=n.oldDraggableIndex;this.startIndex=t},onSpill:function(n){var t=n.dragEl,l=n.putSortable;this.sortable.captureAnimationState(),l&&l.captureAnimationState();var r=Ke(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),l&&l.animateAll()},drop:qo},Ve(fo,{pluginName:"revertOnSpill"});function ho(){}ho.prototype={onSpill:function(n){var t=n.dragEl,l=n.putSortable,r=l||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:qo},Ve(ho,{pluginName:"removeOnSpill"});var xe;function Q3(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;xe=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,s=t.changed,d=t.cancel;if(i.options.swap){var c=this.sortable.el,m=this.options;if(r&&r!==c){var f=xe;a(r)!==!1?(Z(r,m.swapClass,!0),xe=r):xe=null,f&&f!==xe&&Z(f,m.swapClass,!1)}s(),l(!0),d()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,s=this.options;xe&&Z(xe,s.swapClass,!1),xe&&(s.swap||r&&r.options.swap)&&a!==xe&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),v3(a,xe),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){xe=null}},Ve(o,{pluginName:"swap",eventProperties:function(){return{swapItem:xe}}})}function v3(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=te(o),a=te(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var O=[],be=[],ut,Be,gt=!1,_e=!1,tt=!1,W,_t,Ut;function er(){function o(n){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?q(document,"pointerup",this._deselectMultiDrag):(q(document,"mouseup",this._deselectMultiDrag),q(document,"touchend",this._deselectMultiDrag))),q(document,"keydown",this._checkKeyDown),q(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";O.length&&Be===n?O.forEach(function(s,d){i+=(d?", ":"")+s.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;W=l},delayEnded:function(){this.isMultiDrag=~O.indexOf(W)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<O.length;a++)be.push(Qt(O[a])),be[a].sortableIndex=O[a].sortableIndex,be[a].draggable=!1,be[a].style["will-change"]="",Z(be[a],this.options.selectedClass,!1),O[a]===W&&Z(be[a],this.options.chosenClass,!1);l._hideClone(),r()}},clone:function(t){var l=t.sortable,r=t.rootEl,a=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||O.length&&Be===l&&(jo(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(jo(!1,r),be.forEach(function(i){M(i,"display","")}),l(),Ut=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(be.forEach(function(i){M(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Ut=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&Be&&Be.multiDrag._deselectMultiDrag(),O.forEach(function(l){l.sortableIndex=te(l)}),O=O.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),tt=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){O.forEach(function(i){i!==W&&M(i,"position","absolute")});var a=Y(W,!1,!0,!0);O.forEach(function(i){i!==W&&$o(i,a)}),_e=!0,gt=!0}r.animateAll(function(){_e=!1,gt=!1,l.options.animation&&O.forEach(function(i){vt(i)}),l.options.sort&&Ht()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;_e&&~O.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;O.length>1&&(O.forEach(function(s){a.addAnimationState({target:s,rect:_e?Y(s):i}),vt(s),s.fromRect=i,l.removeAnimationState(s)}),_e=!1,tr(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,s=t.parentEl,d=t.putSortable,c=this.options;if(a){if(r&&i._hideClone(),gt=!1,c.animation&&O.length>1&&(_e||!r&&!i.options.sort&&!d)){var m=Y(W,!1,!0,!0);O.forEach(function(h){h!==W&&($o(h,m),s.appendChild(h))}),_e=!0}if(!r)if(_e||Ht(),O.length>1){var f=Ut;i._showClone(l),i.options.animation&&!Ut&&f&&be.forEach(function(h){i.addAnimationState({target:h,rect:_t}),h.fromRect=_t,h.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(O.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){_t=Ve({},l);var i=Re(W,!0);_t.top-=i.f,_t.left-=i.e}},dragOverAnimationComplete:function(){_e&&(_e=!1,Ht())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,s=t.dispatchSortableEvent,d=t.oldIndex,c=t.putSortable,m=c||this.sortable;if(l){var f=this.options,h=a.children;if(!tt)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Z(W,f.selectedClass,!~O.indexOf(W)),~O.indexOf(W))O.splice(O.indexOf(W),1),ut=null,st({sortable:i,rootEl:r,name:"deselect",targetEl:W,originalEvent:l});else{if(O.push(W),st({sortable:i,rootEl:r,name:"select",targetEl:W,originalEvent:l}),l.shiftKey&&ut&&i.el.contains(ut)){var p=te(ut),g=te(W);if(~p&&~g&&p!==g){var u,_;for(g>p?(_=p,u=g):(_=g,u=p+1);_<u;_++)~O.indexOf(h[_])||(Z(h[_],f.selectedClass,!0),O.push(h[_]),st({sortable:i,rootEl:r,name:"select",targetEl:h[_],originalEvent:l}))}}else ut=W;Be=m}if(tt&&this.isMultiDrag){if(_e=!1,(a[pe].options.sort||a!==r)&&O.length>1){var y=Y(W),k=te(W,":not(."+this.options.selectedClass+")");if(!gt&&f.animation&&(W.thisAnimationDuration=null),m.captureAnimationState(),!gt&&(f.animation&&(W.fromRect=y,O.forEach(function(C){if(C.thisAnimationDuration=null,C!==W){var w=_e?Y(C):y;C.fromRect=w,m.addAnimationState({target:C,rect:w})}})),Ht(),O.forEach(function(C){h[k]?a.insertBefore(C,h[k]):a.appendChild(C),k++}),d===te(W))){var b=!1;O.forEach(function(C){if(C.sortableIndex!==te(C)){b=!0;return}}),b&&(s("update"),s("sort"))}O.forEach(function(C){vt(C)}),m.animateAll()}Be=m}(r===a||c&&c.lastPutMode!=="clone")&&be.forEach(function(C){C.parentNode&&C.parentNode.removeChild(C)})}},nullingGlobal:function(){this.isMultiDrag=tt=!1,be.length=0},destroyGlobal:function(){this._deselectMultiDrag(),R(document,"pointerup",this._deselectMultiDrag),R(document,"mouseup",this._deselectMultiDrag),R(document,"touchend",this._deselectMultiDrag),R(document,"keydown",this._checkKeyDown),R(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof tt<"u"&&tt)&&Be===this.sortable&&!(t&&ke(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;O.length;){var l=O[0];Z(l,this.options.selectedClass,!1),O.shift(),st({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Ve(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[pe];!l||!l.options.multiDrag||~O.indexOf(t)||(Be&&Be!==l&&(Be.multiDrag._deselectMultiDrag(),Be=l),Z(t,l.options.selectedClass,!0),O.push(t))},deselect:function(t){var l=t.parentNode[pe],r=O.indexOf(t);!l||!l.options.multiDrag||!~r||(Z(t,l.options.selectedClass,!1),O.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return O.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;_e&&a!==W?i=-1:_e?i=te(a,":not(."+t.options.selectedClass+")"):i=te(a),r.push({multiDragElement:a,index:i})}),{items:E3(O),clones:[].concat(be),oldIndicies:l,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function tr(o,n){O.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function jo(o,n){be.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Ht(){O.forEach(function(o){o!==W&&o.parentNode&&o.parentNode.removeChild(o)})}I.mount(new Z3),I.mount(ho,fo);function je(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function wt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function or(){return typeof window<"u"?window.console:global.console}const nr=or();function lr(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const rr=/-(\w)/g,ar=lr(o=>o.replace(rr,(n,t)=>t.toUpperCase())),Go=["Start","Add","Remove","Update","End"],Wo=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],Yo=["Move"],ir=[Yo,Go,Wo].flatMap(o=>o).map(o=>`on${o}`),uo={manage:Yo,manageAndEmit:Go,emit:Wo};function sr(o){return ir.indexOf(o)!==-1}const cr=["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 dr(o){return cr.includes(o)}function pr(o){return["transition-group","TransitionGroup"].includes(o)}function Xo(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function Jo(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function mr({$attrs:o,componentData:n={}}){return{...Jo(Object.entries(o).filter(([l,r])=>Xo(l))),...n}}function fr({$attrs:o,callBackBuilder:n}){const t=Jo(Ko(o));Object.entries(n).forEach(([r,a])=>{uo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function Ko(o){return Object.entries(o).filter(([n,t])=>!Xo(n)).map(([n,t])=>[ar(n),t]).filter(([n,t])=>!sr(n))}const Zo=({el:o})=>o,hr=(o,n)=>o.__draggable_context=n,Qo=o=>o.__draggable_context;class ur{constructor({nodes:{header:n,default:t,footer:l},root:r,realList:a}){this.defaultNodes=t,this.children=[...n,...t,...l],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,t){const{tag:l,children:r,_isRootComponent:a}=this;return n(l,t,a?{default:()=>r}:r)}updated(){const{defaultNodes:n,realList:t}=this;n.forEach((l,r)=>{hr(Zo(l),{element:t[r],index:r})})}getUnderlyingVm(n){return Qo(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const s=Qo(i);if(s)return s.index;if(r===0)return 0;const d=Zo(l[0]),c=[...a].findIndex(m=>m===d);return n<c?0:r}}function gr(o,n){const t=o[n];return t?t():[]}function _r({$slots:o,realList:n,getKey:t,itemDataSet:l}){let r;switch(typeof l){case"function":r=l;break;case"object":r=()=>l;break}const a=n||[],[i,s]=["header","footer"].map(m=>gr(o,m)),{item:d}=o;if(!d)throw new Error("draggable element must have an item slot");const c=a.flatMap((m,f)=>d({element:m,index:f}).map(h=>{h.key=t(m);const p=r==null?void 0:r(m);return p?h.props={...h.props||{},"data-draggable":!0,...p}:h.props={...h.props||{},"data-draggable":!0},h}));if(c.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:c}}function wr(o){const n=pr(o),t=!dr(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function yr({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=_r({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=wr(n);return new ur({nodes:a,root:i,realList:t})}function vo(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function en(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function br(o){const n=en.call(this,o);return(t,l)=>{n.call(this,t,l),vo.call(this,o,t)}}function go(o,n){const t=new I(o,n);return n.swap&&!t.swap?(I.mount(new Q3),t.destroy(),go(o,n)):n.multiDrag&&!t.multiDrag?(I.mount(new er),t.destroy(),go(o,n)):t}function Cr(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let _o=null;const Vr={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},kr=["update:modelValue","change",...[...uo.manageAndEmit,...uo.emit].map(o=>o.toLowerCase())],yt=e.defineComponent({name:"draggable",inheritAttrs:!1,props:Vr,emits:kr,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=yr({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=mr({$attrs:n,componentData:l});return i.render(e.h,s)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&nr.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:o,$el:n,componentStructure:t}=this;t.updated();const l=fr({$attrs:o,callBackBuilder:{manageAndEmit:a=>br.call(this,a),emit:a=>vo.bind(this,a),manage:a=>en.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=go(r,l),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:o}=this;return o||this.modelValue},getKey(){const{itemKey:o}=this;return typeof o=="function"?o:n=>n[o]}},watch:{$attrs:{handler(o){const{_sortable:n}=this;n&&Ko(o).forEach(([t,l])=>{n.option(t,l)})},deep:!0}},methods:{getUnderlyingVm(o){return this.componentStructure.getUnderlyingVm(o)||null},getUnderlyingPotencialDraggableComponent(o){return o.__draggable_component__},emitChanges(o){e.nextTick(()=>this.$emit("change",o))},alterList(o){if(this.list){o(this.list);return}const n=[...this.modelValue];o(n),this.$emit("update:modelValue",n)},spliceList(){const o=n=>n.splice(...arguments);this.alterList(o)},removeAllFromList(o){const n=t=>o.forEach(l=>t.splice(l,1));this.alterList(n)},swapPosition(o,n){const t=l=>{const r=l[o];l[o]=l[n],l[n]=r};this.alterList(t)},updatePosition(o,n){const t=l=>l.splice(n,0,l.splice(o,1)[0]);this.alterList(t)},updatePositions(o,n){const t=l=>{const r=o.sort().reverse().flatMap(a=>l.splice(a,1)).reverse();return l.splice(n,0,...r)};this.alterList(t)},getRelatedContextFromMoveEvent({to:o,related:n}){const t=this.getUnderlyingPotencialDraggableComponent(o);if(!t)return{component:t};const l=t.realList,r={list:l,component:t};return o!==n&&l?{...t.getUnderlyingVm(n)||{},...r}:r},getVmIndexFromDomIndex(o){return this.componentStructure.getVmIndexFromDomIndex(o,this.targetDomElement)},onDragStart(o){if(Array.isArray(o.items)&&o.items.length){this.multidragContexts=o.items.map(t=>this.getUnderlyingVm(t));const n=this.multidragContexts.sort(({index:t},{index:l})=>t-l).map(t=>t.element);o.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(o.item),o.item._underlying_vm_=this.clone(this.context.element),_o=o.item},onDragAdd(o){Array.isArray(o.items)&&o.items.length?this.onDragAddMulti(o):this.onDragAddSingle(o)},onDragAddMulti(o){const n=o.item._underlying_vm_multidrag_;if(n===void 0)return;o.items.forEach(r=>je(r));const t=this.getVmIndexFromDomIndex(o.newIndex);this.spliceList(t,0,...n);const l=n.map((r,a)=>({element:r,newIndex:t+a}));this.emitChanges({added:l})},onDragAddSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=o.item._underlying_vm_;if(t===void 0)return;const l=n?o.from.children[o.oldIndex]:null;je(o.item);let r=this.getVmIndexFromDomIndex(o.newIndex);n&&(r=r===0?0:r-1),this.spliceList(r,n?1:0,t);const a={element:t,newIndex:r,from:o.from,to:o.to};if(o.swap||(this.emitChanges({added:a}),!n))return;const i={to:o.from,from:o.to,item:l,oldIndex:o.newIndex,newIndex:o.oldIndex,swap:!0};e.nextTick(()=>{const s=i.to.__draggable_component__;s.onDragStart(i),s.onDragAdd(i)})},onDragRemove(o){Array.isArray(o.items)&&o.items.length?this.onDragRemoveMulti(o):this.onDragRemoveSingle(o)},onDragRemoveMulti(o){const n=(this.$slots.header?this.$slots.header():[]).length||0,t=o.oldIndicies.sort(({index:a},{index:i})=>a-i);if(t.forEach(({multiDragElement:a,index:i})=>{wt(this.$el,a,i),a.parentNode&&I.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>je(a));return}const l=Cr(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(s=>s.index===a).element,oldIndex:a}));this.emitChanges({removed:r})},onDragRemoveSingle(o){const{index:n,element:t}=this.context,l={element:t,oldIndex:n,from:o.from,to:o.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:l});if(wt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){je(o.clone);return}this.spliceList(n,1),this.emitChanges({removed:l})},onDragUpdate(o){Array.isArray(o.items)&&o.items.length?o.pullMode||this.onDragUpdateMulti(o):this.onDragUpdateSingle(o)},onDragUpdateMulti(o){const{items:n,from:t}=o,l=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(d=>je(d));const r=Array.from(o.oldIndicies).sort(({index:d},{index:c})=>d-c);r.forEach(d=>wt(t,d.multiDragElement,d.index));const a=r.map(({index:d})=>d-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((d,c)=>({element:this.multidragContexts.find(f=>f.index===d).element,oldIndex:d,newIndex:i+c}));this.emitChanges({moved:s})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;je(o.item),wt(o.from,o.item,o.oldIndex),n&&(je(t),wt(o.from,t,o.newIndex));const l=this.context.index,r=this.getVmIndexFromDomIndex(o.newIndex);n?this.swapPosition(l,r):this.updatePosition(l,r);const a={element:this.context.element,oldIndex:l,newIndex:r};this.emitChanges({moved:a})},computeFutureIndex(o,n){if(!o.element)return 0;const t=[...n.to.children].filter(i=>i.style.display!=="none"),l=t.indexOf(n.related),r=o.component.getVmIndexFromDomIndex(l);return t.indexOf(_o)!==-1||!n.willInsertAfter?r:r+1},onDragMove(o,n){const{move:t,realList:l}=this;if(!t||!l)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.computeFutureIndex(r,o),i={...this.context,futureIndex:a},s={...o,relatedContext:r,draggedContext:i};return t(s,n)},onDragEnd(){_o=null},select(o){I.utils.select(o)},deselect(o){I.utils.deselect(o)}}}),{getTempID:xr}=de();let Me=class{constructor(n,t,l=!1,r=!1){we(this,"isEdit");we(this,"isInput");we(this,"type");we(this,"name");we(this,"id");we(this,"itemID");we(this,"itemSourceType");we(this,"rules");we(this,"props");we(this,"excludeFilterConditions");we(this,"filterConditionProps");we(this,"isLayout",!1);we(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=xr(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Er=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;return(l,r)=>{const a=e.resolveComponent("el-color-picker"),i=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-switch"),d=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"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(t).backgroundColor,"onUpdate:modelValue":r[0]||(r[0]=h=>e.unref(t).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).showBorder=h)},null,8,["modelValue"])]),_:1}),e.unref(t).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(c,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(d,{label:"实线边框",value:"solid"}),e.createVNode(d,{label:"虚线边框",value:"dashed"}),e.createVNode(d,{label:"点线边框",value:"dotted"}),e.createVNode(d,{label:"双线边框",value:"double"}),e.createVNode(d,{label:"凹槽边框",value:"groove"}),e.createVNode(d,{label:"脊状边框",value:"ridge"}),e.createVNode(d,{label:"内凹边框",value:"inset"}),e.createVNode(d,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).borderColor,"onUpdate:modelValue":r[3]||(r[3]=h=>e.unref(t).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=h=>e.unref(t).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),ws="",Nr=["onClick"],Br={key:2,class:"operates"},tn=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(o,{emit:n}){const t={...kt,...Et,...xt},{getTempID:l,clone:r}=de();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=o,{components:d}=e.toRefs(s),c=n;e.watch(d,()=>c("update:components",d),{immediate:!0,deep:!0});const m=u=>{u.added?f(u.added.element):u.moved&&f(u.moved.element)},f=u=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=u)},h=u=>{const _=p(u);d.value.push(_),f(_)},p=u=>{var y,k;let _=r(u);if(_.id=l(),delete _.itemID,(y=_.props.options)!=null&&y.length){_.props.options.forEach(C=>{C.value.includes("temp-")&&(C.value=l())});let b=new t[u.type].component;_.filterConditionProps=b.getFilterConditionProps(_.props)}if(_.isLayout&&((k=_.children)!=null&&k.length)){let b=[];_.children.forEach(C=>{b.push(p(C))}),_.children=b}return _},g=u=>{let _=r(d.value[u]);d.value.splice(u,1),i.selectComponent=void 0,c("deleteComponent",_)};return(u,_)=>{const y=e.resolveComponent("el-form-item"),k=ee;return e.openBlock(),e.createBlock(e.unref(yt),{list:e.unref(d),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:m},{item:e.withCtx(({element:b,index:C})=>[e.createElementVNode("div",{onClick:e.withModifiers(w=>f(b),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==b},{"is-hidden":!b.props.showFlag}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(a).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{key:0,isDesigner:"",componentID:b.id,component:e.unref(d)[C],"onUpdate:component":w=>e.unref(d)[C]=w,onDeleteComponent:_[0]||(_[0]=w=>c("deleteComponent",w))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(y,{key:1,prop:b.id,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),"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(t[b.type].renderer),{isDesigner:"",componentID:b.id,componentProps:b.props,"onUpdate:componentProps":w=>b.props=w,datas:e.unref(a).datas,"onUpdate:datas":_[1]||(_[1]=w=>e.unref(a).datas=w)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==b?(e.openBlock(),e.createElementBlock("div",Br,[b.allowRepeat?(e.openBlock(),e.createBlock(k,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(w=>h(b),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(k,{name:"delete",color:"#ff0000",onClick:e.withModifiers(w=>g(C),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,Nr)]),_:1},8,["list"])}}}),ys="",Dr=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(o,{emit:n}){const t=o,{component:l,showDescription:r}=e.toRefs(t);!l.value.children&&(l.value.children=[]);const a=e.computed(()=>{let d={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(d.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(d["border-radius"]=`${l.value.props.borderRadius}px`),d}),i=n,s=d=>{i("deleteComponent",d)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":o.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(l).props.color,"font-size":e.unref(l).props.fontSize+"px","font-weight":e.unref(l).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(l).props.label),5)):e.createCommentVNode("",!0),o.isDesigner?(e.openBlock(),e.createBlock(tn,{key:1,components:e.unref(l).children,"onUpdate:components":c[0]||(c[0]=m=>e.unref(l).children=m),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(rn,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),bs="",Sr={component:class extends Me{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:Dr,propEditor:Er},Mr=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");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(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=p=>e.isRef(l)?l.value=p:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p)},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Vs="",zr={class:"upload-component"},$r=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Tr={key:0,class:"description"},Ir=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(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const d=h=>{if(h.status==="ready"&&!n(h.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){c(h);return}if(h.status==="success"&&h.response.code===0){ce("error",h.response.message||"文件上传失败!"),c(h);return}l.autoUpload?a.value[t.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[t.componentID].push({name:h.name,url:h.url,file:h.raw})},c=(h,p=!0)=>{p&&s.value.handleRemove(h);const g=a.value[t.componentID].findIndex(u=>u.url===h.url);g!==-1&&a.value[t.componentID].splice(g,1)},m=h=>{c(h,!1)},f=()=>{var p;let h=`最多只能上传${i.value.fileLimit}个文件`;(p=a.value[t.componentID])!=null&&p.length&&(h+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),ce("error",h)};return(h,p)=>{const g=ee,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",zr,[e.createVNode(_,{ref_key:"uploadRef",ref:s,action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-exceed":f,"on-change":d,"on-remove":m},{default:e.withCtx(()=>{var y;return[e.unref(i).fileLimit>(((y=e.unref(a)[o.componentID])==null?void 0:y.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[$r]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Tr,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),ks="",Lr={component:class extends Me{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:Ir,propEditor:Mr},Ar=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");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(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=p=>e.isRef(l)?l.value=p:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Es="",Or={class:"upload-image-component"},Fr={class:"el-upload-list__item-actions"},Pr={class:"el-upload-list__item-preview"},Rr={class:"el-upload-list__item-delete"},Ur={key:0,class:"description"},Hr=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(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(),d=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const c=p=>{if(p.status==="ready"&&!n(p.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){m(p);return}if(p.status==="success"&&p.response.code===0){ce("error",p.response.message||"图片上传失败!"),m(p);return}l.autoUpload?a.value[t.componentID].push({name:p.name,url:p.response.data.url,id:p.response.data.id}):a.value[t.componentID].push({name:p.name,url:p.url,file:p.raw})},m=p=>{s.value.handleRemove(p);const g=a.value[t.componentID].findIndex(u=>u.url===p.url);g!==-1&&a.value[t.componentID].splice(g,1)},f=()=>{d.value.$el.children[0].click()},h=()=>{var g;let p=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[t.componentID])!=null&&g.length&&(p+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),ce("error",p)};return(p,g)=>{var k;const u=ee,_=e.resolveComponent("el-image"),y=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Or,[e.createVNode(y,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((k=e.unref(a)[o.componentID])==null?void 0:k.length)||0)}),"list-type":"picture-card",action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-change":c,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:b})=>[e.createVNode(_,{ref_key:"imageRef",ref:d,style:{width:"100px",height:"100px"},src:b.url,"preview-src-list":[b.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Fr,[e.createElementVNode("span",Pr,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",Rr,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:C=>m(b)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Ur,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ns="",qr={component:class extends Me{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:Hr,propEditor:Ar};function qt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const jr=o=>typeof o<"u",on=()=>{};function Gr(o,n){function t(...l){return new Promise((r,a)=>{Promise.resolve(o(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(r).catch(a)})}return t}function Wr(o,n={}){let t,l,r=on;const a=s=>{clearTimeout(s),r(),r=on};return s=>{const d=qt(o),c=qt(n.maxWait);return t&&a(t),d<=0||c!==void 0&&c<=0?(l&&(a(l),l=null),Promise.resolve(s())):new Promise((m,f)=>{r=n.rejectOnCancel?f:m,c&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,m(s())},c)),t=setTimeout(()=>{l&&a(l),l=null,m(s())},d)})}}function Yr(o,n=200,t={}){return Gr(Wr(n,t),o)}function Xr(o,n){return e.computed(()=>qt(o).map(t=>qt(t)).filter(n))}function Jr(o){return JSON.parse(JSON.stringify(o))}function Kr(o,n,t,l={}){var r,a,i;const{clone:s=!1,passive:d=!1,eventName:c,deep:m=!1,defaultValue:f,shouldEmit:h}=l,p=e.getCurrentInstance(),g=t||(p==null?void 0:p.emit)||((r=p==null?void 0:p.$emit)==null?void 0:r.bind(p))||((i=(a=p==null?void 0:p.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(p==null?void 0:p.proxy));let u=c;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=b=>s?typeof s=="function"?s(b):Jr(b):b,y=()=>jr(o[n])?_(o[n]):f,k=b=>{h?h(b)&&g(u,b):g(u,b)};if(d){const b=y(),C=e.ref(b);let w=!1;return e.watch(()=>o[n],x=>{w||(w=!0,C.value=_(x),e.nextTick(()=>w=!1))}),e.watch(C,x=>{!w&&(x!==o[n]||m)&&k(x)},{deep:m}),C}else return e.computed({get(){return y()},set(b){k(b)}})}const Zr={class:"option-wrap"},Qr={style:{float:"left"}},vr={style:{float:"right",color:"#8492a6"}},ea=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const l=e.ref([]);e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const r=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)},a=()=>{t.options.push({label:"",value:""})},i=h=>{t.options.splice(h,1)},s=e.ref(!1);let d=e.ref(t.options);const c=Yr(async h=>await n.selectComponent.searchEmployeeMethod(h),500),m=h=>{if(!h)return[];s.value=!0,c(h).then(p=>{d.value=p,s.value=!1})},f=(h,p)=>{const g=d.value.find(u=>u.value===h);t.options[p]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},d.value=t.options};return(h,p)=>{const g=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-switch"),k=e.resolveComponent("el-input-number"),b=e.resolveComponent("el-divider"),C=ee,w=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),z=e.resolveComponent("el-button"),F=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(F,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(_,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(t).type,"onUpdate:modelValue":p[0]||(p[0]=T=>e.unref(t).type=T),onChange:r},{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(t).type!=="selector"?(e.openBlock(),e.createBlock(_,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":p[1]||(p[1]=T=>e.unref(t).newLine=T)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":p[2]||(p[2]=T=>e.unref(t).multiple=T)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var T;return[e.createVNode(k,{modelValue:e.unref(t).min,"onUpdate:modelValue":p[3]||(p[3]=D=>e.unref(t).min=D),step:1,min:0,max:((T=e.unref(l))==null?void 0:T.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var T;return[e.createVNode(k,{modelValue:e.unref(t).max,"onUpdate:modelValue":p[4]||(p[4]=D=>e.unref(t).max=D),step:1,min:0,max:((T=e.unref(l))==null?void 0:T.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(b,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(t).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:T,index:D})=>[e.createElementVNode("div",Zr,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(C,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(x,{class:"selector-component",modelValue:T.value,"onUpdate:modelValue":S=>T.value=S,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":m,loading:e.unref(s),"loading-text":"加载中……",onChange:S=>f(S,D)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(S,P)=>(e.openBlock(),e.createBlock(w,{key:P,label:S.label,value:S.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:P,label:S.label,suffix:S.suffix},()=>[e.createElementVNode("span",Qr,e.toDisplayString(S.label),1),e.createElementVNode("span",vr,e.toDisplayString(S.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(C,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:S=>i(D)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(z,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(C,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Ds="",ta={class:"employee-component"},oa={key:3,class:"description"},na=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),k=ee;return e.openBlock(),e.createElementBlock("div",ta,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=b=>e.isRef(i)?i.value=b:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:b.value,onClick:w=>c(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=b=>e.isRef(i)?i.value=b:null),disabled:o.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,(b,C)=>(e.openBlock(),e.createBlock(g,{value:b.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(y,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=b=>e.isRef(i)?i.value=b:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",oa,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ss="",la={component:class extends Me{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:na,propEditor:ea};function wo(){return{getGradeItems(o){let n=[];if(!o.maxScore)return n;o.showVeto&&n.push({value:"-2",label:"单项否决"}),o.showNotGrade&&n.push({value:"-1",label:"不考评"}),o.showZero&&n.push({value:"0",label:"0分"});let t=Number(o.maxScore);for(let l=1;l<=t;l++)n.push({value:String(l),label:`${String(l)}分`});return o.scoreReverseFlag&&n.reverse(),n}}}const ra=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=wo(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps.options=r.value},{immediate:!0}),(a,i)=>{const s=e.resolveComponent("el-option"),d=e.resolveComponent("el-select"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).defaultValue=p),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(p,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).maxScore=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).showZero=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).showNotGrade=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).scoreReverseFlag=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=p=>e.unref(t).newLine=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=p=>e.unref(t).showProblem=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=p=>e.unref(t).showBrightSpot=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=p=>e.unref(t).showRemark=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=p=>e.unref(t).showVeto=p)},null,8,["modelValue"])]),_:1})]),_:1})}}}),aa={class:"auto-complete"},ia={key:0},sa=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(o,{emit:n}){e.useCssVars(p=>({e00bfd70:e.unref(h)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,s=Kr(l,"modelValue",i),d=()=>{i("change",s.value)},c=(p,g)=>{const u=p?Xr(r,m(p)):r.value;g(e.unref(u))},m=p=>({start:u=>u.value.toLowerCase().indexOf(p.toLowerCase())===0,random:u=>u.value.indexOf(p)>=0})[l.matchMode],f=e.inject("convertPX"),h=e.computed(()=>`${f(a.value)}px`);return(p,g)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",aa,[o.label?(e.openBlock(),e.createElementBlock("span",ia,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=_=>e.isRef(s)?s.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":c,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:d},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),zs="",ca={class:"grade-component"},da={key:3,class:"description"},pa=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(o,{emit:n}){const t=o,{getGradeItems:l}=wo();let r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(a.value[t.componentID]||{});e.watch(s,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const d=e.computed(()=>l(i.value)),c=n;e.watch(a,f=>c("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const m=(f,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,f.preventDefault())};return(f,h)=>{const p=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),u=sa,_=ee;return e.openBlock(),e.createElementBlock("div",ca,[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]=y=>e.unref(s).score=y),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(y,k)=>(e.openBlock(),e.createBlock(p,{key:k,value:y.value,onClick:b=>m(b,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(u,{key:0,class:"problem",modelValue:e.unref(s).problem,"onUpdate:modelValue":h[1]||(h[1]=y=>e.unref(s).problem=y),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(u,{key:1,class:"bright-spot",modelValue:e.unref(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=y=>e.unref(s).brightSpot=y),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(u,{key:2,class:"bright-spot",modelValue:e.unref(s).remark,"onUpdate:modelValue":h[3]||(h[3]=y=>e.unref(s).remark=y),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",da,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),$s="",{isEmpty:ma}=de(),{getGradeItems:fa}=wo(),ha={component:class extends Me{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:(t,l,r)=>{if(!l||ma(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&fa(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:pa,propEditor:ra},ua=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const l=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)};return(r,a)=>{const i=e.resolveComponent("el-radio-button"),s=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(d,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(t).type=h),onChange:l},{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(t).type!=="selector"?(e.openBlock(),e.createBlock(d,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(t).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(t).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(d,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=p=>e.unref(t).min=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(d,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).max=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),ga={class:"post-component"},_a={key:3,class:"description"},wa=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),k=ee;return e.openBlock(),e.createElementBlock("div",ga,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=b=>e.isRef(i)?i.value=b:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:b.value,onClick:w=>c(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=b=>e.isRef(i)?i.value=b:null),disabled:o.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,(b,C)=>(e.openBlock(),e.createBlock(g,{value:b.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(y,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=b=>e.isRef(i)?i.value=b:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Is="",ya={component:class extends Me{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:wa,propEditor:ua},ba={class:"dictionary-binder"},Ca={class:"item"},Va={class:"label"},ka={key:0,class:"item-souce-type"},yo=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(o,{emit:n}){var p;e.useCssVars(g=>({"4f018582":o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(p=l.dictionary)==null?void 0:p.souceTypeMap;r.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const d=g=>{s.value=g?c(g):l.dictionary.dictionaryItems},c=g=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),m=n,{getTempID:f}=de(),h=g=>{let u=s.value.find(_=>_.value===g);u||(u={value:f(),label:g,itemSourceType:t}),m("update:modelValue",u.label),m("change",u)};return(g,u)=>{var k;const _=e.resolveComponent("el-select-v2"),y=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ba,[(k=o.dictionary)!=null&&k.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=b=>e.isRef(a)?a.value=b:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":d,placeholder:o.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:h},{default:e.withCtx(({item:b})=>[e.createElementVNode("div",Ca,[e.createElementVNode("span",Va,e.toDisplayString(b.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",ka,e.toDisplayString(e.unref(i).get(b.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(y,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=b=>e.isRef(a)?a.value=b:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),As="",xa={class:"option-wrap"},Ea=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=ee,y=e.resolveComponent("el-checkbox"),k=e.resolveComponent("el-tooltip"),b=e.resolveComponent("el-button"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=w=>e.unref(l).defaultValue=w),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(w,x)=>(e.openBlock(),e.createBlock(m,{key:x,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=w=>e.unref(l).newLine=w)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).min,"onUpdate:modelValue":c[2]||(c[2]=w=>e.unref(l).min=w),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).max,"onUpdate:modelValue":c[3]||(c[3]=w=>e.unref(l).max=w),step:1,min:1,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:w,index:x})=>[e.createElementVNode("div",xa,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(yo,{modelValue:w.label,"onUpdate:modelValue":z=>w.label=z,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:z=>s(z,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(k,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(y,{class:"input-enable",modelValue:w.inputEnable,"onUpdate:modelValue":z=>w.inputEnable=z},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:z=>i(x)},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(b,{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)]),_:1})}}}),Os="",Na={class:"checkbox-component"},Ba={key:0,class:"description"},Da=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,c=>r.value[t.componentID]=c);const s=n;e.watch(r,c=>s("update:datas",c)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=c=>{a.value.options.forEach(m=>{const f=`${t.componentID}||${m.value}`;!c.includes(m.value)&&r.value[f]&&delete r.value[f]})};return(c,m)=>{const f=e.resolveComponent("el-checkbox"),h=e.resolveComponent("el-input"),p=e.resolveComponent("el-checkbox-group"),g=ee;return e.openBlock(),e.createElementBlock("div",Na,[e.createVNode(p,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":m[0]||(m[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var y;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:_},[e.createVNode(f,{value:u.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.label),1)]),_:2},1032,["value"]),u.inputEnable&&(o.isDesigner||(y=e.unref(i))!=null&&y.includes(u.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":k=>e.unref(r)[`${o.componentID}||${u.value}`]=k},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",Ba,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Fs="",{getTempID:nn}=de(),Sa={component:class extends Me{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:nn(),label:"选项1"},{value:nn(),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:Da,propEditor:Ea},Ma=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=de();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=d=>{d&&(r[1].pattern=n(d))},i=d=>{r[1].message=d},s=d=>{d==="text"&&(l.showPassword=!1)};return(d,c)=>{const m=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(u,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(f,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).type,"onUpdate:modelValue":c[1]||(c[1]=_=>e.unref(l).type=_),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(l).type=="password"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":c[2]||(c[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":c[3]||(c[3]=_=>e.unref(l).pattern=_)},null,8,["modelValue"])]),_:1}),e.unref(l).pattern?(e.openBlock(),e.createBlock(f,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":c[4]||(c[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),za={class:"input-component"},$a={key:0,class:"description"},Ta=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,d=>r.value[t.componentID]=d);const s=n;return e.watch(r,d=>s("update:datas",d)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(d,c)=>{const m=e.resolveComponent("el-input"),f=ee;return e.openBlock(),e.createElementBlock("div",za,[e.createVNode(m,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=h=>e.isRef(i)?i.value=h:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:o.disabled,readonly:o.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",$a,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Rs="",Ia={component:class extends Me{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:Ta,propEditor:Ma},La={component:class extends Me{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(o){return(n,t)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:o.componentProps.color,"font-size":o.componentProps.fontSize+"px","font-weight":o.componentProps.isBold?"bold":"normal"})},e.toDisplayString(o.componentProps.label),5))}}),undefined:void 0},Aa={class:"option-wrap"},Oa=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-divider"),u=ee,_=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-tooltip"),k=e.resolveComponent("el-button"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=C=>e.unref(l).defaultValue=C),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,w)=>(e.openBlock(),e.createBlock(m,{key:w,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=C=>e.unref(l).newLine=C)},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(yt),{class:"radio-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:w})=>[e.createElementVNode("div",Aa,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(yo,{modelValue:C.label,"onUpdate:modelValue":x=>C.label=x,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:x=>s(x,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(y,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":x=>C.inputEnable=x},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:x=>i(w)},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(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),js="",Fa={class:"radio-component"},Pa={key:0,class:"description"},Ra=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>r.value[t.componentID]=m);const s=n;e.watch(r,m=>s("update:datas",m)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=m=>{a.value.options.forEach(f=>{const h=`${t.componentID}||${f.value}`;m!==f.value&&r.value[h]&&delete r.value[h]})},c=(m,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const h=`${t.componentID}||${f}`;r.value[h]&&delete r.value[h],m.preventDefault()}};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-group"),u=ee;return e.openBlock(),e.createElementBlock("div",Fa,[e.createVNode(g,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=_=>e.isRef(i)?i.value=_:null),disabled:o.disabled,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,y)=>{var k;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:y},[e.createVNode(h,{value:_.value,onClick:b=>c(b,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(k=e.unref(i))!=null&&k.includes(_.value))?(e.openBlock(),e.createBlock(p,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":b=>e.unref(r)[`${o.componentID}||${_.value}`]=b},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",Pa,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Gs="",{getTempID:ln}=de();class Ua extends Me{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:ln(),label:"选项1"},{value:ln(),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 Ha={component:Ua,renderer:Ra,propEditor:Oa},qa={key:0,class:"component-readonly-mask"},rn=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(o,{emit:n}){const t={...kt,...Et,...xt},{computedExpression:l}=de();let r=e.inject("formData");const a=o,{components:i,showDescription:s,selectMode:d}=e.toRefs(a),c={show:p=>{if(p.showFlag===void 0)return String(!0);let g="";return p.showFlag?g=p.hiddenConditionExpression?`!(${p.hiddenConditionExpression})`:String(p.showFlag):g=p.showConditionExpression||String(p.showFlag),g},disabled:p=>p.disabledConditionExpression||String(p.disabled===void 0?!1:p.disabled),readonly:p=>p.readonlyConditionExpression||String(p.readonly===void 0?!1:p.readonly)},m=(p,g)=>{var y;let u=c[g](p.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(b=>{var z;const C=b.replace(/\{|}/g,"");let w=r.value.datas[C];const x=i.value.find(F=>F.id===C);(x==null?void 0:x.type)==="grade"&&(w=(z=r.value.datas[C])==null?void 0:z.score),u=u.replace(b,w||"")});const _=l(u);if(g==="show"&&!_){let k=[];p.isLayout&&((y=p.children)!=null&&y.length)?k=p.children:k=[p],k.forEach(b=>{r.value.datas[b.id]&&(b.type==="grade"?delete r.value.datas[b.id].score:delete r.value.datas[b.id])})}return _},f=n,h=p=>{f("select",p)};return(p,g)=>{const u=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-form-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(y,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k},[e.unref(d)||m(y,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(d)},{"is-hidden":!y.props.showFlag},{selected:y.selected}]),style:e.normalizeStyle({width:`${y.props.width*100/e.unref(r).props.column}%`,"padding-left":`${y.props.paddingLeft}px`})},[m(y,"readonly")?(e.openBlock(),e.createElementBlock("div",qa)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:y.selected,"onUpdate:modelValue":b=>y.selected=b,label:"选择",onChange:b=>h(y)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),y.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{key:2,componentID:y.id,showDescription:e.unref(s),component:e.unref(i)[k],"onUpdate:component":b=>e.unref(i)[k]=b},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":y.props.labelNewLine}]),prop:y.id,"label-width":y.props.showLabel?y.props.labelWidth:"0",rules:y.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:y.props.color||"#000000","font-size":y.props.fontSize+"px","font-weight":y.props.isBold?"bold":"normal"})},e.toDisplayString(y.props.showLabel?y.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{componentID:y.id,disabled:m(y,"disabled"),showDescription:e.unref(s),componentProps:y.props,"onUpdate:componentProps":b=>y.props=b,datas:e.unref(r).datas,"onUpdate:datas":g[0]||(g[0]=b=>e.unref(r).datas=b)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),Ws="",ja={key:0,class:"select-title"},Ga=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),Wa={key:1,class:"title"},Ya={key:0,class:"readonly-mask"},Xa={key:2,class:"mobile-key"},Ja={name:"zhy-form-renderer"},Ge=e.defineComponent({...Ja,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(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=de(),r={...kt,...Et,...xt},a=e.ref(),i=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=o,m=t,{formData:f,selectMode:h}=e.toRefs(c),p=e.ref(c.selectComponents);e.provide("uploadOptions",c.uploadOptions),e.provide("formData",f);const g=C=>{var w,x,z,F;if((w=p.value)!=null&&w.length||(p.value=[]),!C){p.value=[],f.value.components.forEach(T=>{T.selected=s.value,s.value&&p.value.push(T)}),d.value=!1,m("select",p.value);return}if(C.selected)(x=p.value)==null||x.push(C);else{const T=(z=p.value)==null?void 0:z.findIndex(D=>D.id===C.id);T!==-1&&((F=p.value)==null||F.splice(T,1))}m("select",p.value),u()},u=()=>{var C,w;if(!((C=p.value)!=null&&C.length)){d.value=!1,s.value=!1;return}if(((w=p.value)==null?void 0:w.length)<f.value.components.length){d.value=!0;return}s.value=!0,d.value=!1},_=C=>{C!=null&&C.length&&(C.forEach(w=>{var z,F;let x=new r[w.type].component;x.isEdit&&(w.props.required||w.props.pattern)&&(w.rules=x.getRules(w.props)),c.selectMode&&((z=p.value)!=null&&z.length)&&p.value.findIndex(D=>D.id===w.id)!==-1&&(w.selected=!0),w.isLayout&&((F=w==null?void 0:w.children)!=null&&F.length)&&_(w.children)}),c.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const y=()=>{let C=l(f.value.datas),w=[],x=[];const z=Object.keys(C);for(let F of z){if(F.includes("||")){let T=F.split("||"),D=T[0],S=T[1],P=w.findIndex(B=>B.id===S&&B.groupID===D);if(P!==-1)w[P].value=C[F];else{const B={parentID:D,id:S,value:C[F]};w.push(B)}continue}k(f.value.components,w,x,F,C)}return{data:w,fileList:x}},k=(C,w,x,z,F)=>{var S;let T,D;for(let P=0;P<C.length;P++){const B=C[P];if(B.id===z){T=B,b(w,x,z,F,T);break}if(B.isLayout&&((S=B==null?void 0:B.children)!=null&&S.length)){if(T=B.children.find(H=>H.id===z),T){D=B.id,b(w,x,z,F,T,D);break}k(B.children,w,x,z,F)}}},b=(C,w,x,z,F,T)=>{var S,P;let D=-1;switch(F.type){case"radio":D=C.findIndex(B=>B.id===z[x]),D===-1&&C.push({groupID:T,parentID:x,id:z[x],value:""});break;case"checkbox":z[x].forEach(B=>{D=C.findIndex(H=>H.id===H),D===-1&&C.push({groupID:T,parentID:x,id:B,value:""})});break;case"upload":case"uploadImage":if(!((S=c.uploadOptions)!=null&&S.autoUpload)&&((P=z[x])!=null&&P.length)){const B=z[x].map(X=>(X.file&&(X.file.id=x),X.file)),H=z[x].map(X=>{if(X.fileID)return X.fileID}).filter(X=>X!==void 0);w.push({id:x,groupID:T,fileIDs:H,files:B})}break;default:C.push({groupID:T,parentID:x,id:x,value:z[x]});break}};return c.watching&&e.watch(()=>f.value.datas,()=>{const C=y();m("change",C.data,C.fileList)},{immediate:!0,deep:!0}),n({getDatas:y,async validate(C=()=>{}){return await a.value.validate(C)},resetFields(){a.value.resetFields()},clearValidate(C){a.value.clearValidate(C)},scrollToField(C){a.value.scrollToField(C)},toggleDescription(){i.value=!i.value}}),(C,w)=>{const x=e.resolveComponent("el-checkbox"),z=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",o.device,{"examination-paper":e.unref(f).props.formType==="2"},{"select-mode":e.unref(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",ja,[Ga,e.createVNode(x,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":w[0]||(w[0]=F=>e.isRef(s)?s.value=F:null),label:"全选",indeterminate:e.unref(d),onChange:w[1]||(w[1]=F=>g())},null,8,["modelValue","indeterminate"])])):e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",Wa,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(z,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(f).datas,"label-position":e.unref(f).props.labelPosition,"label-width":e.unref(f).props.labelWidth,size:e.unref(f).props.size,"scroll-to-error":"",disabled:o.disabled},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",Ya)):e.createCommentVNode("",!0),e.createVNode(rn,{components:e.unref(f).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"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",Xa)):e.createCommentVNode("",!0)],2)}}}),Ys="",Ka={class:"form-list-wrap"},Za={class:"form-list"},Qa=["onClick"],va=["title"],e1={class:"form-template"},t1={class:"dialog-footer"},o1={class:"left-wrap"},n1={class:"select-count-wrap"},l1={class:"count"},r1={class:"right-wrap"},a1=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(o,{emit:n}){const{clone:t}=de(),l=e.inject("formData"),r=l.value.props.formType==="2"?"试卷":"表单",a=l.value.props.formType==="2"?"题目":"项目",i=e.useModel(o,"modelValue"),s=o,{params:d}=e.toRefs(s);console.log("batchAddDialog--------",d.value);const c=e.ref({}),m=e.ref(""),f=e.ref({datas:{},components:[],props:{}});e.onMounted(()=>{var D;(D=d.value.searchParams)!=null&&D.length&&(d.value.searchParams.forEach(S=>{S.default&&(c.value[S.key]=S.default)}),g())});const h=(D,S,P)=>{let B=P==="datetime"?"YYYY-MM-DD HH:mm":P==="date"?"YYYY-MM-DD":"HH:mm";return $e.dayjs(D).format(B)===$e.dayjs(S).format(B)},p=e.ref(d.value.formList),g=D=>{D&&u(D),p.value=t(d.value.formList);const S=Object.keys(c.value);S!=null&&S.length&&S.forEach(P=>{var X;if(!c.value[P])return;const B=(X=d.value.searchParams)==null?void 0:X.find(le=>le.key===P);if(!(B!=null&&B.type))return;const H=B.type;p.value=p.value.filter(le=>{if(!Object.keys(le).includes(B.key))return ce("error",`参数配置错误,【${B.label}】的属性(${B.key})在数据中不存在!`),!1;const he=le[B.key];if(!he)return!0;if([ae.DATETIME,ae.DATE,ae.TIME].includes(H))return h(he,c.value[P],H);if(H===ae.SELECTOR)return String(he)===String(c.value[P]);if(H===ae.CASCADER_SELECTOR){const ue=c.value[P],We=Array.isArray(ue)?ue[ue.length-1]:ue;return String(he)===String(We)}else if(H===ae.INPUT)return String(he).includes(String(c.value[P]));return String(he).includes(String(c.value[P]))})})},u=async D=>{var S,P;if((S=D.clearKeys)!=null&&S.length&&D.clearKeys.forEach(B=>delete c.value[B]),D.updateOptionKey){const B=(P=d.value.searchParams)==null?void 0:P.find(H=>H.key===D.updateOptionKey);B&&[ae.SELECTOR,ae.CASCADER_SELECTOR].includes(B.type)&&B.getOptions&&(B.options=await B.getOptions(c.value[D.key]))}},_=async D=>{m.value!==D&&(m.value=D,f.value={datas:{},components:[],props:{}},d.value.getFormTemplate&&(f.value=await d.value.getFormTemplate(D)))},y=e.ref(new Map),k=e.computed(()=>{let D=0;for(const[,S]of y.value)D+=S.length;return D}),b=D=>{y.value.has(m.value)?D.length?y.value.set(m.value,D):y.value.delete(m.value):y.value.set(m.value,D)},C=()=>{let D=[];for(const[,S]of y.value)S.forEach(P=>{let B=t(P);delete B.selected,D.push(B)});return D},w=e.ref(!1),x=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:l.value.props.formType}}),z=()=>{x.value.components=C(),w.value=!0},F=n,T=()=>{const D=C();F("select",D),i.value=!1};return(D,S)=>{const P=ee,B=e.resolveComponent("el-input"),H=e.resolveComponent("el-option"),X=e.resolveComponent("el-select"),le=e.resolveComponent("el-cascader"),he=e.resolveComponent("el-date-picker"),ue=e.resolveComponent("el-time-picker"),We=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form"),ze=e.resolveComponent("el-divider"),Ct=e.resolveComponent("el-empty"),Ye=Ge,Gt=e.resolveComponent("el-link"),Vt=e.resolveComponent("el-button"),Wt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Wt,{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=Ce=>i.value=Ce),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(a)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",t1,[e.createElementVNode("div",o1,[e.createElementVNode("span",n1,[e.createTextVNode(" 已选 "),e.createElementVNode("span",l1,e.toDisplayString(` ${e.unref(k)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(a)}`),1)]),e.createVNode(Gt,{type:"primary",disabled:e.unref(y).size===0,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(a)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",r1,[e.createVNode(Vt,{onClick:S[0]||(S[0]=Ce=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(Vt,{type:"primary",onClick:T},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var Ce,Xe,Yt;return[e.createElementVNode("div",Ka,[e.createTextVNode(e.toDisplayString(e.unref(d).searchParams)+" ",1),(Ce=e.unref(d).searchParams)!=null&&Ce.length?(e.openBlock(),e.createBlock(Fe,{key:0,model:e.unref(c),class:"search-param-form","label-suffix":":"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d).searchParams,(U,N)=>(e.openBlock(),e.createBlock(We,{key:N,label:U.label},{default:e.withCtx(()=>[U.type===e.unref(ae).INPUT?(e.openBlock(),e.createBlock(B,{key:0,class:"form-name-input",modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`搜索${U.label}`,clearable:"",onChange:V=>g(U)},{append:e.withCtx(()=>[e.createVNode(P,{name:"search",color:"#08c979"})]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).SELECTOR?(e.openBlock(),e.createBlock(X,{key:1,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,clearable:"",onChange:V=>g(U)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.options,(V,L)=>(e.openBlock(),e.createBlock(H,{key:L,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).CASCADER_SELECTOR?(e.openBlock(),e.createBlock(le,{key:2,ref_for:!0,ref:"cascaderRef",class:"cascader-component",modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,options:U.options,"show-all-levels":!1,props:{expandTrigger:"click",emitPath:!1},clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","placeholder","options","onChange"])):e.createCommentVNode("",!0),[e.unref(ae).DATETIME,e.unref(ae).DATE,e.unref(ae)].includes(U.type)?(e.openBlock(),e.createBlock(he,{key:3,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,type:U.type,placeholder:`请选择${U.label}`,"value-format":"YYYY-MM-DD HH:mm",clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","type","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).TIME?(e.openBlock(),e.createBlock(ue,{key:4,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,"value-format":"HH:mm",clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1},8,["model"])):e.createCommentVNode("",!0),e.createVNode(ze),e.createElementVNode("div",Za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(U,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(m)===U.formID}]),key:N,onClick:V=>_(U.formID)},[e.createVNode(P,{name:e.unref(l).props.formType==="1"?"form":"examination",color:e.unref(y).has(U.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:U.formName},e.toDisplayString(U.formName),9,va)],10,Qa))),128))])]),e.createElementVNode("div",e1,[e.unref(m)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ct,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(Yt=(Xe=e.unref(f))==null?void 0:Xe.components)!=null&&Yt.length?(e.openBlock(),e.createBlock(Ye,{key:1,formData:e.unref(f),selectMode:"",selectComponents:e.unref(y).get(e.unref(m)),onSelect:b},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(Wt,{modelValue:e.unref(w),"onUpdate:modelValue":S[3]||(S[3]=Ce=>e.isRef(w)?w.value=Ce:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(a)}预览`},{footer:e.withCtx(()=>[e.createVNode(Vt,{onClick:S[2]||(S[2]=Ce=>w.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var Ce,Xe;return[(Xe=(Ce=e.unref(x))==null?void 0:Ce.components)!=null&&Xe.length?(e.openBlock(),e.createBlock(Ye,{key:0,formData:e.unref(x)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),Xs="",i1={key:1,class:"tip"},s1=["innerHTML"],jt=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(o,{emit:n}){let t=e.inject("formDesignerData"),l=e.inject("formData"),r=t.selectComponent;const a=e.ref(),i=e.ref(!1),s=e.ref([]),d=e.ref({}),c=e.ref({}),m=()=>{s.value=[],d.value={},c.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(y=>{var k;if(r.id!==y.id){if(y.isLayout&&((k=y.children)!=null&&k.length)){f(y.children);return}y.isEdit&&(s.value.push({label:y.props.label,id:y.id}),d.value[y.id]=h(y.excludeFilterConditions),c.value[y.id]=y.filterConditionProps)}})},h=_=>Object.keys(nt).filter(k=>!_.includes(k)),p=n,g=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,p("result",_))},u=()=>{p("clear")};return(_,y)=>{const k=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:m},[o.clearable&&o.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(u,["stop"])},"x")):e.createCommentVNode("",!0),o.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o.content},null,8,s1)):(e.openBlock(),e.createElementBlock("span",i1,"单击设置条件"))]),e.createVNode(b,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":y[1]||(y[1]=C=>e.isRef(i)?i.value=C:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(k,{onClick:y[0]||(y[0]=C=>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(Je,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(d),conditionProps:e.unref(c),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),Js="",c1=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(o){let t=e.inject("formDesignerData").selectComponent;const l=(a,i)=>{t.props[`${i}Conditions`]=a.filterConditions,t.props[`${i}ConditionContent`]=a.filterConditionContent,t.props[`${i}ConditionExpression`]=a.filterConditionExpression},r=a=>{t.props[`${a}Conditions`]=void 0,t.props[`${a}ConditionContent`]=void 0,t.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.showConditionContent,defaultValue:e.unref(t).props.showConditions,onResult:i[0]||(i[0]=m=>l(m,"show")),onClear:i[1]||(i[1]=m=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.hiddenConditionContent,defaultValue:e.unref(t).props.hiddenConditions,onResult:i[2]||(i[2]=m=>l(m,"hidden")),onClear:i[3]||(i[3]=m=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.readonlyConditionContent,defaultValue:e.unref(t).props.readonlyConditions,onResult:i[4]||(i[4]=m=>l(m,"readonly")),onClear:i[5]||(i[5]=m=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(t).props.statisticsFlag=m)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.disabledConditionContent,defaultValue:e.unref(t).props.disabledConditions,onResult:i[7]||(i[7]=m=>l(m,"disabled")),onClear:i[8]||(i[8]=m=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),d1=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){const n=e.inject("formData"),t=e.inject("formDesignerData");let l=e.computed(()=>n.value.props.formType),r=t.selectComponent,a=t.selectComponent.rules;r.props.showLabel&&!r.props.labelWidth&&(r.props.labelWidth=n.value.props.labelWidth);const i=()=>{r.props.showConditionContent=void 0,r.props.showConditionExpression=void 0,r.props.showConditions=void 0,r.props.hiddenConditionContent=void 0,r.props.hiddenConditionExpression=void 0,r.props.hiddenConditions=void 0},s=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},d=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},c=h=>{a[0].required=h},m=h=>{a[0].message=h},f=h=>{typeof h.value!="string"&&(r.itemID=h.value),r.id=h.value,r.itemSourceType=h.itemSourceType};return(h,p)=>{const g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-color-picker"),k=e.resolveComponent("el-slider"),b=e.resolveComponent("el-input"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(l)==="1"&&e.unref(r).type!=="label"?(e.openBlock(),e.createBlock(u,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":p[0]||(p[0]=w=>e.unref(r).props.showLabel=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createBlock(u,{key:1,label:e.unref(r).type==="label"?"标签":e.unref(l)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(yo,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":p[1]||(p[1]=w=>e.unref(r).props.label=w),dictionary:o.dictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:f},null,8,["modelValue","dictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(u,{label:e.unref(r).type==="label"?"字体大小":e.unref(l)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.fontSize,"onUpdate:modelValue":p[2]||(p[2]=w=>e.unref(r).props.fontSize=w),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(l)==="1"&&e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(u,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.labelWidth,"onUpdate:modelValue":p[3]||(p[3]=w=>e.unref(r).props.labelWidth=w),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":p[4]||(p[4]=w=>e.unref(r).props.labelNewLine=w)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(u,{label:e.unref(r).type==="label"?"字体加粗":e.unref(l)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":p[5]||(p[5]=w=>e.unref(r).props.isBold=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":p[6]||(p[6]=w=>e.unref(r).props.color=w)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":p[7]||(p[7]=w=>e.unref(r).props.width=w),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.paddingLeft,"onUpdate:modelValue":p[8]||(p[8]=w=>e.unref(r).props.paddingLeft=w),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":p[9]||(p[9]=w=>e.unref(r).props.showFlag=w),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":p[10]||(p[10]=w=>e.unref(r).props.placeholder=w),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(u,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":p[11]||(p[11]=w=>e.unref(r).props.clearable=w)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":p[12]||(p[12]=w=>e.unref(r).props.readonly=w),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:c,modelValue:e.unref(r).props.required,"onUpdate:modelValue":p[13]||(p[13]=w=>e.unref(r).props.required=w)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(b,{onChange:m,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":p[14]||(p[14]=w=>e.unref(r).props.requiredMessage=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":p[15]||(p[15]=w=>e.unref(r).props.disabled=w),onChange:d},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).type!=="label"&&!e.unref(r).isLayout?(e.openBlock(),e.createBlock(u,{key:6,label:e.unref(l)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":p[16]||(p[16]=w=>e.unref(r).props.description=w),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),p1=e.defineComponent({__name:"formPropsEditor",setup(o,{expose:n}){const t=e.inject("formData"),l=e.ref(),r=()=>{t.value.props.formType==="2"&&(t.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await l.value.validate(a)}}),(a,i)=>{const s=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{ref_key:"formRef",ref:l,model:e.unref(t).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(c,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).props.formType=p),onChange:r},{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(c,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).props.formName=p),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(c,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).props.labelPosition=p)},{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(c,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).props.labelWidth=p),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).props.size=p)},{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"])}}}),m1={class:"toolbar"},f1=e.createElementVNode("div",{class:"devices"},null,-1),h1={class:"operates"},u1=e.createElementVNode("span",null,"清空",-1),g1=e.createElementVNode("span",null,"模板导入",-1),_1=e.createElementVNode("span",null,"查看JSON",-1),w1=e.createElementVNode("span",null,"预览",-1),y1=e.createElementVNode("span",null,"保存",-1),b1=e.createElementVNode("span",null,"验证表单",-1),C1=e.createElementVNode("span",null,"重置表单",-1),V1=e.createElementVNode("span",null,"表单数据",-1),an=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(o,{emit:n}){const t=e.inject("formData"),l=n,r=()=>{l("clearComponents")},a=()=>{l("batchAdd")},i=()=>{l("viewFormJson")},s=()=>{l("previewFrom")},d=()=>{l("saveFrom")},c=()=>{l("validateForm")},m=()=>{l("resetForm")},f=()=>{l("viewDataJson")},h=e.ref(!1),p=()=>{h.value=!h.value,l("toggleDescription",h.value)};return(g,u)=>{var b;const _=ee,y=e.resolveComponent("el-button"),k=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",m1,[f1,e.createElementVNode("div",h1,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(k,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(y,{text:"",type:"danger",disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),u1]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(y,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),g1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(y,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),_1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(y,{key:3,text:"",type:"primary",disabled:((b=e.unref(t).components)==null?void 0:b.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),w1]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(y,{key:4,text:"",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),y1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(y,{key:5,text:"",type:"warning",onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),b1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(y,{key:6,text:"",type:"danger",onClick:m},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),C1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(y,{key:7,text:"",type:"primary",onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),V1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(y,{key:8,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),Ks="",k1={class:"form-designer"},x1={class:"left-wrap"},E1=["onClick","title"],N1={class:"component-name"},B1={key:2,class:"no-component-tip"},D1={key:3,class:"mobile-key"},S1=["title"],M1={key:1,class:"right-wrap"},z1={class:"preview-wrap"},$1={name:"zhy-form-designer"},bt=e.defineComponent({...$1,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(o){const n=o,{getTempID:t,clone:l,stringifyJson:r,isEmpty:a}=de(),i={...kt,...Et,...xt},{formData:s,componentGroups:d,mergeGroup:c,batchAddComponentParams:m}=e.toRefs(n);console.log("formDesigner--------",m.value);const f=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),p=e.ref([]),g=e.computed(()=>u.value.map(N=>N.expand&&N.name)),u=e.ref([]),_=e.ref(!1),y={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}]}],b=e.computed(()=>{let N=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&N.push("batchAdd"),n.testMode&&N.push("viewFormJson"),n.saveMethod&&N.push("saveFrom"),N});e.onMounted(()=>{x(),C()}),e.watch(()=>f.selectComponent,N=>{if(f.propTab="component",!N){p.value=[];return}p.value=["base"],i[f.selectComponent.type].propEditor&&p.value.push("exclusive")}),e.watch([d,c],()=>{x()},{deep:!0}),e.watch(s,()=>{C()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",f),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType);const C=()=>{f.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?w(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(y,s.value.props):s.value.props=y,_.value=!s.value.props.formName},w=N=>{N.forEach(async V=>{var $;let L=new i[V.type].component;V.name=L.name,V.isEdit=L.isEdit,V.isInput=L.isInput,V.props=Object.assign(L.props,V.props),V.isEdit&&((V.props.required||V.props.pattern)&&(V.rules=L.getRules(V.props)),V.filterConditionProps=await L.getFilterConditionProps(V.props),V.excludeFilterConditions=L.getExcludeFilterConditions()),u.value.forEach(j=>{const se=j.types.findIndex(J=>J!=null&&J.id.includes("temp")?J.type===V.type:(J==null?void 0:J.id)===V.id);se!==-1&&(V.allowRepeat=j.types[se].allowRepeat,V.allowModify=j.types[se].allowModify,z(V,j.types[se],!0),S(se,j))}),V.isLayout&&(($=V==null?void 0:V.children)!=null&&$.length)&&w(V.children)})},x=()=>{var N;if(u.value=[],!((N=d.value)!=null&&N.length)){k.forEach(V=>{u.value.push(F(V))});return}if(n.mergeGroup){k.forEach($=>{let j=$;const se=d.value.find(J=>$.name===J.name);if(se){let J=[];$.components.forEach(v=>{const Ee=se.components.find(ot=>ot.type===v.type);Ee?J.push(Ee):J.push(v)}),j.components=J}u.value.push(F(j))});const V=k.map($=>$.name);d.value.filter($=>!V.includes($.name)).forEach($=>{u.value.push(F($))})}else d.value.forEach(V=>{u.value.push(F(V))})},z=(N,V,L)=>{const $={employee:[{label:"人员1",value:t()}],post:[{label:"部门1",value:t()}],grade:[]};switch(N.type){case"employee":N.props.options=(L?V.props.options:V.options)||$.employee,V.searchEmployeeMethod?N.searchEmployeeMethod=V.searchEmployeeMethod:N.searchEmployeeMethod=j=>[];break;case"post":N.props.options=(L?V.props.options:V.options)||$.post;break;case"grade":N.props.remarkOptions=(L?V.props.remarkOptions:V.options)||$.grade;break}},F=N=>{let V=l(N);return V.types=V.components.map(L=>{var j;let $=new i[L.type].component;return $.allowRepeat=L.allowRepeat===void 0?!0:L.allowRepeat,$.allowModify=L.allowModify===void 0?!0:L.allowModify,z($,L),!((j=L.id)!=null&&j.includes("temp"))&&!a(L.props)&&($.props=Object.assign($.props,L.props),$.id=L.id,$.name=L.name),$}),V.dynamicTypes=l(V.types),V.components=V.components.map(L=>L.type),V},T=(N,V)=>{const L=D(N);s.value.components.push(L);const $=V.types.findIndex(j=>N!=null&&N.id.includes("temp")?j.type===N.type:(j==null?void 0:j.id)===N.id);$!==-1&&S($,V),f.selectComponent=void 0,e.nextTick(()=>f.selectComponent=L)},D=N=>{var $,j;let V=l(N);V.itemSourceType=n.defaultSourceType;let L=new i[N.type].component;return L.isEdit&&(V.filterConditionProps=L.getFilterConditionProps(V.props)),!(($=V.id)!=null&&$.includes("temp"))||(V.id=t(),!((j=V.props.options)!=null&&j.length)||["employee","post"].includes(V.type))||V.props.options.forEach(se=>{se.value=t(),se.itemSourceType=n.defaultSourceType}),V},S=(N,V)=>{V.types[N].allowRepeat||V.types.splice(N,1)},P=N=>{N.allowRepeat||u.value.forEach(V=>{let L=[];V.dynamicTypes.forEach(($,j)=>{V.types.findIndex(J=>$!=null&&$.id.includes("temp")?$.type===J.type:($==null?void 0:$.id)===J.id)!==-1&&L.push(l(V.dynamicTypes[j])),($!=null&&$.id.includes("temp")&&$.type===N.type||($==null?void 0:$.id)===N.id)&&L.push(l(V.dynamicTypes[j]))}),V.types=L})},B=()=>{s.value.components.splice(0,s.value.components.length),f.selectComponent=void 0},H=e.ref(!1),X=()=>{H.value=!0},le=N=>{N!=null&&N.length&&(w(N),N.forEach(V=>s.value.components.push(V)))},he=()=>{Gt.value=r(s.value),Ye.value=!0},ue=e.ref(),We=async()=>{if(n.saveMethod){if(!s.value.components.length){ce("error","未发现需要保存的数据!");return}const N=await Yt();N&&n.saveMethod(N)}},Fe=e.ref(),ze=e.ref(!1),Ct=()=>{ze.value=!0};e.watch(()=>ze.value,()=>{s.value.datas={},s.value.components.forEach(N=>{!s.value.datas[N.id]&&!a(N.props.defaultValue)&&(N.type==="grade"?s.value.datas[N.id]={score:N.props.defaultValue}:s.value.datas[N.id]=N.props.defaultValue)})});const Ye=e.ref(!1),Gt=e.ref(),Vt=async()=>{await Fe.value.validate()?ce("success","通过验证"):ce("error","未通过验证")},Wt=()=>{Fe.value.resetFields()},Ce=()=>{const{data:N,fileList:V}=Fe.value.getDatas();console.log(N,V)},Xe=()=>{Fe.value.toggleDescription()},Yt=async()=>{if(!await ue.value.validate()){ce("error","请将表单属性填写完整!"),f.propTab="form";return}let V=["单选框","多选框","选项","标签","文本框","分组面板"],L=l(s.value);if(L.datas={},U(V,L.components))return L},U=(N,V,L)=>{var j,se;let $=!0;for(let J=0;J<V.length;J++){let v=V[J];if(delete v.isEdit,delete v.isInput,delete v.name,delete v.rules,delete v.excludeFilterConditions,delete v.filterConditionProps,N.find(Ee=>v.props.label.indexOf(Ee)===0)){ce("error",`请将${L?`【${L}】中`:""}第${J+1}个项目的【${v.props.label}】调整为合理描述!`),$=!1;break}if((j=v.props.options)!=null&&j.length){for(let Ee=0;Ee<v.props.options.length;Ee++){let ot=v.props.options[Ee];if(N.find(Xt=>ot.label.indexOf(Xt)===0)){ce("error",`请将【${v.props.label}】的第${Ee+1}个选项的【${ot.label}】调整为合理描述!`),$=!1;break}}if(!$)break}a(V[J].props.defaultValue)&&(V[J].props.defaultValue=void 0),v.isLayout&&((se=v==null?void 0:v.children)!=null&&se.length)&&($=U(N,v.children,v.props.label))}return $};return(N,V)=>{var sn;const L=ee,$=e.resolveComponent("el-collapse-item"),j=e.resolveComponent("el-collapse"),se=e.resolveComponent("el-input"),J=e.resolveComponent("el-form"),v=e.resolveComponent("el-empty"),Ee=e.resolveComponent("el-tab-pane"),ot=e.resolveComponent("el-tabs"),Xt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",k1,[e.createElementVNode("div",x1,[e.createVNode(j,{modelValue:e.unref(g),"onUpdate:modelValue":V[0]||(V[0]=G=>e.isRef(g)?g.value=G:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(G,L1)=>(e.openBlock(),e.createBlock($,{key:L1,title:G.name,name:G.name},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{list:G.types,"item-key":"type",tag:"div",class:"component-list",clone:Pe=>D(Pe),sort:!1,onRemove:Pe=>S(Pe.oldIndex,G),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Pe})=>[e.createElementVNode("div",{class:"component-item",onClick:vs=>T(Pe,G),title:Pe.name},[e.createVNode(L,{name:Pe.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",N1,e.toDisplayString(Pe.name),1)],8,E1)]),_: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(an,{operates:e.unref(b),onClearComponents:B,onBatchAdd:X,onViewFormJson:he,onPreviewFrom:Ct,onSaveFrom:We},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(f).device])},[e.unref(_)?(e.openBlock(),e.createBlock(se,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":V[1]||(V[1]=G=>e.unref(s).props.formName=G),placeholder:"单击输入标题",onBlur:V[2]||(V[2]=G=>_.value=!1),onKeydown:V[3]||(V[3]=e.withKeys(G=>_.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:V[4]||(V[4]=G=>_.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(sn=e.unref(s).components)!=null&&sn.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",B1,"从左侧拖拽组件")),e.createVNode(J,{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(tn,{components:e.unref(s).components,"onUpdate:components":V[5]||(V[5]=G=>e.unref(s).components=G),onDeleteComponent:P},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(f).device==="mobile"?(e.openBlock(),e.createElementBlock("div",D1)):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:V[6]||(V[6]=G=>h.value=!e.unref(h))},null,10,S1),e.unref(h)?(e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(ot,{class:"prop-tabs",modelValue:e.unref(f).propTab,"onUpdate:modelValue":V[9]||(V[9]=G=>e.unref(f).propTab=G),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ee,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(f).selectComponent?(e.openBlock(),e.createBlock(j,{key:1,modelValue:e.unref(p),"onUpdate:modelValue":V[8]||(V[8]=G=>e.isRef(p)?p.value=G:null)},{default:e.withCtx(()=>[e.createVNode($,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(d1,{dictionary:o.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(f).selectComponent.type].propEditor?(e.openBlock(),e.createBlock($,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(f).selectComponent.type].propEditor),{componentProps:e.unref(f).selectComponent.props,"onUpdate:componentProps":V[7]||(V[7]=G=>e.unref(f).selectComponent.props=G),dictionary:o.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode($,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(c1)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(v,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ee,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(p1,{key:0,ref_key:"formPropsEditorRef",ref:ue},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(N.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(N.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(Xt,{modelValue:e.unref(ze),"onUpdate:modelValue":V[10]||(V[10]=G=>e.isRef(ze)?ze.value=G:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",z1,[e.createVNode(an,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Vt,onResetForm:Wt,onViewDataJson:Ce,onToggleDescription:Xe},null,8,["operates"]),e.createVNode(Ge,{watching:"",ref_key:"rendererForm",ref:Fe,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(f).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Xt,{modelValue:e.unref(Ye),"onUpdate:modelValue":V[11]||(V[11]=G=>e.isRef(Ye)?Ye.value=G:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Gt)),1)]),_:1},8,["modelValue"]),e.unref(H)?(e.openBlock(),e.createBlock(a1,{key:0,modelValue:e.unref(H),"onUpdate:modelValue":V[12]||(V[12]=G=>e.isRef(H)?H.value=G:null),params:e.unref(m),onSelect:le},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),Zs="";bt.install=function(o){o.component(bt.name,bt)},Ge.install=function(o){o.component(Ge.name,Ge)},ee.install=function(o){o.component(ee.name,ee)};const T1=[ee,bt,Ge,Je],I1={install:function(o,n){T1.forEach(t=>{o.component(t.name,t)})}};ne.MessageType=bo,ne.componentType=ae,ne.default=I1,ne.filterConditionTypes=nt,ne.zhyDynamicFilter=Je,ne.zhyFormDesigner=bt,ne.zhyFormRenderer=Ge,ne.zhyIcon=ee,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M3="1.15.2";function Te(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ie=Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),lt=Te(/Edge/i),Vo=Te(/firefox/i),rt=Te(/safari/i)&&!Te(/chrome/i)&&!Te(/android/i),ko=Te(/iP(ad|od|hone)/i),xo=Te(/chrome/i)&&Te(/android/i),Eo={capture:!1,passive:!1};function q(o,n,t){o.addEventListener(n,t,!Ie&&Eo)}function R(o,n,t){o.removeEventListener(n,t,!Ie&&Eo)}function Bt(o,n){if(n){if(n[0]===">"&&(n=n.substring(1)),o)try{if(o.matches)return o.matches(n);if(o.msMatchesSelector)return o.msMatchesSelector(n);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(n)}catch{return!1}return!1}}function z3(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function ke(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&Bt(o,n):Bt(o,n))||l&&o===t)return o;if(o===t)break}while(o=z3(o))}return null}var No=/\s+/g;function Z(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(No," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(No," ")}}function M(o,n,t){var l=o&&o.style;if(l){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),n===void 0?t:t[n];!(n in l)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),l[n]=t+(typeof t=="string"?"":"px")}}function Re(o,n){var t="";if(typeof o=="string")t=o;else do{var l=M(o,"transform");l&&l!=="none"&&(t=l+" "+t)}while(!n&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Bo(o,n,t){if(o){var l=o.getElementsByTagName(n),r=0,a=l.length;if(t)for(;r<a;r++)t(l[r],r);return l}return[]}function Se(){var o=document.scrollingElement;return o||document.documentElement}function Y(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,s,d,c,m,f;if(o!==window&&o.parentNode&&o!==Se()?(a=o.getBoundingClientRect(),i=a.top,s=a.left,d=a.bottom,c=a.right,m=a.height,f=a.width):(i=0,s=0,d=window.innerHeight,c=window.innerWidth,m=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Ie))do if(r&&r.getBoundingClientRect&&(M(r,"transform")!=="none"||t&&M(r,"position")!=="static")){var h=r.getBoundingClientRect();i-=h.top+parseInt(M(r,"border-top-width")),s-=h.left+parseInt(M(r,"border-left-width")),d=i+a.height,c=s+a.width;break}while(r=r.parentNode);if(l&&o!==window){var p=Re(r||o),g=p&&p.a,u=p&&p.d;p&&(i/=u,s/=g,f/=g,m/=u,d=i+m,c=s+f)}return{top:i,left:s,bottom:d,right:c,width:f,height:m}}}function Do(o,n,t){for(var l=Le(o,!0),r=Y(o)[n];l;){var a=Y(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===Se())break;l=Le(l,!1)}return!1}function Ke(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==I.ghost&&(l||i[a]!==I.dragged)&&ke(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function Kt(o,n){for(var t=o.lastElementChild;t&&(t===I.ghost||M(t,"display")==="none"||n&&!Bt(t,n));)t=t.previousElementSibling;return t||null}function te(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==I.clone&&(!n||Bt(o,n))&&t++;return t}function So(o){var n=0,t=0,l=Se();if(o)do{var r=Re(o),a=r.a,i=r.d;n+=o.scrollLeft*a,t+=o.scrollTop*i}while(o!==l&&(o=o.parentNode));return[n,t]}function $3(o,n){for(var t in o)if(o.hasOwnProperty(t)){for(var l in n)if(n.hasOwnProperty(l)&&n[l]===o[t][l])return Number(t)}return-1}function Le(o,n){if(!o||!o.getBoundingClientRect)return Se();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=M(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Se();if(l||n)return t;l=!0}}while(t=t.parentNode);return Se()}function T3(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function Zt(o,n){return Math.round(o.top)===Math.round(n.top)&&Math.round(o.left)===Math.round(n.left)&&Math.round(o.height)===Math.round(n.height)&&Math.round(o.width)===Math.round(n.width)}var at;function Mo(o,n){return function(){if(!at){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),at=setTimeout(function(){at=void 0},n)}}}function I3(){clearTimeout(at),at=void 0}function zo(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function Qt(o){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function $o(o,n){M(o,"position","absolute"),M(o,"top",n.top),M(o,"left",n.left),M(o,"width",n.width),M(o,"height",n.height)}function vt(o){M(o,"position",""),M(o,"top",""),M(o,"left",""),M(o,"width",""),M(o,"height","")}function To(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,s,d;if(!(!ke(r,n.draggable,o,!1)||r.animated||r===t)){var c=Y(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,c.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,c.top),l.right=Math.max((s=l.right)!==null&&s!==void 0?s:-1/0,c.right),l.bottom=Math.max((d=l.bottom)!==null&&d!==void 0?d:-1/0,c.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var pe="Sortable"+new Date().getTime();function L3(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(M(r,"display")==="none"||r===I.ghost)){o.push({target:r,rect:Y(r)});var a=De({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=Re(r,!0);i&&(a.top-=i.f,a.left-=i.e)}r.fromRect=a}})}},addAnimationState:function(l){o.push(l)},removeAnimationState:function(l){o.splice($3(o,{target:l}),1)},animateAll:function(l){var r=this;if(!this.options.animation){clearTimeout(n),typeof l=="function"&&l();return}var a=!1,i=0;o.forEach(function(s){var d=0,c=s.target,m=c.fromRect,f=Y(c),h=c.prevFromRect,p=c.prevToRect,g=s.rect,u=Re(c,!0);u&&(f.top-=u.f,f.left-=u.e),c.toRect=f,c.thisAnimationDuration&&Zt(h,f)&&!Zt(m,f)&&(g.top-f.top)/(g.left-f.left)===(m.top-f.top)/(m.left-f.left)&&(d=O3(g,h,p,r.options)),Zt(f,m)||(c.prevFromRect=m,c.prevToRect=f,d||(d=r.options.animation),r.animate(c,g,f,d)),d&&(a=!0,i=Math.max(i,d),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},d),c.thisAnimationDuration=d)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){M(l,"transition",""),M(l,"transform","");var s=Re(this.el),d=s&&s.a,c=s&&s.d,m=(r.left-a.left)/(d||1),f=(r.top-a.top)/(c||1);l.animatingX=!!m,l.animatingY=!!f,M(l,"transform","translate3d("+m+"px,"+f+"px,0)"),this.forRepaintDummy=A3(l),M(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),M(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){M(l,"transition",""),M(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function A3(o){return o.offsetWidth}function O3(o,n,t,l){return Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*l.animation}var Ze=[],eo={initializeByDefault:!0},it={mount:function(n){for(var t in eo)eo.hasOwnProperty(t)&&!(t in n)&&(n[t]=eo[t]);Ze.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),Ze.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";Ze.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](De({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](De({sortable:t},l)))})},initializePlugins:function(n,t,l,r){Ze.forEach(function(s){var d=s.pluginName;if(!(!n.options[d]&&!s.initializeByDefault)){var c=new s(n,t,n.options);c.sortable=n,c.options=n.options,n[d]=c,Ve(l,c.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,t){var l={};return Ze.forEach(function(r){typeof r.eventProperties=="function"&&Ve(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return Ze.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function st(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,s=o.fromEl,d=o.oldIndex,c=o.newIndex,m=o.oldDraggableIndex,f=o.newDraggableIndex,h=o.originalEvent,p=o.putSortable,g=o.extraEventProperties;if(n=n||t&&t[pe],!!n){var u,_=n.options,y="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Ie&&!lt?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=s||t,u.item=r||t,u.clone=a,u.oldIndex=d,u.newIndex=c,u.oldDraggableIndex=m,u.newDraggableIndex=f,u.originalEvent=h,u.pullMode=p?p.lastPutMode:void 0;var k=De(De({},g),it.getEventProperties(l,n));for(var b in k)u[b]=k[b];t&&t.dispatchEvent(u),_[y]&&_[y].call(n,u)}}var F3=["evt"],ge=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=x3(l,F3);it.pluginEvent.bind(I)(n,t,De({dragEl:E,parentEl:oe,ghostEl:A,rootEl:K,nextEl:Ue,lastDownEl:Dt,cloneEl:Q,cloneHidden:Ae,dragStarted:dt,putSortable:ie,activeSortable:I.active,originalEvent:r,oldIndex:Qe,oldDraggableIndex:ct,newIndex:ye,newDraggableIndex:Oe,hideGhostForTarget:Ro,unhideGhostForTarget:Uo,cloneNowHidden:function(){Ae=!0},cloneNowShown:function(){Ae=!1},dispatchSortableEvent:function(s){fe({sortable:t,name:s,originalEvent:r})}},a))};function fe(o){st(De({putSortable:ie,cloneEl:Q,targetEl:E,rootEl:K,oldIndex:Qe,oldDraggableIndex:ct,newIndex:ye,newDraggableIndex:Oe},o))}var E,oe,A,K,Ue,Dt,Q,Ae,Qe,ye,ct,Oe,St,ie,ve=!1,Mt=!1,zt=[],He,Ne,to,oo,Io,Lo,dt,et,pt,mt=!1,$t=!1,Tt,me,no=[],lo=!1,It=[],Lt=typeof document<"u",At=ko,Ao=lt||Ie?"cssFloat":"float",P3=Lt&&!xo&&!ko&&"draggable"in document.createElement("div"),Oo=function(){if(Lt){if(Ie)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Fo=function(n,t){var l=M(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Ke(n,0,t),i=Ke(n,1,t),s=a&&M(a),d=i&&M(i),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Y(a).width,m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Y(i).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(d.clear==="both"||d.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&l[Ao]==="none"||i&&l[Ao]==="none"&&c+m>r)?"vertical":"horizontal"},R3=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,s=l?t.left:t.top,d=l?t.right:t.bottom,c=l?t.width:t.height;return r===s||a===d||r+i/2===s+c/2},U3=function(n,t){var l;return zt.some(function(r){var a=r[pe].options.emptyInsertThreshold;if(!(!a||Kt(r))){var i=Y(r),s=n>=i.left-a&&n<=i.right+a,d=t>=i.top-a&&t<=i.bottom+a;if(s&&d)return l=r}}),l},Po=function(n){function t(a,i){return function(s,d,c,m){var f=s.options.group.name&&d.options.group.name&&s.options.group.name===d.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return t(a(s,d,c,m),i)(s,d,c,m);var h=(i?s:d).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var l={},r=n.group;(!r||Nt(r)!="object")&&(r={name:r}),l.name=r.name,l.checkPull=t(r.pull,!0),l.checkPut=t(r.put),l.revertClone=r.revertClone,n.group=l},Ro=function(){!Oo&&A&&M(A,"display","none")},Uo=function(){!Oo&&A&&M(A,"display","")};Lt&&!xo&&document.addEventListener("click",function(o){if(Mt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Mt=!1,!1},!0);var qe=function(n){if(E){n=n.touches?n.touches[0]:n;var t=U3(n.clientX,n.clientY);if(t){var l={};for(var r in n)n.hasOwnProperty(r)&&(l[r]=n[r]);l.target=l.rootEl=t,l.preventDefault=void 0,l.stopPropagation=void 0,t[pe]._onDragOver(l)}}},H3=function(n){E&&E.parentNode[pe]._isOutsideThisEl(n.target)};function I(o,n){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=n=Ve({},n),o[pe]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fo(o,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:I.supportPointer!==!1&&"PointerEvent"in window&&!rt,emptyInsertThreshold:5};it.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);Po(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:P3,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?q(o,"pointerdown",this._onTapStart):(q(o,"mousedown",this._onTapStart),q(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(q(o,"dragover",this),q(o,"dragenter",this)),zt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Ve(this,L3())}I.prototype={constructor:I,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(et=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,E):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,d=(s||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||d,m=r.filter;if(K3(l),!E&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&rt&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=ke(d,r.draggable,l,!1),!(d&&d.animated)&&Dt!==d)){if(Qe=te(d),ct=te(d,r.draggable),typeof m=="function"){if(m.call(this,n,d,this)){fe({sortable:t,rootEl:c,name:"filter",targetEl:d,toEl:l,fromEl:l}),ge("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(m&&(m=m.split(",").some(function(f){if(f=ke(c,f.trim(),l,!1),f)return fe({sortable:t,rootEl:f,name:"filter",targetEl:d,fromEl:l,toEl:l}),ge("filter",t,{evt:n}),!0}),m)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!ke(c,r.handle,l,!1)||this._prepareDragStart(n,s,d)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,s=a.ownerDocument,d;if(l&&!E&&l.parentNode===a){var c=Y(l);if(K=a,E=l,oe=E.parentNode,Ue=E.nextSibling,Dt=l,St=i.group,I.dragged=E,He={target:E,clientX:(t||n).clientX,clientY:(t||n).clientY},Io=He.clientX-c.left,Lo=He.clientY-c.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,E.style["will-change"]="all",d=function(){if(ge("delayEnded",r,{evt:n}),I.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Vo&&r.nativeDraggable&&(E.draggable=!0),r._triggerDragStart(n,t),fe({sortable:r,name:"choose",originalEvent:n}),Z(E,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){Bo(E,m.trim(),ro)}),q(s,"dragover",qe),q(s,"mousemove",qe),q(s,"touchmove",qe),q(s,"mouseup",r._onDrop),q(s,"touchend",r._onDrop),q(s,"touchcancel",r._onDrop),Vo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,E.draggable=!0),ge("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(lt||Ie))){if(I.eventCanceled){this._onDrop();return}q(s,"mouseup",r._disableDelayedDrag),q(s,"touchend",r._disableDelayedDrag),q(s,"touchcancel",r._disableDelayedDrag),q(s,"mousemove",r._delayedDragTouchMoveHandler),q(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&q(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,i.delay)}else d()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){E&&ro(E),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;R(n,"mouseup",this._disableDelayedDrag),R(n,"touchend",this._disableDelayedDrag),R(n,"touchcancel",this._disableDelayedDrag),R(n,"mousemove",this._delayedDragTouchMoveHandler),R(n,"touchmove",this._delayedDragTouchMoveHandler),R(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?q(document,"pointermove",this._onTouchMove):t?q(document,"touchmove",this._onTouchMove):q(document,"mousemove",this._onTouchMove):(q(E,"dragend",this),q(K,"dragstart",this._onDragStart));try{document.selection?Ft(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(ve=!1,K&&E){ge("dragStarted",this,{evt:t}),this.nativeDraggable&&q(document,"dragover",H3);var l=this.options;!n&&Z(E,l.dragClass,!1),Z(E,l.ghostClass,!0),I.active=this,n&&this._appendGhost(),fe({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ne){this._lastX=Ne.clientX,this._lastY=Ne.clientY,Ro();for(var n=document.elementFromPoint(Ne.clientX,Ne.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Ne.clientX,Ne.clientY),n!==t);)t=n;if(E.parentNode[pe]._isOutsideThisEl(n),t)do{if(t[pe]){var l=void 0;if(l=t[pe]._onDragOver({clientX:Ne.clientX,clientY:Ne.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=t.parentNode);Uo()}},_onTouchMove:function(n){if(He){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=A&&Re(A,!0),s=A&&i&&i.a,d=A&&i&&i.d,c=At&&me&&So(me),m=(a.clientX-He.clientX+r.x)/(s||1)+(c?c[0]-no[0]:0)/(s||1),f=(a.clientY-He.clientY+r.y)/(d||1)+(c?c[1]-no[1]:0)/(d||1);if(!I.active&&!ve){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(A){i?(i.e+=m-(to||0),i.f+=f-(oo||0)):i={a:1,b:0,c:0,d:1,e:m,f};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");M(A,"webkitTransform",h),M(A,"mozTransform",h),M(A,"msTransform",h),M(A,"transform",h),to=m,oo=f,Ne=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!A){var n=this.options.fallbackOnBody?document.body:K,t=Y(E,!0,At,!0,n),l=this.options;if(At){for(me=n;M(me,"position")==="static"&&M(me,"transform")==="none"&&me!==document;)me=me.parentNode;me!==document.body&&me!==document.documentElement?(me===document&&(me=Se()),t.top+=me.scrollTop,t.left+=me.scrollLeft):me=Se(),no=So(me)}A=E.cloneNode(!0),Z(A,l.ghostClass,!1),Z(A,l.fallbackClass,!0),Z(A,l.dragClass,!0),M(A,"transition",""),M(A,"transform",""),M(A,"box-sizing","border-box"),M(A,"margin",0),M(A,"top",t.top),M(A,"left",t.left),M(A,"width",t.width),M(A,"height",t.height),M(A,"opacity","0.8"),M(A,"position",At?"absolute":"fixed"),M(A,"zIndex","100000"),M(A,"pointerEvents","none"),I.ghost=A,n.appendChild(A),M(A,"transform-origin",Io/parseInt(A.style.width)*100+"% "+Lo/parseInt(A.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(ge("dragStart",this,{evt:n}),I.eventCanceled){this._onDrop();return}ge("setupClone",this),I.eventCanceled||(Q=Qt(E),Q.removeAttribute("id"),Q.draggable=!1,Q.style["will-change"]="",this._hideClone(),Z(Q,this.options.chosenClass,!1),I.clone=Q),l.cloneId=Ft(function(){ge("clone",l),!I.eventCanceled&&(l.options.removeCloneOnHide||K.insertBefore(Q,E),l._hideClone(),fe({sortable:l,name:"clone"}))}),!t&&Z(E,a.dragClass,!0),t?(Mt=!0,l._loopId=setInterval(l._emulateDragOver,50)):(R(document,"mouseup",l._onDrop),R(document,"touchend",l._onDrop),R(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,E)),q(document,"drop",l),M(E,"transform","translateZ(0)")),ve=!0,l._dragStartId=Ft(l._dragStarted.bind(l,t,n)),q(document,"selectstart",l),dt=!0,rt&&M(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,s=this.options,d=s.group,c=I.active,m=St===d,f=s.sort,h=ie||c,p,g=this,u=!1;if(lo)return;function _(ue,We){ge(ue,g,De({evt:n,isOwner:m,axis:p?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:h,target:l,completed:k,onMove:function(ze,Ct){return Ot(K,t,E,r,ze,Y(ze),n,Ct)},changed:b},We))}function y(){_("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function k(ue){return _("dragOverCompleted",{insertion:ue}),ue&&(m?c._hideClone():c._showClone(g),g!==h&&(Z(E,ie?ie.options.ghostClass:c.options.ghostClass,!1),Z(E,s.ghostClass,!0)),ie!==g&&g!==I.active?ie=g:g===I.active&&ie&&(ie=null),h===g&&(g._ignoreWhileAnimating=l),g.animateAll(function(){_("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===E&&!E.animated||l===t&&!l.animated)&&(et=null),!s.dragoverBubble&&!n.rootEl&&l!==document&&(E.parentNode[pe]._isOutsideThisEl(n.target),!ue&&qe(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function b(){ye=te(E),Oe=te(E,s.draggable),fe({sortable:g,name:"change",toEl:t,newIndex:ye,newDraggableIndex:Oe,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=ke(l,s.draggable,t,!0),_("dragOver"),I.eventCanceled)return u;if(E.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||g._ignoreWhileAnimating===l)return k(!1);if(Mt=!1,c&&!s.disabled&&(m?f||(i=oe!==K):ie===this||(this.lastPutMode=St.checkPull(this,c,E,n))&&d.checkPut(this,c,E,n))){if(p=this._getDirection(n,l)==="vertical",r=Y(E),_("dragOverValid"),I.eventCanceled)return u;if(i)return oe=K,y(),this._hideClone(),_("revert"),I.eventCanceled||(Ue?K.insertBefore(E,Ue):K.appendChild(E)),k(!0);var C=Kt(t,s.draggable);if(!C||W3(n,p,this)&&!C.animated){if(C===E)return k(!1);if(C&&t===n.target&&(l=C),l&&(a=Y(l)),Ot(K,t,E,r,l,a,n,!!l)!==!1)return y(),C&&C.nextSibling?t.insertBefore(E,C.nextSibling):t.appendChild(E),oe=t,b(),k(!0)}else if(C&&G3(n,p,this)){var w=Ke(t,0,s,!0);if(w===E)return k(!1);if(l=w,a=Y(l),Ot(K,t,E,r,l,a,n,!1)!==!1)return y(),t.insertBefore(E,w),oe=t,b(),k(!0)}else if(l.parentNode===t){a=Y(l);var x=0,z,F=E.parentNode!==t,T=!R3(E.animated&&E.toRect||r,l.animated&&l.toRect||a,p),D=p?"top":"left",S=Do(l,"top","top")||Do(E,"top","top"),P=S?S.scrollTop:void 0;et!==l&&(z=a[D],mt=!1,$t=!T&&s.invertSwap||F),x=Y3(n,l,a,p,T?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,$t,et===l);var B;if(x!==0){var H=te(E);do H-=x,B=oe.children[H];while(B&&(M(B,"display")==="none"||B===A))}if(x===0||B===l)return k(!1);et=l,pt=x;var X=l.nextElementSibling,le=!1;le=x===1;var he=Ot(K,t,E,r,l,a,n,le);if(he!==!1)return(he===1||he===-1)&&(le=he===1),lo=!0,setTimeout(j3,30),y(),le&&!X?t.appendChild(E):l.parentNode.insertBefore(E,le?X:l),S&&zo(S,0,P-S.scrollTop),oe=E.parentNode,z!==void 0&&!$t&&(Tt=Math.abs(z-Y(l)[D])),b(),k(!0)}if(t.contains(E))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){R(document,"mousemove",this._onTouchMove),R(document,"touchmove",this._onTouchMove),R(document,"pointermove",this._onTouchMove),R(document,"dragover",qe),R(document,"mousemove",qe),R(document,"touchmove",qe)},_offUpEvents:function(){var n=this.el.ownerDocument;R(n,"mouseup",this._onDrop),R(n,"touchend",this._onDrop),R(n,"pointerup",this._onDrop),R(n,"touchcancel",this._onDrop),R(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(ye=te(E),Oe=te(E,l.draggable),ge("drop",this,{evt:n}),oe=E&&E.parentNode,ye=te(E),Oe=te(E,l.draggable),I.eventCanceled){this._nulling();return}ve=!1,$t=!1,mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ao(this.cloneId),ao(this._dragStartId),this.nativeDraggable&&(R(document,"drop",this),R(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rt&&M(document.body,"user-select",""),M(E,"transform",""),n&&(dt&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),A&&A.parentNode&&A.parentNode.removeChild(A),(K===oe||ie&&ie.lastPutMode!=="clone")&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),E&&(this.nativeDraggable&&R(E,"dragend",this),ro(E),E.style["will-change"]="",dt&&!ve&&Z(E,ie?ie.options.ghostClass:this.options.ghostClass,!1),Z(E,this.options.chosenClass,!1),fe({sortable:this,name:"unchoose",toEl:oe,newIndex:null,newDraggableIndex:null,originalEvent:n}),K!==oe?(ye>=0&&(fe({rootEl:oe,name:"add",toEl:oe,fromEl:K,originalEvent:n}),fe({sortable:this,name:"remove",toEl:oe,originalEvent:n}),fe({rootEl:oe,name:"sort",toEl:oe,fromEl:K,originalEvent:n}),fe({sortable:this,name:"sort",toEl:oe,originalEvent:n})),ie&&ie.save()):ye!==Qe&&ye>=0&&(fe({sortable:this,name:"update",toEl:oe,originalEvent:n}),fe({sortable:this,name:"sort",toEl:oe,originalEvent:n})),I.active&&((ye==null||ye===-1)&&(ye=Qe,Oe=ct),fe({sortable:this,name:"end",toEl:oe,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){ge("nulling",this),K=E=oe=A=Ue=Q=Dt=Ae=He=Ne=dt=ye=Oe=Qe=ct=et=pt=ie=St=I.dragged=I.ghost=I.clone=I.active=null,It.forEach(function(n){n.checked=!0}),It.length=to=oo=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":E&&(this._onDragOver(n),q3(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,l=this.el.children,r=0,a=l.length,i=this.options;r<a;r++)t=l[r],ke(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||J3(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var s=r.children[i];ke(s,this.options.draggable,r,!1)&&(l[a]=s)},this),t&&this.captureAnimationState(),n.forEach(function(a){l[a]&&(r.removeChild(l[a]),r.appendChild(l[a]))}),t&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,t){return ke(n,t||this.options.draggable,this.el,!1)},option:function(n,t){var l=this.options;if(t===void 0)return l[n];var r=it.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&Po(l)},destroy:function(){ge("destroy",this);var n=this.el;n[pe]=null,R(n,"mousedown",this._onTapStart),R(n,"touchstart",this._onTapStart),R(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(R(n,"dragover",this),R(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),zt.splice(zt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Ae){if(ge("hideClone",this),I.eventCanceled)return;M(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),Ae=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Ae){if(ge("showClone",this),I.eventCanceled)return;E.parentNode==K&&!this.options.group.revertClone?K.insertBefore(Q,E):Ue?K.insertBefore(Q,Ue):K.appendChild(Q),this.options.group.revertClone&&this.animate(E,Q),M(Q,"display",""),Ae=!1}}};function q3(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function Ot(o,n,t,l,r,a,i,s){var d,c=o[pe],m=c.options.onMove,f;return window.CustomEvent&&!Ie&&!lt?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=n,d.from=o,d.dragged=t,d.draggedRect=l,d.related=r||n,d.relatedRect=a||Y(n),d.willInsertAfter=s,d.originalEvent=i,o.dispatchEvent(d),m&&(f=m.call(c,d,i)),f}function ro(o){o.draggable=!1}function j3(){lo=!1}function G3(o,n,t){var l=Y(Ke(t.el,0,t.options,!0)),r=To(t.el,t.options,A),a=10;return n?o.clientX<r.left-a||o.clientY<l.top&&o.clientX<l.right:o.clientY<r.top-a||o.clientY<l.bottom&&o.clientX<l.left}function W3(o,n,t){var l=Y(Kt(t.el,t.options.draggable)),r=To(t.el,t.options,A),a=10;return n?o.clientX>r.right+a||o.clientY>l.bottom&&o.clientX>l.left:o.clientY>r.bottom+a||o.clientX>l.right&&o.clientY>l.top}function Y3(o,n,t,l,r,a,i,s){var d=l?o.clientY:o.clientX,c=l?t.height:t.width,m=l?t.top:t.left,f=l?t.bottom:t.right,h=!1;if(!i){if(s&&Tt<c*r){if(!mt&&(pt===1?d>m+c*a/2:d<f-c*a/2)&&(mt=!0),mt)h=!0;else if(pt===1?d<m+Tt:d>f-Tt)return-pt}else if(d>m+c*(1-r)/2&&d<f-c*(1-r)/2)return X3(n)}return h=h||i,h&&(d<m+c*a/2||d>f-c*a/2)?d>m+c/2?1:-1:0}function X3(o){return te(E)<te(o)?1:-1}function J3(o){for(var n=o.tagName+o.className+o.src+o.href+o.textContent,t=n.length,l=0;t--;)l+=n.charCodeAt(t);return l.toString(36)}function K3(o){It.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&It.push(l)}}function Ft(o){return setTimeout(o,0)}function ao(o){return clearTimeout(o)}Lt&&q(document,"touchmove",function(o){(I.active||ve)&&o.cancelable&&o.preventDefault()}),I.utils={on:q,off:R,css:M,find:Bo,is:function(n,t){return!!ke(n,t,n,!1)},extend:T3,throttle:Mo,closest:ke,toggleClass:Z,clone:Qt,index:te,nextTick:Ft,cancelNextTick:ao,detectDirection:Fo,getChild:Ke},I.get=function(o){return o[pe]},I.mount=function(){for(var o=arguments.length,n=new Array(o),t=0;t<o;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(l){if(!l.prototype||!l.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));l.utils&&(I.utils=De(De({},I.utils),l.utils)),it.mount(l)})},I.create=function(o,n){return new I(o,n)},I.version=M3;var re=[],ft,io,so=!1,co,po,Pt,ht;function Z3(){function o(){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 o.prototype={dragStarted:function(t){var l=t.originalEvent;this.sortable.nativeDraggable?q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?q(document,"pointermove",this._handleFallbackAutoScroll):l.touches?q(document,"touchmove",this._handleFallbackAutoScroll):q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?R(document,"dragover",this._handleAutoScroll):(R(document,"pointermove",this._handleFallbackAutoScroll),R(document,"touchmove",this._handleFallbackAutoScroll),R(document,"mousemove",this._handleFallbackAutoScroll)),Ho(),Rt(),I3()},nulling:function(){Pt=io=ft=so=ht=co=po=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,l){var r=this,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(a,i);if(Pt=t,l||this.options.forceAutoScrollFallback||lt||Ie||rt){mo(t,this.options,s,l);var d=Le(s,!0);so&&(!ht||a!==co||i!==po)&&(ht&&Ho(),ht=setInterval(function(){var c=Le(document.elementFromPoint(a,i),!0);c!==d&&(d=c,Rt()),mo(t,r.options,c,l)},10),co=a,po=i)}else{if(!this.options.bubbleScroll||Le(s,!0)===Se()){Rt();return}mo(t,this.options,Le(s,!1),!1)}}},Ve(o,{pluginName:"scroll",initializeByDefault:!0})}function Rt(){re.forEach(function(o){clearInterval(o.pid)}),re=[]}function Ho(){clearInterval(ht)}var mo=Mo(function(o,n,t,l){if(n.scroll){var r=(o.touches?o.touches[0]:o).clientX,a=(o.touches?o.touches[0]:o).clientY,i=n.scrollSensitivity,s=n.scrollSpeed,d=Se(),c=!1,m;io!==t&&(io=t,Rt(),ft=n.scroll,m=n.scrollFn,ft===!0&&(ft=Le(t,!0)));var f=0,h=ft;do{var p=h,g=Y(p),u=g.top,_=g.bottom,y=g.left,k=g.right,b=g.width,C=g.height,w=void 0,x=void 0,z=p.scrollWidth,F=p.scrollHeight,T=M(p),D=p.scrollLeft,S=p.scrollTop;p===d?(w=b<z&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),x=C<F&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(w=b<z&&(T.overflowX==="auto"||T.overflowX==="scroll"),x=C<F&&(T.overflowY==="auto"||T.overflowY==="scroll"));var P=w&&(Math.abs(k-r)<=i&&D+b<z)-(Math.abs(y-r)<=i&&!!D),B=x&&(Math.abs(_-a)<=i&&S+C<F)-(Math.abs(u-a)<=i&&!!S);if(!re[f])for(var H=0;H<=f;H++)re[H]||(re[H]={});(re[f].vx!=P||re[f].vy!=B||re[f].el!==p)&&(re[f].el=p,re[f].vx=P,re[f].vy=B,clearInterval(re[f].pid),(P!=0||B!=0)&&(c=!0,re[f].pid=setInterval((function(){l&&this.layer===0&&I.active._onTouchMove(Pt);var X=re[this.layer].vy?re[this.layer].vy*s:0,le=re[this.layer].vx?re[this.layer].vx*s:0;typeof m=="function"&&m.call(I.dragged.parentNode[pe],le,X,o,Pt,re[this.layer].el)!=="continue"||zo(re[this.layer].el,le,X)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==d&&(h=Le(h,!1)));so=c}},30),qo=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,d=n.unhideGhostForTarget;if(t){var c=l||a;s();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(m.clientX,m.clientY);d(),c&&!c.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function fo(){}fo.prototype={startIndex:null,dragStart:function(n){var t=n.oldDraggableIndex;this.startIndex=t},onSpill:function(n){var t=n.dragEl,l=n.putSortable;this.sortable.captureAnimationState(),l&&l.captureAnimationState();var r=Ke(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),l&&l.animateAll()},drop:qo},Ve(fo,{pluginName:"revertOnSpill"});function ho(){}ho.prototype={onSpill:function(n){var t=n.dragEl,l=n.putSortable,r=l||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:qo},Ve(ho,{pluginName:"removeOnSpill"});var xe;function Q3(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;xe=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,s=t.changed,d=t.cancel;if(i.options.swap){var c=this.sortable.el,m=this.options;if(r&&r!==c){var f=xe;a(r)!==!1?(Z(r,m.swapClass,!0),xe=r):xe=null,f&&f!==xe&&Z(f,m.swapClass,!1)}s(),l(!0),d()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,s=this.options;xe&&Z(xe,s.swapClass,!1),xe&&(s.swap||r&&r.options.swap)&&a!==xe&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),v3(a,xe),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){xe=null}},Ve(o,{pluginName:"swap",eventProperties:function(){return{swapItem:xe}}})}function v3(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=te(o),a=te(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var O=[],be=[],ut,Be,gt=!1,_e=!1,tt=!1,W,_t,Ut;function er(){function o(n){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?q(document,"pointerup",this._deselectMultiDrag):(q(document,"mouseup",this._deselectMultiDrag),q(document,"touchend",this._deselectMultiDrag))),q(document,"keydown",this._checkKeyDown),q(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";O.length&&Be===n?O.forEach(function(s,d){i+=(d?", ":"")+s.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;W=l},delayEnded:function(){this.isMultiDrag=~O.indexOf(W)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<O.length;a++)be.push(Qt(O[a])),be[a].sortableIndex=O[a].sortableIndex,be[a].draggable=!1,be[a].style["will-change"]="",Z(be[a],this.options.selectedClass,!1),O[a]===W&&Z(be[a],this.options.chosenClass,!1);l._hideClone(),r()}},clone:function(t){var l=t.sortable,r=t.rootEl,a=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||O.length&&Be===l&&(jo(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(jo(!1,r),be.forEach(function(i){M(i,"display","")}),l(),Ut=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(be.forEach(function(i){M(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Ut=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&Be&&Be.multiDrag._deselectMultiDrag(),O.forEach(function(l){l.sortableIndex=te(l)}),O=O.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),tt=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){O.forEach(function(i){i!==W&&M(i,"position","absolute")});var a=Y(W,!1,!0,!0);O.forEach(function(i){i!==W&&$o(i,a)}),_e=!0,gt=!0}r.animateAll(function(){_e=!1,gt=!1,l.options.animation&&O.forEach(function(i){vt(i)}),l.options.sort&&Ht()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;_e&&~O.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;O.length>1&&(O.forEach(function(s){a.addAnimationState({target:s,rect:_e?Y(s):i}),vt(s),s.fromRect=i,l.removeAnimationState(s)}),_e=!1,tr(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,s=t.parentEl,d=t.putSortable,c=this.options;if(a){if(r&&i._hideClone(),gt=!1,c.animation&&O.length>1&&(_e||!r&&!i.options.sort&&!d)){var m=Y(W,!1,!0,!0);O.forEach(function(h){h!==W&&($o(h,m),s.appendChild(h))}),_e=!0}if(!r)if(_e||Ht(),O.length>1){var f=Ut;i._showClone(l),i.options.animation&&!Ut&&f&&be.forEach(function(h){i.addAnimationState({target:h,rect:_t}),h.fromRect=_t,h.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(O.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){_t=Ve({},l);var i=Re(W,!0);_t.top-=i.f,_t.left-=i.e}},dragOverAnimationComplete:function(){_e&&(_e=!1,Ht())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,s=t.dispatchSortableEvent,d=t.oldIndex,c=t.putSortable,m=c||this.sortable;if(l){var f=this.options,h=a.children;if(!tt)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Z(W,f.selectedClass,!~O.indexOf(W)),~O.indexOf(W))O.splice(O.indexOf(W),1),ut=null,st({sortable:i,rootEl:r,name:"deselect",targetEl:W,originalEvent:l});else{if(O.push(W),st({sortable:i,rootEl:r,name:"select",targetEl:W,originalEvent:l}),l.shiftKey&&ut&&i.el.contains(ut)){var p=te(ut),g=te(W);if(~p&&~g&&p!==g){var u,_;for(g>p?(_=p,u=g):(_=g,u=p+1);_<u;_++)~O.indexOf(h[_])||(Z(h[_],f.selectedClass,!0),O.push(h[_]),st({sortable:i,rootEl:r,name:"select",targetEl:h[_],originalEvent:l}))}}else ut=W;Be=m}if(tt&&this.isMultiDrag){if(_e=!1,(a[pe].options.sort||a!==r)&&O.length>1){var y=Y(W),k=te(W,":not(."+this.options.selectedClass+")");if(!gt&&f.animation&&(W.thisAnimationDuration=null),m.captureAnimationState(),!gt&&(f.animation&&(W.fromRect=y,O.forEach(function(C){if(C.thisAnimationDuration=null,C!==W){var w=_e?Y(C):y;C.fromRect=w,m.addAnimationState({target:C,rect:w})}})),Ht(),O.forEach(function(C){h[k]?a.insertBefore(C,h[k]):a.appendChild(C),k++}),d===te(W))){var b=!1;O.forEach(function(C){if(C.sortableIndex!==te(C)){b=!0;return}}),b&&(s("update"),s("sort"))}O.forEach(function(C){vt(C)}),m.animateAll()}Be=m}(r===a||c&&c.lastPutMode!=="clone")&&be.forEach(function(C){C.parentNode&&C.parentNode.removeChild(C)})}},nullingGlobal:function(){this.isMultiDrag=tt=!1,be.length=0},destroyGlobal:function(){this._deselectMultiDrag(),R(document,"pointerup",this._deselectMultiDrag),R(document,"mouseup",this._deselectMultiDrag),R(document,"touchend",this._deselectMultiDrag),R(document,"keydown",this._checkKeyDown),R(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof tt<"u"&&tt)&&Be===this.sortable&&!(t&&ke(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;O.length;){var l=O[0];Z(l,this.options.selectedClass,!1),O.shift(),st({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Ve(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[pe];!l||!l.options.multiDrag||~O.indexOf(t)||(Be&&Be!==l&&(Be.multiDrag._deselectMultiDrag(),Be=l),Z(t,l.options.selectedClass,!0),O.push(t))},deselect:function(t){var l=t.parentNode[pe],r=O.indexOf(t);!l||!l.options.multiDrag||!~r||(Z(t,l.options.selectedClass,!1),O.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return O.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;_e&&a!==W?i=-1:_e?i=te(a,":not(."+t.options.selectedClass+")"):i=te(a),r.push({multiDragElement:a,index:i})}),{items:E3(O),clones:[].concat(be),oldIndicies:l,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function tr(o,n){O.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function jo(o,n){be.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Ht(){O.forEach(function(o){o!==W&&o.parentNode&&o.parentNode.removeChild(o)})}I.mount(new Z3),I.mount(ho,fo);function je(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function wt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function or(){return typeof window<"u"?window.console:global.console}const nr=or();function lr(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const rr=/-(\w)/g,ar=lr(o=>o.replace(rr,(n,t)=>t.toUpperCase())),Go=["Start","Add","Remove","Update","End"],Wo=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],Yo=["Move"],ir=[Yo,Go,Wo].flatMap(o=>o).map(o=>`on${o}`),uo={manage:Yo,manageAndEmit:Go,emit:Wo};function sr(o){return ir.indexOf(o)!==-1}const cr=["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 dr(o){return cr.includes(o)}function pr(o){return["transition-group","TransitionGroup"].includes(o)}function Xo(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function Jo(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function mr({$attrs:o,componentData:n={}}){return{...Jo(Object.entries(o).filter(([l,r])=>Xo(l))),...n}}function fr({$attrs:o,callBackBuilder:n}){const t=Jo(Ko(o));Object.entries(n).forEach(([r,a])=>{uo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function Ko(o){return Object.entries(o).filter(([n,t])=>!Xo(n)).map(([n,t])=>[ar(n),t]).filter(([n,t])=>!sr(n))}const Zo=({el:o})=>o,hr=(o,n)=>o.__draggable_context=n,Qo=o=>o.__draggable_context;class ur{constructor({nodes:{header:n,default:t,footer:l},root:r,realList:a}){this.defaultNodes=t,this.children=[...n,...t,...l],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,t){const{tag:l,children:r,_isRootComponent:a}=this;return n(l,t,a?{default:()=>r}:r)}updated(){const{defaultNodes:n,realList:t}=this;n.forEach((l,r)=>{hr(Zo(l),{element:t[r],index:r})})}getUnderlyingVm(n){return Qo(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const s=Qo(i);if(s)return s.index;if(r===0)return 0;const d=Zo(l[0]),c=[...a].findIndex(m=>m===d);return n<c?0:r}}function gr(o,n){const t=o[n];return t?t():[]}function _r({$slots:o,realList:n,getKey:t,itemDataSet:l}){let r;switch(typeof l){case"function":r=l;break;case"object":r=()=>l;break}const a=n||[],[i,s]=["header","footer"].map(m=>gr(o,m)),{item:d}=o;if(!d)throw new Error("draggable element must have an item slot");const c=a.flatMap((m,f)=>d({element:m,index:f}).map(h=>{h.key=t(m);const p=r==null?void 0:r(m);return p?h.props={...h.props||{},"data-draggable":!0,...p}:h.props={...h.props||{},"data-draggable":!0},h}));if(c.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:c}}function wr(o){const n=pr(o),t=!dr(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function yr({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=_r({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=wr(n);return new ur({nodes:a,root:i,realList:t})}function vo(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function en(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function br(o){const n=en.call(this,o);return(t,l)=>{n.call(this,t,l),vo.call(this,o,t)}}function go(o,n){const t=new I(o,n);return n.swap&&!t.swap?(I.mount(new Q3),t.destroy(),go(o,n)):n.multiDrag&&!t.multiDrag?(I.mount(new er),t.destroy(),go(o,n)):t}function Cr(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let _o=null;const Vr={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},kr=["update:modelValue","change",...[...uo.manageAndEmit,...uo.emit].map(o=>o.toLowerCase())],yt=e.defineComponent({name:"draggable",inheritAttrs:!1,props:Vr,emits:kr,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=yr({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=mr({$attrs:n,componentData:l});return i.render(e.h,s)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&nr.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:o,$el:n,componentStructure:t}=this;t.updated();const l=fr({$attrs:o,callBackBuilder:{manageAndEmit:a=>br.call(this,a),emit:a=>vo.bind(this,a),manage:a=>en.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=go(r,l),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:o}=this;return o||this.modelValue},getKey(){const{itemKey:o}=this;return typeof o=="function"?o:n=>n[o]}},watch:{$attrs:{handler(o){const{_sortable:n}=this;n&&Ko(o).forEach(([t,l])=>{n.option(t,l)})},deep:!0}},methods:{getUnderlyingVm(o){return this.componentStructure.getUnderlyingVm(o)||null},getUnderlyingPotencialDraggableComponent(o){return o.__draggable_component__},emitChanges(o){e.nextTick(()=>this.$emit("change",o))},alterList(o){if(this.list){o(this.list);return}const n=[...this.modelValue];o(n),this.$emit("update:modelValue",n)},spliceList(){const o=n=>n.splice(...arguments);this.alterList(o)},removeAllFromList(o){const n=t=>o.forEach(l=>t.splice(l,1));this.alterList(n)},swapPosition(o,n){const t=l=>{const r=l[o];l[o]=l[n],l[n]=r};this.alterList(t)},updatePosition(o,n){const t=l=>l.splice(n,0,l.splice(o,1)[0]);this.alterList(t)},updatePositions(o,n){const t=l=>{const r=o.sort().reverse().flatMap(a=>l.splice(a,1)).reverse();return l.splice(n,0,...r)};this.alterList(t)},getRelatedContextFromMoveEvent({to:o,related:n}){const t=this.getUnderlyingPotencialDraggableComponent(o);if(!t)return{component:t};const l=t.realList,r={list:l,component:t};return o!==n&&l?{...t.getUnderlyingVm(n)||{},...r}:r},getVmIndexFromDomIndex(o){return this.componentStructure.getVmIndexFromDomIndex(o,this.targetDomElement)},onDragStart(o){if(Array.isArray(o.items)&&o.items.length){this.multidragContexts=o.items.map(t=>this.getUnderlyingVm(t));const n=this.multidragContexts.sort(({index:t},{index:l})=>t-l).map(t=>t.element);o.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(o.item),o.item._underlying_vm_=this.clone(this.context.element),_o=o.item},onDragAdd(o){Array.isArray(o.items)&&o.items.length?this.onDragAddMulti(o):this.onDragAddSingle(o)},onDragAddMulti(o){const n=o.item._underlying_vm_multidrag_;if(n===void 0)return;o.items.forEach(r=>je(r));const t=this.getVmIndexFromDomIndex(o.newIndex);this.spliceList(t,0,...n);const l=n.map((r,a)=>({element:r,newIndex:t+a}));this.emitChanges({added:l})},onDragAddSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=o.item._underlying_vm_;if(t===void 0)return;const l=n?o.from.children[o.oldIndex]:null;je(o.item);let r=this.getVmIndexFromDomIndex(o.newIndex);n&&(r=r===0?0:r-1),this.spliceList(r,n?1:0,t);const a={element:t,newIndex:r,from:o.from,to:o.to};if(o.swap||(this.emitChanges({added:a}),!n))return;const i={to:o.from,from:o.to,item:l,oldIndex:o.newIndex,newIndex:o.oldIndex,swap:!0};e.nextTick(()=>{const s=i.to.__draggable_component__;s.onDragStart(i),s.onDragAdd(i)})},onDragRemove(o){Array.isArray(o.items)&&o.items.length?this.onDragRemoveMulti(o):this.onDragRemoveSingle(o)},onDragRemoveMulti(o){const n=(this.$slots.header?this.$slots.header():[]).length||0,t=o.oldIndicies.sort(({index:a},{index:i})=>a-i);if(t.forEach(({multiDragElement:a,index:i})=>{wt(this.$el,a,i),a.parentNode&&I.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>je(a));return}const l=Cr(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(s=>s.index===a).element,oldIndex:a}));this.emitChanges({removed:r})},onDragRemoveSingle(o){const{index:n,element:t}=this.context,l={element:t,oldIndex:n,from:o.from,to:o.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:l});if(wt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){je(o.clone);return}this.spliceList(n,1),this.emitChanges({removed:l})},onDragUpdate(o){Array.isArray(o.items)&&o.items.length?o.pullMode||this.onDragUpdateMulti(o):this.onDragUpdateSingle(o)},onDragUpdateMulti(o){const{items:n,from:t}=o,l=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(d=>je(d));const r=Array.from(o.oldIndicies).sort(({index:d},{index:c})=>d-c);r.forEach(d=>wt(t,d.multiDragElement,d.index));const a=r.map(({index:d})=>d-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((d,c)=>({element:this.multidragContexts.find(f=>f.index===d).element,oldIndex:d,newIndex:i+c}));this.emitChanges({moved:s})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;je(o.item),wt(o.from,o.item,o.oldIndex),n&&(je(t),wt(o.from,t,o.newIndex));const l=this.context.index,r=this.getVmIndexFromDomIndex(o.newIndex);n?this.swapPosition(l,r):this.updatePosition(l,r);const a={element:this.context.element,oldIndex:l,newIndex:r};this.emitChanges({moved:a})},computeFutureIndex(o,n){if(!o.element)return 0;const t=[...n.to.children].filter(i=>i.style.display!=="none"),l=t.indexOf(n.related),r=o.component.getVmIndexFromDomIndex(l);return t.indexOf(_o)!==-1||!n.willInsertAfter?r:r+1},onDragMove(o,n){const{move:t,realList:l}=this;if(!t||!l)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.computeFutureIndex(r,o),i={...this.context,futureIndex:a},s={...o,relatedContext:r,draggedContext:i};return t(s,n)},onDragEnd(){_o=null},select(o){I.utils.select(o)},deselect(o){I.utils.deselect(o)}}}),{getTempID:xr}=de();let Me=class{constructor(n,t,l=!1,r=!1){we(this,"isEdit");we(this,"isInput");we(this,"type");we(this,"name");we(this,"id");we(this,"itemID");we(this,"itemSourceType");we(this,"rules");we(this,"props");we(this,"excludeFilterConditions");we(this,"filterConditionProps");we(this,"isLayout",!1);we(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=xr(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Er=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;return(l,r)=>{const a=e.resolveComponent("el-color-picker"),i=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-switch"),d=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"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(t).backgroundColor,"onUpdate:modelValue":r[0]||(r[0]=h=>e.unref(t).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).showBorder=h)},null,8,["modelValue"])]),_:1}),e.unref(t).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(c,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(d,{label:"实线边框",value:"solid"}),e.createVNode(d,{label:"虚线边框",value:"dashed"}),e.createVNode(d,{label:"点线边框",value:"dotted"}),e.createVNode(d,{label:"双线边框",value:"double"}),e.createVNode(d,{label:"凹槽边框",value:"groove"}),e.createVNode(d,{label:"脊状边框",value:"ridge"}),e.createVNode(d,{label:"内凹边框",value:"inset"}),e.createVNode(d,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).borderColor,"onUpdate:modelValue":r[3]||(r[3]=h=>e.unref(t).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=h=>e.unref(t).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),ws="",Nr=["onClick"],Br={key:2,class:"operates"},tn=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(o,{emit:n}){const t={...kt,...Et,...xt},{getTempID:l,clone:r}=de();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=o,{components:d}=e.toRefs(s),c=n;e.watch(d,()=>c("update:components",d),{immediate:!0,deep:!0});const m=u=>{u.added?f(u.added.element):u.moved&&f(u.moved.element)},f=u=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=u)},h=u=>{const _=p(u);d.value.push(_),f(_)},p=u=>{var y,k;let _=r(u);if(_.id=l(),delete _.itemID,(y=_.props.options)!=null&&y.length){_.props.options.forEach(C=>{C.value.includes("temp-")&&(C.value=l())});let b=new t[u.type].component;_.filterConditionProps=b.getFilterConditionProps(_.props)}if(_.isLayout&&((k=_.children)!=null&&k.length)){let b=[];_.children.forEach(C=>{b.push(p(C))}),_.children=b}return _},g=u=>{let _=r(d.value[u]);d.value.splice(u,1),i.selectComponent=void 0,c("deleteComponent",_)};return(u,_)=>{const y=e.resolveComponent("el-form-item"),k=ee;return e.openBlock(),e.createBlock(e.unref(yt),{list:e.unref(d),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:m},{item:e.withCtx(({element:b,index:C})=>[e.createElementVNode("div",{onClick:e.withModifiers(w=>f(b),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==b},{"is-hidden":!b.props.showFlag}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(a).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{key:0,isDesigner:"",componentID:b.id,component:e.unref(d)[C],"onUpdate:component":w=>e.unref(d)[C]=w,onDeleteComponent:_[0]||(_[0]=w=>c("deleteComponent",w))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(y,{key:1,prop:b.id,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),"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(t[b.type].renderer),{isDesigner:"",componentID:b.id,componentProps:b.props,"onUpdate:componentProps":w=>b.props=w,datas:e.unref(a).datas,"onUpdate:datas":_[1]||(_[1]=w=>e.unref(a).datas=w)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==b?(e.openBlock(),e.createElementBlock("div",Br,[b.allowRepeat?(e.openBlock(),e.createBlock(k,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(w=>h(b),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(k,{name:"delete",color:"#ff0000",onClick:e.withModifiers(w=>g(C),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,Nr)]),_:1},8,["list"])}}}),ys="",Dr=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(o,{emit:n}){const t=o,{component:l,showDescription:r}=e.toRefs(t);!l.value.children&&(l.value.children=[]);const a=e.computed(()=>{let d={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(d.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(d["border-radius"]=`${l.value.props.borderRadius}px`),d}),i=n,s=d=>{i("deleteComponent",d)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":o.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(l).props.color,"font-size":e.unref(l).props.fontSize+"px","font-weight":e.unref(l).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(l).props.label),5)):e.createCommentVNode("",!0),o.isDesigner?(e.openBlock(),e.createBlock(tn,{key:1,components:e.unref(l).children,"onUpdate:components":c[0]||(c[0]=m=>e.unref(l).children=m),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(rn,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),bs="",Sr={component:class extends Me{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:Dr,propEditor:Er},Mr=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");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(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=p=>e.isRef(l)?l.value=p:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p)},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Vs="",zr={class:"upload-component"},$r=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Tr={key:0,class:"description"},Ir=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(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const d=h=>{if(h.status==="ready"&&!n(h.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){c(h);return}if(h.status==="success"&&h.response.code===0){ce("error",h.response.message||"文件上传失败!"),c(h);return}l.autoUpload?a.value[t.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[t.componentID].push({name:h.name,url:h.url,file:h.raw})},c=(h,p=!0)=>{p&&s.value.handleRemove(h);const g=a.value[t.componentID].findIndex(u=>u.url===h.url);g!==-1&&a.value[t.componentID].splice(g,1)},m=h=>{c(h,!1)},f=()=>{var p;let h=`最多只能上传${i.value.fileLimit}个文件`;(p=a.value[t.componentID])!=null&&p.length&&(h+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),ce("error",h)};return(h,p)=>{const g=ee,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",zr,[e.createVNode(_,{ref_key:"uploadRef",ref:s,action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-exceed":f,"on-change":d,"on-remove":m},{default:e.withCtx(()=>{var y;return[e.unref(i).fileLimit>(((y=e.unref(a)[o.componentID])==null?void 0:y.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[$r]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Tr,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),ks="",Lr={component:class extends Me{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:Ir,propEditor:Mr},Ar=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");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(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=p=>e.isRef(l)?l.value=p:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Es="",Or={class:"upload-image-component"},Fr={class:"el-upload-list__item-actions"},Pr={class:"el-upload-list__item-preview"},Rr={class:"el-upload-list__item-delete"},Ur={key:0,class:"description"},Hr=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(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(),d=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const c=p=>{if(p.status==="ready"&&!n(p.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){m(p);return}if(p.status==="success"&&p.response.code===0){ce("error",p.response.message||"图片上传失败!"),m(p);return}l.autoUpload?a.value[t.componentID].push({name:p.name,url:p.response.data.url,id:p.response.data.id}):a.value[t.componentID].push({name:p.name,url:p.url,file:p.raw})},m=p=>{s.value.handleRemove(p);const g=a.value[t.componentID].findIndex(u=>u.url===p.url);g!==-1&&a.value[t.componentID].splice(g,1)},f=()=>{d.value.$el.children[0].click()},h=()=>{var g;let p=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[t.componentID])!=null&&g.length&&(p+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),ce("error",p)};return(p,g)=>{var k;const u=ee,_=e.resolveComponent("el-image"),y=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Or,[e.createVNode(y,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((k=e.unref(a)[o.componentID])==null?void 0:k.length)||0)}),"list-type":"picture-card",action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-change":c,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:b})=>[e.createVNode(_,{ref_key:"imageRef",ref:d,style:{width:"100px",height:"100px"},src:b.url,"preview-src-list":[b.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Fr,[e.createElementVNode("span",Pr,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",Rr,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:C=>m(b)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Ur,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ns="",qr={component:class extends Me{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:Hr,propEditor:Ar};function qt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const jr=o=>typeof o<"u",on=()=>{};function Gr(o,n){function t(...l){return new Promise((r,a)=>{Promise.resolve(o(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(r).catch(a)})}return t}function Wr(o,n={}){let t,l,r=on;const a=s=>{clearTimeout(s),r(),r=on};return s=>{const d=qt(o),c=qt(n.maxWait);return t&&a(t),d<=0||c!==void 0&&c<=0?(l&&(a(l),l=null),Promise.resolve(s())):new Promise((m,f)=>{r=n.rejectOnCancel?f:m,c&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,m(s())},c)),t=setTimeout(()=>{l&&a(l),l=null,m(s())},d)})}}function Yr(o,n=200,t={}){return Gr(Wr(n,t),o)}function Xr(o,n){return e.computed(()=>qt(o).map(t=>qt(t)).filter(n))}function Jr(o){return JSON.parse(JSON.stringify(o))}function Kr(o,n,t,l={}){var r,a,i;const{clone:s=!1,passive:d=!1,eventName:c,deep:m=!1,defaultValue:f,shouldEmit:h}=l,p=e.getCurrentInstance(),g=t||(p==null?void 0:p.emit)||((r=p==null?void 0:p.$emit)==null?void 0:r.bind(p))||((i=(a=p==null?void 0:p.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(p==null?void 0:p.proxy));let u=c;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=b=>s?typeof s=="function"?s(b):Jr(b):b,y=()=>jr(o[n])?_(o[n]):f,k=b=>{h?h(b)&&g(u,b):g(u,b)};if(d){const b=y(),C=e.ref(b);let w=!1;return e.watch(()=>o[n],x=>{w||(w=!0,C.value=_(x),e.nextTick(()=>w=!1))}),e.watch(C,x=>{!w&&(x!==o[n]||m)&&k(x)},{deep:m}),C}else return e.computed({get(){return y()},set(b){k(b)}})}const Zr={class:"option-wrap"},Qr={style:{float:"left"}},vr={style:{float:"right",color:"#8492a6"}},ea=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const l=e.ref([]);e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const r=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)},a=()=>{t.options.push({label:"",value:""})},i=h=>{t.options.splice(h,1)},s=e.ref(!1);let d=e.ref(t.options);const c=Yr(async h=>await n.selectComponent.searchEmployeeMethod(h),500),m=h=>{if(!h)return[];s.value=!0,c(h).then(p=>{d.value=p,s.value=!1})},f=(h,p)=>{const g=d.value.find(u=>u.value===h);t.options[p]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},d.value=t.options};return(h,p)=>{const g=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-switch"),k=e.resolveComponent("el-input-number"),b=e.resolveComponent("el-divider"),C=ee,w=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),z=e.resolveComponent("el-button"),F=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(F,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(_,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(t).type,"onUpdate:modelValue":p[0]||(p[0]=T=>e.unref(t).type=T),onChange:r},{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(t).type!=="selector"?(e.openBlock(),e.createBlock(_,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":p[1]||(p[1]=T=>e.unref(t).newLine=T)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":p[2]||(p[2]=T=>e.unref(t).multiple=T)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var T;return[e.createVNode(k,{modelValue:e.unref(t).min,"onUpdate:modelValue":p[3]||(p[3]=D=>e.unref(t).min=D),step:1,min:0,max:((T=e.unref(l))==null?void 0:T.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var T;return[e.createVNode(k,{modelValue:e.unref(t).max,"onUpdate:modelValue":p[4]||(p[4]=D=>e.unref(t).max=D),step:1,min:0,max:((T=e.unref(l))==null?void 0:T.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(b,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(t).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:T,index:D})=>[e.createElementVNode("div",Zr,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(C,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(x,{class:"selector-component",modelValue:T.value,"onUpdate:modelValue":S=>T.value=S,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":m,loading:e.unref(s),"loading-text":"加载中……",onChange:S=>f(S,D)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(S,P)=>(e.openBlock(),e.createBlock(w,{key:P,label:S.label,value:S.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:P,label:S.label,suffix:S.suffix},()=>[e.createElementVNode("span",Qr,e.toDisplayString(S.label),1),e.createElementVNode("span",vr,e.toDisplayString(S.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(C,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:S=>i(D)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(z,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(C,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Ds="",ta={class:"employee-component"},oa={key:3,class:"description"},na=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),k=ee;return e.openBlock(),e.createElementBlock("div",ta,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=b=>e.isRef(i)?i.value=b:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:b.value,onClick:w=>c(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=b=>e.isRef(i)?i.value=b:null),disabled:o.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,(b,C)=>(e.openBlock(),e.createBlock(g,{value:b.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(y,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=b=>e.isRef(i)?i.value=b:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",oa,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ss="",la={component:class extends Me{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:na,propEditor:ea};function wo(){return{getGradeItems(o){let n=[];if(!o.maxScore)return n;o.showVeto&&n.push({value:"-2",label:"单项否决"}),o.showNotGrade&&n.push({value:"-1",label:"不考评"}),o.showZero&&n.push({value:"0",label:"0分"});let t=Number(o.maxScore);for(let l=1;l<=t;l++)n.push({value:String(l),label:`${String(l)}分`});return o.scoreReverseFlag&&n.reverse(),n}}}const ra=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=wo(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps.options=r.value},{immediate:!0}),(a,i)=>{const s=e.resolveComponent("el-option"),d=e.resolveComponent("el-select"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).defaultValue=p),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(p,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).maxScore=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).showZero=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).showNotGrade=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).scoreReverseFlag=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=p=>e.unref(t).newLine=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=p=>e.unref(t).showProblem=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=p=>e.unref(t).showBrightSpot=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=p=>e.unref(t).showRemark=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=p=>e.unref(t).showVeto=p)},null,8,["modelValue"])]),_:1})]),_:1})}}}),aa={class:"auto-complete"},ia={key:0},sa=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(o,{emit:n}){e.useCssVars(p=>({e00bfd70:e.unref(h)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,s=Kr(l,"modelValue",i),d=()=>{i("change",s.value)},c=(p,g)=>{const u=p?Xr(r,m(p)):r.value;g(e.unref(u))},m=p=>({start:u=>u.value.toLowerCase().indexOf(p.toLowerCase())===0,random:u=>u.value.indexOf(p)>=0})[l.matchMode],f=e.inject("convertPX"),h=e.computed(()=>`${f(a.value)}px`);return(p,g)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",aa,[o.label?(e.openBlock(),e.createElementBlock("span",ia,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=_=>e.isRef(s)?s.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":c,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:d},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),zs="",ca={class:"grade-component"},da={key:3,class:"description"},pa=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(o,{emit:n}){const t=o,{getGradeItems:l}=wo();let r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(a.value[t.componentID]||{});e.watch(s,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const d=e.computed(()=>l(i.value)),c=n;e.watch(a,f=>c("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const m=(f,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,f.preventDefault())};return(f,h)=>{const p=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),u=sa,_=ee;return e.openBlock(),e.createElementBlock("div",ca,[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]=y=>e.unref(s).score=y),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(y,k)=>(e.openBlock(),e.createBlock(p,{key:k,value:y.value,onClick:b=>m(b,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(u,{key:0,class:"problem",modelValue:e.unref(s).problem,"onUpdate:modelValue":h[1]||(h[1]=y=>e.unref(s).problem=y),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(u,{key:1,class:"bright-spot",modelValue:e.unref(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=y=>e.unref(s).brightSpot=y),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(u,{key:2,class:"bright-spot",modelValue:e.unref(s).remark,"onUpdate:modelValue":h[3]||(h[3]=y=>e.unref(s).remark=y),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",da,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),$s="",{isEmpty:ma}=de(),{getGradeItems:fa}=wo(),ha={component:class extends Me{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:(t,l,r)=>{if(!l||ma(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&fa(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:pa,propEditor:ra},ua=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const l=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)};return(r,a)=>{const i=e.resolveComponent("el-radio-button"),s=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(d,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(t).type=h),onChange:l},{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(t).type!=="selector"?(e.openBlock(),e.createBlock(d,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(t).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(t).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(d,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=p=>e.unref(t).min=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(d,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).max=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),ga={class:"post-component"},_a={key:3,class:"description"},wa=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),k=ee;return e.openBlock(),e.createElementBlock("div",ga,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=b=>e.isRef(i)?i.value=b:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:b.value,onClick:w=>c(w,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=b=>e.isRef(i)?i.value=b:null),disabled:o.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,(b,C)=>(e.openBlock(),e.createBlock(g,{value:b.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(y,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=b=>e.isRef(i)?i.value=b:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(b,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(k,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Is="",ya={component:class extends Me{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:wa,propEditor:ua},ba={class:"dictionary-binder"},Ca={class:"item"},Va={class:"label"},ka={key:0,class:"item-souce-type"},yo=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(o,{emit:n}){var p;e.useCssVars(g=>({"4f018582":o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(p=l.dictionary)==null?void 0:p.souceTypeMap;r.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const d=g=>{s.value=g?c(g):l.dictionary.dictionaryItems},c=g=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),m=n,{getTempID:f}=de(),h=g=>{let u=s.value.find(_=>_.value===g);u||(u={value:f(),label:g,itemSourceType:t}),m("update:modelValue",u.label),m("change",u)};return(g,u)=>{var k;const _=e.resolveComponent("el-select-v2"),y=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ba,[(k=o.dictionary)!=null&&k.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=b=>e.isRef(a)?a.value=b:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":d,placeholder:o.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:h},{default:e.withCtx(({item:b})=>[e.createElementVNode("div",Ca,[e.createElementVNode("span",Va,e.toDisplayString(b.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",ka,e.toDisplayString(e.unref(i).get(b.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(y,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=b=>e.isRef(a)?a.value=b:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),As="",xa={class:"option-wrap"},Ea=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=ee,y=e.resolveComponent("el-checkbox"),k=e.resolveComponent("el-tooltip"),b=e.resolveComponent("el-button"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=w=>e.unref(l).defaultValue=w),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(w,x)=>(e.openBlock(),e.createBlock(m,{key:x,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=w=>e.unref(l).newLine=w)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).min,"onUpdate:modelValue":c[2]||(c[2]=w=>e.unref(l).min=w),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).max,"onUpdate:modelValue":c[3]||(c[3]=w=>e.unref(l).max=w),step:1,min:1,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:w,index:x})=>[e.createElementVNode("div",xa,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(yo,{modelValue:w.label,"onUpdate:modelValue":z=>w.label=z,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:z=>s(z,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(k,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(y,{class:"input-enable",modelValue:w.inputEnable,"onUpdate:modelValue":z=>w.inputEnable=z},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:z=>i(x)},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(b,{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)]),_:1})}}}),Os="",Na={class:"checkbox-component"},Ba={key:0,class:"description"},Da=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,c=>r.value[t.componentID]=c);const s=n;e.watch(r,c=>s("update:datas",c)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=c=>{a.value.options.forEach(m=>{const f=`${t.componentID}||${m.value}`;!c.includes(m.value)&&r.value[f]&&delete r.value[f]})};return(c,m)=>{const f=e.resolveComponent("el-checkbox"),h=e.resolveComponent("el-input"),p=e.resolveComponent("el-checkbox-group"),g=ee;return e.openBlock(),e.createElementBlock("div",Na,[e.createVNode(p,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":m[0]||(m[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var y;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:_},[e.createVNode(f,{value:u.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.label),1)]),_:2},1032,["value"]),u.inputEnable&&(o.isDesigner||(y=e.unref(i))!=null&&y.includes(u.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":k=>e.unref(r)[`${o.componentID}||${u.value}`]=k},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",Ba,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Fs="",{getTempID:nn}=de(),Sa={component:class extends Me{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:nn(),label:"选项1"},{value:nn(),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:Da,propEditor:Ea},Ma=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=de();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=d=>{d&&(r[1].pattern=n(d))},i=d=>{r[1].message=d},s=d=>{d==="text"&&(l.showPassword=!1)};return(d,c)=>{const m=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(u,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(f,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).type,"onUpdate:modelValue":c[1]||(c[1]=_=>e.unref(l).type=_),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(l).type=="password"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":c[2]||(c[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":c[3]||(c[3]=_=>e.unref(l).pattern=_)},null,8,["modelValue"])]),_:1}),e.unref(l).pattern?(e.openBlock(),e.createBlock(f,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":c[4]||(c[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),za={class:"input-component"},$a={key:0,class:"description"},Ta=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,d=>r.value[t.componentID]=d);const s=n;return e.watch(r,d=>s("update:datas",d)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(d,c)=>{const m=e.resolveComponent("el-input"),f=ee;return e.openBlock(),e.createElementBlock("div",za,[e.createVNode(m,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=h=>e.isRef(i)?i.value=h:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:o.disabled,readonly:o.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",$a,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Rs="",Ia={component:class extends Me{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:Ta,propEditor:Ma},La={component:class extends Me{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(o){return(n,t)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:o.componentProps.color,"font-size":o.componentProps.fontSize+"px","font-weight":o.componentProps.isBold?"bold":"normal"})},e.toDisplayString(o.componentProps.label),5))}}),undefined:void 0},Aa={class:"option-wrap"},Oa=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-divider"),u=ee,_=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-tooltip"),k=e.resolveComponent("el-button"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=C=>e.unref(l).defaultValue=C),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,w)=>(e.openBlock(),e.createBlock(m,{key:w,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=C=>e.unref(l).newLine=C)},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(yt),{class:"radio-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:w})=>[e.createElementVNode("div",Aa,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(yo,{modelValue:C.label,"onUpdate:modelValue":x=>C.label=x,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:x=>s(x,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(y,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":x=>C.inputEnable=x},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:x=>i(w)},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(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),js="",Fa={class:"radio-component"},Pa={key:0,class:"description"},Ra=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(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>r.value[t.componentID]=m);const s=n;e.watch(r,m=>s("update:datas",m)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=m=>{a.value.options.forEach(f=>{const h=`${t.componentID}||${f.value}`;m!==f.value&&r.value[h]&&delete r.value[h]})},c=(m,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const h=`${t.componentID}||${f}`;r.value[h]&&delete r.value[h],m.preventDefault()}};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-group"),u=ee;return e.openBlock(),e.createElementBlock("div",Fa,[e.createVNode(g,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=_=>e.isRef(i)?i.value=_:null),disabled:o.disabled,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,y)=>{var k;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:y},[e.createVNode(h,{value:_.value,onClick:b=>c(b,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(k=e.unref(i))!=null&&k.includes(_.value))?(e.openBlock(),e.createBlock(p,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":b=>e.unref(r)[`${o.componentID}||${_.value}`]=b},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",Pa,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Gs="",{getTempID:ln}=de();class Ua extends Me{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:ln(),label:"选项1"},{value:ln(),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 Ha={component:Ua,renderer:Ra,propEditor:Oa},qa={key:0,class:"component-readonly-mask"},rn=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(o,{emit:n}){const t={...kt,...Et,...xt},{computedExpression:l}=de();let r=e.inject("formData");const a=o,{components:i,showDescription:s,selectMode:d}=e.toRefs(a),c={show:p=>{if(p.showFlag===void 0)return String(!0);let g="";return p.showFlag?g=p.hiddenConditionExpression?`!(${p.hiddenConditionExpression})`:String(p.showFlag):g=p.showConditionExpression||String(p.showFlag),g},disabled:p=>p.disabledConditionExpression||String(p.disabled===void 0?!1:p.disabled),readonly:p=>p.readonlyConditionExpression||String(p.readonly===void 0?!1:p.readonly)},m=(p,g)=>{var y;let u=c[g](p.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(b=>{var z;const C=b.replace(/\{|}/g,"");let w=r.value.datas[C];const x=i.value.find(F=>F.id===C);(x==null?void 0:x.type)==="grade"&&(w=(z=r.value.datas[C])==null?void 0:z.score),u=u.replace(b,w||"")});const _=l(u);if(g==="show"&&!_){let k=[];p.isLayout&&((y=p.children)!=null&&y.length)?k=p.children:k=[p],k.forEach(b=>{r.value.datas[b.id]&&(b.type==="grade"?delete r.value.datas[b.id].score:delete r.value.datas[b.id])})}return _},f=n,h=p=>{f("select",p)};return(p,g)=>{const u=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-form-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(y,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k},[e.unref(d)||m(y,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(d)},{"is-hidden":!y.props.showFlag},{selected:y.selected}]),style:e.normalizeStyle({width:`${y.props.width*100/e.unref(r).props.column}%`,"padding-left":`${y.props.paddingLeft}px`})},[m(y,"readonly")?(e.openBlock(),e.createElementBlock("div",qa)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:y.selected,"onUpdate:modelValue":b=>y.selected=b,label:"选择",onChange:b=>h(y)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),y.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{key:2,componentID:y.id,showDescription:e.unref(s),component:e.unref(i)[k],"onUpdate:component":b=>e.unref(i)[k]=b},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":y.props.labelNewLine}]),prop:y.id,"label-width":y.props.showLabel?y.props.labelWidth:"0",rules:y.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:y.props.color||"#000000","font-size":y.props.fontSize+"px","font-weight":y.props.isBold?"bold":"normal"})},e.toDisplayString(y.props.showLabel?y.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{componentID:y.id,disabled:m(y,"disabled"),showDescription:e.unref(s),componentProps:y.props,"onUpdate:componentProps":b=>y.props=b,datas:e.unref(r).datas,"onUpdate:datas":g[0]||(g[0]=b=>e.unref(r).datas=b)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),Ws="",ja={key:0,class:"select-title"},Ga=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),Wa={key:1,class:"title"},Ya={key:0,class:"readonly-mask"},Xa={key:2,class:"mobile-key"},Ja={name:"zhy-form-renderer"},Ge=e.defineComponent({...Ja,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(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=de(),r={...kt,...Et,...xt},a=e.ref(),i=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=o,m=t,{formData:f,selectMode:h}=e.toRefs(c),p=e.ref(c.selectComponents);e.provide("uploadOptions",c.uploadOptions),e.provide("formData",f);const g=C=>{var w,x,z,F;if((w=p.value)!=null&&w.length||(p.value=[]),!C){p.value=[],f.value.components.forEach(T=>{T.selected=s.value,s.value&&p.value.push(T)}),d.value=!1,m("select",p.value);return}if(C.selected)(x=p.value)==null||x.push(C);else{const T=(z=p.value)==null?void 0:z.findIndex(D=>D.id===C.id);T!==-1&&((F=p.value)==null||F.splice(T,1))}m("select",p.value),u()},u=()=>{var C,w;if(!((C=p.value)!=null&&C.length)){d.value=!1,s.value=!1;return}if(((w=p.value)==null?void 0:w.length)<f.value.components.length){d.value=!0;return}s.value=!0,d.value=!1},_=C=>{C!=null&&C.length&&(C.forEach(w=>{var z,F;let x=new r[w.type].component;x.isEdit&&(w.props.required||w.props.pattern)&&(w.rules=x.getRules(w.props)),c.selectMode&&((z=p.value)!=null&&z.length)&&p.value.findIndex(D=>D.id===w.id)!==-1&&(w.selected=!0),w.isLayout&&((F=w==null?void 0:w.children)!=null&&F.length)&&_(w.children)}),c.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const y=()=>{let C=l(f.value.datas),w=[],x=[];const z=Object.keys(C);for(let F of z){if(F.includes("||")){let T=F.split("||"),D=T[0],S=T[1],P=w.findIndex(B=>B.id===S&&B.groupID===D);if(P!==-1)w[P].value=C[F];else{const B={parentID:D,id:S,value:C[F]};w.push(B)}continue}k(f.value.components,w,x,F,C)}return{data:w,fileList:x}},k=(C,w,x,z,F)=>{var S;let T,D;for(let P=0;P<C.length;P++){const B=C[P];if(B.id===z){T=B,b(w,x,z,F,T);break}if(B.isLayout&&((S=B==null?void 0:B.children)!=null&&S.length)){if(T=B.children.find(H=>H.id===z),T){D=B.id,b(w,x,z,F,T,D);break}k(B.children,w,x,z,F)}}},b=(C,w,x,z,F,T)=>{var S,P;let D=-1;switch(F.type){case"radio":D=C.findIndex(B=>B.id===z[x]),D===-1&&C.push({groupID:T,parentID:x,id:z[x],value:""});break;case"checkbox":z[x].forEach(B=>{D=C.findIndex(H=>H.id===H),D===-1&&C.push({groupID:T,parentID:x,id:B,value:""})});break;case"upload":case"uploadImage":if(!((S=c.uploadOptions)!=null&&S.autoUpload)&&((P=z[x])!=null&&P.length)){const B=z[x].map(X=>(X.file&&(X.file.id=x),X.file)),H=z[x].map(X=>{if(X.fileID)return X.fileID}).filter(X=>X!==void 0);w.push({id:x,groupID:T,fileIDs:H,files:B})}break;default:C.push({groupID:T,parentID:x,id:x,value:z[x]});break}};return c.watching&&e.watch(()=>f.value.datas,()=>{const C=y();m("change",C.data,C.fileList)},{immediate:!0,deep:!0}),n({getDatas:y,async validate(C=()=>{}){return await a.value.validate(C)},resetFields(){a.value.resetFields()},clearValidate(C){a.value.clearValidate(C)},scrollToField(C){a.value.scrollToField(C)},toggleDescription(){i.value=!i.value}}),(C,w)=>{const x=e.resolveComponent("el-checkbox"),z=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",o.device,{"examination-paper":e.unref(f).props.formType==="2"},{"select-mode":e.unref(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",ja,[Ga,e.createVNode(x,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":w[0]||(w[0]=F=>e.isRef(s)?s.value=F:null),label:"全选",indeterminate:e.unref(d),onChange:w[1]||(w[1]=F=>g())},null,8,["modelValue","indeterminate"])])):e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",Wa,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(z,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(f).datas,"label-position":e.unref(f).props.labelPosition,"label-width":e.unref(f).props.labelWidth,size:e.unref(f).props.size,"scroll-to-error":"",disabled:o.disabled},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",Ya)):e.createCommentVNode("",!0),e.createVNode(rn,{components:e.unref(f).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"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",Xa)):e.createCommentVNode("",!0)],2)}}}),Ys="",Ka={class:"form-list-wrap"},Za={class:"form-list"},Qa=["onClick"],va=["title"],e1={class:"form-template"},t1={class:"dialog-footer"},o1={class:"left-wrap"},n1={class:"select-count-wrap"},l1={class:"count"},r1={class:"right-wrap"},a1=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(o,{emit:n}){const{clone:t}=de(),l=e.inject("formData"),r=l.value.props.formType==="2"?"试卷":"表单",a=l.value.props.formType==="2"?"题目":"项目",i=e.useModel(o,"modelValue"),s=o,{params:d}=e.toRefs(s),c=e.ref({}),m=e.ref(""),f=e.ref({datas:{},components:[],props:{}});e.onMounted(()=>{var D;(D=d.value.searchParams)!=null&&D.length&&(d.value.searchParams.forEach(S=>{S.default&&(c.value[S.key]=S.default)}),g())});const h=(D,S,P)=>{let B=P==="datetime"?"YYYY-MM-DD HH:mm":P==="date"?"YYYY-MM-DD":"HH:mm";return $e.dayjs(D).format(B)===$e.dayjs(S).format(B)},p=e.ref(d.value.formList),g=D=>{D&&u(D),p.value=t(d.value.formList);const S=Object.keys(c.value);S!=null&&S.length&&S.forEach(P=>{var X;if(!c.value[P])return;const B=(X=d.value.searchParams)==null?void 0:X.find(le=>le.key===P);if(!(B!=null&&B.type))return;const H=B.type;p.value=p.value.filter(le=>{if(!Object.keys(le).includes(B.key))return ce("error",`参数配置错误,【${B.label}】的属性(${B.key})在数据中不存在!`),!1;const he=le[B.key];if(!he)return!0;if([ae.DATETIME,ae.DATE,ae.TIME].includes(H))return h(he,c.value[P],H);if(H===ae.SELECTOR)return String(he)===String(c.value[P]);if(H===ae.CASCADER_SELECTOR){const ue=c.value[P],We=Array.isArray(ue)?ue[ue.length-1]:ue;return String(he)===String(We)}else if(H===ae.INPUT)return String(he).includes(String(c.value[P]));return String(he).includes(String(c.value[P]))})})},u=async D=>{var S,P;if((S=D.clearKeys)!=null&&S.length&&D.clearKeys.forEach(B=>delete c.value[B]),D.updateOptionKey){const B=(P=d.value.searchParams)==null?void 0:P.find(H=>H.key===D.updateOptionKey);B&&[ae.SELECTOR,ae.CASCADER_SELECTOR].includes(B.type)&&B.getOptions&&(B.options=await B.getOptions(c.value[D.key]))}},_=async D=>{m.value!==D&&(m.value=D,f.value={datas:{},components:[],props:{}},d.value.getFormTemplate&&(f.value=await d.value.getFormTemplate(D)))},y=e.ref(new Map),k=e.computed(()=>{let D=0;for(const[,S]of y.value)D+=S.length;return D}),b=D=>{y.value.has(m.value)?D.length?y.value.set(m.value,D):y.value.delete(m.value):y.value.set(m.value,D)},C=()=>{let D=[];for(const[,S]of y.value)S.forEach(P=>{let B=t(P);delete B.selected,D.push(B)});return D},w=e.ref(!1),x=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:l.value.props.formType}}),z=()=>{x.value.components=C(),w.value=!0},F=n,T=()=>{const D=C();F("select",D),i.value=!1};return(D,S)=>{const P=ee,B=e.resolveComponent("el-input"),H=e.resolveComponent("el-option"),X=e.resolveComponent("el-select"),le=e.resolveComponent("el-cascader"),he=e.resolveComponent("el-date-picker"),ue=e.resolveComponent("el-time-picker"),We=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form"),ze=e.resolveComponent("el-divider"),Ct=e.resolveComponent("el-empty"),Ye=Ge,Gt=e.resolveComponent("el-link"),Vt=e.resolveComponent("el-button"),Wt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Wt,{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=Ce=>i.value=Ce),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(a)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",t1,[e.createElementVNode("div",o1,[e.createElementVNode("span",n1,[e.createTextVNode(" 已选 "),e.createElementVNode("span",l1,e.toDisplayString(` ${e.unref(k)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(a)}`),1)]),e.createVNode(Gt,{type:"primary",disabled:e.unref(y).size===0,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(a)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",r1,[e.createVNode(Vt,{onClick:S[0]||(S[0]=Ce=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(Vt,{type:"primary",onClick:T},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var Ce,Xe,Yt;return[e.createElementVNode("div",Ka,[(Ce=e.unref(d).searchParams)!=null&&Ce.length?(e.openBlock(),e.createBlock(Fe,{key:0,model:e.unref(c),class:"search-param-form","label-suffix":":"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d).searchParams,(U,N)=>(e.openBlock(),e.createBlock(We,{key:N,label:U.label},{default:e.withCtx(()=>[U.type===e.unref(ae).INPUT?(e.openBlock(),e.createBlock(B,{key:0,class:"form-name-input",modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`搜索${U.label}`,clearable:"",onChange:V=>g(U)},{append:e.withCtx(()=>[e.createVNode(P,{name:"search",color:"#08c979"})]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).SELECTOR?(e.openBlock(),e.createBlock(X,{key:1,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,clearable:"",onChange:V=>g(U)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.options,(V,L)=>(e.openBlock(),e.createBlock(H,{key:L,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).CASCADER_SELECTOR?(e.openBlock(),e.createBlock(le,{key:2,ref_for:!0,ref:"cascaderRef",class:"cascader-component",modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,options:U.options,"show-all-levels":!1,props:{expandTrigger:"click",emitPath:!1},clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","placeholder","options","onChange"])):e.createCommentVNode("",!0),[e.unref(ae).DATETIME,e.unref(ae).DATE,e.unref(ae)].includes(U.type)?(e.openBlock(),e.createBlock(he,{key:3,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,type:U.type,placeholder:`请选择${U.label}`,"value-format":"YYYY-MM-DD HH:mm",clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","type","placeholder","onChange"])):e.createCommentVNode("",!0),U.type===e.unref(ae).TIME?(e.openBlock(),e.createBlock(ue,{key:4,modelValue:e.unref(c)[U.key],"onUpdate:modelValue":V=>e.unref(c)[U.key]=V,placeholder:`请选择${U.label}`,"value-format":"HH:mm",clearable:"",onChange:V=>g(U)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1},8,["model"])):e.createCommentVNode("",!0),e.createVNode(ze),e.createElementVNode("div",Za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(U,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(m)===U.formID}]),key:N,onClick:V=>_(U.formID)},[e.createVNode(P,{name:e.unref(l).props.formType==="1"?"form":"examination",color:e.unref(y).has(U.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:U.formName},e.toDisplayString(U.formName),9,va)],10,Qa))),128))])]),e.createElementVNode("div",e1,[e.unref(m)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ct,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(Yt=(Xe=e.unref(f))==null?void 0:Xe.components)!=null&&Yt.length?(e.openBlock(),e.createBlock(Ye,{key:1,formData:e.unref(f),selectMode:"",selectComponents:e.unref(y).get(e.unref(m)),onSelect:b},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(Wt,{modelValue:e.unref(w),"onUpdate:modelValue":S[3]||(S[3]=Ce=>e.isRef(w)?w.value=Ce:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(a)}预览`},{footer:e.withCtx(()=>[e.createVNode(Vt,{onClick:S[2]||(S[2]=Ce=>w.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var Ce,Xe;return[(Xe=(Ce=e.unref(x))==null?void 0:Ce.components)!=null&&Xe.length?(e.openBlock(),e.createBlock(Ye,{key:0,formData:e.unref(x)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),Xs="",i1={key:1,class:"tip"},s1=["innerHTML"],jt=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(o,{emit:n}){let t=e.inject("formDesignerData"),l=e.inject("formData"),r=t.selectComponent;const a=e.ref(),i=e.ref(!1),s=e.ref([]),d=e.ref({}),c=e.ref({}),m=()=>{s.value=[],d.value={},c.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(y=>{var k;if(r.id!==y.id){if(y.isLayout&&((k=y.children)!=null&&k.length)){f(y.children);return}y.isEdit&&(s.value.push({label:y.props.label,id:y.id}),d.value[y.id]=h(y.excludeFilterConditions),c.value[y.id]=y.filterConditionProps)}})},h=_=>Object.keys(nt).filter(k=>!_.includes(k)),p=n,g=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,p("result",_))},u=()=>{p("clear")};return(_,y)=>{const k=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:m},[o.clearable&&o.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(u,["stop"])},"x")):e.createCommentVNode("",!0),o.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o.content},null,8,s1)):(e.openBlock(),e.createElementBlock("span",i1,"单击设置条件"))]),e.createVNode(b,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":y[1]||(y[1]=C=>e.isRef(i)?i.value=C:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(k,{onClick:y[0]||(y[0]=C=>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(Je,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(d),conditionProps:e.unref(c),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),Js="",c1=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(o){let t=e.inject("formDesignerData").selectComponent;const l=(a,i)=>{t.props[`${i}Conditions`]=a.filterConditions,t.props[`${i}ConditionContent`]=a.filterConditionContent,t.props[`${i}ConditionExpression`]=a.filterConditionExpression},r=a=>{t.props[`${a}Conditions`]=void 0,t.props[`${a}ConditionContent`]=void 0,t.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.showConditionContent,defaultValue:e.unref(t).props.showConditions,onResult:i[0]||(i[0]=m=>l(m,"show")),onClear:i[1]||(i[1]=m=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.hiddenConditionContent,defaultValue:e.unref(t).props.hiddenConditions,onResult:i[2]||(i[2]=m=>l(m,"hidden")),onClear:i[3]||(i[3]=m=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.readonlyConditionContent,defaultValue:e.unref(t).props.readonlyConditions,onResult:i[4]||(i[4]=m=>l(m,"readonly")),onClear:i[5]||(i[5]=m=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(t).props.statisticsFlag=m)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(jt,{title:`${e.unref(t).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.disabledConditionContent,defaultValue:e.unref(t).props.disabledConditions,onResult:i[7]||(i[7]=m=>l(m,"disabled")),onClear:i[8]||(i[8]=m=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),d1=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},setup(o){const n=e.inject("formData"),t=e.inject("formDesignerData");let l=e.computed(()=>n.value.props.formType),r=t.selectComponent,a=t.selectComponent.rules;r.props.showLabel&&!r.props.labelWidth&&(r.props.labelWidth=n.value.props.labelWidth);const i=()=>{r.props.showConditionContent=void 0,r.props.showConditionExpression=void 0,r.props.showConditions=void 0,r.props.hiddenConditionContent=void 0,r.props.hiddenConditionExpression=void 0,r.props.hiddenConditions=void 0},s=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},d=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},c=h=>{a[0].required=h},m=h=>{a[0].message=h},f=h=>{typeof h.value!="string"&&(r.itemID=h.value),r.id=h.value,r.itemSourceType=h.itemSourceType};return(h,p)=>{const g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-color-picker"),k=e.resolveComponent("el-slider"),b=e.resolveComponent("el-input"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(l)==="1"&&e.unref(r).type!=="label"?(e.openBlock(),e.createBlock(u,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":p[0]||(p[0]=w=>e.unref(r).props.showLabel=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createBlock(u,{key:1,label:e.unref(r).type==="label"?"标签":e.unref(l)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(yo,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":p[1]||(p[1]=w=>e.unref(r).props.label=w),dictionary:o.dictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:f},null,8,["modelValue","dictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(u,{label:e.unref(r).type==="label"?"字体大小":e.unref(l)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.fontSize,"onUpdate:modelValue":p[2]||(p[2]=w=>e.unref(r).props.fontSize=w),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(l)==="1"&&e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(u,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.labelWidth,"onUpdate:modelValue":p[3]||(p[3]=w=>e.unref(r).props.labelWidth=w),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":p[4]||(p[4]=w=>e.unref(r).props.labelNewLine=w)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(u,{label:e.unref(r).type==="label"?"字体加粗":e.unref(l)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":p[5]||(p[5]=w=>e.unref(r).props.isBold=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":p[6]||(p[6]=w=>e.unref(r).props.color=w)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":p[7]||(p[7]=w=>e.unref(r).props.width=w),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.paddingLeft,"onUpdate:modelValue":p[8]||(p[8]=w=>e.unref(r).props.paddingLeft=w),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":p[9]||(p[9]=w=>e.unref(r).props.showFlag=w),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":p[10]||(p[10]=w=>e.unref(r).props.placeholder=w),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(u,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":p[11]||(p[11]=w=>e.unref(r).props.clearable=w)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":p[12]||(p[12]=w=>e.unref(r).props.readonly=w),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:c,modelValue:e.unref(r).props.required,"onUpdate:modelValue":p[13]||(p[13]=w=>e.unref(r).props.required=w)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(b,{onChange:m,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":p[14]||(p[14]=w=>e.unref(r).props.requiredMessage=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":p[15]||(p[15]=w=>e.unref(r).props.disabled=w),onChange:d},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).type!=="label"&&!e.unref(r).isLayout?(e.openBlock(),e.createBlock(u,{key:6,label:e.unref(l)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":p[16]||(p[16]=w=>e.unref(r).props.description=w),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),p1=e.defineComponent({__name:"formPropsEditor",setup(o,{expose:n}){const t=e.inject("formData"),l=e.ref(),r=()=>{t.value.props.formType==="2"&&(t.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await l.value.validate(a)}}),(a,i)=>{const s=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{ref_key:"formRef",ref:l,model:e.unref(t).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(c,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).props.formType=p),onChange:r},{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(c,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).props.formName=p),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(c,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).props.labelPosition=p)},{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(c,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).props.labelWidth=p),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).props.size=p)},{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"])}}}),m1={class:"toolbar"},f1=e.createElementVNode("div",{class:"devices"},null,-1),h1={class:"operates"},u1=e.createElementVNode("span",null,"清空",-1),g1=e.createElementVNode("span",null,"模板导入",-1),_1=e.createElementVNode("span",null,"查看JSON",-1),w1=e.createElementVNode("span",null,"预览",-1),y1=e.createElementVNode("span",null,"保存",-1),b1=e.createElementVNode("span",null,"验证表单",-1),C1=e.createElementVNode("span",null,"重置表单",-1),V1=e.createElementVNode("span",null,"表单数据",-1),an=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(o,{emit:n}){const t=e.inject("formData"),l=n,r=()=>{l("clearComponents")},a=()=>{l("batchAdd")},i=()=>{l("viewFormJson")},s=()=>{l("previewFrom")},d=()=>{l("saveFrom")},c=()=>{l("validateForm")},m=()=>{l("resetForm")},f=()=>{l("viewDataJson")},h=e.ref(!1),p=()=>{h.value=!h.value,l("toggleDescription",h.value)};return(g,u)=>{var b;const _=ee,y=e.resolveComponent("el-button"),k=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",m1,[f1,e.createElementVNode("div",h1,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(k,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(y,{text:"",type:"danger",disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),u1]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(y,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),g1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(y,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),_1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(y,{key:3,text:"",type:"primary",disabled:((b=e.unref(t).components)==null?void 0:b.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),w1]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(y,{key:4,text:"",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),y1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(y,{key:5,text:"",type:"warning",onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),b1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(y,{key:6,text:"",type:"danger",onClick:m},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),C1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(y,{key:7,text:"",type:"primary",onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),V1]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(y,{key:8,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),Ks="",k1={class:"form-designer"},x1={class:"left-wrap"},E1=["onClick","title"],N1={class:"component-name"},B1={key:2,class:"no-component-tip"},D1={key:3,class:"mobile-key"},S1=["title"],M1={key:1,class:"right-wrap"},z1={class:"preview-wrap"},$1={name:"zhy-form-designer"},bt=e.defineComponent({...$1,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(o){const n=o,{getTempID:t,clone:l,stringifyJson:r,isEmpty:a}=de(),i={...kt,...Et,...xt},{formData:s,componentGroups:d,mergeGroup:c,batchAddComponentParams:m}=e.toRefs(n),f=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),p=e.ref([]),g=e.computed(()=>u.value.map(N=>N.expand&&N.name)),u=e.ref([]),_=e.ref(!1),y={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}]}],b=e.computed(()=>{let N=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&N.push("batchAdd"),n.testMode&&N.push("viewFormJson"),n.saveMethod&&N.push("saveFrom"),N});e.onMounted(()=>{x(),C()}),e.watch(()=>f.selectComponent,N=>{if(f.propTab="component",!N){p.value=[];return}p.value=["base"],i[f.selectComponent.type].propEditor&&p.value.push("exclusive")}),e.watch([d,c],()=>{x()},{deep:!0}),e.watch(s,()=>{C()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",f),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType);const C=()=>{f.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?w(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(y,s.value.props):s.value.props=y,_.value=!s.value.props.formName},w=N=>{N.forEach(async V=>{var $;let L=new i[V.type].component;V.name=L.name,V.isEdit=L.isEdit,V.isInput=L.isInput,V.props=Object.assign(L.props,V.props),V.isEdit&&((V.props.required||V.props.pattern)&&(V.rules=L.getRules(V.props)),V.filterConditionProps=await L.getFilterConditionProps(V.props),V.excludeFilterConditions=L.getExcludeFilterConditions()),u.value.forEach(j=>{const se=j.types.findIndex(J=>J!=null&&J.id.includes("temp")?J.type===V.type:(J==null?void 0:J.id)===V.id);se!==-1&&(V.allowRepeat=j.types[se].allowRepeat,V.allowModify=j.types[se].allowModify,z(V,j.types[se],!0),S(se,j))}),V.isLayout&&(($=V==null?void 0:V.children)!=null&&$.length)&&w(V.children)})},x=()=>{var N;if(u.value=[],!((N=d.value)!=null&&N.length)){k.forEach(V=>{u.value.push(F(V))});return}if(n.mergeGroup){k.forEach($=>{let j=$;const se=d.value.find(J=>$.name===J.name);if(se){let J=[];$.components.forEach(v=>{const Ee=se.components.find(ot=>ot.type===v.type);Ee?J.push(Ee):J.push(v)}),j.components=J}u.value.push(F(j))});const V=k.map($=>$.name);d.value.filter($=>!V.includes($.name)).forEach($=>{u.value.push(F($))})}else d.value.forEach(V=>{u.value.push(F(V))})},z=(N,V,L)=>{const $={employee:[{label:"人员1",value:t()}],post:[{label:"部门1",value:t()}],grade:[]};switch(N.type){case"employee":N.props.options=(L?V.props.options:V.options)||$.employee,V.searchEmployeeMethod?N.searchEmployeeMethod=V.searchEmployeeMethod:N.searchEmployeeMethod=j=>[];break;case"post":N.props.options=(L?V.props.options:V.options)||$.post;break;case"grade":N.props.remarkOptions=(L?V.props.remarkOptions:V.options)||$.grade;break}},F=N=>{let V=l(N);return V.types=V.components.map(L=>{var j;let $=new i[L.type].component;return $.allowRepeat=L.allowRepeat===void 0?!0:L.allowRepeat,$.allowModify=L.allowModify===void 0?!0:L.allowModify,z($,L),!((j=L.id)!=null&&j.includes("temp"))&&!a(L.props)&&($.props=Object.assign($.props,L.props),$.id=L.id,$.name=L.name),$}),V.dynamicTypes=l(V.types),V.components=V.components.map(L=>L.type),V},T=(N,V)=>{const L=D(N);s.value.components.push(L);const $=V.types.findIndex(j=>N!=null&&N.id.includes("temp")?j.type===N.type:(j==null?void 0:j.id)===N.id);$!==-1&&S($,V),f.selectComponent=void 0,e.nextTick(()=>f.selectComponent=L)},D=N=>{var $,j;let V=l(N);V.itemSourceType=n.defaultSourceType;let L=new i[N.type].component;return L.isEdit&&(V.filterConditionProps=L.getFilterConditionProps(V.props)),!(($=V.id)!=null&&$.includes("temp"))||(V.id=t(),!((j=V.props.options)!=null&&j.length)||["employee","post"].includes(V.type))||V.props.options.forEach(se=>{se.value=t(),se.itemSourceType=n.defaultSourceType}),V},S=(N,V)=>{V.types[N].allowRepeat||V.types.splice(N,1)},P=N=>{N.allowRepeat||u.value.forEach(V=>{let L=[];V.dynamicTypes.forEach(($,j)=>{V.types.findIndex(J=>$!=null&&$.id.includes("temp")?$.type===J.type:($==null?void 0:$.id)===J.id)!==-1&&L.push(l(V.dynamicTypes[j])),($!=null&&$.id.includes("temp")&&$.type===N.type||($==null?void 0:$.id)===N.id)&&L.push(l(V.dynamicTypes[j]))}),V.types=L})},B=()=>{s.value.components.splice(0,s.value.components.length),f.selectComponent=void 0},H=e.ref(!1),X=()=>{H.value=!0},le=N=>{N!=null&&N.length&&(w(N),N.forEach(V=>s.value.components.push(V)))},he=()=>{Gt.value=r(s.value),Ye.value=!0},ue=e.ref(),We=async()=>{if(n.saveMethod){if(!s.value.components.length){ce("error","未发现需要保存的数据!");return}const N=await Yt();N&&n.saveMethod(N)}},Fe=e.ref(),ze=e.ref(!1),Ct=()=>{ze.value=!0};e.watch(()=>ze.value,()=>{s.value.datas={},s.value.components.forEach(N=>{!s.value.datas[N.id]&&!a(N.props.defaultValue)&&(N.type==="grade"?s.value.datas[N.id]={score:N.props.defaultValue}:s.value.datas[N.id]=N.props.defaultValue)})});const Ye=e.ref(!1),Gt=e.ref(),Vt=async()=>{await Fe.value.validate()?ce("success","通过验证"):ce("error","未通过验证")},Wt=()=>{Fe.value.resetFields()},Ce=()=>{const{data:N,fileList:V}=Fe.value.getDatas();console.log(N,V)},Xe=()=>{Fe.value.toggleDescription()},Yt=async()=>{if(!await ue.value.validate()){ce("error","请将表单属性填写完整!"),f.propTab="form";return}let V=["单选框","多选框","选项","标签","文本框","分组面板"],L=l(s.value);if(L.datas={},U(V,L.components))return L},U=(N,V,L)=>{var j,se;let $=!0;for(let J=0;J<V.length;J++){let v=V[J];if(delete v.isEdit,delete v.isInput,delete v.name,delete v.rules,delete v.excludeFilterConditions,delete v.filterConditionProps,N.find(Ee=>v.props.label.indexOf(Ee)===0)){ce("error",`请将${L?`【${L}】中`:""}第${J+1}个项目的【${v.props.label}】调整为合理描述!`),$=!1;break}if((j=v.props.options)!=null&&j.length){for(let Ee=0;Ee<v.props.options.length;Ee++){let ot=v.props.options[Ee];if(N.find(Xt=>ot.label.indexOf(Xt)===0)){ce("error",`请将【${v.props.label}】的第${Ee+1}个选项的【${ot.label}】调整为合理描述!`),$=!1;break}}if(!$)break}a(V[J].props.defaultValue)&&(V[J].props.defaultValue=void 0),v.isLayout&&((se=v==null?void 0:v.children)!=null&&se.length)&&($=U(N,v.children,v.props.label))}return $};return(N,V)=>{var sn;const L=ee,$=e.resolveComponent("el-collapse-item"),j=e.resolveComponent("el-collapse"),se=e.resolveComponent("el-input"),J=e.resolveComponent("el-form"),v=e.resolveComponent("el-empty"),Ee=e.resolveComponent("el-tab-pane"),ot=e.resolveComponent("el-tabs"),Xt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",k1,[e.createElementVNode("div",x1,[e.createVNode(j,{modelValue:e.unref(g),"onUpdate:modelValue":V[0]||(V[0]=G=>e.isRef(g)?g.value=G:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(G,L1)=>(e.openBlock(),e.createBlock($,{key:L1,title:G.name,name:G.name},{default:e.withCtx(()=>[e.createVNode(e.unref(yt),{list:G.types,"item-key":"type",tag:"div",class:"component-list",clone:Pe=>D(Pe),sort:!1,onRemove:Pe=>S(Pe.oldIndex,G),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Pe})=>[e.createElementVNode("div",{class:"component-item",onClick:vs=>T(Pe,G),title:Pe.name},[e.createVNode(L,{name:Pe.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",N1,e.toDisplayString(Pe.name),1)],8,E1)]),_: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(an,{operates:e.unref(b),onClearComponents:B,onBatchAdd:X,onViewFormJson:he,onPreviewFrom:Ct,onSaveFrom:We},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(f).device])},[e.unref(_)?(e.openBlock(),e.createBlock(se,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":V[1]||(V[1]=G=>e.unref(s).props.formName=G),placeholder:"单击输入标题",onBlur:V[2]||(V[2]=G=>_.value=!1),onKeydown:V[3]||(V[3]=e.withKeys(G=>_.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:V[4]||(V[4]=G=>_.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(sn=e.unref(s).components)!=null&&sn.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",B1,"从左侧拖拽组件")),e.createVNode(J,{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(tn,{components:e.unref(s).components,"onUpdate:components":V[5]||(V[5]=G=>e.unref(s).components=G),onDeleteComponent:P},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(f).device==="mobile"?(e.openBlock(),e.createElementBlock("div",D1)):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:V[6]||(V[6]=G=>h.value=!e.unref(h))},null,10,S1),e.unref(h)?(e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(ot,{class:"prop-tabs",modelValue:e.unref(f).propTab,"onUpdate:modelValue":V[9]||(V[9]=G=>e.unref(f).propTab=G),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ee,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(f).selectComponent?(e.openBlock(),e.createBlock(j,{key:1,modelValue:e.unref(p),"onUpdate:modelValue":V[8]||(V[8]=G=>e.isRef(p)?p.value=G:null)},{default:e.withCtx(()=>[e.createVNode($,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(d1,{dictionary:o.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(f).selectComponent.type].propEditor?(e.openBlock(),e.createBlock($,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(f).selectComponent.type].propEditor),{componentProps:e.unref(f).selectComponent.props,"onUpdate:componentProps":V[7]||(V[7]=G=>e.unref(f).selectComponent.props=G),dictionary:o.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode($,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(c1)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(v,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ee,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(p1,{key:0,ref_key:"formPropsEditorRef",ref:ue},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(N.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(N.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(Xt,{modelValue:e.unref(ze),"onUpdate:modelValue":V[10]||(V[10]=G=>e.isRef(ze)?ze.value=G:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",z1,[e.createVNode(an,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Vt,onResetForm:Wt,onViewDataJson:Ce,onToggleDescription:Xe},null,8,["operates"]),e.createVNode(Ge,{watching:"",ref_key:"rendererForm",ref:Fe,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(f).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Xt,{modelValue:e.unref(Ye),"onUpdate:modelValue":V[11]||(V[11]=G=>e.isRef(Ye)?Ye.value=G:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Gt)),1)]),_:1},8,["modelValue"]),e.unref(H)?(e.openBlock(),e.createBlock(a1,{key:0,modelValue:e.unref(H),"onUpdate:modelValue":V[12]||(V[12]=G=>e.isRef(H)?H.value=G:null),params:e.unref(m),onSelect:le},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),Zs="";bt.install=function(o){o.component(bt.name,bt)},Ge.install=function(o){o.component(Ge.name,Ge)},ee.install=function(o){o.component(ee.name,ee)};const T1=[ee,bt,Ge,Je],I1={install:function(o,n){T1.forEach(t=>{o.component(t.name,t)})}};ne.MessageType=bo,ne.componentType=ae,ne.default=I1,ne.filterConditionTypes=nt,ne.zhyDynamicFilter=Je,ne.zhyFormDesigner=bt,ne.zhyFormRenderer=Ge,ne.zhyIcon=ee,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|