flame-plus 1.5.32 → 1.5.33

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.
@@ -3926,7 +3926,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3926
3926
 
3927
3927
  `,M+="."+O+" { "+c(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+P,"animation-name: "+P])+` }
3928
3928
  `,M+="@-webkit-keyframes "+P+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
3929
- `,M+="@keyframes "+P+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",A(M)}}function p(C){C.className+=" "+a+"_animation_active"}function m(C,x,S){if(C.addEventListener)C.addEventListener(x,S);else if(C.attachEvent)C.attachEvent("on"+x,S);else return e.error("[scroll] Don't know how to add event listeners.")}function g(C,x,S){if(C.removeEventListener)C.removeEventListener(x,S);else if(C.detachEvent)C.detachEvent("on"+x,S);else return e.error("[scroll] Don't know how to remove event listeners.")}function v(C){return o(C).container.childNodes[0].childNodes[0].childNodes[0]}function b(C){return o(C).container.childNodes[0].childNodes[0].childNodes[1]}function y(C,x){var S=o(C).listeners;if(!S.push)throw new Error("Cannot add listener to an element that is not detectable.");o(C).listeners.push(x)}function w(C,x,S){S||(S=x,x=C,C=null),C=C||{};function A(){if(C.debug){var q=Array.prototype.slice.call(arguments);if(q.unshift(r.get(x),"Scroll: "),e.log.apply)e.log.apply(null,q);else for(var me=0;me<q.length;me++)e.log(q[me])}}function P(q){function me(re){var j=re.getRootNode&&re.getRootNode().contains(re);return re===re.ownerDocument.body||re.ownerDocument.body.contains(re)||j}return!me(q)||window.getComputedStyle(q)===null}function O(q){var me=o(q).container.childNodes[0],re=window.getComputedStyle(me);return!re.width||re.width.indexOf("px")===-1}function M(){var q=window.getComputedStyle(x),me={};return me.position=q.position,me.width=x.offsetWidth,me.height=x.offsetHeight,me.top=q.top,me.right=q.right,me.bottom=q.bottom,me.left=q.left,me.widthCSS=q.width,me.heightCSS=q.height,me}function D(){var q=M();o(x).startSize={width:q.width,height:q.height},A("Element start size",o(x).startSize)}function I(){o(x).listeners=[]}function V(){if(A("storeStyle invoked."),!o(x)){A("Aborting because element has been uninstalled");return}var q=M();o(x).style=q}function N(q,me,re){o(q).lastWidth=me,o(q).lastHeight=re}function T(q){return v(q).childNodes[0]}function B(){return 2*i.width+1}function _(){return 2*i.height+1}function R(q){return q+10+B()}function E(q){return q+10+_()}function U(q){return q*2+B()}function Q(q){return q*2+_()}function K(q,me,re){var j=v(q),oe=b(q),Ee=R(me),ie=E(re),ae=U(me),Ye=Q(re);j.scrollLeft=Ee,j.scrollTop=ie,oe.scrollLeft=ae,oe.scrollTop=Ye}function W(){var q=o(x).container;if(!q){q=document.createElement("div"),q.className=a,q.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(x).container=q,p(q),x.appendChild(q);var me=function(){o(x).onRendered&&o(x).onRendered()};m(q,"animationstart",me),o(x).onAnimationStart=me}return q}function Y(){function q(){var ee=o(x).style;if(ee.position==="static"){x.style.setProperty("position","relative",C.important?"important":"");var H=function(Z,se,ye,le){function pe(He){return He.replace(/[^-\d\.]/g,"")}var _e=ye[le];_e!=="auto"&&pe(_e)!=="0"&&(Z.warn("An element that is positioned static has style."+le+"="+_e+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+le+" will be set to 0. Element: ",se),se.style[le]=0)};H(e,x,ee,"top"),H(e,x,ee,"right"),H(e,x,ee,"bottom"),H(e,x,ee,"left")}}function me(ee,H,Z,se){return ee=ee?ee+"px":"0",H=H?H+"px":"0",Z=Z?Z+"px":"0",se=se?se+"px":"0",["left: "+ee,"top: "+H,"right: "+se,"bottom: "+Z]}if(A("Injecting elements"),!o(x)){A("Aborting because element has been uninstalled");return}q();var re=o(x).container;re||(re=W());var j=i.width,oe=i.height,Ee=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),ie=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(me(-(1+j),-(1+oe),-oe,-j))),ae=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),Ye=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),ut=c(["position: absolute","left: 0","top: 0"]),Re=c(["position: absolute","width: 200%","height: 200%"]),lt=document.createElement("div"),ze=document.createElement("div"),tt=document.createElement("div"),Pt=document.createElement("div"),Qe=document.createElement("div"),Vt=document.createElement("div");lt.dir="ltr",lt.style.cssText=Ee,lt.className=a,ze.className=a,ze.style.cssText=ie,tt.style.cssText=ae,Pt.style.cssText=ut,Qe.style.cssText=Ye,Vt.style.cssText=Re,tt.appendChild(Pt),Qe.appendChild(Vt),ze.appendChild(tt),ze.appendChild(Qe),lt.appendChild(ze),re.appendChild(lt);function G(){var ee=o(x);ee&&ee.onExpand?ee.onExpand():A("Aborting expand scroll handler: element has been uninstalled")}function J(){var ee=o(x);ee&&ee.onShrink?ee.onShrink():A("Aborting shrink scroll handler: element has been uninstalled")}m(tt,"scroll",G),m(Qe,"scroll",J),o(x).onExpandScroll=G,o(x).onShrinkScroll=J}function $(){function q(ae,Ye,ut){var Re=T(ae),lt=R(Ye),ze=E(ut);Re.style.setProperty("width",lt+"px",C.important?"important":""),Re.style.setProperty("height",ze+"px",C.important?"important":"")}function me(ae){var Ye=x.offsetWidth,ut=x.offsetHeight,Re=Ye!==o(x).lastWidth||ut!==o(x).lastHeight;A("Storing current size",Ye,ut),N(x,Ye,ut),n.add(0,function(){if(Re){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}if(C.debug){var lt=x.offsetWidth,ze=x.offsetHeight;(lt!==Ye||ze!==ut)&&e.warn(r.get(x),"Scroll: Size changed before updating detector elements.")}q(x,Ye,ut)}}),n.add(1,function(){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}K(x,Ye,ut)}),Re&&ae&&n.add(2,function(){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}ae()})}function re(){return!!o(x).container}function j(){function ae(){return o(x).lastNotifiedWidth===void 0}A("notifyListenersIfNeeded invoked");var Ye=o(x);if(ae()&&Ye.lastWidth===Ye.startSize.width&&Ye.lastHeight===Ye.startSize.height)return A("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(Ye.lastWidth===Ye.lastNotifiedWidth&&Ye.lastHeight===Ye.lastNotifiedHeight)return A("Not notifying: Size already notified");A("Current size not notified, notifying..."),Ye.lastNotifiedWidth=Ye.lastWidth,Ye.lastNotifiedHeight=Ye.lastHeight,gme(o(x).listeners,function(ut){ut(x)})}function oe(){if(A("startanimation triggered."),O(x)){A("Ignoring since element is still unrendered...");return}A("Element rendered.");var ae=v(x),Ye=b(x);(ae.scrollLeft===0||ae.scrollTop===0||Ye.scrollLeft===0||Ye.scrollTop===0)&&(A("Scrollbars out of sync. Updating detector elements..."),me(j))}function Ee(){if(A("Scroll detected."),O(x)){A("Scroll event fired while unrendered. Ignoring...");return}me(j)}if(A("registerListenersAndPositionElements invoked."),!o(x)){A("Aborting because element has been uninstalled");return}o(x).onRendered=oe,o(x).onExpand=Ee,o(x).onShrink=Ee;var ie=o(x).style;q(x,ie.width,ie.height)}function ve(){if(A("finalizeDomMutation invoked."),!o(x)){A("Aborting because element has been uninstalled");return}var q=o(x).style;N(x,q.width,q.height),K(x,q.width,q.height)}function xe(){S(x)}function ge(){A("Installing..."),I(),D(),n.add(0,V),n.add(1,Y),n.add(2,$),n.add(3,ve),n.add(4,xe)}A("Making detectable..."),P(x)?(A("Element is detached"),W(),A("Waiting until element is attached..."),o(x).onRendered=function(){A("Element is now attached"),ge()}):ge()}function k(C){var x=o(C);x&&(x.onExpandScroll&&g(v(C),"scroll",x.onExpandScroll),x.onShrinkScroll&&g(b(C),"scroll",x.onShrinkScroll),x.onAnimationStart&&g(x.container,"animationstart",x.onAnimationStart),x.container&&C.removeChild(x.container))}return{makeDetectable:w,addListener:y,uninstall:k,initDocument:l}},Ug=w5.forEach,bme=ome,yme=rme,xme=ime,wme=sme,Cme=ame,T5=S5,kme=fme,Ru=pme,Sme=mme,jme=vme;function M5(t){return Array.isArray(t)||t.length!==void 0}function N5(t){if(Array.isArray(t))return t;var e=[];return Ug(t,function(n){e.push(n)}),e}function P5(t){return t&&t.nodeType===1}var Eme=function(t){t=t||{};var e;if(t.idHandler)e={get:function(w){return t.idHandler.get(w,!0)},set:t.idHandler.set};else{var n=xme(),o=wme({idGenerator:n,stateHandler:Ru});e=o}var r=t.reporter;if(!r){var i=r===!1;r=Cme(i)}var s=Iu(t,"batchProcessor",kme({reporter:r})),a={};a.callOnAdd=!!Iu(t,"callOnAdd",!0),a.debug=!!Iu(t,"debug",!1);var l=yme(e),c=bme({stateHandler:Ru}),u,h=Iu(t,"strategy","object"),p=Iu(t,"important",!1),m={reporter:r,batchProcessor:s,stateHandler:Ru,idHandler:e,important:p};if(h==="scroll"&&(T5.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),h="object"):T5.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),h="object")),h==="scroll")u=jme(m);else if(h==="object")u=Sme(m);else throw new Error("Invalid strategy name: "+h);var g={};function v(w,k,C){function x(D){var I=l.get(D);Ug(I,function(V){V(D)})}function S(D,I,V){l.add(I,V),D&&V(I)}if(C||(C=k,k=w,w={}),!k)throw new Error("At least one element required.");if(!C)throw new Error("Listener required.");if(P5(k))k=[k];else if(M5(k))k=N5(k);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var A=0,P=Iu(w,"callOnAdd",a.callOnAdd),O=Iu(w,"onReady",function(){}),M=Iu(w,"debug",a.debug);Ug(k,function(D){Ru.getState(D)||(Ru.initState(D),e.set(D));var I=e.get(D);if(M&&r.log("Attaching listener to element",I,D),!c.isDetectable(D)){if(M&&r.log(I,"Not detectable."),c.isBusy(D)){M&&r.log(I,"System busy making it detectable"),S(P,D,C),g[I]=g[I]||[],g[I].push(function(){A++,A===k.length&&O()});return}return M&&r.log(I,"Making detectable..."),c.markBusy(D,!0),u.makeDetectable({debug:M,important:p},D,function(V){if(M&&r.log(I,"onElementDetectable"),Ru.getState(V)){c.markAsDetectable(V),c.markBusy(V,!1),u.addListener(V,x),S(P,V,C);var N=Ru.getState(V);if(N&&N.startSize){var T=V.offsetWidth,B=V.offsetHeight;(N.startSize.width!==T||N.startSize.height!==B)&&x(V)}g[I]&&Ug(g[I],function(_){_()})}else M&&r.log(I,"Element uninstalled before being detectable.");delete g[I],A++,A===k.length&&O()})}M&&r.log(I,"Already detecable, adding listener."),S(P,D,C),A++}),A===k.length&&O()}function b(w){if(!w)return r.error("At least one element is required.");if(P5(w))w=[w];else if(M5(w))w=N5(w);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");Ug(w,function(k){l.removeAllListeners(k),u.uninstall(k),Ru.cleanState(k)})}function y(w){u.initDocument&&u.initDocument(w)}return{listenTo:v,removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:b,initDocument:y}};function Iu(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}const Ame=tme(Eme);function Ome(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map(function(r){r(n)}),(o=t.get("*"))&&o.slice().map(function(r){r(e,n)})}}}function D5(){return typeof window<"u"}const R5=()=>{};function Tme(t,e=R5){if(!D5){e();return}window.addEventListener(t,e)}function Mme(t,e=R5){D5&&window.removeEventListener(t,e)}const Nme={__name:"grid-layout",props:{layout:{type:Array,required:!0},responsiveLayouts:{type:Object,default(){return{}}},colNum:{type:Number,default:12},rowHeight:{type:Number,default:150},maxRows:{type:Number,default:1/0},margin:{type:Array,default(){return[10,10]}},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},preventCollision:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},responsive:{type:Boolean,default:!1},breakpoints:{type:Object,default(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},cols:{type:Object,default(){return{lg:12,md:10,sm:6,xs:4,xxs:2}}},useStyleCursor:{type:Boolean,default:!0},transformScale:{type:Number,default:1}},emits:["update:layout","layout-ready","layout-created","layout-before-mount","layout-mounted","layout-updated","breakpoint-changed"],setup(t,{expose:e,emit:n}){const o=t,r=n,i=Ome(),s={el:void 0,placeholderEl:void 0,placeholder:{},emitter:i};e(s);const a=Ame({strategy:"scroll",callOnAdd:!1}),l=f.reactive({width:null,mergedStyle:{},isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:-1},layout:[],layouts:{},lastBreakpoint:null,originalLayout:null});f.provide("emitter",i),f.provide("gridLayout",{props:o,state:l});function c(){i.on("resizeEvent",b),i.on("dragEvent",v),r("layout-created",o.layout),Tme("resize",m)}c(),f.onBeforeMount(()=>{r("layout-before-mount",l.layout)}),f.onMounted(()=>{r("layout-mounted",l.layout)}),f.onBeforeUnmount(()=>{i.off("resizeEvent",b),i.off("dragEvent",v),Mme("resize",m),a&&s.el&&a.uninstall(s.el)}),f.watch(()=>l.width,async(x,S)=>{i.emit("updateWidth",l.width),p(),S===null&&(await f.nextTick(),r("layout-ready",l.layout))}),f.watch(()=>o.layout,()=>{Xpe(o.layout),l.originalLayout=o.layout,h()},{deep:!0,immediate:!0}),f.watch(()=>o.colNum,()=>{l.colNum=o.colNum,i.emit("setColNum",o.colNum)},{immediate:!0}),f.watch(()=>o.rowHeight,()=>{i.emit("setRowHeight",o.rowHeight)}),f.watch(()=>o.isDraggable,()=>{i.emit("setDraggable",o.isDraggable)}),f.watch(()=>o.isResizable,()=>{i.emit("setResizable",o.isResizable)}),f.watch(()=>o.isBounded,()=>{i.emit("setBounded",o.isBounded)}),f.watch(()=>o.transformScale,()=>{i.emit("setTransformScale",o.transformScale)}),f.watch(()=>o.responsive,()=>{o.responsive||(l.layout=ud(l.originalLayout),i.emit("setColNum",o.colNum)),m()}),f.watch(()=>o.maxRows,()=>{i.emit("setMaxRows",o.maxRows)}),f.watch(()=>o.margin,()=>{p()},{deep:!0});function u(x,S){if((x==null?void 0:x.length)!==(S==null?void 0:S.length))return!0;let A=!1,P=0;for(;P<x.length;){const O=x[P],M=Object.keys(O),D=S[P],I=Object.keys(D),V=[...new Set([...M,...I])];let N=0;for(;N<V.length;){const T=V[N];if(O[T]!==D[T]){A=!0;break}N+=1}if(A)break;P+=1}return A}function h(){if(u(o.layout,l.layout)&&(w(),l.layout=ud(o.layout),Fg(l.layout,o.verticalCompact),i.emit("updateWidth",l.width),p(),u(o.layout,l.layout))){const x=ud(l.layout);r("layout-updated",x),r("update:layout",x)}}function p(){l.mergedStyle={height:g()}}function m(){s.el&&(l.width=s.el.offsetWidth),i.emit("resizeEvent")}function g(){var x;if(!o.autoSize)return;const S=((x=o.margin)==null?void 0:x[1])||0;return`${_pe(l.layout)*(o.rowHeight+S)+S}px`}function v([x,S,A,P,O,M]=[]){let D=u5(l.layout,S);if(D==null&&(D={x:0,y:0}),x==="dragstart"&&!o.verticalCompact&&(l.positionsBeforeDrag=l.layout.reduce((I,{i:V,x:N,y:T})=>({...I,[V]:{x:N,y:T}}),{})),x==="dragmove"||x==="dragstart"?(l.placeholder.x=D.x,l.placeholder.y=D.y,l.placeholder.w=M,l.placeholder.h=O,l.isDragging=!0):l.isDragging=!1,l.layout=ij(l.layout,D,A,P,!0,o.preventCollision),o.restoreOnDrag?(D.static=!0,Fg(l.layout,o.verticalCompact,l.positionsBeforeDrag),D.static=!1):Fg(l.layout,o.verticalCompact),p(),x==="dragend"&&delete l.positionsBeforeDrag,u(o.layout,l.layout)){const I=ud(l.layout);r("layout-updated",I),r("update:layout",I)}}function b([x,S,A,P,O,M]=[]){let D=u5(l.layout,S);D==null&&(D={h:0,w:0});let I;if(o.preventCollision){const V=f5(l.layout,{...D,w:M,h:O}).filter(N=>N.i!==D.i);if(I=V.length>0,I){let N=1/0,T=1/0;V.forEach(B=>{B.x>D.x&&(N=Math.min(N,B.x)),B.y>D.y&&(T=Math.min(T,B.y))}),Number.isFinite(N)&&(D.w=N-D.x),Number.isFinite(T)&&(D.h=T-D.y)}}if(I||(D.w=M,D.h=O),x==="resizestart"||x==="resizemove"?(l.placeholder.x=A,l.placeholder.y=P,l.placeholder.w=D.w,l.placeholder.h=D.h,l.isDragging=!0):l.isDragging=!1,o.responsive&&y(),Fg(l.layout,o.verticalCompact),p(),u(o.layout,l.layout)){const V=ud(l.layout);r("layout-updated",V),r("update:layout",V)}}function y(){const x=Zpe(o.breakpoints,l.width),S=v5(x,o.cols);S!==l.colNum&&(l.colNum=S,l.layout=qpe(l.layout,l.layouts,o.breakpoints,x,S,o.verticalCompact),l.layouts[x]=l.layout,i.emit("setColNum",S)),l.lastBreakpoint!==x&&(l.lastBreakpoint=x,r("breakpoint-changed",x,l.layout))}function w(){l.layouts={...o.responsiveLayouts}}function k(x){!x||x===s.el||(s.el=x,a&&a.listenTo(s.el,()=>{m()}),l.width=s.el.offsetWidth)}function C(x){x&&(s.placeholder=x,s.placeholderEl=x.el)}return(x,S)=>(f.openBlock(),f.createElementBlock("div",{ref:k,class:"vue-grid-layout",style:f.normalizeStyle(l.mergedStyle)},[f.renderSlot(x.$slots,"default",{},void 0,!0),f.withDirectives(f.createVNode(sj,{ref:C,class:"vue-grid-placeholder",x:l.placeholder.x,y:l.placeholder.y,w:l.placeholder.w,h:l.placeholder.h,i:"placeholder"},null,8,["x","y","w","h"]),[[f.vShow,l.isDragging]])],4))}},I5=y5(Nme,[["__scopeId","data-v-a10aee95"]]),Wg=-1;function V5(t){return t!=null}const Pme={class:"form-canvas-area"},Dme={class:"canvas-toolbar"},Rme={class:"canvas-toolbar-actions"},Ime={class:"form-widget-container"},Vme=["onClick"],Bme={class:"module-title-wrap"},Lme={class:"module-title"},Fme={class:"module-header-actions"},zme={class:"module-body"},_me=["data-palette-drop-group"],Ume={key:0,class:"slot-placeholder"},Wme={class:"slot-title"},Hme=["data-palette-drop-form"],Gme=["onClick"],Kme={class:"widget-actions"},Yme={key:0,class:"slot-placeholder slot-placeholder--inner"},Xme={key:1,class:"custom-widget-placeholder"},Jme={class:"custom-widget-name"},Qme={key:2,class:"form-inner"},Zme=["data-palette-drop-form"],qme=["onClick"],$me={class:"widget-actions"},ege={key:0,class:"slot-placeholder slot-placeholder--inner"},tge={key:1,class:"custom-widget-placeholder"},nge={class:"custom-widget-name"},oge={class:"global-buttons-list"},rge={key:1,class:"global-buttons-empty"},ige=f.defineComponent({name:"FormDesignArea"}),sge=f.defineComponent({...ige,props:{layout:{},dropZoneList:{},containerDropList:{},selectedId:{},selectedFormChild:{},selectedGlobalButtonIndex:{},colNum:{},rowHeight:{},getDefaultLabel:{type:Function},getDefaultConfig:{type:Function},getDefaultConfigForChild:{type:Function},buttons:{}},emits:["update:layout","drop-from-palette","inner-layout-updated","grid-widget-capture","select-form-child","clear-selection","open-preview","save","reset","copy-widget","delete-widget","copy-form-child","copy-form-child-to-group","delete-form-child","select-global-button","select-global-buttons-bar","drop-container","drop-container-in-root","auto-compact-inner"],setup(t,{expose:e,emit:n}){const o={flmInput:xl,flmSelect:Kf,flmInputNumber:Uf,flmUpload:pc,flmDatePicker:i2,flmTimePicker:Jf,flmTimeSelect:Qf,flmCascader:zf,flmCheckbox:hc,flmCheckboxGroup:$f,flmColorPicker:_f,flmRadio:Wf,flmRate:Hf,flmRead:Su,flmAlert:mc,flmTime:Gf,flmSlider:Yf,flmSwitch:Xf,flmTransfer:Zf,flmButton:Ff,flmDialog:qf,flmPagination:hg},r=t,i=n,s=f.computed({get:()=>r.layout,set:K=>i("update:layout",K)}),a=".el-button, .el-tag, .form-inner-control-wrap, .custom-widget-placeholder, .vue-resizable-handle, .vue-rtl-resizable-handle, .vue-draggable-handle",l={name:"rootLayout",put:!0,pull:!1};function c(K,W){i("grid-widget-capture",K,W)}let u=0;function h(K){const W=r.layout[K.newIndex];if(!W||W.nodeKind==="group")return;const Y=W.type;if(Y!=="form"&&Y!=="subForm"&&Y!=="groupSlot"){const $=[...r.layout];$.splice(K.newIndex,1),i("update:layout",$);const ve=Date.now();ve-u>2e3&&(u=ve,dt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"));return}i("drop-container-in-root",K.newIndex)}function p(K,W){i("inner-layout-updated",K,W)}function m(K,W){i("select-form-child",K,W)}const g=(K,W)=>{i("delete-widget",K)};function v(K,W){i("copy-form-child",K,W)}function b(K,W){i("delete-form-child",K,W)}const y=f.ref(!1),w=f.ref(""),k=f.ref(null),C=f.computed(()=>{var W;const K=(W=k.value)==null?void 0:W.sourceGroup.i;return r.layout.filter(Y=>Y.type==="group"&&Y.i!==K)});function x(K,W,Y){const $=r.layout.filter(ve=>ve.type==="group"&&ve.i!==K.i);if(!$.length){dt.ElMessage.warning("暂无其他分组可复制");return}k.value={sourceGroup:K,formContainer:W,child:Y},w.value=$[0].i,y.value=!0}function S(){const K=k.value,W=w.value;if(!K||!W)return;const Y=r.layout.find($=>$.i===W);if(!Y){dt.ElMessage.warning("目标分组不存在");return}i("copy-form-child-to-group",K.formContainer,K.child,Y),y.value=!1}function A(){k.value=null,w.value=""}const P=f.computed(()=>V5(r.selectedGlobalButtonIndex));function O(K){i("select-global-button",K)}function M(){i("select-global-buttons-bar")}function D(){const K=r.containerDropList;if(K.filter(Y=>Y.type!=="form"&&Y.type!=="subForm"&&Y.type!=="groupSlot").length>0){K.splice(0,K.length,...K.filter($=>$.type==="form"||$.type==="subForm"||$.type==="groupSlot"));const Y=Date.now();Y-u>2e3&&(u=Y,dt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"))}K.length>0&&i("drop-container")}function I(K){return(K.children||[]).some(W=>W.nodeKind==="form"||W.nodeKind==="subForm")}function V(K){const W=(K.children||[]).find(Y=>Y.nodeKind==="form"||Y.nodeKind==="subForm");W&&i("auto-compact-inner",W)}function N(K){const W=(K.config&&Object.keys(K.config).length?K.config:r.getDefaultConfigForChild(K.type))||{};return K.type==="flmAlert"||K.type==="flmRead"?{...W}:{...W,disabled:!0,readonly:!0,"auto-upload":!1}}function T(K){const W=(K.children||[])[0];return W?W.nodeKind==="slot"?Cr.slot:W.nodeKind==="subForm"?Cr.subForm:Cr.form:"未设置"}function B(K){const W=(K.children||[])[0];return W?W.nodeKind==="slot"?"warning":W.nodeKind==="subForm"?"success":"primary":"info"}const _=f.shallowRef(null);function R(K){if(typeof K.gridW=="number"&&K.gridW>0)return{w:K.gridW,h:K.gridH??1};if(K.kind==="custom")return gg("flmCustom");const W=K.type;return W==="formSlot"?{w:24,h:1}:W==="flmCustom"?gg("flmCustom"):W&&typeof W=="string"?gg(W):{w:8,h:1}}function E(K){for(const W of r.layout)for(const Y of W.children||[])if(Y.i===K&&(Y.nodeKind==="form"||Y.nodeKind==="subForm"))return Y;return null}function U(K){if(!K){_.value=null;return}const W=E(K.formChildId);if(!W){_.value=null;return}const{gridEl:Y,clientX:$,clientY:ve}=WR({to:K.sortableToEl,originalEvent:K.originalEvent,clientX:K.clientX,clientY:K.clientY});if(!Y||$==null||ve==null){_.value=null;return}const{w:xe,h:ge}=R(K.dragged),q=HR(W,Y,$,ve,r.colNum,r.rowHeight,f2,xe,ge,"preview"),me=dfe(Y,q.x,q.y,q.w,q.h,r.colNum,r.rowHeight,f2);if(!me){_.value=null;return}const re=Y.getBoundingClientRect();_.value={position:"fixed",left:`${re.left+me.left}px`,top:`${re.top+me.top}px`,width:`${me.width}px`,height:`${me.height}px`,zIndex:"10020",pointerEvents:"none",boxSizing:"border-box"}}function Q(){_.value=null}return e({updatePaletteDropPreview:U,clearPaletteDropPreview:Q}),(K,W)=>{const Y=f.resolveComponent("el-button"),$=f.resolveComponent("el-tag"),ve=f.resolveComponent("el-icon"),xe=f.resolveComponent("el-tooltip"),ge=f.resolveComponent("el-form-item"),q=f.resolveComponent("el-form"),me=f.resolveComponent("el-radio"),re=f.resolveComponent("el-radio-group"),j=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock("div",Pme,[f.createElementVNode("div",Dme,[W[12]||(W[12]=f.createElementVNode("span",{class:"canvas-title"},"表单设计区",-1)),f.createElementVNode("div",Rme,[f.createVNode(Y,{type:"primary",size:"small",onClick:W[0]||(W[0]=oe=>K.$emit("open-preview"))},{default:f.withCtx(()=>[...W[9]||(W[9]=[f.createTextVNode("预览",-1)])]),_:1}),f.createVNode(Y,{type:"success",size:"small",onClick:W[1]||(W[1]=oe=>K.$emit("save"))},{default:f.withCtx(()=>[...W[10]||(W[10]=[f.createTextVNode("保存",-1)])]),_:1}),f.createVNode(Y,{type:"warning",size:"small",onClick:W[2]||(W[2]=oe=>K.$emit("reset"))},{default:f.withCtx(()=>[...W[11]||(W[11]=[f.createTextVNode("重置",-1)])]),_:1})])]),(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[_.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"flame-fw-grid-drop-preview",style:f.normalizeStyle(_.value)},null,4)):f.createCommentVNode("",!0)])),f.createElementVNode("div",{class:"form-canvas",onClick:W[5]||(W[5]=f.withModifiers(oe=>K.$emit("clear-selection"),["self"]))},[f.createElementVNode("div",Ime,[f.createVNode(f.unref(F2),{modelValue:s.value,"onUpdate:modelValue":W[3]||(W[3]=oe=>s.value=oe),"item-key":"i",group:l,sort:!0,filter:a,"prevent-on-filter":!1,"ghost-class":"ghost",class:"module-list",onAdd:h},{item:f.withCtx(({element:oe})=>[f.createElementVNode("div",{class:f.normalizeClass(["module-wrap",{"grid-widget-wrap--selected":t.selectedId===oe.i}])},[f.createElementVNode("div",{class:"module-header",onClick:Ee=>c(Ee,oe)},[f.createElementVNode("div",Bme,[f.createVNode($,{type:B(oe),size:"small",effect:"light"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(T(oe)),1)]),_:2},1032,["type"]),f.createElementVNode("span",Lme,f.toDisplayString(oe.label||"分组"),1)]),f.createElementVNode("div",Fme,[I(oe)?(f.openBlock(),f.createBlock(Y,{key:0,type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>V(oe),["stop"])},{default:f.withCtx(()=>[...W[13]||(W[13]=[f.createTextVNode(" 自动排序 ",-1)])]),_:1},8,["onClick"])):f.createCommentVNode("",!0),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:Ee=>g(oe)},{default:f.withCtx(()=>[...W[14]||(W[14]=[f.createTextVNode(" 删除分组 ",-1)])]),_:1},8,["onClick"])])],8,Vme),f.createElementVNode("div",zme,[oe.children&&oe.children.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(oe.children||[],Ee=>(f.openBlock(),f.createElementBlock("div",{key:Ee.i,class:"module-body-content"},[Ee.nodeKind==="slot"&&Ee.type==="groupSlot"?(f.openBlock(),f.createElementBlock("div",Ume,[f.createElementVNode("div",Wme,f.toDisplayString(f.unref(Cr).slot),1)])):Ee.nodeKind==="form"?(f.openBlock(),f.createBlock(q,{key:1,class:"form-inner"},{default:f.withCtx(()=>[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":Ee.i},[f.createVNode(f.unref(I5),{layout:Ee.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:ie=>p(ie,Ee)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Ee.children||[],ie=>(f.openBlock(),f.createBlock(f.unref(sj),{key:ie.i,x:ie.x,y:ie.y,w:ie.w,h:ie.h,i:ie.i},{default:f.withCtx(()=>{var ae,Ye,ut,Re;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((ae=t.selectedFormChild)==null?void 0:ae.formId)===oe.i&&((Ye=t.selectedFormChild)==null?void 0:Ye.childId)===ie.i,"form-inner-control-wrap--slot":ie.nodeKind==="slot"}]),onClick:f.withModifiers(lt=>m(oe,ie),["stop"])},[f.createElementVNode("div",Kme,[f.createVNode(xe,{content:"复制至其他分组",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>x(oe,Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.FolderOpened))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(xe,{content:"复制",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>v(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.CopyDocument))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:f.withModifiers(lt=>b(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(ge,{label:ie.nodeKind==="slot"&&ie.type==="formSlot"?"":((ut=ie.formItem)==null?void 0:ut.label)??ie.label??t.getDefaultLabel(ie.type),"label-width":ie.nodeKind==="slot"&&ie.type==="formSlot"?"0":"",required:(Re=ie.formItem)==null?void 0:Re.required,class:"canvas-form-item"},{default:f.withCtx(()=>[ie.nodeKind==="slot"&&ie.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",Yme,[...W[16]||(W[16]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):ie.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",Xme,[f.createElementVNode("span",Jme,f.toDisplayString(ie.label||ie.customComponentName||"自定义组件"),1)])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[ie.type]||xl),{key:2,config:N(ie)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,Gme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Hme)]),_:2},1024)):Ee.nodeKind==="subForm"?(f.openBlock(),f.createElementBlock("div",Qme,[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":Ee.i},[f.createVNode(f.unref(I5),{layout:Ee.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:ie=>p(ie,Ee)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Ee.children||[],ie=>(f.openBlock(),f.createBlock(f.unref(sj),{key:ie.i,x:ie.x,y:ie.y,w:ie.w,h:ie.h,i:ie.i},{default:f.withCtx(()=>{var ae,Ye,ut,Re;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((ae=t.selectedFormChild)==null?void 0:ae.formId)===oe.i&&((Ye=t.selectedFormChild)==null?void 0:Ye.childId)===ie.i,"form-inner-control-wrap--slot":ie.nodeKind==="slot"}]),onClick:f.withModifiers(lt=>m(oe,ie),["stop"])},[f.createElementVNode("div",$me,[f.createVNode(xe,{content:"复制至其他分组",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>x(oe,Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.FolderOpened))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(xe,{content:"复制",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>v(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.CopyDocument))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:f.withModifiers(lt=>b(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(ge,{label:ie.nodeKind==="slot"&&ie.type==="formSlot"?"":((ut=ie.formItem)==null?void 0:ut.label)??ie.label??t.getDefaultLabel(ie.type),"label-width":ie.nodeKind==="slot"&&ie.type==="formSlot"?"0":"",required:(Re=ie.formItem)==null?void 0:Re.required,class:"canvas-form-item"},{default:f.withCtx(()=>[ie.nodeKind==="slot"&&ie.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",ege,[...W[17]||(W[17]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):ie.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",tge,[f.createElementVNode("span",nge,f.toDisplayString(ie.customComponentName||"业务组件"),1),W[18]||(W[18]=f.createElementVNode("span",{class:"custom-widget-hint"},"(运行时渲染)",-1))])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[ie.type]||xl),{key:2,config:N(ie)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,qme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Zme)])):f.createCommentVNode("",!0)]))),128)):(f.openBlock(),f.createElementBlock("div",{key:0,class:"module-inner-drop-zone","data-palette-drop-group":oe.i},[...W[15]||(W[15]=[f.createElementVNode("span",{class:"drop-hint"},"请拖入或右侧选择分组类型",-1)])],8,_me))])],2)]),_:1},8,["modelValue"]),f.createVNode(f.unref(F2),{list:t.containerDropList,"item-key":"id",group:{name:"containers",put:!0},sort:!1,class:"container-drop-zone",onAdd:W[4]||(W[4]=oe=>D())},{item:f.withCtx(({element:oe})=>[(f.openBlock(),f.createElementBlock("span",{key:oe.id}))]),footer:f.withCtx(()=>[...W[19]||(W[19]=[f.createElementVNode("span",{class:"drop-hint"},"拖入容器创建分组",-1)])]),_:1},8,["list"]),f.createElementVNode("div",{class:f.normalizeClass(["global-buttons-bar",{"global-buttons-bar--active":P.value}]),onClick:f.withModifiers(M,["stop"])},[W[20]||(W[20]=f.createElementVNode("span",{class:"global-buttons-label"},"功能按钮:",-1)),f.createElementVNode("div",oge,[r.buttons&&r.buttons.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(r.buttons,(oe,Ee)=>(f.openBlock(),f.createBlock(Y,{key:Ee,type:oe.type||"default",size:"small",onClick:f.withModifiers(ie=>O(Ee),["stop"])},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(oe.text||oe.buttonText||oe.label||"按钮"),1)]),_:2},1032,["type","onClick"]))),128)):(f.openBlock(),f.createElementBlock("span",rge,"点击此区域在右侧添加功能按钮"))])],2)])]),f.createVNode(j,{modelValue:y.value,"onUpdate:modelValue":W[8]||(W[8]=oe=>y.value=oe),title:"复制至其他分组",width:"420px","append-to-body":"",onClosed:A},{footer:f.withCtx(()=>[f.createVNode(Y,{onClick:W[7]||(W[7]=oe=>y.value=!1)},{default:f.withCtx(()=>[...W[21]||(W[21]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(Y,{type:"primary",disabled:!w.value,onClick:S},{default:f.withCtx(()=>[...W[22]||(W[22]=[f.createTextVNode(" 确定 ",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createVNode(q,{"label-width":"88px",size:"small"},{default:f.withCtx(()=>[f.createVNode(ge,{label:"目标分组"},{default:f.withCtx(()=>[f.createVNode(re,{modelValue:w.value,"onUpdate:modelValue":W[6]||(W[6]=oe=>w.value=oe),class:"copy-to-group-radio-group"},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(C.value,oe=>(f.openBlock(),f.createBlock(me,{key:oe.i,value:oe.i},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(oe.label||oe.i),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}),age=wr(sge,[["__scopeId","data-v-fc86fba4"]]),lge={class:"preview-canvas"},cge=f.defineComponent({name:"PreviewDialog"}),uge=f.defineComponent({...cge,props:{modelValue:{type:Boolean},config:{}},emits:["update:modelValue"],setup(t){const e=t,n=f.ref(0);f.watch(()=>e.modelValue,l=>{l||n.value++});const o=f.computed(()=>{const l=e.config||{};return!!(l&&Array.isArray(l.groups)&&l.groups.length)});function r(l){console.log("[PreviewDialog] submit formModel:",l)}function i(l){console.log("[PreviewDialog] cancel formModel:",l)}function s(l){console.log("[PreviewDialog] reset formModel:",l)}function a(l){const c=(l==null?void 0:l.data)??(l==null?void 0:l.payload)??(l==null?void 0:l.formModel);console.log("[PreviewDialog] custom event:",l==null?void 0:l.event,"valid:",l==null?void 0:l.valid,c,l==null?void 0:l.button)}return(l,c)=>{const u=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(u,{"model-value":t.modelValue,title:"表单预览",width:"960px","destroy-on-close":"",class:"preview-dialog","onUpdate:modelValue":c[0]||(c[0]=h=>l.$emit("update:modelValue",h))},{default:f.withCtx(()=>[f.createElementVNode("div",lge,[o.value?(f.openBlock(),f.createBlock(g2,{key:n.value,config:t.config,onSubmit:r,onCancel:i,onReset:s,onCustomEvent:a},null,8,["config"])):f.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),fge=wr(uge,[["__scopeId","data-v-ff02b3af"]]),dge={class:"settings-panel"},hge={key:0,class:"settings-form-wrap"},pge=["onClick","onKeydown"],mge={class:"attr-group__title"},gge={class:"attr-group__body"},vge={key:1,class:"settings-empty"},bge=f.defineComponent({name:"SettingsPanel"}),yge=f.defineComponent({...bge,props:{selectedItem:{},groupsConfig:{}},setup(t){const e=t,n=f.ref({});f.watch(()=>e.groupsConfig,i=>{const s={};i==null||i.forEach(a=>{s[a.name]=n.value[a.name]??a.defaultOpen!==!1}),n.value=s},{immediate:!0});const o=f.computed(()=>{const i=e.groupsConfig||[],s=e.selectedItem;return s?i.filter(a=>!a.visible||a.visible(s)):[]});function r(i){n.value={...n.value,[i]:!n.value[i]}}return(i,s)=>{const a=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",dge,[s[0]||(s[0]=f.createElementVNode("div",{class:"panel-title"},"属性",-1)),t.selectedItem?(f.openBlock(),f.createElementBlock("div",hge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(o.value,l=>(f.openBlock(),f.createElementBlock("div",{key:l.name,class:"attr-group"},[f.createElementVNode("div",{class:"attr-group__header",onClick:c=>r(l.name),role:"button",tabindex:"0",onKeydown:f.withKeys(f.withModifiers(c=>r(l.name),["prevent"]),["enter","space"])},[f.createVNode(a,{class:f.normalizeClass(["attr-group__arrow",{"is-collapsed":!n.value[l.name]}])},{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.ArrowRight))]),_:1},8,["class"]),f.createElementVNode("span",mge,f.toDisplayString(l.title),1)],40,pge),f.withDirectives(f.createElementVNode("div",gge,[f.createVNode(f.unref(dt.ElConfigProvider),{size:"small"},{default:f.withCtx(()=>[f.renderSlot(i.$slots,l.name,{model:t.selectedItem},void 0,!0)]),_:2},1024)],512),[[f.vShow,n.value[l.name]]])]))),128))])):(f.openBlock(),f.createElementBlock("div",vge," 点击设计区中的控件以编辑属性 "))])}}}),xge=wr(yge,[["__scopeId","data-v-20671d90"]]),wge={class:"framework-attr-fields-form"},Cge={key:1,class:"unsupported-hint"},kge=f.defineComponent({name:"FrameworkAttrFieldsForm"}),Sge=f.defineComponent({...kge,props:{fields:{},model:{},formProps:{}},setup(t){const e=t;function n(b,y){return Sp(b,y)}function o(b,y,w){const k=An(w);ZO(b,y,k)}function r(b){if(!b.visible)return!0;try{return b.visible(e.model)}catch{return!0}}const i={input:It.ControlTypes.flmInput,"input-number":It.ControlTypes.flmInputNumber,slider:It.ControlTypes.flmSlider,switch:It.ControlTypes.flmSwitch,select:It.ControlTypes.flmSelect},s=f.reactive({}),a=f.ref(null),l=f.computed(()=>e.fields.filter(r)),c=f.computed(()=>l.value.filter(b=>!i[b.component])),u=f.computed(()=>l.value.filter(b=>i[b.component]).map(b=>{const y=i[b.component],w=b.required===!0;return{prop:b.key,label:b.label,required:w,rules:w?[{required:!0,message:`请填写${b.label}`,trigger:"blur"}]:void 0,controlType:y,controlConfig:{...b.props??{},"model-value":s[b.key]}}})),h=f.computed(()=>({size:It.ElementSize.small,"label-position":"right","label-width":"120px",...e.formProps??{}})),p=f.computed(()=>({...h.value,model:s,items:u.value}));let m=!1;function g(){l.value.forEach(b=>{i[b.component]&&(s[b.key]=n(e.model,b.key))})}function v(){var y;const b=(y=a.value)==null?void 0:y.formModel;b&&l.value.forEach(w=>{if(!i[w.component])return;const k=b[w.key];o(e.model,w.key,k)})}return f.watch(()=>e.model,()=>{m||(m=!0,g(),m=!1)},{deep:!0,immediate:!0}),f.watch(()=>{var b;return(b=a.value)==null?void 0:b.formModel},()=>{m||(m=!0,v(),m=!1)},{deep:!0}),(b,y)=>(f.openBlock(),f.createElementBlock("div",wge,[t.model&&u.value.length?(f.openBlock(),f.createBlock(f.unref(Eu),{key:0,ref_key:"flmFormRef",ref:a,config:p.value,type:"edit"},null,8,["config"])):f.createCommentVNode("",!0),c.value.length?(f.openBlock(),f.createElementBlock("div",Cge,f.toDisplayString(c.value.map(w=>w.component).join("、"))+"(暂不支持,请扩展 `FrameworkAttrFieldsForm` 映射到 `flmForm`) ",1)):f.createCommentVNode("",!0)]))}}),jge=wr(Sge,[["__scopeId","data-v-df322899"]]);function Ege(t,e){return e!=null&&e.length?e.includes(t):!1}function B5(t,e){return!Ege(t,e)}const fi=f.defineComponent({__name:"DetailSettingField",props:{fieldKey:{},disabledConfig:{}},setup(t){const e=t,n=f.useAttrs(),o=f.computed(()=>B5(e.fieldKey,e.disabledConfig));return(r,i)=>{const s=f.resolveComponent("el-form-item");return o.value?(f.openBlock(),f.createBlock(s,f.normalizeProps(f.mergeProps({key:0},f.unref(n))),{default:f.withCtx(()=>[f.renderSlot(r.$slots,"default")]),_:3},16)):f.createCommentVNode("",!0)}}}),Age=[{label:"年",value:"year"},{label:"多年",value:"years"},{label:"月",value:"month"},{label:"多月",value:"months"},{label:"日",value:"date"},{label:"多日",value:"dates"},{label:"日期时间",value:"datetime"},{label:"周",value:"week"},{label:"日期时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"年份范围",value:"yearrange"}];function Oge(t){if(!t)return!1;const e=t.field_code;return e!=null&&String(e).trim()!==""}function Tge(t,e){if(!e||!Oge(t))return[];const n=t==null?void 0:t.type;return n==="flmSlider"?["step"]:n==="flmDatePicker"?["type"]:[]}const Mge={key:3,class:"settings-empty-hint"},Nge={class:"options-editor"},Pge={class:"opt-label-wrap"},Dge={class:"json-options-row"},Rge={class:"json-options-hint"},Ige={class:"options-editor"},Vge={class:"opt-label-wrap"},Bge={class:"options-editor"},Lge={class:"opt-label-wrap"},Fge={key:0,class:"option-label-error"},zge={class:"json-options-row"},_ge={class:"json-options-hint"},Uge={class:"flm-time-format-row"},Wge={class:"flm-time-format-tip-trigger",tabindex:"0",role:"button","aria-label":"时间格式说明"},Hge=wr(f.defineComponent({__name:"DetailSettingsSlot",props:{model:{},inputConfig:{},selectConfig:{},inputNumberConfig:{},datePickerConfig:{},timePickerConfig:{},timeSelectConfig:{},cascaderConfig:{},checkboxConfig:{},checkboxGroupConfig:{},colorPickerConfig:{},radioConfig:{},rateConfig:{},sliderConfig:{},switchConfig:{},transferConfig:{},buttonConfig:{},dialogConfig:{},drawerConfig:{},paginationConfig:{},readConfig:{},alertConfig:{},uploadConfig:{},uploadAcceptTypeOptions:{},timeConfig:{},onFlmTimePresetChange:{type:Function},formPublished:{type:Boolean}},setup(t){const e=f.computed(()=>{const R=n.model;if(!R)return[];const E=R._resolveAttrFields;return typeof E=="function"?E()??[]:R.customAttrFields??[]}),n=t,o=f.computed(()=>{var U;const R=((U=n.model)==null?void 0:U.disabledConfig)??[],E=Tge(n.model,n.formPublished===!0);return[...new Set([...R,...E])]}),r=Age;function i(R){n.inputConfig&&(n.inputConfig.maxlength=R??0)}function s(R){n.inputConfig&&(n.inputConfig.minlength=R??0)}function a(R){n.inputConfig&&(n.inputConfig.autosize=!!R)}function l(R,E){if(E==="step"){R.step=RR(R.step);return}const U=E==="start"?"08:00":"18:00";R[E]=R1(R[E],U)}function c(R,E){R.value=String(E??"")}function u(R){R.options||(R.options=[]);const E=R.options,Q=`选项${E.length+1}`;E.push({label:Q,value:Q})}function h(R,E){if(!R.options)return;R.options.splice(E,1)}function p(R){n.checkboxConfig&&(n.checkboxConfig.label=R)}function m(R,E){R.value=String(E??"")}function g(R,E){R.value=String(E??"")}function v(R){R.items||(R.items=[]);const U=`选项${R.items.length+1}`;R.items.push({label:U,value:U})}function b(R,E){var U;(U=R.items)==null||U.splice(E,1)}function y(R){R.radios||(R.radios=[]);const U=`选项${R.radios.length+1}`;R.radios.push({label:U,value:U})}function w(R,E){var U;(U=R.radios)==null||U.splice(E,1)}function k(R){return R==null||R===""?[]:typeof R!="string"?[]:R.split(/[,,]/).map(E=>E.trim()).filter(Boolean)}const C=f.computed({get(){var R;return k((R=n.uploadConfig)==null?void 0:R.accept)},set(R){const E=n.uploadConfig;E&&(E.accept=Array.isArray(R)&&R.length?R.join(","):"")}}),x=f.computed({get(){var R,E;return((E=(R=n.transferConfig)==null?void 0:R.titles)==null?void 0:E[0])??""},set(R){if(!n.transferConfig)return;const E=n.transferConfig.titles||[];n.transferConfig.titles=[R,E[1]??""]}}),S=f.computed({get(){var R,E;return((E=(R=n.transferConfig)==null?void 0:R.titles)==null?void 0:E[1])??""},set(R){if(!n.transferConfig)return;const E=n.transferConfig.titles||[];n.transferConfig.titles=[E[0]??"",R]}}),A=f.ref([]);f.watch(()=>{const R=n.model;return(R==null?void 0:R.type)!=="flmCascader"||!R.config?null:R.i},R=>{if(!R){A.value=[];return}const E=n.model;if((E==null?void 0:E.type)!=="flmCascader"||!E.config)return;const U=E.config.options;A.value=An(Array.isArray(U)?U:[])},{immediate:!0}),f.watch(A,R=>{const E=n.model;(E==null?void 0:E.type)!=="flmCascader"||!E.config||Array.isArray(R)&&(E.config.options=An(R))},{deep:!0});const P=f.ref([]);f.watch(()=>{const R=n.model;return(R==null?void 0:R.type)!=="flmTransfer"||!R.config?null:R.i},R=>{if(!R){P.value=[];return}const E=n.model;if((E==null?void 0:E.type)!=="flmTransfer"||!E.config)return;const U=E.config.data;P.value=An(Array.isArray(U)?U:[])},{immediate:!0}),f.watch(P,R=>{const E=n.model;(E==null?void 0:E.type)!=="flmTransfer"||!E.config||Array.isArray(R)&&(E.config.data=An(R))},{deep:!0});const O=f.ref(!1),M=f.ref(null),D=f.ref([]),I=f.computed(()=>M.value==="cascader"?"编辑级联选项":"编辑穿梭框选项"),V=f.computed(()=>{const R=A.value;return Array.isArray(R)?R.length?`共 ${R.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"}),N=f.computed(()=>{const R=P.value;return Array.isArray(R)?R.length?`共 ${R.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"});function T(R){M.value=R,D.value=An(R==="cascader"?A.value:P.value),O.value=!0}function B(){const R=D.value;if(!Array.isArray(R)){dt.ElMessage.warning("请配置为 JSON 数组");return}const E=M.value;if(E==="cascader"){const U=An(R);o2(U),A.value=U}else E==="transfer"&&(P.value=MR(An(R)));O.value=!1}function _(){M.value=null}return(R,E)=>{const U=f.resolveComponent("el-input"),Q=f.resolveComponent("el-form-item"),K=f.resolveComponent("el-radio-button"),W=f.resolveComponent("el-radio-group"),Y=f.resolveComponent("el-input-number"),$=f.resolveComponent("el-switch"),ve=f.resolveComponent("el-button"),xe=f.resolveComponent("el-option"),ge=f.resolveComponent("el-select"),q=f.resolveComponent("el-color-picker"),me=f.resolveComponent("el-form"),re=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.model?(f.openBlock(),f.createBlock(me,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[t.model.type==="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.model.customComponentName?(f.openBlock(),f.createBlock(Q,{key:0,label:"业务组件"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.model.customComponentName,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),t.model.customKey?(f.openBlock(),f.createBlock(Q,{key:1,label:"组件键"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.model.customKey,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),e.value.length?(f.openBlock(),f.createBlock(jge,{key:2,fields:e.value,model:t.model},null,8,["fields","model"])):(f.openBlock(),f.createElementBlock("div",Mge,"未配置属性字段(attrFields)"))],64)):t.inputConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(fi,{"field-key":"type","disabled-config":o.value,label:"类型"},{default:f.withCtx(()=>[f.createVNode(W,{modelValue:t.inputConfig.type,"onUpdate:modelValue":E[0]||(E[0]=j=>t.inputConfig.type=j)},{default:f.withCtx(()=>[f.createVNode(K,{value:"text"},{default:f.withCtx(()=>[...E[105]||(E[105]=[f.createTextVNode("单行",-1)])]),_:1}),f.createVNode(K,{value:"textarea"},{default:f.withCtx(()=>[...E[106]||(E[106]=[f.createTextVNode("多行",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"maxlength","disabled-config":o.value,label:"最大长度"},{default:f.withCtx(()=>[f.createVNode(Y,{"model-value":Number(t.inputConfig.maxlength??255),"onUpdate:modelValue":i,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"minlength","disabled-config":o.value,label:"最小长度"},{default:f.withCtx(()=>[f.createVNode(Y,{"model-value":Number(t.inputConfig.minlength??0),"onUpdate:modelValue":s,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"show-word-limit","disabled-config":o.value,label:"显示字数统计"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["show-word-limit"],"onUpdate:modelValue":E[1]||(E[1]=j=>t.inputConfig["show-word-limit"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"show-password","disabled-config":o.value,label:"显示密码"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["show-password"],"onUpdate:modelValue":E[2]||(E[2]=j=>t.inputConfig["show-password"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"readonly","disabled-config":o.value,label:"只读"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig.readonly,"onUpdate:modelValue":E[3]||(E[3]=j=>t.inputConfig.readonly=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(fi,{key:0,"field-key":"rows","disabled-config":o.value,label:"行数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputConfig.rows,"onUpdate:modelValue":E[4]||(E[4]=j=>t.inputConfig.rows=j),min:1,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1},8,["disabled-config"])):f.createCommentVNode("",!0),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(fi,{key:1,"field-key":"autosize","disabled-config":o.value,label:"自动高度"},{default:f.withCtx(()=>[f.createVNode($,{"model-value":!!t.inputConfig.autosize,"onUpdate:modelValue":a},null,8,["model-value"])]),_:1},8,["disabled-config"])):f.createCommentVNode("",!0),f.createVNode(fi,{"field-key":"name","disabled-config":o.value,label:"名称"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.inputConfig.name,"onUpdate:modelValue":E[5]||(E[5]=j=>t.inputConfig.name=j),placeholder:"表单字段名",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"validate-event","disabled-config":o.value,label:"校验事件"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["validate-event"],"onUpdate:modelValue":E[6]||(E[6]=j=>t.inputConfig["validate-event"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):t.selectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Nge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.selectConfig.options||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-select-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Pge,[f.createVNode(U,{modelValue:j.label,"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"])]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>c(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>h(t.selectConfig,Number(oe))},{default:f.withCtx(()=>[...E[107]||(E[107]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[7]||(E[7]=j=>u(t.selectConfig))},{default:f.withCtx(()=>[...E[108]||(E[108]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(fi,{"field-key":"multiple","disabled-config":o.value,label:"是否多选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.selectConfig.multiple,"onUpdate:modelValue":E[8]||(E[8]=j=>t.selectConfig.multiple=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):t.inputNumberConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:3},[f.createVNode(Q,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.min,"onUpdate:modelValue":E[9]||(E[9]=j=>t.inputNumberConfig.min=j),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.max,"onUpdate:modelValue":E[10]||(E[10]=j=>t.inputNumberConfig.max=j),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.step,"onUpdate:modelValue":E[11]||(E[11]=j=>t.inputNumberConfig.step=j),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"precision","disabled-config":o.value,label:"精度"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.precision,"onUpdate:modelValue":E[12]||(E[12]=j=>t.inputNumberConfig.precision=j),min:0,max:20,"controls-position":"right",placeholder:"小数位数"},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"显示控制按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputNumberConfig.controls,"onUpdate:modelValue":E[13]||(E[13]=j=>t.inputNumberConfig.controls=j)},null,8,["modelValue"])]),_:1})],64)):t.datePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:4},[f.createVNode(fi,{"field-key":"type","disabled-config":o.value,label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.datePickerConfig.type,"onUpdate:modelValue":E[14]||(E[14]=j=>t.datePickerConfig.type=j),placeholder:"date",clearable:""},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(r),j=>(f.openBlock(),f.createBlock(xe,{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.datePickerConfig.format,"onUpdate:modelValue":E[15]||(E[15]=j=>t.datePickerConfig.format=j),placeholder:"如 YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.datePickerConfig.editable,"onUpdate:modelValue":E[16]||(E[16]=j=>t.datePickerConfig.editable=j)},null,8,["modelValue"])]),_:1})],64)):t.timePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:5},[f.createVNode(Q,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timePickerConfig.format,"onUpdate:modelValue":E[17]||(E[17]=j=>t.timePickerConfig.format=j),placeholder:"如 HH:mm:ss",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.timePickerConfig.editable,"onUpdate:modelValue":E[18]||(E[18]=j=>t.timePickerConfig.editable=j)},null,8,["modelValue"])]),_:1})],64)):t.timeSelectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:6},[f.createVNode(Q,{label:"开始时间"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.start,"onUpdate:modelValue":E[19]||(E[19]=j=>t.timeSelectConfig.start=j),placeholder:"08:00",clearable:"",onBlur:E[20]||(E[20]=j=>l(t.timeSelectConfig,"start"))},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"结束时间"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.end,"onUpdate:modelValue":E[21]||(E[21]=j=>t.timeSelectConfig.end=j),placeholder:"18:00",clearable:"",onBlur:E[22]||(E[22]=j=>l(t.timeSelectConfig,"end"))},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.step,"onUpdate:modelValue":E[23]||(E[23]=j=>t.timeSelectConfig.step=j),placeholder:"00:30(HH:mm,如 30 表示 30 分钟)",clearable:"",onBlur:E[24]||(E[24]=j=>l(t.timeSelectConfig,"step"))},null,8,["modelValue"])]),_:1})],64)):t.uploadConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:7},[f.createVNode(Q,{label:"上传地址"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.uploadConfig.action,"onUpdate:modelValue":E[25]||(E[25]=j=>t.uploadConfig.action=j),placeholder:"请输入上传接口地址",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"文件字段名"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.uploadConfig.name,"onUpdate:modelValue":E[26]||(E[26]=j=>t.uploadConfig.name=j),placeholder:"默认 file",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"接受类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:C.value,"onUpdate:modelValue":E[27]||(E[27]=j=>C.value=j),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",filterable:"",clearable:"",placeholder:"请选择允许的文件类型,可多选",style:{width:"100%"}},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.uploadAcceptTypeOptions,j=>(f.openBlock(),f.createBlock(xe,{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"列表样式"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.uploadConfig["list-type"],"onUpdate:modelValue":E[28]||(E[28]=j=>t.uploadConfig["list-type"]=j),placeholder:"请选择",clearable:"",style:{width:"100%"}},{default:f.withCtx(()=>[f.createVNode(xe,{label:"文本列表",value:"text"}),f.createVNode(xe,{label:"缩略图列表",value:"picture"}),f.createVNode(xe,{label:"照片墙",value:"picture-card"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"数量限制"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.uploadConfig.limit,"onUpdate:modelValue":E[29]||(E[29]=j=>t.uploadConfig.limit=j),min:1,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"支持多选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.multiple,"onUpdate:modelValue":E[30]||(E[30]=j=>t.uploadConfig.multiple=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"拖拽上传"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.drag,"onUpdate:modelValue":E[31]||(E[31]=j=>t.uploadConfig.drag=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"自动上传"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig["auto-upload"],"onUpdate:modelValue":E[32]||(E[32]=j=>t.uploadConfig["auto-upload"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示文件列表"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig["show-file-list"],"onUpdate:modelValue":E[33]||(E[33]=j=>t.uploadConfig["show-file-list"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.disabled,"onUpdate:modelValue":E[34]||(E[34]=j=>t.uploadConfig.disabled=j)},null,8,["modelValue"])]),_:1})],64)):t.cascaderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:8},[f.createVNode(Q,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.cascaderConfig.filterable,"onUpdate:modelValue":E[35]||(E[35]=j=>t.cascaderConfig.filterable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示完整路径"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.cascaderConfig["show-all-levels"],"onUpdate:modelValue":E[36]||(E[36]=j=>t.cascaderConfig["show-all-levels"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Dge,[f.createElementVNode("span",Rge,f.toDisplayString(V.value),1),f.createVNode(ve,{type:"primary",link:"",onClick:E[37]||(E[37]=j=>T("cascader"))},{default:f.withCtx(()=>[...E[109]||(E[109]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.checkboxConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:9},[f.createVNode(Q,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.checkboxConfig.label,"onUpdate:modelValue":p,placeholder:"选项文本",clearable:""},null,8,["model-value"])]),_:1}),f.createVNode(Q,{label:"真值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.checkboxConfig["true-label"],"onUpdate:modelValue":E[38]||(E[38]=j=>t.checkboxConfig["true-label"]=j),placeholder:"选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"假值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.checkboxConfig["false-label"],"onUpdate:modelValue":E[39]||(E[39]=j=>t.checkboxConfig["false-label"]=j),placeholder:"未选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示边框"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.checkboxConfig.border,"onUpdate:modelValue":E[40]||(E[40]=j=>t.checkboxConfig.border=j)},null,8,["modelValue"])]),_:1})],64)):t.checkboxGroupConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:10},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Ige,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.checkboxGroupConfig.items||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-checkbox-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Vge,[f.createVNode(U,{modelValue:j.label,"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"])]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>m(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>b(t.checkboxGroupConfig,oe)},{default:f.withCtx(()=>[...E[110]||(E[110]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[41]||(E[41]=j=>v(t.checkboxGroupConfig))},{default:f.withCtx(()=>[...E[111]||(E[111]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(Q,{label:"显示全选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.checkboxGroupConfig.hasCheckAll,"onUpdate:modelValue":E[42]||(E[42]=j=>t.checkboxGroupConfig.hasCheckAll=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最少选中"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.checkboxGroupConfig.min,"onUpdate:modelValue":E[43]||(E[43]=j=>t.checkboxGroupConfig.min=j),min:0,step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最多选中"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.checkboxGroupConfig.max,"onUpdate:modelValue":E[44]||(E[44]=j=>t.checkboxGroupConfig.max=j),min:0,step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.checkboxGroupConfig.size,"onUpdate:modelValue":E[45]||(E[45]=j=>t.checkboxGroupConfig.size=j),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xe,{label:"large",value:"large"}),f.createVNode(xe,{label:"default",value:"default"}),f.createVNode(xe,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选中填充色"},{default:f.withCtx(()=>[f.createVNode(q,{modelValue:t.checkboxGroupConfig.fill,"onUpdate:modelValue":E[46]||(E[46]=j=>t.checkboxGroupConfig.fill=j),"show-alpha":""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"文字颜色"},{default:f.withCtx(()=>[f.createVNode(q,{modelValue:t.checkboxGroupConfig["text-color"],"onUpdate:modelValue":E[47]||(E[47]=j=>t.checkboxGroupConfig["text-color"]=j),"show-alpha":""},null,8,["modelValue"])]),_:1})],64)):t.colorPickerConfig?(f.openBlock(),f.createBlock(Q,{key:11,label:"显示透明度"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.colorPickerConfig["show-alpha"],"onUpdate:modelValue":E[48]||(E[48]=j=>t.colorPickerConfig["show-alpha"]=j)},null,8,["modelValue"])]),_:1})):t.radioConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:12},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Bge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.radioConfig.radios||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-radio-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Lge,[f.createVNode(U,{"model-value":String(j.label??""),"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:f.normalizeClass(["opt-label",{"is-radio-label-error":f.unref(TR)(j)}])},null,8,["model-value","onUpdate:modelValue","class"]),f.unref(TR)(j)?(f.openBlock(),f.createElementBlock("span",Fge,"显示文本必填")):f.createCommentVNode("",!0)]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>g(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>w(t.radioConfig,oe)},{default:f.withCtx(()=>[...E[112]||(E[112]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[49]||(E[49]=j=>y(t.radioConfig))},{default:f.withCtx(()=>[...E[113]||(E[113]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(Q,{label:"按钮样式"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.radioConfig.useButton,"onUpdate:modelValue":E[50]||(E[50]=j=>t.radioConfig.useButton=j)},null,8,["modelValue"])]),_:1})],64)):t.rateConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:13},[f.createVNode(Q,{label:"最大分值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.rateConfig.max,"onUpdate:modelValue":E[51]||(E[51]=j=>t.rateConfig.max=j),min:1,max:20,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"允许半选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.rateConfig["allow-half"],"onUpdate:modelValue":E[52]||(E[52]=j=>t.rateConfig["allow-half"]=j)},null,8,["modelValue"])]),_:1})],64)):t.sliderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:14},[f.createVNode(Q,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.min,"onUpdate:modelValue":E[53]||(E[53]=j=>t.sliderConfig.min=j),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.max,"onUpdate:modelValue":E[54]||(E[54]=j=>t.sliderConfig.max=j),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"step","disabled-config":o.value,label:"步长"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.step,"onUpdate:modelValue":E[55]||(E[55]=j=>t.sliderConfig.step=j),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"显示输入框"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.sliderConfig["show-input"],"onUpdate:modelValue":E[56]||(E[56]=j=>t.sliderConfig["show-input"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"范围模式"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.sliderConfig.range,"onUpdate:modelValue":E[57]||(E[57]=j=>t.sliderConfig.range=j)},null,8,["modelValue"])]),_:1})],64)):t.switchConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:15},[f.createVNode(Q,{label:"开启值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["active-value"],"onUpdate:modelValue":E[58]||(E[58]=j=>t.switchConfig["active-value"]=j),placeholder:"1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"关闭值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["inactive-value"],"onUpdate:modelValue":E[59]||(E[59]=j=>t.switchConfig["inactive-value"]=j),placeholder:"0",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"激活文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["active-text"],"onUpdate:modelValue":E[60]||(E[60]=j=>t.switchConfig["active-text"]=j),placeholder:"开",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"未激活文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["inactive-text"],"onUpdate:modelValue":E[61]||(E[61]=j=>t.switchConfig["inactive-text"]=j),placeholder:"关",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.transferConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:16},[f.createVNode(Q,{label:"左侧标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:x.value,"onUpdate:modelValue":E[62]||(E[62]=j=>x.value=j),placeholder:"列表1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"右侧标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:S.value,"onUpdate:modelValue":E[63]||(E[63]=j=>S.value=j),placeholder:"列表2",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.transferConfig.filterable,"onUpdate:modelValue":E[64]||(E[64]=j=>t.transferConfig.filterable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",zge,[f.createElementVNode("span",_ge,f.toDisplayString(N.value),1),f.createVNode(ve,{type:"primary",link:"",onClick:E[65]||(E[65]=j=>T("transfer"))},{default:f.withCtx(()=>[...E[114]||(E[114]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.buttonConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:17},[f.createVNode(Q,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.buttonConfig.buttonText,"onUpdate:modelValue":E[66]||(E[66]=j=>t.buttonConfig.buttonText=j),placeholder:"点击",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.buttonConfig.type,"onUpdate:modelValue":E[67]||(E[67]=j=>t.buttonConfig.type=j),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(xe,{label:"主要",value:"primary"}),f.createVNode(xe,{label:"成功",value:"success"}),f.createVNode(xe,{label:"警告",value:"warning"}),f.createVNode(xe,{label:"危险",value:"danger"}),f.createVNode(xe,{label:"信息",value:"info"}),f.createVNode(xe,{label:"默认",value:"default"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.plain,"onUpdate:modelValue":E[68]||(E[68]=j=>t.buttonConfig.plain=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.round,"onUpdate:modelValue":E[69]||(E[69]=j=>t.buttonConfig.round=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.circle,"onUpdate:modelValue":E[70]||(E[70]=j=>t.buttonConfig.circle=j)},null,8,["modelValue"])]),_:1})],64)):t.dialogConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:18},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.dialogConfig.title,"onUpdate:modelValue":E[71]||(E[71]=j=>t.dialogConfig.title=j),placeholder:"弹窗",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"宽度"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.dialogConfig.width,"onUpdate:modelValue":E[72]||(E[72]=j=>t.dialogConfig.width=j),placeholder:"50% 或 500",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"居中"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig.center,"onUpdate:modelValue":E[73]||(E[73]=j=>t.dialogConfig.center=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可拖拽"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig.draggable,"onUpdate:modelValue":E[74]||(E[74]=j=>t.dialogConfig.draggable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig["close-on-click-modal"],"onUpdate:modelValue":E[75]||(E[75]=j=>t.dialogConfig["close-on-click-modal"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig["show-close"],"onUpdate:modelValue":E[76]||(E[76]=j=>t.dialogConfig["show-close"]=j)},null,8,["modelValue"])]),_:1})],64)):t.drawerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:19},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.drawerConfig.title,"onUpdate:modelValue":E[77]||(E[77]=j=>t.drawerConfig.title=j),placeholder:"抽屉",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"方向"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.drawerConfig.direction,"onUpdate:modelValue":E[78]||(E[78]=j=>t.drawerConfig.direction=j),placeholder:"rtl"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"右",value:"rtl"}),f.createVNode(xe,{label:"左",value:"ltr"}),f.createVNode(xe,{label:"上",value:"ttb"}),f.createVNode(xe,{label:"下",value:"btt"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.drawerConfig.size,"onUpdate:modelValue":E[79]||(E[79]=j=>t.drawerConfig.size=j),placeholder:"30% 或 400px",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.drawerConfig["close-on-click-modal"],"onUpdate:modelValue":E[80]||(E[80]=j=>t.drawerConfig["close-on-click-modal"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.drawerConfig["show-close"],"onUpdate:modelValue":E[81]||(E[81]=j=>t.drawerConfig["show-close"]=j)},null,8,["modelValue"])]),_:1})],64)):t.paginationConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:20},[f.createVNode(Q,{label:"总条数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.paginationConfig.total,"onUpdate:modelValue":E[82]||(E[82]=j=>t.paginationConfig.total=j),min:0,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"每页条数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.paginationConfig["page-size"],"onUpdate:modelValue":E[83]||(E[83]=j=>t.paginationConfig["page-size"]=j),min:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"布局"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.paginationConfig.layout,"onUpdate:modelValue":E[84]||(E[84]=j=>t.paginationConfig.layout=j),placeholder:"total, prev, pager, next",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"小尺寸"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.paginationConfig.small,"onUpdate:modelValue":E[85]||(E[85]=j=>t.paginationConfig.small=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.paginationConfig.background,"onUpdate:modelValue":E[86]||(E[86]=j=>t.paginationConfig.background=j)},null,8,["modelValue"])]),_:1})],64)):t.timeConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:21},[f.createVNode(fi,{"field-key":"formatPreset","disabled-config":o.value,label:"格式预设"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.timeConfig.formatPreset,"onUpdate:modelValue":E[87]||(E[87]=j=>t.timeConfig.formatPreset=j),placeholder:"选择预设",style:{width:"100%"},onChange:t.onFlmTimePresetChange},{default:f.withCtx(()=>[f.createVNode(xe,{label:"当前日期",value:"date"}),f.createVNode(xe,{label:"当前时间",value:"time"}),f.createVNode(xe,{label:"自定义",value:"custom"})]),_:1},8,["modelValue","onChange"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"时间格式"},{default:f.withCtx(()=>[f.createElementVNode("div",Uge,[f.createVNode(U,{modelValue:t.timeConfig.format,"onUpdate:modelValue":E[88]||(E[88]=j=>t.timeConfig.format=j),class:"flm-time-format-row__input",placeholder:"如 YYYY-MM-DD 或 HH:mm:ss",clearable:"",disabled:t.timeConfig.formatPreset!=="custom"},null,8,["modelValue","disabled"]),f.createVNode(f.unref(dt.ElTooltip),{effect:"light",placement:"top-end","show-after":200,trigger:["hover","click"],"popper-class":"flm-time-format-tooltip"},{content:f.withCtx(()=>[...E[115]||(E[115]=[f.createElementVNode("div",null,[f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createTextVNode(" 这里控制"),f.createElementVNode("strong",null,"时间显示成什么文字"),f.createTextVNode(",按从左到右的顺序写「年、月、日、时、分、秒」即可。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"常用写法:")]),f.createElementVNode("ul",{class:"flm-time-format-tooltip__ul"},[f.createElementVNode("li",null,[f.createTextVNode("只要日期:"),f.createElementVNode("code",null,"YYYY-MM-DD"),f.createTextVNode(" → 如 2026-04-02")]),f.createElementVNode("li",null,[f.createTextVNode("只要时刻:"),f.createElementVNode("code",null,"HH:mm:ss"),f.createTextVNode(" → 如 14:30:05")]),f.createElementVNode("li",null,[f.createTextVNode("日期 + 时刻:"),f.createElementVNode("code",null,"YYYY-MM-DD HH:mm:ss")])]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"字母含义:"),f.createTextVNode("Y 表示年,M 月,D 日;H 时,m 分,s 秒(可多段组合在一起)。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"}," 选择「当前日期」或「当前时间」时,下面会自动带出对应格式;选择「自定义」后可以按需要自己改。 ")],-1)])]),default:f.withCtx(()=>[f.createElementVNode("span",Wge,[f.createVNode(f.unref(dt.ElIcon),{size:18,color:"var(--el-text-color-secondary)"},{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.QuestionFilled))]),_:1})])]),_:1})])]),_:1})],64)):t.readConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:22},[f.createVNode(Q,{label:"样式类"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.readConfig.class,"onUpdate:modelValue":E[89]||(E[89]=j=>t.readConfig.class=j),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.readConfig.style,"onUpdate:modelValue":E[90]||(E[90]=j=>t.readConfig.style=j),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.alertConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:23},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.title,"onUpdate:modelValue":E[91]||(E[91]=j=>t.alertConfig.title=j),placeholder:"提示标题",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.type,"onUpdate:modelValue":E[92]||(E[92]=j=>t.alertConfig.type=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"信息",value:"info"}),f.createVNode(xe,{label:"成功",value:"success"}),f.createVNode(xe,{label:"警告",value:"warning"}),f.createVNode(xe,{label:"错误",value:"error"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"描述"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.description,"onUpdate:modelValue":E[93]||(E[93]=j=>t.alertConfig.description=j),type:"textarea",rows:3,placeholder:"辅助说明文字",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"closable","disabled-config":o.value,label:"可关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig.closable,"onUpdate:modelValue":E[94]||(E[94]=j=>t.alertConfig.closable=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"文字居中"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig.center,"onUpdate:modelValue":E[95]||(E[95]=j=>t.alertConfig.center=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示图标"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig["show-icon"],"onUpdate:modelValue":E[96]||(E[96]=j=>t.alertConfig["show-icon"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"主题"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.effect,"onUpdate:modelValue":E[97]||(E[97]=j=>t.alertConfig.effect=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"浅色",value:"light"}),f.createVNode(xe,{label:"深色",value:"dark"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.size,"onUpdate:modelValue":E[98]||(E[98]=j=>t.alertConfig.size=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"迷你",value:"mini"}),f.createVNode(xe,{label:"小",value:"small"}),f.createVNode(xe,{label:"默认",value:"default"}),f.createVNode(xe,{label:"大",value:"large"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"close-text","disabled-config":o.value,label:"关闭按钮文字"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig["close-text"],"onUpdate:modelValue":E[99]||(E[99]=j=>t.alertConfig["close-text"]=j),placeholder:"默认不显示文字",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"class","disabled-config":o.value,label:"样式类"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.class,"onUpdate:modelValue":E[100]||(E[100]=j=>t.alertConfig.class=j),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"style","disabled-config":o.value,label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.style,"onUpdate:modelValue":E[101]||(E[101]=j=>t.alertConfig.style=j),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):f.createCommentVNode("",!0)]),_:1})):f.createCommentVNode("",!0),f.createVNode(re,{modelValue:O.value,"onUpdate:modelValue":E[104]||(E[104]=j=>O.value=j),title:I.value,class:"framework-json-options-dialog",width:"min(92vw, 900px)",top:"5vh","append-to-body":"","destroy-on-close":"",onClosed:_},{footer:f.withCtx(()=>[f.createVNode(ve,{onClick:E[103]||(E[103]=j=>O.value=!1)},{default:f.withCtx(()=>[...E[116]||(E[116]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(ve,{type:"primary",onClick:B},{default:f.withCtx(()=>[...E[117]||(E[117]=[f.createTextVNode("确定",-1)])]),_:1})]),default:f.withCtx(()=>[O.value?(f.openBlock(),f.createBlock(f.unref(e2),{key:0,modelValue:D.value,"onUpdate:modelValue":E[102]||(E[102]=j=>D.value=j),class:"framework-json-editor",height:420,"navigation-bar":!0,"status-bar":!0},null,8,["modelValue"])):f.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__scopeId","data-v-693ed5a1"]]),Gge={class:"options-editor"},Kge=["onClick"],Yge={class:"opt-index"},Xge={class:"opt-summary"},Jge={key:0,class:"global-buttons-slot-hint"},Qge=wr(f.defineComponent({__name:"GlobalButtonsSlot",props:{buttons:{},selectedIndex:{}},emits:["select","remove","add"],setup(t){const e=t,n=f.computed(()=>V5(e.selectedIndex)),o=f.computed(()=>{const r=e.selectedIndex;return r==null||r===Wg?null:e.buttons[r]??null});return(r,i)=>{const s=f.resolveComponent("el-button"),a=f.resolveComponent("el-form-item"),l=f.resolveComponent("el-input"),c=f.resolveComponent("el-option"),u=f.resolveComponent("el-select"),h=f.resolveComponent("el-switch"),p=f.resolveComponent("el-form");return n.value?(f.openBlock(),f.createBlock(p,{key:0,size:"small","label-position":"right","label-width":"100px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(a,{label:"按钮组"},{default:f.withCtx(()=>[f.createElementVNode("div",Gge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.buttons,(m,g)=>(f.openBlock(),f.createElementBlock("div",{key:g,class:f.normalizeClass(["option-row option-row--buttons",{"option-row--active":t.selectedIndex===g}]),onClick:v=>r.$emit("select",g)},[f.createElementVNode("span",Yge,"#"+f.toDisplayString(g+1),1),f.createElementVNode("span",Xge,f.toDisplayString(m.event||"(未命名事件)")+" / "+f.toDisplayString(m.buttonText??"按钮"),1),f.createVNode(s,{type:"danger",link:"",size:"small",onClick:f.withModifiers(v=>r.$emit("remove",g),["stop"])},{default:f.withCtx(()=>[...i[17]||(i[17]=[f.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])],10,Kge))),128)),f.createVNode(s,{type:"primary",link:"",size:"small",onClick:i[0]||(i[0]=m=>r.$emit("add"))},{default:f.withCtx(()=>[...i[18]||(i[18]=[f.createTextVNode(" + 新增按钮 ",-1)])]),_:1}),t.buttons.length?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("p",Jge," 暂无功能按钮,请点击上方「新增按钮」 "))])]),_:1}),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(a,{label:"按钮事件"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.event,"onUpdate:modelValue":i[1]||(i[1]=m=>o.value.event=m),placeholder:"与业务监听一致的事件名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.buttonText,"onUpdate:modelValue":i[2]||(i[2]=m=>o.value.buttonText=m),placeholder:"按钮文本",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value.type,"onUpdate:modelValue":i[3]||(i[3]=m=>o.value.type=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"默认",value:"default"}),f.createVNode(c,{label:"主要",value:"primary"}),f.createVNode(c,{label:"成功",value:"success"}),f.createVNode(c,{label:"警告",value:"warning"}),f.createVNode(c,{label:"危险",value:"danger"}),f.createVNode(c,{label:"信息",value:"info"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value.size,"onUpdate:modelValue":i[4]||(i[4]=m=>o.value.size=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"大",value:"large"}),f.createVNode(c,{label:"默认",value:"default"}),f.createVNode(c,{label:"小",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.plain,"onUpdate:modelValue":i[5]||(i[5]=m=>o.value.plain=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.bg,"onUpdate:modelValue":i[6]||(i[6]=m=>o.value.bg=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"链接样式"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.link,"onUpdate:modelValue":i[7]||(i[7]=m=>o.value.link=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.round,"onUpdate:modelValue":i[8]||(i[8]=m=>o.value.round=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.circle,"onUpdate:modelValue":i[9]||(i[9]=m=>o.value.circle=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"加载中"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.loading,"onUpdate:modelValue":i[10]||(i[10]=m=>o.value.loading=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"加载图标"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value["loading-icon"],"onUpdate:modelValue":i[11]||(i[11]=m=>o.value["loading-icon"]=m),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.disabled,"onUpdate:modelValue":i[12]||(i[12]=m=>o.value.disabled=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"图标"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.icon,"onUpdate:modelValue":i[13]||(i[13]=m=>o.value.icon=m),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"自动聚焦"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.autofocus,"onUpdate:modelValue":i[14]||(i[14]=m=>o.value.autofocus=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"原生类型"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value["native-type"],"onUpdate:modelValue":i[15]||(i[15]=m=>o.value["native-type"]=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"普通",value:"button"}),f.createVNode(c,{label:"提交",value:"submit"}),f.createVNode(c,{label:"重置",value:"reset"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"自动插入空格"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value["auto-insert-space"],"onUpdate:modelValue":i[16]||(i[16]=m=>o.value["auto-insert-space"]=m)},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)]),_:1})):f.createCommentVNode("",!0)}}}),[["__scopeId","data-v-00f0bf6e"]]),Zge="^1(?:3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$",qge="^0\\d{2,3}-?\\d{7,8}(-\\d{1,6})?$",$ge="^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",eve="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",tve="^\\d{6}$",Hg={mobile:"请填写正确手机号",landline:"请填写正确固话",idCard:"请填写正确身份证号",email:"请填写正确邮箱",postal:"请填写正确邮政编码"},L5={required:"必填",mobile:"手机号",landline:"固话",idCard:"身份证号",email:"邮箱",postal:"邮政编码"};function lj(t){return t==="required"||t==="mobile"||t==="landline"||t==="idCard"||t==="email"||t==="postal"}function nve(t){switch(t){case"mobile":return Zge;case"landline":return qge;case"idCard":return $ge;case"email":return eve;case"postal":return tve;default:return"^.*$"}}const ove={class:"fi-rules-editor"},rve={key:0,class:"fi-rules-list"},ive=["title"],sve={class:"fi-rules-dialog-body"},ave=f.defineComponent({name:"FormItemRulesEditor"}),lve=f.defineComponent({...ave,props:{formItem:{}},setup(t){const e=t,n=f.ref(!1),o=f.ref(""),r=f.ref(""),i=f.computed(()=>u(o.value));function s(){o.value="",r.value=""}function a(v){const b=v.ruleKind;return b&&lj(b)?L5[b]:v.required===!0?"必填":"规则"}function l(){const v=e.formItem.rules||[];e.formItem.required=v.some(b=>b.required===!0)}function c(){return`请填写${(e.formItem.label||"").trim()||"该项"}`}function u(v){return v==="required"?c():v==="mobile"?Hg.mobile:v==="landline"?Hg.landline:v==="idCard"?Hg.idCard:v==="email"?Hg.email:v==="postal"?Hg.postal:""}function h(v){const b=e.formItem.rules||[];return v==="required"?b.some(y=>y.required===!0||y.ruleKind==="required"):b.some(y=>y.ruleKind===v)}function p(){s(),n.value=!0}function m(){const v=o.value;if(!v||!lj(v)){n.value=!1;return}if(e.formItem.rules||(e.formItem.rules=[]),h(v)){dt.ElMessage.warning(`已存在「${L5[v]}」规则,请勿重复添加`),n.value=!1;return}const b=(r.value||"").trim()||u(v);if(v==="required")e.formItem.rules.push({required:!0,message:b,trigger:"blur",ruleKind:"required"}),l();else{const y=v;e.formItem.rules.push({pattern:nve(y),message:b,trigger:"blur",ruleKind:v})}n.value=!1}function g(v){var b,y;(b=e.formItem.rules)==null||b.splice(v,1),((y=e.formItem.rules)==null?void 0:y.length)===0&&delete e.formItem.rules,l()}return f.watch(()=>e.formItem.rules,()=>l(),{deep:!0}),f.watch(o,v=>{v&&lj(v)?r.value=u(v):r.value=""}),l(),(v,b)=>{const y=f.resolveComponent("el-tag"),w=f.resolveComponent("el-button"),k=f.resolveComponent("el-option"),C=f.resolveComponent("el-select"),x=f.resolveComponent("el-input"),S=f.resolveComponent("el-dialog"),A=f.resolveComponent("el-form-item");return f.openBlock(),f.createBlock(A,{label:"校验规则"},{default:f.withCtx(()=>[f.createElementVNode("div",ove,[(t.formItem.rules||[]).length?(f.openBlock(),f.createElementBlock("div",rve,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.formItem.rules,(P,O)=>(f.openBlock(),f.createElementBlock("div",{key:O,class:"fi-rules-row"},[f.createVNode(y,{size:"small",type:"info"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a(P)),1)]),_:2},1024),f.createElementVNode("span",{class:"fi-rules-msg",title:P.message},f.toDisplayString(P.message||"—"),9,ive),f.createVNode(w,{type:"danger",link:"",size:"small",onClick:M=>g(O)},{default:f.withCtx(()=>[...b[4]||(b[4]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128))])):f.createCommentVNode("",!0),f.createVNode(w,{type:"primary",link:"",size:"small",onClick:p},{default:f.withCtx(()=>[...b[5]||(b[5]=[f.createTextVNode("+ 添加规则",-1)])]),_:1})]),f.createVNode(S,{modelValue:n.value,"onUpdate:modelValue":b[3]||(b[3]=P=>n.value=P),title:"添加校验规则",width:"420px","append-to-body":"","destroy-on-close":"",onClosed:s},{footer:f.withCtx(()=>[f.createVNode(w,{onClick:b[2]||(b[2]=P=>n.value=!1)},{default:f.withCtx(()=>[...b[8]||(b[8]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(w,{type:"primary",disabled:!o.value,onClick:m},{default:f.withCtx(()=>[...b[9]||(b[9]=[f.createTextVNode("确定",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createElementVNode("div",sve,[b[7]||(b[7]=f.createElementVNode("div",{class:"fi-rules-dialog-hint"},"请选择校验类型",-1)),f.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=P=>o.value=P),placeholder:"请选择校验类型",clearable:"",class:"fi-rules-type-select"},{default:f.withCtx(()=>[f.createVNode(k,{label:"必填",value:"required"}),f.createVNode(k,{label:"手机号",value:"mobile"}),f.createVNode(k,{label:"固话",value:"landline"}),f.createVNode(k,{label:"身份证号",value:"idCard"}),f.createVNode(k,{label:"邮箱",value:"email"}),f.createVNode(k,{label:"邮政编码",value:"postal"})]),_:1},8,["modelValue"]),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[b[6]||(b[6]=f.createElementVNode("div",{class:"fi-rules-dialog-hint fi-rules-msg-label"},"错误提示",-1)),f.createVNode(x,{modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=P=>r.value=P),type:"textarea",rows:2,placeholder:i.value,maxlength:"200","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"])],64)):f.createCommentVNode("",!0)])]),_:1},8,["modelValue"])]),_:1})}}}),F5=wr(lve,[["__scopeId","data-v-1dd5eb69"]]);function cve(t){const e=t==null?void 0:t.type;return(t==null?void 0:t.nodeKind)==="slot"||e==="groupSlot"||e==="formSlot"?[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]},{name:"slotConfig",title:"自定义分组",defaultOpen:!0,fields:[]}]:e==="globalButton"?[{name:"globalButtons",title:"功能按钮",defaultOpen:!0,visible:()=>!0,fields:[]}]:["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmUpload","flmCascader","flmCheckbox","flmCheckboxGroup","flmColorPicker","flmRadio","flmRate","flmRead","flmAlert","flmTime","flmSlider","flmSwitch","flmTransfer","flmButton","flmDialog","flmDrawer","flmPagination","flmCustom"].includes(e||"")?[{name:"baseSettings",title:"基础设置",defaultOpen:!0,fields:[]},{name:"detailSettings",title:"详细设置",defaultOpen:!0,fields:[]}]:[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]}]}function z5(t){const e=[];return t.forEach(n=>{var r;if(n.type!=="group")return;const o=(r=n.children)==null?void 0:r[0];o&&(o.nodeKind==="form"?e.push({groupTitle:n.label||n.i||"分组",container:o,containerKind:"form"}):o.nodeKind==="subForm"&&e.push({groupTitle:n.label||n.i||"分组",container:o,containerKind:"subForm"}))}),e}function uve(t,e){return z5(t).length?e.length?null:"动态表单至少需要一个功能按钮,请在底部功能按钮区添加":`动态表单至少需要一个${Cr.form}或${Cr.subForm},请先新增分组并选择「${Cr.form}」或「${Cr.subForm}」类型`}function fve(t){const e=z5(t);for(const{groupTitle:n,container:o,containerKind:r}of e)if((o.children||[]).filter(s=>s.nodeKind==="control").length<1){const s=r==="subForm"?Cr.subForm:Cr.form;return`分组「${n}」中的${s}至少需要一个组件,请从左侧拖入控件`}return null}function _5(t){var e;return((e=t.formItem)==null?void 0:e.label)||t.label||t.i||"未命名控件"}function dve(t,e){if(!t.visible)return!0;try{return t.visible(e)}catch{return!0}}function hve(t,e){return e==null?!0:t==="switch"||t==="input-number"||t==="slider"?!1:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:!1}function pve(t,e){const n=t==null?void 0:t.rules;if(!(n!=null&&n.length))return null;for(let o=0;o<n.length;o+=1){const r=n[o],i=typeof r.message=="string"?r.message.trim():"";if(!i)return`控件「${e}」的校验规则第 ${o+1} 条须填写错误提示`;const s=r.pattern;if(s!=null&&String(s).trim()==="")return`控件「${e}」的校验规则第 ${o+1} 条格式无效`;if(r.required===!0&&!i)return`控件「${e}」的必填校验须填写错误提示`}return null}const mve={flmSelect:"下拉选择",flmRadio:"单选框",flmCheckboxGroup:"多选框"};function gve(t){const e=t.config;return e?t.type==="flmSelect"?Array.isArray(e.options)?e.options.length:0:t.type==="flmRadio"?Array.isArray(e.radios)?e.radios.length:0:t.type==="flmCheckboxGroup"?Array.isArray(e.items)?e.items.length:0:null:null}function vve(t,e){const n=gve(t);if(n===null||n>=1)return null;const o=_5(t),r=mve[t.type]??"控件";return`分组「${e}」中的${r}「${o}」须至少添加一个选项`}function bve(t,e){var i;const n=_5(t),o=typeof t.i=="string"?t.i.trim():"";if(!o)return`分组「${e}」中控件「${n}」的标识为空,请在属性区填写`;const r=vve(t,e);if(r)return r;if(t.nodeKind==="control"&&t.formItem){const s=typeof t.formItem.label=="string"?t.formItem.label.trim():"";if(!s)return`分组「${e}」中控件「${o}」的标签为空,请在属性区填写`;const a=pve(t.formItem,s||n);if(a)return a}if(t.type==="flmCustom"&&((i=t.customAttrFields)!=null&&i.length)){const s=t;for(const a of t.customAttrFields){if(!a.required||!dve(a,s))continue;const l=Sp(s,a.key);if(hve(a.component,l)){const c=t.customComponentName||t.customKey||"业务组件";return`分组「${e}」中${c}「${n}」的属性「${a.label}」为必填,请在详细设置中补全`}}}return null}function yve(t){var o,r;const e=(o=t.children)==null?void 0:o[0];return!e||e.nodeKind!=="slot"||(typeof((r=e.config)==null?void 0:r.slotName)=="string"?e.config.slotName.trim():"")?null:`分组「${t.label||t.i||"分组"}」的插槽名称(slotName)未填写,请在属性区补全`}function xve(t){for(let e=0;e<t.length;e+=1){const n=t[e],o=typeof n.event=="string"?n.event.trim():"";if(!o)return`功能按钮 #${e+1} 的按钮事件未填写,请在属性区补全`;if(!(typeof n.buttonText=="string"?n.buttonText.trim():typeof n.text=="string"?String(n.text).trim():""))return`功能按钮「${o}」的按钮文案未填写,请在属性区补全`}return null}function wve(t,e){var o;for(const r of t){if(r.type!=="group")continue;const i=typeof r.i=="string"?r.i.trim():"",s=r.label||r.i||"分组";if(!i)return`分组「${s}」的标识为空,请在属性区填写`;const a=yve(r);if(a)return a;const l=(o=r.children)==null?void 0:o[0];if((l==null?void 0:l.nodeKind)==="form"||(l==null?void 0:l.nodeKind)==="subForm")for(const c of l.children||[]){if(c.nodeKind!=="control")continue;const u=bve(c,s);if(u)return u}}const n=xve(e);return n||null}function Cve(t,e){return uve(t,e)??fve(t)??wve(t,e)}function kve(t,e){const n=Cve(t,e);return n?[n]:[]}function Sve(t,e){function n(l,c){if(!l||typeof l!="object")return{};const u=An(l);return c?NR(u,c):u}function o(){return kve(t.value,e.value)}function r(l,c,u){const h=l==null?void 0:l.prop;return h!=null&&String(h).trim()!==""?String(h):`ctrl_${c}_${u}_${Date.now()}`}function i(l){return l.customAttrFields??l.custom_attr_fields}function s(){const l=[],c=[...e.value];return t.value.forEach(u=>{var y;if(u.type!=="group"||!u.children||!u.children.length)return;const h=Rl(u.children,w=>w.nodeKind==="form"||w.nodeKind==="subForm");if(!h)return;const p=h.nodeKind==="subForm",m=h.config||{},g=(h.children||[]).map(w=>{var S,A;const k=w.formItem||{},C=Cfe(w),x={prop:k.prop||w.i,label:k.label??w.label,required:k.required===!0||Array.isArray(k.rules)&&k.rules.some(P=>(P==null?void 0:P.required)===!0),rules:k.rules,"show-message":k.showMessage,"inline-message":k.inlineMessage,size:k.size,gridX:w.x,gridY:w.y,gridW:w.w,gridH:w.h,controlType:C,controlConfig:n(w.config,C)};return w.type==="flmCustom"&&(w.customKey&&(x.customKey=w.customKey),w.customComponentName&&(x.customComponentName=w.customComponentName),(S=w.customAttrFields)!=null&&S.length&&(x.customAttrFields=An(w.customAttrFields))),w.paletteKey&&(x.paletteKey=w.paletteKey),(A=w.disabledConfig)!=null&&A.length&&(x.disabledConfig=An(w.disabledConfig)),w.field_code!=null&&String(w.field_code).trim()!==""&&(x.field_code=String(w.field_code).trim()),k.labelWidth!=null&&(x["label-width"]=k.labelWidth),x}),v=Pp(m||{},["buttons","items"]),b={id:u.i,title:u.label||"表单分组",type:p?"subForm":"form",groupName:u.label,groupProp:((y=u.config)==null?void 0:y.groupProp)??u.i,items:g,...v};g.length&&b.gridColumns==null&&(b.gridColumns=24),l.push(b)}),{groups:l,buttons:c}}function a(l){const c=[],u=l==null?void 0:l.groups;return(Array.isArray(u)?u:[]).forEach((p,m)=>{const g=(p==null?void 0:p.id)!=null&&String(p.id).trim()!==""?String(p.id):(p==null?void 0:p.groupProp)!=null&&String(p.groupProp).trim()!==""?String(p.groupProp):`group_${m}`,v=p.items,b=Pp(p,["id","title","type","groupName","groupProp","items","buttons"]),y={i:`${g}_form`,x:0,y:0,w:24,h:1,type:p.type==="subForm"?"flmSubForm":"flmForm",label:p.type==="subForm"?Cr.subForm:Cr.form,nodeKind:p.type==="subForm"?"subForm":"form",config:{...b,items:[]},children:[]},w=v??[];y.children=w.map((C,x)=>{const S={label:C.label,prop:C.prop,required:C.required===!0||Array.isArray(C.rules)&&C.rules.some(R=>(R==null?void 0:R.required)===!0),rules:C.rules,showMessage:C["show-message"],inlineMessage:C["inline-message"],size:C.size};C["label-width"]!=null&&(S.labelWidth=C["label-width"]);const A=r(C,g,x),P=kfe(C),O=i(C),M=P.layoutType,D=C.controlType??C.control_type,I=D!=null&&String(D).trim()!==""?String(D).trim():M,V=(C.controlConfig??C.control_config)||{},N={i:A,x:C.gridX??0,y:C.gridY??0,w:C.gridW??8,h:C.gridH??1,type:M,label:C.label,config:NR(An(typeof V=="object"&&V!==null?V:{}),I),formItem:{...S,prop:A},nodeKind:"control"};if(M==="flmCustom"){P.customKey&&(N.customKey=P.customKey),P.customComponentName&&(N.customComponentName=P.customComponentName);const R=Array.isArray(O)?O:[];R.length&&(N.customAttrFields=An(R))}const T=C.paletteKey??C.palette_key;T!=null&&String(T).trim()!==""&&(N.paletteKey=String(T));const B=C.disabledConfig??C.disabled_config;Array.isArray(B)&&B.length&&(N.disabledConfig=An(B));const _=C.field_code;return _!=null&&String(_).trim()!==""&&(N.field_code=String(_).trim()),N});const k={i:g,x:0,y:m,w:24,h:1,type:"group",label:p.title||p.groupName||"分组",config:{groupProp:p.groupProp},nodeKind:"group",children:[y]};k.groupProp=p.groupProp,c.push(k)}),c}return{buildFrameworkConfig:s,validateLayoutBeforeSave:o,parseConfigToLayout:a,snapshotControlConfig:n}}let U5=0;function Ss(){return`widget_${++U5}_${Date.now()}`}function cj(){return`group_${++U5}_${Date.now()}`}const up={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}};function jve(t,e,n,o){function r(p){var v;if(!p||!((v=p.children)!=null&&v.length))return"form";const g=p.children[0].nodeKind;return g==="subForm"?"subForm":g==="slot"?"slot":"form"}function i(p){const m={x:0,y:0,w:p==="slot"?ts:8,h:1};if(p==="slot")return{i:Ss(),x:m.x,y:m.y,w:m.w,h:1,type:"groupSlot",label:Cr.slot,nodeKind:"slot",config:{slotName:""}};if(p==="subForm")return{i:Ss(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmSubForm",label:Cr.subForm,nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};const g=_1("flmForm"),v=Pp(g||{},["buttons"]);return{i:Ss(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmForm",label:Cr.form,nodeKind:"form",config:v,children:[]}}function s(p,m){p.children=[i(m)],n.value=null}function a(p,m){var v;const g=(v=p.children)==null?void 0:v[0];if(!g){s(p,m);return}if(g.nodeKind==="slot"){s(p,m);return}if(g.nodeKind=m,g.type=m==="subForm"?"flmSubForm":"flmForm",g.label=m==="subForm"?Cr.subForm:Cr.form,Array.isArray(g.children)||(g.children=[]),(!g.config||typeof g.config!="object")&&(g.config={}),m==="subForm"){const b=g.config;Array.isArray(b.items)||(b.items=[]),b.gridColumns==null&&(b.gridColumns=24),b.addButtonText==null&&(b.addButtonText="新增一行"),b.defaultGenerateOne==null&&(b.defaultGenerateOne=!1)}}function l(p,m){if(!(!p||p.type!=="group"||r(p)===m)){if(m==="slot"){dt.ElMessageBox.confirm("切换至插槽将清空当前分组内容,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{s(p,m)}).catch(()=>{});return}a(p,m)}}function c(p){const m=L1(t.value),g=cj(),v=i(p),b={i:g,x:m.x,y:m.y,w:m.w,h:m.h,type:"group",label:d2(t.value,p),config:{},children:[v],nodeKind:"group"};t.value.push(b),e.value=g,n.value=null}function u(p){if(!p)return null;const m=p.nodeKind==="form",g=p.nodeKind==="subForm";if(!m&&!g)return null;let v=p.config||void 0;return v?(!Array.isArray(v.buttons)||!v.buttons.length)&&(v.buttons=[{...up.submit},{...up.cancel},{...up.reset}]):(v={items:[],gridColumns:24},g&&(v.addButtonText="新增一行",v.defaultGenerateOne=!1),v.buttons=[{...up.submit},{...up.cancel},{...up.reset}],p.config=v),v??null}const h=f.computed(()=>{var b;const p=e.value;if(!p)return null;const m=t.value.find(y=>y.i===p);if(!m||m.nodeKind!=="group"||!((b=m.children)!=null&&b.length))return null;const g=m.children[0];return u(g)??null});return{getGroupChildType:r,setGroupChildType:l,createGroupChildByType:i,doSetGroupChildType:s,doSetGroupChildTypeKeepData:a,addGroupByContainerType:c,formConfigForForm:u,selectedGroupFormConfig:h}}function Eve(t,e,n,o,r,i,s,a){function l(M,D){dt.ElMessageBox.alert(M,D,{type:"warning",confirmButtonText:"知道了"}),console.error(`[表单设计] ${D}:`,M)}function c(){const M=a.validateLayoutBeforeSave();if(M.length){l(M[0],"预览校验");return}i.value=An(a.buildFrameworkConfig()),s.value=!0}function u(){const M=a.validateLayoutBeforeSave();if(M.length){l(M[0],"保存校验");return}const D=a.buildFrameworkConfig();console.log("[FlameFramework] dynamic form config:",D),a.onSave(D)}function h(){dt.ElMessageBox.confirm("是否重置表单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value=a.getDefaultLayout(),r.value=[{...a.DEFAULT_BUTTONS.submit},{...a.DEFAULT_BUTTONS.cancel},{...a.DEFAULT_BUTTONS.reset}],e.value=null,o.value=null,n.value=null,dt.ElMessage.success("已重置"),a.onReset()}).catch(()=>{})}function p(M){const D=Ss();M.i=D,M.formItem&&(M.formItem={...M.formItem,prop:D})}function m(M){var D,I;if((D=M.children)!=null&&D.length)for(const V of M.children){const N=V;if(N.i=Ss(),!!((I=N.children)!=null&&I.length))for(const T of N.children)p(T)}}function g(M){const D=a.getNextGridPosition(t.value),I={...An(M),i:Ss(),x:D.x,y:D.y,w:D.w,h:D.h};m(I),t.value.push(I),e.value=I.i,o.value=null,n.value=null}function v(M){console.log("%c [ item ]-1315","font-size:13px; background:pink; color:#bf2c9f;",M),dt.ElMessageBox.confirm("确认删除当前分组(及内部内容)吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const D=Ev(t.value,{i:M.i});D>=0&&t.value.splice(D,1),e.value===M.i&&(e.value=null),n.value=null}).catch(()=>{})}function b(M){var D;for(const I of t.value){if(I.type!=="group")continue;const V=(D=I.children)==null?void 0:D[0];if((V==null?void 0:V.i)===M)return I}return null}function y(M,D,I){M.children||(M.children=[]);const V=a.getNextInnerGridPosition(M,D.w,D.h),N={...An(D),x:V.x,y:V.y,w:D.w,h:D.h};return p(N),M.children.push(N),a.selectFormChild(I,N),N}function w(M,D){const I=b(M.i);I&&y(M,D,I)}function k(M,D,I){var N;const V=(N=I.children)==null?void 0:N[0];if(!V||V.nodeKind!=="form"&&V.nodeKind!=="subForm"){dt.ElMessage.warning("目标分组须为分组或子项目类型");return}y(V,D,I),dt.ElMessage.success("已复制到目标分组")}function C(M,D){dt.ElMessageBox.confirm("确认删除当前子节点吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{var N;const I=M.children;if(!I)return;const V=Ev(I,{i:D.i});V>=0&&I.splice(V,1),((N=n.value)==null?void 0:N.childId)===D.i&&(n.value=null)}).catch(()=>{})}function x(M){M.nodeKind!=="form"&&M.nodeKind!=="subForm"||(a.compactInnerFormLayout(M),dt.ElMessage.success("已按从左到右、自上而下重新排布"))}function S(M){o.value=M,e.value=null,n.value=null}function A(){S(Wg)}function P(){r.value.push({event:`custom_${Date.now()}`,buttonText:"自定义",type:"default"}),o.value=r.value.length-1}function O(M){M<0||M>=r.value.length||(r.value.splice(M,1),o.value===M?o.value=r.value.length?Math.min(M,r.value.length-1):Wg:o.value!=null&&o.value>M&&o.value!==Wg&&o.value--)}return{onOpenPreview:c,onSaveConfig:u,onResetConfig:h,onCopyWidget:g,onDeleteWidget:v,onCopyFormChild:w,onCopyFormChildToGroup:k,onDeleteFormChild:C,onAutoCompactInner:x,onSelectGlobalButton:S,onSelectGlobalButtonsBar:A,addGlobalButton:P,removeGlobalButton:O}}function Ave(t){const e=f.computed(()=>{const N=t.value;return(N==null?void 0:N.type)==="flmInput"&&N.config?N.config:void 0}),n=f.computed(()=>{const N=t.value;return(N==null?void 0:N.type)==="flmSelect"&&N.config?N.config:void 0}),o=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmInputNumber"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),r=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDatePicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),i=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTimePicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),s=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTimeSelect"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),a=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCascader"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),l=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCheckbox"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),c=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCheckboxGroup"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),u=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmColorPicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),h=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRadio"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),p=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRate"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),m=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmSlider"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),g=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmSwitch"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),v=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTransfer"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),b=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmButton"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),y=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDialog"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),w=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDrawer"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),k=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmPagination"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),C=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRead"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),x=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmAlert"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),S=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmUpload"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),A=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTime"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),P=[{label:"全部图片(通配)",value:"image/*"},{label:"全部视频(通配)",value:"video/*"},{label:"全部音频(通配)",value:"audio/*"},{label:"JPEG 图片",value:"image/jpeg"},{label:"PNG 图片",value:"image/png"},{label:"GIF 图片",value:"image/gif"},{label:"WebP 图片",value:"image/webp"},{label:"SVG 图片",value:"image/svg+xml"},{label:"BMP 图片",value:"image/bmp"},{label:"ICO 图标",value:"image/x-icon"},{label:"TIFF 图片",value:"image/tiff"},{label:"MP4 视频",value:"video/mp4"},{label:"WebM 视频",value:"video/webm"},{label:"OGG 视频",value:"video/ogg"},{label:"QuickTime 视频",value:"video/quicktime"},{label:"MP3 音频",value:"audio/mpeg"},{label:"WAV 音频",value:"audio/wav"},{label:"OGG 音频",value:"audio/ogg"},{label:"AAC 音频",value:"audio/aac"},{label:"FLAC 音频",value:"audio/flac"},{label:"PDF 文档",value:"application/pdf"},{label:"Word(.doc)",value:"application/msword"},{label:"Word(.docx)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"Excel(.xls)",value:"application/vnd.ms-excel"},{label:"Excel(.xlsx)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"PowerPoint(.ppt)",value:"application/vnd.ms-powerpoint"},{label:"PowerPoint(.pptx)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"纯文本",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"HTML",value:"text/html"},{label:"JSON",value:"application/json"},{label:"XML",value:"application/xml"},{label:"ZIP 压缩包",value:"application/zip"},{label:"RAR 压缩包",value:"application/x-rar-compressed"},{label:"7Z 压缩包",value:"application/x-7z-compressed"},{label:"扩展名:.pdf",value:".pdf"},{label:"扩展名:.doc",value:".doc"},{label:"扩展名:.docx",value:".docx"},{label:"扩展名:.xls",value:".xls"},{label:"扩展名:.xlsx",value:".xlsx"},{label:"扩展名:.ppt",value:".ppt"},{label:"扩展名:.pptx",value:".pptx"},{label:"扩展名:.txt",value:".txt"},{label:"扩展名:.csv",value:".csv"},{label:"扩展名:.zip",value:".zip"},{label:"扩展名:.rar",value:".rar"},{label:"扩展名:.7z",value:".7z"},{label:"扩展名:.jpg",value:".jpg"},{label:"扩展名:.jpeg",value:".jpeg"}];function O(N){const T=A.value;if(!T)return;const B=N;if(B==="date")T.format="YYYY-MM-DD";else if(B==="time")T.format="HH:mm:ss";else{const _=T.format&&String(T.format).trim()||"";(!_||_==="YYYY-MM-DD"||_==="HH:mm:ss")&&(T.format="YYYY-MM-DD HH:mm:ss")}}const M=f.computed(()=>{var N;return((N=t.value)==null?void 0:N.config)??void 0}),D=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&pfe.includes(t.value.type)}),I=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&t.value.type!=="flmRead"&&t.value.type!=="flmAlert"&&t.value.type!=="flmTime"}),V=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&mfe.includes(t.value.type)});return{inputConfig:e,selectConfig:n,inputNumberConfig:o,datePickerConfig:r,timePickerConfig:i,timeSelectConfig:s,cascaderConfig:a,checkboxConfig:l,checkboxGroupConfig:c,colorPickerConfig:u,radioConfig:h,rateConfig:p,sliderConfig:m,switchConfig:g,transferConfig:v,buttonConfig:b,dialogConfig:y,drawerConfig:w,paginationConfig:k,readConfig:C,alertConfig:x,uploadConfig:S,uploadAcceptTypeOptions:P,timeConfig:A,onFlmTimePresetChange:O,controlConfig:M,controlHasPlaceholder:D,controlHasDisabled:I,controlHasClearable:V}}function Ove(t,e,n,o,r){const i=f.computed(()=>{if(o.value!=null){const u=o.value;if(u===Wg)return{i:"global_buttons_bar",type:"globalButton",nodeKind:"control",config:{}};const h=e.value[u];return h?{i:`global_btn_${u}`,type:"globalButton",nodeKind:"control",config:h}:null}if(r.value){const{formId:u,childId:h}=r.value,p=Rl(t.value,{i:u});if(!p||!p.children)return null;for(const m of p.children){if(!m.children)continue;const g=Rl(m.children,{i:h});if(g)return g}return null}if(!n.value)return null;const l=n.value,c=Rl(t.value,{i:l});if(c)return c;for(const u of t.value){if(!u.children)continue;const h=Rl(u.children,{i:l});if(h)return h}return null});f.watch(i,l=>{console.log("[FlameFramework] selectedItem changed:",l),l&&l.type&&l.type!=="flmForm"&&!l.formItem&&(l.formItem={...h2(l.type),label:l.label??z1(l.type)})},{immediate:!0});function s(l,c){o.value=null,n.value=l.i,r.value={formId:l.i,childId:c.i}}function a(l,c){var h,p,m;const u=l.target;(h=u.closest)!=null&&h.call(u,".module-header-actions")||(p=u.closest)!=null&&p.call(u,".module-child-delete")||(m=u.closest)!=null&&m.call(u,".form-inner-control-wrap")||(n.value=c.i,o.value=null,r.value=null,l.stopPropagation())}return{selectedItem:i,selectFormChild:s,onGridWidgetCapture:a}}function uj(t,e){var n;if(t!=null&&t.length)for(const o of t)e(o),(n=o.children)!=null&&n.length&&uj(o.children,e)}function W5(t){if("kind"in t&&t.kind==="custom"){const r=t;return{type:"flmCustom",kind:"custom",id:Ss(),label:r.label,defaultConfig:r.defaultConfig?An(r.defaultConfig):void 0,defaultFormItem:r.defaultFormItem?An(r.defaultFormItem):void 0,customKey:r.key,customComponentName:r.componentName,customAttrFields:r.attrFields?An(r.attrFields):[],gridW:r.gridW,gridH:r.gridH}}const e=t,n=t,o=n.key??e.key;return{type:e.type,kind:"basic",id:Ss(),label:e.label,defaultConfig:e.defaultConfig?An(e.defaultConfig):void 0,defaultFormItem:e.defaultFormItem?An(e.defaultFormItem):void 0,paletteKey:o,disabledConfig:n.disabledConfig?An(n.disabledConfig):e.disabledConfig?An(e.disabledConfig):void 0,gridW:n.gridW??e.gridW,gridH:n.gridH??e.gridH}}const H5=["预设","预设组件"];function G5(t,e=H5){const n=t.trim();return e.some(o=>o.trim()===n)}function K5(t,e=H5){const n=[],o=[];return t.forEach(r=>{if(G5(r.title,e)){(r.items??[]).forEach(i=>{i.kind!=="custom"&&n.push(i)});return}o.push(r)}),{presetItems:n,otherGroups:o}}function Tve(t){return{key:t.key,type:t.type,label:t.label,icon:t.icon??"🧩",defaultConfig:t.defaultConfig,defaultFormItem:t.defaultFormItem,disabledConfig:t.disabledConfig,gridW:t.gridW,gridH:t.gridH}}function Mve(t,e,n,o,r,i,s,a,l,c,u){function h(O){for(const M of a.value)for(const D of M.items)if(D.kind==="custom"&&D.key===O)return D}function p(O){for(const M of a.value)for(const D of M.items)if(D.kind==="custom"&&D.componentName===O)return D}function m(O){for(const M of a.value)if(G5(M.title))for(const D of M.items??[]){if(D.kind==="custom")continue;const I=D;if(I.key===O)return I}}function g(O,M){var D;M.paletteKey&&(O.paletteKey=M.paletteKey),(D=M.disabledConfig)!=null&&D.length&&(O.disabledConfig=An(M.disabledConfig))}function v(O){O.forEach(M=>{M.type!=="group"||!M.children||M.children.forEach(D=>{D.nodeKind!=="form"&&D.nodeKind!=="subForm"||uj(D.children,I=>{var N,T,B;if(I.type!=="flmCustom")return;const V=(_,R)=>{const E=_;I._resolveAttrFields=()=>{var Q;const U=R?p(E):h(E);return(Q=U==null?void 0:U.attrFields)!=null&&Q.length?An(U.attrFields):I.customAttrFields||[]}};if((N=I.customAttrFields)!=null&&N.length){I.customKey?V(I.customKey,!1):I.customComponentName&&V(I.customComponentName,!0);return}if(I.customKey){const _=h(I.customKey);(T=_==null?void 0:_.attrFields)!=null&&T.length&&(I.customAttrFields=An(_.attrFields)),V(I.customKey,!1);const R=_;typeof(R==null?void 0:R.gridW)=="number"&&R.gridW>0&&(I.w=R.gridW,I.h=R.gridH??1);return}if(I.customComponentName){const _=p(I.customComponentName);if(_){I.customKey=_.key,(B=_.attrFields)!=null&&B.length&&(I.customAttrFields=An(_.attrFields)),V(I.customComponentName,!0);const R=_;typeof(R==null?void 0:R.gridW)=="number"&&R.gridW>0&&(I.w=R.gridW,I.h=R.gridH??1)}}})})})}function b(O){O.forEach(M=>{M.type!=="group"||!M.children||M.children.forEach(D=>{D.nodeKind!=="form"&&D.nodeKind!=="subForm"||uj(D.children,I=>{var N,T;if(!I.paletteKey)return;const V=m(I.paletteKey);(N=V==null?void 0:V.disabledConfig)!=null&&N.length&&((T=I.disabledConfig)!=null&&T.length||(I.disabledConfig=An(V.disabledConfig)))})})})}function y(O,M){var I;const D=Rl(t.value,{i:O});if(!(D!=null&&D.children))return null;for(const V of D.children)if(!(V.nodeKind==="slot"||V.type==="groupSlot")&&(I=V.children)!=null&&I.some(N=>N.i===M))return V;return null}function w(O){var D;const M=Rl(t.value,{i:O});if(M)return M;for(const I of t.value)if((D=I.children)!=null&&D.some(V=>V.i===O))return I;return null}function k(){const O=[...r.value];r.value=[];let M=null;O.forEach(D=>{if(D.type!=="group")return;const I=L1(t.value),V=cj(),N={i:V,x:I.x,y:I.y,w:I.w,h:I.h,type:"group",label:d2(t.value,"form"),config:{},children:[],nodeKind:"group"};t.value.push(N),M=V}),M&&(o.value=null,n.value=null,e.value=M)}function C(O,M,D){if(M.length){if(O.children||(O.children=[]),O.nodeKind==="group"){let I=null;const V=O.children.some(T=>T.nodeKind==="subForm"),N=O.children.some(T=>T.nodeKind==="form");M.forEach(T=>{if(T.type!=="formSlot"){if(T.type==="groupSlot"){const B=mg(O,24,1),_={i:Ss(),x:B.x,y:B.y,w:24,h:1,type:"groupSlot",label:Cr.slot,nodeKind:"slot",config:{slotName:""}};O.children.push(_),I=_;return}if(T.type==="subForm"){if(N||V)return;const B=mg(O,24,1),_={i:Ss(),x:B.x,y:B.y,w:B.w,h:B.h,type:"flmSubForm",label:Cr.subForm,nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};O.children.push(_),I=_;return}if(T.type==="form"){if(N||V)return;const B=mg(O,24,1),_=_1("flmForm"),R=Pp(_||{},["buttons"]),E={i:Ss(),x:B.x,y:B.y,w:B.w,h:B.h,type:"flmForm",label:Cr.form,nodeKind:"form",config:R,children:[]};O.children.push(E),I=E;return}}}),I&&(o.value=null,n.value=null,e.value=I.i);return}if(O.nodeKind==="form"||O.nodeKind==="subForm"){const I=(N,T)=>{const B=HR(O,D.gridEl,D.clientX,D.clientY,ts,GR,f2,N,T,"preview");return ffe(O,B,ts),B};let V=null;if(M.forEach(N=>{var W;if(N.type==="group"||N.type==="subForm"||N.type==="form"||N.type==="groupSlot")return;if(N.type==="formSlot"){const Y=I(24,1),$={i:Ss(),x:Y.x,y:Y.y,w:Y.w,h:1,type:"formSlot",label:"表单插槽",nodeKind:"slot",config:{slotName:""}};O.children||(O.children=[]),O.children.push($),V=$;return}if(N.type==="flmCustom"||N.kind==="custom"){const Y=typeof N.gridW=="number"&&N.gridW>0?{w:N.gridW,h:N.gridH??1}:gg("flmCustom"),$=I(Y.w,Y.h),ve=p2("flmCustom"),xe=YR(ve,N.defaultConfig),ge=h2("flmCustom"),q=N.defaultFormItem?An({...ge,...N.defaultFormItem}):An(ge),me={i:Ss(),x:$.x,y:$.y,w:Y.w,h:Y.h,type:"flmCustom",label:N.label||N.customComponentName||"业务组件",config:xe,formItem:q,nodeKind:"control",customKey:N.customKey,customComponentName:N.customComponentName,customAttrFields:(W=N.customAttrFields)!=null&&W.length?An(N.customAttrFields):[]},re=N.customKey||"",j=N.customComponentName||"";me._resolveAttrFields=()=>{var Ee;const oe=re?h(re):j?p(j):void 0;return(Ee=oe==null?void 0:oe.attrFields)!=null&&Ee.length?An(oe.attrFields):me.customAttrFields||[]},O.children||(O.children=[]),O.children.push(me),V=me;return}const T=N.type,B=typeof N.gridW=="number"&&N.gridW>0?{w:N.gridW,h:N.gridH??1}:gg(T),_=I(B.w,B.h),R=p2(T),E=YR(R,N.defaultConfig),U=h2(T),Q=N.defaultFormItem?An({...U,...N.defaultFormItem}):An(U),K={i:Ss(),x:_.x,y:_.y,w:B.w,h:B.h,type:T,label:N.label||z1(T),config:E,formItem:Q,nodeKind:"control"};g(K,N),O.children||(O.children=[]),O.children.push(K),V=K}),V){o.value=null;const N=w(O.i);N?l(N,V):(e.value=O.i,n.value=null)}}}}function x(O,M,D,I,V){const N=WR({to:D,clientX:Number.isFinite(I)?I:void 0,clientY:Number.isFinite(V)?V:void 0});C(O,[M],N)}function S(O,M){!M.children||!O||(O.forEach(D=>{const I=Rl(M.children,{i:D.i});I&&(I.x=D.x,I.y=D.y,I.w=D.w,I.h=D.h)}),UR(M.children)&&F1(M))}function A(){const O=[...s.value];s.value=[];for(const M of O)(M.type==="form"||M.type==="subForm"||M.type==="groupSlot")&&u(M.type==="groupSlot"?"slot":M.type)}function P(O){const M=t.value[O];if(!M||M.nodeKind==="group")return;const D=M.type,I=D==="groupSlot"?"slot":D==="subForm"?"subForm":"form";t.value.splice(O,1);const V=cj(),N=c(I),T=L1(t.value),B={i:V,x:T.x,y:T.y,w:T.w,h:T.h,type:"group",label:d2(t.value,I),config:{},children:[N],nodeKind:"group"};t.value.splice(O,0,B),o.value=null,n.value=null,e.value=V}return{onDropFromPalette:k,onInteractDropToFormInner:x,onContainerDrop:A,onDropContainerInRoot:P,onInnerLayoutUpdated:S,findFormContainerForInnerControl:y,findGroupByNodeId:w,findCustomPaletteByKey:h,findCustomPaletteByComponentName:p,hydrateLayoutCustomFields:v,hydrateLayoutPresetFields:b}}const $o={init:Nve,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function fp(){}function Nve(t){const e=t;$o.document=e.document,$o.DocumentFragment=e.DocumentFragment||fp,$o.SVGElement=e.SVGElement||fp,$o.SVGSVGElement=e.SVGSVGElement||fp,$o.SVGElementInstance=e.SVGElementInstance||fp,$o.Element=e.Element||fp,$o.HTMLElement=e.HTMLElement||$o.Element,$o.Event=e.Event,$o.Touch=e.Touch||fp,$o.PointerEvent=e.PointerEvent||e.MSPointerEvent}var Y5=t=>!!(t&&t.Window)&&t instanceof t.Window;let X5,fd;function J5(t){X5=t;const e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),fd=t}typeof window<"u"&&window&&J5(window);function wc(t){return Y5(t)?t:(t.ownerDocument||t).defaultView||fd.window}const Pve=t=>t===fd||Y5(t),Dve=t=>w0(t)&&t.nodeType===11,w0=t=>!!t&&typeof t=="object",Q5=t=>typeof t=="function";var qe={window:Pve,docFrag:Dve,object:w0,func:Q5,number:t=>typeof t=="number",bool:t=>typeof t=="boolean",string:t=>typeof t=="string",element:t=>{if(!t||typeof t!="object")return!1;const e=wc(t)||fd;return/object|function/.test(typeof Element)?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:t=>w0(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString()),array:t=>w0(t)&&typeof t.length<"u"&&Q5(t.splice)};const Ur={init:Rve,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function Rve(t){const e=$o.Element,n=t.navigator||{};Ur.supportsTouch="ontouchstart"in t||qe.func(t.DocumentTouch)&&$o.document instanceof t.DocumentTouch,Ur.supportsPointerEvent=n.pointerEnabled!==!1&&!!$o.PointerEvent,Ur.isIOS=/iP(hone|od|ad)/.test(n.platform),Ur.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),Ur.isIe9=/MSIE 9/.test(n.userAgent),Ur.isOperaMobile=n.appName==="Opera"&&Ur.supportsTouch&&/Presto/.test(n.userAgent),Ur.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",Ur.pEventTypes=Ur.supportsPointerEvent?$o.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Ur.wheelEvent=$o.document&&"onmousewheel"in $o.document?"mousewheel":"wheel"}const Z5=(t,e)=>{for(const n of e)t.push(n);return t},q5=t=>Z5([],t),Gg=(t,e)=>{for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},C0=(t,e)=>t[Gg(t,e)];function k0(t){const e={};for(const n in t){const o=t[n];qe.plainObject(o)?e[n]=k0(o):qe.array(o)?e[n]=q5(o):e[n]=o}return e}function os(t,e){for(const o in e)t[o]=e[o];return t}let $5=0,Cc,dd;function Ive(t){if(Cc=t.requestAnimationFrame,dd=t.cancelAnimationFrame,!Cc){const e=["ms","moz","webkit","o"];for(const n of e)Cc=t[`${n}RequestAnimationFrame`],dd=t[`${n}CancelAnimationFrame`]||t[`${n}CancelRequestAnimationFrame`]}Cc=Cc&&Cc.bind(t),dd=dd&&dd.bind(t),Cc||(Cc=e=>{const n=Date.now(),o=Math.max(0,16-(n-$5)),r=t.setTimeout(()=>{e(n+o)},o);return $5=n+o,r},dd=e=>clearTimeout(e))}var dp={request:t=>Cc(t),cancel:t=>dd(t),init:Ive};function hd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r=>!0,o=arguments.length>3?arguments[3]:void 0;if(o=o||{},qe.string(t)&&t.search(" ")!==-1&&(t=eV(t)),qe.array(t))return t.forEach(r=>hd(r,e,n,o)),o;if(qe.object(t)&&(e=t,t=""),qe.func(e)&&n(t))o[t]=o[t]||[],o[t].push(e);else if(qe.array(e))for(const r of e)hd(t,r,n,o);else if(qe.object(e))for(const r in e){const i=eV(r).map(s=>`${t}${s}`);hd(i,e[r],n,o)}return o}function eV(t){return t.trim().split(/ +/)}function tV(t,e){for(const n of e){if(t.immediatePropagationStopped)break;n(t)}}class nV{constructor(e){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=os({},e||{})}fire(e){let n;const o=this.global;(n=this.types[e.type])&&tV(e,n),!e.propagationStopped&&o&&(n=o[e.type])&&tV(e,n)}on(e,n){const o=hd(e,n);for(e in o)this.types[e]=Z5(this.types[e]||[],o[e])}off(e,n){const o=hd(e,n);for(e in o){const r=this.types[e];if(!(!r||!r.length))for(const i of o[e]){const s=r.indexOf(i);s!==-1&&r.splice(s,1)}}}getRect(e){return null}}function pd(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function oV(t,e){for(;qe.element(t);){if(Vu(t,e))return t;t=md(t)}return null}function md(t){let e=t.parentNode;if(qe.docFrag(e)){for(;(e=e.host)&&qe.docFrag(e););return e}return e}function Vu(t,e){return fd!==X5&&(e=e.replace(/\/deep\//g," ")),t[Ur.prefixedMatchesSelector](e)}const fj=t=>t.parentNode||t.host;function Vve(t){let e=[],n;for(let o=0;o<t.length;o++){const r=t[o],i=t[n];if(!r||o===n)continue;if(!i){n=o;continue}const s=fj(r),a=fj(i);if(s===r.ownerDocument)continue;if(a===r.ownerDocument){n=o;continue}if(s===a){Bve(r,i)&&(n=o);continue}e=e.length?e:rV(i);let l;if(i instanceof $o.HTMLElement&&r instanceof $o.SVGElement&&!(r instanceof $o.SVGSVGElement)){if(r===a)continue;l=r.ownerSVGElement}else l=r;const c=rV(l,i.ownerDocument);let u=0;for(;c[u]&&c[u]===e[u];)u++;const h=[c[u-1],c[u],e[u]];if(h[0]){let p=h[0].lastChild;for(;p;){if(p===h[1]){n=o,e=c;break}else if(p===h[2])break;p=p.previousSibling}}}return n}function rV(t,e){const n=[];let o=t,r;for(;(r=fj(o))&&o!==e&&r!==o.ownerDocument;)n.unshift(o),o=r;return n}function Bve(t,e){const n=parseInt(wc(t).getComputedStyle(t).zIndex,10)||0,o=parseInt(wc(e).getComputedStyle(e).zIndex,10)||0;return n>=o}function iV(t,e,n){for(;qe.element(t);){if(Vu(t,e))return!0;if(t=md(t),t===n)return Vu(t,e)}return!1}function sV(t){return t.correspondingUseElement||t}function Lve(t){return t=t||fd,{x:t.scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function dj(t){const e=t instanceof $o.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function hj(t){const e=dj(t);if(!Ur.isIOS7&&e){const n=Lve(wc(t));e.left+=n.x,e.right+=n.x,e.top+=n.y,e.bottom+=n.y}return e}function aV(t){return qe.string(t)?($o.document.querySelector(t),!0):!1}const Fve=["webkit","moz"];function lV(t,e){t.__set||(t.__set={});for(const n in e)Fve.some(o=>n.indexOf(o)===0)||typeof t[n]!="function"&&n!=="__set"&&Object.defineProperty(t,n,{get(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set(o){t.__set[n]=o},configurable:!0});return t}var pj=(t,e)=>Math.sqrt(t*t+e*e);function mj(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function zve(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp}function _ve(t,e){const n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n}function Uve(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function cV(t){return t instanceof $o.Event||t instanceof $o.Touch}function S0(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n}function uV(t,e){return e=e||{x:0,y:0},Ur.isOperaMobile&&cV(t)?(S0("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):S0("page",t,e),e}function Wve(t,e){return e=e||{},Ur.isOperaMobile&&cV(t)?S0("screen",t,e):S0("client",t,e),e}function j0(t){return qe.number(t.pointerId)?t.pointerId:t.identifier}function Hve(t,e,n){const o=e.length>1?fV(e):e[0];uV(o,t.page),Wve(o,t.client),t.timeStamp=n}function gj(t){const e=[];return qe.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function fV(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of t)for(const o in e)e[o]+=n[o];for(const n in e)e[n]/=t.length;return e}function Gve(t){if(!t.length)return null;const e=gj(t),n=Math.min(e[0].pageX,e[1].pageX),o=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:o,left:n,top:o,right:r,bottom:i,width:r-n,height:i-o}}function Kve(t,e){const n=e+"X",o=e+"Y",r=gj(t),i=r[0][n]-r[1][n],s=r[0][o]-r[1][o];return pj(i,s)}function Yve(t,e){const n=e+"X",o=e+"Y",r=gj(t),i=r[1][n]-r[0][n],s=r[1][o]-r[0][o];return 180*Math.atan2(s,i)/Math.PI}function Xve(t){return qe.string(t.pointerType)?t.pointerType:qe.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof $o.Touch?"touch":"mouse"}function dV(t){const e=qe.func(t.composedPath)?t.composedPath():t.path;return[sV(e?e[0]:t.target),sV(t.currentTarget)]}function Kg(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function Jve(t){var e;const n=[],o={},r=[],i={add:s,remove:a,addDelegate:l,removeDelegate:c,delegateListener:u,delegateUseCapture:h,delegatedEvents:o,documents:r,targets:n,supportsOptions:!1,supportsPassive:!1};(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i;function s(p,m,g,v){if(!p.addEventListener)return;const b=Yg(v);let y=C0(n,w=>w.eventTarget===p);y||(y={eventTarget:p,events:{}},n.push(y)),y.events[m]||(y.events[m]=[]),C0(y.events[m],w=>w.func===g&&E0(w.options,b))||(p.addEventListener(m,g,i.supportsOptions?b:b.capture),y.events[m].push({func:g,options:b}))}function a(p,m,g,v){if(!p.addEventListener||!p.removeEventListener)return;const b=Gg(n,C=>C.eventTarget===p),y=n[b];if(!y||!y.events)return;if(m==="all"){for(m in y.events)y.events.hasOwnProperty(m)&&a(p,m,"all");return}let w=!1;const k=y.events[m];if(k)if(g==="all"){for(let C=k.length-1;C>=0;C--){const x=k[C];a(p,m,x.func,x.options)}return}else{const C=Yg(v);for(let x=0;x<k.length;x++){const S=k[x];if(S.func===g&&E0(S.options,C)){p.removeEventListener(m,g,i.supportsOptions?C:C.capture),k.splice(x,1),k.length===0&&(delete y.events[m],w=!0);break}}}w&&!Object.keys(y.events).length&&n.splice(b,1)}function l(p,m,g,v,b){const y=Yg(b);if(!o[g]){o[g]=[];for(const C of r)s(C,g,u),s(C,g,h,!0)}const w=o[g];let k=C0(w,C=>C.selector===p&&C.context===m);k||(k={selector:p,context:m,listeners:[]},w.push(k)),k.listeners.push({func:v,options:y})}function c(p,m,g,v,b){const y=Yg(b),w=o[g];let k=!1,C;if(w)for(C=w.length-1;C>=0;C--){const x=w[C];if(x.selector===p&&x.context===m){const{listeners:S}=x;for(let A=S.length-1;A>=0;A--){const P=S[A];if(P.func===v&&E0(P.options,y)){S.splice(A,1),S.length||(w.splice(C,1),a(m,g,u),a(m,g,h,!0)),k=!0;break}}if(k)break}}}function u(p,m){const g=Yg(m),v=new Qve(p),b=o[p.type],[y]=dV(p);let w=y;for(;qe.element(w);){for(let k=0;k<b.length;k++){const C=b[k],{selector:x,context:S}=C;if(Vu(w,x)&&pd(S,y)&&pd(S,w)){const{listeners:A}=C;v.currentTarget=w;for(const P of A)E0(P.options,g)&&P.func(v)}}w=md(w)}}function h(p){return u.call(this,p,!0)}return i}class Qve{constructor(e){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,lV(this,e)}preventOriginalDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}stopImmediatePropagation(){this.originalEvent.stopImmediatePropagation()}}function Yg(t){return qe.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function E0(t,e){return t===e?!0:typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive}var Zve={id:"events",install:Jve};const qve=function(e){return/^(always|never|auto)$/.test(e)?(this.options.preventDefault=e,this):qe.bool(e)?(this.options.preventDefault=e?"always":"never",this):this.options.preventDefault};function $ve(t,e,n){const o=t.options.preventDefault;if(o!=="never"){if(o==="always"){n.preventDefault();return}if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const r=wc(n.target).document,i=e.getDocOptions(r);if(!(i&&i.events)||i.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||qe.element(n.target)&&Vu(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function ebe(t){let{interaction:e,event:n}=t;e.interactable&&e.interactable.checkAndPreventDefault(n)}function tbe(t){const{Interactable:e}=t;e.prototype.preventDefault=qve,e.prototype.checkAndPreventDefault=function(n){return $ve(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener(n){for(const o of t.interactions.list)if(o.element&&(o.element===n.target||pd(o.element,n.target))){o.interactable.checkAndPreventDefault(n);return}}})}var nbe={id:"core/interactablePreventDefault",install:tbe,listeners:["down","move","up","cancel"].reduce((t,e)=>(t[`interactions:${e}`]=ebe,t),{})};function Xg(t,e){let n=!1;return function(){return n||(fd.console.warn(e),n=!0),t.apply(this,arguments)}}function hV(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function pV(t,e,n){return t==="parent"?md(n):t==="self"?e.getRect(n):oV(n,t)}function obe(t,e,n,o){let r=t;return qe.string(r)?r=pV(r,e,n):qe.func(r)&&(r=r(...o)),qe.element(r)&&(r=hj(r)),r}function rbe(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function ibe(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function mV(t,e,n){const o=n&&t.options[n],i=o&&o.origin||t.options.origin,s=obe(i,t,e,[t&&e]);return rbe(s)||{x:0,y:0}}class vj{constructor(e){this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(vj.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const gV={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class bj extends vj{constructor(e,n,o,r,i,s,a){super(e),this.relatedTarget=null,this.screenX=void 0,this.screenY=void 0,this.button=void 0,this.buttons=void 0,this.ctrlKey=void 0,this.shiftKey=void 0,this.altKey=void 0,this.metaKey=void 0,this.page=void 0,this.client=void 0,this.delta=void 0,this.rect=void 0,this.x0=void 0,this.y0=void 0,this.t0=void 0,this.dt=void 0,this.duration=void 0,this.clientX0=void 0,this.clientY0=void 0,this.velocity=void 0,this.speed=void 0,this.swipe=void 0,this.axes=void 0,this.preEnd=void 0,i=i||e.element;const l=e.interactable,c=(l&&l.options||gV).deltaSource,u=mV(l,i,o),h=r==="start",p=r==="end",m=h?this:e.prevEvent,g=h?e.coords.start:p?{page:m.page,client:m.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;this.page=os({},g.page),this.client=os({},g.client),this.rect=os({},e.rect),this.timeStamp=g.timeStamp,p||(this.page.x-=u.x,this.page.y-=u.y,this.client.x-=u.x,this.client.y-=u.y),this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.button=n.button,this.buttons=n.buttons,this.target=i,this.currentTarget=i,this.preEnd=s,this.type=a||o+(r||""),this.interactable=l,this.t0=h?e.pointers[e.pointers.length-1].downTime:m.t0,this.x0=e.coords.start.page.x-u.x,this.y0=e.coords.start.page.y-u.y,this.clientX0=e.coords.start.client.x-u.x,this.clientY0=e.coords.start.client.y-u.y,h||p?this.delta={x:0,y:0}:this.delta={x:this[c].x-m[c].x,y:this[c].y-m[c].y},this.dt=e.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=os({},e.coords.velocity[c]),this.speed=pj(this.velocity.x,this.velocity.y),this.swipe=p||r==="inertiastart"?this.getSwipe():null}getSwipe(){const e=this._interaction;if(e.prevEvent.speed<600||this.timeStamp-e.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;const o=22.5;n<0&&(n+=360);const r=135-o<=n&&n<225+o,i=225-o<=n&&n<315+o,s=!r&&(315-o<=n||n<45+o),a=!i&&45-o<=n&&n<135+o;return{up:i,down:a,left:r,right:s,angle:n,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(bj.prototype,{pageX:{get(){return this.page.x},set(t){this.page.x=t}},pageY:{get(){return this.page.y},set(t){this.page.y=t}},clientX:{get(){return this.client.x},set(t){this.client.x=t}},clientY:{get(){return this.client.y},set(t){this.client.y=t}},dx:{get(){return this.delta.x},set(t){this.delta.x=t}},dy:{get(){return this.delta.y},set(t){this.delta.y=t}},velocityX:{get(){return this.velocity.x},set(t){this.velocity.x=t}},velocityY:{get(){return this.velocity.y},set(t){this.velocity.y=t}}});class sbe{constructor(e,n,o,r,i){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=o,this.downTime=r,this.downTarget=i}}let abe=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),lbe=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),cbe=0;class ube{get pointerMoveTolerance(){return 1}constructor(e){this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Xg(function(i){this.move(i)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:Kg(),prev:Kg(),cur:Kg(),delta:Kg(),velocity:Kg()},this._id=cbe++;let{pointerType:n,scopeFire:o}=e;this._scopeFire=o,this.pointerType=n;const r=this;this._proxy={};for(const i in abe)Object.defineProperty(this._proxy,i,{get(){return r[i]}});for(const i in lbe)Object.defineProperty(this._proxy,i,{value:function(){return r[i](...arguments)}});this._scopeFire("interactions:new",{interaction:this})}pointerDown(e,n,o){const r=this.updatePointer(e,n,o,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:o,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}start(e,n,o){return this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled?!1:(hV(this.prepared,e),this.interactable=n,this.element=o,this.rect=n.getRect(o),this.edges=this.prepared.edges?os({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}pointerMove(e,n,o){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(e,n,o,!1);const r=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;let i,s;this.pointerIsDown&&!this.pointerWasMoved&&(i=this.coords.cur.client.x-this.coords.start.client.x,s=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=pj(i,s)>this.pointerMoveTolerance);const a=this.getPointerIndex(e),l={pointer:e,pointerIndex:a,pointerInfo:this.pointers[a],event:n,type:"move",eventTarget:o,dx:i,dy:s,duplicate:r,interaction:this};r||_ve(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",l),!r&&!this.simulation&&(this.interacting()&&(l.type=null,this.move(l)),this.pointerWasMoved&&mj(this.coords.prev,this.coords.cur))}move(e){(!e||!e.event)&&Uve(this.coords.delta),e=os({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{}),e.phase="move",this._doPhase(e)}pointerUp(e,n,o,r){let i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,o,!1));const s=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${s}`,{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:o,type:s,curEventTarget:r,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}documentBlur(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}end(e){this._ending=!0,e=e||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}currentAction(){return this._interacting?this.prepared.name:null}interacting(){return this._interacting}stop(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}getPointerIndex(e){const n=j0(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Gg(this.pointers,o=>o.id===n)}getPointerInfo(e){return this.pointers[this.getPointerIndex(e)]}updatePointer(e,n,o,r){const i=j0(e);let s=this.getPointerIndex(e),a=this.pointers[s];return r=r===!1?!1:r||/(down|start)$/i.test(n.type),a?a.pointer=e:(a=new sbe(i,e,n,null,null),s=this.pointers.length,this.pointers.push(a)),Hve(this.coords.cur,this.pointers.map(l=>l.pointer),this._now()),zve(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=o,lV(this.downPointer,e),this.interacting()||(mj(this.coords.start,this.coords.cur),mj(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,o),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:o,down:r,pointerInfo:a,pointerIndex:s,interaction:this}),s}removePointer(e,n){const o=this.getPointerIndex(e);if(o===-1)return;const r=this.pointers[o];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:o,pointerInfo:r,interaction:this}),this.pointers.splice(o,1),this.pointerIsDown=!1}_updateLatestPointer(e,n,o){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=o}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(e,n,o,r){return new bj(this,e,this.prepared.name,n,this.element,o,r)}_fireEvent(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}_doPhase(e){const{event:n,phase:o,preEnd:r,type:i}=e,{rect:s}=this;if(s&&o==="move"&&(ibe(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire(`interactions:before-action-${o}`,e)===!1)return!1;const l=e.iEvent=this._createPreparedEvent(n,o,r,i);return this._scopeFire(`interactions:action-${o}`,e),o==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire(`interactions:after-action-${o}`,e),!0}_now(){return Date.now()}}const yj={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(t){for(const e of yj.methodOrder){const n=yj[e](t);if(n)return n}return null},simulationResume(t){let{pointerType:e,eventType:n,eventTarget:o,scope:r}=t;if(!/down|start/i.test(n))return null;for(const i of r.interactions.list){let s=o;if(i.simulation&&i.simulation.allowResume&&i.pointerType===e)for(;s;){if(s===i.element)return i;s=md(s)}}return null},mouseOrPen(t){let{pointerId:e,pointerType:n,eventType:o,scope:r}=t;if(n!=="mouse"&&n!=="pen")return null;let i;for(const s of r.interactions.list)if(s.pointerType===n){if(s.simulation&&!vV(s,e))continue;if(s.interacting())return s;i||(i=s)}if(i)return i;for(const s of r.interactions.list)if(s.pointerType===n&&!(/down/i.test(o)&&s.simulation))return s;return null},hasPointer(t){let{pointerId:e,scope:n}=t;for(const o of n.interactions.list)if(vV(o,e))return o;return null},idle(t){let{pointerType:e,scope:n}=t;for(const o of n.interactions.list){if(o.pointers.length===1){const r=o.interactable;if(r&&!(r.options.gesture&&r.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function vV(t,e){return t.pointers.some(n=>{let{id:o}=n;return o===e})}const bV=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function fbe(t){const e={};for(const i of bV)e[i]=yV(i,t);const n=Ur.pEventTypes;let o;$o.PointerEvent?o=[{type:n.down,listener:r},{type:n.down,listener:e.pointerDown},{type:n.move,listener:e.pointerMove},{type:n.up,listener:e.pointerUp},{type:n.cancel,listener:e.pointerUp}]:o=[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:r},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}],o.push({type:"blur",listener(i){for(const s of t.interactions.list)s.documentBlur(i)}}),t.prevTouchTime=0,t.Interaction=class extends ube{get pointerMoveTolerance(){return t.interactions.pointerMoveTolerance}set pointerMoveTolerance(i){t.interactions.pointerMoveTolerance=i}_now(){return t.now()}},t.interactions={list:[],new(i){i.scopeFire=(a,l)=>t.fire(a,l);const s=new t.Interaction(i);return t.interactions.list.push(s),s},listeners:e,docEvents:o,pointerMoveTolerance:1};function r(){for(const i of t.interactions.list)if(!(!i.pointerIsDown||i.pointerType!=="touch"||i._interacting))for(const s of i.pointers)t.documents.some(a=>{let{doc:l}=a;return pd(l,s.downTarget)})||i.removePointer(s.pointer,s.event)}t.usePlugin(nbe)}function yV(t,e){return function(n){const o=e.interactions.list,r=Xve(n),[i,s]=dV(n),a=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(const l of n.changedTouches){const c=l,u=j0(c),h={pointer:c,pointerId:u,pointerType:r,eventType:n.type,eventTarget:i,curEventTarget:s,scope:e},p=xV(h);a.push([h.pointer,h.eventTarget,h.curEventTarget,p])}}else{let l=!1;if(!Ur.supportsPointerEvent&&/mouse/.test(n.type)){for(let c=0;c<o.length&&!l;c++)l=o[c].pointerType!=="mouse"&&o[c].pointerIsDown;l=l||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!l){const c={pointer:n,pointerId:j0(n),pointerType:r,eventType:n.type,curEventTarget:s,eventTarget:i,scope:e},u=xV(c);a.push([c.pointer,c.eventTarget,c.curEventTarget,u])}}for(const[l,c,u,h]of a)h[t](l,n,c,u)}}function xV(t){const{pointerType:e,scope:n}=t,r={interaction:yj.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function xj(t,e){let{doc:n,scope:o,options:r}=t;const{interactions:{docEvents:i},events:s}=o,a=s[e];o.browser.isIOS&&!r.events&&(r.events={passive:!1});for(const c in s.delegatedEvents)a(n,c,s.delegateListener),a(n,c,s.delegateUseCapture,!0);const l=r&&r.events;for(const{type:c,listener:u}of i)a(n,c,u,l)}const dbe={id:"core/interactions",install:fbe,listeners:{"scope:add-document":t=>xj(t,"add"),"scope:remove-document":t=>xj(t,"remove"),"interactable:unset":(t,e)=>{let{interactable:n}=t;for(let o=e.interactions.list.length-1;o>=0;o--){const r=e.interactions.list[o];r.interactable===n&&(r.stop(),e.fire("interactions:destroy",{interaction:r}),r.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(o,1))}}},onDocSignal:xj,doOnInteractions:yV,methodNames:bV};function A0(t,e){if(e.phaselessTypes[t])return!0;for(const n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}var Bu=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Bu||{});class hbe{get _defaults(){return{base:{},perAction:{},actions:{}}}constructor(e,n,o,r){this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new nV,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||o,this._win=wc(aV(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=r,this.set(n)}setOnEvents(e,n){return qe.func(n.onstart)&&this.on(`${e}start`,n.onstart),qe.func(n.onmove)&&this.on(`${e}move`,n.onmove),qe.func(n.onend)&&this.on(`${e}end`,n.onend),qe.func(n.oninertiastart)&&this.on(`${e}inertiastart`,n.oninertiastart),this}updatePerActionListeners(e,n,o){var r;const i=(r=this._actions.map[e])==null?void 0:r.filterEventType,s=a=>(i==null||i(a))&&A0(a,this._actions);(qe.array(n)||qe.object(n))&&this._onOff(Bu.Off,e,n,void 0,s),(qe.array(o)||qe.object(o))&&this._onOff(Bu.On,e,o,void 0,s)}setPerAction(e,n){const o=this._defaults;for(const r in n){const i=r,s=this.options[e],a=n[i];i==="listeners"&&this.updatePerActionListeners(e,s.listeners,a),qe.array(a)?s[i]=q5(a):qe.plainObject(a)?(s[i]=os(s[i]||{},k0(a)),qe.object(o.perAction[i])&&"enabled"in o.perAction[i]&&(s[i].enabled=a.enabled!==!1)):qe.bool(a)&&qe.object(o.perAction[i])?s[i].enabled=a:s[i]=a}}getRect(e){return e=e||(qe.element(this.target)?this.target:null),qe.string(this.target)&&(e=e||this._context.querySelector(this.target)),hj(e)}rectChecker(e){return qe.func(e)?(this.getRect=n=>{const o=os({},e.apply(this,n));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}_backCompatOption(e,n){if(aV(n)||qe.object(n)){this.options[e]=n;for(const o in this._actions.map)this.options[o][e]=n;return this}return this.options[e]}origin(e){return this._backCompatOption("origin",e)}deltaSource(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}getAllElements(){const{target:e}=this;return qe.string(e)?Array.from(this._context.querySelectorAll(e)):qe.func(e)&&e.getAllElements?e.getAllElements():qe.element(e)?[e]:[]}context(){return this._context}inContext(e){return this._context===e.ownerDocument||pd(this._context,e)}testIgnoreAllow(e,n,o){return!this.testIgnore(e.ignoreFrom,n,o)&&this.testAllow(e.allowFrom,n,o)}testAllow(e,n,o){return e?qe.element(o)?qe.string(e)?iV(o,e,n):qe.element(e)?pd(e,o):!1:!1:!0}testIgnore(e,n,o){return!e||!qe.element(o)?!1:qe.string(e)?iV(o,e,n):qe.element(e)?pd(e,o):!1}fire(e){return this.events.fire(e),this}_onOff(e,n,o,r,i){qe.object(n)&&!qe.array(n)&&(r=o,o=null);const s=hd(n,o,i);for(let a in s){a==="wheel"&&(a=Ur.wheelEvent);for(const l of s[a])A0(a,this._actions)?this.events[e===Bu.On?"on":"off"](a,l):qe.string(this.target)?this._scopeEvents[e===Bu.On?"addDelegate":"removeDelegate"](this.target,this._context,a,l,r):this._scopeEvents[e===Bu.On?"add":"remove"](this.target,a,l,r)}return this}on(e,n,o){return this._onOff(Bu.On,e,n,o)}off(e,n,o){return this._onOff(Bu.Off,e,n,o)}set(e){const n=this._defaults;qe.object(e)||(e={}),this.options=k0(n.base);for(const o in this._actions.methodDict){const r=o,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,os(os({},n.perAction),n.actions[r])),this[i](e[r])}for(const o in e){if(o==="getRect"){this.rectChecker(e.getRect);continue}qe.func(this[o])&&this[o](e[o])}return this}unset(){if(qe.string(this.target))for(const e in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[e];for(let o=n.length-1;o>=0;o--){const{selector:r,context:i,listeners:s}=n[o];r===this.target&&i===this._context&&n.splice(o,1);for(let a=s.length-1;a>=0;a--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[a][0],s[a][1])}}else this._scopeEvents.remove(this.target,"all")}}class pbe{constructor(e){this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":n=>{let{interactable:o}=n;const{target:r}=o,i=qe.string(r)?this.selectorMap[r]:r[this.scope.id],s=Gg(i,a=>a===o);i.splice(s,1)}})}new(e,n){n=os(n||{},{actions:this.scope.actions});const o=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(o._doc),this.list.push(o),qe.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(o)):(o.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(o)),this.scope.fire("interactable:new",{target:e,options:n,interactable:o,win:this.scope._win}),o}getExisting(e,n){const o=n&&n.context||this.scope.document,r=qe.string(e),i=r?this.selectorMap[e]:e[this.scope.id];if(i)return C0(i,s=>s._context===o&&(r||s.inContext(e)))}forEachMatch(e,n){for(const o of this.list){let r;if((qe.string(o.target)?qe.element(e)&&Vu(e,o.target):e===o.target)&&o.inContext(e)&&(r=n(o)),r!==void 0)return r}}}function mbe(t){const e=(n,o)=>{let r=t.interactables.getExisting(n,o);return r||(r=t.interactables.new(n,o),r.events.global=e.globalEvents),r};return e.getPointerAverage=fV,e.getTouchBBox=Gve,e.getTouchDistance=Kve,e.getTouchAngle=Yve,e.getElementRect=hj,e.getElementClientRect=dj,e.matchesSelector=Vu,e.closest=oV,e.globalEvents={},e.version="1.10.27",e.scope=t,e.use=function(n,o){return this.scope.usePlugin(n,o),this},e.isSet=function(n,o){return!!this.scope.interactables.get(n,o&&o.context)},e.on=Xg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.on(s,r,i);return this}if(qe.object(o)){for(const s in o)this.on(s,o[s],r);return this}return A0(o,this.scope.actions)?this.globalEvents[o]?this.globalEvents[o].push(r):this.globalEvents[o]=[r]:this.scope.events.add(this.scope.document,o,r,{options:i}),this},"The interact.on() method is being deprecated"),e.off=Xg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.off(s,r,i);return this}if(qe.object(o)){for(const s in o)this.off(s,o[s],r);return this}if(A0(o,this.scope.actions)){let s;o in this.globalEvents&&(s=this.globalEvents[o].indexOf(r))!==-1&&this.globalEvents[o].splice(s,1)}else this.scope.events.remove(this.scope.document,o,r,i);return this},"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return Ur.supportsTouch},e.supportsPointerEvent=function(){return Ur.supportsPointerEvent},e.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},e.pointerMoveTolerance=function(n){return qe.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(n,o){this.scope.addDocument(n,o)},e.removeDocument=function(n){this.scope.removeDocument(n)},e}class gbe{constructor(){this.id=`__interact_scope_${Math.floor(Math.random()*100)}`,this.isInitialized=!1,this.listenerMaps=[],this.browser=Ur,this.defaults=k0(gV),this.Eventable=nV,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=mbe(this),this.InteractEvent=bj,this.Interactable=void 0,this.interactables=new pbe(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=n=>this.removeDocument(n.target);const e=this;this.Interactable=class extends hbe{get _defaults(){return e.defaults}set(n){return super.set(n),e.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=e.interactables.list.indexOf(this);n<0||(e.interactables.list.splice(n,1),e.fire("interactable:unset",{interactable:this}))}}}addListeners(e,n){this.listenerMaps.push({id:n,map:e})}fire(e,n){for(const{map:{[e]:o}}of this.listenerMaps)if(o&&o(n,this,e)===!1)return!1}init(e){return this.isInitialized?this:vbe(this,e)}pluginIsInstalled(e){const{id:n}=e;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}usePlugin(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){let o=0;const r=this.listenerMaps.length,i=e.before.reduce((s,a)=>(s[a]=!0,s[wV(a)]=!0,s),{});for(;o<r;o++){const s=this.listenerMaps[o].id;if(s&&(i[s]||i[wV(s)]))break}this.listenerMaps.splice(o,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}addDocument(e,n){if(this.getDocIndex(e)!==-1)return!1;const o=wc(e);n=n?os({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(o,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:o,scope:this,options:n})}removeDocument(e){const n=this.getDocIndex(e),o=wc(e),r=this.documents[n].options;this.events.remove(o,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:o,scope:this,options:r})}getDocIndex(e){for(let n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}getDocOptions(e){const n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}now(){return(this.window.Date||Date).now()}}function vbe(t,e){return t.isInitialized=!0,qe.window(e)&&J5(e),$o.init(e),Ur.init(e),dp.init(e),t.window=e,t.document=e.document,t.usePlugin(dbe),t.usePlugin(Zve),t}function wV(t){return t&&t.replace(/\/.*$/,"")}const CV=new gbe,Lu=CV.interactStatic,bbe=typeof globalThis<"u"?globalThis:window;CV.init(bbe);function ybe(t){const{Interactable:e}=t;e.prototype.getAction=function(o,r,i,s){const a=xbe(this,r,i,s,t);return this.options.actionChecker?this.options.actionChecker(o,r,a,this,s,i):a},e.prototype.ignoreFrom=Xg(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Xg(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Cbe,e.prototype.styleCursor=wbe}function xbe(t,e,n,o,r){const i=t.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],a={action:null,interactable:t,interaction:n,element:o,rect:i,buttons:s};return r.fire("auto-start:check",a),a.action}function wbe(t){return qe.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Cbe(t){return qe.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var kbe={id:"auto-start/interactableMethods",install:ybe};function Sbe(t){const{interactStatic:e,defaults:n}=t;t.usePlugin(kbe),n.base.actionChecker=null,n.base.styleCursor=!0,os(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=o=>EV(o,t),t.autoStart={maxInteractions:1/0,withinInteractionLimit:O0,cursorElement:null}}function jbe(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.interacting())return;const s=SV(n,o,r,i,e);jV(n,s,e)}function Ebe(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.pointerType!=="mouse"||n.pointerIsDown||n.interacting())return;const s=SV(n,o,r,i,e);jV(n,s,e)}function Abe(t,e){const{interaction:n}=t;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;e.fire("autoStart:before-start",t);const{interactable:o}=n,r=n.prepared.name;r&&o&&(o.options[r].manualStart||!O0(o,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,o,n.element),AV(n,e)))}function Obe(t,e){let{interaction:n}=t;const{interactable:o}=n;o&&o.options.styleCursor&&wj(n.element,"",e)}function kV(t,e,n,o,r){return e.testIgnoreAllow(e.options[t.name],n,o)&&e.options[t.name].enabled&&O0(e,n,t,r)?t:null}function Tbe(t,e,n,o,r,i,s){for(let a=0,l=o.length;a<l;a++){const c=o[a],u=r[a],h=c.getAction(e,n,t,u);if(!h)continue;const p=kV(h,c,u,i,s);if(p)return{action:p,interactable:c,element:u}}return{action:null,interactable:null,element:null}}function SV(t,e,n,o,r){let i=[],s=[],a=o;function l(c){i.push(c),s.push(a)}for(;qe.element(a);){i=[],s=[],r.interactables.forEachMatch(a,l);const c=Tbe(t,e,n,i,s,o,r);if(c.action&&!c.interactable.options[c.action.name].manualStart)return c;a=md(a)}return{action:null,interactable:null,element:null}}function jV(t,e,n){let{action:o,interactable:r,element:i}=e;o=o||{name:null},t.interactable=r,t.element=i,hV(t.prepared,o),t.rect=r&&o.name?r.getRect(i):null,AV(t,n),n.fire("autoStart:prepared",{interaction:t})}function O0(t,e,n,o){const r=t.options,i=r[n.name].max,s=r[n.name].maxPerElement,a=o.autoStart.maxInteractions;let l=0,c=0,u=0;if(!(i&&s&&a))return!1;for(const h of o.interactions.list){const p=h.prepared.name;if(h.interacting()){if(l++,l>=a)return!1;if(h.interactable===t&&(c+=p===n.name?1:0,c>=i||h.element===e&&(u++,p===n.name&&u>=s)))return!1}}return a>0}function EV(t,e){return qe.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function wj(t,e,n){const{cursorElement:o}=n.autoStart;o&&o!==t&&(o.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function AV(t,e){const{interactable:n,element:o,prepared:r}=t;if(!(t.pointerType==="mouse"&&n&&n.options.styleCursor)){e.autoStart.cursorElement&&wj(e.autoStart.cursorElement,"",e);return}let i="";if(r.name){const s=n.options[r.name].cursorChecker;qe.func(s)?i=s(r,n,o,t._interacting):i=e.actions.map[r.name].getCursor(r)}wj(t.element,i||"",e)}const Cj={id:"auto-start/base",before:["actions"],install:Sbe,listeners:{"interactions:down":jbe,"interactions:move":(t,e)=>{Ebe(t,e),Abe(t,e)},"interactions:stop":Obe},maxInteractions:EV,withinInteractionLimit:O0,validateAction:kV};function Mbe(t,e){let{interaction:n,eventTarget:o,dx:r,dy:i}=t;if(n.prepared.name!=="drag")return;const s=Math.abs(r),a=Math.abs(i),l=n.interactable.options.drag,c=l.startAxis,u=s>a?"x":s<a?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?u[0]:l.lockAxis,u!=="xy"&&c!=="xy"&&c!==u){n.prepared.name=null;let h=o;const p=function(m){if(m===n.interactable)return;const g=n.interactable.options.drag;if(!g.manualStart&&m.testIgnoreAllow(g,h,o)){const v=m.getAction(n.downPointer,n.downEvent,n,h);if(v&&v.name==="drag"&&Nbe(u,m)&&Cj.validateAction(v,m,h,o,e))return m}};for(;qe.element(h);){const m=e.interactables.forEachMatch(h,p);if(m){n.prepared.name="drag",n.interactable=m,n.element=h;break}h=md(h)}}}function Nbe(t,e){if(!e)return!1;const n=e.options.drag.startAxis;return t==="xy"||n==="xy"||n===t}var Pbe={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":Mbe}};function Dbe(t){const{defaults:e}=t;t.usePlugin(Cj),e.perAction.hold=0,e.perAction.delay=0}function kj(t){const e=t.prepared&&t.prepared.name;if(!e)return null;const n=t.interactable.options;return n[e].hold||n[e].delay}const Rbe={id:"auto-start/hold",install:Dbe,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoStartHoldTimer=null},"autoStart:prepared":t=>{let{interaction:e}=t;const n=kj(e);n>0&&(e.autoStartHoldTimer=setTimeout(()=>{e.start(e.prepared,e.interactable,e.element)},n))},"interactions:move":t=>{let{interaction:e,duplicate:n}=t;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":t=>{let{interaction:e}=t;kj(e)>0&&(e.prepared.name=null)}},getHoldDuration:kj};var Ibe={id:"auto-start",install(t){t.usePlugin(Cj),t.usePlugin(Rbe),t.usePlugin(Pbe)}};Lu.use(Ibe);function Vbe(t){const{defaults:e,actions:n}=t;t.autoScroll=yn,yn.now=()=>t.now(),n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=yn.defaults}const yn={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start(t){yn.isScrolling=!0,dp.cancel(yn.i),t.autoScroll=yn,yn.interaction=t,yn.prevTime=yn.now(),yn.i=dp.request(yn.scroll)},stop(){yn.isScrolling=!1,yn.interaction&&(yn.interaction.autoScroll=null),dp.cancel(yn.i)},scroll(){const{interaction:t}=yn,{interactable:e,element:n}=t,o=t.prepared.name,r=e.options[o].autoScroll,i=OV(r.container,e,n),s=yn.now(),a=(s-yn.prevTime)/1e3,l=r.speed*a;if(l>=1){const c={x:yn.x*l,y:yn.y*l};if(c.x||c.y){const u=TV(i);qe.window(i)?i.scrollBy(c.x,c.y):i&&(i.scrollLeft+=c.x,i.scrollTop+=c.y);const h=TV(i),p={x:h.x-u.x,y:h.y-u.y};(p.x||p.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:p,interaction:t,container:i})}yn.prevTime=s}yn.isScrolling&&(dp.cancel(yn.i),yn.i=dp.request(yn.scroll))},check(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove(t){let{interaction:e,pointer:n}=t;if(!(e.interacting()&&yn.check(e.interactable,e.prepared.name)))return;if(e.simulation){yn.x=yn.y=0;return}let o,r,i,s;const{interactable:a,element:l}=e,c=e.prepared.name,u=a.options[c].autoScroll,h=OV(u.container,a,l);if(qe.window(h))s=n.clientX<yn.margin,o=n.clientY<yn.margin,r=n.clientX>h.innerWidth-yn.margin,i=n.clientY>h.innerHeight-yn.margin;else{const p=dj(h);s=n.clientX<p.left+yn.margin,o=n.clientY<p.top+yn.margin,r=n.clientX>p.right-yn.margin,i=n.clientY>p.bottom-yn.margin}yn.x=r?1:s?-1:0,yn.y=i?1:o?-1:0,yn.isScrolling||(yn.margin=u.margin,yn.speed=u.speed,yn.start(e))}};function OV(t,e,n){return(qe.string(t)?pV(t,e,n):t)||wc(n)}function TV(t){return qe.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}const Bbe={id:"auto-scroll",install:Vbe,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoScroll=null},"interactions:destroy":t=>{let{interaction:e}=t;e.autoScroll=null,yn.stop(),yn.interaction&&(yn.interaction=null)},"interactions:stop":yn.stop,"interactions:action-move":t=>yn.onInteractionMove(t)}};Lu.use(Bbe);function Lbe(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.draggable=Jg.draggable,e.map.drag=Jg,e.methodDict.drag="draggable",o.actions.drag=Jg.defaults}function Sj(t){let{interaction:e}=t;if(e.prepared.name!=="drag")return;const n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}function MV(t){let{iEvent:e,interaction:n}=t;if(n.prepared.name!=="drag")return;const o=n.prepared.axis;if(o==="x"||o==="y"){const r=o==="x"?"y":"x";e.page[r]=n.coords.start.page[r],e.client[r]=n.coords.start.client[r],e.delta[r]=0}}const Jg={id:"actions/drag",install:Lbe,listeners:{"interactions:before-action-move":Sj,"interactions:action-resume":Sj,"interactions:action-move":MV,"auto-start:check":t=>{const{interaction:e,interactable:n,buttons:o}=t,r=n.options.drag;if(!(!(r&&r.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&(o&n.options.drag.mouseButtons)===0))return t.action={name:"drag",axis:r.lockAxis==="start"?r.startAxis:r.lockAxis},!1}},draggable:function(e){return qe.object(e)?(this.options.drag.enabled=e.enabled!==!1,this.setPerAction("drag",e),this.setOnEvents("drag",e),/^(xy|x|y|start)$/.test(e.lockAxis)&&(this.options.drag.lockAxis=e.lockAxis),/^(xy|x|y)$/.test(e.startAxis)&&(this.options.drag.startAxis=e.startAxis),this):qe.bool(e)?(this.options.drag.enabled=e,this):this.options.drag},beforeMove:Sj,move:MV,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"},filterEventType:t=>t.search("drag")===0};Lu.use(Jg);class kc extends vj{constructor(e,n,o){super(n._interaction),this.dropzone=void 0,this.dragEvent=void 0,this.relatedTarget=void 0,this.draggable=void 0,this.propagationStopped=!1,this.immediatePropagationStopped=!1;const{element:r,dropzone:i}=o==="dragleave"?e.prev:e.cur;this.type=o,this.target=r,this.currentTarget=r,this.dropzone=i,this.dragEvent=n,this.relatedTarget=n.target,this.draggable=n.interactable,this.timeStamp=n.timeStamp}reject(){const{dropState:e}=this._interaction;if(!(this.type!=="dropactivate"&&(!this.dropzone||e.cur.dropzone!==this.dropzone||e.cur.element!==this.target)))if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){const n=e.activeDrops,o=Gg(n,i=>{let{dropzone:s,element:a}=i;return s===this.dropzone&&a===this.target});e.activeDrops.splice(o,1);const r=new kc(e,this.dragEvent,"dropdeactivate");r.dropzone=this.dropzone,r.target=this.target,this.dropzone.fire(r)}else this.dropzone.fire(new kc(e,this.dragEvent,"dragleave"))}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}function Fbe(t){const{actions:e,interactStatic:n,Interactable:o,defaults:r}=t;t.usePlugin(Jg),o.prototype.dropzone=function(i){return _be(this,i)},o.prototype.dropCheck=function(i,s,a,l,c,u){return Ube(this,i,s,a,l,c,u)},n.dynamicDrop=function(i){return qe.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},os(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=RV.defaults}function zbe(t,e){let{interactables:n}=t;const o=[];for(const r of n.list){if(!r.options.drop.enabled)continue;const i=r.options.drop.accept;if(!(qe.element(i)&&i!==e||qe.string(i)&&!Vu(e,i)||qe.func(i)&&!i({dropzone:r,draggableElement:e})))for(const s of r.getAllElements())s!==e&&o.push({dropzone:r,element:s,rect:r.getRect(s)})}return o}function NV(t,e){for(const{dropzone:n,element:o}of t.slice())e.dropzone=n,e.target=o,n.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}function jj(t,e){const n=zbe(t,e);for(const o of n)o.rect=o.dropzone.getRect(o.element);return n}function PV(t,e,n){let{dropState:o,interactable:r,element:i}=t;const s=[];for(const{dropzone:l,element:c,rect:u}of o.activeDrops){const h=l.dropCheck(e,n,r,i,c,u);s.push(h?c:null)}const a=Vve(s);return o.activeDrops[a]||null}function Ej(t,e,n){const o=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(r.activate=new kc(o,n,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),n.type==="dragend"&&(r.deactivate=new kc(o,n,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),o.rejected||(o.cur.element!==o.prev.element&&(o.prev.dropzone&&(r.leave=new kc(o,n,"dragleave"),n.dragLeave=r.leave.target=o.prev.element,n.prevDropzone=r.leave.dropzone=o.prev.dropzone),o.cur.dropzone&&(r.enter=new kc(o,n,"dragenter"),n.dragEnter=o.cur.element,n.dropzone=o.cur.dropzone)),n.type==="dragend"&&o.cur.dropzone&&(r.drop=new kc(o,n,"drop"),n.dropzone=o.cur.dropzone,n.relatedTarget=o.cur.element),n.type==="dragmove"&&o.cur.dropzone&&(r.move=new kc(o,n,"dropmove"),n.dropzone=o.cur.dropzone)),r}function Aj(t,e){const n=t.dropState,{activeDrops:o,cur:r,prev:i}=n;e.leave&&i.dropzone.fire(e.leave),e.enter&&r.dropzone.fire(e.enter),e.move&&r.dropzone.fire(e.move),e.drop&&r.dropzone.fire(e.drop),e.deactivate&&NV(o,e.deactivate),n.prev.dropzone=r.dropzone,n.prev.element=r.element}function DV(t,e){let{interaction:n,iEvent:o,event:r}=t;if(o.type!=="dragmove"&&o.type!=="dragend")return;const i=n.dropState;e.dynamicDrop&&(i.activeDrops=jj(e,n.element));const s=o,a=PV(n,s,r);i.rejected=i.rejected&&!!a&&a.dropzone===i.cur.dropzone&&a.element===i.cur.element,i.cur.dropzone=a&&a.dropzone,i.cur.element=a&&a.element,i.events=Ej(n,r,s)}function _be(t,e){if(qe.object(e)){if(t.options.drop.enabled=e.enabled!==!1,e.listeners){const n=hd(e.listeners),o=Object.keys(n).reduce((i,s)=>{const a=/^(enter|leave)/.test(s)?`drag${s}`:/^(activate|deactivate|move)/.test(s)?`drop${s}`:s;return i[a]=n[s],i},{}),r=t.options.drop.listeners;r&&t.off(r),t.on(o),t.options.drop.listeners=o}return qe.func(e.ondrop)&&t.on("drop",e.ondrop),qe.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),qe.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),qe.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),qe.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),qe.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:qe.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return qe.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}function Ube(t,e,n,o,r,i,s){let a=!1;if(!(s=s||t.getRect(i)))return t.options.drop.checker?t.options.drop.checker(e,n,a,t,i,o,r):!1;const l=t.options.drop.overlap;if(l==="pointer"){const u=mV(o,r,"drag"),h=uV(e);h.x+=u.x,h.y+=u.y;const p=h.x>s.left&&h.x<s.right,m=h.y>s.top&&h.y<s.bottom;a=p&&m}const c=o.getRect(r);if(c&&l==="center"){const u=c.left+c.width/2,h=c.top+c.height/2;a=u>=s.left&&u<=s.right&&h>=s.top&&h<=s.bottom}return c&&qe.number(l)&&(a=Math.max(0,Math.min(s.right,c.right)-Math.max(s.left,c.left))*Math.max(0,Math.min(s.bottom,c.bottom)-Math.max(s.top,c.top))/(c.width*c.height)>=l),t.options.drop.checker&&(a=t.options.drop.checker(e,n,a,t,i,o,r)),a}const RV={id:"actions/drop",install:Fbe,listeners:{"interactions:before-action-start":t=>{let{interaction:e}=t;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":(t,e)=>{let{interaction:n,event:o,iEvent:r}=t;if(n.prepared.name!=="drag")return;const i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=jj(e,n.element),i.events=Ej(n,o,r),i.events.activate&&(NV(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))},"interactions:action-move":DV,"interactions:after-action-move":(t,e)=>{let{interaction:n,iEvent:o}=t;if(n.prepared.name!=="drag")return;const r=n.dropState;Aj(n,r.events),e.fire("actions/drop:move",{interaction:n,dragEvent:o}),r.events={}},"interactions:action-end":(t,e)=>{if(t.interaction.prepared.name!=="drag")return;const{interaction:n,iEvent:o}=t;DV(t,e),Aj(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:o})},"interactions:stop":t=>{let{interaction:e}=t;if(e.prepared.name!=="drag")return;const{dropState:n}=e;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}},getActiveDrops:jj,getDrop:PV,getDropEvents:Ej,fireDropEvents:Aj,filterEventType:t=>t.search("drag")===0||t.search("drop")===0,defaults:{enabled:!1,accept:null,overlap:"pointer"}};Lu.use(RV);const T0=".widget-panel .flame-fw-palette-drag-source",Oj="[data-palette-drop-form]",IV="[data-palette-drop-group]",Wbe="flame-fw-palette-interact-dragging";function Tj(t){typeof document>"u"||document.documentElement.classList.toggle(Wbe,t)}function Qg(t){const e=t;return e!=null&&e.closest?e.closest(T0):null}function Hbe(t){const e=t.dragEvent;if(e&&typeof e.clientX=="number"&&typeof e.clientY=="number"&&Number.isFinite(e.clientX)&&Number.isFinite(e.clientY))return{x:e.clientX,y:e.clientY};const n=t.client;return n&&typeof n.x=="number"&&typeof n.y=="number"&&Number.isFinite(n.x)&&Number.isFinite(n.y)?{x:n.x,y:n.y}:{x:NaN,y:NaN}}function VV(t,e,n){const o=Hbe(t);return e.valid&&Number.isFinite(e.x)&&Number.isFinite(e.y)?{x:e.x,y:e.y}:Number.isFinite(o.x)&&Number.isFinite(o.y)?{x:o.x,y:o.y}:n.ok?{x:n.x,y:n.y}:o}function Gbe(t,e,n){const o=document.elementsFromPoint(t,e);return n?o.filter(r=>r instanceof Element?!(r===n||n.contains(r)):!1):o}function Kbe(t){if(!t)return{};if("kind"in t&&t.kind==="custom"){const n=t;return{kind:"custom",gridW:n.gridW,gridH:n.gridH}}const e=t;return{type:e.type,kind:e.kind,gridW:e.gridW,gridH:e.gridH}}function Ybe(t){Lu.dynamicDrop(!0);let e=null;const n=new WeakMap,o={x:0,y:0,valid:!1},r={x:0,y:0,ok:!1};let i=null;const s={capture:!0,passive:!1};function a(k,C){e&&(!Number.isFinite(k)||!Number.isFinite(C)||(o.x=k,o.y=C,o.valid=!0,r.x=k,r.y=C,r.ok=!0,m(k,C,e.el)))}function l(k){a(k.clientX,k.clientY)}function c(k){const C=k.touches[0]??k.changedTouches[0];C&&a(C.clientX,C.clientY)}function u(k){k.preventDefault()}function h(){document.addEventListener("pointermove",l,!0),document.addEventListener("touchmove",c,s),document.addEventListener("selectstart",u,!0)}function p(){document.removeEventListener("pointermove",l,!0),document.removeEventListener("touchmove",c,s),document.removeEventListener("selectstart",u,!0)}const m=(k,C,x)=>{var O,M;if(!t.updatePreview)return;if(!Number.isFinite(k)||!Number.isFinite(C)){(O=t.clearPreview)==null||O.call(t);return}const S=x===(e==null?void 0:e.el)?e.origin:void 0,A=Kbe(S),P=Gbe(k,C,x);for(const D of P){if(!(D instanceof Element))continue;const I=D.closest(Oj);if(I instanceof HTMLElement&&I.dataset.paletteDropForm){t.updatePreview({formChildId:I.dataset.paletteDropForm,dragged:A,originalEvent:{clientX:k,clientY:C},sortableToEl:I,clientX:k,clientY:C});return}}(M=t.clearPreview)==null||M.call(t)},g=Lu(T0).draggable({inertia:!1,listeners:{start(k){e=null,o.valid=!1,r.ok=!1;const C=Qg(k.target);if(!C)return;const x=C.getAttribute("data-fw-palette-source"),S=x?t.resolvePaletteBySource(x):null;S&&(e={el:C,origin:S}),n.set(C,{x:0,y:0}),Tj(!0),h()},move(k){var S,A;const C=Qg(k.target);if(!C)return;const x=n.get(C);x&&(x.x+=k.dx,x.y+=k.dy,C.style.transform=`translate(${x.x}px, ${x.y}px)`,C.style.zIndex="10010"),!o.valid&&Number.isFinite((S=k.client)==null?void 0:S.x)&&Number.isFinite((A=k.client)==null?void 0:A.y)&&(o.x=k.client.x,o.y=k.client.y,o.valid=!0,m(k.client.x,k.client.y,C))},end(k){p();const C=Qg(k.target),x=e;C&&(C.style.transform="",C.style.zIndex="",n.delete(C)),i!=null&&clearTimeout(i),i=setTimeout(()=>{var S;i=null,Tj(!1),e===x&&(e=null,o.valid=!1,r.ok=!1),(S=t.clearPreview)==null||S.call(t)},0)}}}),v=k=>{var V,N,T;const C=k.target,x=(V=C.closest)==null?void 0:V.call(C,Oj);if(!Qg(k.relatedTarget)||!((N=x==null?void 0:x.dataset)!=null&&N.paletteDropForm))return;const A=e==null?void 0:e.origin;if(!A)return;const P=t.clonePaletteItem(A),{x:O,y:M}=VV(k,o,r),D=x.dataset.paletteDropForm,I=t.findFormShellById(D);I&&t.onInteractDrop(I.formItem,P,x,O,M),(T=t.clearPreview)==null||T.call(t)},b=k=>{var V,N,T;const C=k.target,x=(V=C.closest)==null?void 0:V.call(C,IV);if(!Qg(k.relatedTarget)||!((N=x==null?void 0:x.dataset)!=null&&N.paletteDropGroup))return;const A=e==null?void 0:e.origin;if(!A)return;const P=t.clonePaletteItem(A),{x:O,y:M}=VV(k,o,r),D=x.dataset.paletteDropGroup,I=t.findGroupById(D);I&&t.onInteractDrop(I,P,x,O,M),(T=t.clearPreview)==null||T.call(t)},y=Lu(Oj).dropzone({accept:T0,overlap:.15,listeners:{drop:v}}),w=Lu(IV).dropzone({accept:T0,overlap:.15,listeners:{drop:b}});return()=>{var k;i!=null&&(clearTimeout(i),i=null),Tj(!1),p(),g.unset(),y.unset(),w.unset(),(k=t.clearPreview)==null||k.call(t)}}const Xbe={class:"framework-lr"},Jbe=f.defineComponent({name:"FlameFramework"}),Qbe=f.defineComponent({...Jbe,props:{componentGroups:{default:()=>[]},componentList:{default:()=>[]},hideBasicWidgets:{type:Boolean,default:!1},formPublished:{type:Boolean,default:!1}},emits:["save","reset"],setup(t,{expose:e,emit:n}){const o=t,r=f.computed(()=>{const wt=o.componentGroups;if(wt&&wt.length)return wt;const Ze=o.componentList||[];return Ze.length?[{title:"组件库",items:Ze.map(gt=>({kind:"basic",key:gt.key,label:gt.label,icon:gt.icon,type:gt.type,defaultConfig:gt.defaultConfig,defaultFormItem:gt.defaultFormItem,disabledConfig:gt.disabledConfig}))}]:[]}),i=n,s={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}},a=f.ref([{...s.submit},{...s.cancel},{...s.reset}]),l=f.computed(()=>K5(r.value).otherGroups),c=f.computed(()=>o.hideBasicWidgets?[]:[...K5(r.value).presetItems.map(gt=>Tve(gt)),...vfe]),u=f.ref(gfe),h=f.ref([]),p=f.ref([]),m=f.ref([]),g=f.ref([]),v=f.ref([]),b=f.ref(0),y=f.ref(null),w=f.ref(null),k=f.ref(null),C=f.ref(!1),x=f.ref(null),{selectedItem:S,selectFormChild:A,onGridWidgetCapture:P}=Ove(v,a,w,k,x),{getGroupChildType:O,setGroupChildType:M,createGroupChildByType:D,addGroupByContainerType:I,selectedGroupFormConfig:V}=jve(v,w,x),{buildFrameworkConfig:N,validateLayoutBeforeSave:T,parseConfigToLayout:B,snapshotControlConfig:_}=Sve(v,a),R=f.ref({groups:[],buttons:[]}),{onOpenPreview:E,onSaveConfig:U,onResetConfig:Q,onCopyWidget:K,onDeleteWidget:W,onCopyFormChild:Y,onCopyFormChildToGroup:$,onDeleteFormChild:ve,onAutoCompactInner:xe,onSelectGlobalButton:ge,onSelectGlobalButtonsBar:q,addGlobalButton:me,removeGlobalButton:re}=Eve(v,w,x,k,a,R,C,{buildFrameworkConfig:N,validateLayoutBeforeSave:T,compactInnerFormLayout:F1,parseConfigToLayout:B,snapshotControlConfig:_,getNextGridPosition:L1,getNextInnerGridPosition:mg,selectFormChild:A,onSave:wt=>i("save",wt),onReset:()=>i("reset"),getDefaultLayout:bfe,DEFAULT_BUTTONS:s}),{onDropFromPalette:j,onInteractDropToFormInner:oe,onContainerDrop:Ee,onDropContainerInRoot:ie,onInnerLayoutUpdated:ae,findFormContainerForInnerControl:Ye,hydrateLayoutCustomFields:ut,hydrateLayoutPresetFields:Re}=Mve(v,w,x,k,p,g,m,r,A,D,I),lt=f.ref(null);let ze=null;function tt(wt){var Ze;if(wt.startsWith("b:")){const gt=parseInt(wt.slice(2),10),Dt=c.value;return Number.isFinite(gt)&&gt>=0&&gt<Dt.length?Dt[gt]:null}if(wt.startsWith("c:")){const gt=parseInt(wt.slice(2),10),Dt=h.value;return Number.isFinite(gt)&&gt>=0&&gt<Dt.length?Dt[gt]:null}if(wt.startsWith("g:")){const gt=wt.slice(2).split(":"),Dt=parseInt(gt[0],10),jn=parseInt(gt[1],10),mo=l.value[Dt];return((Ze=mo==null?void 0:mo.items)==null?void 0:Ze[jn])??null}return null}function Pt(wt){const Ze=v.value.find(gt=>gt.i===wt);return(Ze==null?void 0:Ze.nodeKind)==="group"?Ze:void 0}function Qe(wt){for(const Ze of v.value)if(!(Ze.nodeKind!=="group"||!Ze.children)){for(const gt of Ze.children)if(gt.i===wt&&(gt.nodeKind==="form"||gt.nodeKind==="subForm"))return{group:Ze,formItem:gt}}return null}function Vt(){ze==null||ze(),ze=null,lt.value&&(ze=Ybe({clonePaletteItem:W5,resolvePaletteBySource:tt,findGroupById:Pt,findFormShellById:Qe,onInteractDrop:oe,updatePreview:wt=>{var Ze,gt;return(gt=(Ze=y.value)==null?void 0:Ze.updatePaletteDropPreview)==null?void 0:gt.call(Ze,wt)},clearPreview:()=>{var wt,Ze;return(Ze=(wt=y.value)==null?void 0:wt.clearPaletteDropPreview)==null?void 0:Ze.call(wt)}}))}f.onMounted(()=>{f.nextTick(()=>Vt())}),f.watch(b,()=>{f.nextTick(()=>Vt())}),f.watch(()=>v.value.length,()=>{f.nextTick(()=>Vt())}),f.onBeforeUnmount(()=>{ze==null||ze(),ze=null});const G=f.computed(()=>cve(S.value)),{inputConfig:J,selectConfig:ee,inputNumberConfig:H,datePickerConfig:Z,timePickerConfig:se,timeSelectConfig:ye,cascaderConfig:le,checkboxConfig:pe,checkboxGroupConfig:_e,colorPickerConfig:He,radioConfig:Ge,rateConfig:Ne,sliderConfig:Ue,switchConfig:ct,transferConfig:At,buttonConfig:ht,dialogConfig:en,drawerConfig:gn,paginationConfig:kn,readConfig:Sn,alertConfig:zt,uploadConfig:Jn,uploadAcceptTypeOptions:Zt,timeConfig:bt,onFlmTimePresetChange:Nn,controlConfig:Xt,controlHasPlaceholder:wo,controlHasDisabled:Ro,controlHasClearable:jo}=Ave(S);function co(wt,Ze){return B5(Ze,wt==null?void 0:wt.disabledConfig)}function zo(wt){v.value=wt}return e({getConfig:()=>N(),setConfig:wt=>{if(!wt||typeof wt!="object")return;Array.isArray(wt.buttons)&&(a.value=wt.buttons.map(gt=>({...gt})));const Ze=B(wt);ut(Ze),Re(Ze),v.value=Ze,b.value++,w.value=null,k.value=null,x.value=null},getLayout:()=>v.value,setLayout:wt=>{Array.isArray(wt)&&wt.length&&(v.value=wt)}}),f.watch(()=>{const wt=x.value,Ze=S.value;return!wt||!Ze?"":`${wt.formId}\0${wt.childId}\0${Ze.w}\0${Ze.h}\0${Ze.x}\0${Ze.y}`},()=>{f.nextTick(()=>{const wt=x.value,Ze=S.value;if(!wt||!Ze)return;const gt=Ye(wt.formId,wt.childId);gt!=null&&gt.children&&UR(gt.children)&&F1(gt)})}),(wt,Ze)=>{const gt=f.resolveComponent("el-input"),Dt=f.resolveComponent("el-form-item"),jn=f.resolveComponent("el-option"),mo=f.resolveComponent("el-select"),Eo=f.resolveComponent("el-input-number"),Pe=f.resolveComponent("el-switch"),dn=f.resolveComponent("el-slider"),zn=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",{ref_key:"frameworkRootEl",ref:lt,class:"form-builder-framework"},[f.createElementVNode("div",Xbe,[f.createVNode(f.unref(Ide),{"container-widget-list":u.value,"basic-widget-list":c.value,"complex-widget-list":h.value,"component-groups":l.value,"clone-palette-item":f.unref(W5)},null,8,["container-widget-list","basic-widget-list","complex-widget-list","component-groups","clone-palette-item"]),(f.openBlock(),f.createBlock(f.unref(age),{ref_key:"formDesignAreaRef",ref:y,key:b.value,layout:v.value,"onUpdate:layout":zo,"drop-zone-list":p.value,"container-drop-list":m.value,"selected-id":w.value,"selected-form-child":x.value,"selected-global-button-index":k.value,"col-num":f.unref(ts),"row-height":f.unref(GR),"get-default-label":f.unref(z1),"get-default-config":f.unref(_1),"get-default-config-for-child":f.unref(p2),buttons:a.value,onDropFromPalette:f.unref(j),onInnerLayoutUpdated:f.unref(ae),onGridWidgetCapture:f.unref(P),onSelectFormChild:f.unref(A),onClearSelection:Ze[0]||(Ze[0]=Ve=>{w.value=null,x.value=null}),onOpenPreview:f.unref(E),onSave:f.unref(U),onReset:f.unref(Q),onCopyWidget:f.unref(K),onDeleteWidget:f.unref(W),onCopyFormChild:f.unref(Y),onCopyFormChildToGroup:f.unref($),onDeleteFormChild:f.unref(ve),onSelectGlobalButton:f.unref(ge),onSelectGlobalButtonsBar:f.unref(q),onDropContainer:f.unref(Ee),onDropContainerInRoot:f.unref(ie),onAutoCompactInner:f.unref(xe)},null,8,["layout","drop-zone-list","container-drop-list","selected-id","selected-form-child","selected-global-button-index","col-num","row-height","get-default-label","get-default-config","get-default-config-for-child","buttons","onDropFromPalette","onInnerLayoutUpdated","onGridWidgetCapture","onSelectFormChild","onOpenPreview","onSave","onReset","onCopyWidget","onDeleteWidget","onCopyFormChild","onCopyFormChildToGroup","onDeleteFormChild","onSelectGlobalButton","onSelectGlobalButtonsBar","onDropContainer","onDropContainerInRoot","onAutoCompactInner"])),f.createVNode(f.unref(xge),{"selected-item":f.unref(S),"groups-config":G.value},{base:f.withCtx(({model:Ve})=>[f.createVNode(zn,{size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(gt,{"model-value":Ve==null?void 0:Ve.i,disabled:""},null,8,["model-value"])]),_:2},1024),(Ve==null?void 0:Ve.nodeKind)==="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"分组名称"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.label,"onUpdate:modelValue":rt=>Ve.label=rt,placeholder:"请输入分组名称",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"分组类型"},{default:f.withCtx(()=>[f.createVNode(mo,{"model-value":f.unref(O)(Ve),placeholder:"选择类型",style:{width:"100%"},"onUpdate:modelValue":rt=>f.unref(M)(Ve,rt)},{default:f.withCtx(()=>[f.createVNode(jn,{label:"分组",value:"form"}),f.createVNode(jn,{label:"子项目",value:"subForm"}),f.createVNode(jn,{label:"自定义分组",value:"slot"})]),_:1},8,["model-value","onUpdate:modelValue"])]),_:2},1024),f.unref(V)&&f.unref(O)(Ve)!=="slot"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"标签位置"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(V)["label-position"],"onUpdate:modelValue":Ze[1]||(Ze[1]=rt=>f.unref(V)["label-position"]=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"左侧",value:"left"}),f.createVNode(jn,{label:"右侧",value:"right"}),f.createVNode(jn,{label:"顶部",value:"top"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:f.unref(V)["label-width"],"onUpdate:modelValue":Ze[2]||(Ze[2]=rt=>f.unref(V)["label-width"]=rt),placeholder:"如 80px、120",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"栅格列数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).gridColumns,"onUpdate:modelValue":Ze[3]||(Ze[3]=rt=>f.unref(V).gridColumns=rt),min:1,max:48,step:1,placeholder:"24","controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(V).size,"onUpdate:modelValue":Ze[4]||(Ze[4]=rt=>f.unref(V).size=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V).disabled,"onUpdate:modelValue":Ze[5]||(Ze[5]=rt=>f.unref(V).disabled=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"隐藏必填星号"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["hide-required-asterisk"],"onUpdate:modelValue":Ze[6]||(Ze[6]=rt=>f.unref(V)["hide-required-asterisk"]=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["show-message"],"onUpdate:modelValue":Ze[7]||(Ze[7]=rt=>f.unref(V)["show-message"]=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"行内校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["inline-message"],"onUpdate:modelValue":Ze[8]||(Ze[8]=rt=>f.unref(V)["inline-message"]=rt)},null,8,["modelValue"])]),_:1}),f.unref(O)(Ve)==="subForm"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"是否默认生成一项"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V).defaultGenerateOne,"onUpdate:modelValue":Ze[9]||(Ze[9]=rt=>f.unref(V).defaultGenerateOne=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"最小子项目数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).minItems,"onUpdate:modelValue":Ze[10]||(Ze[10]=rt=>f.unref(V).minItems=rt),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"最大子项目数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).maxItems,"onUpdate:modelValue":Ze[11]||(Ze[11]=rt=>f.unref(V).maxItems=rt),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),Ve&&Ve.nodeKind!=="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(Dt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.w,"onUpdate:modelValue":rt=>Ve.w=rt,min:f.unref(zR)(Ve),max:f.unref(ts),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(Dt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.h,"onUpdate:modelValue":rt=>Ve.h=rt,min:f.unref(_R)(Ve),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024)],64)):f.createCommentVNode("",!0)]),_:2},1024)]),slotConfig:f.withCtx(({model:Ve})=>[(Ve==null?void 0:Ve.nodeKind)==="slot"?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"left","label-width":"80px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"插槽名称 slotName",required:""},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.config.slotName,"onUpdate:modelValue":rt=>Ve.config.slotName=rt,placeholder:"如 header / footer / actions",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)):f.createCommentVNode("",!0)]),formItem:f.withCtx(({model:Ve})=>[Ve!=null&&Ve.formItem?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.label,"onUpdate:modelValue":rt=>Ve.formItem.label=rt,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.labelWidth,"onUpdate:modelValue":rt=>Ve.formItem.labelWidth=rt,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.showMessage,"onUpdate:modelValue":rt=>Ve.formItem.showMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.inlineMessage,"onUpdate:modelValue":rt=>Ve.formItem.inlineMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:Ve.formItem.size,"onUpdate:modelValue":rt=>Ve.formItem.size=rt,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(F5),{"form-item":Ve.formItem},null,8,["form-item"])]),_:2},1024)):f.createCommentVNode("",!0)]),baseSettings:f.withCtx(({model:Ve})=>[Ve?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(gt,{"model-value":Ve==null?void 0:Ve.i,disabled:""},null,8,["model-value"])]),_:2},1024),f.createVNode(Dt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.w,"onUpdate:modelValue":rt=>Ve.w=rt,min:f.unref(zR)(Ve),max:f.unref(ts),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(Dt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.h,"onUpdate:modelValue":rt=>Ve.h=rt,min:f.unref(_R)(Ve),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024),Ve!=null&&Ve.formItem?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[co(Ve,"label")?(f.openBlock(),f.createBlock(Dt,{key:0,label:"标签"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.label,"onUpdate:modelValue":rt=>Ve.formItem.label=rt,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"label-width")?(f.openBlock(),f.createBlock(Dt,{key:1,label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.labelWidth,"onUpdate:modelValue":rt=>Ve.formItem.labelWidth=rt,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"show-message")?(f.openBlock(),f.createBlock(Dt,{key:2,label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.showMessage,"onUpdate:modelValue":rt=>Ve.formItem.showMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"inline-message")?(f.openBlock(),f.createBlock(Dt,{key:3,label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.inlineMessage,"onUpdate:modelValue":rt=>Ve.formItem.inlineMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"form-item-size")?(f.openBlock(),f.createBlock(Dt,{key:4,label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:Ve.formItem.size,"onUpdate:modelValue":rt=>Ve.formItem.size=rt,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"rules")?(f.openBlock(),f.createBlock(f.unref(F5),{key:5,"form-item":Ve.formItem},null,8,["form-item"])):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),f.unref(Xt)&&(Ve==null?void 0:Ve.type)!=="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.unref(wo)&&co(Ve,"placeholder")?(f.openBlock(),f.createBlock(Dt,{key:0,label:"占位符"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:f.unref(Xt).placeholder,"onUpdate:modelValue":Ze[12]||(Ze[12]=rt=>f.unref(Xt).placeholder=rt),placeholder:"占位文案",clearable:""},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(Ro)&&co(Ve,"disabled")?(f.openBlock(),f.createBlock(Dt,{key:1,label:"禁用"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(Xt).disabled,"onUpdate:modelValue":Ze[13]||(Ze[13]=rt=>f.unref(Xt).disabled=rt)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(jo)&&co(Ve,"clearable")?(f.openBlock(),f.createBlock(Dt,{key:2,label:"可清空"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(Xt).clearable,"onUpdate:modelValue":Ze[14]||(Ze[14]=rt=>f.unref(Xt).clearable=rt)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),(Ve==null?void 0:Ve.type)==="flmInput"&&co(Ve,"size")?(f.openBlock(),f.createBlock(Dt,{key:3,label:"控件尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(Xt).size,"onUpdate:modelValue":Ze[15]||(Ze[15]=rt=>f.unref(Xt).size=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1})):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]),_:2},1024)):f.createCommentVNode("",!0)]),detailSettings:f.withCtx(({model:Ve})=>[(f.openBlock(),f.createBlock(f.unref(Hge),{key:Ve==null?void 0:Ve.i,model:Ve,"input-config":f.unref(J),"select-config":f.unref(ee),"input-number-config":f.unref(H),"date-picker-config":f.unref(Z),"time-picker-config":f.unref(se),"time-select-config":f.unref(ye),"cascader-config":f.unref(le),"checkbox-config":f.unref(pe),"checkbox-group-config":f.unref(_e),"color-picker-config":f.unref(He),"radio-config":f.unref(Ge),"rate-config":f.unref(Ne),"slider-config":f.unref(Ue),"switch-config":f.unref(ct),"transfer-config":f.unref(At),"button-config":f.unref(ht),"dialog-config":f.unref(en),"drawer-config":f.unref(gn),"pagination-config":f.unref(kn),"read-config":f.unref(Sn),"alert-config":f.unref(zt),"upload-config":f.unref(Jn),"upload-accept-type-options":f.unref(Zt),"time-config":f.unref(bt),"on-flm-time-preset-change":f.unref(Nn),"form-published":t.formPublished},null,8,["model","input-config","select-config","input-number-config","date-picker-config","time-picker-config","time-select-config","cascader-config","checkbox-config","checkbox-group-config","color-picker-config","radio-config","rate-config","slider-config","switch-config","transfer-config","button-config","dialog-config","drawer-config","pagination-config","read-config","alert-config","upload-config","upload-accept-type-options","time-config","on-flm-time-preset-change","form-published"]))]),globalButtons:f.withCtx(({model:Ve})=>[f.createVNode(f.unref(Qge),{buttons:a.value,"selected-index":k.value,onSelect:f.unref(ge),onRemove:f.unref(re),onAdd:f.unref(me)},null,8,["buttons","selected-index","onSelect","onRemove","onAdd"])]),_:1},8,["selected-item","groups-config"])]),f.createVNode(f.unref(fge),{modelValue:C.value,"onUpdate:modelValue":Ze[16]||(Ze[16]=Ve=>C.value=Ve),config:R.value},null,8,["modelValue","config"])],512)}}}),BV=wr(Qbe,[["__scopeId","data-v-3a9d92f2"]]),LV={flmButton:Ff,flmCascader:zf,flmCheckbox:hc,flmCheckboxGroup:$f,flmColorPicker:_f,flmDatePicker:i2,flmInput:xl,flmInputNumber:Uf,flmUpload:pc,flmPagination:hg,flmRadio:Wf,flmRate:Hf,flmRead:Su,flmAlert:mc,flmTime:Gf,flmSelect:Kf,flmSlider:Yf,flmSwitch:Xf,flmTimePicker:Jf,flmTimeSelect:Qf,flmTransfer:Zf,flmDialog:qf,flmCollapse:a2,FlmPrintTable:IR,FlmEditor:Il,FlmJsonEditor:e2,flmForm:Eu,flmTable:B1,flmSubForm:u2,flmDynamicForm:g2,FlmFormUploadImage:ju,flmSearch:b2,flmSearchSelect:v2,FlmToolbar:pg,flmReportPage:y2,flmExportPage:QR,FlameFramework:BV},Zbe={install:(t,e,n,o)=>{let r=LV;if(n&&(r=DE(r,n)),e&&e.forEach(i=>{t.use(i)}),o)for(const[i,s]of Object.entries(o))t.component(i,s);Object.entries(r).forEach(([i,s])=>t.component(i,s))},...LV};/*!
3929
+ `,M+="@keyframes "+P+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",A(M)}}function p(C){C.className+=" "+a+"_animation_active"}function m(C,x,S){if(C.addEventListener)C.addEventListener(x,S);else if(C.attachEvent)C.attachEvent("on"+x,S);else return e.error("[scroll] Don't know how to add event listeners.")}function g(C,x,S){if(C.removeEventListener)C.removeEventListener(x,S);else if(C.detachEvent)C.detachEvent("on"+x,S);else return e.error("[scroll] Don't know how to remove event listeners.")}function v(C){return o(C).container.childNodes[0].childNodes[0].childNodes[0]}function b(C){return o(C).container.childNodes[0].childNodes[0].childNodes[1]}function y(C,x){var S=o(C).listeners;if(!S.push)throw new Error("Cannot add listener to an element that is not detectable.");o(C).listeners.push(x)}function w(C,x,S){S||(S=x,x=C,C=null),C=C||{};function A(){if(C.debug){var q=Array.prototype.slice.call(arguments);if(q.unshift(r.get(x),"Scroll: "),e.log.apply)e.log.apply(null,q);else for(var me=0;me<q.length;me++)e.log(q[me])}}function P(q){function me(re){var j=re.getRootNode&&re.getRootNode().contains(re);return re===re.ownerDocument.body||re.ownerDocument.body.contains(re)||j}return!me(q)||window.getComputedStyle(q)===null}function O(q){var me=o(q).container.childNodes[0],re=window.getComputedStyle(me);return!re.width||re.width.indexOf("px")===-1}function M(){var q=window.getComputedStyle(x),me={};return me.position=q.position,me.width=x.offsetWidth,me.height=x.offsetHeight,me.top=q.top,me.right=q.right,me.bottom=q.bottom,me.left=q.left,me.widthCSS=q.width,me.heightCSS=q.height,me}function D(){var q=M();o(x).startSize={width:q.width,height:q.height},A("Element start size",o(x).startSize)}function I(){o(x).listeners=[]}function V(){if(A("storeStyle invoked."),!o(x)){A("Aborting because element has been uninstalled");return}var q=M();o(x).style=q}function N(q,me,re){o(q).lastWidth=me,o(q).lastHeight=re}function T(q){return v(q).childNodes[0]}function B(){return 2*i.width+1}function _(){return 2*i.height+1}function R(q){return q+10+B()}function E(q){return q+10+_()}function U(q){return q*2+B()}function Q(q){return q*2+_()}function K(q,me,re){var j=v(q),oe=b(q),Ee=R(me),ie=E(re),ae=U(me),Ye=Q(re);j.scrollLeft=Ee,j.scrollTop=ie,oe.scrollLeft=ae,oe.scrollTop=Ye}function W(){var q=o(x).container;if(!q){q=document.createElement("div"),q.className=a,q.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(x).container=q,p(q),x.appendChild(q);var me=function(){o(x).onRendered&&o(x).onRendered()};m(q,"animationstart",me),o(x).onAnimationStart=me}return q}function Y(){function q(){var ee=o(x).style;if(ee.position==="static"){x.style.setProperty("position","relative",C.important?"important":"");var H=function(Z,se,ye,le){function pe(He){return He.replace(/[^-\d\.]/g,"")}var _e=ye[le];_e!=="auto"&&pe(_e)!=="0"&&(Z.warn("An element that is positioned static has style."+le+"="+_e+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+le+" will be set to 0. Element: ",se),se.style[le]=0)};H(e,x,ee,"top"),H(e,x,ee,"right"),H(e,x,ee,"bottom"),H(e,x,ee,"left")}}function me(ee,H,Z,se){return ee=ee?ee+"px":"0",H=H?H+"px":"0",Z=Z?Z+"px":"0",se=se?se+"px":"0",["left: "+ee,"top: "+H,"right: "+se,"bottom: "+Z]}if(A("Injecting elements"),!o(x)){A("Aborting because element has been uninstalled");return}q();var re=o(x).container;re||(re=W());var j=i.width,oe=i.height,Ee=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),ie=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(me(-(1+j),-(1+oe),-oe,-j))),ae=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),Ye=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),ut=c(["position: absolute","left: 0","top: 0"]),Re=c(["position: absolute","width: 200%","height: 200%"]),lt=document.createElement("div"),ze=document.createElement("div"),tt=document.createElement("div"),Pt=document.createElement("div"),Qe=document.createElement("div"),Vt=document.createElement("div");lt.dir="ltr",lt.style.cssText=Ee,lt.className=a,ze.className=a,ze.style.cssText=ie,tt.style.cssText=ae,Pt.style.cssText=ut,Qe.style.cssText=Ye,Vt.style.cssText=Re,tt.appendChild(Pt),Qe.appendChild(Vt),ze.appendChild(tt),ze.appendChild(Qe),lt.appendChild(ze),re.appendChild(lt);function G(){var ee=o(x);ee&&ee.onExpand?ee.onExpand():A("Aborting expand scroll handler: element has been uninstalled")}function J(){var ee=o(x);ee&&ee.onShrink?ee.onShrink():A("Aborting shrink scroll handler: element has been uninstalled")}m(tt,"scroll",G),m(Qe,"scroll",J),o(x).onExpandScroll=G,o(x).onShrinkScroll=J}function $(){function q(ae,Ye,ut){var Re=T(ae),lt=R(Ye),ze=E(ut);Re.style.setProperty("width",lt+"px",C.important?"important":""),Re.style.setProperty("height",ze+"px",C.important?"important":"")}function me(ae){var Ye=x.offsetWidth,ut=x.offsetHeight,Re=Ye!==o(x).lastWidth||ut!==o(x).lastHeight;A("Storing current size",Ye,ut),N(x,Ye,ut),n.add(0,function(){if(Re){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}if(C.debug){var lt=x.offsetWidth,ze=x.offsetHeight;(lt!==Ye||ze!==ut)&&e.warn(r.get(x),"Scroll: Size changed before updating detector elements.")}q(x,Ye,ut)}}),n.add(1,function(){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}K(x,Ye,ut)}),Re&&ae&&n.add(2,function(){if(!o(x)){A("Aborting because element has been uninstalled");return}if(!re()){A("Aborting because element container has not been initialized");return}ae()})}function re(){return!!o(x).container}function j(){function ae(){return o(x).lastNotifiedWidth===void 0}A("notifyListenersIfNeeded invoked");var Ye=o(x);if(ae()&&Ye.lastWidth===Ye.startSize.width&&Ye.lastHeight===Ye.startSize.height)return A("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(Ye.lastWidth===Ye.lastNotifiedWidth&&Ye.lastHeight===Ye.lastNotifiedHeight)return A("Not notifying: Size already notified");A("Current size not notified, notifying..."),Ye.lastNotifiedWidth=Ye.lastWidth,Ye.lastNotifiedHeight=Ye.lastHeight,gme(o(x).listeners,function(ut){ut(x)})}function oe(){if(A("startanimation triggered."),O(x)){A("Ignoring since element is still unrendered...");return}A("Element rendered.");var ae=v(x),Ye=b(x);(ae.scrollLeft===0||ae.scrollTop===0||Ye.scrollLeft===0||Ye.scrollTop===0)&&(A("Scrollbars out of sync. Updating detector elements..."),me(j))}function Ee(){if(A("Scroll detected."),O(x)){A("Scroll event fired while unrendered. Ignoring...");return}me(j)}if(A("registerListenersAndPositionElements invoked."),!o(x)){A("Aborting because element has been uninstalled");return}o(x).onRendered=oe,o(x).onExpand=Ee,o(x).onShrink=Ee;var ie=o(x).style;q(x,ie.width,ie.height)}function ve(){if(A("finalizeDomMutation invoked."),!o(x)){A("Aborting because element has been uninstalled");return}var q=o(x).style;N(x,q.width,q.height),K(x,q.width,q.height)}function xe(){S(x)}function ge(){A("Installing..."),I(),D(),n.add(0,V),n.add(1,Y),n.add(2,$),n.add(3,ve),n.add(4,xe)}A("Making detectable..."),P(x)?(A("Element is detached"),W(),A("Waiting until element is attached..."),o(x).onRendered=function(){A("Element is now attached"),ge()}):ge()}function k(C){var x=o(C);x&&(x.onExpandScroll&&g(v(C),"scroll",x.onExpandScroll),x.onShrinkScroll&&g(b(C),"scroll",x.onShrinkScroll),x.onAnimationStart&&g(x.container,"animationstart",x.onAnimationStart),x.container&&C.removeChild(x.container))}return{makeDetectable:w,addListener:y,uninstall:k,initDocument:l}},Ug=w5.forEach,bme=ome,yme=rme,xme=ime,wme=sme,Cme=ame,T5=S5,kme=fme,Ru=pme,Sme=mme,jme=vme;function M5(t){return Array.isArray(t)||t.length!==void 0}function N5(t){if(Array.isArray(t))return t;var e=[];return Ug(t,function(n){e.push(n)}),e}function P5(t){return t&&t.nodeType===1}var Eme=function(t){t=t||{};var e;if(t.idHandler)e={get:function(w){return t.idHandler.get(w,!0)},set:t.idHandler.set};else{var n=xme(),o=wme({idGenerator:n,stateHandler:Ru});e=o}var r=t.reporter;if(!r){var i=r===!1;r=Cme(i)}var s=Iu(t,"batchProcessor",kme({reporter:r})),a={};a.callOnAdd=!!Iu(t,"callOnAdd",!0),a.debug=!!Iu(t,"debug",!1);var l=yme(e),c=bme({stateHandler:Ru}),u,h=Iu(t,"strategy","object"),p=Iu(t,"important",!1),m={reporter:r,batchProcessor:s,stateHandler:Ru,idHandler:e,important:p};if(h==="scroll"&&(T5.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),h="object"):T5.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),h="object")),h==="scroll")u=jme(m);else if(h==="object")u=Sme(m);else throw new Error("Invalid strategy name: "+h);var g={};function v(w,k,C){function x(D){var I=l.get(D);Ug(I,function(V){V(D)})}function S(D,I,V){l.add(I,V),D&&V(I)}if(C||(C=k,k=w,w={}),!k)throw new Error("At least one element required.");if(!C)throw new Error("Listener required.");if(P5(k))k=[k];else if(M5(k))k=N5(k);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var A=0,P=Iu(w,"callOnAdd",a.callOnAdd),O=Iu(w,"onReady",function(){}),M=Iu(w,"debug",a.debug);Ug(k,function(D){Ru.getState(D)||(Ru.initState(D),e.set(D));var I=e.get(D);if(M&&r.log("Attaching listener to element",I,D),!c.isDetectable(D)){if(M&&r.log(I,"Not detectable."),c.isBusy(D)){M&&r.log(I,"System busy making it detectable"),S(P,D,C),g[I]=g[I]||[],g[I].push(function(){A++,A===k.length&&O()});return}return M&&r.log(I,"Making detectable..."),c.markBusy(D,!0),u.makeDetectable({debug:M,important:p},D,function(V){if(M&&r.log(I,"onElementDetectable"),Ru.getState(V)){c.markAsDetectable(V),c.markBusy(V,!1),u.addListener(V,x),S(P,V,C);var N=Ru.getState(V);if(N&&N.startSize){var T=V.offsetWidth,B=V.offsetHeight;(N.startSize.width!==T||N.startSize.height!==B)&&x(V)}g[I]&&Ug(g[I],function(_){_()})}else M&&r.log(I,"Element uninstalled before being detectable.");delete g[I],A++,A===k.length&&O()})}M&&r.log(I,"Already detecable, adding listener."),S(P,D,C),A++}),A===k.length&&O()}function b(w){if(!w)return r.error("At least one element is required.");if(P5(w))w=[w];else if(M5(w))w=N5(w);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");Ug(w,function(k){l.removeAllListeners(k),u.uninstall(k),Ru.cleanState(k)})}function y(w){u.initDocument&&u.initDocument(w)}return{listenTo:v,removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:b,initDocument:y}};function Iu(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}const Ame=tme(Eme);function Ome(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map(function(r){r(n)}),(o=t.get("*"))&&o.slice().map(function(r){r(e,n)})}}}function D5(){return typeof window<"u"}const R5=()=>{};function Tme(t,e=R5){if(!D5){e();return}window.addEventListener(t,e)}function Mme(t,e=R5){D5&&window.removeEventListener(t,e)}const Nme={__name:"grid-layout",props:{layout:{type:Array,required:!0},responsiveLayouts:{type:Object,default(){return{}}},colNum:{type:Number,default:12},rowHeight:{type:Number,default:150},maxRows:{type:Number,default:1/0},margin:{type:Array,default(){return[10,10]}},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},preventCollision:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},responsive:{type:Boolean,default:!1},breakpoints:{type:Object,default(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},cols:{type:Object,default(){return{lg:12,md:10,sm:6,xs:4,xxs:2}}},useStyleCursor:{type:Boolean,default:!0},transformScale:{type:Number,default:1}},emits:["update:layout","layout-ready","layout-created","layout-before-mount","layout-mounted","layout-updated","breakpoint-changed"],setup(t,{expose:e,emit:n}){const o=t,r=n,i=Ome(),s={el:void 0,placeholderEl:void 0,placeholder:{},emitter:i};e(s);const a=Ame({strategy:"scroll",callOnAdd:!1}),l=f.reactive({width:null,mergedStyle:{},isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:-1},layout:[],layouts:{},lastBreakpoint:null,originalLayout:null});f.provide("emitter",i),f.provide("gridLayout",{props:o,state:l});function c(){i.on("resizeEvent",b),i.on("dragEvent",v),r("layout-created",o.layout),Tme("resize",m)}c(),f.onBeforeMount(()=>{r("layout-before-mount",l.layout)}),f.onMounted(()=>{r("layout-mounted",l.layout)}),f.onBeforeUnmount(()=>{i.off("resizeEvent",b),i.off("dragEvent",v),Mme("resize",m),a&&s.el&&a.uninstall(s.el)}),f.watch(()=>l.width,async(x,S)=>{i.emit("updateWidth",l.width),p(),S===null&&(await f.nextTick(),r("layout-ready",l.layout))}),f.watch(()=>o.layout,()=>{Xpe(o.layout),l.originalLayout=o.layout,h()},{deep:!0,immediate:!0}),f.watch(()=>o.colNum,()=>{l.colNum=o.colNum,i.emit("setColNum",o.colNum)},{immediate:!0}),f.watch(()=>o.rowHeight,()=>{i.emit("setRowHeight",o.rowHeight)}),f.watch(()=>o.isDraggable,()=>{i.emit("setDraggable",o.isDraggable)}),f.watch(()=>o.isResizable,()=>{i.emit("setResizable",o.isResizable)}),f.watch(()=>o.isBounded,()=>{i.emit("setBounded",o.isBounded)}),f.watch(()=>o.transformScale,()=>{i.emit("setTransformScale",o.transformScale)}),f.watch(()=>o.responsive,()=>{o.responsive||(l.layout=ud(l.originalLayout),i.emit("setColNum",o.colNum)),m()}),f.watch(()=>o.maxRows,()=>{i.emit("setMaxRows",o.maxRows)}),f.watch(()=>o.margin,()=>{p()},{deep:!0});function u(x,S){if((x==null?void 0:x.length)!==(S==null?void 0:S.length))return!0;let A=!1,P=0;for(;P<x.length;){const O=x[P],M=Object.keys(O),D=S[P],I=Object.keys(D),V=[...new Set([...M,...I])];let N=0;for(;N<V.length;){const T=V[N];if(O[T]!==D[T]){A=!0;break}N+=1}if(A)break;P+=1}return A}function h(){if(u(o.layout,l.layout)&&(w(),l.layout=ud(o.layout),Fg(l.layout,o.verticalCompact),i.emit("updateWidth",l.width),p(),u(o.layout,l.layout))){const x=ud(l.layout);r("layout-updated",x),r("update:layout",x)}}function p(){l.mergedStyle={height:g()}}function m(){s.el&&(l.width=s.el.offsetWidth),i.emit("resizeEvent")}function g(){var x;if(!o.autoSize)return;const S=((x=o.margin)==null?void 0:x[1])||0;return`${_pe(l.layout)*(o.rowHeight+S)+S}px`}function v([x,S,A,P,O,M]=[]){let D=u5(l.layout,S);if(D==null&&(D={x:0,y:0}),x==="dragstart"&&!o.verticalCompact&&(l.positionsBeforeDrag=l.layout.reduce((I,{i:V,x:N,y:T})=>({...I,[V]:{x:N,y:T}}),{})),x==="dragmove"||x==="dragstart"?(l.placeholder.x=D.x,l.placeholder.y=D.y,l.placeholder.w=M,l.placeholder.h=O,l.isDragging=!0):l.isDragging=!1,l.layout=ij(l.layout,D,A,P,!0,o.preventCollision),o.restoreOnDrag?(D.static=!0,Fg(l.layout,o.verticalCompact,l.positionsBeforeDrag),D.static=!1):Fg(l.layout,o.verticalCompact),p(),x==="dragend"&&delete l.positionsBeforeDrag,u(o.layout,l.layout)){const I=ud(l.layout);r("layout-updated",I),r("update:layout",I)}}function b([x,S,A,P,O,M]=[]){let D=u5(l.layout,S);D==null&&(D={h:0,w:0});let I;if(o.preventCollision){const V=f5(l.layout,{...D,w:M,h:O}).filter(N=>N.i!==D.i);if(I=V.length>0,I){let N=1/0,T=1/0;V.forEach(B=>{B.x>D.x&&(N=Math.min(N,B.x)),B.y>D.y&&(T=Math.min(T,B.y))}),Number.isFinite(N)&&(D.w=N-D.x),Number.isFinite(T)&&(D.h=T-D.y)}}if(I||(D.w=M,D.h=O),x==="resizestart"||x==="resizemove"?(l.placeholder.x=A,l.placeholder.y=P,l.placeholder.w=D.w,l.placeholder.h=D.h,l.isDragging=!0):l.isDragging=!1,o.responsive&&y(),Fg(l.layout,o.verticalCompact),p(),u(o.layout,l.layout)){const V=ud(l.layout);r("layout-updated",V),r("update:layout",V)}}function y(){const x=Zpe(o.breakpoints,l.width),S=v5(x,o.cols);S!==l.colNum&&(l.colNum=S,l.layout=qpe(l.layout,l.layouts,o.breakpoints,x,S,o.verticalCompact),l.layouts[x]=l.layout,i.emit("setColNum",S)),l.lastBreakpoint!==x&&(l.lastBreakpoint=x,r("breakpoint-changed",x,l.layout))}function w(){l.layouts={...o.responsiveLayouts}}function k(x){!x||x===s.el||(s.el=x,a&&a.listenTo(s.el,()=>{m()}),l.width=s.el.offsetWidth)}function C(x){x&&(s.placeholder=x,s.placeholderEl=x.el)}return(x,S)=>(f.openBlock(),f.createElementBlock("div",{ref:k,class:"vue-grid-layout",style:f.normalizeStyle(l.mergedStyle)},[f.renderSlot(x.$slots,"default",{},void 0,!0),f.withDirectives(f.createVNode(sj,{ref:C,class:"vue-grid-placeholder",x:l.placeholder.x,y:l.placeholder.y,w:l.placeholder.w,h:l.placeholder.h,i:"placeholder"},null,8,["x","y","w","h"]),[[f.vShow,l.isDragging]])],4))}},I5=y5(Nme,[["__scopeId","data-v-a10aee95"]]),Wg=-1;function V5(t){return t!=null}const Pme={class:"form-canvas-area"},Dme={class:"canvas-toolbar"},Rme={class:"canvas-toolbar-actions"},Ime={class:"form-widget-container"},Vme=["onClick"],Bme={class:"module-title-wrap"},Lme={class:"module-title"},Fme={class:"module-header-actions"},zme={class:"module-body"},_me=["data-palette-drop-group"],Ume={key:0,class:"slot-placeholder"},Wme={class:"slot-title"},Hme=["data-palette-drop-form"],Gme=["onClick"],Kme={class:"widget-actions"},Yme={key:0,class:"slot-placeholder slot-placeholder--inner"},Xme={key:1,class:"custom-widget-placeholder"},Jme={class:"custom-widget-name"},Qme={key:2,class:"form-inner"},Zme=["data-palette-drop-form"],qme=["onClick"],$me={class:"widget-actions"},ege={key:0,class:"slot-placeholder slot-placeholder--inner"},tge={key:1,class:"custom-widget-placeholder"},nge={class:"custom-widget-name"},oge={class:"global-buttons-list"},rge={key:1,class:"global-buttons-empty"},ige=f.defineComponent({name:"FormDesignArea"}),sge=f.defineComponent({...ige,props:{layout:{},dropZoneList:{},containerDropList:{},selectedId:{},selectedFormChild:{},selectedGlobalButtonIndex:{},colNum:{},rowHeight:{},getDefaultLabel:{type:Function},getDefaultConfig:{type:Function},getDefaultConfigForChild:{type:Function},buttons:{}},emits:["update:layout","drop-from-palette","inner-layout-updated","grid-widget-capture","select-form-child","clear-selection","open-preview","save","reset","copy-widget","delete-widget","copy-form-child","copy-form-child-to-group","delete-form-child","select-global-button","select-global-buttons-bar","drop-container","drop-container-in-root","auto-compact-inner"],setup(t,{expose:e,emit:n}){const o={flmInput:xl,flmSelect:Kf,flmInputNumber:Uf,flmUpload:pc,flmDatePicker:i2,flmTimePicker:Jf,flmTimeSelect:Qf,flmCascader:zf,flmCheckbox:hc,flmCheckboxGroup:$f,flmColorPicker:_f,flmRadio:Wf,flmRate:Hf,flmRead:Su,flmAlert:mc,flmTime:Gf,flmSlider:Yf,flmSwitch:Xf,flmTransfer:Zf,flmButton:Ff,flmDialog:qf,flmPagination:hg},r=t,i=n,s=f.computed({get:()=>r.layout,set:K=>i("update:layout",K)}),a=".el-button, .el-tag, .form-inner-control-wrap, .custom-widget-placeholder, .vue-resizable-handle, .vue-rtl-resizable-handle, .vue-draggable-handle",l={name:"rootLayout",put:!0,pull:!1};function c(K,W){i("grid-widget-capture",K,W)}let u=0;function h(K){const W=r.layout[K.newIndex];if(!W||W.nodeKind==="group")return;const Y=W.type;if(Y!=="form"&&Y!=="subForm"&&Y!=="groupSlot"){const $=[...r.layout];$.splice(K.newIndex,1),i("update:layout",$);const ve=Date.now();ve-u>2e3&&(u=ve,dt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"));return}i("drop-container-in-root",K.newIndex)}function p(K,W){i("inner-layout-updated",K,W)}function m(K,W){i("select-form-child",K,W)}const g=(K,W)=>{i("delete-widget",K)};function v(K,W){i("copy-form-child",K,W)}function b(K,W){i("delete-form-child",K,W)}const y=f.ref(!1),w=f.ref(""),k=f.ref(null),C=f.computed(()=>{var W;const K=(W=k.value)==null?void 0:W.sourceGroup.i;return r.layout.filter(Y=>Y.type==="group"&&Y.i!==K)});function x(K,W,Y){const $=r.layout.filter(ve=>ve.type==="group"&&ve.i!==K.i);if(!$.length){dt.ElMessage.warning("暂无其他分组可复制");return}k.value={sourceGroup:K,formContainer:W,child:Y},w.value=$[0].i,y.value=!0}function S(){const K=k.value,W=w.value;if(!K||!W)return;const Y=r.layout.find($=>$.i===W);if(!Y){dt.ElMessage.warning("目标分组不存在");return}i("copy-form-child-to-group",K.formContainer,K.child,Y),y.value=!1}function A(){k.value=null,w.value=""}const P=f.computed(()=>V5(r.selectedGlobalButtonIndex));function O(K){i("select-global-button",K)}function M(){i("select-global-buttons-bar")}function D(){const K=r.containerDropList;if(K.filter(Y=>Y.type!=="form"&&Y.type!=="subForm"&&Y.type!=="groupSlot").length>0){K.splice(0,K.length,...K.filter($=>$.type==="form"||$.type==="subForm"||$.type==="groupSlot"));const Y=Date.now();Y-u>2e3&&(u=Y,dt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"))}K.length>0&&i("drop-container")}function I(K){return(K.children||[]).some(W=>W.nodeKind==="form"||W.nodeKind==="subForm")}function V(K){const W=(K.children||[]).find(Y=>Y.nodeKind==="form"||Y.nodeKind==="subForm");W&&i("auto-compact-inner",W)}function N(K){const W=(K.config&&Object.keys(K.config).length?K.config:r.getDefaultConfigForChild(K.type))||{};return K.type==="flmAlert"||K.type==="flmRead"?{...W}:{...W,disabled:!0,readonly:!0,"auto-upload":!1}}function T(K){const W=(K.children||[])[0];return W?W.nodeKind==="slot"?Cr.slot:W.nodeKind==="subForm"?Cr.subForm:Cr.form:"未设置"}function B(K){const W=(K.children||[])[0];return W?W.nodeKind==="slot"?"warning":W.nodeKind==="subForm"?"success":"primary":"info"}const _=f.shallowRef(null);function R(K){if(typeof K.gridW=="number"&&K.gridW>0)return{w:K.gridW,h:K.gridH??1};if(K.kind==="custom")return gg("flmCustom");const W=K.type;return W==="formSlot"?{w:24,h:1}:W==="flmCustom"?gg("flmCustom"):W&&typeof W=="string"?gg(W):{w:8,h:1}}function E(K){for(const W of r.layout)for(const Y of W.children||[])if(Y.i===K&&(Y.nodeKind==="form"||Y.nodeKind==="subForm"))return Y;return null}function U(K){if(!K){_.value=null;return}const W=E(K.formChildId);if(!W){_.value=null;return}const{gridEl:Y,clientX:$,clientY:ve}=WR({to:K.sortableToEl,originalEvent:K.originalEvent,clientX:K.clientX,clientY:K.clientY});if(!Y||$==null||ve==null){_.value=null;return}const{w:xe,h:ge}=R(K.dragged),q=HR(W,Y,$,ve,r.colNum,r.rowHeight,f2,xe,ge,"preview"),me=dfe(Y,q.x,q.y,q.w,q.h,r.colNum,r.rowHeight,f2);if(!me){_.value=null;return}const re=Y.getBoundingClientRect();_.value={position:"fixed",left:`${re.left+me.left}px`,top:`${re.top+me.top}px`,width:`${me.width}px`,height:`${me.height}px`,zIndex:"10020",pointerEvents:"none",boxSizing:"border-box"}}function Q(){_.value=null}return e({updatePaletteDropPreview:U,clearPaletteDropPreview:Q}),(K,W)=>{const Y=f.resolveComponent("el-button"),$=f.resolveComponent("el-tag"),ve=f.resolveComponent("el-icon"),xe=f.resolveComponent("el-tooltip"),ge=f.resolveComponent("el-form-item"),q=f.resolveComponent("el-form"),me=f.resolveComponent("el-radio"),re=f.resolveComponent("el-radio-group"),j=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock("div",Pme,[f.createElementVNode("div",Dme,[W[12]||(W[12]=f.createElementVNode("span",{class:"canvas-title"},"表单设计区",-1)),f.createElementVNode("div",Rme,[f.createVNode(Y,{type:"primary",size:"small",onClick:W[0]||(W[0]=oe=>K.$emit("open-preview"))},{default:f.withCtx(()=>[...W[9]||(W[9]=[f.createTextVNode("预览",-1)])]),_:1}),f.createVNode(Y,{type:"success",size:"small",onClick:W[1]||(W[1]=oe=>K.$emit("save"))},{default:f.withCtx(()=>[...W[10]||(W[10]=[f.createTextVNode("保存",-1)])]),_:1}),f.createVNode(Y,{type:"warning",size:"small",onClick:W[2]||(W[2]=oe=>K.$emit("reset"))},{default:f.withCtx(()=>[...W[11]||(W[11]=[f.createTextVNode("重置",-1)])]),_:1})])]),(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[_.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"flame-fw-grid-drop-preview",style:f.normalizeStyle(_.value)},null,4)):f.createCommentVNode("",!0)])),f.createElementVNode("div",{class:"form-canvas",onClick:W[5]||(W[5]=f.withModifiers(oe=>K.$emit("clear-selection"),["self"]))},[f.createElementVNode("div",Ime,[f.createVNode(f.unref(F2),{modelValue:s.value,"onUpdate:modelValue":W[3]||(W[3]=oe=>s.value=oe),"item-key":"i",group:l,sort:!0,filter:a,"prevent-on-filter":!1,"ghost-class":"ghost",class:"module-list",onAdd:h},{item:f.withCtx(({element:oe})=>[f.createElementVNode("div",{class:f.normalizeClass(["module-wrap",{"grid-widget-wrap--selected":t.selectedId===oe.i}])},[f.createElementVNode("div",{class:"module-header",onClick:Ee=>c(Ee,oe)},[f.createElementVNode("div",Bme,[f.createVNode($,{type:B(oe),size:"small",effect:"light"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(T(oe)),1)]),_:2},1032,["type"]),f.createElementVNode("span",Lme,f.toDisplayString(oe.label||"分组"),1)]),f.createElementVNode("div",Fme,[I(oe)?(f.openBlock(),f.createBlock(Y,{key:0,type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>V(oe),["stop"])},{default:f.withCtx(()=>[...W[13]||(W[13]=[f.createTextVNode(" 自动排序 ",-1)])]),_:1},8,["onClick"])):f.createCommentVNode("",!0),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:Ee=>g(oe)},{default:f.withCtx(()=>[...W[14]||(W[14]=[f.createTextVNode(" 删除分组 ",-1)])]),_:1},8,["onClick"])])],8,Vme),f.createElementVNode("div",zme,[oe.children&&oe.children.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(oe.children||[],Ee=>(f.openBlock(),f.createElementBlock("div",{key:Ee.i,class:"module-body-content"},[Ee.nodeKind==="slot"&&Ee.type==="groupSlot"?(f.openBlock(),f.createElementBlock("div",Ume,[f.createElementVNode("div",Wme,f.toDisplayString(f.unref(Cr).slot),1)])):Ee.nodeKind==="form"?(f.openBlock(),f.createBlock(q,{key:1,class:"form-inner"},{default:f.withCtx(()=>[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":Ee.i},[f.createVNode(f.unref(I5),{layout:Ee.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:ie=>p(ie,Ee)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Ee.children||[],ie=>(f.openBlock(),f.createBlock(f.unref(sj),{key:ie.i,x:ie.x,y:ie.y,w:ie.w,h:ie.h,i:ie.i},{default:f.withCtx(()=>{var ae,Ye,ut,Re;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((ae=t.selectedFormChild)==null?void 0:ae.formId)===oe.i&&((Ye=t.selectedFormChild)==null?void 0:Ye.childId)===ie.i,"form-inner-control-wrap--slot":ie.nodeKind==="slot"}]),onClick:f.withModifiers(lt=>m(oe,ie),["stop"])},[f.createElementVNode("div",Kme,[f.createVNode(xe,{content:"复制至其他分组",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>x(oe,Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.FolderOpened))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(xe,{content:"复制",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>v(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.CopyDocument))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:f.withModifiers(lt=>b(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(ge,{label:ie.nodeKind==="slot"&&ie.type==="formSlot"?"":((ut=ie.formItem)==null?void 0:ut.label)??ie.label??t.getDefaultLabel(ie.type),"label-width":ie.nodeKind==="slot"&&ie.type==="formSlot"?"0":"",required:(Re=ie.formItem)==null?void 0:Re.required,class:"canvas-form-item"},{default:f.withCtx(()=>[ie.nodeKind==="slot"&&ie.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",Yme,[...W[16]||(W[16]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):ie.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",Xme,[f.createElementVNode("span",Jme,f.toDisplayString(ie.label||ie.customComponentName||"自定义组件"),1)])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[ie.type]||xl),{key:2,config:N(ie)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,Gme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Hme)]),_:2},1024)):Ee.nodeKind==="subForm"?(f.openBlock(),f.createElementBlock("div",Qme,[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":Ee.i},[f.createVNode(f.unref(I5),{layout:Ee.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:ie=>p(ie,Ee)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Ee.children||[],ie=>(f.openBlock(),f.createBlock(f.unref(sj),{key:ie.i,x:ie.x,y:ie.y,w:ie.w,h:ie.h,i:ie.i},{default:f.withCtx(()=>{var ae,Ye,ut,Re;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((ae=t.selectedFormChild)==null?void 0:ae.formId)===oe.i&&((Ye=t.selectedFormChild)==null?void 0:Ye.childId)===ie.i,"form-inner-control-wrap--slot":ie.nodeKind==="slot"}]),onClick:f.withModifiers(lt=>m(oe,ie),["stop"])},[f.createElementVNode("div",$me,[f.createVNode(xe,{content:"复制至其他分组",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>x(oe,Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.FolderOpened))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(xe,{content:"复制",placement:"top"},{default:f.withCtx(()=>[f.createVNode(Y,{type:"primary",link:"",size:"small",onClick:f.withModifiers(lt=>v(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.CopyDocument))]),_:1})]),_:1},8,["onClick"])]),_:2},1024),f.createVNode(Y,{type:"danger",link:"",size:"small",onClick:f.withModifiers(lt=>b(Ee,ie),["stop"])},{default:f.withCtx(()=>[f.createVNode(ve,null,{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(ge,{label:ie.nodeKind==="slot"&&ie.type==="formSlot"?"":((ut=ie.formItem)==null?void 0:ut.label)??ie.label??t.getDefaultLabel(ie.type),"label-width":ie.nodeKind==="slot"&&ie.type==="formSlot"?"0":"",required:(Re=ie.formItem)==null?void 0:Re.required,class:"canvas-form-item"},{default:f.withCtx(()=>[ie.nodeKind==="slot"&&ie.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",ege,[...W[17]||(W[17]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):ie.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",tge,[f.createElementVNode("span",nge,f.toDisplayString(ie.customComponentName||"业务组件"),1),W[18]||(W[18]=f.createElementVNode("span",{class:"custom-widget-hint"},"(运行时渲染)",-1))])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[ie.type]||xl),{key:2,config:N(ie)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,qme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Zme)])):f.createCommentVNode("",!0)]))),128)):(f.openBlock(),f.createElementBlock("div",{key:0,class:"module-inner-drop-zone","data-palette-drop-group":oe.i},[...W[15]||(W[15]=[f.createElementVNode("span",{class:"drop-hint"},"请拖入或右侧选择分组类型",-1)])],8,_me))])],2)]),_:1},8,["modelValue"]),f.createVNode(f.unref(F2),{list:t.containerDropList,"item-key":"id",group:{name:"containers",put:!0},sort:!1,class:"container-drop-zone",onAdd:W[4]||(W[4]=oe=>D())},{item:f.withCtx(({element:oe})=>[(f.openBlock(),f.createElementBlock("span",{key:oe.id}))]),footer:f.withCtx(()=>[...W[19]||(W[19]=[f.createElementVNode("span",{class:"drop-hint"},"拖入容器创建分组",-1)])]),_:1},8,["list"]),f.createElementVNode("div",{class:f.normalizeClass(["global-buttons-bar",{"global-buttons-bar--active":P.value}]),onClick:f.withModifiers(M,["stop"])},[W[20]||(W[20]=f.createElementVNode("span",{class:"global-buttons-label"},"功能按钮:",-1)),f.createElementVNode("div",oge,[r.buttons&&r.buttons.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(r.buttons,(oe,Ee)=>(f.openBlock(),f.createBlock(Y,{key:Ee,type:oe.type||"default",size:"small",onClick:f.withModifiers(ie=>O(Ee),["stop"])},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(oe.text||oe.buttonText||oe.label||"按钮"),1)]),_:2},1032,["type","onClick"]))),128)):(f.openBlock(),f.createElementBlock("span",rge,"点击此区域在右侧添加功能按钮"))])],2)])]),f.createVNode(j,{modelValue:y.value,"onUpdate:modelValue":W[8]||(W[8]=oe=>y.value=oe),title:"复制至其他分组",width:"420px","append-to-body":"",onClosed:A},{footer:f.withCtx(()=>[f.createVNode(Y,{onClick:W[7]||(W[7]=oe=>y.value=!1)},{default:f.withCtx(()=>[...W[21]||(W[21]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(Y,{type:"primary",disabled:!w.value,onClick:S},{default:f.withCtx(()=>[...W[22]||(W[22]=[f.createTextVNode(" 确定 ",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createVNode(q,{"label-width":"88px",size:"small"},{default:f.withCtx(()=>[f.createVNode(ge,{label:"目标分组"},{default:f.withCtx(()=>[f.createVNode(re,{modelValue:w.value,"onUpdate:modelValue":W[6]||(W[6]=oe=>w.value=oe),class:"copy-to-group-radio-group"},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(C.value,oe=>(f.openBlock(),f.createBlock(me,{key:oe.i,value:oe.i},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(oe.label||oe.i),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}),age=wr(sge,[["__scopeId","data-v-fc86fba4"]]),lge={class:"preview-canvas"},cge=f.defineComponent({name:"PreviewDialog"}),uge=f.defineComponent({...cge,props:{modelValue:{type:Boolean},config:{}},emits:["update:modelValue"],setup(t){const e=t,n=f.ref(0);f.watch(()=>e.modelValue,l=>{l||n.value++});const o=f.computed(()=>{const l=e.config||{};return!!(l&&Array.isArray(l.groups)&&l.groups.length)});function r(l){console.log("[PreviewDialog] submit formModel:",l)}function i(l){console.log("[PreviewDialog] cancel formModel:",l)}function s(l){console.log("[PreviewDialog] reset formModel:",l)}function a(l){const c=(l==null?void 0:l.data)??(l==null?void 0:l.payload)??(l==null?void 0:l.formModel);console.log("[PreviewDialog] custom event:",l==null?void 0:l.event,"valid:",l==null?void 0:l.valid,c,l==null?void 0:l.button)}return(l,c)=>{const u=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(u,{"model-value":t.modelValue,title:"表单预览",width:"960px","destroy-on-close":"",class:"preview-dialog","onUpdate:modelValue":c[0]||(c[0]=h=>l.$emit("update:modelValue",h))},{default:f.withCtx(()=>[f.createElementVNode("div",lge,[o.value?(f.openBlock(),f.createBlock(g2,{key:n.value,config:t.config,onSubmit:r,onCancel:i,onReset:s,onCustomEvent:a},null,8,["config"])):f.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),fge=wr(uge,[["__scopeId","data-v-ff02b3af"]]),dge={class:"settings-panel"},hge={key:0,class:"settings-form-wrap"},pge=["onClick","onKeydown"],mge={class:"attr-group__title"},gge={class:"attr-group__body"},vge={key:1,class:"settings-empty"},bge=f.defineComponent({name:"SettingsPanel"}),yge=f.defineComponent({...bge,props:{selectedItem:{},groupsConfig:{}},setup(t){const e=t,n=f.ref({});f.watch(()=>e.groupsConfig,i=>{const s={};i==null||i.forEach(a=>{s[a.name]=n.value[a.name]??a.defaultOpen!==!1}),n.value=s},{immediate:!0});const o=f.computed(()=>{const i=e.groupsConfig||[],s=e.selectedItem;return s?i.filter(a=>!a.visible||a.visible(s)):[]});function r(i){n.value={...n.value,[i]:!n.value[i]}}return(i,s)=>{const a=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",dge,[s[0]||(s[0]=f.createElementVNode("div",{class:"panel-title"},"属性",-1)),t.selectedItem?(f.openBlock(),f.createElementBlock("div",hge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(o.value,l=>(f.openBlock(),f.createElementBlock("div",{key:l.name,class:"attr-group"},[f.createElementVNode("div",{class:"attr-group__header",onClick:c=>r(l.name),role:"button",tabindex:"0",onKeydown:f.withKeys(f.withModifiers(c=>r(l.name),["prevent"]),["enter","space"])},[f.createVNode(a,{class:f.normalizeClass(["attr-group__arrow",{"is-collapsed":!n.value[l.name]}])},{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.ArrowRight))]),_:1},8,["class"]),f.createElementVNode("span",mge,f.toDisplayString(l.title),1)],40,pge),f.withDirectives(f.createElementVNode("div",gge,[f.createVNode(f.unref(dt.ElConfigProvider),{size:"small"},{default:f.withCtx(()=>[f.renderSlot(i.$slots,l.name,{model:t.selectedItem},void 0,!0)]),_:2},1024)],512),[[f.vShow,n.value[l.name]]])]))),128))])):(f.openBlock(),f.createElementBlock("div",vge," 点击设计区中的控件以编辑属性 "))])}}}),xge=wr(yge,[["__scopeId","data-v-20671d90"]]),wge={class:"framework-attr-fields-form"},Cge={key:1,class:"unsupported-hint"},kge=f.defineComponent({name:"FrameworkAttrFieldsForm"}),Sge=f.defineComponent({...kge,props:{fields:{},model:{},formProps:{}},setup(t){const e=t;function n(b,y){return Sp(b,y)}function o(b,y,w){const k=An(w);ZO(b,y,k)}function r(b){if(!b.visible)return!0;try{return b.visible(e.model)}catch{return!0}}const i={input:It.ControlTypes.flmInput,"input-number":It.ControlTypes.flmInputNumber,slider:It.ControlTypes.flmSlider,switch:It.ControlTypes.flmSwitch,select:It.ControlTypes.flmSelect},s=f.reactive({}),a=f.ref(null),l=f.computed(()=>e.fields.filter(r)),c=f.computed(()=>l.value.filter(b=>!i[b.component])),u=f.computed(()=>l.value.filter(b=>i[b.component]).map(b=>{const y=i[b.component],w=b.required===!0;return{prop:b.key,label:b.label,required:w,rules:w?[{required:!0,message:`请填写${b.label}`,trigger:"blur"}]:void 0,controlType:y,controlConfig:{...b.props??{},"model-value":s[b.key]}}})),h=f.computed(()=>({size:It.ElementSize.small,"label-position":"right","label-width":"120px",...e.formProps??{}})),p=f.computed(()=>({...h.value,model:s,items:u.value}));let m=!1;function g(){l.value.forEach(b=>{i[b.component]&&(s[b.key]=n(e.model,b.key))})}function v(){var y;const b=(y=a.value)==null?void 0:y.formModel;b&&l.value.forEach(w=>{if(!i[w.component])return;const k=b[w.key];o(e.model,w.key,k)})}return f.watch(()=>e.model,()=>{m||(m=!0,g(),m=!1)},{deep:!0,immediate:!0}),f.watch(()=>{var b;return(b=a.value)==null?void 0:b.formModel},()=>{m||(m=!0,v(),m=!1)},{deep:!0}),(b,y)=>(f.openBlock(),f.createElementBlock("div",wge,[t.model&&u.value.length?(f.openBlock(),f.createBlock(f.unref(Eu),{key:0,ref_key:"flmFormRef",ref:a,config:p.value,type:"edit"},null,8,["config"])):f.createCommentVNode("",!0),c.value.length?(f.openBlock(),f.createElementBlock("div",Cge,f.toDisplayString(c.value.map(w=>w.component).join("、"))+"(暂不支持,请扩展 `FrameworkAttrFieldsForm` 映射到 `flmForm`) ",1)):f.createCommentVNode("",!0)]))}}),jge=wr(Sge,[["__scopeId","data-v-df322899"]]);function Ege(t,e){return e!=null&&e.length?e.includes(t):!1}function B5(t,e){return!Ege(t,e)}const fi=f.defineComponent({__name:"DetailSettingField",props:{fieldKey:{},disabledConfig:{}},setup(t){const e=t,n=f.useAttrs(),o=f.computed(()=>B5(e.fieldKey,e.disabledConfig));return(r,i)=>{const s=f.resolveComponent("el-form-item");return o.value?(f.openBlock(),f.createBlock(s,f.normalizeProps(f.mergeProps({key:0},f.unref(n))),{default:f.withCtx(()=>[f.renderSlot(r.$slots,"default")]),_:3},16)):f.createCommentVNode("",!0)}}}),Age=[{label:"年",value:"year"},{label:"多年",value:"years"},{label:"月",value:"month"},{label:"多月",value:"months"},{label:"日",value:"date"},{label:"多日",value:"dates"},{label:"日期时间",value:"datetime"},{label:"周",value:"week"},{label:"日期时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"年份范围",value:"yearrange"}];function Oge(t){var n;if(!t)return"";const e=((n=t.formItem)==null?void 0:n.prop)??t.i;return e!=null?String(e).trim():""}function Tge(t,e){if(!e||!t)return[];const n=Oge(t);return n?e[n]??[]:[]}const Mge={key:3,class:"settings-empty-hint"},Nge={class:"options-editor"},Pge={class:"opt-label-wrap"},Dge={class:"json-options-row"},Rge={class:"json-options-hint"},Ige={class:"options-editor"},Vge={class:"opt-label-wrap"},Bge={class:"options-editor"},Lge={class:"opt-label-wrap"},Fge={key:0,class:"option-label-error"},zge={class:"json-options-row"},_ge={class:"json-options-hint"},Uge={class:"flm-time-format-row"},Wge={class:"flm-time-format-tip-trigger",tabindex:"0",role:"button","aria-label":"时间格式说明"},Hge=wr(f.defineComponent({__name:"DetailSettingsSlot",props:{model:{},inputConfig:{},selectConfig:{},inputNumberConfig:{},datePickerConfig:{},timePickerConfig:{},timeSelectConfig:{},cascaderConfig:{},checkboxConfig:{},checkboxGroupConfig:{},colorPickerConfig:{},radioConfig:{},rateConfig:{},sliderConfig:{},switchConfig:{},transferConfig:{},buttonConfig:{},dialogConfig:{},drawerConfig:{},paginationConfig:{},readConfig:{},alertConfig:{},uploadConfig:{},uploadAcceptTypeOptions:{},timeConfig:{},onFlmTimePresetChange:{type:Function},publishedDetailFieldLocks:{}},setup(t){const e=f.computed(()=>{const R=n.model;if(!R)return[];const E=R._resolveAttrFields;return typeof E=="function"?E()??[]:R.customAttrFields??[]}),n=t,o=f.computed(()=>{var U;const R=((U=n.model)==null?void 0:U.disabledConfig)??[],E=Tge(n.model,n.publishedDetailFieldLocks);return[...new Set([...R,...E])]}),r=Age;function i(R){n.inputConfig&&(n.inputConfig.maxlength=R??0)}function s(R){n.inputConfig&&(n.inputConfig.minlength=R??0)}function a(R){n.inputConfig&&(n.inputConfig.autosize=!!R)}function l(R,E){if(E==="step"){R.step=RR(R.step);return}const U=E==="start"?"08:00":"18:00";R[E]=R1(R[E],U)}function c(R,E){R.value=String(E??"")}function u(R){R.options||(R.options=[]);const E=R.options,Q=`选项${E.length+1}`;E.push({label:Q,value:Q})}function h(R,E){if(!R.options)return;R.options.splice(E,1)}function p(R){n.checkboxConfig&&(n.checkboxConfig.label=R)}function m(R,E){R.value=String(E??"")}function g(R,E){R.value=String(E??"")}function v(R){R.items||(R.items=[]);const U=`选项${R.items.length+1}`;R.items.push({label:U,value:U})}function b(R,E){var U;(U=R.items)==null||U.splice(E,1)}function y(R){R.radios||(R.radios=[]);const U=`选项${R.radios.length+1}`;R.radios.push({label:U,value:U})}function w(R,E){var U;(U=R.radios)==null||U.splice(E,1)}function k(R){return R==null||R===""?[]:typeof R!="string"?[]:R.split(/[,,]/).map(E=>E.trim()).filter(Boolean)}const C=f.computed({get(){var R;return k((R=n.uploadConfig)==null?void 0:R.accept)},set(R){const E=n.uploadConfig;E&&(E.accept=Array.isArray(R)&&R.length?R.join(","):"")}}),x=f.computed({get(){var R,E;return((E=(R=n.transferConfig)==null?void 0:R.titles)==null?void 0:E[0])??""},set(R){if(!n.transferConfig)return;const E=n.transferConfig.titles||[];n.transferConfig.titles=[R,E[1]??""]}}),S=f.computed({get(){var R,E;return((E=(R=n.transferConfig)==null?void 0:R.titles)==null?void 0:E[1])??""},set(R){if(!n.transferConfig)return;const E=n.transferConfig.titles||[];n.transferConfig.titles=[E[0]??"",R]}}),A=f.ref([]);f.watch(()=>{const R=n.model;return(R==null?void 0:R.type)!=="flmCascader"||!R.config?null:R.i},R=>{if(!R){A.value=[];return}const E=n.model;if((E==null?void 0:E.type)!=="flmCascader"||!E.config)return;const U=E.config.options;A.value=An(Array.isArray(U)?U:[])},{immediate:!0}),f.watch(A,R=>{const E=n.model;(E==null?void 0:E.type)!=="flmCascader"||!E.config||Array.isArray(R)&&(E.config.options=An(R))},{deep:!0});const P=f.ref([]);f.watch(()=>{const R=n.model;return(R==null?void 0:R.type)!=="flmTransfer"||!R.config?null:R.i},R=>{if(!R){P.value=[];return}const E=n.model;if((E==null?void 0:E.type)!=="flmTransfer"||!E.config)return;const U=E.config.data;P.value=An(Array.isArray(U)?U:[])},{immediate:!0}),f.watch(P,R=>{const E=n.model;(E==null?void 0:E.type)!=="flmTransfer"||!E.config||Array.isArray(R)&&(E.config.data=An(R))},{deep:!0});const O=f.ref(!1),M=f.ref(null),D=f.ref([]),I=f.computed(()=>M.value==="cascader"?"编辑级联选项":"编辑穿梭框选项"),V=f.computed(()=>{const R=A.value;return Array.isArray(R)?R.length?`共 ${R.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"}),N=f.computed(()=>{const R=P.value;return Array.isArray(R)?R.length?`共 ${R.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"});function T(R){M.value=R,D.value=An(R==="cascader"?A.value:P.value),O.value=!0}function B(){const R=D.value;if(!Array.isArray(R)){dt.ElMessage.warning("请配置为 JSON 数组");return}const E=M.value;if(E==="cascader"){const U=An(R);o2(U),A.value=U}else E==="transfer"&&(P.value=MR(An(R)));O.value=!1}function _(){M.value=null}return(R,E)=>{const U=f.resolveComponent("el-input"),Q=f.resolveComponent("el-form-item"),K=f.resolveComponent("el-radio-button"),W=f.resolveComponent("el-radio-group"),Y=f.resolveComponent("el-input-number"),$=f.resolveComponent("el-switch"),ve=f.resolveComponent("el-button"),xe=f.resolveComponent("el-option"),ge=f.resolveComponent("el-select"),q=f.resolveComponent("el-color-picker"),me=f.resolveComponent("el-form"),re=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.model?(f.openBlock(),f.createBlock(me,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[t.model.type==="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.model.customComponentName?(f.openBlock(),f.createBlock(Q,{key:0,label:"业务组件"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.model.customComponentName,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),t.model.customKey?(f.openBlock(),f.createBlock(Q,{key:1,label:"组件键"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.model.customKey,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),e.value.length?(f.openBlock(),f.createBlock(jge,{key:2,fields:e.value,model:t.model},null,8,["fields","model"])):(f.openBlock(),f.createElementBlock("div",Mge,"未配置属性字段(attrFields)"))],64)):t.inputConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(fi,{"field-key":"type","disabled-config":o.value,label:"类型"},{default:f.withCtx(()=>[f.createVNode(W,{modelValue:t.inputConfig.type,"onUpdate:modelValue":E[0]||(E[0]=j=>t.inputConfig.type=j)},{default:f.withCtx(()=>[f.createVNode(K,{value:"text"},{default:f.withCtx(()=>[...E[105]||(E[105]=[f.createTextVNode("单行",-1)])]),_:1}),f.createVNode(K,{value:"textarea"},{default:f.withCtx(()=>[...E[106]||(E[106]=[f.createTextVNode("多行",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"maxlength","disabled-config":o.value,label:"最大长度"},{default:f.withCtx(()=>[f.createVNode(Y,{"model-value":Number(t.inputConfig.maxlength??255),"onUpdate:modelValue":i,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"minlength","disabled-config":o.value,label:"最小长度"},{default:f.withCtx(()=>[f.createVNode(Y,{"model-value":Number(t.inputConfig.minlength??0),"onUpdate:modelValue":s,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"show-word-limit","disabled-config":o.value,label:"显示字数统计"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["show-word-limit"],"onUpdate:modelValue":E[1]||(E[1]=j=>t.inputConfig["show-word-limit"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"show-password","disabled-config":o.value,label:"显示密码"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["show-password"],"onUpdate:modelValue":E[2]||(E[2]=j=>t.inputConfig["show-password"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"readonly","disabled-config":o.value,label:"只读"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig.readonly,"onUpdate:modelValue":E[3]||(E[3]=j=>t.inputConfig.readonly=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(fi,{key:0,"field-key":"rows","disabled-config":o.value,label:"行数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputConfig.rows,"onUpdate:modelValue":E[4]||(E[4]=j=>t.inputConfig.rows=j),min:1,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1},8,["disabled-config"])):f.createCommentVNode("",!0),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(fi,{key:1,"field-key":"autosize","disabled-config":o.value,label:"自动高度"},{default:f.withCtx(()=>[f.createVNode($,{"model-value":!!t.inputConfig.autosize,"onUpdate:modelValue":a},null,8,["model-value"])]),_:1},8,["disabled-config"])):f.createCommentVNode("",!0),f.createVNode(fi,{"field-key":"name","disabled-config":o.value,label:"名称"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.inputConfig.name,"onUpdate:modelValue":E[5]||(E[5]=j=>t.inputConfig.name=j),placeholder:"表单字段名",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"validate-event","disabled-config":o.value,label:"校验事件"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputConfig["validate-event"],"onUpdate:modelValue":E[6]||(E[6]=j=>t.inputConfig["validate-event"]=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):t.selectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Nge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.selectConfig.options||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-select-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Pge,[f.createVNode(U,{modelValue:j.label,"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"])]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>c(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>h(t.selectConfig,Number(oe))},{default:f.withCtx(()=>[...E[107]||(E[107]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[7]||(E[7]=j=>u(t.selectConfig))},{default:f.withCtx(()=>[...E[108]||(E[108]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(fi,{"field-key":"multiple","disabled-config":o.value,label:"是否多选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.selectConfig.multiple,"onUpdate:modelValue":E[8]||(E[8]=j=>t.selectConfig.multiple=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):t.inputNumberConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:3},[f.createVNode(Q,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.min,"onUpdate:modelValue":E[9]||(E[9]=j=>t.inputNumberConfig.min=j),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.max,"onUpdate:modelValue":E[10]||(E[10]=j=>t.inputNumberConfig.max=j),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.step,"onUpdate:modelValue":E[11]||(E[11]=j=>t.inputNumberConfig.step=j),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"precision","disabled-config":o.value,label:"精度"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.inputNumberConfig.precision,"onUpdate:modelValue":E[12]||(E[12]=j=>t.inputNumberConfig.precision=j),min:0,max:20,"controls-position":"right",placeholder:"小数位数"},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"显示控制按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.inputNumberConfig.controls,"onUpdate:modelValue":E[13]||(E[13]=j=>t.inputNumberConfig.controls=j)},null,8,["modelValue"])]),_:1})],64)):t.datePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:4},[f.createVNode(fi,{"field-key":"type","disabled-config":o.value,label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.datePickerConfig.type,"onUpdate:modelValue":E[14]||(E[14]=j=>t.datePickerConfig.type=j),placeholder:"date",clearable:""},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(r),j=>(f.openBlock(),f.createBlock(xe,{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.datePickerConfig.format,"onUpdate:modelValue":E[15]||(E[15]=j=>t.datePickerConfig.format=j),placeholder:"如 YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.datePickerConfig.editable,"onUpdate:modelValue":E[16]||(E[16]=j=>t.datePickerConfig.editable=j)},null,8,["modelValue"])]),_:1})],64)):t.timePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:5},[f.createVNode(Q,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timePickerConfig.format,"onUpdate:modelValue":E[17]||(E[17]=j=>t.timePickerConfig.format=j),placeholder:"如 HH:mm:ss",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.timePickerConfig.editable,"onUpdate:modelValue":E[18]||(E[18]=j=>t.timePickerConfig.editable=j)},null,8,["modelValue"])]),_:1})],64)):t.timeSelectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:6},[f.createVNode(Q,{label:"开始时间"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.start,"onUpdate:modelValue":E[19]||(E[19]=j=>t.timeSelectConfig.start=j),placeholder:"08:00",clearable:"",onBlur:E[20]||(E[20]=j=>l(t.timeSelectConfig,"start"))},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"结束时间"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.end,"onUpdate:modelValue":E[21]||(E[21]=j=>t.timeSelectConfig.end=j),placeholder:"18:00",clearable:"",onBlur:E[22]||(E[22]=j=>l(t.timeSelectConfig,"end"))},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.timeSelectConfig.step,"onUpdate:modelValue":E[23]||(E[23]=j=>t.timeSelectConfig.step=j),placeholder:"00:30(HH:mm,如 30 表示 30 分钟)",clearable:"",onBlur:E[24]||(E[24]=j=>l(t.timeSelectConfig,"step"))},null,8,["modelValue"])]),_:1})],64)):t.uploadConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:7},[f.createVNode(Q,{label:"上传地址"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.uploadConfig.action,"onUpdate:modelValue":E[25]||(E[25]=j=>t.uploadConfig.action=j),placeholder:"请输入上传接口地址",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"文件字段名"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.uploadConfig.name,"onUpdate:modelValue":E[26]||(E[26]=j=>t.uploadConfig.name=j),placeholder:"默认 file",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"接受类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:C.value,"onUpdate:modelValue":E[27]||(E[27]=j=>C.value=j),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",filterable:"",clearable:"",placeholder:"请选择允许的文件类型,可多选",style:{width:"100%"}},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.uploadAcceptTypeOptions,j=>(f.openBlock(),f.createBlock(xe,{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"列表样式"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.uploadConfig["list-type"],"onUpdate:modelValue":E[28]||(E[28]=j=>t.uploadConfig["list-type"]=j),placeholder:"请选择",clearable:"",style:{width:"100%"}},{default:f.withCtx(()=>[f.createVNode(xe,{label:"文本列表",value:"text"}),f.createVNode(xe,{label:"缩略图列表",value:"picture"}),f.createVNode(xe,{label:"照片墙",value:"picture-card"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"数量限制"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.uploadConfig.limit,"onUpdate:modelValue":E[29]||(E[29]=j=>t.uploadConfig.limit=j),min:1,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"支持多选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.multiple,"onUpdate:modelValue":E[30]||(E[30]=j=>t.uploadConfig.multiple=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"拖拽上传"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.drag,"onUpdate:modelValue":E[31]||(E[31]=j=>t.uploadConfig.drag=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"自动上传"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig["auto-upload"],"onUpdate:modelValue":E[32]||(E[32]=j=>t.uploadConfig["auto-upload"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示文件列表"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig["show-file-list"],"onUpdate:modelValue":E[33]||(E[33]=j=>t.uploadConfig["show-file-list"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.uploadConfig.disabled,"onUpdate:modelValue":E[34]||(E[34]=j=>t.uploadConfig.disabled=j)},null,8,["modelValue"])]),_:1})],64)):t.cascaderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:8},[f.createVNode(Q,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.cascaderConfig.filterable,"onUpdate:modelValue":E[35]||(E[35]=j=>t.cascaderConfig.filterable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示完整路径"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.cascaderConfig["show-all-levels"],"onUpdate:modelValue":E[36]||(E[36]=j=>t.cascaderConfig["show-all-levels"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Dge,[f.createElementVNode("span",Rge,f.toDisplayString(V.value),1),f.createVNode(ve,{type:"primary",link:"",onClick:E[37]||(E[37]=j=>T("cascader"))},{default:f.withCtx(()=>[...E[109]||(E[109]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.checkboxConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:9},[f.createVNode(Q,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(U,{"model-value":t.checkboxConfig.label,"onUpdate:modelValue":p,placeholder:"选项文本",clearable:""},null,8,["model-value"])]),_:1}),f.createVNode(Q,{label:"真值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.checkboxConfig["true-label"],"onUpdate:modelValue":E[38]||(E[38]=j=>t.checkboxConfig["true-label"]=j),placeholder:"选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"假值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.checkboxConfig["false-label"],"onUpdate:modelValue":E[39]||(E[39]=j=>t.checkboxConfig["false-label"]=j),placeholder:"未选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示边框"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.checkboxConfig.border,"onUpdate:modelValue":E[40]||(E[40]=j=>t.checkboxConfig.border=j)},null,8,["modelValue"])]),_:1})],64)):t.checkboxGroupConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:10},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Ige,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.checkboxGroupConfig.items||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-checkbox-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Vge,[f.createVNode(U,{modelValue:j.label,"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"])]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>m(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>b(t.checkboxGroupConfig,oe)},{default:f.withCtx(()=>[...E[110]||(E[110]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[41]||(E[41]=j=>v(t.checkboxGroupConfig))},{default:f.withCtx(()=>[...E[111]||(E[111]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(Q,{label:"显示全选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.checkboxGroupConfig.hasCheckAll,"onUpdate:modelValue":E[42]||(E[42]=j=>t.checkboxGroupConfig.hasCheckAll=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最少选中"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.checkboxGroupConfig.min,"onUpdate:modelValue":E[43]||(E[43]=j=>t.checkboxGroupConfig.min=j),min:0,step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最多选中"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.checkboxGroupConfig.max,"onUpdate:modelValue":E[44]||(E[44]=j=>t.checkboxGroupConfig.max=j),min:0,step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.checkboxGroupConfig.size,"onUpdate:modelValue":E[45]||(E[45]=j=>t.checkboxGroupConfig.size=j),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xe,{label:"large",value:"large"}),f.createVNode(xe,{label:"default",value:"default"}),f.createVNode(xe,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选中填充色"},{default:f.withCtx(()=>[f.createVNode(q,{modelValue:t.checkboxGroupConfig.fill,"onUpdate:modelValue":E[46]||(E[46]=j=>t.checkboxGroupConfig.fill=j),"show-alpha":""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"文字颜色"},{default:f.withCtx(()=>[f.createVNode(q,{modelValue:t.checkboxGroupConfig["text-color"],"onUpdate:modelValue":E[47]||(E[47]=j=>t.checkboxGroupConfig["text-color"]=j),"show-alpha":""},null,8,["modelValue"])]),_:1})],64)):t.colorPickerConfig?(f.openBlock(),f.createBlock(Q,{key:11,label:"显示透明度"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.colorPickerConfig["show-alpha"],"onUpdate:modelValue":E[48]||(E[48]=j=>t.colorPickerConfig["show-alpha"]=j)},null,8,["modelValue"])]),_:1})):t.radioConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:12},[f.createVNode(Q,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Bge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.radioConfig.radios||[],(j,oe)=>{var Ee;return f.openBlock(),f.createElementBlock("div",{key:`${(Ee=t.model)==null?void 0:Ee.i}-radio-opt-${oe}`,class:"option-row option-row--kvd"},[f.createElementVNode("div",Lge,[f.createVNode(U,{"model-value":String(j.label??""),"onUpdate:modelValue":ie=>j.label=ie,placeholder:"显示文本",size:"small",class:f.normalizeClass(["opt-label",{"is-radio-label-error":f.unref(TR)(j)}])},null,8,["model-value","onUpdate:modelValue","class"]),f.unref(TR)(j)?(f.openBlock(),f.createElementBlock("span",Fge,"显示文本必填")):f.createCommentVNode("",!0)]),f.createVNode(U,{"model-value":String(j.value??""),"onUpdate:modelValue":ie=>g(j,ie),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(ve,{type:"danger",link:"",size:"small",onClick:ie=>w(t.radioConfig,oe)},{default:f.withCtx(()=>[...E[112]||(E[112]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])])}),128)),f.createVNode(ve,{type:"primary",link:"",size:"small",onClick:E[49]||(E[49]=j=>y(t.radioConfig))},{default:f.withCtx(()=>[...E[113]||(E[113]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(Q,{label:"按钮样式"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.radioConfig.useButton,"onUpdate:modelValue":E[50]||(E[50]=j=>t.radioConfig.useButton=j)},null,8,["modelValue"])]),_:1})],64)):t.rateConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:13},[f.createVNode(Q,{label:"最大分值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.rateConfig.max,"onUpdate:modelValue":E[51]||(E[51]=j=>t.rateConfig.max=j),min:1,max:20,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"允许半选"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.rateConfig["allow-half"],"onUpdate:modelValue":E[52]||(E[52]=j=>t.rateConfig["allow-half"]=j)},null,8,["modelValue"])]),_:1})],64)):t.sliderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:14},[f.createVNode(Q,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.min,"onUpdate:modelValue":E[53]||(E[53]=j=>t.sliderConfig.min=j),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.max,"onUpdate:modelValue":E[54]||(E[54]=j=>t.sliderConfig.max=j),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"step","disabled-config":o.value,label:"步长"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.sliderConfig.step,"onUpdate:modelValue":E[55]||(E[55]=j=>t.sliderConfig.step=j),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"显示输入框"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.sliderConfig["show-input"],"onUpdate:modelValue":E[56]||(E[56]=j=>t.sliderConfig["show-input"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"范围模式"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.sliderConfig.range,"onUpdate:modelValue":E[57]||(E[57]=j=>t.sliderConfig.range=j)},null,8,["modelValue"])]),_:1})],64)):t.switchConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:15},[f.createVNode(Q,{label:"开启值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["active-value"],"onUpdate:modelValue":E[58]||(E[58]=j=>t.switchConfig["active-value"]=j),placeholder:"1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"关闭值"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["inactive-value"],"onUpdate:modelValue":E[59]||(E[59]=j=>t.switchConfig["inactive-value"]=j),placeholder:"0",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"激活文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["active-text"],"onUpdate:modelValue":E[60]||(E[60]=j=>t.switchConfig["active-text"]=j),placeholder:"开",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"未激活文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.switchConfig["inactive-text"],"onUpdate:modelValue":E[61]||(E[61]=j=>t.switchConfig["inactive-text"]=j),placeholder:"关",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.transferConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:16},[f.createVNode(Q,{label:"左侧标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:x.value,"onUpdate:modelValue":E[62]||(E[62]=j=>x.value=j),placeholder:"列表1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"右侧标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:S.value,"onUpdate:modelValue":E[63]||(E[63]=j=>S.value=j),placeholder:"列表2",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.transferConfig.filterable,"onUpdate:modelValue":E[64]||(E[64]=j=>t.transferConfig.filterable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",zge,[f.createElementVNode("span",_ge,f.toDisplayString(N.value),1),f.createVNode(ve,{type:"primary",link:"",onClick:E[65]||(E[65]=j=>T("transfer"))},{default:f.withCtx(()=>[...E[114]||(E[114]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.buttonConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:17},[f.createVNode(Q,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.buttonConfig.buttonText,"onUpdate:modelValue":E[66]||(E[66]=j=>t.buttonConfig.buttonText=j),placeholder:"点击",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.buttonConfig.type,"onUpdate:modelValue":E[67]||(E[67]=j=>t.buttonConfig.type=j),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(xe,{label:"主要",value:"primary"}),f.createVNode(xe,{label:"成功",value:"success"}),f.createVNode(xe,{label:"警告",value:"warning"}),f.createVNode(xe,{label:"危险",value:"danger"}),f.createVNode(xe,{label:"信息",value:"info"}),f.createVNode(xe,{label:"默认",value:"default"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.plain,"onUpdate:modelValue":E[68]||(E[68]=j=>t.buttonConfig.plain=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.round,"onUpdate:modelValue":E[69]||(E[69]=j=>t.buttonConfig.round=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.buttonConfig.circle,"onUpdate:modelValue":E[70]||(E[70]=j=>t.buttonConfig.circle=j)},null,8,["modelValue"])]),_:1})],64)):t.dialogConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:18},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.dialogConfig.title,"onUpdate:modelValue":E[71]||(E[71]=j=>t.dialogConfig.title=j),placeholder:"弹窗",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"宽度"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.dialogConfig.width,"onUpdate:modelValue":E[72]||(E[72]=j=>t.dialogConfig.width=j),placeholder:"50% 或 500",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"居中"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig.center,"onUpdate:modelValue":E[73]||(E[73]=j=>t.dialogConfig.center=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"可拖拽"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig.draggable,"onUpdate:modelValue":E[74]||(E[74]=j=>t.dialogConfig.draggable=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig["close-on-click-modal"],"onUpdate:modelValue":E[75]||(E[75]=j=>t.dialogConfig["close-on-click-modal"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.dialogConfig["show-close"],"onUpdate:modelValue":E[76]||(E[76]=j=>t.dialogConfig["show-close"]=j)},null,8,["modelValue"])]),_:1})],64)):t.drawerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:19},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.drawerConfig.title,"onUpdate:modelValue":E[77]||(E[77]=j=>t.drawerConfig.title=j),placeholder:"抽屉",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"方向"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.drawerConfig.direction,"onUpdate:modelValue":E[78]||(E[78]=j=>t.drawerConfig.direction=j),placeholder:"rtl"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"右",value:"rtl"}),f.createVNode(xe,{label:"左",value:"ltr"}),f.createVNode(xe,{label:"上",value:"ttb"}),f.createVNode(xe,{label:"下",value:"btt"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.drawerConfig.size,"onUpdate:modelValue":E[79]||(E[79]=j=>t.drawerConfig.size=j),placeholder:"30% 或 400px",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.drawerConfig["close-on-click-modal"],"onUpdate:modelValue":E[80]||(E[80]=j=>t.drawerConfig["close-on-click-modal"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.drawerConfig["show-close"],"onUpdate:modelValue":E[81]||(E[81]=j=>t.drawerConfig["show-close"]=j)},null,8,["modelValue"])]),_:1})],64)):t.paginationConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:20},[f.createVNode(Q,{label:"总条数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.paginationConfig.total,"onUpdate:modelValue":E[82]||(E[82]=j=>t.paginationConfig.total=j),min:0,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"每页条数"},{default:f.withCtx(()=>[f.createVNode(Y,{modelValue:t.paginationConfig["page-size"],"onUpdate:modelValue":E[83]||(E[83]=j=>t.paginationConfig["page-size"]=j),min:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"布局"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.paginationConfig.layout,"onUpdate:modelValue":E[84]||(E[84]=j=>t.paginationConfig.layout=j),placeholder:"total, prev, pager, next",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"小尺寸"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.paginationConfig.small,"onUpdate:modelValue":E[85]||(E[85]=j=>t.paginationConfig.small=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.paginationConfig.background,"onUpdate:modelValue":E[86]||(E[86]=j=>t.paginationConfig.background=j)},null,8,["modelValue"])]),_:1})],64)):t.timeConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:21},[f.createVNode(fi,{"field-key":"formatPreset","disabled-config":o.value,label:"格式预设"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.timeConfig.formatPreset,"onUpdate:modelValue":E[87]||(E[87]=j=>t.timeConfig.formatPreset=j),placeholder:"选择预设",style:{width:"100%"},onChange:t.onFlmTimePresetChange},{default:f.withCtx(()=>[f.createVNode(xe,{label:"当前日期",value:"date"}),f.createVNode(xe,{label:"当前时间",value:"time"}),f.createVNode(xe,{label:"自定义",value:"custom"})]),_:1},8,["modelValue","onChange"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"时间格式"},{default:f.withCtx(()=>[f.createElementVNode("div",Uge,[f.createVNode(U,{modelValue:t.timeConfig.format,"onUpdate:modelValue":E[88]||(E[88]=j=>t.timeConfig.format=j),class:"flm-time-format-row__input",placeholder:"如 YYYY-MM-DD 或 HH:mm:ss",clearable:"",disabled:t.timeConfig.formatPreset!=="custom"},null,8,["modelValue","disabled"]),f.createVNode(f.unref(dt.ElTooltip),{effect:"light",placement:"top-end","show-after":200,trigger:["hover","click"],"popper-class":"flm-time-format-tooltip"},{content:f.withCtx(()=>[...E[115]||(E[115]=[f.createElementVNode("div",null,[f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createTextVNode(" 这里控制"),f.createElementVNode("strong",null,"时间显示成什么文字"),f.createTextVNode(",按从左到右的顺序写「年、月、日、时、分、秒」即可。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"常用写法:")]),f.createElementVNode("ul",{class:"flm-time-format-tooltip__ul"},[f.createElementVNode("li",null,[f.createTextVNode("只要日期:"),f.createElementVNode("code",null,"YYYY-MM-DD"),f.createTextVNode(" → 如 2026-04-02")]),f.createElementVNode("li",null,[f.createTextVNode("只要时刻:"),f.createElementVNode("code",null,"HH:mm:ss"),f.createTextVNode(" → 如 14:30:05")]),f.createElementVNode("li",null,[f.createTextVNode("日期 + 时刻:"),f.createElementVNode("code",null,"YYYY-MM-DD HH:mm:ss")])]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"字母含义:"),f.createTextVNode("Y 表示年,M 月,D 日;H 时,m 分,s 秒(可多段组合在一起)。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"}," 选择「当前日期」或「当前时间」时,下面会自动带出对应格式;选择「自定义」后可以按需要自己改。 ")],-1)])]),default:f.withCtx(()=>[f.createElementVNode("span",Wge,[f.createVNode(f.unref(dt.ElIcon),{size:18,color:"var(--el-text-color-secondary)"},{default:f.withCtx(()=>[f.createVNode(f.unref(Gs.QuestionFilled))]),_:1})])]),_:1})])]),_:1})],64)):t.readConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:22},[f.createVNode(Q,{label:"样式类"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.readConfig.class,"onUpdate:modelValue":E[89]||(E[89]=j=>t.readConfig.class=j),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.readConfig.style,"onUpdate:modelValue":E[90]||(E[90]=j=>t.readConfig.style=j),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.alertConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:23},[f.createVNode(Q,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.title,"onUpdate:modelValue":E[91]||(E[91]=j=>t.alertConfig.title=j),placeholder:"提示标题",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.type,"onUpdate:modelValue":E[92]||(E[92]=j=>t.alertConfig.type=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"信息",value:"info"}),f.createVNode(xe,{label:"成功",value:"success"}),f.createVNode(xe,{label:"警告",value:"warning"}),f.createVNode(xe,{label:"错误",value:"error"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"描述"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.description,"onUpdate:modelValue":E[93]||(E[93]=j=>t.alertConfig.description=j),type:"textarea",rows:3,placeholder:"辅助说明文字",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"closable","disabled-config":o.value,label:"可关闭"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig.closable,"onUpdate:modelValue":E[94]||(E[94]=j=>t.alertConfig.closable=j)},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(Q,{label:"文字居中"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig.center,"onUpdate:modelValue":E[95]||(E[95]=j=>t.alertConfig.center=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"显示图标"},{default:f.withCtx(()=>[f.createVNode($,{modelValue:t.alertConfig["show-icon"],"onUpdate:modelValue":E[96]||(E[96]=j=>t.alertConfig["show-icon"]=j)},null,8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"主题"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.effect,"onUpdate:modelValue":E[97]||(E[97]=j=>t.alertConfig.effect=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"浅色",value:"light"}),f.createVNode(xe,{label:"深色",value:"dark"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Q,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(ge,{modelValue:t.alertConfig.size,"onUpdate:modelValue":E[98]||(E[98]=j=>t.alertConfig.size=j),placeholder:"请选择"},{default:f.withCtx(()=>[f.createVNode(xe,{label:"迷你",value:"mini"}),f.createVNode(xe,{label:"小",value:"small"}),f.createVNode(xe,{label:"默认",value:"default"}),f.createVNode(xe,{label:"大",value:"large"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(fi,{"field-key":"close-text","disabled-config":o.value,label:"关闭按钮文字"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig["close-text"],"onUpdate:modelValue":E[99]||(E[99]=j=>t.alertConfig["close-text"]=j),placeholder:"默认不显示文字",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"class","disabled-config":o.value,label:"样式类"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.class,"onUpdate:modelValue":E[100]||(E[100]=j=>t.alertConfig.class=j),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"]),f.createVNode(fi,{"field-key":"style","disabled-config":o.value,label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(U,{modelValue:t.alertConfig.style,"onUpdate:modelValue":E[101]||(E[101]=j=>t.alertConfig.style=j),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1},8,["disabled-config"])],64)):f.createCommentVNode("",!0)]),_:1})):f.createCommentVNode("",!0),f.createVNode(re,{modelValue:O.value,"onUpdate:modelValue":E[104]||(E[104]=j=>O.value=j),title:I.value,class:"framework-json-options-dialog",width:"min(92vw, 900px)",top:"5vh","append-to-body":"","destroy-on-close":"",onClosed:_},{footer:f.withCtx(()=>[f.createVNode(ve,{onClick:E[103]||(E[103]=j=>O.value=!1)},{default:f.withCtx(()=>[...E[116]||(E[116]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(ve,{type:"primary",onClick:B},{default:f.withCtx(()=>[...E[117]||(E[117]=[f.createTextVNode("确定",-1)])]),_:1})]),default:f.withCtx(()=>[O.value?(f.openBlock(),f.createBlock(f.unref(e2),{key:0,modelValue:D.value,"onUpdate:modelValue":E[102]||(E[102]=j=>D.value=j),class:"framework-json-editor",height:420,"navigation-bar":!0,"status-bar":!0},null,8,["modelValue"])):f.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__scopeId","data-v-b39d02fb"]]),Gge={class:"options-editor"},Kge=["onClick"],Yge={class:"opt-index"},Xge={class:"opt-summary"},Jge={key:0,class:"global-buttons-slot-hint"},Qge=wr(f.defineComponent({__name:"GlobalButtonsSlot",props:{buttons:{},selectedIndex:{}},emits:["select","remove","add"],setup(t){const e=t,n=f.computed(()=>V5(e.selectedIndex)),o=f.computed(()=>{const r=e.selectedIndex;return r==null||r===Wg?null:e.buttons[r]??null});return(r,i)=>{const s=f.resolveComponent("el-button"),a=f.resolveComponent("el-form-item"),l=f.resolveComponent("el-input"),c=f.resolveComponent("el-option"),u=f.resolveComponent("el-select"),h=f.resolveComponent("el-switch"),p=f.resolveComponent("el-form");return n.value?(f.openBlock(),f.createBlock(p,{key:0,size:"small","label-position":"right","label-width":"100px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(a,{label:"按钮组"},{default:f.withCtx(()=>[f.createElementVNode("div",Gge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.buttons,(m,g)=>(f.openBlock(),f.createElementBlock("div",{key:g,class:f.normalizeClass(["option-row option-row--buttons",{"option-row--active":t.selectedIndex===g}]),onClick:v=>r.$emit("select",g)},[f.createElementVNode("span",Yge,"#"+f.toDisplayString(g+1),1),f.createElementVNode("span",Xge,f.toDisplayString(m.event||"(未命名事件)")+" / "+f.toDisplayString(m.buttonText??"按钮"),1),f.createVNode(s,{type:"danger",link:"",size:"small",onClick:f.withModifiers(v=>r.$emit("remove",g),["stop"])},{default:f.withCtx(()=>[...i[17]||(i[17]=[f.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])],10,Kge))),128)),f.createVNode(s,{type:"primary",link:"",size:"small",onClick:i[0]||(i[0]=m=>r.$emit("add"))},{default:f.withCtx(()=>[...i[18]||(i[18]=[f.createTextVNode(" + 新增按钮 ",-1)])]),_:1}),t.buttons.length?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("p",Jge," 暂无功能按钮,请点击上方「新增按钮」 "))])]),_:1}),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(a,{label:"按钮事件"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.event,"onUpdate:modelValue":i[1]||(i[1]=m=>o.value.event=m),placeholder:"与业务监听一致的事件名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.buttonText,"onUpdate:modelValue":i[2]||(i[2]=m=>o.value.buttonText=m),placeholder:"按钮文本",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value.type,"onUpdate:modelValue":i[3]||(i[3]=m=>o.value.type=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"默认",value:"default"}),f.createVNode(c,{label:"主要",value:"primary"}),f.createVNode(c,{label:"成功",value:"success"}),f.createVNode(c,{label:"警告",value:"warning"}),f.createVNode(c,{label:"危险",value:"danger"}),f.createVNode(c,{label:"信息",value:"info"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value.size,"onUpdate:modelValue":i[4]||(i[4]=m=>o.value.size=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"大",value:"large"}),f.createVNode(c,{label:"默认",value:"default"}),f.createVNode(c,{label:"小",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.plain,"onUpdate:modelValue":i[5]||(i[5]=m=>o.value.plain=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.bg,"onUpdate:modelValue":i[6]||(i[6]=m=>o.value.bg=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"链接样式"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.link,"onUpdate:modelValue":i[7]||(i[7]=m=>o.value.link=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.round,"onUpdate:modelValue":i[8]||(i[8]=m=>o.value.round=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.circle,"onUpdate:modelValue":i[9]||(i[9]=m=>o.value.circle=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"加载中"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.loading,"onUpdate:modelValue":i[10]||(i[10]=m=>o.value.loading=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"加载图标"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value["loading-icon"],"onUpdate:modelValue":i[11]||(i[11]=m=>o.value["loading-icon"]=m),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.disabled,"onUpdate:modelValue":i[12]||(i[12]=m=>o.value.disabled=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"图标"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:o.value.icon,"onUpdate:modelValue":i[13]||(i[13]=m=>o.value.icon=m),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"自动聚焦"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value.autofocus,"onUpdate:modelValue":i[14]||(i[14]=m=>o.value.autofocus=m)},null,8,["modelValue"])]),_:1}),f.createVNode(a,{label:"原生类型"},{default:f.withCtx(()=>[f.createVNode(u,{modelValue:o.value["native-type"],"onUpdate:modelValue":i[15]||(i[15]=m=>o.value["native-type"]=m),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(c,{label:"普通",value:"button"}),f.createVNode(c,{label:"提交",value:"submit"}),f.createVNode(c,{label:"重置",value:"reset"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(a,{label:"自动插入空格"},{default:f.withCtx(()=>[f.createVNode(h,{modelValue:o.value["auto-insert-space"],"onUpdate:modelValue":i[16]||(i[16]=m=>o.value["auto-insert-space"]=m)},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)]),_:1})):f.createCommentVNode("",!0)}}}),[["__scopeId","data-v-00f0bf6e"]]),Zge="^1(?:3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$",qge="^0\\d{2,3}-?\\d{7,8}(-\\d{1,6})?$",$ge="^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",eve="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",tve="^\\d{6}$",Hg={mobile:"请填写正确手机号",landline:"请填写正确固话",idCard:"请填写正确身份证号",email:"请填写正确邮箱",postal:"请填写正确邮政编码"},L5={required:"必填",mobile:"手机号",landline:"固话",idCard:"身份证号",email:"邮箱",postal:"邮政编码"};function lj(t){return t==="required"||t==="mobile"||t==="landline"||t==="idCard"||t==="email"||t==="postal"}function nve(t){switch(t){case"mobile":return Zge;case"landline":return qge;case"idCard":return $ge;case"email":return eve;case"postal":return tve;default:return"^.*$"}}const ove={class:"fi-rules-editor"},rve={key:0,class:"fi-rules-list"},ive=["title"],sve={class:"fi-rules-dialog-body"},ave=f.defineComponent({name:"FormItemRulesEditor"}),lve=f.defineComponent({...ave,props:{formItem:{}},setup(t){const e=t,n=f.ref(!1),o=f.ref(""),r=f.ref(""),i=f.computed(()=>u(o.value));function s(){o.value="",r.value=""}function a(v){const b=v.ruleKind;return b&&lj(b)?L5[b]:v.required===!0?"必填":"规则"}function l(){const v=e.formItem.rules||[];e.formItem.required=v.some(b=>b.required===!0)}function c(){return`请填写${(e.formItem.label||"").trim()||"该项"}`}function u(v){return v==="required"?c():v==="mobile"?Hg.mobile:v==="landline"?Hg.landline:v==="idCard"?Hg.idCard:v==="email"?Hg.email:v==="postal"?Hg.postal:""}function h(v){const b=e.formItem.rules||[];return v==="required"?b.some(y=>y.required===!0||y.ruleKind==="required"):b.some(y=>y.ruleKind===v)}function p(){s(),n.value=!0}function m(){const v=o.value;if(!v||!lj(v)){n.value=!1;return}if(e.formItem.rules||(e.formItem.rules=[]),h(v)){dt.ElMessage.warning(`已存在「${L5[v]}」规则,请勿重复添加`),n.value=!1;return}const b=(r.value||"").trim()||u(v);if(v==="required")e.formItem.rules.push({required:!0,message:b,trigger:"blur",ruleKind:"required"}),l();else{const y=v;e.formItem.rules.push({pattern:nve(y),message:b,trigger:"blur",ruleKind:v})}n.value=!1}function g(v){var b,y;(b=e.formItem.rules)==null||b.splice(v,1),((y=e.formItem.rules)==null?void 0:y.length)===0&&delete e.formItem.rules,l()}return f.watch(()=>e.formItem.rules,()=>l(),{deep:!0}),f.watch(o,v=>{v&&lj(v)?r.value=u(v):r.value=""}),l(),(v,b)=>{const y=f.resolveComponent("el-tag"),w=f.resolveComponent("el-button"),k=f.resolveComponent("el-option"),C=f.resolveComponent("el-select"),x=f.resolveComponent("el-input"),S=f.resolveComponent("el-dialog"),A=f.resolveComponent("el-form-item");return f.openBlock(),f.createBlock(A,{label:"校验规则"},{default:f.withCtx(()=>[f.createElementVNode("div",ove,[(t.formItem.rules||[]).length?(f.openBlock(),f.createElementBlock("div",rve,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.formItem.rules,(P,O)=>(f.openBlock(),f.createElementBlock("div",{key:O,class:"fi-rules-row"},[f.createVNode(y,{size:"small",type:"info"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a(P)),1)]),_:2},1024),f.createElementVNode("span",{class:"fi-rules-msg",title:P.message},f.toDisplayString(P.message||"—"),9,ive),f.createVNode(w,{type:"danger",link:"",size:"small",onClick:M=>g(O)},{default:f.withCtx(()=>[...b[4]||(b[4]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128))])):f.createCommentVNode("",!0),f.createVNode(w,{type:"primary",link:"",size:"small",onClick:p},{default:f.withCtx(()=>[...b[5]||(b[5]=[f.createTextVNode("+ 添加规则",-1)])]),_:1})]),f.createVNode(S,{modelValue:n.value,"onUpdate:modelValue":b[3]||(b[3]=P=>n.value=P),title:"添加校验规则",width:"420px","append-to-body":"","destroy-on-close":"",onClosed:s},{footer:f.withCtx(()=>[f.createVNode(w,{onClick:b[2]||(b[2]=P=>n.value=!1)},{default:f.withCtx(()=>[...b[8]||(b[8]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(w,{type:"primary",disabled:!o.value,onClick:m},{default:f.withCtx(()=>[...b[9]||(b[9]=[f.createTextVNode("确定",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createElementVNode("div",sve,[b[7]||(b[7]=f.createElementVNode("div",{class:"fi-rules-dialog-hint"},"请选择校验类型",-1)),f.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=P=>o.value=P),placeholder:"请选择校验类型",clearable:"",class:"fi-rules-type-select"},{default:f.withCtx(()=>[f.createVNode(k,{label:"必填",value:"required"}),f.createVNode(k,{label:"手机号",value:"mobile"}),f.createVNode(k,{label:"固话",value:"landline"}),f.createVNode(k,{label:"身份证号",value:"idCard"}),f.createVNode(k,{label:"邮箱",value:"email"}),f.createVNode(k,{label:"邮政编码",value:"postal"})]),_:1},8,["modelValue"]),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[b[6]||(b[6]=f.createElementVNode("div",{class:"fi-rules-dialog-hint fi-rules-msg-label"},"错误提示",-1)),f.createVNode(x,{modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=P=>r.value=P),type:"textarea",rows:2,placeholder:i.value,maxlength:"200","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"])],64)):f.createCommentVNode("",!0)])]),_:1},8,["modelValue"])]),_:1})}}}),F5=wr(lve,[["__scopeId","data-v-1dd5eb69"]]);function cve(t){const e=t==null?void 0:t.type;return(t==null?void 0:t.nodeKind)==="slot"||e==="groupSlot"||e==="formSlot"?[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]},{name:"slotConfig",title:"自定义分组",defaultOpen:!0,fields:[]}]:e==="globalButton"?[{name:"globalButtons",title:"功能按钮",defaultOpen:!0,visible:()=>!0,fields:[]}]:["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmUpload","flmCascader","flmCheckbox","flmCheckboxGroup","flmColorPicker","flmRadio","flmRate","flmRead","flmAlert","flmTime","flmSlider","flmSwitch","flmTransfer","flmButton","flmDialog","flmDrawer","flmPagination","flmCustom"].includes(e||"")?[{name:"baseSettings",title:"基础设置",defaultOpen:!0,fields:[]},{name:"detailSettings",title:"详细设置",defaultOpen:!0,fields:[]}]:[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]}]}function z5(t){const e=[];return t.forEach(n=>{var r;if(n.type!=="group")return;const o=(r=n.children)==null?void 0:r[0];o&&(o.nodeKind==="form"?e.push({groupTitle:n.label||n.i||"分组",container:o,containerKind:"form"}):o.nodeKind==="subForm"&&e.push({groupTitle:n.label||n.i||"分组",container:o,containerKind:"subForm"}))}),e}function uve(t,e){return z5(t).length?e.length?null:"动态表单至少需要一个功能按钮,请在底部功能按钮区添加":`动态表单至少需要一个${Cr.form}或${Cr.subForm},请先新增分组并选择「${Cr.form}」或「${Cr.subForm}」类型`}function fve(t){const e=z5(t);for(const{groupTitle:n,container:o,containerKind:r}of e)if((o.children||[]).filter(s=>s.nodeKind==="control").length<1){const s=r==="subForm"?Cr.subForm:Cr.form;return`分组「${n}」中的${s}至少需要一个组件,请从左侧拖入控件`}return null}function _5(t){var e;return((e=t.formItem)==null?void 0:e.label)||t.label||t.i||"未命名控件"}function dve(t,e){if(!t.visible)return!0;try{return t.visible(e)}catch{return!0}}function hve(t,e){return e==null?!0:t==="switch"||t==="input-number"||t==="slider"?!1:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:!1}function pve(t,e){const n=t==null?void 0:t.rules;if(!(n!=null&&n.length))return null;for(let o=0;o<n.length;o+=1){const r=n[o],i=typeof r.message=="string"?r.message.trim():"";if(!i)return`控件「${e}」的校验规则第 ${o+1} 条须填写错误提示`;const s=r.pattern;if(s!=null&&String(s).trim()==="")return`控件「${e}」的校验规则第 ${o+1} 条格式无效`;if(r.required===!0&&!i)return`控件「${e}」的必填校验须填写错误提示`}return null}const mve={flmSelect:"下拉选择",flmRadio:"单选框",flmCheckboxGroup:"多选框"};function gve(t){const e=t.config;return e?t.type==="flmSelect"?Array.isArray(e.options)?e.options.length:0:t.type==="flmRadio"?Array.isArray(e.radios)?e.radios.length:0:t.type==="flmCheckboxGroup"?Array.isArray(e.items)?e.items.length:0:null:null}function vve(t,e){const n=gve(t);if(n===null||n>=1)return null;const o=_5(t),r=mve[t.type]??"控件";return`分组「${e}」中的${r}「${o}」须至少添加一个选项`}function bve(t,e){var i;const n=_5(t),o=typeof t.i=="string"?t.i.trim():"";if(!o)return`分组「${e}」中控件「${n}」的标识为空,请在属性区填写`;const r=vve(t,e);if(r)return r;if(t.nodeKind==="control"&&t.formItem){const s=typeof t.formItem.label=="string"?t.formItem.label.trim():"";if(!s)return`分组「${e}」中控件「${o}」的标签为空,请在属性区填写`;const a=pve(t.formItem,s||n);if(a)return a}if(t.type==="flmCustom"&&((i=t.customAttrFields)!=null&&i.length)){const s=t;for(const a of t.customAttrFields){if(!a.required||!dve(a,s))continue;const l=Sp(s,a.key);if(hve(a.component,l)){const c=t.customComponentName||t.customKey||"业务组件";return`分组「${e}」中${c}「${n}」的属性「${a.label}」为必填,请在详细设置中补全`}}}return null}function yve(t){var o,r;const e=(o=t.children)==null?void 0:o[0];return!e||e.nodeKind!=="slot"||(typeof((r=e.config)==null?void 0:r.slotName)=="string"?e.config.slotName.trim():"")?null:`分组「${t.label||t.i||"分组"}」的插槽名称(slotName)未填写,请在属性区补全`}function xve(t){for(let e=0;e<t.length;e+=1){const n=t[e],o=typeof n.event=="string"?n.event.trim():"";if(!o)return`功能按钮 #${e+1} 的按钮事件未填写,请在属性区补全`;if(!(typeof n.buttonText=="string"?n.buttonText.trim():typeof n.text=="string"?String(n.text).trim():""))return`功能按钮「${o}」的按钮文案未填写,请在属性区补全`}return null}function wve(t,e){var o;for(const r of t){if(r.type!=="group")continue;const i=typeof r.i=="string"?r.i.trim():"",s=r.label||r.i||"分组";if(!i)return`分组「${s}」的标识为空,请在属性区填写`;const a=yve(r);if(a)return a;const l=(o=r.children)==null?void 0:o[0];if((l==null?void 0:l.nodeKind)==="form"||(l==null?void 0:l.nodeKind)==="subForm")for(const c of l.children||[]){if(c.nodeKind!=="control")continue;const u=bve(c,s);if(u)return u}}const n=xve(e);return n||null}function Cve(t,e){return uve(t,e)??fve(t)??wve(t,e)}function kve(t,e){const n=Cve(t,e);return n?[n]:[]}function Sve(t,e){function n(l,c){if(!l||typeof l!="object")return{};const u=An(l);return c?NR(u,c):u}function o(){return kve(t.value,e.value)}function r(l,c,u){const h=l==null?void 0:l.prop;return h!=null&&String(h).trim()!==""?String(h):`ctrl_${c}_${u}_${Date.now()}`}function i(l){return l.customAttrFields??l.custom_attr_fields}function s(){const l=[],c=[...e.value];return t.value.forEach(u=>{var y;if(u.type!=="group"||!u.children||!u.children.length)return;const h=Rl(u.children,w=>w.nodeKind==="form"||w.nodeKind==="subForm");if(!h)return;const p=h.nodeKind==="subForm",m=h.config||{},g=(h.children||[]).map(w=>{var S,A;const k=w.formItem||{},C=Cfe(w),x={prop:k.prop||w.i,label:k.label??w.label,required:k.required===!0||Array.isArray(k.rules)&&k.rules.some(P=>(P==null?void 0:P.required)===!0),rules:k.rules,"show-message":k.showMessage,"inline-message":k.inlineMessage,size:k.size,gridX:w.x,gridY:w.y,gridW:w.w,gridH:w.h,controlType:C,controlConfig:n(w.config,C)};return w.type==="flmCustom"&&(w.customKey&&(x.customKey=w.customKey),w.customComponentName&&(x.customComponentName=w.customComponentName),(S=w.customAttrFields)!=null&&S.length&&(x.customAttrFields=An(w.customAttrFields))),w.paletteKey&&(x.paletteKey=w.paletteKey),(A=w.disabledConfig)!=null&&A.length&&(x.disabledConfig=An(w.disabledConfig)),w.field_code!=null&&String(w.field_code).trim()!==""&&(x.field_code=String(w.field_code).trim()),k.labelWidth!=null&&(x["label-width"]=k.labelWidth),x}),v=Pp(m||{},["buttons","items"]),b={id:u.i,title:u.label||"表单分组",type:p?"subForm":"form",groupName:u.label,groupProp:((y=u.config)==null?void 0:y.groupProp)??u.i,items:g,...v};g.length&&b.gridColumns==null&&(b.gridColumns=24),l.push(b)}),{groups:l,buttons:c}}function a(l){const c=[],u=l==null?void 0:l.groups;return(Array.isArray(u)?u:[]).forEach((p,m)=>{const g=(p==null?void 0:p.id)!=null&&String(p.id).trim()!==""?String(p.id):(p==null?void 0:p.groupProp)!=null&&String(p.groupProp).trim()!==""?String(p.groupProp):`group_${m}`,v=p.items,b=Pp(p,["id","title","type","groupName","groupProp","items","buttons"]),y={i:`${g}_form`,x:0,y:0,w:24,h:1,type:p.type==="subForm"?"flmSubForm":"flmForm",label:p.type==="subForm"?Cr.subForm:Cr.form,nodeKind:p.type==="subForm"?"subForm":"form",config:{...b,items:[]},children:[]},w=v??[];y.children=w.map((C,x)=>{const S={label:C.label,prop:C.prop,required:C.required===!0||Array.isArray(C.rules)&&C.rules.some(R=>(R==null?void 0:R.required)===!0),rules:C.rules,showMessage:C["show-message"],inlineMessage:C["inline-message"],size:C.size};C["label-width"]!=null&&(S.labelWidth=C["label-width"]);const A=r(C,g,x),P=kfe(C),O=i(C),M=P.layoutType,D=C.controlType??C.control_type,I=D!=null&&String(D).trim()!==""?String(D).trim():M,V=(C.controlConfig??C.control_config)||{},N={i:A,x:C.gridX??0,y:C.gridY??0,w:C.gridW??8,h:C.gridH??1,type:M,label:C.label,config:NR(An(typeof V=="object"&&V!==null?V:{}),I),formItem:{...S,prop:A},nodeKind:"control"};if(M==="flmCustom"){P.customKey&&(N.customKey=P.customKey),P.customComponentName&&(N.customComponentName=P.customComponentName);const R=Array.isArray(O)?O:[];R.length&&(N.customAttrFields=An(R))}const T=C.paletteKey??C.palette_key;T!=null&&String(T).trim()!==""&&(N.paletteKey=String(T));const B=C.disabledConfig??C.disabled_config;Array.isArray(B)&&B.length&&(N.disabledConfig=An(B));const _=C.field_code;return _!=null&&String(_).trim()!==""&&(N.field_code=String(_).trim()),N});const k={i:g,x:0,y:m,w:24,h:1,type:"group",label:p.title||p.groupName||"分组",config:{groupProp:p.groupProp},nodeKind:"group",children:[y]};k.groupProp=p.groupProp,c.push(k)}),c}return{buildFrameworkConfig:s,validateLayoutBeforeSave:o,parseConfigToLayout:a,snapshotControlConfig:n}}let U5=0;function Ss(){return`widget_${++U5}_${Date.now()}`}function cj(){return`group_${++U5}_${Date.now()}`}const up={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}};function jve(t,e,n,o){function r(p){var v;if(!p||!((v=p.children)!=null&&v.length))return"form";const g=p.children[0].nodeKind;return g==="subForm"?"subForm":g==="slot"?"slot":"form"}function i(p){const m={x:0,y:0,w:p==="slot"?ts:8,h:1};if(p==="slot")return{i:Ss(),x:m.x,y:m.y,w:m.w,h:1,type:"groupSlot",label:Cr.slot,nodeKind:"slot",config:{slotName:""}};if(p==="subForm")return{i:Ss(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmSubForm",label:Cr.subForm,nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};const g=_1("flmForm"),v=Pp(g||{},["buttons"]);return{i:Ss(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmForm",label:Cr.form,nodeKind:"form",config:v,children:[]}}function s(p,m){p.children=[i(m)],n.value=null}function a(p,m){var v;const g=(v=p.children)==null?void 0:v[0];if(!g){s(p,m);return}if(g.nodeKind==="slot"){s(p,m);return}if(g.nodeKind=m,g.type=m==="subForm"?"flmSubForm":"flmForm",g.label=m==="subForm"?Cr.subForm:Cr.form,Array.isArray(g.children)||(g.children=[]),(!g.config||typeof g.config!="object")&&(g.config={}),m==="subForm"){const b=g.config;Array.isArray(b.items)||(b.items=[]),b.gridColumns==null&&(b.gridColumns=24),b.addButtonText==null&&(b.addButtonText="新增一行"),b.defaultGenerateOne==null&&(b.defaultGenerateOne=!1)}}function l(p,m){if(!(!p||p.type!=="group"||r(p)===m)){if(m==="slot"){dt.ElMessageBox.confirm("切换至插槽将清空当前分组内容,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{s(p,m)}).catch(()=>{});return}a(p,m)}}function c(p){const m=L1(t.value),g=cj(),v=i(p),b={i:g,x:m.x,y:m.y,w:m.w,h:m.h,type:"group",label:d2(t.value,p),config:{},children:[v],nodeKind:"group"};t.value.push(b),e.value=g,n.value=null}function u(p){if(!p)return null;const m=p.nodeKind==="form",g=p.nodeKind==="subForm";if(!m&&!g)return null;let v=p.config||void 0;return v?(!Array.isArray(v.buttons)||!v.buttons.length)&&(v.buttons=[{...up.submit},{...up.cancel},{...up.reset}]):(v={items:[],gridColumns:24},g&&(v.addButtonText="新增一行",v.defaultGenerateOne=!1),v.buttons=[{...up.submit},{...up.cancel},{...up.reset}],p.config=v),v??null}const h=f.computed(()=>{var b;const p=e.value;if(!p)return null;const m=t.value.find(y=>y.i===p);if(!m||m.nodeKind!=="group"||!((b=m.children)!=null&&b.length))return null;const g=m.children[0];return u(g)??null});return{getGroupChildType:r,setGroupChildType:l,createGroupChildByType:i,doSetGroupChildType:s,doSetGroupChildTypeKeepData:a,addGroupByContainerType:c,formConfigForForm:u,selectedGroupFormConfig:h}}function Eve(t,e,n,o,r,i,s,a){function l(M,D){dt.ElMessageBox.alert(M,D,{type:"warning",confirmButtonText:"知道了"}),console.error(`[表单设计] ${D}:`,M)}function c(){const M=a.validateLayoutBeforeSave();if(M.length){l(M[0],"预览校验");return}i.value=An(a.buildFrameworkConfig()),s.value=!0}function u(){const M=a.validateLayoutBeforeSave();if(M.length){l(M[0],"保存校验");return}const D=a.buildFrameworkConfig();console.log("[FlameFramework] dynamic form config:",D),a.onSave(D)}function h(){dt.ElMessageBox.confirm("是否重置表单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value=a.getDefaultLayout(),r.value=[{...a.DEFAULT_BUTTONS.submit},{...a.DEFAULT_BUTTONS.cancel},{...a.DEFAULT_BUTTONS.reset}],e.value=null,o.value=null,n.value=null,dt.ElMessage.success("已重置"),a.onReset()}).catch(()=>{})}function p(M){const D=Ss();M.i=D,M.formItem&&(M.formItem={...M.formItem,prop:D})}function m(M){var D,I;if((D=M.children)!=null&&D.length)for(const V of M.children){const N=V;if(N.i=Ss(),!!((I=N.children)!=null&&I.length))for(const T of N.children)p(T)}}function g(M){const D=a.getNextGridPosition(t.value),I={...An(M),i:Ss(),x:D.x,y:D.y,w:D.w,h:D.h};m(I),t.value.push(I),e.value=I.i,o.value=null,n.value=null}function v(M){console.log("%c [ item ]-1315","font-size:13px; background:pink; color:#bf2c9f;",M),dt.ElMessageBox.confirm("确认删除当前分组(及内部内容)吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const D=Ev(t.value,{i:M.i});D>=0&&t.value.splice(D,1),e.value===M.i&&(e.value=null),n.value=null}).catch(()=>{})}function b(M){var D;for(const I of t.value){if(I.type!=="group")continue;const V=(D=I.children)==null?void 0:D[0];if((V==null?void 0:V.i)===M)return I}return null}function y(M,D,I){M.children||(M.children=[]);const V=a.getNextInnerGridPosition(M,D.w,D.h),N={...An(D),x:V.x,y:V.y,w:D.w,h:D.h};return p(N),M.children.push(N),a.selectFormChild(I,N),N}function w(M,D){const I=b(M.i);I&&y(M,D,I)}function k(M,D,I){var N;const V=(N=I.children)==null?void 0:N[0];if(!V||V.nodeKind!=="form"&&V.nodeKind!=="subForm"){dt.ElMessage.warning("目标分组须为分组或子项目类型");return}y(V,D,I),dt.ElMessage.success("已复制到目标分组")}function C(M,D){dt.ElMessageBox.confirm("确认删除当前子节点吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{var N;const I=M.children;if(!I)return;const V=Ev(I,{i:D.i});V>=0&&I.splice(V,1),((N=n.value)==null?void 0:N.childId)===D.i&&(n.value=null)}).catch(()=>{})}function x(M){M.nodeKind!=="form"&&M.nodeKind!=="subForm"||(a.compactInnerFormLayout(M),dt.ElMessage.success("已按从左到右、自上而下重新排布"))}function S(M){o.value=M,e.value=null,n.value=null}function A(){S(Wg)}function P(){r.value.push({event:`custom_${Date.now()}`,buttonText:"自定义",type:"default"}),o.value=r.value.length-1}function O(M){M<0||M>=r.value.length||(r.value.splice(M,1),o.value===M?o.value=r.value.length?Math.min(M,r.value.length-1):Wg:o.value!=null&&o.value>M&&o.value!==Wg&&o.value--)}return{onOpenPreview:c,onSaveConfig:u,onResetConfig:h,onCopyWidget:g,onDeleteWidget:v,onCopyFormChild:w,onCopyFormChildToGroup:k,onDeleteFormChild:C,onAutoCompactInner:x,onSelectGlobalButton:S,onSelectGlobalButtonsBar:A,addGlobalButton:P,removeGlobalButton:O}}function Ave(t){const e=f.computed(()=>{const N=t.value;return(N==null?void 0:N.type)==="flmInput"&&N.config?N.config:void 0}),n=f.computed(()=>{const N=t.value;return(N==null?void 0:N.type)==="flmSelect"&&N.config?N.config:void 0}),o=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmInputNumber"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),r=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDatePicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),i=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTimePicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),s=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTimeSelect"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),a=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCascader"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),l=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCheckbox"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),c=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmCheckboxGroup"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),u=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmColorPicker"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),h=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRadio"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),p=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRate"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),m=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmSlider"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),g=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmSwitch"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),v=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTransfer"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),b=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmButton"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),y=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDialog"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),w=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmDrawer"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),k=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmPagination"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),C=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmRead"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),x=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmAlert"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),S=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmUpload"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),A=f.computed(()=>{var N,T;return((N=t.value)==null?void 0:N.type)==="flmTime"&&((T=t.value)!=null&&T.config)?t.value.config:void 0}),P=[{label:"全部图片(通配)",value:"image/*"},{label:"全部视频(通配)",value:"video/*"},{label:"全部音频(通配)",value:"audio/*"},{label:"JPEG 图片",value:"image/jpeg"},{label:"PNG 图片",value:"image/png"},{label:"GIF 图片",value:"image/gif"},{label:"WebP 图片",value:"image/webp"},{label:"SVG 图片",value:"image/svg+xml"},{label:"BMP 图片",value:"image/bmp"},{label:"ICO 图标",value:"image/x-icon"},{label:"TIFF 图片",value:"image/tiff"},{label:"MP4 视频",value:"video/mp4"},{label:"WebM 视频",value:"video/webm"},{label:"OGG 视频",value:"video/ogg"},{label:"QuickTime 视频",value:"video/quicktime"},{label:"MP3 音频",value:"audio/mpeg"},{label:"WAV 音频",value:"audio/wav"},{label:"OGG 音频",value:"audio/ogg"},{label:"AAC 音频",value:"audio/aac"},{label:"FLAC 音频",value:"audio/flac"},{label:"PDF 文档",value:"application/pdf"},{label:"Word(.doc)",value:"application/msword"},{label:"Word(.docx)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"Excel(.xls)",value:"application/vnd.ms-excel"},{label:"Excel(.xlsx)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"PowerPoint(.ppt)",value:"application/vnd.ms-powerpoint"},{label:"PowerPoint(.pptx)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"纯文本",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"HTML",value:"text/html"},{label:"JSON",value:"application/json"},{label:"XML",value:"application/xml"},{label:"ZIP 压缩包",value:"application/zip"},{label:"RAR 压缩包",value:"application/x-rar-compressed"},{label:"7Z 压缩包",value:"application/x-7z-compressed"},{label:"扩展名:.pdf",value:".pdf"},{label:"扩展名:.doc",value:".doc"},{label:"扩展名:.docx",value:".docx"},{label:"扩展名:.xls",value:".xls"},{label:"扩展名:.xlsx",value:".xlsx"},{label:"扩展名:.ppt",value:".ppt"},{label:"扩展名:.pptx",value:".pptx"},{label:"扩展名:.txt",value:".txt"},{label:"扩展名:.csv",value:".csv"},{label:"扩展名:.zip",value:".zip"},{label:"扩展名:.rar",value:".rar"},{label:"扩展名:.7z",value:".7z"},{label:"扩展名:.jpg",value:".jpg"},{label:"扩展名:.jpeg",value:".jpeg"}];function O(N){const T=A.value;if(!T)return;const B=N;if(B==="date")T.format="YYYY-MM-DD";else if(B==="time")T.format="HH:mm:ss";else{const _=T.format&&String(T.format).trim()||"";(!_||_==="YYYY-MM-DD"||_==="HH:mm:ss")&&(T.format="YYYY-MM-DD HH:mm:ss")}}const M=f.computed(()=>{var N;return((N=t.value)==null?void 0:N.config)??void 0}),D=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&pfe.includes(t.value.type)}),I=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&t.value.type!=="flmRead"&&t.value.type!=="flmAlert"&&t.value.type!=="flmTime"}),V=f.computed(()=>{var N;return!!((N=t.value)!=null&&N.type)&&mfe.includes(t.value.type)});return{inputConfig:e,selectConfig:n,inputNumberConfig:o,datePickerConfig:r,timePickerConfig:i,timeSelectConfig:s,cascaderConfig:a,checkboxConfig:l,checkboxGroupConfig:c,colorPickerConfig:u,radioConfig:h,rateConfig:p,sliderConfig:m,switchConfig:g,transferConfig:v,buttonConfig:b,dialogConfig:y,drawerConfig:w,paginationConfig:k,readConfig:C,alertConfig:x,uploadConfig:S,uploadAcceptTypeOptions:P,timeConfig:A,onFlmTimePresetChange:O,controlConfig:M,controlHasPlaceholder:D,controlHasDisabled:I,controlHasClearable:V}}function Ove(t,e,n,o,r){const i=f.computed(()=>{if(o.value!=null){const u=o.value;if(u===Wg)return{i:"global_buttons_bar",type:"globalButton",nodeKind:"control",config:{}};const h=e.value[u];return h?{i:`global_btn_${u}`,type:"globalButton",nodeKind:"control",config:h}:null}if(r.value){const{formId:u,childId:h}=r.value,p=Rl(t.value,{i:u});if(!p||!p.children)return null;for(const m of p.children){if(!m.children)continue;const g=Rl(m.children,{i:h});if(g)return g}return null}if(!n.value)return null;const l=n.value,c=Rl(t.value,{i:l});if(c)return c;for(const u of t.value){if(!u.children)continue;const h=Rl(u.children,{i:l});if(h)return h}return null});f.watch(i,l=>{console.log("[FlameFramework] selectedItem changed:",l),l&&l.type&&l.type!=="flmForm"&&!l.formItem&&(l.formItem={...h2(l.type),label:l.label??z1(l.type)})},{immediate:!0});function s(l,c){o.value=null,n.value=l.i,r.value={formId:l.i,childId:c.i}}function a(l,c){var h,p,m;const u=l.target;(h=u.closest)!=null&&h.call(u,".module-header-actions")||(p=u.closest)!=null&&p.call(u,".module-child-delete")||(m=u.closest)!=null&&m.call(u,".form-inner-control-wrap")||(n.value=c.i,o.value=null,r.value=null,l.stopPropagation())}return{selectedItem:i,selectFormChild:s,onGridWidgetCapture:a}}function uj(t,e){var n;if(t!=null&&t.length)for(const o of t)e(o),(n=o.children)!=null&&n.length&&uj(o.children,e)}function W5(t){if("kind"in t&&t.kind==="custom"){const r=t;return{type:"flmCustom",kind:"custom",id:Ss(),label:r.label,defaultConfig:r.defaultConfig?An(r.defaultConfig):void 0,defaultFormItem:r.defaultFormItem?An(r.defaultFormItem):void 0,customKey:r.key,customComponentName:r.componentName,customAttrFields:r.attrFields?An(r.attrFields):[],gridW:r.gridW,gridH:r.gridH}}const e=t,n=t,o=n.key??e.key;return{type:e.type,kind:"basic",id:Ss(),label:e.label,defaultConfig:e.defaultConfig?An(e.defaultConfig):void 0,defaultFormItem:e.defaultFormItem?An(e.defaultFormItem):void 0,paletteKey:o,disabledConfig:n.disabledConfig?An(n.disabledConfig):e.disabledConfig?An(e.disabledConfig):void 0,gridW:n.gridW??e.gridW,gridH:n.gridH??e.gridH}}const H5=["预设","预设组件"];function G5(t,e=H5){const n=t.trim();return e.some(o=>o.trim()===n)}function K5(t,e=H5){const n=[],o=[];return t.forEach(r=>{if(G5(r.title,e)){(r.items??[]).forEach(i=>{i.kind!=="custom"&&n.push(i)});return}o.push(r)}),{presetItems:n,otherGroups:o}}function Tve(t){return{key:t.key,type:t.type,label:t.label,icon:t.icon??"🧩",defaultConfig:t.defaultConfig,defaultFormItem:t.defaultFormItem,disabledConfig:t.disabledConfig,gridW:t.gridW,gridH:t.gridH}}function Mve(t,e,n,o,r,i,s,a,l,c,u){function h(O){for(const M of a.value)for(const D of M.items)if(D.kind==="custom"&&D.key===O)return D}function p(O){for(const M of a.value)for(const D of M.items)if(D.kind==="custom"&&D.componentName===O)return D}function m(O){for(const M of a.value)if(G5(M.title))for(const D of M.items??[]){if(D.kind==="custom")continue;const I=D;if(I.key===O)return I}}function g(O,M){var D;M.paletteKey&&(O.paletteKey=M.paletteKey),(D=M.disabledConfig)!=null&&D.length&&(O.disabledConfig=An(M.disabledConfig))}function v(O){O.forEach(M=>{M.type!=="group"||!M.children||M.children.forEach(D=>{D.nodeKind!=="form"&&D.nodeKind!=="subForm"||uj(D.children,I=>{var N,T,B;if(I.type!=="flmCustom")return;const V=(_,R)=>{const E=_;I._resolveAttrFields=()=>{var Q;const U=R?p(E):h(E);return(Q=U==null?void 0:U.attrFields)!=null&&Q.length?An(U.attrFields):I.customAttrFields||[]}};if((N=I.customAttrFields)!=null&&N.length){I.customKey?V(I.customKey,!1):I.customComponentName&&V(I.customComponentName,!0);return}if(I.customKey){const _=h(I.customKey);(T=_==null?void 0:_.attrFields)!=null&&T.length&&(I.customAttrFields=An(_.attrFields)),V(I.customKey,!1);const R=_;typeof(R==null?void 0:R.gridW)=="number"&&R.gridW>0&&(I.w=R.gridW,I.h=R.gridH??1);return}if(I.customComponentName){const _=p(I.customComponentName);if(_){I.customKey=_.key,(B=_.attrFields)!=null&&B.length&&(I.customAttrFields=An(_.attrFields)),V(I.customComponentName,!0);const R=_;typeof(R==null?void 0:R.gridW)=="number"&&R.gridW>0&&(I.w=R.gridW,I.h=R.gridH??1)}}})})})}function b(O){O.forEach(M=>{M.type!=="group"||!M.children||M.children.forEach(D=>{D.nodeKind!=="form"&&D.nodeKind!=="subForm"||uj(D.children,I=>{var N,T;if(!I.paletteKey)return;const V=m(I.paletteKey);(N=V==null?void 0:V.disabledConfig)!=null&&N.length&&((T=I.disabledConfig)!=null&&T.length||(I.disabledConfig=An(V.disabledConfig)))})})})}function y(O,M){var I;const D=Rl(t.value,{i:O});if(!(D!=null&&D.children))return null;for(const V of D.children)if(!(V.nodeKind==="slot"||V.type==="groupSlot")&&(I=V.children)!=null&&I.some(N=>N.i===M))return V;return null}function w(O){var D;const M=Rl(t.value,{i:O});if(M)return M;for(const I of t.value)if((D=I.children)!=null&&D.some(V=>V.i===O))return I;return null}function k(){const O=[...r.value];r.value=[];let M=null;O.forEach(D=>{if(D.type!=="group")return;const I=L1(t.value),V=cj(),N={i:V,x:I.x,y:I.y,w:I.w,h:I.h,type:"group",label:d2(t.value,"form"),config:{},children:[],nodeKind:"group"};t.value.push(N),M=V}),M&&(o.value=null,n.value=null,e.value=M)}function C(O,M,D){if(M.length){if(O.children||(O.children=[]),O.nodeKind==="group"){let I=null;const V=O.children.some(T=>T.nodeKind==="subForm"),N=O.children.some(T=>T.nodeKind==="form");M.forEach(T=>{if(T.type!=="formSlot"){if(T.type==="groupSlot"){const B=mg(O,24,1),_={i:Ss(),x:B.x,y:B.y,w:24,h:1,type:"groupSlot",label:Cr.slot,nodeKind:"slot",config:{slotName:""}};O.children.push(_),I=_;return}if(T.type==="subForm"){if(N||V)return;const B=mg(O,24,1),_={i:Ss(),x:B.x,y:B.y,w:B.w,h:B.h,type:"flmSubForm",label:Cr.subForm,nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};O.children.push(_),I=_;return}if(T.type==="form"){if(N||V)return;const B=mg(O,24,1),_=_1("flmForm"),R=Pp(_||{},["buttons"]),E={i:Ss(),x:B.x,y:B.y,w:B.w,h:B.h,type:"flmForm",label:Cr.form,nodeKind:"form",config:R,children:[]};O.children.push(E),I=E;return}}}),I&&(o.value=null,n.value=null,e.value=I.i);return}if(O.nodeKind==="form"||O.nodeKind==="subForm"){const I=(N,T)=>{const B=HR(O,D.gridEl,D.clientX,D.clientY,ts,GR,f2,N,T,"preview");return ffe(O,B,ts),B};let V=null;if(M.forEach(N=>{var W;if(N.type==="group"||N.type==="subForm"||N.type==="form"||N.type==="groupSlot")return;if(N.type==="formSlot"){const Y=I(24,1),$={i:Ss(),x:Y.x,y:Y.y,w:Y.w,h:1,type:"formSlot",label:"表单插槽",nodeKind:"slot",config:{slotName:""}};O.children||(O.children=[]),O.children.push($),V=$;return}if(N.type==="flmCustom"||N.kind==="custom"){const Y=typeof N.gridW=="number"&&N.gridW>0?{w:N.gridW,h:N.gridH??1}:gg("flmCustom"),$=I(Y.w,Y.h),ve=p2("flmCustom"),xe=YR(ve,N.defaultConfig),ge=h2("flmCustom"),q=N.defaultFormItem?An({...ge,...N.defaultFormItem}):An(ge),me={i:Ss(),x:$.x,y:$.y,w:Y.w,h:Y.h,type:"flmCustom",label:N.label||N.customComponentName||"业务组件",config:xe,formItem:q,nodeKind:"control",customKey:N.customKey,customComponentName:N.customComponentName,customAttrFields:(W=N.customAttrFields)!=null&&W.length?An(N.customAttrFields):[]},re=N.customKey||"",j=N.customComponentName||"";me._resolveAttrFields=()=>{var Ee;const oe=re?h(re):j?p(j):void 0;return(Ee=oe==null?void 0:oe.attrFields)!=null&&Ee.length?An(oe.attrFields):me.customAttrFields||[]},O.children||(O.children=[]),O.children.push(me),V=me;return}const T=N.type,B=typeof N.gridW=="number"&&N.gridW>0?{w:N.gridW,h:N.gridH??1}:gg(T),_=I(B.w,B.h),R=p2(T),E=YR(R,N.defaultConfig),U=h2(T),Q=N.defaultFormItem?An({...U,...N.defaultFormItem}):An(U),K={i:Ss(),x:_.x,y:_.y,w:B.w,h:B.h,type:T,label:N.label||z1(T),config:E,formItem:Q,nodeKind:"control"};g(K,N),O.children||(O.children=[]),O.children.push(K),V=K}),V){o.value=null;const N=w(O.i);N?l(N,V):(e.value=O.i,n.value=null)}}}}function x(O,M,D,I,V){const N=WR({to:D,clientX:Number.isFinite(I)?I:void 0,clientY:Number.isFinite(V)?V:void 0});C(O,[M],N)}function S(O,M){!M.children||!O||(O.forEach(D=>{const I=Rl(M.children,{i:D.i});I&&(I.x=D.x,I.y=D.y,I.w=D.w,I.h=D.h)}),UR(M.children)&&F1(M))}function A(){const O=[...s.value];s.value=[];for(const M of O)(M.type==="form"||M.type==="subForm"||M.type==="groupSlot")&&u(M.type==="groupSlot"?"slot":M.type)}function P(O){const M=t.value[O];if(!M||M.nodeKind==="group")return;const D=M.type,I=D==="groupSlot"?"slot":D==="subForm"?"subForm":"form";t.value.splice(O,1);const V=cj(),N=c(I),T=L1(t.value),B={i:V,x:T.x,y:T.y,w:T.w,h:T.h,type:"group",label:d2(t.value,I),config:{},children:[N],nodeKind:"group"};t.value.splice(O,0,B),o.value=null,n.value=null,e.value=V}return{onDropFromPalette:k,onInteractDropToFormInner:x,onContainerDrop:A,onDropContainerInRoot:P,onInnerLayoutUpdated:S,findFormContainerForInnerControl:y,findGroupByNodeId:w,findCustomPaletteByKey:h,findCustomPaletteByComponentName:p,hydrateLayoutCustomFields:v,hydrateLayoutPresetFields:b}}const $o={init:Nve,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function fp(){}function Nve(t){const e=t;$o.document=e.document,$o.DocumentFragment=e.DocumentFragment||fp,$o.SVGElement=e.SVGElement||fp,$o.SVGSVGElement=e.SVGSVGElement||fp,$o.SVGElementInstance=e.SVGElementInstance||fp,$o.Element=e.Element||fp,$o.HTMLElement=e.HTMLElement||$o.Element,$o.Event=e.Event,$o.Touch=e.Touch||fp,$o.PointerEvent=e.PointerEvent||e.MSPointerEvent}var Y5=t=>!!(t&&t.Window)&&t instanceof t.Window;let X5,fd;function J5(t){X5=t;const e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),fd=t}typeof window<"u"&&window&&J5(window);function wc(t){return Y5(t)?t:(t.ownerDocument||t).defaultView||fd.window}const Pve=t=>t===fd||Y5(t),Dve=t=>w0(t)&&t.nodeType===11,w0=t=>!!t&&typeof t=="object",Q5=t=>typeof t=="function";var qe={window:Pve,docFrag:Dve,object:w0,func:Q5,number:t=>typeof t=="number",bool:t=>typeof t=="boolean",string:t=>typeof t=="string",element:t=>{if(!t||typeof t!="object")return!1;const e=wc(t)||fd;return/object|function/.test(typeof Element)?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:t=>w0(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString()),array:t=>w0(t)&&typeof t.length<"u"&&Q5(t.splice)};const Ur={init:Rve,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function Rve(t){const e=$o.Element,n=t.navigator||{};Ur.supportsTouch="ontouchstart"in t||qe.func(t.DocumentTouch)&&$o.document instanceof t.DocumentTouch,Ur.supportsPointerEvent=n.pointerEnabled!==!1&&!!$o.PointerEvent,Ur.isIOS=/iP(hone|od|ad)/.test(n.platform),Ur.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),Ur.isIe9=/MSIE 9/.test(n.userAgent),Ur.isOperaMobile=n.appName==="Opera"&&Ur.supportsTouch&&/Presto/.test(n.userAgent),Ur.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",Ur.pEventTypes=Ur.supportsPointerEvent?$o.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Ur.wheelEvent=$o.document&&"onmousewheel"in $o.document?"mousewheel":"wheel"}const Z5=(t,e)=>{for(const n of e)t.push(n);return t},q5=t=>Z5([],t),Gg=(t,e)=>{for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},C0=(t,e)=>t[Gg(t,e)];function k0(t){const e={};for(const n in t){const o=t[n];qe.plainObject(o)?e[n]=k0(o):qe.array(o)?e[n]=q5(o):e[n]=o}return e}function os(t,e){for(const o in e)t[o]=e[o];return t}let $5=0,Cc,dd;function Ive(t){if(Cc=t.requestAnimationFrame,dd=t.cancelAnimationFrame,!Cc){const e=["ms","moz","webkit","o"];for(const n of e)Cc=t[`${n}RequestAnimationFrame`],dd=t[`${n}CancelAnimationFrame`]||t[`${n}CancelRequestAnimationFrame`]}Cc=Cc&&Cc.bind(t),dd=dd&&dd.bind(t),Cc||(Cc=e=>{const n=Date.now(),o=Math.max(0,16-(n-$5)),r=t.setTimeout(()=>{e(n+o)},o);return $5=n+o,r},dd=e=>clearTimeout(e))}var dp={request:t=>Cc(t),cancel:t=>dd(t),init:Ive};function hd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r=>!0,o=arguments.length>3?arguments[3]:void 0;if(o=o||{},qe.string(t)&&t.search(" ")!==-1&&(t=eV(t)),qe.array(t))return t.forEach(r=>hd(r,e,n,o)),o;if(qe.object(t)&&(e=t,t=""),qe.func(e)&&n(t))o[t]=o[t]||[],o[t].push(e);else if(qe.array(e))for(const r of e)hd(t,r,n,o);else if(qe.object(e))for(const r in e){const i=eV(r).map(s=>`${t}${s}`);hd(i,e[r],n,o)}return o}function eV(t){return t.trim().split(/ +/)}function tV(t,e){for(const n of e){if(t.immediatePropagationStopped)break;n(t)}}class nV{constructor(e){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=os({},e||{})}fire(e){let n;const o=this.global;(n=this.types[e.type])&&tV(e,n),!e.propagationStopped&&o&&(n=o[e.type])&&tV(e,n)}on(e,n){const o=hd(e,n);for(e in o)this.types[e]=Z5(this.types[e]||[],o[e])}off(e,n){const o=hd(e,n);for(e in o){const r=this.types[e];if(!(!r||!r.length))for(const i of o[e]){const s=r.indexOf(i);s!==-1&&r.splice(s,1)}}}getRect(e){return null}}function pd(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function oV(t,e){for(;qe.element(t);){if(Vu(t,e))return t;t=md(t)}return null}function md(t){let e=t.parentNode;if(qe.docFrag(e)){for(;(e=e.host)&&qe.docFrag(e););return e}return e}function Vu(t,e){return fd!==X5&&(e=e.replace(/\/deep\//g," ")),t[Ur.prefixedMatchesSelector](e)}const fj=t=>t.parentNode||t.host;function Vve(t){let e=[],n;for(let o=0;o<t.length;o++){const r=t[o],i=t[n];if(!r||o===n)continue;if(!i){n=o;continue}const s=fj(r),a=fj(i);if(s===r.ownerDocument)continue;if(a===r.ownerDocument){n=o;continue}if(s===a){Bve(r,i)&&(n=o);continue}e=e.length?e:rV(i);let l;if(i instanceof $o.HTMLElement&&r instanceof $o.SVGElement&&!(r instanceof $o.SVGSVGElement)){if(r===a)continue;l=r.ownerSVGElement}else l=r;const c=rV(l,i.ownerDocument);let u=0;for(;c[u]&&c[u]===e[u];)u++;const h=[c[u-1],c[u],e[u]];if(h[0]){let p=h[0].lastChild;for(;p;){if(p===h[1]){n=o,e=c;break}else if(p===h[2])break;p=p.previousSibling}}}return n}function rV(t,e){const n=[];let o=t,r;for(;(r=fj(o))&&o!==e&&r!==o.ownerDocument;)n.unshift(o),o=r;return n}function Bve(t,e){const n=parseInt(wc(t).getComputedStyle(t).zIndex,10)||0,o=parseInt(wc(e).getComputedStyle(e).zIndex,10)||0;return n>=o}function iV(t,e,n){for(;qe.element(t);){if(Vu(t,e))return!0;if(t=md(t),t===n)return Vu(t,e)}return!1}function sV(t){return t.correspondingUseElement||t}function Lve(t){return t=t||fd,{x:t.scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function dj(t){const e=t instanceof $o.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function hj(t){const e=dj(t);if(!Ur.isIOS7&&e){const n=Lve(wc(t));e.left+=n.x,e.right+=n.x,e.top+=n.y,e.bottom+=n.y}return e}function aV(t){return qe.string(t)?($o.document.querySelector(t),!0):!1}const Fve=["webkit","moz"];function lV(t,e){t.__set||(t.__set={});for(const n in e)Fve.some(o=>n.indexOf(o)===0)||typeof t[n]!="function"&&n!=="__set"&&Object.defineProperty(t,n,{get(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set(o){t.__set[n]=o},configurable:!0});return t}var pj=(t,e)=>Math.sqrt(t*t+e*e);function mj(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function zve(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp}function _ve(t,e){const n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n}function Uve(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function cV(t){return t instanceof $o.Event||t instanceof $o.Touch}function S0(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n}function uV(t,e){return e=e||{x:0,y:0},Ur.isOperaMobile&&cV(t)?(S0("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):S0("page",t,e),e}function Wve(t,e){return e=e||{},Ur.isOperaMobile&&cV(t)?S0("screen",t,e):S0("client",t,e),e}function j0(t){return qe.number(t.pointerId)?t.pointerId:t.identifier}function Hve(t,e,n){const o=e.length>1?fV(e):e[0];uV(o,t.page),Wve(o,t.client),t.timeStamp=n}function gj(t){const e=[];return qe.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function fV(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of t)for(const o in e)e[o]+=n[o];for(const n in e)e[n]/=t.length;return e}function Gve(t){if(!t.length)return null;const e=gj(t),n=Math.min(e[0].pageX,e[1].pageX),o=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:o,left:n,top:o,right:r,bottom:i,width:r-n,height:i-o}}function Kve(t,e){const n=e+"X",o=e+"Y",r=gj(t),i=r[0][n]-r[1][n],s=r[0][o]-r[1][o];return pj(i,s)}function Yve(t,e){const n=e+"X",o=e+"Y",r=gj(t),i=r[1][n]-r[0][n],s=r[1][o]-r[0][o];return 180*Math.atan2(s,i)/Math.PI}function Xve(t){return qe.string(t.pointerType)?t.pointerType:qe.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof $o.Touch?"touch":"mouse"}function dV(t){const e=qe.func(t.composedPath)?t.composedPath():t.path;return[sV(e?e[0]:t.target),sV(t.currentTarget)]}function Kg(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function Jve(t){var e;const n=[],o={},r=[],i={add:s,remove:a,addDelegate:l,removeDelegate:c,delegateListener:u,delegateUseCapture:h,delegatedEvents:o,documents:r,targets:n,supportsOptions:!1,supportsPassive:!1};(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i;function s(p,m,g,v){if(!p.addEventListener)return;const b=Yg(v);let y=C0(n,w=>w.eventTarget===p);y||(y={eventTarget:p,events:{}},n.push(y)),y.events[m]||(y.events[m]=[]),C0(y.events[m],w=>w.func===g&&E0(w.options,b))||(p.addEventListener(m,g,i.supportsOptions?b:b.capture),y.events[m].push({func:g,options:b}))}function a(p,m,g,v){if(!p.addEventListener||!p.removeEventListener)return;const b=Gg(n,C=>C.eventTarget===p),y=n[b];if(!y||!y.events)return;if(m==="all"){for(m in y.events)y.events.hasOwnProperty(m)&&a(p,m,"all");return}let w=!1;const k=y.events[m];if(k)if(g==="all"){for(let C=k.length-1;C>=0;C--){const x=k[C];a(p,m,x.func,x.options)}return}else{const C=Yg(v);for(let x=0;x<k.length;x++){const S=k[x];if(S.func===g&&E0(S.options,C)){p.removeEventListener(m,g,i.supportsOptions?C:C.capture),k.splice(x,1),k.length===0&&(delete y.events[m],w=!0);break}}}w&&!Object.keys(y.events).length&&n.splice(b,1)}function l(p,m,g,v,b){const y=Yg(b);if(!o[g]){o[g]=[];for(const C of r)s(C,g,u),s(C,g,h,!0)}const w=o[g];let k=C0(w,C=>C.selector===p&&C.context===m);k||(k={selector:p,context:m,listeners:[]},w.push(k)),k.listeners.push({func:v,options:y})}function c(p,m,g,v,b){const y=Yg(b),w=o[g];let k=!1,C;if(w)for(C=w.length-1;C>=0;C--){const x=w[C];if(x.selector===p&&x.context===m){const{listeners:S}=x;for(let A=S.length-1;A>=0;A--){const P=S[A];if(P.func===v&&E0(P.options,y)){S.splice(A,1),S.length||(w.splice(C,1),a(m,g,u),a(m,g,h,!0)),k=!0;break}}if(k)break}}}function u(p,m){const g=Yg(m),v=new Qve(p),b=o[p.type],[y]=dV(p);let w=y;for(;qe.element(w);){for(let k=0;k<b.length;k++){const C=b[k],{selector:x,context:S}=C;if(Vu(w,x)&&pd(S,y)&&pd(S,w)){const{listeners:A}=C;v.currentTarget=w;for(const P of A)E0(P.options,g)&&P.func(v)}}w=md(w)}}function h(p){return u.call(this,p,!0)}return i}class Qve{constructor(e){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,lV(this,e)}preventOriginalDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}stopImmediatePropagation(){this.originalEvent.stopImmediatePropagation()}}function Yg(t){return qe.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function E0(t,e){return t===e?!0:typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive}var Zve={id:"events",install:Jve};const qve=function(e){return/^(always|never|auto)$/.test(e)?(this.options.preventDefault=e,this):qe.bool(e)?(this.options.preventDefault=e?"always":"never",this):this.options.preventDefault};function $ve(t,e,n){const o=t.options.preventDefault;if(o!=="never"){if(o==="always"){n.preventDefault();return}if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const r=wc(n.target).document,i=e.getDocOptions(r);if(!(i&&i.events)||i.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||qe.element(n.target)&&Vu(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function ebe(t){let{interaction:e,event:n}=t;e.interactable&&e.interactable.checkAndPreventDefault(n)}function tbe(t){const{Interactable:e}=t;e.prototype.preventDefault=qve,e.prototype.checkAndPreventDefault=function(n){return $ve(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener(n){for(const o of t.interactions.list)if(o.element&&(o.element===n.target||pd(o.element,n.target))){o.interactable.checkAndPreventDefault(n);return}}})}var nbe={id:"core/interactablePreventDefault",install:tbe,listeners:["down","move","up","cancel"].reduce((t,e)=>(t[`interactions:${e}`]=ebe,t),{})};function Xg(t,e){let n=!1;return function(){return n||(fd.console.warn(e),n=!0),t.apply(this,arguments)}}function hV(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function pV(t,e,n){return t==="parent"?md(n):t==="self"?e.getRect(n):oV(n,t)}function obe(t,e,n,o){let r=t;return qe.string(r)?r=pV(r,e,n):qe.func(r)&&(r=r(...o)),qe.element(r)&&(r=hj(r)),r}function rbe(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function ibe(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function mV(t,e,n){const o=n&&t.options[n],i=o&&o.origin||t.options.origin,s=obe(i,t,e,[t&&e]);return rbe(s)||{x:0,y:0}}class vj{constructor(e){this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(vj.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const gV={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class bj extends vj{constructor(e,n,o,r,i,s,a){super(e),this.relatedTarget=null,this.screenX=void 0,this.screenY=void 0,this.button=void 0,this.buttons=void 0,this.ctrlKey=void 0,this.shiftKey=void 0,this.altKey=void 0,this.metaKey=void 0,this.page=void 0,this.client=void 0,this.delta=void 0,this.rect=void 0,this.x0=void 0,this.y0=void 0,this.t0=void 0,this.dt=void 0,this.duration=void 0,this.clientX0=void 0,this.clientY0=void 0,this.velocity=void 0,this.speed=void 0,this.swipe=void 0,this.axes=void 0,this.preEnd=void 0,i=i||e.element;const l=e.interactable,c=(l&&l.options||gV).deltaSource,u=mV(l,i,o),h=r==="start",p=r==="end",m=h?this:e.prevEvent,g=h?e.coords.start:p?{page:m.page,client:m.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;this.page=os({},g.page),this.client=os({},g.client),this.rect=os({},e.rect),this.timeStamp=g.timeStamp,p||(this.page.x-=u.x,this.page.y-=u.y,this.client.x-=u.x,this.client.y-=u.y),this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.button=n.button,this.buttons=n.buttons,this.target=i,this.currentTarget=i,this.preEnd=s,this.type=a||o+(r||""),this.interactable=l,this.t0=h?e.pointers[e.pointers.length-1].downTime:m.t0,this.x0=e.coords.start.page.x-u.x,this.y0=e.coords.start.page.y-u.y,this.clientX0=e.coords.start.client.x-u.x,this.clientY0=e.coords.start.client.y-u.y,h||p?this.delta={x:0,y:0}:this.delta={x:this[c].x-m[c].x,y:this[c].y-m[c].y},this.dt=e.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=os({},e.coords.velocity[c]),this.speed=pj(this.velocity.x,this.velocity.y),this.swipe=p||r==="inertiastart"?this.getSwipe():null}getSwipe(){const e=this._interaction;if(e.prevEvent.speed<600||this.timeStamp-e.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;const o=22.5;n<0&&(n+=360);const r=135-o<=n&&n<225+o,i=225-o<=n&&n<315+o,s=!r&&(315-o<=n||n<45+o),a=!i&&45-o<=n&&n<135+o;return{up:i,down:a,left:r,right:s,angle:n,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(bj.prototype,{pageX:{get(){return this.page.x},set(t){this.page.x=t}},pageY:{get(){return this.page.y},set(t){this.page.y=t}},clientX:{get(){return this.client.x},set(t){this.client.x=t}},clientY:{get(){return this.client.y},set(t){this.client.y=t}},dx:{get(){return this.delta.x},set(t){this.delta.x=t}},dy:{get(){return this.delta.y},set(t){this.delta.y=t}},velocityX:{get(){return this.velocity.x},set(t){this.velocity.x=t}},velocityY:{get(){return this.velocity.y},set(t){this.velocity.y=t}}});class sbe{constructor(e,n,o,r,i){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=o,this.downTime=r,this.downTarget=i}}let abe=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),lbe=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),cbe=0;class ube{get pointerMoveTolerance(){return 1}constructor(e){this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Xg(function(i){this.move(i)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:Kg(),prev:Kg(),cur:Kg(),delta:Kg(),velocity:Kg()},this._id=cbe++;let{pointerType:n,scopeFire:o}=e;this._scopeFire=o,this.pointerType=n;const r=this;this._proxy={};for(const i in abe)Object.defineProperty(this._proxy,i,{get(){return r[i]}});for(const i in lbe)Object.defineProperty(this._proxy,i,{value:function(){return r[i](...arguments)}});this._scopeFire("interactions:new",{interaction:this})}pointerDown(e,n,o){const r=this.updatePointer(e,n,o,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:o,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}start(e,n,o){return this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled?!1:(hV(this.prepared,e),this.interactable=n,this.element=o,this.rect=n.getRect(o),this.edges=this.prepared.edges?os({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}pointerMove(e,n,o){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(e,n,o,!1);const r=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;let i,s;this.pointerIsDown&&!this.pointerWasMoved&&(i=this.coords.cur.client.x-this.coords.start.client.x,s=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=pj(i,s)>this.pointerMoveTolerance);const a=this.getPointerIndex(e),l={pointer:e,pointerIndex:a,pointerInfo:this.pointers[a],event:n,type:"move",eventTarget:o,dx:i,dy:s,duplicate:r,interaction:this};r||_ve(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",l),!r&&!this.simulation&&(this.interacting()&&(l.type=null,this.move(l)),this.pointerWasMoved&&mj(this.coords.prev,this.coords.cur))}move(e){(!e||!e.event)&&Uve(this.coords.delta),e=os({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{}),e.phase="move",this._doPhase(e)}pointerUp(e,n,o,r){let i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,o,!1));const s=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${s}`,{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:o,type:s,curEventTarget:r,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}documentBlur(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}end(e){this._ending=!0,e=e||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}currentAction(){return this._interacting?this.prepared.name:null}interacting(){return this._interacting}stop(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}getPointerIndex(e){const n=j0(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Gg(this.pointers,o=>o.id===n)}getPointerInfo(e){return this.pointers[this.getPointerIndex(e)]}updatePointer(e,n,o,r){const i=j0(e);let s=this.getPointerIndex(e),a=this.pointers[s];return r=r===!1?!1:r||/(down|start)$/i.test(n.type),a?a.pointer=e:(a=new sbe(i,e,n,null,null),s=this.pointers.length,this.pointers.push(a)),Hve(this.coords.cur,this.pointers.map(l=>l.pointer),this._now()),zve(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=o,lV(this.downPointer,e),this.interacting()||(mj(this.coords.start,this.coords.cur),mj(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,o),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:o,down:r,pointerInfo:a,pointerIndex:s,interaction:this}),s}removePointer(e,n){const o=this.getPointerIndex(e);if(o===-1)return;const r=this.pointers[o];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:o,pointerInfo:r,interaction:this}),this.pointers.splice(o,1),this.pointerIsDown=!1}_updateLatestPointer(e,n,o){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=o}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(e,n,o,r){return new bj(this,e,this.prepared.name,n,this.element,o,r)}_fireEvent(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}_doPhase(e){const{event:n,phase:o,preEnd:r,type:i}=e,{rect:s}=this;if(s&&o==="move"&&(ibe(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire(`interactions:before-action-${o}`,e)===!1)return!1;const l=e.iEvent=this._createPreparedEvent(n,o,r,i);return this._scopeFire(`interactions:action-${o}`,e),o==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire(`interactions:after-action-${o}`,e),!0}_now(){return Date.now()}}const yj={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(t){for(const e of yj.methodOrder){const n=yj[e](t);if(n)return n}return null},simulationResume(t){let{pointerType:e,eventType:n,eventTarget:o,scope:r}=t;if(!/down|start/i.test(n))return null;for(const i of r.interactions.list){let s=o;if(i.simulation&&i.simulation.allowResume&&i.pointerType===e)for(;s;){if(s===i.element)return i;s=md(s)}}return null},mouseOrPen(t){let{pointerId:e,pointerType:n,eventType:o,scope:r}=t;if(n!=="mouse"&&n!=="pen")return null;let i;for(const s of r.interactions.list)if(s.pointerType===n){if(s.simulation&&!vV(s,e))continue;if(s.interacting())return s;i||(i=s)}if(i)return i;for(const s of r.interactions.list)if(s.pointerType===n&&!(/down/i.test(o)&&s.simulation))return s;return null},hasPointer(t){let{pointerId:e,scope:n}=t;for(const o of n.interactions.list)if(vV(o,e))return o;return null},idle(t){let{pointerType:e,scope:n}=t;for(const o of n.interactions.list){if(o.pointers.length===1){const r=o.interactable;if(r&&!(r.options.gesture&&r.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function vV(t,e){return t.pointers.some(n=>{let{id:o}=n;return o===e})}const bV=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function fbe(t){const e={};for(const i of bV)e[i]=yV(i,t);const n=Ur.pEventTypes;let o;$o.PointerEvent?o=[{type:n.down,listener:r},{type:n.down,listener:e.pointerDown},{type:n.move,listener:e.pointerMove},{type:n.up,listener:e.pointerUp},{type:n.cancel,listener:e.pointerUp}]:o=[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:r},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}],o.push({type:"blur",listener(i){for(const s of t.interactions.list)s.documentBlur(i)}}),t.prevTouchTime=0,t.Interaction=class extends ube{get pointerMoveTolerance(){return t.interactions.pointerMoveTolerance}set pointerMoveTolerance(i){t.interactions.pointerMoveTolerance=i}_now(){return t.now()}},t.interactions={list:[],new(i){i.scopeFire=(a,l)=>t.fire(a,l);const s=new t.Interaction(i);return t.interactions.list.push(s),s},listeners:e,docEvents:o,pointerMoveTolerance:1};function r(){for(const i of t.interactions.list)if(!(!i.pointerIsDown||i.pointerType!=="touch"||i._interacting))for(const s of i.pointers)t.documents.some(a=>{let{doc:l}=a;return pd(l,s.downTarget)})||i.removePointer(s.pointer,s.event)}t.usePlugin(nbe)}function yV(t,e){return function(n){const o=e.interactions.list,r=Xve(n),[i,s]=dV(n),a=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(const l of n.changedTouches){const c=l,u=j0(c),h={pointer:c,pointerId:u,pointerType:r,eventType:n.type,eventTarget:i,curEventTarget:s,scope:e},p=xV(h);a.push([h.pointer,h.eventTarget,h.curEventTarget,p])}}else{let l=!1;if(!Ur.supportsPointerEvent&&/mouse/.test(n.type)){for(let c=0;c<o.length&&!l;c++)l=o[c].pointerType!=="mouse"&&o[c].pointerIsDown;l=l||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!l){const c={pointer:n,pointerId:j0(n),pointerType:r,eventType:n.type,curEventTarget:s,eventTarget:i,scope:e},u=xV(c);a.push([c.pointer,c.eventTarget,c.curEventTarget,u])}}for(const[l,c,u,h]of a)h[t](l,n,c,u)}}function xV(t){const{pointerType:e,scope:n}=t,r={interaction:yj.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function xj(t,e){let{doc:n,scope:o,options:r}=t;const{interactions:{docEvents:i},events:s}=o,a=s[e];o.browser.isIOS&&!r.events&&(r.events={passive:!1});for(const c in s.delegatedEvents)a(n,c,s.delegateListener),a(n,c,s.delegateUseCapture,!0);const l=r&&r.events;for(const{type:c,listener:u}of i)a(n,c,u,l)}const dbe={id:"core/interactions",install:fbe,listeners:{"scope:add-document":t=>xj(t,"add"),"scope:remove-document":t=>xj(t,"remove"),"interactable:unset":(t,e)=>{let{interactable:n}=t;for(let o=e.interactions.list.length-1;o>=0;o--){const r=e.interactions.list[o];r.interactable===n&&(r.stop(),e.fire("interactions:destroy",{interaction:r}),r.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(o,1))}}},onDocSignal:xj,doOnInteractions:yV,methodNames:bV};function A0(t,e){if(e.phaselessTypes[t])return!0;for(const n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}var Bu=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Bu||{});class hbe{get _defaults(){return{base:{},perAction:{},actions:{}}}constructor(e,n,o,r){this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new nV,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||o,this._win=wc(aV(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=r,this.set(n)}setOnEvents(e,n){return qe.func(n.onstart)&&this.on(`${e}start`,n.onstart),qe.func(n.onmove)&&this.on(`${e}move`,n.onmove),qe.func(n.onend)&&this.on(`${e}end`,n.onend),qe.func(n.oninertiastart)&&this.on(`${e}inertiastart`,n.oninertiastart),this}updatePerActionListeners(e,n,o){var r;const i=(r=this._actions.map[e])==null?void 0:r.filterEventType,s=a=>(i==null||i(a))&&A0(a,this._actions);(qe.array(n)||qe.object(n))&&this._onOff(Bu.Off,e,n,void 0,s),(qe.array(o)||qe.object(o))&&this._onOff(Bu.On,e,o,void 0,s)}setPerAction(e,n){const o=this._defaults;for(const r in n){const i=r,s=this.options[e],a=n[i];i==="listeners"&&this.updatePerActionListeners(e,s.listeners,a),qe.array(a)?s[i]=q5(a):qe.plainObject(a)?(s[i]=os(s[i]||{},k0(a)),qe.object(o.perAction[i])&&"enabled"in o.perAction[i]&&(s[i].enabled=a.enabled!==!1)):qe.bool(a)&&qe.object(o.perAction[i])?s[i].enabled=a:s[i]=a}}getRect(e){return e=e||(qe.element(this.target)?this.target:null),qe.string(this.target)&&(e=e||this._context.querySelector(this.target)),hj(e)}rectChecker(e){return qe.func(e)?(this.getRect=n=>{const o=os({},e.apply(this,n));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}_backCompatOption(e,n){if(aV(n)||qe.object(n)){this.options[e]=n;for(const o in this._actions.map)this.options[o][e]=n;return this}return this.options[e]}origin(e){return this._backCompatOption("origin",e)}deltaSource(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}getAllElements(){const{target:e}=this;return qe.string(e)?Array.from(this._context.querySelectorAll(e)):qe.func(e)&&e.getAllElements?e.getAllElements():qe.element(e)?[e]:[]}context(){return this._context}inContext(e){return this._context===e.ownerDocument||pd(this._context,e)}testIgnoreAllow(e,n,o){return!this.testIgnore(e.ignoreFrom,n,o)&&this.testAllow(e.allowFrom,n,o)}testAllow(e,n,o){return e?qe.element(o)?qe.string(e)?iV(o,e,n):qe.element(e)?pd(e,o):!1:!1:!0}testIgnore(e,n,o){return!e||!qe.element(o)?!1:qe.string(e)?iV(o,e,n):qe.element(e)?pd(e,o):!1}fire(e){return this.events.fire(e),this}_onOff(e,n,o,r,i){qe.object(n)&&!qe.array(n)&&(r=o,o=null);const s=hd(n,o,i);for(let a in s){a==="wheel"&&(a=Ur.wheelEvent);for(const l of s[a])A0(a,this._actions)?this.events[e===Bu.On?"on":"off"](a,l):qe.string(this.target)?this._scopeEvents[e===Bu.On?"addDelegate":"removeDelegate"](this.target,this._context,a,l,r):this._scopeEvents[e===Bu.On?"add":"remove"](this.target,a,l,r)}return this}on(e,n,o){return this._onOff(Bu.On,e,n,o)}off(e,n,o){return this._onOff(Bu.Off,e,n,o)}set(e){const n=this._defaults;qe.object(e)||(e={}),this.options=k0(n.base);for(const o in this._actions.methodDict){const r=o,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,os(os({},n.perAction),n.actions[r])),this[i](e[r])}for(const o in e){if(o==="getRect"){this.rectChecker(e.getRect);continue}qe.func(this[o])&&this[o](e[o])}return this}unset(){if(qe.string(this.target))for(const e in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[e];for(let o=n.length-1;o>=0;o--){const{selector:r,context:i,listeners:s}=n[o];r===this.target&&i===this._context&&n.splice(o,1);for(let a=s.length-1;a>=0;a--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[a][0],s[a][1])}}else this._scopeEvents.remove(this.target,"all")}}class pbe{constructor(e){this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":n=>{let{interactable:o}=n;const{target:r}=o,i=qe.string(r)?this.selectorMap[r]:r[this.scope.id],s=Gg(i,a=>a===o);i.splice(s,1)}})}new(e,n){n=os(n||{},{actions:this.scope.actions});const o=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(o._doc),this.list.push(o),qe.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(o)):(o.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(o)),this.scope.fire("interactable:new",{target:e,options:n,interactable:o,win:this.scope._win}),o}getExisting(e,n){const o=n&&n.context||this.scope.document,r=qe.string(e),i=r?this.selectorMap[e]:e[this.scope.id];if(i)return C0(i,s=>s._context===o&&(r||s.inContext(e)))}forEachMatch(e,n){for(const o of this.list){let r;if((qe.string(o.target)?qe.element(e)&&Vu(e,o.target):e===o.target)&&o.inContext(e)&&(r=n(o)),r!==void 0)return r}}}function mbe(t){const e=(n,o)=>{let r=t.interactables.getExisting(n,o);return r||(r=t.interactables.new(n,o),r.events.global=e.globalEvents),r};return e.getPointerAverage=fV,e.getTouchBBox=Gve,e.getTouchDistance=Kve,e.getTouchAngle=Yve,e.getElementRect=hj,e.getElementClientRect=dj,e.matchesSelector=Vu,e.closest=oV,e.globalEvents={},e.version="1.10.27",e.scope=t,e.use=function(n,o){return this.scope.usePlugin(n,o),this},e.isSet=function(n,o){return!!this.scope.interactables.get(n,o&&o.context)},e.on=Xg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.on(s,r,i);return this}if(qe.object(o)){for(const s in o)this.on(s,o[s],r);return this}return A0(o,this.scope.actions)?this.globalEvents[o]?this.globalEvents[o].push(r):this.globalEvents[o]=[r]:this.scope.events.add(this.scope.document,o,r,{options:i}),this},"The interact.on() method is being deprecated"),e.off=Xg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.off(s,r,i);return this}if(qe.object(o)){for(const s in o)this.off(s,o[s],r);return this}if(A0(o,this.scope.actions)){let s;o in this.globalEvents&&(s=this.globalEvents[o].indexOf(r))!==-1&&this.globalEvents[o].splice(s,1)}else this.scope.events.remove(this.scope.document,o,r,i);return this},"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return Ur.supportsTouch},e.supportsPointerEvent=function(){return Ur.supportsPointerEvent},e.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},e.pointerMoveTolerance=function(n){return qe.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(n,o){this.scope.addDocument(n,o)},e.removeDocument=function(n){this.scope.removeDocument(n)},e}class gbe{constructor(){this.id=`__interact_scope_${Math.floor(Math.random()*100)}`,this.isInitialized=!1,this.listenerMaps=[],this.browser=Ur,this.defaults=k0(gV),this.Eventable=nV,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=mbe(this),this.InteractEvent=bj,this.Interactable=void 0,this.interactables=new pbe(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=n=>this.removeDocument(n.target);const e=this;this.Interactable=class extends hbe{get _defaults(){return e.defaults}set(n){return super.set(n),e.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=e.interactables.list.indexOf(this);n<0||(e.interactables.list.splice(n,1),e.fire("interactable:unset",{interactable:this}))}}}addListeners(e,n){this.listenerMaps.push({id:n,map:e})}fire(e,n){for(const{map:{[e]:o}}of this.listenerMaps)if(o&&o(n,this,e)===!1)return!1}init(e){return this.isInitialized?this:vbe(this,e)}pluginIsInstalled(e){const{id:n}=e;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}usePlugin(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){let o=0;const r=this.listenerMaps.length,i=e.before.reduce((s,a)=>(s[a]=!0,s[wV(a)]=!0,s),{});for(;o<r;o++){const s=this.listenerMaps[o].id;if(s&&(i[s]||i[wV(s)]))break}this.listenerMaps.splice(o,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}addDocument(e,n){if(this.getDocIndex(e)!==-1)return!1;const o=wc(e);n=n?os({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(o,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:o,scope:this,options:n})}removeDocument(e){const n=this.getDocIndex(e),o=wc(e),r=this.documents[n].options;this.events.remove(o,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:o,scope:this,options:r})}getDocIndex(e){for(let n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}getDocOptions(e){const n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}now(){return(this.window.Date||Date).now()}}function vbe(t,e){return t.isInitialized=!0,qe.window(e)&&J5(e),$o.init(e),Ur.init(e),dp.init(e),t.window=e,t.document=e.document,t.usePlugin(dbe),t.usePlugin(Zve),t}function wV(t){return t&&t.replace(/\/.*$/,"")}const CV=new gbe,Lu=CV.interactStatic,bbe=typeof globalThis<"u"?globalThis:window;CV.init(bbe);function ybe(t){const{Interactable:e}=t;e.prototype.getAction=function(o,r,i,s){const a=xbe(this,r,i,s,t);return this.options.actionChecker?this.options.actionChecker(o,r,a,this,s,i):a},e.prototype.ignoreFrom=Xg(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Xg(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Cbe,e.prototype.styleCursor=wbe}function xbe(t,e,n,o,r){const i=t.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],a={action:null,interactable:t,interaction:n,element:o,rect:i,buttons:s};return r.fire("auto-start:check",a),a.action}function wbe(t){return qe.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Cbe(t){return qe.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var kbe={id:"auto-start/interactableMethods",install:ybe};function Sbe(t){const{interactStatic:e,defaults:n}=t;t.usePlugin(kbe),n.base.actionChecker=null,n.base.styleCursor=!0,os(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=o=>EV(o,t),t.autoStart={maxInteractions:1/0,withinInteractionLimit:O0,cursorElement:null}}function jbe(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.interacting())return;const s=SV(n,o,r,i,e);jV(n,s,e)}function Ebe(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.pointerType!=="mouse"||n.pointerIsDown||n.interacting())return;const s=SV(n,o,r,i,e);jV(n,s,e)}function Abe(t,e){const{interaction:n}=t;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;e.fire("autoStart:before-start",t);const{interactable:o}=n,r=n.prepared.name;r&&o&&(o.options[r].manualStart||!O0(o,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,o,n.element),AV(n,e)))}function Obe(t,e){let{interaction:n}=t;const{interactable:o}=n;o&&o.options.styleCursor&&wj(n.element,"",e)}function kV(t,e,n,o,r){return e.testIgnoreAllow(e.options[t.name],n,o)&&e.options[t.name].enabled&&O0(e,n,t,r)?t:null}function Tbe(t,e,n,o,r,i,s){for(let a=0,l=o.length;a<l;a++){const c=o[a],u=r[a],h=c.getAction(e,n,t,u);if(!h)continue;const p=kV(h,c,u,i,s);if(p)return{action:p,interactable:c,element:u}}return{action:null,interactable:null,element:null}}function SV(t,e,n,o,r){let i=[],s=[],a=o;function l(c){i.push(c),s.push(a)}for(;qe.element(a);){i=[],s=[],r.interactables.forEachMatch(a,l);const c=Tbe(t,e,n,i,s,o,r);if(c.action&&!c.interactable.options[c.action.name].manualStart)return c;a=md(a)}return{action:null,interactable:null,element:null}}function jV(t,e,n){let{action:o,interactable:r,element:i}=e;o=o||{name:null},t.interactable=r,t.element=i,hV(t.prepared,o),t.rect=r&&o.name?r.getRect(i):null,AV(t,n),n.fire("autoStart:prepared",{interaction:t})}function O0(t,e,n,o){const r=t.options,i=r[n.name].max,s=r[n.name].maxPerElement,a=o.autoStart.maxInteractions;let l=0,c=0,u=0;if(!(i&&s&&a))return!1;for(const h of o.interactions.list){const p=h.prepared.name;if(h.interacting()){if(l++,l>=a)return!1;if(h.interactable===t&&(c+=p===n.name?1:0,c>=i||h.element===e&&(u++,p===n.name&&u>=s)))return!1}}return a>0}function EV(t,e){return qe.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function wj(t,e,n){const{cursorElement:o}=n.autoStart;o&&o!==t&&(o.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function AV(t,e){const{interactable:n,element:o,prepared:r}=t;if(!(t.pointerType==="mouse"&&n&&n.options.styleCursor)){e.autoStart.cursorElement&&wj(e.autoStart.cursorElement,"",e);return}let i="";if(r.name){const s=n.options[r.name].cursorChecker;qe.func(s)?i=s(r,n,o,t._interacting):i=e.actions.map[r.name].getCursor(r)}wj(t.element,i||"",e)}const Cj={id:"auto-start/base",before:["actions"],install:Sbe,listeners:{"interactions:down":jbe,"interactions:move":(t,e)=>{Ebe(t,e),Abe(t,e)},"interactions:stop":Obe},maxInteractions:EV,withinInteractionLimit:O0,validateAction:kV};function Mbe(t,e){let{interaction:n,eventTarget:o,dx:r,dy:i}=t;if(n.prepared.name!=="drag")return;const s=Math.abs(r),a=Math.abs(i),l=n.interactable.options.drag,c=l.startAxis,u=s>a?"x":s<a?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?u[0]:l.lockAxis,u!=="xy"&&c!=="xy"&&c!==u){n.prepared.name=null;let h=o;const p=function(m){if(m===n.interactable)return;const g=n.interactable.options.drag;if(!g.manualStart&&m.testIgnoreAllow(g,h,o)){const v=m.getAction(n.downPointer,n.downEvent,n,h);if(v&&v.name==="drag"&&Nbe(u,m)&&Cj.validateAction(v,m,h,o,e))return m}};for(;qe.element(h);){const m=e.interactables.forEachMatch(h,p);if(m){n.prepared.name="drag",n.interactable=m,n.element=h;break}h=md(h)}}}function Nbe(t,e){if(!e)return!1;const n=e.options.drag.startAxis;return t==="xy"||n==="xy"||n===t}var Pbe={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":Mbe}};function Dbe(t){const{defaults:e}=t;t.usePlugin(Cj),e.perAction.hold=0,e.perAction.delay=0}function kj(t){const e=t.prepared&&t.prepared.name;if(!e)return null;const n=t.interactable.options;return n[e].hold||n[e].delay}const Rbe={id:"auto-start/hold",install:Dbe,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoStartHoldTimer=null},"autoStart:prepared":t=>{let{interaction:e}=t;const n=kj(e);n>0&&(e.autoStartHoldTimer=setTimeout(()=>{e.start(e.prepared,e.interactable,e.element)},n))},"interactions:move":t=>{let{interaction:e,duplicate:n}=t;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":t=>{let{interaction:e}=t;kj(e)>0&&(e.prepared.name=null)}},getHoldDuration:kj};var Ibe={id:"auto-start",install(t){t.usePlugin(Cj),t.usePlugin(Rbe),t.usePlugin(Pbe)}};Lu.use(Ibe);function Vbe(t){const{defaults:e,actions:n}=t;t.autoScroll=yn,yn.now=()=>t.now(),n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=yn.defaults}const yn={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start(t){yn.isScrolling=!0,dp.cancel(yn.i),t.autoScroll=yn,yn.interaction=t,yn.prevTime=yn.now(),yn.i=dp.request(yn.scroll)},stop(){yn.isScrolling=!1,yn.interaction&&(yn.interaction.autoScroll=null),dp.cancel(yn.i)},scroll(){const{interaction:t}=yn,{interactable:e,element:n}=t,o=t.prepared.name,r=e.options[o].autoScroll,i=OV(r.container,e,n),s=yn.now(),a=(s-yn.prevTime)/1e3,l=r.speed*a;if(l>=1){const c={x:yn.x*l,y:yn.y*l};if(c.x||c.y){const u=TV(i);qe.window(i)?i.scrollBy(c.x,c.y):i&&(i.scrollLeft+=c.x,i.scrollTop+=c.y);const h=TV(i),p={x:h.x-u.x,y:h.y-u.y};(p.x||p.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:p,interaction:t,container:i})}yn.prevTime=s}yn.isScrolling&&(dp.cancel(yn.i),yn.i=dp.request(yn.scroll))},check(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove(t){let{interaction:e,pointer:n}=t;if(!(e.interacting()&&yn.check(e.interactable,e.prepared.name)))return;if(e.simulation){yn.x=yn.y=0;return}let o,r,i,s;const{interactable:a,element:l}=e,c=e.prepared.name,u=a.options[c].autoScroll,h=OV(u.container,a,l);if(qe.window(h))s=n.clientX<yn.margin,o=n.clientY<yn.margin,r=n.clientX>h.innerWidth-yn.margin,i=n.clientY>h.innerHeight-yn.margin;else{const p=dj(h);s=n.clientX<p.left+yn.margin,o=n.clientY<p.top+yn.margin,r=n.clientX>p.right-yn.margin,i=n.clientY>p.bottom-yn.margin}yn.x=r?1:s?-1:0,yn.y=i?1:o?-1:0,yn.isScrolling||(yn.margin=u.margin,yn.speed=u.speed,yn.start(e))}};function OV(t,e,n){return(qe.string(t)?pV(t,e,n):t)||wc(n)}function TV(t){return qe.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}const Bbe={id:"auto-scroll",install:Vbe,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoScroll=null},"interactions:destroy":t=>{let{interaction:e}=t;e.autoScroll=null,yn.stop(),yn.interaction&&(yn.interaction=null)},"interactions:stop":yn.stop,"interactions:action-move":t=>yn.onInteractionMove(t)}};Lu.use(Bbe);function Lbe(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.draggable=Jg.draggable,e.map.drag=Jg,e.methodDict.drag="draggable",o.actions.drag=Jg.defaults}function Sj(t){let{interaction:e}=t;if(e.prepared.name!=="drag")return;const n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}function MV(t){let{iEvent:e,interaction:n}=t;if(n.prepared.name!=="drag")return;const o=n.prepared.axis;if(o==="x"||o==="y"){const r=o==="x"?"y":"x";e.page[r]=n.coords.start.page[r],e.client[r]=n.coords.start.client[r],e.delta[r]=0}}const Jg={id:"actions/drag",install:Lbe,listeners:{"interactions:before-action-move":Sj,"interactions:action-resume":Sj,"interactions:action-move":MV,"auto-start:check":t=>{const{interaction:e,interactable:n,buttons:o}=t,r=n.options.drag;if(!(!(r&&r.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&(o&n.options.drag.mouseButtons)===0))return t.action={name:"drag",axis:r.lockAxis==="start"?r.startAxis:r.lockAxis},!1}},draggable:function(e){return qe.object(e)?(this.options.drag.enabled=e.enabled!==!1,this.setPerAction("drag",e),this.setOnEvents("drag",e),/^(xy|x|y|start)$/.test(e.lockAxis)&&(this.options.drag.lockAxis=e.lockAxis),/^(xy|x|y)$/.test(e.startAxis)&&(this.options.drag.startAxis=e.startAxis),this):qe.bool(e)?(this.options.drag.enabled=e,this):this.options.drag},beforeMove:Sj,move:MV,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"},filterEventType:t=>t.search("drag")===0};Lu.use(Jg);class kc extends vj{constructor(e,n,o){super(n._interaction),this.dropzone=void 0,this.dragEvent=void 0,this.relatedTarget=void 0,this.draggable=void 0,this.propagationStopped=!1,this.immediatePropagationStopped=!1;const{element:r,dropzone:i}=o==="dragleave"?e.prev:e.cur;this.type=o,this.target=r,this.currentTarget=r,this.dropzone=i,this.dragEvent=n,this.relatedTarget=n.target,this.draggable=n.interactable,this.timeStamp=n.timeStamp}reject(){const{dropState:e}=this._interaction;if(!(this.type!=="dropactivate"&&(!this.dropzone||e.cur.dropzone!==this.dropzone||e.cur.element!==this.target)))if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){const n=e.activeDrops,o=Gg(n,i=>{let{dropzone:s,element:a}=i;return s===this.dropzone&&a===this.target});e.activeDrops.splice(o,1);const r=new kc(e,this.dragEvent,"dropdeactivate");r.dropzone=this.dropzone,r.target=this.target,this.dropzone.fire(r)}else this.dropzone.fire(new kc(e,this.dragEvent,"dragleave"))}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}function Fbe(t){const{actions:e,interactStatic:n,Interactable:o,defaults:r}=t;t.usePlugin(Jg),o.prototype.dropzone=function(i){return _be(this,i)},o.prototype.dropCheck=function(i,s,a,l,c,u){return Ube(this,i,s,a,l,c,u)},n.dynamicDrop=function(i){return qe.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},os(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=RV.defaults}function zbe(t,e){let{interactables:n}=t;const o=[];for(const r of n.list){if(!r.options.drop.enabled)continue;const i=r.options.drop.accept;if(!(qe.element(i)&&i!==e||qe.string(i)&&!Vu(e,i)||qe.func(i)&&!i({dropzone:r,draggableElement:e})))for(const s of r.getAllElements())s!==e&&o.push({dropzone:r,element:s,rect:r.getRect(s)})}return o}function NV(t,e){for(const{dropzone:n,element:o}of t.slice())e.dropzone=n,e.target=o,n.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}function jj(t,e){const n=zbe(t,e);for(const o of n)o.rect=o.dropzone.getRect(o.element);return n}function PV(t,e,n){let{dropState:o,interactable:r,element:i}=t;const s=[];for(const{dropzone:l,element:c,rect:u}of o.activeDrops){const h=l.dropCheck(e,n,r,i,c,u);s.push(h?c:null)}const a=Vve(s);return o.activeDrops[a]||null}function Ej(t,e,n){const o=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(r.activate=new kc(o,n,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),n.type==="dragend"&&(r.deactivate=new kc(o,n,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),o.rejected||(o.cur.element!==o.prev.element&&(o.prev.dropzone&&(r.leave=new kc(o,n,"dragleave"),n.dragLeave=r.leave.target=o.prev.element,n.prevDropzone=r.leave.dropzone=o.prev.dropzone),o.cur.dropzone&&(r.enter=new kc(o,n,"dragenter"),n.dragEnter=o.cur.element,n.dropzone=o.cur.dropzone)),n.type==="dragend"&&o.cur.dropzone&&(r.drop=new kc(o,n,"drop"),n.dropzone=o.cur.dropzone,n.relatedTarget=o.cur.element),n.type==="dragmove"&&o.cur.dropzone&&(r.move=new kc(o,n,"dropmove"),n.dropzone=o.cur.dropzone)),r}function Aj(t,e){const n=t.dropState,{activeDrops:o,cur:r,prev:i}=n;e.leave&&i.dropzone.fire(e.leave),e.enter&&r.dropzone.fire(e.enter),e.move&&r.dropzone.fire(e.move),e.drop&&r.dropzone.fire(e.drop),e.deactivate&&NV(o,e.deactivate),n.prev.dropzone=r.dropzone,n.prev.element=r.element}function DV(t,e){let{interaction:n,iEvent:o,event:r}=t;if(o.type!=="dragmove"&&o.type!=="dragend")return;const i=n.dropState;e.dynamicDrop&&(i.activeDrops=jj(e,n.element));const s=o,a=PV(n,s,r);i.rejected=i.rejected&&!!a&&a.dropzone===i.cur.dropzone&&a.element===i.cur.element,i.cur.dropzone=a&&a.dropzone,i.cur.element=a&&a.element,i.events=Ej(n,r,s)}function _be(t,e){if(qe.object(e)){if(t.options.drop.enabled=e.enabled!==!1,e.listeners){const n=hd(e.listeners),o=Object.keys(n).reduce((i,s)=>{const a=/^(enter|leave)/.test(s)?`drag${s}`:/^(activate|deactivate|move)/.test(s)?`drop${s}`:s;return i[a]=n[s],i},{}),r=t.options.drop.listeners;r&&t.off(r),t.on(o),t.options.drop.listeners=o}return qe.func(e.ondrop)&&t.on("drop",e.ondrop),qe.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),qe.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),qe.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),qe.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),qe.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:qe.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return qe.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}function Ube(t,e,n,o,r,i,s){let a=!1;if(!(s=s||t.getRect(i)))return t.options.drop.checker?t.options.drop.checker(e,n,a,t,i,o,r):!1;const l=t.options.drop.overlap;if(l==="pointer"){const u=mV(o,r,"drag"),h=uV(e);h.x+=u.x,h.y+=u.y;const p=h.x>s.left&&h.x<s.right,m=h.y>s.top&&h.y<s.bottom;a=p&&m}const c=o.getRect(r);if(c&&l==="center"){const u=c.left+c.width/2,h=c.top+c.height/2;a=u>=s.left&&u<=s.right&&h>=s.top&&h<=s.bottom}return c&&qe.number(l)&&(a=Math.max(0,Math.min(s.right,c.right)-Math.max(s.left,c.left))*Math.max(0,Math.min(s.bottom,c.bottom)-Math.max(s.top,c.top))/(c.width*c.height)>=l),t.options.drop.checker&&(a=t.options.drop.checker(e,n,a,t,i,o,r)),a}const RV={id:"actions/drop",install:Fbe,listeners:{"interactions:before-action-start":t=>{let{interaction:e}=t;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":(t,e)=>{let{interaction:n,event:o,iEvent:r}=t;if(n.prepared.name!=="drag")return;const i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=jj(e,n.element),i.events=Ej(n,o,r),i.events.activate&&(NV(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))},"interactions:action-move":DV,"interactions:after-action-move":(t,e)=>{let{interaction:n,iEvent:o}=t;if(n.prepared.name!=="drag")return;const r=n.dropState;Aj(n,r.events),e.fire("actions/drop:move",{interaction:n,dragEvent:o}),r.events={}},"interactions:action-end":(t,e)=>{if(t.interaction.prepared.name!=="drag")return;const{interaction:n,iEvent:o}=t;DV(t,e),Aj(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:o})},"interactions:stop":t=>{let{interaction:e}=t;if(e.prepared.name!=="drag")return;const{dropState:n}=e;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}},getActiveDrops:jj,getDrop:PV,getDropEvents:Ej,fireDropEvents:Aj,filterEventType:t=>t.search("drag")===0||t.search("drop")===0,defaults:{enabled:!1,accept:null,overlap:"pointer"}};Lu.use(RV);const T0=".widget-panel .flame-fw-palette-drag-source",Oj="[data-palette-drop-form]",IV="[data-palette-drop-group]",Wbe="flame-fw-palette-interact-dragging";function Tj(t){typeof document>"u"||document.documentElement.classList.toggle(Wbe,t)}function Qg(t){const e=t;return e!=null&&e.closest?e.closest(T0):null}function Hbe(t){const e=t.dragEvent;if(e&&typeof e.clientX=="number"&&typeof e.clientY=="number"&&Number.isFinite(e.clientX)&&Number.isFinite(e.clientY))return{x:e.clientX,y:e.clientY};const n=t.client;return n&&typeof n.x=="number"&&typeof n.y=="number"&&Number.isFinite(n.x)&&Number.isFinite(n.y)?{x:n.x,y:n.y}:{x:NaN,y:NaN}}function VV(t,e,n){const o=Hbe(t);return e.valid&&Number.isFinite(e.x)&&Number.isFinite(e.y)?{x:e.x,y:e.y}:Number.isFinite(o.x)&&Number.isFinite(o.y)?{x:o.x,y:o.y}:n.ok?{x:n.x,y:n.y}:o}function Gbe(t,e,n){const o=document.elementsFromPoint(t,e);return n?o.filter(r=>r instanceof Element?!(r===n||n.contains(r)):!1):o}function Kbe(t){if(!t)return{};if("kind"in t&&t.kind==="custom"){const n=t;return{kind:"custom",gridW:n.gridW,gridH:n.gridH}}const e=t;return{type:e.type,kind:e.kind,gridW:e.gridW,gridH:e.gridH}}function Ybe(t){Lu.dynamicDrop(!0);let e=null;const n=new WeakMap,o={x:0,y:0,valid:!1},r={x:0,y:0,ok:!1};let i=null;const s={capture:!0,passive:!1};function a(k,C){e&&(!Number.isFinite(k)||!Number.isFinite(C)||(o.x=k,o.y=C,o.valid=!0,r.x=k,r.y=C,r.ok=!0,m(k,C,e.el)))}function l(k){a(k.clientX,k.clientY)}function c(k){const C=k.touches[0]??k.changedTouches[0];C&&a(C.clientX,C.clientY)}function u(k){k.preventDefault()}function h(){document.addEventListener("pointermove",l,!0),document.addEventListener("touchmove",c,s),document.addEventListener("selectstart",u,!0)}function p(){document.removeEventListener("pointermove",l,!0),document.removeEventListener("touchmove",c,s),document.removeEventListener("selectstart",u,!0)}const m=(k,C,x)=>{var O,M;if(!t.updatePreview)return;if(!Number.isFinite(k)||!Number.isFinite(C)){(O=t.clearPreview)==null||O.call(t);return}const S=x===(e==null?void 0:e.el)?e.origin:void 0,A=Kbe(S),P=Gbe(k,C,x);for(const D of P){if(!(D instanceof Element))continue;const I=D.closest(Oj);if(I instanceof HTMLElement&&I.dataset.paletteDropForm){t.updatePreview({formChildId:I.dataset.paletteDropForm,dragged:A,originalEvent:{clientX:k,clientY:C},sortableToEl:I,clientX:k,clientY:C});return}}(M=t.clearPreview)==null||M.call(t)},g=Lu(T0).draggable({inertia:!1,listeners:{start(k){e=null,o.valid=!1,r.ok=!1;const C=Qg(k.target);if(!C)return;const x=C.getAttribute("data-fw-palette-source"),S=x?t.resolvePaletteBySource(x):null;S&&(e={el:C,origin:S}),n.set(C,{x:0,y:0}),Tj(!0),h()},move(k){var S,A;const C=Qg(k.target);if(!C)return;const x=n.get(C);x&&(x.x+=k.dx,x.y+=k.dy,C.style.transform=`translate(${x.x}px, ${x.y}px)`,C.style.zIndex="10010"),!o.valid&&Number.isFinite((S=k.client)==null?void 0:S.x)&&Number.isFinite((A=k.client)==null?void 0:A.y)&&(o.x=k.client.x,o.y=k.client.y,o.valid=!0,m(k.client.x,k.client.y,C))},end(k){p();const C=Qg(k.target),x=e;C&&(C.style.transform="",C.style.zIndex="",n.delete(C)),i!=null&&clearTimeout(i),i=setTimeout(()=>{var S;i=null,Tj(!1),e===x&&(e=null,o.valid=!1,r.ok=!1),(S=t.clearPreview)==null||S.call(t)},0)}}}),v=k=>{var V,N,T;const C=k.target,x=(V=C.closest)==null?void 0:V.call(C,Oj);if(!Qg(k.relatedTarget)||!((N=x==null?void 0:x.dataset)!=null&&N.paletteDropForm))return;const A=e==null?void 0:e.origin;if(!A)return;const P=t.clonePaletteItem(A),{x:O,y:M}=VV(k,o,r),D=x.dataset.paletteDropForm,I=t.findFormShellById(D);I&&t.onInteractDrop(I.formItem,P,x,O,M),(T=t.clearPreview)==null||T.call(t)},b=k=>{var V,N,T;const C=k.target,x=(V=C.closest)==null?void 0:V.call(C,IV);if(!Qg(k.relatedTarget)||!((N=x==null?void 0:x.dataset)!=null&&N.paletteDropGroup))return;const A=e==null?void 0:e.origin;if(!A)return;const P=t.clonePaletteItem(A),{x:O,y:M}=VV(k,o,r),D=x.dataset.paletteDropGroup,I=t.findGroupById(D);I&&t.onInteractDrop(I,P,x,O,M),(T=t.clearPreview)==null||T.call(t)},y=Lu(Oj).dropzone({accept:T0,overlap:.15,listeners:{drop:v}}),w=Lu(IV).dropzone({accept:T0,overlap:.15,listeners:{drop:b}});return()=>{var k;i!=null&&(clearTimeout(i),i=null),Tj(!1),p(),g.unset(),y.unset(),w.unset(),(k=t.clearPreview)==null||k.call(t)}}const Xbe={class:"framework-lr"},Jbe=f.defineComponent({name:"FlameFramework"}),Qbe=f.defineComponent({...Jbe,props:{componentGroups:{default:()=>[]},componentList:{default:()=>[]},hideBasicWidgets:{type:Boolean,default:!1},publishedDetailFieldLocks:{default:void 0}},emits:["save","reset"],setup(t,{expose:e,emit:n}){const o=t,r=f.computed(()=>{const wt=o.componentGroups;if(wt&&wt.length)return wt;const Ze=o.componentList||[];return Ze.length?[{title:"组件库",items:Ze.map(gt=>({kind:"basic",key:gt.key,label:gt.label,icon:gt.icon,type:gt.type,defaultConfig:gt.defaultConfig,defaultFormItem:gt.defaultFormItem,disabledConfig:gt.disabledConfig}))}]:[]}),i=n,s={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}},a=f.ref([{...s.submit},{...s.cancel},{...s.reset}]),l=f.computed(()=>K5(r.value).otherGroups),c=f.computed(()=>o.hideBasicWidgets?[]:[...K5(r.value).presetItems.map(gt=>Tve(gt)),...vfe]),u=f.ref(gfe),h=f.ref([]),p=f.ref([]),m=f.ref([]),g=f.ref([]),v=f.ref([]),b=f.ref(0),y=f.ref(null),w=f.ref(null),k=f.ref(null),C=f.ref(!1),x=f.ref(null),{selectedItem:S,selectFormChild:A,onGridWidgetCapture:P}=Ove(v,a,w,k,x),{getGroupChildType:O,setGroupChildType:M,createGroupChildByType:D,addGroupByContainerType:I,selectedGroupFormConfig:V}=jve(v,w,x),{buildFrameworkConfig:N,validateLayoutBeforeSave:T,parseConfigToLayout:B,snapshotControlConfig:_}=Sve(v,a),R=f.ref({groups:[],buttons:[]}),{onOpenPreview:E,onSaveConfig:U,onResetConfig:Q,onCopyWidget:K,onDeleteWidget:W,onCopyFormChild:Y,onCopyFormChildToGroup:$,onDeleteFormChild:ve,onAutoCompactInner:xe,onSelectGlobalButton:ge,onSelectGlobalButtonsBar:q,addGlobalButton:me,removeGlobalButton:re}=Eve(v,w,x,k,a,R,C,{buildFrameworkConfig:N,validateLayoutBeforeSave:T,compactInnerFormLayout:F1,parseConfigToLayout:B,snapshotControlConfig:_,getNextGridPosition:L1,getNextInnerGridPosition:mg,selectFormChild:A,onSave:wt=>i("save",wt),onReset:()=>i("reset"),getDefaultLayout:bfe,DEFAULT_BUTTONS:s}),{onDropFromPalette:j,onInteractDropToFormInner:oe,onContainerDrop:Ee,onDropContainerInRoot:ie,onInnerLayoutUpdated:ae,findFormContainerForInnerControl:Ye,hydrateLayoutCustomFields:ut,hydrateLayoutPresetFields:Re}=Mve(v,w,x,k,p,g,m,r,A,D,I),lt=f.ref(null);let ze=null;function tt(wt){var Ze;if(wt.startsWith("b:")){const gt=parseInt(wt.slice(2),10),Dt=c.value;return Number.isFinite(gt)&&gt>=0&&gt<Dt.length?Dt[gt]:null}if(wt.startsWith("c:")){const gt=parseInt(wt.slice(2),10),Dt=h.value;return Number.isFinite(gt)&&gt>=0&&gt<Dt.length?Dt[gt]:null}if(wt.startsWith("g:")){const gt=wt.slice(2).split(":"),Dt=parseInt(gt[0],10),jn=parseInt(gt[1],10),mo=l.value[Dt];return((Ze=mo==null?void 0:mo.items)==null?void 0:Ze[jn])??null}return null}function Pt(wt){const Ze=v.value.find(gt=>gt.i===wt);return(Ze==null?void 0:Ze.nodeKind)==="group"?Ze:void 0}function Qe(wt){for(const Ze of v.value)if(!(Ze.nodeKind!=="group"||!Ze.children)){for(const gt of Ze.children)if(gt.i===wt&&(gt.nodeKind==="form"||gt.nodeKind==="subForm"))return{group:Ze,formItem:gt}}return null}function Vt(){ze==null||ze(),ze=null,lt.value&&(ze=Ybe({clonePaletteItem:W5,resolvePaletteBySource:tt,findGroupById:Pt,findFormShellById:Qe,onInteractDrop:oe,updatePreview:wt=>{var Ze,gt;return(gt=(Ze=y.value)==null?void 0:Ze.updatePaletteDropPreview)==null?void 0:gt.call(Ze,wt)},clearPreview:()=>{var wt,Ze;return(Ze=(wt=y.value)==null?void 0:wt.clearPaletteDropPreview)==null?void 0:Ze.call(wt)}}))}f.onMounted(()=>{f.nextTick(()=>Vt())}),f.watch(b,()=>{f.nextTick(()=>Vt())}),f.watch(()=>v.value.length,()=>{f.nextTick(()=>Vt())}),f.onBeforeUnmount(()=>{ze==null||ze(),ze=null});const G=f.computed(()=>cve(S.value)),{inputConfig:J,selectConfig:ee,inputNumberConfig:H,datePickerConfig:Z,timePickerConfig:se,timeSelectConfig:ye,cascaderConfig:le,checkboxConfig:pe,checkboxGroupConfig:_e,colorPickerConfig:He,radioConfig:Ge,rateConfig:Ne,sliderConfig:Ue,switchConfig:ct,transferConfig:At,buttonConfig:ht,dialogConfig:en,drawerConfig:gn,paginationConfig:kn,readConfig:Sn,alertConfig:zt,uploadConfig:Jn,uploadAcceptTypeOptions:Zt,timeConfig:bt,onFlmTimePresetChange:Nn,controlConfig:Xt,controlHasPlaceholder:wo,controlHasDisabled:Ro,controlHasClearable:jo}=Ave(S);function co(wt,Ze){return B5(Ze,wt==null?void 0:wt.disabledConfig)}function zo(wt){v.value=wt}return e({getConfig:()=>N(),setConfig:wt=>{if(!wt||typeof wt!="object")return;Array.isArray(wt.buttons)&&(a.value=wt.buttons.map(gt=>({...gt})));const Ze=B(wt);ut(Ze),Re(Ze),v.value=Ze,b.value++,w.value=null,k.value=null,x.value=null},getLayout:()=>v.value,setLayout:wt=>{Array.isArray(wt)&&wt.length&&(v.value=wt)}}),f.watch(()=>{const wt=x.value,Ze=S.value;return!wt||!Ze?"":`${wt.formId}\0${wt.childId}\0${Ze.w}\0${Ze.h}\0${Ze.x}\0${Ze.y}`},()=>{f.nextTick(()=>{const wt=x.value,Ze=S.value;if(!wt||!Ze)return;const gt=Ye(wt.formId,wt.childId);gt!=null&&gt.children&&UR(gt.children)&&F1(gt)})}),(wt,Ze)=>{const gt=f.resolveComponent("el-input"),Dt=f.resolveComponent("el-form-item"),jn=f.resolveComponent("el-option"),mo=f.resolveComponent("el-select"),Eo=f.resolveComponent("el-input-number"),Pe=f.resolveComponent("el-switch"),dn=f.resolveComponent("el-slider"),zn=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",{ref_key:"frameworkRootEl",ref:lt,class:"form-builder-framework"},[f.createElementVNode("div",Xbe,[f.createVNode(f.unref(Ide),{"container-widget-list":u.value,"basic-widget-list":c.value,"complex-widget-list":h.value,"component-groups":l.value,"clone-palette-item":f.unref(W5)},null,8,["container-widget-list","basic-widget-list","complex-widget-list","component-groups","clone-palette-item"]),(f.openBlock(),f.createBlock(f.unref(age),{ref_key:"formDesignAreaRef",ref:y,key:b.value,layout:v.value,"onUpdate:layout":zo,"drop-zone-list":p.value,"container-drop-list":m.value,"selected-id":w.value,"selected-form-child":x.value,"selected-global-button-index":k.value,"col-num":f.unref(ts),"row-height":f.unref(GR),"get-default-label":f.unref(z1),"get-default-config":f.unref(_1),"get-default-config-for-child":f.unref(p2),buttons:a.value,onDropFromPalette:f.unref(j),onInnerLayoutUpdated:f.unref(ae),onGridWidgetCapture:f.unref(P),onSelectFormChild:f.unref(A),onClearSelection:Ze[0]||(Ze[0]=Ve=>{w.value=null,x.value=null}),onOpenPreview:f.unref(E),onSave:f.unref(U),onReset:f.unref(Q),onCopyWidget:f.unref(K),onDeleteWidget:f.unref(W),onCopyFormChild:f.unref(Y),onCopyFormChildToGroup:f.unref($),onDeleteFormChild:f.unref(ve),onSelectGlobalButton:f.unref(ge),onSelectGlobalButtonsBar:f.unref(q),onDropContainer:f.unref(Ee),onDropContainerInRoot:f.unref(ie),onAutoCompactInner:f.unref(xe)},null,8,["layout","drop-zone-list","container-drop-list","selected-id","selected-form-child","selected-global-button-index","col-num","row-height","get-default-label","get-default-config","get-default-config-for-child","buttons","onDropFromPalette","onInnerLayoutUpdated","onGridWidgetCapture","onSelectFormChild","onOpenPreview","onSave","onReset","onCopyWidget","onDeleteWidget","onCopyFormChild","onCopyFormChildToGroup","onDeleteFormChild","onSelectGlobalButton","onSelectGlobalButtonsBar","onDropContainer","onDropContainerInRoot","onAutoCompactInner"])),f.createVNode(f.unref(xge),{"selected-item":f.unref(S),"groups-config":G.value},{base:f.withCtx(({model:Ve})=>[f.createVNode(zn,{size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(gt,{"model-value":Ve==null?void 0:Ve.i,disabled:""},null,8,["model-value"])]),_:2},1024),(Ve==null?void 0:Ve.nodeKind)==="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"分组名称"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.label,"onUpdate:modelValue":rt=>Ve.label=rt,placeholder:"请输入分组名称",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"分组类型"},{default:f.withCtx(()=>[f.createVNode(mo,{"model-value":f.unref(O)(Ve),placeholder:"选择类型",style:{width:"100%"},"onUpdate:modelValue":rt=>f.unref(M)(Ve,rt)},{default:f.withCtx(()=>[f.createVNode(jn,{label:"分组",value:"form"}),f.createVNode(jn,{label:"子项目",value:"subForm"}),f.createVNode(jn,{label:"自定义分组",value:"slot"})]),_:1},8,["model-value","onUpdate:modelValue"])]),_:2},1024),f.unref(V)&&f.unref(O)(Ve)!=="slot"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"标签位置"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(V)["label-position"],"onUpdate:modelValue":Ze[1]||(Ze[1]=rt=>f.unref(V)["label-position"]=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"左侧",value:"left"}),f.createVNode(jn,{label:"右侧",value:"right"}),f.createVNode(jn,{label:"顶部",value:"top"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:f.unref(V)["label-width"],"onUpdate:modelValue":Ze[2]||(Ze[2]=rt=>f.unref(V)["label-width"]=rt),placeholder:"如 80px、120",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"栅格列数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).gridColumns,"onUpdate:modelValue":Ze[3]||(Ze[3]=rt=>f.unref(V).gridColumns=rt),min:1,max:48,step:1,placeholder:"24","controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(V).size,"onUpdate:modelValue":Ze[4]||(Ze[4]=rt=>f.unref(V).size=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V).disabled,"onUpdate:modelValue":Ze[5]||(Ze[5]=rt=>f.unref(V).disabled=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"隐藏必填星号"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["hide-required-asterisk"],"onUpdate:modelValue":Ze[6]||(Ze[6]=rt=>f.unref(V)["hide-required-asterisk"]=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["show-message"],"onUpdate:modelValue":Ze[7]||(Ze[7]=rt=>f.unref(V)["show-message"]=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"行内校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V)["inline-message"],"onUpdate:modelValue":Ze[8]||(Ze[8]=rt=>f.unref(V)["inline-message"]=rt)},null,8,["modelValue"])]),_:1}),f.unref(O)(Ve)==="subForm"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(Dt,{label:"是否默认生成一项"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(V).defaultGenerateOne,"onUpdate:modelValue":Ze[9]||(Ze[9]=rt=>f.unref(V).defaultGenerateOne=rt)},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"最小子项目数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).minItems,"onUpdate:modelValue":Ze[10]||(Ze[10]=rt=>f.unref(V).minItems=rt),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(Dt,{label:"最大子项目数"},{default:f.withCtx(()=>[f.createVNode(Eo,{modelValue:f.unref(V).maxItems,"onUpdate:modelValue":Ze[11]||(Ze[11]=rt=>f.unref(V).maxItems=rt),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),Ve&&Ve.nodeKind!=="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(Dt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.w,"onUpdate:modelValue":rt=>Ve.w=rt,min:f.unref(zR)(Ve),max:f.unref(ts),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(Dt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.h,"onUpdate:modelValue":rt=>Ve.h=rt,min:f.unref(_R)(Ve),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024)],64)):f.createCommentVNode("",!0)]),_:2},1024)]),slotConfig:f.withCtx(({model:Ve})=>[(Ve==null?void 0:Ve.nodeKind)==="slot"?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"left","label-width":"80px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"插槽名称 slotName",required:""},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.config.slotName,"onUpdate:modelValue":rt=>Ve.config.slotName=rt,placeholder:"如 header / footer / actions",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)):f.createCommentVNode("",!0)]),formItem:f.withCtx(({model:Ve})=>[Ve!=null&&Ve.formItem?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.label,"onUpdate:modelValue":rt=>Ve.formItem.label=rt,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.labelWidth,"onUpdate:modelValue":rt=>Ve.formItem.labelWidth=rt,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.showMessage,"onUpdate:modelValue":rt=>Ve.formItem.showMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.inlineMessage,"onUpdate:modelValue":rt=>Ve.formItem.inlineMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(Dt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:Ve.formItem.size,"onUpdate:modelValue":rt=>Ve.formItem.size=rt,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(F5),{"form-item":Ve.formItem},null,8,["form-item"])]),_:2},1024)):f.createCommentVNode("",!0)]),baseSettings:f.withCtx(({model:Ve})=>[Ve?(f.openBlock(),f.createBlock(zn,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(Dt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(gt,{"model-value":Ve==null?void 0:Ve.i,disabled:""},null,8,["model-value"])]),_:2},1024),f.createVNode(Dt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.w,"onUpdate:modelValue":rt=>Ve.w=rt,min:f.unref(zR)(Ve),max:f.unref(ts),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(Dt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(dn,{modelValue:Ve.h,"onUpdate:modelValue":rt=>Ve.h=rt,min:f.unref(_R)(Ve),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024),Ve!=null&&Ve.formItem?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[co(Ve,"label")?(f.openBlock(),f.createBlock(Dt,{key:0,label:"标签"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.label,"onUpdate:modelValue":rt=>Ve.formItem.label=rt,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"label-width")?(f.openBlock(),f.createBlock(Dt,{key:1,label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:Ve.formItem.labelWidth,"onUpdate:modelValue":rt=>Ve.formItem.labelWidth=rt,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"show-message")?(f.openBlock(),f.createBlock(Dt,{key:2,label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.showMessage,"onUpdate:modelValue":rt=>Ve.formItem.showMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"inline-message")?(f.openBlock(),f.createBlock(Dt,{key:3,label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:Ve.formItem.inlineMessage,"onUpdate:modelValue":rt=>Ve.formItem.inlineMessage=rt},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"form-item-size")?(f.openBlock(),f.createBlock(Dt,{key:4,label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:Ve.formItem.size,"onUpdate:modelValue":rt=>Ve.formItem.size=rt,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):f.createCommentVNode("",!0),co(Ve,"rules")?(f.openBlock(),f.createBlock(f.unref(F5),{key:5,"form-item":Ve.formItem},null,8,["form-item"])):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),f.unref(Xt)&&(Ve==null?void 0:Ve.type)!=="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.unref(wo)&&co(Ve,"placeholder")?(f.openBlock(),f.createBlock(Dt,{key:0,label:"占位符"},{default:f.withCtx(()=>[f.createVNode(gt,{modelValue:f.unref(Xt).placeholder,"onUpdate:modelValue":Ze[12]||(Ze[12]=rt=>f.unref(Xt).placeholder=rt),placeholder:"占位文案",clearable:""},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(Ro)&&co(Ve,"disabled")?(f.openBlock(),f.createBlock(Dt,{key:1,label:"禁用"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(Xt).disabled,"onUpdate:modelValue":Ze[13]||(Ze[13]=rt=>f.unref(Xt).disabled=rt)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(jo)&&co(Ve,"clearable")?(f.openBlock(),f.createBlock(Dt,{key:2,label:"可清空"},{default:f.withCtx(()=>[f.createVNode(Pe,{modelValue:f.unref(Xt).clearable,"onUpdate:modelValue":Ze[14]||(Ze[14]=rt=>f.unref(Xt).clearable=rt)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),(Ve==null?void 0:Ve.type)==="flmInput"&&co(Ve,"size")?(f.openBlock(),f.createBlock(Dt,{key:3,label:"控件尺寸"},{default:f.withCtx(()=>[f.createVNode(mo,{modelValue:f.unref(Xt).size,"onUpdate:modelValue":Ze[15]||(Ze[15]=rt=>f.unref(Xt).size=rt),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(jn,{label:"large",value:"large"}),f.createVNode(jn,{label:"default",value:"default"}),f.createVNode(jn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1})):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]),_:2},1024)):f.createCommentVNode("",!0)]),detailSettings:f.withCtx(({model:Ve})=>[(f.openBlock(),f.createBlock(f.unref(Hge),{key:Ve==null?void 0:Ve.i,model:Ve,"input-config":f.unref(J),"select-config":f.unref(ee),"input-number-config":f.unref(H),"date-picker-config":f.unref(Z),"time-picker-config":f.unref(se),"time-select-config":f.unref(ye),"cascader-config":f.unref(le),"checkbox-config":f.unref(pe),"checkbox-group-config":f.unref(_e),"color-picker-config":f.unref(He),"radio-config":f.unref(Ge),"rate-config":f.unref(Ne),"slider-config":f.unref(Ue),"switch-config":f.unref(ct),"transfer-config":f.unref(At),"button-config":f.unref(ht),"dialog-config":f.unref(en),"drawer-config":f.unref(gn),"pagination-config":f.unref(kn),"read-config":f.unref(Sn),"alert-config":f.unref(zt),"upload-config":f.unref(Jn),"upload-accept-type-options":f.unref(Zt),"time-config":f.unref(bt),"on-flm-time-preset-change":f.unref(Nn),"published-detail-field-locks":t.publishedDetailFieldLocks},null,8,["model","input-config","select-config","input-number-config","date-picker-config","time-picker-config","time-select-config","cascader-config","checkbox-config","checkbox-group-config","color-picker-config","radio-config","rate-config","slider-config","switch-config","transfer-config","button-config","dialog-config","drawer-config","pagination-config","read-config","alert-config","upload-config","upload-accept-type-options","time-config","on-flm-time-preset-change","published-detail-field-locks"]))]),globalButtons:f.withCtx(({model:Ve})=>[f.createVNode(f.unref(Qge),{buttons:a.value,"selected-index":k.value,onSelect:f.unref(ge),onRemove:f.unref(re),onAdd:f.unref(me)},null,8,["buttons","selected-index","onSelect","onRemove","onAdd"])]),_:1},8,["selected-item","groups-config"])]),f.createVNode(f.unref(fge),{modelValue:C.value,"onUpdate:modelValue":Ze[16]||(Ze[16]=Ve=>C.value=Ve),config:R.value},null,8,["modelValue","config"])],512)}}}),BV=wr(Qbe,[["__scopeId","data-v-b6f19798"]]),LV={flmButton:Ff,flmCascader:zf,flmCheckbox:hc,flmCheckboxGroup:$f,flmColorPicker:_f,flmDatePicker:i2,flmInput:xl,flmInputNumber:Uf,flmUpload:pc,flmPagination:hg,flmRadio:Wf,flmRate:Hf,flmRead:Su,flmAlert:mc,flmTime:Gf,flmSelect:Kf,flmSlider:Yf,flmSwitch:Xf,flmTimePicker:Jf,flmTimeSelect:Qf,flmTransfer:Zf,flmDialog:qf,flmCollapse:a2,FlmPrintTable:IR,FlmEditor:Il,FlmJsonEditor:e2,flmForm:Eu,flmTable:B1,flmSubForm:u2,flmDynamicForm:g2,FlmFormUploadImage:ju,flmSearch:b2,flmSearchSelect:v2,FlmToolbar:pg,flmReportPage:y2,flmExportPage:QR,FlameFramework:BV},Zbe={install:(t,e,n,o)=>{let r=LV;if(n&&(r=DE(r,n)),e&&e.forEach(i=>{t.use(i)}),o)for(const[i,s]of Object.entries(o))t.component(i,s);Object.entries(r).forEach(([i,s])=>t.component(i,s))},...LV};/*!
3930
3930
  * vanilla-picker v2.12.3
3931
3931
  * https://vanilla-picker.js.org
3932
3932
  *