@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 248 kB
JavaScript
(function(Y,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("lodash-es"),require("../designer-canvas/index.umd.js"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../tags/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../binding-selector/index.umd.js"),require("../notify/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../fieldset/index.umd.js"),require("../drawer/index.umd.js"),require("../common/index.umd.js"),require("../combo-tree/index.umd.js"),require("../field-selector/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../schema-selector/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../dynamic-resolver/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../designer-canvas/index.umd.js","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../tags/index.umd.js","../dynamic-form/index.umd.js","../binding-selector/index.umd.js","../notify/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../fieldset/index.umd.js","../drawer/index.umd.js","../common/index.umd.js","../combo-tree/index.umd.js","../field-selector/index.umd.js","../mapping-editor/index.umd.js","../schema-selector/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../dynamic-resolver/index.umd.js"],o):(Y=typeof globalThis<"u"?globalThis:Y||self,o(Y["dynamic-form"]={},Y.Vue,Y.LodashES,Y.designerCanvas,Y.VueUseCore,Y.dataView,null,Y.FTransfer,Y.FTabs,Y.FOrder,null,Y.FCheckbox,Y.FFilterBar,Y.FTooltip,Y.FPagination,Y.FButton,Y.FSearchBox,Y.FTags,Y.FDynamicForm,Y.FBindingSelector,null,Y.FAccordion,Y.FAvatar,Y.FButtonEdit,Y.FButtonGroup,Y.FCalendar,Y.FCapsule,Y.FColorPicker,Y.FComboList,Y.FContentContainer,Y.FDataGrid,Y.FDatePicker,Y.FDropdown,null,Y.FEventsEditor,Y.FImageCropper,Y.FInputGroup,Y.FLayout,Y.FListNav,Y.FListView,Y.FLookup,Y.FNav,Y.FNumberSpinner,Y.FNumberRange,Y.FPageHeader,Y.FPageFooter,Y.FProgress,Y.FQuerySolution,Y.FRadioGroup,Y.FRate,Y.FResponseToolbar,Y.FResponseLayout,Y.FResponseLayoutEditorSetting,Y.FSection,Y.FSmokeDetector,Y.FSplitter,Y.FStep,Y.FSwitch,Y.FText,Y.FTimePicker,Y.FTreeview,Y.FUploader,Y.FVerifyDetail,Y.FComponent,Y.FVideo,Y.FTextArea,Y.FTreeGrid$1,Y.FFieldset,Y.FDrawer,Y.common,Y.FComboTree,Y.FFieldSelector,Y.FMappingEditor,Y.FSchemaSelector,Y.FEventParameter,Y.FFilterConditionEditor,Y.FSortConditionEditor,Y.FMenuLookup,Y.dynamicResolver))})(this,function(Y,o,Be,gt,Kt,be,Xa,Xn,Kn,Qn,Ka,Qt,Jn,Jt,Zn,eo,to,no,Mt,oo,Qa,ro,io,ao,lo,so,co,uo,ut,fo,po,mo,ho,Ja,go,yo,vo,Co,bo,wo,_o,xo,So,Fo,Vo,To,Io,No,Mo,ko,Eo,Bo,Oo,Do,jo,Ro,Lo,Po,$o,Wo,Ao,qo,Go,zo,Ho,Uo,Yo,Xo,Ko,Se,Qo,Jo,Zo,er,tr,nr,or,rr,ir){"use strict";var Ua=Object.defineProperty;var Ya=(Y,o,Be)=>o in Y?Ua(Y,o,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Y[o]=Be;var H=(Y,o,Be)=>Ya(Y,typeof o!="symbol"?o+"":o,Be);const Zt={},en={};function kt(e){const{properties:t,title:n,ignore:r}=e,i=r&&Array.isArray(r),l=Object.keys(t).reduce((a,u)=>((!i||!r.find(c=>c===u))&&(a[u]=t[u].type==="object"&&t[u].properties?kt(t[u]):Be.cloneDeep(t[u].default)),a),{});if(n&&(!i||!r.find(a=>a==="id"))){const a=n.toLowerCase().replace(/-/g,"_");l.id=`${a}_${Math.random().toString().slice(2,6)}`}return l}function ar(e){const{properties:t,title:n,required:r}=e;if(r&&Array.isArray(r)){const i=r.reduce((l,a)=>(l[a]=t[a].type==="object"&&t[a].properties?kt(t[a]):Be.cloneDeep(t[a].default),l),{});if(n&&r.find(l=>l==="id")){const l=n.toLowerCase().replace(/-/g,"_");i.id=`${l}_${Math.random().toString().slice(2,6)}`}return i}return{type:n}}function Et(e,t={},n){const r=Zt[e];if(r){let i=ar(r);const l=en[e];return i=l?l({getSchemaByType:Et},i,t,n):i,i}return null}function lr(e,t){const n=kt(t);return Object.keys(n).reduce((r,i)=>(Object.prototype.hasOwnProperty.call(e,i)&&(r[i]&&Be.isPlainObject(r[i])&&Be.isPlainObject(e[i]||!e[i])?Object.assign(r[i],e[i]||{}):r[i]=e[i]),r),n),n}function tn(e,t){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,i)=>{if(t.has(i)){const l=t.get(i);if(typeof l=="string")r[l]=e[i];else{const a=l(i,e[i],e);Object.assign(r,a)}}else r[i]=e[i];return r},{})}function sr(e,t,n=new Map){const r=lr(e,t);return tn(r,n)}function cr(e={}){function t(f,d,s,p){if(typeof s=="number")return p[f].length===s;if(typeof s=="object"){const C=Object.keys(s)[0],y=s[C];if(C==="not")return Number(p[f].length)!==Number(y);if(C==="moreThan")return Number(p[f].length)>=Number(y);if(C==="lessThan")return Number(p[f].length)<=Number(y)}return!1}function n(f,d,s,p){return p[f]&&p[f].propertyValue&&String(p[f].propertyValue.value)===String(s)}const r=new Map([["length",t],["getProperty",n]]);Object.keys(e).reduce((f,d)=>(f.set(d,e[d]),f),r);function i(f,d){const s=f;return typeof d=="number"?[{target:s,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:s,operator:"getProperty",param:f,value:!!d}]:typeof d=="object"?Object.keys(d).map(p=>{if(p==="length")return{target:s,operator:"length",param:null,value:d[p]};const C=p,y=d[p];return{target:s,operator:"getProperty",param:C,value:y}}):[]}function l(f){return Object.keys(f).reduce((s,p)=>{const C=i(p,f[p]);return s.push(...C),s},[])}function a(f,d){if(r.has(f.operator)){const s=r.get(f.operator);return s&&s(f.target,f.param,f.value,d)||!1}return!1}function u(f,d){return l(f).reduce((C,y)=>C&&a(y,d),!0)}function c(f,d){const s=Object.keys(f),p=s.includes("allOf"),C=s.includes("anyOf"),y=p||C,g=(y?f[y?p?"allOf":"anyOf":"allOf"]:[f]).map(F=>u(F,d));return p?!g.includes(!1):g.includes(!0)}return{parseValueSchema:c}}const oe={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"}},nn={},ur={};cr();function dt(e,t,n=new Map,r=(a,u,c,f)=>u,i={},l=a=>a){return Zt[t.title]=t,en[t.title]=r,nn[t.title]=i,ur[t.title]=l,(a={},u=!0)=>{if(!u)return tn(a,n);const c=sr(a,t,n),f=Object.keys(e).reduce((d,s)=>(d[s]=e[s].default,d),{});return Object.assign(f,c)}}function wt(e,t){return{customClass:t.class,customStyle:t.style}}function dr(){function e(t,n){const{dataSource:r}=t||{};return r===void 0?{}:{}}return{resolve:e}}function fr(){function e(t,n){return t.selectItemById(n)}return{selectItemById:e}}function pr(){function e(t){return t.editor}return{resolve:e}}function mr(){function e(t,n){const{columns:r}=n;return t.updateColumns(r)}return{updateColumns:e}}const Bt=new Map([["appearance",wt]]),hr=new Map([]);var on=(e=>(e.SimpleField="SimpleField",e.ComplexField="ComplexField",e))(on||{}),Ot=(e=>(e.String="String",e.DateTime="DateTime",e.Date="Date",e.Enum="Enum",e.Boolean="Boolean",e.Number="Number",e.Text="Text",e.BigNumber="BigNumber",e))(Ot||{});const gr="root-viewmodel";class yr{constructor(t,n){H(this,"formSchemaUtils");H(this,"controlCreatorUtils");H(this,"designViewModelUtils");this.resolver=t,this.designerHostService=n,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(t){const n=this.createComponentRefNode(t),r=this.createComponentNode(t),i=this.createViewModeNode(t),l=this.formSchemaUtils.getFormSchema();return l.module.viewmodels.push(i),l.module.components.push(r),this.designViewModelUtils.assembleDesignViewModel(),n}createComponentRefNode(t){const n=this.resolver.getSchemaByType("component-ref");return Object.assign(n,{id:`${t.componentId}-component-ref`,component:`${t.componentId}-component`}),n}createComponentNode(t){const n=this.resolver.getSchemaByType("component"),r=this.createFormComponentContents(t);return Object.assign(n,{id:`${t.componentId}-component`,viewModel:`${t.componentId}-component-viewmodel`,componentType:t.componentType,appearance:{class:this.getFormComponentClass()},formColumns:t.formColumns,contents:r}),n}getFormComponentClass(){const{templateId:t}=this.formSchemaUtils.getFormSchema().module;return t==="double-list-in-tab-template"?"f-struct-wrapper f-utils-fill-flex-column":"f-struct-wrapper"}createFormComponentContents(t){const n=this.resolver.getSchemaByType("section");Object.assign(n,{id:t.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:t.componentName});const r=this.resolver.getSchemaByType("response-form"),i=[];Object.assign(r,{id:t.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:i}),n.contents=[r];const{selectedFields:l}=t;l==null||l.forEach(u=>{const c=Be.cloneDeep(u),f=this.resolveControlClassByFormColumns(t),d=this.controlCreatorUtils.setFormFieldProperty(c,"",f);d&&i.push(d)});const{templateId:a}=this.formSchemaUtils.getFormSchema().module;return a==="double-list-in-tab-template"&&(n.appearance.class="f-section-grid f-section-in-main px-0 pt-0",n.fill=!0),[n]}resolveControlClassByFormColumns(t){let n="";switch(t.formColumns){case 1:{n="col-12";break}case 2:{n="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{n="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{n="col-12 col-md-6 col-xl-3 col-el-2";break}}return n}createViewModeNode(t){return{id:`${t.componentId}-component-viewmodel`,code:`${t.componentId}-component-viewmodel`,name:t.componentName,bindTo:t.bindTo,parent:gr,fields:this.assembleViewModelFields(t),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(t){const n=[],{selectedFields:r}=t;return r==null||r.forEach(i=>{let l="blur";const a=i.type.name;(a===Ot.Enum||a===Ot.Boolean)&&(l="change"),n.push({type:"Form",id:i.id,fieldName:i.bindingField,groupId:null,groupName:null,updateOn:l,fieldSchema:{}})}),n}}function vr(e,t,n,r){var l,a,u,c,f,d;const i=n.parentComponentInstance;if(i&&r){const s=(l=i.schema)==null?void 0:l.type,C={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((a=n.bindingSourceContext)==null?void 0:a.entityTitle)||((c=(u=n.bindingSourceContext)==null?void 0:u.bindingEntity)==null?void 0:c.name)||"标题",componentType:"form",formColumns:s==="splitter-pane"?1:4,parentContainerId:i.schema.id,bindTo:((f=n.bindingSourceContext)==null?void 0:f.bindTo)||"/",selectedFields:(d=n.bindingSourceContext)==null?void 0:d.bindingEntityFields};return new yr(e,r).createComponent(C)}else return t}function Cr(e,t,n){return t}const br={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type","contents"]},Dt={customClass:{type:String,default:""},customStyle:{type:String,defaut:""}},jt=dt(Dt,br,Bt,vr),_t=o.defineComponent({name:"FResponseForm",props:Dt,emits:[],setup(e,t){const n=o.ref(),r=o.computed(()=>{const i=e.customClass.split(" "),l={"drag-container":!0};return i.reduce((a,u)=>(a[u]=!0,a),l),l});return()=>o.withDirectives(o.createVNode("div",{ref:n,class:r.value,style:e.customStyle},[t.slots.default&&t.slots.default()]),[[o.resolveDirective("area-response")]])}}),rn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct",default:null},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},binding:{description:"",type:"object",default:{}}},required:["id","type","editor"]},mt={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number],default:""},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},type:{type:String,default:"input-group"},componentId:{type:String,default:""}},Rt=dt(mt,rn,Bt,void 0),an=pr();function Lt(e,t,n){var O;const r=n&&n.getStyles&&n.getStyles()||"",i=n&&n.getDesignerClass&&n.getDesignerClass()||"",l=o.ref();function a(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function u(){return!1}function c(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function f(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function d(m){if(!m||!m.value)return null;if(m.value.schema&&m.value.schema.type==="component")return m.value;const _=o.ref(m==null?void 0:m.value.parent),x=d(_);return x||null}function s(m=t){var S;if(n!=null&&n.getDraggableDesignItemElement)return n.getDraggableDesignItemElement(m);const{componentInstance:_,designerItemElementRef:x}=m;if(!_||!_.value)return null;const{getCustomButtons:N}=_.value;return _.value.canMove||N&&((S=N())!=null&&S.length)?x:s(m.parent)}function p(m){return!!n&&n.canAccepts(m)}function C(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function y(){}function E(m,_){var x;!m||!_||(n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(m,_),(x=t==null?void 0:t.setupContext)==null||x.emit("dragEnd"))}function b(m,_){const{componentType:x}=m;let N=Et(x,m,_);n&&n.onResolveNewComponentSchema&&(N=n.onResolveNewComponentSchema(m,N));const S=x.toLowerCase().replace(/-/g,"_");return N&&!N.id&&N.type===x&&(N.id=`${S}_${Math.random().toString().slice(2,6)}`),N}function g(m){m&&n!=null&&n.onChildElementMovedOut&&n.onChildElementMovedOut(m)}function h(...m){if(n&&n.getPropsConfig)return n.getPropsConfig(...m)}function F(){n&&n.onRemoveComponent&&n.onRemoveComponent(),t!=null&&t.schema.contents&&t.schema.contents.map(m=>{let _=m.id;m.type==="component-ref"&&(_=m.component);const x=e.value.querySelectorAll(`#${_}-design-item`);x!=null&&x.length&&Array.from(x).map(N=>{var S;(S=N==null?void 0:N.componentInstance)!=null&&S.value.onRemoveComponent&&N.componentInstance.value.onRemoveComponent()})})}function v(){if(n&&n.getCustomButtons)return n.getCustomButtons()}function w(m){if(n&&n.onPropertyChanged)return n.onPropertyChanged(m)}return l.value={canMove:a(),canSelectParent:u(),canDelete:c(),canNested:!f(),contents:t==null?void 0:t.schema.contents,elementRef:e,parent:(O=t==null?void 0:t.parent)==null?void 0:O.componentInstance,schema:t==null?void 0:t.schema,styles:r,designerClass:i,canAccepts:p,getBelongedComponentInstance:d,getDraggableDesignItemElement:s,getDraggingDisplayText:C,getPropConfig:h,getDragScopeElement:y,onAcceptMovedChildElement:E,onChildElementMovedOut:g,addNewChildComponentSchema:b,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||o.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||o.ref(!1),onRemoveComponent:F,getCustomButtons:v,onPropertyChanged:w},l}function wr(){function e(t,n){var a;if(!t)return!1;const r=((a=t.targetContainer)==null?void 0:a.componentInstance)&&t.targetContainer.componentInstance.value;if(!r)return!1;const i=r.schema.type,l=n==null?void 0:n.formSchemaUtils.getComponentById(r.belongedComponentId);return!((t.componentCategory==="input"||t.componentType==="form-group")&&![oe["response-layout-item"].type,oe["response-form"].type,oe.fieldset.type].includes(i)||(t.componentType===oe.tabs.type||t.componentType===oe.section.type)&&((l==null?void 0:l.componentType)!=="frame"||![oe["content-container"].type,oe["splitter-pane"].type,oe["response-layout-item"].type].includes(i))||t.componentType===oe["query-solution"].type||t.componentType===oe.fieldset.type&&i!==oe["response-form"].type)}return{basalDragulaRuleForContainer:e}}class _r{getTemplateRule(t,n){const r=n==null?void 0:n.formSchemaUtils,i=r==null?void 0:r.getFormTemplateRule(),l={canAccept:!0,canDelete:!0,canMove:!0};if(!i)return l;const a=this.getComponentContext(t),{componentClassList:u}=a;return u.forEach(c=>{if(!c||!i[c])return;const{canMove:f,canDelete:d,canAccept:s}=i[c];l.canMove=l.canMove&&this.resolveRuleValue(f,a),l.canDelete=l.canDelete&&this.resolveRuleValue(d,a),l.canAccept=l.canAccept&&this.resolveRuleValue(s,a)}),l}resolveRuleValue(t,n){return typeof t=="boolean"?t:this.parseRuleValueSchema(t,n)}parseRuleValueSchema(t,n){const r=t.invalidContext||[];let i=!0;for(const l of r){if(l.firstLevelChild){if(l.firstLevelChild.class){const{firstLevelChildClassList:a}=n;if(a&&!a.includes(l.firstLevelChild.class)){i=!1;continue}}if(l.firstLevelChild.type){const{firstLevelChildSchema:a}=n;if(!a||a.type!==l.firstLevelChild.type){i=!1;continue}}}if(l.secondLevelChild){if(l.secondLevelChild.class){const{secondLevelChildClassList:a}=n;if(a&&!a.includes(l.secondLevelChild.class)){i=!1;continue}}if(l.secondLevelChild.type){const{secondLevelChildSchema:a}=n;if(!a||a.type!==l.secondLevelChild.type){i=!1;continue}}}if(l.parent){if(l.parent.class){const{parentClassList:a}=n;if(a&&!a.includes(l.parent.class)){i=!1;continue}}if(l.parent.type){const{parentSchema:a}=n;if(a&&a.type!==l.parent.type){i=!1;continue}}}i=!0;break}return!i}getComponentContext(t){var E,b,g,h;const n=t.schema,r=n.appearance&&n.appearance.class||"",i=r.split(" ")||[],l=n.contents||[],a=l.length?l[0]:null,u=a&&a.appearance?a.appearance.class:"",c=u?u.split(" "):[],f=(E=a==null?void 0:a.contents)!=null&&E.length?a==null?void 0:a.contents[0]:null,d=f&&f.appearance?f.appearance.class:"",s=d?d.split(" "):[],p=n.type==="component"?(g=(b=t.parent)==null?void 0:b.parent)==null?void 0:g.schema:(h=t.parent)==null?void 0:h.schema,C=p&&p.appearance&&p.appearance.class||"",y=C?C.split(" "):[];return{componentClass:r,componentClassList:i,childContents:l,firstLevelChildSchema:a,firstLevelChildClass:u,firstLevelChildClassList:c,secondLevelChildSchema:f,secondLevelChildClass:d,secondLevelChildClassList:s,parentSchema:p,parentClass:C,parentClassList:y}}}const xr=o.ref(0);function Sr(){xr.value++}const ft=o.ref(0);function Fr(e,t){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top>=n.top,l=r.top<=n.bottom;return i&&l}function Vr(e){const t=e.querySelector(".component-btn-group");if(!t)return;t.style.display="";const n=t.getBoundingClientRect();if(!(n.top===0&&n.left===0)){const r=t.querySelector("div");if(r){const i=r.getBoundingClientRect();r.style.top=n.top+"px";let l=n.left-i.width;const a=document.querySelector(".editorDiv");if(a){const u=a.getBoundingClientRect();l<u.left&&({left:l}=e.getBoundingClientRect())}r.style.left=l+"px"}}}function Tr(e){if(!window.scrollContainerList)return;const t=Array.from(window.scrollContainerList);if(t.length&&t.length===1){const n=t[0],r=document.querySelector(`[id=${n}]`);if(r&&r.contains(e))return r}}function ln(e){if(!e)return;const t=e.getBoundingClientRect();if(t.width===0&&t.height===0)return;const n=e.querySelector(".component-btn-group");if(n){let r=!0;const i=Tr(e);if(i&&(r=Fr(e,i)),!r){n.style.display="none";return}Vr(e)}}function Ir(e){if(!e)return;let t;e.className.includes("dgComponentSelected")?t=e:t=e.querySelector(".dgComponentSelected"),t&&ln(t)}class Pt{constructor(t,n){H(this,"componentId");H(this,"viewModelId");H(this,"eventsEditorUtils");H(this,"formSchemaUtils");H(this,"formMetadataConverter");H(this,"designViewModelUtils");H(this,"designViewModelField");H(this,"controlCreatorUtils");H(this,"designerHostService");H(this,"schemaService",null);H(this,"metadataService",null);H(this,"propertyConfig",{type:"object",categories:{}});var r;this.componentId=t,this.designerHostService=n,this.eventsEditorUtils=n.eventsEditorUtils,this.formSchemaUtils=n.formSchemaUtils,this.formMetadataConverter=n.formMetadataConverter,this.viewModelId=((r=this.formSchemaUtils)==null?void 0:r.getViewModelIdByComponentId(t))||"",this.designViewModelUtils=n.designViewModelUtils,this.controlCreatorUtils=n.controlCreatorUtils,this.metadataService=n.metadataService,this.schemaService=n.schemaService}getTableInfo(){var t;return(t=this.schemaService)==null?void 0:t.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(t){var r;const n=t.binding&&t.binding.type==="Form"&&t.binding.field;if(n){if(!this.designViewModelField){const i=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=i.fields.find(l=>l.id===n)}t.updateOn=(r=this.designViewModelField)==null?void 0:r.updateOn}}getBasicPropConfig(t){return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"name",valueField:"value",editable:!1,data:[{value:t.type,name:oe[t.type].name}]}}}}}getAppearanceConfig(t=null){return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的样式",$converter:"/converter/appearance.converter"}},setPropertyRelates(n,r){if(n)switch(n&&n.propertyID){case"class":case"style":{ft.value++;break}}}}}updateElementByParentContainer(t,n){const r=n&&n.parent&&n.parent.schema;if(!r)return;const i=r.contents.findIndex(a=>a.id===t),l=Be.cloneDeep(r.contents[i]);r.contents.splice(i,1),r.contents.splice(i,0,l),Sr()}}class Nr{constructor(){H(this,"label","");H(this,"id","");H(this,"columnInSM",12);H(this,"columnInMD",6);H(this,"columnInLG",3);H(this,"columnInEL",2);H(this,"displayWidthInSM",1);H(this,"displayWidthInMD",1);H(this,"displayWidthInLG",1);H(this,"displayWidthInEL",1);H(this,"displayColumnCountAtBreakPoint","md");H(this,"tagRow",0);H(this,"showTopBorder",0);H(this,"group",1);H(this,"isSupportedClass",!0);H(this,"fieldSetId","")}}function sn(e){let t,n;const r=new Map;let i=[];function l(d,s){const C=d.split(" ").filter(h=>h.startsWith("col-"));if(C.length===0){s.isSupportedClass=!1;return}let y=C.find(h=>/^col-([1-9]|10|11|12)$/.test(h)),E=C.find(h=>/^col-md-([1-9]|10|11|12)$/.test(h)),b=C.find(h=>/^col-xl-([1-9]|10|11|12)$/.test(h)),g=C.find(h=>/^col-el-([1-9]|10|11|12)$/.test(h));y=y||"col-12",s.columnInSM=parseInt(y.replace("col-",""),10),s.displayWidthInSM=s.columnInSM/12,s.displayWidthInSM!==1&&(s.isSupportedClass=!1),E=E||"col-md-"+s.columnInSM,s.columnInMD=parseInt(E.replace("col-md-",""),10),s.displayWidthInMD=s.columnInMD/6,[1,2].includes(s.displayWidthInMD)||(s.isSupportedClass=!1),b=b||"col-xl-"+s.columnInMD,s.columnInLG=parseInt(b.replace("col-xl-",""),10),s.displayWidthInLG=s.columnInLG/3,[1,2,3,4].includes(s.displayWidthInLG)||(s.isSupportedClass=!1),g=g||"col-el-"+s.columnInLG,s.columnInEL=parseInt(g.replace("col-el-",""),10),s.displayWidthInEL=s.columnInEL/2,[1,2,3,4,5,6].includes(s.displayWidthInEL)||(s.isSupportedClass=!1)}function a(d,s,p,C=!1){let y=!1;d.contents.forEach(E=>{if(E.type==="fieldset"){p+=1,a(E,s,p,!0),y=!0;return}y&&(p+=1,y=!1);const b=E.appearance&&E.appearance.class,g=new Nr;b?l(b,g):g.isSupportedClass=!1,g.label=E.label||E.id,g.id=E.id,g.group=p,C&&(g.fieldSetId=d.id),n===E.id&&(t=p),r.set(E.id,E),s.push(g)})}function u(d){const s=e.getComponentById(d);if(!s||!s.componentType||!s.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const p=e.selectNode(s,C=>C.type===gt.DgControl["response-form"].type);return!p||!p.contents||p.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:p}}function c(d,s){s=s||d.id;const{result:p,message:C,formNode:y}=u(s);if(!p)return{result:p,message:C};n=d.id,i=[],r.clear();const E=y.contents[0].type===gt.DgControl.fieldset.type?0:1;a(y,i,E);const b=i.find(h=>!h.isSupportedClass);return{defaultState:{defaultGroupNumber:t||1,model:b?"customize":"standard"},importData:i}}function f(d,s){s=s;const{result:p,formNode:C}=u(s);if(!p)return"";const y=[];return d.forEach(E=>{var h;const b=r.get(E.id),g=b.appearance&&b.appearance.class;if(g){const v=g.split(" ").filter(N=>!N.startsWith("col-")),w="col-"+E.columnInSM,O="col-md-"+E.columnInMD,m="col-xl-"+E.columnInLG,_="col-el-"+E.columnInEL,x=[w,O,m,_].concat(v);b.appearance.class=x.join(" ")}if(E.fieldSetId){const F=C.contents.find(w=>w.id===E.fieldSetId),v=y.find(w=>w.id===E.fieldSetId);v?(h=v.contents)==null||h.push(b):(y.push(F),F.contents=[b])}else y.push(b)}),C.contents=y,C.id}return{checkCanFindFormNode:u,checkCanOpenLayoutEditor:c,changeFormControlsByResponseLayoutConfig:f,getResonseFormLayoutConfig:a}}function Mr(e,t){function n(c,f=null){if(f)return f;const d=e.getComponentById(t);return e.selectNode(d,s=>s.id===c)}function r(c){const f=e.getComponentById(c);return!(!f||!f.componentType||!f.componentType.startsWith("form"))}function i(c){const f=new Set(c);return Array.from(f).length===1}function l(c){const f=n(c.id),d=sn(e),s=[];d.getResonseFormLayoutConfig(f,s,1);const p=s.map(v=>v.columnInSM),C=s.map(v=>v.columnInMD),y=s.map(v=>v.columnInLG),E=s.map(v=>v.columnInEL),b=i(p)?p[0]:0,g=i(C)?C[0]:0,h=i(y)?y[0]:0,F=i(E)?E[0]:0;return{uniqueColClassInSM:b,uniqueColClassInMD:g,uniqueColClassInLG:h,uniqueColClassInEL:F}}function a(c,f){let d,s,p,C,y=[];if(c){const v=c.split(" "),w=v.filter(O=>O.startsWith("col-"));d=w.find(O=>/^col-([1-9]|10|11|12)$/.test(O)),s=w.find(O=>/^col-md-([1-9]|10|11|12)$/.test(O)),p=w.find(O=>/^col-xl-([1-9]|10|11|12)$/.test(O)),C=w.find(O=>/^col-el-([1-9]|10|11|12)$/.test(O)),y=v.filter(O=>!O.startsWith("col-"))}const E=f.uniqueColClassInSM?"col-"+f.uniqueColClassInSM:d,b=f.uniqueColClassInMD?"col-md-"+f.uniqueColClassInMD:s,g=f.uniqueColClassInLG?"col-xl-"+f.uniqueColClassInLG:p,h=f.uniqueColClassInEL?"col-el-"+f.uniqueColClassInEL:C;return[E,b,g,h].concat(y).join(" ")}function u(c,f,d){c=n(d,c),c.contents.forEach(s=>{if(s.type===gt.DgControl.fieldset.type){u(s,f,s.id);return}s.appearance||(s.appearance={});const p=s.appearance.class;s.appearance.class=a(p,f)})}return{checkIsInFormComponent:r,assembleUnifiedLayoutContext:l,changeFormControlsByUnifiedLayoutConfig:u}}class kr extends Pt{constructor(t,n){super(t,n)}getPropertyConfig(t,n){const r=this;this.propertyConfig.categories.basic=this.getBasicPropConfig(t);const{checkIsInFormComponent:i,assembleUnifiedLayoutContext:l,changeFormControlsByUnifiedLayoutConfig:a}=Mr(this.formSchemaUtils,this.componentId),u=this.getAppearanceConfig(t);return u.properties.unifiedLayout={title:"统一布局配置",description:"统一配置卡片区域内所有控件的宽度,只支持标准模式",visible:i(this.componentId),refreshPanelAfterChanged:!0,editor:{type:"response-form-layout-setting",initialState:l(t)}},u.setPropertyRelates=function(c,f){if(c)switch(c&&c.propertyID){case"unifiedLayout":{a(null,c.propertyValue,t.id),r.updateElementByParentContainer(t.id,n);break}}},this.propertyConfig.categories.appearance=u,this.propertyConfig}}var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Er={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){return function(){function n(r,i,l){function a(f,d){if(!i[f]){if(!r[f]){var s=typeof xt=="function"&&xt;if(!d&&s)return s(f,!0);if(u)return u(f,!0);var p=new Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p}var C=i[f]={exports:{}};r[f][0].call(C.exports,function(y){var E=r[f][1][y];return a(E||y)},C,C.exports,n,r,i,l)}return i[f].exports}for(var u=typeof xt=="function"&&xt,c=0;c<l.length;c++)a(l[c]);return a}return n}()({1:[function(n,r,i){var l={},a="(?:^|\\s)",u="(?:\\s|$)";function c(s){var p=l[s];return p?p.lastIndex=0:l[s]=p=new RegExp(a+s+u,"g"),p}function f(s,p){var C=s.className;C.length?c(p).test(C)||(s.className+=" "+p):s.className=p}function d(s,p){s.className=s.className.replace(c(p)," ").trim()}r.exports={add:f,rm:d}},{}],2:[function(n,r,i){(function(l){var a=n("contra/emitter"),u=n("crossvent"),c=n("./classes"),f=document,d=f.documentElement;function s(S,V){var T=arguments.length;T===1&&Array.isArray(S)===!1&&(V=S,S=[]);var B,I,M,k,D,j,W,G,U,fe=null,$,P,A=!1,K=0,Z,Q=V||{};Q.moves===void 0&&(Q.moves=h),Q.accepts===void 0&&(Q.accepts=h),Q.invalid===void 0&&(Q.invalid=it),Q.containers===void 0&&(Q.containers=S||[]),Q.isContainer===void 0&&(Q.isContainer=g),Q.copy===void 0&&(Q.copy=!1),Q.copySortSource===void 0&&(Q.copySortSource=!1),Q.revertOnSpill===void 0&&(Q.revertOnSpill=!1),Q.removeOnSpill===void 0&&(Q.removeOnSpill=!1),Q.direction===void 0&&(Q.direction="vertical"),Q.ignoreInputTextSelection===void 0&&(Q.ignoreInputTextSelection=!0),Q.mirrorContainer===void 0&&(Q.mirrorContainer=f.body);var R=a({containers:Q.containers,start:ze,end:ne,cancel:at,remove:Te,destroy:xe,canMove:ke,dragging:!1});return Q.removeOnSpill===!0&&R.on("over",pe).on("out",he),ie(),R;function z(L){return R.containers.indexOf(L)!==-1||Q.isContainer(L)}function ie(L){var J=L?"remove":"add";y(d,J,"mousedown",Fe),y(d,J,"mouseup",Ie)}function ee(L){var J=L?"remove":"add";y(d,J,"mousemove",We)}function te(L){var J=L?"remove":"add";u[J](d,"selectstart",Ve),u[J](d,"click",Ve)}function xe(){ie(!0),Ie({})}function Ve(L){$&&L.preventDefault()}function Fe(L){k=L.clientX,D=L.clientY;var J=E(L)!==1||L.metaKey||L.ctrlKey;if(!J){var X=L.target,ue=je(X);ue&&($=ue,ee(),L.type==="mousedown"&&(O(X)?X.focus():L.preventDefault()))}}function We(L){if($){if(E(L)===0){Ie({});return}if(!(L.clientX!==void 0&&Math.abs(L.clientX-k)<=(Q.slideFactorX||0)&&L.clientY!==void 0&&Math.abs(L.clientY-D)<=(Q.slideFactorY||0))){if(Q.ignoreInputTextSelection){var J=N("clientX",L)||0,X=N("clientY",L)||0,ue=f.elementFromPoint(J,X);if(O(ue))return}var ge=$;ee(!0),te(),ne(),qe(ge),c.add(G||M,"gu-transit"),Ne(),_e(),K=0,He(L)}}}function je(L){if(!(R.dragging&&B)&&!z(L)){for(var J=L;w(L)&&z(w(L))===!1;)if(Q.invalid(L,J)||(L=w(L),!L))return;var X=w(L);if(X&&!Q.invalid(L,J)){var ue=Q.moves(L,X,J,_(L));if(ue)return{item:L,source:X}}}}function ke(L){return!!je(L)}function ze(L){var J=je(L);J&&qe(J)}function qe(L){Pe(L.item,L.source)&&(G=L.item.cloneNode(!0),R.emit("cloned",G,L.item,"copy")),I=L.source,M=L.item,j=W=_(L.item),R.dragging=!0,R.emit("drag",M,I)}function it(){return!1}function ne(){if(R.dragging){var L=G||M;Oe(L,w(L))}}function ve(){$=!1,ee(!0),te(!0)}function Ie(L){if(ve(),!!R.dragging){var J=G||M,X=N("clientX",L)||0,ue=N("clientY",L)||0,ge=b(B,X,ue),ye=st(ge,X,ue);ye&&(G&&Q.copySortSource||!G||ye!==I)?Oe(J,ye):Q.removeOnSpill?Te():at()}}function Oe(L,J){var X=w(L);G&&Q.copySortSource&&J===I&&X.removeChild(M),et(J)?R.emit("cancel",L,I):R.emit("drop",L,J,I,W),Ze()}function Te(){if(R.dragging){var L=G||M,J=w(L);J&&J.removeChild(L),R.emit(G?"cancel":"remove",L,J,I),Ze()}}function at(L){if(R.dragging){var J=arguments.length>0?L:Q.revertOnSpill,X=G||M,ue=w(X),ge=et(ue);ge===!1&&J&&(G?ue&&ue.removeChild(G):I.insertBefore(X,j)),ge||J?R.emit("cancel",X,I,I):R.emit("drop",X,ue,I,W),Ze()}}function Ze(){var L=G||M;ve(),Le(),Ge(),L&&c.rm(L,"gu-transit"),U&&clearTimeout(U),R.dragging=!1,fe&&R.emit("out",L,fe,I),R.emit("dragend",L,K),I=M=G=j=W=U=fe=null}function et(L,J){var X;return J!==void 0?X=J:B?X=W:X=_(G||M),L===I&&X===j}function st(L,J,X){for(var ue=L;ue&&!ge();)ue=w(ue);return ue;function ge(){var ye=z(ue);if(ye===!1)return!1;var ae=tt(ue,L),we=Ee(ue,ae,J,X),De=et(ue,we);return De?!0:Q.accepts(M,ue,I,we)}}function He(L){if(!B)return;L.preventDefault();var J=N("clientX",L)||0,X=N("clientY",L)||0;B.style.left=J-2+"px",B.style.top=X-2+"px";var ue=G||M,ge=b(B,J,X),ye=st(ge,J,X),ae=ye!==null&&ye!==fe;(ae||ye===null)&&(Qe(),fe=ye,ct()),Ce(ge,X);var we=w(ue);if(ye===I&&G&&!Q.copySortSource){we&&we.removeChild(ue);return}var De,Ke=tt(ye,ge);if(A=nt(Ke,ye),Ke!==null)De=Ee(ye,Ke,J,X);else if(Q.revertOnSpill===!0&&!G)De=j,ye=I;else{G&&we&&we.removeChild(ue),G&&P&&(P.style.display="none");return}P.style.display="block",re(De,ue,ae),De?q(Ke,De):me(ye);function $e(Ae){R.emit(Ae,ue,fe,I)}function ct(){ae&&$e("over")}function Qe(){fe&&$e("out")}}function re(L,J,X){(L===J||L===_(J))&&(W=_(J)),(L===null&&X||L!==J&&L!==_(J))&&(W=L)}function pe(L){c.rm(L,"gu-hide")}function he(L){R.dragging&&c.add(L,"gu-hide")}function _e(){B||(B=document.createElement("div"),B.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",B.innerHTML=Q.getMirrorText&&Q.getMirrorText(M)||"控件",c.add(B,"gu-mirror"),Q.mirrorContainer.appendChild(B),y(d,"add","mousemove",He),c.add(Q.mirrorContainer,"gu-unselectable"),R.emit("cloned",B,M,"mirror"))}function Ne(){if(P=document.createElement("div"),c.add(P,"gu-insertion"),M){var L=M.getBoundingClientRect();P.style.left=L.left+"px",P.style.top=L.top+"px"}A=!1,Q.mirrorContainer.appendChild(P)}function Le(){B&&(c.rm(Q.mirrorContainer,"gu-unselectable"),y(d,"remove","mousemove",He),w(B).removeChild(B),B=null)}function Ge(){P&&(w(P).removeChild(P),P=null)}function tt(L,J){for(var X=J;X!==L&&w(X)!==L;)X=w(X);return X===d?null:X}function nt(L,J){if(!J)return A;var X=L||J&&J.lastElementChild;if(!X)return!0;var ue=getComputedStyle(L),ge=/^inline/.test(ue.getPropertyValue("display"))||/^(left|right)$/.test(ue.getPropertyValue("float"));if(ge)return!0;if(J){var ye=getComputedStyle(J),ae=ye.getPropertyValue("display");if(/flex$/.test(ae)){var we=ye.getPropertyValue("flex-direction")||"row";if(we==="row"||we==="row-reverse")return!Ue(J)}return!1}return!0}function Ue(L){if(!L.children||!L.children.length)return!1;for(const J of Array.from(L.children)){const ue=(J.className&&J.className.split(" ")||[]).filter(ge=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ge));if(!ue.length)return!1;for(const ge of ue){const ye=ge.slice(ge.lastIndexOf("-")+1);if(parseInt(ye,10)!==12)return!1}}return!0}function q(L,J){const X=J.getBoundingClientRect();if(P.style.left=X.left+"px",P.style.top=X.top+"px",A){if(P.style.height=X.height+"px",P.style.width="4px",L){const ue=L.getBoundingClientRect();ue.top!==X.top&&(P.style.left=ue.right+"px",P.style.top=ue.top+"px",P.style.height=ue.height+"px")}}else if(P.style.height="4px",P.style.width=X.width+"px",Z){const ue=Z.getBoundingClientRect();X.top<ue.top&&(P.style.display="none")}J===M&&M&&(P.style.display="none")}function me(L){W=null;var J=L.lastElementChild;if(J){var X=J.getBoundingClientRect();A?(P.style.left=X.right+"px",P.style.top=X.top+"px",P.style.height=X.height+"px",P.style.width="4px"):(P.style.left=X.left+"px",P.style.top=X.bottom+"px",P.style.height="4px",P.style.width=X.width+"px"),J===M&&M&&(P.style.display="none")}else P.style.display="none"}function Ce(L,J){if(!Q.mirrorContainer.contains(L)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Z=p(L),!Z||!Z.contains(L)))return;const X=document.querySelector(".dgComponentSelected"),ue=Z.getBoundingClientRect();if(J-30<ue.top&&Z.scrollTop>0){let ge=Z.scrollTop<10?Z.scrollTop:10;Z.scrollBy(0,-1*ge),X&&Z.contains(X)&&(K=K+-1*ge)}if(J+30>ue.bottom&&Z.scrollTop<Z.scrollHeight-Z.clientHeight){const ge=Z.scrollHeight-Z.clientHeight-Z.scrollTop;let ye=ge<10?ge:10;Z.scrollBy(0,ye),X&&Z.contains(X)&&(K=K+ye)}}function Ee(L,J,X,ue){var ge=Q.direction==="horizontal",ye=Q.direction==="mixed",ae=J!==L?De():we();return ae;function we(){var $e=L.children.length,ct,Qe,Ae;for(ct=0;ct<$e;ct++)if(Qe=L.children[ct],Ae=Qe.getBoundingClientRect(),ge&&Ae.left+Ae.width/2>X||!ye&&!ge&&Ae.top+Ae.height/2>ue||ye&&Ae.left+Ae.width>X&&Ae.top+Ae.height>ue)return Qe;return null}function De(){var $e=J.getBoundingClientRect();if(ye){var ct=ue-$e.top,Qe=X-$e.left,Ae=$e.bottom-ue,Ut=$e.right-X,Yt=Math.min(Qe,Ut,ct,Ae),Xt;return A?Xt=Ut<Qe:Xt=Ae===Yt||Ut===Yt||Qe===Yt,Ke(Xt)}return Ke(ge?X>$e.left+F($e)/2:ue>$e.top+v($e)/2)}function Ke($e){return $e?_(J):J}}function Pe(L,J){return typeof Q.copy=="boolean"?Q.copy:Q.copy(L,J)}}function p(S){const V=Array.from(window.scrollContainerList);if(V.length===1){const B=Array.from(window.scrollContainerList)[0];return document.getElementById(B)}const T=C(V);for(const B of T)if(B.contains(S))return B;return null}function C(S){const V=[];return S.forEach(T=>{const B=document.getElementById(T);B&&V.push(B)}),V.sort((T,B)=>T.contains(B)?1:B.contains(T)?-1:0),V}function y(S,V,T,B){var I={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},M={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},k={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?u[V](S,M[T],B):l.navigator.msPointerEnabled?u[V](S,k[T],B):(u[V](S,I[T],B),u[V](S,T,B))}function E(S){if(S.touches!==void 0)return S.touches.length;if(S.which!==void 0&&S.which!==0)return S.which;if(S.buttons!==void 0)return S.buttons;var V=S.button;if(V!==void 0)return V&1?1:V&2?3:V&4?2:0}function b(S,V,T){S=S||{};var B=S.className||"",I;return S.className+=" gu-hide",I=f.elementFromPoint(V,T),S.className=B,I}function g(){return!1}function h(){return!0}function F(S){return S.width||S.right-S.left}function v(S){return S.height||S.bottom-S.top}function w(S){return S.parentNode===f?null:S.parentNode}function O(S){return S.tagName==="INPUT"||S.tagName==="TEXTAREA"||S.tagName==="SELECT"||m(S)}function m(S){return!S||S.contentEditable==="false"?!1:S.contentEditable==="true"?!0:m(w(S))}function _(S){return S.nextElementSibling||V();function V(){var T=S;do T=T.nextSibling;while(T&&T.nodeType!==1);return T}}function x(S){return S.targetTouches&&S.targetTouches.length?S.targetTouches[0]:S.changedTouches&&S.changedTouches.length?S.changedTouches[0]:S}function N(S,V){var T=x(V),B={pageX:"clientX",pageY:"clientY"};return S in B&&!(S in T)&&B[S]in T&&(S=B[S]),T[S]}r.exports=s}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(n,r,i){r.exports=function(a,u){return Array.prototype.slice.call(a,u)}},{}],4:[function(n,r,i){var l=n("ticky");r.exports=function(u,c,f){u&&l(function(){u.apply(f||null,c||[])})}},{ticky:10}],5:[function(n,r,i){var l=n("atoa"),a=n("./debounce");r.exports=function(c,f){var d=f||{},s={};return c===void 0&&(c={}),c.on=function(p,C){return s[p]?s[p].push(C):s[p]=[C],c},c.once=function(p,C){return C._once=!0,c.on(p,C),c},c.off=function(p,C){var y=arguments.length;if(y===1)delete s[p];else if(y===0)s={};else{var E=s[p];if(!E)return c;E.splice(E.indexOf(C),1)}return c},c.emit=function(){var p=l(arguments);return c.emitterSnapshot(p.shift()).apply(this,p)},c.emitterSnapshot=function(p){var C=(s[p]||[]).slice(0);return function(){var y=l(arguments),E=this||c;if(p==="error"&&d.throws!==!1&&!C.length)throw y.length===1?y[0]:y;return C.forEach(function(g){d.async?a(g,y,E):g.apply(E,y),g._once&&c.off(p,g)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(n,r,i){(function(l){var a=n("custom-event"),u=n("./eventmap"),c=l.document,f=p,d=y,s=[];l.addEventListener||(f=C,d=E),r.exports={add:f,remove:d,fabricate:b};function p(w,O,m,_){return w.addEventListener(O,m,_)}function C(w,O,m){return w.attachEvent("on"+O,h(w,O,m))}function y(w,O,m,_){return w.removeEventListener(O,m,_)}function E(w,O,m){var _=F(w,O,m);if(_)return w.detachEvent("on"+O,_)}function b(w,O,m){var _=u.indexOf(O)===-1?N():x();w.dispatchEvent?w.dispatchEvent(_):w.fireEvent("on"+O,_);function x(){var S;return c.createEvent?(S=c.createEvent("Event"),S.initEvent(O,!0,!0)):c.createEventObject&&(S=c.createEventObject()),S}function N(){return new a(O,{detail:m})}}function g(w,O,m){return function(x){var N=x||l.event;N.target=N.target||N.srcElement,N.preventDefault=N.preventDefault||function(){N.returnValue=!1},N.stopPropagation=N.stopPropagation||function(){N.cancelBubble=!0},N.which=N.which||N.keyCode,m.call(w,N)}}function h(w,O,m){var _=F(w,O,m)||g(w,O,m);return s.push({wrapper:_,element:w,type:O,fn:m}),_}function F(w,O,m){var _=v(w,O,m);if(_){var x=s[_].wrapper;return s.splice(_,1),x}}function v(w,O,m){var _,x;for(_=0;_<s.length;_++)if(x=s[_],x.element===w&&x.type===O&&x.fn===m)return _}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(n,r,i){(function(l){var a=[],u="",c=/^on/;for(u in l)c.test(u)&&a.push(u.slice(2));r.exports=a}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(n,r,i){(function(l){var a=l.CustomEvent;function u(){try{var c=new a("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}r.exports=u()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(f,d){var s=document.createEvent("CustomEvent");return d?s.initCustomEvent(f,d.bubbles,d.cancelable,d.detail):s.initCustomEvent(f,!1,!1,void 0),s}:function(f,d){var s=document.createEventObject();return s.type=f,d?(s.bubbles=!!d.bubbles,s.cancelable=!!d.cancelable,s.detail=d.detail):(s.bubbles=!1,s.cancelable=!1,s.detail=void 0),s}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(n,r,i){var l=r.exports={},a,u;function c(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=c}catch{a=c}try{typeof clearTimeout=="function"?u=clearTimeout:u=f}catch{u=f}})();function d(v){if(a===setTimeout)return setTimeout(v,0);if((a===c||!a)&&setTimeout)return a=setTimeout,setTimeout(v,0);try{return a(v,0)}catch{try{return a.call(null,v,0)}catch{return a.call(this,v,0)}}}function s(v){if(u===clearTimeout)return clearTimeout(v);if((u===f||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(v);try{return u(v)}catch{try{return u.call(null,v)}catch{return u.call(this,v)}}}var p=[],C=!1,y,E=-1;function b(){!C||!y||(C=!1,y.length?p=y.concat(p):E=-1,p.length&&g())}function g(){if(!C){var v=d(b);C=!0;for(var w=p.length;w;){for(y=p,p=[];++E<w;)y&&y[E].run();E=-1,w=p.length}y=null,C=!1,s(v)}}l.nextTick=function(v){var w=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)w[O-1]=arguments[O];p.push(new h(v,w)),p.length===1&&!C&&d(g)};function h(v,w){this.fun=v,this.array=w}h.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function F(){}l.on=F,l.addListener=F,l.once=F,l.off=F,l.removeListener=F,l.removeAllListeners=F,l.emit=F,l.prependListener=F,l.prependOnceListener=F,l.listeners=function(v){return[]},l.binding=function(v){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(v){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(n,r,i){(function(l){var a=typeof l=="function",u;a?u=function(c){l(c)}:u=function(c){setTimeout(c,0)},r.exports=u}).call(this,n("timers").setImmediate)},{timers:11}],11:[function(n,r,i){(function(l,a){var u=n("process/browser.js").nextTick,c=Function.prototype.apply,f=Array.prototype.slice,d={},s=0;i.setTimeout=function(){return new p(c.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new p(c.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(C){C.close()};function p(C,y){this._id=C,this._clearFn=y}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(C,y){clearTimeout(C._idleTimeoutId),C._idleTimeout=y},i.unenroll=function(C){clearTimeout(C._idleTimeoutId),C._idleTimeout=-1},i._unrefActive=i.active=function(C){clearTimeout(C._idleTimeoutId);var y=C._idleTimeout;y>