(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b~207d3580"],{"1bdc":function(e,t,o){"use strict";(function(e){o.d(t,"a",(function(){return Lt})),o.d(t,"b",(function(){return J})),o.d(t,"c",(function(){return Yt})),o.d(t,"d",(function(){return Cy})),o.d(t,"e",(function(){return te}));var i=o("c621"),n=o("3af9"),r=o("d5fa"),a=o("7a23"),l=o("6b16"),s=o("7ee8"),c=o("8121"),d=o("5c8a"),u=o("2eb5"),p=o("85b1"),b=o("7ec8"),g=o("ff51"),v=o("a809"),m=o("b76a"),y=o.n(m),h=o("59a5"),f=o("9839"),O=o("2f50"),w=o("dfae"),j=o("fe6b"),k=o("f933"),C=o("ed3b"),D=o("89ee"),T=o("c0e4"),$=o("fc25"),E=o("4e03"),S=o("b558"),N=o("bb76"),V=o("681b"),x=o("7bec"),I=o("3d7c"),M=o("a600"),A=o("55f1"),F=o("cff9"),L=o("22c3"),R=o("3af3"),B=o("fe2b"),_=o("a6b6"),W=o("434d"),P=o("35c8"),z=o("e1b2"),G=o("ba98"),U=o("3585"),K=o("47ce"),q=o("8fe6"),H=o("8c5e");
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function Y(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}function Q(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function J(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{s(i.next(e))}catch(t){r(t)}}function l(e){try{s(i["throw"](e))}catch(t){r(t)}}function s(e){e.done?o(e.value):n(e.value).then(a,l)}s((i=i.apply(e,t||[])).next())}))}Object(i["registerMask"])('<mask>\n  <header>\n    <widget widget="designer-app-switcher" />\n    <block>\n      <widget widget="notification" />\n      <widget widget="divider" />\n      <widget widget="language" />\n      <widget widget="divider" />\n      <widget widget="user" />\n    </block>\n  </header>\n  <container>\n    <sidebar>\n      <widget widget="designer-nav-menu" height="100%" />\n    </sidebar>\n    <content>\n      <widget width="100%" flex="1" widget="UiDesigner" />\n    </content>\n  </container>\n</mask>',{moduleName:"uiDesigner",actionName:"homepage"}),Object(i["registerMask"])('<mask>\n  <container>\n    <block height="100%" width="100%">\n      <widget width="100%" widget="PageDesigner" />\n    </block>\n  </container>\n</mask>',{moduleName:"uiDesigner",model:"ui.designer.UiDesignerView",actionName:"ui_designer_界面设计器页面编辑"}),Object(i["registerMask"])('<mask>\n  <container>\n    <block height="100%" width="100%">\n      <widget width="100%" widget="UiDataChartStyleDesigner" />\n    </block>\n  </container>\n</mask>',{moduleName:"uiDesigner",model:"ui.designer.UiDesignerView",actionName:"ui_designer_界面设计器报表页面编辑"}),Object(i["registerMask"])('<mask>\n  <container>\n    <block height="100%" width="100%">\n      <widget width="100%" widget="PageHistoryList" />\n    </block>\n  </container>\n</mask>',{moduleName:"uiDesigner",model:"ui.designer.UiDesignerView",actionName:"ui_designer_界面设计器页面历史版本"}),Object(i["registerMask"])('<mask>\n  <container>\n    <block height="100%" width="100%">\n      <widget width="100%" widget="ComponentDesigner" />\n    </block>\n  </container>\n</mask>',{moduleName:"uiDesigner",model:"ui.designer.UiDesignerView",actionName:"界面设计器元件设计"});const X={currentSelectedInstance:Object(a["computed"])(()=>{}),widgetNameGroup:Object(a["computed"])(()=>new Map),widgetTypeGroup:Object(a["computed"])(()=>new Map),copyModalWidgetInstance:(e,t)=>{},copyDrawerWidgetInstance:(e,t)=>{},copyInnerPopupWidgetInstance:(e,t)=>{},onSelectCurrentInstance:()=>{},initWidgetLib:()=>new Map,switchModelWidgetLib:()=>{},removeModelWidgetLib:()=>{},PageDesignerMultiQueueEditor:new n["Z"]},Z=Symbol("PageDesignerContext"),ee=e=>{Object(a["provide"])(Z,Object.assign(Object.assign({},X),e))},te=()=>Object(a["inject"])(Z,Object.assign({},X));function oe(e,t){var o,i;if((null===e||void 0===e?void 0:e.isWidgetInstance)&&n["R"].isContainer(e).result){const r=e.parent;if(r&&n["R"].isRow(r).result){const a=r.parent;if(a&&n["R"].isContainers(a).result){const n=r.id,l=null===(o=a.children)||void 0===o?void 0:o.findIndex(e=>e.id===n);if(-1===l)return;const s=e.id,c=null===(i=r.children)||void 0===i?void 0:i.findIndex(e=>e.id===s);if(-1===c)return;t({containersInstance:a,rowInstance:r,currentRowIndex:l,currentContainerIndex:c})}}}}var ie=Object(a["defineComponent"])({name:"UiContainerOperator",inheritAttrs:!1,components:{OioIcon:r["OioIcon"]},props:{currentInstance:{type:Object,required:!0}},setup(e){const{widgetNameGroup:t}=te(),o=()=>{oe(e.currentInstance,e=>{const{containersInstance:o,rowInstance:i,currentRowIndex:r}=e,a=n["wb"].createContainerRowWidgetInstance(o,t.value),l=i.children;for(let s=0;s<l.length;s++){const e=l[s].element;n["R"].add(a,n["wb"].createContainerWidgetInstance(a,t.value,{element:{title:e.title,componentData:e.componentData}}))}n["R"].add(o,a,r)})},i=()=>{oe(e.currentInstance,e=>{const{containersInstance:o,rowInstance:i,currentRowIndex:r}=e,a=n["wb"].createContainerRowWidgetInstance(o,t.value),l=i.children;for(let s=0;s<l.length;s++){const e=l[s].element;n["R"].add(a,n["wb"].createContainerWidgetInstance(a,t.value,{element:{title:e.title,componentData:e.componentData}}))}n["R"].add(o,a,r+1)})},r=()=>{oe(e.currentInstance,e=>{const{rowInstance:o,currentContainerIndex:i}=e,r=o.children[i].element;n["R"].add(o,n["wb"].createContainerWidgetInstance(o,t.value,{element:{title:r.title,componentData:r.componentData}}),i)})},a=()=>{oe(e.currentInstance,e=>{const{rowInstance:o,currentContainerIndex:i}=e,r=o.children[i].element;n["R"].add(o,n["wb"].createContainerWidgetInstance(o,t.value,{element:{title:r.title,componentData:r.componentData}}),i+1)})};return{addTopRow:o,addBottomRow:i,addLeftCol:r,addRightCol:a}}});const ne={class:"ui-designer-container-operator"},re={class:"ui-designer-container-operator-group"},ae={class:"ui-designer-container-operator-group-title"},le={class:"ui-designer-container-operator-options"},se={class:"ui-designer-container-operator-group"},ce={class:"ui-designer-container-operator-group-title"},de={class:"ui-designer-container-operator-options"};function ue(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ne,[Object(a["createElementVNode"])("div",re,[Object(a["createElementVNode"])("div",ae,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("插入行")),1)]),Object(a["createElementVNode"])("div",le,[Object(a["createElementVNode"])("div",{class:"ui-designer-container-operator-option",onClick:t[0]||(t[0]=(...t)=>e.addTopRow&&e.addTopRow(...t))},[Object(a["createVNode"])(l,{icon:"oinone-xinxi"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("上方插入行")),1)]),Object(a["createElementVNode"])("div",{class:"ui-designer-container-operator-option",onClick:t[1]||(t[1]=(...t)=>e.addBottomRow&&e.addBottomRow(...t))},[Object(a["createVNode"])(l,{icon:"oinone-xinxi"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("下方插入行")),1)])])]),Object(a["createElementVNode"])("div",se,[Object(a["createElementVNode"])("div",ce,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("插入列")),1)]),Object(a["createElementVNode"])("div",de,[Object(a["createElementVNode"])("div",{class:"ui-designer-container-operator-option",onClick:t[2]||(t[2]=(...t)=>e.addLeftCol&&e.addLeftCol(...t))},[Object(a["createVNode"])(l,{icon:"oinone-xinxi"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("左侧插入列")),1)]),Object(a["createElementVNode"])("div",{class:"ui-designer-container-operator-option",onClick:t[3]||(t[3]=(...t)=>e.addRightCol&&e.addRightCol(...t))},[Object(a["createVNode"])(l,{icon:"oinone-xinxi"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("右侧插入列")),1)])])])])}ie.render=ue,ie.__file="src/components/container-operator/UiContainerOperator.vue";let pe=class extends i["BaseElementWidget"]{initialize(e){return super.initialize(e),this.setComponent(ie),this}};var be,ge;Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",n["zb"])],pe.prototype,"currentInstance",void 0),pe=Y([i["SPI"].ClassFactory(i["BaseElementWidget"].Token({widget:"UiContainerOperator"}))],pe),function(e){e["UI_GUIDE_PAGE_DESIGNER"]="UI_GUIDE_PAGE_DESIGNER",e["UI_GUIDE_PAGE_LIST"]="UI_GUIDE_PAGE_LIST"}(be||(be={})),function(e){e["IS_SHOW_MASTER_MASK"]="IS_SHOW_MASTER_MASK",e["WIDGET_LIB"]="WIDGET_LIB"}(ge||(ge={}));var ve=Object(a["defineComponent"])({name:"UiGuidePopover",components:{},props:{order:{type:Boolean,default:!1},guideArea:{type:String},guideKey:{type:String},visible:{type:Boolean,default:!0},tips:{type:String},placement:{type:String,default:"top"},overlayClassName:{type:String},overlayStyle:{type:Object},iKnowStyle:{type:Object},tipsStyle:{type:Object},active:{type:Boolean},bgImageUrl:{type:String},bgWidth:{type:String},bgHeight:{type:String},getPopupContainer:{type:Function}},setup(e,t){const o=l["db"].getItem(e.guideArea)||[],i=o.includes(e.guideKey),n=Object(a["ref"])(!i),r=e=>{n.value=e},s=t=>{if(!i){const t=l["db"].getItem(e.guideArea)||[],o=t.includes(e.guideKey);o||(t.push(e.guideKey),l["db"].setItem(e.guideArea,t))}r(!1)},c=Object(a["computed"])(()=>({background:`url(${e.bgImageUrl}) no-repeat`,"background-size":"100% 100%",width:""+e.bgWidth,minHeight:""+e.bgHeight})),d=Object(a["computed"])(()=>Object.assign(Object.assign({},e.tipsStyle),c.value)),u=Object(a["computed"])(()=>Object.assign(Object.assign({},e.iKnowStyle||{}),{background:"#fff",height:"30px",width:"88px",display:"flex","align-items":"center","justify-content":"center",borderRadius:"15px"}));return{guideVisible:n,bgStyle:c,mainStyle:d,iKnowStyle:u,changeVisible:r,iKnowFun:s}}});const me={class:"ui-guide-popover"},ye=["onClick"],he={class:"tips"};function fe(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-popover");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{getPopupContainer:e.getPopupContainer,overlayClassName:"ui-guide-popover-overlay "+e.overlayClassName,placement:e.placement,visible:e.guideVisible},{content:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",me,[Object(a["createCommentVNode"])('        <ui-guide-cycle :active="active" />'),Object(a["createElementVNode"])("div",{style:Object(a["normalizeStyle"])(e.mainStyle),class:"main",onClick:Object(a["withModifiers"])(e=>null,["stop"])},[Object(a["createElementVNode"])("div",he,Object(a["toDisplayString"])(e.$translate(e.tips)),1),Object(a["createElementVNode"])("div",{style:Object(a["normalizeStyle"])(e.iKnowStyle),class:"i-know",onClick:t[0]||(t[0]=Object(a["withModifiers"])((...t)=>e.iKnowFun&&e.iKnowFun(...t),["stop","prevent"]))},Object(a["toDisplayString"])(e.$translate("我知道了")),5)],12,ye)])]),_:1},8,["getPopupContainer","overlayClassName","placement","visible"])}ve.render=fe,ve.__file="src/components/popover/UiGuidePopover.vue";var Oe=Object(a["defineComponent"])({components:{},props:["currentView"],emits:[l["S"].COPY,l["S"].EDIT],setup(e,t){const o=i["SPI"].RawInstantiate(l["Q"]),n=Object(a["ref"])(!1),r=null===o||void 0===o?void 0:o.getViewMoreAction(),s=o=>{if(!e.currentView.designerViewId)return;if(o.key===l["S"].EDIT&&e.currentView.sys)return;n.value=!1;const i=o.key;t.emit(i)};return{ViewMoreActionEnum:l["S"],visible:n,handleMenuClick:s,createViewMethods:r}}});const we={class:"ui-view-more-actions"},je={key:0,class:"active"},ke=Object(a["createElementVNode"])("div",{class:"action"},[Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-gengduo1"})],-1);function Ce(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-menu-item"),s=Object(a["resolveComponent"])("a-menu"),c=Object(a["resolveComponent"])("a-dropdown");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{visible:e.visible,"onUpdate:visible":t[1]||(t[1]=t=>e.visible=t)},{overlay:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{onClick:e.handleMenuClick},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.createViewMethods,o=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:o.key,value:e.$translate(o.desc)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",we,[!1===e.currentView.sys||o.key===e.ViewMoreActionEnum.COPY&&e.currentView.designerViewId?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",je,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])("d-iconfont "+o.icon)},null,2),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate(o.title)),1)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:1,class:"disabled",onClick:t[0]||(t[0]=Object(a["withModifiers"])(()=>{},["stop"]))},[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])("d-iconfont "+o.icon)},null,2),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate(o.title)),1)]))])]),_:2},1032,["value"]))),128))]),_:1},8,["onClick"])]),default:Object(a["withCtx"])(()=>[ke]),_:1},8,["visible"])}Oe.render=Ce,Oe.__file="src/components/popover/ViewMoreActionPopover.vue";var De=Object(a["defineComponent"])({name:"BorderSelect",inheritAttrs:!1,props:Object.assign(Object.assign({},i["OioCommonProps"]),{value:{type:Array},options:{type:Array,default:()=>[]}}),setup(e){const t=Object(a["ref"])([]),o=Object(a["computed"])(()=>t.value.some(e=>"TOP"===e)),i=Object(a["computed"])(()=>t.value.some(e=>"RIGHT"===e)),n=Object(a["computed"])(()=>t.value.some(e=>"BOTTOM"===e)),r=Object(a["computed"])(()=>t.value.some(e=>"LEFT"===e)),l=o=>{var i;const n=t.value.findIndex(e=>e===o);-1===n?t.value.push(o):t.value.splice(n,1),null===(i=e.change)||void 0===i||i.call(e,t.value)};return Object(a["watch"])(()=>e.value,e=>{t.value=e||[]},{immediate:!0,deep:!0}),{selectedOptions:t,isTopSelected:o,isRightSelected:i,isBottomSelected:n,isLeftSelected:r,onClickOption:l}}});const Te={class:"border-select"},$e={class:"border-select-options-middle"};function Ee(e,t,o,i,n,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Te,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-top"]),onClick:t[0]||(t[0]=t=>e.onClickOption("TOP"))}),Object(a["createElementVNode"])("div",$e,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-left"]),onClick:t[1]||(t[1]=t=>e.onClickOption("LEFT"))}),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-right"]),onClick:t[2]||(t[2]=t=>e.onClickOption("RIGHT"))})]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-bottom"]),onClick:t[3]||(t[3]=t=>e.onClickOption("BOTTOM"))}),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-status",e.isTopSelected&&"border-select-top-status",e.isRightSelected&&"border-select-right-status",e.isBottomSelected&&"border-select-bottom-status",e.isLeftSelected&&"border-select-left-status"])},null,2)])}De.render=Ee,De.__file="src/field/border-select/BorderSelect.vue";let Se=class extends i["FormMultiEnumFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(De),this}};Se=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Enum,widget:"BorderSelect",multi:!0}))],Se);class Ne extends i["FormEnumFieldWidget"]{constructor(){super(...arguments),this.customOptions=[]}getAvailableOptions(){const e=super.getAvailableOptions(),t=new Map;if(e)for(let i of e)t.set(i.name,i);const o=[];if(this.customOptions)for(let i of this.customOptions){const e=t.get(i.name);e&&o.push(e)}return o}}Y([i["Widget"].Reactive(),Q("design:type",Array)],Ne.prototype,"customOptions",void 0);let Ve=class extends Ne{mounted(){super.mounted(),this.designerTtypeOptions.subscribe(e=>{const t=this.field.options||[];Object(s["a"])(e)?this.customOptions=t:this.customOptions=t.filter(t=>e.includes(t.name))})}change(e){super.change(e),n["Hb"].setValue(n["ac"],e)}blur(){this.executeValidator().catch(()=>{})}};Y([i["Widget"].BehaviorSubContext(n["bc"],[]),Q("design:type",Object)],Ve.prototype,"designerTtypeOptions",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Ve.prototype,"change",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Ve.prototype,"blur",null),Ve=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Enum,widget:"DesignerTtypeSelect"}))],Ve);let xe=class extends i["FormM2OSelectFieldWidget"]{mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){this.isInitOptions=!0,e.mounted.call(this)}))}innerQueryPage(e,t,o,i,n={}){const r=Object.create(null,{innerQueryPage:{get:()=>super.innerQueryPage}});var a,l;return J(this,void 0,void 0,(function*(){const s=(null===(l=null===(a=this.currentInstance)||void 0===a?void 0:a.currentWidget)||void 0===l?void 0:l.fieldRelModels)||[];if(s.length){const e=`model =in= ('${s.join("', '")}')`,{condition:o}=t;let i;o&&(i=Object(c["a"])(o)?o:o.toString()),i=i?`(${i}) and (${e})`:e,t.condition=i}return r.innerQueryPage.call(this,e,t,o,i,n)}))}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],xe.prototype,"currentInstance",void 0),xe=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerReferencesSelect"}))],xe);let Ie=class extends Ne{mounted(){super.mounted(),this.designerSpanOptions.subscribe(e=>{const t=this.field.options||[];Object(s["a"])(e)?this.customOptions=[]:this.customOptions=t.filter(t=>e.includes(t.name))})}};Y([i["Widget"].BehaviorSubContext(n["Zb"],[]),Q("design:type",Object)],Ie.prototype,"designerSpanOptions",void 0),Ie=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Enum,widget:"DesignerSpanSelect",multi:!1}))],Ie);let Me=class extends Ne{mounted(){super.mounted(),this.designerContextTypeOptions.subscribe(e=>{var t;if(this.customOptions=this.field.options||[],e.length&&(this.customOptions=this.customOptions.filter(t=>e.includes(t.name))),this.autocorrection){const e=-1===(null===(t=this.customOptions)||void 0===t?void 0:t.findIndex(e=>e.name===this.value));e&&this.setValue(void 0)}})}};Y([i["Widget"].BehaviorSubContext(n["Ub"],[]),Q("design:type",Object)],Me.prototype,"designerContextTypeOptions",void 0),Me=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].Enum,widget:"DesignerContextTypeSelect"}))],Me);var Ae=Object(a["defineComponent"])({components:{OioIcon:i["OioIcon"]},props:{item:{type:Object,required:!0},index:{type:Number,required:!0},fieldOptions:{type:Object,required:!0},selectPlaceholder:{type:String,default:"排序字段"}},emits:["change","delete"],setup(e,{emit:t}){const o=Object(a["computed"])(()=>{const t=e.item.field;if(t)return t.displayName}),n=Object(a["computed"])(()=>e.fieldOptions.map(e=>({label:e.displayName,value:e.name}))),r=(e,t)=>t.label.toLowerCase().indexOf(e.toLowerCase())>=0,l=[{label:Object(i["translateValueByKey"])("升序"),value:i["EDirection"].ASC},{label:Object(i["translateValueByKey"])("降序"),value:i["EDirection"].DESC}],s=o=>{t("change",{item:e.item,index:e.index,field:o,order:e.item.order})},c=o=>{var i;t("change",{item:e.item,index:e.index,field:null===(i=e.item.field)||void 0===i?void 0:i.name,order:o})},d=()=>{t("delete",e.index)};return{sortedFieldValue:o,fieldOptions:n,filterOption:r,orderOptions:l,onChangeField:s,onChangeOrder:c,onDelete:d}}});const Fe={class:"group-list-component-item",id:"default-sorted-field"},Le={class:"group-list-component"};function Re(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-select");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Fe,[Object(a["createElementVNode"])("div",Le,[Object(a["createVNode"])(l,{class:"field-sort-move-handler",icon:"oinone-move-handler",size:"28",style:{transform:"rotate(90deg)"}}),Object(a["createVNode"])(s,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",placeholder:e.$translate(e.selectPlaceholder),"show-search":"",value:e.sortedFieldValue,options:e.fieldOptions,"filter-option":e.filterOption,onChange:e.onChangeField},null,8,["placeholder","value","options","filter-option","onChange"]),Object(a["createVNode"])(s,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:e.item.order,options:e.orderOptions,onChange:e.onChangeOrder},null,8,["value","options","onChange"]),Object(a["createVNode"])(l,{icon:"oinone-shanchu",size:"var(--oio-font-size)",color:"var(--oio-primary-color)",onClick:e.onDelete},null,8,["onClick"])])])}Ae.render=Re,Ae.__file="src/field/sorted-field-select/group-list/group-item.vue";var Be=Object(a["defineComponent"])({components:{draggable:y(),GroupItem:Ae},props:{fieldOptions:{type:Object},selectedValues:{type:Object},selectPlaceholder:{type:String},onChange:{type:Function},onDelete:{type:Function}},emits:["change","delete"],setup(e){const t=Object(a["computed"])(()=>{var t;return null===(t=e.fieldOptions)||void 0===t?void 0:t.filter(t=>{var o;return!(null===(o=e.selectedValues)||void 0===o?void 0:o.some(e=>{var o;return(null===(o=e.field)||void 0===o?void 0:o.name)===t.name}))})});return{remainSortedFields:t}}});const _e={class:"group-list-component"};function We(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("group-item"),s=Object(a["resolveComponent"])("draggable");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_e,[Object(a["createVNode"])(s,{tag:"div",class:"group-list-component-draggable",list:e.selectedValues,"item-key":"uniqueKey",animation:200,handle:".field-sort-move-handler"},{item:Object(a["withCtx"])(({element:t,index:o})=>[Object(a["createVNode"])(l,{item:t,index:o,"select-placeholder":e.selectPlaceholder,"field-options":e.remainSortedFields,onChange:e.onChange,onDelete:e.onDelete},null,8,["item","index","select-placeholder","field-options","onChange","onDelete"])]),_:1},8,["list"])])}Be.render=We,Be.__file="src/field/sorted-field-select/group-list/group-list.vue";var Pe={name:"DesignerSortedFieldsSelect",components:{GroupList:Be,OioIcon:i["OioIcon"]},props:{actionLabel:{type:String,default:"添加排序字段"},fieldOptions:{type:Array,required:!0},selectedValues:{type:Array,required:!0},selectPlaceholder:{type:String},onAddField:{type:Function},onUpdateField:{type:Function},onDeleteField:{type:Function}}};const ze={class:"field-sort-container"};function Ge(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("group-list"),s=Object(a["resolveComponent"])("oio-icon"),c=Object(a["resolveComponent"])("a-button");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ze,[Object(a["createVNode"])(l,{"field-options":o.fieldOptions,"selected-values":o.selectedValues,"select-placeholder":o.selectPlaceholder,onChange:o.onUpdateField,onDelete:o.onDeleteField},null,8,["field-options","selected-values","select-placeholder","onChange","onDelete"]),Object(a["createVNode"])(c,{class:"add-new",type:"link",onClick:o.onAddField},{icon:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{icon:"oinone-add-circle",size:"var(--oio-font-size-lg)",color:"var(--oio-primary-color)"})]),default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate(o.actionLabel)),1)]),_:1},8,["onClick"])])}Pe.render=Ge,Pe.__file="src/field/sorted-field-select/DesignerSortedFieldsSelect.vue";let Ue=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.selectedValues=[],this.fieldOptions=[]}initialize(e){return super.initialize(e),this.setComponent(Pe),this}get actionLabel(){return this.getDsl().actionLabel}get selectPlaceholder(){return this.getDsl().selectPlaceholder}watchInvisible(e){!1===e&&(this.selectedValues=[],this.change(null))}onAddField(){this.selectedValues.push({uniqueKey:Object(i["uniqueKeyGenerator"])(),order:i["EDirection"].ASC})}onUpdateField({item:e,index:t,field:o,order:i}){this.selectedValues.splice(t,1,Object.assign(Object.assign({},e),{field:this.fieldOptions.find(e=>e.name===o),order:i})),this.$$submit()}onDeleteField(e){this.selectedValues.splice(e,1),this.$$submit()}$$submit(){const e=this.selectedValues.map(e=>{const{field:t,order:o}=e;return t?`${t.name} ${o.toLowerCase()}`:""}).filter(e=>!!e).join(",");e?this.change(e):this.change(null)}initFieldOptions(){return J(this,void 0,void 0,(function*(){const e=this.currentInstance.element.model,t=yield i["ModelCache"].get(e);return t?t.modelFields.filter(e=>Object(i["isAllowSortable"])(e)).map(e=>({name:e.data,displayName:e.label||e.displayName||e.data})):[]}))}backfillSelectedValues(){const{value:e}=this;return e?i["StringHelper"].convertArray(e).map(e=>{const[t,o]=Object(i["getSortFieldDirection"])(e);return{uniqueKey:t,field:this.fieldOptions.find(e=>e.name===t)||{name:t,displayName:t},order:o}}):[]}mounted(){return J(this,void 0,void 0,(function*(){this.fieldOptions=yield this.initFieldOptions(),this.selectedValues=this.backfillSelectedValues()}))}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",n["zb"])],Ue.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],Ue.prototype,"selectedValues",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],Ue.prototype,"fieldOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ue.prototype,"actionLabel",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ue.prototype,"selectPlaceholder",null),Y([i["Widget"].Watch("invisible"),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",void 0)],Ue.prototype,"watchInvisible",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Ue.prototype,"onAddField",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Ue.prototype,"onUpdateField",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number]),Q("design:returntype",void 0)],Ue.prototype,"onDeleteField",null),Ue=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].String,widget:"DesignerSortedFieldsSelect"}))],Ue);let Ke=class extends Ue{initFieldOptions(){var e,t,o;return J(this,void 0,void 0,(function*(){const n=this.currentInstance.element.model,r=yield i["ModelCache"].get(n);if(!r)return[];const a=new Map(r.modelFields.map(e=>[e.data,e])),l=null===(t=null===(e=this.currentInstance)||void 0===e?void 0:e.root)||void 0===t?void 0:t.fieldCollection,s=[];if(l){const e=l.values();let t=e.next();while(!t.done){const n=null===(o=t.value.element)||void 0===o?void 0:o.widgetData;if(n){const e=a.get(n.name);e&&Object(i["isAllowGrouping"])(e)&&s.push({name:n.name,displayName:n.displayName||n.name})}t=e.next()}}return s}))}};Ke=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].String,widget:"DesignerGroupFieldsSelect"}))],Ke);let qe=class extends i["FormM2OSelectFieldWidget"]{get relationFieldKey(){return"name"}fillOptions(e,t=!0){return J(this,void 0,void 0,(function*(){}))}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}filterOptions(e){return!0}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t,o,n;return J(this,void 0,void 0,(function*(){yield e.mounted.call(this);const r=null===(o=null===(t=this.currentInstance)||void 0===t?void 0:t.root)||void 0===o?void 0:o.fieldCollection;if(r){const e=r.values(),t=[];let o=e.next();while(!o.done){const r=i["CastHelper"].cast(null===(n=o.value.element)||void 0===n?void 0:n.widgetData);if(r&&this.filterOptions(r)){const e=Object.assign(Object.assign({},r),{label:r.displayName||r.name,value:r.name});t.push(e)}o=e.next()}this.dataList=t,this.options=t;const{dataList:a,value:l}=this;if(l){const e=a.find(e=>e[this.relationFieldKey]===l.value);e||this.setValue(null)}}}))}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],qe.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],qe.prototype,"relationFieldKey",null),qe=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerFieldSelect"}))],qe);let He=class extends qe{get includes(){var e;return null===(e=i["ResolveUtil"].toArray(this.getDsl().includes))||void 0===e?void 0:e.map(e=>e.toUpperCase())}filterOptions(e){const{includes:t}=this;if(null===t||void 0===t?void 0:t.length){const o=Object(i["getRealTtype"])(e);return t.some(e=>e===o)}return Object(i["isRelationField"])(e)}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],He.prototype,"includes",null),He=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerRelationFieldSelect"}))],He);class Ye extends i["FormFieldWidget"]{constructor(){super(...arguments),this.departmentService=i["SPI"].RawInstantiate(i["PamirsDepartmentServiceToken"]),this.employeeService=i["SPI"].RawInstantiate(i["PamirsEmployeeServiceToken"]),this.roleService=i["SPI"].RawInstantiate(i["AuthRoleServiceToken"]),this.options=[],this.initValue={}}get dynamicParameterOptions(){return[]}fillOptions(e,t){return J(this,void 0,void 0,(function*(){let o=[];t.length>0&&(o=yield Promise.all(t).then(e=>e.reduce((e,t)=>[...e,...t])));for(const t of this.dynamicParameterOptions)e[t.key]&&o.push(Object.assign(Object.assign({},t),{value:t.key,data:!1}));return o}))}loadEmployeeItems(e,t,o){return J(this,void 0,void 0,(function*(){if(t)return o?t.map(e=>Object.assign(Object.assign({},e),{key:`${o}${e.key}`})):t;if(this.initValue.employeeItems)return this.initValue.employeeItems;const n={};o&&(n.computeKey=e=>`${o}${e.code}`);const r=this.employeeService.convertListData(yield this.employeeService.queryListByWrapper({rsql:i["RSQLCondition"].wrapper().in("code",e).toString()}),n);return this.initValue.employeeItems=r,r}))}loadDepartmentItems(e,t,o){return J(this,void 0,void 0,(function*(){const n={};if(o&&(n.computeKey=e=>`${o}${e.code}`),t)return this.departmentService.convertListData(t.map(e=>e.value),n);if(this.initValue.departmentItems)return this.initValue.departmentItems;const r=this.departmentService.convertListData(yield this.departmentService.queryListByWrapper({rsql:i["RSQLCondition"].wrapper().in("code",e).toString()}),n);return this.initValue.departmentItems=r,r}))}loadRoleItems(e,t,o){return J(this,void 0,void 0,(function*(){if(t)return o?t.map(e=>Object.assign(Object.assign({},e),{key:`${o}${e.key}`})):t;if(this.initValue.roleItems)return this.initValue.roleItems;const n={};o&&(n.computeKey=e=>`${o}${e.code}`);const r=this.roleService.convertListData(yield this.roleService.queryListByWrapper({rsql:i["RSQLCondition"].wrapper().in("code",e).toString()}),n);return this.initValue.roleItems=r,r}))}}function Qe({$translate:e,state:t,onUpdateState:o,items:i,options:n}){return Object(a["createVNode"])("div",{class:"oio-list"},i.map(i=>{const{key:l,label:s,mode:c}=i,d=c||(null===n||void 0===n?void 0:n.mode)||r["SelectMode"].multiple;let u;return u=d===r["SelectMode"].single?Object(a["createVNode"])(h["a"],{class:"oio-radio",checked:t[l],"onUpdate:checked":e=>o(l,e)}):Object(a["createVNode"])(r["OioCheckbox"],{checked:t[l],"onUpdate:checked":e=>o(l,e)}),Object(a["createVNode"])("div",{class:"oio-list-item"},[Object(a["createVNode"])("div",{class:"oio-list-item-label"},e(s)),u])}))}Y([i["Widget"].Reactive(),Q("design:type",Array)],Ye.prototype,"options",void 0);const Je=[{key:"userCompanyDept",label:"当前用户所在公司的所有部门"},{key:"userDept",label:"当前用户所处部门"},{key:"userDeptAndChildren",label:"当前用户所处部门及下级部门"}];var Xe=Object(a["defineComponent"])({name:"UiDepartmentModal",components:{OioInput:r["OioInput"],OioModal:r["OioModal"],OioTab:r["OioTab"],OioTabs:r["OioTabs"],OrganizationalStructureTree:i["OrganizationalStructureTree"]},props:Object.assign(Object.assign({},r["OioModalProps"]),{value:{type:Object},selected:{type:Array}}),emits:["change"],setup(e,{emit:t}){const o=Object(a["reactive"])({init:!1,storage:{},loading:!1,departmentCodes:[],departmentNodes:[],userCompanyDept:!1,userDept:!1,userDeptAndChildren:!1}),i=Object(a["computed"])(()=>{var t;return(null===(t=e.selected)||void 0===t?void 0:t.map(e=>e.key))||[]}),n=Object(a["computed"])(()=>{const e=[];if(o.init){for(const t of o.departmentNodes){if(!t.isLeaf)continue;const{key:o,title:i,value:n}=t;e.push({key:o,value:o,label:i||"-",data:n})}for(const t of Je)o[t.key]&&e.push(Object.assign(Object.assign({},t),{value:t.key,data:!1}))}return e}),r=()=>{const e=o.departmentNodes.filter(e=>e.isLeaf);return t("change",{departmentCodes:e.map(e=>e.key),departmentNodes:e,userCompanyDept:o.userCompanyDept,userDept:o.userDept,userDeptAndChildren:o.userDeptAndChildren}),!0},l=(e,t)=>{o[e]=t,Je.find(t=>t.key===e)&&Je.filter(t=>t.key!==e).forEach(e=>{o[e.key]=!1})},s=e=>{const t=[],i=[],n={userCompanyDept:!1,userDept:!1,userDeptAndChildren:!1};for(const r of e){const{key:e}=r;if(n.hasOwnProperty(e))n[e]=!0;else if(t.push(e),o.init){const t=o.departmentNodes.find(t=>t.key===e);t&&i.push(t)}}o.departmentCodes=t,o.departmentNodes=i,o.userCompanyDept=n.userCompanyDept,o.userDept=n.userDept,o.userDeptAndChildren=n.userDeptAndChildren},c=t=>{var i,n,r;o.init=!0,o.storage=t.storage,o.departmentCodes=t.checkedKeys,o.departmentNodes=t.checkedNodes,o.userCompanyDept=(null===(i=e.value)||void 0===i?void 0:i.userCompanyDept)||!1,o.userDept=(null===(n=e.value)||void 0===n?void 0:n.userDept)||!1,o.userDeptAndChildren=(null===(r=e.value)||void 0===r?void 0:r.userDeptAndChildren)||!1};return Object(a["watch"])(()=>e.visible,t=>{if(t){o.init=!1;const t=e.selected||[];s(t)}}),{state:o,initCheckedKeys:i,selectedValues:n,enterCallback:r,onUpdateState:l,onChange:s,onInit:c}},render(){const{$translate:e,state:t,initCheckedKeys:o,selectedValues:n,enterCallback:l,onUpdateState:s,onChange:c,onInit:d}=this;return Object(a["createVNode"])(r["OioModal"],Object.assign(Object.assign({title:"选择部门",width:"720px"},r["PropRecordHelper"].convert(r["OioModalProps"],r["CastHelper"].cast(this))),{destroyOnClose:!0,loading:t.loading,enterCallback:l}),{default:()=>[Object(a["createVNode"])("div",{class:"designer-department-modal-content"},[Object(a["createVNode"])(i["BaseSelect"],{mode:r["SelectMode"].multiple,value:n,allowClear:!0,placeholder:e("选择部门"),allowArrow:!1,allowSearch:!1,notFoundContent:null,change:c}),Object(a["createVNode"])(r["OioInputSearch"],{value:t.searchValue,placeholder:e("搜索"),allowClear:!0,"onUpdate:value":e=>s("searchValue",e)}),Object(a["createVNode"])(r["OioTabs"],{},{default:()=>[Object(a["createVNode"])(r["OioTab"],{key:"1",tab:e("组织架构")},{default:()=>Object(a["createVNode"])("div",{class:"designer-department-selected-panel"},[Object(a["createVNode"])(i["OrganizationalStructureTree"],{searchValue:t.searchValue,selectMode:r["SelectMode"].multiple,showCheckedAll:!0,loading:t.loading,usingLoading:!1,autoInit:!0,initCheckedKeys:o,checkedKeys:t.departmentCodes,"onUpdate:loading":e=>s("loading",e),onInit:d,onChange:({nodes:e,checkedKeys:t})=>{s("departmentCodes",t),s("departmentNodes",e)}})])}),Object(a["createVNode"])(r["OioTab"],{key:"2",tab:e("动态参数")},{default:()=>Object(a["createVNode"])("div",{class:"designer-dynamic-parameters-selected-panel"},[Qe({$translate:e,state:t,onUpdateState:s,items:Je,options:{mode:r["SelectMode"].single}})])})]})])]})}});Xe.__file="src/field/filter-select/department/UiDepartmentModal.vue";var Ze=Object(a["defineComponent"])({name:"UiDepartmentFilter",components:{DefaultSelect:i["DefaultSelect"],UiDepartmentModal:Xe},inheritAttrs:!1,props:Object.assign(Object.assign({},i["OioCommonProps"]),{placeholder:{type:String},value:{type:Object},options:{type:Array},selectChange:{type:Function}}),setup(e){const t=Object(a["ref"])(!1),o=Object(a["computed"])(()=>{var t;return null===(t=e.options)||void 0===t?void 0:t.map(e=>{const{key:t}=e;return Je.find(e=>e.key===t)?e:Object.assign(Object.assign({},e),{key:`${i["OrganizationalStructureType"].department}-${t}`})})}),n=e=>{t.value=e},r=()=>{t.value=!0},l=t=>{var o;null===(o=e.selectChange)||void 0===o||o.call(e,t.map(e=>{const{key:t}=e;return t.startsWith(i["OrganizationalStructureType"].department+"-")?Object.assign(Object.assign({},e),{key:e.key.substring(i["OrganizationalStructureType"].department.length+1)}):e}))},s=t=>{var o,n;null!=t&&(t=Object.assign(Object.assign({},t),{departmentCodes:t.departmentCodes.map(e=>e.substring(i["OrganizationalStructureType"].department.length+1))})),null===(o=e.change)||void 0===o||o.call(e,t),null===(n=e.blur)||void 0===n||n.call(e)};return{visible:t,options:o,onUpdateVisible:n,onShowModal:r,onSelectChange:l,onChange:s}},render(){const{$attrs:e,value:t,options:o,placeholder:n,visible:l,onUpdateVisible:s,onShowModal:c,onSelectChange:d,onChange:u}=this,p=["oio-department-select"];return Object(a["createVNode"])("div",i["PropRecordHelper"].collectionBasicProps(e,p),[Object(a["createVNode"])(i["BaseSelect"],{mode:i["SelectMode"].multiple,value:o,allowClear:!0,placeholder:n,allowArrow:!1,allowSearch:!1,notFoundContent:null,change:d},{suffix:()=>Object(a["createVNode"])(r["OioButton"],{icon:"oinone-apartment-outlined",onClick:c})}),Object(a["createVNode"])(Xe,{mode:i["SelectMode"].multiple,selected:o,value:t,visible:l,"onUpdate:visible":s,onChange:u})])}});Ze.__file="src/field/filter-select/department/UiDepartmentFilter.vue";let et=class extends Ye{get dynamicParameterOptions(){return Je}initialize(e){return super.initialize(e),this.setComponent(Ze),this}change(e){if(null==e)super.change(e);else{const t=Object.assign({},e);delete t.departmentNodes,super.change(t)}this.reloadOptions(e)}selectChange(e){const t=[],o={userCompanyDept:!1,userDept:!1,userDeptAndChildren:!1};for(const i of e){const{key:e}=i;o.hasOwnProperty(e)?o[e]=!0:t.push(e)}this.initValue={},this.change(Object.assign({departmentCodes:t},o))}mounted(){return J(this,void 0,void 0,(function*(){yield this.reloadOptions(this.value)}))}reloadOptions(e){return J(this,void 0,void 0,(function*(){if(!e)return void(this.options=[]);const{departmentCodes:t,departmentNodes:o}=e,i=[];t.length>0&&i.push(this.loadDepartmentItems(t,o)),this.options=yield this.fillOptions(e,i)}))}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],et.prototype,"selectChange",null),et=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"UiDepartmentFilterWidget"}))],et);const tt=[{key:"userEmployee",label:"当前用户所绑定员工"},{key:"userDept",label:"当前用户所属部门中的员工"},{key:"userDeptAndChildren",label:"当前用户所属部门及下属部门中的员工"}],ot="emp-",it=i["OrganizationalStructureType"].department+"-",nt="role-";var rt=Object(a["defineComponent"])({name:"UiEmployeeModal",components:{OioInput:r["OioInput"],OioModal:r["OioModal"],OioTab:r["OioTab"],OioTabs:r["OioTabs"],OrganizationalStructureTree:i["OrganizationalStructureTree"]},props:Object.assign(Object.assign({},r["OioModalProps"]),{value:{type:Object},selected:{type:Array}}),emits:["change"],setup(e,{emit:t}){const o=Object(a["ref"])(),i=Object(a["reactive"])({initEmp:!1,initDept:!1,initRole:!1,storage:{},loading:!1,employeeCodes:[],employeeItems:[],departmentCodes:[],departmentNodes:[],roleCodes:[],roleItems:[],userEmployee:!1,userDept:!1,userDeptAndChildren:!1,departmentSelectedKeys:[]}),n=(e,t,o)=>{for(const i of t){const{key:t,label:n,value:r,data:a}=i;e.push({key:`${o||""}${t}`,value:r,label:n,data:a})}},l=(e,t,o)=>{for(const i of t){if(!i.isLeaf)continue;const{title:t,value:n}=i,r=`${o||""}${i.key}`;e.push({key:r,value:r,label:t||"-",data:n})}},s=Object(a["computed"])(()=>{var t,o,r;const a=[];i.initEmp?n(a,i.employeeItems,ot):a.push(...(null===(t=e.selected)||void 0===t?void 0:t.filter(e=>e.key.startsWith(ot)&&i.employeeCodes.includes(e.key.substring(ot.length))))||[]),i.initDept?l(a,i.departmentNodes,it):a.push(...(null===(o=e.selected)||void 0===o?void 0:o.filter(e=>e.key.startsWith(it)&&i.departmentCodes.includes(e.key)))||[]),i.initRole?n(a,i.roleItems,nt):a.push(...(null===(r=e.selected)||void 0===r?void 0:r.filter(e=>e.key.startsWith(nt)&&i.roleCodes.includes(e.key.substring(nt.length))))||[]);for(const e of tt)i[e.key]&&a.push(Object.assign(Object.assign({},e),{value:e.key,data:!1}));return a}),c=Object(a["computed"])(()=>{var t;return(null===(t=e.selected)||void 0===t?void 0:t.filter(e=>e.key.startsWith(ot)).map(e=>e.key.substring(ot.length)))||[]}),d=()=>{let e,o,n;return i.initEmp&&(e=i.employeeItems),i.initDept&&(o=i.departmentNodes.filter(e=>e.isLeaf)),i.initRole&&(n=i.roleItems),t("change",{employeeCodes:i.employeeCodes,employeeItems:e,departmentCodes:i.departmentCodes,departmentNodes:o,roleCodes:i.roleCodes,roleItems:n,userEmployee:i.userEmployee,userDept:i.userDept,userDeptAndChildren:i.userDeptAndChildren}),!0},u=(e,t)=>{i[e]=t,tt.find(t=>t.key===e)&&tt.filter(t=>t.key!==e).forEach(e=>{i[e.key]=!1})},p=e=>{const t=[],o=[],n=[],r=[],a=[],l=[],s={userEmployee:!1,userDept:!1,userDeptAndChildren:!1};for(const c of e){const{key:e}=c;if(e.startsWith(ot)){const n=e.substring(ot.length);if(t.push(n),i.initEmp){const e=i.employeeItems.find(e=>e.key===n);e&&o.push(e)}}else if(e.startsWith(it)){const t=e;if(n.push(t),i.initDept){const e=i.departmentNodes.find(e=>e.key===t);e&&r.push(e)}}else if(e.startsWith(nt)){const t=e.substring(nt.length);if(a.push(t),i.initRole){const e=i.roleItems.find(e=>e.key===t);e&&l.push(e)}}else s.hasOwnProperty(e)&&(s[e]=!0)}i.employeeCodes=t,i.employeeItems=o,i.departmentCodes=n,i.departmentNodes=r,i.roleCodes=a,i.roleItems=l,i.userEmployee=s.userEmployee,i.userDept=s.userDept,i.userDeptAndChildren=s.userDeptAndChildren},b=t=>{var o,n,r;i.initEmp=!0,i.storage=t.storage,i.employeeCodes=t.checkedKeys,i.employeeItems=t.checkedItems;const a=[],l=[];for(const i of e.selected||[]){const{key:e}=i;e.startsWith(it)?a.push(e):e.startsWith(nt)&&l.push(e.substring(nt.length))}i.departmentCodes=a,i.roleCodes=l,i.userEmployee=(null===(o=e.value)||void 0===o?void 0:o.userEmployee)||!1,i.userDept=(null===(n=e.value)||void 0===n?void 0:n.userDept)||!1,i.userDeptAndChildren=(null===(r=e.value)||void 0===r?void 0:r.userDeptAndChildren)||!1},g=e=>{i.initDept=!0,i.departmentCodes=e.checkedKeys,i.departmentNodes=e.checkedNodes},v=e=>{i.initRole=!0,i.roleCodes=e.checkedKeys,i.roleItems=e.checkedItems},m=({selectedKeys:e})=>J(this,void 0,void 0,(function*(){if(e.length){const t=e[0].substring(it.length),o=r["RSQLCondition"].wrapper().eq("departmentList.code",t).toString();yield f(o)}else yield h()})),y=()=>{m({selectedKeys:[]}),i.departmentSelectedKeys=[]},h=e=>J(this,void 0,void 0,(function*(){i.loading=!0;try{return yield o.value.init({rsql:e,checkedKeys:i.employeeCodes})}finally{i.loading=!1}})),f=e=>J(this,void 0,void 0,(function*(){i.loading=!0;try{return yield o.value.search({rsql:e,checkedKeys:i.employeeCodes})}finally{i.loading=!1}}));return Object(a["watch"])(()=>e.visible,t=>{if(t){i.initEmp=!1,i.initDept=!1,i.initRole=!1;const t=e.selected||[];p(t)}}),{employeeListRef:o,state:i,selectedValues:s,initEmpCheckedKeys:c,enterCallback:d,onUpdateState:u,onChange:p,onEmployeeListInit:b,onDepartmentTreeInit:g,onRoleListInit:v,onDepartmentSelected:m,onDeploymentSelectedAllEmployee:y}},render(){const{$translate:e,state:t,selectedValues:o,initEmpCheckedKeys:n,onUpdateState:l,enterCallback:s,onChange:c,onEmployeeListInit:d,onDepartmentTreeInit:u,onRoleListInit:p,onDepartmentSelected:b,onDeploymentSelectedAllEmployee:g}=this;return Object(a["createVNode"])(r["OioModal"],Object.assign(Object.assign({title:"选择员工",width:"720px"},r["PropRecordHelper"].convert(r["OioModalProps"],r["CastHelper"].cast(this))),{destroyOnClose:!0,loading:t.loading,enterCallback:s}),{default:()=>Object(a["createVNode"])("div",{class:"designer-employee-modal-content"},[Object(a["createVNode"])(i["BaseSelect"],{mode:r["SelectMode"].multiple,value:o,allowClear:!0,placeholder:e("选择员工"),allowArrow:!1,allowSearch:!1,notFoundContent:null,change:c}),Object(a["createVNode"])(r["OioInputSearch"],{value:t.searchValue,placeholder:e("搜索"),allowClear:!0,"onUpdate:value":e=>l("searchValue",e)}),Object(a["createVNode"])(r["OioTabs"],{},{default:()=>[Object(a["createVNode"])(r["OioTab"],{key:"1",tab:e("员工")},{default:()=>[Object(a["createVNode"])("div",{class:"designer-employee-selected-panel"},[Object(a["createVNode"])("div",{class:"designer-department-selected-wrapper oio-scrollbar"},[Object(a["createVNode"])("div",{class:"designer-department-selected-all-employee-node"},[Object(a["createVNode"])("div",{class:["designer-department-selected-all-employee-node-content-wrapper",!t.departmentSelectedKeys.length&&"designer-department-selected-all-employee-node-selected"],onClick:g},e("全部员工"))]),Object(a["createVNode"])(i["OrganizationalStructureTree"],{autoInit:!0,selectable:!0,selectedKeys:t.departmentSelectedKeys,"onUpdate:selectedKeys":e=>l("departmentSelectedKeys",e),onSelected:b})]),Object(a["createVNode"])(r["OioDivider"],{type:"vertical"}),Object(a["createVNode"])(i["EmployeeList"],{ref:"employeeListRef",searchValue:t.searchValue,selectMode:r["SelectMode"].multiple,showCheckedAll:!0,loading:t.loading,usingLoading:!1,autoInit:!0,initCheckedKeys:n,checkedKeys:t.employeeCodes,onInit:d,onChange:({items:e,checkedKeys:t})=>{l("employeeCodes",t),l("employeeItems",e)}})])]}),Object(a["createVNode"])(r["OioTab"],{key:"2",tab:"部门"},{default:()=>Object(a["createVNode"])("div",{class:"designer-department-selected-panel oio-scrollbar"},[Object(a["createVNode"])(i["OrganizationalStructureTree"],{searchValue:t.searchValue,selectMode:r["SelectMode"].multiple,showCheckedAll:!0,autoInit:!0,checkedKeys:t.departmentCodes,onInit:u,onChange:({nodes:e,checkedKeys:t})=>{l("departmentCodes",t),l("departmentNodes",e)}})])}),Object(a["createVNode"])(r["OioTab"],{key:"3",tab:"角色"},{default:()=>Object(a["createVNode"])("div",{class:"designer-role-selected-panel oio-scrollbar"},[Object(a["createVNode"])(i["RoleList"],{searchValue:t.searchValue,selectMode:r["SelectMode"].multiple,showCheckedAll:!0,autoInit:!0,checkedKeys:t.roleCodes,onInit:p,onChange:({items:e,checkedKeys:t})=>{l("roleCodes",t),l("roleItems",e)}})])}),Object(a["createVNode"])(r["OioTab"],{key:"4",tab:e("动态参数")},{default:()=>Object(a["createVNode"])("div",{class:"designer-dynamic-parameters-selected-panel"},[Qe({$translate:e,state:t,onUpdateState:l,items:tt,options:{mode:r["SelectMode"].single}})])})]})])})}});rt.__file="src/field/filter-select/employee/UiEmployeeModal.vue";var at=Object(a["defineComponent"])({name:"UiEmployeeFilter",components:{DefaultSelect:i["DefaultSelect"],UiEmployeeModal:rt},inheritAttrs:!1,props:Object.assign(Object.assign({},i["OioCommonProps"]),{placeholder:{type:String},value:{type:Object},options:{type:Array},selectChange:{type:Function}}),setup(e){const t=Object(a["ref"])(!1),o=e=>{t.value=e},i=()=>{t.value=!0},n=t=>{var o;null===(o=e.selectChange)||void 0===o||o.call(e,t)},r=t=>{var o,i;null!=t&&(t=Object.assign(Object.assign({},t),{departmentCodes:t.departmentCodes.filter(e=>e.startsWith(it)).map(e=>e.substring(it.length))})),null===(o=e.change)||void 0===o||o.call(e,t),null===(i=e.blur)||void 0===i||i.call(e)};return{visible:t,onUpdateVisible:o,onShowModal:i,onSelectChange:n,onChange:r}},render(){const{$attrs:e,value:t,options:o,placeholder:n,visible:l,onUpdateVisible:s,onShowModal:c,onSelectChange:d,onChange:u}=this,p=["oio-employee-select"];return Object(a["createVNode"])("div",i["PropRecordHelper"].collectionBasicProps(e,p),[Object(a["createVNode"])(i["BaseSelect"],{mode:i["SelectMode"].multiple,value:o,allowClear:!0,placeholder:n,allowArrow:!1,allowSearch:!1,notFoundContent:null,change:d},{suffix:()=>Object(a["createVNode"])(r["OioButton"],{icon:"oinone-user-outlined",onClick:c})}),Object(a["createVNode"])(rt,{mode:i["SelectMode"].multiple,selected:o,value:t,visible:l,"onUpdate:visible":s,onChange:u})])}});at.__file="src/field/filter-select/employee/UiEmployeeFilter.vue";let lt=class extends Ye{get dynamicParameterOptions(){return tt}initialize(e){return super.initialize(e),this.setComponent(at),this}change(e){if(null==e)super.change(e);else{const t=Object.assign({},e);delete t.employeeItems,delete t.departmentNodes,delete t.roleItems,super.change(t)}this.reloadOptions(e)}selectChange(e){const t=[],o=[],i=[],n={userEmployee:!1,userDept:!1,userDeptAndChildren:!1};for(const r of e){const{key:e}=r;if(e.startsWith(ot)){const o=e.substring(ot.length);t.push(o)}else if(e.startsWith(it)){const t=e.substring(it.length);o.push(t)}else if(e.startsWith(nt)){const t=e.substring(nt.length);i.push(t)}else n.hasOwnProperty(e)&&(n[e]=!0)}this.initValue={},this.change(Object.assign({employeeCodes:t,departmentCodes:o,roleCodes:i},n))}mounted(){return J(this,void 0,void 0,(function*(){yield this.reloadOptions(this.value)}))}reloadOptions(e){return J(this,void 0,void 0,(function*(){if(!e)return void(this.options=[]);const{employeeCodes:t,employeeItems:o,departmentCodes:i,departmentNodes:n,roleCodes:r,roleItems:a}=e,l=[];t.length>0&&l.push(this.loadEmployeeItems(t,o,ot)),i.length>0&&l.push(this.loadDepartmentItems(i,n,it)),r.length>0&&l.push(this.loadRoleItems(r,a,nt)),this.options=yield this.fillOptions(e,l)}))}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],lt.prototype,"change",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],lt.prototype,"selectChange",null),lt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"UiEmployeeFilterWidget"}))],lt);const st=[{key:"userRole",label:"当前用户所绑定角色"}];var ct=Object(a["defineComponent"])({name:"UiRoleModal",components:{OioInput:r["OioInput"],OioModal:r["OioModal"],OioTab:r["OioTab"],OioTabs:r["OioTabs"],RoleList:i["RoleList"]},props:Object.assign(Object.assign({},r["OioModalProps"]),{value:{type:Object},selected:{type:Array}}),emits:["change"],setup(e,{emit:t}){const o=Object(a["reactive"])({init:!1,storage:{},loading:!1,roleCodes:[],roleItems:[],userRole:!1}),i=Object(a["computed"])(()=>{var t;return(null===(t=e.selected)||void 0===t?void 0:t.map(e=>e.key))||[]}),n=Object(a["computed"])(()=>{const e=[];if(o.init){for(const t of o.roleItems){const{key:o,value:i,label:n,data:r}=t;e.push({key:o,value:i,label:n,data:r})}for(const t of st)o[t.key]&&e.push(Object.assign(Object.assign({},t),{value:t.key,data:!1}))}return e}),r=()=>{const e=o.roleItems;return t("change",{roleCodes:e.map(e=>e.key),roleItems:e,userRole:o.userRole}),!0},l=(e,t)=>{o[e]=t},s=e=>{const t=[],i=[],n={userRole:!1};for(const r of e){const{key:e}=r;if(n.hasOwnProperty(e))n[e]=!0;else if(t.push(e),o.init){const t=o.roleItems.find(t=>t.key===e);t&&i.push(t)}}o.roleCodes=t,o.roleItems=i,o.userRole=n.userRole},c=t=>{var i;o.init=!0,o.storage=t.storage,o.roleCodes=t.checkedKeys,o.roleItems=t.checkedItems,o.userRole=(null===(i=e.value)||void 0===i?void 0:i.userRole)||!1};return Object(a["watch"])(()=>e.visible,t=>{if(t){o.init=!1;const t=e.selected||[];s(t)}}),{state:o,initCheckedKeys:i,selectedValues:n,enterCallback:r,onUpdateState:l,onChange:s,onInit:c}},render(){const{$translate:e,state:t,initCheckedKeys:o,selectedValues:n,enterCallback:l,onUpdateState:s,onChange:c,onInit:d}=this;return Object(a["createVNode"])(r["OioModal"],Object.assign(Object.assign({title:"选择角色",width:"720px"},r["PropRecordHelper"].convert(r["OioModalProps"],r["CastHelper"].cast(this))),{destroyOnClose:!0,loading:t.loading,enterCallback:l}),{default:()=>[Object(a["createVNode"])("div",{class:"designer-role-modal-content"},[Object(a["createVNode"])(i["BaseSelect"],{mode:r["SelectMode"].multiple,value:n,allowClear:!0,placeholder:e("选择角色"),allowArrow:!1,allowSearch:!1,notFoundContent:null,change:c}),Object(a["createVNode"])(r["OioInputSearch"],{value:t.searchValue,placeholder:e("搜索"),allowClear:!0,"onUpdate:value":e=>s("searchValue",e)}),Object(a["createVNode"])(r["OioTabs"],{},{default:()=>[Object(a["createVNode"])(r["OioTab"],{key:"1",tab:e("所有角色")},{default:()=>Object(a["createVNode"])("div",{class:"designer-role-selected-panel"},[Object(a["createVNode"])(i["RoleList"],{searchValue:t.searchValue,selectMode:r["SelectMode"].multiple,showCheckedAll:!0,loading:t.loading,usingLoading:!1,autoInit:!0,checkedKeys:t.roleCodes,"onUpdate:loading":e=>s("loading",e),onInit:d,onChange:({items:e,checkedKeys:t})=>{s("roleCodes",t),s("roleItems",e)}})])}),Object(a["createVNode"])(r["OioTab"],{key:"2",tab:e("动态参数")},{default:()=>Object(a["createVNode"])("div",{class:"designer-dynamic-parameters-selected-panel"},[Qe({$translate:e,state:t,onUpdateState:s,items:st,options:{mode:r["SelectMode"].single}})])})]})])]})}});ct.__file="src/field/filter-select/role/UiRoleModal.vue";var dt=Object(a["defineComponent"])({name:"UiRoleFilter",components:{BaseSelect:i["BaseSelect"],UiRoleModal:ct},inheritAttrs:!1,props:Object.assign(Object.assign({},i["OioCommonProps"]),{placeholder:{type:String},value:{type:Object},options:{type:Array},selectChange:{type:Function}}),setup(e){const t=Object(a["ref"])(!1),o=e=>{t.value=e},i=()=>{t.value=!0},n=t=>{var o;null===(o=e.selectChange)||void 0===o||o.call(e,t)},r=t=>{var o,i;null===(o=e.change)||void 0===o||o.call(e,t),null===(i=e.blur)||void 0===i||i.call(e)};return{visible:t,onUpdateVisible:o,onShowModal:i,onSelectChange:n,onChange:r}},render(){const{$attrs:e,value:t,options:o,placeholder:n,visible:l,onUpdateVisible:s,onShowModal:c,onSelectChange:d,onChange:u}=this,p=["oio-role-select"];return Object(a["createVNode"])("div",i["PropRecordHelper"].collectionBasicProps(e,p),[Object(a["createVNode"])(i["BaseSelect"],{mode:i["SelectMode"].multiple,value:o,allowClear:!0,placeholder:n,allowArrow:!1,allowSearch:!1,notFoundContent:null,change:d},{suffix:()=>Object(a["createVNode"])(r["OioButton"],{icon:"oinone-user-outlined",onClick:c})}),Object(a["createVNode"])(ct,{mode:i["SelectMode"].multiple,selected:o,value:t,visible:l,"onUpdate:visible":s,onChange:u})])}});dt.__file="src/field/filter-select/role/UiRoleFilter.vue";let ut=class extends Ye{get dynamicParameterOptions(){return st}initialize(e){return super.initialize(e),this.setComponent(dt),this}change(e){if(null==e)super.change(e);else{const t=Object.assign({},e);delete t.roleItems,super.change(t)}this.reloadOptions(e)}selectChange(e){const t=[],o={userRole:!1};for(const i of e){const{key:e}=i;o.hasOwnProperty(e)?o[e]=!0:t.push(e)}this.initValue={},this.change(Object.assign({roleCodes:t},o))}mounted(){return J(this,void 0,void 0,(function*(){yield this.reloadOptions(this.value)}))}reloadOptions(e){return J(this,void 0,void 0,(function*(){if(!e)return void(this.options=[]);const{roleCodes:t,roleItems:o}=e,i=[];t.length>0&&i.push(this.loadRoleItems(t,o)),this.options=yield this.fillOptions(e,i)}))}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],ut.prototype,"selectChange",null),ut=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"UiRoleFilterWidget"}))],ut);var pt=Object(a["defineComponent"])({name:"StyleSelect",components:{ASelect:f["c"],ASelectOption:f["b"],OioDivider:r["OioDivider"]},inheritAttrs:!1,props:{dropdownClassName:{type:[String,Array]},placeholder:{type:String},value:{type:String},options:{type:Array},change:{type:Function}},setup(e){const t=Object(a["computed"])(()=>{var t;const o=e.value;if(o)return null===(t=e.options)||void 0===t?void 0:t.find(e=>e.key===o)}),o=t=>{var o;let i;i=t?t.value:null,null===(o=e.change)||void 0===o||o.call(e,i)};return{selected:t,change:o}},render(){const{dropdownClassName:e,placeholder:t,selected:o,options:i,change:n}=this;return Object(a["createVNode"])(f["c"],{class:"oio-select",dropdownClassName:r["StringHelper"].append(["oio-select-dropdown"],e).join(" "),value:o,placeholder:t,labelInValue:!0,allowClear:!0,onChange:n},{default:()=>null===i||void 0===i?void 0:i.map(e=>Object(a["createVNode"])(f["b"],{key:e.key,title:e.title},{default:()=>e.render(e)}))})}});pt.__file="src/field/style-select/common/StyleSelect.vue";let bt=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(pt),this}get activeCount(){return i["Optional"].ofNullable(this.currentInstance).map(e=>n["R"].fetchProperties(e)).map(e=>e.activeCount).map(e=>i["ActiveCountEnum"][e]).orElse(5)}get dropdownClassName(){return"ui-designer-action-bar-style-dropdown"}get options(){return[{key:i["ActionBarBizStyle"].style1,label:"根据按钮配置展示",title:"根据按钮配置展示",render:({key:e})=>this.renderActions(e,(e,t)=>{let o="ant-btn-primary oio-button-primary";return t&&(o+=" oio-button-icon-after"),o})},{key:i["ActionBarBizStyle"].style2,label:"突出首个按钮",title:"突出首个按钮",render:({key:e})=>this.renderActions(e,(e,t)=>{let o;return o=1===e?"ant-btn-primary oio-button-primary":"ant-btn-link oio-button-link oio-button-biz-type-info",t&&(o+=" oio-button-icon-after"),o})}]}renderActions(e,t){let o=6,n=!1;this.activeCount>=1&&(o=this.activeCount,n=!0);const r=Array.from({length:o},(e,t)=>t+1).map(e=>Object(a["createVNode"])("button",{class:"ant-btn oio-button "+t(e,!1)},[Object(a["createVNode"])("span",{},Object(i["translateValueByKey"])("按钮"+e))]));return n&&r.push(Object(a["createVNode"])("button",{class:"ant-btn oio-button "+t(o+1,!0)},[Object(a["createVNode"])("span",{},Object(i["translateValueByKey"])("更多")),Object(a["createVNode"])(i["OioIcon"],{icon:"oinone-menu-caidanxiala",size:12})])),Object(a["createVNode"])("div",{class:"action-bar-style action-bar-"+e},r)}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],bt.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Number),Q("design:paramtypes",[])],bt.prototype,"activeCount",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],bt.prototype,"dropdownClassName",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],bt.prototype,"options",null),bt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"ActionBarStyleSelect"}))],bt);var gt=Object(a["defineComponent"])({name:"StyleSelect",components:{ASelect:f["c"],ASelectOption:f["b"],OioDivider:r["OioDivider"]},inheritAttrs:!1,props:{value:{type:String},placeholder:{type:String},change:{type:Function}},setup(e){const t=Object(i["getCompanySelectOptions"])().map(e=>Object.assign(Object.assign({},e),{value:e.key})),o=Object(a["computed"])(()=>{const o=e.value;if(o)return t.find(e=>e.key===o)}),n=t=>{var o;null===(o=e.change)||void 0===o||o.call(e,t.value)};return{options:t,selected:o,onChange:n}},render(){const{options:e,selected:t,placeholder:o,onChange:n}=this;return Object(a["createVNode"])(f["c"],{class:"oio-select ",dropdownClassName:"oio-select-dropdown ui-designer-company-style-dropdown",labelInValue:!0,value:t,placeholder:o,options:e,allowClear:!0,onChange:n},{dropdownRender:({menuNode:t})=>{const o=[t];o.push(Object(a["createVNode"])(r["OioDivider"],{style:"margin: 7px 0"}));for(const n of e)o.push(Object(a["createVNode"])("div",{class:"ui-designer-company-style-option oio-company-select-dropdown"},[Object(a["createVNode"])("div",{class:"ui-designer-company-style-title"},Object(i["translateValueByKey"])(n.label)),Object(a["createVNode"])("div",{class:"ui-designer-company-style-preview"},[Object(i["selectorCompanySelectOptionRender"])(n.key)({key:"mock",value:"mock",label:Object(i["translateValueByKey"])("数式科技"),data:{id:"mock",name:Object(i["translateValueByKey"])("数式科技"),staffSize:"SS_51_100",licenseRegisterTime:"2019-04-09",responsiblePerson:{name:Object(i["translateValueByKey"])("陈鹏程")}}})])]));return o}})}});gt.__file="src/field/style-select/company/StyleSelect.vue";let vt=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(gt),this}};vt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"CompanyStyleSelect"}))],vt);let mt=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(pt),this}get dropdownClassName(){return"ui-designer-group-style-dropdown"}get options(){return[{key:"style1",label:"标题带竖线",render:()=>Object(a["createVNode"])("div",{class:"group-style group-style1"},[Object(a["createVNode"])("div",{class:"group-title"},[Object(a["createVNode"])(r["OioDivider"],{type:"vertical"}),Object(a["createVNode"])("span",{},Object(i["translateValueByKey"])("字段标题"))]),Object(a["createVNode"])("div",{class:"group-description"},Object(i["translateValueByKey"])("这是描述信息"))])},{key:"style2",label:"简约",render:()=>Object(a["createVNode"])("div",{class:"group-style group-style2"},[Object(a["createVNode"])("div",{class:"group-title"},Object(i["translateValueByKey"])("字段标题")),Object(a["createVNode"])("div",{class:"group-description"},Object(i["translateValueByKey"])("这是描述信息"))])}]}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],mt.prototype,"dropdownClassName",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],mt.prototype,"options",null),mt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"GroupStyleSelect"}))],mt);let yt=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(pt),this}get dropdownClassName(){return"ui-designer-tabs-style-dropdown"}get options(){return[{key:"style1",title:"style1",label:"简约",render:e=>this.renderPreviewOption(e)},{key:"style2",title:"style2",label:"卡片",render:e=>this.renderPreviewOption(e)},{key:"style3",title:"style3",label:"紧凑的卡片",render:e=>this.renderPreviewOption(e)}]}renderPreviewOption(e){const{key:t}=e;return Object(a["createVNode"])("div",{class:"tabs-style tabs-"+t},[Object(a["createVNode"])("div",{class:"tabs-item"},Object(i["translateValueByKey"])("页签1")),Object(a["createVNode"])("div",{class:"tabs-item tabs-item-selected"},Object(i["translateValueByKey"])("页签2")),Object(a["createVNode"])("div",{class:"tabs-item"},Object(i["translateValueByKey"])("页签3"))])}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],yt.prototype,"dropdownClassName",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],yt.prototype,"options",null),yt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"TabsStyleSelect"}))],yt);let ht=class extends i["FormM2OSelectFieldWidget"]{fillOptionsForSingle(e,t=!0){var o;return J(this,void 0,void 0,(function*(){const i=(null===(o=this.referencesModel.uniques)||void 0===o?void 0:o[0])||this.referencesModel.pks;let n=!0;for(let e=0;e<i.length;e++)if(this.selectedValue&&null==this.selectedValue[i[e]]){n=!1;break}if(this.selectedValue&&n){const o=e.findIndex(e=>{for(let t=0;t<i.length;t++)if(this.selectedValue&&this.selectedValue[i[t]]!==e[i[t]])return!1;return!0});if(o<0&&t)e=[this.selectedValue,...e];else{const t=e.slice(o+1).findIndex(e=>{for(let t=0;t<i.length;t++)if(this.selectedValue&&this.selectedValue[i[t]]!==e[i[t]])return!1;return!0});t>=0&&e.splice(t+1,1)}}this.dataList=e,this.options=this.handleSelectOption(this.dataList,this.referencesModel)}))}get relationFieldKey(){var e,t;const{ttype:o,referenceFields:n}=this.field;return[i["ModelFieldType"].ManyToOne,i["ModelFieldType"].OneToOne].includes(o)&&1===(null===n||void 0===n?void 0:n.length)?n[0]:(null===(t=null===(e=this.referencesModel.uniques)||void 0===e?void 0:e[0])||void 0===t?void 0:t[0])||this.referencesModel.pks[0]}};var ft;Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ht.prototype,"relationFieldKey",null),ht=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Search],ttype:i["ModelFieldType"].ManyToOne,widget:"UiDesignerSelect"}))],ht),function(e){e["FIELD"]="FIELD",e["ACTION"]="ACTION",e["FIELD_ACTION"]="FIELD_ACTION"}(ft||(ft={}));const Ot={[i["ActionType"].View]:"跳转动作",[i["ActionType"].URL]:"链接动作",[i["ActionType"].Client]:"客户端动作",[i["ActionType"].Server]:"提交动作"};Object(i["definePropertyTranslate"])(Ot);const wt={[ft.FIELD]:"字段",[ft.ACTION]:"动作"},jt={readonly:{type:[Boolean],default:!1},disabled:{type:[Boolean],default:!1}};var kt=Object(a["defineComponent"])({name:"SelectFieldActionNode",props:Object.assign(Object.assign({},jt),{field:{type:Array,default:()=>[],required:!0},dataSource:{type:Array,required:!0},valueSource:{type:Array,default:()=>[]},labelEditable:{type:Boolean,default:!0}}),components:{ACascader:O["a"],OioIcon:r["OioIcon"],OioInput:r["OioInput"]},emits:["onChange","onDelete"],setup(e,{emit:t}){const o=Object(a["ref"])(!1),i=Object(a["computed"])(()=>s(e.dataSource)),n=Object(a["computed"])(()=>e.field.filter(e=>e)),r=Object(a["ref"])(),l=Object(a["computed"])({get(){if(r.value)return r.value;const e=c();return null===e||void 0===e?void 0:e.label},set(e){r.value=e}}),s=(e,t=1)=>(null===e||void 0===e?void 0:e.length)?e.map(e=>{var o,i,n,r,a,l;let c="";return c=e.actionType?(null===(o=e.children)||void 0===o?void 0:o.length)?null!==(i=e.displayName)&&void 0!==i?i:e.label:`${e.displayName}(${Ot[e.actionType]}) - ${e.name}`:(null===(n=e.children)||void 0===n?void 0:n.length)?null!==(r=e.displayName)&&void 0!==r?r:e.label:`${e.displayName} - ${e.name}`,Object.assign(Object.assign({},e),{isLeaf:!((null===(a=e.children)||void 0===a?void 0:a.length)&&t<2),displayLabel:c,children:(null===(l=e.children)||void 0===l?void 0:l.length)&&t<2?s(e.children,t+1):null})}):e,c=(t=n.value)=>{const o=e.valueSource.find(e=>e.name===t[0]);if(o)return t.length<2?o:o.children&&o.children.length?o.children.find(e=>e.name===t[1]):o},d=e=>{t("onChange",{value:c(e),address:e})},u=()=>{e.disabled||t("onDelete")},p=()=>{t("onChange",{value:Object.assign(Object.assign({},c()),{label:r.value}),address:n.value,isInput:!0})},b=e=>{e.preventDefault()},g=e=>{o.value=e};return{open:o,onDropdownVisibleChange:g,labelValue:l,options:i,selectValue:n,onSelectChange:d,onDelete:u,onInput:p,onClick:b}}});const Ct={class:"select-field-action__wrapper"};function Dt(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-cascader"),c=Object(a["resolveComponent"])("oio-input");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ct,[Object(a["createVNode"])(l,{class:"select-field-action__drop-icon",icon:"oinone-yidong",color:"#979797",size:"var(--oio-font-size-sm)"}),Object(a["createVNode"])(s,{class:Object(a["normalizeClass"])(["oio-cascader",!e.disabled&&e.readonly&&"oio-cascader__readonly",e.open&&"oio-select-cascader-open"]),dropdownClassName:"oio-select-default-cascader__dropdown",size:"large",expandTrigger:"hover",disabled:e.disabled||e.readonly,allowClear:!1,placeholder:e.$translate("可根据名称或显示名称搜索"),value:e.selectValue,"onUpdate:value":t[1]||(t[1]=t=>e.selectValue=t),options:e.options,"field-names":{label:"displayLabel",value:"name",children:"children"},showSearch:"",matchInputWidth:"",style:Object(a["normalizeStyle"])({width:e.labelEditable?"160px":"calc(100% - 76px)"}),open:e.open,onChange:e.onSelectChange,onDropdownVisibleChange:e.onDropdownVisibleChange,"get-popup-container":e=>e.parentNode},{displayRender:Object(a["withCtx"])(({labels:o})=>[Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=(...t)=>e.onClick&&e.onClick(...t)),class:"select-field-action-select-span"},Object(a["toDisplayString"])(o.filter(e=>e).join("  >  ")),1)]),_:1},8,["class","disabled","placeholder","value","options","style","open","onChange","onDropdownVisibleChange","get-popup-container"]),e.labelEditable?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:Object(a["normalizeClass"])(["select-field-action__input",e.readonly&&"select-field-action--input__readonly"]),disabled:e.disabled,readonly:e.readonly,value:e.labelValue,"onUpdate:value":t[2]||(t[2]=t=>e.labelValue=t),onInput:e.onInput},null,8,["class","disabled","readonly","value","onInput"])):Object(a["createCommentVNode"])("v-if",!0),e.readonly?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,class:Object(a["normalizeClass"])(["select-field-action-select-delete-icon",e.disabled&&"select-field-action-delete__disabled"]),icon:"oinone-a-ShapeCopy3beifen",size:"var(--oio-font-size)",onClick:e.onDelete},null,8,["class","onClick"]))])}kt.render=Dt,kt.__file="src/field/metadata-area/SelectDefault/SelectFieldActionNode.vue";var Tt=Object(a["defineComponent"])({name:"SelectFieldActionSelectComponent",props:Object.assign(Object.assign({},i["OioMetadataProps"]),{widgetType:{type:String,required:!0},fieldActionOptionsList:{type:Object,required:!0},unSelectedOptionList:{type:Object,required:!0},selectedOptionList:{type:Object,required:!0},onFormChange:{type:Function,required:!0},value:{type:Array,default:()=>[]},valueFlattend:{type:Array,default:()=>[]},labelEditable:{type:Boolean,default:!0}}),components:{OioButton:r["OioButton"],SelectNode:kt,Draggable:y.a},emits:[],setup(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),n=Object(a["computed"])(()=>e.fieldActionOptionsList[e.widgetType]),l=Object(a["computed"])(()=>e.value.map(e=>u(e).flat()).flat()),s=Object(a["computed"])({get(){return c(l.value)},set(t){e.onFormChange(g(t.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))}}),c=e=>e.length?e.sort((e,t)=>{var o,i;return(null!==(o=null===e||void 0===e?void 0:e.sort)&&void 0!==o?o:-1)-(null!==(i=null===t||void 0===t?void 0:t.sort)&&void 0!==i?i:-1)}):e,d=()=>{const t=[...s.value,{items:[]}];e.onFormChange(g(t.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))},u=e=>{var t;return(null===(t=e.children)||void 0===t?void 0:t.length)?e.children.map(t=>t.name?[{sort:t.sort,items:[e.name,t.name]}]:[{sort:t.sort,items:[e.name]}]):[{sort:e.sort,items:[e.name]}]},p=({value:t,address:o,isInput:n=!1},a)=>{const l=s.value.findIndex(e=>{var t;return(null===(t=null===e||void 0===e?void 0:e.items)||void 0===t?void 0:t.join("-"))===o.join("-")});if(!n&&l>1)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`该${wt[e.widgetType]}已被选择`));const c=[...s.value];c.splice(a,1,{items:o}),n?e.onFormChange(b(g(c.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})),t,o)):e.onFormChange(g(c.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))},b=(e,t,o)=>{var i,n,r,a,l;if(!e.length)return[];const s=[...e];if(1===o.length)return s.map(e=>e.name!==t.name?e:t);const c=s.findIndex(e=>e.name===o[0]);return(null===(i=s[c])||void 0===i?void 0:i.children)||(null===(r=null===(n=s[c])||void 0===n?void 0:n.children)||void 0===r?void 0:r.length)?(s[c].children=null===(l=null===(a=s[c])||void 0===a?void 0:a.children)||void 0===l?void 0:l.map(e=>e.name===o[1]?t:e),s):s},g=t=>{let o=1;return t.map(t=>{var i,r,a,l,s;if(!(null===t||void 0===t?void 0:t.length))return{sort:o++};if(t.length<2){const l=n.value.find(e=>e.name===t[0]);if(!l)return{sort:o++};const s=e.value.find(e=>e.name===l.name&&e.model===l.model);return{name:null!==(i=null===s||void 0===s?void 0:s.name)&&void 0!==i?i:l.name,model:null!==(r=null===s||void 0===s?void 0:s.model)&&void 0!==r?r:l.model,label:null!==(a=null===s||void 0===s?void 0:s.label)&&void 0!==a?a:l.label,type:e.widgetType,displayName:l.displayName,sort:o++}}const c=n.value.find(e=>e.name===t[0]);if(!c)return{sort:o++};const d=(null===(l=c.children)||void 0===l?void 0:l.length)&&t[1]?c.children.find(e=>e.name===t[1]):null,u=e.value.find(e=>e.name===c.name&&e.model===c.model);let p={};return d&&(p=e.valueFlattend.find(e=>e.name===d.name&&e.model===d.model&&e.parentName===c.name&&e.parentModel===c.model)),{name:c.name,model:c.model,label:null!==(s=null===u||void 0===u?void 0:u.label)&&void 0!==s?s:c.label,type:e.widgetType,displayName:c.displayName,sort:o++,children:d&&[Object.assign(Object.assign(Object.assign({},d),p),{type:e.widgetType,sort:o++})]}})},v=t=>{const o=[...s.value];o.splice(t,1),e.onFormChange(g(o.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))};return{readonly:t,disabled:o,dataSource:n,fieldList:l,draggableList:s,onAddRow:d,onSelectChange:p,onDelete:v}}});const $t={class:"select-field-action-select-wrapper"};function Et(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("select-node"),s=Object(a["resolveComponent"])("draggable"),c=Object(a["resolveComponent"])("oio-button");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$t,[Object(a["createVNode"])(s,{modelValue:e.draggableList,"onUpdate:modelValue":t[0]||(t[0]=t=>e.draggableList=t),disabled:e.disabled||e.readonly,"item-key":"sort"},{item:Object(a["withCtx"])(({element:t,index:o})=>[(Object(a["openBlock"])(),Object(a["createBlock"])(l,{field:t.items,dataSource:e.dataSource,valueSource:e.value,filterSource:e.unSelectedOptionList,readonly:e.readonly,disabled:e.disabled,key:o,"label-editable":e.labelEditable,onOnChange:t=>{e.onSelectChange(t,o)},onOnDelete:()=>e.onDelete(o)},null,8,["field","dataSource","valueSource","filterSource","readonly","disabled","label-editable","onOnChange","onOnDelete"]))]),_:1},8,["modelValue","disabled"]),e.readonly?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,disabled:e.disabled,class:"select-field-action__button",type:"primary",onClick:e.onAddRow},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加一行")),1)]),_:1},8,["disabled","onClick"]))])}Tt.render=Et,Tt.__file="src/field/metadata-area/SelectDefault/SelectFieldAction.vue";const St=i["HttpClient"].getInstance(),Nt="uiDesigner",Vt=e=>J(void 0,void 0,void 0,(function*(){const t=`query {\n\tuiDesignerActionQuery {\n\t\tqueryActions(data: { model: "${e}" }) {\n\t\t\tid\n\t\t\tactionType\n\t\t\tdisplayName\n\t\t\tlabel\n\t\t\tbitOptions\n\t\t\tattributes\n\t\t\tmodel\n\t\t\tsys\n\t\t\tmodelName\n\t\t\tsystemSource\n\t\t\tname\n\t\t\tsign\n\t\t\thash\n\t\t\tbindingType\n\t\t\tbindingViewName\n\t\t\tcontextType\n\t\t\tsummary\n\t\t\tdescription\n\t\t\tdisable\n\t\t\tinvisible\n\t\t\trule\n\t\t\tmapping\n\t\t\tcontext\n\t\t\tpriority\n\t\t\tcreateDate\n\t\t\twriteDate\n\t\t\tcreateUid\n\t\t\twriteUid\n\t\t}\n\t}\n}\n`,o=yield St.mutate(Nt,t);return o.data["uiDesignerActionQuery"]["queryActions"]}));class xt extends i["FormFieldWidget"]{constructor(){super(...arguments),this.fieldActionOptionsList={[ft.FIELD]:[],[ft.ACTION]:[]}}initialize(e){return super.initialize(e),this}get filterRelation(){var e;return null!==(e=this.getDsl().filterRelation)&&void 0!==e&&e}get labelEditable(){return this.getDsl().labelEditable}get valueFlattend(){return this.flattenList(this.value)}get fieldActionOptionsListFlattend(){return{[ft.FIELD]:this.flattenList(this.fieldActionOptionsList[ft.FIELD]),[ft.ACTION]:this.flattenList(this.fieldActionOptionsList[ft.ACTION])}}get unSelectedOptionList(){let e=[...this.fieldActionOptionsList[ft.FIELD]],t=[...this.fieldActionOptionsList[ft.ACTION]];return e=this.filterListByValue(e,this.value),t=this.filterListByValue(t,this.value),{[ft.FIELD]:e,[ft.ACTION]:t}}get selectedOptionList(){let e=[...this.fieldActionOptionsList[ft.FIELD]],t=[...this.fieldActionOptionsList[ft.ACTION]];return e=this.getListByValue(this.value,ft.FIELD),t=this.getListByValue(this.value,ft.ACTION),{[ft.FIELD]:e,[ft.ACTION]:t}}onFormChange(e,t=!1){const o=this.mergeChild(e).map(e=>{var o,i,n,r,a,l,s;if(!e||!e.name)return e;if(t){const t=Object.assign(Object.assign({},e),{type:null!==(o=e.type)&&void 0!==o?o:this.widgetType,children:null!==(n=null===(i=e.children)||void 0===i?void 0:i.map(e=>this.deepCopy(e)))&&void 0!==n?n:null});return delete t.modelDefinition,t}return{name:e.name,label:e.label,model:e.model,type:null!==(r=e.type)&&void 0!==r?r:this.widgetType,sort:e.sort,properties:null!==(a=e.properties)&&void 0!==a?a:null,children:null!==(s=null===(l=e.children)||void 0===l?void 0:l.map(e=>this.slimDeepCopy(e)))&&void 0!==s?s:null}});this.change(o)}queryReferences(e,t=this.widgetType){return J(this,void 0,void 0,(function*(){return t===ft.FIELD?this.queryFieldsByModel(e):t===ft.ACTION?this.queryActionsByModel(e):void 0}))}updateExsitValue(e){const t=this.value.map(e=>this.deepCopy(e));this.onFormChange(this.updateUniqueValue(t,e),!0)}updateUniqueValue(e,t,o){return e.map(e=>{var i,n;return e.name===t.name&&e.model===t.model&&(null!==o&&void 0!==o?o:null)===(null!==(i=t.parentName)&&void 0!==i?i:null)?t:((null===(n=e.children)||void 0===n?void 0:n.length)&&(e.children=this.updateUniqueValue(e.children,t,e.name)),e)})}mergeChild(e){const t=[];return e.forEach(e=>{var o;if(!e||!(null===e||void 0===e?void 0:e.name))return void t.push(e);const i=t.findIndex(t=>t.name===e.name);i>-1?t.splice(i,1,Object.assign(Object.assign({},t[i]),{children:null===(o=t[i].children)||void 0===o?void 0:o.concat(e.children)})):t.push(e)}),t}deepCopy(e){var t;if(!e)return e;const o=Object.assign(Object.assign({},e),{type:null!==(t=e.type)&&void 0!==t?t:this.widgetType,children:e.children?e.children.map(e=>this.deepCopy(e)):null});return delete o.modelDefinition,o}slimDeepCopy(e){var t,o;return e?{name:e.name,model:e.model,label:e.label,sort:e.sort,type:null!==(t=e.type)&&void 0!==t?t:this.widgetType,properties:null!==(o=e.properties)&&void 0!==o?o:null,children:e.children?e.children.map(e=>this.slimDeepCopy(e)):null}:e}flattenList(e,t,o){if(!(null===e||void 0===e?void 0:e.length))return[];const i=[];return e.filter(e=>null!==e&&void 0!==e).forEach(e=>{var n;(null===(n=e.children)||void 0===n?void 0:n.length)&&i.push(...this.flattenList(e.children,e.model,e.name)),i.push(Object.assign(Object.assign({},e),{parentModel:t,parentName:o,children:[]}))}),i}getListByValue(e,t){var o;return(null===(o=this.fieldActionOptionsListFlattend[t])||void 0===o?void 0:o.length)&&(null===e||void 0===e?void 0:e.length)?e.filter(e=>null!==e&&void 0!==e).map(e=>{var o;const i=this.fieldActionOptionsListFlattend[t].find(o=>o.name===e.name&&o.model===e.model&&t===e.type),n=(null===(o=e.children)||void 0===o?void 0:o.length)?this.getListByValue(e.children,t):[];return i?Object.assign(Object.assign({},i),{children:n}):Object.assign(Object.assign({},e),{displayName:e.label,deleted:!0,isLeaf:!n.length,children:n})}):[]}filterListByValue(e,t){return(null===e||void 0===e?void 0:e.length)?(null===t||void 0===t?void 0:t.length)?e.filter(e=>{var o,i,n;const r=null===(o=e.children)||void 0===o?void 0:o.length,a=t.findIndex(t=>t.name===e.name&&t.model===e.model);return r?!(a>-1&&(null===(i=t[a].children)||void 0===i?void 0:i.length)===(null===(n=e.children)||void 0===n?void 0:n.length)):a<0}).map(e=>{var o,i,n;const r=t.findIndex(t=>t.name===e.name&&t.model===e.model),a=(null===(o=e.children)||void 0===o?void 0:o.length)&&(null===(n=null===(i=t[r])||void 0===i?void 0:i.children)||void 0===n?void 0:n.length);return Object.assign(Object.assign({},e),{children:a?this.filterListByValue(e.children,t[r].children):e.children})}):e:null}queryReferencesWithIdle(e,t){let o=0;const i=()=>{this.setReferencesChildren(e[o],t),o++,o<e.length&&requestIdleCallback(i)};requestIdleCallback(i)}setReferencesChildren(e,t){return J(this,void 0,void 0,(function*(){if(!e.references)return;const o=this.fieldActionOptionsList[t].findIndex(t=>t.name===e.name);if(!this.fieldActionOptionsList[t][o])return;if(o>-1&&this.fieldActionOptionsList[t][o].children)return;if(o<0)return;const i=yield this.queryReferences(e.references,t);this.fieldActionOptionsList[t][o].children=null===i||void 0===i?void 0:i.filter(e=>!e.references)}))}queryFieldsByModel(e){var t;return J(this,void 0,void 0,(function*(){const o=yield i["ModelCache"].get(e);return this.withPreHandle(null!==(t=null===o||void 0===o?void 0:o.modelFields)&&void 0!==t?t:[],ft.FIELD)}))}queryActionsByModel(e){return J(this,void 0,void 0,(function*(){const t=yield Vt(e);return this.withPreHandle(null!==t&&void 0!==t?t:[],ft.ACTION)}))}withPreHandle(e,t){if(!(null===e||void 0===e?void 0:e.length))return[];const o=[];let n=[...e];return this.filterRelation&&(n=n.filter(e=>!Object(i["isRelationTtype"])(e.ttype))),n=n.map(e=>{const t=!Object(i["isRelationTtype"])(e.ttype);return!t&&e.references&&o.push(e),Object.assign(Object.assign({},e),{label:e.label||e.displayName,isLeaf:t})}),o.length&&this.queryReferencesWithIdle(o,t),n}getSelectOptions(){var e,t;return J(this,void 0,void 0,(function*(){const{model:o,referenceModel:i}=null!==(t=null===(e=this.currentInstance)||void 0===e?void 0:e.element)&&void 0!==t?t:{};if(!o)return;if(this.widgetType===ft.FIELD_ACTION){if(!this.fieldActionOptionsList[ft.FIELD].length){const e=yield this.queryFieldsByModel(null!==i&&void 0!==i?i:o);this.fieldActionOptionsList[ft.FIELD]=e}if(!this.fieldActionOptionsList[ft.ACTION].length){const e=yield this.queryActionsByModel(null!==i&&void 0!==i?i:o);this.fieldActionOptionsList[ft.ACTION]=e}return}let n=[];this.widgetType===ft.FIELD&&(this.fieldActionOptionsList[ft.FIELD].length||(n=yield this.queryFieldsByModel(null!==i&&void 0!==i?i:o),this.fieldActionOptionsList[ft.FIELD]=n)),this.widgetType===ft.ACTION&&(this.fieldActionOptionsList[ft.ACTION].length||(n=yield this.queryActionsByModel(null!==i&&void 0!==i?i:o),this.fieldActionOptionsList[ft.ACTION]=n))}))}setMetaDataFields(){this.fieldsCommit&&this.fieldsCommit(this.itemData)}mounted(){super.mounted(),this.getSelectOptions(),this.setMetaDataFields()}}Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],xt.prototype,"filterRelation",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],xt.prototype,"labelEditable",null),Y([i["Widget"].Reactive(),Q("design:type",String)],xt.prototype,"widgetType",void 0),Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],xt.prototype,"currentInstance",void 0),Y([i["Widget"].Inject(),Q("design:type",Object)],xt.prototype,"fieldsCommit",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],xt.prototype,"fieldActionOptionsList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],xt.prototype,"valueFlattend",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],xt.prototype,"fieldActionOptionsListFlattend",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],xt.prototype,"unSelectedOptionList",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],xt.prototype,"selectedOptionList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],xt.prototype,"onFormChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String,Object]),Q("design:returntype",Promise)],xt.prototype,"queryReferences",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],xt.prototype,"updateExsitValue",null);let It=class extends xt{constructor(){super(...arguments),this.widgetType=ft.ACTION}initialize(e){return super.initialize(e),this.setComponent(Tt),this}};Y([i["Widget"].Reactive(),Q("design:type",Object)],It.prototype,"widgetType",void 0),It=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"MetaPanelAction"}))],It);let Mt=class extends xt{constructor(){super(...arguments),this.widgetType=ft.FIELD}initialize(e){return super.initialize(e),this.setComponent(Tt),this}};Mt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,widget:"MetaPanelField"}))],Mt);let At=class extends i["FormM2OSelectFieldWidget"]{get relationFieldKey(){return"name"}fillOptions(e,t=!0){return J(this,void 0,void 0,(function*(){}))}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t,o,n;return J(this,void 0,void 0,(function*(){yield e.mounted.call(this);const r=null===(o=null===(t=this.currentInstance)||void 0===t?void 0:t.root)||void 0===o?void 0:o.fieldCollection;if(r){const e=r.values(),t=[];let o=e.next();while(!o.done){let r=i["CastHelper"].cast(null===(n=o.value.element)||void 0===n?void 0:n.widgetData);if(r){const e=Object.assign(Object.assign({},r),{label:r.displayName||r.name,value:r.name});t.push(e)}o=e.next()}this.dataList=t,this.options=t;const{dataList:a,value:l}=this;if(l){const e=a.find(e=>e[this.relationFieldKey]===l.value);e||this.setValue(null)}}}))}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],At.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],At.prototype,"relationFieldKey",null),At=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerExpandOperationFieldSelect"}))],At);let Ft=class extends i["FormM2OSelectFieldWidget"]{get relationFieldKey(){return"name"}fillOptions(e,t=!0){return J(this,void 0,void 0,(function*(){}))}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t,o,n;return J(this,void 0,void 0,(function*(){yield e.mounted.call(this);const r=null===(o=null===(t=this.currentInstance)||void 0===t?void 0:t.root)||void 0===o?void 0:o.fieldCollection;if(r){const e=r.values(),t=[];let o=e.next();while(!o.done){let r=i["CastHelper"].cast(null===(n=o.value.element)||void 0===n?void 0:n.widgetData);if(r&&Object(i["isRelationField"])(r)){const e=Object.assign(Object.assign({},r),{label:r.displayName||r.name,value:r.name});t.push(e)}o=e.next()}this.dataList=t,this.options=t;const{dataList:a,value:l}=this;if(l){const e=a.find(e=>e[this.relationFieldKey]===l.value);e||this.setValue(null)}}}))}};var Lt,Rt;Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],Ft.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ft.prototype,"relationFieldKey",null),Ft=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerSetExpandRowField"}))],Ft),function(e){e["SELF"]="SELF",e["RELATION"]="RELATION"}(Lt||(Lt={})),function(e){e["CREATE"]="CREATE",e["COPY"]="COPY"}(Rt||(Rt={}));let Bt=class extends i["FormM2OSelectFieldWidget"]{constructor(){super(...arguments),this.isInit=!1}get relationFieldKey(){return"model"}fillOptions(e,t=!0){return J(this,void 0,void 0,(function*(){}))}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}fillModelDefinition(e){return J(this,void 0,void 0,(function*(){if(e){const t=yield Object(i["getModel"])(e);t&&this.optionsChange(t)}else this.optionsChange(void 0)}))}optionsChange(e){if(e){const t=Object.assign(Object.assign({},e),{label:e.displayName,value:e.model});this.m2oChange(t),this.options=[t]}else this.m2oChange(null),this.options=[]}afterChange(){this.isInit&&super.afterChange()}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t,o,i;return J(this,void 0,void 0,(function*(){yield e.mounted.call(this);const{formData:n}=this;let r=null===(o=null===(t=this.currentInstance)||void 0===t?void 0:t.element)||void 0===o?void 0:o.model;if(n){const{expandType:e,expandField:t}=n;e===Lt.RELATION&&(r=null===(i=t)||void 0===i?void 0:i.references)}yield this.fillModelDefinition(r),this.isInit=!0}))}watchReference(e){this.fillModelDefinition(e)}watchExpandType(e){var t,o;if(e===Lt.SELF){const e=null===(o=null===(t=this.currentInstance)||void 0===t?void 0:t.element)||void 0===o?void 0:o.model;this.fillModelDefinition(e)}}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],Bt.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Bt.prototype,"relationFieldKey",null),Y([i["Widget"].Watch("formData.expandField.references",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Bt.prototype,"watchReference",null),Y([i["Widget"].Watch("formData.expandType",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Bt.prototype,"watchExpandType",null),Bt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerSetExpandRowModel"}))],Bt);const _t=["DETAIL","FORM"],Wt=["TABLE"],Pt=["DETAIL","FORM"];let zt=class extends i["FormEnumRadioWidget"]{constructor(){super(...arguments),this.disabledState=!1}get disabled(){return this.disabledState||super.disabled}getAvailableOptions(){const e=this.formData.expandType;let t=[];if(e&&e!==Lt.SELF){if(e===Lt.RELATION){const e=this.formData.expandField;if(e){const o=Object(i["getRealTtype"])(e);o&&([i["ModelFieldType"].OneToMany,i["ModelFieldType"].ManyToMany].includes(o)?t=Wt:[i["ModelFieldType"].OneToOne,i["ModelFieldType"].ManyToOne].includes(o)&&(t=Pt))}}}else t=_t;let o=super.getAvailableOptions();if(t.length){this.disabledState=!1,o=o.filter(e=>t.includes(e.name));const e=this.value;e&&t.includes(e)||this.setValue(o[0].name)}else this.disabledState=!0;return o}};Y([i["Widget"].Reactive(),Q("design:type",Object)],zt.prototype,"disabledState",void 0),Y([i["Widget"].Reactive(),Q("design:type",Boolean),Q("design:paramtypes",[])],zt.prototype,"disabled",null),zt=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].Enum,widget:"DesignerSetExpandRowViewType"}))],zt);const Gt=i["HttpClient"].getInstance(),Ut=(e,t,o)=>J(void 0,void 0,void 0,(function*(){const i=`mutation {\n    ${e} {\n      outPanel(data: { model: "${t}", name: "${o}" }) {\n        id\n      }\n    }\n  }`,r=yield Gt.mutate(n["jb"],i);return r.data[""+e]["outPanel"]})),Kt=i["HttpClient"].getInstance(),qt="fields\n        {\n          id\n          name\n          displayName\n          ttype\n          relatedTtype\n          invisible\n          model\n          references\n          relationFields\n          referenceFields\n          multi\n          store\n          sys\n          systemSource\n          ttypeDisplayName\n          relationStore\n          dictionary\n          options{\n            name\n            value\n            displayName\n          }\n          icon\n          related\n          isVirtual\n        }\n        viewActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n          resModel\n          componentData\n          isMock\n          reserve\n          createDate\n        }\n        serverActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n          componentData\n          isMock\n          reserve\n          createDate\n        }\n        urlActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n          componentData\n          isMock\n          reserve\n          createDate\n        }\n        clientActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n          componentData\n          isMock\n          reserve\n          createDate\n        }",Ht=`{\n    id\n    ${qt}\n    module\n    modules {\n      id\n      name\n      module\n      displayName\n    }\n    selections {\n      dictionary\n      valueType\n      sys\n      systemSource\n      options {\n        displayName\n        name\n        value\n        state\n        help\n        source\n      }\n    }\n    modelDefinition {\n      model\n      displayName\n    }\n    viewId\n    viewType\n    viewName\n    viewDescription\n    bizType\n    designerLayoutType\n    designerActionBarType\n    viewTitle\n    viewCategoryId\n    viewThumbnail\n    protocolVersion\n    designerJson\n    historyCount\n    errorJsonPaths\n    errorWidgetJsonPaths\n    isFloatActionBar\n  }\n}\n}`,Yt=e=>J(void 0,void 0,void 0,(function*(){const t=`query {\n    uiDesignerViewLayoutProxyQuery{\n      queryByViewId(request:{\n        viewId: ${e}\n      }) ${Ht}`,o=yield Kt.mutate(n["jb"],t);return o.data["uiDesignerViewLayoutProxyQuery"]["queryByViewId"]})),Qt=e=>J(void 0,void 0,void 0,(function*(){const t=`query {\n    uiDesignerViewLayoutProxyQuery{\n      queryByLayoutId (request:{\n        id: ${e}\n      }) ${Ht}`,o=yield Kt.mutate(n["jb"],t);return o.data["uiDesignerViewLayoutProxyQuery"]["queryByLayoutId"]})),Jt=(e,t,o)=>J(void 0,void 0,void 0,(function*(){const r=`mutation {\n\tuiDesignerViewLayoutProxyMutation {\n\t\tsaveLayout(request: { id: ${e}, designerJson: ${t}, models: ${i["GraphqlHelper"].serializableStringArray(o)} }) {\n\t\t\tid\n\t\t}\n\t}\n}\n`,a=yield Kt.mutate(n["jb"],r);return a.data["uiDesignerViewLayoutProxyMutation"]["saveLayout"]})),Xt=(e,t,o,r,a)=>J(void 0,void 0,void 0,(function*(){const l=`mutation {\n\tuiDesignerViewLayoutProxyMutation {\n\t\tsaveView(\n\t\t\trequest: {\n\t\t\t\tid: ${e}\n\t\t\t\tdesignerJson: ${t}\n\t\t\t\tmodels: ${i["GraphqlHelper"].serializableStringArray(o)}\n\t\t\t\tviewTitle: "${i["GraphqlHelper"].serializableSimpleString(r.name)}"\n\t\t\t\tviewDescription: "${i["GraphqlHelper"].serializableSimpleString(r.description||"")}"\n\t\t\t\tviewThumbnail: "${r.thumbnailUrl||""}"\n\t\t\t\t${r.currentCategoryId?"viewCategoryId: "+r.currentCategoryId:""}\n\t\t\t\tpublishLayoutIds: ${i["GraphqlHelper"].serializableStringArray(a)}\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t}\n\t}\n}\n`,s=yield Kt.mutate(n["jb"],l);return s.data["uiDesignerViewLayoutProxyMutation"]["saveView"]})),Zt=(e,t)=>J(void 0,void 0,void 0,(function*(){const o=`mutation {\n  uiDesignerViewLayoutProxyMutation {\n    saveViewInfo(\n      request: { id: ${e}, designerActionBarType: ${t} }\n    ) {\n      id\n      designerJson\n    }\n  }\n}`,r=yield Kt.mutate(n["jb"],o);return i["CastHelper"].cast(r.data["uiDesignerViewLayoutProxyMutation"]["saveViewInfo"])})),eo=(e,t)=>J(void 0,void 0,void 0,(function*(){const o=`mutation {\n  uiDesignerViewLayoutProxyMutation {\n    saveViewInfo(\n      request: { id: ${e}, designerLayoutType: ${t} }\n    ) {\n      id\n      designerJson\n    }\n  }\n}`,r=yield Kt.mutate(n["jb"],o);return i["CastHelper"].cast(r.data["uiDesignerViewLayoutProxyMutation"]["saveViewInfo"])})),to=(e,t,o,r)=>J(void 0,void 0,void 0,(function*(){const a=`mutation {\n    uiDesignerViewLayoutProxyMutation {\n      resetDefaultView(\n        request: {\n          id: ${e}\n          designerJson: ${t}\n          models: ${i["GraphqlHelper"].serializableStringArray(o)}\n          regenerateDefaultView: ${r.regenerateDefaultViewType} }\n      ) {\n        id\n        designerJson\n      }\n    }\n  }`,l=yield Kt.mutate(n["jb"],a);return i["CastHelper"].cast(l.data["uiDesignerViewLayoutProxyMutation"]["resetDefaultView"])})),oo=(e,t)=>J(void 0,void 0,void 0,(function*(){const{name:o,description:r,currentCategoryId:a,thumbnailUrl:l,isFloatActionBar:s}=t,c=`mutation {\n\tuiDesignerViewLayoutProxyMutation {\n\t\tsaveViewInfo(\n\t\t\trequest: {\n\t\t\t\tid: ${e}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("viewTitle",o)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("viewDescription",r)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("viewCategoryId",a)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("viewThumbnail",l)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("isFloatActionBar",s)}\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t}\n\t}\n}\n`,d=yield Kt.mutate(n["jb"],c);return i["CastHelper"].cast(d.data["uiDesignerViewLayoutProxyMutation"]["saveViewInfo"])})),io=e=>J(void 0,void 0,void 0,(function*(){const t=`{\n\tuiDesignerViewLayoutProxyQuery {\n\t\tqueryByModel(request: { model: "${e}" }) {\n\t\t  modelDefinition {\n        model\n        displayName\n      }\n      ${qt}\n\t\t}\n\t}\n}\n`,o=yield Kt.mutate(n["jb"],t);return o.data["uiDesignerViewLayoutProxyQuery"]["queryByModel"]})),no=e=>J(void 0,void 0,void 0,(function*(){const t=`query {\n\tuiDesignerExpandViewQuery {\n\t\tsave(\n\t\t\tdata: {\n\t\t\t  settingType: CREATE\n\t\t\t\tviewType: ${e}\n\t\t\t}\n\t\t) {\n\t\t\tdesignerJson\n\t\t\tprotocolVersion\n\t\t}\n\t}\n}\n`,o=yield Kt.mutate(n["jb"],t);return o.data.uiDesignerExpandViewQuery.save})),ro=(e,t)=>J(void 0,void 0,void 0,(function*(){const o=`query {\n\tuiDesignerExpandViewQuery {\n\t\tsave(\n\t\t\tdata: {\n\t\t\t  settingType: COPY\n\t\t\t\tlayoutId: "${i["GraphqlHelper"].serializableString(e)}"\n\t\t\t\tcopiedView: { model: "${t.model}", name: "${t.name}" }\n\t\t\t}\n\t\t) {\n\t\t\tdesignerJson\n\t\t\tprotocolVersion\n\t\t}\n\t}\n}\n`,r=yield Kt.mutate(n["jb"],o);return r.data.uiDesignerExpandViewQuery.save}));var ao=Object(a["defineComponent"])({name:"DesignerSetExpandRow",inheritAttrs:!1,components:{OioButton:r["OioButton"]},props:{loading:{type:Boolean,default:void 0},openDialog:{type:Function},title:{type:String}},setup(e){const{currentSelectedInstance:t,widgetNameGroup:o,widgetTypeGroup:i,PageDesignerMultiQueueEditor:n}=te(),r=()=>{var r,a,l,s;null===(r=e.openDialog)||void 0===r||r.call(e,null===(s=null===(l=null===(a=n.firstEditor)||void 0===a?void 0:a.editor)||void 0===l?void 0:l.currentData)||void 0===s?void 0:s.layoutId,t.value,o.value,i.value)};return{openDialog:r}},render(){return Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].primary,block:!0,onClick:this.openDialog},{default:()=>this.title})}});ao.__file="src/field/set-expand-row/SetExpandRow.vue";const lo="查看展开行视图",so="设置展开行视图";let co=class extends i["FormM2OSelectFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(ao),this}get title(){return this.viewType===i["ViewType"].Detail?Object(i["translateValueByKey"])(lo):Object(i["translateValueByKey"])(so)}fetchRuntimeView(){return J(this,void 0,void 0,(function*(){const e="ui.designer.UiDesignerExpandView";return i["ViewCache"].get(e,"UiDesignerExpandForm")}))}openDialog(e,t,o,r){var a,l;return J(this,void 0,void 0,(function*(){null===(a=this.dialogWidget)||void 0===a||a.dispose(),this.dialogWidget=void 0,null===(l=this.formWidget)||void 0===l||l.dispose(),this.formWidget=void 0;const s=yield this.fetchRuntimeView();if(!s)return;const c=s.model,u=Object(i["createRuntimeContextForWidget"])(s),p=u.handle,b=this.viewType===i["ViewType"].Detail,g=i["Dialog"].create();b?(g.setTitle(lo),g.setCancelText("关闭"),g.setOkInvisible(!0)):(g.setTitle(so),g.setOkText("确定"),g.setCancelText("取消"),g.on("ok",()=>J(this,void 0,void 0,(function*(){g.setActionLoading(!0);try{(yield this.onOk(e,t,o,r))&&g.onVisibleChange(!1)}finally{g.setActionLoading(!1)}})))),g.on("cancel",()=>{g.onVisibleChange(!1)});const v=b?new n["s"](t):new n["C"](t);let m;m=this.value?Object(d["a"])(this.value):yield Object(i["customQuery"])(c,"construct",yield u.getInitialValue(),void 0,void 0,void 0,{maxDepth:1});const y=g.createWidget(v,void 0,{metadataHandle:p,rootHandle:p,dataSource:m,activeRecords:m,template:u.viewTemplate,inline:!0});this.dialogWidget=g,this.formWidget=y,g.onVisibleChange(!0)}))}onOk(e,t,o,n){return J(this,void 0,void 0,(function*(){const{formWidget:a}=this;if(!a)return!1;if(!(yield a.validator()))return!1;const l=a.getData(),{settingType:s,viewType:c,model:d,copiedView:u,expandType:p,expandField:b}=l;let g;if(s===Rt.CREATE?g=(yield no(c)).designerJson:s===Rt.COPY&&(g=(yield ro(e,u)).designerJson),!g)return r["OioNotification"].warning(Object(i["translateValueByKey"])("警告"),Object(i["translateValueByKey"])("未找到设计数据，展开行无法进行编辑")),!1;const v=JSON.parse(g),m=d.model,y=this.value;if(y){const{expandType:e,expandField:o}=y;e&&e!==Lt.SELF?e===Lt.RELATION&&this.clearRelationFieldExpandRow(t,o):this.clearSelfExpandRow(t)}return p&&p!==Lt.SELF?p===Lt.RELATION&&this.createRelationFieldExpandRow(t,b,v,o,n,m):this.createSelfExpandRow(t,v,o,n,m),this.m2oChange(l),!0}))}createExpandColumnWidgetInstance(e,t){var o;let i=null===(o=n["R"].findWidgetInstance(e,n["B"].ELEMENT,[n["A"].EXPAND_COLUMN]))||void 0===o?void 0:o.element;return i||(i=n["wb"].createExpandColumnWidgetInstance(e,t),n["R"].add(e,i,0)),i}createSelfExpandRow(e,t,o,i,r){const a=this.createExpandColumnWidgetInstance(e,o);while(a.children.length)n["R"].remove(a,0);const l=Object(n["Lb"])(i,e,r,t);n["R"].add(a,l)}clearSelfExpandRow(e){var t;const o=null===(t=n["R"].findWidgetInstance(e,n["B"].ELEMENT,[n["A"].EXPAND_COLUMN]))||void 0===t?void 0:t.element;if(o)while(o.children.length)n["R"].remove(o,0)}findFieldInstance(e,t){var o,i,r;const a=t.name;return null===(r=null===(i=null===(o=n["R"].fetchAreaInstanceNullable(e,n["A"].DEFAULT))||void 0===o?void 0:o.element)||void 0===i?void 0:i.children)||void 0===r?void 0:r.find(e=>{var t;const o=e.element;return!(!o||o.bizType!==n["B"].FIELD)&&(null===(t=o.widgetData)||void 0===t?void 0:t.name)===a})}createRelationFieldExpandRow(e,t,o,i,r,a){this.createExpandColumnWidgetInstance(e,i);const l=this.findFieldInstance(e,t);if(l){while(l.children.length)n["R"].remove(l,0);const e=Object(n["Lb"])(r,l,a,o);n["R"].add(l,e)}}clearRelationFieldExpandRow(e,t){const o=this.findFieldInstance(e,t);if(o)while(o.children.length)n["R"].remove(o,0)}};Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],co.prototype,"title",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String,n["zb"],Map,Map]),Q("design:returntype",Promise)],co.prototype,"openDialog",null),co=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerSetExpandRow"}))],co);const uo="查看展开视图",po="设置展开视图";let bo=class extends co{get title(){return this.viewType===i["ViewType"].Detail?Object(i["translateValueByKey"])(uo):Object(i["translateValueByKey"])(po)}fetchRuntimeView(){return J(this,void 0,void 0,(function*(){const e="ui.designer.UiDesignerExpandView";return i["ViewCache"].get(e,"UiDesignerSelectForm")}))}createExpandColumnWidgetInstance(e,t){var o;let r=null===(o=n["R"].fetchAreaInstanceNullable(e,n["A"].CONTENT))||void 0===o?void 0:o.element;return r||(r=n["wb"].createAreaWidgetInstance(e,n["A"].CONTENT,{element:{title:Object(i["translateValueByKey"])(n["g"])}}),n["R"].add(e,r)),r}createSelfExpandRow(e,t,o,i,r){const a=this.createExpandColumnWidgetInstance(e,o);while(a.children.length)n["R"].remove(a,0);const l=Object(n["Lb"])(i,e,r,t);n["R"].add(a,l)}clearSelfExpandRow(e){var t;const o=null===(t=n["R"].fetchAreaInstanceNullable(e,n["A"].CONTENT))||void 0===t?void 0:t.element;if(o)while(o.children.length)n["R"].remove(o,0)}};Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],bo.prototype,"title",null),bo=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerSetSelectView"}))],bo);let go=class extends i["FormM2OSelectFieldWidget"]{loadOptions(e={}){const t=Object.create(null,{loadOptions:{get:()=>super.loadOptions}});return J(this,void 0,void 0,(function*(){const{target:o,popupSettingType:r,dialogSettingType:a,dialogModel:l,view:s,copiedView:d}=this.formData,u=r||a;if(!u)return[];let p,b;switch(o){case i["ViewActionTarget"].Router:case i["ViewActionTarget"].OpenWindow:switch(u){case n["bb"].BINDING:p=null===s||void 0===s?void 0:s.model;break;case n["bb"].CREATE:p=null===l||void 0===l?void 0:l.model;break}break;case i["ViewActionTarget"].Dialog:case i["ViewActionTarget"].Drawer:case i["ViewActionTarget"].Inner:switch(u){case n["bb"].BINDING:p=null===s||void 0===s?void 0:s.model;break;case n["bb"].COPY:p=null===d||void 0===d?void 0:d.model;break;case n["bb"].CREATE:p=null===l||void 0===l?void 0:l.model;break}break}if(!p)return[];const{condition:g}=e;return b=g?Object(c["a"])(g)?new i["Condition"](g):g:new i["Condition"](i["DEFAULT_TRUE_CONDITION"]),b.and(new i["Condition"](`namespace == ${p} and openLevel =has= ('API') and type =has= ('QUERY')`)),e.condition=b,t.loadOptions.call(this,e)}))}};function vo(e){const t=Object(a["computed"])(()=>{var t,o,i,r,a,l;let s=e.currentSelectedInstance.value;if(s)if(n["R"].isCard(s).result){const e=null===(t=s.element)||void 0===t?void 0:t.properties;if(e){const{clickActionName:t}=e,r=null===(o=n["R"].fetchAreaInstanceNullable(s,n["A"].CLICK))||void 0===o?void 0:o.element;if(r){const e=null===(i=r.children)||void 0===i?void 0:i.find(e=>{var o;const i=e.element;if(!i)return!1;const{bizType:r,name:a}=i,l=null===(o=i.widget)||void 0===o?void 0:o.widgetSubtype,s=r===n["B"].ACTION&&l===n["A"].VIEW_ACTION_TYPE;return!!s&&(!t||t===a)});e&&(s=e)}}}else if(n["R"].isTable(s).result){const e=null===(r=s.element)||void 0===r?void 0:r.properties;if(e){const{rowClickActionName:t}=e,o=null===(a=n["R"].fetchAreaInstanceNullable(s,n["A"].CLICK))||void 0===a?void 0:a.element;if(o){const e=null===(l=o.children)||void 0===l?void 0:l.find(e=>{var o;const i=e.element;if(!i)return!1;const{bizType:r,name:a}=i,l=null===(o=i.widget)||void 0===o?void 0:o.widgetSubtype,s=r===n["B"].ACTION&&l===n["A"].VIEW_ACTION_TYPE;return!!s&&(!t||t===a)});e&&(s=e)}}}return s});return{currentSelectedActionInstance:t}}go=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerViewActionLoadSelect"}))],go);const mo=(e,t,o)=>{var i;const r=t.element,a=n["W"].isAllowHasModal(t),l=n["K"].isAllowHasDrawer(t),s=n["P"].isAllowHasInnerPopup(t);if(a||l||s){if(null===o||void 0===o?void 0:o.isReset)while(t.children.length>0)n["R"].remove(t,0);if((null===(i=r.widget)||void 0===i?void 0:i.widgetSubtype)===n["A"].VIEW_ACTION_TYPE){const o=t.metadata||{},{popupSettingType:i,dialogSettingType:r,viewType:c,copiedView:d,dialogModel:u}=o,p=i||r;if(p===n["bb"].BINDING);else if(t.children.length)n["ab"].isReady(t);else switch(p){case n["bb"].COPY:a?e.copyModalWidgetInstance(t,d):l?e.copyDrawerWidgetInstance(t,d):s&&e.copyInnerPopupWidgetInstance(t,d);break;case n["bb"].CREATE:{const{model:o}=u;a?n["wb"].createAndAddModal(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,o,c):l?n["wb"].createAndAddDrawer(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,o,c):s&&n["wb"].createAndAddInnerPopup(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,o,c);break}}}}else while(t.children.length>0)n["R"].remove(t,0)};function yo(e){const{currentSelectedActionInstance:t}=vo({currentSelectedInstance:e.currentSelectedInstance}),o=Object(a["computed"])(()=>{var t,o;let i=e.currentSelectedInstance.value;if(i)if(n["R"].isCard(i).result){const e=null===(t=i.element)||void 0===t?void 0:t.properties;if(e)return{allowClick:!!e.allowClick,afterPropertiesSetter:c}}else if(n["R"].isTable(i).result){const e=null===(o=i.element)||void 0===o?void 0:o.properties;if(e)return{allowClick:!!e.allowRowClick,afterPropertiesSetter:d}}}),i=Object(a["computed"])(()=>{var e;return!!(null===(e=o.value)||void 0===e?void 0:e.allowClick)}),r=Object(a["ref"])(!1),l=(i=!1)=>J(this,void 0,void 0,(function*(){var a,l;let s,c=i?e.currentSelectedInstance.value:t.value;if(!c)return;const d=n["R"].isAction(c).result;if(!d)if(n["R"].isCard(c).result){const{clickArea:t,viewActionInstance:o}=fo(c,e.widgetNameGroup.value);s=t,c=o}else if(n["R"].isTable(c).result){const{clickArea:t,viewActionInstance:o}=wo(c,e.widgetNameGroup.value);s=t,c=o}else if(n["R"].isTree(c).result||n["R"].isCardCascader(c).result){const{clickArea:t,viewActionInstance:o}=ko(c,e.widgetNameGroup.value);s=t,c=o}c&&n["R"].isAction(c).result&&(r.value=!0,yield null===(a=e.openDesignerActionDialog)||void 0===a?void 0:a.call(e,e,c,r,null===(l=o.value)||void 0===l?void 0:l.afterPropertiesSetter,s))})),s=()=>{const t=e.currentSelectedInstance.value;t&&ho.clearDesignerAction(t)},c=(t,o)=>{var i,n,r;const a=e.currentSelectedInstance.value;if(!a)return;const l=null===(i=null===t||void 0===t?void 0:t.element)||void 0===i?void 0:i.name;if(l){const o=null===(r=null===(n=e.currentSelectedInstance.value)||void 0===n?void 0:n.element)||void 0===r?void 0:r.properties;o&&(o.clickActionName=l,mo(e,t))}o&&u(a,o)},d=(t,o)=>{var i,n;const r=e.currentSelectedInstance.value;if(!r)return;const a=null===(i=null===t||void 0===t?void 0:t.element)||void 0===i?void 0:i.name;if(a){const o=null===(n=null===r||void 0===r?void 0:r.element)||void 0===n?void 0:n.properties;o&&(o.rowClickActionName=a,mo(e,t))}o&&u(r,o)},u=(e,t)=>{const{bizType:o,subtype:i}=t.element,r=n["R"].findWidgetInstance(e,o,[i]);r&&n["R"].remove(e,r.index),n["R"].add(e,t)};return{isAllowEditAction:i,isEditingAction:r,onOpenDesignerAction:l,clearDesignerAction:s}}class ho{static findDesignerClickActionArea(e){return n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK)}static findDesignerClickAction(e){return n["R"].isCard(e).result?ho.findCardClickAction(e):n["R"].isTable(e).result?ho.findTableRowClickAction(e):n["R"].isTree(e).result||n["R"].isCardCascader(e).result?ho.findTreeSelectClickAction(e):void 0}static clearDesignerAction(e){n["R"].isCard(e).result?Oo(e):n["R"].isTable(e).result?jo(e):(n["R"].isTree(e).result||n["R"].isCardCascader(e).result)&&Co(e)}static afterPropertiesInstance(e,t){n["R"].isCard(e).result?ho.afterPropertiesCardClickInstance(e,t):n["R"].isTable(e).result?ho.afterPropertiesTableRowClickInstance(e,t):(n["R"].isTree(e).result||n["R"].isCardCascader(e).result)&&ho.afterPropertiesTreeSelectClickInstance(e,t)}static findCardClickAction(e){var t,o,i;const r=null===(t=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK))||void 0===t?void 0:t.element;if(!r)return;const a=null===(i=null===(o=e.element)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.clickActionName;return a?ho.findClickViewActionByName(r,a):void 0}static findTableRowClickAction(e){var t,o,i;const r=null===(t=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK))||void 0===t?void 0:t.element;if(!r)return;const a=null===(i=null===(o=e.element)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.rowClickActionName;return a?ho.findClickViewActionByName(r,a):void 0}static findTreeSelectClickAction(e){var t,o,i;const r=null===(t=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK))||void 0===t?void 0:t.element;if(!r)return;const a=null===(i=null===(o=e.element)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.selectActionName;return a?ho.findClickViewActionByName(r,a):void 0}static findClickViewActionByName(e,t){var o;return null===(o=e.children)||void 0===o?void 0:o.find(e=>{const o=e.element;if(!o)return!1;const{bizType:i,subtype:r,name:a}=o;let l=i===n["B"].ACTION&&r===n["A"].VIEW_ACTION;return!!l&&t===a})}static afterPropertiesCardClickInstance(e,t){var o,i;const n=null===(o=e.element)||void 0===o?void 0:o.properties,r=null===(i=t.element)||void 0===i?void 0:i.name;n&&r&&(n.clickActionName=r)}static afterPropertiesTableRowClickInstance(e,t){var o,i;const n=null===(o=e.element)||void 0===o?void 0:o.properties,r=null===(i=t.element)||void 0===i?void 0:i.name;n&&r&&(n.rowClickActionName=r)}static afterPropertiesTreeSelectClickInstance(e,t){var o,i;const n=null===(o=e.element)||void 0===o?void 0:o.properties,r=null===(i=t.element)||void 0===i?void 0:i.name;n&&r&&(n.selectActionName=r)}}function fo(e,t){const o=Do(e),i=To(o,t);return{clickArea:o,viewActionInstance:i}}function Oo(e){const t=e.element.properties;t&&(t.clickActionName=null);const o=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK);o&&n["R"].remove(e,o.index)}function wo(e,t){const o=Do(e),i=To(o,t);return{clickArea:o,viewActionInstance:i}}function jo(e){const t=e.element.properties;t&&(t.rowClickActionName=null);const o=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK);o&&n["R"].remove(e,o.index)}function ko(e,t){const o=Do(e),i=To(o,t);return{clickArea:o,viewActionInstance:i}}function Co(e){const t=e.element.properties;t&&(t.selectActionName=null);const o=n["R"].fetchAreaInstanceNullable(e,n["A"].CLICK);o&&n["R"].remove(e,o.index)}function Do(e){return n["wb"].createAreaWidgetInstance(e,n["A"].CLICK,{element:{title:Object(i["translateValueByKey"])(n["f"]),isVirtual:!1,isShow:!1,disableSelected:!0}})}function To(e,t){const o=n["wb"].createViewWidgetInstance(e,t,{element:{disableSelected:!0}});return n["R"].add(e,o),o}var $o=Object(a["defineComponent"])({name:"DesignerViewActionSelect",components:{VNodes:(e,{attrs:t})=>t.vnodes,OioButton:r["OioButton"],OioEmpty:r["OioEmpty"],OioSpin:r["OioSpin"],CheckOutlined:W["a"]},inheritAttrs:!1,props:Object.assign(Object.assign({},i["RelationSelectProps"]),{value:Object,currentReadonlyValue:{type:Object},currentValueLabel:String,loading:{type:Boolean,default:void 0},handleSelectedValueLabel:Function,setCurrentInstance:{type:Function},openDesignerActionDialog:{type:Function}}),setup(e){const t=Object(i["useInjectOioDefaultFormContext"])(),{currentSelectedInstance:o,widgetNameGroup:r,widgetTypeGroup:l,copyModalWidgetInstance:s,copyDrawerWidgetInstance:c,copyInnerPopupWidgetInstance:d}=te(),{isEditingAction:u,onOpenDesignerAction:p,clearDesignerAction:b}=yo({currentSelectedInstance:o,widgetNameGroup:r,widgetTypeGroup:l,copyModalWidgetInstance:s,copyDrawerWidgetInstance:c,copyInnerPopupWidgetInstance:d,openDesignerActionDialog:e.openDesignerActionDialog}),{currentSelectedActionInstance:g}=vo({currentSelectedInstance:o}),v=Object(a["computed"])(()=>{const e=g.value;return e&&n["R"].isAction(e).result}),m=Object(a["computed"])(()=>e.value&&e.value[e.relationFieldKey]?{label:e.value.displayName,value:e.value[e.relationFieldKey]}:null),y=Object(a["computed"])(()=>i["StringHelper"].append(["designer-view-action-select-dropdown"],e.dropdownClassName).join(" ")),h=t=>{var o;null===(o=e.change)||void 0===o||o.call(e,t),t||b()},f=()=>J(this,void 0,void 0,(function*(){yield p(!0)})),O=()=>J(this,void 0,void 0,(function*(){yield p()}));return Object(a["watch"])(o,t=>{var o;null===(o=e.setCurrentInstance)||void 0===o||o.call(e,t)},{immediate:!0}),Object.assign(Object.assign({},Object(i["relationSelectSetup"])(e)),{currentValue:m,dropdownClassName:y,getTriggerContainer:t.getTriggerContainer,isEditingAction:u,hasCreatedAction:v,onOpenCreateDesignerAction:f,onOpenSeekDesignerAction:O,change:h})}});const Eo={class:"form-single-select designer-view-action-select"},So={key:0,class:"designer-view-action-select-readonly"},No={key:0,class:"designer-view-action-select-readonly-label"},Vo={class:"form-relation-select-seek-detail"},xo={class:"form-relation-select-dropdown-spin"},Io={class:"form-relation-select-dropdown-create"},Mo={class:"form-relation-select-seek-detail"};function Ao(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-empty"),s=Object(a["resolveComponent"])("oio-button"),c=Object(a["resolveComponent"])("v-nodes"),d=Object(a["resolveComponent"])("oio-spin"),u=Object(a["resolveComponent"])("a-select");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Eo,[e.innerReadonly&&!e.innerDisabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",So,[e.currentReadonlyValue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",No,Object(a["toDisplayString"])(e.currentReadonlyValue.label),1)):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,class:"designer-view-action-select-readonly-label"})),Object(a["createElementVNode"])("div",Vo,[e.hasCreatedAction?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,icon:"oinone-chakanxiangqing",type:"link",onClick:e.onOpenSeekDesignerAction},null,8,["onClick"])):Object(a["createCommentVNode"])("v-if",!0)])])):(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:1,loading:e.loading||e.isEditingAction},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{"allow-clear":e.allowClear,"default-active-first-option":!1,disabled:e.innerDisabled,dropdownClassName:e.dropdownClassName,"filter-option":!1,getPopupContainer:e.getTriggerContainer,options:e.options,placeholder:e.innerReadonly||e.innerDisabled?"":e.placeholder,"show-search":e.showSearch,value:e.currentValue,class:"oio-select","label-in-value":"",onBlur:e.blur,onChange:e.change,onSearch:e.search,onSelect:e.innerSelect,onPopupScroll:e.slipSelect},{dropdownRender:Object(a["withCtx"])(({menuNode:t})=>[Object(a["createVNode"])(c,{vnodes:t},null,8,["vnodes"]),Object(a["createElementVNode"])("div",xo,[e.loadMoreLoading?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,size:"small",loading:""})):Object(a["createCommentVNode"])("v-if",!0)]),Object(a["createElementVNode"])("div",Io,[Object(a["createVNode"])(s,{block:"",icon:"oinone-fangda",type:"link",onClick:e.onOpenCreateDesignerAction},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("新建跳转动作")),1)]),_:1},8,["onClick"])])]),_:1},8,["allow-clear","disabled","dropdownClassName","getPopupContainer","options","placeholder","show-search","value","onBlur","onChange","onSearch","onSelect","onPopupScroll"]),Object(a["createElementVNode"])("div",Mo,[e.hasCreatedAction?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,icon:"oinone-chakanxiangqing",type:"link",onClick:e.onOpenSeekDesignerAction},null,8,["onClick"])):Object(a["createCommentVNode"])("v-if",!0)])]),_:1},8,["loading"]))])}$o.render=Ao,$o.__file="src/field/view-action-select/ViewActionSelect.vue";let Fo=class extends i["FormM2OSelectFieldWidget"]{constructor(){super(...arguments),this.instanceCache={}}initialize(e){return super.initialize(e),this.setComponent($o),this}setCurrentInstance(e){this.currentInstance=e}openDesignerActionDialog(e,t,o,a,l){var s,c,d;return J(this,void 0,void 0,(function*(){null===(s=this.dialogWidget)||void 0===s||s.dispose(),this.dialogWidget=void 0,null===(c=this.formWidget)||void 0===c||c.dispose(),this.formWidget=void 0;const e=!!l,u=!!(null===(d=null===t||void 0===t?void 0:t.element)||void 0===d?void 0:d.name),p="ui.designer.ViewActionMetaConfig",b=u?"ViewActionMetaDialogDetail":"ViewActionMetaDialogForm",g=yield i["ViewCache"].get(p,b);if(!g)return r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("未正确获取视图")),void(o.value=!1);const v=Object(i["createRuntimeContextForWidget"])(g),m=v.handle,y=i["Dialog"].create();e?(y.setTitle("创建跳转动作"),y.setOkText("保存")):(y.setTitle("查看跳转动作"),y.setOkInvisible(!0)),y.setCancelText("返回"),y.setZIndex(99999),y.on("ok",()=>J(this,void 0,void 0,(function*(){var e,n,r;y.setActionLoading(!0);try{if(yield null===(e=this.formWidget)||void 0===e?void 0:e.validator()){const e=null===(r=yield null===(n=this.formWidget)||void 0===n?void 0:n.submit())||void 0===r?void 0:r.records,s=null===t||void 0===t?void 0:t.element,c=yield Object(i["customMutation"])(t.element.widget.widgetMetaModel,"saveMetaInfo",Object.assign(Object.assign({},e),{layoutId:this.layoutId,model:null===s||void 0===s?void 0:s.model,name:null===s||void 0===s?void 0:s.name,metaExtends:null===s||void 0===s?void 0:s.metaExtends}));if(!c)return;const{name:d,metadata:u,metaExtends:p}=c;t.element.name=d,t.element.widgetData=u,t.element.initialization=!0,t.metadata=c,t.element.metaExtends=p,this.dataList.push(u),this.change(u),null===a||void 0===a||a(t,l),o.value=!1,y.onVisibleChange(!1)}}finally{y.setActionLoading(!1)}}))),y.on("cancel",()=>{o.value=!1,y.onVisibleChange(!1)});let h=i["FormWidget"];u&&(h=i["DetailWidget"]);const f=null===t||void 0===t?void 0:t.element,O=yield Object(i["customQuery"])(p,"construct",Object.assign(Object.assign({},yield v.getInitialValue()),{element:{bizType:null===f||void 0===f?void 0:f.bizType,subtype:null===f||void 0===f?void 0:f.subtype,model:null===f||void 0===f?void 0:f.model,widget:null===f||void 0===f?void 0:f.widget,name:e||null===f||void 0===f?void 0:f.name,title:null===f||void 0===f?void 0:f.title,metaExtends:null===f||void 0===f?void 0:f.metaExtends}}),void 0,void 0,void 0,{maxDepth:1}),w=y.createWidget(h,void 0,{metadataHandle:m,rootHandle:m,dataSource:O,activeRecords:O,template:v.viewTemplate,inline:!0}),j=w.getData(),{widgetViewType:k}=Object(n["uc"])(t);t.metadata=j,t.element.widgetData=j.metadata,j[n["Dc"]]=!0,j[n["Pc"]]=t.element.model,j[n["rd"]]=k,t.isReady||(t.isReady=!0,t.notifyParentIsReady()),this.dialogWidget=y,this.formWidget=w,y.onVisibleChange(!0)}))}get currentReadonlyValue(){return this.handleTableLabel(this.value)}handleTableLabel(e){var t;const o=this.optionLabel||(null===(t=this.referencesModel)||void 0===t?void 0:t.label);let n;return n=Object(i["isEmptyValue"])(o)?Object(i["autoFillByLabelFields"])(this.relationFieldKey,e,this.labelFields,this.separator):Object(i["autoFillByLabel"])(this.relationFieldKey,e,o,this.optionLabelContextArgs),n}change(e){var t;const{value:o,currentInstance:i}=this;if(o&&e&&`${o.model}#${o.name}`===`${e.model}#${e.name}`)return;let r,a;if(i&&(r=null===(t=ho.findDesignerClickActionArea(i))||void 0===t?void 0:t.element,a=ho.findDesignerClickAction(i)),o&&r&&a){const{model:e,name:t}=o;if(e&&t){const i=`${e}#${t}`;this.instanceCache[i]={data:o,clickAreaInstance:r,viewActionInstance:a}}}super.change(e);const{value:l}=this;if(i&&ho.clearDesignerAction(i),i&&l){const{model:e,name:t}=l;if(e&&t){const o=`${e}#${t}`,r=this.instanceCache[o];if(r){n["R"].add(i,r.clickAreaInstance),ho.afterPropertiesInstance(i,r.viewActionInstance);const e=ho.findDesignerClickAction(i);e&&n["ab"].isReady(e)}}}}$$mounted(){super.$$mounted();const{value:e,currentInstance:t}=this;if(e&&t){const e=ho.findDesignerClickAction(t);if(e){const t=e.element,o="ui.designer.ViewActionMetaConfig";this.loading=!0,Object(i["customQuery"])(o,"construct",{element:{bizType:t.bizType,subtype:t.subtype,model:t.model,widget:e.currentWidget,name:t.name,title:t.title,metaExtends:t.metaExtends}},void 0,void 0,void 0,{maxDepth:1}).then(o=>{const{widgetViewType:i}=Object(n["uc"])(e);e.metadata=o,t.widgetData=o.metadata,o[n["Dc"]]=!0,o[n["Pc"]]=e.element.model,o[n["rd"]]=i,e.isReady||(e.isReady=!0,e.notifyParentIsReady()),n["ab"].isReady(e)}).finally(()=>{this.loading=!1})}}}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],Fo.prototype,"layoutId",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Fo.prototype,"currentInstance",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Fo.prototype,"setCurrentInstance",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,n["zb"],Object,Function,Object]),Q("design:returntype",Promise)],Fo.prototype,"openDesignerActionDialog",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Fo.prototype,"currentReadonlyValue",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Fo.prototype,"change",null),Fo=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerViewActionSelect"}))],Fo);var Lo=Object(a["defineComponent"])({name:"UiTableClickActionSelect",props:{options:{type:Array,default:()=>[]},change:{type:Function,default:()=>({})},blur:{type:Function,default:()=>({})},focus:{type:Function,default:()=>({})},value:{type:String,default:""}},components:{OioSelect:r["OioSelect"]},setup(e){const t=t=>{e.change(t.value)};return{onChange:t}}});const Ro={class:"form-single-select"};function Bo(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-select");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ro,[Object(a["createVNode"])(l,{value:e.value,defaultValue:e.value,options:e.options,onBlur:e.blur,onChange:e.onChange,allowClear:""},null,8,["value","defaultValue","options","onBlur","onChange"])])}Lo.render=Bo,Lo.__file="src/field/view-action-select/UiTableClickActionSelect.vue";let _o=class extends i["FormFieldWidget"]{get options(){var e,t;const o=null===(t=null===(e=this.currentInstance)||void 0===e?void 0:e.root)||void 0===t?void 0:t.actionCollection;if(!o)return[];let i=[];return o.forEach(e=>{const{parent:t,element:o}=e;if(o.widgetData){const{name:e,displayName:r}=o.widgetData,a=null===t||void 0===t?void 0:t.element.subtype;a&&[n["A"].ROW_ACTIONS_WIDGET,n["A"].ROW_ACTIONS].includes(a)&&i.push({value:e||o.name,label:r})}}),i}initialize(e){return super.initialize(e),this.setComponent(Lo),this}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],_o.prototype,"currentInstance",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],_o.prototype,"options",null),_o=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({widget:"UiTableClickActionSelect"}))],_o);const Wo=i["HttpClient"].getInstance(),Po="\n        id\n        code\n        model\n        field\n        key\n        expressionType\n        rowList{\n          rowType\n          connector {\n            cellType\n            original\n            translation\n          }\n          blockList{\n            blockType\n            original\n            translation\n            cellList{\n              translation\n              original\n              cellType\n              value\n              ttype\n              multi\n              bitEnum\n              store\n            }\n            ##函数特殊类型\n            fun{\n              translation\n              original\n              cellType\n            }\n            funArgList{\n              cellList{\n               translation\n               original\n               cellType\n               value\n               ttype\n               multi\n               bitEnum\n               store\n              }\n              blockType\n            }\n          }\n        }",zo="ui.designer.BaseWidget",Go="widgetAttr";function Uo(e,t,o,n){return J(this,void 0,void 0,(function*(){let e="designerExpressionDefinitionQuery",t="";n&&(e="designerExpressionDHistoryQuery",t=`, version: "${n}"`);const r=`\n      query{\n        ${e}{\n          queryOne(query: {model: "${zo}", field: "${Go}", key: "${o}"${t}}) {\n            ${Po}\n          }\n        }\n      }\n  `,a=yield Wo.query(i["SYSTEM_MODULE_NAME"].DESIGNER_COMMON,r);return a.data[e].queryOne}))}function Ko(e){return J(this,void 0,void 0,(function*(){const t=`\n      mutation{\n        designerExpressionDefinitionMutation{\n          queryModelLabelExpByModel(data: {model: "designer.DesignerModelDefinition", field: "label", key: "${e}"}) {\n            ${Po}\n          }\n        }\n      }\n  `,o=yield Wo.query(i["SYSTEM_MODULE_NAME"].DESIGNER_COMMON,t);return o.data.designerExpressionDefinitionMutation.queryModelLabelExpByModel}))}var qo=Object(a["defineComponent"])({components:{RequestParamsTable:l["I"],OioButton:r["OioButton"],OioModal:r["OioModal"]},props:{dialogTitle:{type:String,default:""},deep:{type:Boolean,default:!0},notObjectTypeWithDisableMulti:{type:Boolean,default:!1},canSelectedComplexField:{type:Boolean,default:!0},showExpressTips:{type:Boolean,default:!1},tableData:{type:Array,default:()=>[]},value:{type:String,default:""},columns:{type:Array,default:()=>[]},customFunOptions:{type:Array,default:()=>[]},filterParamsTypes:{type:Function},retryValidator:{type:Function,required:!0},readonly:{type:Boolean,default:!1},expressionOption:{type:Object},model:{type:Object},field:{type:Object},formData:{type:Object},contextItems:Array,initExpressionItemList:{type:Function},tryParseToTableData:{type:Function,required:!0},enableJsonParse:{type:Boolean,required:!0},jsonType:{type:String,default:l["y"].OBJECT},valueExprFieldName:{type:String,default:"valueExpr"},onSelectedKeyChange:{type:Function},currentModelField:{type:Array,default:()=>[]},onLoadReferenceModelField:{type:Function,default:()=>()=>null}},setup(e){const t=Object(a["ref"])(!1),o=o=>{o&&(t.value=!1,e.retryValidator())};return{customRetryValidator:o,visibleModal:t,translateValueByKey:i["translateValueByKey"]}}});const Ho={class:"ui-mapping-component"};function Yo(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("RequestParamsTable"),c=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",Ho,[Object(a["createVNode"])(l,{type:"primary",onClick:t[0]||(t[0]=t=>e.visibleModal=!0)},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.dialogTitle),1)]),_:1})]),Object(a["createVNode"])(c,{"cancel-callback":()=>e.visibleModal=!1,"enter-callback":()=>e.customRetryValidator(!0),title:e.dialogTitle,visible:e.visibleModal,"z-index":"2000",class:"add-view-pre-dialog",height:"60%",width:"60%"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,Object(a["mergeProps"])(e.$props,{retryValidator:e.customRetryValidator}),null,16,["retryValidator"])]),_:1},8,["cancel-callback","enter-callback","title","visible"])],64)}qo.render=Yo,qo.__file="src/field/params/ui-mapping-component/UiMappingComponent.vue";class Qo extends l["G"]{constructor(){super(...arguments),this.needUpdateTableData=!0,this.expEntity={},this.currentModelField=[]}initialize(e){return super.initialize(e),this.setComponent(qo),this}get valueExprFieldName(){return"to"}retryValidator(e=null){return J(this,void 0,void 0,(function*(){return this.needUpdateTableData=!1,this.change(JSON.stringify(this.tableData.map(e=>Object.assign(Object.assign({},e),{expItems:null})))),this.validatorSuccess()}))}executeValidator(){return J(this,void 0,void 0,(function*(){return this.validatorSuccess()}))}updateTableData(e){this.needUpdateTableData&&super.updateTableData(e),this.needUpdateTableData=!0}fetchCustomFunOptions(){return J(this,void 0,void 0,(function*(){}))}get expressionOption(){return{type:i["ExpressionDefinitionType"].OPERATION,labelDisplayType:i["IExpressionLabelDisplayType"].DISPLAY_NAME,variableContextItems:this.contextItems,quoteType:i["IExpressionQuoteType"].SINGLE,useContextName:!0}}get contextItems(){const{contextItems:e}=this.getDsl(),t=[...Object(i["createContextItems"])(e,this.formData._model,this.formData._model)];return t}get queryExpressionParam(){var e,t;return{model:zo,field:Go,key:null===(e=this.expEntity)||void 0===e?void 0:e.designKey,version:null===(t=this.expEntity)||void 0===t?void 0:t.version}}get expKeyPrefix(){return this.formData._metadata.name}genExpressionParamKey(e){return`${this.model}#${this.field.data}${e}`}getModelFieldByModelModel(e,t){return J(this,void 0,void 0,(function*(){const o=yield i["ModelCache"].get(e);return((null===o||void 0===o?void 0:o.modelFields)||[]).map(e=>Object.assign(Object.assign({},e),{isLeaf:"boolean"===typeof t?t:!Object(i["isRelationField"])(e),value:e.name}))}))}onLoadReferenceModelField(e){return J(this,void 0,void 0,(function*(){const t=e[e.length-1];t.loading=!0;const{references:o}=t;t.children=yield this.getModelFieldByModelModel(o,!0),this.currentModelField=[...this.currentModelField]}))}loadMissingData(e,t=this.currentModelField){if(!e||0===e.length)return;const o=e[0],i=t.find(e=>e.value===o);i&&(i.children||(this.onLoadReferenceModelField([i]),i.loading=!0),this.loadMissingData(e.slice(1),i.children))}mounted(){return J(this,void 0,void 0,(function*(){this.value&&this.updateTableData(this.value);const e=yield this.getModelFieldByModelModel(this.formData._model);this.currentModelField=e;const t=e=>J(this,void 0,void 0,(function*(){var o;if(Array.isArray(e))for(const i of e)yield this.loadMissingData(i[this.valueExprFieldName]),(null===(o=i.children)||void 0===o?void 0:o.length)&&t(i.children)}));t(this.tableData)}))}}Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qo.prototype,"valueExprFieldName",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Qo.prototype,"retryValidator",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],Qo.prototype,"expEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qo.prototype,"expressionOption",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Qo.prototype,"contextItems",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qo.prototype,"queryExpressionParam",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qo.prototype,"expKeyPrefix",null),Y([i["Widget"].Reactive(),Q("design:type",Array)],Qo.prototype,"currentModelField",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Qo.prototype,"onLoadReferenceModelField",null);let Jo=class extends Qo{constructor(){super(...arguments),this.dialogTitle=Object(i["translateValueByKey"])("Body参数配置")}get columnOptions(){const e=this.formData.bodyParams?JSON.parse(this.formData.bodyParams):[];return e.map(e=>Object.assign(Object.assign({},e),{desc:[e.desc,e.key].filter(Boolean).join("- ")}))}get defaultColumns(){return[{title:Object(i["translateValueByKey"])("参数名"),dataIndex:"key",key:"key",component:"select",options:this.columnOptions},{title:Object(i["translateValueByKey"])("赋值表达式"),dataIndex:"to",key:"to",component:"treeSelect"},{title:"",dataIndex:"operator",key:"operator",width:"50px"}]}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Jo.prototype,"dialogTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Jo.prototype,"columnOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Jo.prototype,"defaultColumns",null),Jo=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Text,widget:"UiBodyMappingWidget"}))],Jo);let Xo=class extends Qo{constructor(){super(...arguments),this.dialogTitle=Object(i["translateValueByKey"])("Header参数配置")}get columnOptions(){const e=this.formData.headerParams?JSON.parse(this.formData.headerParams):[];return e.map(e=>Object.assign(Object.assign({},e),{desc:[e.desc,e.key].filter(Boolean).join("- ")}))}get defaultColumns(){return[{title:Object(i["translateValueByKey"])("参数名"),dataIndex:"key",key:"key",component:"select",options:this.columnOptions},{title:Object(i["translateValueByKey"])("赋值表达式"),dataIndex:"to",key:"to",component:"treeSelect"},{title:"",dataIndex:"operator",key:"operator",width:"50px"}]}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Xo.prototype,"dialogTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Xo.prototype,"columnOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Xo.prototype,"defaultColumns",null),Xo=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Text,widget:"UiHeaderMappingWidget"}))],Xo);let Zo=class extends Qo{constructor(){super(...arguments),this.dialogTitle=Object(i["translateValueByKey"])("响应参数配置")}get columnOptions(){const e=this.formData.responseParams?JSON.parse(this.formData.responseParams):[];return e.map(e=>Object.assign(Object.assign({},e),{desc:[e.desc,e.key].filter(Boolean).join("- ")}))}get defaultColumns(){return[{title:Object(i["translateValueByKey"])("参数名"),dataIndex:"key",key:"key",component:"select",options:this.columnOptions},{title:Object(i["translateValueByKey"])("赋值表达式"),dataIndex:"to",key:"to",component:"treeSelect"},{title:"",dataIndex:"operator",key:"operator",width:"50px"}]}onSelectedKeyChange(e,t){t.valueExpr=e.valueExpr}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Zo.prototype,"dialogTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Zo.prototype,"columnOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Zo.prototype,"defaultColumns",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],Zo.prototype,"onSelectedKeyChange",null),Zo=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Text,widget:"UiResponseMappingWidget"}))],Zo);let ei=class extends Qo{constructor(){super(...arguments),this.dialogTitle=Object(i["translateValueByKey"])("请求参数配置")}get columnOptions(){const e=this.formData.queryParams?JSON.parse(this.formData.queryParams):[];return e.map(e=>Object.assign(Object.assign({},e),{desc:[e.desc,e.key].filter(Boolean).join("- ")}))}get defaultColumns(){return[{title:Object(i["translateValueByKey"])("参数名"),dataIndex:"key",key:"key",component:"select",options:this.columnOptions},{title:Object(i["translateValueByKey"])("赋值表达式"),dataIndex:"to",key:"to",component:"treeSelect"},{title:"",dataIndex:"operator",key:"operator",width:"50px"}]}};Y([i["Widget"].Reactive(),Q("design:type",Object)],ei.prototype,"dialogTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ei.prototype,"columnOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ei.prototype,"defaultColumns",null),ei=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Text,widget:"UiQueryMappingWidget"}))],ei);let ti=class extends Qo{constructor(){super(...arguments),this.dialogTitle=Object(i["translateValueByKey"])("Path参数配置")}get columnOptions(){const e=this.formData.pathParams?JSON.parse(this.formData.pathParams):[];return e.map(e=>Object.assign(Object.assign({},e),{desc:[e.desc,e.key].filter(Boolean).join("- ")}))}get defaultColumns(){return[{title:Object(i["translateValueByKey"])("参数名"),dataIndex:"key",key:"key",component:"select",options:this.columnOptions},{title:Object(i["translateValueByKey"])("赋值表达式"),dataIndex:"to",key:"to",component:"treeSelect"},{title:"",dataIndex:"operator",key:"operator",width:"50px"}]}};Y([i["Widget"].Reactive(),Q("design:type",Object)],ti.prototype,"dialogTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ti.prototype,"columnOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ti.prototype,"defaultColumns",null),ti=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Text,widget:"UiPathMappingWidget"}))],ti);let oi=class extends i["FormEnumFieldWidget"]{constructor(){super(...arguments),this.currentOptions=[],this.resourceDateTimeFormat={},this.resourceDateFormat={},this.resourceTimeFormat={}}watchValue(){const{dateFormat:e,timeFormat:t}=this.formData,o=this.resourceDateFormat,i=this.resourceTimeFormat,n=[o[e],i[t]].filter(Boolean);this.formData.format=n.join(" ")}get options(){const e=super.options,t=e.filter(e=>{var t;return null===(t=this.resourceDateFormat)||void 0===t?void 0:t[e.name]});return t.length?t.map(e=>{var t,o;const n=null===(t=this.resourceDateFormat)||void 0===t?void 0:t[e.name],r=null===(o=this.resourceDateFormat)||void 0===o?void 0:o[e.name+"_MAP"],a=r.value.map(e=>{var t;const o=(null===(t=Object(i["getResourceDateFormatOptions"])().find(t=>t.id===e.id))||void 0===t?void 0:t.options)||[],n=o.find(t=>t.code===e.code),r=(null===n||void 0===n?void 0:n.showName)||(null===n||void 0===n?void 0:n.displayName);return r+e.concat||""}).join("");return{displayName:a,name:e.name,value:n}}):e}created(){return J(this,void 0,void 0,(function*(){this.resourceDateTimeFormat=yield Object(i["queryResourceDateTimeFormat"])(),this.resourceDateFormat=i["ObjectUtils"].toUpperSnakeCase(this.resourceDateTimeFormat.resourceDateFormat),this.resourceTimeFormat=i["ObjectUtils"].toUpperSnakeCase(this.resourceDateTimeFormat.resourceTimeFormat)}))}};Y([i["Widget"].Reactive(),Q("design:type",Array)],oi.prototype,"currentOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],oi.prototype,"resourceDateTimeFormat",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],oi.prototype,"resourceDateFormat",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],oi.prototype,"resourceTimeFormat",void 0),Y([i["Widget"].Watch("value",{deep:!0,immediate:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],oi.prototype,"watchValue",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],oi.prototype,"options",null),oi=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].Enum,widget:"DateFormat"}))],oi);let ii=class extends oi{get options(){const e=super.options,t=e.filter(e=>{var t;return null===(t=this.resourceTimeFormat)||void 0===t?void 0:t[e.name]});return t.length?t.map(e=>{var t,o;const n=null===(t=this.resourceTimeFormat)||void 0===t?void 0:t[e.name],r=null===(o=this.resourceTimeFormat)||void 0===o?void 0:o[e.name+"_MAP"],a=r.value.map(e=>{var t;const o=(null===(t=Object(i["getResourceTimeFormatOptions"])().find(t=>t.id===e.id))||void 0===t?void 0:t.options)||[],n=o.find(t=>t.code===e.code),r=(null===n||void 0===n?void 0:n.showName)||(null===n||void 0===n?void 0:n.displayName);return r+e.concat||""}).join("");return{displayName:a,name:e.name,value:n}}):e}};Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],ii.prototype,"options",null),ii=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].Enum,widget:"TimeFormat"}))],ii);var ni=Object(a["defineComponent"])({name:"BorderSelect",inheritAttrs:!1,components:{OioButton:r["OioButton"]},props:Object.assign(Object.assign({},i["OioCommonProps"]),{value:{type:Array},options:{type:Array,default:()=>[]},formData:{type:Object,default:()=>({})},showBorderOperator:{type:Boolean},onChangeBorderPosition:{type:Function,required:!0},onSetContainerBorder:{type:Function,required:!0},onRemoveContainerBorder:{type:Function,required:!0}}),setup(e){const t=Object(a["ref"])([]),o=Object(a["computed"])(()=>e.formData.borderTop),i=Object(a["computed"])(()=>e.formData.borderRight),n=Object(a["computed"])(()=>e.formData.borderBottom),r=Object(a["computed"])(()=>e.formData.borderLeft),l=t=>{switch(t){case"TOP":e.onChangeBorderPosition("borderTop");break;case"RIGHT":e.onChangeBorderPosition("borderRight");break;case"BOTTOM":e.onChangeBorderPosition("borderBottom");break;case"LEFT":e.onChangeBorderPosition("borderLeft");break}};return Object(a["watch"])(()=>e.value,e=>{t.value=e||[]},{immediate:!0,deep:!0}),{selectedOptions:t,isTopSelected:o,isRightSelected:i,isBottomSelected:n,isLeftSelected:r,onClickOption:l}}});const ri={class:"border-select"},ai={class:"border-select-options-middle"},li={key:0,class:"containers-border-setting-btn"};function si(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",ri,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-top"]),onClick:t[0]||(t[0]=t=>e.onClickOption("TOP"))}),Object(a["createElementVNode"])("div",ai,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-left"]),onClick:t[1]||(t[1]=t=>e.onClickOption("LEFT"))}),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-right"]),onClick:t[2]||(t[2]=t=>e.onClickOption("RIGHT"))})]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-option","border-select-option-bottom"]),onClick:t[3]||(t[3]=t=>e.onClickOption("BOTTOM"))}),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["border-select-status",e.isTopSelected&&"border-select-top-status",e.isRightSelected&&"border-select-right-status",e.isBottomSelected&&"border-select-bottom-status",e.isLeftSelected&&"border-select-left-status"])},null,2)]),e.showBorderOperator?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",li,[Object(a["createVNode"])(l,{size:"small",type:"primary",onClick:e.onSetContainerBorder},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("应用于所有容器边框")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(l,{size:"small",type:"primary",onClick:e.onRemoveContainerBorder},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("清除所有容器边框")),1)]),_:1},8,["onClick"])])):Object(a["createCommentVNode"])("v-if",!0)],64)}ni.render=si,ni.__file="src/field/containers-border-setting/ContainersBorderSetting.vue";let ci=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(ni),this}onChangeBorderPosition(e){this.formData[e]=!this.formData[e]}get showBorderOperator(){var e;return"ContainersBorderSetting"===(null===(e=this.field.template)||void 0===e?void 0:e.widget)}onSetContainerBorder(){this.formData.setContainerBorderTimeStamp=Object(i["uniqueKeyGenerator"])()}onRemoveContainerBorder(){this.formData.clearContainerBorderTimeStamp=Object(i["uniqueKeyGenerator"])()}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],ci.prototype,"onChangeBorderPosition",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ci.prototype,"showBorderOperator",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],ci.prototype,"onSetContainerBorder",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],ci.prototype,"onRemoveContainerBorder",null),ci=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].Boolean,widget:["ContainersBorderSetting","ContainerBorderSetting"]}))],ci);let di=class extends i["FormEnumRadioWidget"]{mounted(){const e=this.formData.enableConfirm;i["BooleanHelper"].isTrue(e)&&"ALWAYS_TRUE"!==this.value?this.change("ALWAYS_TRUE"):(i["BooleanHelper"].isFalse(e)&&"ALWAYS_FALSE"!==this.value||Object(u["a"])(e))&&this.change("ALWAYS_FALSE")}};di=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].Enum,widget:"UIFormCompatibleEnumRadio"}))],di);var ui=Object(a["defineComponent"])({props:{title:{type:String,default:"",required:!0},list:{type:Array},pagination:{type:Object}},emits:["pagination","update:pagination"],setup(e,t){const o=Object(a["reactive"])({pagination:{current:1,pageSize:20,total:0}}),i=Object(a["computed"])(()=>{var t;let i=e.pagination;if(i)return e.list||[];i=o.pagination;const n=(i.current-1)*i.pageSize,r=i.current*i.pageSize;return(null===(t=e.list)||void 0===t?void 0:t.slice(n,r))||[]}),n=Object(a["computed"])({get:()=>{const t=e.pagination;return t||o.pagination},set:e=>{o.pagination=e,t.emit("update:pagination",e)}}),r=Object(a["computed"])(()=>!i.value.length),l=e=>{console.log(e),t.emit("pagination",e)};return{state:o,internalList:i,internalPagination:n,listIsEmpty:r,onPaginationChange:l}}});const pi={class:"view-reference"},bi={class:"title"},gi={key:1,class:"content"},vi={class:"list"},mi={key:0,class:"page"};function yi(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-empty"),s=Object(a["resolveComponent"])("a-pagination");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",pi,[Object(a["createElementVNode"])("div",bi,Object(a["toDisplayString"])(e.$translate(e.title)),1),e.listIsEmpty?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:"empty",description:e.$translate("暂无数据")},null,8,["description"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",gi,[Object(a["createElementVNode"])("div",vi,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.internalList,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t.id,class:"item"},[Object(a["renderSlot"])(e.$slots,"default",{data:t})]))),128))]),e.internalPagination?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",mi,[Object(a["createVNode"])(s,{current:e.internalPagination.current,"page-size":e.internalPagination.pageSize,total:e.internalPagination.total,simple:"",onChange:e.onPaginationChange},null,8,["current","page-size","total","onChange"])])):Object(a["createCommentVNode"])("v-if",!0)]))])}ui.render=yi,ui.__file="src/components/dialog/ViewReference.vue";var hi=Object(a["defineComponent"])({name:"UiDesignerContent",props:{headerClass:{type:[String,Array]},headerStyle:{type:[String,Object]}},setup(e){const t=Object(a["computed"])(()=>i["StyleHelper"].parse(e.headerStyle));return{headerStyle:t}},render(){const{header:e,default:t}=i["PropRecordHelper"].collectionSlots(this.$slots,[{origin:"header",isNotNull:!0},{origin:"default",isNotNull:!0}]);return Object(a["createVNode"])("div",Object.assign({},i["PropRecordHelper"].collectionBasicProps(this.$attrs,["ui-designer-content"])),[Object(a["createVNode"])("div",{class:i["StringHelper"].append(["ui-designer-header-bottom"],this.headerClass),style:this.headerStyle},e()),...t()])}});hi.__file="src/view/ui-desinger/UiDesignerContent.vue";var fi=Object(a["defineComponent"])({name:"LowCodeModal",components:{OioModal:r["OioModal"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioDivider:r["OioDivider"],OioButton:r["OioButton"],OioUpload:r["OioUpload"]},props:{componentDefinition:{type:Object},visible:{type:Boolean,default:void 0},enterCallback:{type:Function},cancelCallback:{type:Function},generateProject:{type:Function}},emits:["update:visible"],setup(e,t){const o=e=>{t.emit("update:visible",e)},n=()=>J(this,void 0,void 0,(function*(){var t;yield null===(t=e.generateProject)||void 0===t?void 0:t.call(e,e.componentDefinition)})),r=e=>e?i["FileHelper"].normalizeFileList(e):[],a=(e,{url:t})=>{let o=e.javascript;o||(o=[],e.javascript=o),o.push(t)},l=(e,{url:t})=>{const o=e.javascript||[],i=o.indexOf(t);-1!==i&&o.splice(i,1)},s=(e,{url:t})=>{let{css:o}=e;o||(o=[],e.css=o),o.push(t)},c=(e,{url:t})=>{const o=e.css||[],i=o.indexOf(t);-1!==i&&o.splice(i,1)};return{onUpdateVisible:o,onGenerateProject:n,formatUrlToFile:r,onSuccessUploadJS:a,onRemoveUploadJS:l,onSuccessUploadCSS:s,onRemoveUploadCSS:c}}});const Oi=["title"],wi=["title"],ji={class:"ui-designer-low-code-step-wrapper"},ki={class:"ui-designer-low-code-sub-title"},Ci={class:"ui-designer-low-code-sub-title"},Di={class:"ui-designer-low-code-sub-title"},Ti={class:"ui-designer-low-code-sub-title"};function $i(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-form-item"),s=Object(a["resolveComponent"])("oio-divider"),c=Object(a["resolveComponent"])("oio-button"),d=Object(a["resolveComponent"])("a-step"),u=Object(a["resolveComponent"])("oio-upload"),p=Object(a["resolveComponent"])("a-steps"),b=Object(a["resolveComponent"])("oio-form"),g=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createBlock"])(g,{visible:e.visible,title:"低无一体",data:e.componentDefinition,width:"676px","wrapper-class-name":"ui-designer-low-code-modal-wrapper","enter-callback":e.enterCallback,cancelCallback:e.cancelCallback,"onUpdate:visible":e.onUpdateVisible},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createVNode"])(b,{layout:"horizontal","label-align":"right"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{label:e.$translate("组件名称")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{title:e.componentDefinition.displayName},Object(a["toDisplayString"])(e.componentDefinition.displayName),9,Oi)]),_:1},8,["label"]),Object(a["createVNode"])(l,{label:e.$translate("SDK生成时间")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{title:e.componentDefinition.projectGenerateDate},Object(a["toDisplayString"])(e.componentDefinition.projectGenerateDate),9,wi)]),_:1},8,["label"]),Object(a["createVNode"])(s,{class:"ui-designer-low-code-step-divider"}),Object(a["createElementVNode"])("div",ji,[Object(a["createVNode"])(p,{direction:"vertical",size:"small",current:null},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,null,{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{type:"primary",icon:"oinone-shengcheng1",async:!0,onClick:e.onGenerateProject},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("生成SDK")),1)]),_:1},8,["onClick"])]),Object(a["createElementVNode"])("span",ki,Object(a["toDisplayString"])(e.$translate("首次进入组件设计或组件中的元件变更时需要生成SDK")),1)]),_:1}),Object(a["createVNode"])(d,null,{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{type:"primary",icon:"oinone-xiazai2",href:e.componentDefinition.project,target:"_blank",disabled:!e.componentDefinition.project},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("下载模板工程")),1)]),_:1},8,["href","disabled"])]),Object(a["createElementVNode"])("span",Ci,Object(a["toDisplayString"])(e.$translate("每次生成SDK后需要下载模版工程，在其中进行开发")),1)]),_:1}),Object(a["createVNode"])(d,{class:"ui-designer-low-code-step-3"},{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(u,{accept:".js",uploadList:e.formatUrlToFile(t.javascript),"remove-callback":o=>e.onRemoveUploadJS(t,o),onSuccess:o=>e.onSuccessUploadJS(t,o)},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-shangchuan3"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("上传JS文件")),1)]),_:1})]),_:2},1032,["uploadList","remove-callback","onSuccess"]),Object(a["createElementVNode"])("span",Di,Object(a["toDisplayString"])(e.$translate("根据实际需求上传组件对应的JS文件")),1)]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(u,{accept:".css",uploadList:e.formatUrlToFile(t.css),"remove-callback":o=>e.onRemoveUploadCSS(t,o),onSuccess:o=>e.onSuccessUploadCSS(t,o)},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-shangchuan3"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("上传CSS文件")),1)]),_:1})]),_:2},1032,["uploadList","remove-callback","onSuccess"]),Object(a["createElementVNode"])("span",Ti,Object(a["toDisplayString"])(e.$translate("根据实际需求上传组件对应的CSS文件")),1)])]),_:2},1024)]),_:2},1024)])]),_:2},1024)]),_:1},8,["visible","data","enter-callback","cancelCallback","onUpdate:visible"])}fi.render=$i,fi.__file="src/view/component-list/components/LowCodeModal.vue";var Ei=Object(a["defineComponent"])({props:{placeholder:{type:String,default:""},prefix:{type:String,default:""},width:{type:String,default:"200px"}}});const Si={style:{"font-size":"12px"}},Ni={key:0,class:"select-prefix"};function Vi(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-empty"),s=Object(a["resolveComponent"])("a-select-option"),c=Object(a["resolveComponent"])("a-select");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{class:"oio-select","show-search":!0,placeholder:e.placeholder,value:"分组1","option-filter-prop":"label",style:Object(a["normalizeStyle"])({width:e.width})},{notFoundContent:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,null,{description:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Si,Object(a["toDisplayString"])(e.$translate("暂无匹配的分组")),1)]),_:1})]),default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])([{module:"分组1",displayName:"分组1"}],t=>Object(a["createVNode"])(s,{key:t.module,label:t.displayName,title:t.module,value:t.module},{default:Object(a["withCtx"])(()=>[e.prefix?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ni,Object(a["toDisplayString"])(e.prefix)+": ",1)):Object(a["createCommentVNode"])("v-if",!0),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.displayName),1)]),_:2},1032,["label","title","value"])),64))]),_:1},8,["placeholder","style"])}Ei.render=Vi,Ei.__file="src/view/component-list/components/component-select.vue";const xi=i["HttpClient"].getInstance(),Ii="DesignerComponentDefinition",Mi=i["GQL"].fragment(Ii,"UiDesignerWidgetDefinitionProxy4Custom").parameter("id","name","bizType","widgetCategory","scope","displayName","description","icon","sys","priority","show","project","projectGenerateDate","javascript","css").buildParameters("widgetGroup",e=>{e.parameter("id","name","displayName")}).toString();class Ai{constructor(){}queryPage(e,t,o){return J(this,void 0,void 0,(function*(){return i["GQL"].query("uiDesignerWidgetDefinitionProxy4CustomQuery","queryPage").buildRequest(i=>i.buildObjectParameter("page",e=>{var i;e.numberParameter("currentPage",t.current).numberParameter("size",t.pageSize).objectParameter("sort",`{ orders: { field: "priority", direction: ${null!==(i=null===o||void 0===o?void 0:o.orders.direction)&&void 0!==i?i:"ASC"} } }`)}).buildObjectParameter("queryWrapper",t=>t.stringParameter("rsql",e))).buildResponse(e=>{e.parameter("totalElements","totalPages","currentPage","size").fragmentParameter("content",Ii)}).mountFragment(Ii,Mi).request(n["jb"])}))}create(e){return J(this,void 0,void 0,(function*(){return i["GQL"].mutation("uiDesignerWidgetDefinitionProxy4CustomMutation","create").buildRequest(t=>t.buildObjectParameter("data",t=>t.stringParameter("displayName",e.displayName).stringParameter("description",e.description).stringParameter("icon",e.icon).enumerationParameter("bizType",e.bizType).buildObjectParameter("widgetGroup",t=>t.stringParameter("id",e.widgetGroup.id).stringParameter("name",e.widgetGroup.name)).enumerationParameter("scope",e.scope||[]).enumerationParameter("widgetCategory",e.widgetCategory).booleanParameter("show",!0))).responseFragmentParameter(Ii).mountFragment(Ii,Mi).request(n["jb"])}))}update(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetDefinitionProxy4CustomMutation {\n\t\tupdate(\n\t\t\tdata: {\n\t\t\t  id: "${e.id}"\n        widgetGroup: {\n          id: "${e.widgetGroup.id}"\n          name: "${e.widgetGroup.name}"\n        }\n        scope: ${e.scope?`[${e.scope.map(e=>e).join(",")}]`:"[]"}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("displayName",e.displayName)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("description",e.description)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("icon",e.icon)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("bizType",e.bizType)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("widgetCategory",e.widgetCategory)}\n\t\t\t}\n\t\t) {\n      ...${Ii}\n\t\t}\n\t}\n}\n${yield Mi}\n`,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.update}))}deleteOne(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetDefinitionProxy4CustomMutation {\n\t\tdeleteOne (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  id\n\t\t}\n\t}\n}\n`,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.deleteOne}))}show(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n                    uiDesignerWidgetDefinitionProxy4CustomMutation {\n                      show (\n                        data: {\n                          id: "${e}"\n                        }\n                      ) {\n                        id\n                      }\n                    }\n                  }\n                  `,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.show}))}hide(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetDefinitionProxy4CustomMutation {\n\t\thide (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  id\n\t\t}\n\t}\n}\n`,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.hide}))}relations(e){return J(this,void 0,void 0,(function*(){const t=`query {\n\tuiDesignerWidgetDefinitionProxy4CustomQuery {\n\t\trelations (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  relationList {\n\t\t    id\n\t\t    viewModel\n\t\t    viewName\n\t\t    viewTitle\n\t\t    metaLabel\n\t\t    relViewLabel\n\t\t    designerViewId\n\t\t  }\n\t\t}\n\t}\n}\n`,o=yield xi.query(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomQuery.relations}))}generateProject(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetDefinitionProxy4CustomMutation {\n\t\tgenerateProject (\n\t\t\tdata: {\n\t\t\t  id: "${e.id}"\n\t\t\t}\n\t\t) {\n      ...${Ii}\n\t\t}\n\t}\n}\n${yield Mi}\n`,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.generateProject}))}uploadDist(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetDefinitionProxy4CustomMutation {\n\t\tuploadDist (\n\t\t\tdata: {\n\t\t\t  id: "${e.id}"\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("javascript",i["GraphqlHelper"].serializableStringArray(e.javascript||[]))}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("css",i["GraphqlHelper"].serializableStringArray(e.css||[]))}\n\t\t\t}\n\t\t) {\n      ...${Ii}\n\t\t}\n\t}\n}\n${yield Mi}\n`,o=yield xi.mutate(n["jb"],t);return o.data.uiDesignerWidgetDefinitionProxy4CustomMutation.uploadDist}))}}Ai.INSTANCE=new Ai;const Fi=i["HttpClient"].getInstance(),Li="DesignerComponentInstance",Ri=i["GQL"].fragment(Li,"UiDesignerWidgetProxy4Custom").parameter("id","definitionName","name","subtype","multi","viewTypes","displayName","description","show").toString();class Bi{constructor(){}queryPage(e,t){return J(this,void 0,void 0,(function*(){const{definitionName:o}=e.getConditionBodyData(),i=`query {\n\tuiDesignerWidgetDefinitionProxy4CustomQuery {\n\t\tqueryWidgets (\n\t\t  data: {\n\t\t    name: "${o}"\n\t\t    widgetCurrentPage: ${t.current}\n\t\t    widgetSize: ${t.pageSize}\n\t\t    widgetSort: { orders: { field: "writeDate", direction: DESC } }\n\t\t    widgetRsql: "${e}"\n\t\t  }\n\t\t) {\n\t\t  id\n\t\t  displayName\n\t\t\twidgetTotalElements\n\t\t\twidgetTotalPages\n\t\t\twidgetProxyList {\n\t\t\t  ...${Li}\n\t\t\t}\n\t\t}\n\t}\n}\n${yield Ri}\n`,n=(yield Fi.query(l["g"].UI_DESIGNER,i)).data.uiDesignerWidgetDefinitionProxy4CustomQuery.queryWidgets;return{displayName:n.displayName,totalPages:n.widgetTotalPages,totalElements:n.widgetTotalElements,content:n.widgetProxyList}}))}create(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetProxy4CustomMutation {\n\t\tcreate(\n\t\t\tdata: {\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("definitionName",e.definitionName)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("name",e.name)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("subtype",e.subtype)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("multi",e.multi)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("viewTypes",`[${e.viewTypes.join(", ")}]`)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("displayName",e.displayName)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("description",e.description)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("show",!0)}\n\t\t\t}\n\t\t) {\n      ...${Li}\n\t\t}\n\t}\n}\n${yield Ri}\n`,o=yield Fi.mutate(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomMutation.create}))}update(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetProxy4CustomMutation {\n\t\tupdate(\n\t\t\tdata: {\n\t\t\t  id: "${e.id}"\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("definitionName",e.definitionName)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("name",e.name)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("subtype",e.subtype)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("multi",e.multi)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("viewTypes",`[${e.viewTypes.join(", ")}]`)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("displayName",e.displayName)}\n\t\t\t\t${i["GraphqlHelper"].buildStringGQLParameter("description",e.description)}\n\t\t\t}\n\t\t) {\n      ...${Li}\n\t\t}\n\t}\n}\n${yield Ri}\n`,o=yield Fi.mutate(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomMutation.update}))}deleteOne(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetProxy4CustomMutation {\n\t\tdeleteOne (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  id\n\t\t}\n\t}\n}\n`,o=yield Fi.mutate(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomMutation.deleteOne}))}show(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetProxy4CustomMutation {\n\t\tshow (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  id\n\t\t}\n\t}\n}\n`,o=yield Fi.mutate(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomMutation.show}))}hide(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerWidgetProxy4CustomMutation {\n\t\thide (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  id\n\t\t}\n\t}\n}\n`,o=yield Fi.mutate(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomMutation.hide}))}relations(e){return J(this,void 0,void 0,(function*(){const t=`query {\n\tuiDesignerWidgetProxy4CustomQuery {\n\t\trelations (\n\t\t\tdata: {\n\t\t\t  id: "${e}"\n\t\t\t}\n\t\t) {\n\t\t  relationList {\n\t\t    id\n\t\t    viewModel\n\t\t    viewName\n\t\t    viewTitle\n\t\t    metaLabel\n\t\t    relViewLabel\n\t\t    designerViewId\n\t\t  }\n\t\t}\n\t}\n}\n`,o=yield Fi.query(l["g"].UI_DESIGNER,t);return o.data.uiDesignerWidgetProxy4CustomQuery.relations}))}}Bi.INSTANCE=new Bi;const _i="uiDesigner";class Wi{static create(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n      uiDesignerWidgetGroupProxyMutation {\n        create(\n          data: {\n            displayName: "${e}"\n          }\n        ) {\n          id\n          name\n          displayName\n          active\n          priority\n          sys\n        }\n      }\n    }`,o=yield i["http"].query(_i,t);return o.data.uiDesignerWidgetGroupProxyMutation.create}))}static update(e,t){return J(this,void 0,void 0,(function*(){const o=`mutation {\n      uiDesignerWidgetGroupProxyMutation {\n        update(\n          data: {\n            displayName: "${e}"\n            id: "${t}"\n          }\n        ) {\n          id\n          name\n          displayName\n          active\n          priority\n          sys\n        }\n      }\n    }`,n=yield i["http"].mutate(_i,o);return n.data.uiDesignerWidgetGroupProxyMutation.update}))}static query(e){return J(this,void 0,void 0,(function*(){const t=[{name:"sys",ttype:i["ModelFieldType"].Boolean},{name:"show",ttype:i["ModelFieldType"].Boolean},{name:"widgetDisplayName",ttype:i["ModelFieldType"].String}],o=yield Object(i["buildSingleItemParam"])(t,e),n=`{\n      uiDesignerWidgetGroupProxyQuery {\n        queryWidgetGroupList(data: ${o}) {\n          id\n          name\n          displayName\n          active\n          help\n          priority\n          sys\n          widgetCount\n        }\n      }\n    }\n    `,r=yield i["http"].query(_i,n),a=r.data.uiDesignerWidgetGroupProxyQuery.queryWidgetGroupList;return Wi.groupList=a}))}static delete(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n      uiDesignerWidgetGroupProxyMutation {\n        deleteByEntity(\n          data: {id: "${e}"}\n        ) {\n          id\n        }\n      }\n    }`,o=yield i["http"].mutate(_i,t);return o.data.uiDesignerWidgetGroupProxyMutation.deleteByEntity}))}static sort(e){return J(this,void 0,void 0,(function*(){const t=[{name:"id",ttype:i["ModelFieldType"].Long},{name:"name",ttype:i["ModelFieldType"].String}],o=e.map(e=>Object(i["buildSingleItemParam"])(t,e)),n=yield Promise.all(o),r=`mutation {\n      uiDesignerWidgetGroupDataMutation{\n        changePriority(data: {\n          widgetGroups: [${n.join(",")}]\n        }) {\n          widgetGroups{\n            id\n          }\n        }\n      }\n    }`,a=yield i["http"].mutate(_i,r);return a.data.uiDesignerWidgetGroupDataMutation.changePriority}))}}Wi.groupList=[];const Pi=i["HttpClient"].getInstance();function zi(){return J(this,void 0,void 0,(function*(){const e='\n  query{\n    uiDesignerWidgetDefinitionQuery{\n        queryPage(page:{currentPage:1, size: 20000, sort:{orders:[{field: "priority", direction: ASC}]}},queryWrapper:{rsql:"sys==0 and show==1"}) {\n            content {\n                id\n                name\n                displayName\n                icon\n                widgetCategory\n                priority\n            }\n        }\n    }\n}\n  ',t=yield Pi.query(n["jb"],e),o=t.data.uiDesignerWidgetDefinitionQuery.queryPage.content,r=n["vb"][1];return[Object.assign(Object.assign({},r),{displayName:Object(i["translateValueByKey"])(r.displayName),allowDraggable:!0,items:o})]}))}function Gi(e,t,o){return J(this,void 0,void 0,(function*(){let i="";t&&(i=`, ahead: { id: "${t}" }`);let r="widgetGroup: {}";o&&(r=`widgetGroup: {name: "${o}"}`);const a=`\n     mutation {\n      uiDesignerWidgetDefinitionProxy4CustomMutation {\n        drag(target: { id: "${e}", ${r} }${i} ) {\n          id\n        }\n      }\n    }\n      `,l=yield Pi.query(n["jb"],a);return l.data.uiDesignerWidgetDefinitionProxy4CustomMutation.drag.id}))}function Ui(){var e;return J(this,void 0,void 0,(function*(){const t='\n     query{\n    uiDesignerWidgetDefinitionQuery{\n        queryPage(page:{currentPage:1, size: 20000, sort:{orders:[{field: "priority", direction: ASC}]}},queryWrapper:{rsql:"show==1"}) {\n            content {\n                id\n                name\n                displayName\n                icon\n                widgetCategory\n                priority\n            }\n        }\n    }\n}\n  ',o=yield Pi.query(n["jb"],t),r=o.data.uiDesignerWidgetDefinitionQuery.queryPage.content,a=new Map,l=[];for(const e of n["vb"]){const t=Object.assign(Object.assign({},e),{displayName:Object(i["translateValueByKey"])(e.displayName),allowDraggable:!1,items:[]});a.set(e.name.toString(),t),l.push(t)}for(const i of r)null===(e=a.get(i.widgetCategory))||void 0===e||e.items.push(i);return l}))}var Ki=Object(a["defineComponent"])({components:{draggable:y(),OioIcon:r["OioIcon"],OioInput:r["OioInput"]},props:{item:{type:Object,default:()=>({})}},setup(e,{emit:t}){const o=Object(a["ref"])("1"),n=Object(a["ref"])(!1),r=Object(a["ref"])([]),l=()=>{t("update-display-name"),n.value=!1},s=()=>J(this,void 0,void 0,(function*(){const t=new i["Condition"]("group").equal(e.item.name),o=yield Ai.INSTANCE.queryPage(t,{current:1,pageSize:500},{orders:{field:"priority",direction:"ASC"}});r.value=o.content}));s();const c=e=>J(this,void 0,void 0,(function*(){e.length>1&&s()})),d=t=>J(this,void 0,void 0,(function*(){var o;let i;if(t.moved?i=t.moved:t.added&&(i=t.added),i){const n=i.element.id,a=i.newIndex;let l;a>0&&(l=null===(o=r.value[a-1])||void 0===o?void 0:o.id);const s=t.added?e.item.name:"";yield Gi(n,l,s)}}));return{activeKey:o,edit:n,list:r,onChangeDisplayName:l,onOpen:c,onSort:d}}});const qi={class:"group-list-component-item-move-box"},Hi={class:"group-item-collapse-panel-header"},Yi={key:1,style:{display:"flex","align-items":"center"}},Qi={class:"title"},Ji={class:"group-item-collapse-panel-item group-item-collapse-panel-item-drag"},Xi={key:0,class:"group-item-collapse-panel-item-tag"},Zi={style:{transform:"scale(0.8)","margin-top":"-1px"}},en={class:"group-item-collapse-panel-item-title"};function tn(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("oio-input"),c=Object(a["resolveComponent"])("a-popconfirm"),d=Object(a["resolveComponent"])("draggable"),u=Object(a["resolveComponent"])("a-collapse-panel"),p=Object(a["resolveComponent"])("a-collapse");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["group-list-component-item",[e.item.invisible&&"group-list-component-item-hide"]])},[Object(a["createElementVNode"])("div",qi,[Object(a["createVNode"])(l,{icon:"oinone-move-handler",size:"28",style:{transform:"rotate(90deg)"}})]),Object(a["createVNode"])(p,{activeKey:e.activeKey,"onUpdate:activeKey":t[6]||(t[6]=t=>e.activeKey=t),onChange:e.onOpen},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{key:"1"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Hi,[e.edit?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,onClick:t[1]||(t[1]=Object(a["withModifiers"])(()=>{},["stop"]))},[Object(a["createVNode"])(s,{style:{width:"100px"},value:e.item.displayName,"onUpdate:value":t[0]||(t[0]=t=>e.item.displayName=t),onBlur:e.onChangeDisplayName},null,8,["value","onBlur"])])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Yi,[Object(a["createElementVNode"])("span",Qi,Object(a["toDisplayString"])(e.item.displayName)+"（"+Object(a["toDisplayString"])(e.list.length||0)+"）",1),Object(a["createVNode"])(l,{onClick:t[2]||(t[2]=Object(a["withModifiers"])(t=>e.edit=!0,["stop"])),icon:"oinone-bianji",color:"rgba(0,0,0,0.65)",size:"14"})])),e.item.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:2,title:e.$translate("是否删除当前分组？"),overlayClassName:"oio-popconfirm","ok-text":e.$translate("确定"),"cancel-text":e.$translate("取消"),onConfirm:t[4]||(t[4]=t=>e.$emit("delete"))},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{onClick:t[3]||(t[3]=Object(a["withModifiers"])(()=>{},["stop"])),icon:"oinone-remove",color:"rgba(0,0,0,0.65)",size:"14"})]),_:1},8,["title","ok-text","cancel-text"]))])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{class:"group-item-collapse-panel-list",modelValue:e.list,"onUpdate:modelValue":t[5]||(t[5]=t=>e.list=t),animation:200,handle:".group-item-collapse-panel-item-drag",group:"groupComponent",itemKey:"id",onChange:e.onSort},{item:Object(a["withCtx"])(({element:t,index:o})=>[Object(a["createElementVNode"])("div",Ji,[t.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xi,[Object(a["createElementVNode"])("div",Zi,Object(a["toDisplayString"])(e.$translate("自定义")),1)])),Object(a["createVNode"])(l,{icon:t.icon||"oinone-xinxi",color:"var(--oio-primary-color)",size:"32px"},null,8,["icon"]),Object(a["createElementVNode"])("div",en,Object(a["toDisplayString"])(t.displayName),1)])]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey","onChange"])],2)}Ki.render=tn,Ki.__file="src/view/component-list/components/group-list/group-item.vue";var on=Object(a["defineComponent"])({components:{draggable:y(),GroupItem:Ki},props:{list:{type:Array,default:()=>[]}},setup(e){const t=Object(a["ref"])([]);Object(a["watch"])(()=>e.list,e=>{t.value=e.filter(e=>"VIRTUAL_ALL"!==e.name)},{deep:!0,immediate:!0});const o=()=>{const o=e.list[0];Wi.sort([o,...t.value])};return{onSortGroup:o,groupList:t}}});const nn={class:"group-list-component"};function rn(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("group-item"),s=Object(a["resolveComponent"])("draggable");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",nn,[Object(a["createVNode"])(s,{tag:"div",animation:200,modelValue:e.groupList,"onUpdate:modelValue":t[0]||(t[0]=t=>e.groupList=t),handle:".group-list-component-item-move-box","item-key":"name",onChange:e.onSortGroup},{item:Object(a["withCtx"])(({element:t,index:o})=>[Object(a["createVNode"])(l,{item:t,onDelete:o=>e.$emit("delete",t),onUpdateDisplayName:o=>e.$emit("update-display-name",t)},null,8,["item","onDelete","onUpdateDisplayName"])]),_:1},8,["modelValue","onChange"])])}var an,ln;on.render=rn,on.__file="src/view/component-list/components/group-list/group-list.vue",function(e){e[e["CREATE"]=0]="CREATE",e[e["EDIT"]=1]="EDIT",e[e["SEEK"]=2]="SEEK"}(an||(an={})),function(e){e["Sorting"]="Sorting",e["Result"]="Result"}(ln||(ln={}));const sn=[{id:ln.Sorting,text:"排序"},{id:ln.Result,text:"查看排序结果"}],cn="oinone-xinxi";var dn=Object(a["defineComponent"])({name:"UiWidgetSortPanel",components:{ACollapse:w["a"],ACollapsePanel:j["a"],OioIcon:r["OioIcon"],ATooltip:k["a"],draggable:y()},props:{},emits:["onModelWidgetLibChange"],setup(e,t){const o=Object(a["ref"])([]),i=Object(a["ref"])([]);Object(a["onMounted"])(()=>J(this,void 0,void 0,(function*(){o.value=yield zi(),i.value=o.value})));const r=Object(a["ref"])(sn[0].id),l=e=>{r.value=e},s=e=>{const t=e.moved.element.id,i=e.moved.newIndex;let n;i>0&&(n=o.value[0].items[i-1].id),Gi(t,n)},c=Object(a["ref"])(n["ub"].FIELD);return Object(a["watch"])(()=>r.value,e=>J(this,void 0,void 0,(function*(){e===sn[1].id?i.value=yield Ui():e===sn[0].id&&(i.value=o.value)})),{immediate:!0}),{DefaultIcon:cn,activeSortTabKey:r,changeTab:l,collapseActiveKey:c,sortWidgetList:o,sortWidgetResultList:i,dragSortWidget:s,SortPanelTab:ln,SortTabSelectData:sn,WidgetCategory:n["ub"]}}});const un={class:"ui-widget-sort-panel"},pn={class:"ui-widget-sort-panel-header"},bn={class:"ui-widget-sort-panel-header-title"},gn={class:"ui-widget-sort-panel-header-help"},vn={class:"ui-widget-sort-panel-tabs"},mn=["onClick"],yn=["title"],hn={class:"widget-icon"},fn={class:"widget-label"};function On(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-tooltip"),c=Object(a["resolveComponent"])("draggable"),d=Object(a["resolveComponent"])("a-collapse-panel"),u=Object(a["resolveComponent"])("a-collapse");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",un,[Object(a["createElementVNode"])("div",pn,[Object(a["createElementVNode"])("div",bn,Object(a["toDisplayString"])(e.$translate("组件库")),1),Object(a["createElementVNode"])("div",gn,[Object(a["createVNode"])(s,{destroyTooltipOnHide:!0},{title:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("自定义组件支持拖拽排序，接在系统组件后，可在预览中查看")),1)]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{icon:"oinone-wenhao1",color:"var(--oio-primary-color)",size:16})]),_:1})])]),Object(a["createElementVNode"])("div",vn,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.SortTabSelectData,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{class:Object(a["normalizeClass"])(["ui-widget-sort-panel-tabs-item"]),key:t.id,onClick:o=>e.changeTab(t.id)},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["label-area",e.activeSortTabKey===t.id&&"selected"])},Object(a["toDisplayString"])(e.$translate(t.text)),3)],8,mn))),128))]),Object(a["createVNode"])(u,{bordered:!1,"expand-icon-position":"right",activeKey:e.collapseActiveKey,"onUpdate:activeKey":t[0]||(t[0]=t=>e.collapseActiveKey=t)},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sortWidgetResultList,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:t.name,class:"ui-widget-sort-panel-collapse-panel",header:t.displayName+"（"+t.items.length+"）"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{modelValue:t.items,"onUpdate:modelValue":e=>t.items=e,"item-key":"id",class:"ui-widget-sort-panel-widget-list-area",disabled:!t.allowDraggable,onChange:e.dragSortWidget},{item:Object(a["withCtx"])(({element:t})=>[Object(a["createElementVNode"])("div",{class:"ui-widget-sort-panel-widget-list-area-item",title:t.displayName},[Object(a["createElementVNode"])("div",hn,[Object(a["createVNode"])(l,{icon:t.icon||e.DefaultIcon},null,8,["icon"])]),Object(a["createElementVNode"])("div",fn,Object(a["toDisplayString"])(t.displayName),1)],8,yn)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["header"]))),128))]),_:1},8,["activeKey"])])}dn.render=On,dn.__file="src/view/component-list/UiWidgetSortPanel.vue";const wn="oinone-xinxi";var jn;(function(e){e["SortPanel"]="SortPanel",e["ListPanel"]="ListPanel"})(jn||(jn={}));var kn=Object(a["defineComponent"])({name:"ComponentDefinitionList",components:{OioButton:r["OioButton"],OioCard:r["OioCard"],OioDropdown:r["OioDropdown"],OioGallery:r["OioGallery"],OioIcon:r["OioIcon"],OioModal:r["OioModal"],OioPagination:r["OioPagination"],OioPopconfirm:r["OioPopconfirm"],OioTooltip:r["OioTooltip"],OioShape:r["OioShape"],DesignerSearchInput:l["t"],ViewReference:ui,UiDesignerContent:hi,LowCodeModal:fi,UiWidgetSortPanel:dn,ComponentSelect:Ei,DataSourceRadio:n["n"],GroupList:on,DesignerGroupManager:l["l"],DesignerGroupModal:l["m"]},inheritAttrs:!1,props:Object.assign(Object.assign({},n["G"]),{groupList:{type:Array},onOpenComponentDefinitionDialog:{type:Function},onManage:{type:Function},onGenerateProject:{type:Function},onSaveLowCodeInfo:{type:Function},queryGroupList:{type:Function,required:!0}}),setup(e){const t=Object(a["ref"])(!1),o=Object(a["ref"])(jn.ListPanel),n=Object(a["ref"])([{label:Object(i["translateValueByKey"])("全部"),value:null},{label:Object(i["translateValueByKey"])("自定义组件"),value:!1},{label:Object(i["translateValueByKey"])("平台默认组件"),value:!0}]),l=t=>J(this,void 0,void 0,(function*(){yield e.queryGroupList(t!==jn.SortPanel),o.value=t})),s=Object(a["reactive"])({viewReferences:!1,lowCode:!1}),c=Object(a["reactive"])({viewReferences:!1}),d=Object(a["reactive"])({viewReferences:[],lowCode:{}}),u=Object(a["computed"])(()=>{var t;return(null===(t=i["CastHelper"].cast(e.dataSource))||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{description:e.description||"",icon:e.icon||wn})))||[]}),p=t=>{var o,i;null===(o=e.onFilterValueChange)||void 0===o||o.call(e,t.value),null===(i=e.onSearch)||void 0===i||i.call(e)},b=()=>J(this,void 0,void 0,(function*(){var t;yield null===(t=e.onOpenComponentDefinitionDialog)||void 0===t?void 0:t.call(e,an.CREATE)})),g=t=>J(this,void 0,void 0,(function*(){var o;yield null===(o=e.onOpenComponentDefinitionDialog)||void 0===o?void 0:o.call(e,an.EDIT,t)})),v=Object(a["ref"])(!1),m=e=>({id:e.id,name:e.name,displayName:e.displayName,count:e.widgetCount,sys:e.sys}),y=()=>J(this,void 0,void 0,(function*(){yield e.queryGroupList(o.value!==jn.SortPanel)})),h=e=>J(this,void 0,void 0,(function*(){yield Wi.create(e.displayName),yield y()})),f=e=>J(this,void 0,void 0,(function*(){yield Wi.update(e.displayName,e.id),yield y()})),O=t=>J(this,void 0,void 0,(function*(){yield Wi.delete(t.id),t&&t.name===e.widgetGroup.name&&e.onChangeWidgetGroup(e.groupList[0]),yield y()})),w=t=>J(this,void 0,void 0,(function*(){var o,i;s.viewReferences=!0,c.viewReferences=!0,d.viewReferences=[];try{d.viewReferences=null===(i=yield null===(o=e.onSeekReferences)||void 0===o?void 0:o.call(e,t))||void 0===i?void 0:i.relationList}finally{c.viewReferences=!1}})),j=()=>(d.viewReferences=[],!0),k=e=>!!e.designerViewId,C=t=>{var o;k(t)&&(null===(o=e.onRedirectDesignByBlank)||void 0===o||o.call(e,t.designerViewId))},D=e=>{s.lowCode=!0,d.lowCode=e},T=(t,o)=>J(this,void 0,void 0,(function*(){var t;return yield null===(t=e.onSaveLowCodeInfo)||void 0===t?void 0:t.call(e,d.lowCode,o),!0})),$=()=>(d.lowCode={},!0),E=(...t)=>J(this,void 0,void 0,(function*(){var o;const n=yield null===(o=e.onGenerateProject)||void 0===o?void 0:o.call(e,...t);n&&n.project&&n.projectGenerateDate?d.lowCode=Object.assign(Object.assign({},d.lowCode),{project:n.project,projectGenerateDate:n.projectGenerateDate}):r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("SDK生成失败"))})),S={onOpenDialogForEdit:g,onOpenLowCodeModal:D},N=(e,t)=>{S[e.key](t)},V=e=>{var t,o;return!!(null===(t=e.javascript)||void 0===t?void 0:t.length)||!!(null===(o=e.css)||void 0===o?void 0:o.length)};return{PanelType:jn,currentPanel:o,expandGroup:t,switchCurrentPanel:l,componentVisible:s,componentLoading:c,componentData:d,showDataSource:u,dataRadioSource:n,visibleGroupDialog:v,widgetGroupMapping:m,onAddGroup:h,onUpdateGroup:f,onDeleteGroup:O,onFilterValueChange:p,onOpenDialogForCreate:b,onOpenDialogForEdit:g,onOpenReferencesModal:w,onCloseReferencesModal:j,allowClickReferenceItem:k,onClickReferenceItem:C,onOpenLowCodeModal:D,onEnterLowCodeModal:T,onCancelLowCodeModal:$,generateProject:E,onMoreSelect:N,computeLowCodeStatus:V}}});const Cn={class:"ui-designer-component-definition-options"},Dn={class:"ui-designer-component-definition-options-add-component"},Tn={class:"ui-designer-component-definition-options",style:{"justify-content":"flex-end"}},$n={key:0},En={key:1,class:"ui-designer-gallery-content ui-designer-component-definition-list-content"},Sn={class:"ui-designer-component-definition-icon-wrapper"},Nn={class:"ui-designer-component-definition-icon"},Vn={class:"ui-designer-component-definition-icon-label"},xn={key:0,class:"ui-designer-component-definition-low-code-status"},In={key:1,class:"ui-designer-component-definition-low-code-status"},Mn=["title"],An=["title","onClick"];function Fn(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-search-input"),s=Object(a["resolveComponent"])("data-source-radio"),c=Object(a["resolveComponent"])("oio-button"),d=Object(a["resolveComponent"])("designer-group-manager"),u=Object(a["resolveComponent"])("group-list"),p=Object(a["resolveComponent"])("oio-icon"),b=Object(a["resolveComponent"])("oio-shape"),g=Object(a["resolveComponent"])("oio-tooltip"),v=Object(a["resolveComponent"])("oio-popconfirm"),m=Object(a["resolveComponent"])("a-menu-item"),y=Object(a["resolveComponent"])("a-menu"),h=Object(a["resolveComponent"])("oio-dropdown"),f=Object(a["resolveComponent"])("oio-card"),O=Object(a["resolveComponent"])("oio-gallery"),w=Object(a["resolveComponent"])("oio-pagination"),j=Object(a["resolveComponent"])("designer-group-modal"),k=Object(a["resolveComponent"])("view-reference"),C=Object(a["resolveComponent"])("oio-modal"),D=Object(a["resolveComponent"])("low-code-modal"),T=Object(a["resolveComponent"])("ui-designer-content");return Object(a["openBlock"])(),Object(a["createBlock"])(T,{class:"ui-designer-gallery ui-designer-component-definition-list","header-class":"ui-designer-component-definition-list-header"},{header:Object(a["withCtx"])(()=>[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Cn,[Object(a["createVNode"])(l,{"filter-value":e.filterValue,"search-value":e.searchValue,placeholder:e.$translate("使用组件名称搜索"),"onUpdate:searchValue":e.onSearchValueChange,"onUpdate:filterValue":e.onFilterValueChange,onSearch:e.onSearch},null,8,["filter-value","search-value","placeholder","onUpdate:searchValue","onUpdate:filterValue","onSearch"]),Object(a["createVNode"])(s,{style:{width:"347px"},options:e.dataRadioSource,value:e.isSysComponent,onChange:e.onChangeComponentType},null,8,["options","value","onChange"]),Object(a["createElementVNode"])("div",Dn,[Object(a["createVNode"])(c,{icon:"oinone-paixu1",onClick:t[0]||(t[0]=t=>e.switchCurrentPanel(e.PanelType.SortPanel))},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("排序")),1)]),_:1}),Object(a["createVNode"])(c,{async:!0,icon:"oinone-tianjiamoxing",type:"primary",onClick:e.onOpenDialogForCreate},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加组件")),1)]),_:1},8,["onClick"])])],512),[[a["vShow"],e.currentPanel===e.PanelType.ListPanel]]),Object(a["createElementVNode"])("div",Tn,[e.currentPanel===e.PanelType.SortPanel?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,icon:"oinone-houtui",type:"primary",onClick:t[1]||(t[1]=t=>e.switchCurrentPanel(e.PanelType.ListPanel))},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("返回组件")),1)]),_:1})):Object(a["createCommentVNode"])("v-if",!0)]),e.currentPanel===e.PanelType.ListPanel?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,data:e.groupList,value:e.widgetGroup,mapping:e.widgetGroupMapping,expanded:e.expandGroup,"onUpdate:expanded":t[2]||(t[2]=t=>e.expandGroup=t),"onUpdate:value":e.onChangeWidgetGroup,onManagement:t[3]||(t[3]=()=>e.visibleGroupDialog=!0)},null,8,["data","value","mapping","expanded","onUpdate:value"])):Object(a["createCommentVNode"])("v-if",!0)]),default:Object(a["withCtx"])(()=>[e.currentPanel===e.PanelType.SortPanel?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$n,[Object(a["createVNode"])(u,{list:e.groupList,onDelete:e.onDeleteGroup,onUpdateDisplayName:e.onUpdateGroup},null,8,["list","onDelete","onUpdateDisplayName"])])):Object(a["createCommentVNode"])("v-if",!0),e.currentPanel===e.PanelType.ListPanel?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["createVNode"])(O,{cols:5,list:e.showDataSource,loading:e.loading,gutter:"24","item-key":"id"},{default:Object(a["withCtx"])(({key:t,data:o,index:i})=>[(Object(a["openBlock"])(),Object(a["createBlock"])(f,{key:t,class:Object(a["normalizeClass"])([!e.dataSource[i].show&&"ui-designer-card-invalid"]),title:o.displayName,onClick:()=>e.onManage(e.dataSource[i])},{toolbar:Object(a["withCtx"])(()=>[o.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(v,{key:0,confirmCallback:()=>e.onDelete(e.dataSource[i]),text:"确认要删除吗?"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(g,{title:e.$translate("删除")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-remove",type:"link"})]),_:1},8,["title"])]),_:2},1032,["confirmCallback"])),o.show?(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:1,title:e.$translate("隐藏")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{async:!0,icon:"oinone-daifeiqimian",type:"link",onClick:()=>e.onHide(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])):(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:2,title:e.$translate("显示")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{async:!0,icon:"oinone-keyongmian",type:"link",onClick:()=>e.onShow(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])),o.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:3,title:e.$translate("查看被引用的信息")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{async:!0,icon:"oinone-reference",type:"link",onClick:()=>e.onOpenReferencesModal(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])),o.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:4,title:e.$translate("管理元件")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-guanli",type:"link",onClick:()=>e.onManage(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])),o.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(h,{key:5,"overlay-class-name":"ui-designer-gallery-toolbar-dropdown-popover"},{overlay:Object(a["withCtx"])(()=>[Object(a["createVNode"])(y,{onClick:t=>e.onMoreSelect(t,e.dataSource[i])},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{key:"onOpenDialogForEdit"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{async:!0,icon:"oinone-bianji",type:"link"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("编辑")),1)]),_:1})]),_:1}),Object(a["createVNode"])(m,{key:"onOpenLowCodeModal"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{async:!0,icon:"oinone-diwuyiti2",type:"link"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("低无一体")),1)]),_:1})]),_:1})]),_:2},1032,["onClick"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-gengduo1",type:"link"})]),_:2},1024))]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Sn,[Object(a["createElementVNode"])("div",Nn,[Object(a["createVNode"])(p,{icon:o.icon,color:"var(--oio-primary-color)",size:"32"},null,8,["icon"])]),Object(a["createElementVNode"])("span",Vn,Object(a["toDisplayString"])(o.displayName),1)]),e.computeLowCodeStatus(o)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",xn,[Object(a["createVNode"])(b,{type:"circle",color:"#6DD400",size:"4px"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("已上传")),1)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",In,[Object(a["createVNode"])(b,{type:"circle",color:"rgba(0, 0, 0, 0.30)",size:"4px"}),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("未上传")),1)])),Object(a["createElementVNode"])("div",{class:"ui-designer-component-definition-description",title:o.description},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(o.description),1)],8,Mn)]),_:2},1032,["class","title","onClick"]))]),_:1},8,["list","loading"]),e.pagination?(Object(a["openBlock"])(),Object(a["createBlock"])(w,{key:0,"current-page":e.pagination.current,"page-size":e.pagination.pageSize,"page-size-options":["15","20","50","100"],total:e.pagination.total,"show-total":"",onChange:e.onPaginationChange},null,8,["current-page","page-size","total","onChange"])):Object(a["createCommentVNode"])("v-if",!0)])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createVNode"])(j,{visible:e.visibleGroupDialog,"onUpdate:visible":t[4]||(t[4]=t=>e.visibleGroupDialog=t),data:e.groupList,mapping:e.widgetGroupMapping,onCreate:e.onAddGroup,onUpdate:e.onUpdateGroup,onDelete:e.onDeleteGroup},null,8,["visible","data","mapping","onCreate","onUpdate","onDelete"]),Object(a["createVNode"])(C,{visible:e.componentVisible.viewReferences,"onUpdate:visible":t[5]||(t[5]=t=>e.componentVisible.viewReferences=t),"cancel-callback":e.onCloseReferencesModal,"has-footer":!1,loading:e.componentLoading.viewReferences,title:e.$translate("页面引用"),heigthx:"612px",width:"490px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(k,{list:e.componentData.viewReferences,pagination:{current:1,pageSize:100,total:e.componentData.viewReferences.length},title:e.$translate("存在引用关系的页面")},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])([e.allowClickReferenceItem(t)&&"view-reference-allow-click"]),title:t.relViewLabel,onClick:()=>e.onClickReferenceItem(t)},Object(a["toDisplayString"])(t.relViewLabel),11,An)]),_:1},8,["list","pagination","title"])]),_:1},8,["visible","cancel-callback","loading","title"]),Object(a["createVNode"])(D,{visible:e.componentVisible.lowCode,"onUpdate:visible":t[6]||(t[6]=t=>e.componentVisible.lowCode=t),"component-definition":e.componentData.lowCode,"enter-callback":e.onEnterLowCodeModal,"cancel-callback":e.onCancelLowCodeModal,"generate-project":e.generateProject},null,8,["visible","component-definition","enter-callback","cancel-callback","generate-project"])]),_:1})}kn.render=Fn,kn.__file="src/view/component-list/ComponentDefinitionList.vue";const Ln="ui.designer.UiDesignerWidgetDefinitionProxy4Custom",Rn="ui.designer.UiDesignerWidgetProxy4Custom",Bn={model:Ln,modelName:"uiDesignerWidgetDefinitionProxy4Custom",name:"$$component-definition-form",type:i["ViewType"].Form,template:'\n    <view>\n    <field data="id" invisible="true" />\n    <field data="name" invisible="true" />\n    <field data="displayName" label="组件名称" help="展示在组件库的名称" />\n    <field data="bizType" label="组件类型" widget="Radio" radioMode="BUTTON" defaultValue="FIELD" rowLimit="6" readonly="activeRecord.id">\n      <options>\n        <option name="FIELD" displayName="字段" />\n      </options>\n    </field>\n    <field data="widgetCategory" label="组件分组" invisible="true" defaultValue="FIELD" />\n    <field data="widgetGroup" label="分组"  required="true" optionFields="id,name,displayName" searchFields="displayName" optionLabel="activeRecord.displayName" />\n    <field data="scope" label="组件适用范围" readonly="activeRecord.id" />\n    <field data="icon" label="组件图标" widget="IconSelect" icons="designer" />\n    <field data="description" label="组件描述" widget="TextArea" />\n    </view>'},_n={model:Rn,modelName:"uiDesignerWidgetProxy4Custom",name:"$$component-instance-form",type:i["ViewType"].Form,template:`\n    <view>\n    <field data="id" invisible="true" />\n    <field data="definitionName" invisible="true" />\n    <field data="displayName" label="元件名称" required="true" />\n    <field data="name" label="API名称" required="true" pattern="^[a-zA-Z]\\w{1,32}$" tips="长度在1-32个字符，大小写字母开头，仅包含数字、字母、下划线" readonly="activeRecord.id" />\n    <field data="subtype" label="支持字段业务类型" widget="Select" required="true" readonly="activeRecord.id">\n      <options>\n        ${n["ib"].map(e=>`<option name="${e.value}" displayName="${e.label}" />`).join("\n")}\n      </options>\n    </field>\n    <field data="multi" label="支持多值" widget="Switch" required="true" readonly="activeRecord.id" invisible="LIST_CONTAINS(['O2O','O2M','M2O','M2M'], activeRecord.subtype)" help="多值字段表示该字段可以存储或传输多个该业务类型的数据；非多值字段只能存储或传输单个该业务类型的数据。" />\n    <field data="viewTypes" label="支持视图类型" widget="Checkbox" required="true" help="编辑支持视图类型可能导致属性面板的新增或删除">\n      <options>\n        ${n["tb"].map(e=>`<option name="${e.value}" displayName="${e.label}" />`).join("\n")}\n      </options>\n    </field>\n    <field data="description" label="元件描述" widget="TextArea" />\n    </view>`},Wn="__ui_designer_component_definition";let Pn=class extends n["b"]{constructor(){super(...arguments),this.widgetGroup={},this.isSysComponent=!1,this.groupList=[]}get managementService(){return Ai.INSTANCE}get managementLocalStorageKey(){return Wn}initialize(e){return super.initialize(e),this.setComponent(kn),this}onSearch(){const e=Object.create(null,{onSearch:{get:()=>super.onSearch}});return J(this,void 0,void 0,(function*(){yield e.onSearch.call(this),yield this.queryGroupList()}))}queryGroupList(e=!0){return J(this,void 0,void 0,(function*(){const t={sys:this.isSysComponent};switch(this.filterValue){case l["w"].ENABLED:t.show=!0;break;case l["w"].DISABLED:t.show=!1;break}this.searchValue&&(t.widgetDisplayName=this.searchValue),this.groupList=yield Wi.query(e?t:{})}))}onChangeComponentType(e){return J(this,void 0,void 0,(function*(){this.isSysComponent=e,this.onSearch()}))}onChangeWidgetGroup(e){this.widgetGroup=e,this.onSearch()}onOpenComponentDefinitionDialog(e,t){var o,n,r;return J(this,void 0,void 0,(function*(){null===(o=this.dialogWidget)||void 0===o||o.dispose(),this.dialogWidget=void 0,null===(n=this.dialogViewWidget)||void 0===n||n.dispose(),this.dialogViewWidget=void 0;const a=i["Dialog"].create();let l,s,c,u;switch(e){case an.EDIT:l=Bn,s="编辑组件",c=i["FormWidget"],u=t;break;case an.SEEK:l=Bn,s="查看组件",c=i["DetailWidget"],u=t,a.setOkInvisible(!0);break;default:l=Bn,s="创建组件",c=i["FormWidget"];break}const{model:p}=l;l=Object.assign(Object.assign({},l),{template:null===(r=yield i["ViewCache"].compile(p,l.name,l.template))||void 0===r?void 0:r.dsl});const b=Object(i["createRuntimeContextForWidget"])(l),g=b.handle;a.setWidth(i["ModalWidth"].small),a.setTitle(s),a.setOkText("确定"),a.setCancelText("取消"),a.setHelp("可将不同字段业务类型、单/多值组件汇集在一个组件中使用。如组件“下拉选”中包含下拉单选和下拉多选两个元件"),a.on("ok",()=>J(this,void 0,void 0,(function*(){var t;a.setActionLoading(!0);try{if(yield this.onDialogOk(e)){a.onVisibleChange(!1);const e=(null===(t=this.dialogViewWidget)||void 0===t?void 0:t.getData())||{};this.widgetGroup.name!==e.widgetGroup.name?C["a"].confirm({class:"oio-modal",icon:null,width:500,centered:!0,content:Object(i["translateValueByKey"])("当前筛选条件会过滤掉部分新添加的组件，是否切换筛选条件查看？"),title:Object(i["translateValueByKey"])("友情提示"),okText:Object(i["translateValueByKey"])("自动切换筛选"),cancelText:Object(i["translateValueByKey"])("不了，谢谢!"),afterClose:()=>{this.isSysComponent=!1,this.onChangeWidgetGroup(e.widgetGroup)}}):(yield this.queryGroupList(),yield this.initRefreshProcess())}}finally{a.setActionLoading(!1)}}))),a.on("cancel",()=>{a.onVisibleChange(!1)}),u=u?Object(d["a"])(u):yield Object(i["customQuery"])(p,"construct",yield b.getInitialValue(),void 0,void 0,void 0,{maxDepth:1});const v=a.createWidget(c,void 0,{metadataHandle:g,rootHandle:g,dataSource:u,activeRecords:u,template:b.viewTemplate,inline:!0});this.dialogWidget=a,this.dialogViewWidget=v,a.onVisibleChange(!0)}))}onDialogOk(e){var t,o;return J(this,void 0,void 0,(function*(){if(!(yield null===(t=this.dialogViewWidget)||void 0===t?void 0:t.validator()))return!1;const r=i["CastHelper"].cast(null===(o=this.dialogViewWidget)||void 0===o?void 0:o.getData());if(r)switch(e){case an.CREATE:yield this.managementService.create(r),n["yb"].INSTANCE.clear();break;case an.EDIT:yield this.managementService.update(r);break}return!0}))}onManage(e){if(e.sys)return;const t=e.name;t&&l["P"].jumpTo(this.router,l["L"].WIDGET,t)}onGenerateProject(e){return J(this,void 0,void 0,(function*(){return this.managementService.generateProject(e)}))}onSaveLowCodeInfo(e,t){return J(this,void 0,void 0,(function*(){yield this.managementService.uploadDist(t),this.initRefreshProcess()}))}generateSort(){return{orders:{field:"priority",direction:"DESC"}}}generatorCondition(){const e=new i["Condition"](i["DEFAULT_TRUE_CONDITION"]),{filterValue:t,searchValue:o,widgetGroup:n,isSysComponent:r}=this;switch(t){case l["w"].ENABLED:e.and(new i["Condition"]("show").equal(!0));break;case l["w"].DISABLED:e.and(new i["Condition"]("show").equal(!1));break}return o&&e.and(new i["Condition"]("displayName").like(o)),n&&n.name&&e.and(new i["Condition"]("group").equal(n.name)),null!==r&&e.and(new i["Condition"]("sys").equal(r)),e}mountedFetchData(){return J(this,void 0,void 0,(function*(){const{page:e={}}=this.matched.segmentParams,t=e.searchBody;t?this.searchBodyParse(t):this.localStorageOperator(e=>(this.localStorageConsumer(e),!1)),yield this.queryGroupList();const o=this.groupList.find(e=>e.name===this.widgetGroup.name);o||(this.widgetGroup=this.groupList[0]),this.dataSource=yield this.fetchData()}))}searchBodyParse(e){const t=JSON.parse(e);this.filterValue=t.filterValue||l["w"].ENABLED,this.searchValue=t.searchValue,this.widgetGroup=t.widgetGroup||{},this.isSysComponent=t.isSysComponent||!1}searchBodyToString(){return JSON.stringify({filterValue:this.filterValue,searchValue:this.searchValue,widgetGroup:this.widgetGroup,isSysComponent:this.isSysComponent})}localStorageProvider(e){e.filterValue=this.filterValue,e.searchValue=this.searchValue,e.widgetGroup=this.widgetGroup,e.isSysComponent=this.isSysComponent}localStorageConsumer(e){const{filterValue:t,searchValue:o,widgetGroup:i,isSysComponent:n}=e;t&&(this.filterValue=t),o&&(this.searchValue=o),i&&(this.widgetGroup=i),this.isSysComponent=n||!1}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Pn.prototype,"widgetGroup",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Pn.prototype,"isSysComponent",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Pn.prototype,"groupList",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Pn.prototype,"onSearch",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Pn.prototype,"queryGroupList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",Promise)],Pn.prototype,"onChangeComponentType",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Pn.prototype,"onChangeWidgetGroup",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number,Object]),Q("design:returntype",Promise)],Pn.prototype,"onOpenComponentDefinitionDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Pn.prototype,"onManage",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Pn.prototype,"onGenerateProject",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",Promise)],Pn.prototype,"onSaveLowCodeInfo",null),Pn=Y([i["SPIFactory"].Register(l["R"].Token({tab:l["L"].COMPONENT}))],Pn);const zn="oinone-xinxi";var Gn=Object(a["defineComponent"])({name:"ComponentDefinitionList",components:{OioButton:r["OioButton"],OioCard:r["OioCard"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioGallery:r["OioGallery"],OioModal:r["OioModal"],OioPagination:r["OioPagination"],OioPopconfirm:r["OioPopconfirm"],OioTags:r["OioTags"],OioTooltip:r["OioTooltip"],DesignerSearchInput:l["t"],ViewReference:ui,UiDesignerContent:hi},inheritAttrs:!1,props:Object.assign(Object.assign({},n["G"]),{definitionDisplayName:{type:String},onOpenComponentDefinitionDialog:{type:Function},onDesign:{type:Function},goBackComponentList:{type:Function}}),setup(e){const t=Object(a["reactive"])({viewReferences:!1}),o=Object(a["reactive"])({viewReferences:!1}),r=Object(a["reactive"])({viewReferences:[]}),l=Object(a["computed"])(()=>{var t;return(null===(t=i["CastHelper"].cast(e.dataSource))||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{subtype:v(e.subtype),multi:m(e.multi),viewTypes:y(e.viewTypes)})))||[]}),s=t=>{var o,i;null===(o=e.onFilterValueChange)||void 0===o||o.call(e,t.value),null===(i=e.onSearch)||void 0===i||i.call(e)},c=()=>J(this,void 0,void 0,(function*(){var t;yield null===(t=e.onOpenComponentDefinitionDialog)||void 0===t?void 0:t.call(e,an.CREATE)})),d=t=>J(this,void 0,void 0,(function*(){var o;yield null===(o=e.onOpenComponentDefinitionDialog)||void 0===o?void 0:o.call(e,an.EDIT,t)})),u=i=>J(this,void 0,void 0,(function*(){var n,a;t.viewReferences=!0,o.viewReferences=!0,r.viewReferences=[];try{r.viewReferences=null===(a=yield null===(n=e.onSeekReferences)||void 0===n?void 0:n.call(e,i))||void 0===a?void 0:a.relationList}finally{o.viewReferences=!1}})),p=()=>(r.viewReferences=[],!0),b=e=>!!e.designerViewId,g=t=>{var o;b(t)&&(null===(o=e.onRedirectDesignByBlank)||void 0===o||o.call(e,t.designerViewId))},v=e=>{var t;const o=e&&(null===(t=n["ib"].find(t=>t.value===e))||void 0===t?void 0:t.label)||"";return Object(i["translateValueByKey"])(o)},m=e=>{const t=e?"是":"否";return Object(i["translateValueByKey"])(t)},y=e=>{const t=[];return e&&e.length?(n["tb"].forEach(o=>{const n=o.value,r=e.find(e=>e===n);r&&t.push(Object.assign(Object.assign({},o),{label:Object(i["translateValueByKey"])(o.label)}))}),t):t};return{defaultIcon:zn,componentVisible:t,componentLoading:o,componentData:r,showDataSource:l,onFilterValueChange:s,onOpenDialogForCreate:c,onOpenDialogForEdit:d,onOpenReferencesModal:u,onCloseReferencesModal:p,allowClickReferenceItem:b,onClickReferenceItem:g}}});const Un={class:"ui-designer-component-instance-title"},Kn={class:"ui-designer-component-instance-options"},qn={class:"ui-designer-gallery-content ui-designer-component-instance-list-content"},Hn=["title"],Yn=["title"],Qn=["title"],Jn=["title"],Xn=["title","onClick"];function Zn(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-search-input"),s=Object(a["resolveComponent"])("oio-button"),c=Object(a["resolveComponent"])("oio-form-item"),d=Object(a["resolveComponent"])("oio-tags"),u=Object(a["resolveComponent"])("oio-form"),p=Object(a["resolveComponent"])("oio-tooltip"),b=Object(a["resolveComponent"])("oio-popconfirm"),g=Object(a["resolveComponent"])("oio-card"),v=Object(a["resolveComponent"])("oio-gallery"),m=Object(a["resolveComponent"])("oio-pagination"),y=Object(a["resolveComponent"])("view-reference"),h=Object(a["resolveComponent"])("oio-modal"),f=Object(a["resolveComponent"])("ui-designer-content");return Object(a["openBlock"])(),Object(a["createBlock"])(f,{class:"ui-designer-gallery ui-designer-component-instance-list","header-class":"ui-designer-component-instance-list-header"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Un,Object(a["toDisplayString"])(`${e.$translate("当前组件")}: ${e.definitionDisplayName||""}`),1),Object(a["createElementVNode"])("div",Kn,[Object(a["createVNode"])(l,{"filter-value":e.filterValue,"search-value":e.searchValue,placeholder:e.$translate("使用元件名称搜索"),"onUpdate:searchValue":e.onSearchValueChange,"onUpdate:filterValue":e.onFilterValueChange,onSearch:e.onSearch},null,8,["filter-value","search-value","placeholder","onUpdate:searchValue","onUpdate:filterValue","onSearch"]),Object(a["createVNode"])(s,{icon:"oinone-fanhui",onClick:e.goBackComponentList},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("返回组件")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(s,{async:!0,icon:"oinone-tianjiamoxing",type:"primary",onClick:e.onOpenDialogForCreate},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加元件")),1)]),_:1},8,["onClick"])])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",qn,[Object(a["createVNode"])(v,{cols:5,list:e.showDataSource,loading:e.loading,gutter:"24","item-key":"id"},{default:Object(a["withCtx"])(({key:t,data:o,index:i})=>[Object(a["createVNode"])(g,{class:Object(a["normalizeClass"])([!e.dataSource[i].show&&"ui-designer-card-invalid"]),title:o.displayName,onClick:()=>e.onDesign(e.dataSource[i])},{toolbar:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{confirmCallback:()=>e.onDelete(e.dataSource[i]),text:"确认要删除吗?"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{title:e.$translate("删除")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{icon:"oinone-remove",type:"link"})]),_:1},8,["title"])]),_:2},1032,["confirmCallback"]),o.show?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:0,title:e.$translate("作废")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-daifeiqimian",type:"link",onClick:()=>e.onHide(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])):(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:1,title:e.$translate("可用")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-keyongmian",type:"link",onClick:()=>e.onShow(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])),Object(a["createVNode"])(p,{title:e.$translate("查看被引用的信息")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-reference",type:"link",onClick:()=>e.onOpenReferencesModal(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"]),Object(a["createVNode"])(p,{title:e.$translate("编辑")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-bianji",type:"link",onClick:()=>e.onOpenDialogForEdit(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"]),Object(a["createVNode"])(p,{title:e.$translate("设计元件属性")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-jiemiansheji1",type:"link",onClick:()=>e.onDesign(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{"label-align":"right"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{label:e.$translate("API名称")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{title:o.name},Object(a["toDisplayString"])(o.name),9,Hn)]),_:2},1032,["label"]),Object(a["createVNode"])(c,{label:e.$translate("业务类型")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{title:o.subtype},Object(a["toDisplayString"])(o.subtype),9,Yn)]),_:2},1032,["label"]),Object(a["createVNode"])(c,{label:e.$translate("多值")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{title:o.multi},Object(a["toDisplayString"])(o.multi),9,Qn)]),_:2},1032,["label"]),Object(a["createVNode"])(c,{class:"ui-designer-component-instance-view-types",label:e.$translate("视图类型")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{options:o.viewTypes},null,8,["options"])]),_:2},1032,["label"])]),_:2},1024),Object(a["createElementVNode"])("div",{title:o.description||"",class:"ui-designer-component-instance-description"},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(o.description||""),1)],8,Jn)]),_:2},1032,["class","title","onClick"])]),_:1},8,["list","loading"]),e.pagination?(Object(a["openBlock"])(),Object(a["createBlock"])(m,{key:0,"current-page":e.pagination.current,"page-size":e.pagination.pageSize,"page-size-options":["15","20","50","100"],total:e.pagination.total,"show-total":"",onChange:e.onPaginationChange},null,8,["current-page","page-size","total","onChange"])):Object(a["createCommentVNode"])("v-if",!0)]),Object(a["createVNode"])(h,{visible:e.componentVisible.viewReferences,"onUpdate:visible":t[0]||(t[0]=t=>e.componentVisible.viewReferences=t),"cancel-callback":e.onCloseReferencesModal,"has-footer":!1,loading:e.componentLoading.viewReferences,title:e.$translate("页面引用"),heigthx:"612px",width:"490px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(y,{list:e.componentData.viewReferences,pagination:{current:1,pageSize:100,total:e.componentData.viewReferences.length},title:e.$translate("存在引用关系的页面")},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])([e.allowClickReferenceItem(t)&&"view-reference-allow-click"]),title:t.relViewLabel,onClick:()=>e.onClickReferenceItem(t)},Object(a["toDisplayString"])(t.relViewLabel),11,Xn)]),_:1},8,["list","pagination","title"])]),_:1},8,["visible","cancel-callback","loading","title"])]),_:1})}Gn.render=Zn,Gn.__file="src/view/component-list/ComponentInstanceList.vue";const er="__ui_designer_component_instance";let tr=class extends n["b"]{get managementService(){return Bi.INSTANCE}get managementLocalStorageKey(){return er}initialize(e){return super.initialize(e),this.setComponent(Gn),this}onOpenComponentDefinitionDialog(e,t){var o,n,r;return J(this,void 0,void 0,(function*(){null===(o=this.dialogWidget)||void 0===o||o.dispose(),this.dialogWidget=void 0,null===(n=this.dialogViewWidget)||void 0===n||n.dispose(),this.dialogViewWidget=void 0;const a=i["Dialog"].create();let l,s,c,u,p=void 0;switch(e){case an.EDIT:l=_n,s="编辑元件",p="元件是根据不同字段业务类型自行设计的属性页面。",c=i["FormWidget"],u=t;break;case an.SEEK:l=_n,s="查看元件",c=i["DetailWidget"],u=t,a.setOkInvisible(!0);break;default:l=_n,s="创建元件",p="元件是根据不同字段业务类型自行设计的属性页面。",c=i["FormWidget"];break}const{model:b}=l;l=Object.assign(Object.assign({},l),{template:null===(r=yield i["ViewCache"].compile(b,l.name,l.template))||void 0===r?void 0:r.dsl});const g=Object(i["createRuntimeContextForWidget"])(l),v=g.handle;a.setWidth(i["ModalWidth"].small),a.setTitle(s),p&&a.setHelp(p),a.setOkText("确定"),a.setCancelText("取消"),a.on("ok",()=>J(this,void 0,void 0,(function*(){a.setActionLoading(!0);try{(yield this.onDialogOk(e))&&(a.onVisibleChange(!1),yield this.initRefreshProcess())}finally{a.setActionLoading(!1)}}))),a.on("cancel",()=>{a.onVisibleChange(!1)}),u=u?Object(d["a"])(u):yield Object(i["customQuery"])(b,"construct",yield g.getInitialValue(),void 0,void 0,void 0,{maxDepth:1}),u=Object.assign(Object.assign({},u),{definitionName:this.definitionName});const m=a.createWidget(c,void 0,{metadataHandle:v,rootHandle:v,dataSource:u,activeRecords:u,template:g.viewTemplate,inline:!0});this.dialogWidget=a,this.dialogViewWidget=m,a.onVisibleChange(!0)}))}onDialogOk(e){var t,o;return J(this,void 0,void 0,(function*(){if(!(yield null===(t=this.dialogViewWidget)||void 0===t?void 0:t.validator()))return!1;const r=i["CastHelper"].cast(null===(o=this.dialogViewWidget)||void 0===o?void 0:o.getData());if(r)switch(e){case an.CREATE:yield this.managementService.create(r),n["yb"].INSTANCE.clear();break;case an.EDIT:yield this.managementService.update(r),n["yb"].INSTANCE.clear();break}return!0}))}onDesign(e){const{id:t}=e;t&&Object(n["Kc"])(t,this.router,this.matched)}goBackComponentList(){l["P"].jumpTo(this.router,l["L"].COMPONENT)}generatorCondition(){const e=new i["Condition"]("definitionName").equal(this.definitionName),{filterValue:t,searchValue:o}=this;switch(t){case l["w"].ENABLED:e.and(new i["Condition"]("show").equal(!0));break;case l["w"].DISABLED:e.and(new i["Condition"]("show").equal(!1));break}return o&&e.and(new i["Condition"]("displayName").like(o)),e}queryPage(e,t){const o=Object.create(null,{queryPage:{get:()=>super.queryPage}});return J(this,void 0,void 0,(function*(){e.getConditionBodyData().definitionName=this.definitionName;const n=yield o.queryPage.call(this,e,t);return this.definitionDisplayName=i["CastHelper"].cast(n).displayName,n}))}mountedFetchData(){const e=Object.create(null,{mountedFetchData:{get:()=>super.mountedFetchData}});return J(this,void 0,void 0,(function*(){this.definitionName=this.matched.segmentParams.page.id,yield e.mountedFetchData.call(this)}))}};var or;Y([i["Widget"].Reactive(),Q("design:type",String)],tr.prototype,"definitionName",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],tr.prototype,"definitionDisplayName",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number,Object]),Q("design:returntype",Promise)],tr.prototype,"onOpenComponentDefinitionDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],tr.prototype,"onDesign",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],tr.prototype,"goBackComponentList",null),tr=Y([i["SPI"].ClassFactory(l["R"].Token({tab:l["L"].WIDGET}))],tr),function(e){e[e["CREATE"]=0]="CREATE",e[e["EDIT"]=1]="EDIT",e[e["SEEK"]=2]="SEEK"}(or||(or={}));const ir="oinone-xinxi";var nr=Object(a["defineComponent"])({name:"LayoutDefinitionList",components:{OioButton:r["OioButton"],OioCard:r["OioCard"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioGallery:r["OioGallery"],OioModal:r["OioModal"],OioPagination:r["OioPagination"],OioPopconfirm:r["OioPopconfirm"],OioTags:r["OioTags"],OioTooltip:r["OioTooltip"],DesignerSearchInput:l["t"],ViewReference:ui,UiDesignerContent:hi},inheritAttrs:!1,props:Object.assign(Object.assign({},n["G"]),{onOpenLayoutDefinitionDialog:{type:Function},onDesign:{type:Function}}),setup(e){const t=Object(a["reactive"])({viewReferences:!1}),o=Object(a["reactive"])({viewReferences:!1}),r=Object(a["reactive"])({viewReferences:[]}),l=Object(a["computed"])(()=>{var t;return(null===(t=e.dataSource)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{viewType:v([e.viewType])[0]})).filter(e=>!!e.viewType))||[]}),s=t=>{var o,i;null===(o=e.onFilterValueChange)||void 0===o||o.call(e,t.value),null===(i=e.onSearch)||void 0===i||i.call(e)},c=()=>J(this,void 0,void 0,(function*(){var t;yield null===(t=e.onOpenLayoutDefinitionDialog)||void 0===t?void 0:t.call(e,or.CREATE)})),d=t=>J(this,void 0,void 0,(function*(){var o;yield null===(o=e.onOpenLayoutDefinitionDialog)||void 0===o?void 0:o.call(e,or.EDIT,t)})),u=i=>J(this,void 0,void 0,(function*(){var n,a;t.viewReferences=!0,o.viewReferences=!0,r.viewReferences=[];try{r.viewReferences=null===(a=yield null===(n=e.onSeekReferences)||void 0===n?void 0:n.call(e,i))||void 0===a?void 0:a.relationList}finally{o.viewReferences=!1}})),p=()=>(r.viewReferences=[],!0),b=e=>!!e.designerViewId,g=t=>{var o;b(t)&&(null===(o=e.onRedirectDesignByBlank)||void 0===o||o.call(e,t.designerViewId))},v=e=>{const t=[];return e&&e.length?(n["tb"].forEach(o=>{const n=o.value,r=e.find(e=>e===n);r&&t.push(Object.assign(Object.assign({},o),{label:Object(i["translateValueByKey"])(o.label)}))}),t):t};return{defaultIcon:ir,componentVisible:t,componentLoading:o,componentData:r,showDataSource:l,onFilterValueChange:s,onOpenDialogForCreate:c,onOpenDialogForEdit:d,onOpenReferencesModal:u,onCloseReferencesModal:p,allowClickReferenceItem:b,onClickReferenceItem:g}}});const rr={class:"ui-designer-layout-definition-options"},ar={class:"ui-designer-gallery-content ui-designer-layout-definition-list-content"},lr=["title"];function sr(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-search-input"),s=Object(a["resolveComponent"])("oio-button"),c=Object(a["resolveComponent"])("oio-form-item"),d=Object(a["resolveComponent"])("oio-tags"),u=Object(a["resolveComponent"])("oio-form"),p=Object(a["resolveComponent"])("oio-tooltip"),b=Object(a["resolveComponent"])("oio-popconfirm"),g=Object(a["resolveComponent"])("oio-card"),v=Object(a["resolveComponent"])("oio-gallery"),m=Object(a["resolveComponent"])("oio-pagination"),y=Object(a["resolveComponent"])("ui-designer-content");return Object(a["openBlock"])(),Object(a["createBlock"])(y,{class:"ui-designer-gallery ui-designer-layout-definition-list","header-class":"ui-designer-layout-definition-list-header"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",rr,[Object(a["createVNode"])(l,{"filter-value":e.filterValue,"search-value":e.searchValue,placeholder:e.$translate("使用模板名称搜索"),"onUpdate:searchValue":e.onSearchValueChange,"onUpdate:filterValue":e.onFilterValueChange,onSearch:e.onSearch},null,8,["filter-value","search-value","placeholder","onUpdate:searchValue","onUpdate:filterValue","onSearch"]),Object(a["createVNode"])(s,{async:!0,icon:"oinone-tianjiamoxing",type:"primary",onClick:e.onOpenDialogForCreate},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加模板")),1)]),_:1},8,["onClick"])])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",ar,[Object(a["createVNode"])(v,{cols:5,list:e.showDataSource,loading:e.loading,gutter:"24","item-key":"id"},{default:Object(a["withCtx"])(({key:t,data:o,index:i})=>[Object(a["createVNode"])(g,{class:Object(a["normalizeClass"])([!e.dataSource[i].show&&"ui-designer-card-invalid"]),title:o.displayName,onClick:()=>e.onDesign(e.dataSource[i])},{toolbar:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{confirmCallback:()=>e.onDelete(e.dataSource[i]),text:"确认要删除吗?"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{title:e.$translate("删除")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{icon:"oinone-remove",type:"link"})]),_:1},8,["title"])]),_:2},1032,["confirmCallback"]),o.show?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:0,title:e.$translate("作废")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-daifeiqimian",type:"link",onClick:()=>e.onHide(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])):(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:1,title:e.$translate("可用")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-keyongmian",type:"link",onClick:()=>e.onShow(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])),Object(a["createVNode"])(p,{title:e.$translate("查看被引用的信息")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-reference",type:"link",onClick:()=>e.onOpenReferencesModal(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"]),Object(a["createCommentVNode"])("              <oio-tooltip :title=\"$translate('编辑')\">"),Object(a["createCommentVNode"])("                <oio-button"),Object(a["createCommentVNode"])('                  :async="true"'),Object(a["createCommentVNode"])('                  icon="oinone-bianji"'),Object(a["createCommentVNode"])('                  type="link"'),Object(a["createCommentVNode"])('                  @click="() => onOpenDialogForEdit(dataSource[index])"'),Object(a["createCommentVNode"])("                />"),Object(a["createCommentVNode"])("              </oio-tooltip>"),Object(a["createVNode"])(p,{title:e.$translate("设计模板")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{async:!0,icon:"oinone-jiemiansheji1",type:"link",onClick:()=>e.onDesign(e.dataSource[i])},null,8,["onClick"])]),_:2},1032,["title"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{"label-align":"right"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{label:e.$translate("API名称")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{style:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},title:o.baseLayoutName},Object(a["toDisplayString"])(o.baseLayoutName),9,lr)]),_:2},1032,["label"]),Object(a["createVNode"])(c,{label:e.$translate("视图类型")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{options:[o.viewType]},null,8,["options"])]),_:2},1032,["label"])]),_:2},1024)]),_:2},1032,["class","title","onClick"])]),_:1},8,["list","loading"]),e.pagination?(Object(a["openBlock"])(),Object(a["createBlock"])(m,{key:0,"current-page":e.pagination.current,"page-size":e.pagination.pageSize,"page-size-options":["15","20","50","100"],total:e.pagination.total,"show-total":"",onChange:e.onPaginationChange},null,8,["current-page","page-size","total","onChange"])):Object(a["createCommentVNode"])("v-if",!0)])]),_:1})}nr.render=sr,nr.__file="src/view/layout-list/LayoutDefinitionList.vue";const cr="ui.designer.UiDesignerLayoutDesign",dr={model:cr,modelName:"uiDesignerLayoutDesign",name:"$$layout-definition-form",type:i["ViewType"].Form,template:`\n    <view>\n    <field data="id" invisible="true" />\n    <field data="viewType" label="视图类型" widget="Radio" radioMode="BUTTON" defaultValue="TABLE" required="true">\n      <options>\n        ${n["tb"].map(e=>`<option name="${e.value}" displayName="${e.label}" />`).join("\n")}\n      </options>\n    </field>\n    </view>`},ur="UiDesignerLayoutDesign",pr="uiDesignerLayoutDesignQuery",br="uiDesignerLayoutDesignMutation",gr=i["GQL"].fragment(ur,"UiDesignerLayoutDesign").parameter("id","baseLayoutName","layoutJson","viewType").toString();class vr{constructor(){}queryPage(e,t){return i["GQL"].query(pr,"queryPage").buildRequest(o=>o.buildObjectParameter("page",e=>{e.numberParameter("currentPage",t.current).numberParameter("size",t.pageSize).objectParameter("sort",'{ orders: { field: "writeDate", direction: DESC } }')}).buildObjectParameter("queryWrapper",t=>t.stringParameter("rsql",e))).buildResponse(e=>{e.parameter("totalElements","totalPages","currentPage","size").fragmentParameter("content",ur)}).mountFragment(ur,gr).request(n["jb"])}create(e){return i["GQL"].mutation(br,"create").buildRequest(t=>{t.buildObjectParameter("data",t=>{t.enumerationParameter("viewType",e.viewType)})}).buildResponse(e=>{e.parameter("id")}).request(n["jb"])}update(e){return i["GQL"].mutation(br,"create").buildRequest(t=>{t.buildObjectParameter("data",t=>{t.enumerationParameter("id",e.id)})}).buildResponse(e=>{e.parameter("id")}).request(n["jb"])}deleteOne(e){return i["GQL"].mutation(br,"delete").buildRequest(t=>{t.buildArrayParameter("dataList",[e],(e,t)=>{e.stringParameter("id",t)})}).buildResponse(e=>{e.parameter("id")}).request(n["jb"])}show(e){return J(this,void 0,void 0,(function*(){return i["GQL"].mutation(br,"show").buildRequest(t=>{t.buildObjectParameter("data",t=>{t.stringParameter("id",e)})}).buildResponse(e=>{e.parameter("id")}).request(n["jb"])}))}hide(e){return J(this,void 0,void 0,(function*(){return i["GQL"].mutation(br,"hide").buildRequest(t=>{t.buildObjectParameter("data",t=>{t.stringParameter("id",e)})}).buildResponse(e=>{e.parameter("id")}).request(n["jb"])}))}relations(e){}}vr.INSTANCE=new vr;const mr="__ui_designer_layout_definition";let yr=class extends n["b"]{get managementService(){return vr.INSTANCE}get managementLocalStorageKey(){return mr}initialize(e){return super.initialize(e),this.setComponent(nr),this}onOpenLayoutDefinitionDialog(e,t){var o,n,r;return J(this,void 0,void 0,(function*(){null===(o=this.dialogWidget)||void 0===o||o.dispose(),this.dialogWidget=void 0,null===(n=this.dialogViewWidget)||void 0===n||n.dispose(),this.dialogViewWidget=void 0;const a=i["Dialog"].create();let l,s,c,u;switch(e){case or.EDIT:l=dr,s="编辑模板",c=i["FormWidget"],u=t;break;case or.SEEK:l=dr,s="查看模板",c=i["DetailWidget"],u=t,a.setOkInvisible(!0);break;default:l=dr,s="创建模板",c=i["FormWidget"];break}const{model:p}=l;l=Object.assign(Object.assign({},l),{template:null===(r=yield i["ViewCache"].compile(p,l.name,l.template))||void 0===r?void 0:r.dsl});const b=Object(i["createRuntimeContextForWidget"])(l),g=b.handle;a.setWidth(i["ModalWidth"].small),a.setTitle(s),a.setOkText("确定"),a.setCancelText("取消"),a.on("ok",()=>J(this,void 0,void 0,(function*(){a.setActionLoading(!0);try{(yield this.onDialogOk(e))&&(a.onVisibleChange(!1),yield this.initRefreshProcess())}finally{a.setActionLoading(!1)}}))),a.on("cancel",()=>{a.onVisibleChange(!1)}),u=u?Object(d["a"])(u):yield Object(i["customQuery"])(p,"construct",yield b.getInitialValue(),void 0,void 0,void 0,{maxDepth:1}),u=Object.assign({},u);const v=a.createWidget(c,void 0,{metadataHandle:g,rootHandle:g,dataSource:u,activeRecords:u,template:b.viewTemplate,inline:!0});this.dialogWidget=a,this.dialogViewWidget=v,a.onVisibleChange(!0)}))}onDialogOk(e){var t,o;return J(this,void 0,void 0,(function*(){if(!(yield null===(t=this.dialogViewWidget)||void 0===t?void 0:t.validator()))return!1;const r=i["CastHelper"].cast(null===(o=this.dialogViewWidget)||void 0===o?void 0:o.getData());if(r)switch(e){case or.CREATE:yield this.managementService.create(r),n["yb"].INSTANCE.clear();break;case or.EDIT:yield this.managementService.update(r),n["yb"].INSTANCE.clear();break}return!0}))}onDesign(e){throw new Error("Invalid jump to")}generatorCondition(){const e=new i["Condition"](i["DEFAULT_TRUE_CONDITION"]);return e}queryPage(e,t){const o=Object.create(null,{queryPage:{get:()=>super.queryPage}});return J(this,void 0,void 0,(function*(){return o.queryPage.call(this,e,t)}))}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number,Object]),Q("design:returntype",Promise)],yr.prototype,"onOpenLayoutDefinitionDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],yr.prototype,"onDesign",null),yr=Y([i["SPI"].ClassFactory(l["R"].Token({tab:l["L"].TEMPLATE}))],yr);const hr=[{label:"全部视图类型",value:n["sb"].ALL,icon:"oinone-all-type"},{label:"表单",value:n["sb"].FORM,icon:"oinone-biaodanye",thumbnail:"表单页_1650959297681.jpg?x-oss-process=image/resize,m_lfit,h_800"},{label:"详情",value:n["sb"].DETAIL,icon:"oinone-xiangqingye",thumbnail:"详情页_1650959397758.jpg?x-oss-process=image/resize,m_lfit,h_800"},{label:"表格",value:n["sb"].TABLE,icon:"oinone-liebiaoye",thumbnail:"表格页_1650959384252.jpg?x-oss-process=image/resize,m_lfit,h_800"},{label:"画廊",value:n["sb"].GALLERY,icon:"oinone-chart",thumbnail:"gallery_1656950324238.png?x-oss-process=image/resize,m_lfit,h_800"},{label:"树视图",value:n["sb"].TREE,icon:"oinone-chart",thumbnail:"gallery_1656950324238.png?x-oss-process=image/resize,m_lfit,h_800"}].map(e=>(Object(n["Mc"])(e,"thumbnail"),e)),fr=[{label:"默认",value:"DEFAULT"},{label:"树表",value:"TREE"},{label:"级联",value:"CASCADER"}],Or=[{label:"左上",value:"LEFT_TOP"},{label:"右上",value:"RIGHT_TOP"},{label:"左下",value:"LEFT_BOTTOM"},{label:"右下",value:"RIGHT_BOTTOM"},{label:"上居中",value:"CENTER_TOP"},{label:"下居中",value:"CENTER_BOTTOM"}],wr=[{label:"全部业务类型",value:n["qb"].ALL,icon:"oinone-all-type"},{label:"运营管理",value:n["qb"].OPERATIONS_MANAGEMENT,icon:"oinone-cunchumoxing1",options:hr}];var jr;(function(e){e["DIRECT"]="DIRECT",e["TEMPLATE"]="TEMPLATE",e["EXCEL"]="EXCEL",e["HOME_PAGE"]="HOME_PAGE"})(jr||(jr={}));const kr=[{desc:"直接创建",key:jr.DIRECT,disabled:!1,help:"功能内测中，敬请期待"},{desc:"从模板创建",key:jr.TEMPLATE,disabled:!0,help:"功能内测中，敬请期待"},{desc:"从Excel导入创建",key:jr.EXCEL,disabled:!0,help:"功能内测中，敬请期待"}];var Cr;(function(e){e["CREATE_DIRECT"]="创建页面-直接创建",e["CREATE_TEMPLATE"]="创建页面-从模板创建",e["CREATE_EXCEL"]="创建页面-从Excel导入创建",e["EDIT"]="编辑页面",e["COPY"]="复制页面",e["CREATE_HOME_PAGE"]="添加应用首页"})(Cr||(Cr={}));const Dr=new Map;function Tr(){Dr.set(jr.HOME_PAGE,{type:jr.HOME_PAGE,title:Cr.CREATE_HOME_PAGE,fields:["title","model","bizType","type","description"]}),Dr.set(jr.DIRECT,{type:jr.DIRECT,title:Cr.CREATE_DIRECT,fields:[]})}var $r;Tr(),function(e){e["normal"]="normal",e["button"]="button"}($r||($r={}));const Er={buttonStyle:{type:String},readonly:{type:Boolean}},Sr=Object.assign(Object.assign(Object.assign({},l["z"]),Er),{mode:{type:[String,Object],default:$r.normal},defaultSelected:{type:Boolean,default:!0},defaultActiveKey:{type:String},activeKey:{type:String},options:{type:Array,required:!0},customGroupClass:{type:String,default:"single-select-group"},customItemClass:{type:String,default:"single-select-item"}}),Nr={popConfirmText:{type:String},popConfirmPlacement:{type:String},showPopconfirm:{type:Boolean,default:!1},showPopconfirmTransmission:{type:Array}};var Vr=Object(a["defineComponent"])({name:"SingleSelect",components:{ARadio:h["a"],ARadioGroup:D["a"],ARadioButton:T["a"],OioPopconfirm:r["OioPopconfirm"]},props:Object.assign(Object.assign(Object.assign({},Sr),Nr),{allowClear:{type:Boolean,default:!1},autocorrection:{type:Boolean,default:!0}}),emits:["update:activeKey","change"],setup(e,t){const o=Object(a["ref"])(void 0),i=Object(a["ref"])([]),n=Object(a["ref"])(!1),r=Object(a["ref"])(void 0),s=()=>{if(e.defaultSelected){let t=e.defaultActiveKey;if(t||e.options&&e.options.length>=1&&(t=e.options[0]),t)return t}},c=t=>{let n=e.activeKey,r=!1;n||(r=!0,n=s()),i.value=[],o.value=Object(l["cb"])(n,e.properties,e.customFillProperties),i.value=Object(l["U"])([],void 0,void 0,e.properties,e.customFillProperties,t,!1),r&&u(o.value)},d=(t,i)=>{var n;e.readonly||i.disabled||((null===(n=o.value)||void 0===n?void 0:n.key)===i.key?e.allowClear&&u(void 0):u(i))},u=a=>{var l;const s=null===a||void 0===a?void 0:a.key;let c;c=s?i.value.find(e=>e.key===s):void 0,e.showPopconfirm&&e.showPopconfirmTransmission&&b(null===(l=o.value)||void 0===l?void 0:l.key,s,e.showPopconfirmTransmission)?(r.value=c,n.value=!0):(o.value=c,t.emit("update:activeKey",null===c||void 0===c?void 0:c.key),t.emit("change",c))},p=()=>{var t;const n=null===(t=o.value)||void 0===t?void 0:t.key;if(!n)return;let r=i.value.find(e=>e.key===n);if(r)return;const a=e.defaultActiveKey;a&&(r=i.value.find(e=>e.key===a),r)?u(r):u(i.value[0])},b=(e,t,o)=>!(!e||!t)&&o.some(o=>o[0]===e&&o[1]===t),g=()=>{var e;n.value=!1,o.value=r.value,t.emit("update:activeKey",null===(e=r.value)||void 0===e?void 0:e.key),t.emit("change",r.value)},v=()=>{n.value=!1};return Object(a["watch"])(()=>e.activeKey,e=>{o.value=i.value.find(t=>t.key===e)},{immediate:!0}),Object(a["watch"])(()=>e.options,t=>{t&&t.length>=1?c(t):i.value=[],e.autocorrection&&p()},{immediate:!0}),{Mode:$r,selected:o,options:i,onSelectOption:d,popconfirmVisible:n,onPopConfirmConfirm:g,onPopConfirmCancel:v}}});const xr={class:"single-select"},Ir=["onClick"],Mr={key:1,class:"single-select-no-popconfirm"},Ar={key:2};function Fr(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-radio"),s=Object(a["resolveComponent"])("a-radio-button"),c=Object(a["resolveComponent"])("oio-popconfirm"),d=Object(a["resolveComponent"])("a-radio-group");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",xr,[Object(a["createVNode"])(d,{value:e.selected&&e.selected.value,"button-style":e.buttonStyle,disabled:e.readonly,class:Object(a["normalizeClass"])(e.customGroupClass)},{default:Object(a["withCtx"])(()=>[e.mode===e.Mode.normal?(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:0},Object(a["renderList"])(e.options,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.key,value:t.value,class:Object(a["normalizeClass"])(["single-normal-select-item",e.customItemClass?e.customItemClass:""]),disabled:e.readonly||t.disabled,onClick:Object(a["withModifiers"])(o=>e.onSelectOption(o,t),["prevent","stop"])},{default:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"content",{item:t},()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.label),1)])]),_:2},1032,["value","class","disabled","onClick"]))),128)):e.mode===e.Mode.button?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[e.showPopconfirm?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,visible:e.popconfirmVisible,placement:e.popConfirmPlacement,text:e.popConfirmText,confirmCallback:e.onPopConfirmConfirm,cancelCallback:e.onPopConfirmCancel},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.options,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{class:"single-select-span-item",onClick:Object(a["withModifiers"])(o=>e.onSelectOption(o,t),["prevent","stop"])},[(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.key,value:t.value,class:Object(a["normalizeClass"])(["single-button-select-item",e.customItemClass?e.customItemClass:""]),disabled:e.readonly||t.disabled},{default:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"content",{item:t},()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.label),1)])]),_:2},1032,["value","class","disabled"]))],8,Ir))),256))]),_:3},8,["visible","placement","text","confirmCallback","cancelCallback"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mr,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.options,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.key,value:t.value,class:Object(a["normalizeClass"])(["single-button-select-item",e.customItemClass?e.customItemClass:""]),disabled:e.readonly||t.disabled,onClick:Object(a["withModifiers"])(o=>e.onSelectOption(o,t),["prevent","stop"])},{default:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"content",{item:t},()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.label),1)])]),_:2},1032,["value","class","disabled","onClick"]))),128))]))],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ar))]),_:3},8,["value","button-style","disabled","class"])])}Vr.render=Fr,Vr.__file="src/view/page-designer/component/select/single-select/single-select.vue";const Lr=Object.assign(Object.assign({},l["Y"]),{labelProp:"name"});var Rr=Object(a["defineComponent"])({name:"ModuleCategorySelect",components:{SingleSelect:Vr,UiCateEmpty:n["kb"]},props:{currentModule:{type:String,required:!0},categoryId:{type:String}},emits:["update:category-id","change"],setup(e,t){const o=Object(a["ref"])([]),i=Object(a["ref"])(e.categoryId);Object(a["watch"])(()=>e.currentModule,t=>{t&&Object(n["Sc"])(t).then(t=>{o.value=t,o.value.forEach(t=>t.checked=t.id===e.categoryId)})},{immediate:!0}),Object(a["watch"])(()=>e.categoryId,e=>{i.value=e},{immediate:!0});const r=e=>{const o=null===e||void 0===e?void 0:e.key;i.value=o,t.emit("update:category-id",o),t.emit("change",e)};return{Mode:$r,singleSelectProperties:Lr,categories:o,currentCategoryId:i,onCategoryIdChange:r}}});function Br(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("single-select"),s=Object(a["resolveComponent"])("ui-cate-empty");return e.categories&&e.categories.length?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"active-key":e.currentCategoryId,"default-selected":!1,mode:e.Mode.button,options:e.categories,properties:e.singleSelectProperties,"allow-clear":"",buttonStyle:"solid",customGroupClass:"category-select-group-custom",customItemClass:"category-select-item-custom",onChange:e.onCategoryIdChange},null,8,["active-key","mode","options","properties","onChange"])):(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:1}))}function _r(e){const t=Object.assign(Object.assign({},l["Y"]),{valueProp:"value",keyProp:"value",labelProp:"label",filterProp:"value"}),o=wr.filter(e=>e.value!==n["qb"].ALL).map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)})),r=e=>{e.data.options?d.value=e.data.options.filter(e=>e.value!==n["sb"].ALL):d.value=[]},s=e=>{if(!e)return!1;const{bizType:t}=e;return!!t&&[n["qb"].OPERATIONS_MANAGEMENT].includes(t)},c=Object(a["ref"])(),d=Object(a["computed"])({get(){var t,o;const r=c.value;if(r)return r;const a=null===e||void 0===e?void 0:e.bizType.value;return a?((null===(o=null===(t=wr.find(e=>e.value===a))||void 0===t?void 0:t.options)||void 0===o?void 0:o.filter(e=>e.value!==n["sb"].ALL))||[]).map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)})):[]},set(e){c.value=e}}),u=e=>{if(!e)return!1;const{type:t}=e;return!!t&&[n["sb"].TABLE,n["sb"].TREE].includes(t)},p=e=>{if(!e)return!0;const{type:t}=e;return!t||![n["sb"].TABLE].includes(t)},b=e=>{const t=fr.map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)}));if(!e)return t;const{type:o}=e;if(!o)return t;switch(o){case i["ViewType"].Tree:return[t[1],t[2]]}return t},g=e=>{if(!e)return!1;const{type:t}=e;return!!t&&[n["sb"].TABLE,n["sb"].FORM,n["sb"].DETAIL,n["sb"].GALLERY].includes(t)},v=e=>{if(!e||e.id)return!1;const{type:t}=e;return!!t&&[n["sb"].TABLE,n["sb"].FORM,n["sb"].DETAIL].includes(t)},m=e=>{const t=Or.map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)})),{type:o,designerLayoutType:n}=e;if(!o)return t;switch(o){case i["ViewType"].Table:return n===fr[1].value||n===fr[2].value?[t[0]]:[t[0],t[1]];case i["ViewType"].Gallery:return[t[0],t[1]];default:return t}};return{bizTypeProperties:t,viewBizTypeOptions:o,isShowDesignerType:s,viewTypeOptions:d,isShowDesignerLayoutType:u,isReadOnlyDesignerLayoutType:p,viewDesignerLayoutTypeOptions:b,isShowDesignerActionBarType:g,isShowUsingDefaultView:v,viewDesignerActionBarTypeOptions:m,bizTypeSelectedCallback:r}}Rr.render=Br,Rr.__file="src/view/page-designer/component/widget/component/module-category-select.vue";const Wr={title:[{required:!0,message:"请输入页面标题",trigger:["blur"]}],model:[{required:!0,message:"请选择模型",trigger:["blur"]}],module:[{required:!0,message:"请选择应用模块",trigger:["blur"]}],bizType:[{required:!0,message:"请选择页面类型",trigger:["blur"]}],type:[{required:!0,message:"请选择视图类型",trigger:["blur"]}]};var Pr=Object(a["defineComponent"])({name:"AddViewPreDialog",components:{OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioModal:r["OioModal"],OioInput:r["OioInput"],OioSwitch:r["OioSwitch"],OioTextarea:r["OioTextarea"],OioTooltipHelp:r["OioTooltipHelp"],SingleSelect:Vr,ModuleCategorySelect:Rr,DesignerModuleSelect:l["r"],DesignerModelSelect:l["q"]},props:{formView:{type:Object,default:()=>{}},visible:{type:Boolean},confirmLoading:{type:Boolean},moduleViewCateList:{type:Array},currentModule:{type:String},currentModel:{type:String},enterCallback:{type:Function},cancelCallback:{type:Function},viewListDialogFormTitle:{type:String},itemFieldList:{type:Array}},setup(e){const t=Object(a["ref"])(),o=Object(a["ref"])(!1),r=Object(a["computed"])(()=>{var t;return!!(null===(t=e.formView)||void 0===t?void 0:t.id)}),s=Object(a["computed"])(()=>{var e;return(null===(e=i["SPI"].RawInstantiate(l["Q"]))||void 0===e?void 0:e.createViewDialogVisibleField)||[]}),c=Object(a["ref"])(),d=()=>{c.value&&c.value.modelSelect2LazyRun()},u=[{displayName:"1",name:"FULL",value:"FULL",label:"1"},{displayName:"1/2",name:"HALF",value:"HALF",label:"1/2"},{displayName:"1/3",name:"THIRD",value:"THIRD",label:"1/3"},{displayName:"1/4",name:"QUARTER",value:"QUARTER",label:"1/4"}],p=Object(a["computed"])(()=>e.itemFieldList&&e.itemFieldList.length?e.itemFieldList:["title","model","bizType","type","categoryId","description","module"]),b=Object(a["computed"])(()=>{if(Cr.COPY===e.viewListDialogFormTitle)return{superModelSelect:e.currentModel}}),g=Object(a["computed"])(()=>{var t,o;if(Cr.COPY===e.viewListDialogFormTitle&&(null===(t=e.formView)||void 0===t?void 0:t.model))return{applicationModuleModel:null===(o=e.formView)||void 0===o?void 0:o.model}}),v=_r({bizType:Object(a["computed"])(()=>{var t;return null===(t=e.formView)||void 0===t?void 0:t.bizType})}),m=Object(a["computed"])(()=>{const t=e.formView.type,o=v.viewTypeOptions.value||[],i=[n["sb"].FORM,n["sb"].DETAIL].includes(t),a=Cr.COPY===e.viewListDialogFormTitle;return r.value?o.map(e=>Object.assign(Object.assign({},e),{disabled:!(a&&i&&[n["sb"].FORM,n["sb"].DETAIL].includes(e.value))})):o}),y=(t,o)=>J(this,void 0,void 0,(function*(){o&&(yield Object(a["nextTick"])(),c.value&&(e.formView.model="",c.value.modelSelect2LazyRun(!1)))}));return Object(n["ld"])(),Object.assign(Object.assign({Mode:$r,ViewBizTypeEnum:n["qb"],ViewListDialogTitle:Cr,ViewLayoutTypeOptions:fr},v),{currentViewTypeOptions:m,isReadonly:r,modelQueryData:b,moduleQueryData:g,FormLayout:i["FormLayout"],createViewRules:Object.entries(Wr).map(([e,t])=>({[e]:t.map(e=>Object.assign(Object.assign({},e),{message:Object(i["translateValueByKey"])(e.message)}))})).reduce((e,t)=>Object.assign(Object.assign({},e),t)),form:t,realItemFieldList:p,buttonStatus:o,addView2ModelSelect:c,addView2ModelSelectRun:d,onModuleChange:y,defaultColSpanOptions:u,ViewTypeEnum:n["sb"],visibleFieldList:s})}});function zr(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input"),s=Object(a["resolveComponent"])("oio-form-item"),c=Object(a["resolveComponent"])("oio-tooltip-help"),d=Object(a["resolveComponent"])("designer-model-select"),u=Object(a["resolveComponent"])("designer-module-select"),p=Object(a["resolveComponent"])("single-select"),b=Object(a["resolveComponent"])("oio-switch"),g=Object(a["resolveComponent"])("a-select"),v=Object(a["resolveComponent"])("module-category-select"),m=Object(a["resolveComponent"])("oio-textarea"),y=Object(a["resolveComponent"])("oio-form"),h=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createBlock"])(h,{"cancel-callback":(t,o)=>e.cancelCallback(e.form,o),"confirm-loading":e.confirmLoading,"enter-callback":(t,o)=>e.enterCallback(e.form,o),title:e.$translate(e.viewListDialogFormTitle),visible:e.visible,class:"add-view-pre-dialog",heigth:"60%",width:"560px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(y,{ref:"form",data:e.formView,layout:e.FormLayout.VERTICAL,rules:e.createViewRules},{default:Object(a["withCtx"])(()=>[e.realItemFieldList.includes("title")&&e.visibleFieldList.includes("title")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,label:e.$translate("页面标题"),name:"title",required:""},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{value:e.formView.title,"onUpdate:value":t[0]||(t[0]=t=>e.formView.title=t),maxlength:50,placeholder:e.$translate("请输入页面标题")},null,8,["value","placeholder"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),e.realItemFieldList.includes("model")&&e.visibleFieldList.includes("model")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:1,name:"model",required:""},{label:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("模型")),1),e.ViewListDialogTitle.COPY===e.viewListDialogFormTitle?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,content:"复制页面的模型可设定为原页面的模型或其子模型。"})):Object(a["createCommentVNode"])("v-if",!0)]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{ref:"addView2ModelSelect",model:e.formView.model,"onUpdate:model":t[1]||(t[1]=t=>e.formView.model=t),"query-data":e.modelQueryData,"extend-variables":e.ViewListDialogTitle.COPY===e.viewListDialogFormTitle?{crossingModule:!0}:{},currentModel:e.currentModel,currentModule:e.formView.module||e.currentModule,disabled:e.isReadonly&&e.ViewListDialogTitle.COPY!==e.viewListDialogFormTitle,placeholder:e.$translate("请选择模型")},null,8,["model","query-data","extend-variables","currentModel","currentModule","disabled","placeholder"])]),_:1})):Object(a["createCommentVNode"])("v-if",!0),e.ViewListDialogTitle.COPY===e.viewListDialogFormTitle&&e.currentModel!==e.formView.model&&e.visibleFieldList.includes("module")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:2,label:e.$translate("应用模块"),name:"module",required:""},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{module:e.formView.module,"onUpdate:module":t[2]||(t[2]=t=>e.formView.module=t),"query-data":e.moduleQueryData,currentModel:e.currentModel,currentModule:e.currentModule,placeholder:e.$translate("请选择应用模块"),onChange:e.onModuleChange},null,8,["module","query-data","currentModel","currentModule","placeholder","onChange"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),e.realItemFieldList.includes("bizType")&&e.visibleFieldList.includes("bizType")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:3,label:e.$translate("业务类型"),name:"bizType",required:""},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{"active-key":e.formView.bizType,"onUpdate:active-key":t[3]||(t[3]=t=>e.formView.bizType=t),"default-active-key":e.ViewBizTypeEnum.OPERATIONS_MANAGEMENT,mode:e.Mode.button,options:e.viewBizTypeOptions,properties:e.bizTypeProperties,readonly:e.isReadonly,buttonStyle:"solid"},null,8,["active-key","default-active-key","mode","options","properties","readonly"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),e.realItemFieldList.includes("type")&&e.visibleFieldList.includes("type")?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:4,label:e.$translate("视图类型"),name:"type"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{"active-key":e.formView.type,"onUpdate:active-key":t[4]||(t[4]=t=>e.formView.type=t),mode:e.Mode.button,options:e.currentViewTypeOptions,properties:e.bizTypeProperties,buttonStyle:"solid"},null,8,["active-key","mode","options","properties"])]),_:1},8,["label"])),[[a["vShow"],e.isShowDesignerType(e.formView)]]):Object(a["createCommentVNode"])("v-if",!0),e.isShowDesignerLayoutType(e.formView)&&e.visibleFieldList.includes("designerLayoutType")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:5,label:e.$translate("布局类型"),name:"designerLayoutType"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{"active-key":e.formView.designerLayoutType,"onUpdate:active-key":t[5]||(t[5]=t=>e.formView.designerLayoutType=t),"default-active-key":e.ViewLayoutTypeOptions[0].value,mode:e.Mode.button,options:e.viewDesignerLayoutTypeOptions(e.formView),properties:e.bizTypeProperties,readonly:e.isReadonly,buttonStyle:"solid"},null,8,["active-key","default-active-key","mode","options","properties","readonly"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["withDirectives"])(Object(a["createVNode"])(s,{label:e.$translate("操作栏位置"),name:"designerActionBarType"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{"active-key":e.formView.designerActionBarType,"onUpdate:active-key":t[6]||(t[6]=t=>e.formView.designerActionBarType=t),"default-active-key":e.viewDesignerActionBarTypeOptions(e.formView)[0].value,mode:e.Mode.button,options:e.viewDesignerActionBarTypeOptions(e.formView),properties:e.bizTypeProperties,buttonStyle:"solid"},null,8,["active-key","default-active-key","mode","options","properties"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerActionBarType(e.formView)&&e.visibleFieldList.includes("designerActionBarType")]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"usingDefaultView"},{label:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("使用默认视图")),1),e.ViewListDialogTitle.CREATE_DIRECT===e.viewListDialogFormTitle||e.ViewListDialogTitle.CREATE_TEMPLATE===e.viewListDialogFormTitle||e.ViewListDialogTitle.CREATE_EXCEL===e.viewListDialogFormTitle?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,content:"默认视图会依据模型信息与视图类型自动生成相应页面，从而简化设计流程。"})):Object(a["createCommentVNode"])("v-if",!0)]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{checked:e.formView.usingDefaultView,"onUpdate:checked":t[7]||(t[7]=t=>e.formView.usingDefaultView=t)},null,8,["checked"])]),_:1},512),[[a["vShow"],e.isShowUsingDefaultView(e.formView)&&e.visibleFieldList.includes("usingDefaultView")]]),e.formView.usingDefaultView&&(e.formView.type===e.ViewTypeEnum.FORM||e.formView.type===e.ViewTypeEnum.DETAIL)&&e.visibleFieldList.includes("defaultColSpan")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:6,label:e.$translate("默认宽度")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(g,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",placeholder:e.$translate("请选择默认宽度"),"show-search":"",value:e.formView.defaultColSpan,"onUpdate:value":t[8]||(t[8]=t=>e.formView.defaultColSpan=t),options:e.defaultColSpanOptions},null,8,["placeholder","value","options"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),e.realItemFieldList.includes("categoryId")&&e.visibleFieldList.includes("categoryId")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:7,label:e.$translate("页面分组"),name:"categoryId"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,{"category-id":e.formView.categoryId,"onUpdate:category-id":t[9]||(t[9]=t=>e.formView.categoryId=t),"current-module":e.currentModule},null,8,["category-id","current-module"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0),e.realItemFieldList.includes("description")&&e.visibleFieldList.includes("description")?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:8,label:e.$translate("页面描述"),name:"description"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{value:e.formView.description,"onUpdate:value":t[10]||(t[10]=t=>e.formView.description=t),autoSize:{minRows:3,maxRows:3},maxlength:128,placeholder:e.$translate("请输入页面描述")},null,8,["value","placeholder"])]),_:1},8,["label"])):Object(a["createCommentVNode"])("v-if",!0)]),_:1},8,["data","layout","rules"])]),_:1},8,["cancel-callback","confirm-loading","enter-callback","title","visible"])}Pr.render=zr,Pr.__file="src/components/dialog/AddViewPreDialog.vue";var Gr=Object(a["defineComponent"])({name:"ViewReferenceDialog",props:["formView","visible","referenceViewPagination","referenceMenuPagination","referenceViewList","referenceMenuList","onReferenceMenuPaginationChange","onReferenceViewPaginationChange"],components:{ViewReference:ui,OioModal:r["OioModal"]},emits:["cancel","ok","click-view-item"],setup(e,{emit:t}){const o=()=>{t("cancel")},i=()=>{t("ok")},n=e=>!!e.designerViewId,r=e=>{n(e)&&t("click-view-item",e)};return{onCancel:o,onOk:i,allowClickViewItem:n,onClickViewItem:r}}});const Ur={class:"view-reference-list"},Kr={class:"single view"},qr=["title","onClick"],Hr={class:"single menu"},Yr=["title"];function Qr(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("view-reference"),s=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{cancelCallback:e.onCancel,enterCallback:e.onOk,"has-footer":!1,title:e.$translate("页面引用"),visible:e.visible,heigthx:"612px",width:"960px"},{default:Object(a["withCtx"])(()=>[Object(a["createCommentVNode"])(" 基本信息 "),Object(a["createElementVNode"])("div",Ur,[Object(a["createElementVNode"])("div",Kr,[Object(a["createVNode"])(l,{list:e.referenceViewList,pagination:e.referenceViewPagination,title:e.$translate("存在引用关系的视图"),onPagination:e.onReferenceViewPaginationChange},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])([e.allowClickViewItem(t)&&"view-reference-allow-click"]),title:t.relViewLabel,onClick:()=>e.onClickViewItem(t)},Object(a["toDisplayString"])(t.relViewLabel),11,qr)]),_:1},8,["list","pagination","title","onPagination"])]),Object(a["createElementVNode"])("div",Hr,[Object(a["createVNode"])(l,{list:e.referenceMenuList,pagination:e.referenceMenuPagination,total:e.referenceMenuPagination.total,title:e.$translate("存在引用关系的菜单"),onPagination:e.onReferenceMenuPaginationChange},{default:Object(a["withCtx"])(({data:e})=>[Object(a["createElementVNode"])("span",{title:e.relMenuLabel},Object(a["toDisplayString"])(e.relMenuLabel),9,Yr)]),_:1},8,["list","pagination","total","title","onPagination"])])])]),_:1},8,["cancelCallback","enterCallback","title","visible"])}Gr.render=Qr,Gr.__file="src/components/dialog/ViewReferenceDialog.vue";var Jr=Object(a["defineComponent"])({components:{DownOutlined:P["a"],OioButton:r["OioButton"]},emits:["clickMenu"],setup(e,t){const o=Object(a["ref"])(!1),i=kr,n=e=>{e.key===jr.DIRECT&&t.emit("clickMenu",jr.DIRECT)};return{visible:o,handleMenuClick:n,createViewMethods:i}}});const Xr={key:1};function Zr(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-tooltip"),s=Object(a["resolveComponent"])("a-menu-item"),c=Object(a["resolveComponent"])("a-menu"),d=Object(a["resolveComponent"])("DownOutlined"),u=Object(a["resolveComponent"])("oio-button"),p=Object(a["resolveComponent"])("a-dropdown");return Object(a["openBlock"])(),Object(a["createBlock"])(p,{visible:e.visible,"onUpdate:visible":t[1]||(t[1]=t=>e.visible=t)},{overlay:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{onClick:e.handleMenuClick},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.createViewMethods,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.key,disabled:t.disabled,style:{"text-align":"center"}},{default:Object(a["withCtx"])(()=>[t.disabled?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,placement:"left"},{title:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(t.help)),1)]),default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate(t.desc)),1)]),_:2},1024)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Xr,Object(a["toDisplayString"])(e.$translate(t.desc)),1))]),_:2},1032,["disabled"]))),128))]),_:1},8,["onClick"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{class:"btn",type:"primary",icon:"oinone-tianjiamoxing",onClick:t[0]||(t[0]=()=>{})},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加页面"))+" ",1),Object(a["createVNode"])(d)])]),_:1})]),_:1},8,["visible"])}Jr.render=Zr,Jr.__file="src/components/popover/AddViewPopover.vue";var ea=Object(a["defineComponent"])({name:"DataWrapper",components:{OioIcon:r["OioIcon"],AToolTip:k["a"],ViewMoreActionPopover:Oe},props:{titleIcon:String,data:{type:Object,default:()=>({})},activeKey:{type:String,default:"show"}},emits:["delete","ChangeActiveType","ShowReference","ShowEdit","ShowCopy","goToViewDesignEdit","ShowDetail"],setup(e,t){const o="show",n=Object(a["ref"])(new Map),r=Object(a["ref"])(new Map),s=Object(a["ref"])(new Map),c=hr.map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)})),d=Object(a["ref"])();Object(a["onMounted"])(()=>J(this,void 0,void 0,(function*(){for(let e of c)n.value.set(e.value,e.label),s.value.set(e.value,e.icon),r.value.set(e.value,e.thumbnail);const t=()=>J(this,void 0,void 0,(function*(){const t=l["db"].getItem("filterModel");if(t&&t.displayName)return t.displayName;{const t=yield Object(i["getModel"])(e.data.model);return t.displayName}}));d.value=yield t()})));const u=o=>{t.emit("delete",e.data)},p=()=>{t.emit("ChangeActiveType",e.data)},b=()=>{t.emit("ShowReference",e.data)},g=()=>{t.emit("ShowEdit",e.data)},v=()=>{t.emit("ShowCopy",e.data)},m=()=>{t.emit("goToViewDesignEdit",e.data)},{onMousedown:y,onMouseup:h}=Object(i["useClick"])(m);return{onDelete:u,onChangeActiveType:p,onShowReference:b,onShowEdit:g,onShowCopy:v,onGoToViewDesignEdit:m,wrapperMousedown:t=>{var o;!1===(null===(o=e.data)||void 0===o?void 0:o.sys)&&y(t)},wrapperMouseup:t=>{var o;!1===(null===(o=e.data)||void 0===o?void 0:o.sys)&&h(t)},viewTypeMap:n,viewTypeIconMap:s,viewThumbnailMap:r,showField:o,modelDisplayName:d}}});const ta={class:"view-data-wrapper"},oa=["title"],ia={class:"title-content"},na={class:"pic-area"},ra={class:"img-area"},aa=["src"],la={class:"view-type"},sa={class:"title",style:{"margin-bottom":"10px","margin-top":"20px",color:"rgba(0, 0, 0, 0.65)"}},ca={class:"title",style:{"margin-bottom":"10px",color:"rgba(0, 0, 0, 0.65)"}},da=["title"],ua={class:"footer-actions"},pa=Object(a["createElementVNode"])("div",{class:"action"},[Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-remove"})],-1),ba=Object(a["createElementVNode"])("div",{class:"action disabled"},[Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-remove"})],-1),ga={key:0},va=Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-invisible-filled"},null,-1),ma=[va],ya={key:1},ha=Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-visible-filled"},null,-1),fa=[ha],Oa=Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-reference"},null,-1),wa=[Oa],ja=Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-jiemiansheji1"},null,-1),ka=[ja],Ca=Object(a["createElementVNode"])("div",{class:"action"},[Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-jiemiansheji1"})],-1);function Da(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-tooltip"),c=Object(a["resolveComponent"])("a-tool-tip"),d=Object(a["resolveComponent"])("a-popconfirm"),u=Object(a["resolveComponent"])("view-more-action-popover");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ta,[Object(a["createElementVNode"])("div",{class:"view-data-content",onMousedown:t[0]||(t[0]=(...t)=>e.wrapperMousedown&&e.wrapperMousedown(...t)),onMouseup:t[1]||(t[1]=(...t)=>e.wrapperMouseup&&e.wrapperMouseup(...t))},[Object(a["createElementVNode"])("div",{title:e.data.title||e.data.name,class:"title",style:{"text-align":"center","margin-bottom":"20px",color:"#333333","font-weight":"500"}},[e.viewTypeIconMap.get(e.data.type)?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,icon:e.viewTypeIconMap.get(e.data.type),color:"var(--oio-primary-color)"},null,8,["icon"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("span",ia,Object(a["toDisplayString"])(e.data.title||e.data.name),1)],8,oa),Object(a["createElementVNode"])("div",na,[Object(a["createElementVNode"])("div",ra,[Object(a["createElementVNode"])("img",{src:e.data.thumbnail?e.data.thumbnail:e.viewThumbnailMap.get(e.data.type),class:"view-img"},null,8,aa)]),Object(a["createElementVNode"])("div",la,Object(a["toDisplayString"])(e.viewTypeMap.get(e.data.type)),1)]),Object(a["createElementVNode"])("div",sa,Object(a["toDisplayString"])(`${e.$translate("模型名称")}: ${e.modelDisplayName}`),1),Object(a["createVNode"])(s,{placement:"top",title:e.data.name},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",ca,Object(a["toDisplayString"])(`${e.$translate("视图名称")}: ${e.data.name}`),1)]),_:1},8,["title"]),Object(a["createElementVNode"])("div",{title:e.data.description,class:"title",style:{color:"rgba(0, 0, 0, 0.45)"}},Object(a["toDisplayString"])(e.data.description),9,da)],32),Object(a["createElementVNode"])("div",ua,[!1===e.data.sys?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,"cancel-text":e.$translate("取消"),class:"action","ok-text":e.$translate("确定"),title:e.$translate("确认要删除吗?"),onConfirm:e.onDelete},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{title:e.$translate("删除")},{default:Object(a["withCtx"])(()=>[pa]),_:1},8,["title"])]),_:1},8,["cancel-text","ok-text","title","onConfirm"])):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:1,title:e.$translate("内置的数据和存在被引用的数据不能删除")},{default:Object(a["withCtx"])(()=>[ba]),_:1},8,["title"])),Object(a["createVNode"])(c,{title:e.$translate("ACTIVE"===e.data[e.showField]?"隐藏":"可见")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"action",onClick:t[2]||(t[2]=Object(a["withModifiers"])((...t)=>e.onChangeActiveType&&e.onChangeActiveType(...t),["stop"]))},["ACTIVE"===e.data[e.showField]?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ga,ma)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ya,fa))])]),_:1},8,["title"]),Object(a["createVNode"])(c,{title:e.$translate("查看被引用的信息")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"action",onClick:t[3]||(t[3]=Object(a["withModifiers"])((...t)=>e.onShowReference&&e.onShowReference(...t),["stop"]))},wa)]),_:1},8,["title"]),!1===e.data.sys?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:2,title:e.$translate("设计页面")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"action",onClick:t[4]||(t[4]=Object(a["withModifiers"])((...t)=>e.onGoToViewDesignEdit&&e.onGoToViewDesignEdit(...t),["stop"]))},ka)]),_:1},8,["title"])):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:3,class:"action disabled",title:e.$translate("内置的数据仅支持查看页面详情")},{default:Object(a["withCtx"])(()=>[Ca]),_:1},8,["title"])),Object(a["createVNode"])(u,{currentView:e.data,onOnShowEdit:e.onShowEdit,onOnShowCopy:e.onShowCopy},null,8,["currentView","onOnShowEdit","onOnShowCopy"])])])}ea.render=Da,ea.__file="src/components/data-wrapper/DataWrapper.vue";var Ta=Object(a["defineComponent"])({components:{OioEmptyData:r["OioEmptyData"],OioPagination:r["OioPagination"],DataWrapper:ea,OioSpin:r["OioSpin"]},props:["dataList","loading","pagination","onPaginationChange","onDelete","onChangeActiveType","onShowReference","onGoToViewDesignEdit","onShowEdit","onShowCopy"]});const $a={class:"view-list-container"},Ea={class:"list-wrapper"},Sa={class:"view-list-list"},Na={class:"pagination"};function Va(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("data-wrapper"),s=Object(a["resolveComponent"])("oio-empty-data"),c=Object(a["resolveComponent"])("oio-pagination"),d=Object(a["resolveComponent"])("oio-spin");return Object(a["openBlock"])(),Object(a["createBlock"])(d,{loading:e.loading,size:"large"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",$a,[Object(a["createElementVNode"])("div",Ea,[Object(a["createElementVNode"])("div",Sa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.dataList,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t.id,class:"view-list-wrapper"},[Object(a["createVNode"])(l,{data:t,"active-key":"active","title-icon":"oinone-sequence",onDelete:e.onDelete,onGoToViewDesignEdit:e.onGoToViewDesignEdit,onChangeActiveType:e.onChangeActiveType,onShowReference:e.onShowReference,onShowEdit:e.onShowEdit,onShowCopy:e.onShowCopy},null,8,["data","onDelete","onGoToViewDesignEdit","onChangeActiveType","onShowReference","onShowEdit","onShowCopy"])]))),128))]),e.dataList&&0!==e.dataList.length?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,class:"empty",description:e.$translate("暂无数据")},null,8,["description"]))]),Object(a["createElementVNode"])("div",Na,[e.pagination?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"current-page":e.pagination.current,"page-size":e.pagination.pageSize,"page-size-options":["15","20","50","100"],total:e.pagination.total,"show-total":"",onChange:e.onPaginationChange},null,8,["current-page","page-size","total","onChange"])):Object(a["createCommentVNode"])("v-if",!0)])])]),_:1},8,["loading"])}Ta.render=Va,Ta.__file="src/components/view/view-list/ViewList.vue";var xa=Object(a["defineComponent"])({name:"PageListWidget",components:{UiModelFilterCascade:n["mb"],ViewList:Ta,DataSourceRadio:n["n"],AddViewPreDialog:Pr,AddViewPopover:Jr,ViewReferenceDialog:Gr,UiViewCategory:n["nb"],OioIcon:r["OioIcon"],AEmpty:$["a"],ASelect:f["c"],ASelectOption:f["b"],ASelectOptGroup:f["a"],AInputGroup:E["a"],AInput:S["a"]},inheritAttrs:!1,props:["currentModule","currentModular","applicationOptions","onChangeModule","showAddViewPreDialog","viewActive","loading","setActiveType","currentModel","setModel","modelList","onChangeModel","onChangeModular","onChangeModularList","keyword","onChangeViewKeyword","viewType","viewBizType","setViewType","setViewBizType","dataSource","setDataSource","onPaginationChange","dataList","pagination","onDelete","onChangeActiveType","onChangeReferenceDialog","moduleList","visible","tabsData","value","onShowEdit","onShowCopy","onShowReference","viewListDialogFormTitle","showReferenceDialog","showFormWidgetDialog","addViewDialogLoading","onChangeFormWidgetDialog","onSubmitForm","formView","createViewFields","onGoToViewDesignEdit","onGoToViewDesignEditNewWindow","viewTypeList","setViewTypeOptions","onEditCate","onChangeModuleViewCates","fetchModuleViewCategoryList","moduleViewCateList","selectedCate","onSelectCate","referenceViewPagination","referenceMenuPagination","referenceViewList","referenceMenuList","onReferenceMenuPaginationChange","onReferenceViewPaginationChange","fetchModelListMore","fetchModelListByKeyword"],setup(e,t){const o=Object(a["ref"])($["a"].PRESENTED_IMAGE_SIMPLE),i=hr,r=wr,l=Object(a["computed"])(()=>e.applicationOptions.filter(e=>!!e.application)),s=Object(a["computed"])(()=>e.applicationOptions.filter(e=>!e.application)),c=t=>{t===n["qb"].OPERATIONS_MANAGEMENT||t===n["qb"].ALL?e.setViewTypeOptions(i):e.setViewTypeOptions([]),e.setViewBizType(t)},d=Object(a["ref"])(),u=t=>{e.showAddViewPreDialog(t),d.value&&d.value.addView2ModelSelectRun()},b=t=>J(this,void 0,void 0,(function*(){yield e.onShowCopy(t),d.value&&d.value.addView2ModelSelectRun()})),g=t=>{const{scrollHeight:o,scrollTop:i,clientHeight:n}=t.target;o-i===n&&e.fetchModelListMore()};let v;const m=t=>{v&&(clearTimeout(v),v=null),v=setTimeout(()=>{t=t.replaceAll("'",""),e.fetchModelListByKeyword("displayName",t,!0,!1,!0)},300)},y=t=>{e.onChangeModule(t)},h=t=>{e.onChangeModular(t)},f=t=>{e.onChangeModel(t)},O=t=>{e.onChangeModularList(t)},w=n["pb"],j=Object(p["a"])((...t)=>{var o;null===(o=e.onChangeViewKeyword)||void 0===o||o.call(e,...t)},300);return{dataEmptyBg:o,viewActiveTypeOptions:w,onChangeViewBizType:c,viewBizTypeList:r,applications:l,modules:s,listShowAddViewPreDialog:u,listShowCopyViewPreDialog:b,addViewDialog:d,slipModel:g,searchModel:m,filterChangeModule:y,filterChangeModular:h,filterChangeModel:f,filterChangeModularList:O,onChangeViewKeyword:j}}});const Ia={class:"ui-designer-content ui-designer-page-list"},Ma={class:"ui-designer-header-bottom ui-designer-page-list-header"},Aa={class:"designer-header-row"},Fa={class:"designer-header-search"},La={class:"app-select"},Ra={style:{"font-size":"12px"}},Ba={class:"select-prefix"},_a={class:"select-prefix"},Wa={class:"model-select"},Pa=Object(a["createElementVNode"])("div",{class:"ui-model-filter-custom-cascade custom-cascade"},null,-1),za={class:"view-biz-type-select"},Ga={class:"view-type-select"},Ua={class:"view-data-source-radio"},Ka={class:"view-status-keyword"},qa={class:"toolbar"},Ha={class:"ui-designer-page-list-content"};function Ya(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-empty"),s=Object(a["resolveComponent"])("a-select-option"),c=Object(a["resolveComponent"])("a-select-opt-group"),d=Object(a["resolveComponent"])("a-select"),u=Object(a["resolveComponent"])("ui-model-filter-cascade"),p=Object(a["resolveComponent"])("data-source-radio"),b=Object(a["resolveComponent"])("oio-icon"),g=Object(a["resolveComponent"])("a-input"),v=Object(a["resolveComponent"])("a-input-group"),m=Object(a["resolveComponent"])("add-view-popover"),y=Object(a["resolveComponent"])("ui-view-category"),h=Object(a["resolveComponent"])("view-list"),f=Object(a["resolveComponent"])("add-view-pre-dialog"),O=Object(a["resolveComponent"])("view-reference-dialog");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ia,[Object(a["createElementVNode"])("div",Ma,[Object(a["createElementVNode"])("div",Aa,[Object(a["createElementVNode"])("div",Fa,[Object(a["createElementVNode"])("div",La,[Object(a["createVNode"])(d,{"show-search":!0,title:e.currentModule.displayName,value:e.currentModule.module,dropdownClassName:"ui-designer-select-global","option-filter-prop":"label",style:{width:"100%"},onChange:e.filterChangeModule},{notFoundContent:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{image:e.dataEmptyBg},{description:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Ra,Object(a["toDisplayString"])(e.$translate("暂无匹配的应用")),1)]),_:1},8,["image"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{label:e.$translate("应用")},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.applications,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.module,label:t.displayName,title:t.module,value:t.module},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Ba,Object(a["toDisplayString"])(e.$translate("应用"))+": ",1),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.displayName),1)]),_:2},1032,["label","title","value"]))),128))]),_:1},8,["label"]),Object(a["createVNode"])(c,{label:e.$translate("模块")},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modules,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.module,label:t.displayName,title:t.module,value:t.module},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",_a,Object(a["toDisplayString"])(e.$translate("模块"))+": ",1),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.displayName),1)]),_:2},1032,["label","title","value"]))),128))]),_:1},8,["label"])]),_:1},8,["title","value","onChange"])]),Object(a["createElementVNode"])("div",Wa,[Object(a["createVNode"])(u,{"application-options":e.applicationOptions,"current-app":e.currentModule,"current-model":e.currentModel,"current-modular":e.currentModular,"model-list":e.modelList,onFilterChangeModel:e.filterChangeModel,onFilterChangeModular:e.filterChangeModular,onFilterChangeModularList:e.filterChangeModularList,onSearchModel:e.searchModel,onSlipModel:e.slipModel},null,8,["application-options","current-app","current-model","current-modular","model-list","onFilterChangeModel","onFilterChangeModular","onFilterChangeModularList","onSearchModel","onSlipModel"]),Pa]),Object(a["createElementVNode"])("div",za,[Object(a["createVNode"])(d,{value:e.viewBizType,dropdownClassName:"ui-designer-select-global",style:{width:"100%"},onChange:e.onChangeViewBizType},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.viewBizTypeList,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.value,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(t.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),Object(a["createElementVNode"])("div",Ga,[Object(a["createVNode"])(d,{value:e.viewType,dropdownClassName:"ui-designer-select-global",style:{width:"100%"},onChange:e.setViewType},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.viewTypeList,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.value,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(t.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),Object(a["createElementVNode"])("div",Ua,[Object(a["createVNode"])(p,{value:e.dataSource,"biz-name":"",class:"ui-designer-search-item data-source",onChange:e.setDataSource},null,8,["value","onChange"])]),Object(a["createElementVNode"])("div",Ka,[Object(a["createVNode"])(v,{compact:!0},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{value:e.viewActive,dropdownClassName:"ui-designer-select-global",style:{width:"30%"},onChange:e.setActiveType},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.viewActiveTypeOptions,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.value,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(t.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),Object(a["createVNode"])(g,{"allow-clear":!0,placeholder:e.$translate("使用名称搜索"),style:{width:"70%"},onChange:e.onChangeViewKeyword},{prefix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{icon:"oinone-sousuo"})]),_:1},8,["placeholder","onChange"])]),_:1})])]),Object(a["createElementVNode"])("div",qa,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(m,{onClickMenu:e.listShowAddViewPreDialog},null,8,["onClickMenu"])])])]),Object(a["createVNode"])(y,{modelValue:e.selectedCate.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedCate.id=t),"current-module":e.currentModule,"module-view-cate-list":e.moduleViewCateList,onSelectCate:e.onSelectCate,onRefreshCate:e.fetchModuleViewCategoryList,onEditCate:e.onEditCate,onChangeModuleViewCates:e.onChangeModuleViewCates},null,8,["modelValue","current-module","module-view-cate-list","onSelectCate","onRefreshCate","onEditCate","onChangeModuleViewCates"])]),Object(a["createElementVNode"])("div",Ha,[Object(a["createVNode"])(h,{"data-list":e.dataList,loading:e.loading,"on-change-active-type":e.onChangeActiveType,"on-change-reference-dialog":e.onChangeReferenceDialog,"on-delete":e.onDelete,"on-go-to-view-design-edit":e.onGoToViewDesignEdit,"on-pagination-change":e.onPaginationChange,"on-show-copy":e.listShowCopyViewPreDialog,"on-show-edit":e.onShowEdit,"on-show-reference":e.onShowReference,pagination:e.pagination},null,8,["data-list","loading","on-change-active-type","on-change-reference-dialog","on-delete","on-go-to-view-design-edit","on-pagination-change","on-show-copy","on-show-edit","on-show-reference","pagination"])]),e.showFormWidgetDialog?(Object(a["openBlock"])(),Object(a["createBlock"])(f,{key:0,ref:"addViewDialog","cancel-callback":()=>e.onChangeFormWidgetDialog(!1),"confirm-loading":e.addViewDialogLoading,"current-model":e.currentModel?e.currentModel.model:void 0,"current-module":e.currentModule.module,"enter-callback":e.onSubmitForm,"form-view":e.formView,"item-field-list":e.createViewFields,"module-view-cate-list":e.moduleViewCateList,viewListDialogFormTitle:e.viewListDialogFormTitle,visible:e.showFormWidgetDialog},null,8,["cancel-callback","confirm-loading","current-model","current-module","enter-callback","form-view","item-field-list","module-view-cate-list","viewListDialogFormTitle","visible"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createVNode"])(O,{"form-view":e.formView,"on-reference-menu-pagination-change":e.onReferenceMenuPaginationChange,"on-reference-view-pagination-change":e.onReferenceViewPaginationChange,"reference-menu-list":e.referenceMenuList,"reference-menu-pagination":e.referenceMenuPagination,"reference-view-list":e.referenceViewList,"reference-view-pagination":e.referenceViewPagination,visible:e.showReferenceDialog,onCancel:t[1]||(t[1]=t=>e.onChangeReferenceDialog(!1)),onClickViewItem:e.onGoToViewDesignEditNewWindow,onOk:t[2]||(t[2]=t=>e.onChangeReferenceDialog(!1))},null,8,["form-view","on-reference-menu-pagination-change","on-reference-view-pagination-change","reference-menu-list","reference-menu-pagination","reference-view-list","reference-view-pagination","visible","onClickViewItem"])])}var Qa;xa.render=Ya,xa.__file="src/view/page-list/pageList.vue";const Ja=20,Xa=20,Za="filterViewType",el="filterViewBizType",tl="filterModule",ol="filterModular",il="filterModel",nl=new Map;let rl=Qa=class extends i["VueWidget"]{constructor(){super(...arguments),this.loading=!1,this.pagination={total:1,pageSize:Ja,current:1},this.modelPagination={total:0,pageSize:Ja,current:1},this.referenceViewPagination={total:0,pageSize:Xa,current:1},this.referenceMenuPagination={total:0,pageSize:Xa,current:1},this.applicationOptions=[],this.modularOptions=[],this.viewTypeList=hr,this.modelList=[],this.currentView={},this.currentModule={},this.currentModular={},this.currentModel={},this.selectedModuleModule="",this.selectedModuleModular="",this.selectedModelModel="",this.keyword="",this.viewActive=n["c"].ACTIVE,this.viewType=n["sb"].FORM,this.viewBizType=n["qb"].OPERATIONS_MANAGEMENT,this.dataSource=n["m"].MANUAL,this.dataList=[],this.showReferenceDialog=!1,this.showFormWidgetDialog=!1,this.addViewDialogLoading=!1,this.viewListDialogFormTitle="",this.formView={},this.formViewTitle="",this.router=null,this.matched=null,this.selectedCate={},this.moduleViewCateList=[],this.referenceContent={reledViews:[],reledMenus:[]},this.referenceMenuList=[],this.referenceViewList=[]}static viewConvert(e){const t=Object(i["deepClone"])(e);return Object(u["a"])(e.title)||(t.viewTitle=e.title),Object(u["a"])(e.description)||(t.viewDescription=e.description),Object(u["a"])(e.categoryId)||(t.viewCategoryId=e.categoryId),e.type&&[n["sb"].TABLE,n["sb"].TREE].includes(e.type)||(t.designerLayoutType=void 0),t.usingDefaultView=!!e.usingDefaultView,t}initialize(e){return super.initialize(e),this.setComponent(xa),this}initFetchDataList(){return J(this,void 0,void 0,(function*(){this.pagination.current=1,this.fetchDataList()}))}setModule(e){this.currentModule=e,this.currentModular=e,this.pagination.current=1,this.fetchDataList()}setModular(e){this.currentModular=e,this.pagination.current=1,this.fetchDataList()}setModel(e){this.currentModel=e,this.pagination.current=1,this.fetchDataList()}setViewTypeOptions(e){this.viewTypeList=e}setViewType(e){this.viewType=e,l["db"].setItem(Za,this.viewType),this.pagination.current=1,this.fetchDataList()}setViewBizType(e){this.viewBizType=e,e===n["qb"].OPERATIONS_MANAGEMENT||e===n["qb"].ALL?this.viewType=n["sb"].ALL:this.viewType="",l["db"].setItem(el,this.viewBizType),this.pagination.current=1,this.fetchDataList()}setActiveType(e){this.viewActive=e,this.pagination.current=1,this.initFetchDataList()}setDataSource(e){this.dataSource=e,this.pagination.current=1,this.initFetchDataList()}setKeyword(e){this.keyword=e,this.pagination.current=1,this.initFetchDataList()}fetchDataList(){return J(this,void 0,void 0,(function*(){if(this.selectedModelModel)try{this.loading=!0;const e=yield Object(n["Uc"])(this.selectedModelModel,this.keyword,this.viewActive,this.viewType,this.viewBizType,this.dataSource,this.pagination,this.selectedCate.id);this.dataList=e.content,this.pagination.total=Object(b["a"])(e.totalElements)}finally{this.loading=!1}}))}onChangeActiveType(e){return J(this,void 0,void 0,(function*(){e&&e.id&&(e.show===n["c"].INACTIVE?yield Object(n["ad"])(e.id):yield Object(n["wc"])(e.id),this.fetchDataList())}))}onChangeReferenceDialog(e){this.showReferenceDialog=e,e?this.fetchReference():(this.referenceViewList=[],this.referenceMenuList=[])}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){try{this.router=Object(i["useRouter"])().router,yield this.initData();const{matched:t}=Object(i["useMatched"])();this.matched=t,e.mounted.call(this);const{page:o}=t.segmentParams;o.createViewSource&&(this.onShowCreate(o.createViewSource,o.formView),o.createViewSource=void 0,Object(i["getRouterInstance"])().push({segments:[{path:"page",parameters:o}]}))}catch(t){console.error(t)}}))}initData(){return J(this,void 0,void 0,(function*(){Object(u["a"])(l["db"].getItem(Za))?l["db"].setItem(Za,this.viewType):this.viewType=l["db"].getItem(Za),Object(u["a"])(l["db"].getItem(el))?l["db"].setItem(el,this.viewBizType):this.viewBizType=l["db"].getItem(el),yield this.fetchApplications()}))}onChangeFormWidgetDialog(e){this.showFormWidgetDialog=e}onShowCreate(e,t){this.createViewSource=e;const o=Dr.get(e);this.viewListDialogFormTitle=o.title,this.createViewFields=o.fields,t&&Object.keys(t).length>0?this.formView=t:this.formView={},this.viewBizType!==n["qb"].ALL&&(this.formView.bizType=this.viewBizType),this.viewType!==n["sb"].ALL&&(this.formView.type=this.viewType),this.currentModel&&(this.formView.model=this.currentModel.model),this.selectedCate&&this.selectedCate.id&&(this.formView.categoryId=this.selectedCate.id),this.formView.designerLayoutType=fr[0].value,this.formView.designerActionBarType=Or[0].value,this.onChangeFormWidgetDialog(!0)}onSubmitForm(e){var t,o;return J(this,void 0,void 0,(function*(){this.addViewDialogLoading=!0;try{const r=yield e.validate();if(r){const e=this.formView;e.viewType=e.type,this.createViewSource===jr.HOME_PAGE&&(this.formView.isHomePageView=!0);const r=Qa.viewConvert(this.formView);let a;r.module=null===(t=this.currentModule)||void 0===t?void 0:t.module,this.formView.id?this.viewListDialogFormTitle===Cr.EDIT?(yield Object(i["updateOne"])("ui.designer.UiDesignerView",this.formView,void 0),yield this.fetchDataList()):this.viewListDialogFormTitle===Cr.COPY&&(r.module=e.module||(null===(o=this.currentModule)||void 0===o?void 0:o.module),r.type=e.type,a=yield Object(n["Nb"])(r),yield this.goToViewDesignEdit(a.id)):(a=yield Object(i["insertOne"])("ui.designer.UiDesignerViewLayoutProxy",r,void 0),yield this.goToViewDesignEdit(a.id)),this.showFormWidgetDialog=!1}}finally{this.addViewDialogLoading=!1}}))}created(){const e=Object.create(null,{created:{get:()=>super.created}});return J(this,void 0,void 0,(function*(){e.created.call(this)}))}onDelete(e){return J(this,void 0,void 0,(function*(){yield Object(n["Tb"])(e.id),this.initFetchDataList()}))}onChangeViewKeyword(e){this.setKeyword(e.target.value)}onPaginationChange(e,t){this.pagination.current=e,this.pagination.pageSize=t,this.fetchDataList()}onChangeModule(e,t){return J(this,void 0,void 0,(function*(){const o=l["db"].getItem(tl);o&&o.module!==e&&n["yb"].INSTANCE.clear(),this.selectedModuleModule=e,this.currentModule=this.applicationOptions.find(t=>e===t.module),this.currentModule&&(l["db"].setItem(tl,this.currentModule),this.currentModel=void 0,this.selectedModelModel=""),this.onChangeModular(e,t,!0)}))}onChangeModular(e,t,o){return J(this,void 0,void 0,(function*(){this.selectedModuleModular=e,t||o||e===this.selectedModuleModule?this.currentModular=this.currentModule:this.currentModular=this.modularOptions.find(t=>e===t.module),this.currentModular&&l["db"].setItem(ol,this.currentModular),!0!==t&&l["db"].removeItem(il),e&&this.initFetchModelList(1,!0,t),this.fetchModuleViewCategoryList()}))}onChangeModularList(e){return J(this,void 0,void 0,(function*(){this.modularOptions=e}))}onChangeModel(e){return J(this,void 0,void 0,(function*(){this.selectedModelModel=e,this.currentModel=this.modelList.find(t=>e===t.model),this.currentModel&&l["db"].setItem(il,this.currentModel),e&&this.fetchDataList()}))}onShowEdit(e){return J(this,void 0,void 0,(function*(){yield this.onChangeFormWidgetDialog(!0),this.viewListDialogFormTitle=Cr.EDIT;const t=JSON.parse(JSON.stringify(e));this.formView=t,this.currentView=e}))}onShowCopy(e){return J(this,void 0,void 0,(function*(){this.formView={},yield this.onChangeFormWidgetDialog(!0),this.viewListDialogFormTitle=Cr.COPY;const t=JSON.parse(JSON.stringify(e));this.formView=t,this.formView.title=`${this.formView.title}-${Object(i["translateValueByKey"])("复制")}`.substring(0,50),this.currentView=e}))}onGoToViewDesignEdit(e){this.goToViewDesignEdit(e.designerViewId)}onGoToViewDesignEditNewWindow(e){this.goToViewDesignEdit(e.designerViewId,i["RedirectTargetEnum"].BLANK)}fetchReference(){return J(this,void 0,void 0,(function*(){yield this.fetchReferenceList(),yield this.fetchReferenceViewList(1,Xa),yield this.fetchReferenceMenuList(1,Xa)}))}onReferenceMenuPaginationChange(e){this.fetchReferenceMenuList(e,Xa)}onReferenceViewPaginationChange(e){this.fetchReferenceViewList(e,Xa)}fetchReferenceViewList(e,t){return J(this,void 0,void 0,(function*(){const o=this.referenceContent.reledViews;o&&o.length>0?this.referenceViewList=this.getCurrentReferencePageData(e,t,o):this.referenceViewList=[],this.referenceViewPagination=Object.assign(Object.assign({},this.referenceViewPagination),{current:e,pageSize:t,total:o?o.length:0})}))}fetchReferenceMenuList(e,t){return J(this,void 0,void 0,(function*(){const o=this.referenceContent.reledMenus;o&&o.length>0?this.referenceMenuList=this.getCurrentReferencePageData(e,t,o):this.referenceMenuList=[],this.referenceMenuPagination=Object.assign(Object.assign({},this.referenceMenuPagination),{current:e,pageSize:t,total:o?o.length:0})}))}fetchReferenceList(){return J(this,void 0,void 0,(function*(){this.currentView&&(this.referenceContent=yield Object(n["oc"])(this.currentView.id,this.pagination))}))}getCurrentReferencePageData(e,t,o){const i=JSON.parse(JSON.stringify(o)),n=(e-1)*t,r=e*t;return i.splice(n,r)}fetchApplications(){return J(this,void 0,void 0,(function*(){const e="id,displayName,name,module,application".split(","),t=i["RSQLCondition"].wrapper().in("state",["installed","toupgrade"]).notIn("systemSource",["BASE","SYSTEM"]).notIn("module",l["f"]).toString(),{content:o}=yield Object(n["Tc"])("base.UeModule","queryPage",e,t,{pageSize:-1,current:1},[],{});this.applicationOptions=o;const r=l["db"].getItem(tl);r&&o.find(e=>e.id===r.id)?yield this.onChangeModule(r.module,!0):this.applicationOptions&&this.applicationOptions.length&&(yield this.onChangeModule(this.applicationOptions[0].module,!0))}))}fetchModelList(e,t,o){return J(this,void 0,void 0,(function*(){if(!this.selectedModuleModular)return;let r="1==1"===t&&1===e.current&&o;if(r=!1,r){const e=nl.get(this.selectedModuleModular);if(e&&e.totalElements>0)return{content:e.modelList,totalElements:e.totalElements}}const a="id,displayName,name,module,model".split(","),l=new i["Condition"](t||"1==1");l.and(new i["Condition"]("systemSource").notIn(["BASE","KERNEL","RELATION"])),l.and(new i["Condition"]("show").equal("ACTIVE")),l.and(new i["Condition"]("type").notEqual("ABSTRACT")),this.currentModel&&this.currentModel.model&&o&&l.and(new i["Condition"]("model").notEqual(this.currentModel.model));const s={applicationModule:this.selectedModuleModular},c=yield Object(n["Tc"])("ui.designer.UiDesignerModelProxy","queryPage",a,l.toString(),e,[],s),d=c.content,u=c.totalElements;return r&&d&&d.length&&nl.set(this.selectedModuleModular,{modelList:d,totalElements:u}),c}))}initFetchModelList(e,t,o,n=!0){return J(this,void 0,void 0,(function*(){this.modelPagination.current=e;const{content:r,totalElements:a}=yield this.fetchModelList(this.modelPagination,"1==1",n);let s;if(this.modelPagination.total=a,this.modelList=r,t)if(r&&r.length>0){const e=l["db"].getItem(il);s=o||e&&e.id&&r.find(t=>t.id===e.id)?e:r[0]}else this.dataList=[],this.currentModel=void 0,s=l["db"].setItem(il,null);else s=l["db"].getItem(il);if(s&&s.model){const e=s.model,t=yield Object(i["queryOne"])("base.UeModel",{model:e});t&&"ACTIVE"===t.show||(s=null)}s&&r.find(e=>e.model===s.model)?yield this.onChangeModel(s.model):s?(yield this.fetchModelListByKeyword("model",s.model,!1,!0,!1),yield this.onChangeModel(s.model)):this.modelList&&this.modelList.length&&(yield this.onChangeModel(this.modelList[0].model))}))}fetchModelListMore(){return J(this,void 0,void 0,(function*(){if(this.modelList.length>=this.modelPagination.total)return;this.modelPagination.current++;const{content:e}=yield this.fetchModelList(this.modelPagination,"1==1",!0),t=e;this.modelList=this.modelList.concat(t)}))}fetchModelListByKeyword(e,t,o,n,r){return J(this,void 0,void 0,(function*(){if(!t)return void(yield this.initFetchModelList(1,!1,!1,!!t));if(this.modelList.length>=this.modelPagination.total&&n)return;this.modelPagination.current=1;const{content:a}=yield this.fetchModelList(this.modelPagination,o?new i["Condition"](e).like(`%${t}%`).or(new i["Condition"]("model").like(`%${t}%`)).toString():new i["Condition"](e).equal(t).toString(),r),l=a;if(this.modelList=n?l.concat(this.modelList):l,this.selectedModelModel){const e=this.modelList.find(e=>e.model===this.selectedModelModel);e||this.modelList.unshift(Object.assign({},this.currentModel))}}))}showAddViewPreDialog(e){this.onShowCreate(e)}onShowReference(e){return J(this,void 0,void 0,(function*(){this.formView=e,this.currentView=e,this.onChangeReferenceDialog(!0)}))}goToViewDesignEdit(e,t){return J(this,void 0,void 0,(function*(){Object(n["Hc"])(e,this.router,this.matched,t)}))}fetchModuleViewCategoryList(){return J(this,void 0,void 0,(function*(){if(!this.currentModule||!this.currentModule.id)return;const e=yield Object(n["Rc"])(this.currentModule.id);this.moduleViewCateList=e,e&&this.selectedCate&&this.selectedCate.id&&-1===e.findIndex(e=>e.id===this.selectedCate.id)&&(this.selectedCate={})}))}onEditCate(e){return J(this,void 0,void 0,(function*(){e&&(yield Object(i["updateOne"])("ui.designer.UiDesignerViewCategory",{id:e.id,name:e.name},void 0),this.fetchModuleViewCategoryList())}))}onChangeModuleViewCates(e){return J(this,void 0,void 0,(function*(){e&&e.length&&this.currentModule&&(yield Object(n["Fb"])(this.currentModule.module,e.map(e=>e.id)),this.fetchModuleViewCategoryList())}))}onSelectCate(e){return J(this,void 0,void 0,(function*(){this.selectedCate.id=e,this.initFetchDataList()}))}};Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"loading",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"pagination",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"modelPagination",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"referenceViewPagination",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"referenceMenuPagination",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"applicationOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"modularOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"viewTypeList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],rl.prototype,"modelList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"currentView",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"currentModule",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"currentModular",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"currentModel",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"selectedModuleModule",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"selectedModuleModular",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"selectedModelModel",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"keyword",void 0),Y([i["Widget"].Reactive(),Q("design:type",String)],rl.prototype,"viewActive",void 0),Y([i["Widget"].Reactive(),Q("design:type",String)],rl.prototype,"viewType",void 0),Y([i["Widget"].Reactive(),Q("design:type",String)],rl.prototype,"viewBizType",void 0),Y([i["Widget"].Reactive(),Q("design:type",String)],rl.prototype,"dataSource",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],rl.prototype,"dataList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"showReferenceDialog",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"showFormWidgetDialog",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"addViewDialogLoading",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"viewListDialogFormTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"formView",void 0),Y([i["Widget"].Reactive(),Q("design:type",i["FormWidget"])],rl.prototype,"formWidget",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"formViewTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"router",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"matched",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"selectedCate",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],rl.prototype,"moduleViewCateList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"referenceContent",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"referenceMenuList",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],rl.prototype,"referenceViewList",void 0),Y([i["Widget"].Reactive(),Q("design:type",String)],rl.prototype,"createViewSource",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],rl.prototype,"createViewFields",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setModule",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setModular",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setModel",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setViewTypeOptions",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setViewType",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setViewBizType",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],rl.prototype,"setActiveType",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],rl.prototype,"setDataSource",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"setKeyword",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onChangeActiveType",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",void 0)],rl.prototype,"onChangeReferenceDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",void 0)],rl.prototype,"onChangeFormWidgetDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],rl.prototype,"onShowCreate",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onSubmitForm",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onDelete",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[InputEvent]),Q("design:returntype",void 0)],rl.prototype,"onChangeViewKeyword",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],rl.prototype,"onPaginationChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Boolean]),Q("design:returntype",Promise)],rl.prototype,"onChangeModule",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Boolean,Boolean]),Q("design:returntype",Promise)],rl.prototype,"onChangeModular",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onChangeModularList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onChangeModel",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onShowEdit",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onShowCopy",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"onGoToViewDesignEdit",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"onGoToViewDesignEditNewWindow",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"onReferenceMenuPaginationChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"onReferenceViewPaginationChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object,Boolean]),Q("design:returntype",Promise)],rl.prototype,"fetchModelList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],rl.prototype,"fetchModelListMore",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String,String,Boolean,Boolean,Boolean]),Q("design:returntype",Promise)],rl.prototype,"fetchModelListByKeyword",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],rl.prototype,"showAddViewPreDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onShowReference",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String,String]),Q("design:returntype",Promise)],rl.prototype,"goToViewDesignEdit",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],rl.prototype,"fetchModuleViewCategoryList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],rl.prototype,"onEditCate",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",Promise)],rl.prototype,"onChangeModuleViewCates",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",Promise)],rl.prototype,"onSelectCate",null),rl=Qa=Y([i["SPIFactory"].Register(l["R"].Token({tab:l["L"].PAGE}))],rl);var al=Object(a["defineComponent"])({inheritAttrs:!1,components:{OioInput:r["OioInput"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"]},props:{params:Array},emits:["data-change"],setup(e,t){function o(){t.emit("data-change")}return{dataChange:o,translateValueByKey:i["translateValueByKey"]}}});function ll(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input"),s=Object(a["resolveComponent"])("oio-form-item"),c=Object(a["resolveComponent"])("oio-form"),d=Object(a["resolveComponent"])("a-empty");return e.params&&e.params.length?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:"param-row",layout:"horizontal"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.params,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{label:t.key},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{value:t.value,"onUpdate:value":[e=>t.value=e,e.dataChange],allowClear:"",placeholder:"请输入"+(t.desc||"")},null,8,["value","onUpdate:value","placeholder"])]),_:2},1032,["label"]))),256))]),_:1})):(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:1,description:"暂无配置项"}))}al.render=ll,al.__file="src/view/page-designer/component/chart-domain/UiChartEipParamForm.vue";var sl=Object(a["defineComponent"])({inheritAttrs:!1,components:{OioTabs:r["OioTabs"],OioTab:r["OioTab"],OioInput:r["OioInput"],UiChartEipParamForm:al},props:["value","change","formData","tabsConfig","initTabsConfig","chartData","dataChange","blur","focus"],setup(e){Object(a["watch"])(()=>e.chartData,(t,o)=>{var i;if(t){const n=o&&t.id!=o.id;n&&e.change(""),null===(i=e.initTabsConfig)||void 0===i||i.call(e,n)}},{deep:!0,immediate:!0}),Object(a["watch"])(()=>e.value,(t,o)=>{var i;e.chartData&&!o&&t&&(null===(i=e.initTabsConfig)||void 0===i||i.call(e,!0))},{immediate:!0,deep:!0});const t=Object(a["computed"])(()=>{var t,o,i;return"EIP_DB"!==(null===(t=e.chartData)||void 0===t?void 0:t.dataSource)?null:(null===(i=null===(o=e.tabsConfig)||void 0===o?void 0:o.find(e=>"Query"===e.key))||void 0===i?void 0:i.data)||null});function o(){var t;null===(t=e.dataChange)||void 0===t||t.call(e)}return{onDataChange:o,queryParams:t,translateValueByKey:i["translateValueByKey"]}}});function cl(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("ui-chart-eip-param-form"),s=Object(a["resolveComponent"])("oio-tab"),c=Object(a["resolveComponent"])("oio-tabs"),d=Object(a["resolveComponent"])("oio-input");return e.chartData&&"EIP_APP"===e.chartData.dataSource?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:"ui-designer-eip-param-tabs",destroyInactiveTabPane:""},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.tabsConfig,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{tab:t.key,key:t.key},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{params:t.data,onDataChange:e.onDataChange},null,8,["params","onDataChange"])]),_:2},1032,["tab"]))),128))]),_:1})):e.chartData&&"EIP_DB"===e.chartData.dataSource?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,params:e.queryParams,onDataChange:e.onDataChange},null,8,["params","onDataChange"])):(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:2,value:e.value,allowClear:"",placeholder:e.translateValueByKey("请输入查询条件"),"onUpdate:value":e.change,onBlur:e.blur,onFocus:e.focus},null,8,["value","placeholder","onUpdate:value","onBlur","onFocus"]))}sl.render=cl,sl.__file="src/view/page-designer/component/chart-domain/UiChartDomain.vue";let dl=class extends i["FormStringFieldSingleWidget"]{constructor(){super(...arguments),this.tabsConfig=[]}initialize(e){return super.initialize(e),this.setComponent(sl),this}get chartData(){var e;return null===(e=this.formData)||void 0===e?void 0:e.dataSource}buildConfig(){return[{key:"Body",data:[]},{key:"Query",data:[]},{key:"Path",data:[]},{key:"Header",data:[]}]}initTabsConfig(e=!1){return J(this,void 0,void 0,(function*(){if(!this.chartData||"MODEL"===this.chartData.dataSource)return;const e=this.value;let t={};try{t=(null===e||void 0===e?void 0:e.startsWith("{"))?JSON.parse(e):{}}catch(i){console.log("json parse err",i,e)}const o=this.buildConfig();o.forEach(e=>{const o=e.key.toLowerCase()+"Params",i=t[o]||[];e.data=i.map(e=>Object.assign(Object.assign({},e),{value:Object(u["a"])(e.value)?"":e.value}))}),this.getOperator().tabsConfig=o}))}dataChange(e){this.change(this.buildDomain())}buildDomain(){const e=this.getOperator().tabsConfig,t={};return e.forEach(e=>{const o=e.key.toLowerCase()+"Params";"EIP_DB"===this.chartData.dataSource&&"queryParams"!==o||(t[o]=e.data.map(e=>({key:e.key,value:Object(u["a"])(e.value)?"":e.value})))}),JSON.stringify(t)}submit(e){return{[this.itemName]:this.buildDomain()}}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],dl.prototype,"chartData",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],dl.prototype,"tabsConfig",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],dl.prototype,"initTabsConfig",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],dl.prototype,"dataChange",null),dl=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].String,widget:["UiChartDomain","UiChartRsqlExpression"]}))],dl);class ul extends i["BooleanConditionInputControlWidget"]{constructor(){super(...arguments),this.options=[]}get disableDraggable(){return i["BooleanHelper"].toBoolean(this.getDsl().disableDraggable)}get disableSelected(){return i["BooleanHelper"].toBoolean(this.getDsl().disableSelected)}mounted(){super.mounted(),this.options=this.value||[],this.options&&this.options.length&&this.options.forEach(e=>{e.label=e.label||e.displayName,e.value=e.name,e.disableInvisible=i["BooleanHelper"].toBoolean(e.disableInvisible)})}onChange(e){this.change(e)}changeDefaultValue(e){this.formData.defaultValue=e}}Y([i["Widget"].Reactive(),Q("design:type",Array)],ul.prototype,"options",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ul.prototype,"disableDraggable",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ul.prototype,"disableSelected",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],ul.prototype,"onChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],ul.prototype,"changeDefaultValue",null);class pl extends ul{constructor(){super(...arguments),this.xmlDefaultOptions=[]}initialize(e){return super.initialize(e),this}get maxNumber(){return this.formData.maxNumber}get minNumber(){return this.formData.minNumber}get multiOption(){var e;return this.getDsl().multiOption||(null===(e=this.formData._metadata)||void 0===e?void 0:e.multi)||!1}get allowDraggable(){return i["BooleanHelper"].toBoolean(this.getDsl().allowDraggable||!1)}get allowDefault(){return i["BooleanHelper"].toBoolean(this.getDsl().allowDefault||!1)}get allowInvisible(){return i["BooleanHelper"].toBoolean(this.getDsl().allowInvisible||!1)}get allowEdit(){return i["BooleanHelper"].toBoolean(this.getDsl().allowEdit||!1)}get allowRecommend(){return i["BooleanHelper"].toBoolean(this.getDsl().allowRecommend||!1)}mounted(){var e;super.mounted(),this.multiOption?Object(s["a"])(this.formData.defaultValue)||(this.xmlDefaultOptions=null===(e=this.formData.defaultValue)||void 0===e?void 0:e.toString().split(","),this.changeDefaultValue(this.xmlDefaultOptions)):(this.xmlDefaultOption=this.formData.defaultValue,this.changeDefaultValue(this.xmlDefaultOption))}onChangeWithDefault(e,t){this.multiOption?this.onChangeMultiWithDefault(e,t):this.onChangeSingleWithDefault(e,t),this.onChange(e)}handleName(e){return"true"===e||"false"===e?JSON.parse(e):e}onChangeMultiWithDefault(e,t){let o=t||[];if(e&&e.length&&e.length>0)for(let i of e)i.isDefault=o.includes(i.name);super.onChange(e)}onChangeSingleWithDefault(e,t){if(e&&e.length&&e.length>0)for(let o of e)o.isDefault=this.handleName(o.name)===t;this.onChange(e)}validator(){const e=Object.create(null,{validator:{get:()=>super.validator}});return J(this,void 0,void 0,(function*(){const t=yield e.validator.call(this);if(!Object(i["isValidatorSuccess"])(t))return t;if(!this.multiOption)return t;const o=this.formData.minNumber,n=this.formData.maxNumber,r=this.formData.defaultValue;if(r&&r.length){const e=r.length;if(!Object(u["a"])(n)&&e>n)return this.validatorError(Object(i["translateValueByKey"])("默认值不能多于最多选择个数"));if(!Object(u["a"])(o)&&e<o)return this.validatorError(Object(i["translateValueByKey"])("默认值不能少于最少选择个数"))}return this.validatorSuccess()}))}}Y([i["Widget"].Reactive(),Q("design:type",Object)],pl.prototype,"xmlDefaultOption",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],pl.prototype,"xmlDefaultOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"maxNumber",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"minNumber",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"multiOption",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"allowDraggable",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"allowDefault",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"allowInvisible",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"allowEdit",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],pl.prototype,"allowRecommend",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],pl.prototype,"onChangeWithDefault",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],pl.prototype,"handleName",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],pl.prototype,"onChangeMultiWithDefault",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],pl.prototype,"onChangeSingleWithDefault",null);const bl={value:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},modalValue:{type:Array,default:()=>[]},nodeWidgetLength:{type:Number,default:0},viewType:{type:String},maxNumber:{type:Number},minNumber:{type:Number},readonly:{type:Boolean},xmlDefaultOption:{type:String},xmlDefaultOptions:{type:Array},isPopReady:{type:Boolean},allowDraggable:{type:Boolean},allowDefault:{type:Boolean},allowInvisible:{type:Boolean},allowEdit:{type:Boolean},allowRecommend:{type:Boolean},multiOption:{type:Boolean},isModalReady:{type:Boolean},optionColor:{type:Boolean},loadModalNodeWidgets:{type:Function},blur:{type:Function},changeOptionColor:{type:Function},onChangeWithDefault:{type:Function},changeDefaultValue:{type:Function},handleName:{type:Function,default:()=>()=>{}},changeModalValue:{type:Function},onChange:{type:Function},resetPopValue:{type:Function},useRecommendColor:{type:Function},loadPopNodeWidgets:{type:Function},onResetOptions:{type:Function}};function gl(e){const t=Object(a["computed"])(()=>e.value),o=Object(a["ref"])();Object(a["watch"])(()=>e.xmlDefaultOption,()=>{o.value=e.xmlDefaultOption},{deep:!0,immediate:!0});const n=i=>{if(i.invisible)return;const n=e.handleName(i.name);n===o.value?o.value=void 0:o.value=n,e.changeDefaultValue(o.value),e.onChangeWithDefault(t.value,o.value)},l=()=>{e.onChange(t.value)},s=o=>{o.invisible=!1,e.onChange(t.value)},c=n=>{let a=0;for(let t=e.options.length-1;t>=0;t--){const{invisible:o}=e.options[t];!1!==o&&void 0!==o||a++}if(1===a)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("不能隐藏所有选项"));n.invisible=!0;const l=e.handleName(n.name);l===o.value&&(o.value=void 0),e.onChangeWithDefault(t.value,o.value),e.changeDefaultValue(o.value)};return{defaultOption:o,changeSingleDefault:n,changeDrag:l,finalOptions:t,singleShow:s,singleHide:c}}function vl(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),n=Object(a["computed"])(()=>e.value),l=Object(a["ref"])(e.xmlDefaultOptions||[]);Object(a["watch"])(()=>e.xmlDefaultOptions,()=>{if(l.value=e.xmlDefaultOptions,l.value&&n.value&&n.value.length>0)for(const e of n.value){const t=e;l.value.includes(t.name)&&(t.selected=!0)}}),Object(a["watch"])(()=>e.maxNumber|e.minNumber,()=>{e.blur()});const s=t=>{const o=t.target.value.name;t.target.checked?(l.value.push(o),t.target.value.selected=!0):(l.value=l.value.filter(e=>e!==o),t.target.value.selected=!1),e.changeDefaultValue(l.value),e.onChangeWithDefault(n.value,l.value)},c=()=>{e.onChange(n.value)},d=t=>{t.invisible=!1,e.onChange(n.value)},u=t=>{let o=0;for(let i=e.options.length-1;i>=0;i--){const{invisible:t}=e.options[i];!1!==t&&void 0!==t||o++}1!==o?(t.invisible=!0,l.value=l.value.filter(e=>e!==t.name),t.selected=!1,e.changeDefaultValue(l.value),e.onChangeWithDefault(n.value,l.value)):r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("不能隐藏所有选项"))};return{readonly:t,disabled:o,defaultOptions:l,changeMultiDefault:s,changeDrag:c,finalOptions:n,multiShow:d,multiHide:u}}const ml={class:"enum-option-invisible-action-item"};var yl=Object(a["defineComponent"])({__name:"DropdownAction",props:{invisible:{type:[Boolean,String],required:!1}},emits:["show","hide","express"],setup(e,{emit:t}){const o=e,i=Object(a["computed"])(()=>[{icon:"oinone-visible",label:"显示",eventName:"show",active:!o.invisible},{icon:"oinone-invisible",label:"隐藏",eventName:"hide",active:!0===o.invisible},{icon:"oinone-biaodashi",eventName:"express",label:"条件隐藏",active:o.invisible&&"string"===typeof o.invisible}]),n=e=>{t(e.key)};return(e,t)=>{const o=Object(a["resolveComponent"])("a-menu-item"),l=Object(a["resolveComponent"])("a-menu"),s=Object(a["resolveComponent"])("a-dropdown");return Object(a["openBlock"])(),Object(a["createBlock"])(s,null,{overlay:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{class:"enum-option-invisible-action",onClick:n},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(Object(a["unref"])(i),t=>(Object(a["openBlock"])(),Object(a["createBlock"])(o,{class:Object(a["normalizeClass"])([t.active&&"enum-option-invisible-action-active"]),key:t.eventName},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",ml,[Object(a["createVNode"])(Object(a["unref"])(r["OioIcon"]),{icon:t.icon,size:"18"},null,8,["icon"]),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate(t.label)),1)])]),_:2},1032,["class"]))),128))]),_:1})]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(Object(a["unref"])(r["OioIcon"]),{icon:"oinone-gengduo2",color:"var(--oio-primary-color)"})]),_:1})}}});yl.__file="src/view/page-designer/component/options/common/DropdownAction.vue";var hl=Object(a["defineComponent"])({name:"UiCommonOptions",inheritAttrs:!1,components:{OioIcon:r["OioIcon"],OioButton:r["OioButton"],OioModal:r["OioModal"],ACheckbox:N["a"],APopover:V["a"],KDraggable:n["S"]},props:Object.assign(Object.assign(Object.assign({},i["ConditionCommonProps"]),bl),{onChangeExpressList:{type:Function,required:!0},optionExpression:{type:Object,required:!0},latestSelectionOptions:{type:Array,required:!0}}),setup(e){const t=Object(a["ref"])(!1),o=Object(a["ref"])(!1),n=Object(a["ref"])(),r=Object(a["ref"])(""),l=Object(a["ref"])([]),s=Object(a["ref"])([]),c=Object(a["ref"])(!1),d=e=>{s.value=e||[]},u=Object(a["computed"])(()=>{var t;return Object.assign(Object.assign({type:e.type,contextItems:e.contextItems,models:e.models,quoteType:e.quoteType,ttypes:e.ttypes,useContextName:e.useContextName,leftJoinTtype:e.leftJoinTtype},e.expressionOption),{labelDisplayType:(null===(t=e.expressionOption)||void 0===t?void 0:t.labelDisplayType)||i["IExpressionLabelDisplayType"].DISPLAY_NAME})});Object(a["computed"])(()=>Object(i["createExpressionDisplayName"])(l.value,u.value));const p=t=>{if(r.value=t,c.value=!c.value,c.value){const t=e.optionExpression[r.value],o=t?Object(i["deepClone"])(t):Object(i["deepClone"])([Object(i["createDefaultExpressionItem"])(e.type)]);o.forEach(e=>e.showValueListLabel=!0),s.value=o}},b=()=>{setTimeout(()=>{c.value=!1},200),s.value=[]},g=(t=!0)=>{var o;e.hasChangeSourceCode&&(s.value=[Object(i["createDefaultExpressionItem"])(u.value.type)]),setTimeout(()=>{t&&(c.value=!1)},200),l.value=JSON.parse(JSON.stringify(s.value)),null===(o=e.onChangeExpressList)||void 0===o||o.call(e,r.value,l.value)};Object(a["onBeforeUnmount"])(()=>{c.value=!1});const v=()=>{var o;t.value=!0,n.value="",null===(o=e.loadModalNodeWidgets)||void 0===o||o.call(e)},m=t=>{var o;n.value=t,t&&(null===(o=e.loadPopNodeWidgets)||void 0===o||o.call(e,t))},y=()=>{t.value=!1,e.changeModalValue&&e.changeModalValue(e.modalValue),e.blur&&e.blur()},h=()=>{t.value=!1,e.blur&&e.blur()};return Object.assign(Object.assign({currentEditOption:n,modalVisible:t,popVisible:o,isShowDropdown:c,dialogExpressionItemList:s,expressionOption:u,handleChangeList:d,onAddOnClick:p,submitHandler:g,cancelHandler:b,openModal:v,openPop:m,modalEnterCallback:y,modalCancelCallback:h},gl(e)),vl(e))},render(){var e;const t=[],o=[];for(let i=0;i<(null===(e=this.modalValue)||void 0===e?void 0:e.length);i++){const e="UiDesignerOptionsForm"+i,o=this.$slots[e],n=this.modalValue[i].label||this.modalValue[i].displayName||this.modalValue[i].name;let r={color:this.modalValue[i].color,"background-color":this.modalValue[i].backgroundColor};this.optionColor||(r={color:"unset","background-color":"unset"}),o&&t.push(Object(a["createVNode"])("div",{class:"ui-readonly-options-modal-single-option"},[Object(a["createVNode"])("div",{class:"ui-readonly-options-modal-single-option-label-area"},[Object(a["createVNode"])("span",{class:"label",style:r},{default:()=>n})]),Object(a["createVNode"])("div",{class:"ui-readonly-options-modal-single-option-form"},{default:()=>o()})]))}const s=(e,t,o)=>{const l="UiDesignerOptionsQuickForm"+o,s=this.$slots[l],c=e.label||e.displayName||e.name;let d={color:e.color,"background-color":e.backgroundColor};this.optionColor||(d={color:"unset","background-color":"unset"});const u=[],p=Object(a["createVNode"])(V["a"],{overlayClassName:"ui-readonly-options-pop-overlay",placement:"left",visible:this.currentEditOption===e.name,zIndex:n["T"],destroyTooltipOnHide:!1},{default:()=>Object(a["createVNode"])("div",{style:{display:"0.1px"}}),title:()=>Object(a["createVNode"])("div",{class:"ui-readonly-options-pop-header"},[Object(a["createVNode"])("span",{class:"ui-readonly-options-pop-header-title"},{default:()=>Object(i["translateValueByKey"])("编辑选项")}),Object(a["createVNode"])(r["OioCloseIcon"],{onclick:()=>this.openPop("")})]),content:()=>Object(a["createVNode"])("div",{class:"ui-readonly-options-pop-body",border:!1},[Object(a["createVNode"])("div",{class:"ui-readonly-options-pop-form"},{default:()=>s&&s()}),Object(a["createVNode"])("div",{class:"ui-readonly-options-pop-footer",onClick:()=>this.resetPopValue&&this.resetPopValue(o)},[Object(a["createVNode"])(r["OioButton"],{icon:"oinone-zhongzhi2",type:"link",color:"var(--oio-primary-color)"},{default:()=>Object(i["translateValueByKey"])("重置")})])])});if(u.push(p),this.allowDraggable&&u.push(Object(a["createVNode"])(r["OioIcon"],{icon:"oinone-yidong",size:16,class:"ui-readonly-options-content-single-option-move"})),this.allowDefault)if(this.multiOption)u.push(Object(a["createVNode"])(N["a"],{title:Object(i["translateValueByKey"])("设为默认选中"),size:16,class:"ui-readonly-options-content-single-option-checkbox",onBlur:this.blur,disabled:e.invisible,value:e,onChange:this.changeMultiDefault,checked:e.selected}));else{const t="false"===e.name||"true"===e.name?i["BooleanHelper"].toBoolean(e.name)===i["BooleanHelper"].toBoolean(this.defaultOption):e.name===this.defaultOption,o=[Object(a["createVNode"])("div",{class:"ui-readonly-options-content-single-option-radio circle-in"})],n=Object(a["createVNode"])("div",{class:"ui-readonly-options-content-single-option-radio circle",onclick:()=>this.changeSingleDefault(e)},t?[o]:[]);u.push(n)}u.push(Object(a["createVNode"])("div",{class:"ui-readonly-options-content-single-option-label",style:d},[Object(a["createVNode"])("span",{class:"option-label",title:c},{default:()=>c})]));let b="",g="";if(e.invisible?!0===e.invisible?(b=Object(i["translateValueByKey"])("隐藏"),g="oinone-invisible"):e.invisible&&"string"===typeof e.invisible&&(b=Object(i["translateValueByKey"])("条件隐藏"),g="oinone-biaodashi"):(b=Object(i["translateValueByKey"])("显示"),g="oinone-visible"),b&&u.push(Object(a["createVNode"])("div",{class:"ui-readonly-options-content-single-invisible-label"},[Object(a["createVNode"])("span",{class:"ui-readonly-options-content-single-invisible-label-content"},[Object(a["createVNode"])(r["OioIcon"],{icon:g,size:"16",color:"var(--oio-primary-color)"}),Object(a["createVNode"])("span",null,{default:()=>b})])])),this.allowEdit){const t=Object(a["createVNode"])(r["OioIcon"],{onClick:()=>this.openPop(e.name),class:"ui-readonly-options-content-single-option-edit",icon:"oinone-bianji1",color:"var(--oio-primary-color)",size:14});u.push(t)}if(this.allowInvisible&&!e.disableInvisible){const t={class:"ui-readonly-options-content-single-option-eye",style:{"margin-left":this.allowEdit?"unset":"auto"},size:16,invisible:e.invisible,color:"var(--oio-primary-color)",onExpress:()=>this.onAddOnClick(e.name)};this.multiOption?(t["onShow"]=()=>this.multiShow(e),t["onHide"]=()=>this.multiHide(e)):(t["onShow"]=()=>this.singleShow(e),t["onHide"]=()=>this.singleHide(e)),u.push(Object(a["createVNode"])(yl,t))}return Object(a["createVNode"])("div",{class:["ui-readonly-options-content-single-option"],title:c},u)},c=Object(a["createVNode"])("div",{onChange:Object(a["withModifiers"])(()=>{},["stop","prevent"])},[Object(a["createVNode"])(n["S"],{list:this.value,disabled:!this.allowDraggable,disableMove:!this.allowDraggable,onChange:this.changeDrag,"item-key":"name"},{item:({element:e,index:t})=>s(e,e,t)})]);o.push(Object(a["createVNode"])("div",{class:"ui-readonly-options-body"},[c]));const d=[];return this.latestSelectionOptions.length&&d.push(Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].link,block:!0,disabled:!1},{default:()=>Object(a["createVNode"])("span",{class:"ui-readonly-options-footer-multi-edit",onclick:()=>{this.defaultOptions=[],this.defaultOption="",this.onResetOptions&&this.onResetOptions()}},{default:()=>Object(i["translateValueByKey"])("恢复默认")})})),this.allowRecommend&&d.push(Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].link,block:!0,disabled:!1},{default:()=>Object(a["createVNode"])("span",{class:"ui-readonly-options-footer-multi-edit",onclick:this.useRecommendColor},{default:()=>Object(i["translateValueByKey"])("使用推荐色")})})),this.allowEdit&&d.push(Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].link,block:!0,disabled:!1},{default:()=>Object(a["createVNode"])("span",{class:"ui-readonly-options-footer-multi-edit",onclick:this.openModal},{default:()=>Object(i["translateValueByKey"])("批量选项设置")})})),o.push(Object(a["createVNode"])("div",{class:"ui-readonly-options-footer"},d)),o.push(Object(a["createVNode"])(r["OioModal"],{wrapperClassName:"ui-readonly-options-modal-wrapper",title:"批量选项设置",width:"700px",height:"60%",zIndex:n["T"],visible:this.modalVisible,forceRender:!0,maskClosable:!1,enterCallback:this.modalEnterCallback,cancelCallback:this.modalCancelCallback},{default:()=>t,footer:()=>[Object(a["createVNode"])("div",{class:"ui-readonly-options-modal-footer"},[Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].default,onClick:this.modalCancelCallback},{default:()=>Object(i["translateValueByKey"])("取消")}),Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].primary,onClick:this.modalEnterCallback},{default:()=>Object(i["translateValueByKey"])("确定")})])]})),o.push(Object(a["createVNode"])(l["c"],{title:Object(i["translateValueByKey"])("条件隐藏"),visible:this.isShowDropdown,zIndex:99999,dialogClass:"expression-input-control-dialog",width:"50%",onCancel:this.cancelHandler,onOk:this.submitHandler},{default:()=>Object(a["createVNode"])(i["ConditionInputForm"],{"expression-item-list":this.dialogExpressionItemList,"expression-option":this.expressionOption,"field-options":this.fieldOptions,"filter-method":this.filterMethod,"is-low-code":this.isLowCode,"is-simple-mode":this.isSimpleMode,class:"expression-input-control-dialog-inner",onChangeList:this.handleChangeList})})),Object(a["createVNode"])("div",{class:["ui-readonly-options",this.readonly&&"readonly"],id:"ui_readonly_options"},o)}});hl.__file="src/view/page-designer/component/options/common/UiCommonOptions.vue";let fl=class extends pl{constructor(){super(...arguments),this.latestSelectionOptions=[],this.isFrontend=!0,this.delayUpdateValue=Object(p["a"])((e,t)=>{this.formData.defaultValue||this.isBooleanEnumField||this.compareOptions(e,t)}),this.optionExpression={},this.expEntity={},this.isDispose=!0,this.nodeWidgetLength=0,this.modalNodeWidgets=[],this.popNodeWidgets=[],this.modalValue=[],this.isModalReady=!1,this.isPopReady=!1}get isBooleanEnumField(){return this.formData._metadata.ttype===i["ModelFieldType"].Boolean}get selectionOptions(){var e;return(null===(e=this.formData._metadata)||void 0===e?void 0:e.selectionOptions)||[]}get value(){const e=this.compute();return e&&e.length?e:this.selectionOptions}watchValue(e){this.delayUpdateValue(e,this.latestSelectionOptions)}compareOptions(e,t){if(Object(i["deepClone"])(e)!==Object(i["deepClone"])(t)&&e.length===t.length){let o=!0;for(let i=0;i<t.length;i++){const n=t[i],r=e[i],a=r.label||r.displayName,l=n.displayName,s=r.invisible||!1,c=n.invisible||!1,d=r.color,u=n.color,p=r.backgroundColor,b=n.backgroundColor;a===l&&r.name===n.name&&r.value===n.value&&s===c&&d===u&&p===b||(o=!1)}o?this.change(null):this.change(this.value)}}numberCustomMethod(e,t){return Object(i["isNumStringTtype"])(t)?Object(i["autoAddQuote"])(e,i["IExpressionQuoteType"].SINGLE):e}get isFieldStore(){}onChangeExpressList(e,t){this.setExpressionItemList(t),Object(i["isEmptyValue"])(this.getExpressionItemList())&&this.setExpressionItemList([Object(i["createDefaultExpressionItem"])(this.type)]);const o=this.value.find(t=>t.name===e);o&&(o.invisible=Object(i["createConditionExpressionValue"])(this.getExpressionItemList(),this.createExpressionOption())),this.optionExpression[e]=this.expressionItemList,this.customSubmit()}get contextItems(){var e,t,o,n,r;const{contextItems:a}=this.getDsl(),l=[...Object(i["createContextItems"])(a,this.formData._model,this.formData._model),{name:i["ExpressionKeyword"].rootRecord,displayName:Object(i["translateValueByKey"])(i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].rootRecord]),models:[null===(e=this.expEntity)||void 0===e?void 0:e.rootModel]}];return(null===(o=null===(t=this.expEntity)||void 0===t?void 0:t.openerModelDefinition)||void 0===o?void 0:o.model)&&l.push({name:i["ExpressionKeyword"].openerRecord,displayName:i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].openerRecord],models:[null===(r=null===(n=this.expEntity)||void 0===n?void 0:n.openerModelDefinition)||void 0===r?void 0:r.model]}),l}get queryExpressionParam(){var e,t;return{model:zo,field:Go,key:null===(e=this.expEntity)||void 0===e?void 0:e.designKey,version:null===(t=this.expEntity)||void 0===t?void 0:t.version}}genExpressionParamKey(e){return`${this.model}#${this.field.data}${e}`}customSubmit(){return J(this,void 0,void 0,(function*(){Object.entries(this.optionExpression).forEach(([e,t])=>{const o=Object(i["createExpressionDefinitionByExpressionItem"])(Object.assign(Object.assign({},this.queryExpressionParam),{key:this.genExpressionParamKey(e)}),t,this.createExpressionOption());Object(i["createExpressionDefinition"])(o)})}))}initData(){return J(this,void 0,void 0,(function*(){return this.getExpressionItemList()}))}initEnumExpressionData(){const e=this.options.filter(e=>"string"===typeof e.invisible);e.forEach(e=>J(this,void 0,void 0,(function*(){const t=this.queryExpressionParam,o=yield Uo(t.model,t.field,this.genExpressionParamKey(e.name),t.version);if(o){Object(i["createExpressionItemByExpressionDefinition"])(o,this.createExpressionOption());const t=o.itemList;this.optionExpression[e.name]=(null===t||void 0===t?void 0:t.length)?t:[Object(i["createDefaultExpressionItem"])(this.type)]}else this.optionExpression[e.name]=Object(i["createDefaultFieldExpressionItem"])(this.fieldOptions,0,this.type)})))}initialize(e){return super.initialize(e),this.setComponent(hl),this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=`${t.designKey}#attr_name:${this.field.name}`,this.expEntity=t}}))),this}beforeMount(){super.beforeMount(),this.fetchMetadata("UiDesignerOptionsForm").then(()=>{this.loadModalNodeWidgets()}),this.fetchMetadata("UiDesignerOptionsQuickForm")}mounted(){var e;super.mounted(),this.initEnumExpressionData();const t=(null===(e=this.formData._metadata)||void 0===e?void 0:e.selectionOptions)||[];this.latestSelectionOptions=Object(i["deepClone"])(t),this.readonly||this.isBooleanEnumField||this.autoFillOptions()}autoFillOptions(){if(this.formData.autoFillOptions&&this.formData[this.itemData]){const e=new Map,t=this.latestSelectionOptions.filter(e=>!this.value.some(t=>t.name===e.name)),o=this.value.filter(e=>!this.latestSelectionOptions.some(t=>t.name===e.name));if(t.length&&e.set("add",t),o.length&&e.set("delete",o),e.has("add")||e.has("delete")){const t=[...this.value];e.forEach((e,o)=>{"delete"===o?e.forEach(e=>{const o=t.findIndex(t=>t.name===e.name);if(o>=0){const e=t[o];if(this.formData.defaultValue){if(this.multiOption){const t=this.formData.defaultValue||[],o=t.findIndex(t=>t===e.name);o>=0&&t.splice(o,1)}else e.name===this.formData.defaultValue&&(this.formData.defaultValue=null);this.changeDefaultValue(this.formData.defaultValue),this.onChangeWithDefault(this.value,this.formData.defaultValue)}t.splice(o,1)}}):"add"===o&&t.push(...e)}),this.change(t)}}}get optionColor(){return this.optionColorStyle===i["OptionColorStyle"].COLORFUL}get optionColorStyle(){return this.formData["optionColorStyle"]||this.getDsl().optionColorStyle||i["OptionColorStyle"].COLORFUL}onResetOptions(){this.latestSelectionOptions.length&&(this.formData._metadata.selectionOptions=Object(i["deepClone"])(this.latestSelectionOptions),this.changeDefaultValue(null),this.onChangeWithDefault(this.value,null),this.change(null))}loadModalNodeWidgets(){this.allowEdit&&(this.isModalReady=!1,this.disposeNodeWidgets(this.modalNodeWidgets),this.modalNodeWidgets=[],this.createNodeWidgets("UiDesignerOptionsForm",this.value||[]).then(e=>{this.isModalReady=!0,this.modalNodeWidgets=e}))}loadPopNodeWidgets(e){this.allowEdit&&(this.isPopReady=!1,this.disposeNodeWidgets(this.popNodeWidgets),this.popNodeWidgets=[],this.createNodeWidgets("UiDesignerOptionsQuickForm",this.value||[],e).then(e=>{this.isPopReady=!0,this.popNodeWidgets=e}))}changeOptionColor(e){this.formData["optionColor"]=e}changeModalValue(e){this.setValue(e)}resetPopValue(e){const t=this.popNodeWidgets[0],o=t.getData();o.label=o.displayName,o.color=void 0,o.backgroundColor=void 0}useRecommendColor(){const e=this.value;if(e&&e.length)for(let t=e.length-1;t>=0;t--){const o=this.genRecommendColor(t);e[t].color=`rgba(${o}, 1)`,e[t].backgroundColor=`rgba(${o}, 0.1)`}}watchOptionLabel(e){}createNodeWidgets(e,t,o){return J(this,void 0,void 0,(function*(){const n=yield this.fetchMetadata(e);if(!n)return console.error("无法获取视图 "+e),[];const r=t;this.modalValue=r;const a=[],l=null===r||void 0===r?void 0:r.length;if(l){let t=i["FormWidget"];this.viewType===i["ViewType"].Detail&&(t=i["DetailWidget"]);for(let s=0;s<l;s++){if(o&&o!==r[s].name)continue;const l=Object(i["createRuntimeContextForWidget"])(n),c=l.handle,d=this.initOptionsData(r[s]||(yield l.getInitialValue()),s),u=this.createWidget(t,e+s,{metadataHandle:c,rootHandle:c,dataSource:d,activeRecords:d,template:l.viewTemplate,inline:!0});r[s]=d,a.push(u)}this.nodeWidgetLength=l}return a}))}disposeNodeWidgets(e){e.forEach(e=>{e.dispose()}),this.nodeWidgetLength=0}fetchMetadata(e){const t="ui.designer.UiDesignerOption";return i["ViewCache"].get(t,e)}initOptionsData(e,t){return Object.assign(Object.assign({},e||{}),{_model:this.formData._model,_index:t,_optionColor:this.optionColor,_optionColorStyle:this.optionColorStyle})}genRecommendColor(e){return e%8===0?"3,93,255":e%8===1?"109,212,0":e%8===2?"247,181,0":e%8===3?"74,222,222":e%8===4?"121,126,246":e%8===5?"25,165,238":e%8===6?"210,127,255":e%8===7?"224,32,32":"3,93,255"}};Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],fl.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"isBooleanEnumField",null),Y([i["Widget"].Reactive(),Q("design:type",Array)],fl.prototype,"latestSelectionOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"selectionOptions",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"value",null),Y([i["Widget"].Watch("value",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],fl.prototype,"watchValue",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"optionExpression",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"expEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"isFieldStore",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[String,Array]),Q("design:returntype",void 0)],fl.prototype,"onChangeExpressList",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],fl.prototype,"contextItems",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"queryExpressionParam",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"isDispose",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"nodeWidgetLength",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],fl.prototype,"modalValue",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"isModalReady",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],fl.prototype,"isPopReady",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"optionColor",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],fl.prototype,"optionColorStyle",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],fl.prototype,"onResetOptions",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],fl.prototype,"loadModalNodeWidgets",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],fl.prototype,"loadPopNodeWidgets",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],fl.prototype,"changeOptionColor",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],fl.prototype,"changeModalValue",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],fl.prototype,"resetPopValue",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],fl.prototype,"useRecommendColor",null),Y([i["Widget"].Watch("formData.optionColorStyle",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],fl.prototype,"watchOptionLabel",null),fl=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:["UiEnumOptions"]}))],fl);const Ol=["M2O","O2M","M2M","O2O","HTML","MAP","OBJ","VOID"];let wl=class extends i["VariableInputFormFieldWidget"]{constructor(){super(...arguments),this.labelEntity={},this.storeFalseFields=[],this.minVariableNum=-1,this.maxVariableNum=8,this.debounceSubmit=Object(p["a"])(()=>{this.saveExp("初始化表达式")},1e3),this.filterMethod=e=>!(e.multi||i["SystemSource"].RELATION===e.systemSource||Ol.includes(e.ttype))}needSubscribe(){return!0}initialize(e){return super.initialize(e)}getPopupContainer(e){return e&&e.parentNode||document.body}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){e.mounted.call(this),yield this.queryFieldOrXmlExpression()}))}get useContextName(){return!0}get contextItems(){var e,t,o,n;const{contextItems:r}=this.getDsl();return Object(s["a"])(this.labelEntity)&&this.needSubscribe()&&this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=`${t.designKey}#attr_name:${this.field.name}`,this.labelEntity=t}}))),Object(u["a"])(null===(e=this.labelEntity)||void 0===e?void 0:e.designReferenceModel)?[]:[...Object(i["createContextItems"])(r,null===(t=this.formData)||void 0===t?void 0:t._model,(null===(o=this.labelEntity)||void 0===o?void 0:o.designReferenceModel)?null===(n=this.labelEntity)||void 0===n?void 0:n.designReferenceModel:"")]}watchOptionLabel(){return J(this,void 0,void 0,(function*(){yield this.submit(new i["SubmitValue"]({}))}))}queryFieldOrXmlExpression(){var e,t;return J(this,void 0,void 0,(function*(){if(null===(e=this.labelEntity)||void 0===e?void 0:e.designModel){const e=yield this.queryOneExpression(this.labelEntity.designModel,this.labelEntity.designField,this.labelEntity.designKey,!1,!0,null===(t=this.labelEntity)||void 0===t?void 0:t.version);e||(yield this.handleModelLabelExp())}else this.setVariableItemList(Object(i["createDefaultVariableItemList"])());this.isInitData||(this.isInitData=!0,yield this.executeValidator()),this.pushSearchFields(this.getVariableItemList())}))}handleModelLabelExp(){var e,t;return J(this,void 0,void 0,(function*(){const o=yield Object(n["ic"])(null===(e=this.labelEntity)||void 0===e?void 0:e.designModel,null===(t=this.labelEntity)||void 0===t?void 0:t.designField);if(o&&o.id){const e=yield this.queryOneExpression("designer.DesignerModelDefinition","label",this.labelEntity.designReferenceModel,!0,!1);e||this.setVariableItemList(Object(i["createDefaultVariableItemList"])())}}))}submit(e){return J(this,void 0,void 0,(function*(){return this.saveExp("初始化表达式"),i["SubmitHandler"].DEFAULT(this.field,this.itemName,e,this.value)}))}createExpressionOption(){return{type:i["ExpressionDefinitionType"].OPERATION,ttypes:this.ttypes,variableContextItems:this.contextItems,isBetweenInBrackets:!1,quoteType:i["IExpressionQuoteType"].SINGLE}}queryOneExpression(e,t,o,n,r,a){return J(this,void 0,void 0,(function*(){let l;if(l=r?yield Uo(e,t,o,a):yield Ko(o),l){Object(i["createExpressionItemByExpressionDefinition"])(l,this.createExpressionOption());let e=l.itemList;e=e&&e.length?e:[Object(i["createDefaultExpressionItem"])(i["ExpressionDefinitionType"].OPERATION)];const t=e[0].valueList;let o=!0;if(t&&t.length)for(const r of t)if(!Object(i["isEmptyValue"])(r.apiName)){if(o=!1,n){let e=JSON.parse(JSON.stringify(t));const o=[];e=e.filter(e=>e.type===i["VariableItemType"].VARIABLE&&!Object(i["isEmptyValue"])(e.apiName)),e.forEach(e=>{o.push(e.apiName)}),this.pushModelLabel(o),this.setVariableItemList(t)}else this.setVariableItemList(t);break}return!o}return!1}))}onChangeValueList(e){if(super.onChangeValueList(e),Object(s["a"])(this.getVariableItemList()))this.pushSearchFields([]);else{let e=JSON.parse(JSON.stringify(this.getVariableItemList()));e=e.filter(e=>e.type===i["VariableItemType"].VARIABLE),e.forEach(e=>{e.selected=e.store}),this.pushSearchFields(e)}}pushSearchFields(e){this.designerSearchFields.subject.next({index:this.formData._index,value:e})}pushModelLabel(e){this.modelLabel.subject.next({index:this.formData._index,value:e})}get queryExpressionParam(){var e;return{model:zo,field:Go,key:null===(e=this.labelEntity)||void 0===e?void 0:e.designKey}}saveExp(e){var t,o;return J(this,void 0,void 0,(function*(){if((null===(t=this.labelEntity)||void 0===t?void 0:t.designKey)&&(null===(o=this.labelEntity)||void 0===o?void 0:o.designModel)){const e=[Object.assign(Object.assign({},Object(i["createDefaultExpressionItem"])(i["ExpressionDefinitionType"].OPERATION)),{valueList:this.getVariableItemList()})],t=Object(i["createExpressionDefinitionByExpressionItem"])(this.queryExpressionParam,e,this.createExpressionOption());yield Object(i["createExpressionDefinition"])(t)}}))}initData(){return J(this,void 0,void 0,(function*(){return this.setVariableItemList(Object(i["createDefaultVariableItemList"])()),this.getVariableItemList()}))}};Y([i["Widget"].SubContext(n["Yb"]),Q("design:type",Object)],wl.prototype,"designerSearchFields",void 0),Y([i["Widget"].SubContext(n["Qc"],{}),Q("design:type",Object)],wl.prototype,"modelLabel",void 0),Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],wl.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],wl.prototype,"labelEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],wl.prototype,"storeFalseFields",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],wl.prototype,"minVariableNum",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],wl.prototype,"maxVariableNum",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],wl.prototype,"getPopupContainer",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],wl.prototype,"useContextName",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],wl.prototype,"contextItems",null),Y([i["Widget"].Watch("formData.optionLabel"),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],wl.prototype,"watchOptionLabel",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],wl.prototype,"onChangeValueList",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],wl.prototype,"queryExpressionParam",null),wl=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiVariableLabel"}))],wl);let jl=class extends i["ExpressionInputControlWidget"]{constructor(){super(...arguments),this.expEntity={},this.debounceSubmit=Object(p["a"])(()=>{this.customSubmit()},1e3)}initialize(e){return super.initialize(e),this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=`${t.designKey}#attr_name:${this.field.name}`,this.expEntity=t}}))),this}numberCustomMethod(e,t){return Object(i["isNumStringTtype"])(t)?Object(i["autoAddQuote"])(e,i["IExpressionQuoteType"].SINGLE):e}onChangeList(e){super.onChangeList(e),this.submit(new i["SubmitValue"]({}))}get contextItems(){var e,t,o,n,r;const{contextItems:a}=this.getDsl(),l=[...Object(i["createContextItems"])(a,this.formData._model,this.formData._model),{name:i["ExpressionKeyword"].rootRecord,displayName:Object(i["translateValueByKey"])(i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].rootRecord]),models:[null===(e=this.expEntity)||void 0===e?void 0:e.rootModel]}];return(null===(o=null===(t=this.expEntity)||void 0===t?void 0:t.openerModelDefinition)||void 0===o?void 0:o.model)&&l.push({name:i["ExpressionKeyword"].openerRecord,displayName:i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].openerRecord],models:[null===(r=null===(n=this.expEntity)||void 0===n?void 0:n.openerModelDefinition)||void 0===r?void 0:r.model]}),l}submit(e){return J(this,void 0,void 0,(function*(){return this.customSubmit(),i["SubmitHandler"].DEFAULT(this.field,this.itemName,e,this.value)}))}customSubmit(){return J(this,void 0,void 0,(function*(){const e=Object(i["createExpressionDefinitionByExpressionItem"])(this.queryExpressionParam,this.getExpressionItemList(),this.createExpressionOption());yield Object(i["createExpressionDefinition"])(e)}))}watchId(){return J(this,void 0,void 0,(function*(){this.value&&this.initData()}))}get queryExpressionParam(){var e,t;return{model:zo,field:Go,key:null===(e=this.expEntity)||void 0===e?void 0:e.designKey,version:null===(t=this.expEntity)||void 0===t?void 0:t.version}}queryExpression(){return J(this,void 0,void 0,(function*(){const e=this.queryExpressionParam;return yield Uo(e.model,e.field,e.key,e.version)}))}};Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],jl.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],jl.prototype,"expEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],jl.prototype,"onChangeList",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],jl.prototype,"contextItems",null),Y([i["Widget"].Watch("formData.id",{immediate:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],jl.prototype,"watchId",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],jl.prototype,"queryExpressionParam",null),jl=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiComputeExpression"}))],jl);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e||"undefined"!==typeof self&&self;function kl(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Cl(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Dl=Cl((function(e,t){(function(t,o){e.exports=o()})(0,(function(){var t,o;function i(){return t.apply(null,arguments)}function n(e){t=e}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(l(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var o,i=[],n=e.length;for(o=0;o<n;++o)i.push(t(e[o],o));return i}function b(e,t){for(var o in t)l(t,o)&&(e[o]=t[o]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,o,i){return Ho(e,t,o,i,!0).utc()}function v(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(e){return null==e._pf&&(e._pf=v()),e._pf}function y(e){if(null==e._isValid){var t=m(e),i=o.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function h(e){var t=g(NaN);return null!=e?b(m(t),e):m(t).userInvalidated=!0,t}o=Array.prototype.some?Array.prototype.some:function(e){var t,o=Object(this),i=o.length>>>0;for(t=0;t<i;t++)if(t in o&&e.call(this,o[t],t,o))return!0;return!1};var f=i.momentProperties=[],O=!1;function w(e,t){var o,i,n,r=f.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=m(t)),c(t._locale)||(e._locale=t._locale),r>0)for(o=0;o<r;o++)i=f[o],n=t[i],c(n)||(e[i]=n);return e}function j(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===O&&(O=!0,i.updateOffset(this),O=!1)}function k(e){return e instanceof j||null!=e&&null!=e._isAMomentObject}function C(e){!1===i.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var o=!0;return b((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),o){var n,r,a,s=[],c=arguments.length;for(r=0;r<c;r++){if(n="","object"===typeof arguments[r]){for(a in n+="\n["+r+"] ",arguments[0])l(arguments[0],a)&&(n+=a+": "+arguments[0][a]+", ");n=n.slice(0,-2)}else n=arguments[r];s.push(n)}C(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),o=!1}return t.apply(this,arguments)}),t)}var T,$={};function E(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),$[e]||(C(t),$[e]=!0)}function S(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function N(e){var t,o;for(o in e)l(e,o)&&(t=e[o],S(t)?this[o]=t:this["_"+o]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function V(e,t){var o,i=b({},e);for(o in t)l(t,o)&&(a(e[o])&&a(t[o])?(i[o]={},b(i[o],e[o]),b(i[o],t[o])):null!=t[o]?i[o]=t[o]:delete i[o]);for(o in e)l(e,o)&&!l(t,o)&&a(e[o])&&(i[o]=b({},i[o]));return i}function x(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,o=[];for(t in e)l(e,t)&&o.push(t);return o};var I={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,o){var i=this._calendar[e]||this._calendar["sameElse"];return S(i)?i.call(t,o):i}function A(e,t,o){var i=""+Math.abs(e),n=t-i.length,r=e>=0;return(r?o?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},B={};function _(e,t,o,i){var n=i;"string"===typeof i&&(n=function(){return this[i]()}),e&&(B[e]=n),t&&(B[t[0]]=function(){return A(n.apply(this,arguments),t[1],t[2])}),o&&(B[o]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function P(e){var t,o,i=e.match(F);for(t=0,o=i.length;t<o;t++)B[i[t]]?i[t]=B[i[t]]:i[t]=W(i[t]);return function(t){var n,r="";for(n=0;n<o;n++)r+=S(i[n])?i[n].call(t,e):i[n];return r}}function z(e,t){return e.isValid()?(t=G(t,e.localeData()),R[t]=R[t]||P(t),R[t](e)):e.localeData().invalidDate()}function G(e,t){var o=5;function i(e){return t.longDateFormat(e)||e}L.lastIndex=0;while(o>=0&&L.test(e))e=e.replace(L,i),L.lastIndex=0,o-=1;return e}var U={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function K(e){var t=this._longDateFormat[e],o=this._longDateFormat[e.toUpperCase()];return t||!o?t:(this._longDateFormat[e]=o.match(F).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var q="Invalid date";function H(){return this._invalidDate}var Y="%d",Q=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Z(e,t,o,i){var n=this._relativeTime[o];return S(n)?n(e,t,o,i):n.replace(/%d/i,e)}function ee(e,t){var o=this._relativeTime[e>0?"future":"past"];return S(o)?o(t):o.replace(/%s/i,t)}var te={};function oe(e,t){var o=e.toLowerCase();te[o]=te[o+"s"]=te[t]=e}function ie(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ne(e){var t,o,i={};for(o in e)l(e,o)&&(t=ie(o),t&&(i[t]=e[o]));return i}var re={};function ae(e,t){re[e]=t}function le(e){var t,o=[];for(t in e)l(e,t)&&o.push({unit:t,priority:re[t]});return o.sort((function(e,t){return e.priority-t.priority})),o}function se(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,o=0;return 0!==t&&isFinite(t)&&(o=ce(t)),o}function ue(e,t){return function(o){return null!=o?(be(this,e,o),i.updateOffset(this,t),this):pe(this,e)}}function pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,o){e.isValid()&&!isNaN(o)&&("FullYear"===t&&se(e.year())&&1===e.month()&&29===e.date()?(o=de(o),e._d["set"+(e._isUTC?"UTC":"")+t](o,e.month(),Ze(o,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](o))}function ge(e){return e=ie(e),S(this[e])?this[e]():this}function ve(e,t){if("object"===typeof e){e=ne(e);var o,i=le(e),n=i.length;for(o=0;o<n;o++)this[i[o].unit](e[i[o].unit])}else if(e=ie(e),S(this[e]))return this[e](t);return this}var me,ye=/\d/,he=/\d\d/,fe=/\d{3}/,Oe=/\d{4}/,we=/[+-]?\d{6}/,je=/\d\d?/,ke=/\d\d\d\d?/,Ce=/\d\d\d\d\d\d?/,De=/\d{1,3}/,Te=/\d{1,4}/,$e=/[+-]?\d{1,6}/,Ee=/\d+/,Se=/[+-]?\d+/,Ne=/Z|[+-]\d\d:?\d\d/gi,Ve=/Z|[+-]\d\d(?::?\d\d)?/gi,xe=/[+-]?\d+(\.\d{1,3})?/,Ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Me(e,t,o){me[e]=S(t)?t:function(e,i){return e&&o?o:t}}function Ae(e,t){return l(me,e)?me[e](t._strict,t._locale):new RegExp(Fe(e))}function Fe(e){return Le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,o,i,n){return t||o||i||n})))}function Le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}me={};var Re={};function Be(e,t){var o,i,n=t;for("string"===typeof e&&(e=[e]),d(t)&&(n=function(e,o){o[t]=de(e)}),i=e.length,o=0;o<i;o++)Re[e[o]]=n}function _e(e,t){Be(e,(function(e,o,i,n){i._w=i._w||{},t(e,i._w,i,n)}))}function We(e,t,o){null!=t&&l(Re,e)&&Re[e](t,o._a,o,e)}var Pe,ze=0,Ge=1,Ue=2,Ke=3,qe=4,He=5,Ye=6,Qe=7,Je=8;function Xe(e,t){return(e%t+t)%t}function Ze(e,t){if(isNaN(e)||isNaN(t))return NaN;var o=Xe(t,12);return e+=(t-o)/12,1===o?se(e)?29:28:31-o%7%2}Pe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},_("M",["MM",2],"Mo",(function(){return this.month()+1})),_("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),_("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),oe("month","M"),ae("month",8),Me("M",je),Me("MM",je,he),Me("MMM",(function(e,t){return t.monthsShortRegex(e)})),Me("MMMM",(function(e,t){return t.monthsRegex(e)})),Be(["M","MM"],(function(e,t){t[Ge]=de(e)-1})),Be(["MMM","MMMM"],(function(e,t,o,i){var n=o._locale.monthsParse(e,i,o._strict);null!=n?t[Ge]=n:m(o).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Ie,nt=Ie;function rt(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months["standalone"]}function at(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function lt(e,t,o){var i,n,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=g([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return o?"MMM"===t?(n=Pe.call(this._shortMonthsParse,a),-1!==n?n:null):(n=Pe.call(this._longMonthsParse,a),-1!==n?n:null):"MMM"===t?(n=Pe.call(this._shortMonthsParse,a),-1!==n?n:(n=Pe.call(this._longMonthsParse,a),-1!==n?n:null)):(n=Pe.call(this._longMonthsParse,a),-1!==n?n:(n=Pe.call(this._shortMonthsParse,a),-1!==n?n:null))}function st(e,t,o){var i,n,r;if(this._monthsParseExact)return lt.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=g([2e3,i]),o&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),o||this._monthsParse[i]||(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(o&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!o&&this._monthsParse[i].test(e))return i}}function ct(e,t){var o;if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=de(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;return o=Math.min(e.date(),Ze(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function dt(e){return null!=e?(ct(this,e),i.updateOffset(this,!0),this):pe(this,"Month")}function ut(){return Ze(this.year(),this.month())}function pt(e){return this._monthsParseExact?(l(this,"_monthsRegex")||gt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function bt(e){return this._monthsParseExact?(l(this,"_monthsRegex")||gt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=nt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,o,i=[],n=[],r=[];for(t=0;t<12;t++)o=g([2e3,t]),i.push(this.monthsShort(o,"")),n.push(this.months(o,"")),r.push(this.months(o,"")),r.push(this.monthsShort(o,""));for(i.sort(e),n.sort(e),r.sort(e),t=0;t<12;t++)i[t]=Le(i[t]),n[t]=Le(n[t]);for(t=0;t<24;t++)r[t]=Le(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function vt(e){return se(e)?366:365}_("Y",0,0,(function(){var e=this.year();return e<=9999?A(e,4):"+"+e})),_(0,["YY",2],0,(function(){return this.year()%100})),_(0,["YYYY",4],0,"year"),_(0,["YYYYY",5],0,"year"),_(0,["YYYYYY",6,!0],0,"year"),oe("year","y"),ae("year",1),Me("Y",Se),Me("YY",je,he),Me("YYYY",Te,Oe),Me("YYYYY",$e,we),Me("YYYYYY",$e,we),Be(["YYYYY","YYYYYY"],ze),Be("YYYY",(function(e,t){t[ze]=2===e.length?i.parseTwoDigitYear(e):de(e)})),Be("YY",(function(e,t){t[ze]=i.parseTwoDigitYear(e)})),Be("Y",(function(e,t){t[ze]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var mt=ue("FullYear",!0);function yt(){return se(this.year())}function ht(e,t,o,i,n,r,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,o,i,n,r,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,o,i,n,r,a),l}function ft(e){var t,o;return e<100&&e>=0?(o=Array.prototype.slice.call(arguments),o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ot(e,t,o){var i=7+t-o,n=(7+ft(e,0,i).getUTCDay()-t)%7;return-n+i-1}function wt(e,t,o,i,n){var r,a,l=(7+o-i)%7,s=Ot(e,i,n),c=1+7*(t-1)+l+s;return c<=0?(r=e-1,a=vt(r)+c):c>vt(e)?(r=e+1,a=c-vt(e)):(r=e,a=c),{year:r,dayOfYear:a}}function jt(e,t,o){var i,n,r=Ot(e.year(),t,o),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?(n=e.year()-1,i=a+kt(n,t,o)):a>kt(e.year(),t,o)?(i=a-kt(e.year(),t,o),n=e.year()+1):(n=e.year(),i=a),{week:i,year:n}}function kt(e,t,o){var i=Ot(e,t,o),n=Ot(e+1,t,o);return(vt(e)-i+n)/7}function Ct(e){return jt(e,this._week.dow,this._week.doy).week}_("w",["ww",2],"wo","week"),_("W",["WW",2],"Wo","isoWeek"),oe("week","w"),oe("isoWeek","W"),ae("week",5),ae("isoWeek",5),Me("w",je),Me("ww",je,he),Me("W",je),Me("WW",je,he),_e(["w","ww","W","WW"],(function(e,t,o,i){t[i.substr(0,1)]=de(e)}));var Dt={dow:0,doy:6};function Tt(){return this._week.dow}function $t(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function St(e){var t=jt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Nt(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function Vt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xt(e,t){return e.slice(t,7).concat(e.slice(0,t))}_("d",0,"do","day"),_("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),_("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),_("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),_("e",0,0,"weekday"),_("E",0,0,"isoWeekday"),oe("day","d"),oe("weekday","e"),oe("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Me("d",je),Me("e",je),Me("E",je),Me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Me("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,o,i){var n=o._locale.weekdaysParse(e,i,o._strict);null!=n?t.d=n:m(o).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,o,i){t[i]=de(e)}));var It="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),At="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ft=Ie,Lt=Ie,Rt=Ie;function Bt(e,t){var o=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?xt(o,this._week.dow):e?o[e.day()]:o}function _t(e){return!0===e?xt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Wt(e){return!0===e?xt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Pt(e,t,o){var i,n,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=g([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return o?"dddd"===t?(n=Pe.call(this._weekdaysParse,a),-1!==n?n:null):"ddd"===t?(n=Pe.call(this._shortWeekdaysParse,a),-1!==n?n:null):(n=Pe.call(this._minWeekdaysParse,a),-1!==n?n:null):"dddd"===t?(n=Pe.call(this._weekdaysParse,a),-1!==n?n:(n=Pe.call(this._shortWeekdaysParse,a),-1!==n?n:(n=Pe.call(this._minWeekdaysParse,a),-1!==n?n:null))):"ddd"===t?(n=Pe.call(this._shortWeekdaysParse,a),-1!==n?n:(n=Pe.call(this._weekdaysParse,a),-1!==n?n:(n=Pe.call(this._minWeekdaysParse,a),-1!==n?n:null))):(n=Pe.call(this._minWeekdaysParse,a),-1!==n?n:(n=Pe.call(this._weekdaysParse,a),-1!==n?n:(n=Pe.call(this._shortWeekdaysParse,a),-1!==n?n:null)))}function zt(e,t,o){var i,n,r;if(this._weekdaysParseExact)return Pt.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=g([2e3,1]).day(i),o&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(o&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(o&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!o&&this._weekdaysParse[i].test(e))return i}}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Nt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Kt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Vt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function qt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ft),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ht(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Lt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Yt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Rt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,o,i,n,r,a=[],l=[],s=[],c=[];for(t=0;t<7;t++)o=g([2e3,1]).day(t),i=Le(this.weekdaysMin(o,"")),n=Le(this.weekdaysShort(o,"")),r=Le(this.weekdays(o,"")),a.push(i),l.push(n),s.push(r),c.push(i),c.push(n),c.push(r);a.sort(e),l.sort(e),s.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Jt(){return this.hours()%12||12}function Xt(){return this.hours()||24}function Zt(e,t){_(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function eo(e,t){return t._meridiemParse}function to(e){return"p"===(e+"").toLowerCase().charAt(0)}_("H",["HH",2],0,"hour"),_("h",["hh",2],0,Jt),_("k",["kk",2],0,Xt),_("hmm",0,0,(function(){return""+Jt.apply(this)+A(this.minutes(),2)})),_("hmmss",0,0,(function(){return""+Jt.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)})),_("Hmm",0,0,(function(){return""+this.hours()+A(this.minutes(),2)})),_("Hmmss",0,0,(function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),oe("hour","h"),ae("hour",13),Me("a",eo),Me("A",eo),Me("H",je),Me("h",je),Me("k",je),Me("HH",je,he),Me("hh",je,he),Me("kk",je,he),Me("hmm",ke),Me("hmmss",Ce),Me("Hmm",ke),Me("Hmmss",Ce),Be(["H","HH"],Ke),Be(["k","kk"],(function(e,t,o){var i=de(e);t[Ke]=24===i?0:i})),Be(["a","A"],(function(e,t,o){o._isPm=o._locale.isPM(e),o._meridiem=e})),Be(["h","hh"],(function(e,t,o){t[Ke]=de(e),m(o).bigHour=!0})),Be("hmm",(function(e,t,o){var i=e.length-2;t[Ke]=de(e.substr(0,i)),t[qe]=de(e.substr(i)),m(o).bigHour=!0})),Be("hmmss",(function(e,t,o){var i=e.length-4,n=e.length-2;t[Ke]=de(e.substr(0,i)),t[qe]=de(e.substr(i,2)),t[He]=de(e.substr(n)),m(o).bigHour=!0})),Be("Hmm",(function(e,t,o){var i=e.length-2;t[Ke]=de(e.substr(0,i)),t[qe]=de(e.substr(i))})),Be("Hmmss",(function(e,t,o){var i=e.length-4,n=e.length-2;t[Ke]=de(e.substr(0,i)),t[qe]=de(e.substr(i,2)),t[He]=de(e.substr(n))}));var oo=/[ap]\.?m?\.?/i,io=ue("Hours",!0);function no(e,t,o){return e>11?o?"pm":"PM":o?"am":"AM"}var ro,ao={calendar:I,longDateFormat:U,invalidDate:q,ordinal:Y,dayOfMonthOrdinalParse:Q,relativeTime:X,months:et,monthsShort:tt,week:Dt,weekdays:It,weekdaysMin:At,weekdaysShort:Mt,meridiemParse:oo},lo={},so={};function co(e,t){var o,i=Math.min(e.length,t.length);for(o=0;o<i;o+=1)if(e[o]!==t[o])return o;return i}function uo(e){return e?e.toLowerCase().replace("_","-"):e}function po(e){var t,o,i,n,r=0;while(r<e.length){n=uo(e[r]).split("-"),t=n.length,o=uo(e[r+1]),o=o?o.split("-"):null;while(t>0){if(i=go(n.slice(0,t).join("-")),i)return i;if(o&&o.length>=t&&co(n,o)>=t-1)break;t--}r++}return ro}function bo(e){return null!=e.match("^[^/\\\\]*$")}function go(t){var o,i=null;if(void 0===lo[t]&&e&&e.exports&&bo(t))try{i=ro._abbr,o=kl,o("./locale/"+t),vo(i)}catch(n){lo[t]=null}return lo[t]}function vo(e,t){var o;return e&&(o=c(t)?ho(e):mo(e,t),o?ro=o:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ro._abbr}function mo(e,t){if(null!==t){var o,i=ao;if(t.abbr=e,null!=lo[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=lo[e]._config;else if(null!=t.parentLocale)if(null!=lo[t.parentLocale])i=lo[t.parentLocale]._config;else{if(o=go(t.parentLocale),null==o)return so[t.parentLocale]||(so[t.parentLocale]=[]),so[t.parentLocale].push({name:e,config:t}),null;i=o._config}return lo[e]=new x(V(i,t)),so[e]&&so[e].forEach((function(e){mo(e.name,e.config)})),vo(e),lo[e]}return delete lo[e],null}function yo(e,t){if(null!=t){var o,i,n=ao;null!=lo[e]&&null!=lo[e].parentLocale?lo[e].set(V(lo[e]._config,t)):(i=go(e),null!=i&&(n=i._config),t=V(n,t),null==i&&(t.abbr=e),o=new x(t),o.parentLocale=lo[e],lo[e]=o),vo(e)}else null!=lo[e]&&(null!=lo[e].parentLocale?(lo[e]=lo[e].parentLocale,e===vo()&&vo(e)):null!=lo[e]&&delete lo[e]);return lo[e]}function ho(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ro;if(!r(e)){if(t=go(e),t)return t;e=[e]}return po(e)}function fo(){return T(lo)}function Oo(e){var t,o=e._a;return o&&-2===m(e).overflow&&(t=o[Ge]<0||o[Ge]>11?Ge:o[Ue]<1||o[Ue]>Ze(o[ze],o[Ge])?Ue:o[Ke]<0||o[Ke]>24||24===o[Ke]&&(0!==o[qe]||0!==o[He]||0!==o[Ye])?Ke:o[qe]<0||o[qe]>59?qe:o[He]<0||o[He]>59?He:o[Ye]<0||o[Ye]>999?Ye:-1,m(e)._overflowDayOfYear&&(t<ze||t>Ue)&&(t=Ue),m(e)._overflowWeeks&&-1===t&&(t=Qe),m(e)._overflowWeekday&&-1===t&&(t=Je),m(e).overflow=t),e}var wo=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jo=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ko=/Z|[+-]\d\d(?::?\d\d)?/,Co=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Do=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],To=/^\/?Date\((-?\d+)/i,$o=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function So(e){var t,o,i,n,r,a,l=e._i,s=wo.exec(l)||jo.exec(l),c=Co.length,d=Do.length;if(s){for(m(e).iso=!0,t=0,o=c;t<o;t++)if(Co[t][1].exec(s[1])){n=Co[t][0],i=!1!==Co[t][2];break}if(null==n)return void(e._isValid=!1);if(s[3]){for(t=0,o=d;t<o;t++)if(Do[t][1].exec(s[3])){r=(s[2]||" ")+Do[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(s[4]){if(!ko.exec(s[4]))return void(e._isValid=!1);a="Z"}e._f=n+(r||"")+(a||""),Wo(e)}else e._isValid=!1}function No(e,t,o,i,n,r){var a=[Vo(e),tt.indexOf(t),parseInt(o,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function Vo(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xo(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Io(e,t,o){if(e){var i=Mt.indexOf(e),n=new Date(t[0],t[1],t[2]).getDay();if(i!==n)return m(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function Mo(e,t,o){if(e)return Eo[e];if(t)return 0;var i=parseInt(o,10),n=i%100,r=(i-n)/100;return 60*r+n}function Ao(e){var t,o=$o.exec(xo(e._i));if(o){if(t=No(o[4],o[3],o[2],o[5],o[6],o[7]),!Io(o[1],t,e))return;e._a=t,e._tzm=Mo(o[8],o[9],o[10]),e._d=ft.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Fo(e){var t=To.exec(e._i);null===t?(So(e),!1===e._isValid&&(delete e._isValid,Ao(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Lo(e,t,o){return null!=e?e:null!=t?t:o}function Ro(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Bo(e){var t,o,i,n,r,a=[];if(!e._d){for(i=Ro(e),e._w&&null==e._a[Ue]&&null==e._a[Ge]&&_o(e),null!=e._dayOfYear&&(r=Lo(e._a[ze],i[ze]),(e._dayOfYear>vt(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),o=ft(r,0,e._dayOfYear),e._a[Ge]=o.getUTCMonth(),e._a[Ue]=o.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ke]&&0===e._a[qe]&&0===e._a[He]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Ke]=0),e._d=(e._useUTC?ft:ht).apply(null,a),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ke]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==n&&(m(e).weekdayMismatch=!0)}}function _o(e){var t,o,i,n,r,a,l,s,c;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(r=1,a=4,o=Lo(t.GG,e._a[ze],jt(Yo(),1,4).year),i=Lo(t.W,1),n=Lo(t.E,1),(n<1||n>7)&&(s=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,c=jt(Yo(),r,a),o=Lo(t.gg,e._a[ze],c.year),i=Lo(t.w,c.week),null!=t.d?(n=t.d,(n<0||n>6)&&(s=!0)):null!=t.e?(n=t.e+r,(t.e<0||t.e>6)&&(s=!0)):n=r),i<1||i>kt(o,r,a)?m(e)._overflowWeeks=!0:null!=s?m(e)._overflowWeekday=!0:(l=wt(o,i,n,r,a),e._a[ze]=l.year,e._dayOfYear=l.dayOfYear)}function Wo(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],m(e).empty=!0;var t,o,n,r,a,l,s,c=""+e._i,d=c.length,u=0;for(n=G(e._f,e._locale).match(F)||[],s=n.length,t=0;t<s;t++)r=n[t],o=(c.match(Ae(r,e))||[])[0],o&&(a=c.substr(0,c.indexOf(o)),a.length>0&&m(e).unusedInput.push(a),c=c.slice(c.indexOf(o)+o.length),u+=o.length),B[r]?(o?m(e).empty=!1:m(e).unusedTokens.push(r),We(r,o,e)):e._strict&&!o&&m(e).unusedTokens.push(r);m(e).charsLeftOver=d-u,c.length>0&&m(e).unusedInput.push(c),e._a[Ke]<=12&&!0===m(e).bigHour&&e._a[Ke]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Ke]=Po(e._locale,e._a[Ke],e._meridiem),l=m(e).era,null!==l&&(e._a[ze]=e._locale.erasConvertYear(l,e._a[ze])),Bo(e),Oo(e)}else Ao(e);else So(e)}function Po(e,t,o){var i;return null==o?t:null!=e.meridiemHour?e.meridiemHour(t,o):null!=e.isPM?(i=e.isPM(o),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function zo(e){var t,o,i,n,r,a,l=!1,s=e._f.length;if(0===s)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<s;n++)r=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],Wo(t),y(t)&&(a=!0),r+=m(t).charsLeftOver,r+=10*m(t).unusedTokens.length,m(t).score=r,l?r<i&&(i=r,o=t):(null==i||r<i||a)&&(i=r,o=t,a&&(l=!0));b(e,o||t)}function Go(e){if(!e._d){var t=ne(e._i),o=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,o,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Bo(e)}}function Uo(e){var t=new j(Oo(Ko(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ko(e){var t=e._i,o=e._f;return e._locale=e._locale||ho(e._l),null===t||void 0===o&&""===t?h({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new j(Oo(t)):(u(t)?e._d=t:r(o)?zo(e):o?Wo(e):qo(e),y(e)||(e._d=null),e))}function qo(e){var t=e._i;c(t)?e._d=new Date(i.now()):u(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Fo(e):r(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Bo(e)):a(t)?Go(e):d(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Ho(e,t,o,i,n){var l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==o&&!1!==o||(i=o,o=void 0),(a(e)&&s(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=n,l._l=o,l._i=e,l._f=t,l._strict=i,Uo(l)}function Yo(e,t,o,i){return Ho(e,t,o,i,!1)}i.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Qo=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yo.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()})),Jo=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yo.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}));function Xo(e,t){var o,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Yo();for(o=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](o)||(o=t[i]);return o}function Zo(){var e=[].slice.call(arguments,0);return Xo("isBefore",e)}function ei(){var e=[].slice.call(arguments,0);return Xo("isAfter",e)}var ti=function(){return Date.now?Date.now():+new Date},oi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ii(e){var t,o,i=!1,n=oi.length;for(t in e)if(l(e,t)&&(-1===Pe.call(oi,t)||null!=e[t]&&isNaN(e[t])))return!1;for(o=0;o<n;++o)if(e[oi[o]]){if(i)return!1;parseFloat(e[oi[o]])!==de(e[oi[o]])&&(i=!0)}return!0}function ni(){return this._isValid}function ri(){return Ei(NaN)}function ai(e){var t=ne(e),o=t.year||0,i=t.quarter||0,n=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,s=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=ii(t),this._milliseconds=+d+1e3*c+6e4*s+1e3*l*60*60,this._days=+a+7*r,this._months=+n+3*i+12*o,this._data={},this._locale=ho(),this._bubble()}function li(e){return e instanceof ai}function si(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ci(e,t,o){var i,n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(i=0;i<n;i++)(o&&e[i]!==t[i]||!o&&de(e[i])!==de(t[i]))&&a++;return a+r}function di(e,t){_(e,0,0,(function(){var e=this.utcOffset(),o="+";return e<0&&(e=-e,o="-"),o+A(~~(e/60),2)+t+A(~~e%60,2)}))}di("Z",":"),di("ZZ",""),Me("Z",Ve),Me("ZZ",Ve),Be(["Z","ZZ"],(function(e,t,o){o._useUTC=!0,o._tzm=pi(Ve,e)}));var ui=/([\+\-]|\d\d)/gi;function pi(e,t){var o,i,n,r=(t||"").match(e);return null===r?null:(o=r[r.length-1]||[],i=(o+"").match(ui)||["-",0,0],n=60*i[1]+de(i[2]),0===n?0:"+"===i[0]?n:-n)}function bi(e,t){var o,n;return t._isUTC?(o=t.clone(),n=(k(e)||u(e)?e.valueOf():Yo(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+n),i.updateOffset(o,!1),o):Yo(e).local()}function gi(e){return-Math.round(e._d.getTimezoneOffset())}function vi(e,t,o){var n,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=pi(Ve,e),null===e)return this}else Math.abs(e)<16&&!o&&(e*=60);return!this._isUTC&&t&&(n=gi(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!t||this._changeInProgress?Ii(this,Ei(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:gi(this)}function mi(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yi(e){return this.utcOffset(0,e)}function hi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gi(this),"m")),this}function fi(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=pi(Ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Oi(e){return!!this.isValid()&&(e=e?Yo(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function wi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ji(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),t=Ko(t),t._a?(e=t._isUTC?g(t._a):Yo(t._a),this._isDSTShifted=this.isValid()&&ci(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ki(){return!!this.isValid()&&!this._isUTC}function Ci(){return!!this.isValid()&&this._isUTC}function Di(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}i.updateOffset=function(){};var Ti=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$i=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ei(e,t){var o,i,n,r=e,a=null;return li(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=Ti.exec(e))?(o="-"===a[1]?-1:1,r={y:0,d:de(a[Ue])*o,h:de(a[Ke])*o,m:de(a[qe])*o,s:de(a[He])*o,ms:de(si(1e3*a[Ye]))*o}):(a=$i.exec(e))?(o="-"===a[1]?-1:1,r={y:Si(a[2],o),M:Si(a[3],o),w:Si(a[4],o),d:Si(a[5],o),h:Si(a[6],o),m:Si(a[7],o),s:Si(a[8],o)}):null==r?r={}:"object"===typeof r&&("from"in r||"to"in r)&&(n=Vi(Yo(r.from),Yo(r.to)),r={},r.ms=n.milliseconds,r.M=n.months),i=new ai(r),li(e)&&l(e,"_locale")&&(i._locale=e._locale),li(e)&&l(e,"_isValid")&&(i._isValid=e._isValid),i}function Si(e,t){var o=e&&parseFloat(e.replace(",","."));return(isNaN(o)?0:o)*t}function Ni(e,t){var o={};return o.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(o.months,"M").isAfter(t)&&--o.months,o.milliseconds=+t-+e.clone().add(o.months,"M"),o}function Vi(e,t){var o;return e.isValid()&&t.isValid()?(t=bi(t,e),e.isBefore(t)?o=Ni(e,t):(o=Ni(t,e),o.milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0}}function xi(e,t){return function(o,i){var n,r;return null===i||isNaN(+i)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=o,o=i,i=r),n=Ei(o,i),Ii(this,n,e),this}}function Ii(e,t,o,n){var r=t._milliseconds,a=si(t._days),l=si(t._months);e.isValid()&&(n=null==n||n,l&&ct(e,pe(e,"Month")+l*o),a&&be(e,"Date",pe(e,"Date")+a*o),r&&e._d.setTime(e._d.valueOf()+r*o),n&&i.updateOffset(e,a||l))}Ei.fn=ai.prototype,Ei.invalid=ri;var Mi=xi(1,"add"),Ai=xi(-1,"subtract");function Fi(e){return"string"===typeof e||e instanceof String}function Li(e){return k(e)||u(e)||Fi(e)||d(e)||Bi(e)||Ri(e)||null===e||void 0===e}function Ri(e){var t,o,i=a(e)&&!s(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=r.length;for(t=0;t<c;t+=1)o=r[t],n=n||l(e,o);return i&&n}function Bi(e){var t=r(e),o=!1;return t&&(o=0===e.filter((function(t){return!d(t)&&Fi(e)})).length),t&&o}function _i(e){var t,o,i=a(e)&&!s(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)o=r[t],n=n||l(e,o);return i&&n}function Wi(e,t){var o=e.diff(t,"days",!0);return o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse"}function Pi(e,t){1===arguments.length&&(arguments[0]?Li(arguments[0])?(e=arguments[0],t=void 0):_i(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var o=e||Yo(),n=bi(o,this).startOf("day"),r=i.calendarFormat(this,n)||"sameElse",a=t&&(S(t[r])?t[r].call(this,o):t[r]);return this.format(a||this.localeData().calendar(r,this,Yo(o)))}function zi(){return new j(this)}function Gi(e,t){var o=k(e)?e:Yo(e);return!(!this.isValid()||!o.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()<this.clone().startOf(t).valueOf())}function Ui(e,t){var o=k(e)?e:Yo(e);return!(!this.isValid()||!o.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()<o.valueOf():this.clone().endOf(t).valueOf()<o.valueOf())}function Ki(e,t,o,i){var n=k(e)?e:Yo(e),r=k(t)?t:Yo(t);return!!(this.isValid()&&n.isValid()&&r.isValid())&&(i=i||"()",("("===i[0]?this.isAfter(n,o):!this.isBefore(n,o))&&(")"===i[1]?this.isBefore(r,o):!this.isAfter(r,o)))}function qi(e,t){var o,i=k(e)?e:Yo(e);return!(!this.isValid()||!i.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()===i.valueOf():(o=i.valueOf(),this.clone().startOf(t).valueOf()<=o&&o<=this.clone().endOf(t).valueOf()))}function Hi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Yi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qi(e,t,o){var i,n,r;if(!this.isValid())return NaN;if(i=bi(e,this),!i.isValid())return NaN;switch(n=6e4*(i.utcOffset()-this.utcOffset()),t=ie(t),t){case"year":r=Ji(this,i)/12;break;case"month":r=Ji(this,i);break;case"quarter":r=Ji(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-n)/864e5;break;case"week":r=(this-i-n)/6048e5;break;default:r=this-i}return o?r:ce(r)}function Ji(e,t){if(e.date()<t.date())return-Ji(t,e);var o,i,n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return t-r<0?(o=e.clone().add(n-1,"months"),i=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),i=(t-r)/(o-r)),-(n+i)||0}function Xi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zi(e){if(!this.isValid())return null;var t=!0!==e,o=t?this.clone().utc():this;return o.year()<0||o.year()>9999?z(o,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(o,"Z")):z(o,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function en(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,o,i,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+o+i)}function tn(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function on(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yo(e).isValid())?Ei({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function nn(e){return this.from(Yo(),e)}function rn(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yo(e).isValid())?Ei({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function an(e){return this.to(Yo(),e)}function ln(e){var t;return void 0===e?this._locale._abbr:(t=ho(e),null!=t&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function cn(){return this._locale}var dn=1e3,un=60*dn,pn=60*un,bn=3506328*pn;function gn(e,t){return(e%t+t)%t}function vn(e,t,o){return e<100&&e>=0?new Date(e+400,t,o)-bn:new Date(e,t,o).valueOf()}function mn(e,t,o){return e<100&&e>=0?Date.UTC(e+400,t,o)-bn:Date.UTC(e,t,o)}function yn(e){var t,o;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(o=this._isUTC?mn:vn,e){case"year":t=o(this.year(),0,1);break;case"quarter":t=o(this.year(),this.month()-this.month()%3,1);break;case"month":t=o(this.year(),this.month(),1);break;case"week":t=o(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=o(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=gn(t+(this._isUTC?0:this.utcOffset()*un),pn);break;case"minute":t=this._d.valueOf(),t-=gn(t,un);break;case"second":t=this._d.valueOf(),t-=gn(t,dn);break}return this._d.setTime(t),i.updateOffset(this,!0),this}function hn(e){var t,o;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(o=this._isUTC?mn:vn,e){case"year":t=o(this.year()+1,0,1)-1;break;case"quarter":t=o(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=o(this.year(),this.month()+1,1)-1;break;case"week":t=o(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=o(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=pn-gn(t+(this._isUTC?0:this.utcOffset()*un),pn)-1;break;case"minute":t=this._d.valueOf(),t+=un-gn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=dn-gn(t,dn)-1;break}return this._d.setTime(t),i.updateOffset(this,!0),this}function fn(){return this._d.valueOf()-6e4*(this._offset||0)}function On(){return Math.floor(this.valueOf()/1e3)}function wn(){return new Date(this.valueOf())}function jn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function kn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Cn(){return this.isValid()?this.toISOString():null}function Dn(){return y(this)}function Tn(){return b({},m(this))}function $n(){return m(this).overflow}function En(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Sn(e,t){var o,n,r,a=this._eras||ho("en")._eras;for(o=0,n=a.length;o<n;++o){switch(typeof a[o].since){case"string":r=i(a[o].since).startOf("day"),a[o].since=r.valueOf();break}switch(typeof a[o].until){case"undefined":a[o].until=1/0;break;case"string":r=i(a[o].until).startOf("day").valueOf(),a[o].until=r.valueOf();break}}return a}function Nn(e,t,o){var i,n,r,a,l,s=this.eras();for(e=e.toUpperCase(),i=0,n=s.length;i<n;++i)if(r=s[i].name.toUpperCase(),a=s[i].abbr.toUpperCase(),l=s[i].narrow.toUpperCase(),o)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[i];break;case"NNNN":if(r===e)return s[i];break;case"NNNNN":if(l===e)return s[i];break}else if([r,a,l].indexOf(e)>=0)return s[i]}function Vn(e,t){var o=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*o}function xn(){var e,t,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until)return i[e].name;if(i[e].until<=o&&o<=i[e].since)return i[e].name}return""}function In(){var e,t,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until)return i[e].narrow;if(i[e].until<=o&&o<=i[e].since)return i[e].narrow}return""}function Mn(){var e,t,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until)return i[e].abbr;if(i[e].until<=o&&o<=i[e].since)return i[e].abbr}return""}function An(){var e,t,o,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(o=r[e].since<=r[e].until?1:-1,n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return(this.year()-i(r[e].since).year())*o+r[e].offset;return this.year()}function Fn(e){return l(this,"_erasNameRegex")||zn.call(this),e?this._erasNameRegex:this._erasRegex}function Ln(e){return l(this,"_erasAbbrRegex")||zn.call(this),e?this._erasAbbrRegex:this._erasRegex}function Rn(e){return l(this,"_erasNarrowRegex")||zn.call(this),e?this._erasNarrowRegex:this._erasRegex}function Bn(e,t){return t.erasAbbrRegex(e)}function _n(e,t){return t.erasNameRegex(e)}function Wn(e,t){return t.erasNarrowRegex(e)}function Pn(e,t){return t._eraYearOrdinalRegex||Ee}function zn(){var e,t,o=[],i=[],n=[],r=[],a=this.eras();for(e=0,t=a.length;e<t;++e)i.push(Le(a[e].name)),o.push(Le(a[e].abbr)),n.push(Le(a[e].narrow)),r.push(Le(a[e].name)),r.push(Le(a[e].abbr)),r.push(Le(a[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function Gn(e,t){_(0,[e,e.length],0,t)}function Un(e){return Jn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Kn(e){return Jn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qn(){return kt(this.year(),1,4)}function Hn(){return kt(this.isoWeekYear(),1,4)}function Yn(){var e=this.localeData()._week;return kt(this.year(),e.dow,e.doy)}function Qn(){var e=this.localeData()._week;return kt(this.weekYear(),e.dow,e.doy)}function Jn(e,t,o,i,n){var r;return null==e?jt(this,i,n).year:(r=kt(e,i,n),t>r&&(t=r),Xn.call(this,e,t,o,i,n))}function Xn(e,t,o,i,n){var r=wt(e,t,o,i,n),a=ft(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}_("N",0,0,"eraAbbr"),_("NN",0,0,"eraAbbr"),_("NNN",0,0,"eraAbbr"),_("NNNN",0,0,"eraName"),_("NNNNN",0,0,"eraNarrow"),_("y",["y",1],"yo","eraYear"),_("y",["yy",2],0,"eraYear"),_("y",["yyy",3],0,"eraYear"),_("y",["yyyy",4],0,"eraYear"),Me("N",Bn),Me("NN",Bn),Me("NNN",Bn),Me("NNNN",_n),Me("NNNNN",Wn),Be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,o,i){var n=o._locale.erasParse(e,i,o._strict);n?m(o).era=n:m(o).invalidEra=e})),Me("y",Ee),Me("yy",Ee),Me("yyy",Ee),Me("yyyy",Ee),Me("yo",Pn),Be(["y","yy","yyy","yyyy"],ze),Be(["yo"],(function(e,t,o,i){var n;o._locale._eraYearOrdinalRegex&&(n=e.match(o._locale._eraYearOrdinalRegex)),o._locale.eraYearOrdinalParse?t[ze]=o._locale.eraYearOrdinalParse(e,n):t[ze]=parseInt(e,10)})),_(0,["gg",2],0,(function(){return this.weekYear()%100})),_(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Gn("gggg","weekYear"),Gn("ggggg","weekYear"),Gn("GGGG","isoWeekYear"),Gn("GGGGG","isoWeekYear"),oe("weekYear","gg"),oe("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Me("G",Se),Me("g",Se),Me("GG",je,he),Me("gg",je,he),Me("GGGG",Te,Oe),Me("gggg",Te,Oe),Me("GGGGG",$e,we),Me("ggggg",$e,we),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,o,i){t[i.substr(0,2)]=de(e)})),_e(["gg","GG"],(function(e,t,o,n){t[n]=i.parseTwoDigitYear(e)})),_("Q",0,"Qo","quarter"),oe("quarter","Q"),ae("quarter",7),Me("Q",ye),Be("Q",(function(e,t){t[Ge]=3*(de(e)-1)})),_("D",["DD",2],"Do","date"),oe("date","D"),ae("date",9),Me("D",je),Me("DD",je,he),Me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Be(["D","DD"],Ue),Be("Do",(function(e,t){t[Ue]=de(e.match(je)[0])}));var er=ue("Date",!0);function tr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}_("DDD",["DDDD",3],"DDDo","dayOfYear"),oe("dayOfYear","DDD"),ae("dayOfYear",4),Me("DDD",De),Me("DDDD",fe),Be(["DDD","DDDD"],(function(e,t,o){o._dayOfYear=de(e)})),_("m",["mm",2],0,"minute"),oe("minute","m"),ae("minute",14),Me("m",je),Me("mm",je,he),Be(["m","mm"],qe);var or=ue("Minutes",!1);_("s",["ss",2],0,"second"),oe("second","s"),ae("second",15),Me("s",je),Me("ss",je,he),Be(["s","ss"],He);var ir,nr,rr=ue("Seconds",!1);for(_("S",0,0,(function(){return~~(this.millisecond()/100)})),_(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),_(0,["SSS",3],0,"millisecond"),_(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),_(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),_(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),_(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),_(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),_(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),oe("millisecond","ms"),ae("millisecond",16),Me("S",De,ye),Me("SS",De,he),Me("SSS",De,fe),ir="SSSS";ir.length<=9;ir+="S")Me(ir,Ee);function ar(e,t){t[Ye]=de(1e3*("0."+e))}for(ir="S";ir.length<=9;ir+="S")Be(ir,ar);function lr(){return this._isUTC?"UTC":""}function sr(){return this._isUTC?"Coordinated Universal Time":""}nr=ue("Milliseconds",!1),_("z",0,0,"zoneAbbr"),_("zz",0,0,"zoneName");var cr=j.prototype;function dr(e){return Yo(1e3*e)}function ur(){return Yo.apply(null,arguments).parseZone()}function pr(e){return e}cr.add=Mi,cr.calendar=Pi,cr.clone=zi,cr.diff=Qi,cr.endOf=hn,cr.format=tn,cr.from=on,cr.fromNow=nn,cr.to=rn,cr.toNow=an,cr.get=ge,cr.invalidAt=$n,cr.isAfter=Gi,cr.isBefore=Ui,cr.isBetween=Ki,cr.isSame=qi,cr.isSameOrAfter=Hi,cr.isSameOrBefore=Yi,cr.isValid=Dn,cr.lang=sn,cr.locale=ln,cr.localeData=cn,cr.max=Jo,cr.min=Qo,cr.parsingFlags=Tn,cr.set=ve,cr.startOf=yn,cr.subtract=Ai,cr.toArray=jn,cr.toObject=kn,cr.toDate=wn,cr.toISOString=Zi,cr.inspect=en,"undefined"!==typeof Symbol&&null!=Symbol.for&&(cr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cr.toJSON=Cn,cr.toString=Xi,cr.unix=On,cr.valueOf=fn,cr.creationData=En,cr.eraName=xn,cr.eraNarrow=In,cr.eraAbbr=Mn,cr.eraYear=An,cr.year=mt,cr.isLeapYear=yt,cr.weekYear=Un,cr.isoWeekYear=Kn,cr.quarter=cr.quarters=Zn,cr.month=dt,cr.daysInMonth=ut,cr.week=cr.weeks=Et,cr.isoWeek=cr.isoWeeks=St,cr.weeksInYear=Yn,cr.weeksInWeekYear=Qn,cr.isoWeeksInYear=qn,cr.isoWeeksInISOWeekYear=Hn,cr.date=er,cr.day=cr.days=Gt,cr.weekday=Ut,cr.isoWeekday=Kt,cr.dayOfYear=tr,cr.hour=cr.hours=io,cr.minute=cr.minutes=or,cr.second=cr.seconds=rr,cr.millisecond=cr.milliseconds=nr,cr.utcOffset=vi,cr.utc=yi,cr.local=hi,cr.parseZone=fi,cr.hasAlignedHourOffset=Oi,cr.isDST=wi,cr.isLocal=ki,cr.isUtcOffset=Ci,cr.isUtc=Di,cr.isUTC=Di,cr.zoneAbbr=lr,cr.zoneName=sr,cr.dates=D("dates accessor is deprecated. Use date instead.",er),cr.months=D("months accessor is deprecated. Use month instead",dt),cr.years=D("years accessor is deprecated. Use year instead",mt),cr.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mi),cr.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ji);var br=x.prototype;function gr(e,t,o,i){var n=ho(),r=g().set(i,t);return n[o](r,e)}function vr(e,t,o){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return gr(e,t,o,"month");var i,n=[];for(i=0;i<12;i++)n[i]=gr(e,i,o,"month");return n}function mr(e,t,o,i){"boolean"===typeof e?(d(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,d(t)&&(o=t,t=void 0),t=t||"");var n,r=ho(),a=e?r._week.dow:0,l=[];if(null!=o)return gr(t,(o+a)%7,i,"day");for(n=0;n<7;n++)l[n]=gr(t,(n+a)%7,i,"day");return l}function yr(e,t){return vr(e,t,"months")}function hr(e,t){return vr(e,t,"monthsShort")}function fr(e,t,o){return mr(e,t,o,"weekdays")}function Or(e,t,o){return mr(e,t,o,"weekdaysShort")}function wr(e,t,o){return mr(e,t,o,"weekdaysMin")}br.calendar=M,br.longDateFormat=K,br.invalidDate=H,br.ordinal=J,br.preparse=pr,br.postformat=pr,br.relativeTime=Z,br.pastFuture=ee,br.set=N,br.eras=Sn,br.erasParse=Nn,br.erasConvertYear=Vn,br.erasAbbrRegex=Ln,br.erasNameRegex=Fn,br.erasNarrowRegex=Rn,br.months=rt,br.monthsShort=at,br.monthsParse=st,br.monthsRegex=bt,br.monthsShortRegex=pt,br.week=Ct,br.firstDayOfYear=$t,br.firstDayOfWeek=Tt,br.weekdays=Bt,br.weekdaysMin=Wt,br.weekdaysShort=_t,br.weekdaysParse=zt,br.weekdaysRegex=qt,br.weekdaysShortRegex=Ht,br.weekdaysMinRegex=Yt,br.isPM=to,br.meridiem=no,vo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,o=1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+o}}),i.lang=D("moment.lang is deprecated. Use moment.locale instead.",vo),i.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ho);var jr=Math.abs;function kr(){var e=this._data;return this._milliseconds=jr(this._milliseconds),this._days=jr(this._days),this._months=jr(this._months),e.milliseconds=jr(e.milliseconds),e.seconds=jr(e.seconds),e.minutes=jr(e.minutes),e.hours=jr(e.hours),e.months=jr(e.months),e.years=jr(e.years),this}function Cr(e,t,o,i){var n=Ei(t,o);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function Dr(e,t){return Cr(this,e,t,1)}function Tr(e,t){return Cr(this,e,t,-1)}function $r(e){return e<0?Math.floor(e):Math.ceil(e)}function Er(){var e,t,o,i,n,r=this._milliseconds,a=this._days,l=this._months,s=this._data;return r>=0&&a>=0&&l>=0||r<=0&&a<=0&&l<=0||(r+=864e5*$r(Nr(l)+a),a=0,l=0),s.milliseconds=r%1e3,e=ce(r/1e3),s.seconds=e%60,t=ce(e/60),s.minutes=t%60,o=ce(t/60),s.hours=o%24,a+=ce(o/24),n=ce(Sr(a)),l+=n,a-=$r(Nr(n)),i=ce(l/12),l%=12,s.days=a,s.months=l,s.years=i,this}function Sr(e){return 4800*e/146097}function Nr(e){return 146097*e/4800}function Vr(e){if(!this.isValid())return NaN;var t,o,i=this._milliseconds;if(e=ie(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,o=this._months+Sr(t),e){case"month":return o;case"quarter":return o/3;case"year":return o/12}else switch(t=this._days+Math.round(Nr(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function xr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*de(this._months/12):NaN}function Ir(e){return function(){return this.as(e)}}var Mr=Ir("ms"),Ar=Ir("s"),Fr=Ir("m"),Lr=Ir("h"),Rr=Ir("d"),Br=Ir("w"),_r=Ir("M"),Wr=Ir("Q"),Pr=Ir("y");function zr(){return Ei(this)}function Gr(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function Ur(e){return function(){return this.isValid()?this._data[e]:NaN}}var Kr=Ur("milliseconds"),qr=Ur("seconds"),Hr=Ur("minutes"),Yr=Ur("hours"),Qr=Ur("days"),Jr=Ur("months"),Xr=Ur("years");function Zr(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function oa(e,t,o,i,n){return n.relativeTime(t||1,!!o,e,i)}function ia(e,t,o,i){var n=Ei(e).abs(),r=ea(n.as("s")),a=ea(n.as("m")),l=ea(n.as("h")),s=ea(n.as("d")),c=ea(n.as("M")),d=ea(n.as("w")),u=ea(n.as("y")),p=r<=o.ss&&["s",r]||r<o.s&&["ss",r]||a<=1&&["m"]||a<o.m&&["mm",a]||l<=1&&["h"]||l<o.h&&["hh",l]||s<=1&&["d"]||s<o.d&&["dd",s];return null!=o.w&&(p=p||d<=1&&["w"]||d<o.w&&["ww",d]),p=p||c<=1&&["M"]||c<o.M&&["MM",c]||u<=1&&["y"]||["yy",u],p[2]=t,p[3]=+e>0,p[4]=i,oa.apply(null,p)}function na(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function ra(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var o,i,n=!1,r=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(n=e),"object"===typeof t&&(r=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),o=this.localeData(),i=ia(this,!n,r,o),n&&(i=o.pastFuture(+this,i)),o.postformat(i)}var la=Math.abs;function sa(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,o,i,n,r,a,l,s=la(this._milliseconds)/1e3,c=la(this._days),d=la(this._months),u=this.asSeconds();return u?(e=ce(s/60),t=ce(e/60),s%=60,e%=60,o=ce(d/12),d%=12,i=s?s.toFixed(3).replace(/\.?0+$/,""):"",n=u<0?"-":"",r=sa(this._months)!==sa(u)?"-":"",a=sa(this._days)!==sa(u)?"-":"",l=sa(this._milliseconds)!==sa(u)?"-":"",n+"P"+(o?r+o+"Y":"")+(d?r+d+"M":"")+(c?a+c+"D":"")+(t||e||s?"T":"")+(t?l+t+"H":"")+(e?l+e+"M":"")+(s?l+i+"S":"")):"P0D"}var da=ai.prototype;return da.isValid=ni,da.abs=kr,da.add=Dr,da.subtract=Tr,da.as=Vr,da.asMilliseconds=Mr,da.asSeconds=Ar,da.asMinutes=Fr,da.asHours=Lr,da.asDays=Rr,da.asWeeks=Br,da.asMonths=_r,da.asQuarters=Wr,da.asYears=Pr,da.valueOf=xr,da._bubble=Er,da.clone=zr,da.get=Gr,da.milliseconds=Kr,da.seconds=qr,da.minutes=Hr,da.hours=Yr,da.days=Qr,da.weeks=Zr,da.months=Jr,da.years=Xr,da.humanize=aa,da.toISOString=ca,da.toString=ca,da.toJSON=ca,da.locale=ln,da.localeData=cn,da.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),da.lang=sn,_("X",0,0,"unix"),_("x",0,0,"valueOf"),Me("x",Se),Me("X",xe),Be("X",(function(e,t,o){o._d=new Date(1e3*parseFloat(e))})),Be("x",(function(e,t,o){o._d=new Date(de(e))})),
//! moment.js
i.version="2.29.3",n(Yo),i.fn=cr,i.min=Zo,i.max=ei,i.now=ti,i.utc=g,i.unix=dr,i.months=yr,i.isDate=u,i.locale=vo,i.invalid=h,i.duration=Ei,i.isMoment=k,i.weekdays=fr,i.parseZone=ur,i.localeData=ho,i.isDuration=li,i.monthsShort=hr,i.weekdaysMin=wr,i.defineLocale=mo,i.updateLocale=yo,i.locales=fo,i.weekdaysShort=Or,i.normalizeUnits=ie,i.relativeTimeRounding=na,i.relativeTimeThreshold=ra,i.calendarFormat=Wi,i.prototype=cr,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}))})),Tl=Object(a["defineComponent"])({inheritAttrs:!1,components:{ExpressionInputForm:i["ExpressionInputForm"],CustomDialog:l["c"],CloseCircleFilled:z["a"],OioDatePicker:r["OioDatePicker"],OioDateTimePicker:r["OioDateTimePicker"]},props:Object.assign(Object.assign(Object.assign({},r["OioDateTimePickerFormatProps"]),i["ExpressionCommonProps"]),{showTimeDefaultValue:{type:Object},dateChange:{type:Function,default:()=>()=>{}},dateType:{type:String}}),setup(e,t){const o=Object(a["ref"])([]),n=Object(a["ref"])([]),r=Object(a["ref"])(!1),l=e=>{n.value=e||[]},s=Object(a["computed"])(()=>{var t;return Object.assign(Object.assign({type:e.type,contextItems:e.contextItems,models:e.models,quoteType:e.quoteType,ttypes:e.ttypes,useContextName:e.useContextName,leftJoinTtype:e.leftJoinTtype},e.expressionOption),{labelDisplayType:(null===(t=e.expressionOption)||void 0===t?void 0:t.labelDisplayType)||i["IExpressionLabelDisplayType"].DISPLAY_NAME})}),c=Object(a["computed"])(()=>{const t=(e.expressionItemList||[]).some(e=>{var t;return!!(null===(t=e.valueList)||void 0===t?void 0:t.find(e=>e.value))});return!t&&e.hasChangeSourceCode&&e.sourceCode?i["ExpressionExecutor"].translate(e.sourceCode):Object(i["createExpressionDisplayName"])(o.value,s.value)}),d=Object(a["computed"])(()=>!!e.value&&(isNaN(e.value)&&!isNaN(Date.parse(e.value))));Object(a["watch"])(r,()=>{r.value||e.blur&&e.blur()}),Object(a["watch"])(()=>e.expressionItemList,t=>{o.value=t||[Object(i["createDefaultExpressionItem"])(e.type)]},{immediate:!0,deep:!0});const u=()=>{if(r.value=!r.value,r.value){const e=Object(i["deepClone"])(o.value);e.forEach(e=>e.showValueListLabel=!0),n.value=e}},p=Object(a["computed"])(()=>c.value&&!e.readonly),b=(t=!0)=>{var o;n.value=[Object(i["createDefaultExpressionItem"])(s.value.type)],v(t),null===(o=e.blur)||void 0===o||o.call(e)},g=()=>{setTimeout(()=>{r.value=!1},200),n.value=[]},v=(t=!0)=>{var a;e.hasChangeSourceCode&&(n.value=[Object(i["createDefaultExpressionItem"])(s.value.type)]),setTimeout(()=>{t&&(r.value=!1)},200),o.value=JSON.parse(JSON.stringify(n.value)),null===(a=e.onChangeList)||void 0===a||a.call(e,o.value)};return Object(a["onBeforeUnmount"])(()=>{r.value=!1}),{ModelFieldType:i["ModelFieldType"],isDate:d,isShowDropdown:r,expressionItemList:o,dialogExpressionItemList:n,expressionDisplayName:c,isShowClear:p,expressionOption:s,onAddOnClick:u,handleChangeList:l,cancelHandler:g,submitHandler:v,clearHandler:b}}});const $l={class:"ant-input-wrapper ant-input-group"},El={class:"ant-input",tabindex:"0"},Sl={class:"tag",style:{width:"100%"}},Nl={key:0,class:"ui-compute-date-express-value"},Vl=Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-kongjian"},null,-1),xl=[Vl];function Il(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-date-picker"),s=Object(a["resolveComponent"])("oio-date-time-picker"),c=Object(a["resolveComponent"])("close-circle-filled"),d=Object(a["resolveComponent"])("expression-input-form"),u=Object(a["resolveComponent"])("custom-dialog");return Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{class:Object(a["normalizeClass"])(["ui-compute-date ant-input-group-wrapper ant-input-control expression-input-control",e.readonly&&"ui-compute-date-readonly",!e.isDate&&e.value&&"ui-compute-date-exist-express"])},[Object(a["createElementVNode"])("span",$l,[Object(a["createElementVNode"])("span",El,[Object(a["createElementVNode"])("span",Sl,[!e.isDate&&e.value?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nl,Object(a["toDisplayString"])(e.expressionDisplayName),1)):Object(a["createCommentVNode"])("v-if",!0),e.dateType===e.ModelFieldType.Date?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:e.dateFormat,"allow-clear":!1,"allow-edit":!0,disabled:!1,"show-today":!0,format:e.format,"date-format":e.dateFormat,"value-format":e.valueFormat,value:e.isDate?e.value:void 0,"onUpdate:value":e.dateChange},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{style:Object(a["normalizeStyle"])({width:"100%",display:"flex",color:e.value?"unset":"#bfbfbf"})},[Object(a["createElementVNode"])("pre",null,Object(a["toDisplayString"])(e.isDate?e.value:e.expressionDisplayName||e.placeholder||" "),1)],4)]),_:1},8,["format","date-format","value-format","value","onUpdate:value"])):Object(a["createCommentVNode"])("v-if",!0),e.dateType===e.ModelFieldType.DateTime?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dateFormat,"allow-clear":!1,"allow-edit":!0,disabled:!1,format:e.format,"date-format":e.dateFormat,"time-format":e.timeFormat,"value-format":e.valueFormat,value:e.isDate?e.value:void 0,"show-time":{defaultValue:e.showTimeDefaultValue},"onUpdate:value":e.dateChange},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{style:Object(a["normalizeStyle"])({width:"100%",display:"flex",color:e.value?"unset":"#bfbfbf"})},[Object(a["createElementVNode"])("pre",null,Object(a["toDisplayString"])(e.isDate?e.value:e.expressionDisplayName||e.placeholder||" "),1)],4)]),_:1},8,["format","date-format","time-format","value-format","value","show-time","onUpdate:value"])):Object(a["createCommentVNode"])("v-if",!0)])]),e.value&&!e.readonly?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"ant-input-clear",onClick:t[0]||(t[0]=Object(a["withModifiers"])((...t)=>e.clearHandler&&e.clearHandler(...t),["stop"]))},[Object(a["createVNode"])(c)])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("span",{class:"ant-input-group-addon",onClick:t[1]||(t[1]=(...t)=>e.onAddOnClick&&e.onAddOnClick(...t))},xl)]),Object(a["createVNode"])(u,{title:e.$translate(e.title),visible:e.isShowDropdown,"z-index":99999,"dialog-class":"expression-input-control-dialog",width:"50%",onCancel:e.cancelHandler,onOk:e.submitHandler},{default:Object(a["withCtx"])(()=>[e.isShowDropdown?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,"expression-item-list":e.dialogExpressionItemList,"onUpdate:expression-item-list":t[2]||(t[2]=t=>e.dialogExpressionItemList=t),"expression-option":e.expressionOption,"field-options":e.fieldOptions,"filter-method":e.filterMethod,"is-low-code":e.isLowCode,value:e.value,"is-simple-mode":e.isSimpleMode,"source-code":e.sourceCode,"has-change-source-code":e.hasChangeSourceCode,class:"expression-input-control-dialog-inner",onChangeList:e.handleChangeList,onChangeSourceCode:e.onChangeSourceCode,onClear:e.clearHandler},null,8,["expression-item-list","expression-option","field-options","filter-method","is-low-code","value","is-simple-mode","source-code","has-change-source-code","onChangeList","onChangeSourceCode","onClear"])):Object(a["createCommentVNode"])("v-if",!0)]),_:1},8,["title","visible","onCancel","onOk"])],2)}Tl.render=Il,Tl.__file="src/view/page-designer/component/expression/date/UiComputeDate.vue";let Ml=class extends jl{constructor(){super(...arguments),this.resourceDateTimeFormat={}}initialize(e){return super.initialize(e),this.setComponent(Tl),this}get format(){return this.getDsl().format}get valueFormat(){return this.getDsl().valueFormat}get dateFormat(){let e=this.executeExpression(this.getDsl().dateFormat);return e||(e=i["defaultDateFormatKey"]),i["ObjectUtils"].toUpperSnakeCase(this.resourceDateTimeFormat.resourceDateFormat)[e]||e}get timeFormat(){let e=this.executeExpression(this.getDsl().timeFormat);return e||(e=i["defaultTimeFormatKey"]),i["ObjectUtils"].toUpperSnakeCase(this.resourceDateTimeFormat.resourceTimeFormat)[e]||e}get showTimeDefaultValue(){return Dl("00:00:00",i["DateUtil"].fetchTimeFormat(this.timeFormat,void 0))}get placeholder(){return this.getDsl().placeholder}dateChange(e){const t=this.change(e);return this.blur(),t}get dateType(){return this.getDsl().dateType||i["ModelFieldType"].Date}isDate(e){return isNaN(e)&&!isNaN(Date.parse(e))}filterMethod(e){return e.ttype===i["ModelFieldType"].DateTime||e.ttype===i["ModelFieldType"].Date}validator(){const e=Object.create(null,{validator:{get:()=>super.validator}});return J(this,void 0,void 0,(function*(){const t=yield e.validator.call(this);if(!Object(i["isValidatorSuccess"])(t))return t;const o=this.formData.startDate,n=this.formData.endDate;if(o&&n&&this.isDate(o)&&this.isDate(n)){const e=Object(i["translateByOffset"])(n,this.formData.endDateOffset,this.formData.endDateOffsetUnit,i["defaultFormat"]).format(i["defaultFormat"]),t=Object(i["translateByOffset"])(o,this.formData.startDateOffset,this.formData.startDateOffsetUnit,i["defaultFormat"]).format(i["defaultFormat"]);if(new Date(e)<new Date(t))return this.validatorError(Object(i["translateValueByKey"])("起始日期(含偏移量)不能大于结束日期(含偏移量)"))}return this.validatorSuccess()}))}created(){return J(this,void 0,void 0,(function*(){this.resourceDateTimeFormat=yield Object(i["queryResourceDateTimeFormat"])()}))}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Ml.prototype,"resourceDateTimeFormat",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"format",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"valueFormat",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"dateFormat",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"timeFormat",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"showTimeDefaultValue",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"placeholder",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Ml.prototype,"dateChange",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ml.prototype,"dateType",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Ml.prototype,"isDate",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Ml.prototype,"filterMethod",null),Ml=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiComputeDate"}))],Ml);let Al=class extends i["BooleanConditionInputControlWidget"]{constructor(){super(...arguments),this.isFrontend=!0,this.expEntity={}}numberCustomMethod(e,t){return Object(i["isNumStringTtype"])(t)?Object(i["autoAddQuote"])(e,i["IExpressionQuoteType"].SINGLE):e}initialize(e){return super.initialize(e),this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=`${t.designKey}#attr_name:${this.field.name}`,this.expEntity=t}}))),this}get isFieldStore(){}onChangeList(e){super.onChangeList(e),this.submit(new i["SubmitValue"]({}))}get contextItems(){var e,t,o,n,r;const{contextItems:a}=this.getDsl(),l=[...Object(i["createContextItems"])(a,this.formData._model,this.formData._model),{name:i["ExpressionKeyword"].rootRecord,displayName:Object(i["translateValueByKey"])(i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].rootRecord]),models:[null===(e=this.expEntity)||void 0===e?void 0:e.rootModel]}];return(null===(o=null===(t=this.expEntity)||void 0===t?void 0:t.openerModelDefinition)||void 0===o?void 0:o.model)&&l.push({name:i["ExpressionKeyword"].openerRecord,displayName:i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].openerRecord],models:[null===(r=null===(n=this.expEntity)||void 0===n?void 0:n.openerModelDefinition)||void 0===r?void 0:r.model]}),l}submit(e){return J(this,void 0,void 0,(function*(){return yield this.customSubmit(),i["SubmitHandler"].DEFAULT(this.field,this.itemName,e,this.value)}))}watchId(){const e=Object.create(null,{initData:{get:()=>super.initData}});return J(this,void 0,void 0,(function*(){this.value&&e.initData.call(this)}))}queryExpression(){return J(this,void 0,void 0,(function*(){const e=this.queryExpressionParam;return yield Uo(e.model,e.field,e.key,e.version)}))}get queryExpressionParam(){var e,t;return{model:zo,field:Go,key:null===(e=this.expEntity)||void 0===e?void 0:e.designKey,version:null===(t=this.expEntity)||void 0===t?void 0:t.version}}customSubmit(){return J(this,void 0,void 0,(function*(){const e=Object(i["createExpressionDefinitionByExpressionItem"])(this.queryExpressionParam,this.getExpressionItemList(),this.createExpressionOption());yield Object(i["createExpressionDefinition"])(e)}))}initData(){return J(this,void 0,void 0,(function*(){return this.getExpressionItemList()}))}};Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],Al.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Al.prototype,"expEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Al.prototype,"isFieldStore",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],Al.prototype,"onChangeList",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Al.prototype,"contextItems",null),Y([i["Widget"].Watch("formData.id",{immediate:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Al.prototype,"watchId",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Al.prototype,"queryExpressionParam",null),Al=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiBooleanExpression"}))],Al);const Fl=[i["DefaultComparisonOperator"].LIKE,i["DefaultComparisonOperator"].STARTS,i["DefaultComparisonOperator"].ENDS].map(e=>e.toString());let Ll=class extends i["RsqlConditionInputControlWidget"]{constructor(){super(...arguments),this.isFrontend=!0,this.expEntity={}}numberCustomMethod(e,t){return Object(i["isNumStringTtype"])(t)?Object(i["autoAddQuote"])(e,i["IExpressionQuoteType"].SINGLE):e}needSubscribe(){return!0}initialize(e){return super.initialize(e),this.needSubscribe()?(this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){let t=Object(i["deepClone"])(e);t.designKey=t.designKey+"#attr_name:"+this.field.name,this.expEntity=t}}))),this):this}get isFieldStore(){}onChangeList(e){super.onChangeList(e),this.submit(new i["SubmitValue"]({}))}get contextItems(){var e,t,o,n,r,a;const l=[{name:i["ExpressionKeyword"].activeRecord,displayName:Object(i["translateValueByKey"])(i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].activeRecord]),models:[null===(e=this.expEntity)||void 0===e?void 0:e.designModel]},{name:i["ExpressionKeyword"].rootRecord,displayName:Object(i["translateValueByKey"])(i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].rootRecord]),models:[null===(t=this.expEntity)||void 0===t?void 0:t.rootModel]}];return(null===(n=null===(o=this.expEntity)||void 0===o?void 0:o.openerModelDefinition)||void 0===n?void 0:n.model)&&l.push({name:i["ExpressionKeyword"].openerRecord,displayName:i["ExpressionKeywordDisplayName"][i["ExpressionKeyword"].openerRecord],models:[null===(a=null===(r=this.expEntity)||void 0===r?void 0:r.openerModelDefinition)||void 0===a?void 0:a.model]}),l}get modelModel(){return this.fetchFilterModel()}submit(e){return J(this,void 0,void 0,(function*(){return this.customSubmit(),i["SubmitHandler"].DEFAULT(this.field,this.itemName,e,this.value)}))}get queryExpressionParam(){var e,t;return{model:zo,field:Go,key:null===(e=this.expEntity)||void 0===e?void 0:e.designKey,version:null===(t=this.expEntity)||void 0===t?void 0:t.version}}customSubmit(){return J(this,void 0,void 0,(function*(){const e=Object(i["createExpressionDefinitionByExpressionItem"])(this.queryExpressionParam,this.getExpressionItemList(),this.createExpressionOption());yield Object(i["createExpressionDefinition"])(e)}))}watchId(){const e=Object.create(null,{initData:{get:()=>super.initData}});return J(this,void 0,void 0,(function*(){this.value&&e.initData.call(this)}))}queryExpression(){return J(this,void 0,void 0,(function*(){const e=this.queryExpressionParam;return yield Uo(e.model,e.field,e.key,e.version)}))}variableCustomMethod(e,t,o){const i="${"+e+"}",{operator:n}=o||{};return Fl.includes(n)?i:"'"+i+"'"}initData(){return J(this,void 0,void 0,(function*(){return this.getExpressionItemList()}))}fetchFilterModel(){var e,t;return(null===(e=this.expEntity)||void 0===e?void 0:e.designReferenceModel)||(null===(t=this.expEntity)||void 0===t?void 0:t.designModel)}};Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],Ll.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Ll.prototype,"expEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ll.prototype,"isFieldStore",null),Y([i["Widget"].Reactive(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],Ll.prototype,"onChangeList",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Ll.prototype,"contextItems",null),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Ll.prototype,"modelModel",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ll.prototype,"queryExpressionParam",null),Y([i["Widget"].Watch("formData.id",{immediate:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Ll.prototype,"watchId",null),Ll=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiRsqlExpression"}))],Ll);class Rl extends i["FormFieldWidget"]{dataChartQueryOne(){return J(this,void 0,void 0,(function*(){const e=this.value;if(e&&e.length>0)return e;const t=this.formData["dataSource"];return t&&t.code?yield this.fetchDataOne(t.code):[]}))}dataChange(e){this.change(e)}fetchDataOne(e){return J(this,void 0,void 0,(function*(){}))}}Y([i["Widget"].Reactive(),Q("design:type",String)],Rl.prototype,"dataCode",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Rl.prototype,"dataChartQueryOne",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Rl.prototype,"dataChange",null);const Bl=i["HttpClient"].getInstance();function _l(e){var t;return J(this,void 0,void 0,(function*(){const o=`\n      query {\n        uiDesignerDataChartProxyQuery {\n          queryOne(query: { code: "${e}" }) {\n            code\n            uiDesignerDataVariables {\n              fieldName\n              displayName\n              ttype\n              exp\n            }\n          }\n        }\n      }\n  `,i=yield Bl.query("uiDesigner",o);return null===(t=i.data.uiDesignerDataChartProxyQuery.queryOne)||void 0===t?void 0:t.uiDesignerDataVariables}))}function Wl(e){var t;return J(this,void 0,void 0,(function*(){const o=`\n     query {\n      uiDesignerDataReportProxyQuery {\n        queryOne(query: { code: "${e}" }) {\n          code\n          uiDesignerDataVariables {\n            chartCode\n            chartTitle\n            fieldName\n            displayName\n            ttype\n            exp\n          }\n        }\n      }\n    }\n  `,i=yield Bl.query("uiDesigner",o);return null===(t=i.data.uiDesignerDataReportProxyQuery.queryOne)||void 0===t?void 0:t.uiDesignerDataVariables}))}var Pl=Object(a["defineComponent"])({props:{value:{type:Array},dataChartQueryOne:{type:Function,default:()=>()=>{}},dataChange:{type:Function,default:()=>()=>{}}},components:{OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioModal:r["OioModal"],OioInput:r["OioInput"],OioTextarea:r["OioTextarea"],OioIcon:r["OioIcon"],OioButton:r["OioButton"],CheckOutlined:W["a"],EditOutlined:G["a"]},setup(e){const t=Object(a["ref"])(!1),o=[{title:"图表名称",dataIndex:"chartTitle",width:"25%"},{title:"变量显示名",dataIndex:"displayName",width:"25%"},{title:"变量表达式",dataIndex:"exp",width:"50%",slots:{customRender:"exp"}}].map(e=>Object.assign(Object.assign({},e),{title:Object(i["translateValueByKey"])(e.title)})),n=Object(a["ref"])([]);Object(a["ref"])([]);const r=()=>J(this,void 0,void 0,(function*(){t.value=!0;let o=yield e.dataChartQueryOne();o&&o.length&&o.forEach(e=>e.key=e.fieldName+e.chartCode),n.value=o})),l=Object(a["computed"])(()=>n.value.length+1),s=Object(a["reactive"])({}),c=e=>{s[e]=Object(i["deepClone"])(n.value.filter(t=>e===t.key)[0])},d=e=>{Object.assign(n.value.filter(t=>e===t.key)[0],s[e]),delete s[e]},u=o=>{e.dataChange(n.value),t.value=!1},p=()=>{t.value=!1};return{visible:t,columns:o,dataSource:n,openModal:r,editableData:s,count:l,edit:c,save:d,cancelCallback:p,enterCallBack:u}}});const zl={class:"editable-cell"},Gl={key:0,class:"editable-cell-input-wrapper"},Ul={key:1,class:"editable-cell-text-wrapper"},Kl={key:0},ql={key:1,style:{color:"#cccccc"}};function Hl(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("a-input"),c=Object(a["resolveComponent"])("check-outlined"),d=Object(a["resolveComponent"])("edit-outlined"),u=Object(a["resolveComponent"])("a-table"),p=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])([[e.readonly&&"readonly"],"ui-data-variable-exp"])},[Object(a["createVNode"])(l,{style:{width:"100%"},type:"primary",onClick:e.openModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("配置表达式")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(p,{"cancel-callback":e.cancelCallback,"enter-callback":e.enterCallBack,visible:e.visible,heigth:"60%",title:"配置变量表达式",width:"560px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{columns:e.columns,"data-source":e.dataSource,bordered:""},{exp:Object(a["withCtx"])(({text:t,record:o})=>[Object(a["createElementVNode"])("div",zl,[e.editableData[o.key]?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gl,[Object(a["createVNode"])(s,{value:e.editableData[o.key].exp,"onUpdate:value":t=>e.editableData[o.key].exp=t,onPressEnter:t=>e.save(o.key)},null,8,["value","onUpdate:value","onPressEnter"]),Object(a["createVNode"])(c,{class:"editable-cell-icon-check",onClick:t=>e.save(o.key)},null,8,["onClick"])])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ul,[t?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Kl,Object(a["toDisplayString"])(t),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ql,Object(a["toDisplayString"])(e.$translate("请键入表达式")),1)),Object(a["createVNode"])(d,{class:"editable-cell-icon",onClick:t=>e.edit(o.key)},null,8,["onClick"])]))])]),_:1},8,["columns","data-source"])]),_:1},8,["cancel-callback","enter-callback","visible"])],2)}Pl.render=Hl,Pl.__file="src/view/page-designer/component/expression/data/UiReportVariableExp.vue";let Yl=class extends Rl{initialize(e){return super.initialize(e),this.setComponent(Pl),this}fetchDataOne(e){return J(this,void 0,void 0,(function*(){return yield Wl(e)}))}};Yl=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiReportVariableExpression"}))],Yl);var Ql=Object(a["defineComponent"])({props:{value:{type:Array},dataChartQueryOne:{type:Function,default:()=>()=>{}},dataChange:{type:Function,default:()=>()=>{}}},components:{OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioModal:r["OioModal"],OioInput:r["OioInput"],OioTextarea:r["OioTextarea"],OioIcon:r["OioIcon"],OioButton:r["OioButton"],CheckOutlined:W["a"],EditOutlined:G["a"]},setup(e){const t=Object(a["ref"])(!1),o=[{title:"变量技术名",dataIndex:"fieldName",width:"25%"},{title:"变量显示名",dataIndex:"displayName",width:"25%"},{title:"变量表达式",dataIndex:"exp",width:"50%",slots:{customRender:"exp"}}].map(e=>Object.assign(Object.assign({},e),{title:Object(i["translateValueByKey"])(e.title)})),n=Object(a["ref"])([]);Object(a["ref"])([]);const r=()=>J(this,void 0,void 0,(function*(){t.value=!0;let o=yield e.dataChartQueryOne();o&&o.length&&o.forEach(e=>e.key=e.fieldName),n.value=o})),l=Object(a["computed"])(()=>n.value.length+1),s=Object(a["reactive"])({}),c=e=>{s[e]=Object(i["deepClone"])(n.value.filter(t=>e===t.key)[0])},d=e=>{Object.assign(n.value.filter(t=>e===t.key)[0],s[e]),delete s[e]},u=o=>{e.dataChange(n.value),t.value=!1},p=()=>{t.value=!1};return{visible:t,columns:o,dataSource:n,openModal:r,editableData:s,count:l,edit:c,save:d,cancelCallback:p,enterCallBack:u}}});const Jl={class:"editable-cell"},Xl={key:0,class:"editable-cell-input-wrapper"},Zl={key:1,class:"editable-cell-text-wrapper"},es={key:0},ts={key:1,style:{color:"#cccccc"}};function os(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("a-input"),c=Object(a["resolveComponent"])("check-outlined"),d=Object(a["resolveComponent"])("edit-outlined"),u=Object(a["resolveComponent"])("a-table"),p=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])([[e.readonly&&"readonly"],"ui-data-variable-exp"])},[Object(a["createVNode"])(l,{style:{width:"100%"},type:"primary",onClick:e.openModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("配置表达式")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(p,{"cancel-callback":e.cancelCallback,"enter-callback":e.enterCallBack,visible:e.visible,heigth:"60%",title:"配置变量表达式",width:"560px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{columns:e.columns,"data-source":e.dataSource,bordered:""},{exp:Object(a["withCtx"])(({text:t,record:o})=>[Object(a["createElementVNode"])("div",Jl,[e.editableData[o.key]?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xl,[Object(a["createVNode"])(s,{value:e.editableData[o.key].exp,"onUpdate:value":t=>e.editableData[o.key].exp=t,onPressEnter:t=>e.save(o.key)},null,8,["value","onUpdate:value","onPressEnter"]),Object(a["createVNode"])(c,{class:"editable-cell-icon-check",onClick:t=>e.save(o.key)},null,8,["onClick"])])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zl,[t?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",es,Object(a["toDisplayString"])(t),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ts,Object(a["toDisplayString"])(e.$translate("请键入表达式")),1)),Object(a["createVNode"])(d,{class:"editable-cell-icon",onClick:t=>e.edit(o.key)},null,8,["onClick"])]))])]),_:1},8,["columns","data-source"])]),_:1},8,["cancel-callback","enter-callback","visible"])],2)}Ql.render=os,Ql.__file="src/view/page-designer/component/expression/data/UiChartVariableExp.vue";let is=class extends Rl{initialize(e){return super.initialize(e),this.setComponent(Ql),this}fetchDataOne(e){return J(this,void 0,void 0,(function*(){return yield _l(e)}))}};is=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiChartVariableExpression"}))],is);const ns=(e,t)=>{const o=Object(a["ref"])(),n=Object(a["ref"])([]),r=Object(a["ref"])([]),l=Object(a["ref"])([]),s=Object(a["ref"])([]),c=Object(a["computed"])(()=>{var t;return(null===(t=e.leftJoinField)||void 0===t?void 0:t.ttype)||e.leftJoinTtype});let d=Object(a["ref"])("");const u={total:1,pageSize:10,current:1};let p=[];function b(){var t,o,r,a,l;return J(this,void 0,void 0,(function*(){if(e.contextItems&&(e.contextItems.length>1||e.useContextName))n.value=Object(i["contextItems2ModelSelection"])(e.contextItems,e);else{const s=e.models||(null===(t=e.contextItems)||void 0===t?void 0:t.map(e=>e.models));if(!(null===s||void 0===s?void 0:s.length)||(null===(r=null===(o=e.contextItems)||void 0===o?void 0:o[0].modelFields)||void 0===r?void 0:r.length))return n.value=Object(i["contextItems2ModelSelection"])(e.contextItems,e);const c=yield Object(i["fetchModelData"])(s,d.value,u,!0);p=c.content||[],n.value=Object(i["convertModels2FieldSelectionOptions"])(p,e.ttypes,e.isFieldStore,void 0,!1,e.filterMethod),e.isSimpleMode&&n.value.length&&(n.value=(null===(l=null===(a=n.value)||void 0===a?void 0:a[0])||void 0===l?void 0:l.children)||[]),u.total=c.totalElements}}))}function g(){return J(this,void 0,void 0,(function*(){if(e.fieldModelModel){const t=yield Object(i["fetchModelData"])([e.fieldModelModel],d.value,u);p=t.content;const o=Object(i["convertModels2FieldSelectionOptions"])(p,e.ttypes,e.isFieldStore,void 0,!1,e.filterMethod);o&&o.length&&(s.value=o[0].children),u.total=t.totalElements}}))}function v(){var t,o,n,a,l,s,d;return J(this,void 0,void 0,(function*(){if(e.valueList&&(null===(t=e.valueList)||void 0===t?void 0:t.length)>0)if(c.value===i["ModelFieldType"].Enum){let t=[];if(null===(o=e.leftJoinField)||void 0===o?void 0:o.options)t=e.leftJoinField.options;else{const o=e.expType===i["ExpressionDefinitionType"].RSQL_CONDITION?e.fieldModelModel:null===(l=null===(a=null===(n=e.contextItems)||void 0===n?void 0:n[0])||void 0===a?void 0:a.models)||void 0===l?void 0:l[0];if(!o)return;const r=yield Object(i["expFetchFieldSimpleInfo"])((null===(s=e.leftJoinField)||void 0===s?void 0:s.model)||o,null===(d=e.leftJoinField)||void 0===d?void 0:d.name);t=r.options}r.value.push(...t.map(e=>({label:Object(i["translateValueByKey"])(e.displayName),displayName:Object(i["translateValueByKey"])(e.displayName),name:e.name,value:e.value,ttype:i["ModelFieldType"].Enum})))}else c.value===i["ModelFieldType"].Boolean&&r.value.push({label:Object(i["translateValueByKey"])("是"),displayName:Object(i["translateValueByKey"])("是"),name:"true",value:"true",ttype:i["ModelFieldType"].Boolean},{label:Object(i["translateValueByKey"])("否"),displayName:Object(i["translateValueByKey"])("否"),name:"false",value:"false",ttype:i["ModelFieldType"].Boolean})}))}const m=t=>J(void 0,void 0,void 0,(function*(){o.value=t,r.value=[],n.value=[],s.value=[],t===i["VariableItemType"].FIELD?(s.value&&s.value.length||(yield g()),l.value=s.value):t===i["VariableItemType"].OPTION?(yield v(),l.value=r.value):t===i["VariableItemType"].VARIABLE?(n.value&&n.value.length||(yield b()),l.value=n.value):t===i["VariableItemType"].SESSION&&(l.value=[...Object(i["buildSessionContextOptions"])(e.sessionContextOptions)])}));return{changeVariableType:m,fieldOptions:s,fetchModelField:g,fetchModelDataInner:b,pagination:u,keyword:d}};var rs=Object(a["defineComponent"])({name:"UiUrlVariable",components:{ControlTag:i["ControlTag"],OioDatePicker:r["OioDatePicker"],OioDateTimePicker:r["OioDateTimePicker"],OioYearPicker:r["OioYearPicker"],OioTimePicker:r["OioTimePicker"]},props:{data:{type:Object,default:()=>({})},index:{type:Number,default:0},readonly:{type:Boolean,default:!1},showTypeSelect:{type:Boolean,default:!1},allowString:{type:Boolean,default:!0},leftJoinTtype:{type:String},leftJoinField:{type:Object},variableMaxStringLength:{type:Number,default:i["VARIABLE_MAX_STRING_LENGTH"]},onRef:{type:Function},onChange:{type:Function},onFocusVariableItemString:{type:Function},onBlurVariableItemString:{type:Function},isOnlyOneInput:{type:Boolean,default:!1},innerPlaceholder:String},emits:["close"],setup(e,{emit:t}){const o=()=>{t("close",e.index)},n=Object(a["ref"])(!1),r=Object(a["computed"])(()=>!n.value||e.readonly?e.data.value:n.value),l=(t,o)=>{var i;null===(i=e.onRef)||void 0===i||i.call(e,t,o)},s=(t,o)=>{var i;null===(i=e.onChange)||void 0===i||i.call(e,t,o)},c=(t,o)=>{var i;n.value=!0,null===(i=e.onFocusVariableItemString)||void 0===i||i.call(e,t,o)},d=t=>{var o;null===(o=e.onBlurVariableItemString)||void 0===o||o.call(e,t),n.value=!1};return{onCloseTagItem:o,createInputPatternByTtype:i["createInputPatternByTtype"],isDateTtype:i["isDateTtype"],onRefEvent:l,onChangeEvent:s,onFocusVariableItemStringEvent:c,onBlurVariableItemStringEvent:d,showUpdate:r}}});const as={key:0,type:"text",class:"variable-item-input ant-input"};function ls(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-date-time-picker"),s=Object(a["resolveComponent"])("oio-date-picker"),c=Object(a["resolveComponent"])("oio-time-picker"),d=Object(a["resolveComponent"])("oio-year-picker"),u=Object(a["resolveComponent"])("control-tag");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,["string"===e.data.type&&e.allowString?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(["variable-item variable-string",["variable-item-"+e.index,e.data.value?"":"variable-string-empty"]])},[e.readonly?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",as,Object(a["toDisplayString"])(e.data.value),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[e.isDateTtype(e.leftJoinTtype)?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createCommentVNode"])(" TODO 日期类型 "),"DATETIME"==e.leftJoinTtype?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,value:e.data.value,"onUpdate:value":t[6]||(t[6]=t=>e.data.value=t),"allow-clear":!1,"dropdown-class-name":"expression-date-picker-popup"},null,8,["value"])):"DATE"==e.leftJoinTtype?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:1,value:e.data.value,"onUpdate:value":t[7]||(t[7]=t=>e.data.value=t),"allow-clear":!1,"dropdown-class-name":"expression-date-picker-popup"},null,8,["value"])):"TIME"==e.leftJoinTtype?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:2,value:e.data.value,"onUpdate:value":t[8]||(t[8]=t=>e.data.value=t),"allow-clear":!1,"dropdown-class-name":"expression-date-picker-popup"},null,8,["value"])):"YEAR"==e.leftJoinTtype?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:3,value:e.data.value,"onUpdate:value":t[9]||(t[9]=t=>e.data.value=t),"allow-clear":!1,"dropdown-class-name":"expression-date-picker-popup"},null,8,["value"])):Object(a["createCommentVNode"])("v-if",!0)],64)):Object(a["withMemo"])([e.showUpdate],()=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,contenteditable:"true",type:"text",pattern:e.createInputPatternByTtype(e.leftJoinTtype),maxlength:e.variableMaxStringLength,placeholder:e.showTypeSelect||e.isOnlyOneInput?e.innerPlaceholder:"",ref:t=>e.onRefEvent(t,e.index),class:"variable-item-input ant-input",onInput:t[0]||(t[0]=t=>e.onChangeEvent(e.index,t)),onKeydown:t[1]||(t[1]=t=>e.onFocusVariableItemStringEvent(e.index,t)),onClick:t[2]||(t[2]=t=>e.onFocusVariableItemStringEvent(e.index,t)),onFocus:t[3]||(t[3]=t=>e.onFocusVariableItemStringEvent(e.index,t)),onBlur:t[4]||(t[4]=t=>e.onBlurVariableItemStringEvent(e.index))},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.data.value),1)],40,["pattern","maxlength","placeholder"])),t,5)],64))],2)):Object(a["createCommentVNode"])("v-if",!0),["variable","option","field","session"].includes(e.data.type)?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:1,class:Object(a["normalizeClass"])(["variable-item url-exp variable-tag","variable-item-"+e.index]),title:e.data.displayName,desc:e.data.subTitle,closable:!e.readonly&&!e.showTypeSelect,onClose:e.onCloseTagItem},null,8,["class","title","desc","closable","onClose"])):Object(a["createCommentVNode"])("v-if",!0)],64)}rs.render=ls,rs.__file="src/view/page-designer/component/expression/url/UiUrlVariable.vue";var ss=Object(a["defineComponent"])({name:"UiUrlVariableList",components:{UiUrlVariable:rs},props:{valueList:{type:Array,required:!0},onChangeVariableItemString:{type:Function},onFocusVariableItemString:{type:Function},onClickVariableItemString:{type:Function},isVariableMode:{type:Boolean,default:!1},showVariableType:{type:Boolean,default:!0},placeholder:String,onClick:{type:Function},showTypeSelect:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){const o=Object(a["ref"])(null),n={},r=e=>{o.value=e},l=Object(a["computed"])(()=>e.valueList.filter(e=>e.type===i["VariableItemType"].VARIABLE).length),s={index:null,selectionStart:void 0},c=(e,t)=>{setTimeout(()=>{const t=document.getSelection();s.index=e,s.selectionStart=null===t||void 0===t?void 0:t.anchorOffset},200)},d=()=>s,u=(e,t)=>{e&&(n[t]=e)},p=Object(a["ref"])(e.showVariableType?i["VariableItemType"].VARIABLE:i["VariableItemType"].FIELD),b=Object(a["computed"])(()=>{if(p.value){const e=i["VariableItemTypeDisplayName"][p.value.toString().toUpperCase()];if(e){const t=p.value===i["VariableItemType"].STRING?"输入":"选择";return Object(i["translateValueByKey"])(`请${t}${e}`)}}return e.placeholder}),g=()=>{const t=e.valueList.length-1,o=n[t];o&&(null===o||void 0===o||o.focus())},v=e=>{t("close",e)};return{variableItemNum:l,setVariableItemInputRef:u,onFocusVariableItemString:c,innerPlaceholder:b,getInputSelectionInfo:d,setListRef:r,onCloseVariableItem:v,onSelectEmpty:g}}});const cs={key:0,class:"variable-item variable-string placeholder"};function ds(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("ui-url-variable");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{ref:t=>e.setListRef(t),class:"variable-item-list-wrapper"},[Object(a["createElementVNode"])("div",{class:"ant-input-inner",onClick:t[0]||(t[0]=t=>{e.onClick&&e.onClick(t)})},[!e.isVariableMode||e.variableItemNum||e.valueList[0].value?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",cs,Object(a["toDisplayString"])(e.innerPlaceholder),1)),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.valueList,(t,o)=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.varCode,data:t,index:o,onRef:e.setVariableItemInputRef,onFocusVariableItemString:e.onFocusVariableItemString,onChange:e.onChangeVariableItemString,readonly:e.readonly,onClose:e.onCloseVariableItem},null,8,["data","index","onRef","onFocusVariableItemString","onChange","readonly","onClose"]))),128))]),Object(a["createElementVNode"])("div",{class:"select-box",onClick:t[1]||(t[1]=(...t)=>e.onSelectEmpty&&e.onSelectEmpty(...t))})],512)}function us(e){return e.filter(e=>e.type===i["VariableItemType"].VARIABLE).map(e=>e.value.includes(i["VARIABLE_SEPARATE"])?e.value.split(i["VARIABLE_SEPARATE"])[1]:e.value)}ss.render=ds,ss.__file="src/view/page-designer/component/expression/url/UiUrlVariableList.vue";var ps=Object(a["defineComponent"])({name:"UiUrlInputForm",emits:["click"],components:{ExpressionDesignerCascader:i["Cascader"],OioInput:r["OioInput"],UiUrlVariableList:ss},props:{pagination:Object,onPaginationChange:Function,duplicateSelectField:Boolean,canSelectedComplexField:{type:Boolean,default:!1},isFieldMode:Boolean,fetchChildren:Function,changeOnSelect:{type:Boolean,default:!1},valueList:{type:Array},blur:Function,options:Array,maxVariableNum:{type:Number,default:1/0},minVariableNum:{type:Number,default:0},showVariableType:{type:Boolean,default:!0},showTypeSelect:{type:Boolean,default:!1},leftJoinTtype:{type:String},leftJoinField:{type:Object},onKeywordChange:Function,placeholder:String,expType:{type:String},contextItems:Array,ttypes:Array,useContextName:Boolean,variableMaxStringLength:{type:Number,default:i["VARIABLE_MAX_STRING_LENGTH"]},isSimpleMode:Boolean,onChangeValueList:Function},setup(e,t){const o=Object(a["ref"])(!1),n=Object(a["ref"])(e.showVariableType?i["VariableItemType"].VARIABLE:i["VariableItemType"].FIELD),l=Object(a["ref"])(null),s=e=>{l.value=e},c=Object(a["computed"])(()=>{var t;return(null===(t=e.leftJoinField)||void 0===t?void 0:t.ttype)||e.leftJoinTtype}),{changeVariableType:d,fetchModelDataInner:p,fetchModelField:b,pagination:g,keyword:v}=ns(e),m=Object(a["ref"])(Object(i["createDefaultVariableItemList"])()),y=Object(a["computed"])({get(){return m.value},set(e){const t=Object(i["isDefaultBlankStringVariableItemList"])(m.value);t&&Object(i["isDefaultBlankStringVariableItemList"])(e)||(m.value=e)}});let h=!1;Object(a["watch"])(()=>e.valueList,t=>{if(y.value=e.valueList||[],e.showTypeSelect){const e=y.value.find(e=>e.type===i["VariableItemType"].VARIABLE);if(e)n.value=i["VariableItemType"].VARIABLE;else{const e=y.value.find(e=>e.type===i["VariableItemType"].FIELD);if(e)n.value=i["VariableItemType"].FIELD;else{const e=y.value.find(e=>e.type===i["VariableItemType"].SESSION);e?n.value=i["VariableItemType"].SESSION:[i["ModelFieldType"].Enum,i["ModelFieldType"].Boolean].includes(c.value)?n.value=i["VariableItemType"].OPTION:n.value=i["VariableItemType"].STRING}}h=!0}},{immediate:!0,deep:!0});const f=()=>{g.current=1,n.value===i["VariableItemType"].VARIABLE?p():n.value===i["VariableItemType"].FIELD&&b()},O=Object(a["ref"])(""),w=Object(a["computed"])(()=>{const t=e.duplicateSelectField?[]:us(y.value),o=(e.options||[]).filter(e=>!t.includes(e.name));return o.forEach(e=>{e.selected=!1}),O.value?o.filter(e=>e.displayName.includes(O.value)):o}),j=Object(a["computed"])(()=>{if(n.value){const e=i["VariableItemTypeDisplayName"][n.value.toString().toUpperCase()];if(e){const t=n.value===i["VariableItemType"].STRING?"输入":"选择";return Object(i["translateValueByKey"])(`请${t}${e}`)}}return e.placeholder}),k=()=>y.value&&1===y.value.length&&y.value[0].type===i["VariableItemType"].STRING,C=Object(a["computed"])(()=>k());function D(){return e.expType===i["ExpressionDefinitionType"].OPERATION&&c.value&&[i["ModelFieldType"].Enum,i["ModelFieldType"].Boolean].includes(c.value)}const T=Object(a["computed"])(()=>e.showTypeSelect&&[i["VariableItemType"].VARIABLE,i["VariableItemType"].OPTION,i["VariableItemType"].FIELD,i["VariableItemType"].SESSION].includes(n.value)||D()),$=t=>{var a;if(!T.value&&S.value>=e.maxVariableNum)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),`${Object(i["translateValueByKey"])("最多只能选")}${e.maxVariableNum}${Object(i["translateValueByKey"])("个变量")}`);o.value=!1;const s=Object(i["createVariableItemBySelectedOptions"])(e.options,t,Object(i["createVariableContextItem"])(t,e.contextItems),n.value,e.ttypes,e.useContextName);if(s){if(T.value)y.value=[s];else{if(y.value.length>0){const e=y.value[y.value.length-1];e&&e.type===i["VariableItemType"].STRING&&e.value}const e=l.value.getInputSelectionInfo();if(e&&!Object(u["a"])(e.index)){const t=y.value[e.index],o=t.value;t.value=o.substring(0,e.selectionStart);const n=o.substring(e.selectionStart);y.value.splice(e.index+1,0,s,{type:i["VariableItemType"].STRING,value:n})}else y.value.push(s,{type:i["VariableItemType"].STRING,value:""})}null===(a=e.onChangeValueList)||void 0===a||a.call(e,y.value)}},E=e=>{setTimeout(()=>{$(e)},300)},S=Object(a["computed"])(()=>y.value.filter(e=>e.type===i["VariableItemType"].VARIABLE).length),N=t=>{if(D()&&("input"===t?n.value=i["VariableItemType"].OPTION:"suffix"===t&&(n.value=i["VariableItemType"].VARIABLE)),d(n.value),o.value)o.value=!1;else{if(S.value>=e.maxVariableNum&&(1!=e.minVariableNum||1!=e.maxVariableNum))return;o.value=!0}},V=(t,o)=>{var n;const r=y.value[t];if(r.value=o.target.innerText,Object(i["isNumberTtype"])(c.value)){const e=Object(i["createInputPatternByTtype"])(c.value),t=r.value.match(new RegExp(e,"g")),o=t?t.join(""):"";o!=r.value&&(r.value=o)}r.value.length>e.variableMaxStringLength&&(y.value[t].value=r.value.substring(0,e.variableMaxStringLength)),null===(n=e.onChangeValueList)||void 0===n||n.call(e,y.value)},x=t=>{let o=setTimeout(()=>J(this,void 0,void 0,(function*(){var n;const r=[...y.value];Object(i["removeVariableItemByIndex"])(r,t,e.variableMaxStringLength),null===(n=e.onChangeValueList)||void 0===n||n.call(e,r),yield Object(a["nextTick"])(),clearTimeout(o),o=null})),300)};return{isShowDropdown:o,availableOptions:w,onSelectVariable:E,translateValueByKey:i["translateValueByKey"],onAddVariableItem:N,searchKeywords:v,fieldKeywords:O,onSearchKeywordsChange:f,isOnlyOneInput:C,onChangeVariableItemString:V,isVariableMode:T,variableItemNum:S,innerPlaceholder:j,changeVariableType:d,variableItemList:y,storeListRef:s,onCloseTagItem:x}}});const bs={class:"ui-url-input-from-wrapper variable-input-form-field"},gs={class:"ui-url-input-from__header"},vs=Object(a["createElementVNode"])("span",{class:"ui-url-input-from__header__title"}," URL ",-1),ms=Object(a["createElementVNode"])("a",null,"选择变量",-1),ys=[ms],hs={ref:"dropdownRef"},fs={class:"variable-input-form-field-dropdown-header"},Os={class:"ui-url-input-from__content ant-input-group"};function ws(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input"),s=Object(a["resolveComponent"])("expression-designer-cascader"),c=Object(a["resolveComponent"])("a-popover"),d=Object(a["resolveComponent"])("ui-url-variable-list");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",bs,[Object(a["createElementVNode"])("div",gs,[vs,Object(a["createVNode"])(c,{"overlay-class-name":"expression-common-popover",placement:"bottomLeft",trigger:"click",visible:e.isShowDropdown},{content:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",hs,[Object(a["createVNode"])(s,{canSelectedComplexField:e.canSelectedComplexField,class:Object(a["normalizeClass"])({"field-mode-dropdown":e.isFieldMode}),options:e.availableOptions,"load-data":e.fetchChildren,pagination:e.pagination,"change-on-select":e.changeOnSelect,"on-pagination-change":e.onPaginationChange,onChange:e.onSelectVariable},Object(a["createSlots"])({_:2},[e.isFieldMode?{name:"header",fn:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",fs,[Object(a["createVNode"])(l,{class:"selection-search-input",size:"small",value:e.fieldKeywords,"onUpdate:value":t[1]||(t[1]=t=>e.fieldKeywords=t),"allow-clear":"",placeholder:e.translateValueByKey("输入名称搜索")},null,8,["value","placeholder"])])]),key:"0"}:e.isSimpleMode?void 0:{name:"header",fn:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"variable-input-form-field-dropdown-header"},[Object(a["createVNode"])(l,{class:"selection-search-input",size:"small",value:e.searchKeywords,"onUpdate:value":t[2]||(t[2]=t=>e.searchKeywords=t),"allow-clear":"",placeholder:e.translateValueByKey("输入名称搜索"),onChange:e.onSearchKeywordsChange},null,8,["value","placeholder","onChange"])])]),key:"1"}]),1032,["canSelectedComplexField","class","options","load-data","pagination","change-on-select","on-pagination-change","onChange"])],512)]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{class:"ui-url-input-from__heder__btn",onClick:t[0]||(t[0]=t=>e.onAddVariableItem("suffix"))},ys)]),_:1},8,["visible"])]),Object(a["createElementVNode"])("div",Os,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["ui-url-input-from__content__textarea ant-input-affix-wrapper",{"only-one-input":e.isOnlyOneInput}])},[Object(a["createVNode"])(d,{ref:e.storeListRef,valueList:e.variableItemList,onClose:e.onCloseTagItem,onChangeVariableItemString:e.onChangeVariableItemString},null,8,["valueList","onClose","onChangeVariableItemString"])],2)])])}function js(){return["update:value","update:valueList","change","changeList","blur","changeVariableType"]}ps.render=ws,ps.__file="src/view/page-designer/component/expression/url/UiUrlInputForm.vue";var ks=Object(a["defineComponent"])({name:"UiUrl",emits:js(),components:{OioInput:r["OioInput"],APopover:V["a"],OioModal:r["OioModal"],OioCloseIcon:r["OioCloseIcon"],OioButton:r["OioButton"],UiUrlInputForm:ps,UiUrlVariableList:ss},props:{pagination:Object,blur:Function,showVariableType:{type:Boolean,default:!0},variableMaxStringLength:{type:Number,default:i["VARIABLE_MAX_STRING_LENGTH"]},maxVariableNum:{type:Number,default:3},minVariableNum:{type:Number,default:0},placeholder:{type:String,default:"请配置"},title:{type:String},valueList:{type:Array,default:()=>[]},useContextName:Boolean,fetchChildren:Function,contextItems:Array,options:Array,quoteType:{type:String},onChangeValueList:Function},setup(e,t){const o=Object(a["computed"])(()=>{var t;return null===(t=e.valueList)||void 0===t?void 0:t.some(e=>e.type!==i["VariableItemType"].STRING||e.value)}),n=Object(a["ref"])(!1),r=Object(a["ref"])();Object(a["watch"])(()=>e.valueList,e=>{r.value=Object(i["deepClone"])(e)},{deep:!0,immediate:!0});const l=()=>{var o,a;const l=Object(i["deepClone"])(r.value),s=Object(i["createValueVariableListStr"])(l,{variableContextItems:e.contextItems,quoteType:e.quoteType});t.emit("update:value",s),t.emit("change",s),t.emit("update:valueList",l),t.emit("changeList",l),null===(o=e.onChangeValueList)||void 0===o||o.call(e,l),null===(a=e.blur)||void 0===a||a.call(e),n.value=!1},s=()=>{r.value=Object(i["deepClone"])(e.valueList),n.value=!1},c=()=>{n.value=!n.value},d=e=>{r.value=e};return{expressionLabel:o,expressionModalStatus:n,pagination:e.pagination,onChangeList:d,handleOk:l,handleCancel:s,onSwitchExpressionDialog:c,cacheValue:r}}});const Cs={class:"ant-input-group-wrapper ant-input-control oio-input ui-url-expression-input-control"},Ds={key:0,class:"ant-input placeholder"},Ts={key:1,class:"ant-input ui-url-expression-input-readonly"},$s=Object(a["createElementVNode"])("span",{class:"ant-input-group-addon"},[Object(a["createElementVNode"])("i",{class:"d-iconfont oinone-variable-x"})],-1);function Es(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("ui-url-variable-list"),s=Object(a["resolveComponent"])("oio-close-icon"),c=Object(a["resolveComponent"])("ui-url-input-form"),d=Object(a["resolveComponent"])("oio-button"),u=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("span",Cs,[Object(a["createElementVNode"])("span",{class:"ant-input-wrapper ant-input-group",onClick:t[0]||(t[0]=(...t)=>e.onSwitchExpressionDialog&&e.onSwitchExpressionDialog(...t))},[e.expressionLabel?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ts,[Object(a["createVNode"])(l,{valueList:e.valueList,readonly:""},null,8,["valueList"])])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ds,Object(a["toDisplayString"])(e.placeholder),1)),$s])]),Object(a["createVNode"])(u,{maskClosable:"",class:"oio-modal",centered:"",visible:e.expressionModalStatus,width:520,title:e.$translate(e.title),onCancel:e.handleCancel},{closeIcon:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{onClick:e.handleCancel},null,8,["onClick"])]),footer:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"footer",{},()=>[Object(a["createVNode"])(d,{class:"cancel-btn",onClick:e.handleCancel},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("取消")]),_:1},8,["onClick"]),Object(a["createVNode"])(d,{class:"ok-btn",type:"primary",onClick:e.handleOk},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("确定")]),_:1},8,["onClick"])])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{pagination:e.pagination,valueList:e.cacheValue,fetchChildren:e.fetchChildren,contextItems:e.contextItems,options:e.options,onChangeValueList:e.onChangeList,useContextName:e.useContextName,isSimpleMode:"",isFieldMode:""},null,8,["pagination","valueList","fetchChildren","contextItems","options","onChangeValueList","useContextName"])]),_:3},8,["visible","title","onCancel"])],64)}ks.render=Es,ks.__file="src/view/page-designer/component/expression/url/UiUrl.vue";const Ss=["M2O","O2M","M2M","O2O","HTML","MAP","OBJ","VOID"];function Ns(e){return!!["null"].includes(e)||!![i["ExpressionKeyword"].activeRecord,i["ExpressionKeyword"].rootRecord,i["ExpressionKeyword"].openerRecord].some(t=>e.includes(t))}function Vs(e,t,o,n,r){if(!o)return"";const a=o.filter(e=>!(e.type===i["VariableItemType"].STRING&&!e.value)).map(a=>{if(a.type===i["VariableItemType"].STRING){if(a.value||1===o.length){if(n.leftJoinTtype){if(Object(i["isNumberTtype"])(n.leftJoinTtype))return a.value;if(e==i["ExpressionSeniorMode"].VALUE&&n.type===i["ExpressionDefinitionType"].OPERATION&&n.leftJoinTtype===i["ModelFieldType"].Boolean)return a.value;if(n.leftJoinTtype===i["ModelFieldType"].OBJ&&Ns(a.value))return a.value}if((!t||Object(i["isStringTtype"])(t.ttype)||Object(i["isDateTtype"])(t.ttype))&&e!=i["ExpressionSeniorMode"].DISPLAY_NAME){let e=xs(a.value,n.quoteType);if([i["ExpressionDefinitionType"].BOOLEAN_CONDITION,i["ExpressionDefinitionType"].OPERATION].includes(n.type)&&t&&Object(i["isDateTtype"])(t.ttype)&&!n.isFrontend){const o=i["JavaDateTimeFormatEnum"][t.ttype];e=`${i["STR_TO_DATE_FUN"]}(${e}, '${o}')`}return e}return e==i["ExpressionSeniorMode"].VALUE&&n.type===i["ExpressionDefinitionType"].BOOLEAN_CONDITION&&t&&Object(i["isNumberTtype"])(t.ttype)&&n.numberCustomMethod&&a.type===i["VariableItemType"].STRING?n.numberCustomMethod(a.value,t.ttype):a.value}return""}return r(a)});return n.isBetweenInBrackets&&a.length>1?`(${a.join("")})`:a.join("")}function xs(e,t){return""+e}function Is(e,t,o){return Vs(i["ExpressionSeniorMode"].VALUE,o,e,t,e=>{if([i["ExpressionDefinitionType"].BOOLEAN_CONDITION].includes(t.type)&&o&&o.ttype===i["ModelFieldType"].Enum&&e.type===i["VariableItemType"].OPTION)return xs(e.value,t.quoteType);if(t.type===i["ExpressionDefinitionType"].OPERATION&&e.type===i["VariableItemType"].VARIABLE&&t.variableCustomMethod){const o=t.variableCustomMethod(e.value);return`\${${o}}`}const n=t.isRsqlLeft||e.type===i["VariableItemType"].FIELD?e.apiName:e.value;return`\${${n}}`})}let Ms=class extends i["VariableInputFormFieldWidget"]{constructor(){super(...arguments),this.labelEntity={},this.minVariableNum=0,this.filterMethod=e=>!(e.multi||i["SystemSource"].RELATION===e.systemSource||Ss.includes(e.ttype))}needSubscribe(){return!0}get useContextName(){return!0}initialize(e){return super.initialize(e),this.setComponent(ks),this}validator(){const e=Object.create(null,{validator:{get:()=>super.validator}});var t;return J(this,void 0,void 0,(function*(){const o=yield e.validator.call(this);if(!Object(i["isValidatorSuccess"])(o))return o;if(this.invisible)return this.validatorSuccess();if(this.required){if(this.formData.computeFunction)return this.validatorSuccess();if(!(null===(t=this.formData)||void 0===t?void 0:t.url))return this.validatorError()}return this.validatorSuccess()}))}pushModelLabel(e){this.modelLabel.subject.next({index:this.formData._index,value:e})}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){e.mounted.call(this),yield this.queryFieldOrXmlExpression()}))}get contextItems(){var e,t,o,n;const{contextItems:r}=this.getDsl();return Object(s["a"])(this.labelEntity)&&this.needSubscribe()&&this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=`${t.designKey}#attr_name:${this.field.name}`,this.labelEntity=t}}))),Object(u["a"])(null===(e=this.labelEntity)||void 0===e?void 0:e.designReferenceModel)?[]:[...Object(i["createContextItems"])(r,null===(t=this.formData)||void 0===t?void 0:t._model,(null===(o=this.labelEntity)||void 0===o?void 0:o.designReferenceModel)?null===(n=this.labelEntity)||void 0===n?void 0:n.designReferenceModel:"")]}queryFieldOrXmlExpression(){var e,t;return J(this,void 0,void 0,(function*(){if(null===(e=this.labelEntity)||void 0===e?void 0:e.designModel){const e=yield this.queryOneExpression(this.labelEntity.designModel,this.labelEntity.designField,this.labelEntity.designKey,!1,!0,null===(t=this.labelEntity)||void 0===t?void 0:t.version);e||(yield this.handleModelLabelExp())}else this.setVariableItemList(Object(i["createDefaultVariableItemList"])());this.isInitData||(this.isInitData=!0,yield this.executeValidator()),this.pushSearchFields(this.getVariableItemList())}))}queryOneExpression(e,t,o,n,r,a){return J(this,void 0,void 0,(function*(){let l;if(l=r?yield Uo(e,t,o,a):yield Ko(o),l){Object(i["createExpressionItemByExpressionDefinition"])(l,this.createExpressionOption());let e=l.itemList;e=e&&e.length?e:[Object(i["createDefaultExpressionItem"])(i["ExpressionDefinitionType"].OPERATION)];const t=e[0].valueList;let o=!0;if(t&&t.length)for(const r of t)if(!Object(i["isEmptyValue"])(r.apiName)){if(o=!1,n){let e=JSON.parse(JSON.stringify(t));const o=[];e=e.filter(e=>e.type===i["VariableItemType"].VARIABLE&&!Object(i["isEmptyValue"])(e.apiName)),e.forEach(e=>{o.push(e.apiName)}),this.pushModelLabel(o),this.setVariableItemList(t)}else this.setVariableItemList(t);break}return!o}return!1}))}handleModelLabelExp(){var e,t;return J(this,void 0,void 0,(function*(){const o=yield Object(n["ic"])(null===(e=this.labelEntity)||void 0===e?void 0:e.designModel,null===(t=this.labelEntity)||void 0===t?void 0:t.designField);if(o&&o.id){const e=yield this.queryOneExpression("designer.DesignerModelDefinition","url",this.labelEntity.designReferenceModel,!0,!1);e||this.setVariableItemList(Object(i["createDefaultVariableItemList"])())}}))}watchUrlLabel(){return J(this,void 0,void 0,(function*(){yield this.submit(new i["SubmitValue"]({}))}))}onChangeValueList(e){if(this.setVariableItemList(e),this.change(Is(e,{variableContextItems:this.contextItems,isBetweenInBrackets:!1,quoteType:this.quoteType,useContextName:this.useContextName})),Object(s["a"])(this.getVariableItemList()))this.pushSearchFields([]);else{let e=JSON.parse(JSON.stringify(this.getVariableItemList()));e=e.filter(e=>e.type===i["VariableItemType"].VARIABLE),e.forEach(e=>{e.selected=e.store}),this.pushSearchFields(e)}this.blur()}pushSearchFields(e){this.designerSearchFields.subject.next({index:this.formData._index,value:e})}createExpressionOption(){return{type:i["ExpressionDefinitionType"].OPERATION,ttypes:this.ttypes,variableContextItems:this.contextItems,isBetweenInBrackets:!1,quoteType:i["IExpressionQuoteType"].SINGLE}}submit(e){return J(this,void 0,void 0,(function*(){return this.saveExp("初始化表达式"),i["SubmitHandler"].DEFAULT(this.field,this.itemName,e,this.value)}))}get queryExpressionParam(){var e;return{model:zo,field:Go,key:null===(e=this.labelEntity)||void 0===e?void 0:e.designKey}}saveExp(e){var t,o;return J(this,void 0,void 0,(function*(){if((null===(t=this.labelEntity)||void 0===t?void 0:t.designKey)&&(null===(o=this.labelEntity)||void 0===o?void 0:o.designModel)){const e=[Object.assign(Object.assign({},Object(i["createDefaultExpressionItem"])(i["ExpressionDefinitionType"].OPERATION)),{valueList:this.getVariableItemList()})],t=Object(i["createExpressionDefinitionByExpressionItem"])(this.queryExpressionParam,e,this.createExpressionOption());yield Object(i["createExpressionDefinition"])(t)}}))}};Y([i["Widget"].SubContext(n["Yb"]),Q("design:type",Object)],Ms.prototype,"designerSearchFields",void 0),Y([i["Widget"].SubContext(n["Qc"],{}),Q("design:type",Object)],Ms.prototype,"modelLabel",void 0),Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],Ms.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Ms.prototype,"labelEntity",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Ms.prototype,"minVariableNum",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ms.prototype,"useContextName",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Ms.prototype,"contextItems",null),Y([i["Widget"].Watch("formData.url"),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Ms.prototype,"watchUrlLabel",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Array]),Q("design:returntype",void 0)],Ms.prototype,"onChangeValueList",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Ms.prototype,"queryExpressionParam",null),Ms=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiUrlExpression"}))],Ms);const As={filterValue:{type:String},widgetGroup:{type:Object},isSys:{type:Boolean,default:!1},onFilterValueChange:{type:Function},searchValue:{type:String},onSearchValueChange:{type:Function},onSearch:{type:Function},onChangeWidgetGroup:{type:Function},onChangeComponentType:{type:Function}};var Fs=Object(a["defineComponent"])({components:{OioIcon:r["OioIcon"],OioInputSearch:r["OioInputSearch"],OioManageGroup:i["OioManageGroup"],OioEmptyData:r["OioEmptyData"],OioSpin:r["OioSpin"]},props:{placeholder:{type:String,default:"搜索"},value:{type:String},isShowed:{type:Boolean}},emits:["update:value"],setup(e,t){const o=Object(a["ref"])(""),n=Object(a["ref"])(!1),r=e=>{o.value=e,m(e)},l=e=>{t.emit("update:value",e)},s=Object(a["ref"])(null),c=Object(p["a"])(()=>{const e=s.value;if(e){const{scrollTop:t,clientHeight:o,scrollHeight:i}=e;t+o>=i-10&&d.value.current<b.value&&(d.value.current++,h(!0))}},400),d=Object(a["ref"])({current:1,pageSize:88}),u=Object(a["ref"])([]),b=Object(a["ref"])(0),g=Object(a["ref"])(void 0),v=Object(a["ref"])([]),m=Object(p["a"])((e,t)=>J(this,void 0,void 0,(function*(){d.value.current=1,yield h(t)})),400),y=e=>J(this,void 0,void 0,(function*(){g.value=e,d.value.current=1,yield h()})),h=e=>J(this,void 0,void 0,(function*(){var t,r,a,l;n.value=!0;let s="";s=o.value&&"-1"!==(null===(t=g.value)||void 0===t?void 0:t.id)?`(1==1) and ((((1==1) and (displayName=like='${o.value}')) and (groupId=='${null===(r=g.value)||void 0===r?void 0:r.id}')) and (show==true))`:o.value?`(1==1) and (((1==1) and (displayName=like='${o.value}')) and (show==true))`:"-1"!==(null===(a=g.value)||void 0===a?void 0:a.id)?`(1==1) and (((1==1) and (groupId=='${null===(l=g.value)||void 0===l?void 0:l.id}')) and (show==true))`:"(1==1) and ((1==1) and (show==true))";const c=yield Object(i["queryIconsWithCondition"])({model:"resource",pagination:{current:d.value.current,pageSize:d.value.pageSize},condition:s});return n.value=!1,e?(u.value.push(...c.content),b.value=c.totalPages):(u.value=c.content,b.value=c.totalPages),c})),f=()=>J(this,void 0,void 0,(function*(){const e=yield Object(i["fetchGroupWithoutCount"])("resource");v.value.push(...e),v.value.unshift({id:"-1",name:"全部"})}));return Object(a["onBeforeMount"])(()=>J(this,void 0,void 0,(function*(){yield f(),yield y({id:"-1",name:"全部"})}))),{loading:n,searchValue:o,onSearch:m,onUpdateValue:r,chooseIcon:l,icons:u,currentGroup:g,groupList:v,onChangeWidgetGroup:y,scrollWrapperRef:s,handleScroll:c}}});const Ls={class:"ui-icon-select-group"},Rs=["onClick"],Bs={key:1};function _s(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("oio-input-search"),c=Object(a["resolveComponent"])("oio-manage-group"),d=Object(a["resolveComponent"])("OioEmptyData"),u=Object(a["resolveComponent"])("OioSpin");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ls,[Object(a["createVNode"])(s,{placeholder:e.$translate(e.placeholder),value:e.searchValue,"onUpdate:value":e.onUpdateValue,onSearch:e.onSearch},{prefix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{icon:"oinone-sousuo"})]),_:1},8,["placeholder","value","onUpdate:value","onSearch"]),Object(a["createVNode"])(c,{"widget-group":{},"current-group":e.currentGroup,"group-list":e.groupList,onChangeWidgetGroup:e.onChangeWidgetGroup,showOptButtons:!1,isShowed:e.isShowed,showDetail:!1},null,8,["current-group","group-list","onChangeWidgetGroup","isShowed"]),Object(a["createVNode"])(u,{loading:e.loading},{default:Object(a["withCtx"])(()=>[e.icons&&e.icons.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"ui-icons-container",ref:"scrollWrapperRef",onScroll:t[0]||(t[0]=(...t)=>e.handleScroll&&e.handleScroll(...t))},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.icons,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{class:"ui-icon-prefix",key:t.id,onClick:o=>e.chooseIcon(t)},[Object(a["createVNode"])(l,{icon:t.fullFontClass,color:"var(--oio-text-color-secondary)",size:"20"},null,8,["icon"])],8,Rs))),128))],544)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Bs,[Object(a["createVNode"])(d)]))]),_:1},8,["loading"])])}Fs.render=_s,Fs.__file="src/view/page-designer/component/select/icon-select/UiIconSelectWithGroup.vue";const Ws={mounted(e,t){function o(o){if(e.contains(o.target))return!1;t.value&&"function"===typeof t.value&&t.value(o)}e.__click_outside__=o,document.addEventListener("click",o)},beforeUnmount(e){document.removeEventListener("click",e.__click_outside__),delete e.__click_outside__}};var Ps=Object(a["defineComponent"])({components:{OioIcon:r["OioIcon"],UiIconSelectWithGroup:Fs,AInput:S["a"]},props:Object.assign(Object.assign({},As),{value:{type:String},change:{type:Function},focus:{type:Function},blur:{type:Function},readonly:{type:Boolean},disabled:{type:Boolean}}),directives:{clickOutside:Ws},setup(e){const t=t=>{var o;u.value=!1,r.value=!1,null===(o=e.blur)||void 0===o||o.call(e)},o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),n=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),r=Object(a["ref"])(!1),l=Object(a["ref"])(e.value?{fullFontClass:e.value,displayName:e.value}:null),s=t=>{var o,i;l.value=t,null===(o=e.change)||void 0===o||o.call(e,t.fullFontClass),u.value=!1,r.value=!1,null===(i=e.blur)||void 0===i||i.call(e)},c=()=>{r.value=!0},d=Object(a["ref"])(!1),u=Object(a["ref"])(!1),p=()=>{u.value=!0,r.value=!0},b=()=>{d.value=!0},g=()=>{d.value=!1},v=()=>{var t,o;l.value=null,null===(t=e.change)||void 0===t||t.call(e,null),null===(o=e.blur)||void 0===o||o.call(e)};return{readonly:o,disabled:n,focus:c,showIconSelect:r,iconValue:l,onUpdateValue:s,vClickOutsideHandle:t,isSelectIconAgain:u,selectIconAgainHandle:p,closeIconVisible:d,showCloseIcon:b,hideCloseIcon:g,clearInput:v}}});const zs={class:"ui-icon-select-info"},Gs=Object(a["createElementVNode"])("svg",{focusable:"false",class:"","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[Object(a["createElementVNode"])("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})],-1),Us=[Gs];function Ks(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-input"),c=Object(a["resolveComponent"])("UiIconSelectWithGroup"),d=Object(a["resolveDirective"])("click-outside");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])([[e.readonly&&"readonly"],"ui-icon-select"])},[e.readonly?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,icon:e.value,color:"var(--oio-text-color)",size:"var(--oio-font-size)"},null,8,["icon"])):(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:1,placeholder:e.value?"":e.$translate("请选择"),value:"",class:"oio-select ui-icon-select-options",readonly:"",onClick:e.focus},{suffix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{icon:"oinone-zhankai2",color:"var(--oio-text-color)",size:"var(--oio-font-size)"})]),_:1},8,["placeholder","onClick"])),e.iconValue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:2,class:"ui-icon-select-value",onMouseover:t[1]||(t[1]=(...t)=>e.showCloseIcon&&e.showCloseIcon(...t)),onMouseleave:t[2]||(t[2]=(...t)=>e.hideCloseIcon&&e.hideCloseIcon(...t)),onClick:t[3]||(t[3]=(...t)=>e.selectIconAgainHandle&&e.selectIconAgainHandle(...t))},[Object(a["createElementVNode"])("div",zs,[Object(a["createVNode"])(l,{icon:e.iconValue.fullFontClass,color:"var(--oio-text-color)",size:"var(--oio-font-size)"},null,8,["icon"]),Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])([e.isSelectIconAgain?"ui-icon-select-info-selectAgain":""])},Object(a["toDisplayString"])(e.iconValue.displayName),3)]),Object(a["createElementVNode"])("span",{role:"img","aria-label":"close-circle",class:Object(a["normalizeClass"])(["anticon anticon-close-circle",[e.closeIconVisible?"show-anticon-close-circle":"hide-anticon-close-circle"]]),onClick:t[0]||(t[0]=(...t)=>e.clearInput&&e.clearInput(...t))},Us,2)],32)):Object(a["createCommentVNode"])("v-if",!0),Object(a["withDirectives"])(Object(a["createVNode"])(c,{class:"ui-icon-select-dropdown","onUpdate:value":e.onUpdateValue,placeholder:e.$translate("根据图标名称、fontClass查询"),isShowed:e.showIconSelect},null,8,["onUpdate:value","placeholder","isShowed"]),[[a["vShow"],e.showIconSelect]])],2)),[[d,e.vClickOutsideHandle]])}Ps.render=Ks,Ps.__file="src/view/page-designer/component/select/icon-select/UiIconSelect.vue";let qs=class extends i["FormFieldWidget"]{initialize(e){return super.initialize(e),this.setComponent(Ps),this}};qs=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiIconSelect"}))],qs);var Hs=Object(a["defineComponent"])({props:["value","change","blur","currentModelFields","limit"],components:{ASelect:f["c"],ASelectOption:f["b"]},setup(e){const t=Object(a["computed"])(()=>e.value&&e.value.length?e.value.map(e=>e.field):[]),o=t=>{let o=t;t.length>e.limit&&(o=t.reverse().slice(0,e.limit));const i=o.map(e=>({field:e}));e.change(i)};return{currentValue:t,onChange:o}}});function Ys(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-select-option"),s=Object(a["resolveComponent"])("a-select");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"get-popup-container":t=>t.parentNode||e.document.body,value:e.currentValue,mode:"multiple","allow-clear":"","show-arrow":"",class:"oio-select ui-icon-select-options",dropdownClassName:"ui-designer-select-global","show-search":"",onBlur:e.blur,onChange:e.onChange},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.currentModelFields,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:e.id,label:e.displayName,value:e.field},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.displayName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["get-popup-container","value","onBlur","onChange"])}Hs.render=Ys,Hs.__file="src/view/page-designer/component/select/model-field-select/UiModelFieldSelect.vue";let Qs=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.currentModelFields=[]}initialize(e){return super.initialize(e),this.setComponent(Hs),this}get filterTtype(){const e=this.getDsl().filterTtype||"";return e.split(",")}get limit(){return this.getDsl().limit||2}mounted(){this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){let t=Object(i["deepClone"])(e);const o=t.designModelDefinition||{},n=o.modelFields||[];let r=n;this.filterTtype.forEach(e=>{r=n.filter(t=>t.ttype===e)}),this.currentModelFields=r}})))}};Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],Qs.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qs.prototype,"filterTtype",null),Y([i["Widget"].Reactive(),Q("design:type",Array)],Qs.prototype,"currentModelFields",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qs.prototype,"limit",null),Qs=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiModelFieldSelectWidget"}))],Qs);var Js=Object(a["defineComponent"])({inheritAttrs:!1,components:{ATreeSelect:x["b"]},props:{value:{type:Array},change:{type:Function},readonly:{type:Boolean},disabled:{type:Boolean},treeData:{type:Array,required:!0}},setup(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),n=Object(a["computed"])(()=>(e.value||[]).map(e=>({label:e.displayName,value:e.field})));function r(t){var o;null===(o=e.change)||void 0===o||o.call(e,t.map(e=>({displayName:e.label,field:e.value})))}return{readonly:t,disabled:o,selectedValues:n,changeHandle:r}}});const Xs=["title"];function Zs(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-tree-select");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])([[e.readonly&&"readonly"],"ui-option-fields-select"])},[Object(a["createVNode"])(l,{value:e.selectedValues,"show-search":"",style:{width:"100%"},class:"oio-select oio-select-multiple oio-tree-select","dropdown-class-name":"ui-option-fields-select-dropdown oio-select-dropdown oio-tree-select-dropdown","dropdown-style":{maxHeight:"500px",overflow:"auto"},placeholder:"请选择","allow-clear":"",multiple:"","label-in-value":"","tree-data":e.treeData,"field-names":{label:"displayName",value:"field"},"tree-node-filter-prop":"displayName","tree-node-label-prop":"tagLabel","get-popup-container":t=>t.parentNode||e.document.body,onChange:e.changeHandle},{title:Object(a["withCtx"])(({field:e,displayName:t,ttypeIcon:o})=>[Object(a["createElementVNode"])("div",{title:e},[o?(Object(a["openBlock"])(),Object(a["createElementBlock"])("i",{key:0,class:Object(a["normalizeClass"])([o,"iconfont ttype-icon"])},null,2)):Object(a["createCommentVNode"])("v-if",!0),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t),1)],8,Xs)]),_:1},8,["value","tree-data","get-popup-container","onChange"])],2)}Js.render=Zs,Js.__file="src/view/page-designer/component/select/option-fields-select/UiOptionFieldsSelect.vue";const ec=i["HttpClient"].getInstance();function tc(e,t){null===e||void 0===e||e.sort((e,t)=>(e.priority||0)-(t.priority||0));const o=(e||[]).map(e=>{var o,n;const r=[e.displayName],a=[e.field];t&&(r.unshift(t.tagLabel),a.unshift(t.field));const l=a.join("."),s={key:l,field:l,displayName:e.displayName,tagLabel:r.join("."),ttypeIcon:null===(o=i["ExpTtypeInfoMap"].get(e.ttype))||void 0===o?void 0:o.icon};return(null===(n=e.modelReferences)||void 0===n?void 0:n.modelFields)&&(s.children=tc(e.modelReferences.modelFields.filter(e=>!Object(i["isComplexTtype"])(e.ttype)),s)),s});return o}let oc=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.treeData=[]}initialize(e){return super.initialize(e),this.setComponent(Js),this}mounted(){super.mounted(),this.fetchData()}fetchData(){var e,t,o;return J(this,void 0,void 0,(function*(){const n=null===(o=null===(t=null===(e=this.formData)||void 0===e?void 0:e._metadata)||void 0===t?void 0:t.modelReferences)||void 0===o?void 0:o.model;if(!n)return;const r=`{\n  fieldQuery {\n    queryPage(\n      page: {currentPage: 1, size: 500, sort: {orders: {field: "priority", direction: ASC}}}\n      queryWrapper: {rsql: "model == ${n}"}\n    ) {\n      content {\n        field\n        displayName\n        ttype\n        priority\n        modelReferences {\n          modelFields {\n            field\n            displayName\n            ttype\n            priority\n          }\n        }\n      }\n      size\n      totalPages\n      totalElements\n    }\n  }\n}`,a=yield ec.query(i["SYSTEM_MODULE_NAME"].BASE,r),l=a.data.fieldQuery.queryPage.content;this.treeData=tc(l)}))}};Y([i["Widget"].Reactive(),Q("design:type",Array)],oc.prototype,"treeData",void 0),oc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].OneToMany,widget:"UiOptionFieldsSelect"}))],oc);let ic=class extends oc{};ic=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({name:"optionFieldsSelect",viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].OneToMany,widget:"Select"}))],ic);var nc,rc=Object(a["defineComponent"])({inheritAttrs:!1,components:{ACheckboxGroup:I["a"],ACheckbox:N["a"]},props:Object.assign(Object.assign({},i["OioCommonProps"]),{value:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}}),setup(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1);return{readonly:t,disabled:o}}});function ac(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-checkbox"),s=Object(a["resolveComponent"])("a-checkbox-group");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["ui-search-fields",e.readonly?"ui-search-fields-readonly":""])},[Object(a["createVNode"])(s,{value:e.value,class:"ui-search-fields-option-group",onBlur:e.blur,onFocus:e.focus,"onUpdate:value":e.change},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.options,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.key,disabled:!t.store,title:e.$translate(t.store?"存储字段":"非存储字段"),value:t.value,class:"ui-search-fields-option"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.label),1)]),_:2},1032,["disabled","title","value"]))),128))]),_:1},8,["value","onBlur","onFocus","onUpdate:value"])],2)}rc.render=ac,rc.__file="src/view/page-designer/component/search-fields/UiSearchFields.vue";let lc=nc=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.options=[],this.initSub=!0}static forEachVariableItemList(e,t){const o=[];for(const n of e){const{apiName:e}=n;if(i["VariableItemType"].VARIABLE!==n.type||!e)continue;const r={key:e,value:e,label:n.displayName,store:n.store};null===t||void 0===t||t(r),o.push(r)}return o}initialize(e){return super.initialize(e),this.setComponent(rc),this}mounted(){super.mounted(),this.designerSearchFields.subscribe(e=>{const{index:t,value:o}=e;this.formData._index===t&&o&&this.optionsChange(o)}),this.modelLabel.subscribe(e=>{const{index:t,value:o}=e;if(this.formData._index===t&&o&&o.length){let e=Object(i["deepClone"])(o);const t=this.field.model;t&&Object(i["getModel"])(t).then(t=>{const o=[],i=[];for(const n of t.modelFields){const{name:t}=n,r=e.findIndex(e=>e===t);if(-1!==r&&(i.push({key:n.name,value:n.name,label:n.displayName||n.name,store:!!n.store}),o.push(n.name),e=e.splice(r,1),!e.length))break}this.options=i,this.setValue(o)})}})}optionsChange(e){const t=[],o=[];let n;this.initSub?(this.initSub=!1,n=nc.forEachVariableItemList(e,e=>{const o=e.value,i=this.options.findIndex(e=>e.value===o);-1!==i&&t.push(o)})):n=nc.forEachVariableItemList(e,e=>{const i=e.value,n=this.options.findIndex(e=>e.value===i);-1===n?o.push(e):t.push(i)});const r=[];if(this.options.forEach(e=>{const o=e.value;t.includes(o)||r.push(o)}),this.options=n,r.length||o.length){const e=Object(i["deepClone"])(this.value)||[];r.forEach(t=>{const o=e.findIndex(e=>e===t);-1!==o&&e.splice(o,1)}),o.forEach(t=>{const o=t.value;o&&e.push(o)}),this.change(e)}}};Y([i["Widget"].Reactive(),Q("design:type",Array)],lc.prototype,"options",void 0),Y([i["Widget"].SubContext(n["Yb"]),Q("design:type",Object)],lc.prototype,"designerSearchFields",void 0),Y([i["Widget"].SubContext(n["Qc"],{}),Q("design:type",Object)],lc.prototype,"modelLabel",void 0),lc=nc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiSearchFields",multi:!0}))],lc);var sc=Object(a["defineComponent"])({inheritAttrs:!1,props:{value:{type:Array,default:()=>[]}}});const cc={class:"ui-option-fields"};function dc(e,t,o,i,n,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",cc,Object(a["toDisplayString"])(e.value),1)}sc.render=dc,sc.__file="src/view/page-designer/component/option-fields/UiOptionFields.vue";let uc=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.options=[],this.initSub=!0}initialize(e){return super.initialize(e),this.setComponent(sc),this}mounted(){super.mounted(),this.designerSearchFields.subscribe(e=>{const{index:t,value:o}=e;this.formData._index===t&&o&&this.optionsChange(o)}),this.modelLabel.subscribe(e=>{const{index:t,value:o}=e;if(this.formData._index===t&&o&&o.length){let e=Object(i["deepClone"])(o);const t=this.field.model;t&&Object(i["getModel"])(t).then(t=>{const o=[],i=[];for(const n of t.modelFields){const{name:t}=n,r=e.findIndex(e=>e===t);if(-1!==r&&(i.push({key:n.name,value:n.name,label:n.displayName||n.name,store:!!n.store}),o.push(n.name),e=e.splice(r,1),!e.length))break}this.options=i,this.setValue(o)})}})}optionsChange(e){const t=[],o=[];let n;this.initSub?(this.initSub=!1,n=lc.forEachVariableItemList(e,e=>{const o=e.value,i=this.options.findIndex(e=>e.value===o);-1!==i&&t.push(o)})):n=lc.forEachVariableItemList(e,e=>{const i=e.value,n=this.options.findIndex(e=>e.value===i);-1===n?o.push(e):t.push(i)});const r=[];if(this.options.forEach(e=>{const o=e.value;t.includes(o)||r.push(o)}),this.options=n,r.length||o.length){const e=Object(i["deepClone"])(this.value)||[];r.forEach(t=>{const o=e.findIndex(e=>e===t);-1!==o&&e.splice(o,1)}),o.forEach(t=>{const o=t.value,i=e.includes(o);o&&!i&&e.push(o)}),this.change(e)}}};var pc,bc;Y([i["Widget"].Reactive(),Q("design:type",Array)],uc.prototype,"options",void 0),Y([i["Widget"].SubContext(n["Yb"]),Q("design:type",Object)],uc.prototype,"designerSearchFields",void 0),Y([i["Widget"].SubContext(n["Qc"],{}),Q("design:type",Object)],uc.prototype,"modelLabel",void 0),uc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiOptionFields",multi:!0}))],uc),function(e){e["COMMON"]="common",e["RANGE"]="range"}(pc||(pc={})),function(e){e["START"]="start",e["END"]="end"}(bc||(bc={}));var gc=Object(a["defineComponent"])({components:{OioIcon:r["OioIcon"]},props:{value:{type:Object},filterTType:{type:String},fieldMulti:{type:Boolean},showOptions:{type:Array,default:()=>[]},optionFields:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1},realReadOnly:{type:Boolean},onChange:{type:Function,default:()=>()=>{}},blur:{type:Function,default:()=>()=>{}},fetchFieldMetaInfo:{type:Function,default:()=>()=>{}},changeShowOptions:{type:Function,default:()=>()=>{}}},setup(e){const t=Object(a["ref"])(),o="Ui_Select_Or_Add_Field#",n=Object(a["ref"])(""),r=Object(a["ref"])(),l=Object(a["computed"])(()=>{const t=[],o={options:e.showOptions.filter(t=>t.ttype===e.filterTType&&t.systemSource===i["SystemSource"].UI&&t.multi===e.fieldMulti),groupTitle:"匹配到已有字段(自定义)"},n={options:e.showOptions.filter(t=>t.ttype===e.filterTType&&t.systemSource!==i["SystemSource"].UI&&t.multi===e.fieldMulti),groupTitle:"匹配到已有字段(系统)"};return o.options&&o.options.length&&t.push(o),n.options&&n.options.length&&t.push(n),t}),s=Object(p["a"])(t=>{n.value=t;let i=[];if(e.value&&e.value.id&&(i=["name"]),t){const o=e.optionFields.filter(e=>e.label&&e.label.includes(t));e.changeShowOptions(o),e.onChange({displayName:t})}else e.changeShowOptions([]),e.onChange(void 0);e.fetchFieldMetaInfo(o+t,!0,i)},200),c=e=>{s(e)},d=(t,o)=>{r.value=o.key,e.onChange({id:o.key}),e.fetchFieldMetaInfo(o.name,!1)},u=o=>{o.sourceCapabilities||o.relatedTarget?e.blur():t.value.focus()};return{autoCompleteRef:t,uniqueKey:o,fieldsGroup:l,selectedValue:r,searchValue:n,search:c,realChange:d,realBlur:u}}});const vc={key:0,class:"ui-select-add-field-select-group"};function mc(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-auto-complete");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"ui-select-add-field",onChange:t[0]||(t[0]=Object(a["withModifiers"])(()=>{},["stop"]))},[Object(a["createVNode"])(s,{ref:"autoCompleteRef","allow-clear":!0,defaultActiveFirstOption:!1,class:"oio-select","dropdown-class-name":"oio-select-dropdown",options:e.fieldsGroup,onBlur:e.realBlur,onSearch:e.search,onSelect:e.realChange},{option:Object(a["withCtx"])(t=>[t.groupTitle?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",vc,[Object(a["createVNode"])(l,{icon:"oinone-beizhu",size:"12px"}),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate(t.groupTitle)),1)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.label),1)],64))]),_:1},8,["options","onBlur","onSearch","onSelect"])],32)}function yc(e){return`_${e}Selected`}gc.render=mc,gc.__file="src/view/page-designer/component/add-field-widget/UiSelectAddField.vue";let hc=class extends i["FormFieldWidget"]{constructor(){super(...arguments),this.optionFields=[],this.showOptions=[],this.existFields=[],this.currentModel="",this.realValue={},this.initFormData={}}get filterTType(){const e=this.formData["ttype"];if(e){const e=Object(i["deepClone"])(this.formData);e["displayName"]=void 0,e[this.itemData]=void 0,this.initFormData=e}return e}get fieldMulti(){var e;return(null===(e=this.formData)||void 0===e?void 0:e.multi)||!1}get excludeFieldDataIds(){var e;if(!this.excludeFields.length)return[];const t=[];for(const o of this.excludeFields){const i=null===(e=this.formData[o])||void 0===e?void 0:e.id;i&&t.push(i)}return t}get addFieldMode(){const e=this.getDsl().addFieldMode;return e||pc.COMMON}get rangePosition(){const e=this.getDsl().rangePosition;return e||bc.START}get excludeFields(){const e=this.getDsl().excludeFields;return e?e.split(","):[]}initialize(e){return super.initialize(e),this.setComponent(gc),this}get maxLength(){return this.getDsl().maxLength}get minLength(){return this.getDsl().minLength}onChange(e){this.change(e),this.realValue=e}mounted(){super.mounted(),n["Hb"].pluck(n["Xb"]).subscribe(e=>{const t=e.existFieldList;this.existFields=t,this.currentModel=e.currentModel;const o=e.allFieldList;if(o){const e=[];for(const i of o)if(!t.includes(i.name)){const t={name:i.name,value:i.displayName,id:i.id,key:i.id,ttype:i.ttype,label:i.displayName,multi:i.multi,systemSource:i.systemSource};e.push(t)}this.optionFields=e}})}changeShowOptions(e){return J(this,void 0,void 0,(function*(){this.showOptions=e}))}fetchFieldMetaInfo(e,t,o){return J(this,void 0,void 0,(function*(){let n;const r={};if(t)r[yc(this.itemData)]=!1,n=this.initFormData;else{r[yc(this.itemData)]=!0;const t={model:this.currentModel,name:e},o={element:t};if(this.addFieldMode===pc.RANGE){const o={ttype:this.filterTType},i=this.rangePosition;switch(i){case bc.START:o.startName=e;break;case bc.END:o.endName=e;break}t.metaExtends=JSON.stringify(o)}n=yield Object(i["customQuery"])(this.field.model,"construct",o,void 0,void 0,void 0,{maxDepth:1})}n[this.itemData]=this.realValue;const a=Object.assign(Object.assign(Object.assign({},this.formData),n),r);if(o&&o.length>0)for(const e of o)a[e]=void 0;this.reloadDataSource(a),this.reloadActiveRecords(a)}))}validator(){return J(this,void 0,void 0,(function*(){if(this.required&&(!this.value||!this.value.id&&!this.value.displayName))return this.validatorError(Object(i["translateValueByKey"])("必填"));if(this.value&&!this.value.id){const e=this.value.displayName;if(e){const t=e.length;if(!Object(u["a"])(this.maxLength)&&t>this.maxLength)return this.validatorError(`${Object(i["translateValueByKey"])("最大长度为")}${this.maxLength}`);if(!Object(u["a"])(this.minLength)&&t<this.minLength)return this.validatorError(`${Object(i["translateValueByKey"])("最小长度为")}${this.minLength}`)}}return this.validatorSuccess()}))}};function fc(e,t){return i["NumberUtils"].divide(parseFloat(e.toString()),parseFloat(t.toString()))}function Oc(e,t){return i["NumberUtils"].multiply(parseFloat(e.toString()),parseFloat(t.toString()))}var wc;Y([i["Widget"].Reactive(),Q("design:type",Object)],hc.prototype,"optionFields",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],hc.prototype,"showOptions",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],hc.prototype,"existFields",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],hc.prototype,"currentModel",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],hc.prototype,"realValue",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"filterTType",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"fieldMulti",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"excludeFieldDataIds",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"addFieldMode",null),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],hc.prototype,"rangePosition",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"excludeFields",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"maxLength",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],hc.prototype,"minLength",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],hc.prototype,"onChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],hc.prototype,"changeShowOptions",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String,Boolean,Array]),Q("design:returntype",Promise)],hc.prototype,"fetchFieldMetaInfo",null),hc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].ManyToOne,widget:"UiSelectAddField",multi:!1}))],hc),function(e){e["FIXED"]="FIXED",e["FREE"]="FREE"}(wc||(wc={}));var jc=Object(a["defineComponent"])({name:"UiPictureSizeLock",inheritAttrs:!1,components:{OioIcon:r["OioIcon"]},props:{value:{type:String},readonly:{type:Boolean,default:!1},change:{type:Function,default:()=>({})},url:{type:String},height:{type:[String,Number]},width:{type:[String,Number]},changeRealSize:{type:Function},changeHeight:{type:Function,default:()=>({})},changeWidth:{type:Function,default:()=>({})}},setup(e){const t=Object(a["ref"])(),o=Object(a["ref"])(),i=Object(a["ref"])(),n=Object(a["computed"])(()=>e.value||wc.FREE),r=t=>{e.change(t)},l=()=>{e.changeWidth(void 0),e.changeHeight(void 0),i.value=fc(t.value,o.value).toFixed(1)},s=(n,r)=>{let a=new Image;a.src=n,a.onload=()=>{var n;t.value=a.width,o.value=a.height,null===(n=e.changeRealSize)||void 0===n||n.call(e,a.width,a.height),r&&a.height&&a.width&&(i.value=fc(a.width,a.height).toFixed(1))}};return Object(a["onBeforeMount"])(()=>{e.url&&s(e.url,!1)}),Object(a["watch"])(()=>e.url,()=>{if(!e.url)return e.changeHeight(void 0),e.changeWidth(void 0),e.change(wc.FREE),void(i.value=void 0);s(e.url,!0)}),Object(a["watch"])(()=>e.height,t=>{if(t&&parseInt(t.toString())&&i.value&&n.value===wc.FIXED){const o=Math.round(Oc(t,i.value));e.changeWidth(o)}},{immediate:!0}),Object(a["watch"])(()=>e.width,t=>{if(t&&parseInt(t.toString())&&i.value&&n.value===wc.FIXED){const o=Math.round(fc(t,i.value));e.changeHeight(o)}},{immediate:!0}),Object(a["watch"])(()=>n.value,t=>{t===wc.FIXED&&e.height&&e.width?i.value=fc(e.width,e.height).toFixed(1):i.value=void 0},{immediate:!0}),{aspectRatio:i,pictureRealHeight:o,pictureRealWidth:t,realValue:n,clickFixType:r,resetPictureSize:l,PictureFixedType:wc}}});const kc={key:0,class:"ui-picture-size-lock"},Cc={class:"line-area"},Dc={key:0,class:"content"},Tc={key:1,class:"content"},$c={class:"line-area"},Ec={class:"content"},Sc={class:"title"};function Nc(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-popconfirm");return e.readonly?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",kc,[Object(a["createElementVNode"])("div",Cc,[e.realValue===e.PictureFixedType.FREE?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Dc,[Object(a["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-unlock",size:"16px"}),Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=t=>e.clickFixType(e.PictureFixedType.FIXED))},Object(a["toDisplayString"])(e.$translate("自由比例")),1)])):Object(a["createCommentVNode"])("v-if",!0),e.realValue===e.PictureFixedType.FIXED?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Tc,[Object(a["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-lock",size:"16px"}),Object(a["createElementVNode"])("span",{class:"title",onClick:t[1]||(t[1]=t=>e.clickFixType(e.PictureFixedType.FREE))},Object(a["toDisplayString"])(e.$translate("固定比例")),1)])):Object(a["createCommentVNode"])("v-if",!0)]),Object(a["createElementVNode"])("div",$c,[Object(a["createElementVNode"])("div",Ec,[Object(a["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-zhongzhi2",size:"16px"}),Object(a["createVNode"])(s,{"cancel-text":e.$translate("取消"),"ok-text":e.$translate("确定"),title:e.$translate("确认将图片恢复上传时的宽高吗？"),onConfirm:e.resetPictureSize},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Sc,Object(a["toDisplayString"])(e.$translate("重置")),1)]),_:1},8,["cancel-text","ok-text","title","onConfirm"])])])]))}jc.render=Nc,jc.__file="src/view/page-designer/component/picture-lock/UiPictureSizeLock.vue";let Vc=class extends i["FormFieldWidget"]{get url(){return this.formData.url||(this.formData.urlList||[])[0]}get width(){return this.formData.width}get height(){return this.formData.height}initialize(e){return super.initialize(e),this.setComponent(jc),this}isInvisible(){return!this.url}changeRealSize(e,t){this.formData._realWidth=e,this.formData._realHeight=t}changeHeight(e){this.formData.height=e}changeWidth(e){this.formData.width=e}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Vc.prototype,"url",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Vc.prototype,"width",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Vc.prototype,"height",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number,Number]),Q("design:returntype",void 0)],Vc.prototype,"changeRealSize",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Vc.prototype,"changeHeight",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Vc.prototype,"changeWidth",null),Vc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiFixedType"}))],Vc);var xc=Object(a["defineComponent"])({name:"UiDateOffset",components:{OioInputNumber:r["OioInputNumber"],OioSelect:r["OioSelect"]},inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign(Object.assign({},i["OioInputNumberProps"]),i["OioCommonProps"]),i["OioMetadataProps"]),{min:{type:[Number,String]},max:{type:[Number,String]},unit:{type:String},changeUnit:{type:Function}}),setup(e){const t=Object.assign(Object.assign({},i["defaultSelectProperties"]),{labelProp:"label",valueProp:"name",keyProp:"name",filterProp:"name"}),o=[{label:"天",key:i["DateUnit"].DAY,name:i["DateUnit"].DAY,value:i["DateUnit"].DAY},{label:"周",key:i["DateUnit"].WEEK,name:i["DateUnit"].WEEK,value:i["DateUnit"].WEEK},{label:"月",key:i["DateUnit"].MONTH,name:i["DateUnit"].MONTH,value:i["DateUnit"].MONTH},{label:"年",key:i["DateUnit"].YEAR,name:i["DateUnit"].YEAR,value:i["DateUnit"].YEAR}].map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)}));return{properties:t,unitOptions:o}}});function Ic(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-select"),s=Object(a["resolveComponent"])("oio-input-number");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"add-step":e.addStep,class:Object(a["normalizeClass"])(["ui-date-offset",e.readonly&&"readonly"]),"default-value":e.defaultValue,disabled:e.disabled,max:e.max,"max-safe-integer":e.maxSafeInteger,min:e.min,"min-safe-integer":e.minSafeInteger,placeholder:e.readonly||e.disabled?"":e.placeholder,precision:0,readonly:e.readonly,"reduce-step":e.reduceStep,step:e.step,value:e.value,onBlur:e.blur,onFocus:e.focus,"onUpdate:value":e.change},{append:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{allowClear:!1,border:!0,"default-active-first-option":!1,disabled:e.disabled,"filter-option":!1,"not-found-content":null,options:e.unitOptions,value:e.unit,class:"oio-select","get-popup-container":t=>t.parentNode||e.document.body,dropdownClassName:"ui-date-offset-select-dropdown oio-select-dropdown oio-ant-select-dropdown-global",style:{width:"60px"},onSelect:e.changeUnit},null,8,["disabled","options","value","get-popup-container","onSelect"])]),_:1},8,["add-step","class","default-value","disabled","max","max-safe-integer","min","min-safe-integer","placeholder","readonly","reduce-step","step","value","onBlur","onFocus","onUpdate:value"])}xc.render=Ic,xc.__file="src/view/page-designer/component/date-offset/UiDateOffset.vue";let Mc=class extends i["FormIntegerFieldWidget"]{get unit(){const e=this.formData[this.unitField];return e||(this.changeUnit(i["DateUnit"].DAY),i["DateUnit"].DAY)}get unitField(){return this.getDsl().unitField||"startDateOffsetUnit"}initialize(e){return super.initialize(e),this.setComponent(xc),this}changeUnit(e){this.formData[this.unitField]=e}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Mc.prototype,"unit",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Mc.prototype,"unitField",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Mc.prototype,"changeUnit",null),Mc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].Integer,widget:"UiDateOffset"}))],Mc);const Ac="UiDesignerTreeNodeMetadataForm_";var Fc=Object(a["defineComponent"])({name:"UiTreeNodeSet",inheritAttrs:!1,components:{OioIcon:r["OioIcon"],OioButton:r["OioButton"],OioModal:r["OioModal"]},props:{nodeWidgetLength:{type:Number,default:0},isReady:{type:Boolean},loadNodeWidgets:{type:Function},blur:{type:Function},relationCompleted:{type:Boolean,default:!1},onOk:{type:Function}},setup(e){const t=Object(a["ref"])(!1),o=()=>{var o;t.value=!0,null===(o=e.loadNodeWidgets)||void 0===o||o.call(e)},i=()=>J(this,void 0,void 0,(function*(){var o,i;(yield null===(o=e.onOk)||void 0===o?void 0:o.call(e))&&(t.value=!1,null===(i=e.blur)||void 0===i||i.call(e))})),n=()=>{var o;t.value=!1,null===(o=e.blur)||void 0===o||o.call(e)};return{visible:t,openModal:o,enterCallback:i,cancelCallback:n}},render(){const e=[];for(let t=0;t<this.nodeWidgetLength;t++){const o=Ac+t,n=this.$slots[o];n&&e.push(Object(a["createVNode"])(r["OioGroup"],{title:Object(i["translateValueByKey"])(`第${t+1}级关联`),border:!1},{default:()=>n()}))}return Object(a["createVNode"])("div",{class:"ui-table-tree-set"},[Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].primary,block:!0,disabled:!this.isReady,onClick:this.openModal},{default:()=>Object(i["translateValueByKey"])("设置联动关系")}),Object(a["createVNode"])(r["OioModal"],{wrapperClassName:"ui-table-tree-set-modal-wrapper",title:"设置联动关系",width:"700px",height:"60%",zIndex:99999,visible:this.visible,forceRender:!0,destroyOnClose:!0,maskClosable:!1,enterCallback:this.enterCallback,cancelCallback:this.cancelCallback},{default:()=>e,footer:()=>[Object(a["createVNode"])("div",{class:"ui-table-tree-set-footer"},[Object(a["createVNode"])("div",{class:"ui-table-tree-set-footer-status"},[Object(a["createVNode"])(r["OioIcon"],{icon:"oinone-lianjie",color:this.relationCompleted?"var(--oio-success-color)":"var(--oio-disabled-color)",class:"ui-table-tree-set-relation-complete"}),Object(a["createVNode"])("span",{},Object(i["translateValueByKey"])(this.relationCompleted?"已构成完整关联关系":"未构成完整关联关系"))]),Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].default,onClick:this.cancelCallback},{default:()=>Object(i["translateValueByKey"])("取消")}),Object(a["createVNode"])(r["OioButton"],{type:r["ButtonType"].primary,onClick:this.enterCallback},{default:()=>Object(i["translateValueByKey"])("确定")})])]})])}});Fc.__file="src/view/page-designer/component/tree-set/UiTreeNodeSet.vue";const Lc="ui.designer.UiDesignerTreeNodeMetadata";class Rc extends i["FormFieldWidget"]{constructor(){super(...arguments),this.nodeWidgetLength=0,this.nodeWidgets=[],this.isReady=!1,this.expEntity={}}get settingModel(){return this.formData._model}get relationCompleted(){return!1}initialize(e){return super.initialize(e),this.setComponent(Fc),this}loadNodeWidgets(){this.isReady=!1;let e=this.value;e||(e=[]),e.length||e.push(this.initData({},0)),this.setValue(e),this.createNodeWidgets().then(()=>{this.isReady=!0})}pushNewNodeWidget(e){return J(this,void 0,void 0,(function*(){const t=this.value,o=t.length,n=o-1;Object(u["a"])(e)&&(e=n);const r=e+1,{viewType:a,nodeWidgets:l}=this;if(e<n){for(let e=r;e<o;e++){const t=l[e];null===t||void 0===t||t.dispose()}l.splice(r,o-r),t.splice(r,o-r)}const s=yield this.fetchView();if(!s)return console.error("Invalid view UiDesignerTreeNodeMetadataForm"),[];let c=i["FormWidget"];a===i["ViewType"].Detail&&(c=i["DetailWidget"]);const d=Object(i["createRuntimeContextForWidget"])(s),p=this.initData(yield d.getInitialValue(),r),b=this.createNodeWidget(d,c,r,p);t.push(p),l.push(b),this.nodeWidgetLength=this.nodeWidgets.length}))}onOk(){return J(this,void 0,void 0,(function*(){return!!this.relationCompleted||(r["OioNotification"].error(Object(i["translateValueByKey"])("警告"),Object(i["translateValueByKey"])("未构成完整关联关系")),!1)}))}createNodeWidgets(){return J(this,void 0,void 0,(function*(){this.disposeNodeWidgets();const e=yield this.fetchView();if(!e)return console.error("Invalid view UiDesignerTreeNodeMetadataForm"),[];const t=this.value,o=t.length;let n,r=i["FormWidget"];this.viewType===i["ViewType"].Detail&&(r=i["DetailWidget"]);for(let a=0;a<o;a++){const o=Object(i["createRuntimeContextForWidget"])(e),l=this.initData(t[a]||(yield o.getInitialValue()),a,n),s=this.createNodeWidget(o,r,a,l);t[a]=l,n=l,this.nodeWidgets.push(s)}this.nodeWidgetLength=o}))}createNodeWidget(e,t,o,n){const r=e.handle;return this.createWidget(t,Ac+o,{metadataHandle:r,rootHandle:r,dataSource:n,activeRecords:n,template:e.viewTemplate,inline:!0,mountedCallChaining:new i["CallChaining"],refreshCallChaining:new i["CallChaining"],submitCallChaining:new i["CallChaining"],validatorCallChaining:new i["CallChaining"]})}disposeNodeWidgets(){this.nodeWidgets.forEach(e=>{e.dispose()}),this.nodeWidgets=[],this.nodeWidgetLength=0}fetchView(){return J(this,void 0,void 0,(function*(){return i["ViewCache"].get(Lc,"UiDesignerTreeNodeMetadataForm")}))}initData(e,t,o){var i;const n=(t||0)-1;return!o&&n>=0&&(o=null===(i=this.nodeWidgets[n])||void 0===i?void 0:i.getData()),Object.assign(Object.assign({},e||{}),{_model:this.settingModel,_index:t,_preNodeValue:o,_expEntity:this.expEntity})}validator(){const e=Object.create(null,{validator:{get:()=>super.validator}});return J(this,void 0,void 0,(function*(){const t=yield e.validator.call(this);return t.status!==i["ValidatorStatus"].Success?t:this.relationCompleted?this.validatorSuccess():{status:i["ValidatorStatus"].Error,message:Object(i["translateValueByKey"])("未构成完整关联关系"),path:this.path}}))}beforeMount(){super.beforeMount(),this.loadNodeWidgets()}mounted(){super.mounted(),this.designerFieldReference.subscribe(e=>J(this,void 0,void 0,(function*(){if(!Object(s["a"])(e)){const t=Object(i["deepClone"])(e);t.designKey=t.designKey+"#attr_name:",t.designField=this.field.data,t.designModel=void 0,t.designReferenceModel=void 0,this.expEntity=t}})))}}Y([i["Widget"].Reactive(),Q("design:type",Object)],Rc.prototype,"nodeWidgetLength",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Rc.prototype,"isReady",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Rc.prototype,"expEntity",void 0),Y([i["Widget"].BehaviorSubContext(n["Wb"],{}),Q("design:type",Object)],Rc.prototype,"designerFieldReference",void 0),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Rc.prototype,"settingModel",null),Y([i["Widget"].Reactive(),Q("design:type",Boolean),Q("design:paramtypes",[])],Rc.prototype,"relationCompleted",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Rc.prototype,"loadNodeWidgets",null),Y([i["Widget"].Provide(),i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Number]),Q("design:returntype",Promise)],Rc.prototype,"pushNewNodeWidget",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Rc.prototype,"onOk",null);let Bc=class extends Rc{get relationCompleted(){var e,t;if(this.value&&this.value.length>0){let o=this.value[this.value.length-1];const i=this.formData._model;let n=null===(e=null===o||void 0===o?void 0:o.modelDefinition)||void 0===e?void 0:e.model;if(n){if(i===n&&this.levelFieldCheck(o))return!0}else if(o=this.value[this.value.length-2],n=null===(t=null===o||void 0===o?void 0:o.modelDefinition)||void 0===t?void 0:t.model,i===n&&this.levelFieldCheck(o))return!0}return!1}levelFieldCheck(e){var t;let o=e;while(o){if(!o._preNodeValue)break;if(!(null===(t=o.referencesFieldDefinition)||void 0===t?void 0:t.field))return!1;o=o._preNodeValue}return!0}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Bc.prototype,"relationCompleted",null),Bc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiTreeNodeSet"}))],Bc);let _c=class extends Bc{initData(e,t,o){return Object.assign(Object.assign({},super.initData(e,t,o)),{_isCardCascader:!0})}};_c=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiCardCascaderNodeSet"}))],_c);let Wc=class extends Rc{get relationCompleted(){var e,t,o;if(this.value&&this.value.length>0){let i=this.value[this.value.length-1];if(null===(e=null===i||void 0===i?void 0:i.modelDefinition)||void 0===e?void 0:e.model){if(null===(t=null===i||void 0===i?void 0:i.searchFieldDefinition)||void 0===t?void 0:t.field)return!0}else if(i=this.value[this.value.length-2],null===(o=null===i||void 0===i?void 0:i.searchFieldDefinition)||void 0===o?void 0:o.field)return!0}return!1}fetchView(){return J(this,void 0,void 0,(function*(){return i["ViewCache"].get(Lc,"UiDesignerTableTreeNodeMetadataForm")}))}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Wc.prototype,"relationCompleted",null),Wc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiTableTreeSet"}))],Wc);let Pc=class extends Wc{initData(e,t,o){return Object.assign(Object.assign({},super.initData(e,t,o)),{_isCardCascader:!0})}};Pc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiTableCardCascaderSet"}))],Pc);let zc=class extends Rc{get settingModel(){var e,t;return null===(t=null===(e=this.formData._metadata)||void 0===e?void 0:e.modelReferences)||void 0===t?void 0:t.model}get relationCompleted(){var e,t;if(this.value&&this.value.length>0){let o=this.value[this.value.length-1];const i=this.settingModel;let n=null===(e=null===o||void 0===o?void 0:o.modelDefinition)||void 0===e?void 0:e.model;if(n){if(i===n)return!0}else if(o=this.value[this.value.length-2],n=null===(t=null===o||void 0===o?void 0:o.modelDefinition)||void 0===t?void 0:t.model,i===n)return!0}return!1}fetchView(){return J(this,void 0,void 0,(function*(){return i["ViewCache"].get(Lc,"UiDesignerTreeSelectNodeMetadataForm")}))}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],zc.prototype,"settingModel",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],zc.prototype,"relationCompleted",null),zc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].OneToMany,widget:"UiTreeSelectSet"}))],zc);const Gc=i["HttpClient"].getInstance(),Uc="uiDesigner";function Kc(e,t){return J(this,void 0,void 0,(function*(){let o="",i="";t&&(o=`fromModel: "${t}"`),e&&(i=`toModel: "${e}"`);const n=`query {\n    uiDesignerRelationQuery {\n      fetchModelRelFields(\n        data: {\n         ${o}\n         ${i}\n        }\n      ) {\n        modelFields {\n          model\n          references\n          field\n          displayName\n          modelDefinition {\n            displayName\n          }\n        }\n      }\n    }\n  }`,r=yield Gc.query(Uc,n);return r.data.uiDesignerRelationQuery.fetchModelRelFields.modelFields}))}var qc=Object(a["defineComponent"])({name:"UiExpandLevelSelect",components:{ASelect:f["c"]},props:{selectedValue:{type:Object},expandLevelOptions:{type:Object},change:{type:Function},dropdownVisibleChange:{type:Function},onSelectedValueChange:{type:Function}}});function Hc(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-select");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:e.selectedValue,options:e.expandLevelOptions,"allow-clear":"",onChange:e.onSelectedValueChange,onDropdownVisibleChange:e.dropdownVisibleChange},null,8,["value","options","onChange","onDropdownVisibleChange"])}qc.render=Hc,qc.__file="src/view/page-designer/component/tree-set/expand-level-select/UiExpandLevelSelect.vue";let Yc=class extends i["FormStringFieldSingleWidget"]{constructor(){super(...arguments),this.selectedValue=void 0,this.expandLevelOptions=void 0}initialize(e){return super.initialize(e),this.setComponent(qc),this}onSelectedValueChange(e,t){var o;this.selectedValue=e,null===(o=this.change)||void 0===o||o.call(this,e)}dropdownVisibleChange(e){this.loadOptions()}loadOptions(){return J(this,void 0,void 0,(function*(){const e=this.formData["nodes"],t=this.value;if(null===e||void 0===e?void 0:e.length){const o=[];e.forEach(e=>{var i;const n=null===(i=e.modelDefinition)||void 0===i?void 0:i.model;if(n){const i={label:e.modelDefinition.displayName,value:e.modelDefinition.model,origin:e.modelDefinition};o.push(i),n===t&&(this.selectedValue=i)}}),o.length&&(this.expandLevelOptions=o)}}))}mounted(){this.reloadFormDataSubscription=this.reloadFormData$.subscribe(e=>{e&&null===this.value&&(this.selectedValue=void 0)}),this.loadOptions()}unmounted(){var e;null===(e=this.reloadFormDataSubscription)||void 0===e||e.unsubscribe()}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Yc.prototype,"selectedValue",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],Yc.prototype,"onSelectedValueChange",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yc.prototype,"expandLevelOptions",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",void 0)],Yc.prototype,"dropdownVisibleChange",null),Yc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].String,widget:"UiTExpandLevelSelect"}))],Yc);let Qc=class extends wl{mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t;return J(this,void 0,void 0,(function*(){this.genExpEntity(null===(t=this.formData.modelDefinition)||void 0===t?void 0:t.model),this.fetchModelData(),yield e.mounted.call(this)}))}needSubscribe(){return!1}watchOptionLabel(){return J(this,void 0,void 0,(function*(){yield this.submit(new i["SubmitValue"]({}))}))}get contextItems(){var e,t;const{contextItems:o}=this.getDsl();return Object(i["createContextItems"])(o,this.labelEntity.designModel,(null===(e=this.labelEntity)||void 0===e?void 0:e.designReferenceModel)?null===(t=this.labelEntity)||void 0===t?void 0:t.designReferenceModel:"")}modelChange(e){this.genExpEntity(e),e&&this.fetchModelData(),this.queryFieldOrXmlExpression()}get models(){return[this.labelEntity.designModel]}handleModelLabelExp(){return J(this,void 0,void 0,(function*(){const e=yield this.queryOneExpression("designer.DesignerModelDefinition","label",this.labelEntity.designReferenceModel,!0,!1);e||this.setVariableItemList(Object(i["createDefaultVariableItemList"])())}))}genExpEntity(e){const t={};t.designModel=e,t.designReferenceModel=e,t.designField=this.field.name;const o=this.formData._expEntity;t.version=null===o||void 0===o?void 0:o.version,t.designKey=`${(null===o||void 0===o?void 0:o.designKey)+this.field.name}#${this.formData._index}`,this.labelEntity=t}};Y([i["Widget"].Watch("formData.label"),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Qc.prototype,"watchOptionLabel",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Qc.prototype,"contextItems",null),Y([i["Widget"].Watch("formData.modelDefinition.model",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Qc.prototype,"modelChange",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Qc.prototype,"models",null),Qc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiTreeLabel"}))],Qc);let Jc=class extends Ll{mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});var t;return J(this,void 0,void 0,(function*(){this.genExpEntity(null===(t=this.formData.modelDefinition)||void 0===t?void 0:t.model),this.watchId(),yield e.mounted.call(this)}))}modelChange(e){this.genExpEntity(e),this.watchId()}needSubscribe(){return!1}genExpEntity(e){let t={};t.designModel=e,t.designReferenceModel=e,t.designField=this.field.name;const o=this.formData._expEntity;t.version=null===o||void 0===o?void 0:o.version,t.designKey=(null===o||void 0===o?void 0:o.designKey)+this.field.name+"#"+this.formData._index,this.expEntity=t}};Y([i["Widget"].Watch("formData.modelDefinition.model",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Jc.prototype,"modelChange",null),Jc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Detail],ttype:i["ModelFieldType"].String,widget:"UiTreeRsql"}))],Jc);let Xc=class extends i["FormM2OSelectFieldWidget"]{initialize(e){return super.initialize(e),this}get relationFieldKey(){return"model"}change(e){var t;super.change(e);const o=e?this.formData._index:this.formData._index-1;null===(t=this.pushNewNodeWidget)||void 0===t||t.call(this,o)}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Xc.prototype,"relationFieldKey",null),Y([i["Widget"].Inject(),i["Widget"].Method(),Q("design:type",Function)],Xc.prototype,"pushNewNodeWidget",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Xc.prototype,"change",null),Xc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].ManyToOne,widget:"UiTreeModelSelect",multi:!1}))],Xc);let Zc=class extends i["FormM2OSelectFieldWidget"]{initialize(e){return super.initialize(e),this}get relationFieldKey(){return"field"}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){yield e.mounted.call(this),yield this.fetchOptions()}))}fillOptionsForSingle(e,t=!0){return J(this,void 0,void 0,(function*(){}))}fetchOptions(){var e;return J(this,void 0,void 0,(function*(){const t=this.formData._model,o=null===(e=this.formData.modelDefinition)||void 0===e?void 0:e.model;if(!t||!o)return;const n=yield Kc(t,o);this.dataList=Object(i["deepClone"])(n),n.forEach(e=>{e.label=e.modelDefinition.displayName+"-"+e.displayName,e.value=e.field}),this.options=n,this.isInitOptions=!0}))}modelChange(e){this.fetchOptions()}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Zc.prototype,"relationFieldKey",null),Y([i["Widget"].Watch("formData.modelDefinition.model",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Zc.prototype,"modelChange",null),Zc=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].ManyToOne,widget:"UiTreeTableFieldSelect",multi:!1}))],Zc);let ed=class extends i["FormM2OSelectFieldWidget"]{initialize(e){return super.initialize(e),this}get relationFieldKey(){return"field"}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){yield e.mounted.call(this),yield this.fetchOptions()}))}fillOptionsForSingle(e,t=!0){return J(this,void 0,void 0,(function*(){}))}loadOptions(e={}){return J(this,void 0,void 0,(function*(){return this.options}))}fetchOptions(){var e,t;return J(this,void 0,void 0,(function*(){const o=this.formData._preNodeValue,n=null===(e=this.formData.modelDefinition)||void 0===e?void 0:e.model,r=null===(t=null===o||void 0===o?void 0:o.modelDefinition)||void 0===t?void 0:t.model;if(!n||!r)return;const a=yield Kc(n,r);this.dataList=Object(i["deepClone"])(a),a.forEach(e=>{e.label=e.modelDefinition.displayName+"-"+e.displayName,e.value=e.field}),this.options=a,this.value||this.setValue(this.options[0]),this.isInitOptions=!0}))}modelChange(e){this.fetchOptions()}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],ed.prototype,"relationFieldKey",null),Y([i["Widget"].Watch("formData.modelDefinition.model",{deep:!0}),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],ed.prototype,"modelChange",null),ed=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:i["ModelFieldType"].ManyToOne,widget:"UiTreeLevelFieldSelect",multi:!1}))],ed);var td=Object(a["defineComponent"])({name:"SelectCascaderNode",props:Object.assign(Object.assign({},jt),{field:{type:Array,default:()=>[],required:!0},dataSource:{type:Object,required:!0},valueFlattend:{type:Array,default:()=>[]},createDrawerForm:{type:Function,required:!0}}),components:{ACascader:O["a"],OioIcon:r["OioIcon"]},emits:["onChange","onDelete","initDrawerWidget"],setup(e,{emit:t}){const o=Object(a["ref"])(!1),r=Object(a["inject"])("widgetTypeGroup"),l=Object(a["ref"])(!1),s=Object(a["computed"])(()=>[{label:Object(i["translateValueByKey"])("字段"),name:ft.FIELD,children:e.dataSource[ft.FIELD]||[]},{label:Object(i["translateValueByKey"])("动作"),name:ft.ACTION,children:e.dataSource[ft.ACTION]||[]}]),c=Object(a["computed"])(()=>b(s.value)),d=Object(a["computed"])(()=>e.field.filter(e=>e)),u=Object(a["computed"])(()=>{var t,o;const i=v(g(e.field));if(!i)return i;const{properties:n}=i;let r="";return i.actionType&&(r=`(${Ot[i.actionType]})`),n?Object.assign(Object.assign({},i),{displayLabel:`${null!==(t=n.label)&&void 0!==t?t:i.label}${r} - ${null!==(o=n.name)&&void 0!==o?o:i.name}`}):Object.assign(Object.assign({},i),{displayLabel:`${i.label}${r} - ${i.name}`})}),p=Object(a["computed"])(()=>e.field.filter(e=>e).length<2),b=(e,t=1)=>(null===e||void 0===e?void 0:e.length)?e.map(e=>{var o,i,n,r,a,l;let s="";return s=e.actionType?(null===(o=e.children)||void 0===o?void 0:o.length)?null!==(i=e.displayName)&&void 0!==i?i:e.label:`${e.displayName}(${Ot[e.actionType]}) - ${e.name}`:(null===(n=e.children)||void 0===n?void 0:n.length)?null!==(r=e.displayName)&&void 0!==r?r:e.label:`${e.displayName} - ${e.name}`,Object.assign(Object.assign({},e),{displayLabel:s,isLeaf:!((null===(a=e.children)||void 0===a?void 0:a.length)&&t<3),children:(null===(l=e.children)||void 0===l?void 0:l.length)&&t<3?b(e.children,t+1):null})}):e,g=t=>{var o;if(t.length<2)return null;if(!(null===(o=e.dataSource[t[0]])||void 0===o?void 0:o.length))return null;const i=e.dataSource[t[0]],n=i.find(e=>e.name===t[1]);if(!n)return null;if(!(null===n||void 0===n?void 0:n.children)||!t[2])return Object.assign(Object.assign({},n),{type:t[0]});const r=n.children.find(e=>e.name===t[2]);return Object.assign(Object.assign({},r),{type:t[0],parentName:t[1]})},v=t=>{var o;if(!(null===(o=e.valueFlattend)||void 0===o?void 0:o.length)||!t)return t;const i=e.valueFlattend.find(e=>{var o,i;return e.model===t.model&&e.name===t.name&&(null!==(o=e.parentName)&&void 0!==o?o:null)===(null!==(i=t.parentName)&&void 0!==i?i:null)});return i?Object.assign(Object.assign(Object.assign({},t),i),{children:t.children}):t},m=e=>{t("onChange",{address:e})},y=e=>{const{type:t,ttype:o,multi:i,actionType:r}=e;let a="";return t===ft.FIELD&&(a=`${t}#${o}`),t===ft.ACTION&&(a=`${t}#${Object(n["Kb"])(r)}`),void 0!==i&&null!==i&&(a=`${a}#${i}`),a},h=()=>{var t;if(e.disabled)return;if(!(null===(t=d.value)||void 0===t?void 0:t.length))return;if(!(null===r||void 0===r?void 0:r.value))return;const o=Object.assign({},g(d.value)),i=v(o),n=y(o),a=r.value.get(n);if(!(null===a||void 0===a?void 0:a.length))return;const s=a.find(e=>(o.type===ft.ACTION||e.isDefault)&&"FORM"===e.viewType);s&&(l.value=!0,e.createDrawerForm({field:i,widgetType:s}).then(()=>{l.value=!1}))},f=()=>{e.disabled||t("onDelete")},O=e=>{o.value=e};return{open:o,isBlock:p,currentValue:u,isEditLoading:l,options:s,renderOptionList:c,cascaderValue:d,onCascadeChange:m,onEdit:h,onDelete:f,onDropdownVisibleChange:O}}});const od={class:"select-field-action-cascader-row"},id={key:0,class:"ant-select-selection-placeholder"},nd={key:1,class:"select-field-action-cascader-span"};function rd(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-cascader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",od,[Object(a["createVNode"])(l,{class:"select-field-action__drop-icon",icon:"oinone-yidong",color:"#979797",size:"var(--oio-font-size-sm)"}),Object(a["createVNode"])(s,{class:Object(a["normalizeClass"])(["oio-cascader",!e.disabled&&e.readonly&&"oio-cascader__readonly",e.open&&"oio-select-cascader-open"]),dropdownClassName:"oio-select-cascader__dropdown",size:"large",expandTrigger:"hover",disabled:e.disabled||e.readonly,allowClear:!1,placeholder:e.$translate("请选择字段或动作"),value:e.cascaderValue,"onUpdate:value":t[0]||(t[0]=t=>e.cascaderValue=t),options:e.renderOptionList,showSearch:"","field-names":{label:"displayLabel",value:"name",children:"children"},open:e.open,onChange:e.onCascadeChange,onDropdownVisibleChange:e.onDropdownVisibleChange},{displayRender:Object(a["withCtx"])(({labels:t})=>[e.isBlock?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",id,Object(a["toDisplayString"])(e.$translate("请选择字段或动作")),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",nd,Object(a["toDisplayString"])(e.currentValue?t.slice(0,t.length-1).concat(e.currentValue.displayLabel).join("  >  "):t.filter(e=>e).join("  >  ")),1))]),_:1},8,["class","disabled","placeholder","value","options","open","onChange","onDropdownVisibleChange"]),e.readonly?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[e.isEditLoading?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:Object(a["normalizeClass"])(["select-field-action-cascader-loading-icon",e.disabled&&"select-field-action-cascader-icon__disabled"]),icon:"oinone-jiazai",size:"var(--oio-font-size)",color:"var(--oio-primary-color)"},null,8,["class"])):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,class:Object(a["normalizeClass"])(["select-field-action-cascader-edit-icon",e.disabled&&"select-field-action-cascader-icon__disabled"]),icon:"oinone-xingzhuang1",size:"var(--oio-font-size)",color:"var(--oio-primary-color)",onClick:e.onEdit},null,8,["class","onClick"])),Object(a["createVNode"])(l,{class:Object(a["normalizeClass"])(["select-field-action-cascader-delete-icon",e.disabled&&"select-field-action-cascader-icon__disabled"]),icon:"oinone-a-ShapeCopy3beifen",size:"var(--oio-font-size)",color:"var(--oio-primary-color)",onClick:e.onDelete},null,8,["class","onClick"])],64))])}td.render=rd,td.__file="src/view/page-designer/component/select-cascader/SelectCascaderNode.vue";var ad=Object(a["defineComponent"])({name:"SelectFieldActionCascaderComponent",props:Object.assign(Object.assign({},i["OioMetadataProps"]),{fieldActionOptionsList:{type:Object,required:!0},unSelectedOptionList:{type:Object,required:!0},selectedOptionList:{type:Object,required:!0},onFormChange:{type:Function,required:!0},value:{type:Array,default:()=>[]},valueFlattend:{type:Array,default:()=>[]},createDrawerForm:{type:Function,required:!0}}),components:{OioButton:r["OioButton"],CascaderNode:td,Draggable:y.a},emits:[],setup(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),n=Object(a["computed"])(()=>e.value.map(e=>d(e).flat()).flat()),l=Object(a["computed"])({get(){return s(n.value)},set(t){e.onFormChange(p(t.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))}}),s=e=>e.length?e.sort((e,t)=>{var o,i;return(null!==(o=null===e||void 0===e?void 0:e.sort)&&void 0!==o?o:-1)-(null!==(i=null===t||void 0===t?void 0:t.sort)&&void 0!==i?i:-1)}):e,c=()=>{const t=[...l.value,{items:[]}];e.onFormChange(p(t.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))},d=e=>{var t;return(null===(t=e.children)||void 0===t?void 0:t.length)?e.children.map(t=>t.name?[{sort:t.sort,items:[e.type,e.name,t.name]}]:[{sort:t.sort,items:[e.type,e.name]}]):[{sort:e.sort,items:[e.type,e.name]}]},u=({address:t},o)=>{if(l.value.findIndex(e=>{var o;return(null===(o=null===e||void 0===e?void 0:e.items)||void 0===o?void 0:o.join("-"))===t.join("-")})>-1)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`该${wt[t[0]]}已被选择`));const n=[...l.value];n.splice(o,1,{items:t}),e.onFormChange(p(n.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))},p=t=>{let o=0;return t.map(t=>{var i,n,r,a,l,s,c,d;if(!t.length)return{sort:o++};if(t.length<3){const s=null===(i=e.fieldActionOptionsList[t[0]])||void 0===i?void 0:i.find(e=>e.name===t[1]);if(!s)return{sort:o++};const c=e.value.find(e=>e.name===s.name&&e.model===s.model&&e.type===t[0]);return{name:null!==(n=null===c||void 0===c?void 0:c.name)&&void 0!==n?n:s.name,model:null!==(r=null===c||void 0===c?void 0:c.model)&&void 0!==r?r:s.model,label:null!==(a=null===c||void 0===c?void 0:c.label)&&void 0!==a?a:s.label,type:t[0],displayName:s.displayName,properties:null!==(l=null===c||void 0===c?void 0:c.properties)&&void 0!==l?l:s.properties,sort:o++}}const u=null===(s=e.fieldActionOptionsList[t[0]])||void 0===s?void 0:s.find(e=>e.name===t[1]);if(!u)return{sort:o++};const p=e.selectedOptionList[t[0]].find(e=>e.name===u.name&&e.model===u.model),b=(null===(c=u.children)||void 0===c?void 0:c.length)&&t[2]?u.children.find(e=>e.name===t[2]):null;let g={};return b&&(g=e.valueFlattend.find(e=>e.name===b.name&&e.model===b.model&&e.parentName===u.name&&e.parentModel===u.model)),{name:u.name,model:u.model,label:p?p.label:u.label,type:t[0],displayName:u.displayName,properties:null!==(d=null===p||void 0===p?void 0:p.properties)&&void 0!==d?d:u.properties,sort:o++,children:b&&[Object.assign(Object.assign(Object.assign({},b),g),{type:t[0],sort:o++})]}})},b=t=>{const o=[...n.value];o.splice(t,1),e.onFormChange(p(o.map(e=>{var t;return null!==(t=e.items)&&void 0!==t?t:[]})))};return{readonly:t,disabled:o,draggableList:l,fieldList:n,onAddRow:c,onCascaderChange:u,onDelete:b}}});const ld={key:0,class:"select-field-action-cascader-wrapper"};function sd(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("cascader-node"),s=Object(a["resolveComponent"])("draggable"),c=Object(a["resolveComponent"])("oio-button");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[e.fieldList&&e.fieldList.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ld,[Object(a["createVNode"])(s,{modelValue:e.draggableList,"onUpdate:modelValue":t[0]||(t[0]=t=>e.draggableList=t),disabled:e.disabled||e.readonly,"item-key":"sort"},{item:Object(a["withCtx"])(({element:t,index:o})=>[(Object(a["openBlock"])(),Object(a["createBlock"])(l,{field:t.items,dataSource:e.fieldActionOptionsList,filterSource:e.unSelectedOptionList,onOnChange:t=>{e.onCascaderChange(t,o)},key:o,valueFlattend:e.valueFlattend,createDrawerForm:e.createDrawerForm,disabled:e.disabled,readonly:e.readonly,onOnDelete:()=>e.onDelete(o)},null,8,["field","dataSource","filterSource","onOnChange","valueFlattend","createDrawerForm","disabled","readonly","onOnDelete"]))]),_:1},8,["modelValue","disabled"])])):Object(a["createCommentVNode"])("v-if",!0),e.readonly?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:1,disabled:e.disabled,class:"select-field-action__button",type:"primary",onClick:e.onAddRow},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加一行")),1)]),_:1},8,["disabled","onClick"]))],64)}ad.render=sd,ad.__file="src/view/page-designer/component/select-cascader/SelectFieldActionCascader.vue";let cd=class extends xt{constructor(){super(...arguments),this.widgetType=ft.FIELD_ACTION}initialize(e){return super.initialize(e),this.setComponent(ad),this}createDrawerForm({field:e,widgetType:t}){return J(this,void 0,void 0,(function*(){return new Promise(o=>J(this,void 0,void 0,(function*(){const{widgetAttrModel:n,widgetAttrFormViewName:r,widgetBizType:a,widgetSubtype:l}=t,s=i["Drawer"].create(),c=yield i["ViewCache"].get(n,r);if(!c)return void o();const d=Object(i["createRuntimeContextForWidget"])(c),u=d.handle,p=[];if(e.properties)p.push(e.properties);else{let o={};o.element={bizType:a,subtype:l,model:e.model,widget:t,name:e.data,isMock:!1,usingFullSpan:!0};const r=yield d.getInitialValue();Object.keys(r).forEach(e=>{i["ObjectUtils"].isEmpty(o[e])&&i["ObjectUtils"].isNotEmpty(r[e])&&(o[e]=r[e])}),o=yield Object(i["customQuery"])(n,"construct",o,this.fetchRequestFields(d),void 0,void 0),o.label||(o.label=e.label),p.push(o)}const b=s.createWidget(i["FormWidget"],void 0,{metadataHandle:u,rootHandle:u,dataSource:p,activeRecords:p,template:d.viewTemplate,inline:!0});s.setTitle(Object(i["translateValueByKey"])("属性设置")),s.setWidth(400),s.onVisibleChange(!0),s.on("ok",()=>J(this,void 0,void 0,(function*(){o();const t=yield b.validator();if(t){const t=b.getData();delete t.modelDefinition,this.updateExsitValue(Object.assign(Object.assign({},e),{properties:t})),s.onVisibleChange(!1)}}))),s.on("cancel",()=>J(this,void 0,void 0,(function*(){o(),s.onVisibleChange(!1)})))})))}))}fetchRequestFields(e){const t=e.getRequestFields(),o=t.findIndex(e=>"element"===e.data);return-1===o&&this.generatorMetadataFields().forEach(e=>t.push(e)),t}generatorMetadataFields(){return[{name:"element",ttype:i["ModelFieldType"].ManyToOne,references:"ui.designer.UiDesignerElement"}]}};Y([i["Widget"].Reactive(),Q("design:type",Object)],cd.prototype,"widgetType",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],cd.prototype,"createDrawerForm",null),cd=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].String,widget:"MetaPanelFieldAndAction"}))],cd);var dd=Object(a["defineComponent"])({name:"SelectTreeNode",props:Object.assign(Object.assign({},jt),{field:{type:Object,required:!0},selectKeys:{type:Array,required:!0},isTarget:{type:Boolean,default:!1},searchValue:{type:String,default:""}}),components:{ACheckbox:N["a"],Draggable:y.a,OioIcon:r["OioIcon"],OioTooltip:r["OioTooltip"]},emits:["onChange","onChildrenChange","onChildDragend","onChildrenChangeBatch"],setup(e,{emit:t}){const o=Object(a["ref"])(!1),i=Object(a["computed"])(()=>e.searchValue&&d.value||o.value),n=Object(a["computed"])({get(){return e.field.children||[]},set(o){e.isTarget&&t("onChildDragend",{children:o})}}),r=Object(a["computed"])(()=>{var t,o;const i=e.selectKeys.findIndex(t=>t.name===e.field.name);return i<0?[]:(null===(t=e.selectKeys[i].children)||void 0===t?void 0:t.length)&&(null===(o=e.selectKeys[i].children)||void 0===o?void 0:o.map(e=>e.name))||[]}),l=Object(a["computed"])(()=>r.value.length>0&&r.value.length!==n.value.length),s=Object(a["computed"])(()=>!l.value&&e.selectKeys.findIndex(t=>t.name===e.field.name)>-1),c=Object(a["computed"])(()=>{var t;return!e.searchValue||(e.field.name.includes(e.searchValue)||(null===(t=e.field.displayName)||void 0===t?void 0:t.includes(e.searchValue)))}),d=Object(a["computed"])(()=>!e.searchValue||n.value.reduce((t,o)=>{var i;return!(!o.name.includes(e.searchValue)&&!(null===(i=o.displayName)||void 0===i?void 0:i.includes(e.searchValue)))||t},!1)),u=()=>{t("onChange",{name:e.field.name})},p=o=>{t("onChildrenChange",{name:o,parentName:e.field.name,instance:n.value.find(e=>e.name===o)})},b=e=>J(this,void 0,void 0,(function*(){e.preventDefault(),o.value=!o.value})),g=t=>{t.preventDefault(),e.disabled||e.readonly||(e.field.isLeaf?u():b(t))};return{checked:s,indeterminate:l,childCheckedKeys:r,children:n,onExpandClick:b,onSpanClick:g,isExpand:o,expand:i,onChange:u,onChildrenChange:p,rootInSearch:c,childInSearch:d}}});const ud={key:0,class:"select-transfer-checkbox-wrapper"},pd={class:"select-transfer-checkbox"},bd={class:"select-transfer-checkbox-left"},gd={key:0,class:"select-transfer-checkbox-wrapper select-transfer-checkbox-children"},vd={class:"select-transfer-checkbox"};function md(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("oio-tooltip"),c=Object(a["resolveComponent"])("a-checkbox"),d=Object(a["resolveComponent"])("draggable");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[e.rootInSearch||e.childInSearch?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ud,[Object(a["createVNode"])(c,{class:Object(a["normalizeClass"])([e.readonly&&"select-field-checkbox__readonly"]),disabled:e.disabled||e.readonly,checked:e.checked,indeterminate:e.indeterminate,onChange:e.onChange},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",pd,[Object(a["createElementVNode"])("div",bd,[e.field.isLeaf?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:Object(a["normalizeClass"])(["select-transfer-drop-icon",e.expand?"":"select-transfer-drop-icon-expand"]),icon:"oinone-xiala",size:"var(--oio-font-size)",color:"#C0C4CC",onClick:e.onExpandClick},null,8,["class","onClick"])),Object(a["createVNode"])(s,{mouseEnterDelay:.6},{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.field.isLeaf?`${e.field.displayName} - ${e.field.name}`:e.field.displayName),1)]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["select-transfer-checkbox-title",e.field.deleted&&"select-meta-field-action-deleted"]),style:Object(a["normalizeStyle"])({maxWidth:e.field.isLeaf?"130px":"110px"}),onClick:t[0]||(t[0]=(...t)=>e.onSpanClick&&e.onSpanClick(...t))},Object(a["toDisplayString"])(e.field.isLeaf?`${e.field.displayName} - ${e.field.name}`:e.field.displayName),7)]),_:1},8,["mouseEnterDelay"])]),Object(a["createVNode"])(l,{class:"select-transfer-drop-icon",icon:"oinone-yidong",size:"12px",color:"#979797"})])]),_:1},8,["class","disabled","checked","indeterminate","onChange"])])):Object(a["createCommentVNode"])("v-if",!0),e.expand&&e.children.length?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:1,disabled:e.disabled||e.readonly,modelValue:e.children,"onUpdate:modelValue":t[1]||(t[1]=t=>e.children=t),"item-key":"name"},{item:Object(a["withCtx"])(({element:t})=>[t.name.includes(e.searchValue)||t.displayName&&t.displayName.includes(e.searchValue)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",gd,[Object(a["createVNode"])(c,{class:Object(a["normalizeClass"])([e.readonly&&"select-field-checkbox__readonly"]),disabled:e.disabled||e.readonly,checked:e.childCheckedKeys.includes(t.name),onChange:()=>e.onChildrenChange(t.name)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",vd,[Object(a["createVNode"])(s,{mouseEnterDelay:.6},{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.displayName)+" - "+Object(a["toDisplayString"])(t.name),1)]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["select-transfer-checkbox-title","select-transfer-checkbox-title-children",t.deleted&&"select-meta-field-action-deleted"])},Object(a["toDisplayString"])(t.displayName)+" - "+Object(a["toDisplayString"])(t.name),3)]),_:2},1032,["mouseEnterDelay"]),Object(a["createVNode"])(l,{class:"select-transfer-drop-icon",icon:"oinone-yidong",size:"var(--oio-font-size-sm)",color:"#979797"})])]),_:2},1032,["class","disabled","checked","onChange"])])):Object(a["createCommentVNode"])("v-if",!0)]),_:1},8,["disabled","modelValue"])):Object(a["createCommentVNode"])("v-if",!0)],64)}dd.render=md,dd.__file="src/view/page-designer/component/select-transfer/TransferTreeNode.vue";var yd=Object(a["defineComponent"])({name:"SelectFieldActionTransferComponent",props:Object.assign(Object.assign({},i["OioMetadataProps"]),{widgetType:{type:String,required:!0},selectedOptionList:{type:Object,required:!0},unSelectedOptionList:{type:Object,required:!0},onFormChange:{type:Function,required:!0},value:{type:Array,default:()=>[]}}),components:{TreeNode:dd,ACheckbox:N["a"],OioIcon:r["OioIcon"],OioInputSearch:r["OioInputSearch"],Draggable:y.a},slots:["extend"],setup(e){const t=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.readonly)||!1),o=Object(a["computed"])(()=>i["BooleanHelper"].toBoolean(e.disabled)||!1),n=Object(a["ref"])(""),r=Object(a["ref"])(""),l=Object(a["ref"])({left:[],right:[]}),s=Object(a["computed"])(()=>e.selectedOptionList?{left:e.unSelectedOptionList[e.widgetType]||[],right:e.selectedOptionList[e.widgetType]||[]}:{left:[],right:[]}),c=Object(a["computed"])(()=>({left:h(l.value.left).subNum,right:h(l.value.right).subNum})),d=Object(a["computed"])(()=>({left:h(s.value.left).subNum,right:h(s.value.right).subNum})),u=({name:e},t)=>{const o=l.value[t].findIndex(t=>t.name===e);if(o>-1)return void l.value[t].splice(o,1);const i=s.value[t].find(t=>t.name===e);l.value[t].push(g(i))},p=({name:e})=>{u({name:e},"left")},b=({name:e})=>{u({name:e},"right")},g=t=>{var o;return{name:t.name,type:null!==(o=t.type)&&void 0!==o?o:e.widgetType,model:t.model,displayName:t.displayName,isLeaf:t.isLeaf,label:t.label,children:t.children?t.children.map(e=>g(e)):null}},v=({name:e,parentName:t,instance:o},i)=>{var n,r,a,c,d;const u=l.value[i].findIndex(e=>e.name===t);if(u>-1){const t=null!==(r=null===(n=l.value[i][u].children)||void 0===n?void 0:n.findIndex(t=>t.name===e))&&void 0!==r?r:0;return t>-1?1===(null===(a=l.value[i][u].children)||void 0===a?void 0:a.length)?void l.value[i].splice(u,1):void(null===(c=l.value[i][u].children)||void 0===c||c.splice(t,1)):void(null===(d=l.value[i][u].children)||void 0===d||d.push(g(o)))}const p=s.value[i].find(e=>e.name===t);l.value[i].push(Object.assign(Object.assign({},g(p)),{children:[g(o)]}))},m=e=>{v(e,"left")},y=e=>{v(e,"right")},h=e=>{if(!e.length)return{sum:0,subNum:0,keys:[]};const{sum:t,subNum:o,keys:i}=e.reduce((e,t)=>{var o,i;if(!t)return e;const n=[...e.keys];return n.push(t),{sum:e.sum+((null===(o=t.children)||void 0===o?void 0:o.length)||0)+1,subNum:e.subNum+((null===(i=t.children)||void 0===i?void 0:i.length)?t.children.length:1),keys:n}},{sum:0,subNum:0,keys:[]});return{sum:t,subNum:o,keys:i}},f=(t,o)=>(null===t||void 0===t?void 0:t.length)?(null===o||void 0===o?void 0:o.length)?t.filter(e=>{var t,i,n;const r=null===(t=e.children)||void 0===t?void 0:t.length,a=o.findIndex(t=>t.name===e.name&&t.model===e.model);return r?!(a>-1&&(null===(i=o[a].children)||void 0===i?void 0:i.length)===(null===(n=e.children)||void 0===n?void 0:n.length)):a<0}).map(t=>{var i,n,r;const a=o.findIndex(e=>e.name===t.name&&e.model===t.model),l=(null===(i=t.children)||void 0===i?void 0:i.length)&&(null===(r=null===(n=o[a])||void 0===n?void 0:n.children)||void 0===r?void 0:r.length);return Object.assign(Object.assign({},t),{type:e.widgetType,children:l?f(t.children,o[a].children):t.children})}):t:null,O=()=>{if(e.readonly||e.disabled)return;if(!l.value.right.length)return;const t=f(s.value.right,l.value.right);e.onFormChange(t),l.value.right=[]},w=()=>{e.readonly||e.disabled||l.value.left.length&&(e.onFormChange([...s.value.right,...l.value.left]),l.value.left=[])},j=()=>{c.value.left===d.value.left?l.value.left=[]:l.value.left=s.value.left.map(e=>g(e))},k=()=>{c.value.right===d.value.right?l.value.right=[]:l.value.right=s.value.right.map(e=>g(e))},C=e=>{n.value=e},D=e=>{r.value=e},T=({newIndex:t,oldIndex:o})=>{t!==o&&e.onFormChange(s.value.right)},$=({children:t},o)=>{e.onFormChange(s.value.right.map((e,i)=>i===o?Object.assign(Object.assign({},e),{children:t}):e))};return{disabled:o,readonly:t,sourceMap:s,sourceNumMap:d,selectedMap:l,selectedNumMap:c,leftSearchValue:n,rightSearchValue:r,onMoveToLeft:O,onMoveToRight:w,onLeftChange:p,onRightChange:b,onLeftChildChange:m,onRightChildChange:y,onChildDragend:$,onLeftSelectAll:j,onRightSelectAll:k,onLeftSearchChange:C,onRightSearchChange:D,onDragEnd:T}}});const hd={class:"select-field-action-transfer-wrapper"},fd={class:"select-field-action-transfer-column"},Od={class:"select-field-action-select-all"},wd={class:"select-field-action-transfer"},jd={class:"select-field-transfer-draggable"},kd={class:"select-field-action-transfer-arrow"},Cd={class:"select-field-action-transfer-column"},Dd={class:"select-field-action-select-all"},Td={class:"select-field-action-transfer"},$d={class:"select-field-transfer-draggable"};function Ed(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-checkbox"),s=Object(a["resolveComponent"])("oio-input-search"),c=Object(a["resolveComponent"])("tree-node"),d=Object(a["resolveComponent"])("draggable"),u=Object(a["resolveComponent"])("oio-icon");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hd,[Object(a["createElementVNode"])("div",fd,[Object(a["createElementVNode"])("div",Od,[Object(a["createVNode"])(l,{class:Object(a["normalizeClass"])([e.readonly&&"select-field-checkbox__readonly"]),disabled:e.disabled||e.readonly,checked:e.selectedNumMap.left>0&&e.selectedNumMap.left===e.sourceNumMap.left,indeterminate:e.selectedNumMap.left>0&&e.selectedNumMap.left<e.sourceNumMap.left,onChange:e.onLeftSelectAll},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("未展示字段 ")]),_:1},8,["class","disabled","checked","indeterminate","onChange"]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["select-field-action-select-number",e.disabled&&"select-field-action-select-number__disabled"])},Object(a["toDisplayString"])(e.selectedNumMap.left)+" / "+Object(a["toDisplayString"])(e.sourceNumMap.left),3)]),Object(a["createElementVNode"])("div",wd,[Object(a["createVNode"])(s,{disabled:e.disabled,readonly:e.readonly,class:"ant-transfer-list-search",placeholder:e.$translate("请输入搜索内容"),value:e.leftSearchValue,"onUpdate:value":e.onLeftSearchChange},null,8,["disabled","readonly","placeholder","value","onUpdate:value"]),Object(a["createElementVNode"])("div",jd,[Object(a["createVNode"])(d,{modelValue:e.sourceMap.left,"onUpdate:modelValue":t[0]||(t[0]=t=>e.sourceMap.left=t),disabled:e.disabled||e.readonly,"item-key":"name"},{item:Object(a["withCtx"])(({element:t})=>[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{searchValue:e.leftSearchValue,selectKeys:e.selectedMap.left,field:t,disabled:e.disabled,readonly:e.readonly,onOnChange:e.onLeftChange,onOnChildrenChange:e.onLeftChildChange},null,8,["searchValue","selectKeys","field","disabled","readonly","onOnChange","onOnChildrenChange"])])]),_:1},8,["modelValue","disabled"])])])]),Object(a["createElementVNode"])("div",kd,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["select-field-action-move","select-field-action-move-to-left",e.selectedNumMap.right>0&&"select-field-action-move__active",e.disabled&&"select-field-action-move__disabled"]),onClick:t[1]||(t[1]=(...t)=>e.onMoveToLeft&&e.onMoveToLeft(...t))},[Object(a["createVNode"])(u,{class:"select-field-action-move-icon",icon:"oinone-zhutixiala",size:"10px"})],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["select-field-action-move","select-field-action-move-to-right",e.selectedNumMap.left>0&&"select-field-action-move__active",e.disabled&&"select-field-action-move__disabled"]),onClick:t[2]||(t[2]=(...t)=>e.onMoveToRight&&e.onMoveToRight(...t))},[Object(a["createVNode"])(u,{class:"select-field-action-move-icon",icon:"oinone-zhutixiala",size:"10px"})],2)]),Object(a["createElementVNode"])("div",Cd,[Object(a["createElementVNode"])("div",Dd,[Object(a["createVNode"])(l,{class:Object(a["normalizeClass"])([e.readonly&&"select-field-checkbox__readonly"]),disabled:e.disabled||e.readonly,checked:0!==e.selectedNumMap.right&&e.selectedNumMap.right===e.sourceNumMap.right,indeterminate:e.selectedNumMap.right>0&&e.selectedNumMap.right<e.sourceNumMap.right,onChange:e.onRightSelectAll},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("已展示字段 ")]),_:1},8,["class","disabled","checked","indeterminate","onChange"]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["select-field-action-select-number",e.disabled&&"select-field-action-select-number__disabled"])},Object(a["toDisplayString"])(e.selectedNumMap.right)+" / "+Object(a["toDisplayString"])(e.sourceNumMap.right),3)]),Object(a["createElementVNode"])("div",Td,[Object(a["createVNode"])(s,{disabled:e.disabled,readonly:e.readonly,class:"ant-transfer-list-search",placeholder:e.$translate("请输入搜索内容"),value:e.rightSearchValue,"onUpdate:value":e.onRightSearchChange},null,8,["disabled","readonly","placeholder","value","onUpdate:value"]),Object(a["createElementVNode"])("div",$d,[Object(a["createVNode"])(d,{modelValue:e.sourceMap.right,"onUpdate:modelValue":t[3]||(t[3]=t=>e.sourceMap.right=t),disabled:e.disabled||e.readonly,"item-key":"name",onEnd:e.onDragEnd},{item:Object(a["withCtx"])(({element:t,index:o})=>[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{searchValue:e.rightSearchValue,selectKeys:e.selectedMap.right,field:t,isTarget:!0,disabled:e.disabled,readonly:e.readonly,onOnChange:e.onRightChange,onOnChildrenChange:e.onRightChildChange,onOnChildDragend:t=>e.onChildDragend(t,o)},null,8,["searchValue","selectKeys","field","disabled","readonly","onOnChange","onOnChildrenChange","onOnChildDragend"])])]),_:1},8,["modelValue","disabled","onEnd"])])])])])}yd.render=Ed,yd.__file="src/view/page-designer/component/select-transfer/SelectFieldActionTransfer.vue";let Sd=class extends xt{constructor(){super(...arguments),this.widgetType=ft.ACTION}initialize(e){return super.initialize(e),this.setComponent(yd),this}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Sd.prototype,"widgetType",void 0),Sd=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].String,widget:"MetaPanelDisplayAction"}))],Sd);let Nd=class extends xt{constructor(){super(...arguments),this.widgetType=ft.FIELD}initialize(e){return super.initialize(e),this.setComponent(yd),this}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Nd.prototype,"widgetType",void 0),Nd=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:i["ViewType"].Form,ttype:i["ModelFieldType"].String,widget:"MetaPanelDisplayField"}))],Nd);let Vd=class extends i["FormM2OSelectFieldWidget"]{initialize(e){return super.initialize(e),this}loadOptions(){var e,t;return J(this,void 0,void 0,(function*(){const o=null===(t=null===(e=this.currentInstance)||void 0===e?void 0:e.root)||void 0===t?void 0:t.actionCollection;if(o){const e=[i["ViewActionTarget"].OpenWindow,i["ViewActionTarget"].Router],t=Array.from(o).map(e=>e[1].element).filter(t=>{var o,i,n;const r=null===(o=t.widgetData)||void 0===o?void 0:o.name,a=null===(i=t.widgetData)||void 0===i?void 0:i.target;return!(!r||!a)&&(e.includes(a)&&r!==(null===(n=this.value)||void 0===n?void 0:n.name))}).map(e=>Object.assign(Object.assign({},e.widgetData),{displayName:e.properties.label}));return{content:t}}return{content:[]}}))}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){yield e.mounted.call(this),yield this.initLoadOptions()}))}};Y([i["Widget"].Reactive(),i["Widget"].Inject(),Q("design:type",Object)],Vd.prototype,"currentInstance",void 0),Vd=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form,i["ViewType"].Table],ttype:i["ModelFieldType"].ManyToOne,widget:"DesignerRowActionSelect"}))],Vd);const xd=e=>void 0!==e&&null!==e,Id=e=>"function"===typeof e,Md=e=>null!==e&&"object"===typeof e,Ad=e=>"number"===typeof e||/^\d+(\.\d+)?$/.test(e);function Fd(e,t){const o=t.split(".");let i=e;return o.forEach(e=>{var t;i=Md(i)&&null!=(t=i[e])?t:""}),i}const Ld=[Number,String],Rd={type:Boolean,default:!0},Bd=e=>({type:String,default:e});var _d=e=>e===window,Wd=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),Pd=e=>{const t=Object(a["unref"])(e);if(_d(t)){const e=t.innerWidth,o=t.innerHeight;return Wd(e,o)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():Wd(0,0)};function zd(e){if(xd(e))return Ad(e)?e+"px":String(e)}function Gd(e){const t={};return void 0!==e&&(t.zIndex=+e),t}const Ud=/-(\w)/g,Kd=e=>e.replace(Ud,(e,t)=>t.toUpperCase()),qd=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),{hasOwnProperty:Hd}=Object.prototype;function Yd(e,t,o){const i=t[o];xd(i)&&(Hd.call(e,o)&&Md(i)?e[o]=Qd(Object(e[o]),i):e[o]=i)}function Qd(e,t){return Object.keys(t).forEach(o=>{Yd(e,t,o)}),e}var Jd={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>e+"折",condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>e+"张可用"},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const Xd=Object(a["ref"])("zh-CN"),Zd=Object(a["reactive"])({"zh-CN":Jd}),eu={messages(){return Zd[Xd.value]},use(e,t){Xd.value=e,this.add({[e]:t})},add(e={}){Qd(Zd,e)}};var tu=eu;function ou(e){const t=Kd(e)+".";return(e,...o)=>{const i=tu.messages(),n=Fd(i,t+e)||Fd(i,e);return Id(n)?n(...o):n}}function iu(e,t){return t?"string"===typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,o)=>t+iu(e,o),""):Object.keys(t).reduce((o,i)=>o+(t[i]?iu(e,i):""),""):""}function nu(e){return(t,o)=>(t&&"string"!==typeof t&&(o=t,t=""),t=t?`${e}__${t}`:e,`${t}${iu(t,o)}`)}function ru(e){const t="van-"+e;return[t,nu(t),ou(t)]}const au="van-hairline",lu=au+"--bottom",su="van-haptics-feedback";function cu(e){return e.install=t=>{const{name:o}=e;o&&(t.component(o,e),t.component(Kd("-"+o),e))},e}const du=Symbol();function uu(e){const t=Object(a["inject"])(du,null);t&&Object(a["watch"])(t,t=>{t&&e()})}const pu=(e,t)=>{const o=Object(a["ref"])(),i=()=>{o.value=Pd(e).height};return Object(a["onMounted"])(()=>{if(Object(a["nextTick"])(i),t)for(let e=1;e<=3;e++)setTimeout(i,100*e)}),uu(()=>Object(a["nextTick"])(i)),o};function bu(e,t){const o=pu(e,!0);return e=>Object(a["createVNode"])("div",{class:t("placeholder"),style:{height:o.value?o.value+"px":void 0}},[e()])}const[gu,vu]=ru("badge"),mu={dot:Boolean,max:Ld,tag:Bd("div"),color:String,offset:Array,content:Ld,showZero:Rd,position:Bd("top-right")};var yu=Object(a["defineComponent"])({name:gu,props:mu,setup(e,{slots:t}){const o=()=>{if(t.content)return!0;const{content:o,showZero:i}=e;return xd(o)&&""!==o&&(i||0!==o&&"0"!==o)},i=()=>{const{dot:i,max:n,content:r}=e;if(!i&&o())return t.content?t.content():xd(n)&&Ad(r)&&+r>n?n+"+":r},n=Object(a["computed"])(()=>{const o={background:e.color};if(e.offset){const[i,n]=e.offset;t.default?(o.top=zd(n),o.right="number"===typeof i?zd(-i):i.startsWith("-")?i.replace("-",""):"-"+i):(o.marginTop=zd(n),o.marginLeft=zd(i))}return o}),r=()=>{if(o()||e.dot)return Object(a["createVNode"])("div",{class:vu([e.position,{dot:e.dot,fixed:!!t.default}]),style:n.value},[i()])};return()=>{if(t.default){const{tag:o}=e;return Object(a["createVNode"])(o,{class:vu("wrapper")},{default:()=>[t.default(),r()]})}return r()}}});const hu=cu(yu),fu=e=>{},[Ou,wu]=ru("config-provider"),ju=Symbol(Ou),ku={tag:Bd("div"),zIndex:Number,themeVars:Object,iconPrefix:String};function Cu(e){const t={};return Object.keys(e).forEach(o=>{t["--van-"+qd(o)]=e[o]}),t}Object(a["defineComponent"])({name:Ou,props:ku,setup(e,{slots:t}){const o=Object(a["computed"])(()=>{if(e.themeVars)return Cu(e.themeVars)});return Object(a["provide"])(ju,e),Object(a["watchEffect"])(()=>{void 0!==e.zIndex&&fu(e.zIndex)}),()=>Object(a["createVNode"])(e.tag,{class:wu(),style:o.value},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[Du,Tu]=ru("icon"),$u=e=>null==e?void 0:e.includes("/"),Eu={dot:Boolean,tag:Bd("i"),name:String,size:Ld,badge:Ld,color:String,badgeProps:Object,classPrefix:String};var Su=Object(a["defineComponent"])({name:Du,props:Eu,setup(e,{slots:t}){const o=Object(a["inject"])(ju,null),i=Object(a["computed"])(()=>e.classPrefix||(null==o?void 0:o.iconPrefix)||Tu());return()=>{const{tag:o,dot:n,name:r,size:l,badge:s,color:c}=e,d=$u(r);return Object(a["createVNode"])(hu,Object(a["mergeProps"])({dot:n,tag:o,class:[i.value,d?"":`${i.value}-${r}`],style:{color:c,fontSize:zd(l)},content:s},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),d&&Object(a["createVNode"])("img",{class:Tu("image"),src:r},null)]}})}}});const Nu=cu(Su),[Vu,xu]=ru("nav-bar"),Iu={title:String,fixed:Boolean,zIndex:Ld,border:Rd,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean};var Mu=Object(a["defineComponent"])({name:Vu,props:Iu,emits:["click-left","click-right"],setup(e,{emit:t,slots:o}){const i=Object(a["ref"])(),n=bu(i,xu),r=e=>t("click-left",e),l=e=>t("click-right",e),s=()=>o.left?o.left():[e.leftArrow&&Object(a["createVNode"])(Nu,{class:xu("arrow"),name:"arrow-left"},null),e.leftText&&Object(a["createVNode"])("span",{class:xu("text")},[e.leftText])],c=()=>o.right?o.right():Object(a["createVNode"])("span",{class:xu("text")},[e.rightText]),d=()=>{const{title:t,fixed:n,border:d,zIndex:u}=e,p=Gd(u),b=e.leftArrow||e.leftText||o.left,g=e.rightText||o.right;return Object(a["createVNode"])("div",{ref:i,style:p,class:[xu({fixed:n}),{[lu]:d,"van-safe-area-top":e.safeAreaInsetTop}]},[Object(a["createVNode"])("div",{class:xu("content")},[b&&Object(a["createVNode"])("div",{class:[xu("left"),su],onClick:r},[s()]),Object(a["createVNode"])("div",{class:[xu("title"),"van-ellipsis"]},[o.title?o.title():t]),g&&Object(a["createVNode"])("div",{class:[xu("right"),su],onClick:l},[c()])])])};return()=>e.fixed&&e.placeholder?n(d):d()}});const Au=cu(Mu);var Fu;(function(e){e["WIDGET"]="UI_WIDGET",e["PAGE"]="UI_PAGE"})(Fu||(Fu={}));var Lu=Object(a["defineComponent"])({name:"DesignerContentHeader",components:{CaretDownOutlined:U["a"],ADropdown:M["a"],AMenu:A["a"],AMenuItem:F["a"]},props:{applicationIcon:{type:String,required:!0},modules:{type:Array,required:!0},currentModule:{type:String,required:!0}},emits:{onModuleSelected:null},setup(e,t){var o;const i=Object(a["ref"])({});i.value=(null===(o=e.modules)||void 0===o?void 0:o.find(t=>t.module===e.currentModule))||{};const n=Object(a["computed"])(()=>{var t;const o=e.currentModule;return(null===(t=e.modules)||void 0===t?void 0:t.filter(e=>e.module===o?(i.value=e,!1):!l["f"].includes(e.module)))||[]}),r=e=>e.parentNode||document.body,s=({key:e})=>{t.emit("onModuleSelected",e)};return{popupContainer:r,currentModules:n,selectedModule:i,onModuleSelected:s}}});const Ru={class:"designer-content-header"},Bu={class:"designer-content-header-left"},_u={class:"designer-application-select"},Wu=["src"],Pu={class:"designer-application-select-title"},zu=Object(a["createElementVNode"])("div",{class:"designer-content-header-right"},null,-1);function Gu(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("caret-down-outlined"),s=Object(a["resolveComponent"])("a-menu-item"),c=Object(a["resolveComponent"])("a-menu"),d=Object(a["resolveComponent"])("a-dropdown");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ru,[Object(a["createElementVNode"])("div",Bu,[Object(a["createVNode"])(d,{class:"designer-content-header-application-selector",getPopupContainer:e.popupContainer,trigger:["click","hover"]},{overlay:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{class:"designer-content-application-selector-overlay",selectable:"",onSelect:e.onModuleSelected},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.currentModules,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.module},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.displayName),1)]),_:2},1024))),128))]),_:1},8,["onSelect"])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",_u,[Object(a["createElementVNode"])("img",{src:e.applicationIcon,alt:"Pamirs Application"},null,8,Wu),Object(a["createElementVNode"])("span",Pu,Object(a["toDisplayString"])(e.selectedModule.displayName),1),Object(a["createVNode"])(l,{style:{"font-size":"12px",color:"#919dac"}})])]),_:1},8,["getPopupContainer"])]),zu])}Lu.render=Gu,Lu.__file="src/view/page-designer/component/designer-header.vue";var Uu=Object(a["defineComponent"])({name:"PageDesignerHeader",components:{UiGuidePopover:ve,DesignerCommonHeader:n["o"],OioIcon:r["OioIcon"],OioButton:r["OioButton"],OioDivider:r["OioDivider"]},props:{viewClientType:{type:String},viewType:{type:String},originPageSettingData:{type:Object,required:!0},currentPageSettingData:{type:Object,required:!0},isShowMasterMask:{type:Boolean,default:!1},allowCancelCurrentEdit:{type:Boolean,default:!1},allowRecoverLastEdit:{type:Boolean,default:!1},hasHistoryRecord:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},saveView:{type:Function},saving:{type:Boolean,default:void 0},saveResult:{type:Boolean,default:!0}},emits:["update:isShowMasterMask","update:isShowCardDesign","cancelEdit","recoverEdit","change-view-client-type","showHistory","gotoDesignerList"],setup(e,t){const o=Object(a["ref"])({save:!1}),r=Object(a["computed"])(()=>{var t,o;return(null===(t=e.currentPageSettingData)||void 0===t?void 0:t.name)||(null===(o=e.originPageSettingData)||void 0===o?void 0:o.name)}),s=()=>{t.emit("gotoDesignerList")},c=()=>{t.emit("update:isShowMasterMask",!e.isShowMasterMask)},d=()=>J(this,void 0,void 0,(function*(){if(!e.disabled){o.value.save=!0;try{e.saveView&&(yield e.saveView())}finally{o.value.save=!1}}})),u=e=>{t.emit("cancelEdit",e)},p=e=>{t.emit("recoverEdit",e)},b=e=>{t.emit("change-view-client-type",e)},g=e=>{t.emit("showHistory",e)},v=()=>{l["db"].setItem("UI_PAGE_DESIGNER_JULY_FORECAST","DONE")};return Object(a["watch"])(()=>e.viewClientType,()=>{const t=document.querySelector("html");t&&(e.viewClientType===i["ViewClientType"].MOBILE?t.style.fontSize="37.5px":t.style.removeProperty("fontSize"))},{immediate:!0}),{loading:o,title:r,gotoBack:s,save:d,switchMasterMask:c,onCancelEdit:u,onRecoverEdit:p,onShowHistory:g,ViewClientType:i["ViewClientType"],onChangeViewClientType:b,UiGuideArea:be,UiGuideKey:ge,infoClose:v,STATIC_RESOURCE:{bgImageUrl:Object(n["tc"])("hide_mask_1651398680997.png?x-oss-process=image/resize,m_lfit,h_800")}}}});const Ku={class:"designer-layout-header-toolbar"};function qu(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("oio-divider"),c=Object(a["resolveComponent"])("designer-common-header");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{"save-result":e.saveResult,saving:e.saving,title:e.title,class:"page-designer-header",onGoBack:e.gotoBack},{toolbar:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Ku,[Object(a["createCommentVNode"])("      <oio-button"),Object(a["createCommentVNode"])('        type="link"'),Object(a["createCommentVNode"])('        icon="oinone-houtui"'),Object(a["createCommentVNode"])('        title="撤销(ctrl + z)"'),Object(a["createCommentVNode"])("        :icon-color=\"(disabled || !allowCancelCurrentEdit) ? 'var(&#45;&#45;oio-disabled-color)' : 'var(&#45;&#45;oio-text-color-secondary)'\""),Object(a["createCommentVNode"])('        :disabled="disabled || !allowCancelCurrentEdit"'),Object(a["createCommentVNode"])('        @click="onCancelEdit"'),Object(a["createCommentVNode"])("      />"),Object(a["createCommentVNode"])("      <oio-button"),Object(a["createCommentVNode"])('        type="link"'),Object(a["createCommentVNode"])('        icon="oinone-qianjin"'),Object(a["createCommentVNode"])('        title="恢复(ctrl + shift + z)"'),Object(a["createCommentVNode"])("        :icon-color=\"(disabled || !allowRecoverLastEdit) ? 'var(&#45;&#45;oio-disabled-color)' : 'var(&#45;&#45;oio-text-color-secondary)'\""),Object(a["createCommentVNode"])('        :disabled="disabled || !allowRecoverLastEdit"'),Object(a["createCommentVNode"])('        @click="onRecoverEdit"'),Object(a["createCommentVNode"])("      />"),Object(a["createVNode"])(l,{class:Object(a["normalizeClass"])(["view-client-type-selector",e.viewClientType===e.ViewClientType.PC&&"view-client-type-selected"]),disabled:e.viewClientType===e.ViewClientType.PC,title:e.$translate("切换为电脑模式"),type:"link",icon:"oinone-client-pc",onClick:t[0]||(t[0]=t=>e.onChangeViewClientType(e.ViewClientType.PC))},null,8,["class","disabled","title"]),Object(a["createVNode"])(l,{class:Object(a["normalizeClass"])(["view-client-type-selector",e.viewClientType===e.ViewClientType.MOBILE&&"view-client-type-selected"]),disabled:e.viewClientType===e.ViewClientType.MOBILE,title:e.$translate("切换为移动端"),type:"link",icon:"oinone-client-mobile",onClick:t[1]||(t[1]=t=>e.onChangeViewClientType(e.ViewClientType.MOBILE))},null,8,["class","disabled","title"]),Object(a["createVNode"])(l,{disabled:e.disabled||!e.hasHistoryRecord,title:e.$translate("查看历史版本"),type:"link",icon:"oinone-lishibanben",onClick:e.onShowHistory},null,8,["disabled","title","onClick"])]),Object(a["createVNode"])(s,{style:{"margin-right":"24px"},type:"vertical"}),Object(a["createVNode"])(l,{disabled:e.disabled,icon:e.isShowMasterMask?"oinone-zuixiaohua":"oinone-zuidahua",class:"page-designer-header-right-show-master-mask",type:"link",onClick:Object(a["withModifiers"])(e.switchMasterMask,["stop"])},{default:Object(a["withCtx"])(()=>[e.isShowMasterMask?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("隐藏母版")),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("显示母版")),1)],64)),Object(a["createCommentVNode"])(" 引导提示暂时注释 "),Object(a["createCommentVNode"])(' <div v-show="isShowMasterMask">\n          <ui-guide-popover\n            :get-popup-container="(node) => node.parentNode"\n            :guide-area="UiGuideArea.UI_GUIDE_PAGE_DESIGNER"\n            :guide-key="UiGuideKey.IS_SHOW_MASTER_MASK"\n            :i-know-style="{ \'margin-top\': \'16px\' }"\n            :tips-style="{ padding: \'42px 16px 16px 16px\' }"\n            bg-height="124px"\n            :bg-image-url="STATIC_RESOURCE.bgImageUrl"\n            bg-width="300px"\n            overlay-class-name="hide-mask"\n            placement="bottom"\n            :tips="$translate(\'可隐藏母版专注于页面主要内容的设计哦~\')"\n          />\n        </div> ')]),_:1},8,["disabled","icon","onClick"]),Object(a["createVNode"])(l,{disabled:e.disabled,loading:e.loading.save,icon:"oinone-fabu",type:"primary",onClick:Object(a["withModifiers"])(e.save,["stop"])},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("发布")),1)]),_:1},8,["disabled","loading","onClick"])]),_:1},8,["save-result","saving","title","onGoBack"])}Uu.render=qu,Uu.__file="src/view/page-designer/component/header.vue";var Hu=Object(a["defineComponent"])({name:"UiIconSizeReset",inheritAttrs:!1,components:{OioIcon:r["OioIcon"]},props:{currentInstance:{type:Object,required:!0}},setup(e){const t=()=>{var t,o;const i=null===(o=null===(t=e.currentInstance)||void 0===t?void 0:t.defaultProperties)||void 0===o?void 0:o.size;e.currentInstance.element.properties.size=i||"14",e.currentInstance.element.properties.color=void 0};return{resetIcon:t}}});const Yu={class:"ui-icon-size-reset"},Qu={class:"title"};function Ju(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-popconfirm");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Yu,[Object(a["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-xunhuancaozuo",size:"16px"}),Object(a["createVNode"])(s,{"cancel-text":e.$translate("取消"),"ok-text":e.$translate("确定"),title:e.$translate("确认将图标恢复默认大小？"),onConfirm:e.resetIcon},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",Qu,Object(a["toDisplayString"])(e.$translate("重置")),1)]),_:1},8,["cancel-text","ok-text","title","onConfirm"])])}var Xu,Zu;Hu.render=Ju,Hu.__file="src/view/page-designer/component/icon-size/UiIconSizeReset.vue",function(e){e["ICON"]="icon",e["TEXT"]="text"}(Xu||(Xu={})),function(e){e["WIDGET_LIB"]="WIDGET_LIB",e["DESIGN_STRUCTURE"]="DESIGN_STRUCTURE",e["PAGE_SETTING"]="PAGE_SETTING",e["MULTI_LANGUAGE"]="MULTI_LANGUAGE"}(Zu||(Zu={}));const ep=[{id:Zu.WIDGET_LIB,title:"组件库",icon:"iconfont oinone-zujianku"},{id:Zu.DESIGN_STRUCTURE,title:"设计大纲",icon:"iconfont oinone-shejidagang"},{id:Zu.PAGE_SETTING,title:"页面设置",icon:"iconfont oinone-yemianshezhi"}];var tp=Object(a["defineComponent"])({name:"ButtonSelect",components:{OioTooltipHelp:r["OioTooltipHelp"]},props:{multi:{type:Boolean,default:!1},mode:{type:String,default:Xu.TEXT},key:{type:String,default:"id"},labelKey:{type:String,default:"name"},options:{type:Array,required:!0},defaultSelected:{type:Boolean,default:!0},activeKey:String,callback:Function,buttonStyle:{type:String,default:"outline"},customGroupClass:{type:String,default:"button-select-group"},customItemClass:{type:String,default:"button-select-item"},disabled:{type:Boolean,default:!1}},emits:["update:activeKey","onSelected"],setup(e,t){const o=o=>{t.emit("update:activeKey",o[e.key]),t.emit("onSelected",o)},i=()=>{console.error("暂不支持")},r=()=>{let t=e.activeKey,i=!1;if(!t){i=!0;let o=e.options[0];o&&(t=o[e.key])}if(i&&t){let i=e.options.find(o=>o[e.key]==t);i&&o(i)}};return Object(a["onMounted"])(()=>J(this,void 0,void 0,(function*(){e.options&&e.defaultSelected&&(e.multi?i():r())}))),{Mode:Xu,SettingSelectOption:Zu,onClick:o,UiGuideArea:be,UiGuideKey:ge,STATIC_RESOURCE:{bgImageUrl:Object(n["tc"])("widget_lib_1651398996610.png?x-oss-process=image/resize,m_lfit,h_800")}}}});const op={class:"button-select"},ip={key:0};function np(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-tooltip-help"),s=Object(a["resolveComponent"])("a-radio-button"),c=Object(a["resolveComponent"])("a-radio-group");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",op,[Object(a["createVNode"])(c,{value:e.activeKey,"onUpdate:value":t[0]||(t[0]=t=>e.activeKey=t),"button-style":e.buttonStyle,class:Object(a["normalizeClass"])(e.customGroupClass),disabled:e.disabled},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.options,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{class:Object(a["normalizeClass"])(e.customItemClass),value:t[e.key],onClick:o=>e.onClick(t)},{default:Object(a["withCtx"])(()=>[e.mode===e.Mode.TEXT?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ip,Object(a["toDisplayString"])(t[e.labelKey]),1)):Object(a["createCommentVNode"])("v-if",!0),e.mode===e.Mode.ICON?(Object(a["openBlock"])(),Object(a["createElementBlock"])("i",{key:1,class:Object(a["normalizeClass"])(t[e.labelKey])},null,2)):Object(a["createCommentVNode"])("v-if",!0),t.help?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:2,content:t.help},null,8,["content"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createCommentVNode"])(" 引导提示暂时注释 "),Object(a["createCommentVNode"])(' <ui-guide-popover\n          v-if="item.id === SettingSelectOption.WIDGET_LIB && activeKey === SettingSelectOption.WIDGET_LIB"\n          :active="item.id === activeKey"\n          :guide-area="UiGuideArea.UI_GUIDE_PAGE_DESIGNER"\n          :guide-key="UiGuideKey.WIDGET_LIB"\n          :i-know-style="{ \'margin-top\': \'16px\' }"\n          :tips-style="{ padding: \'16px 16px 16px 42px\' }"\n          bg-height="98px"\n          :bg-image-url="STATIC_RESOURCE.bgImageUrl"\n          bg-width="209px"\n          overlay-class-name="widget-lib"\n          placement="rightBottom"\n          tips="可拖拽组件设计页面哦"\n        /> ')]),_:2},1032,["class","value","onClick"]))),256))]),_:1},8,["value","button-style","class","disabled"])])}tp.render=np,tp.__file="src/view/page-designer/component/button-select/button-select.vue";var rp=Object(a["defineComponent"])({name:"RegenerateFormRadio",components:{ARadio:h["a"],ARadioGroup:D["a"]},props:{value:{type:String},options:{type:Array}},setup(e,t){const o=e=>{t.emit("update:value",e)},n=Object(a["computed"])(()=>{var t;return null===(t=e.options)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)}))});return{clickRadio:o,translatedOptions:n}}});const ap={class:"form-enum-radio"},lp=["title","onMousedown"];function sp(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-radio"),s=Object(a["resolveComponent"])("a-radio-group");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ap,[Object(a["createVNode"])(s,{class:"button-group",value:e.value},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.translatedOptions,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.value,value:t.value,onMousedown:Object(a["withModifiers"])(o=>e.clickRadio(t.value),["stop"])},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",{class:"oio-radio-label",title:t.label,onMousedown:Object(a["withModifiers"])(o=>e.clickRadio(t.value),["stop"])},Object(a["toDisplayString"])(t.label),41,lp)]),_:2},1032,["value","onMousedown"]))),128))]),_:1},8,["value"])])}var cp,dp;rp.render=sp,rp.__file="src/view/page-designer/component/regenerate-view/regenerate-form/fields/radio/RegenerateFormRadio.vue",function(e){e["ALL_REGENERATE"]="全部重新生成",e["CHANGE_PART_REGENERATE"]="仅变更部分重新生成"}(cp||(cp={})),function(e){e["ALL_REGENERATE"]="ALL_REGENERATE",e["CHANGE_PART_REGENERATE"]="CHANGE_PART_REGENERATE"}(dp||(dp={}));const up=[{label:cp.ALL_REGENERATE,value:dp.ALL_REGENERATE},{label:cp.CHANGE_PART_REGENERATE,value:dp.CHANGE_PART_REGENERATE}],pp={regenerateDefaultViewType:[{required:!0,message:"请输入重新生成默认视图方式",trigger:["blur"]}]};var bp=Object(a["defineComponent"])({name:"RegenerateView",components:{OioFormItem:r["OioFormItem"],OioModal:r["OioModal"],RegenerateFormRadio:rp,OioForm:r["OioForm"],OioIcon:r["OioIcon"]},inheritAttrs:!1,props:{},emits:["regenerate"],setup(e,{emit:t}){const o=Object(a["ref"])(),i=Object(a["ref"])({}),n=Object(a["ref"])(!1),l=()=>{n.value=!0},s=()=>J(this,void 0,void 0,(function*(){const e=yield o.value.validate();e&&(t("regenerate",e),n.value=!1)})),c=()=>{n.value=!1};return{regenerateDialogVisible:n,onOpenRegenerate:l,onEnterRegenerateModal:s,onCloseRegenerateModal:c,form:o,FormLayout:r["FormLayout"],regenerateFormRules:pp,regenerateForm:i,regenerateDefaultViewOptions:up}}});function gp(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-tooltip"),c=Object(a["resolveComponent"])("RegenerateFormRadio"),d=Object(a["resolveComponent"])("oio-form-item"),u=Object(a["resolveComponent"])("oio-form"),p=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"anchor-drawer-icon-button",onClick:t[2]||(t[2]=Object(a["withModifiers"])((...t)=>e.onOpenRegenerate&&e.onOpenRegenerate(...t),["stop"]))},[Object(a["createVNode"])(s,{placement:"bottom",title:e.$translate("重新生成默认视图")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{icon:"oinone-a-zhongxinshengcheng2x",size:"10px"})]),_:1},8,["title"]),Object(a["createVNode"])(p,{visible:e.regenerateDialogVisible,"onUpdate:visible":t[1]||(t[1]=t=>e.regenerateDialogVisible=t),"enter-callback":e.onEnterRegenerateModal,"cancel-callback":e.onCloseRegenerateModal,title:e.$translate("重新生成默认视图"),class:"anchor-drawer-regenerate-modal"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{ref:"form",data:e.regenerateForm,layout:e.FormLayout.VERTICAL,rules:e.regenerateFormRules},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{label:e.$translate("默认视图"),name:"regenerateDefaultViewType",required:""},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{value:e.regenerateForm.regenerateDefaultViewType,"onUpdate:value":t[0]||(t[0]=t=>e.regenerateForm.regenerateDefaultViewType=t),options:e.regenerateDefaultViewOptions},null,8,["value","options"])]),_:1},8,["label"])]),_:1},8,["data","layout","rules"])]),_:1},8,["visible","enter-callback","cancel-callback","title"])])}bp.render=gp,bp.__file="src/view/page-designer/component/regenerate-view/RegenerateView.vue";const vp=new Map,mp=[],yp=[{help:"",title:n["B"].VIEW,isSubType:!1,realType:n["B"].VIEW,getRealTitle:e=>e.title||"视图"},{help:"",title:n["B"].ELEMENT,isSubType:!1,realType:n["B"].ELEMENT,getRealTitle:e=>{var t;return e.title||(null===(t=e.widget)||void 0===t?void 0:t.widgetDisplayName)||"-"}},{help:"",title:n["B"].SLOT,isSubType:!1,realType:n["B"].SLOT,getRealTitle:e=>e.subtype===n["A"].ACTION_BAR?"动作区":e.subtype===n["A"].DEFAULT?"主区":e.title},{help:"",title:"动作",isSubType:!1,realType:n["B"].ACTION,getRealTitle:e=>{var t,o;return(null===(t=e.properties)||void 0===t?void 0:t.label)||(null===(o=e.widgetData)||void 0===o?void 0:o.displayName)}},{help:"",title:"图表",isSubType:!1,realType:n["A"].CHART,getRealTitle:e=>e.title||n["A"].CHART},{help:"",title:"报表",isSubType:!1,realType:n["A"].REPORT,getRealTitle:e=>e.title||n["A"].REPORT},{help:"",title:"数据大屏",isSubType:!1,realType:n["A"].DATA_DASHBOARD,getRealTitle:e=>e.title||n["A"].DATA_DASHBOARD},{help:"",title:"MEDIA",isSubType:!1,realType:n["A"].PARAGRAPH,getRealTitle:e=>e.title||"段落"},{help:"",title:"MEDIA",isSubType:!1,realType:n["A"].PICTURE,getRealTitle:e=>e.title||"图片"},{help:"",title:"MEDIA",isSubType:!1,realType:n["A"].ICON,getRealTitle:e=>e.title||"图标"},{help:"",title:"字段",isSubType:!1,realType:n["B"].FIELD,getRealTitle:e=>{var t;return e.properties.label||(null===(t=e.widgetData)||void 0===t?void 0:t.displayName)||"字段"}},{help:"",title:"CONTAINER",isSubType:!1,realType:n["ub"].CONTAINER,getRealTitle:e=>e.title||"CONTAINER"},{help:"",title:"表格视图",isSubType:!0,realType:n["A"].TABLE,getRealTitle:e=>e.title||"表格视图"},{help:"",title:"表格组件",isSubType:!0,realType:`${n["B"].ELEMENT}#${n["A"].TABLE}`,getRealTitle:e=>"表格组件"},{help:"",title:"表单视图",isSubType:!0,realType:n["A"].FORM,getRealTitle:e=>"表单视图"},{help:"",title:"表单组件",isSubType:!0,realType:`${n["B"].ELEMENT}#${n["A"].FORM}`,getRealTitle:e=>"表单组件"},{help:"",title:"详情视图",isSubType:!0,realType:n["A"].DETAIL,getRealTitle:e=>"详情视图"},{help:"",title:"详情组件",isSubType:!0,realType:`${n["B"].ELEMENT}#${n["A"].DETAIL}`,getRealTitle:e=>"详情组件"},{help:"",title:"搜索视图",isSubType:!0,realType:n["A"].SEARCH,getRealTitle:e=>"搜索视图"},{help:"",title:"搜索组件",isSubType:!0,realType:`${n["B"].ELEMENT}#${n["A"].SEARCH}`,getRealTitle:e=>"搜索组件"},{help:"",title:"主区域",isSubType:!0,realType:n["A"].DEFAULT,getRealTitle:e=>e.title||"主区域"},{help:"",title:"头部区域",isSubType:!0,realType:n["A"].HEADER,getRealTitle:e=>e.title||"头部区域"},{help:"",title:"底部区域",isSubType:!0,realType:n["A"].FOOTER,getRealTitle:e=>e.title||"底部区域"},{help:"",title:"表头动作",isSubType:!0,realType:n["A"].ACTION_BAR,getRealTitle:e=>e.title||"表头动作"},{help:"",title:"行内动作",isSubType:!0,realType:n["A"].ROW_ACTIONS,getRealTitle:e=>e.title||"行内动作"},{help:"",title:"行内动作",isSubType:!0,realType:n["A"].ROW_ACTIONS_WIDGET,getRealTitle:e=>e.title||"行内动作"},{help:"",title:"行",isSubType:!0,realType:n["A"].ROW,getRealTitle:e=>e.title||"行"},{help:"",title:"块",isSubType:!0,realType:n["A"].BLOCK,getRealTitle:e=>e.title||"块"},{help:"",title:"弹窗",isSubType:!0,realType:n["A"].MODAL,getRealTitle:e=>e.title||"弹窗"},{help:"",title:"分组",isSubType:!0,realType:n["A"].GROUP,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.title)||e.title||"分组"}},{help:"",title:"选项卡",isSubType:!0,realType:n["A"].TABS,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.title)||e.title||"选项卡"}},{help:"",title:"选项页",isSubType:!0,realType:n["A"].TAB,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.title)||e.title||"选项页"}},{help:"",title:"链接动作",isSubType:!0,realType:n["A"].URL_ACTION,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.label)||e.title||"链接动作"}},{help:"",title:"服务器动作",isSubType:!0,realType:n["A"].SERVER_ACTION,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.label)||e.title||"提交动作"}},{help:"",title:"客户端动作",isSubType:!0,realType:n["A"].CLIENT_ACTION,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.label)||e.title||"客户端动作"}},{help:"",title:"客户端函数动作",isSubType:!0,realType:n["A"].CLIENT_FUNCTION_ACTION,getRealTitle:e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.label)||e.title||"客户端函数动作"}}];function hp(){yp.forEach(e=>{vp.set(e.realType,e),mp.push(e.realType)})}function fp(e,t){if(!e||!e.isWidgetInstance)return[];const o=[];let i;if(t&&t.isWidgetInstance){let e;e=n["R"].isModal(t).result||n["R"].isDrawer(t).result||n["R"].isInnerPopup(t).result?t:Object(n["qc"])(t,e=>{{const{result:t,slotName:o}=n["R"].isModal(e);if(t&&!o)return!0}{const{result:t,slotName:o}=n["R"].isDrawer(e);if(t&&!o)return!0}{const{result:t,slotName:o}=n["R"].isInnerPopup(e);if(t&&!o)return!0}return!1},e=>e.root),e&&(i=wp(e,0))}return i||(i=wp(e,0)),i&&o.push(i),o}function Op(e){const{bizType:t,subtype:o}=e;let i;if(o){if(i=`${t}#${o}`,mp.includes(i))return i;if(i=o,mp.includes(i))return i}return t}function wp(e,t,o){var r,l,s;const c=e.id,d=e.element,{bizType:u,subtype:p,disableSelected:b}=d;if(!Object(n["Fc"])(e)||p===n["A"].HEADER)return;const v=[];let m=e.children;const y=p&&[n["A"].ROW,n["A"].COL,n["A"].BLOCK,n["A"].DEFAULT].includes(p);let h=y&&o||{};if(m&&m.length)for(let i=0;i<m.length;i++){const e=m[i];if(!e.isWidgetInstance)continue;{const{result:t,slotName:o}=n["R"].isModal(e);if(t&&!o)continue}{const{result:t,slotName:o}=n["R"].isDrawer(e);if(t&&!o)continue}{const{result:t,slotName:o}=n["R"].isInnerPopup(e);if(t&&!o)continue}const t=wp(e,i,h);t&&(Object(g["a"])(t)?t.forEach(e=>v.push(e)):v.push(t))}return y?v:(h.key=c,h.title=Object(a["unref"])(null===(r=e.options)||void 0===r?void 0:r.title)||Object(i["translateValueByKey"])(null===(l=vp.get(Op(d)))||void 0===l?void 0:l.getRealTitle(d))||(null===(s=d.widget)||void 0===s?void 0:s.widgetDisplayName),h.parent=o,h.children=v,h.disabled=b,h.instance=e,h.index=t,h.type=u,h.subtype=p,h)}hp();var jp=Object(a["defineComponent"])({name:"UiDesignStructureTree",props:{currentDesignData:{type:Object},currentSelectedInstance:{type:Object}},setup(e){const{onSelectCurrentInstance:t,changeDesignerCardShowStatus:o}=te(),i=Object(a["computed"])(()=>fp(e.currentDesignData,e.currentSelectedInstance)),r=Object(a["computed"])(()=>{const t=e.currentSelectedInstance,o=null===t||void 0===t?void 0:t.id;if(o){const e=[];return e.push(o),e}return[]}),l=Object(a["ref"])(),s=Object(a["ref"])(),c=e=>{var t,i,r,a;(null===(i=null===(t=e.superRoot)||void 0===t?void 0:t.element)||void 0===i?void 0:i.subtype)===n["sb"].GALLERY&&((null===(a=null===(r=e.root)||void 0===r?void 0:r.element)||void 0===a?void 0:a.subtype)===n["sb"].SEARCH||e.element.bizType===n["B"].ACTION&&e.parent.element.subtype!==n["A"].ROW_ACTIONS?o&&o({target:{value:!1}}):o&&o({target:{value:!0}}))},d=(e,o)=>{var i;if(e.length>0){const e=o.selectedNodes[0].instance,r=null===(i=o.selectedNodes[0].instance)||void 0===i?void 0:i.currentWidget;r?(c(e),t(e),s.value="#"+Object(n["jc"])(e.id),Object(a["nextTick"])(()=>{l.value.click()})):(o.selected=!1,t(void 0))}};return{realData:i,anchorRef:l,designerElementId:s,selectedKeys:r,clickTreeLeaf:d}}});const kp={class:"ui-design-structure-tree"},Cp=["href"];function Dp(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-tree");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",kp,[e.realData.length?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:"oio-tree",selectedKeys:e.selectedKeys,showLine:!1,"tree-data":e.realData,"auto-expand-parent":"","default-expand-all":"",onSelect:e.clickTreeLeaf},null,8,["selectedKeys","tree-data","onSelect"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("a",{ref:"anchorRef",href:e.designerElementId},null,8,Cp)])}jp.render=Dp,jp.__file="src/view/page-designer/component/widget/design-structure/UiDesignStructureTree.vue";var Tp=Object(a["defineComponent"])({name:"MultiLanguage",setup(e){}});function $p(e,t,o,i,n,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("span",null,"多语言")}Tp.render=$p,Tp.__file="src/view/page-designer/component/widget/multi-language/multi-language.vue";var Ep=Object(a["defineComponent"])({name:"PageSetting",components:{ModuleCategorySelect:Rr,OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioInput:r["OioInput"],OioUpload:r["OioUpload"],OioTextarea:r["OioTextarea"],OioPopconfirm:r["OioPopconfirm"],SingleSelect:Vr,PlusOutlined:K["a"],LoadingOutlined:q["a"],OioSwitch:r["OioSwitch"]},props:{originPageSettingData:{type:Object,required:!0},currentPageSettingData:{type:Object,required:!0},currentModule:{type:String,required:!0}},setup(e){const t=Object(a["ref"])(),o=Object(a["ref"])([]),r=Object(a["reactive"])({list:[],loading:!1,url:e.currentPageSettingData.thumbnailUrl||"",uploadUrl:"",data:{}}),{bizTypeProperties:l,viewBizTypeOptions:c,isShowDesignerType:d,viewTypeOptions:u,isShowDesignerLayoutType:p,isReadOnlyDesignerLayoutType:b,viewDesignerLayoutTypeOptions:g,isShowDesignerActionBarType:v,viewDesignerActionBarTypeOptions:m,bizTypeSelectedCallback:y}=_r({bizType:Object(a["computed"])(()=>e.currentPageSettingData.bizType)}),h=Object(a["computed"])(()=>m(e.currentPageSettingData));Object(a["watch"])(()=>e.currentModule,t=>{t&&Object(n["Sc"])(t).then(t=>{o.value=t,o.value.forEach(t=>t.checked=t.id===e.currentPageSettingData.currentCategoryId)})},{immediate:!0}),Object(a["onMounted"])(()=>J(this,void 0,void 0,(function*(){r.url=e.currentPageSettingData.thumbnailUrl||""}))),Object(a["onUnmounted"])(()=>{const t=e.originPageSettingData,o=e.currentPageSettingData;t&&o&&(o.name||(o.name=t.name))});const f={name:[{required:!0,message:Object(i["translateValueByKey"])("请输入标题"),trigger:["blur"]}]},O=t=>{r.url=t.url,e.currentPageSettingData.thumbnailUrl=t.url},w=t=>{r.url="",e.currentPageSettingData.thumbnailUrl=""},j=Object(a["computed"])(()=>i["Optional"].ofNullable(e.currentPageSettingData).map(e=>Object(s["a"])(e)).orElse(!0));return{Mode:$r,ViewBizTypeEnum:n["qb"],ViewLayoutTypeOptions:fr,bizTypeProperties:l,viewBizTypeOptions:c,isShowDesignerType:d,viewTypeOptions:u,isShowDesignerLayoutType:p,isReadOnlyDesignerLayoutType:b,viewDesignerLayoutTypeOptions:g,isShowDesignerActionBarType:v,viewDesignerActionBarTypeOptions:h,bizTypeSelectedCallback:y,pageSettingForm:t,rules:f,categories:o,thumbnail:r,thumbnailUploadSuccess:O,thumbnailRemove:w,disabledForm:j,PopconfirmPlacement:i["PopconfirmPlacement"]}}});const Sp={class:"page-setting-content"},Np=["src"],Vp={key:1},xp={class:"thumbnail-upload-text"};function Ip(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input"),s=Object(a["resolveComponent"])("oio-form-item"),c=Object(a["resolveComponent"])("single-select"),d=Object(a["resolveComponent"])("oio-switch"),u=Object(a["resolveComponent"])("module-category-select"),p=Object(a["resolveComponent"])("oio-textarea"),b=Object(a["resolveComponent"])("loading-outlined"),g=Object(a["resolveComponent"])("plus-outlined"),v=Object(a["resolveComponent"])("oio-upload"),m=Object(a["resolveComponent"])("oio-form");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Sp,[Object(a["createVNode"])(m,{ref:"pageSettingForm",data:e.currentPageSettingData,layout:"vertical",rules:e.rules},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{label:e.$translate("页面标题"),name:"name"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{value:e.currentPageSettingData.name,"onUpdate:value":t[0]||(t[0]=t=>e.currentPageSettingData.name=t),maxlength:50,placeholder:e.$translate("请输入页面标题"),disabled:e.disabledForm},null,8,["value","placeholder","disabled"])]),_:1},8,["label"]),Object(a["createVNode"])(s,{label:e.$translate("业务类型"),name:"bizType"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewBizTypeOptions,readonly:"","default-active-key":e.ViewBizTypeEnum.OPERATIONS_MANAGEMENT,"active-key":e.currentPageSettingData.bizType,"onUpdate:active-key":t[1]||(t[1]=t=>e.currentPageSettingData.bizType=t),buttonStyle:"solid",onChange:e.bizTypeSelectedCallback},null,8,["mode","properties","options","default-active-key","active-key","onChange"])]),_:1},8,["label"]),Object(a["createVNode"])(s,{label:e.$translate("视图类型"),name:"type"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewTypeOptions,readonly:"","active-key":e.currentPageSettingData.type,"onUpdate:active-key":t[2]||(t[2]=t=>e.currentPageSettingData.type=t),buttonStyle:"solid"},null,8,["mode","properties","options","active-key"])]),_:1},8,["label"]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"designerLayoutType",label:e.$translate("布局类型")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewDesignerLayoutTypeOptions(e.currentPageSettingData),readonly:e.isReadOnlyDesignerLayoutType(e.currentPageSettingData),"default-active-key":e.ViewLayoutTypeOptions[0].value,"active-key":e.currentPageSettingData.designerLayoutType,"onUpdate:active-key":t[3]||(t[3]=t=>e.currentPageSettingData.designerLayoutType=t),buttonStyle:"solid","show-popconfirm":!0,showPopconfirmTransmission:[[e.ViewLayoutTypeOptions[1].value,e.ViewLayoutTypeOptions[2].value],[e.ViewLayoutTypeOptions[2].value,e.ViewLayoutTypeOptions[1].value]],popConfirmText:e.$translate("布局类型的切换可能会导致数据的丢失，确认要执行动作吗？"),popConfirmPlacement:e.PopconfirmPlacement.BM},null,8,["mode","properties","options","readonly","default-active-key","active-key","showPopconfirmTransmission","popConfirmText","popConfirmPlacement"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerLayoutType(e.currentPageSettingData)]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"designerActionBarType",label:e.$translate("操作栏位置")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewDesignerActionBarTypeOptions,"default-active-key":e.viewDesignerActionBarTypeOptions[0].value,"active-key":e.currentPageSettingData.designerActionBarType,"onUpdate:active-key":t[4]||(t[4]=t=>e.currentPageSettingData.designerActionBarType=t),buttonStyle:"solid"},null,8,["mode","properties","options","default-active-key","active-key"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerActionBarType(e.currentPageSettingData)]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"isFloatActionBar",label:e.$translate("是否浮动操作栏")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{checked:e.currentPageSettingData.isFloatActionBar,"onUpdate:checked":t[5]||(t[5]=t=>e.currentPageSettingData.isFloatActionBar=t)},null,8,["checked"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerActionBarType(e.currentPageSettingData)]]),Object(a["createVNode"])(s,{label:e.$translate("页面分组"),name:"categories"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{"current-module":e.currentModule,"category-id":e.currentPageSettingData.currentCategoryId,"onUpdate:category-id":t[6]||(t[6]=t=>e.currentPageSettingData.currentCategoryId=t)},null,8,["current-module","category-id"])]),_:1},8,["label"]),Object(a["createVNode"])(s,{label:e.$translate("页面描述"),name:"description"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{value:e.currentPageSettingData.description,"onUpdate:value":t[7]||(t[7]=t=>e.currentPageSettingData.description=t),placeholder:e.$translate("请输入页面描述"),maxlength:128,allowClear:!0,autoSize:{minRows:3,maxRows:5},disabled:e.disabledForm},null,8,["value","placeholder","disabled"])]),_:1},8,["label"]),Object(a["createVNode"])(s,{class:"page-setting-thumbnail",label:e.$translate("缩略图"),name:"thumbnail"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,{class:"page-setting-thumbnail-uploader",multiple:!1,limit:1,"limit-size":2,"list-type":"picture-card","show-upload-list":!1,accept:".jpg,.jpeg,.png,.gif",onSuccess:e.thumbnailUploadSuccess,"remove-callback":e.thumbnailRemove,disabled:e.disabledForm},{default:Object(a["withCtx"])(()=>[e.thumbnail.url?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.thumbnail.url,alt:"avatar"},null,8,Np)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Vp,[e.thumbnail.loading?(Object(a["openBlock"])(),Object(a["createBlock"])(b,{key:0})):(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:1})),Object(a["createElementVNode"])("div",xp,Object(a["toDisplayString"])(e.$translate("上传缩略图")),1)]))]),_:1},8,["onSuccess","remove-callback","disabled"])]),_:1},8,["label"])]),_:1},8,["data","rules"])])}function Mp(e){return e=Object(d["a"])(e),e.widgetKind=n["Ab"].WIDGET_GROUP,e}function Ap(e){return e=Object(d["a"])(e),e.widgetKind=n["Ab"].FIELD,e}function Fp(e){return e=Object(d["a"])(e),e.widgetKind=n["Ab"].ACTION,e}var Lp;Ep.render=Ip,Ep.__file="src/view/page-designer/component/widget/page-setting/page-setting.vue",function(e){e["WIDGET"]="WIDGET",e["MODEL"]="MODEL"}(Lp||(Lp={}));const Rp=[{id:Lp.WIDGET,text:"组件",help:"涵盖平台内置的通用组件与用户自定义组件。"},{id:Lp.MODEL,text:"模型",help:"当前页面所绑定模型中所包含的相关组件，当选中“表格组件”时会自动切换为表格所关联的模型。"}],Bp=[{id:"FIELD_MANUAL",title:"无代码字段"},{id:"FIELD_SYSTEM",title:"低代码字段"},{id:"ACTION",title:"动作",help:"以代码形式定义的ServerAction会在模型的动作中进行展示。"}];var _p;(function(e){e["ALL"]="ALL",e["SYSTEM"]="SYSTEM",e["CUSTOM"]="CUSTOM"})(_p||(_p={}));const Wp=[{id:_p.ALL,displayName:"全部"},{id:_p.SYSTEM,displayName:"通用"},{id:_p.CUSTOM,displayName:"自定义"}];var Pp;(function(e){e["CARD"]="CARD",e["LIST"]="LIST"})(Pp||(Pp={}));class zp{static has(e){return zp.provider.has(e)}static getExtension(e){return zp.provider.get(e)}static fetchComponentKey(e,t){return t?`${e}#${t}`:e}}zp.provider=new Map([[`${n["B"].PACK}#${n["A"].GROUP}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-5543141c").then(o.bind(null,"daa8")))],[`${n["B"].PACK}#${n["A"].TABS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2f8a214e").then(o.bind(null,"0df5f")))],[`${n["B"].PACK}#${n["A"].CONTAINERS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-71effa0b").then(o.bind(null,"1ef7")))],[""+n["B"].FIELD,Object(a["defineAsyncComponent"])(()=>o.e("chunk-42a0de83").then(o.bind(null,"34d0")))],[i["ModelFieldType"].String+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-cb1fdeda").then(o.bind(null,"a5a1")))],[i["ModelFieldType"].Text+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-820d02ae").then(o.bind(null,"78d69")))],[i["ModelFieldType"].Integer+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-cb1fdeda").then(o.bind(null,"a5a1")))],[i["ModelFieldType"].Float+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-cb1fdeda").then(o.bind(null,"a5a1")))],[i["ModelFieldType"].DateTime+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-441db0d3").then(o.bind(null,"77bf")))],[i["ModelFieldType"].Date+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-441db0d3").then(o.bind(null,"77bf")))],[i["ModelFieldType"].Time+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-441db0d3").then(o.bind(null,"77bf")))],[i["ModelFieldType"].Year+"#false",Object(a["defineAsyncComponent"])(()=>o.e("chunk-441db0d3").then(o.bind(null,"77bf")))],[`${n["B"].ELEMENT}#${n["A"].DATETIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-42a0de83").then(o.bind(null,"34d0")))],[`${n["B"].ELEMENT}#${n["A"].DATE_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-42a0de83").then(o.bind(null,"34d0")))],[`${n["B"].ELEMENT}#${n["A"].TIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-42a0de83").then(o.bind(null,"34d0")))],[`${n["B"].ELEMENT}#${n["A"].YEAR_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-42a0de83").then(o.bind(null,"34d0")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].String}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Text}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Integer}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Float}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].DateTime}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Date}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Time}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Detail}#${i["ModelFieldType"].Year}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Search}#${i["ModelFieldType"].DateTime}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-70f1e11b").then(o.bind(null,"2fa9")))],[`${i["ViewType"].Search}#${i["ModelFieldType"].Date}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-70f1e11b").then(o.bind(null,"2fa9")))],[`${i["ViewType"].Search}#${i["ModelFieldType"].Time}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-70f1e11b").then(o.bind(null,"2fa9")))],[`${i["ViewType"].Search}#${i["ModelFieldType"].Year}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-70f1e11b").then(o.bind(null,"2fa9")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].String}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Text}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Integer}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Float}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].DateTime}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Date}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Time}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))],[`${i["ViewType"].Gallery}#${i["ModelFieldType"].Year}#false`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-47581c03").then(o.bind(null,"22b6")))]]);var Gp=Object(a["defineComponent"])({name:"GhostComponent",props:{widgetId:{type:String},currentDraggableWidget:{type:Object},type:{type:[String,Object]},subtype:{type:[String,Object]}},setup(e){const{currentMoveResult:t}=Object(n["fd"])(),o=()=>{var o;let i;const r=e.type;if(r){const a=null===(o=t.value)||void 0===o?void 0:o.targetInstance;if(a){const t=Object(n["rc"])(a);t&&(i=zp.getExtension(zp.fetchComponentKey(`${t}#${r}`,e.subtype)))}i||(i=zp.getExtension(zp.fetchComponentKey(r,e.subtype)))}return i},i=Object(a["computed"])(()=>{var t;const i=e.widgetId;return i?i===(null===(t=e.currentDraggableWidget)||void 0===t?void 0:t.id)?o():void 0:o()});return{finalDynamicWidget:Object(a["toRaw"])(i)}}});const Up={key:0,class:"designer-ghost-component"};function Kp(e,t,o,i,n,r){return e.finalDynamicWidget?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Up,[(Object(a["openBlock"])(),Object(a["createBlock"])(Object(a["resolveDynamicComponent"])(e.finalDynamicWidget),Object(a["mergeProps"])({subtype:e.subtype,type:e.type},e.$attrs),null,16,["subtype","type"]))])):Object(a["createCommentVNode"])("v-if",!0)}function qp(e){let t;return n["R"].consumerInstance(e,(e,o)=>t=n["y"].fetchRealTargetInstance(e,o)),t||e}function Hp(e){return{move:!1,targetInstance:e,message:"在当前区域找不到所需组件，禁止拖放"}}function Yp(e){return{move:!1,targetInstance:e,message:"无法识别的组件类型，请联系开发人员提供技术支持"}}Gp.render=Kp,Gp.__file="src/view/page-designer/component/widget/widget-lib/ghost-component/GhostComponent.vue";const Qp=(e,t,o,r,a)=>{const l=e.widgetBizType,s=n["wb"].fetchDefaultWidget(t,e.widgetList);if(!s)return Hp(qp(t));const c={targetInstance:t,currentWidget:Object.assign(Object.assign({},s),{widgetSpan:n["R"].isContainer(t).result?i["DEFAULT_COLS"]:n["O"].computeColSpan(s.widgetDefaultSpan)}),focusModalVisible:o,rootData:r,focusData:a};switch(l){case n["B"].PACK:case n["B"].ELEMENT:return n["y"].widgetDraggableRule(c);case n["B"].FIELD:return n["y"].fieldDraggableRule(c);case n["B"].ACTION:return n["y"].actionDraggableRule(c);case n["B"].VIEW:case n["B"].SLOT:break}return Yp(qp(t))},Jp=(e,t,o,r,a,l)=>{const s=n["wb"].fetchWidgetListByField(e,t),c=n["wb"].fetchDefaultWidget(o,s);return c?n["y"].fieldDraggableRule({targetInstance:o,currentWidget:Object.assign(Object.assign({},c),{widgetSpan:n["R"].isContainer(o).result?i["DEFAULT_COLS"]:n["O"].computeColSpan(c.widgetDefaultSpan)}),model:t.model,name:t.name,widgetData:t,focusModalVisible:r,rootData:a,focusData:l}):Hp(qp(o))},Xp=(e,t,o,r,a,l)=>{const s=n["wb"].fetchWidgetListByAction(e,t.actionDesignerType),c=n["wb"].fetchDefaultWidget(o,s);return c?n["y"].actionDraggableRule({targetInstance:o,currentWidget:Object.assign(Object.assign({},c),{widgetSpan:n["R"].isContainer(o).result?i["DEFAULT_COLS"]:n["O"].computeColSpan(c.widgetDefaultSpan)}),model:t.model,name:t.name,widgetData:t,focusModalVisible:r,rootData:a,focusData:l}):Hp(qp(o))};function Zp(e){const{currentMoveResult:t}=Object(n["fd"])(),o=Object(a["ref"])(),i=(e,o)=>(t&&(t.value=void 0),!0),r=(t,o,i)=>{const r=Object(n["lc"])(t),a=Object(n["mc"])(t);if(!r||!a)return!1;const s=n["Y"].INSTANCE.get(a.id);if(!Object(u["a"])(s))return l(s);let c;switch(i){case n["Ab"].WIDGET_GROUP:c=Qp(r,a,!!e.focusData&&e.isFocusDesigner||!1,e.rootData,e.focusData);break;case n["Ab"].FIELD:c=Jp(e.widgetTypeGroup,r,a,!!e.focusData&&e.isFocusDesigner||!1,e.rootData,e.focusData);break;case n["Ab"].ACTION:c=Xp(e.widgetTypeGroup,r,a,!!e.focusData&&e.isFocusDesigner||!1,e.rootData,e.focusData);break}if(!c)throw new Error("Invalid move result.");return n["Y"].INSTANCE.set(a.id,c),l(c)},l=e=>n["R"].moveResultProcess(t,e),s=e=>{o.value=e.element,t.value=void 0,n["Y"].INSTANCE.clear()},c=()=>{o.value=void 0,t.value=void 0,n["Y"].INSTANCE.clear()};return{currentDraggableWidget:o,moveToSelfCallback:i,moveToOtherCallback:r,startDrag:s,endDrop:c}}function eb(e,{onModelWidgetLibChangeByModel:t}){const{set:o,push:r,pop:l}=Object(n["bd"])(),s=Object(a["ref"])([]);o([]);const c=e=>e.ttype===i["ModelFieldType"].ManyToOne,d=Object(a["computed"])(()=>!!s.value.length),u=Object(a["computed"])(()=>s.value.map(e=>`${e.model}#${e.name}`)),p=Object(a["computed"])(()=>s.value.map(e=>e.displayName).join(" | ")),b=e=>{const{references:o}=e;o?(t(o),y(e)):console.error("Invalid model.",e)},g=()=>{var e;const o=null===(e=h())||void 0===e?void 0:e.model;o?t(o):console.error("Invalid model.",o)},v=()=>{const e=s.value[0];e?(t(e.model),m([])):console.error("This stack not need to be reset.")},m=e=>{s.value=e,o([...e])},y=e=>{s.value.push(e),r(e)},h=()=>(s.value.pop(),l());return{drillDownStack:s,isShowDrillDown:c,isShowDrillDownBackward:d,drillDownDisplayFullText:u,drillDownDisplayText:p,onDrillDown:b,onDrillDownBackward:g,onDrillDownReset:v}}function tb(e){const t=(e,t,o)=>{var i,r,a;const l=Object.assign({},t);switch(e){case n["Ab"].WIDGET_GROUP:{const{widgetBizType:e,widgetSubtype:o,defaultColSpan:n}=t;l.hasGhost=zp.has(zp.fetchComponentKey(e,o)),l.defaultColSpan=null===(i=null===n||void 0===n?void 0:n.toLowerCase)||void 0===i?void 0:i.call(n),l.hasGhost?(l.ghostType=e,l.ghostSubtype=o):(l.hasGhost=zp.has(zp.fetchComponentKey(e)),l.hasGhost&&(l.ghostType=e));break}case n["Ab"].FIELD:l.hasGhost=!1;break;case n["Ab"].ACTION:break}return l.defaultColSpan=(null===(a=null===(r=l.defaultColSpan)||void 0===r?void 0:r.toLowerCase)||void 0===a?void 0:a.call(r))||"full",{element:l,index:o}};return{mapper:t}}const ob=/^[\u4e00-\u9fa5]{2}$/,ib=ob.test.bind(ob);function nb(e){const t=Bp.map(e=>Object.assign(Object.assign({},e),{title:Object(i["translateValueByKey"])(e.title),help:Object(i["translateValueByKey"])(e.help)})),{currentSelectedInstance:o}=te(),n=Object(a["ref"])(),r=Object(a["ref"])(t.map(e=>e.id)),l=Object(a["ref"])(void 0),s=Object(a["ref"])(),c=Object(a["ref"])([]),d=Object(a["ref"])([]),u=Object(a["computed"])(()=>{var e;return null===(e=g.value.find(e=>e.value===s.value))||void 0===e?void 0:e.label}),p=Object(a["computed"])(()=>{const e=g.value.find(e=>e.value===s.value),{key:t,label:o}=e||{};return{key:t,label:o}}),b=Object(a["computed"])(()=>{const e=[],o={groupFields:v(c.value.filter(e=>e.systemSource===i["SystemSource"].UI)),groupInfo:t[0]},n={groupFields:v(c.value.filter(e=>e.systemSource!==i["SystemSource"].UI)),groupInfo:t[1]};return e.push(o),e.push(n),e});Object(a["watch"])(()=>e.currentModelWidgetLib,e=>{e?(s.value=e.model,c.value=e.fields,d.value=e.actions):(s.value=void 0,c.value=[],d.value=[]),n.value&&n.value.$forceUpdate()},{immediate:!0});const g=Object(a["computed"])(()=>i["Optional"].ofNullable(e.modelWidgetLib).map(e=>{const t=[];return e.forEach((e,o)=>{t.push({key:o,value:o,title:e.displayName,label:e.displayName})}),t}).orElse([])),v=e=>e.filter(e=>{var t;const o=l.value;return!o||((null===(t=e.displayName)||void 0===t?void 0:t.toLowerCase().includes(o))||e.name.toLowerCase().includes(o))}).map(e=>{var t,i;const{displayName:n}=e;let r=!1;n&&(r=ib(n));let a=!1;const l=null===(i=null===(t=o.value)||void 0===t?void 0:t.root)||void 0===i?void 0:i.fieldCollection;return l&&(a=l.has(`${e.model}#${e.name}`)),Object.assign(Object.assign({},e),{isTwoCNChar:r,using:a})}),m=Object(a["computed"])(()=>d.value.filter(e=>{var t;const o=l.value;return!o||((null===(t=e.displayName)||void 0===t?void 0:t.toLowerCase().includes(o))||e.name.toLowerCase().includes(o))}).map(e=>{var t,i;const{displayName:n}=e;let r=!1;n&&(r=ib(n));let a=!1;const l=null===(i=null===(t=o.value)||void 0===t?void 0:t.root)||void 0===i?void 0:i.actionCollection;return l&&(a=l.has(`${e.model}#${e.name}`)),Object.assign(Object.assign({},e),{isTwoCNChar:r,using:a})}).sort((e,t)=>e.createDate||t.createDate?e.createDate?t.createDate?new Date(e.createDate).getTime()-new Date(t.createDate).getTime():1:-1:0));return{modelGroupData:t,modelWidgetLibRef:n,activeModelGroupKey:r,searchFieldValue:l,computeActionList:m,fields:c,fieldsGroup:b,activeModelWidgetLib:s,currentModelLabel:u,currentModelInfo:p,modelWidgetLibOptions:g}}const rb="ui.designer.UiDesignerVirtualField";class ab{static create(e){return J(this,void 0,void 0,(function*(){const t=yield i["GenericFunctionService"].INSTANCE.simpleExecuteByFun(rb,"create",e);if(null===t||void 0===t?void 0:t.id)return t}))}static deleteOne(e){return J(this,void 0,void 0,(function*(){const t=yield i["GenericFunctionService"].INSTANCE.simpleExecuteByFun(rb,"deleteOne",{id:e});return!!(null===t||void 0===t?void 0:t.id)}))}}function lb(e,{onAddField:t,onRemoveField:o}){const n=e=>!!e.isVirtual,a=e=>J(this,void 0,void 0,(function*(){yield ab.deleteOne(e.id),r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("虚拟字段删除成功")),null===o||void 0===o||o(e)}));return{isShowDeleteVirtualField:n,onDeleteVirtualField:a}}const sb=[{label:"关联模型字段",value:"references"},{label:"当前模型字段",value:"current"}],cb=()=>({type:sb[0],fields:[{}]}),db=e=>{switch(e||(e="references"),e){case"references":return{type:!0,currentField:!1,references:!0,field:!1,displayName:!0,fields:!0};case"current":return{type:!0,currentField:!0,references:!1,field:!1,displayName:!0,fields:!1};default:throw new Error("Invalid type. value: "+e)}},ub=e=>{switch(e||(e="references"),e){case"references":return{type:!0,currentField:!1,references:!0,field:!0,displayName:!0,fields:!0};case"current":return{type:!0,currentField:!0,references:!1,field:!0,displayName:!0,fields:!1};default:throw new Error("Invalid type. value: "+e)}};var pb=Object(a["defineComponent"])({name:"AddVirtualFieldModal",components:{OioModal:r["OioModal"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioInput:r["OioInput"],OioButton:r["OioButton"],DesignerModelSelect:l["q"],AFormItemRest:L["a"],ASelect:f["c"]},inheritAttrs:!1,props:{model:{type:String},viewName:{type:String},visible:{type:Boolean,default:void 0}},emits:["update:visible","success"],setup(e,{emit:t}){const o=Object(a["ref"])(),n=Object(a["ref"])(cb()),l=Object(a["ref"])(db()),s=Object(a["ref"])(ub()),c=Object(a["ref"])([]),d=Object(a["ref"])([]);Object(a["watch"])(()=>e.model,e=>J(this,void 0,void 0,(function*(){if(!e)return void(c.value=[]);const t=yield i["ModelCache"].get(e);t?c.value=t.modelFields.filter(e=>!Object(i["isRelationField"])(e)).map(e=>({label:e.displayName||e.data,value:e.data})):r["OioMessage"].error("找不到指定模型: "+e)})),{immediate:!0});const u=e=>{e||(n.value=cb()),l.value=db(e),s.value=ub(e),Object(a["nextTick"])(()=>{o.value.clearValidate()})};Object(a["watch"])(()=>e.visible,e=>{e&&u()}),Object(a["watch"])(()=>n.value.type,e=>{e&&u(e.value)}),Object(a["watch"])(()=>n.value.references,e=>J(this,void 0,void 0,(function*(){if(e){const t=yield i["ModelCache"].get(e);if(!t)return void r["OioMessage"].error("找不到指定模型: "+e);n.value.fields=[{}],d.value=t.modelFields.filter(e=>!Object(i["isRelationField"])(e)).map(e=>({label:e.displayName||e.data,value:e.data}))}})));const p=e=>c.value.filter(t=>!n.value.fields.find(e=>{var o;return(null===(o=e.relationField)||void 0===o?void 0:o.value)===t.value})||!!e&&t.value===e.value),b=e=>d.value.filter(t=>!n.value.fields.find(e=>{var o;return(null===(o=e.referenceField)||void 0===o?void 0:o.value)===t.value})||!!e&&t.value===e.value),g=()=>J(this,void 0,void 0,(function*(){yield o.value.validate();const a=n.value;let l;switch(a.type.value){case"references":{const t=[],o=[];for(const e of a.fields)t.push(e.relationField.value),o.push(e.referenceField.value);l={model:e.model,viewName:e.viewName,field:a.field,displayName:a.displayName,references:a.references,relationFields:t,referenceFields:o};break}case"current":l={model:e.model,viewName:e.viewName,relatedField:a.currentField.value,field:a.field,displayName:a.displayName};break;default:throw new Error("Invalid type. value: "+a.type.value)}const s=yield ab.create(l);s?(r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),"虚拟字段创建成功"),t("success",s),t("update:visible",!1)):r["OioNotification"].error(Object(i["translateValueByKey"])("失败"),"虚拟字段创建失败")})),v=(e,t)=>{if(!e.required)return Promise.resolve();for(let o=0;o<t.length;o++){const e=t[o];if(!e.relationField)return Promise.reject(`第${o+1}行未填写左侧字段`);if(!e.referenceField)return Promise.reject(`第${o+1}行未填写右侧字段`)}return Promise.resolve()},m=Object(a["computed"])(()=>{const e={currentField:[{required:l.value.currentField,message:"请选择字段",trigger:"blur"}],references:[{required:l.value.references,message:"请选择模型",trigger:"blur"}],displayName:[{required:l.value.displayName,message:"请输入字段名称",trigger:"blur"}],fields:[{required:l.value.fields,message:"请选择关联字段"},{required:l.value.fields,validator:v}]};return Object.entries(e).map(([e,t])=>({[e]:t.map(e=>e.message?Object.assign(Object.assign({},e),{message:Object(i["translateValueByKey"])(e.message)}):e)})).reduce((e,t)=>Object.assign(Object.assign({},e),t))});return{virtualFieldTypes:sb,form:o,formData:n,formRequired:l,formVisible:s,rules:m,relationFieldOptions:c,computeRelationFieldOptions:p,computeReferenceFieldOptions:b,onEnter:g}}});const bb={class:"add-virtual-field-fields"};function gb(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("a-select"),s=Object(a["resolveComponent"])("oio-form-item"),c=Object(a["resolveComponent"])("oio-input"),d=Object(a["resolveComponent"])("designer-model-select"),u=Object(a["resolveComponent"])("oio-button"),p=Object(a["resolveComponent"])("a-form-item-rest"),b=Object(a["resolveComponent"])("oio-form"),g=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createBlock"])(g,{"wrapper-class-name":"add-virtual-field-wrapper",visible:e.visible,title:"添加虚拟字段",help:"仅支持添加多对一类型的虚拟字段","enter-callback":e.onEnter,"onUpdate:visible":t[6]||(t[6]=t=>e.$emit("update:visible",t))},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{ref:"form",data:e.formData,layout:"vertical",rules:e.rules},{default:Object(a["withCtx"])(()=>[Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"type",label:"字段类型",required:e.formRequired.type},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:e.formData.type,"onUpdate:value":t[0]||(t[0]=t=>e.formData.type=t),"label-in-value":"",options:e.virtualFieldTypes},null,8,["value","options"])]),_:1},8,["required"]),[[a["vShow"],e.formVisible.type]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"displayName",label:"字段名称",required:e.formRequired.displayName},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{value:e.formData.displayName,"onUpdate:value":t[1]||(t[1]=t=>e.formData.displayName=t)},null,8,["value"])]),_:1},8,["required"]),[[a["vShow"],e.formVisible.displayName]]),Object(a["createVNode"])(s,{name:"field",label:"字段编码"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{value:e.formData.field,"onUpdate:value":t[2]||(t[2]=t=>e.formData.field=t)},null,8,["value"])]),_:1}),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"currentField",label:"选择字段",required:e.formRequired.currentField},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:e.formData.currentField,"onUpdate:value":t[3]||(t[3]=t=>e.formData.currentField=t),"label-in-value":"",options:e.relationFieldOptions},null,8,["value","options"])]),_:1},8,["required"]),[[a["vShow"],e.formVisible.currentField]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{name:"references",label:"关联模型",required:e.formRequired.references},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{model:e.formData.references,"onUpdate:model":t[4]||(t[4]=t=>e.formData.references=t)},null,8,["model"])]),_:1},8,["required"]),[[a["vShow"],e.formVisible.references]]),Object(a["withDirectives"])(Object(a["createVNode"])(s,{class:"oio-form-item",name:"fields",label:"字段映射",required:e.formRequired.fields},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",bb,[Object(a["createVNode"])(p,null,{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.formData.fields,(t,o)=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"add-virtual-fields-select-group",key:o},[Object(a["createVNode"])(l,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:t.relationField,"onUpdate:value":e=>t.relationField=e,"label-in-value":"","allow-clear":"",options:e.computeRelationFieldOptions(t.relationField)},null,8,["value","onUpdate:value","options"]),Object(a["createVNode"])(l,{class:"oio-select","dropdown-class-name":"oio-select-dropdown",value:t.referenceField,"onUpdate:value":e=>t.referenceField=e,"label-in-value":"","allow-clear":"",options:e.computeReferenceFieldOptions(t.referenceField)},null,8,["value","onUpdate:value","options"]),Object(a["withDirectives"])(Object(a["createVNode"])(u,{class:"add-virtual-fields-select-group-remove",type:"link","biz-style":"danger",icon:"oinone-shanchu2",onClick:()=>e.formData.fields.splice(o,1)},null,8,["onClick"]),[[a["vShow"],e.formData.fields.length>=2]])]))),128))]),_:1})])]),_:1},8,["required"]),[[a["vShow"],e.formVisible.fields]]),Object(a["withDirectives"])(Object(a["createVNode"])(u,{class:"add-virtual-fields-select-group-add",type:"link",icon:"oinone-fangda",onClick:t[5]||(t[5]=()=>e.formData.fields.push({}))},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("添加 ")]),_:1},512),[[a["vShow"],e.formVisible.fields]])]),_:1},8,["data","rules"])]),_:1},8,["visible","enter-callback"])}pb.render=gb,pb.__file="src/view/page-designer/component/widget/widget-lib/components/AddVirtualFieldModal.vue";var vb=Object(a["defineComponent"])({name:"ModelTab",components:{AddVirtualFieldModal:pb,ACollapse:w["a"],ACollapsePanel:j["a"],OioTooltipHelp:r["OioTooltipHelp"],OioHighlight:r["OioHighlight"],OioTooltip:r["OioTooltip"],KDraggable:n["S"],OioIcon:r["OioIcon"],OioPopconfirm:r["OioPopconfirm"],OioInputSearch:r["OioInputSearch"],GhostComponent:Gp},inheritAttrs:!1,props:Object.assign(Object.assign({},n["I"]),{originPageSettingData:{type:Object},currentPageSettingData:{type:Object},modelWidgetLib:{type:Object,required:!0},currentModelWidgetLib:{type:Object},rootData:{type:Object},focusData:{type:Object},isFocusDesigner:{type:Boolean},displayMode:{type:String,required:!0},onDeleteAction:{type:Function,required:!0},onModelWidgetLibChangeByModel:{type:Function,required:!0}}),emits:["add-field","remove-field"],setup(e,{emit:t}){const o=Object(a["reactive"])({isShowAddVirtualFieldModal:!1,forceUpdate:Object(r["uniqueKeyGenerator"])()}),i=t=>!!e.originPageSettingData&&"FIELD_MANUAL"===t.groupInfo.id&&!Object(n["bd"])().get().length&&!!o.forceUpdate,l=()=>{o.isShowAddVirtualFieldModal=!0},s=e=>{t("add-field",e)},c=e=>{t("remove-field",e)},d=t=>{e.onModelWidgetLibChangeByModel(t),o.forceUpdate=Object(r["uniqueKeyGenerator"])()};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({defaultIcon:"oinone-xinxi",TabSelectOption:Lp,GLOBAL_DRAGGABLE_GROUP:n["N"],WidgetKind:n["Ab"],cloneWidgetField:Ap,cloneWidgetAction:Fp,state:o,isShowAddVirtualField:i,onAddVirtualField:l,onAddVirtualFieldSuccess:s},tb()),nb(e)),Zp(e)),eb(e,{onModelWidgetLibChangeByModel:d})),lb(e,{onRemoveField:c}))}});const mb={class:"drawer-aside-content drawer-aside-model-content"},yb={class:"drawer-widget-lib-options"},hb=["title"],fb={class:"drawer-widget-lib-current-model-label"},Ob={class:"drawer-widget-lib-current-model-label"},wb={key:0,class:"drawer-widget-lib-current-model-drill-down"},jb={class:"drawer-widget-lib-current-model-label"},kb={class:"drawer-widget-lib-current-model-drill-down-actions"},Cb={class:"drawer-widget-lib oio-scrollbar-hidden"},Db={class:"collapse-panel-custom-header collapse-panel-custom-header-space-between"},Tb={class:"collapse-panel-custom-header-left"},$b={class:"collapse-panel-custom-header-right"},Eb={class:"draggable-widget"},Sb={class:"draggable-widget-item-icon"},Nb={class:"draggable-widget-item-extend"},Vb=["onClick"],xb=["onClick"],Ib={key:2,class:"draggable-widget-item-using"},Mb={class:"collapse-panel-custom-header"},Ab={class:"draggable-widget"},Fb={class:"draggable-widget-item-icon"},Lb={key:0,class:"draggable-widget-item-using"},Rb={class:"draggable-widget-item-extend"},Bb={class:"draggable-widget-item-delete"};function _b(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input-search"),s=Object(a["resolveComponent"])("oio-tooltip"),c=Object(a["resolveComponent"])("oio-icon"),d=Object(a["resolveComponent"])("oio-tooltip-help"),u=Object(a["resolveComponent"])("oio-highlight"),p=Object(a["resolveComponent"])("ghost-component"),b=Object(a["resolveComponent"])("k-draggable"),g=Object(a["resolveComponent"])("a-collapse-panel"),v=Object(a["resolveComponent"])("oio-popconfirm"),m=Object(a["resolveComponent"])("a-collapse"),y=Object(a["resolveComponent"])("add-virtual-field-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",mb,[Object(a["createElementVNode"])("div",yb,[Object(a["createVNode"])(l,{value:e.searchFieldValue,"onUpdate:value":t[0]||(t[0]=t=>e.searchFieldValue=t),"allow-clear":"",placeholder:e.$translate("使用名称或显示名称搜索"),style:{width:"100%"}},null,8,["value","placeholder"]),Object(a["createElementVNode"])("div",{title:e.currentModelInfo.label,class:"drawer-widget-lib-current-model"},[Object(a["createVNode"])(s,{title:e.currentModelInfo.label},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",fb,Object(a["toDisplayString"])(`${e.$translate("当前模型:")} ${e.currentModelInfo.label}`),1)]),_:1},8,["title"]),Object(a["createVNode"])(s,{title:e.currentModelInfo.key},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Ob,Object(a["toDisplayString"])(`${e.$translate("模型编码:")} ${e.currentModelInfo.key}`),1)]),_:1},8,["title"]),e.isShowDrillDownBackward?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",wb,[Object(a["createVNode"])(s,null,{title:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.drillDownDisplayFullText,e=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"drawer-widget-lib-current-model-drill-down-title",key:e},Object(a["toDisplayString"])(e),1))),128))]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",jb,Object(a["toDisplayString"])(`${e.$translate("下钻路径:")} ${e.drillDownDisplayText}`),1)]),_:1}),Object(a["createElementVNode"])("div",kb,[Object(a["createVNode"])(s,{title:e.$translate("返回上一级")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-xuanze",color:"var(--oio-primary-color)",rotate:90,onClick:e.onDrillDownBackward},null,8,["onClick"])]),_:1},8,["title"]),Object(a["createVNode"])(s,{title:e.$translate("返回到初始模型")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{icon:"oinone-shouqi2",color:"var(--oio-primary-color)",size:"10",onClick:e.onDrillDownReset},null,8,["onClick"])]),_:1},8,["title"])])])):Object(a["createCommentVNode"])("v-if",!0)],8,hb)]),Object(a["createElementVNode"])("div",Cb,[Object(a["createVNode"])(m,{ref:"modelWidgetLibRef",activeKey:e.activeModelGroupKey,"onUpdate:activeKey":t[1]||(t[1]=t=>e.activeModelGroupKey=t),bordered:!1,"expand-icon-position":"right"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.fieldsGroup,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:t.groupInfo.id,class:"collapse-panel-custom"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Db,[Object(a["createElementVNode"])("div",Tb,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(`${t.groupInfo.title}（${t.groupFields.length}）`),1),t.groupInfo.help?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,content:t.groupInfo.help},null,8,["content"])):Object(a["createCommentVNode"])("v-if",!0)]),Object(a["createElementVNode"])("div",$b,[e.isShowAddVirtualField(t)?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,style:{"line-height":"20px","margin-bottom":"2px"},icon:"oinone-fangda",size:"16px",color:"rbga(0, 0, 0, 0.85)",title:e.$translate("添加虚拟字段"),onClick:Object(a["withModifiers"])(e.onAddVirtualField,["prevent","stop"])},null,8,["title","onClick"])):Object(a["createCommentVNode"])("v-if",!0)])])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Eb,[Object(a["createVNode"])(b,{clone:e.cloneWidgetField,"end-callback":e.endDrop,group:{name:e.GLOBAL_DRAGGABLE_GROUP,pull:"clone",put:!1},list:t.groupFields,mapper:({element:t,index:o})=>e.mapper(e.WidgetKind.FIELD,t,o),"move-to-other-callback":(t,o)=>e.moveToOtherCallback(t,o,e.WidgetKind.FIELD),"move-to-self-callback":e.moveToSelfCallback,sort:!1,"start-callback":e.startDrag,class:Object(a["normalizeClass"])(["draggable-widget-group","draggable-widget-group-"+e.displayMode.toLowerCase()]),"disable-add":"","item-key":"id"},{item:Object(a["withCtx"])(({element:t})=>[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["draggable-widget-item","draggable-widget-item-"+e.displayMode.toLowerCase(),"draggable-widget-"+t.defaultColSpan,t.hasGhost?"draggable-widget-has-ghost":"","draggable-field-widget"])},[Object(a["createElementVNode"])("div",Sb,[Object(a["createVNode"])(c,{icon:t.icon||e.defaultIcon,title:e.$translate(t.ttypeDisplayName)},null,8,["icon","title"])]),"CARD"===e.displayMode?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:0,class:"draggable-widget-item-label",search:e.searchFieldValue,content:[t.displayName,t.name],"ignored-case":""},null,8,["search","content"])):(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:1,class:"draggable-widget-item-label",search:e.searchFieldValue,content:`${t.displayName} - ${t.name}`,"ignored-case":""},null,8,["search","content"])),Object(a["createElementVNode"])("div",Nb,[e.isShowDrillDown(t)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"draggable-widget-item-drill-down",onClick:()=>e.onDrillDown(t)},[Object(a["createVNode"])(c,{icon:"oinone-zhankai5",color:"var(--oio-primary-color)",size:"10"})],8,Vb)):Object(a["createCommentVNode"])("v-if",!0),e.isShowDeleteVirtualField(t)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:1,class:"draggable-widget-item-delete-virtual-field",onClick:()=>e.onDeleteVirtualField(t)},[Object(a["createVNode"])(c,{icon:"oinone-shanchu2",color:"var(--oio-primary-color)",size:"10"})],8,xb)):Object(a["createCommentVNode"])("v-if",!0)]),t.using?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ib,[Object(a["createVNode"])(c,{icon:"oinone-yixuanzhong",size:"14"})])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createVNode"])(p,{"current-draggable-widget":e.currentDraggableWidget,label:t.displayName,subtype:t.ghostSubtype,type:t.ghostType,"widget-id":t.id},null,8,["current-draggable-widget","label","subtype","type","widget-id"])],2)]),_:2},1032,["clone","end-callback","group","list","mapper","move-to-other-callback","move-to-self-callback","start-callback","class"])])]),_:2},1024))),128)),e.isShowDrillDownBackward?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:e.modelGroupData[2].id,class:"collapse-panel-custom"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Mb,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(`${e.modelGroupData[2].title} （${e.computeActionList.length}）`),1),e.modelGroupData[2].help?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,content:e.modelGroupData[2].help},null,8,["content"])):Object(a["createCommentVNode"])("v-if",!0)])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Ab,[Object(a["createVNode"])(b,{clone:e.cloneWidgetAction,"end-callback":e.endDrop,group:{name:e.GLOBAL_DRAGGABLE_GROUP,pull:"clone",put:!1},list:e.computeActionList,mapper:({element:t,index:o})=>e.mapper(e.WidgetKind.ACTION,t,o),"move-to-other-callback":(t,o)=>e.moveToOtherCallback(t,o,e.WidgetKind.ACTION),"move-to-self-callback":e.moveToSelfCallback,sort:!1,"start-callback":e.startDrag,class:Object(a["normalizeClass"])(["draggable-widget-group","draggable-widget-group-"+e.displayMode.toLowerCase()]),"disable-add":"","item-key":"id"},{item:Object(a["withCtx"])(({element:t})=>[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["draggable-widget-item","draggable-widget-item-"+e.displayMode.toLowerCase(),"draggable-widget-"+t.defaultColSpan,t.hasGhost?"draggable-widget-has-ghost":"","draggable-action-widget"])},[Object(a["createElementVNode"])("div",Fb,[Object(a["createVNode"])(c,{icon:t.icon||e.defaultIcon},null,8,["icon"])]),t.using?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Lb,[Object(a["createVNode"])(c,{icon:"oinone-yixuanzhong",size:"14"})])):Object(a["createCommentVNode"])("v-if",!0),"CARD"===e.displayMode?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:1,class:"draggable-widget-item-label",search:e.searchFieldValue,content:[t.displayName,t.name],"ignored-case":""},null,8,["search","content"])):(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:2,class:"draggable-widget-item-label",search:e.searchFieldValue,content:`${t.displayName} - ${t.name}`,"ignored-case":""},null,8,["search","content"])),Object(a["createElementVNode"])("div",Rb,[t.reserve?(Object(a["openBlock"])(),Object(a["createBlock"])(v,{key:0,text:e.$translate("确定要删除动作吗?"),"ok-text":e.$translate("删除"),"cancel-text":e.$translate("取消"),"confirm-callback":()=>e.onDeleteAction(t)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Bb,[Object(a["createVNode"])(c,{icon:"oinone-shanchu",color:"var(--oio-primary-color)",size:"10"})])]),_:2},1032,["text","ok-text","cancel-text","confirm-callback"])):Object(a["createCommentVNode"])("v-if",!0)])],2)]),_:1},8,["clone","end-callback","group","list","mapper","move-to-other-callback","move-to-self-callback","start-callback","class"])])]),_:1}))]),_:1},8,["activeKey"])]),e.originPageSettingData?(Object(a["openBlock"])(),Object(a["createBlock"])(y,{key:0,model:e.originPageSettingData.model,"view-name":e.originPageSettingData.viewName,visible:e.state.isShowAddVirtualFieldModal,"onUpdate:visible":t[2]||(t[2]=t=>e.state.isShowAddVirtualFieldModal=t),onSuccess:e.onAddVirtualFieldSuccess},null,8,["model","view-name","visible","onSuccess"])):Object(a["createCommentVNode"])("v-if",!0)])}function Wb(e){const t=Object(a["ref"])([]),o=Object(a["ref"])(Wp[0].id),r=Object(a["ref"])(void 0),l=Object(n["dd"])();function s(e){let t=!0;const n=o.value,a=e.widgetList;if(a&&a.length&&n)switch(n){case _p.ALL:t=!0;break;case _p.SYSTEM:t=a.some(e=>{const t=e.sys;return null==t||i["BooleanHelper"].isTrue(t)});break;case _p.CUSTOM:t=a.some(e=>i["BooleanHelper"].isFalse(e.sys));break}if(t&&e.show){const t=r.value;return!t||e.widgetDisplayName.indexOf(t)>-1}return!1}const c=Object(a["computed"])(()=>{const t=[];if(!e.widgetCategoryGroup)return t;const o=new Map,r=new Map,a=Array.from(e.widgetCategoryGroup.values()).flatMap(e=>e.items),c=a.filter(e=>!n["Nc"].includes(e.name));let d=[];return e.widgetScope===Fu.WIDGET&&(d=a.filter(e=>n["Nc"].includes(e.name))),l.groupList.value.filter(e=>e.widgetCount).forEach(t=>{r.set(t.displayName,t);const i=(c||[]).filter(o=>{const i=o.scope||[];return i.length?o.group===t.name&&o.scope.includes(e.widgetScope):o.group===t.name});i.length&&o.set(t.displayName,i)}),d.length&&o.set(Object(i["translateValueByKey"])("模型相关"),d),o.forEach((e,o)=>{const n={displayName:o,name:o,showCount:0,items:[]},a=r.get(o);a&&(n.help=Object(i["translateValueByKey"])(a.help));const l=[];if(!e.length)return;let c=0;e.forEach(e=>{const t=s(e);t&&c++,l.push(Object.assign(Object.assign({},e),{show:t}))}),l.sort((e,t)=>(e.priority||0)-(t.priority||0)),n.items=l,n.showCount=c,c>0&&t.push(n)}),t});return Object(a["watchEffect"])(()=>{c.value&&c.value.length&&(t.value=c.value.map(e=>e.name))}),{activeWidgetCategoryKey:t,activeWidgetGroupKey:o,computeWidgetCategoryGroup:c,searchWidgetValue:r}}vb.render=_b,vb.__file="src/view/page-designer/component/widget/widget-lib/components/ModelTab.vue";var Pb=Object(a["defineComponent"])({name:"WidgetTab",components:{ACollapse:w["a"],ACollapsePanel:j["a"],KDraggable:n["S"],OioIcon:r["OioIcon"],OioInputSearch:r["OioInputSearch"],OioTooltipHelp:r["OioTooltipHelp"],OioHighlight:r["OioHighlight"],GhostComponent:Gp},inheritAttrs:!1,props:Object.assign(Object.assign({},n["I"]),{rootData:{type:Object},focusData:{type:Object},isFocusDesigner:{type:Boolean},widgetScope:{type:String},displayMode:{type:String,required:!0}}),setup(e){return Object.assign(Object.assign(Object.assign({defaultIcon:"oinone-xinxi",TabSelectOption:Lp,GLOBAL_DRAGGABLE_GROUP:n["N"],WidgetKind:n["Ab"],cloneWidgetGroup:Mp},tb()),Wb(e)),Zp(e))}});const zb={class:"drawer-aside-content drawer-aside-widget-content"},Gb={class:"drawer-widget-lib-options"},Ub={class:"drawer-widget-lib oio-scrollbar-hidden"},Kb={class:"collapse-panel-custom-header"},qb={class:"draggable-widget"},Hb={class:"draggable-widget-item-icon"};function Yb(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input-search"),s=Object(a["resolveComponent"])("oio-tooltip-help"),c=Object(a["resolveComponent"])("oio-icon"),d=Object(a["resolveComponent"])("oio-highlight"),u=Object(a["resolveComponent"])("ghost-component"),p=Object(a["resolveComponent"])("k-draggable"),b=Object(a["resolveComponent"])("a-collapse-panel"),g=Object(a["resolveComponent"])("a-collapse");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zb,[Object(a["createElementVNode"])("div",Gb,[Object(a["createVNode"])(l,{value:e.searchWidgetValue,"onUpdate:value":t[0]||(t[0]=t=>e.searchWidgetValue=t),"allow-clear":"",placeholder:e.$translate("使用组件名称搜索"),style:{width:"100%"}},null,8,["value","placeholder"])]),Object(a["createElementVNode"])("div",Ub,[Object(a["createVNode"])(g,{activeKey:e.activeWidgetCategoryKey,"onUpdate:activeKey":t[1]||(t[1]=t=>e.activeWidgetCategoryKey=t),bordered:!1,"expand-icon-position":"right"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.computeWidgetCategoryGroup,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(b,{key:t.name,class:"collapse-panel-custom"},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Kb,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(`${t.displayName}（${t.showCount}）`),1),t.help?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,content:t.help},null,8,["content"])):Object(a["createCommentVNode"])("v-if",!0)])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",qb,[Object(a["createVNode"])(p,{clone:e.cloneWidgetGroup,"end-callback":e.endDrop,group:{name:e.GLOBAL_DRAGGABLE_GROUP,pull:"clone",put:!1},list:t.items,mapper:({element:t,index:o})=>e.mapper(e.WidgetKind.WIDGET_GROUP,t,o),"move-to-other-callback":(t,o)=>e.moveToOtherCallback(t,o,e.WidgetKind.WIDGET_GROUP),"move-to-self-callback":e.moveToSelfCallback,sort:!1,"start-callback":e.startDrag,class:Object(a["normalizeClass"])(["draggable-widget-group","draggable-widget-group-"+e.displayMode.toLowerCase()]),"disable-add":"","item-key":"id"},{item:Object(a["withCtx"])(({element:t})=>[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["draggable-widget-item","draggable-widget-item-"+e.displayMode.toLowerCase(),"draggable-widget-"+t.defaultColSpan,t.hasGhost?"draggable-widget-has-ghost":"",`draggable-${t.widgetCategory.toLowerCase()}-widget`,`draggable-${t.widgetName.toLowerCase()}-widget-item`])},[Object(a["createElementVNode"])("div",Hb,[Object(a["createVNode"])(c,{icon:t.icon||e.defaultIcon},null,8,["icon"])]),Object(a["createVNode"])(d,{class:"draggable-widget-item-label",search:e.searchWidgetValue,content:t.widgetDisplayName,"ignored-case":""},null,8,["search","content"]),Object(a["createVNode"])(u,{subtype:t.ghostSubtype,type:t.ghostType},null,8,["subtype","type"])],2),[[a["vShow"],t.show]])]),_:2},1032,["clone","end-callback","group","list","mapper","move-to-other-callback","move-to-self-callback","start-callback","class"])])]),_:2},1024))),128))]),_:1},8,["activeKey"])])])}Pb.render=Yb,Pb.__file="src/view/page-designer/component/widget/widget-lib/components/WidgetTab.vue";var Qb=Object(a["defineComponent"])({name:"WidgetLib",components:{ModelTab:vb,WidgetTab:Pb,ButtonSelect:tp},props:Object.assign(Object.assign({},n["I"]),{originPageSettingData:{type:Object},currentPageSettingData:{type:Object},modelWidgetLib:{type:Object,required:!0},currentModelWidgetLib:{type:Object},rootData:{type:Object},focusData:{type:Object},isFocusDesigner:{type:Boolean},widgetScope:{type:String},displayMode:{type:String,required:!0}}),emits:["onModelWidgetLibChange","onModelWidgetLibChangeByModel","onDeleteAction","add-field","remove-field"],setup(e,{emit:t}){const o=Object(a["ref"])(Rp[0].id),n=e=>{t("onDeleteAction",e)},r=e=>{t("onModelWidgetLibChangeByModel",e)},l=e=>{t("add-field",e)},s=e=>{t("remove-field",e)};return{activeTabKey:o,ButtonSelectMode:Xu,Mode:$r,TabSelectOption:Lp,tabSelectData:Rp.map(e=>Object.assign(Object.assign({},e),{text:Object(i["translateValueByKey"])(e.text),help:Object(i["translateValueByKey"])(e.help)})),onModelWidgetLibChangeByModel:r,onDeleteAction:n,onAddField:l,onRemoveField:s}}});const Jb={class:"widget-lib"},Xb={class:"widget-lib-header"};function Zb(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("button-select"),s=Object(a["resolveComponent"])("widget-tab"),c=Object(a["resolveComponent"])("model-tab");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Jb,[Object(a["createElementVNode"])("div",Xb,[Object(a["createVNode"])(l,{activeKey:e.activeTabKey,"onUpdate:activeKey":t[0]||(t[0]=t=>e.activeTabKey=t),mode:e.ButtonSelectMode.TEXT,options:e.tabSelectData,customGroupClass:"tab-select-group-custom",customItemClass:"tab-select-item-custom","label-key":"text"},null,8,["activeKey","mode","options"])]),e.activeTabKey===e.TabSelectOption.WIDGET?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"root-data":e.rootData,"focus-data":e.focusData,"is-focus-designer":e.isFocusDesigner,"widget-scope":e.widgetScope,"display-mode":e.displayMode},null,8,["widget-category-group","widget-name-group","widget-type-group","root-data","focus-data","is-focus-designer","widget-scope","display-mode"])):Object(a["createCommentVNode"])("v-if",!0),e.activeTabKey===e.TabSelectOption.MODEL?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:1,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"model-widget-lib":e.modelWidgetLib,"current-model-widget-lib":e.currentModelWidgetLib,"root-data":e.rootData,"focus-data":e.focusData,"is-focus-designer":e.isFocusDesigner,"display-mode":e.displayMode,"on-delete-action":e.onDeleteAction,"on-model-widget-lib-change-by-model":e.onModelWidgetLibChangeByModel,onAddField:e.onAddField,onRemoveField:e.onRemoveField},null,8,["widget-category-group","widget-name-group","widget-type-group","origin-page-setting-data","current-page-setting-data","model-widget-lib","current-model-widget-lib","root-data","focus-data","is-focus-designer","display-mode","on-delete-action","on-model-widget-lib-change-by-model","onAddField","onRemoveField"])):Object(a["createCommentVNode"])("v-if",!0)])}Qb.render=Zb,Qb.__file="src/view/page-designer/component/widget/widget-lib/widget-lib.vue";const eg=[i["ViewType"].Form,i["ViewType"].Table,i["ViewType"].Detail];var tg=Object(a["defineComponent"])({name:"DraggableWidget",components:{OioIcon:i["OioIcon"],ButtonSelect:tp,AnchorDrawer:n["d"],WidgetLib:Qb,UiDesignStructureTree:jp,PageSetting:Ep,MultiLanguage:Tp,RegenerateView:bp},props:Object.assign(Object.assign({},n["I"]),{originPageSettingData:{type:Object,required:!0},currentPageSettingData:{type:Object,required:!0},modelWidgetLib:{type:Object,required:!0},currentModelWidgetLib:{type:Object},loading:{type:Boolean,default:!1},currentModule:{type:String,required:!0},visible:{type:Boolean},currentDesignData:{type:Object},currentFocusData:{type:Object},isFocusDesigner:{type:Boolean,default:void 0},currentSelectedInstance:{type:Object},widgetScope:{type:String}}),emits:["onOpened","onClosed","onAnchored","onRegenerate","onModelWidgetLibChange","onModelWidgetLibChangeByModel","onDeleteAction","add-field","remove-field"],setup(e,{emit:t}){const{lazySelectedInstance:o}=Object(n["hd"])(),r=ep.map(e=>Object.assign(Object.assign({},e),{title:Object(i["translateValueByKey"])(e.title)})),l=Object(a["ref"])(r[0].id),s=Object(a["ref"])(r[0].title),c=Object(a["ref"])(!0),d=Object(a["ref"])(Pp.CARD),u=()=>{l.value="";const t=e.currentPageSettingData.name;t||(e.currentPageSettingData.name=e.originPageSettingData.name)},p=()=>{u(),t("onClosed")},b=e=>{t("onAnchored",e)},g=e=>{t("onRegenerate",e)},v=()=>{d.value===Pp.CARD?d.value=Pp.LIST:d.value=Pp.CARD},m=e=>{s.value=e.title,c.value||(c.value=!0,t("onOpened"))},y=e=>{t("onModelWidgetLibChange",e)},h=e=>{t("onModelWidgetLibChangeByModel",e)},f=e=>{t("onDeleteAction",e)},O=e=>{t("add-field",e)},w=e=>{t("remove-field",e)};return Object(a["watch"])(()=>e.visible,e=>{c.value?e||u():e&&(l.value=r[0].id),c.value=e}),{ButtonSelectMode:Xu,SettingSelectOption:Zu,settingSelectData:r,activeSettingKey:l,drawerTitle:s,drawerVisible:c,lazySelectedInstance:o,widgetLibDisplayMode:d,onClosed:p,onAnchored:b,onRegenerate:g,onSwitchDisplayMode:v,settingSelectedCallback:m,onModelWidgetLibChange:y,onModelWidgetLibChangeByModel:h,onDeleteAction:f,onAddField:O,onRemoveField:w,AllowRegenerateDefaultViewType:eg}}});const og={class:"designer-draggable-widget"},ig={class:"drawer-draggable-setting-select"},ng={key:4};function rg(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("button-select"),s=Object(a["resolveComponent"])("regenerate-view"),c=Object(a["resolveComponent"])("oio-icon"),d=Object(a["resolveComponent"])("widget-lib"),u=Object(a["resolveComponent"])("ui-design-structure-tree"),p=Object(a["resolveComponent"])("page-setting"),b=Object(a["resolveComponent"])("multi-language"),g=Object(a["resolveComponent"])("anchor-drawer");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",og,[Object(a["createElementVNode"])("div",ig,[Object(a["createVNode"])(l,{activeKey:e.activeSettingKey,"onUpdate:activeKey":t[0]||(t[0]=t=>e.activeSettingKey=t),mode:e.ButtonSelectMode.ICON,options:e.settingSelectData,buttonStyle:"solid",customItemClass:"drawer-draggable-setting-select-item","label-key":"icon",onOnSelected:e.settingSelectedCallback},null,8,["activeKey","mode","options","onOnSelected"])]),Object(a["createVNode"])(g,{visible:e.drawerVisible,"onUpdate:visible":t[2]||(t[2]=t=>e.drawerVisible=t),loading:e.loading,title:e.drawerTitle,"anchor-class-name":"drawer-draggable-content-absolute","default-anchor":"",width:"322px",onOnAnchored:e.onAnchored,onOnClosed:e.onClosed},{extendBtn:Object(a["withCtx"])(()=>[e.activeSettingKey===e.SettingSelectOption.PAGE_SETTING&&e.AllowRegenerateDefaultViewType.includes(e.currentPageSettingData.type)?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,onRegenerate:e.onRegenerate},null,8,["onRegenerate"])):Object(a["createCommentVNode"])("v-if",!0),e.activeSettingKey===e.SettingSelectOption.WIDGET_LIB?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:1,class:"anchor-drawer-icon-button",onClick:t[1]||(t[1]=Object(a["withModifiers"])((...t)=>e.onSwitchDisplayMode&&e.onSwitchDisplayMode(...t),["stop"]))},["CARD"===e.widgetLibDisplayMode?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,icon:"oinone-pindaoguanli",size:"10px"})):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:1,icon:"oinone-jiekourizhi",size:"10px"}))])):Object(a["createCommentVNode"])("v-if",!0)]),default:Object(a["withCtx"])(()=>[e.activeSettingKey===e.SettingSelectOption.WIDGET_LIB?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"current-model-widget-lib":e.currentModelWidgetLib,"focus-data":e.currentFocusData,"is-focus-designer":e.isFocusDesigner,"model-widget-lib":e.modelWidgetLib,"root-data":e.currentDesignData,"widget-scope":e.widgetScope,"display-mode":e.widgetLibDisplayMode,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onOnModelWidgetLibChange:e.onModelWidgetLibChange,onOnModelWidgetLibChangeByModel:e.onModelWidgetLibChangeByModel,onOnDeleteAction:e.onDeleteAction,onAddField:e.onAddField,onRemoveField:e.onRemoveField},null,8,["origin-page-setting-data","current-page-setting-data","current-model-widget-lib","focus-data","is-focus-designer","model-widget-lib","root-data","widget-scope","display-mode","widget-category-group","widget-name-group","widget-type-group","onOnModelWidgetLibChange","onOnModelWidgetLibChangeByModel","onOnDeleteAction","onAddField","onRemoveField"])):e.activeSettingKey===e.SettingSelectOption.DESIGN_STRUCTURE?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:1,"current-design-data":e.currentDesignData,"current-selected-instance":e.lazySelectedInstance},null,8,["current-design-data","current-selected-instance"])):e.activeSettingKey===e.SettingSelectOption.PAGE_SETTING?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:2,"current-module":e.currentModule,"current-page-setting-data":e.currentPageSettingData,"origin-page-setting-data":e.originPageSettingData},null,8,["current-module","current-page-setting-data","origin-page-setting-data"])):e.activeSettingKey===e.SettingSelectOption.MULTI_LANGUAGE?(Object(a["openBlock"])(),Object(a["createBlock"])(b,{key:3})):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ng,Object(a["toDisplayString"])(e.activeSettingKey),1))]),_:1},8,["visible","loading","title","onOnAnchored","onOnClosed"])])}tg.render=rg,tg.__file="src/view/page-designer/component/widget.vue";var ag=Object(a["defineComponent"])({name:"ModelSelect",components:{LazyLoadSelect:l["A"]},props:{module:{type:String},model:{type:String},placeholder:{type:String,default:"请选择模型"},applicationModule:{type:String}},emits:["update:model","change"],setup(e,t){const o=R["a"].useInjectFormItemContext(),r=Object(a["ref"])(void 0),l=t=>Object(i["queryOne"])(t.model,{model:e.model}),s=e=>{let t=e.searchValue,o="show == ACTIVE and systemSource =out= ('BASE', 'KERNEL', 'RELATION') and type != 'ABSTRACT'";return t&&(t=i["GraphqlHelper"].serializableString(t),o=`${o} and (model =like= \\"%${t}%\\" or name =like= \\"%${t}%\\" or displayName =like= \\"%${t}%\\")`),o},c=e=>(e.label=`${e.data.displayName} - ${e.data.model}`,e),d=()=>e.applicationModule?{applicationModule:e.applicationModule}:{};return Object(a["watch"])(r,(e,i)=>{const n=null===e||void 0===e?void 0:e.data.model;n?t.emit("update:model",n):t.emit("update:model",void 0),t.emit("change",n,i),null===o||void 0===o||o.onFieldChange()}),{MODEL_MODEL:n["lb"].model,selected:r,customQueryOne:l,customCondition:s,customFillProperties:c,genCustomVariables:d}}});function lg(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("lazy-load-select");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{selected:e.selected,"onUpdate:selected":t[0]||(t[0]=t=>e.selected=t),model:e.MODEL_MODEL,"custom-condition":e.customCondition,"custom-fill-properties":e.customFillProperties,"custom-query-one":e.customQueryOne,placeholder:e.placeholder,"custom-variables":e.genCustomVariables},null,8,["selected","model","custom-condition","custom-fill-properties","custom-query-one","placeholder","custom-variables"])}ag.render=lg,ag.__file="src/view/page-designer/component/widget/page-menu/edit/model-select.vue";var sg=Object(a["defineComponent"])({name:"ViewSelect",components:{LazyLoadSelect:l["A"]},props:{model:{type:String},stringModel:{type:String},viewId:{type:String},placeholder:{type:String,default:"请选择视图"},customDropdownBottom:{type:Boolean},notFoundContent:{type:String},onViewIdChange:{type:Function}},emits:["update:viewId","change"],setup(e,t){const o=R["a"].useInjectFormItemContext(),r=Object(a["ref"])(void 0),s=Object(a["ref"])(null),c=t=>J(this,void 0,void 0,(function*(){if(e.viewId)return yield Object(i["queryOne"])(t.model,{id:e.viewId})})),d=t=>{var o;const n=null!==(o=e.model)&&void 0!==o?o:e.stringModel;if(n){let e=`show == ACTIVE and type =in= ('TABLE', 'FORM', 'DETAIL', 'GALLERY', 'TREE') and model == '${n}' and  (sys==0 or (sys==1 and systemSource != 'SYSTEM'))`,o=t.searchValue;return o&&(o=i["GraphqlHelper"].serializableString(o),e=`${e} and title =like= \\"%${o}%\\"`),e}return!1};return Object(a["watch"])(r,(i,n)=>{var r;i?t.emit("update:viewId",i.data.id):t.emit("update:viewId",void 0),t.emit("change",i,n),null===(r=e.onViewIdChange)||void 0===r||r.call(e,i,n),null===o||void 0===o||o.onFieldChange()}),Object(a["watch"])(()=>[e.model,e.stringModel],()=>{r.value=void 0,Object(a["nextTick"])(()=>{s.value&&s.value.onReloadOptions()})}),Object(a["watch"])(()=>e.viewId,e=>{let t;t=e?{data:{id:e}}:void 0,r.value=t,s.value&&(r.value?s.value.onSelectOptionByKey(e):s.value.onReloadOptions())}),{ViewConstant:n["rb"],defaultSelectProperties:l["Y"],pageMenuViewLazyLoadSelect:s,selected:r,customQueryOne:c,customCondition:d}}});function cg(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("lazy-load-select");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{ref:"pageMenuViewLazyLoadSelect",selected:e.selected,"onUpdate:selected":t[0]||(t[0]=t=>e.selected=t),"custom-condition":e.customCondition,"custom-query-one":e.customQueryOne,"custom-dropdown-bottom":e.customDropdownBottom,"not-found-content":e.notFoundContent,model:e.ViewConstant.MODEL_MODEL,placeholder:e.placeholder,properties:{...e.defaultSelectProperties,labelProp:"title"}},{customDropdownBottom:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"customDropdownBottom")]),_:3},8,["selected","custom-condition","custom-query-one","custom-dropdown-bottom","not-found-content","model","placeholder","properties"])}sg.render=cg,sg.__file="src/view/page-designer/component/widget/page-menu/edit/view-select.vue";const dg={model:[{required:!0,message:"请选择模型",trigger:"change"}],viewId:[{required:!0,message:"请选择视图"}]},ug={title:[{required:!0,message:"请输入页面标题"}],model:[{required:!0,message:"请选择模型",trigger:"change"}],bizType:[{required:!0,message:"请选择页面类型"}],type:[{required:!0,message:"请选择视图类型"}]},pg={url:[{required:!0,message:"请输入链接地址"}],target:[{required:!0,message:"请选择打开方式"}]},bg="oinone-menu-caidanmoren";var gg;(function(e){e[e["NORMAL"]=0]="NORMAL",e[e["EDIT_TITLE"]=1]="EDIT_TITLE"})(gg||(gg={}));const vg=[{value:i["ViewActionTarget"].Router,label:"路由打开"},{value:i["ViewActionTarget"].OpenWindow,label:"打开新页面"}];function mg(e,t){var o,i,n,r,a,l,s,c;e.name=null!==(o=t.name)&&void 0!==o?o:e.name,e.icon=null!==(i=t.icon)&&void 0!==i?i:e.icon,e.displayName=null!==(n=t.displayName)&&void 0!==n?n:e.displayName,e.module=null!==(r=t.module)&&void 0!==r?r:e.module,e.priority=null!==(a=t.priority)&&void 0!==a?a:e.priority,e.show=null!==(l=t.show)&&void 0!==l?l:e.show,e.sys=null!==(s=t.sys)&&void 0!==s?s:e.sys,e.clientTypes=null!==(c=t.clientTypes)&&void 0!==c?c:e.clientTypes}function yg(e){const t=e.value;if(t){e["title"]=t.displayName||Object(i["translateValueByKey"])("未命名菜单项");const o=e.children;o&&o.length>=1&&o.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0}))}}function hg(e){const t=i["TreeHelper"].convert(e,e=>e.name,e=>e.parentName,e=>Object(a["reactive"])(Object.assign(Object.assign({},e),{editMode:gg.NORMAL,visibleDropdown:!1})));return t.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0})),i["TreeHelper"].traversal(t,e=>(yg(e),e.children.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0})),e)),t}var fg=Object(a["defineComponent"])({name:"PageMenu",components:{OioButton:r["OioButton"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],OioInput:r["OioInput"],OioInputSearch:r["OioInputSearch"],OioModal:r["OioModal"],OioPopconfirm:r["OioPopconfirm"],OioIcon:r["OioIcon"],OioSpin:r["OioSpin"],OioTextarea:r["OioTextarea"],ASelect:f["c"],ModuleCategorySelect:Rr,IconSelect:i["IconSelect"],IconSelectWithGroup:i["IconSelectWithGroup"],SingleSelect:Vr,ModelSelect:ag,ViewSelect:sg,DownOutlined:P["a"],EllipsisOutlined:H["a"]},props:{module:{type:String,required:!0},viewId:String},emits:{onSelected:null},setup(e,t){const o=Object(a["ref"])([]),l=Object(a["ref"])([]),s=Object(a["ref"])(""),c=Object(a["ref"])([]),d=Object(a["ref"])([]),u=Object(a["ref"])(void 0),p=Object(a["reactive"])({editMenu:!1,bindView:!1,createView:!1,bindUrl:!1,editIcon:!1,showClientType:!1}),b=Object(a["reactive"])({menuTree:!1,bindView:!1,createView:!1,bindUrl:!1,editIcon:!1,showClientType:!1}),g=Object(a["ref"])(),v=Object(a["ref"])(),m=Object(a["ref"])(),y=Object(a["ref"])({}),h=Object(a["ref"])({});let f;const O=()=>{f&&(clearTimeout(f),f=null),f=setTimeout(()=>J(this,void 0,void 0,(function*(){if(e.module){b.menuTree=!0;try{o.value=yield n["V"].queryListByModule(e.module),l.value=hg(o.value)}finally{b.menuTree=!1}}})),100)},w=e=>{const{level:t}=e,o={};return o.paddingLeft=1===t?"0":"24px",o};Object(a["onMounted"])(()=>{O()}),Object(a["watch"])(()=>e.module,()=>{O()}),Object(a["watch"])(s,e=>{let t;e?(t=[],o.value.forEach(o=>{o.displayName&&o.displayName.indexOf(e)>-1&&t&&o.name&&t.push(o.name)})):t=void 0,t&&(c.value=t)});const j=e=>{c.value=e.expandedKeys},k=e=>J(this,void 0,void 0,(function*(){try{b.menuTree=!0;const t=i["CastHelper"].cast(e.dragNode.dataRef),o=i["CastHelper"].cast(e.node.dataRef);let r;const a=e.dropPosition;if(e.dropToGap){let e;e=o.parent?o.parent.children:l.value;const t=e.indexOf(o);r=a<=t?n["J"].BEFORE:n["J"].AFTER}else r=n["J"].IN;if(yield n["V"].dragMenu(t.value.id,o.value.id,r),t.parent?t.setParent(void 0):l.value.splice(l.value.indexOf(t),1),e.dropToGap){let e;e=o.parent?o.parent.children:l.value;let i=e.indexOf(o);r===n["J"].AFTER&&(i+=1),o.parent?o.parent.addChild(t,i):l.value.splice(i,0,t)}else o.addChild(t,0);l.value=[...l.value],t.value.parentName=o.value.parentName}finally{b.menuTree=!1}})),C=Object(a["ref"])(),D=(e,o)=>{t.emit("onSelected",{selected:o.selected,selectedKeys:e,data:o.node.value}),C.value=o.node.value},T=e=>{$(e)?E(e):c.value.push(e.key),c.value=[...c.value]},$=e=>{const t=c.value.indexOf(e.key);if(-1!==t)return!0;for(const o of e.children)if($(o))return!0;return!1},E=e=>{const t=c.value.indexOf(e.key);if(-1!==t&&(c.value.splice(t,1),!c.value.length))return!0;for(const o of e.children)if(E(o))return!0;return!1},S=e=>J(this,void 0,void 0,(function*(){try{let t;b.menuTree=!0;const o=e.show;switch(o){case i["ActiveEnum"].ACTIVE:t=i["ActiveEnum"].INACTIVE,yield n["V"].hide(e.id);break;case i["ActiveEnum"].INACTIVE:t=i["ActiveEnum"].ACTIVE,yield n["V"].show(e.id);break;default:throw new Error("Invalid active enum. value="+o)}e.show=t}finally{b.menuTree=!1}})),N=(e,t)=>{for(const o of e){if(o.key===t)return o;if(o.children.length>=1){const e=N(o.children,t);if(e)return e}}},V=()=>{const t=d.value&&d.value[0];let o;t&&(o=N(l.value,t));const n=new i["TreeNode"]("NEW_NODE",Object(a["reactive"])({displayName:"",module:e.module,actionType:i["ActionType"].View,editMode:gg.EDIT_TITLE,visibleDropdown:!1}));let r;if(yg(n),u.value=n,o){const e=o.parent;r=e?e.children:l.value;const t=r.indexOf(o)+1;e?n.setParent(e,t):r.splice(t,0,n)}else r=l.value,r.push(n)},x=Object(a["ref"])(!1),I=()=>{x.value=!0},M=e=>{let t=e.value,o=t.displayName;if(t.id)return o&&(o=o.trim()),void(o?setTimeout(()=>J(this,void 0,void 0,(function*(){b.menuTree=!0;try{const o=yield n["V"].updateMenuInfo(t);mg(t,o),e["title"]=t.displayName,e.value["editMode"]=gg.NORMAL}finally{b.menuTree=!1,setTimeout(()=>{x.value=!1},300)}}))):r["OioNotification"].error(Object(i["translateValueByKey"])("异常"),Object(i["translateValueByKey"])("菜单名称不允许为空")));if(o&&(o=o.trim(),o))return void setTimeout(()=>J(this,void 0,void 0,(function*(){var o,i,r,s,c;b.menuTree=!0;try{const u=(null===(o=e.parent)||void 0===o?void 0:o.children)||l.value;t.preMenuName=null===(r=null===(i=u.find(e=>{const{key:t}=e;return!(!t||!d.value.includes(t))}))||void 0===i?void 0:i.value)||void 0===r?void 0:r.name,t.parentName=null===(c=null===(s=e.parent)||void 0===s?void 0:s.value)||void 0===c?void 0:c.name,t.icon=bg;const p=yield n["V"].create(t);e.key=p.id,t=Object(a["reactive"])(Object.assign(Object.assign({},t),p)),e.value=t,e["title"]=t.displayName,e.value.editMode=gg.NORMAL,l.value=[...l.value]}finally{b.menuTree=!1,setTimeout(()=>{x.value=!1},300)}})));const s=e.parent;let c;c=s?s.children:l.value,c.splice(c.indexOf(e),1),l.value=[...l.value]},A=(e,t)=>{e.stopPropagation(),u.value=t,t.value.editMode=gg.EDIT_TITLE},F=e=>{e.value.visibleDropdown=!1,b.menuTree=!0,Object(i["deleteOne"])(n["U"].MODEL_MODEL,{id:e.value.id}).then(()=>{e.parent?(e.parent.removeChild(e),l.value=[...l.value]):l.value.splice(l.value.indexOf(e),1)}).finally(()=>{b.menuTree=!1})},L=t=>J(this,void 0,void 0,(function*(){const o=t.value,a=yield n["V"].updateMenuViewByViewId({id:o.id,viewId:e.viewId});o.viewId=a.viewId,o.designerViewId=a.designerViewId,r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("绑定成功"))})),R=e=>{u.value=e,p.bindView=!0},B=e=>{u.value=e,y.value={},p.createView=!0},_=e=>{var t,o;u.value=e,h.value={url:null===(t=e.value)||void 0===t?void 0:t.url,target:(null===(o=e.value)||void 0===o?void 0:o.target)||i["ViewActionTarget"].Router},p.bindUrl=!0},W=e=>{u.value=e,p.editIcon=!0},P=e=>{u.value=e,p.showClientType=!0},z=(e,o)=>J(this,void 0,void 0,(function*(){return g.value.validate().then(()=>J(this,void 0,void 0,(function*(){b.bindView=!0;try{const e=yield n["V"].updateMenuViewByViewId(o),i=u.value.value;i.viewId=e.viewId,i.model=o.model,i.designerViewId=e.designerViewId,u.value=void 0,t.emit("onSelected",{selected:!0,selectedKeys:d.value,data:i}),p.bindView=!1}finally{b.bindView=!1}}))),!1})),G=(o,i)=>(v.value.validate().then(()=>J(this,void 0,void 0,(function*(){b.createView=!0;try{const o=u.value.value,i=yield n["V"].updateMenuViewAndCreate(o,y.value,e.module);o.designerViewId=i.designerViewId,o.viewId=i.viewId,u.value=void 0,t.emit("onSelected",{selected:!0,selectedKeys:d.value,data:o}),p.createView=!1}finally{b.createView=!1}}))),!1),U=(e,t)=>(m.value.validate().then(()=>J(this,void 0,void 0,(function*(){b.bindUrl=!0;try{const e=u.value.value;yield n["V"].updateMenuUrl(e,{url:h.value.url,target:h.value.target}),e.url=h.value.url,e.target=h.value.target,u.value=void 0,p.bindUrl=!1}finally{b.bindUrl=!1}}))),!1),K=(e,t)=>J(this,void 0,void 0,(function*(){b.editIcon=!0,b.menuTree=!0;try{const e=u.value.value,o=yield n["V"].updateMenuInfo(t);mg(e,o),u.value=void 0,p.editIcon=!1}finally{b.editIcon=!1,b.menuTree=!1}})),q=(e,t)=>J(this,void 0,void 0,(function*(){b.showClientType=!0,b.menuTree=!0;try{const e=u.value.value,o=yield n["V"].updateMenuInfo(t);mg(e,o),u.value=void 0,p.showClientType=!1}finally{b.showClientType=!1,b.menuTree=!1}})),H=(e,t)=>{let o=e.clientTypes;o||(o=[],e.clientTypes=o);const i=o.indexOf(t);-1===i?o.push(t):o.splice(i,1)},Y=e=>{const t=e.clientTypes;return!!t&&t.includes(i["ViewClientType"].PC)},Q=e=>{const t=e.clientTypes;return!!t&&t.includes(i["ViewClientType"].MOBILE)},X=(e,t)=>{t.visibleDropdown=!!e.key.startsWith("page-menu-option-delete-")};return Object.assign(Object.assign({Mode:$r,ViewBizTypeEnum:n["qb"],ViewLayoutTypeOptions:fr},_r({bizType:Object(a["computed"])(()=>y.value.bizType)})),{PopconfirmPlacement:i["PopconfirmPlacement"],FormLayout:i["FormLayout"],bindViewRef:g,createViewRef:v,bindUrlRef:m,createViewData:y,bindUrlData:h,bindViewRules:Object.entries(dg).map(([e,t])=>({[e]:t.map(e=>Object.assign(Object.assign({},e),{message:Object(i["translateValueByKey"])(e.message)}))})).reduce((e,t)=>Object.assign(Object.assign({},e),t)),createViewRules:Object.entries(ug).map(([e,t])=>({[e]:t.map(e=>Object.assign(Object.assign({},e),{message:Object(i["translateValueByKey"])(e.message)}))})).reduce((e,t)=>Object.assign(Object.assign({},e),t)),bindUrlRules:Object.entries(pg).map(([e,t])=>({[e]:t.map(e=>Object.assign(Object.assign({},e),{message:Object(i["translateValueByKey"])(e.message)}))})).reduce((e,t)=>Object.assign(Object.assign({},e),t)),EditMode:gg,ActiveEnum:i["ActiveEnum"],ViewClientType:i["ViewClientType"],BIND_URL_TARGETS:vg.map(e=>Object.assign(Object.assign({},e),{label:Object(i["translateValueByKey"])(e.label)})),tree:l,loading:b,searchValue:s,selectedKeys:d,expandedKeys:c,editValue:u,visible:p,computeMenuItemStyle:w,onDragenter:j,onDrop:k,onSelected:D,onExpandedTreeItem:T,bindCurrentView:L,currentSelectedMenu:C,onClickForShow:S,onClickForAdd:V,onEditMenuBlur:M,onEditMenuTitle:A,onClickForDelete:F,onVisibleBindViewModal:R,onVisibleCreateViewModal:B,onVisibleBindUrlModal:_,onVisibleEditIconModal:W,onVisibleShowClientType:P,bindViewEnter:z,createViewEnter:G,bindUrlEnter:U,editIconEnter:K,showClientTypeEnter:q,onSelectClientType:H,isShowPCClient:Y,isShowMobileClient:Q,handlerDropdownClick:X,isMenuTitleEditing:x,focusMenuTitle:I})}});const Og={class:"page-menu-main-body"},wg={class:"page-menu-search"},jg={class:"page-menu-content oio-scrollbar-hidden"},kg=["title"],Cg=["onClick"],Dg={class:"oio-highlight"},Tg={class:"page-menu-item-options"},$g=["onClick"],Eg={key:0},Sg={key:1},Ng={class:"page-menu-tree-extend"},Vg={class:"page-menu-client-types"},xg=["onClick"],Ig={class:"page-menu-client-types-title"},Mg=["onClick"],Ag={class:"page-menu-client-types-title"};function Fg(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input-search"),s=Object(a["resolveComponent"])("oio-icon"),c=Object(a["resolveComponent"])("oio-input"),d=Object(a["resolveComponent"])("down-outlined"),u=Object(a["resolveComponent"])("ellipsis-outlined"),p=Object(a["resolveComponent"])("a-menu-item"),b=Object(a["resolveComponent"])("oio-popconfirm"),g=Object(a["resolveComponent"])("a-menu"),v=Object(a["resolveComponent"])("a-dropdown"),m=Object(a["resolveComponent"])("a-tree"),y=Object(a["resolveComponent"])("oio-button"),h=Object(a["resolveComponent"])("oio-spin"),f=Object(a["resolveComponent"])("model-select"),O=Object(a["resolveComponent"])("oio-form-item"),w=Object(a["resolveComponent"])("view-select"),j=Object(a["resolveComponent"])("oio-form"),k=Object(a["resolveComponent"])("oio-modal"),C=Object(a["resolveComponent"])("single-select"),D=Object(a["resolveComponent"])("module-category-select"),T=Object(a["resolveComponent"])("oio-textarea"),$=Object(a["resolveComponent"])("a-select"),E=Object(a["resolveComponent"])("IconSelectWithGroup");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Og,[Object(a["createElementVNode"])("div",wg,[Object(a["createVNode"])(l,{value:e.searchValue,"onUpdate:value":t[0]||(t[0]=t=>e.searchValue=t),placeholder:e.$translate("输入关键字搜索")},null,8,["value","placeholder"])]),Object(a["createElementVNode"])("div",jg,[Object(a["createVNode"])(h,{loading:e.loading.menuTree},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{"tree-data":e.tree,draggable:!e.isMenuTitleEditing,"block-node":"",selectable:"",selectedKeys:e.selectedKeys,"onUpdate:selectedKeys":t[4]||(t[4]=t=>e.selectedKeys=t),expandedKeys:e.expandedKeys,"onUpdate:expandedKeys":t[5]||(t[5]=t=>e.expandedKeys=t),"auto-expand-parent":"",onDragenter:e.onDragenter,onDrop:e.onDrop,onSelect:e.onSelected},{title:Object(a["withCtx"])(({title:o,value:i,isLeaf:n,dataRef:r,expanded:l,selected:m})=>[Object(a["createElementVNode"])("div",{class:"page-menu-item-main-body",style:Object(a["normalizeStyle"])(e.computeMenuItemStyle(r))},[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-item-content",r.parent?"page-menu-item-content-normal":"",i.show===e.ActiveEnum.INACTIVE?"inactive-content":""])},[Object(a["createElementVNode"])("div",{class:"page-menu-item-content-title",title:o},[1===r.level?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(["page-menu-item-icon",!n&&l?" page-menu-item-icon-open":""])},[i.icon?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,size:"14px",icon:i.icon},null,8,["icon"])):Object(a["createCommentVNode"])("v-if",!0)],2)):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-item-title",[1!==r.level&&"not-first-level-menu"]]),onClick:t=>e.onEditMenuTitle(t,r)},[i["editMode"]===e.EditMode.EDIT_TITLE?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,value:i.displayName,"onUpdate:value":e=>i.displayName=e,maxlength:50,autofocus:!0,onClick:t[1]||(t[1]=Object(a["withModifiers"])(()=>{},["stop"])),onPressEnter:t[2]||(t[2]=e=>e.target.blur()),onBlur:t=>e.onEditMenuBlur(r),onFocus:e.focusMenuTitle,placeholder:e.$translate("请输入菜单名称")},null,8,["value","onUpdate:value","onBlur","onFocus","placeholder"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:1,class:Object(a["normalizeClass"])(i.show===e.ActiveEnum.INACTIVE?"inactive-title":"")},[o.indexOf(e.searchValue)>-1?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(o.substring(0,o.indexOf(e.searchValue))),1),Object(a["createElementVNode"])("span",Dg,Object(a["toDisplayString"])(e.searchValue),1),Object(a["createTextVNode"])(Object(a["toDisplayString"])(o.substring(o.indexOf(e.searchValue)+e.searchValue.length)),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(o),1)],64))],2))],10,Cg)],8,kg),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Tg,[i.show===e.ActiveEnum.INACTIVE?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,icon:"oinone-invisible"})):Object(a["createCommentVNode"])("v-if",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:"page-menu-option-expend-button",onClick:Object(a["withModifiers"])(t=>e.onExpandedTreeItem(r),["stop"])},[Object(a["createVNode"])(d,{style:{"font-size":"9px"},class:Object(a["normalizeClass"])(l?"page-menu-expend-open":"page-menu-expend-close")},null,8,["class"])],8,$g),[[a["vShow"],!n]]),Object(a["createVNode"])(v,{visible:i.visibleDropdown,"onUpdate:visible":e=>i.visibleDropdown=e,trigger:["click"],overlayClassName:"page-menu-option-more-overlay"},{overlay:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:"page-menu-option-more-"+i.id,onClick:t=>e.handlerDropdownClick(t,i)},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-bind-view-"+i.id,disabled:!!e.currentSelectedMenu&&!e.currentSelectedMenu.viewId||i.sys||!n,title:e.$translate(i.sys?"由系统生成，禁止绑定当前页面":n?"绑定当前页面":"具有子菜单项的菜单项不允许绑定页面"),onClick:t=>e.bindCurrentView(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("绑定当前页面")),1)]),_:2},1032,["disabled","title","onClick"])),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-bind-view-"+i.id,disabled:i.sys||!n,title:e.$translate(i.sys?"由系统生成，禁止绑定已有页面":n?"绑定已有页面":"具有子菜单项的菜单项不允许绑定页面"),onClick:t=>e.onVisibleBindViewModal(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("绑定已有页面")),1)]),_:2},1032,["disabled","title","onClick"])),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-bind-new-view-"+i.id,disabled:i.sys||!n,title:e.$translate(i.sys?"由系统生成，禁止绑定新页面":n?"绑定新页面":"具有子菜单项的菜单项不允许绑定新页面"),onClick:t=>e.onVisibleCreateViewModal(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("绑定新页面")),1)]),_:2},1032,["disabled","title","onClick"])),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-bind-url-"+i.id,disabled:i.sys||!n,title:e.$translate("绑定链接"),onClick:t=>e.onVisibleBindUrlModal(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("绑定链接")),1)]),_:2},1032,["disabled","title","onClick"])),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-visible-"+i.id,onClick:t=>e.onClickForShow(i)},{default:Object(a["withCtx"])(()=>[i.show===e.ActiveEnum.ACTIVE?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Eg,Object(a["toDisplayString"])(e.$translate("隐藏菜单")),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Sg,Object(a["toDisplayString"])(e.$translate("显示菜单")),1))]),_:2},1032,["onClick"])),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-delete-"+i.id,disabled:i.sys||!n,title:e.$translate(i.sys?"由系统生成，禁止删除":n?"删除菜单":"包含子菜单项，不允许直接删除")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{placement:e.PopconfirmPlacement.TM,text:"删除菜单后，菜单将不在应用中展示，菜单绑定的页面不会被删除，请确认操作？","confirm-callback":()=>e.onClickForDelete(r),"cancel-callback":()=>i.visibleDropdown=!1},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("删除菜单")),1)]),_:2},1032,["placement","confirm-callback","cancel-callback"])]),_:2},1032,["disabled","title"])),1===r.level?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-edit-icon-"+i.id,title:e.$translate(i.sys?"由系统生成，禁止更换图标":"更换图标"),onClick:t=>e.onVisibleEditIconModal(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("更换图标")),1)]),_:2},1032,["title","onClick"])):Object(a["createCommentVNode"])("v-if",!0),(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:"page-menu-option-show-client-type-"+i.id,disabled:i.sys,title:e.$translate(i.sys?"由系统生成，禁止设置显示设备":"显示设备"),onClick:t=>e.onVisibleShowClientType(r)},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("显示设备")),1)]),_:2},1032,["disabled","title","onClick"]))]),_:2},1032,["onClick"]))]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"page-menu-option-more-button",onClick:t[3]||(t[3]=Object(a["withModifiers"])(()=>{},["stop"]))},[Object(a["createVNode"])(u,{style:{"font-size":"12px",color:"#97a1ac","font-weight":"bold"},rotate:90})])]),_:2},1032,["visible","onUpdate:visible"])],512),[[a["vShow"],i]])],2)],4)]),_:1},8,["tree-data","draggable","selectedKeys","expandedKeys","onDragenter","onDrop","onSelect"]),Object(a["createElementVNode"])("div",Ng,[Object(a["createVNode"])(y,{type:"primary",block:"",onClick:e.onClickForAdd},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加菜单项")),1)]),_:1},8,["onClick"])])]),_:1},8,["loading"])]),Object(a["createVNode"])(k,{data:e.editValue&&e.editValue.value,visible:e.visible.bindView,"onUpdate:visible":t[6]||(t[6]=t=>e.visible.bindView=t),loading:e.loading.bindView,"confirm-loading":e.loading.bindView,title:"绑定已有页面","destroy-on-close":!0,"z-index":99999,enterCallback:e.bindViewEnter},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createVNode"])(j,{ref:"bindViewRef",name:"bindViewForm",data:t,layout:e.FormLayout.VERTICAL,rules:e.bindViewRules},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(O,{label:e.$translate("模型"),name:"model"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{module:e.module,model:t.model,"onUpdate:model":e=>t.model=e,placeholder:"请选择模型","application-module":e.module},null,8,["module","model","onUpdate:model","application-module"])]),_:2},1032,["label"]),Object(a["createVNode"])(O,{label:e.$translate("视图"),name:"viewId"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(w,{model:t.model,"view-id":t.viewId,"onUpdate:view-id":e=>t.viewId=e,placeholder:"请选择视图"},null,8,["model","view-id","onUpdate:view-id"])]),_:2},1032,["label"])]),_:2},1032,["data","layout","rules"])]),_:1},8,["data","visible","loading","confirm-loading","enterCallback"]),Object(a["createVNode"])(k,{visible:e.visible.createView,"onUpdate:visible":t[15]||(t[15]=t=>e.visible.createView=t),loading:e.loading.createView,"confirm-loading":e.loading.createView,title:"新建页面","destroy-on-close":!0,"z-index":99999,enterCallback:e.createViewEnter},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(j,{ref:"createViewRef",name:"createViewForm",data:e.createViewData,layout:e.FormLayout.VERTICAL,rules:e.createViewRules},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(O,{label:e.$translate("页面标题"),name:"title"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{autocomplete:!1,value:e.createViewData.title,"onUpdate:value":t[7]||(t[7]=t=>e.createViewData.title=t),size:"large",maxlength:50,placeholder:e.$translate("请输入页面标题")},null,8,["value","placeholder"])]),_:1},8,["label"]),Object(a["createVNode"])(O,{label:e.$translate("模型"),name:"model"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{model:e.createViewData.model,"onUpdate:model":t[8]||(t[8]=t=>e.createViewData.model=t),placeholder:"请选择模型","application-module":e.module},null,8,["model","application-module"])]),_:1},8,["label"]),Object(a["createVNode"])(O,{label:e.$translate("业务类型"),name:"bizType"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(C,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewBizTypeOptions,"default-active-key":e.ViewBizTypeEnum.OPERATIONS_MANAGEMENT,"active-key":e.createViewData.bizType,"onUpdate:active-key":t[9]||(t[9]=t=>e.createViewData.bizType=t),buttonStyle:"solid"},null,8,["mode","properties","options","default-active-key","active-key"])]),_:1},8,["label"]),Object(a["withDirectives"])(Object(a["createVNode"])(O,{label:e.$translate("视图类型"),name:"type"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(C,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewTypeOptions,"active-key":e.createViewData.type,"onUpdate:active-key":t[10]||(t[10]=t=>e.createViewData.type=t),buttonStyle:"solid"},null,8,["mode","properties","options","active-key"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerType(e.createViewData)]]),Object(a["withDirectives"])(Object(a["createVNode"])(O,{name:"designerLayoutType",label:e.$translate("布局类型")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(C,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewDesignerLayoutTypeOptions(e.createViewData),"default-active-key":e.ViewLayoutTypeOptions[0].value,"active-key":e.createViewData.designerLayoutType,"onUpdate:active-key":t[11]||(t[11]=t=>e.createViewData.designerLayoutType=t),buttonStyle:"solid"},null,8,["mode","properties","options","default-active-key","active-key"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerLayoutType(e.createViewData)]]),Object(a["withDirectives"])(Object(a["createVNode"])(O,{name:"designerActionBarType",label:e.$translate("操作栏位置")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(C,{mode:e.Mode.button,properties:e.bizTypeProperties,options:e.viewDesignerActionBarTypeOptions(e.createViewData),"default-active-key":e.viewDesignerActionBarTypeOptions(e.createViewData)[0].value,"active-key":e.createViewData.designerActionBarType,"onUpdate:active-key":t[12]||(t[12]=t=>e.createViewData.designerActionBarType=t),buttonStyle:"solid"},null,8,["mode","properties","options","default-active-key","active-key"])]),_:1},8,["label"]),[[a["vShow"],e.isShowDesignerActionBarType(e.createViewData)]]),Object(a["createVNode"])(O,{class:"page-setting-category",label:e.$translate("页面分组"),name:"categoryId"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(D,{"current-module":e.module,"category-id":e.createViewData.categoryId,"onUpdate:category-id":t[13]||(t[13]=t=>e.createViewData.categoryId=t)},null,8,["current-module","category-id"])]),_:1},8,["label"]),Object(a["createVNode"])(O,{label:e.$translate("描述"),name:"description"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(T,{value:e.createViewData.description,"onUpdate:value":t[14]||(t[14]=t=>e.createViewData.description=t),placeholder:e.$translate("请输入描述"),"allow-clear":"",maxlength:128,autoSize:{minRows:3,maxRows:5}},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["data","layout","rules"])]),_:1},8,["visible","loading","confirm-loading","enterCallback"]),Object(a["createVNode"])(k,{visible:e.visible.bindUrl,"onUpdate:visible":t[18]||(t[18]=t=>e.visible.bindUrl=t),loading:e.loading.bindUrl,"confirm-loading":e.loading.bindUrl,title:"绑定链接","destroy-on-close":!0,"z-index":99999,enterCallback:e.bindUrlEnter},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(j,{ref:"bindUrlRef",name:"bindUrlRef",data:e.bindUrlData,layout:e.FormLayout.VERTICAL,rules:e.bindUrlRules},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(O,{label:e.$translate("链接地址"),name:"url"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{autocomplete:!1,value:e.bindUrlData.url,"onUpdate:value":t[16]||(t[16]=t=>e.bindUrlData.url=t),size:"large",placeholder:e.$translate("请输入链接地址")},null,8,["value","placeholder"])]),_:1},8,["label"]),Object(a["createVNode"])(O,{label:e.$translate("打开方式"),name:"target"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])($,{class:"oio-select","dropdown-class-name":"oio-select-dropdown lazy-load-select-dropdown",value:e.bindUrlData.target,"onUpdate:value":t[17]||(t[17]=t=>e.bindUrlData.target=t),size:"large",placeholder:e.$translate("请选择打开方式"),options:e.BIND_URL_TARGETS},null,8,["value","placeholder","options"])]),_:1},8,["label"])]),_:1},8,["data","layout","rules"])]),_:1},8,["visible","loading","confirm-loading","enterCallback"]),Object(a["createVNode"])(k,{data:e.editValue&&e.editValue.value,visible:e.visible.editIcon,"onUpdate:visible":t[19]||(t[19]=t=>e.visible.editIcon=t),loading:e.loading.editIcon,"confirm-loading":e.loading.editIcon,title:"更换图标",width:"720px","destroy-on-close":!0,"z-index":99999,enterCallback:e.editIconEnter},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createVNode"])(E,{class:"ui-icon-select-dropdown",value:t.icon,"onUpdate:value":e=>t.icon=e,placeholder:e.$translate("根据图标名称、fontClass查询")},null,8,["value","onUpdate:value","placeholder"])]),_:1},8,["data","visible","loading","confirm-loading","enterCallback"]),Object(a["createVNode"])(k,{data:e.editValue&&e.editValue.value,visible:e.visible.showClientType,"onUpdate:visible":t[20]||(t[20]=t=>e.visible.showClientType=t),loading:e.loading.showClientType,"confirm-loading":e.loading.showClientType,"wrapper-class-name":"page-menu-client-types-modal",title:"显示设备",width:"336px","destroy-on-close":!0,"z-index":99999,enterCallback:e.showClientTypeEnter},{default:Object(a["withCtx"])(({data:t})=>[Object(a["createElementVNode"])("div",Vg,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-client-type-pc",e.isShowPCClient(t)&&"page-menu-client-type-active"])},[Object(a["createElementVNode"])("div",{class:"page-menu-client-types-icon",onClick:()=>e.onSelectClientType(t,e.ViewClientType.PC)},[Object(a["createVNode"])(s,{icon:"oinone-PCduan"})],8,xg),Object(a["createElementVNode"])("div",Ig,Object(a["toDisplayString"])(e.$translate("PC端")),1)],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-client-type-mobile",e.isShowMobileClient(t)&&"page-menu-client-type-active"])},[Object(a["createElementVNode"])("div",{class:"page-menu-client-types-icon",onClick:()=>e.onSelectClientType(t,e.ViewClientType.MOBILE)},[Object(a["createVNode"])(s,{icon:"oinone-yidongduan"})],8,Mg),Object(a["createElementVNode"])("div",Ag,Object(a["toDisplayString"])(e.$translate("移动端")),1)],2)])]),_:1},8,["data","visible","loading","confirm-loading","enterCallback"])])}var Lg;fg.render=Fg,fg.__file="src/view/page-designer/component/widget/page-menu/page-menu.vue",function(e){e["PROPERTIES"]="PROPERTIES",e["STYLE"]="STYLE",e["FIELD"]="FIELD",e["ACTION"]="ACTION"}(Lg||(Lg={}));const Rg=[{id:Lg.PROPERTIES,text:"属性"},{id:Lg.STYLE,text:"样式"},{id:Lg.FIELD,text:"字段"},{id:Lg.ACTION,text:"动作"}];var Bg=Object(a["defineComponent"])({name:"WidgetSetting",components:{ButtonSelect:tp},props:{currentInstance:{type:Object,required:!0},selectedTab:{type:Function}},setup(e,t){const o=Rg.map(e=>Object.assign(Object.assign({},e),{text:Object(i["translateValueByKey"])(e.text)})),r=Object(a["ref"])(o[0].id),l=Object(a["ref"])([]),s=e=>{const t=i["Optional"].ofNullable(e.currentWidget).map(e=>!!e.widgetMetaFormViewName).orElse(!1),a=i["Optional"].ofNullable(e.currentWidget).map(e=>!!e.widgetAttrFormViewName).orElse(!1),s=i["Optional"].ofNullable(e.element).map(e=>e.initialization).orElse(!1),c=[];if(s&&a&&c.push(o[0]),s&&c.push(o[1]),t){const t=e.element.bizType;switch(t){case n["B"].ELEMENT:c.push(o[2]);break;case n["B"].FIELD:c.push(o[2]);break;case n["B"].ACTION:c.push(o[3]);break}}let d;return l.value=c,d=s?o[0]:c[2]||c[0],r.value=d?d.id:void 0,d};return Object(a["watch"])(()=>e.currentInstance,t=>{if(t){const o=s(t);e.selectedTab&&e.selectedTab(o)}else r.value=void 0},{immediate:!0}),t.expose({refreshTabSelectData:s}),{ButtonSelectMode:Xu,TabSelectOption:Lg,activeKey:r,tabSelectData:o,realTabSelectData:l}}});const _g={class:"ui-designer-widget-setting"},Wg={class:"widget-setting-header"},Pg={class:"drawer-aside-content oio-scrollbar-hidden"};function zg(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("button-select");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_g,[Object(a["createElementVNode"])("div",Wg,[Object(a["createVNode"])(l,{"active-key":e.activeKey,"onUpdate:active-key":t[0]||(t[0]=t=>e.activeKey=t),mode:e.ButtonSelectMode.TEXT,options:e.realTabSelectData,customGroupClass:"tab-select-group-custom",customItemClass:"tab-select-item-custom","label-key":"text",onOnSelected:e.selectedTab},null,8,["active-key","mode","options","onOnSelected"])]),Object(a["createElementVNode"])("div",Pg,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["renderSlot"])(e.$slots,"propertiesSettingForm")],512),[[a["vShow"],e.activeKey===e.TabSelectOption.PROPERTIES]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["renderSlot"])(e.$slots,"styleSettingForm")],512),[[a["vShow"],e.activeKey===e.TabSelectOption.STYLE]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["renderSlot"])(e.$slots,"metadataSettingForm")],512),[[a["vShow"],[e.TabSelectOption.FIELD,e.TabSelectOption.ACTION].includes(e.activeKey)]])])])}Bg.render=zg,Bg.__file="src/view/page-designer/component/widget/widget-setting/widget-setting.vue";const Gg=[{key:"designer-card",value:!0,label:"设计卡片",icon:"oinone-shejikapian"},{key:"designer-others",value:!1,label:"设计其它",icon:"oinone-guihuasheji"}];function Ug(e){const t=Object(a["ref"])(!0),o=Object(a["computed"])({get(){if(e.viewType.value===i["ViewType"].Gallery)return t.value},set(e){null!=e&&(t.value=e)}}),r=Object(a["computed"])(()=>{var t,o,i,r,a,l;return null===(l=null===(a=null===(r=null===(i=null===(o=null===(t=e.widgetInstanceRoot.value)||void 0===t?void 0:t.children)||void 0===o?void 0:o.find(e=>{const{element:t}=e;if(t){const{bizType:e,subtype:o}=t;return e===n["B"].ELEMENT&&o===n["A"].GALLERY}return!1}))||void 0===i?void 0:i.children)||void 0===r?void 0:r.find(e=>{const{element:t}=e;if(t){const{bizType:e,subtype:o}=t;return e===n["B"].SLOT&&o===n["A"].DEFAULT}return!1}))||void 0===a?void 0:a.children)||void 0===l?void 0:l.find(e=>{const{element:t}=e;if(t){const{bizType:e,subtype:o}=t;return e===n["B"].ELEMENT&&o===n["A"].CARD}return!1})});return{isShowCardDesign:o,cardWidgetInstanceRoot:r}}function Kg(e){const t=Object(a["computed"])(()=>r["Optional"].ofNullable(e.value).map(e=>{const t=e.element.properties.enableConfirm;return!!r["BooleanHelper"].isTrue(t)||!r["BooleanHelper"].isFalse(t)&&!!t}).orElse(!1)),o=()=>{r["Optional"].ofNullable(e.value).filter(e=>!!e.element.properties.enableConfirm).map(e=>e.options).ifPresent(e=>{e.confirmVisible=!0})};return{isAllowPreviewDesignerConfirm:t,onOpenDesignerConfirm:o}}function qg(e){const t=Object(a["ref"])(!1),{currentSelectedActionInstance:o}=vo({currentSelectedInstance:e.currentSelectedInstance}),l=Object(a["computed"])(()=>{const e=o.value;return r["Optional"].ofNullable(e).map(e=>n["K"].isAllowHasDrawer(e)).orElse(!1)&&r["Optional"].ofNullable(e).map(e=>e.options).map(e=>!e.popupError).orElse(!0)}),s=Object(a["computed"])(()=>{var e;const t=o.value;if(!t)return!1;if(!n["K"].isAllowHasDrawer(t))return!1;const i=null===(e=t.options)||void 0===e?void 0:e.popupReady;return Object(u["a"])(i)?n["K"].hasDrawer(t):i}),c=()=>{r["Optional"].ofNullable(o.value).filter(e=>n["K"].isAllowHasDrawer(e)).map(e=>e.options).ifPresent(e=>{e.popupVisible=!0})},d=(e,t)=>{const o=e.metadata.copiedDesignerJson;if(o)try{return p(e,o,t)}catch(a){console.error("copy drawer widget instance error.",a),n["ab"].isError(e)}else r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法获取设计数据，请联系开发人员提供技术支持")),n["ab"].isError(e)},p=(t,o,a)=>{var l,s;const c=JSON.parse(o),d=n["K"].findDrawerSlotTemplate(c);if(!d)return r["OioNotification"].warning(Object(i["translateValueByKey"])("警告"),Object(i["translateValueByKey"])("无效的设计数据视图，复制失败")),void n["ab"].isError(t);const u=n["wb"].rawCreateDrawerWidgetInstance(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,a.model,r["CastHelper"].cast(a.type),{header:null===(l=d.header)||void 0===l?void 0:l.elements,default:c,footer:null===(s=d.footer)||void 0===s?void 0:s.elements});return u.element.isVirtual=!1,n["R"].add(t,u),n["ab"].isReady(t),u};function b(){t.value=n["L"].hasOpen()}function g(){t.value=n["L"].hasOpen()}return Object(a["onMounted"])(()=>{n["L"].onOpen(b),n["L"].onClose(g)}),Object(a["onUnmounted"])(()=>{n["L"].clearOnOpen(b),n["L"].clearOnClose(g)}),{hasOpenDrawer:t,isAllowOpenDesignerDrawer:l,isReadyOpenDesignerDrawer:s,onOpenDesignerDrawer:c,copyDrawerWidgetInstance:d}}function Hg(e,t,o){return{id:n["h"],layoutId:e,designerJson:Object(n["Vb"])(t),version:n["h"],versionName:n["i"],createDate:i["DateUtil"].dateFormat(new Date,i["defaultFormat"]),modelDefinitions:o}}function Yg(e,t){const o=new n["Z"],i=Object(a["ref"])(0),r=Object(a["ref"])(0),l=Object(a["ref"])(void 0),s=Object(a["ref"])(!1),c=Object(a["ref"])(!1),d=(e,t,i,n)=>{const r=Hg(e,t,i);l.value=r,o.init(r,n,e)},u=o=>{e(o);const i=o.designerData;i||(o.designerData=JSON.parse(JSON.parse(o.designerJson))),l.value=o,t(o)},p=Object(a["computed"])(()=>{const e=i.value;return!!e&&r.value>0}),b=Object(a["computed"])(()=>{const e=i.value;return!!e&&r.value!==e-1}),g=e=>{o.push(e);const t=o.currentEditor.editor;i.value=t.currentLength,r.value=t.currentIndex},v=()=>{o.cancel();const e=o.currentEditor.editor;r.value=e.currentIndex;const t=e.currentData;s.value=!0,u(t)},m=()=>{o.recover();const e=o.currentEditor.editor;r.value=e.currentIndex;const t=e.currentData;c.value=!0,u(t)},y=()=>{s.value=!1,c.value=!1};return{PageDesignerMultiQueueEditor:o,currentVersion:l,isCancelState:s,isRecoverState:c,historyVersionInit:d,switchVersion:u,allowCancelCurrentEdit:p,allowRecoverLastEdit:b,addEditHistoryQueue:g,cancelCurrentEdit:v,recoverLastEdit:m,resetEditState:y}}function Qg(e){const t=Object(a["ref"])(!1),{currentSelectedActionInstance:o}=vo({currentSelectedInstance:e.currentSelectedInstance}),l=Object(a["computed"])(()=>{const e=o.value;return r["Optional"].ofNullable(e).map(e=>n["P"].isAllowHasInnerPopup(e)).orElse(!1)&&r["Optional"].ofNullable(e).map(e=>e.options).map(e=>!e.popupError).orElse(!0)}),s=Object(a["computed"])(()=>{var e;const t=o.value;if(!t)return!1;if(!n["P"].isAllowHasInnerPopup(t))return!1;const i=null===(e=t.options)||void 0===e?void 0:e.popupReady;return Object(u["a"])(i)?n["P"].hasInnerPopup(t):i}),c=()=>{r["Optional"].ofNullable(o.value).filter(e=>n["P"].isAllowHasInnerPopup(e)).map(e=>e.options).ifPresent(e=>{e.popupVisible=!0})},d=(e,t)=>{const o=e.metadata.copiedDesignerJson;if(o)try{return p(e,o,t)}catch(a){console.error("copy inline popup widget instance error.",a),n["ab"].isError(e)}else r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法获取设计数据，请联系开发人员提供技术支持")),n["ab"].isError(e)},p=(t,o,a)=>{var l,s;const c=JSON.parse(o),d=n["P"].findInnerPopupSlotTemplate(c);if(!d)return r["OioNotification"].warning(Object(i["translateValueByKey"])("警告"),Object(i["translateValueByKey"])("无效的设计数据视图，复制失败")),void n["ab"].isError(t);const u=n["wb"].rawCreateInnerPopupWidgetInstance(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,a.model,r["CastHelper"].cast(a.type),{header:null===(l=d.header)||void 0===l?void 0:l.elements,default:c,footer:null===(s=d.footer)||void 0===s?void 0:s.elements});return u.element.isVirtual=!1,n["R"].add(t,u),n["ab"].isReady(t),u};function b(){t.value=n["Q"].hasOpen()}function g(){t.value=n["Q"].hasOpen()}return Object(a["onMounted"])(()=>{n["Q"].onOpen(b),n["Q"].onClose(g)}),Object(a["onUnmounted"])(()=>{n["Q"].clearOnOpen(b),n["Q"].clearOnClose(g)}),{hasOpenInnerPopup:t,isAllowOpenDesignerInnerPopup:l,isReadyOpenDesignerInnerPopup:s,onOpenDesignerInnerPopup:c,copyInnerPopupWidgetInstance:d}}function Jg(e){const t=Object(a["ref"])(!1),{currentSelectedActionInstance:o}=vo({currentSelectedInstance:e.currentSelectedInstance}),l=Object(a["computed"])(()=>{const e=o.value;return r["Optional"].ofNullable(e).map(e=>n["W"].isAllowHasModal(e)).orElse(!1)&&r["Optional"].ofNullable(e).map(e=>e.options).map(e=>!e.popupError).orElse(!0)}),s=Object(a["computed"])(()=>{var e;const t=o.value;if(!t)return!1;if(!n["W"].isAllowHasModal(t))return!1;const i=null===(e=t.options)||void 0===e?void 0:e.popupReady;return Object(u["a"])(i)?n["W"].hasModal(t):i}),c=()=>{r["Optional"].ofNullable(o.value).filter(e=>n["W"].isAllowHasModal(e)).map(e=>e.options).ifPresent(e=>{e.popupVisible=!0})},d=(e,t)=>{const o=e.metadata.copiedDesignerJson;if(o)try{return p(e,o,t)}catch(a){console.error("copy modal widget instance error.",a),n["ab"].isError(e)}else r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法获取设计数据，请联系开发人员提供技术支持")),n["ab"].isError(e)},p=(t,o,a)=>{var l,s;const c=JSON.parse(o),d=n["W"].findModalSlotTemplate(c);if(!d)return r["OioNotification"].warning(Object(i["translateValueByKey"])("警告"),Object(i["translateValueByKey"])("无效的设计数据视图，复制失败")),void n["ab"].isError(t);const u=n["wb"].rawCreateModalWidgetInstance(t,e.widgetNameGroup.value,e.widgetTypeGroup.value,a.model,r["CastHelper"].cast(a.type),{header:null===(l=d.header)||void 0===l?void 0:l.elements,default:c,footer:null===(s=d.footer)||void 0===s?void 0:s.elements});return u.element.isVirtual=!1,n["R"].add(t,u),n["ab"].isReady(t),u};function b(){t.value=n["X"].hasOpen()}function g(){t.value=n["X"].hasOpen()}return Object(a["onMounted"])(()=>{n["X"].onOpen(b),n["X"].onClose(g)}),Object(a["onUnmounted"])(()=>{n["X"].clearOnOpen(b),n["X"].clearOnClose(g)}),{hasOpenModal:t,isAllowOpenDesignerModal:l,isReadyOpenDesignerModal:s,onOpenDesignerModal:c,copyModalWidgetInstance:d}}const Xg=0,Zg=24,ev=12,tv=88,ov=83,iv=322,nv=208,rv=440;function av(e){const{visible:t}=e,o=Object(a["ref"])(!0),i=Object(a["ref"])(!0),n=Object(a["ref"])(!1),r=Object(a["ref"])(!1),l=Object(a["ref"])(Xg+"px"),s=Object(a["ref"])(Xg+"px"),c=Object(a["ref"])(Xg+"px"),d=Object(a["ref"])(Xg+"px"),u=Object(a["ref"])(ov+iv+rv+"px"),p=()=>{let e=Xg,a=ov,p=Xg,b=Xg;t.leftDrawer?o.value?n.value?(r.value=!0,e+=nv):r.value=!1:n.value?(r.value=!0,e+=iv):r.value=!1:n.value?(r.value=!0,e+=nv):r.value=!1;let g=Xg;t.leftDrawer&&o.value&&(a+=iv,n.value&&(p=Zg,a+=Zg)),t.rightDrawer?i.value&&(a+=rv,n.value&&(b=Zg,a+=Zg)):n.value&&(b=ev),n.value&&(g+=tv),l.value=g+"px",s.value=e+"px",u.value=a+"px",c.value=p+"px",d.value=b+"px"};return Object(a["watch"])(n,e=>{Object(a["nextTick"])(()=>{t.leftDrawer=!e,t.rightDrawer=!e,p()})}),{isLeftDrawerAnchored:o,isRightDrawerAnchored:i,isShowMasterMask:n,isShowMenuDynamic:r,headerHeight:l,leftAreaWidth:s,designerContentLeftMargin:c,designerContentRightMargin:d,contentOtherWidth:u,computeLayout:p}}function lv(){const e=Object(a["reactive"])({leftDrawer:!1,content:!1,rightDrawer:!1}),t=Object(a["reactive"])({leftDrawer:!0,content:!1,rightDrawer:!0}),o=Object(a["ref"])(void 0),i=Object(a["ref"])(!0),n=Object(a["ref"])(!1),r=Object(a["computed"])({get(){return!!i.value&&(!e.leftDrawer&&!e.content&&!e.rightDrawer&&t.content)},set(e){i.value=e}}),l=Object(a["ref"])(void 0),s=Object(a["ref"])(!0),c=Object(a["ref"])(),d=Object(a["ref"])(),u=Object(a["ref"])(""),p=Object(a["ref"])(),b=Object(a["ref"])("");return{loading:e,visible:t,viewType:o,isReady:r,copyIsReady:n,autoSaving:l,saveResult:s,designerData:c,widgetInstanceRoot:d,currentViewModel:u,currentHistoryCount:p,protocolVersion:b}}function sv(e){const{loading:t,widgetInstanceRoot:o,currentViewModel:i}=e,l=Object(a["ref"])(new Map),c=Object(a["ref"])(new Map),d=Object(a["ref"])(new Map),u=Object(a["ref"])(new Map),p=new Map,b=Object(a["ref"])(new Map),g=Object(a["ref"])(void 0),v=(e,t)=>{const{categoryGroup:o,widgetDefinitionGroup:i,widgetNameGroup:r,widgetTypeGroup:a}=Object(n["Gb"])(e,t);l.value=o,c.value=i,d.value=r,u.value=a,Object(n["od"])().init({widgetCategoryGroup:l,widgetDefinitionGroup:c,widgetNameGroup:d,widgetTypeGroup:u})},m=(e,t)=>(p.set(e.model,e),b.value=new Map([[e.model,e]]),t.forEach(e=>{b.value.has(e.model)||b.value.set(e.model,Object(n["Ob"])(e.model,e.displayName))}),g.value=e,b.value),y=e=>{const o=p.get(e);o&&o.initialization?(b.value.set(e,o),g.value=o):(t.leftDrawer=!0,io(e).then(t=>{const{modelDefinition:o,fields:i,viewActions:r,serverActions:a,urlActions:l,clientActions:s}=t,c=Object(n["Qb"])(o.model,o.displayName,i,[...r,...a,...l,...s]);p.set(e,c),b.value.set(e,c),g.value=c}).finally(()=>{t.leftDrawer=!1}))},h=(e,t)=>{var o;if(n["W"].isAllowHasModal(e))return!!(null===(o=e.options)||void 0===o?void 0:o.popupVisible);if(e.element.model===t)return!0;for(const i of e.children)if(h(i,t))return!0;return!1},f=e=>{const t=r["Optional"].ofNullable(g.value).map(e=>e.model).orElse(void 0);i.value!==e&&(h(o.value,e)||(b.value.delete(e),t===e&&(g.value=r["Optional"].ofNullable(b.value).map(e=>e.values()).filter(e=>!Object(s["a"])(e)).map(e=>e.next()).map(e=>e.value).orElse(void 0))))},O=e=>{var t,o,i,r;if(!(null===(o=null===(t=g.value)||void 0===t?void 0:t.actions)||void 0===o?void 0:o.length))return;const a=Object(n["Kb"])(e.actionType),l=g.value.actions;l.push(Object.assign(Object.assign({},e),{actionType:a,createDate:null!==(r=null===(i=e.metadata)||void 0===i?void 0:i.createDate)&&void 0!==r?r:new Date,icon:Object(n["Jb"])(a)})),g.value.actions=l,b.value.set(e.model,g.value),p.set(e.model,g.value)},w=e=>{var t,o;if(!(null===(o=null===(t=g.value)||void 0===t?void 0:t.actions)||void 0===o?void 0:o.length))return;const i=g.value.actions,n=i.findIndex(t=>t.name===e.name&&t.model===e.model);n<0||(i.splice(n,1),g.value.actions=i,b.value.set(e.model,g.value),p.set(e.model,g.value))},j=e=>{var t;const o=null===(t=g.value)||void 0===t?void 0:t.fields;o&&o.unshift(e)},k=e=>{var t;const o=null===(t=g.value)||void 0===t?void 0:t.fields;if(!o)return;const i=o.findIndex(t=>t.id===e.id);-1!==i&&o.splice(i,1)};return{widgetCategoryGroup:l,widgetDefinitionGroup:c,widgetNameGroup:d,widgetTypeGroup:u,modelWidgetLibCache:p,modelWidgetLib:b,currentModelWidgetLib:g,initWidgetGroup:v,initWidgetLib:m,switchModelWidgetLib:y,removeModelWidgetLib:f,addCustomAction:O,removeCustomAction:w,addField:j,removeField:k}}const cv=Object(a["defineComponent"])({name:"PageDesigner",components:{VanNavBar:Au,UiIconSizeReset:Hu,DesignerDraggable:n["t"],WidgetSetting:Bg,draggableWidget:tg,designerHeader:Uu,PageMenu:fg,DesignerContentHeader:Lu,AnchorDrawer:n["d"],OioButton:r["OioButton"],OioIcon:r["OioIcon"],OioSpin:r["OioSpin"],OioTooltip:r["OioTooltip"],OioTooltipHelp:r["OioTooltipHelp"],ARadioButton:T["a"],ARadioGroup:D["a"]},inheritAttrs:!1,props:["layoutId","viewId","logo","setLayoutId","setViewId","isDestroyForm","destroyForm","initForm","initMetadataSettingForm","saveAttrInfo","saveMetaInfo","designerTtypeOption","setDesignerTtypeOptions","setDesignerContextTypeOptions","setDesignerSpanOptions","setDesignerFieldReference","setDesignerModelFieldInfo","setViewClientType","viewClientType","goToPageHistoryList","goToViewDesignList"],setup(e){Object(n["pd"])().setScope(Fu.PAGE);const t=Object(a["ref"])(),o=Object(a["ref"])(),l=Object(a["ref"])(),c=lv(),{loading:b,visible:g,viewType:m,isReady:y,autoSaving:h,saveResult:f,designerData:O,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,protocolVersion:C}=c,{widgetCategoryGroup:D,widgetDefinitionGroup:T,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,initWidgetGroup:V,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M,addCustomAction:A,removeCustomAction:F,addField:L,removeField:R}=sv(c),{isLeftDrawerAnchored:B,isRightDrawerAnchored:_,isShowMasterMask:W,isShowMenuDynamic:P,headerHeight:z,leftAreaWidth:G,designerContentLeftMargin:U,designerContentRightMargin:K,contentOtherWidth:q,computeLayout:H}=av(c);Object(a["provide"])("widgetTypeGroup",E);const Y=Object(a["computed"])(()=>m.value===i["ViewType"].Gallery),{isShowCardDesign:Q,cardWidgetInstanceRoot:X}=Ug(c),Z=Object(a["ref"])(void 0),te=Object(a["ref"])(),{lazySelectedInstance:oe,setLazySelectedInstance:ie}=Object(n["hd"])(),ne=Object(a["computed"])(()=>Z.value&&Object.keys(Z.value).length>=1),re=Object(a["computed"])(()=>{const e=Z.value;return!!e&&n["R"].isIcon(e).result}),ae=e=>{Q.value=e.target.value},le=()=>{Z.value=void 0,qe.value=!1,e.destroyForm()},{PageDesignerMultiQueueEditor:se,currentVersion:ce,isCancelState:de,isRecoverState:ue,historyVersionInit:pe,allowCancelCurrentEdit:be,allowRecoverLastEdit:ge,addEditHistoryQueue:ve,cancelCurrentEdit:me,recoverLastEdit:ye,resetEditState:he}=Yg(()=>{le()},e=>{fe.value=Object(d["a"])(e.designerData),x(S.value.get(j.value),e.modelDefinitions)}),fe=Object(a["computed"])({get(){return O.value},set(e){O.value=e,w.value=e?Object(n["Ib"])(E.value,e):void 0}}),{hasOpenModal:Oe,isAllowOpenDesignerModal:we,isReadyOpenDesignerModal:je,onOpenDesignerModal:ke,copyModalWidgetInstance:Ce}=Jg({currentSelectedInstance:Z,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenDrawer:De,isAllowOpenDesignerDrawer:Te,isReadyOpenDesignerDrawer:$e,onOpenDesignerDrawer:Ee,copyDrawerWidgetInstance:Se}=qg({currentSelectedInstance:Z,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenInnerPopup:Ne,isAllowOpenDesignerInnerPopup:Ve,isReadyOpenDesignerInnerPopup:xe,onOpenDesignerInnerPopup:Ie,copyInnerPopupWidgetInstance:Me}=Qg({currentSelectedInstance:Z,widgetNameGroup:$,widgetTypeGroup:E}),{isAllowPreviewDesignerConfirm:Ae,onOpenDesignerConfirm:Fe}=Kg(Z),Le=Object(a["computed"])(()=>{const{disable:e,allowViewActionDesign:t,designerViewId:o}=Object(n["Eb"])(Z.value);return{disable:e,allowViewActionDesign:t,designerViewId:o}}),Re=Object(i["useRouter"])().router,{matched:Be}=Object(i["useMatched"])(),_e=e=>{Object(n["Hc"])(e,Re,Be,i["RedirectTargetEnum"].BLANK)},We=Object(a["ref"])({}),Pe=Object(a["ref"])({}),ze=Object(a["ref"])(""),Ge=Object(a["ref"])(""),Ue=Object(a["ref"])([]),Ke=Object(a["computed"])(()=>Object(n["hc"])(Z.value)),qe=Object(a["ref"])(!1),He=(t,o)=>J(this,void 0,void 0,(function*(){b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0;try{const[l,s]=yield Promise.all([n["yb"].INSTANCE.get(t),Qt(t)]),{widgetDefinitionList:c=[],widgetList:d=[]}=l,{id:u,viewId:p,viewType:v,viewTitle:y,viewName:h,viewDescription:f,bizType:O,designerLayoutType:w,designerActionBarType:D,viewCategoryId:T,viewThumbnail:$,modelDefinition:E={},modelDefinitions:I=[],fields:M=[],viewActions:A=[],serverActions:F=[],urlActions:L=[],clientActions:R=[],designerJson:B,module:_="",modules:W=[],historyCount:P=0,errorJsonPaths:z=[],errorWidgetJsonPaths:G=[],protocolVersion:U,selections:K=[],isFloatActionBar:q}=s,{setExistEnumOptions:H}=Object(n["cd"])();H(K),e.setLayoutId(u),e.setViewId(p),m.value=v;const Y=[...A,...F,...L,...R];V(c,d),x(Object(n["Qb"])(E.model,E.displayName,M,Y),I),We.value={name:y||h||Object(i["translateValueByKey"])("未命名视图"),description:f,bizType:O,type:v,designerLayoutType:w,designerActionBarType:D,currentCategoryId:T,thumbnailUrl:$,isFloatActionBar:q,model:E.model,viewName:h},Pe.value=Object.assign({},We.value);const Q=JSON.parse(B);fe.value=Q;const J=Object(n["dc"])(Q,z);J&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${J}条数据不存在，请重新设置`),{duration:null});const X=Object(n["ec"])(Q,G);X&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${X}个组件不存在，请重新设置`),{duration:null}),j.value=E.model,pe(u,Q,I,{layoutId:u,designerData:Object(a["computed"])(()=>fe.value),modelWidgetLib:S.value,currentModelWidgetLib:N.value}),k.value=P,o&&(ze.value=_,Ge.value=_,Ue.value=W),C.value=U||""}finally{g.content=!0,b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1}})),Ye=t=>{if(t=Object(n["nc"])(t),!t)return;const o=Z.value;if(!o)return;le(),qe.value=!0,Z.value=o;let{currentWidget:i}=o;if(!i)return;const{viewType:r,widgetDefinitionName:a}=i,l=T.value.get(a);if(!l)return;const{widgetList:s}=l,c=s.find(e=>e.viewType===r&&Object(n["nc"])(e.widgetSubtype)===t);if(!c)return;o.currentWidget=c,i=c;const{element:d}=o;d.title=c.widgetDisplayName,d.subtype=c.widgetSubtype,d.widget=c,b.rightDrawer=!0,e.initMetadataSettingForm(o,!0,!1).then(e=>{const{isDialog:r,isDrawer:a,isRowAction:l,isInContainer:s,widgetViewType:c,widgetName:u}=Object(n["uc"])(o);e&&(o.metadata=e.getData(),o.metadata.ttype=t,o.metadata[n["yc"]]=r,o.metadata[n["Ac"]]=a,o.metadata[n["Dc"]]=l,o.metadata[n["Cc"]]=s,o.metadata[n["Pc"]]=d.model,o.metadata[n["rd"]]=c,o.metadata[n["td"]]=u),n["xb"].isFieldWidget(i)&&Xe(o,i)}).finally(()=>{b.rightDrawer=!1,o.forceUpdate()})},Qe=t=>{let o=[];const r=t.parent;if(!r)return void e.setDesignerSpanOptions(o);const{element:l}=t;if(n["ob"].isV3(C.value)){const e=i["Optional"].ofNullable(r.options).map(e=>e.cols).orElse(i["DEFAULT_COLS"]),a=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(1),l=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(e);for(const t in i["ColSpanEnum"]){const n=i["ColSpanEnum"][t],r=e*Number(n);a<=r&&r<=l&&o.push(t)}}else if(n["R"].isRow(r).result||n["R"].isBlock(r).result){const s=i["Optional"].ofNullable(r.options).map(e=>e.cols).orElse(void 0);if(Object(u["a"])(s))return void e.setDesignerSpanOptions(o);const c=i["Optional"].ofNullable(l.properties).map(e=>e.colSpan).orElse(void 0);if(!Object(u["a"])(c)){const e=s-Object(a["unref"])(r.options.spanTotal)+n["O"].computeColSpan(c,s);if(0===e)o=[c];else for(const r in i["ColSpanEnum"]){const a=i["ColSpanEnum"][r];if(a)if(c===r)o.push(r);else{const l=s*Number(a),c=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(e=>n["O"].computeColSpan(e,s)).orElse(1),d=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(e=>n["O"].computeColSpan(e,s)).orElse(s);c<=l&&l<=d&&l<=e&&o.push(r)}}}}else if(n["R"].isContainer(r).result)for(const e in i["ColSpanEnum"])o.push(e);e.setDesignerSpanOptions(o)},Je=(e,t)=>{const{widgetDefinitionName:o,widgetName:i,multi:r}=t;if(n["E"].includes(i)){const o=$.value.get(`${n["B"].FIELD}#${i}#${r}`);if(!o)return;tt(e,o,t)}else{const i=T.value.get(o);if(!i)return;et(e,i,t),Xe(e,t)}},Xe=(e,t)=>{const{widgetDefinitionName:o}=t;if(!o)return;const i=T.value.get(o);if(!i)return;const{metadata:r}=e;if(r){const{isSelectMulti:o,metadataMulti:a}=Object(n["vc"])(e,t,i);r[n["Ec"]]=o||!1,Object(u["a"])(a)||(r.multi=a)}},Ze=(e,t)=>{const o=T.value.get(t.widgetDefinitionName);o&&et(e,o,t)},et=(t,o,a)=>{const l=Object(n["rc"])(t);if(!l)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法识别当前组件实例所在视图类型"));const s=Object(n["nc"])(a.widgetSubtype),c=[s];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);e.viewType===l&&e.show&&t!==s&&c.push(t)});const[d]=c;t.metadata.ttype=d,e.setDesignerTtypeOptions([...new Set(c)]),n["Hb"].setValue(n["ac"],d)},tt=(t,o,a)=>{const l=Object(n["rc"])(t);if(!l)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法识别当前组件实例所在视图类型"));const s=Object(n["nc"])(a.widgetSubtype),c=[s];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);e.viewType===l&&t!==s&&c.push(t)});const[d]=c;t.metadata.ttype=d,e.setDesignerTtypeOptions(c),n["Hb"].setValue(n["ac"],d)},ot=t=>{var o;const n=[];i["Optional"].ofNullable(t).map(e=>e.root).map(e=>null===e||void 0===e?void 0:e.fieldCollection).map(e=>null===e||void 0===e?void 0:e.keys()).ifPresent(e=>{if(e)for(const t of e)n.push(t.split("#")[1])});let r=!1;i["Optional"].ofNullable(t).map(e=>e.currentWidget).ifPresent(e=>{const t=e;r=t.multi||!1});const a=[];if(N.value&&N.value.fields)for(const e of N.value.fields)a.push({name:e.name,id:e.id,model:e.model,ttype:e.ttype,systemSource:e.systemSource,multi:e.multi,displayName:e.displayName});e.setDesignerModelFieldInfo({allFieldList:a,existFieldList:n,multi:r,currentModel:null===(o=N.value)||void 0===o?void 0:o.model})},it=(e,t)=>{const o=S.value.get(e);if(o){const e=t.name,i=o.fields.find(t=>t.name===e);i||o.fields.splice(0,0,t)}},nt=(e,t,o,r,a,l)=>{let s=E.value.get(`${n["B"].FIELD}#${r}#${l}`)||[];r===i["ModelFieldType"].Related&&a&&(s=[...s,...E.value.get(`${n["B"].FIELD}#${a}#${l}`)||[]]),(null===s||void 0===s?void 0:s.length)?at(e,t,s):e.widgetList=[]},rt=(e,t)=>{const o=E.value.get(`${t.widgetBizType}#${t.widgetSubtype}`);o&&at(e,t,o)},at=(e,t,o)=>{const i=n["wb"].fetchWidgetGroup(e.parent,o,!0);if(!i)return void(e.widgetList=[]);const{defaultWidget:r,widgetList:a}=i,{widgetDefinitionName:l}=t,s=[r,...a].find(e=>e.widgetDefinitionName===l);t=s||r,e.currentWidget=t,e.element.widget=t;const{widgetName:c}=t;r.widgetName===c?e.widgetList=a:e.widgetList=[r,...a.filter(e=>e.widgetName!==c)]},lt=(e,t)=>{const{element:o}=e,r=e.currentWidget;if(o.name){const a=o.widgetData;if(!t)if(a){const t=i["Optional"].ofNullable(a).map(e=>e.ttype).orElse(void 0),l=i["Optional"].ofNullable(a).map(e=>e.relatedTtype).orElse(void 0),s=i["Optional"].ofNullable(a).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)||Object(u["a"])(s)||(nt(e,r,a,t,l,s),it(o.model,a),n["R"].collectionRootElement(e))}else Je(e,r)}else Je(e,r),ot(e);Qe(e)},st=t=>{const{element:o}=t;let r=!1;if(o.name)n["R"].collectionRootElement(t);else{const o=t.parent.element,{bizType:a,subtype:l}=o;if(a&&l&&[n["A"].ROW_ACTIONS,n["A"].ROW_ACTIONS_WIDGET,n["A"].DROPDOWN,n["A"].TOOLBAR_DROPDOWN].includes(l))e.setDesignerContextTypeOptions([i["ActionContextType"].Single]),r=!0;else{const o=Object(n["qc"])(t,e=>e.element.bizType!==n["B"].SLOT);if(o){const{bizType:t,subtype:a}=o.element;t===n["B"].ELEMENT&&a===n["A"].ACTION_BAR&&(e.setDesignerContextTypeOptions([i["ActionContextType"].ContextFree,i["ActionContextType"].Single,i["ActionContextType"].Batch,i["ActionContextType"].SingleAndBatch]),r=!0)}}}r||e.setDesignerContextTypeOptions([])},ct=(e,t)=>{const{element:o}=e,r=e.currentWidget,a=o.widgetData;if(!t)if(a){const t=[a.startMetadata,a.endMetadata];t.forEach(e=>{if(!e)return;const t=i["Optional"].ofNullable(e).map(e=>e.ttype).orElse(void 0),n=i["Optional"].ofNullable(e).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)||Object(u["a"])(n)||it(o.model,e)}),rt(e,r),n["R"].collectionRootElement(e)}else Ze(e,r),ot(e);Qe(e)},dt=(o,r,l)=>{Object(u["a"])(l)&&(l=o.element.initialization),Object(a["nextTick"])(()=>{g.rightDrawer=!0,H()}),b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0,i["Optional"].ofNullable(Object(n["sc"])(o,e.layoutId)).ifPresent(t=>{e.setDesignerFieldReference(t)}),e.initForm(o,r,!1).then(({propertiesSettingFormWidget:e,styleSettingFormWidget:i,metadataSettingFormWidget:r})=>{var a,s,c,d,u,p;const{isDialog:b,isDrawer:g,isRowAction:v,isInContainer:m,widgetViewType:y,widgetName:h,elementSource:f}=Object(n["uc"])(o);r&&(o.metadata=r.getData(),o.metadata[n["yc"]]=b,o.metadata[n["Ac"]]=g,o.metadata[n["Dc"]]=v,o.metadata[n["Cc"]]=m,o.metadata[n["Yc"]]=(null===(a=o.superRoot)||void 0===a?void 0:a.element.model)||o.element.model,o.metadata[n["Pc"]]=o.element.model,o.metadata[n["rd"]]=y,o.metadata[n["cc"]]=f,o.metadata[n["td"]]=h),e&&(o.element.properties=e.getData(),o.element.properties[n["Oc"]]=o.metadata,o.element.properties[n["yc"]]=b,o.element.properties[n["Ac"]]=g,o.element.properties[n["Dc"]]=v,o.element.properties[n["Cc"]]=m,o.element.properties[n["Yc"]]=(null===(s=o.superRoot)||void 0===s?void 0:s.element.model)||o.element.model,o.element.properties[n["Pc"]]=o.element.model,o.element.properties[n["rd"]]=y,o.element.properties[n["td"]]=h,o.element.properties[n["cc"]]=f,i&&i.setData(o.element.properties));const O=o.currentWidget;switch(O.widgetBizType){case n["B"].PACK:case n["B"].ELEMENT:switch(O.widgetSubtype){case n["A"].MODAL:case n["A"].DRAWER:case n["A"].INNER_POPUP:o.element.properties[n["Db"]]=(null===(d=null===(c=o.parent)||void 0===c?void 0:c.element)||void 0===d?void 0:d.properties.label)||"对话框",o.element.properties[n["Cb"]]=null===(p=null===(u=o.parent)||void 0===u?void 0:u.metadata)||void 0===p?void 0:p.contextType;break;case n["A"].PARAGRAPH:case n["A"].CHART:case n["A"].REPORT:case n["A"].DATA_DASHBOARD:Qe(o);break;case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:case n["A"].FLOAT_PLAT:ct(o,l);break}break;case n["B"].FIELD:lt(o,l);break;case n["B"].ACTION:st(o);break}t.value&&t.value.refreshTabSelectData(o),Z.value=o,ie(o)}).finally(()=>{b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1,Object(a["nextTick"])(()=>{o.isReady||(o.isReady=!0,o.notifyParentIsReady())})})},ut=(e,t)=>{le(),e&&e.currentWidget?(Ot(e),Object(n["bd"])().clear(),dt(e,!1,t)):(Ct(void 0),Z.value=e,ie(e))},pt=Object(p["a"])((e,t,o)=>{h.value=!0;const r=[],a=[];for(const i of e.modelWidgetLib.values())r.push(i.model),a.push({model:i.model,displayName:i.displayName});o&&ve({id:n["h"],layoutId:e.layoutId,designerJson:t,version:n["h"],versionName:n["i"],createDate:i["DateUtil"].dateFormat(new Date,i["defaultFormat"]),modelDefinitions:a}),Jt(e.layoutId,t,r).then(()=>{f.value=!0}).catch(e=>{console.error(e),f.value=!1}).finally(()=>{h.value=!1})},1e3),bt=e=>{try{e||(e=se.currentEditor);const t=Object(n["Vb"])(e.context.designerData.value),o=!de.value&&!ue.value;if(o){const o=e.editor.currentData;if(o&&t===o.designerJson)return}ce.value.id===n["h"]&&pt(e.context,t,o)}finally{he()}},gt=({selectedInstance:t,originWidget:o,targetWidget:r})=>{const{widgetBizType:a}=o;if(a===n["B"].FIELD){const a=o.widgetSubtype;if(!a)return;const l=i["Optional"].ofNullable(t.element).map(e=>e.widgetData).orElse(void 0);if(!l)return;const{model:s}=l;if(n["eb"].includes(a)){const i=o.widgetName,a=r.widgetName,c=l.references;if(n["db"].includes(i))if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s),M(c);else if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s)}else I(s);ft(t,l)}else I(t.element.model);le(),t?dt(t,!0):ie(void 0)};function vt(e,t){const o=t.widgetSubtype;if(!o)return;const r=i["Optional"].ofNullable(e.element).map(e=>e.widgetData).orElse(void 0);if(r&&n["eb"].includes(o)){const e=r.references;M(e)}}const mt=e=>{const{currentWidget:t}=e;if(!t)return;const{widgetBizType:o}=t;switch(o){case n["B"].ELEMENT:ot(e);break;case n["B"].FIELD:ot(e),vt(e,t);break}e.children.forEach(e=>{mt(e)})},yt=({targetInstance:e})=>{var t,o,i;const r=null===(t=Z.value)||void 0===t?void 0:t.element.id,a=null===(o=e.element)||void 0===o?void 0:o.id;if(r&&a&&r===a){const t=null===(i=e.element)||void 0===i?void 0:i.bizType;t===n["B"].ACTION&&st(e)}},ht=e=>{var t,o;const{multi:i}=e.element.widgetData,n=e.currentWidget.multi;if(!Object(u["a"])(i)&&!Object(u["a"])(n)&&i!==n){const n=null===(t=e.currentWidget)||void 0===t?void 0:t.widgetName;if(n){const t=null===(o=e.widgetList)||void 0===o?void 0:o.find(e=>e.widgetName===n&&e.multi===i);t&&(e.currentWidget=t)}}},ft=(e,t)=>{var o;const{element:i}=e,{viewType:r,widgetName:a}=e.currentWidget;if(a){while(e.children.length>0)n["R"].remove(e,0);i.isContainerWidget=null,i.containerWidgetViewType=null,t&&(null===(o=Object(n["Zc"])({viewType:Object(n["Mb"])(r),widget:a,ttype:t.ttype,multi:t.multi,model:t.model,name:t.name}))||void 0===o||o({currentInstance:e,newWidgetInstance:e,element:t}))}},Ot=e=>{var t;const{element:o,currentWidget:i}=e,r=i.widgetBizType;if(r===n["B"].FIELD){const r=e.element.referenceModel||(null===(t=e.element.widgetData)||void 0===t?void 0:t.references);let{isContainerWidget:a}=o;if(null==a&&(a=n["db"].includes(i.widgetName)),r&&a)return void I(r)}I(e.element.model)},wt=e=>{I(e.data.model)},jt=e=>{I(e)},kt=e=>J(this,void 0,void 0,(function*(){const t=`uiDesigner${e.actionType.slice(0,1).toUpperCase()}${e.actionType.slice(1).toLowerCase()}ActionProxyMutation`;try{b.leftDrawer=!0,b.content=!0,yield Ut(t,e.model,e.name),F(e)}finally{b.leftDrawer=!1,b.content=!1}})),Ct=e=>{!e||e.id!==Lg.PROPERTIES&&e.id!==Lg.STYLE?qe.value=i["Optional"].ofNullable(Z.value).map(e=>e.element).map(e=>!e.initialization||Object(s["a"])(e.name)).orElse(!1):qe.value=!1},Dt=()=>{const t=Z.value;if(!t)return;const{element:o}=t;o&&(o.isValidator=!0,b.content=!0,b.rightDrawer=!0,e.saveMetaInfo(t).then(e=>{if(!e)return;const{name:o,metadata:l,metaExtends:s}=e;t.element.name=o,t.element.widgetData=l,t.element.initialization=!0,t.metadata=e,t.element.metaExtends=s;const c=t.currentWidget,d=c.widgetBizType;let u;switch(d){case n["B"].PACK:u="容器设置成功";break;case n["B"].ELEMENT:{const{widgetSubtype:e}=c;switch(e){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:u="范围组件设置成功";break;default:u="组件设置成功";break}break}case n["B"].FIELD:u="字段设置成功";break;case n["B"].ACTION:u="动作设置成功";break;case n["B"].VIEW:u="视图设置成功";break;default:throw new Error("Invalid widget biz type. value="+d)}r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])(u)),Object(a["nextTick"])(()=>{switch(d){case n["B"].ELEMENT:{const{widgetSubtype:o}=c;switch(o){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:case n["A"].FLOAT_PLAT:{const{startMetadata:o,endMetadata:i}=e;t.element.name||(t.element.name=`${null===o||void 0===o?void 0:o.name}#${null===i||void 0===i?void 0:i.name}`),t.element.widgetData||(t.element.widgetData={startMetadata:o,endMetadata:i});break}}break}case n["B"].FIELD:ht(t),ft(t,t.element.widgetData);break;case n["B"].ACTION:e.reserve&&A(e),mo({widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:Ce,copyDrawerWidgetInstance:Se,copyInnerPopupWidgetInstance:Me},t);break}ut(t,!1)}),qe.value=!1}).finally(()=>{b.content=!1,b.rightDrawer=!1}))},Tt=e=>!!Object(n["sd"])(e)&&$t(e.elements),$t=e=>{for(const t of e)if(!t.isVirtual&&(!t.isSkip||!$t(t.elements))&&!Tt(t))return!te.value&&(te.value=t),!1;return!0},Et=()=>J(this,void 0,void 0,(function*(){var t;try{if(b.content=!0,b.rightDrawer=!0,Pe.value.name||(Pe.value.name=We.value.name),Tt(fe.value)){const{layoutId:o}=e,a=[],l=se.editorEntries;let s=l.next();while(!s.done){const e=s.value[1],i=null===(t=e.context)||void 0===t?void 0:t.layoutId;i&&i!==o&&a.push(i),s=l.next()}yield Xt(o,Object(n["Vb"])(fe.value),Array.from(S.value.keys()),Pe.value,a),r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("发布成功"))}else{let e;if(te.value){const{title:t,properties:o,widgetData:i,widget:n}=te.value;e=t||(null===o||void 0===o?void 0:o.label)||(null===i||void 0===i?void 0:i.displayName)||(null===n||void 0===n?void 0:n.widgetDisplayName)}const t=e?`，[${e}]`:"";r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),`${Object(i["translateValueByKey"])("页面发布失败，以下特殊标记组件的属性校验失败，请打开属性查看原因并重新设置")}${t}`),console.error(te.value),te.value=void 0}}finally{b.content=!1,b.rightDrawer=!1}})),St=()=>J(this,void 0,void 0,(function*(){b.leftDrawer=!0,b.content=!0,le(),ie(void 0)})),Nt=(e,t)=>J(this,void 0,void 0,(function*(){var o,i,n;const r=JSON.parse(t);fe.value=r,pe(e,r,(null===(n=null===(i=null===(o=se.firstEditor)||void 0===o?void 0:o.editor)||void 0===i?void 0:i.currentData)||void 0===n?void 0:n.modelDefinitions)||[],{layoutId:e,designerData:Object(a["computed"])(()=>fe.value),modelWidgetLib:S.value,currentModelWidgetLib:N.value})})),Vt=(e,t)=>J(this,void 0,void 0,(function*(){try{yield St();const{designerJson:o}=yield Zt(e,t);yield Nt(e,o),We.value.designerActionBarType=t}finally{b.leftDrawer=!1,b.content=!1}})),xt=(e,t)=>J(this,void 0,void 0,(function*(){try{yield St();const{designerJson:o}=yield eo(e,t);yield Nt(e,o),We.value.designerLayoutType=t}finally{b.leftDrawer=!1,b.content=!1}})),It=t=>J(this,void 0,void 0,(function*(){try{const o=e.layoutId;if(o){yield St();const{id:e,designerJson:i}=yield to(o,Object(n["Vb"])(fe.value),Array.from(S.value.keys()),t);yield Nt(e,i)}}finally{b.leftDrawer=!1,b.content=!1}}));Object(a["watch"])(()=>{const e=We.value.designerActionBarType,{designerActionBarType:t}=Pe.value;if(t&&e!==t)return{designerActionBarType:t}},t=>J(this,void 0,void 0,(function*(){e.layoutId&&(null===t||void 0===t?void 0:t.designerActionBarType)&&(yield Vt(e.layoutId,t.designerActionBarType))}))),Object(a["watch"])(()=>{const e=We.value.designerLayoutType,{designerLayoutType:t}=Pe.value;if(t&&e!==t)return{designerLayoutType:t}},t=>J(this,void 0,void 0,(function*(){e.layoutId&&(null===t||void 0===t?void 0:t.designerLayoutType)&&(yield xt(e.layoutId,t.designerLayoutType))})));const Mt=Object(p["a"])((e,t,o)=>{const{name:i,description:n,currentCategoryId:r,thumbnailUrl:a,isFloatActionBar:l}=t,{name:s,description:c,currentCategoryId:d,thumbnailUrl:u,isFloatActionBar:p}=o;let b=s;b||(b=void 0),b===i&&n===c&&r===d&&a===u&&l===p||(h.value=!0,b||(b=We.value.name),oo(e,{name:b,description:c,currentCategoryId:d,thumbnailUrl:u,isFloatActionBar:p}).then(()=>{f.value=!0}).catch(e=>{console.error(e),f.value=!1}).finally(()=>{h.value=!1}))},1e3);let At=!1;Object(a["watch"])(()=>{const e=Pe.value;if(e&&Object.keys(e).length)return Object.assign({},e)},(t,o)=>J(this,void 0,void 0,(function*(){At||o&&t&&(yield Mt(e.layoutId,o,t))})));const Ft=t=>{if(t.selected){le(),ie(void 0);const{designerViewId:o}=t.data;o?(e.setLayoutId(o),Object(a["nextTick"])(()=>J(this,void 0,void 0,(function*(){At=!0;try{yield He(o,!1)}finally{yield Object(a["nextTick"])(()=>{At=!1})}})))):(t.data.sys&&r["OioNotification"].error(Object(i["translateValueByKey"])("异常"),Object(i["translateValueByKey"])("系统数据，无法修改")),Pe.value={},We.value={},g.content=!1,m.value=void 0)}};Object(a["watch"])(W,e=>{Object(a["nextTick"])(()=>{ut(void 0),ie(void 0)}).then(()=>{if(e){const e=n["X"].getInstance();null===e||void 0===e||e.openKeys().forEach(t=>{var o;const i=null===(o=e.get(t))||void 0===o?void 0:o.parent;i&&n["ab"].close(i)});const t=n["L"].getInstance();null===t||void 0===t||t.openKeys().forEach(e=>{var o;const i=null===(o=t.get(e))||void 0===o?void 0:o.parent;i&&n["ab"].close(i)})}}).then(()=>{g.leftDrawer=!e,g.rightDrawer=!e,H()})});const Lt=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!0,H()})},Rt=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!1,H()})},Bt=e=>{Object(a["nextTick"])(()=>{B.value=e,H()})},_t=e=>{Object(a["nextTick"])(()=>{_.value=e,H()})},Wt=()=>{Object(a["nextTick"])(()=>{g.rightDrawer=!0,H()})},Pt=()=>{le(),ie(void 0),Object(a["nextTick"])(()=>{g.rightDrawer=!1,H()})},zt=e=>{Ge.value=e},Gt=()=>{me()},Kt=()=>{ye()},qt=t=>{var o,a;if(t===i["ViewClientType"].MOBILE){const e=null===(o=Pe.value)||void 0===o?void 0:o.designerLayoutType;if(t===i["ViewClientType"].MOBILE&&[n["F"].TREE,n["F"].CASCADER].includes(e)){const t=e==n["F"].CASCADER?"级联":"树表";return void r["OioNotification"].warning(Object(i["translateValueByKey"])("移动端暂不支持配置"+t))}}null===(a=e.setViewClientType)||void 0===a||a.call(e,t),ut(Z.value)},Ht=()=>{e.goToPageHistoryList(e.layoutId)},Yt=()=>{e.goToViewDesignList()},{browserCopyAndNotify:io}=Object(i["useCopy"])(),no=e=>{io(e.target.innerText)};return Object(a["onMounted"])(()=>{n["Hb"].pluck(n["ac"]).subscribe(e=>{Ye(e)}),Object(a["nextTick"])(()=>He(e.layoutId,!0))}),Object(a["onUnmounted"])(()=>{Object(n["bd"])().clear()}),Object(a["watch"])(()=>e.viewClientType,()=>{var t,o,r,a;if(e.viewClientType===i["ViewClientType"].MOBILE){if(Oe.value){const e=n["X"].getInstance(),i=null===e||void 0===e?void 0:e.openKeys();if(null===i||void 0===i?void 0:i.length){const r=null===e||void 0===e?void 0:e.get(Object(v["a"])(i)),a=null===(o=null===(t=null===r||void 0===r?void 0:r.parent)||void 0===t?void 0:t.element)||void 0===o?void 0:o.properties[n["Dc"]];a&&(Oe.value=!1)}}if(De.value){const e=n["L"].getInstance(),t=null===e||void 0===e?void 0:e.openKeys();if(null===t||void 0===t?void 0:t.length){const o=null===e||void 0===e?void 0:e.get(Object(v["a"])(t)),i=null===(a=null===(r=null===o||void 0===o?void 0:o.parent)||void 0===r?void 0:r.element)||void 0===a?void 0:a.properties[n["Dc"]];i&&(De.value=!1)}}}}),Object(n["jd"])(Object.assign(Object.assign({},Object(n["fd"])()),{viewClientType:Object(a["computed"])(()=>e.viewClientType),protocolVersion:Object(a["computed"])(()=>C.value),loadingState:Object(a["computed"])(()=>b.content),recomputeSpanOptions:Qe,getContentContainerHTMLElement:()=>o.value,getContainerHTMLElement:()=>o.value})),ee({currentSelectedInstance:Object(a["computed"])(()=>Z.value),widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:Ce,copyDrawerWidgetInstance:Se,copyInnerPopupWidgetInstance:Me,onSelectCurrentInstance:ut,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M,PageDesignerMultiQueueEditor:se,designerCardShowStatus:Object(a["computed"])(()=>Q.value||!Y.value),changeDesignerCardShowStatus:ae}),{widgetSettingRef:t,designerContentRef:o,designerContentBodyRef:l,loading:b,visible:g,viewType:m,isReady:y,autoSaving:h,saveResult:f,designerData:fe,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,WidgetScope:Fu,widgetCategoryGroup:D,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,isLeftDrawerAnchored:B,isRightDrawerAnchored:_,isShowMasterMask:W,isShowMenuDynamic:P,headerHeight:z,leftAreaWidth:G,designerContentLeftMargin:U,designerContentRightMargin:K,contentOtherWidth:q,showCardDesignOptions:Gg,isShowCardDesignVisible:Y,isShowCardDesign:Q,cardWidgetInstanceRoot:X,switchCardDesign:ae,currentSelectedInstance:Z,lazySelectedInstance:oe,hasSelectedInstance:ne,isIconInstance:re,originPageSettingData:We,currentPageSettingData:Pe,currentPageModule:ze,currentModule:Ge,currentModules:Ue,rightDrawerTitle:Ke,onSelectInstance:ut,onSettingChange:bt,onSwitchWidget:gt,onRemoveInstance:mt,onMoveInstance:yt,onModelWidgetLibChange:wt,onModelWidgetLibChangeByModel:jt,onDeleteAction:kt,addField:L,removeField:R,onSubmitMetadata:Dt,rightDrawerHasFooter:qe,onSelectedTab:Ct,onSaveView:Et,onRegenerate:It,onMenuItemSelected:Ft,onLeftDrawerOpened:Lt,onLeftDrawerClosed:Rt,onLeftDrawerAnchored:Bt,onRightDrawerAnchored:_t,onRightDrawerOpened:Wt,onRightDrawerClosed:Pt,onModuleSelected:zt,currentVersion:ce,allowCancelCurrentEdit:be,allowRecoverLastEdit:ge,onCancelEdit:Gt,onRecoverEdit:Kt,onChangeViewClientType:qt,onShowHistory:Ht,gotoDesignerList:Yt,hasOpenModal:Oe,isAllowOpenDesignerModal:we,isReadyOpenDesignerModal:je,onOpenDesignerModal:ke,hasOpenDrawer:De,isAllowOpenDesignerDrawer:Te,isReadyOpenDesignerDrawer:$e,onOpenDesignerDrawer:Ee,hasOpenInnerPopup:Ne,isAllowOpenDesignerInnerPopup:Ve,isReadyOpenDesignerInnerPopup:xe,onOpenDesignerInnerPopup:Ie,jumpViewActionDesignPage:_e,canDesignViewAction:Le,isAllowPreviewDesignerConfirm:Ae,onOpenDesignerConfirm:Fe,onCopy:no,STATIC_RESOURCE:{mobileSimulator:Object(n["tc"])("mobile_simulator.png")}}}}),dv=()=>{Object(a["useCssVars"])(e=>({"67a2c681-designerContentLeftMargin":e.designerContentLeftMargin,"67a2c681-designerContentRightMargin":e.designerContentRightMargin,"67a2c681-leftAreaWidth":e.leftAreaWidth}))},uv=cv.setup;cv.setup=uv?(e,t)=>(dv(),uv(e,t)):dv;const pv={class:"page-designer"},bv={class:"page-designer-content"},gv={key:0,class:"page-designer-gallery-card-design ui-designer-short-radio"},vv={class:"page-designer-gallery-card-design-content"},mv={class:"page-designer-main-content"},yv={class:"designer-widget-aside designer-widget-aside-left"},hv={key:0,class:"designer-content-mask"},fv={class:"designer-content-browser-header"},Ov=Object(a["createStaticVNode"])('<div class="designer-content-body-browser-options"><div class="designer-content-body-browser-option designer-content-body-browser-option-red"></div><div class="designer-content-body-browser-option designer-content-body-browser-option-yellow"></div><div class="designer-content-body-browser-option designer-content-body-browser-option-green"></div></div><div class="designer-content-body-browser-address-bar"><span>https://www.oinone.com</span></div>',2),wv=[Ov],jv={class:"designer-content-menu-dynamic"},kv={key:0,class:"designer-content-menu"},Cv={key:1,class:"ui-designer-simulator"},Dv=Object(a["createElementVNode"])("div",{class:"global-menu-btn"},[Object(a["createElementVNode"])("i",{class:"menu-icon iconfont oinone-qiehuanfanggeliebiao"})],-1),Tv=Object(a["createElementVNode"])("div",{class:"global-menu-btn"},[Object(a["createElementVNode"])("i",{class:"menu-icon iconfont oinone-caidan1"})],-1),$v={key:1,class:"designer-content-body-empty"},Ev=Object(a["createElementVNode"])("span",null,null,-1),Sv={class:"designer-widget-aside designer-widget-aside-right"},Nv={class:"designer-widget-aside-right-anchor-drawer-header"},Vv=["title"],xv={key:1,class:"designer-widget-aside-right-anchor-drawer-header-widget"},Iv={key:2},Mv={class:"designer-widget-aside-right-anchor-drawer-header-data-name"},Av={key:0,class:"designer-properties-setting-form-button"},Fv={key:0},Lv={key:1},Rv={key:2},Bv={key:3},_v={key:4},Wv={key:1,class:"designer-widget-not-selected"},Pv=Object(a["createElementVNode"])("br",null,null,-1);function zv(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-header"),s=Object(a["resolveComponent"])("oio-icon"),c=Object(a["resolveComponent"])("a-radio-button"),d=Object(a["resolveComponent"])("a-radio-group"),u=Object(a["resolveComponent"])("draggable-widget"),p=Object(a["resolveComponent"])("designer-content-header"),b=Object(a["resolveComponent"])("page-menu"),g=Object(a["resolveComponent"])("van-nav-bar"),v=Object(a["resolveComponent"])("designer-draggable"),m=Object(a["resolveComponent"])("oio-spin"),y=Object(a["resolveComponent"])("oio-tooltip-help"),h=Object(a["resolveComponent"])("oio-tooltip"),f=Object(a["resolveComponent"])("oio-button"),O=Object(a["resolveComponent"])("ui-icon-size-reset"),w=Object(a["resolveComponent"])("widget-setting"),j=Object(a["resolveComponent"])("anchor-drawer");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",pv,[Object(a["createVNode"])(l,{"view-type":e.viewType,"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"is-show-master-mask":e.isShowMasterMask,"onUpdate:is-show-master-mask":t[0]||(t[0]=t=>e.isShowMasterMask=t),"is-show-card-design":e.isShowCardDesign,"onUpdate:is-show-card-design":t[1]||(t[1]=t=>e.isShowCardDesign=t),"allow-cancel-current-edit":e.allowCancelCurrentEdit,"allow-recover-last-edit":e.allowRecoverLastEdit,"has-history-record":(e.currentHistoryCount||0)>0,disabled:!e.isReady,saveView:e.onSaveView,saving:e.autoSaving,"save-result":e.saveResult,"view-client-type":e.viewClientType,onCancelEdit:e.onCancelEdit,onRecoverEdit:e.onRecoverEdit,onChangeViewClientType:e.onChangeViewClientType,onShowHistory:e.onShowHistory,onGotoDesignerList:e.gotoDesignerList},null,8,["view-type","origin-page-setting-data","current-page-setting-data","is-show-master-mask","is-show-card-design","allow-cancel-current-edit","allow-recover-last-edit","has-history-record","disabled","saveView","saving","save-result","view-client-type","onCancelEdit","onRecoverEdit","onChangeViewClientType","onShowHistory","onGotoDesignerList"]),Object(a["createElementVNode"])("div",bv,[e.isShowCardDesignVisible?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",gv,[Object(a["createVNode"])(d,{value:e.isShowCardDesign,onChange:e.switchCardDesign},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.showCardDesignOptions,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:t.key,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",vv,[Object(a["createVNode"])(s,{icon:t.icon},null,8,["icon"]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate(t.label)),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("div",mv,[Object(a["createElementVNode"])("div",yv,[Object(a["createVNode"])(u,{"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"model-widget-lib":e.modelWidgetLib,"current-model-widget-lib":e.currentModelWidgetLib,loading:e.loading.leftDrawer,"current-module":e.currentPageModule,visible:e.visible.leftDrawer,"current-design-data":e.widgetInstanceRoot,"current-focus-data":e.cardWidgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"current-selected-instance":e.currentSelectedInstance,"widget-scope":e.WidgetScope.PAGE,onOnOpened:e.onLeftDrawerOpened,onOnClosed:e.onLeftDrawerClosed,onOnAnchored:e.onLeftDrawerAnchored,onOnRegenerate:e.onRegenerate,onOnModelWidgetLibChange:e.onModelWidgetLibChange,onOnModelWidgetLibChangeByModel:e.onModelWidgetLibChangeByModel,onOnDeleteAction:e.onDeleteAction,onAddField:e.addField,onRemoveField:e.removeField},null,8,["widget-category-group","widget-name-group","widget-type-group","origin-page-setting-data","current-page-setting-data","model-widget-lib","current-model-widget-lib","loading","current-module","visible","current-design-data","current-focus-data","is-focus-designer","current-selected-instance","widget-scope","onOnOpened","onOnClosed","onOnAnchored","onOnRegenerate","onOnModelWidgetLibChange","onOnModelWidgetLibChangeByModel","onOnDeleteAction","onAddField","onRemoveField"])]),Object(a["createElementVNode"])("div",{ref:"designerContentRef",class:Object(a["normalizeClass"])(["designer-content",e.isShowMasterMask?"designer-content-browser-border":""])},[e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hv)):Object(a["createCommentVNode"])("v-if",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",fv,wv,512),[[a["vShow"],e.isShowMasterMask]]),Object(a["createCommentVNode"])("  使用v-show会导致渲染时参数可能没值, 使得页面空白 "),e.isShowMasterMask?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:1,"application-icon":e.logo,currentModule:e.currentModule,modules:e.currentModules,onOnModuleSelected:e.onModuleSelected},null,8,["application-icon","currentModule","modules","onOnModuleSelected"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["designer-main-content",e.isShowMasterMask?"designer-main-content-show-mask":""])},[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",jv,[e.isShowMasterMask?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",kv,[Object(a["createVNode"])(b,{module:e.currentModule,onOnSelected:e.onMenuItemSelected,"view-id":e.viewId},null,8,["module","onOnSelected","view-id"])])):Object(a["createCommentVNode"])("v-if",!0)],512),[[a["vShow"],e.isShowMenuDynamic]]),(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["designer-content-body","oio-scrollbar",e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?"designer-content-body-pointer-events-none":""]),key:e.layoutId,ref:"designerContentBodyRef"},[e.visible.content?(Object(a["openBlock"])(),Object(a["createBlock"])(m,{key:0,loading:e.loading.content},{default:Object(a["withCtx"])(()=>["MOBILE"==e.viewClientType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"ui-designer-simulator-wrapper",style:Object(a["normalizeStyle"])({background:`url(${e.STATIC_RESOURCE.mobileSimulator}) no-repeat`,backgroundSize:"contain"})},null,4)):Object(a["createCommentVNode"])("v-if",!0),"MOBILE"==e.viewClientType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Cv,[Object(a["createVNode"])(g,{class:"mobile-nav-bar","left-arrow":""},{title:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.currentPageSettingData.name||e.originPageSettingData.name),1)]),right:Object(a["withCtx"])(()=>[Object(a["createCommentVNode"])('                      <div class="global-menu-btn">'),Object(a["createCommentVNode"])('                        <i class="menu-icon iconfont oinone-sousuo1" />'),Object(a["createCommentVNode"])("                      </div>"),Dv,Tv]),_:1}),Object(a["createVNode"])(v,{data:e.widgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"focus-data":e.cardWidgetInstanceRoot,"current-selected":e.currentSelectedInstance,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:e.onSelectInstance,onSettingChange:e.onSettingChange,onSwitchWidget:e.onSwitchWidget,onMoveInstance:e.onMoveInstance,onRemoveInstance:e.onRemoveInstance},null,8,["data","is-focus-designer","focus-data","current-selected","widget-category-group","widget-name-group","widget-type-group","onSelectedChange","onSettingChange","onSwitchWidget","onMoveInstance","onRemoveInstance"])])):(Object(a["openBlock"])(),Object(a["createBlock"])(v,{key:2,data:e.widgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"focus-data":e.cardWidgetInstanceRoot,"current-selected":e.currentSelectedInstance,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:e.onSelectInstance,onSettingChange:e.onSettingChange,onSwitchWidget:e.onSwitchWidget,onMoveInstance:e.onMoveInstance,onRemoveInstance:e.onRemoveInstance},null,8,["data","is-focus-designer","focus-data","current-selected","widget-category-group","widget-name-group","widget-type-group","onSelectedChange","onSettingChange","onSwitchWidget","onMoveInstance","onRemoveInstance"]))]),_:1},8,["loading"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$v,[Object(a["createCommentVNode"])("当前菜单无页面，若需要页面，请对菜单进行页面绑定"),Ev]))],2))],2)],2),Object(a["createElementVNode"])("div",Sv,[Object(a["createVNode"])(j,{class:Object(a["normalizeClass"])([e.hasSelectedInstance?"":"designer-widget-not-selected-drawer"]),width:"440px",visible:e.visible.rightDrawer,"default-anchor":"","has-footer":e.rightDrawerHasFooter,loading:e.loading.rightDrawer,"anchor-class-name":"designer-widget-aside-absolute",onOnAnchored:e.onRightDrawerAnchored,onOnOpened:e.onRightDrawerOpened,onOnClosed:e.onRightDrawerClosed},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Nv,[e.rightDrawerTitle.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"designer-widget-aside-right-anchor-drawer-header-field",title:e.$translate(e.rightDrawerTitle.title)},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.title)),9,Vv)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.widgetDisplayName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",xv,Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.widgetDisplayName)),1)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Iv,[Object(a["createVNode"])(y,{content:e.rightDrawerTitle.help},null,8,["content"])])):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.dataName?(Object(a["openBlock"])(),Object(a["createBlock"])(h,{key:3,title:e.rightDrawerTitle.dataName,placement:"bm"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Mv,[Object(a["createElementVNode"])("span",{onClick:t[2]||(t[2]=(...t)=>e.onCopy&&e.onCopy(...t))},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.dataName)),1)])]),_:1},8,["title"])):Object(a["createCommentVNode"])("v-if",!0)])]),footer:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{type:"primary",onClick:e.onSubmitMetadata},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("保存")),1)]),_:1},8,["onClick"])]),default:Object(a["withCtx"])(()=>[e.hasSelectedInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(w,{key:0,ref:"widgetSettingRef","current-instance":e.currentSelectedInstance,"selected-tab":e.onSelectedTab},{propertiesSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"propertiesSettingForm"),e.isAllowPreviewDesignerConfirm||e.isAllowOpenDesignerModal||e.isAllowOpenDesignerDrawer||e.isAllowOpenDesignerInnerPopup||e.canDesignViewAction.allowViewActionDesign?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Av,[e.isAllowPreviewDesignerConfirm?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Fv,[Object(a["createVNode"])(f,{type:"link",onClick:e.onOpenDesignerConfirm},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("预览二次确认")),1)]),_:1},8,["onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerModal?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Lv,[Object(a["createVNode"])(f,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerModal,onClick:e.onOpenDesignerModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计弹窗")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Rv,[Object(a["createVNode"])(f,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerDrawer,onClick:e.onOpenDesignerDrawer},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计抽屉")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerInnerPopup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Bv,[Object(a["createVNode"])(f,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerInnerPopup,onClick:e.onOpenDesignerInnerPopup},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计内嵌页面")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.canDesignViewAction.allowViewActionDesign?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_v,[Object(a["createVNode"])(f,{type:"default",style:{width:"100%"},disabled:e.canDesignViewAction.disable,onClick:t[3]||(t[3]=t=>e.jumpViewActionDesignPage(e.canDesignViewAction.designerViewId))},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(e.canDesignViewAction.disable?"系统页面无法设计":"设计跳转页面")),1)]),_:1},8,["disabled"])])):Object(a["createCommentVNode"])("v-if",!0)])):Object(a["createCommentVNode"])("v-if",!0),e.isIconInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(O,{key:1,"current-instance":e.currentSelectedInstance},null,8,["current-instance"])):Object(a["createCommentVNode"])("v-if",!0)]),styleSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"styleSettingForm")]),metadataSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"metadataSettingForm")]),_:3},8,["current-instance","selected-tab"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Wv,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{icon:"oinone-shuxingshezhikongyemian",size:"60px"}),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("请在左侧画布中选择组件"))+" ",1),Pv,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("设置或查看其属性")),1)])]))]),_:3},8,["class","visible","has-footer","loading","onOnAnchored","onOnOpened","onOnClosed"])])])])])}cv.render=zv,cv.__file="src/view/page-designer/PageDesigner.vue";let Gv=class extends n["a"]{constructor(){super(...arguments),this.majorConfig=i["systemMajorConfig"]}get layoutId(){return this.getDesignerId()}get viewId(){return this.getDesignerManagementId()}get logo(){return this.majorConfig.logo||i["DEFAULT_BRAND_LOGO"]}setViewId(e){this.setDesignerManagementId(e)}setLayoutId(e){this.setDesignerId(e),this.goToViewDesignEdit(e)}initialize(e){return super.initialize(e),this.setComponent(cv),this}goToPageHistoryList(e){return J(this,void 0,void 0,(function*(){Object(n["Ic"])(e,this.router,this.matched)}))}goToViewDesignList(){Object(n["Jc"])(this.router,this.matched)}goToViewDesignEdit(e){return J(this,void 0,void 0,(function*(){Object(n["Hc"])(e,this.router,this.matched)}))}mounted(){Wi.query({}).then(e=>{Object(n["dd"])().setGroupList(e)}),super.mounted()}};Y([i["Widget"].Reactive(),i["Widget"].Provide(),Q("design:type",Object),Q("design:paramtypes",[])],Gv.prototype,"layoutId",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Gv.prototype,"viewId",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],Gv.prototype,"majorConfig",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Gv.prototype,"logo",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],Gv.prototype,"setViewId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],Gv.prototype,"setLayoutId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",Promise)],Gv.prototype,"goToPageHistoryList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Gv.prototype,"goToViewDesignList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",Promise)],Gv.prototype,"goToViewDesignEdit",null),Gv=Y([i["SPI"].ClassFactory(i["MaskWidget"].Token({widget:"PageDesigner"}))],Gv);let Uv=class extends Ll{initialize(e){return super.initialize(e),this.setComponent(i["ConditionInputControl"]),this}get queryExpressionParam(){return{model:zo,field:Go,key:"menu_"+this.formData.id}}get contextItems(){const e=[];return this.formData.model&&e.push({name:"menuViewActionRecord",displayName:Object(i["translateValueByKey"])("菜单绑定视图数据"),models:[this.formData.model]}),e}get modelModel(){return this.formData.model}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Uv.prototype,"queryExpressionParam",null),Y([i["Widget"].Reactive(),Q("design:type",Array),Q("design:paramtypes",[])],Uv.prototype,"contextItems",null),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Uv.prototype,"modelModel",null),Uv=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:[i["ModelFieldType"].String,i["ModelFieldType"].Text],widget:"MenuFilterExpression"}))],Uv);var Kv,qv=Object(a["defineComponent"])({name:"ViewSelect",components:{LazyLoadSelect:l["A"],AddViewPreDialog:Pr},props:{stringModule:{type:String},stringModel:{type:String},viewId:{type:String},placeholder:{type:String,default:"请选择视图"},customDropdownBottom:{type:Boolean},notFoundContent:{type:String},onViewIdChange:{type:Function},readonly:{type:Boolean,default:!1},formView:{type:Object},createViewFields:{type:Array},showFormWidgetDialog:{type:Boolean},addViewDialogLoading:{type:Boolean},viewListDialogFormTitle:{type:String,default:""},formViewTitle:{type:String,default:""},onChangeFormWidgetDialog:{type:Function},onShowCreate:{type:Function},onSubmitForm:{type:Function},showAddViewPreDialog:{type:Function}},emits:["update:viewId","change"],setup(e,t){const o=R["a"].useInjectFormItemContext(),r=Object(a["ref"])(void 0),s=Object(a["ref"])(null),c=t=>J(this,void 0,void 0,(function*(){if(e.viewId)return yield Object(i["queryOne"])(t.model,{id:e.viewId})})),d=t=>{const o=e.stringModel;if(o){let e=`show == ACTIVE and type =in= ('TABLE', 'FORM', 'DETAIL', 'GALLERY', 'TREE') and model == '${o}' and  (sys==0 or (sys==1 and systemSource != 'SYSTEM'))`,n=t.searchValue;return n&&(n=i["GraphqlHelper"].serializableString(n),e=`${e} and title =like= \\"%${n}%\\"`),e}return!1};Object(a["watch"])(r,(i,n)=>{var r;i?t.emit("update:viewId",i.data.id):t.emit("update:viewId",void 0),t.emit("change",i,n),null===(r=e.onViewIdChange)||void 0===r||r.call(e,i,n),null===o||void 0===o||o.onFieldChange()}),Object(a["watch"])(()=>[e.stringModel],()=>{r.value=void 0,Object(a["nextTick"])(()=>{s.value&&s.value.onReloadOptions()})}),Object(a["watch"])(()=>e.viewId,e=>{let t;t=e?{data:{id:e}}:void 0,r.value=t,s.value&&s.value.onReloadOptions()});const u=Object(a["ref"])(),p=()=>{var t;null===(t=e.showAddViewPreDialog)||void 0===t||t.call(e,jr.DIRECT),u.value&&u.value.addView2ModelSelectRun()};return{ViewConstant:n["rb"],defaultSelectProperties:l["Y"],pageMenuViewLazyLoadSelect:s,selected:r,customQueryOne:c,customCondition:d,onCreateViewClick:p,addViewDialog:u}}});function Hv(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("lazy-load-select"),s=Object(a["resolveComponent"])("add-view-pre-dialog");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createVNode"])(l,{ref:"pageMenuViewLazyLoadSelect",selected:e.selected,"onUpdate:selected":t[1]||(t[1]=t=>e.selected=t),"custom-condition":e.customCondition,"custom-query-one":e.customQueryOne,"custom-dropdown-bottom":!0,"not-found-content":e.notFoundContent,model:e.ViewConstant.MODEL_MODEL,placeholder:e.placeholder,properties:{...e.defaultSelectProperties,labelProp:"title"},disabled:e.readonly},{customDropdownBottom:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",{class:"ui-designer-menu-setting-view-create",onClick:t[0]||(t[0]=(...t)=>e.onCreateViewClick&&e.onCreateViewClick(...t))},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("没找到想要的页面？"))+" ",1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate("点我去创建，")),1),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("完成自动绑定")),1)])]),_:1},8,["selected","custom-condition","custom-query-one","not-found-content","model","placeholder","properties","disabled"]),e.showFormWidgetDialog?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,ref:"addViewDialog","cancel-callback":()=>e.onChangeFormWidgetDialog?e.onChangeFormWidgetDialog(!1):void 0,"confirm-loading":e.addViewDialogLoading,"current-model":e.stringModel,"current-module":e.stringModule,"enter-callback":e.onSubmitForm,"form-view":e.formView,"item-field-list":e.createViewFields,viewListDialogFormTitle:e.viewListDialogFormTitle,visible:e.showFormWidgetDialog},null,8,["cancel-callback","confirm-loading","current-model","current-module","enter-callback","form-view","item-field-list","viewListDialogFormTitle","visible"])):Object(a["createCommentVNode"])("v-if",!0)],64)}qv.render=Hv,qv.__file="src/view/menu-list/components/field/menu-bind-view/MenuBindViewSelect.vue";let Yv=Kv=class extends i["FormM2OSelectFieldWidget"]{constructor(){super(...arguments),this.formView={},this.showFormWidgetDialog=!1,this.addViewDialogLoading=!1,this.viewListDialogFormTitle="",this.formViewTitle=""}initialize(e){return super.initialize(e),this.setComponent(qv),this}get stringModel(){return this.formData.model}get stringModule(){return this.formData.module}get viewId(){return this.formData.viewId}onViewIdChange(e,t){(null===e||void 0===e?void 0:e.data.id)!==this.viewId&&this.activeRecords&&this.activeRecords.length>0&&(this.activeRecords[0].viewId=null===e||void 0===e?void 0:e.data.id,this.activeRecords[0].isViewSys=null===e||void 0===e?void 0:e.data.sys,this.activeRecords[0].designerViewId=null===e||void 0===e?void 0:e.data.designerViewId)}static viewConvert(e){const t=Object(i["deepClone"])(e);return Object(u["a"])(e.title)||(t.viewTitle=e.title),Object(u["a"])(e.description)||(t.viewDescription=e.description),Object(u["a"])(e.categoryId)||(t.viewCategoryId=e.categoryId),e.type&&[n["sb"].TABLE,n["sb"].TREE].includes(e.type)||(t.designerLayoutType=void 0),t.usingDefaultView=!!e.usingDefaultView,t}onChangeFormWidgetDialog(e){this.showFormWidgetDialog=e}onShowCreate(e,t){const o=Dr.get(e);this.viewListDialogFormTitle=o.title,this.createViewFields=o.fields,t&&Object.keys(t).length>0?this.formView=t:this.formView={},this.formView.bizType=n["qb"].ALL,this.formView.type=n["sb"].ALL,this.stringModel&&(this.formView.model=this.stringModel),this.formView.designerLayoutType=fr[0].value,this.formView.designerActionBarType=Or[0].value,this.onChangeFormWidgetDialog(!0)}onSubmitForm(e){return J(this,void 0,void 0,(function*(){this.addViewDialogLoading=!0;try{const t=yield e.validate();if(t){const e=this.formView;e.viewType=e.type;const t=Kv.viewConvert(this.formView);let o;t.module=this.stringModule,this.formView.id||(o=yield Object(i["insertOne"])("ui.designer.UiDesignerViewLayoutProxy",t,void 0),this.submitFormAfter(o,e)),this.showFormWidgetDialog=!1}}finally{this.addViewDialogLoading=!1}}))}showAddViewPreDialog(e){this.onShowCreate(e)}submitFormAfter(e,t){this.updateMenuInfo(e),this.refreshModel(t)}updateMenuInfo(e){this.activeRecords&&this.activeRecords.length>0&&(e.layoutDesign&&(this.activeRecords[0].designerViewId=e.layoutDesign.id),e.view&&(this.activeRecords[0].viewId=e.view.id,this.activeRecords[0].isViewSys=e.view.sys,this.activeRecords[0].designerViewId=e.id))}refreshModel(e){e.model&&(this.formData.model=e.model)}};Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Yv.prototype,"stringModel",null),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Yv.prototype,"stringModule",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Yv.prototype,"viewId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],Yv.prototype,"onViewIdChange",null),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yv.prototype,"formView",void 0),Y([i["Widget"].Reactive(),Q("design:type",Array)],Yv.prototype,"createViewFields",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yv.prototype,"showFormWidgetDialog",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yv.prototype,"addViewDialogLoading",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yv.prototype,"viewListDialogFormTitle",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Yv.prototype,"formViewTitle",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Boolean]),Q("design:returntype",void 0)],Yv.prototype,"onChangeFormWidgetDialog",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object,Object]),Q("design:returntype",void 0)],Yv.prototype,"onShowCreate",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Yv.prototype,"onSubmitForm",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Yv.prototype,"showAddViewPreDialog",null),Yv=Kv=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:[i["ModelFieldType"].ManyToOne],widget:"UiBindView"}))],Yv);var Qv=Object(a["defineComponent"])({name:"MenuModelSelect",components:{LazyLoadSelect:l["A"]},props:{currentModel:{type:String},queryData:{type:Object},placeholder:{type:String,default:"请选择模型"},currentModule:{type:String},disabled:{type:Boolean,required:!1,default:!1},onChangeModel:{type:Function},readonly:{type:Boolean},blur:{type:Function}},setup(e,t){const o=Object(a["ref"])(void 0),r=t=>J(this,void 0,void 0,(function*(){return yield Object(i["queryOne"])(n["lb"].model,{model:e.currentModel})})),l=t=>{let o="systemSource=out=(BASE,KERNEL,RELATION) and show == 'ACTIVE' and type != 'ABSTRACT'";if(e.currentModule&&(o+=` and model=='${e.currentModule}'`),t.searchValue){const e=t.searchValue.replaceAll("'","");return`${o} and ( model =like= '%${e}%' or name =like= '%${e}%' or displayName =like= '%${e}%')`}const n=new i["Condition"](o);return e.queryData&&n.setConditionBodyData(e.queryData),n},s=e=>(e.label=`${e.data.displayName} - ${e.data.model}`,e);Object(a["watch"])(o,(t,o)=>{var i;null===(i=e.onChangeModel)||void 0===i||i.call(e,t)}),Object(a["watch"])(()=>e.currentModule,(e,t)=>{o.value=void 0,d()}),Object(a["watch"])(()=>e.currentModel,(e,t)=>{var i,n;e&&e===(null===(n=null===(i=o.value)||void 0===i?void 0:i.data)||void 0===n?void 0:n.model)||(o.value=null,d())});const c=Object(a["ref"])(),d=()=>{c.value&&c.value.onReloadOptions()},u=()=>e.currentModule?{applicationModule:e.currentModule}:{};return{MODEL_MODEL:n["lb"].model,selected:o,customQueryOne:r,customCondition:l,customFillProperties:s,modelSelect2Lazy:c,modelSelect2LazyRun:d,genCustomVariables:u}}});function Jv(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("lazy-load-select");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{ref:"modelSelect2Lazy",disabled:e.readonly||e.disabled,model:e.MODEL_MODEL,selected:e.selected,"onUpdate:selected":t[0]||(t[0]=t=>e.selected=t),placeholder:e.placeholder,"custom-query-one":e.customQueryOne,"custom-condition":e.customCondition,"custom-variables":e.genCustomVariables,"custom-fill-properties":e.customFillProperties,blur:e.blur},null,8,["disabled","model","selected","placeholder","custom-query-one","custom-condition","custom-variables","custom-fill-properties","blur"])}Qv.render=Jv,Qv.__file="src/view/menu-list/components/field/menu-setting-model-select/MenuModelSelect.vue";let Xv=class extends i["FormStringFieldSingleWidget"]{initialize(e){return super.initialize(e),this.setComponent(Qv),this}get queryData(){return{applicationModule:this.formData.module,includeDependencies:!0}}get currentModel(){return this.formData["model"]}onChangeModel(e){var t;const o=null===(t=null===e||void 0===e?void 0:e.data)||void 0===t?void 0:t.model;this.change(o)}};Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Xv.prototype,"queryData",null),Y([i["Widget"].Reactive(),Q("design:type",String),Q("design:paramtypes",[])],Xv.prototype,"currentModel",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],Xv.prototype,"onChangeModel",null),Xv=Y([i["SPI"].ClassFactory(i["FormFieldWidget"].Token({viewType:[i["ViewType"].Form],ttype:[i["ModelFieldType"].String],widget:"MenuSettingModelSelect"}))],Xv);let Zv=class extends i["BaseElementWidget"]{initialize(e){return super.initialize(e),this.setComponent(r["OioDivider"]),this}};Zv=Y([i["SPI"].ClassFactory(i["BaseElementWidget"].Token({widget:"MenuFormDivider"}))],Zv);const em=new i["Subject"],tm=new i["Subject"],om={class:"ud-menulist-wrapper"},im={class:"page-menu-search"},nm={class:"page-menu-content oio-scrollbar-hidden"},rm=["title"],am=["onClick"],lm={class:"oio-highlight"},sm={class:"page-menu-item-options"},cm={class:"page-menu-item-options-normal"},dm=["onClick"],um={class:"page-menu-tree-extend"};var pm;(function(e){e[e["NORMAL"]=0]="NORMAL",e[e["EDIT_TITLE"]=1]="EDIT_TITLE"})(pm||(pm={}));var bm=Object(a["defineComponent"])({__name:"MenuListBar",props:{module:{type:String},currentSelectedMenu:{type:Object},onSelectedMenuChange:{type:Function}},setup(e){const t=e,o="oinone-menu-caidanmoren";function l(e,t){var o,i,n,r,a,l,s,c;e.name=null!==(o=t.name)&&void 0!==o?o:e.name,e.icon=null!==(i=t.icon)&&void 0!==i?i:e.icon,e.displayName=null!==(n=t.displayName)&&void 0!==n?n:e.displayName,e.module=null!==(r=t.module)&&void 0!==r?r:e.module,e.priority=null!==(a=t.priority)&&void 0!==a?a:e.priority,e.show=null!==(l=t.show)&&void 0!==l?l:e.show,e.sys=null!==(s=t.sys)&&void 0!==s?s:e.sys,e.clientTypes=null!==(c=t.clientTypes)&&void 0!==c?c:e.clientTypes}function s(e){const t=e.value;if(t){e["title"]=t.displayName||Object(i["translateValueByKey"])("未命名菜单项");const o=e.children;o&&o.length>=1&&o.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0}))}}function c(e){const t=r["TreeHelper"].convert(e,e=>e.name,e=>e.parentName,e=>Object(a["reactive"])(Object.assign(Object.assign({},e),{editMode:pm.NORMAL,visibleDropdown:!1})));return t.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0})),r["TreeHelper"].traversal(t,e=>(s(e),e.children.sort(n["k"].comparingNumber(e=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.priority)||0})),e)),t}const d=Object(a["ref"])([]),u=Object(a["ref"])([]),b=Object(a["ref"])(void 0),g=Object(a["ref"])(""),v=Object(a["ref"])([]),m=Object(a["ref"])([]),y=Object(a["ref"])(void 0);Object(a["reactive"])({editMenu:!1,bindView:!1,createView:!1,bindUrl:!1,editIcon:!1,showClientType:!1});const h=Object(a["reactive"])({menuTree:!1,bindView:!1,createView:!1,bindUrl:!1,editIcon:!1,showClientType:!1});let f;const O=()=>J(this,void 0,void 0,(function*(){return new Promise(e=>{f&&(clearTimeout(f),f=null),f=setTimeout(()=>J(this,void 0,void 0,(function*(){var o,i,r,a;if(t.module){h.menuTree=!0;try{d.value=yield n["V"].queryListByModule(t.module),u.value=c(d.value),(null===(o=u.value)||void 0===o?void 0:o.length)>0&&0===m.value.length&&(m.value=[null===(i=u.value)||void 0===i?void 0:i[0].key],null===(r=t.onSelectedMenuChange)||void 0===r||r.call(t,{data:null===(a=u.value)||void 0===a?void 0:a[0].value,selected:!0}))}finally{h.menuTree=!1,e()}}})),100)})})),w=e=>({});Object(a["onMounted"])(()=>J(this,void 0,void 0,(function*(){yield O()}))),Object(a["watch"])(()=>t.module,()=>{T()});const j=Object(a["computed"])(()=>{const e=d.value.filter(e=>!g.value||!!(e.displayName&&e.displayName.indexOf(g.value)>-1)),t=e;return e.forEach(e=>{let o=d.value.find(t=>t.name===e.parentName);while(void 0!==o){const e=t.findIndex(e=>e.name===o.name);-1===e&&t.push(o),o=d.value.find(e=>e.name===o.parentName)}}),t}),k=e=>{void 0!==e?(b.value=c(e),void 0===b.value&&(b.value=[])):b.value=void 0},C=e=>{let t;e?(t=[],d.value.forEach(o=>{o.displayName&&o.displayName.indexOf(e)>-1&&t&&o.name&&t.push(o.name)})):t=void 0,t&&(v.value=t)},D=Object(p["a"])((e,t)=>{e?(k(t),C(e)):(k(void 0),C(void 0))},300);Object(a["watch"])(g,e=>{D(e,j.value)});const T=()=>J(this,void 0,void 0,(function*(){yield O(),D(g.value,j.value)})),$=e=>{v.value=e.expandedKeys},E=e=>J(this,void 0,void 0,(function*(){try{h.menuTree=!0;const t=i["CastHelper"].cast(e.dragNode.dataRef),o=i["CastHelper"].cast(e.node.dataRef);let r;const a=e.dropPosition;if(e.dropToGap){let e;e=o.parent?o.parent.children:u.value;const t=e.indexOf(o);r=a<=t?n["J"].BEFORE:n["J"].AFTER}else r=n["J"].IN;if(yield n["V"].dragMenu(t.value.id,o.value.id,r),t.parent?t.setParent(void 0):u.value.splice(u.value.indexOf(t),1),e.dropToGap){let e;e=o.parent?o.parent.children:u.value;let i=e.indexOf(o);r===n["J"].AFTER&&(i+=1),o.parent?o.parent.addChild(t,i):u.value.splice(i,0,t)}else o.addChild(t,0);u.value=[...u.value],t.value.parentName=o.value.parentName}finally{yield T(),h.menuTree=!1}})),S=(e,o)=>{var i;null===(i=t.onSelectedMenuChange)||void 0===i||i.call(t,{selected:o.selected,selectedKeys:e,data:o.node.value})},N=e=>{V(e)?x(e):v.value.push(e.key),v.value=[...v.value]},V=e=>{const t=v.value.indexOf(e.key);if(-1!==t)return!0;for(const o of e.children)if(V(o))return!0;return!1},x=e=>{const t=v.value.indexOf(e.key);if(-1!==t&&(v.value.splice(t,1),!v.value.length))return!0;for(const o of e.children)if(x(o))return!0;return!1},I=e=>J(this,void 0,void 0,(function*(){try{let t;h.menuTree=!0;const o=e.show;switch(o){case i["ActiveEnum"].ACTIVE:t=i["ActiveEnum"].INACTIVE,yield n["V"].hide(e.id);break;case i["ActiveEnum"].INACTIVE:t=i["ActiveEnum"].ACTIVE,yield n["V"].show(e.id);break;default:throw new Error("Invalid active enum. value="+o)}e.show=t}finally{yield T(),h.menuTree=!1}})),M=(e,t)=>{for(const o of e){if(o.key===t)return o;if(o.children.length>=1){const e=M(o.children,t);if(e)return e}}},A=()=>{var e,o,n;const r=m.value&&m.value[0];let l;r&&(l=M(null!==(e=b.value)&&void 0!==e?e:u.value,r));const c=new i["TreeNode"]("NEW_NODE",Object(a["reactive"])({displayName:"",module:t.module,actionType:i["ActionType"].View,editMode:pm.EDIT_TITLE,visibleDropdown:!1}));let d;if(s(c),y.value=c,l){const e=l.parent;d=e?e.children:null!==(o=b.value)&&void 0!==o?o:u.value;const t=d.indexOf(l)+1;e?c.setParent(e,t):d.splice(t,0,c)}else d=null!==(n=b.value)&&void 0!==n?n:u.value,d.push(c)},F=Object(a["ref"])(!1),L=()=>{F.value=!0},R=e=>{let t=e.value,s=t.displayName;if(t.id)return s&&(s=s.trim()),void(s?setTimeout(()=>J(this,void 0,void 0,(function*(){h.menuTree=!0;try{const o=yield n["V"].updateMenuInfo(t);l(t,o),e["title"]=t.displayName,e.value["editMode"]=pm.NORMAL}finally{yield T(),h.menuTree=!1,setTimeout(()=>{F.value=!1},300)}}))):r["OioNotification"].error(Object(i["translateValueByKey"])("异常"),Object(i["translateValueByKey"])("菜单名称不允许为空")));if(s&&(s=s.trim(),s))return void setTimeout(()=>J(this,void 0,void 0,(function*(){var i,r,l,s,c;h.menuTree=!0;try{const d=(null===(i=e.parent)||void 0===i?void 0:i.children)||u.value;t.preMenuName=null===(l=null===(r=d.find(e=>{const{key:t}=e;return!(!t||!m.value.includes(t))}))||void 0===r?void 0:r.value)||void 0===l?void 0:l.name,t.parentName=null===(c=null===(s=e.parent)||void 0===s?void 0:s.value)||void 0===c?void 0:c.name,t.icon=o;const p=yield n["V"].create(t);e.key=p.id,t=Object(a["reactive"])(Object.assign(Object.assign({},t),p)),e.value=t,e["title"]=t.displayName,e.value.editMode=pm.NORMAL,u.value=[...u.value]}finally{yield T(),h.menuTree=!1,setTimeout(()=>{F.value=!1},300)}})));const c=e.parent;let d;d=c?c.children:u.value,d.splice(d.indexOf(e),1),u.value=[...u.value]},B=(e,t)=>{e.stopPropagation(),y.value=t,t.value.editMode=pm.EDIT_TITLE},_=e=>{e.value.visibleDropdown=!1,h.menuTree=!0,Object(i["deleteOne"])(n["U"].MODEL_MODEL,{id:e.value.id}).then(()=>{e.parent?(e.parent.removeChild(e),u.value=[...u.value]):u.value.splice(u.value.indexOf(e),1)}).finally(()=>J(this,void 0,void 0,(function*(){yield T(),h.menuTree=!1})))},W=Object(a["ref"])(void 0);return Object(a["onBeforeMount"])(()=>{W.value=tm.subscribe(e=>{e&&T()})}),Object(a["onUnmounted"])(()=>{var e;null===(e=W.value)||void 0===e||e.unsubscribe()}),(e,t)=>{const o=Object(a["resolveComponent"])("a-input"),n=Object(a["resolveComponent"])("a-tree");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",om,[Object(a["createElementVNode"])("div",im,[Object(a["createVNode"])(o,{value:g.value,"onUpdate:value":t[0]||(t[0]=e=>g.value=e),"allow-clear":!0,placeholder:e.$translate("使用名称搜索")},{prefix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(Object(a["unref"])(r["OioIcon"]),{icon:"oinone-sousuo"})]),_:1},8,["value","placeholder"])]),Object(a["createElementVNode"])("div",nm,[Object(a["createVNode"])(Object(a["unref"])(r["OioSpin"]),{loading:h.menuTree},{default:Object(a["withCtx"])(()=>{var o;return[Object(a["createVNode"])(n,{"tree-data":null!==(o=b.value)&&void 0!==o?o:u.value,draggable:!F.value,"block-node":"",selectable:"",selectedKeys:m.value,"onUpdate:selectedKeys":t[3]||(t[3]=e=>m.value=e),expandedKeys:v.value,"onUpdate:expandedKeys":t[4]||(t[4]=e=>v.value=e),"auto-expand-parent":"",onDragenter:$,onDrop:E,onSelect:S},{title:Object(a["withCtx"])(({title:o,value:n,isLeaf:l,dataRef:s,expanded:c,selected:d})=>[Object(a["createElementVNode"])("div",{class:"page-menu-item-main-body",style:Object(a["normalizeStyle"])(w())},[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-item-content",s.parent?"page-menu-item-content-normal":"",n.show===Object(a["unref"])(i["ActiveEnum"]).INACTIVE?"inactive-content":""])},[Object(a["createElementVNode"])("div",{class:"page-menu-item-content-title",title:o},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["page-menu-item-icon",!l&&c?" page-menu-item-icon-open":"",d&&"menu-selected"])},[n.icon?(Object(a["openBlock"])(),Object(a["createBlock"])(Object(a["unref"])(r["OioIcon"]),{key:0,size:"14px",icon:n.icon},null,8,["icon"])):Object(a["createCommentVNode"])("v-if",!0)],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["page-menu-item-title",[1!==s.level&&"not-first-level-menu",d&&"menu-selected"]]),onClick:e=>B(e,s)},[n["editMode"]===pm.EDIT_TITLE?(Object(a["openBlock"])(),Object(a["createBlock"])(Object(a["unref"])(r["OioInput"]),{key:0,value:n.displayName,"onUpdate:value":e=>n.displayName=e,maxlength:50,autofocus:!0,onClick:t[1]||(t[1]=Object(a["withModifiers"])(()=>{},["stop"])),onPressEnter:t[2]||(t[2]=e=>e.target.blur()),onBlur:e=>R(s),onFocus:L,placeholder:e.$translate("请输入菜单名称")},null,8,["value","onUpdate:value","onBlur","placeholder"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:1,class:Object(a["normalizeClass"])(n.show===Object(a["unref"])(i["ActiveEnum"]).INACTIVE?"inactive-title":"")},[o.indexOf(g.value)>-1?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(o.substring(0,o.indexOf(g.value)))+" ",1),Object(a["createElementVNode"])("span",lm,Object(a["toDisplayString"])(g.value),1),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(o.substring(o.indexOf(g.value)+g.value.length)),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(o),1)],64))],2))],10,am)],8,rm),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",sm,[Object(a["createElementVNode"])("div",cm,[Object(a["createVNode"])(Object(a["unref"])(r["OioIcon"]),{icon:n.show===Object(a["unref"])(i["ActiveEnum"]).INACTIVE?"oinone-xianshi":"oinone-yincang",title:n.show===Object(a["unref"])(i["ActiveEnum"]).INACTIVE?""+e.$translate("显示"):""+e.$translate("隐藏"),size:"16",onClick:Object(a["withModifiers"])(()=>I(n),["stop"])},null,8,["icon","title","onClick"]),n.sys?Object(a["createCommentVNode"])("v-if",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(Object(a["unref"])(r["OioIcon"]),{key:0,icon:"oinone-shanchu",size:"14",onClick:()=>{n.sys||_(s)}},null,8,["onClick"]))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:"page-menu-option-expend-button",onClick:Object(a["withModifiers"])(e=>N(s),["stop"])},[Object(a["createVNode"])(Object(a["unref"])(P["a"]),{style:{"font-size":"12px",color:"var(--oio-icon-color)"},class:Object(a["normalizeClass"])(c?"page-menu-expend-open":"page-menu-expend-close")},null,8,["class"])],8,dm),[[a["vShow"],!l]])],512),[[a["vShow"],n]])],2)],4)]),_:1},8,["tree-data","draggable","selectedKeys","expandedKeys"]),Object(a["createElementVNode"])("div",um,[Object(a["createVNode"])(Object(a["unref"])(r["OioButton"]),{icon:"oinone-fangda",block:"",onClick:A},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("添加菜单项")),1)]),_:1})])]}),_:1},8,["loading"])])])}}});bm.__file="src/view/menu-list/components/menu-list-bar/MenuListBar.vue";class gm extends i["DslRenderWidget"]{initialize(e){return super.initialize(e),this.setComponent(bm),this}onSelectedMenuChange(e){const t=null===e||void 0===e?void 0:e.data,o=null===e||void 0===e?void 0:e.selected;o&&t?em.next(t):em.next(void 0)}}Y([i["Widget"].Reactive(),i["Widget"].Inject("searchModule"),Q("design:type",Object)],gm.prototype,"module",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",void 0)],gm.prototype,"onSelectedMenuChange",null);const vm={key:0,class:"ui-designer-menu-setting-wrapper"},mm={class:"ui-designer-menu-setting-scroll-view oio-scrollbar-hidden"},ym={class:"ui-designer-menu-setting-bottom"},hm={key:1,class:"ui-designer-menu-setting-wrapper ui-designer-menu-setting-empty"},fm={style:{"font-size":"12px"}};var Om=Object(a["defineComponent"])({__name:"MenuSetting",props:{menu:{type:Object},data:{type:Object},jumpToViewDesignEdit:{type:Function,default:()=>{}},sys:{type:Boolean,default:!1},isViewSys:{type:Boolean,default:!1},isBindDesignerView:{type:Boolean,default:!1},updateMenuInfo:{type:Function},isReady:{type:Boolean,default:!1}},setup(e){const t=e,o=()=>{t.data&&!t.isViewSys&&!t.sys&&t.isBindDesignerView&&t.jumpToViewDesignEdit(t.data)};return(t,n)=>e.menu?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",vm,[Object(a["createVNode"])(Object(a["unref"])(r["OioSpin"]),{loading:!e.isReady},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",mm,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["ui-designer-menu-setting-header-design",[e.isViewSys||e.sys||!e.isBindDesignerView?"jump-design-inactive":"jump-design-active"]]),onClick:o},[Object(a["createVNode"])(Object(a["unref"])(r["OioIcon"]),{icon:"oinone-jiemiansheji1",color:e.isViewSys||e.sys||!e.isBindDesignerView?"var(--oio-disabled-color)":"var(--oio-primary-color)"},null,8,["color"]),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(Object(a["unref"])(i["translateValueByKey"])("界面设计")),1)],2),Object(a["renderSlot"])(t.$slots,Object(a["unref"])(km))])]),_:3},8,["loading"]),Object(a["createElementVNode"])("div",ym,[Object(a["createVNode"])(Object(a["unref"])(r["OioButton"]),{type:"primary",onClick:e.updateMenuInfo},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(Object(a["unref"])(i["translateValueByKey"])("保存")),1)]),_:1},8,["onClick"])])])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hm,[Object(a["createVNode"])(Object(a["unref"])($["a"]),null,{description:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",fm,Object(a["toDisplayString"])(t.$translate("当前未选择菜单")),1)]),_:1})]))}});Om.__file="src/view/menu-list/components/menu-setting/MenuSetting.vue";const wm=i["HttpClient"].getInstance();function jm(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerMenuMutation {\n\t\tupdate(\n\t\t\tdata: {\n\t\t\t\tid: "${e.id}"\n\t\t\t\tdisplayName: "${e.displayName}"\n\t\t\t\tmodule: "${e.module}"\n\t\t\t\tmodel: "${e.model}"\n\t\t\t\ticon: "${e.icon}"\n\t\t\t\tclientTypes: [${e.clientTypes}]\n\t\t\t\tactionType: ${e.actionType}\n\t\t\t\t${e.viewId?'viewId: "'+e.viewId+'"':""}\n\t\t\t\t${e.url?'url: "'+e.url+'"':""}\n\t\t\t\t${e.target?"target: "+e.target:""}\n\t\t\t\t${e.filterCondition?'filterCondition: "'+e.filterCondition+'"':""}\n\t\t\t\t${e.forceRefresh?"forceRefresh: "+e.forceRefresh:""}\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t\tname\n\t\t\ticon\n\t\t\tdisplayName\n\t\t\tmodule\n\t\t\tmodel\n\t\t\tshow\n\t\t\tsys\n\t\t\tviewId\n\t\t\tdesignerViewId\n\t\t\tclientTypes\n\t\t\tfilterCondition\n\t\t\tforceRefresh\n\t\t}\n\t}\n}\n`,o=yield wm.mutate(n["jb"],t);return o.data.uiDesignerMenuMutation.update}))}const km="menuSettingForm",Cm="ui.designer.UiDesignerMenu";class Dm extends i["DslRenderWidget"]{constructor(){super(...arguments),this.isReady=!0,this.menu=void 0,this.data=void 0,this.menuSelectRefreshSubjects=void 0}initialize(e){return super.initialize(e),this.setComponent(Om),this}get sys(){var e;return null===(e=this.data)||void 0===e?void 0:e.sys}get isViewSys(){var e;return null===(e=this.data)||void 0===e?void 0:e.isViewSys}get isBindDesignerView(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.designerViewId)}jumpToViewDesignEdit(e){return J(this,void 0,void 0,(function*(){Object(n["Hc"])(e.designerViewId,this.router,this.matched,i["RedirectTargetEnum"].BLANK)}))}updateMenuInfo(){var e;return J(this,void 0,void 0,(function*(){if(this.data&&!Object(u["a"])(this.data)){const t=yield null===(e=this.menuSettingFormWidget)||void 0===e?void 0:e.validator();if(t){const e=yield jm(this.data);this.menu=Object.assign(Object.assign({},this.menu||{}),e),tm.next(e)}}}))}load(e,...t){return J(this,void 0,void 0,(function*(){this.isReady=!1;try{return yield e(...t)}finally{setTimeout(()=>{this.isReady=!0})}}))}createMenuSettingFormWidget(){var e;return J(this,void 0,void 0,(function*(){null===(e=this.menuSettingFormWidget)||void 0===e||e.dispose();const t=yield this.fetchView();if(!t)return console.error("Invalid view UiDesignerTreeNodeMetadataForm"),[];const o=Object(i["createRuntimeContextForWidget"])(t);this.data=Object(d["a"])(this.menu?this.menu:{});let n=i["FormWidget"];this.menuSettingFormWidget=this.$createMenuSettingFormWidgetNodeWidget(o,n,km,this.data)}))}$createMenuSettingFormWidgetNodeWidget(e,t,o,n){const r=e.handle;return this.createWidget(t,o,{metadataHandle:r,rootHandle:r,dataSource:n,activeRecords:n,template:e.viewTemplate,inline:!0,mountedCallChaining:new i["CallChaining"],refreshCallChaining:new i["CallChaining"],submitCallChaining:new i["CallChaining"],validatorCallChaining:new i["CallChaining"]})}refreshActiveRecords(){this.createMenuSettingFormWidget()}refreshProcess(e){this.load(()=>J(this,void 0,void 0,(function*(){var t,o;this.menu=e,this.menu&&!(null===(t=this.menu)||void 0===t?void 0:t.actionType)&&(this.menu.actionType=i["ActionType"].View),this.menu&&!(null===(o=this.menu)||void 0===o?void 0:o.target)&&(this.menu.target=i["ViewActionTarget"].Router),yield this.refreshActiveRecords()})))}$$mounted(){super.$$mounted(),this.matched=Object(i["useMatched"])().matched,this.router=Object(i["useRouter"])().router}beforeMount(){const e=Object.create(null,{beforeMount:{get:()=>super.beforeMount}});return J(this,void 0,void 0,(function*(){e.beforeMount.call(this),this.menuSelectRefreshSubjects=em.subscribe(e=>{this.refreshProcess(e)})}))}unmounted(){var e;null===(e=this.menuSelectRefreshSubjects)||void 0===e||e.unsubscribe()}fetchView(){return J(this,void 0,void 0,(function*(){return i["ViewCache"].get(Cm,"menuSettingForm")}))}}Y([i["Widget"].Reactive(),Q("design:type",Boolean)],Dm.prototype,"isReady",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Dm.prototype,"menuSettingFormWidget",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Dm.prototype,"menu",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],Dm.prototype,"data",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Dm.prototype,"sys",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Dm.prototype,"isViewSys",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Dm.prototype,"isBindDesignerView",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],Dm.prototype,"jumpToViewDesignEdit",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",Promise)],Dm.prototype,"updateMenuInfo",null);const Tm=Object(a["defineComponent"])({name:"MenuModuleSelect",components:{LazyLoadSelect:l["A"]},props:{module:{type:String},currentModel:{type:String},queryData:{type:Object},placeholder:{type:String,default:"请选择应用模块"},currentModule:{type:String},isApplication:{type:Boolean,default:!0},disabled:{type:Boolean,required:!1,default:!1}},emits:["update:module","change"],setup(e,t){const o=Object(a["ref"])(),r=Object(a["ref"])(void 0),s=t=>J(this,void 0,void 0,(function*(){return Object(i["queryOne"])(n["lb"].module,{module:e.currentModule})})),c=t=>{const o=new i["Condition"]("module").notIn(l["f"]);return e.isApplication?o.and(new i["Condition"]("application==true")):o.and(new i["Condition"]("application==false")),o.and(new i["Condition"]("systemSource").notIn(["BASE","SYSTEM"])).and(new i["Condition"]("state").in(["installed","toupgrade"])),t.searchValue&&o.and(new i["Condition"]("displayName").like(t.searchValue)),e.queryData&&o.setConditionBodyData(e.queryData),o},d=e=>(e.label=`${e.data.displayName} - ${e.data.module}`,e);return Object(a["watch"])(r,(e,o)=>{e?t.emit("update:module",e.data.module):t.emit("update:module",void 0),t.emit("change",e,o)}),Object(a["watch"])(()=>e.isApplication,()=>{var e,t;r.value=void 0,null===(t=null===(e=o.value)||void 0===e?void 0:e.onReloadOptions)||void 0===t||t.call(e)}),{APPLICATION_PREFIX:Object(a["computed"])(()=>`"${Object(i["translateValueByKey"])("应用")}: "`),MODEL_MODEL:n["lb"].module,origin:o,selected:r,customQueryOne:s,customCondition:c,customFillProperties:d,defaultSelectProperties:l["Y"]}}}),$m=()=>{Object(a["useCssVars"])(e=>({"0dfdb4ce-APPLICATION_PREFIX":e.APPLICATION_PREFIX}))},Em=Tm.setup;function Sm(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("lazy-load-select");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{ref:"origin",class:"ui-designer-menu-module-select",disabled:e.disabled,currentModel:e.currentModel,model:e.MODEL_MODEL,selected:e.selected,"onUpdate:selected":t[0]||(t[0]=t=>e.selected=t),placeholder:e.placeholder,"custom-query-one":e.customQueryOne,"custom-condition":e.customCondition,"custom-fill-properties":e.customFillProperties,properties:e.defaultSelectProperties,"initial-pick-one":!0,"allow-clear":!1},null,8,["disabled","currentModel","model","selected","placeholder","custom-query-one","custom-condition","custom-fill-properties","properties"])}Tm.setup=Em?(e,t)=>($m(),Em(e,t)):$m,Tm.render=Sm,Tm.__file="src/view/menu-list/components/select/menu-module-select/MenuModuleSelect.vue";const Nm={class:"ui-designer-content ui-designer-menu-list"},Vm={class:"ui-designer-header-bottom ui-designer-menu-list-header"},xm={class:"designer-header-row"},Im={class:"designer-header-search"},Mm={class:"app-select"},Am={class:"form-enum-radio"},Fm={class:"not-readonly"},Lm={class:"ui-designer-menu-list-content"};var Rm=Object(a["defineComponent"])({__name:"MenuList",props:{searchValue:{type:String,required:!0},onSearch:{type:Function,required:!0},onSearchValueChange:{type:Function,required:!0},filterValue:{type:String,required:!0},onFilterValueChange:{type:Function,required:!0},searchModule:{type:String,required:!1},onSearchModuleChange:{type:Function,required:!0},filterModuleType:{type:String,required:!0},onFilterModuleTypeChange:{type:Function,required:!0}},setup(e){const t=e,o=Object(a["computed"])(()=>"module"!==t.filterModuleType);return(t,i)=>{const n=Object(a["resolveComponent"])("a-radio-button"),r=Object(a["resolveComponent"])("a-radio-group");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nm,[Object(a["createElementVNode"])("div",Vm,[Object(a["createElementVNode"])("div",xm,[Object(a["createElementVNode"])("div",Im,[Object(a["createElementVNode"])("div",Mm,[Object(a["createVNode"])(Object(a["unref"])(Tm),{currentModule:e.searchModule,"is-application":Object(a["unref"])(o),onChange:e.onSearchModuleChange},null,8,["currentModule","is-application","onChange"])]),Object(a["createElementVNode"])("div",Am,[Object(a["createElementVNode"])("div",Fm,[Object(a["createVNode"])(r,{class:"button-group","button-style":"solid",value:e.filterModuleType,"onUpdate:value":e.onFilterModuleTypeChange},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(n,{value:"application"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.$translate("应用")),1)]),_:1}),Object(a["createVNode"])(n,{value:"module"},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.$translate("模块")),1)]),_:1})]),_:1},8,["value","onUpdate:value"])])])])])]),Object(a["createElementVNode"])("div",Lm,[Object(a["renderSlot"])(t.$slots,"menu-list-bar"),Object(a["renderSlot"])(t.$slots,"menu-setting")])])}}});Rm.__file="src/view/menu-list/MenuList.vue";class Bm{constructor(){}queryPage(e,t,o){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}create(e){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}update(e){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}deleteOne(e){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}show(e){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}hide(e){return J(this,void 0,void 0,(function*(){return console.warn("目前使用 MenuService, MenuDefinitionService 暂未实现"),{}}))}relations(e){return J(this,void 0,void 0,(function*(){}))}}Bm.INSTANCE=new Bm;const _m="menuFilterModule",Wm="menuFilterModuleType",Pm="__menu_designer";let zm=class extends n["b"]{initialize(e){return super.initialize(e),this.setComponent(Rm),this}get managementService(){return Bm.INSTANCE}get managementLocalStorageKey(){return Pm}onSearchModuleChange(e){var t;return J(this,void 0,void 0,(function*(){this.searchModule=null===(t=null===e||void 0===e?void 0:e.data)||void 0===t?void 0:t.module,e?l["db"].setItem(_m,e.data):l["db"].removeItem(_m)}))}onFilterModuleTypeChange(e){return J(this,void 0,void 0,(function*(){this.searchModule=null,this.filterModuleType=e,l["db"].setItem(Wm,e)}))}renderWidgets(){const e=gm;e&&this.createWidget(e,"menu-list-bar");const t=Dm;t&&this.createWidget(t,"menu-setting")}initData(){return J(this,void 0,void 0,(function*(){this.filterModuleType=l["db"].getItem(Wm)||"application";const e=l["db"].getItem(_m);if(e){const{application:t}=e;t?"application"===this.filterModuleType&&(this.searchModule=e.module):"module"===this.filterModuleType&&(this.searchModule=e.module)}}))}beforeMount(){const e=Object.create(null,{beforeMount:{get:()=>super.beforeMount}});return J(this,void 0,void 0,(function*(){e.beforeMount.call(this),yield this.initData()}))}mounted(){const e=Object.create(null,{mounted:{get:()=>super.mounted}});return J(this,void 0,void 0,(function*(){e.mounted.call(this);try{yield this.renderWidgets()}catch(t){console.error(t)}}))}};Y([i["Widget"].Reactive(),i["Widget"].Provide(),Q("design:type",Object)],zm.prototype,"searchModule",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object)],zm.prototype,"filterModuleType",void 0),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],zm.prototype,"onSearchModuleChange",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[Object]),Q("design:returntype",Promise)],zm.prototype,"onFilterModuleTypeChange",null),zm=Y([i["SPIFactory"].Register(l["R"].Token({tab:l["L"].MENU}))],zm);var Gm=Object(a["defineComponent"])({name:"ChartStyleDesignerHeader",components:{DesignerCommonHeader:n["o"],OioButton:r["OioButton"],OioDivider:r["OioDivider"]},props:{originPageSettingData:{type:Object,required:!0},currentPageSettingData:{type:Object,required:!0},hasHistoryRecord:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},saveView:{type:Function},saving:{type:Boolean,default:void 0},saveResult:{type:Boolean,default:!0}},emits:["showHistory","gotoDesignerList"],setup(e,t){const o=Object(a["ref"])({save:!1}),i=Object(a["computed"])(()=>{var t,o;return(null===(t=e.currentPageSettingData)||void 0===t?void 0:t.name)||(null===(o=e.originPageSettingData)||void 0===o?void 0:o.name)}),n=()=>{t.emit("gotoDesignerList")},r=()=>J(this,void 0,void 0,(function*(){if(!e.disabled){o.value.save=!0;try{e.saveView&&(yield e.saveView())}finally{o.value.save=!1}}})),l=e=>{t.emit("showHistory",e)};return{loading:o,title:i,gotoBack:n,save:r,onShowHistory:l}}});const Um={class:"designer-layout-header-toolbar"};function Km(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("oio-divider"),c=Object(a["resolveComponent"])("designer-common-header");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{"save-result":e.saveResult,saving:e.saving,title:e.title,class:"page-designer-header",onGoBack:e.gotoBack},{toolbar:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Um,[Object(a["createVNode"])(l,{disabled:e.disabled||!e.hasHistoryRecord,title:e.$translate("查看历史版本"),type:"link",icon:"oinone-lishibanben",onClick:e.onShowHistory},null,8,["disabled","title","onClick"])]),Object(a["createVNode"])(s,{style:{"margin-right":"24px"},type:"vertical"}),Object(a["createVNode"])(l,{disabled:e.disabled,loading:e.loading.save,icon:"oinone-fabu",type:"primary",onClick:Object(a["withModifiers"])(e.save,["stop"])},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("发布")),1)]),_:1},8,["disabled","loading","onClick"])]),_:1},8,["save-result","saving","title","onGoBack"])}Gm.render=Km,Gm.__file="src/view/chart-style-designer/component/header/header.vue";const qm=Object(a["defineComponent"])({name:"UiDataChartStyleDesigner",components:{OioTooltip:r["OioTooltip"],OioTooltipHelp:r["OioTooltipHelp"],VanNavBar:Au,UiIconSizeReset:Hu,DesignerDraggable:n["t"],WidgetSetting:Bg,draggableWidget:tg,DesignerHeader:Gm,PageMenu:fg,DesignerContentHeader:Lu,AnchorDrawer:n["d"],OioButton:r["OioButton"],OioIcon:r["OioIcon"],OioSpin:r["OioSpin"]},inheritAttrs:!1,props:["layoutId","viewId","logo","setLayoutId","setViewId","isDestroyForm","destroyForm","initForm","initMetadataSettingForm","saveAttrInfo","saveMetaInfo","designerTtypeOption","setDesignerTtypeOptions","setDesignerContextTypeOptions","setDesignerSpanOptions","setDesignerFieldReference","setDesignerModelFieldInfo","setViewClientType","viewClientType","goToPageHistoryList","goToViewDesignList"],setup(e){Object(n["pd"])().setScope(Fu.PAGE);const t=Object(a["ref"])(),o=Object(a["ref"])(),l=Object(a["ref"])(),c=lv(),{loading:b,visible:g,viewType:m,isReady:y,autoSaving:h,saveResult:f,designerData:O,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,protocolVersion:C}=c,{widgetCategoryGroup:D,widgetDefinitionGroup:T,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,initWidgetGroup:V,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M,removeCustomAction:A,addCustomAction:F}=sv(c),{isLeftDrawerAnchored:L,isRightDrawerAnchored:R,isShowMasterMask:B,isShowMenuDynamic:_,headerHeight:W,leftAreaWidth:P,designerContentLeftMargin:z,designerContentRightMargin:G,contentOtherWidth:U,computeLayout:K}=av(c);Object(a["provide"])("widgetTypeGroup",E);const q=Object(a["computed"])(()=>m.value===i["ViewType"].Gallery),{isShowCardDesign:H,cardWidgetInstanceRoot:Y}=Ug(c),Q=Object(a["ref"])(void 0),{lazySelectedInstance:X,setLazySelectedInstance:Z}=Object(n["hd"])(),te=Object(a["computed"])(()=>Q.value&&Object.keys(Q.value).length>=1),oe=Object(a["computed"])(()=>{const e=Q.value;return!!e&&n["R"].isIcon(e).result}),ie=e=>{H.value=e.target.value},ne=()=>{Q.value=void 0,Ge.value=!1,e.destroyForm()},{PageDesignerMultiQueueEditor:re,currentVersion:ae,isCancelState:le,isRecoverState:se,historyVersionInit:ce,allowCancelCurrentEdit:de,allowRecoverLastEdit:ue,addEditHistoryQueue:pe,cancelCurrentEdit:be,recoverLastEdit:ge,resetEditState:ve}=Yg(()=>{ne()},e=>{me.value=Object(d["a"])(e.designerData),x(S.value.get(j.value),e.modelDefinitions)}),me=Object(a["computed"])({get(){return O.value},set(e){O.value=e,w.value=e?Object(n["Ib"])(E.value,e):void 0}}),{hasOpenModal:ye,isAllowOpenDesignerModal:he,isReadyOpenDesignerModal:fe,onOpenDesignerModal:Oe,copyModalWidgetInstance:we}=Jg({currentSelectedInstance:Q,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenDrawer:je,isAllowOpenDesignerDrawer:ke,isReadyOpenDesignerDrawer:Ce,onOpenDesignerDrawer:De,copyDrawerWidgetInstance:Te}=qg({currentSelectedInstance:Q,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenInnerPopup:$e,isAllowOpenDesignerInnerPopup:Ee,isReadyOpenDesignerInnerPopup:Se,onOpenDesignerInnerPopup:Ne,copyInnerPopupWidgetInstance:Ve}=Qg({currentSelectedInstance:Q,widgetNameGroup:$,widgetTypeGroup:E}),{isAllowPreviewDesignerConfirm:xe,onOpenDesignerConfirm:Ie}=Kg(Q),Me=Object(a["computed"])(()=>{const{disable:e,allowViewActionDesign:t,designerViewId:o}=Object(n["Eb"])(Q.value);return{disable:e,allowViewActionDesign:t,designerViewId:o}}),Ae=Object(i["useRouter"])().router,{matched:Fe}=Object(i["useMatched"])(),Le=e=>{Object(n["Hc"])(e,Ae,Fe,i["RedirectTargetEnum"].BLANK)},Re=Object(a["ref"])({}),Be=Object(a["ref"])({}),_e=Object(a["ref"])(""),We=Object(a["ref"])(""),Pe=Object(a["ref"])([]),ze=Object(a["computed"])(()=>Object(n["hc"])(Q.value)),Ge=Object(a["ref"])(!1),Ue=(t,o)=>J(this,void 0,void 0,(function*(){b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0;try{const[l,s]=yield Promise.all([n["yb"].INSTANCE.get(),Yt(t)]),{widgetDefinitionList:c=[],widgetList:d=[]}=l,{id:u,viewId:p,viewType:v,viewTitle:y,viewName:h,viewDescription:f,bizType:O,designerLayoutType:w,designerActionBarType:D,viewCategoryId:T,viewThumbnail:$,modelDefinition:E={},modelDefinitions:I=[],fields:M=[],viewActions:A=[],serverActions:F=[],urlActions:L=[],clientActions:R=[],designerJson:B,module:_="",modules:W=[],historyCount:P=0,errorJsonPaths:z=[],errorWidgetJsonPaths:G=[],protocolVersion:U,selections:K=[]}=s,{setExistEnumOptions:q}=Object(n["cd"])();q(K),e.setLayoutId(u),e.setViewId(p),m.value=v;const H=[...A,...F,...L,...R];V(c,d),x(Object(n["Qb"])(E.model,E.displayName,M,H),I),Re.value={name:y||h||Object(i["translateValueByKey"])("未命名视图"),description:f,bizType:O,type:v,designerLayoutType:w,designerActionBarType:D,currentCategoryId:T,thumbnailUrl:$},Be.value=Object.assign({},Re.value);const Y=JSON.parse(B);Y.elements=Y.elements.filter(e=>e.subtype!==n["A"].ACTION_BAR),me.value=Y;const Q=Object(n["dc"])(Y,z);Q&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${Q}条数据不存在，请重新设置`),{duration:null});const J=Object(n["ec"])(Y,G);J&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${J}个组件不存在，请重新设置`),{duration:null}),j.value=E.model,ce(u,Y,I,{layoutId:u,designerData:Object(a["computed"])(()=>me.value),modelWidgetLib:S.value,currentModelWidgetLib:N.value}),k.value=P,o&&(_e.value=_,We.value=_,Pe.value=W),C.value=U||""}finally{g.content=!0,b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1}})),Ke=t=>{if(t=Object(n["nc"])(t),!t)return;const o=Q.value;if(!o)return;ne(),Ge.value=!0,Q.value=o;let{currentWidget:i}=o;if(!i)return;const{viewType:r,widgetDefinitionName:a}=i,l=T.value.get(a);if(!l)return;const{widgetList:s}=l,c=s.find(e=>e.viewType===r&&Object(n["nc"])(e.widgetSubtype)===t);if(!c)return;o.currentWidget=c,i=c;const{element:d}=o;d.title=c.widgetDisplayName,d.subtype=c.widgetSubtype,d.widget=c,b.rightDrawer=!0,e.initMetadataSettingForm(o,!0,!1).then(e=>{const{isDialog:r,isDrawer:a,isRowAction:l,isInContainer:s,widgetViewType:c,widgetName:u}=Object(n["uc"])(o);e&&(o.metadata=e.getData(),o.metadata.ttype=t,o.metadata[n["yc"]]=r,o.metadata[n["Ac"]]=a,o.metadata[n["Dc"]]=l,o.metadata[n["Cc"]]=s,o.metadata[n["Pc"]]=d.model,o.metadata[n["rd"]]=c,o.metadata[n["td"]]=u),n["xb"].isFieldWidget(i)&&Ye(o,i)}).finally(()=>{b.rightDrawer=!1,o.forceUpdate()})},qe=t=>{let o=[];const r=t.parent;if(!r)return void e.setDesignerSpanOptions(o);const{element:l}=t;if(n["ob"].isV3(C.value)){const e=i["Optional"].ofNullable(r.options).map(e=>e.cols).orElse(i["DEFAULT_COLS"]),a=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(1),l=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(e);for(const t in i["ColSpanEnum"]){const n=i["ColSpanEnum"][t],r=e*Number(n);a<=r&&r<=l&&o.push(t)}}else if(n["R"].isRow(r).result||n["R"].isBlock(r).result){const s=i["Optional"].ofNullable(r.options).map(e=>e.cols).orElse(void 0);if(Object(u["a"])(s))return void e.setDesignerSpanOptions(o);const c=i["Optional"].ofNullable(l.properties).map(e=>e.colSpan).orElse(void 0);if(!Object(u["a"])(c)){const e=s-Object(a["unref"])(r.options.spanTotal)+n["O"].computeColSpan(c,s);if(0===e)o=[c];else for(const r in i["ColSpanEnum"]){const a=i["ColSpanEnum"][r];if(a)if(c===r)o.push(r);else{const l=s*Number(a),c=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(e=>n["O"].computeColSpan(e,s)).orElse(1),d=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(e=>n["O"].computeColSpan(e,s)).orElse(s);c<=l&&l<=d&&l<=e&&o.push(r)}}}}else if(n["R"].isContainer(r).result)for(const e in i["ColSpanEnum"])o.push(e);e.setDesignerSpanOptions(o)},He=(e,t)=>{const{widgetDefinitionName:o,widgetName:i,multi:r}=t;if(n["E"].includes(i)){const o=$.value.get(`${n["B"].FIELD}#${i}#${r}`);if(!o)return;Xe(e,o,t)}else{const i=T.value.get(o);if(!i)return;Je(e,i,t),Ye(e,t)}},Ye=(e,t)=>{const{widgetDefinitionName:o}=t;if(!o)return;const i=T.value.get(o);if(!i)return;const{metadata:r}=e;if(r){const{isSelectMulti:o,metadataMulti:a}=Object(n["vc"])(e,t,i);r[n["Ec"]]=o||!1,Object(u["a"])(a)||(r.multi=a)}},Qe=(e,t)=>{const o=T.value.get(t.widgetDefinitionName);o&&Je(e,o,t)},Je=(t,o,a)=>{const l=Object(n["rc"])(t);if(!l)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法识别当前组件实例所在视图类型"));const s=Object(n["nc"])(a.widgetSubtype),c=[s];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);e.viewType===l&&e.show&&t!==s&&c.push(t)});const[d]=c;t.metadata.ttype=d,e.setDesignerTtypeOptions([...new Set(c)]),n["Hb"].setValue(n["ac"],d)},Xe=(t,o,a)=>{const l=Object(n["rc"])(t);if(!l)return void r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法识别当前组件实例所在视图类型"));const s=Object(n["nc"])(a.widgetSubtype),c=[s];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);e.viewType===l&&t!==s&&c.push(t)});const[d]=c;t.metadata.ttype=d,e.setDesignerTtypeOptions(c),n["Hb"].setValue(n["ac"],d)},Ze=t=>{var o;const n=[];i["Optional"].ofNullable(t).map(e=>e.root).map(e=>null===e||void 0===e?void 0:e.fieldCollection).map(e=>null===e||void 0===e?void 0:e.keys()).ifPresent(e=>{if(e)for(const t of e)n.push(t.split("#")[1])});let r=!1;i["Optional"].ofNullable(t).map(e=>e.currentWidget).ifPresent(e=>{const t=e;r=t.multi||!1});const a=[];if(N.value&&N.value.fields)for(const e of N.value.fields)a.push({name:e.name,id:e.id,model:e.model,ttype:e.ttype,systemSource:e.systemSource,multi:e.multi,displayName:e.displayName});e.setDesignerModelFieldInfo({allFieldList:a,existFieldList:n,multi:r,currentModel:null===(o=N.value)||void 0===o?void 0:o.model})},et=(e,t)=>{const o=S.value.get(e);if(o){const e=t.name,i=o.fields.find(t=>t.name===e);i||o.fields.splice(0,0,t)}},tt=(e,t,o,r,a,l)=>{let s=E.value.get(`${n["B"].FIELD}#${r}#${l}`)||[];r===i["ModelFieldType"].Related&&a&&(s=[...s,...E.value.get(`${n["B"].FIELD}#${a}#${l}`)||[]]),(null===s||void 0===s?void 0:s.length)?it(e,t,s):e.widgetList=[]},ot=(e,t)=>{const o=E.value.get(`${t.widgetBizType}#${t.widgetSubtype}`);o&&it(e,t,o)},it=(e,t,o)=>{const i=n["wb"].fetchWidgetGroup(e.parent,o,!0);if(!i)return void(e.widgetList=[]);const{defaultWidget:r,widgetList:a}=i,{widgetDefinitionName:l}=t,s=[r,...a].find(e=>e.widgetDefinitionName===l);t=s||r,e.currentWidget=t,e.element.widget=t;const{widgetName:c}=t;r.widgetName===c?e.widgetList=a:e.widgetList=[r,...a.filter(e=>e.widgetName!==c)]},nt=(e,t)=>{const{element:o}=e,r=e.currentWidget;if(o.name){const a=o.widgetData;if(!t)if(a){const t=i["Optional"].ofNullable(a).map(e=>e.ttype).orElse(void 0),l=i["Optional"].ofNullable(a).map(e=>e.relatedTtype).orElse(void 0),s=i["Optional"].ofNullable(a).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)||Object(u["a"])(s)||(tt(e,r,a,t,l,s),et(o.model,a),n["R"].collectionRootElement(e))}else He(e,r)}else He(e,r),Ze(e);qe(e)},rt=t=>{const{element:o}=t;let r=!1;if(o.name)n["R"].collectionRootElement(t);else{const o=t.parent.element,{bizType:a,subtype:l}=o;if(a&&l&&[n["A"].ROW_ACTIONS,n["A"].ROW_ACTIONS_WIDGET,n["A"].DROPDOWN,n["A"].TOOLBAR_DROPDOWN].includes(l))e.setDesignerContextTypeOptions([i["ActionContextType"].Single]),r=!0;else{const o=Object(n["qc"])(t,e=>e.element.bizType!==n["B"].SLOT);if(o){const{bizType:t,subtype:a}=o.element;t===n["B"].ELEMENT&&a===n["A"].ACTION_BAR&&(e.setDesignerContextTypeOptions([i["ActionContextType"].ContextFree,i["ActionContextType"].Single,i["ActionContextType"].Batch,i["ActionContextType"].SingleAndBatch]),r=!0)}}}r||e.setDesignerContextTypeOptions([])},at=(e,t)=>{const{element:o}=e,r=e.currentWidget,a=o.widgetData;if(!t)if(a){const t=[a.startMetadata,a.endMetadata];t.forEach(e=>{if(!e)return;const t=i["Optional"].ofNullable(e).map(e=>e.ttype).orElse(void 0),n=i["Optional"].ofNullable(e).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)||Object(u["a"])(n)||et(o.model,e)}),ot(e,r),n["R"].collectionRootElement(e)}else Qe(e,r),Ze(e);qe(e)},lt=(o,r,l)=>{Object(u["a"])(l)&&(l=o.element.initialization),Object(a["nextTick"])(()=>{g.rightDrawer=!0,K()}),b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0,i["Optional"].ofNullable(Object(n["sc"])(o,e.layoutId)).ifPresent(t=>{e.setDesignerFieldReference(t)}),e.initForm(o,r,!1).then(({propertiesSettingFormWidget:e,metadataSettingFormWidget:i})=>{var r,a,s,c;const{isDialog:d,isDrawer:u,isRowAction:p,isInContainer:b,widgetViewType:g,widgetName:v,elementSource:m}=Object(n["uc"])(o);i&&(o.metadata=i.getData(),o.metadata[n["yc"]]=d,o.metadata[n["Ac"]]=u,o.metadata[n["Dc"]]=p,o.metadata[n["Cc"]]=b,o.metadata[n["Pc"]]=o.element.model,o.metadata[n["rd"]]=g,o.metadata[n["cc"]]=m,o.metadata[n["td"]]=v),e&&(o.element.properties=e.getData(),o.element.properties[n["Oc"]]=o.metadata,o.element.properties[n["yc"]]=d,o.element.properties[n["Ac"]]=u,o.element.properties[n["Dc"]]=p,o.element.properties[n["Cc"]]=b,o.element.properties[n["Pc"]]=o.element.model,o.element.properties[n["rd"]]=g,o.element.properties[n["td"]]=v,o.element.properties[n["cc"]]=m);const y=o.currentWidget;switch(y.widgetBizType){case n["B"].PACK:case n["B"].ELEMENT:switch(y.widgetSubtype){case n["A"].MODAL:case n["A"].DRAWER:case n["A"].INNER_POPUP:o.element.properties[n["Db"]]=(null===(a=null===(r=o.parent)||void 0===r?void 0:r.element)||void 0===a?void 0:a.properties.label)||"对话框",o.element.properties[n["Cb"]]=null===(c=null===(s=o.parent)||void 0===s?void 0:s.metadata)||void 0===c?void 0:c.contextType;break;case n["A"].PARAGRAPH:case n["A"].CHART:case n["A"].REPORT:case n["A"].DATA_DASHBOARD:qe(o);break;case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:case n["A"].FLOAT_PLAT:at(o,l);break}break;case n["B"].FIELD:nt(o,l);break;case n["B"].ACTION:rt(o);break}t.value&&t.value.refreshTabSelectData(o),Q.value=o,Z(o)}).finally(()=>{b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1,Object(a["nextTick"])(()=>{o.isReady||(o.isReady=!0,o.notifyParentIsReady())})})},st=(e,t)=>{ne(),e&&e.currentWidget?(yt(e),lt(e,!1,t)):(Ot(void 0),Q.value=e,Z(e))},ct=Object(p["a"])((e,t,o)=>{h.value=!0;const r=[],a=[];for(const i of e.modelWidgetLib.values())r.push(i.model),a.push({model:i.model,displayName:i.displayName});o&&pe({id:n["h"],layoutId:e.layoutId,designerJson:t,version:n["h"],versionName:n["i"],createDate:i["DateUtil"].dateFormat(new Date,i["defaultFormat"]),modelDefinitions:a}),Jt(e.layoutId,t,r).then(()=>{f.value=!0}).catch(e=>{console.error(e),f.value=!1}).finally(()=>{h.value=!1})},1e3),dt=e=>{try{e||(e=re.currentEditor);const t=Object(n["Vb"])(e.context.designerData.value),o=!le.value&&!se.value;if(o){const o=e.editor.currentData;if(o&&t===o.designerJson)return}ae.value.id===n["h"]&&ct(e.context,t,o)}finally{ve()}},ut=({selectedInstance:t,originWidget:o,targetWidget:r})=>{const{widgetBizType:a}=o;if(a===n["B"].FIELD){const a=o.widgetSubtype;if(!a)return;const l=i["Optional"].ofNullable(t.element).map(e=>e.widgetData).orElse(void 0);if(!l)return;const{model:s}=l;if(n["eb"].includes(a)){const i=o.widgetName,a=r.widgetName,c=l.references;if(n["db"].includes(i))if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s),M(c);else if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s)}else I(s);mt(t)}else I(t.element.model);ne(),t?lt(t,!0):Z(void 0)};function pt(e,t){const o=t.widgetSubtype;if(!o)return;const r=i["Optional"].ofNullable(e.element).map(e=>e.widgetData).orElse(void 0);if(r&&n["eb"].includes(o)){const e=r.references;M(e)}}const bt=e=>{const{currentWidget:t}=e;if(!t)return;const{widgetBizType:o}=t;switch(o){case n["B"].ELEMENT:Ze(e);break;case n["B"].FIELD:Ze(e),pt(e,t);break}e.children.forEach(e=>{bt(e)})},gt=({targetInstance:e})=>{var t,o,i;const r=null===(t=Q.value)||void 0===t?void 0:t.element.id,a=null===(o=e.element)||void 0===o?void 0:o.id;if(r&&a&&r===a){const t=null===(i=e.element)||void 0===i?void 0:i.bizType;t===n["B"].ACTION&&rt(e)}},vt=e=>{var t,o;const{multi:i}=e.element.widgetData,n=e.currentWidget.multi;if(!Object(u["a"])(i)&&!Object(u["a"])(n)&&i!==n){const n=null===(t=e.currentWidget)||void 0===t?void 0:t.widgetName;if(n){const t=null===(o=e.widgetList)||void 0===o?void 0:o.find(e=>e.widgetName===n&&e.multi===i);t&&(e.currentWidget=t)}}},mt=e=>{const{widgetName:t}=e.currentWidget;if(t){while(e.children.length>0)n["R"].remove(e,0);const o=e.element.widgetData.references;switch(t){case n["db"][0]:n["R"].add(e,n["wb"].createInlineTableWidgetInstance(e,$.value,E.value,o));break;case n["db"][1]:{const t=Object(n["rc"])(e);t===n["Bb"].DETAIL?n["R"].add(e,n["wb"].createInlineDetailWidgetInstance(e,$.value,E.value,o)):n["R"].add(e,n["wb"].createInlineFormWidgetInstance(e,$.value,E.value,o));break}}}},yt=e=>{var t;const{currentWidget:o}=e,i=o.widgetBizType;if(i===n["B"].FIELD){const i=e.element.referenceModel||(null===(t=e.element.widgetData)||void 0===t?void 0:t.references);if(i&&n["db"].includes(o.widgetName))return void I(i)}I(e.element.model)},ht=e=>{I(e.data.model)},ft=e=>J(this,void 0,void 0,(function*(){const t=`uiDesigner${e.actionType.slice(0,1).toUpperCase()}${e.actionType.slice(1).toLowerCase()}ActionProxyMutation`;try{b.leftDrawer=!0,b.content=!0,yield Ut(t,e.model,e.name),A(e)}finally{b.leftDrawer=!1,b.content=!1}})),Ot=e=>{e&&e.id===Lg.PROPERTIES?Ge.value=!1:Ge.value=i["Optional"].ofNullable(Q.value).map(e=>e.element).map(e=>!e.initialization||Object(s["a"])(e.name)).orElse(!1)},wt=()=>{const t=Q.value;if(!t)return;const{element:o}=t;o&&(o.isValidator=!0,b.content=!0,b.rightDrawer=!0,e.saveMetaInfo(t).then(e=>{if(!e)return;const{name:o,metadata:l,metaExtends:s}=e;t.element.name=o,t.element.widgetData=l,t.element.initialization=!0,t.metadata=e,t.element.metaExtends=s;const c=t.currentWidget,d=c.widgetBizType;let u;switch(d){case n["B"].PACK:u="容器设置成功";break;case n["B"].ELEMENT:{const{widgetSubtype:e}=c;switch(e){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:u="范围组件设置成功";break;default:u="组件设置成功";break}break}case n["B"].FIELD:u="字段设置成功";break;case n["B"].ACTION:u="动作设置成功";break;case n["B"].VIEW:u="视图设置成功";break;default:throw new Error("Invalid widget biz type. value="+d)}r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])(u)),Object(a["nextTick"])(()=>{switch(d){case n["B"].ELEMENT:{const{widgetSubtype:o}=c;switch(o){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:case n["A"].FLOAT_PLAT:{const{startMetadata:o,endMetadata:i}=e;t.element.name||(t.element.name=`${null===o||void 0===o?void 0:o.name}#${null===i||void 0===i?void 0:i.name}`),t.element.widgetData||(t.element.widgetData={startMetadata:o,endMetadata:i});break}}break}case n["B"].FIELD:vt(t),mt(t);break;case n["B"].ACTION:e.reserve&&F(e),mo({widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:we,copyDrawerWidgetInstance:Te,copyInnerPopupWidgetInstance:Ve},t);break}st(t,!1)}),Ge.value=!1}).finally(()=>{b.content=!1,b.rightDrawer=!1}))},jt=e=>!!Object(n["sd"])(e)&&kt(e.elements),kt=e=>{for(const t of e)if(!t.isVirtual&&(!t.isSkip||!kt(t.elements))&&!jt(t))return!1;return!0},Ct=()=>J(this,void 0,void 0,(function*(){var t;try{if(b.content=!0,b.rightDrawer=!0,Be.value.name||(Be.value.name=Re.value.name),jt(me.value)){const{layoutId:o}=e,a=[],l=re.editorEntries;let s=l.next();while(!s.done){const e=s.value[1],i=null===(t=e.context)||void 0===t?void 0:t.layoutId;i&&i!==o&&a.push(i),s=l.next()}yield Xt(o,Object(n["Vb"])(me.value),Array.from(S.value.keys()),Be.value,a),r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("发布成功"))}else r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("页面发布失败，以下特殊标记组件的属性校验失败，请打开属性查看原因并重新设置"))}finally{b.content=!1,b.rightDrawer=!1}})),Dt=()=>J(this,void 0,void 0,(function*(){b.leftDrawer=!0,b.content=!0,ne(),Z(void 0)})),Tt=(e,t)=>J(this,void 0,void 0,(function*(){var o,i,n;const r=JSON.parse(t);me.value=r,ce(e,r,(null===(n=null===(i=null===(o=re.firstEditor)||void 0===o?void 0:o.editor)||void 0===i?void 0:i.currentData)||void 0===n?void 0:n.modelDefinitions)||[],{layoutId:e,designerData:Object(a["computed"])(()=>me.value),modelWidgetLib:S.value,currentModelWidgetLib:N.value})})),$t=(e,t)=>J(this,void 0,void 0,(function*(){try{yield Dt();const{designerJson:o}=yield Zt(e,t);yield Tt(e,o),Re.value.designerActionBarType=t}finally{b.leftDrawer=!1,b.content=!1}})),Et=(e,t)=>J(this,void 0,void 0,(function*(){try{yield Dt();const{designerJson:o}=yield eo(e,t);yield Tt(e,o),Re.value.designerLayoutType=t}finally{b.leftDrawer=!1,b.content=!1}})),St=t=>J(this,void 0,void 0,(function*(){try{const o=e.layoutId;if(o){yield Dt();const{id:e,designerJson:i}=yield to(o,Object(n["Vb"])(me.value),Array.from(S.value.keys()),t);yield Tt(e,i)}}finally{b.leftDrawer=!1,b.content=!1}}));Object(a["watch"])(()=>{const e=Re.value.designerActionBarType,{designerActionBarType:t}=Be.value;if(t&&e!==t)return{designerActionBarType:t}},t=>J(this,void 0,void 0,(function*(){e.layoutId&&(null===t||void 0===t?void 0:t.designerActionBarType)&&(yield $t(e.layoutId,t.designerActionBarType))}))),Object(a["watch"])(()=>{const e=Re.value.designerLayoutType,{designerLayoutType:t}=Be.value;if(t&&e!==t)return{designerLayoutType:t}},t=>J(this,void 0,void 0,(function*(){e.layoutId&&(null===t||void 0===t?void 0:t.designerLayoutType)&&(yield Et(e.layoutId,t.designerLayoutType))})));const Nt=Object(p["a"])((e,t,o)=>{const{name:i,description:n,currentCategoryId:r,thumbnailUrl:a}=t,{name:l,description:s,currentCategoryId:c,thumbnailUrl:d}=o;let u=l;u||(u=void 0),u===i&&n===s&&r===c&&a===d||(h.value=!0,u||(u=Re.value.name),oo(e,{name:u,description:s,currentCategoryId:c,thumbnailUrl:d}).then(()=>{f.value=!0}).catch(e=>{console.error(e),f.value=!1}).finally(()=>{h.value=!1}))},1e3);let Vt=!1;Object(a["watch"])(()=>{const e=Be.value;if(e&&Object.keys(e).length)return Object.assign({},e)},(t,o)=>J(this,void 0,void 0,(function*(){Vt||o&&t&&(yield Nt(e.layoutId,o,t))})));const xt=t=>{if(t.selected){ne(),Z(void 0);const{designerViewId:o}=t.data;o?(e.setLayoutId(o),Object(a["nextTick"])(()=>J(this,void 0,void 0,(function*(){Vt=!0;try{yield Ue(o,!1)}finally{yield Object(a["nextTick"])(()=>{Vt=!1})}})))):(t.data.sys&&r["OioNotification"].error(Object(i["translateValueByKey"])("异常"),Object(i["translateValueByKey"])("系统数据，无法修改")),Be.value={},Re.value={},g.content=!1,m.value=void 0)}};Object(a["watch"])(B,e=>{Object(a["nextTick"])(()=>{st(void 0),Z(void 0)}).then(()=>{if(e){const e=n["X"].getInstance();null===e||void 0===e||e.openKeys().forEach(t=>{var o;const i=null===(o=e.get(t))||void 0===o?void 0:o.parent;i&&n["ab"].close(i)});const t=n["L"].getInstance();null===t||void 0===t||t.openKeys().forEach(e=>{var o;const i=null===(o=t.get(e))||void 0===o?void 0:o.parent;i&&n["ab"].close(i)})}}).then(()=>{g.leftDrawer=!e,g.rightDrawer=!e,K()})});const It=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!0,K()})},Mt=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!1,K()})},At=e=>{Object(a["nextTick"])(()=>{L.value=e,K()})},Ft=e=>{Object(a["nextTick"])(()=>{R.value=e,K()})},Lt=()=>{Object(a["nextTick"])(()=>{g.rightDrawer=!0,K()})},Rt=()=>{ne(),Z(void 0),Object(a["nextTick"])(()=>{g.rightDrawer=!1,K()})},Bt=e=>{We.value=e},_t=()=>{be()},Wt=()=>{ge()},Pt=t=>{var o,a;if(t===i["ViewClientType"].MOBILE){const e=null===(o=Be.value)||void 0===o?void 0:o.designerLayoutType;if(t===i["ViewClientType"].MOBILE&&[n["F"].TREE,n["F"].CASCADER].includes(e)){const t=e==n["F"].CASCADER?"级联":"树表";return void r["OioNotification"].warning(Object(i["translateValueByKey"])("移动端暂不支持配置"+t))}}null===(a=e.setViewClientType)||void 0===a||a.call(e,t),st(Q.value)},zt=()=>{e.goToPageHistoryList(e.layoutId)},Gt=()=>{e.goToViewDesignList()},{browserCopyAndNotify:Kt}=Object(i["useCopy"])(),qt=e=>{Kt(e.target.innerText)};return Object(a["onMounted"])(()=>{n["Hb"].pluck(n["ac"]).subscribe(e=>{Ke(e)}),Object(a["nextTick"])(()=>Ue(e.viewId,!0))}),Object(a["onUnmounted"])(()=>{}),Object(a["watch"])(()=>e.viewClientType,()=>{var t,o,r,a;if(e.viewClientType===i["ViewClientType"].MOBILE){if(ye.value){const e=n["X"].getInstance(),i=null===e||void 0===e?void 0:e.openKeys();if(null===i||void 0===i?void 0:i.length){const r=null===e||void 0===e?void 0:e.get(Object(v["a"])(i)),a=null===(o=null===(t=null===r||void 0===r?void 0:r.parent)||void 0===t?void 0:t.element)||void 0===o?void 0:o.properties[n["Dc"]];a&&(ye.value=!1)}}if(je.value){const e=n["L"].getInstance(),t=null===e||void 0===e?void 0:e.openKeys();if(null===t||void 0===t?void 0:t.length){const o=null===e||void 0===e?void 0:e.get(Object(v["a"])(t)),i=null===(a=null===(r=null===o||void 0===o?void 0:o.parent)||void 0===r?void 0:r.element)||void 0===a?void 0:a.properties[n["Dc"]];i&&(je.value=!1)}}}}),Object(n["jd"])(Object.assign(Object.assign({},Object(n["fd"])()),{viewClientType:Object(a["computed"])(()=>e.viewClientType),protocolVersion:Object(a["computed"])(()=>C.value),loadingState:Object(a["computed"])(()=>b.content),recomputeSpanOptions:qe,getContentContainerHTMLElement:()=>o.value,getContainerHTMLElement:()=>o.value})),ee({currentSelectedInstance:Object(a["computed"])(()=>Q.value),widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:we,copyDrawerWidgetInstance:Te,copyInnerPopupWidgetInstance:Ve,onSelectCurrentInstance:st,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M,PageDesignerMultiQueueEditor:re,designerCardShowStatus:Object(a["computed"])(()=>H.value||!q.value),changeDesignerCardShowStatus:ie}),{widgetSettingRef:t,designerContentRef:o,designerContentBodyRef:l,loading:b,visible:g,viewType:m,isReady:y,autoSaving:h,saveResult:f,designerData:me,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,WidgetScope:Fu,widgetCategoryGroup:D,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,isLeftDrawerAnchored:L,isRightDrawerAnchored:R,isShowMasterMask:B,isShowMenuDynamic:_,headerHeight:W,leftAreaWidth:P,designerContentLeftMargin:z,designerContentRightMargin:G,contentOtherWidth:U,showCardDesignOptions:Gg,isShowCardDesignVisible:q,isShowCardDesign:H,cardWidgetInstanceRoot:Y,switchCardDesign:ie,currentSelectedInstance:Q,lazySelectedInstance:X,hasSelectedInstance:te,isIconInstance:oe,originPageSettingData:Re,currentPageSettingData:Be,currentPageModule:_e,currentModule:We,currentModules:Pe,rightDrawerTitle:ze,onSelectInstance:st,onSettingChange:dt,onSwitchWidget:ut,onRemoveInstance:bt,onMoveInstance:gt,onModelWidgetLibChange:ht,onDeleteAction:ft,onSubmitMetadata:wt,rightDrawerHasFooter:Ge,onSelectedTab:Ot,onSaveView:Ct,onRegenerate:St,onMenuItemSelected:xt,onLeftDrawerOpened:It,onLeftDrawerClosed:Mt,onLeftDrawerAnchored:At,onRightDrawerAnchored:Ft,onRightDrawerOpened:Lt,onRightDrawerClosed:Rt,onModuleSelected:Bt,currentVersion:ae,allowCancelCurrentEdit:de,allowRecoverLastEdit:ue,onCancelEdit:_t,onRecoverEdit:Wt,onChangeViewClientType:Pt,onShowHistory:zt,gotoDesignerList:Gt,hasOpenModal:ye,isAllowOpenDesignerModal:he,isReadyOpenDesignerModal:fe,onOpenDesignerModal:Oe,hasOpenDrawer:je,isAllowOpenDesignerDrawer:ke,isReadyOpenDesignerDrawer:Ce,onOpenDesignerDrawer:De,hasOpenInnerPopup:$e,isAllowOpenDesignerInnerPopup:Ee,isReadyOpenDesignerInnerPopup:Se,onOpenDesignerInnerPopup:Ne,jumpViewActionDesignPage:Le,canDesignViewAction:Me,isAllowPreviewDesignerConfirm:xe,onOpenDesignerConfirm:Ie,onCopy:qt,STATIC_RESOURCE:{mobileSimulator:Object(n["tc"])("mobile_simulator.png")}}}}),Hm=()=>{Object(a["useCssVars"])(e=>({"1b33d064-designerContentLeftMargin":e.designerContentLeftMargin,"1b33d064-designerContentRightMargin":e.designerContentRightMargin,"1b33d064-leftAreaWidth":e.leftAreaWidth}))},Ym=qm.setup;qm.setup=Ym?(e,t)=>(Hm(),Ym(e,t)):Hm;const Qm={class:"chart-style-designer"},Jm={class:"chart-style-designer-content"},Xm={class:"chart-style-designer-main-content"},Zm={class:"designer-widget-aside designer-widget-aside-left"},ey={ref:"designerContentRef",class:"designer-content"},ty={class:"designer-main-content"},oy={key:1,class:"designer-content-body-empty"},iy=Object(a["createElementVNode"])("span",null,null,-1),ny={class:"designer-widget-aside designer-widget-aside-right"},ry={class:"designer-widget-aside-right-anchor-drawer-header"},ay=["title"],ly={key:1,class:"designer-widget-aside-right-anchor-drawer-header-widget"},sy={key:2},cy={class:"designer-widget-aside-right-anchor-drawer-header-data-name"},dy={key:0,class:"designer-properties-setting-form-button"},uy={key:0},py={key:1},by={key:2},gy={key:1,class:"designer-widget-not-selected"},vy=Object(a["createElementVNode"])("br",null,null,-1);function my(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-header"),s=Object(a["resolveComponent"])("draggable-widget"),c=Object(a["resolveComponent"])("designer-draggable"),d=Object(a["resolveComponent"])("anchor-drawer"),u=Object(a["resolveComponent"])("oio-tooltip-help"),p=Object(a["resolveComponent"])("oio-tooltip"),b=Object(a["resolveComponent"])("oio-button"),g=Object(a["resolveComponent"])("ui-icon-size-reset"),v=Object(a["resolveComponent"])("widget-setting"),m=Object(a["resolveComponent"])("oio-icon");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qm,[Object(a["createVNode"])(l,{"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"has-history-record":(e.currentHistoryCount||0)>0,disabled:!e.isReady,saveView:e.onSaveView,saving:e.autoSaving,"save-result":e.saveResult,onShowHistory:e.onShowHistory,onGotoDesignerList:e.gotoDesignerList},null,8,["origin-page-setting-data","current-page-setting-data","has-history-record","disabled","saveView","saving","save-result","onShowHistory","onGotoDesignerList"]),Object(a["createElementVNode"])("div",Jm,[Object(a["createElementVNode"])("div",Xm,[Object(a["createElementVNode"])("div",Zm,[Object(a["createVNode"])(s,{"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"origin-page-setting-data":e.originPageSettingData,"current-page-setting-data":e.currentPageSettingData,"model-widget-lib":e.modelWidgetLib,"current-model-widget-lib":e.currentModelWidgetLib,loading:e.loading.leftDrawer,"current-module":e.currentPageModule,visible:e.visible.leftDrawer,"current-design-data":e.widgetInstanceRoot,"current-focus-data":e.cardWidgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"current-selected-instance":e.currentSelectedInstance,"widget-scope":e.WidgetScope.PAGE,onOnOpened:e.onLeftDrawerOpened,onOnClosed:e.onLeftDrawerClosed,onOnAnchored:e.onLeftDrawerAnchored,onOnRegenerate:e.onRegenerate,onOnModelWidgetLibChange:e.onModelWidgetLibChange,onOnDeleteAction:e.onDeleteAction},null,8,["widget-category-group","widget-name-group","widget-type-group","origin-page-setting-data","current-page-setting-data","model-widget-lib","current-model-widget-lib","loading","current-module","visible","current-design-data","current-focus-data","is-focus-designer","current-selected-instance","widget-scope","onOnOpened","onOnClosed","onOnAnchored","onOnRegenerate","onOnModelWidgetLibChange","onOnDeleteAction"])]),Object(a["createElementVNode"])("div",ey,[Object(a["createElementVNode"])("div",ty,[(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["designer-content-body","oio-scrollbar",e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?"designer-content-body-pointer-events-none":""]),key:e.layoutId,ref:"designerContentBodyRef"},[e.visible.content?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,visible:!0,closable:!1,width:"440px",loading:e.loading.content},{header:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.currentPageSettingData.name||e.originPageSettingData.name),1)]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{data:e.widgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"focus-data":e.cardWidgetInstanceRoot,"current-selected":e.currentSelectedInstance,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:e.onSelectInstance,onSettingChange:e.onSettingChange,onSwitchWidget:e.onSwitchWidget,onMoveInstance:e.onMoveInstance,onRemoveInstance:e.onRemoveInstance},null,8,["data","is-focus-designer","focus-data","current-selected","widget-category-group","widget-name-group","widget-type-group","onSelectedChange","onSettingChange","onSwitchWidget","onMoveInstance","onRemoveInstance"])]),_:1},8,["loading"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",oy,[Object(a["createCommentVNode"])("当前菜单无页面，若需要页面，请对菜单进行页面绑定"),iy]))],2))])],512),Object(a["createElementVNode"])("div",ny,[Object(a["createVNode"])(d,{class:Object(a["normalizeClass"])([e.hasSelectedInstance?"":"designer-widget-not-selected-drawer"]),width:"440px",visible:e.visible.rightDrawer,"default-anchor":"","has-footer":e.rightDrawerHasFooter,loading:e.loading.rightDrawer,"anchor-class-name":"designer-widget-aside-absolute",onOnAnchored:e.onRightDrawerAnchored,onOnOpened:e.onRightDrawerOpened,onOnClosed:e.onRightDrawerClosed},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",ry,[e.rightDrawerTitle.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"designer-widget-aside-right-anchor-drawer-header-field",title:e.$translate(e.rightDrawerTitle.title)},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.title)),9,ay)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.widgetDisplayName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ly,Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.widgetDisplayName)),1)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",sy,[Object(a["createVNode"])(u,{content:e.rightDrawerTitle.help},null,8,["content"])])):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.dataName?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:3,title:e.rightDrawerTitle.dataName,placement:"bm"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",cy,[Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=(...t)=>e.onCopy&&e.onCopy(...t))},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.dataName)),1)])]),_:1},8,["title"])):Object(a["createCommentVNode"])("v-if",!0)])]),footer:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{type:"primary",onClick:e.onSubmitMetadata},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("保存")),1)]),_:1},8,["onClick"])]),default:Object(a["withCtx"])(()=>[e.hasSelectedInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(v,{key:0,ref:"widgetSettingRef","current-instance":e.currentSelectedInstance,"selected-tab":e.onSelectedTab},{propertiesSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"propertiesSettingForm"),e.isAllowPreviewDesignerConfirm||e.isAllowOpenDesignerModal||e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",dy,[e.isAllowPreviewDesignerConfirm?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",uy,[Object(a["createVNode"])(b,{type:"link",onClick:e.onOpenDesignerConfirm},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("预览二次确认")),1)]),_:1},8,["onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerModal?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",py,[Object(a["createVNode"])(b,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerModal,onClick:e.onOpenDesignerModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计弹窗")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",by,[Object(a["createVNode"])(b,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerDrawer,onClick:e.onOpenDesignerDrawer},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计抽屉")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0)])):Object(a["createCommentVNode"])("v-if",!0),e.isIconInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:1,"current-instance":e.currentSelectedInstance},null,8,["current-instance"])):Object(a["createCommentVNode"])("v-if",!0)]),metadataSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"metadataSettingForm")]),_:3},8,["current-instance","selected-tab"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",gy,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(m,{icon:"oinone-shuxingshezhikongyemian",size:"60px"}),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("请在左侧画布中选择组件"))+" ",1),vy,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("设置或查看其属性")),1)])]))]),_:3},8,["class","visible","has-footer","loading","onOnAnchored","onOnOpened","onOnClosed"])])])])])}qm.render=my,qm.__file="src/view/chart-style-designer/UiDataChartStyleDesigner.vue";let yy=class extends Gv{get layoutId(){return this.getDesignerManagementId()}get viewId(){return this.getDesignerId()}setViewId(e){this.setDesignerId(e)}setLayoutId(e){this.setDesignerManagementId(e)}initialize(e){return super.initialize(e),this.setComponent(qm),this}};Y([i["Widget"].Reactive(),i["Widget"].Provide(),Q("design:type",Object),Q("design:paramtypes",[])],yy.prototype,"layoutId",null),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],yy.prototype,"viewId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],yy.prototype,"setViewId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],yy.prototype,"setLayoutId",null),yy=Y([i["SPI"].ClassFactory(i["MaskWidget"].Token({widget:"UiDataChartStyleDesigner"}))],yy);var hy=Object(a["defineComponent"])({name:"FieldErrorBoundary",inheritAttrs:!1,components:{OioIcon:r["OioIcon"]},setup(){const e=Object(a["ref"])(!1),t=Object(a["ref"])();return Object(a["onErrorCaptured"])(o=>(console.error("组件渲染异常：",o),e.value=!0,t.value=o,!1)),{hasError:e}}});const fy={key:0,class:"empty-field field-error-boundary"},Oy={class:"empty-field-text"};function wy(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon");return e.hasError?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fy,[Object(a["createVNode"])(l,{icon:"oinone-tixing",size:"14px"}),Object(a["createElementVNode"])("span",Oy,Object(a["toDisplayString"])(e.$translate("组件渲染异常：可在控制台查看具体报错信息")),1)])):Object(a["renderSlot"])(e.$slots,"default",{key:1})}function jy(e){n["R"].isModal(e).result||(e.element.properties&&delete e.element.properties.layout,e.children.forEach(e=>jy(e)))}function ky(e){const t=Object(a["computed"])(()=>e),{layout:o}=Object(n["gd"])(),r=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>e.layout).map(e=>i["FormLayout"][e.toUpperCase()]).orElse(o.value));Object(n["kd"])({layout:r});const l=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>e.label).orElseGet(()=>i["Optional"].ofNullable(t.value).map(e=>e.element).map(e=>e.widgetData).map(e=>e.displayName||e.name).orElse(""))),c=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>i["BooleanHelper"].toBoolean(e.required)).orElse(!1)),d=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>e.hint).orElse(void 0)),u=Object(a["computed"])(()=>{var e,o;const r=i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>e.labelInvisible).orElse(void 0);return null!=r?r:!(null===(o=null===(e=t.value)||void 0===e?void 0:e.element)||void 0===o?void 0:o.initialization)||Object(s["a"])(l.value)&&i["Optional"].ofNullable(t.value).map(e=>e.currentWidget).map(e=>e.widgetName).map(e=>n["db"].includes(e)).orElse(!1)}),p=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>e.level).map(e=>10*e-1).orElse(0)),b=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).map(e=>n["R"].fetchProperties(e)).map(e=>i["BooleanHelper"].toBoolean(e.invisible)).orElse(void 0));Object(a["watch"])(()=>{var e,o,i;return null===(i=null===(o=null===(e=t.value)||void 0===e?void 0:e.element)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.layout},()=>{var e;null===(e=t.value)||void 0===e||e.children.forEach(e=>jy(e))});const g=()=>{const t=e;if(!t)return;const o=n["R"].fetchOptions(t);o.title=i["CastHelper"].cast(Object(a["computed"])(()=>{var e;return l.value||(null===t||void 0===t?void 0:t.element.title)||(null===(e=null===t||void 0===t?void 0:t.currentWidget)||void 0===e?void 0:e.widgetDisplayName)||Object(i["translateValueByKey"])("模型字段")})),o.normalMaskStyle=i["CastHelper"].cast(Object(a["computed"])(()=>{const e=Object.assign({},n["Rb"]);return d.value?(e.height="calc(100% + 28px)",e.borderBottomWidth="20px"):e.borderBottomWidth="8px",e}))};return Object(n["md"])(g),{label:l,required:c,hint:d,hideLabel:u,zIndex:p,invisible:b,layout:r}}hy.render=wy,hy.__file="src/view/component/designer-draggable/component/element/error-boundary/FieldErrorBoundary.vue";var Cy=Object(a["defineComponent"])({name:"EmptyField",props:{errorMessage:{type:String}},components:{OioIcon:r["OioIcon"]},setup(){const e=Object(n["gd"])().layout;return{layout:e}}});const Dy={class:"empty-field-text"};function Ty(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["empty-field",e.layout])},[Object(a["createVNode"])(l,{icon:"oinone-tixing",size:"14px"}),Object(a["createElementVNode"])("span",Dy,[e.errorMessage?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.errorMessage),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("未设置字段")),1)],64))])],2)}function $y(e){let t=[];return t=Array.isArray(e.DesignerComponent)?e.DesignerComponent:Object(a["isVNode"])(e.DesignerComponent)?[e.DesignerComponent]:[Object(a["createVNode"])(e.DesignerComponent,Object(n["Pb"])(e.instance))],t.forEach(t=>{var o;t.props=Object.assign(Object.assign({},null!==(o=t.props)&&void 0!==o?o:{}),{rootViewType:e.rootViewType})}),Object(a["createVNode"])("div",{class:["simple-field-merge-aside",e.invisible&&"simple-field-merge-aside-invisible",e.hideLabel&&"simple-field-merge-aside-label-hide","simple-field-merge-aside-"+e.layout]},[Object(a["createVNode"])("div",{class:["simple-field-merge-aside-label",e.required&&"simple-field-merge-aside-label-required"]},[Object(a["createVNode"])("div",{class:["simple-field-merge-aside-label-content"],title:e.label},e.label)]),Object(a["createVNode"])("div",{class:["simple-field-merge-aside-content",e.contentWrapper]},t),e.hint?Object(a["createVNode"])("div",{class:["simple-field-merge-aside","simple-field-merge-hint","simple-field-merge-aside-"+e.layout]},[Object(a["createVNode"])("div",{class:["simple-field-merge-aside-label",e.hideLabel?"simple-field-merge-aside-label-hide":""]}),Object(a["createVNode"])("div",{class:"simple-field-merge-hint-content",title:e.hint},e.hint)]):null])}function Ey(e){return Object(a["createVNode"])("div",{class:["simple-card-merge-field",e.label?"":"simple-card-merge-field-hide-label"]},[Object(a["createVNode"])("div",{class:["simple-card-merge-field-aside","simple-card-merge-field-aside-"+e.layout,e.invisible?"simple-card-merge-field-aside-invisible":""]},[e.label?Object(a["createVNode"])("div",{class:"simple-card-merge-field-aside-label",title:e.label},e.label):null,Object(a["createVNode"])("div",{class:["simple-card-merge-field-aside-content",e.contentWrapper]},Object(a["isVNode"])(e.DesignerComponent)?e.DesignerComponent:[Object(a["createVNode"])(e.DesignerComponent,Object(n["Pb"])(e.instance))])])])}function Sy(e){return Object(a["createVNode"])(Cy,{errorMessage:e})}function Ny(e){const{isCard:t}=Object(n["ed"])(),o=Object(a["computed"])(()=>e),r=Object(a["computed"])(()=>Object(n["jc"])(o.value.id)),l=Object(a["computed"])(()=>o.value.element.widgetData),s=Object(a["computed"])(()=>o.value.currentWidget),c=Object(a["computed"])(()=>{const e=i["CastHelper"].cast(s.value.viewType),t={viewType:e,ttype:s.value.widgetSubtype,multi:l.value.multi,widget:s.value.widgetName},o=i["BaseFieldWidget"].Selector(t);return o}),d=Object(a["computed"])(()=>{if(!l.value)return Sy();if(!c.value)return Sy(Object(i["translateValueByKey"])("无法正确获取组件"));const e=(new i["VueWidget"]).createWidget(c.value,s.value.widgetName,{field:l,ttype:s.value.widgetSubtype,viewType:i["ViewType"].Form,path:l.value.name});return e}),u=Object(a["computed"])(()=>d.value instanceof i["BaseFieldWidget"]?d.value.getComponent():d.value),p=e=>l.value&&c.value?t.value?Ey(e):$y(e):d.value;return{finalComponent:u,instanceId:r,createFieldItem:p}}Cy.render=Ty,Cy.__file="src/view/component/designer-draggable/component/element/field/EmptyField.vue";var Vy,xy=Object(a["defineComponent"])({name:"DesignerField",components:{DesignerDraggableItem:n["w"],FieldErrorBoundary:hy},props:Object.assign(Object.assign({},n["v"]),{currentInstance:{type:Object,required:!0}}),setup(e){const t=Object(a["computed"])(()=>e.currentInstance),o=Ny(t.value),r=ky(t.value),l=Object(a["computed"])(()=>o.instanceId.value),s=Object(a["computed"])(()=>i["Optional"].ofNullable(t.value).filter(e=>e.element.initialization).map(e=>{var t;const{isContainerWidget:o}=e.element;if(null==o){const o=null===(t=e.currentWidget)||void 0===t?void 0:t.widgetName;return!!o&&n["db"].includes(o)}return o}).orElse(!1)),c=Object(a["computed"])(()=>s.value?u():p()),d=()=>{var e,o;return{label:r.label.value,required:r.required.value,hint:r.hint.value,hideLabel:r.hideLabel.value,zIndex:r.zIndex.value,invisible:r.invisible.value,layout:r.layout.value,rootViewType:null===(o=null===(e=t.value.superRoot)||void 0===e?void 0:e.element)||void 0===o?void 0:o.subtype}},u=()=>{const i=t.value.children.map((t,o)=>Object(a["createVNode"])(n["w"],{key:t.key,currentIndex:o,currentInstance:t,widgetCategoryGroup:e.widgetCategoryGroup,widgetNameGroup:e.widgetNameGroup,widgetTypeGroup:e.widgetTypeGroup}));return o.createFieldItem(Object.assign(Object.assign({},d()),{contentWrapper:"designer-relation-field-aside-content",DesignerComponent:i}))},p=()=>o.createFieldItem(Object.assign(Object.assign({},d()),{instance:t.value,DesignerComponent:o.finalComponent.value}));return{instanceId:l,isRelationWidget:s,renderComponent:Object(a["toRaw"])(c)}}});function Iy(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("field-error-boundary");return Object(a["openBlock"])(),Object(a["createBlock"])(l,null,{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(),Object(a["createBlock"])(Object(a["resolveDynamicComponent"])(e.renderComponent),{id:e.instanceId,class:"designer-field"},null,8,["id"]))]),_:1})}function My(){return!0}function Ay(e,t){let o=!1;const r=null===t||void 0===t?void 0:t.element.subtype;if(r&&[n["A"].ROW_ACTIONS,n["A"].ROW_ACTIONS_WIDGET].includes(r)){const t=e.widgetData;o=!t||("SharedPageViewAction"===t.name||[i["ActionContextType"].Single,i["ActionContextType"].SingleAndBatch].includes(t.contextType))}return o}function Fy(e,t,o){return Ay(e,o)}function Ly(e,t,o){return(null===o||void 0===o?void 0:o.element.subtype)===n["A"].FOOTER}function Ry(e,t,o){return Ay(e,o)}function By(e,t,o){return Ay(e,o)}function _y(e,t,o){return Ay(e,o)}function Wy(e,t,o){let n;const r=e.widgetData;return n=!r||[i["ActionContextType"].Single,i["ActionContextType"].SingleAndBatch].includes(r.contextType),n}function Py(e,t){const o=e.element.subtype;return!!o&&(![n["A"].ROW,n["A"].BLOCK].includes(o)||e.options.cols-Object(a["unref"])(e.options.spanTotal)>=t)}function zy(e,t,o){let r=!1;const a=Object(n["rc"])(t);return a&&(r=[n["Bb"].TABLE,n["Bb"].FORM,n["Bb"].DETAIL,n["Bb"].SEARCH,n["Bb"].GALLERY].includes(a),r||i["Optional"].ofNullable(t.superRoot).map(e=>e.element).map(e=>e.bizType===n["B"].FIELD).orElse(!1)&&(r=[n["Bb"].FORM,n["Bb"].DETAIL].includes(a))),r}function Gy(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return i===n["A"].DEFAULT&&zy(e,t)}function Uy(e,t,o){return Py(t,e.currentWidget.widgetSpan)&&zy(e,t)}function Ky(){return!1}function qy(){return!1}function Hy(e,t,o){return!((null===o||void 0===o?void 0:o.element.subtype)===n["A"].FOOTER)&&zy(e,t)}function Yy(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return!!i&&[n["A"].TITLE,n["A"].CONTENT].includes(i)}function Qy(e,t,o){let i=!1;const r=Object(n["rc"])(t);return r&&(i=[n["Bb"].FORM,n["Bb"].DETAIL].includes(r)),i}function Jy(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;if(i!==n["A"].DEFAULT)return!1;let r=!1;const a=Object(n["rc"])(t);if(a){const{widgetBizType:t,widgetSubtype:o}=e.currentWidget;switch(t){case n["B"].ELEMENT:switch(o){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:r=!0;break}break}}return r}function Xy(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return i===n["A"].DEFAULT&&Qy(e,t)}function Zy(e,t,o){return e.targetInstance.element.bizType===n["B"].ACTION}function eh(e,t,o){return Py(t,e.currentWidget.widgetSpan)&&Qy(e,t)}function th(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return!(!i||![n["A"].CONTENT].includes(i))}function oh(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return i===n["A"].DEFAULT&&Qy(e,t)}function ih(e,t,o){const i=null===o||void 0===o?void 0:o.element.subtype;return i===n["A"].DEFAULT&&Qy(e,t)}xy.render=Iy,xy.__file="src/view/component/designer-draggable/component/element/DesignerField.vue",n["q"].register(""+n["B"].FIELD,xy),n["q"].register(""+n["B"].VIEW,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec155d7").then(o.bind(null,"a387")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].FORM}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec155d7").then(o.bind(null,"a387")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DETAIL}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec155d7").then(o.bind(null,"a387")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].SEARCH}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec155d7").then(o.bind(null,"a387")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TABLE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-4df32610").then(o.bind(null,"7114")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].FORM}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec36900").then(o.bind(null,"dbea")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DETAIL}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-d45cca30").then(o.bind(null,"1eb2")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].SEARCH}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0a3fbb").then(o.bind(null,"0500")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].GALLERY}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-a82231aa").then(o.bind(null,"a177")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].ACTION_BAR}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d207971").then(o.bind(null,"a0d0")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TREE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0aa783").then(o.bind(null,"10c1")))),n["q"].register(`${n["A"].TREE}#${n["A"].ROW_ACTIONS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0e186e").then(o.bind(null,"7b8e")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CARD}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0ae538").then(o.bind(null,"0a1b")))),n["q"].register(`${n["A"].CARD}#${n["A"].TITLE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-523444f8").then(o.bind(null,"15c3")))),n["q"].register(`${n["A"].CARD}#${n["A"].CONTENT}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-45adc880").then(o.bind(null,"4e94")))),n["q"].register(`${n["A"].CARD}#${n["A"].ROW_ACTIONS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d2222ff").then(o.bind(null,"ce18")))),n["q"].register(`${n["A"].CARD}#${n["A"].TITLE_TOOLBAR}`,n["q"].fetchFragment()),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CARD_CASCADER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d21eef9").then(o.bind(null,"d84c")))),n["q"].register(`${n["A"].CARD_CASCADER}#${n["A"].ROW_ACTIONS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0a3738").then(o.bind(null,"01de")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DROPDOWN}`,Object(a["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-2d230b9b"),o.e("chunk-2d0af2ea")]).then(o.bind(null,"0cde")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TOOLBAR_DROPDOWN}`,Object(a["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-2d230b9b"),o.e("chunk-2d0b1e05")]).then(o.bind(null,"225d")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATETIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-aab93fce").then(o.bind(null,"9a1c4")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATE_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-b215a8f4").then(o.bind(null,"882b")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-f71544ec").then(o.bind(null,"5306")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].YEAR_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-f717154e").then(o.bind(null,"333f")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].FLOAT_PLAT}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d2169d9").then(o.bind(null,"c2e9")))),n["q"].register(`${n["B"].PACK}#${n["A"].ROW}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-746df6ae").then(o.bind(null,"2a443")))),n["q"].register(`${n["B"].PACK}#${n["A"].COL}`,n["q"].fetchFragment()),n["q"].register(`${n["B"].PACK}#${n["A"].BLOCK}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-746df6ae").then(o.bind(null,"2a443")))),n["q"].register(`${n["B"].PACK}#${n["A"].GROUP}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ec3662a").then(o.bind(null,"dc05")))),n["q"].register(`${n["B"].PACK}#${n["A"].TABS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7eac88cb").then(o.bind(null,"39dc")))),n["q"].register(`${n["B"].PACK}#${n["A"].TAB}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7ead18b5").then(o.bind(null,"3a23")))),n["q"].register(`${n["B"].PACK}#${n["A"].COLLAPSE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-34fb6ef6").then(o.bind(null,"d93e")))),n["q"].register(`${n["B"].PACK}#${n["A"].COLLAPSE_PANEL}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-0c4378ac").then(o.bind(null,"9bb9")))),n["q"].register(`${n["B"].PACK}#${n["A"].CONTAINERS}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-0a975c17").then(o.bind(null,"f0b7")))),n["q"].register(`${n["B"].PACK}#${n["A"].CONTAINER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-5451fe82").then(o.bind(null,"a95d")))),n["q"].register(`${n["B"].PACK}#${n["A"].MODAL}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-7cc1f63a").then(o.bind(null,"b9b6")))),n["q"].register(`${n["A"].MODAL}#${n["A"].FOOTER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0bd39b").then(o.bind(null,"2aa7")))),n["q"].register(`${n["B"].PACK}#${n["A"].DRAWER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-12126010").then(o.bind(null,"d631")))),n["q"].register(`${n["A"].DRAWER}#${n["A"].FOOTER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d20734a").then(o.bind(null,"a016")))),n["q"].register(`${n["B"].PACK}#${n["A"].INNER_POPUP}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-4043807f").then(o.bind(null,"4d54")))),n["q"].register(`${n["A"].INNER_POPUP}#${n["A"].FOOTER}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0c46cf").then(o.bind(null,"3b7a")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CHART}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-d553ac6e").then(o.bind(null,"717e")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].REPORT}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-d553ac6e").then(o.bind(null,"717e")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATA_DASHBOARD}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-d553ac6e").then(o.bind(null,"717e")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].PARAGRAPH}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d22ce83").then(o.bind(null,"f4dc")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TEXT_INFO}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0b3a10").then(o.bind(null,"28d8")))),n["q"].register(`${n["B"].FIELD}#${n["A"].DATETIME_COUNTDOWN}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0c77dd").then(o.bind(null,"519d")))),n["q"].register(`${n["B"].FIELD}#${n["A"].DATE_COUNTDOWN}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0c77dd").then(o.bind(null,"519d")))),n["q"].register(""+n["B"].ACTION,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d230b9b").then(o.bind(null,"ee05")))),n["q"].register(`${n["A"].TABLE}#${n["B"].FIELD}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-2d0cbcb0").then(o.bind(null,"4ad1")))),n["q"].register(`${n["A"].TABLE}#${n["A"].DATETIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-1b466951").then(o.bind(null,"ba58")))),n["q"].register(`${n["A"].TABLE}#${n["A"].DATE_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-1b466951").then(o.bind(null,"ba58")))),n["q"].register(`${n["A"].TABLE}#${n["A"].TIME_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-1b466951").then(o.bind(null,"ba58")))),n["q"].register(`${n["A"].TABLE}#${n["A"].YEAR_RANGE}`,Object(a["defineAsyncComponent"])(()=>o.e("chunk-1b466951").then(o.bind(null,"ba58")))),Object(n["Vc"])(n["B"].PACK,n["A"].MODAL,Ly),Object(n["Vc"])(n["B"].PACK,n["A"].DRAWER,Ly),Object(n["Vc"])(n["B"].PACK,n["A"].INNER_POPUP,Ly),Object(n["Vc"])(n["B"].ELEMENT,n["A"].ACTION_BAR,My),Object(n["Vc"])(n["B"].ELEMENT,n["A"].ROW_ACTIONS_WIDGET,Ay),Object(n["Vc"])(n["B"].ELEMENT,n["A"].TABLE,Fy),Object(n["Vc"])(n["B"].ELEMENT,n["A"].CARD,Ry),Object(n["Vc"])(n["B"].ELEMENT,n["A"].CARD_CASCADER,_y),Object(n["Vc"])(n["B"].ELEMENT,n["A"].TREE,By),Object(n["Vc"])(n["B"].ELEMENT,n["A"].DROPDOWN,Wy),Object(n["Vc"])(n["B"].ELEMENT,n["A"].TOOLBAR_DROPDOWN,Wy),Object(n["Wc"])(n["B"].PACK,void 0,zy),Object(n["Wc"])(n["B"].ELEMENT,void 0,zy),Object(n["Wc"])(n["B"].PACK,n["A"].ROW,Uy),Object(n["Wc"])(n["B"].PACK,n["A"].BLOCK,Uy),Object(n["Wc"])(n["B"].PACK,n["A"].MODAL,Hy),Object(n["Wc"])(n["B"].PACK,n["A"].DRAWER,Hy),Object(n["Wc"])(n["B"].PACK,n["A"].INNER_POPUP,Hy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].TABLE,Gy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].FORM,Gy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].DETAIL,Gy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].SEARCH,Gy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].ACTION_BAR,Ky),Object(n["Wc"])(n["B"].ELEMENT,n["A"].ROW_ACTIONS_WIDGET,Ky),Object(n["Wc"])(n["B"].ELEMENT,n["A"].DROPDOWN,qy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].TOOLBAR_DROPDOWN,qy),Object(n["Wc"])(n["B"].ELEMENT,n["A"].CARD,Yy),Object(n["Xc"])(n["B"].PACK,void 0,Qy),Object(n["Xc"])(n["B"].ELEMENT,void 0,Qy),Object(n["Xc"])(n["B"].PACK,n["A"].ROW,eh),Object(n["Xc"])(n["B"].PACK,n["A"].BLOCK,eh),Object(n["Xc"])(n["B"].ELEMENT,n["A"].TABLE,Jy),Object(n["Xc"])(n["B"].ELEMENT,n["A"].FORM,Xy),Object(n["Xc"])(n["B"].ELEMENT,n["A"].DETAIL,Xy),Object(n["Xc"])(n["B"].ELEMENT,n["A"].ACTION_BAR,Zy),Object(n["Xc"])(n["B"].ELEMENT,n["A"].CARD,th),Object(n["Xc"])(n["B"].PACK,n["A"].MODAL,oh),Object(n["Xc"])(n["B"].ELEMENT,n["A"].MODAL,oh),Object(n["Xc"])(n["B"].PACK,n["A"].DRAWER,ih),Object(n["Xc"])(n["B"].ELEMENT,n["A"].DRAWER,ih),Object(n["Xc"])(n["B"].PACK,n["A"].INNER_POPUP,ih),function(e){e["WIDGET_LIB"]="WIDGET_LIB",e["DESIGN_STRUCTURE"]="DESIGN_STRUCTURE"}(Vy||(Vy={}));const nh=[{id:Vy.WIDGET_LIB,title:"组件库",icon:"iconfont oinone-zujianku"},{id:Vy.DESIGN_STRUCTURE,title:"设计大纲",icon:"iconfont oinone-shejidagang"}];var rh=Object(a["defineComponent"])({name:"DraggableWidget",components:{ButtonSelect:tp,AnchorDrawer:n["d"],WidgetLib:Qb,UiDesignStructureTree:jp},props:Object.assign(Object.assign({},n["I"]),{originComponentInstanceSettingData:{type:Object,required:!0},currentComponentInstanceSettingData:{type:Object,required:!0},modelWidgetLib:{type:Object,required:!0},currentModelWidgetLib:{type:Object,required:!0},loading:{type:Boolean,default:!1},currentModule:{type:String,required:!0},visible:{type:Boolean},currentDesignData:{type:Object},currentFocusData:{type:Object},isFocusDesigner:{type:Boolean,default:void 0},currentSelectedInstance:{type:Object},widgetScope:{type:String}}),emits:["onOpened","onClosed","onAnchored","onModelWidgetLibChange","onDeleteAction"],setup(e,t){const{lazySelectedInstance:o}=Object(n["hd"])(),r=nh.map(e=>Object.assign(Object.assign({},e),{title:Object(i["translateValueByKey"])(e.title)})),l=Object(a["ref"])(r[0].id),s=Object(a["ref"])(r[0].title),c=Object(a["ref"])(!0),d=Object(a["ref"])(Pp.CARD),u=()=>{l.value="";const t=e.currentComponentInstanceSettingData.name;t||(e.currentComponentInstanceSettingData.name=e.originComponentInstanceSettingData.name)},p=()=>{u(),t.emit("onClosed")},b=e=>{t.emit("onAnchored",e)},g=e=>{s.value=e.title,c.value||(c.value=!0,t.emit("onOpened"))},v=e=>{t.emit("onModelWidgetLibChange",e)},m=e=>{t.emit("onDeleteAction",e)};return Object(a["watch"])(()=>e.visible,e=>{c.value?e||u():e&&(l.value=r[0].id),c.value=e}),{ButtonSelectMode:Xu,SettingSelectOption:Vy,settingSelectData:r,activeSettingKey:l,drawerTitle:s,drawerVisible:c,lazySelectedInstance:o,widgetLibDisplayMode:d,onClosed:p,onAnchored:b,settingSelectedCallback:g,onModelWidgetLibChange:v,onDeleteAction:m}}});const ah={class:"designer-draggable-widget"},lh={class:"drawer-draggable-setting-select"},sh={key:2};function ch(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("button-select"),s=Object(a["resolveComponent"])("widget-lib"),c=Object(a["resolveComponent"])("ui-design-structure-tree"),d=Object(a["resolveComponent"])("anchor-drawer");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ah,[Object(a["createElementVNode"])("div",lh,[Object(a["createVNode"])(l,{mode:e.ButtonSelectMode.ICON,options:e.settingSelectData,"label-key":"icon",activeKey:e.activeSettingKey,"onUpdate:activeKey":t[0]||(t[0]=t=>e.activeSettingKey=t),customItemClass:"drawer-draggable-setting-select-item",buttonStyle:"solid",onOnSelected:e.settingSelectedCallback},null,8,["mode","options","activeKey","onOnSelected"])]),Object(a["createVNode"])(d,{width:"322px",title:e.drawerTitle,visible:e.drawerVisible,"onUpdate:visible":t[1]||(t[1]=t=>e.drawerVisible=t),loading:e.loading,"anchor-class-name":"drawer-draggable-content-absolute","default-anchor":"",onOnClosed:e.onClosed,onOnAnchored:e.onAnchored},{default:Object(a["withCtx"])(()=>[e.activeSettingKey===e.SettingSelectOption.WIDGET_LIB?(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:0,"widget-scope":e.widgetScope,"root-data":e.currentDesignData,"focus-data":e.currentFocusData,"is-focus-designer":e.isFocusDesigner,"display-mode":e.widgetLibDisplayMode,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"model-widget-lib":e.modelWidgetLib,"current-model-widget-lib":e.currentModelWidgetLib,onOnModelWidgetLibChange:e.onModelWidgetLibChange,onOnDeleteAction:e.onDeleteAction},null,8,["widget-scope","root-data","focus-data","is-focus-designer","display-mode","widget-category-group","widget-name-group","widget-type-group","model-widget-lib","current-model-widget-lib","onOnModelWidgetLibChange","onOnDeleteAction"])):e.activeSettingKey===e.SettingSelectOption.DESIGN_STRUCTURE?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:1,"current-design-data":e.currentDesignData,"current-selected-instance":e.lazySelectedInstance},null,8,["current-design-data","current-selected-instance"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",sh,Object(a["toDisplayString"])(e.activeSettingKey),1))]),_:1},8,["title","visible","loading","onOnClosed","onOnAnchored"])])}rh.render=ch,rh.__file="src/view/component-designer/component/draggable-widget/draggable-widget.vue";var dh=Object(a["defineComponent"])({name:"ComponentDesignerHeader",components:{DesignerCommonHeader:n["o"],OioButton:r["OioButton"],OioDivider:r["OioDivider"]},props:Object.assign(Object.assign({},n["p"]),{originComponentInstanceSettingData:{type:Object,required:!0},currentComponentInstanceSettingData:{type:Object,required:!0},hasHistoryRecord:{type:Boolean,default:!1},publish:{type:Function},disabled:{type:Boolean,default:!1}}),emits:["goBack","cancelEdit","recoverEdit","goHistory"],setup(e,t){const o=Object(a["ref"])({save:!1}),i=Object(a["computed"])(()=>{var t,o;return(null===(t=e.currentComponentInstanceSettingData)||void 0===t?void 0:t.name)||(null===(o=e.originComponentInstanceSettingData)||void 0===o?void 0:o.name)}),n=()=>{t.emit("goBack")},r=()=>J(this,void 0,void 0,(function*(){var t;if(!e.disabled){o.value.save=!0;try{yield null===(t=e.publish)||void 0===t?void 0:t.call(e)}finally{o.value.save=!1}}})),l=e=>{t.emit("cancelEdit",e)},s=e=>{t.emit("recoverEdit",e)},c=e=>{t.emit("goHistory",e)};return{loading:o,title:i,onGoBack:n,onCancelEdit:l,onRecoverEdit:s,onShowHistory:c,onPublish:r}}});const uh={class:"designer-layout-header-toolbar"};function ph(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-button"),s=Object(a["resolveComponent"])("oio-divider"),c=Object(a["resolveComponent"])("designer-common-header");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{class:"page-designer-header",title:e.title,saving:e.saving,"save-result":e.saveResult,onGoBack:e.onGoBack},{toolbar:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",uh,[Object(a["createCommentVNode"])("              <oio-button"),Object(a["createCommentVNode"])('                type="link"'),Object(a["createCommentVNode"])('                icon="oinone-houtui"'),Object(a["createCommentVNode"])('                title="撤销(ctrl + z)"'),Object(a["createCommentVNode"])('                :icon-color="'),Object(a["createCommentVNode"])("                  disabled || !allowCancelCurrentEdit ? 'var(&#45;&#45;oio-disabled-color)' : 'var(&#45;&#45;oio-text-color-secondary)'"),Object(a["createCommentVNode"])('                "'),Object(a["createCommentVNode"])('                :disabled="disabled || !allowCancelCurrentEdit"'),Object(a["createCommentVNode"])('                @click="onCancelEdit"'),Object(a["createCommentVNode"])("              />"),Object(a["createCommentVNode"])("              <oio-button"),Object(a["createCommentVNode"])('                type="link"'),Object(a["createCommentVNode"])('                icon="oinone-qianjin"'),Object(a["createCommentVNode"])('                title="恢复(ctrl + shift + z)"'),Object(a["createCommentVNode"])('                :icon-color="'),Object(a["createCommentVNode"])("                  disabled || !allowRecoverLastEdit ? 'var(&#45;&#45;oio-disabled-color)' : 'var(&#45;&#45;oio-text-color-secondary)'"),Object(a["createCommentVNode"])('                "'),Object(a["createCommentVNode"])('                :disabled="disabled || !allowRecoverLastEdit"'),Object(a["createCommentVNode"])('                @click="onRecoverEdit"'),Object(a["createCommentVNode"])("              />"),Object(a["createVNode"])(l,{type:"link",icon:"oinone-lishibanben",title:e.$translate("查看历史版本"),disabled:e.disabled||!e.hasHistoryRecord,onClick:e.onShowHistory},null,8,["title","disabled","onClick"])]),Object(a["createVNode"])(s,{type:"vertical",style:{"margin-right":"24px"}}),Object(a["createVNode"])(l,{type:"primary",loading:e.loading.save,disabled:e.disabled,icon:"oinone-fabu",onClick:Object(a["withModifiers"])(e.onPublish,["stop"])},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("发布")),1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["title","saving","save-result","onGoBack"])}dh.render=ph,dh.__file="src/view/component-designer/component/header/header.vue";const bh=i["HttpClient"].getInstance(),gh="{\n        id\n        fields{\n          id\n          name\n          displayName\n          ttype\n          relatedTtype\n          invisible\n          model\n          references\n          multi\n          store\n          sys\n          systemSource\n          ttypeDisplayName\n          relationStore\n          options{\n            name\n            value\n            displayName\n          }\n          icon\n        }\n        viewActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n          resModel\n        }\n        serverActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n        }\n        urlActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n        }\n        clientActions {\n          name\n          model\n          actionType\n          displayName\n          contextType\n          actionDesignerType\n          icon\n        }\n        modelDefinition {\n          model\n          displayName\n        }\n        modelDefinitions {\n          model\n          displayName\n        }\n        widget {\n          id\n          definitionName\n          displayName\n          name\n        }\n        widgetInstances {\n          viewType\n          widgetAttrFormViewDesign {\n            id\n            designerJson\n            errorJsonPaths\n            errorWidgetJsonPaths\n            protocolVersion\n          }\n        }\n      }\n   }\n }",vh=e=>J(void 0,void 0,void 0,(function*(){const t=`query {\n    uiDesignerViewLayoutProxyQuery {\n      queryByWidget ( request: { widget: { id: "${e}" } } )\n      ${gh}`,o=yield bh.query(n["jb"],t);return o.data.uiDesignerViewLayoutProxyQuery.queryByWidget}));function mh(e,t){return e.designerData?`{\n  widgetAttrFormViewDesign: {\n    id: "${e.id}"\n    designerJson: ${e.designerJson}\n    models: ${i["GraphqlHelper"].serializableStringArray(t)}\n  }\n}`:""}const yh=(e,t,o)=>J(void 0,void 0,void 0,(function*(){const i=`mutation {\n\tuiDesignerViewLayoutProxyMutation {\n\t\tsaveView4Widget (\n\t\t\trequest: {\n\t\t\t  widget: { id: "${e}" }\n\t\t\t  widgetInstances: [${o.map(e=>mh(e,t)).filter(e=>!!e).join(", ")}]\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t}\n\t}\n}\n`,r=yield bh.mutate(n["jb"],i);return r.data.uiDesignerViewLayoutProxyMutation.saveView4Widget})),hh=(e,t,o)=>J(void 0,void 0,void 0,(function*(){const i=`mutation {\n  uiDesignerWidgetProxy4CustomMutation {\n    copyAttrForm(\n      data: {\n        id: "${e}"\n        copiedViewType: ${t}\n        viewTypes: [${o}]\n      }\n    ) {\n      widgetInstanceProxyList {\n        widgetAttrFormViewDesign {\n          id\n          designerJson\n        }\n        viewType\n      }\n    }\n  }\n}\n`,r=yield bh.mutate(n["jb"],i);return r.data.uiDesignerWidgetProxy4CustomMutation.copyAttrForm}));var fh=Object(a["defineComponent"])({name:"ComponentDesignerCopyAction",components:{OioIcon:r["OioIcon"],OioModal:r["OioModal"],OioForm:r["OioForm"],OioFormItem:r["OioFormItem"],ASelect:f["c"],ASelectOption:f["b"]},inheritAttrs:!1,props:{widgetId:{type:String},existViewTypeOptions:{type:Array,default:()=>[]},currentSelectedViewType:{type:String},initDesigner:{type:Function}},setup(e){const t=Object(a["ref"])(!1),o=e=>{t.value=e},r=Object(a["ref"])([]),l=Object(a["computed"])(()=>e.existViewTypeOptions.filter(t=>t.key!==e.currentSelectedViewType)),s=()=>{t.value=!1,r.value=[]},c=()=>J(this,void 0,void 0,(function*(){t.value=!1,yield hh(e.widgetId,e.currentSelectedViewType,r.value),r.value=[],e.initDesigner&&e.initDesigner(e.widgetId)}));return{selectedViewTypes:r,copyModalVisible:t,changeCopyModalVisible:o,viewTypeOptions:l,modalCancel:s,modalConfirm:c,BASIC_POPUP_Z_INDEX:n["e"],FormLayout:i["FormLayout"],DEFAULT_BRAND_LOGO:i["DEFAULT_BRAND_LOGO"]}}});const Oh={class:"component-designer-content-copy-area"},wh={class:"component-designer-content-copy-area-icon"},jh={class:"form-multi-select"},kh={style:{color:"var(--oio-error-color)"}};function Ch(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-icon"),s=Object(a["resolveComponent"])("a-select-option"),c=Object(a["resolveComponent"])("a-select"),d=Object(a["resolveComponent"])("oio-form-item"),u=Object(a["resolveComponent"])("oio-form"),p=Object(a["resolveComponent"])("oio-modal");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Oh,[Object(a["createElementVNode"])("div",wh,[Object(a["createVNode"])(l,{icon:"oinone-fuzhi",size:"24",color:"#F3F7FA",onClick:t[0]||(t[0]=t=>e.changeCopyModalVisible(!0))})]),Object(a["createVNode"])(p,{title:"复制属性面板",width:"600px",height:"30%",forceRender:!0,visible:e.copyModalVisible,"cancel-callback":e.modalCancel,"enter-callback":e.modalConfirm},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{layout:e.FormLayout.VERTICAL},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{label:e.$translate("页面类型")},{help:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",kh,Object(a["toDisplayString"])(e.$translate("当前属性面板属性复制到选中的属性面板中，将覆盖原属性设置")),1)]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",jh,[Object(a["createVNode"])(c,{mode:"multiple",placeholder:e.$translate("页面类型"),dropdownClassName:"oio-ant-select-dropdown-global","allow-clear":"","show-arrow":"","filter-option":!1,"not-found-content":null,"default-active-first-option":!1,value:e.selectedViewTypes,"onUpdate:value":t[1]||(t[1]=t=>e.selectedViewTypes=t)},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.viewTypeOptions,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:t.key,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate(t.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","value"])])]),_:1},8,["label"])]),_:1},8,["layout"])]),_:1},8,["visible","cancel-callback","enter-callback"])])}fh.render=Ch,fh.__file="src/view/component-designer/component/action/ComponentDesignerCopyAction.vue";const Dh=Object(a["defineComponent"])({name:"ComponentDesigner",components:{OioTooltip:r["OioTooltip"],OioTooltipHelp:r["OioTooltipHelp"],ComponentDesignerCopyAction:fh,DesignerHeader:dh,DraggableWidget:rh,UiIconSizeReset:Hu,DesignerDraggable:n["t"],WidgetSetting:Bg,AnchorDrawer:n["d"],OioButton:r["OioButton"],OioIcon:r["OioIcon"],OioTags:r["OioTags"]},inheritAttrs:!1,props:Object.assign(Object.assign({},n["z"]),{definitionName:{type:String},setDefinitionName:{type:Function},widgetId:{type:String},saveAttrInfo:{type:Function},saveMetaInfo:{type:Function},designerTtypeOption:{type:Object},setDesignerTtypeOptions:{type:Function},setDesignerContextTypeOptions:{type:Function},setDesignerSpanOptions:{type:Function},setDesignerFieldReference:{type:Function},setDesignerModelFieldInfo:{type:Function},setViewClientType:{type:Function},viewClientType:{type:String},goToPageHistoryList:{type:Function},goToViewDesignList:{type:Function}}),setup(e){Object(n["pd"])().setScope(Fu.WIDGET);const t=Object(a["ref"])(),o=Object(a["ref"])(),l=Object(a["ref"])(),c=lv(),{loading:b,visible:g,viewType:v,isReady:m,copyIsReady:y,autoSaving:h,saveResult:f,designerData:O,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,protocolVersion:C}=c,{widgetCategoryGroup:D,widgetDefinitionGroup:T,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,initWidgetGroup:V,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M}=sv(c),{isLeftDrawerAnchored:A,isRightDrawerAnchored:F,isShowMasterMask:L,isShowMenuDynamic:R,headerHeight:B,leftAreaWidth:_,designerContentLeftMargin:W,designerContentRightMargin:P,contentOtherWidth:z,computeLayout:G}=av(c),U=Object(a["computed"])(()=>v.value===i["ViewType"].Gallery),{isShowCardDesign:K,cardWidgetInstanceRoot:q}=Ug(c),H=Object(a["ref"])(void 0),{lazySelectedInstance:Y,setLazySelectedInstance:Q}=Object(n["hd"])(),X=Object(a["computed"])(()=>H.value&&Object.keys(H.value).length>=1),Z=Object(a["computed"])(()=>{const e=H.value;return!!e&&n["R"].isIcon(e).result}),te=e=>{K.value=e.target.value},oe=()=>{var t;H.value=void 0,Q(void 0),Re.value=!1,null===(t=e.destroyForm)||void 0===t||t.call(e)},{PageDesignerMultiQueueEditor:ie,currentVersion:ne,isCancelState:re,isRecoverState:ae,historyVersionInit:le,allowCancelCurrentEdit:se,allowRecoverLastEdit:ce,addEditHistoryQueue:de,cancelCurrentEdit:ue,recoverLastEdit:pe,resetEditState:be}=Yg(()=>{oe()},e=>{ge.value=Object(d["a"])(e.designerData),x(S.value.get(j.value),e.modelDefinitions)}),ge=Object(a["computed"])({get(){return O.value},set(e){O.value=e,w.value=e?Object(n["Ib"])(E.value,e):void 0}}),{hasOpenModal:ve,isAllowOpenDesignerModal:me,isReadyOpenDesignerModal:ye,onOpenDesignerModal:he,copyModalWidgetInstance:fe}=Jg({currentSelectedInstance:H,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenDrawer:Oe,isAllowOpenDesignerDrawer:we,isReadyOpenDesignerDrawer:je,onOpenDesignerDrawer:ke,copyDrawerWidgetInstance:Ce}=qg({currentSelectedInstance:H,widgetNameGroup:$,widgetTypeGroup:E}),{hasOpenInnerPopup:De,isAllowOpenDesignerInnerPopup:Te,isReadyOpenDesignerInnerPopup:$e,onOpenDesignerInnerPopup:Ee,copyInnerPopupWidgetInstance:Se}=Qg({currentSelectedInstance:H,widgetNameGroup:$,widgetTypeGroup:E}),{isAllowPreviewDesignerConfirm:Ne,onOpenDesignerConfirm:Ve}=Kg(H),xe=Object(a["ref"])({}),Ie=Object(a["ref"])({}),Me=Object(a["ref"])(""),Ae=Object(a["ref"])(""),Fe=Object(a["ref"])([]),Le=Object(a["computed"])(()=>Object(n["hc"])(H.value)),Re=Object(a["ref"])(!1),Be=Object(a["ref"])([]),_e=Object(a["ref"])(),We=Object(a["computed"])(()=>{const e=[],t=Be.value;return t&&t.length?(n["tb"].forEach(o=>{const{value:n}=o,r=t.find(e=>e.viewType===n);r&&e.push(Object.assign(Object.assign({},o),{label:Object(i["translateValueByKey"])(o.label),color:"#ffffff",backgroundColor:"var(--oio-primary-color)"}))}),e):e}),Pe=t=>J(this,void 0,void 0,(function*(){var o,r;b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0;try{const a=yield n["yb"].INSTANCE.get(),l=yield vh(t),{widgetDefinitionList:s=[],widgetList:c=[]}=a,{modelDefinition:d={},modelDefinitions:u=[],fields:p=[],viewActions:m=[],serverActions:h=[],urlActions:f=[],clientActions:O=[],historyCount:w=0,widget:C,widgetInstances:D}=l,{definitionName:T,displayName:$,name:E}=C,S=[];D.forEach(e=>{S.push(Object.assign(Object.assign({},e.widgetAttrFormViewDesign),{viewType:e.viewType}))}),Be.value=S;const N=null===(o=We.value[0])||void 0===o?void 0:o.key;_e.value||(_e.value=N),null===(r=e.setDefinitionName)||void 0===r||r.call(e,T),j.value=d.model;const I=i["ViewType"].Form;v.value=I;const M=[...m,...h,...f,...O];V(s,c),x(Object(n["Qb"])(d.model,d.displayName,p,M),u),xe.value={name:$,apiName:E},Ie.value=Object.assign({},xe.value),Ge(S.find(e=>e.viewType===_e.value),u),k.value=w}finally{y.value=!0,g.content=!0,b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1}})),ze=e=>{lt(void 0),_e.value=e,g.content=!0,b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0,Object(a["nextTick"])(()=>{const t=Be.value.find(t=>t.viewType===e);t&&Ge(t)}).finally(()=>{g.content=!0,b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1})},Ge=(t,o)=>{var l;let s=t.designerData;s||(s=JSON.parse(t.designerJson),t.designerData=s),ge.value=s;const c=Object(n["dc"])(s,t.errorJsonPaths||[]);c&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${c}条数据不存在，请重新设置`),{duration:null});const d=Object(n["ec"])(s,t.errorWidgetJsonPaths||[]);d&&r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`有${d}个组件不存在，请重新设置`),{duration:null});const{id:u,protocolVersion:p}=t;null===(l=e.setLayoutId)||void 0===l||l.call(e,u),C.value=p||"",le(u,s,o||ie.currentEditor.editor.currentData.modelDefinitions,{layoutId:u,designerData:Object(a["computed"])(()=>ge.value),modelWidgetLib:S.value,currentModelWidgetLib:N.value})},Ue=t=>{var o;if(t=Object(n["nc"])(t),!t)return;const i=H.value;if(!i)return;oe(),Re.value=!0,H.value=i;const{currentWidget:r}=i;if(!r)return;r.widgetBizType;const a=T.value.get(r.widgetDefinitionName);if(!a)return;const{widgetList:l}=a,{viewType:s}=r,c=l.find(e=>e.viewType===s&&Object(n["nc"])(e.widgetSubtype)===t);if(!c)return;i.currentWidget=c;const{element:d}=i;d.title=c.widgetDisplayName,d.subtype=c.widgetSubtype,d.widget=c,b.rightDrawer=!0,null===(o=e.initMetadataSettingForm)||void 0===o||o.call(e,i,!0,!1).then(e=>{const{isDialog:o,isDrawer:a,isRowAction:l,isInContainer:s,widgetViewType:c,widgetName:u}=Object(n["uc"])(i);e&&(i.metadata=e.getData(),i.metadata.ttype=t,i.metadata[n["yc"]]=o,i.metadata[n["Ac"]]=a,i.metadata[n["Dc"]]=l,i.metadata[n["Cc"]]=s,i.metadata[n["Pc"]]=d.model,i.metadata[n["rd"]]=c,i.metadata[n["td"]]=u,i.metadata[n["xc"]]=!0),n["xb"].isFieldWidget(r)&&He(i,r)}).finally(()=>{b.rightDrawer=!1})},Ke=t=>{var o,r,l;let s=[];const c=t.parent;if(!c)return void(null===(o=e.setDesignerSpanOptions)||void 0===o||o.call(e,s));const{element:d}=t;if(n["ob"].isV3(C.value)){const e=i["Optional"].ofNullable(c.options).map(e=>e.cols).orElse(i["DEFAULT_COLS"]),o=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(1),r=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(t=>n["O"].computeColSpan(t,e)).orElse(e);for(const t in i["ColSpanEnum"]){const n=i["ColSpanEnum"][t],a=e*Number(n);o<=a&&a<=r&&s.push(t)}}else if(n["R"].isRow(c).result||n["R"].isBlock(c).result){const o=i["Optional"].ofNullable(c.options).map(e=>e.cols).orElse(void 0);if(Object(u["a"])(o))return void(null===(r=e.setDesignerSpanOptions)||void 0===r||r.call(e,s));const l=i["Optional"].ofNullable(d.properties).map(e=>e.colSpan).orElse(void 0);if(!Object(u["a"])(l)){const e=o-Object(a["unref"])(c.options.spanTotal)+n["O"].computeColSpan(l,o);if(0===e)s=[l];else for(const r in i["ColSpanEnum"]){const a=i["ColSpanEnum"][r];if(a)if(l===r)s.push(r);else{const l=o*Number(a),c=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMinSpan).map(e=>n["O"].computeColSpan(e,o)).orElse(1),d=i["Optional"].ofNullable(t.currentWidget).map(e=>e.widgetMaxSpan).map(e=>n["O"].computeColSpan(e,o)).orElse(o);c<=l&&l<=d&&l<=e&&s.push(r)}}}}else if(n["R"].isContainer(c).result)for(const e in i["ColSpanEnum"])s.push(e);null===(l=e.setDesignerSpanOptions)||void 0===l||l.call(e,s)},qe=(e,t)=>{const{widgetDefinitionName:o,widgetName:i,multi:r}=t;if(n["E"].includes(i)){const o=$.value.get(`${n["B"].FIELD}#${i}#${r}`);if(!o)return;Je(e,o,t)}else{const i=T.value.get(o);if(!i)return;Qe(e,i,t),He(e,t)}},He=(e,t)=>{const{widgetDefinitionName:o}=t;if(!o)return;const i=T.value.get(o);if(!i)return;const{metadata:r}=e;if(r){const{isSelectMulti:o,metadataMulti:a}=Object(n["vc"])(e,t,i);r[n["Ec"]]=o||!1,Object(u["a"])(a)||(r.multi=a)}},Ye=(e,t)=>{const o=T.value.get(t.widgetDefinitionName);o&&Qe(e,o,t)},Qe=(t,o,i)=>{var r;const a=Object(n["nc"])(i.widgetSubtype),l=[a];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);t!==a&&e.show&&l.push(t)}),t.metadata.ttype=l[0],null===(r=e.setDesignerTtypeOptions)||void 0===r||r.call(e,[...new Set(l)]),n["Hb"].setValue(n["ac"],l[0])},Je=(t,o,i)=>{var r;const a=Object(n["nc"])(i.widgetSubtype),l=[a];o.widgetList.forEach(e=>{const t=Object(n["nc"])(e.widgetSubtype);t!==a&&l.push(t)}),t.metadata.ttype=l[0],null===(r=e.setDesignerTtypeOptions)||void 0===r||r.call(e,l),n["Hb"].setValue(n["ac"],l[0])},Xe=t=>{var o,n;const r=[];i["Optional"].ofNullable(t).map(e=>e.root).map(e=>null===e||void 0===e?void 0:e.fieldCollection).map(e=>null===e||void 0===e?void 0:e.keys()).ifPresent(e=>{if(e)for(const t of e)r.push(t.split("#")[1])});let a=!1;i["Optional"].ofNullable(t).map(e=>e.currentWidget).ifPresent(e=>{const t=e;a=t.multi||!1});const l=[];if(N.value&&N.value.fields)for(const e of N.value.fields)l.push({name:e.name,id:e.id,model:e.model,ttype:e.ttype,systemSource:e.systemSource,multi:e.multi,displayName:e.displayName});null===(o=e.setDesignerModelFieldInfo)||void 0===o||o.call(e,{allFieldList:l,existFieldList:r,multi:a,currentModel:null===(n=N.value)||void 0===n?void 0:n.model})},Ze=(e,t)=>{const o=S.value.get(e);if(o){const e=t.name,i=o.fields.find(t=>t.name===e);i||o.fields.splice(0,0,t)}},et=(e,t,o,i,r)=>{const a=E.value.get(`${n["B"].FIELD}#${i}#${r}`);a&&ot(e,t,a)},tt=(e,t)=>{const o=E.value.get(`${t.widgetBizType}#${t.widgetSubtype}`);o&&ot(e,t,o)},ot=(e,t,o)=>{const i=n["wb"].fetchWidgetGroup(e.parent,o,!0);if(!i)return void(e.widgetList=[]);const{defaultWidget:r,widgetList:a}=i,{widgetDefinitionName:l}=t,s=[r,...a].find(e=>e.widgetDefinitionName===l);t=s||r,e.currentWidget=t,e.element.widget=t;const{widgetName:c}=t;r.widgetName===c?e.widgetList=a:e.widgetList=[r,...a.filter(e=>e.widgetName!==c)]},it=(e,t)=>{const{element:o}=e,r=e.currentWidget;if(o.name){const a=o.widgetData;if(!t)if(a){const t=i["Optional"].ofNullable(a).map(e=>e.ttype).orElse(void 0),l=i["Optional"].ofNullable(a).map(e=>e.relatedTtype).orElse(void 0),s=i["Optional"].ofNullable(a).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)&&Object(u["a"])(l)||Object(u["a"])(s)||(et(e,r,a,t===i["ModelFieldType"].Related?l:t,s),Ze(o.model,a),n["R"].collectionRootElement(e))}else qe(e,r)}else qe(e,r),Xe(e);Ke(e)},nt=t=>{var o,r,a;const{element:l}=t;let s=!1;if(!l.name){const a=t.parent.element,{bizType:l,subtype:c}=a;if(l&&c&&[n["A"].ROW_ACTIONS,n["A"].ROW_ACTIONS_WIDGET,n["A"].DROPDOWN,n["A"].TOOLBAR_DROPDOWN].includes(c))null===(o=e.setDesignerContextTypeOptions)||void 0===o||o.call(e,[i["ActionContextType"].Single]),s=!0;else{const o=Object(n["qc"])(t,e=>e.element.bizType!==n["B"].SLOT);if(o){const{bizType:t,subtype:a}=o.element;t===n["B"].ELEMENT&&a===n["A"].ACTION_BAR&&(null===(r=e.setDesignerContextTypeOptions)||void 0===r||r.call(e,[i["ActionContextType"].ContextFree,i["ActionContextType"].Single,i["ActionContextType"].Batch,i["ActionContextType"].SingleAndBatch]),s=!0)}}}s||null===(a=e.setDesignerContextTypeOptions)||void 0===a||a.call(e,[])},rt=(e,t)=>{const{element:o}=e,r=e.currentWidget,a=o.widgetData;if(!t)if(a){const t=[a.startMetadata,a.endMetadata];t.forEach(e=>{if(!e)return;const t=i["Optional"].ofNullable(e).map(e=>e.ttype).orElse(void 0),n=i["Optional"].ofNullable(e).map(e=>e.multi).orElse(void 0);Object(u["a"])(t)||Object(u["a"])(n)||Ze(o.model,e)}),tt(e,r),n["R"].collectionRootElement(e)}else Ye(e,r),Xe(e);Ke(e)},at=(o,r,l)=>{var s;Object(u["a"])(l)&&(l=o.element.initialization),Object(a["nextTick"])(()=>{g.rightDrawer=!0,G()}),b.leftDrawer=!0,b.content=!0,b.rightDrawer=!0,i["Optional"].ofNullable(Object(n["sc"])(o,e.layoutId)).ifPresent(t=>{var o;null===(o=e.setDesignerFieldReference)||void 0===o||o.call(e,t)});let c=o.currentWidget;if(c.widgetBizType===n["B"].FIELD){const e=o.element.widgetData;if(e){const{ttype:t,relatedTtype:n,multi:r}=e;null!=t&&null!=r&&(et(o,c,e,t===i["ModelFieldType"].Related?n:t,r),c=o.currentWidget)}}null===(s=e.initForm)||void 0===s||s.call(e,o,r,!1).then(({propertiesSettingFormWidget:e,metadataSettingFormWidget:i})=>{var r,a,s,d;const{isDialog:u,isDrawer:p,isRowAction:b,isInContainer:g,widgetViewType:v,widgetName:m,elementSource:y}=Object(n["uc"])(o);switch(i&&(o.metadata=i.getData(),o.metadata[n["yc"]]=u,o.metadata[n["Ac"]]=p,o.metadata[n["Dc"]]=b,o.metadata[n["Cc"]]=g,o.metadata[n["Pc"]]=o.element.model,o.metadata[n["rd"]]=v,o.metadata[n["td"]]=m,o.metadata[n["xc"]]=!0,o.metadata[n["cc"]]=y),e&&(o.element.properties=e.getData(),o.element.properties[n["Oc"]]=o.metadata,o.element.properties[n["yc"]]=u,o.element.properties[n["Ac"]]=p,o.element.properties[n["Dc"]]=b,o.element.properties[n["Cc"]]=g,o.element.properties[n["Pc"]]=o.element.model,o.element.properties[n["rd"]]=v,o.element.properties[n["td"]]=m,o.element.properties[n["xc"]]=!0,o.element.properties[n["cc"]]=y),c.widgetBizType){case n["B"].PACK:case n["B"].ELEMENT:switch(c.widgetSubtype){case n["A"].MODAL:case n["A"].DRAWER:case n["A"].INNER_POPUP:o.element.properties[n["Db"]]=(null===(a=null===(r=o.parent)||void 0===r?void 0:r.element)||void 0===a?void 0:a.properties.label)||"对话框",o.element.properties[n["Cb"]]=null===(d=null===(s=o.parent)||void 0===s?void 0:s.metadata)||void 0===d?void 0:d.contextType;break;case n["A"].PARAGRAPH:case n["A"].CHART:case n["A"].REPORT:case n["A"].DATA_DASHBOARD:Ke(o);break;case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:rt(o,l);break}break;case n["B"].FIELD:it(o,l);break;case n["B"].ACTION:nt(o);break}t.value&&t.value.refreshTabSelectData(o),H.value=o,Q(o)}).finally(()=>{b.leftDrawer=!1,b.content=!1,b.rightDrawer=!1,Object(a["nextTick"])(()=>{o.isReady||(o.isReady=!0,o.notifyParentIsReady())})})},lt=(e,t)=>{oe(),e?(mt(e),at(e,!1,t)):ht(void 0)},st=Object(p["a"])((e,t,o)=>{h.value=!0;const r=[],a=[];for(const i of e.modelWidgetLib.values())r.push(i.model),a.push({model:i.model,displayName:i.displayName});o&&de({id:n["h"],layoutId:e.layoutId,designerJson:t,version:n["h"],versionName:n["i"],createDate:i["DateUtil"].dateFormat(new Date,i["defaultFormat"]),modelDefinitions:a}),Jt(e.layoutId,t,r).then(()=>{f.value=!0}).catch(e=>{console.error(e),f.value=!1}).finally(()=>{h.value=!1})},1e3),ct=e=>{try{e||(e=ie.currentEditor);const t=Object(n["Vb"])(e.context.designerData.value),o=!re.value&&!ae.value;if(o){const o=e.editor.currentData;if(o&&t===o.designerJson)return}ne.value.id===n["h"]&&st(e.context,t,o)}finally{be()}},dt=({selectedInstance:t,originWidget:o,targetWidget:r})=>{const{widgetBizType:a}=o;if(a===n["B"].FIELD){const a=o.widgetSubtype;if(!a)return;const l=i["Optional"].ofNullable(t.element).map(e=>e.widgetData).orElse(void 0);if(!l)return;const{model:s}=l;if(n["eb"].includes(a)){const i=o.widgetName,a=r.widgetName,c=l.references;if(n["db"].includes(i))if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s),M(c);else if(n["db"].includes(a)){const o=Object(n["sc"])(t,e.layoutId);Object(n["fc"])(o),I(c)}else I(s)}else I(s);vt(t)}else I(t.element.model);oe(),t?at(t,!0):Q(void 0)};function ut(e,t){const o=t.widgetSubtype;if(!o)return;const r=i["Optional"].ofNullable(e.element).map(e=>e.widgetData).orElse(void 0);if(r&&n["eb"].includes(o)){const e=r.references;M(e)}}const pt=e=>{const{currentWidget:t}=e;if(!t)return;const{widgetBizType:o}=t;switch(o){case n["B"].ELEMENT:Xe(e);break;case n["B"].FIELD:Xe(e),ut(e,t);break}e.children.forEach(e=>{pt(e)})},bt=({targetInstance:e})=>{var t,o,i;const r=null===(t=H.value)||void 0===t?void 0:t.element.id,a=null===(o=e.element)||void 0===o?void 0:o.id;if(r&&a&&r===a){const t=null===(i=e.element)||void 0===i?void 0:i.bizType;t===n["B"].ACTION&&nt(e)}},gt=e=>{var t,o;const{multi:i}=e.element.widgetData,n=e.currentWidget.multi;if(!Object(u["a"])(i)&&!Object(u["a"])(n)&&i!==n){const n=null===(t=e.currentWidget)||void 0===t?void 0:t.widgetName;if(n){const t=null===(o=e.widgetList)||void 0===o?void 0:o.find(e=>e.widgetName===n&&e.multi===i);t&&(e.currentWidget=t)}}},vt=e=>{const{widgetName:t}=e.currentWidget;if(t){while(e.children.length>0)n["R"].remove(e,0);const o=e.element.widgetData.references;switch(t){case n["db"][0]:n["R"].add(e,n["wb"].createInlineTableWidgetInstance(e,$.value,E.value,o));break;case n["db"][1]:{const t=Object(n["rc"])(e);t===n["Bb"].DETAIL?n["R"].add(e,n["wb"].createInlineDetailWidgetInstance(e,$.value,E.value,o)):n["R"].add(e,n["wb"].createInlineFormWidgetInstance(e,$.value,E.value,o));break}}}},mt=e=>{const{currentWidget:t}=e;if(!t)return void r["OioNotification"].error(Object(i["translateValueByKey"])("异常"),Object(i["translateValueByKey"])("当前实例没有对应的组件，请联系开发人员提供技术支持"));const o=t.widgetBizType;if(o===n["B"].FIELD){const o=e.element.widgetData;if(o&&n["db"].includes(t.widgetName))return void I(o.references)}I(e.element.model)},yt=e=>{I(e.data.model)},ht=e=>{e&&e.id===Lg.PROPERTIES?Re.value=!1:Re.value=i["Optional"].ofNullable(H.value).map(e=>e.element).map(e=>!e.initialization||Object(s["a"])(e.name)).orElse(!1)},ft=()=>{var t;const o=H.value;if(!o)return;const{element:l}=o;l&&(l.isValidator=!0,b.content=!0,b.rightDrawer=!0,null===(t=e.saveMetaInfo)||void 0===t||t.call(e,o).then(e=>{if(!e)return;const{name:t,metadata:l,metaExtends:s}=e;o.element.name=t,o.element.widgetData=l,o.element.initialization=!0,o.metadata=e,o.element.metaExtends=s;const c=o.currentWidget,d=c.widgetBizType;let u;switch(d){case n["B"].PACK:u="容器设置成功";break;case n["B"].ELEMENT:{const{widgetSubtype:e}=c;switch(e){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:u="范围组件设置成功";break;default:u="组件设置成功";break}break}case n["B"].FIELD:u="字段设置成功";break;case n["B"].ACTION:u="动作设置成功";break;case n["B"].VIEW:u="视图设置成功";break;default:throw new Error("Invalid widget biz type. value="+d)}r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])(u)),Object(a["nextTick"])(()=>{switch(d){case n["B"].ELEMENT:{const{widgetSubtype:t}=c;switch(t){case n["A"].DATETIME_RANGE:case n["A"].DATE_RANGE:case n["A"].TIME_RANGE:case n["A"].YEAR_RANGE:{const{startMetadata:t,endMetadata:i}=e;o.element.name||(o.element.name=`${null===t||void 0===t?void 0:t.name}#${null===i||void 0===i?void 0:i.name}`),o.element.widgetData||(o.element.widgetData={startMetadata:t,endMetadata:i});break}}break}case n["B"].FIELD:gt(o),vt(o);break;case n["B"].ACTION:mo({widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:fe,copyDrawerWidgetInstance:Ce,copyInnerPopupWidgetInstance:Se},o);break}lt(o,!1)}),Re.value=!1}).finally(()=>{b.content=!1,b.rightDrawer=!1}))},Ot=e=>!!Object(n["sd"])(e)&&wt(e.elements),wt=e=>{for(const t of e)if(!t.isVirtual&&(!t.isSkip||!wt(t.elements))&&!Ot(t))return!1;return!0},jt=()=>J(this,void 0,void 0,(function*(){var t;try{b.content=!0,b.rightDrawer=!0;const o=[];let a=!1;for(const e of Be.value){const{designerData:l}=e;l?Ot(l)?o.push(Object.assign(Object.assign({},e),{designerJson:Object(n["Vb"])(l)})):(a=!0,r["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])((null===(t=n["tb"].find(t=>t.key===e.viewType))||void 0===t?void 0:t.label)+"页面发布失败，以下特殊标记组件的属性校验失败，请打开属性查看原因并重新设置"))):o.push(e)}if(a)return;yield yh(e.widgetId,Array.from(S.value.keys()),o),r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("发布成功")),xt()}finally{b.content=!1,b.rightDrawer=!1}})),kt=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!0,G()})},Ct=()=>{Object(a["nextTick"])(()=>{g.leftDrawer=!1,G()})},Dt=e=>{Object(a["nextTick"])(()=>{A.value=e,G()})},Tt=e=>{Object(a["nextTick"])(()=>{F.value=e,G()})},$t=()=>{Object(a["nextTick"])(()=>{g.rightDrawer=!0,G()})},Et=()=>{oe(),Q(void 0),Object(a["nextTick"])(()=>{g.rightDrawer=!1,G()})},St=()=>{ue()},Nt=()=>{pe()},Vt=()=>{var t;null===(t=e.goToPageHistoryList)||void 0===t||t.call(e,e.layoutId)},xt=()=>{var t;null===(t=e.goToViewDesignList)||void 0===t||t.call(e)},{browserCopyAndNotify:It}=Object(i["useCopy"])(),Mt=e=>{It(e.target.innerText)};return Object(a["onMounted"])(()=>{n["Hb"].pluck(n["ac"]).subscribe(e=>{Ue(e)}),Object(a["nextTick"])(()=>Pe(e.widgetId))}),Object(a["onUnmounted"])(()=>{}),Object(n["jd"])(Object.assign(Object.assign({},Object(n["fd"])()),{viewClientType:Object(a["computed"])(()=>e.viewClientType),protocolVersion:Object(a["computed"])(()=>C.value),loadingState:Object(a["computed"])(()=>b.content),recomputeSpanOptions:Ke,getContentContainerHTMLElement:()=>o.value,getContainerHTMLElement:()=>o.value})),ee({currentSelectedInstance:Object(a["computed"])(()=>H.value),widgetNameGroup:Object(a["computed"])(()=>$.value),widgetTypeGroup:Object(a["computed"])(()=>E.value),copyModalWidgetInstance:fe,copyDrawerWidgetInstance:Ce,copyInnerPopupWidgetInstance:Se,onSelectCurrentInstance:lt,initWidgetLib:x,switchModelWidgetLib:I,removeModelWidgetLib:M,PageDesignerMultiQueueEditor:ie,designerCardShowStatus:Object(a["computed"])(()=>K.value||!U.value),changeDesignerCardShowStatus:te}),{DEFAULT_BRAND_LOGO:i["DEFAULT_BRAND_LOGO"],widgetSettingRef:t,designerContentRef:o,designerContentBodyRef:l,loading:b,visible:g,viewType:v,isReady:m,copyIsReady:y,autoSaving:h,saveResult:f,designerData:ge,widgetInstanceRoot:w,currentViewModel:j,currentHistoryCount:k,widgetCategoryGroup:D,widgetNameGroup:$,widgetTypeGroup:E,modelWidgetLib:S,currentModelWidgetLib:N,isLeftDrawerAnchored:A,isRightDrawerAnchored:F,isShowMasterMask:L,isShowMenuDynamic:R,headerHeight:B,leftAreaWidth:_,designerContentLeftMargin:W,designerContentRightMargin:P,contentOtherWidth:z,showCardDesignOptions:Gg,isShowCardDesignVisible:U,isShowCardDesign:K,cardWidgetInstanceRoot:q,switchCardDesign:te,initDesigner:Pe,currentSelectedInstance:H,lazySelectedInstance:Y,hasSelectedInstance:X,isIconInstance:Z,originComponentInstanceSettingData:xe,currentComponentInstanceSettingData:Ie,currentPageModule:Me,currentModule:Ae,currentModules:Fe,WidgetScope:Fu,componentInstanceDesignerInfoArray:Be,currentComponentInstanceViewType:_e,componentInstanceViewTypeOptions:We,switchComponentInstanceDesigner:ze,rightDrawerTitle:Le,onSelectInstance:lt,onSettingChange:ct,onSwitchWidget:dt,onRemoveInstance:pt,onMoveInstance:bt,onModelWidgetLibChange:yt,onSubmitMetadata:ft,rightDrawerHasFooter:Re,onSelectedTab:ht,onPublish:jt,onLeftDrawerOpened:kt,onLeftDrawerClosed:Ct,onLeftDrawerAnchored:Dt,onRightDrawerAnchored:Tt,onRightDrawerOpened:$t,onRightDrawerClosed:Et,currentVersion:ne,allowCancelCurrentEdit:se,allowRecoverLastEdit:ce,onCancelEdit:St,onRecoverEdit:Nt,gotoHistoryPage:Vt,gotoDesignerList:xt,hasOpenModal:ve,isAllowOpenDesignerModal:me,isReadyOpenDesignerModal:ye,onOpenDesignerModal:he,hasOpenDrawer:Oe,isAllowOpenDesignerDrawer:we,isReadyOpenDesignerDrawer:je,onOpenDesignerDrawer:ke,hasOpenInnerPopup:De,isAllowOpenDesignerInnerPopup:Te,isReadyOpenDesignerInnerPopup:$e,onOpenDesignerInnerPopup:Ee,isAllowPreviewDesignerConfirm:Ne,onOpenDesignerConfirm:Ve,onCopy:Mt}}}),Th=()=>{Object(a["useCssVars"])(e=>({"09121396-designerContentLeftMargin":e.designerContentLeftMargin,"09121396-designerContentRightMargin":e.designerContentRightMargin,"09121396-contentOtherWidth":e.contentOtherWidth,"09121396-leftAreaWidth":e.leftAreaWidth}))},$h=Dh.setup;Dh.setup=$h?(e,t)=>(Th(),$h(e,t)):Th;const Eh={class:"ui-designer-component-designer"},Sh={class:"component-designer-content"},Nh={class:"component-designer-main-content"},Vh={class:"designer-widget-aside designer-widget-aside-left"},xh={ref:"designerContentRef",class:"designer-content"},Ih={class:"designer-main-content"},Mh={key:1,class:"designer-content-body-empty"},Ah=Object(a["createElementVNode"])("span",null,null,-1),Fh={class:"designer-widget-aside designer-widget-aside-right"},Lh={class:"designer-widget-aside-right-anchor-drawer-header"},Rh=["title"],Bh={key:1,class:"designer-widget-aside-right-anchor-drawer-header-widget"},_h={key:2},Wh={class:"designer-widget-aside-right-anchor-drawer-header-data-name"},Ph={key:0,class:"designer-properties-setting-form-button"},zh={key:0},Gh={key:1},Uh={key:2},Kh={key:1,class:"designer-widget-not-selected"},qh=Object(a["createElementVNode"])("br",null,null,-1);function Hh(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-header"),s=Object(a["resolveComponent"])("draggable-widget"),c=Object(a["resolveComponent"])("oio-tags"),d=Object(a["resolveComponent"])("designer-draggable"),u=Object(a["resolveComponent"])("anchor-drawer"),p=Object(a["resolveComponent"])("component-designer-copy-action"),b=Object(a["resolveComponent"])("oio-tooltip-help"),g=Object(a["resolveComponent"])("oio-tooltip"),v=Object(a["resolveComponent"])("oio-button"),m=Object(a["resolveComponent"])("ui-icon-size-reset"),y=Object(a["resolveComponent"])("widget-setting"),h=Object(a["resolveComponent"])("oio-icon");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Eh,[Object(a["createVNode"])(l,{"origin-component-instance-setting-data":e.originComponentInstanceSettingData,"current-component-instance-setting-data":e.currentComponentInstanceSettingData,"has-history-record":(e.currentHistoryCount||0)>0,disabled:!e.isReady,publish:e.onPublish,saving:e.autoSaving,"save-result":e.saveResult,onGoBack:e.gotoDesignerList,onGoHistory:e.gotoHistoryPage},null,8,["origin-component-instance-setting-data","current-component-instance-setting-data","has-history-record","disabled","publish","saving","save-result","onGoBack","onGoHistory"]),Object(a["createElementVNode"])("div",Sh,[Object(a["createElementVNode"])("div",Nh,[Object(a["createElementVNode"])("div",Vh,[Object(a["createVNode"])(s,{"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,"origin-component-instance-setting-data":e.originComponentInstanceSettingData,"current-component-instance-setting-data":e.currentComponentInstanceSettingData,"model-widget-lib":e.modelWidgetLib,"current-model-widget-lib":e.currentModelWidgetLib,loading:e.loading.leftDrawer,"current-module":e.currentPageModule,visible:e.visible.leftDrawer,"current-design-data":e.widgetInstanceRoot,"current-focus-data":e.cardWidgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"current-selected-instance":e.currentSelectedInstance,"widget-scope":e.WidgetScope.WIDGET,onOnOpened:e.onLeftDrawerOpened,onOnClosed:e.onLeftDrawerClosed,onOnAnchored:e.onLeftDrawerAnchored,onOnModelWidgetLibChange:e.onModelWidgetLibChange},null,8,["widget-category-group","widget-name-group","widget-type-group","origin-component-instance-setting-data","current-component-instance-setting-data","model-widget-lib","current-model-widget-lib","loading","current-module","visible","current-design-data","current-focus-data","is-focus-designer","current-selected-instance","widget-scope","onOnOpened","onOnClosed","onOnAnchored","onOnModelWidgetLibChange"])]),Object(a["createElementVNode"])("div",xh,[Object(a["createElementVNode"])("div",Ih,[(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["designer-content-body","oio-scrollbar",e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?"designer-content-body-pointer-events-none":""]),key:e.layoutId,ref:"designerContentBodyRef"},[e.visible.content?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createVNode"])(c,{value:e.currentComponentInstanceViewType,options:e.componentInstanceViewTypeOptions,"allow-checked":!0,"onUpdate:value":e.switchComponentInstanceDesigner},null,8,["value","options","onUpdate:value"]),Object(a["createVNode"])(u,{visible:!0,closable:!1,width:"440px",loading:e.loading.content},{header:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.currentComponentInstanceSettingData.apiName),1)]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{data:e.widgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"focus-data":e.cardWidgetInstanceRoot,"current-selected":e.currentSelectedInstance,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:e.onSelectInstance,onSettingChange:e.onSettingChange,onSwitchWidget:e.onSwitchWidget,onMoveInstance:e.onMoveInstance,onRemoveInstance:e.onRemoveInstance},null,8,["data","is-focus-designer","focus-data","current-selected","widget-category-group","widget-name-group","widget-type-group","onSelectedChange","onSettingChange","onSwitchWidget","onMoveInstance","onRemoveInstance"])]),_:1},8,["loading"])],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mh,[Object(a["createCommentVNode"])("当前菜单无页面，若需要页面，请对菜单进行页面绑定"),Ah]))],2))])],512),e.copyIsReady?(Object(a["openBlock"])(),Object(a["createBlock"])(p,{key:0,"widget-id":e.widgetId,"exist-view-type-options":e.componentInstanceViewTypeOptions,"current-selected-view-type":e.currentComponentInstanceViewType,initDesigner:e.initDesigner},null,8,["widget-id","exist-view-type-options","current-selected-view-type","initDesigner"])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("div",Fh,[Object(a["createVNode"])(u,{class:Object(a["normalizeClass"])([e.hasSelectedInstance?"":"designer-widget-not-selected-drawer"]),width:"440px",visible:e.visible.rightDrawer,"default-anchor":"","has-footer":e.rightDrawerHasFooter,loading:e.loading.rightDrawer,"anchor-class-name":"designer-widget-aside-absolute",onOnAnchored:e.onRightDrawerAnchored,onOnOpened:e.onRightDrawerOpened,onOnClosed:e.onRightDrawerClosed},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Lh,[e.rightDrawerTitle.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"designer-widget-aside-right-anchor-drawer-header-field",title:e.$translate(e.rightDrawerTitle.title)},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.title)),9,Rh)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.widgetDisplayName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Bh,Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.widgetDisplayName)),1)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",_h,[Object(a["createVNode"])(b,{content:e.rightDrawerTitle.help},null,8,["content"])])):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.dataName?(Object(a["openBlock"])(),Object(a["createBlock"])(g,{key:3,title:e.rightDrawerTitle.dataName,placement:"bm"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Wh,[Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=(...t)=>e.onCopy&&e.onCopy(...t))},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.dataName)),1)])]),_:1},8,["title"])):Object(a["createCommentVNode"])("v-if",!0)])]),footer:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,{type:"primary",onClick:e.onSubmitMetadata},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("保存")),1)]),_:1},8,["onClick"])]),default:Object(a["withCtx"])(()=>[e.hasSelectedInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(y,{key:0,ref:"widgetSettingRef","current-instance":e.currentSelectedInstance,"selected-tab":e.onSelectedTab},{propertiesSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"propertiesSettingForm"),e.isAllowPreviewDesignerConfirm||e.isAllowOpenDesignerModal||e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ph,[e.isAllowPreviewDesignerConfirm?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zh,[Object(a["createVNode"])(v,{type:"link",onClick:e.onOpenDesignerConfirm},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("预览二次确认")),1)]),_:1},8,["onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerModal?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gh,[Object(a["createVNode"])(v,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerModal,onClick:e.onOpenDesignerModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计弹窗")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Uh,[Object(a["createVNode"])(v,{type:"default",style:{width:"100%"},loading:!e.isReadyOpenDesignerDrawer,onClick:e.onOpenDesignerDrawer},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("设计抽屉")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0)])):Object(a["createCommentVNode"])("v-if",!0),e.isIconInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(m,{key:1,"current-instance":e.currentSelectedInstance},null,8,["current-instance"])):Object(a["createCommentVNode"])("v-if",!0)]),metadataSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"metadataSettingForm")]),_:3},8,["current-instance","selected-tab"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Kh,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(h,{icon:"oinone-shuxingshezhikongyemian",size:"60px"}),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("请在左侧画布中选择组件"))+" ",1),qh,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("设置或查看其属性")),1)])]))]),_:3},8,["class","visible","has-footer","loading","onOnAnchored","onOnOpened","onOnClosed"])])])])])}Dh.render=Hh,Dh.__file="src/view/component-designer/ComponentDesigner.vue";let Yh=class extends n["a"]{get definitionName(){return this.getDesignerManagementId()}get layoutId(){return this.getDesignerId()}initialize(e){return super.initialize(e),this.setComponent(Dh),this}setDefinitionName(e){this.setDesignerManagementId(e)}setLayoutId(e){this.setDesignerId(e)}goToViewDesignList(){const e=this.getDesignerManagementId();e&&Object(n["Lc"])(this.router,this.matched,{tab:l["L"].WIDGET,id:e,searchBod:void 0})}goToViewDesignEdit(e){return J(this,void 0,void 0,(function*(){Object(n["Kc"])(e,this.router,this.matched)}))}usingFullSpan(e){var t;const o=super.usingFullSpan(e);return!!o||!(null===(t=e.superRoot)||void 0===t?void 0:t.superRoot)}mounted(){Wi.query({}).then(e=>{Object(n["dd"])().setGroupList(e)}),super.mounted();const{id:e}=this.matched.segmentParams.page;e&&(this.setDesignerId(void 0),this.widgetId=e)}};Y([i["Widget"].Reactive(),Q("design:type",Object)],Yh.prototype,"widgetId",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Yh.prototype,"definitionName",null),Y([i["Widget"].Reactive(),i["Widget"].Provide(),Q("design:type",Object),Q("design:paramtypes",[])],Yh.prototype,"layoutId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],Yh.prototype,"setDefinitionName",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],Yh.prototype,"setLayoutId",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Yh.prototype,"goToViewDesignList",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",Promise)],Yh.prototype,"goToViewDesignEdit",null),Yh=Y([i["SPI"].ClassFactory(i["MaskWidget"].Token({widget:"ComponentDesigner"}))],Yh);var Qh=Object(a["defineComponent"])({name:"DesignerHeader",components:{DesignerCommonHeader:n["o"],OioButton:r["OioButton"],OioPopconfirm:r["OioPopconfirm"],OioTooltipHelp:r["OioTooltipHelp"]},props:{currentPageSettingData:{type:Object,required:!0},disabled:{type:Boolean,default:!1},currentVersion:{type:Object},recoverView:{type:Function}},emits:["go-back"],setup(e,t){const o=Object(a["ref"])({recover:!1}),i=Object(a["computed"])(()=>{var t;return!!e.disabled||(null===(t=e.currentVersion)||void 0===t?void 0:t.id)===n["h"]}),r=()=>{t.emit("go-back")},l=()=>J(this,void 0,void 0,(function*(){o.value.recover=!0;try{e.recoverView&&(yield e.recoverView())}finally{o.value.recover=!1}}));return{loading:o,realDisabled:i,gotoBack:r,recover:l}}});function Jh(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-tooltip-help"),s=Object(a["resolveComponent"])("oio-button"),c=Object(a["resolveComponent"])("oio-popconfirm"),d=Object(a["resolveComponent"])("designer-common-header");return Object(a["openBlock"])(),Object(a["createBlock"])(d,{title:e.currentPageSettingData.name||"",class:"page-designer-header",onGoBack:e.gotoBack},{title:Object(a["withCtx"])(({title:t})=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(`${e.$translate("历史版本")} - ${t}`),1),Object(a["createVNode"])(l,{content:"历史版本仅保存正式发布过的页面版本。"})]),toolbar:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{"confirm-callback":e.recover,text:e.$translate("确认要恢复吗?")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{disabled:e.realDisabled,loading:e.loading.recover,icon:"oinone-zhongzhi",type:"primary",onClick:t[0]||(t[0]=Object(a["withModifiers"])(()=>{},["stop"]))},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("恢复此版本")),1)]),_:1},8,["disabled","loading"])]),_:1},8,["confirm-callback","text"])]),_:1},8,["title","onGoBack"])}Qh.render=Jh,Qh.__file="src/view/page-history/component/header/header.vue";const Xh=i["HttpClient"].getInstance(),Zh="uiDesigner";class ef{static fetchHistoryList(e,t,o){return J(this,void 0,void 0,(function*(){const n=`{\n\tuiDesignerViewLayoutHistoryQuery {\n\t\tqueryPage(\n\t\t\tpage: {\n\t\t\t\tsize: ${t}\n\t\t\t\tcurrentPage: ${e}\n\t\t\t\tsort: {\n\t\t\t\t\torders: [\n\t\t\t\t\t\t{ field: "createDate", direction: DESC }\n\t\t\t\t\t\t{ field: "id", direction: DESC }\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t\tqueryWrapper: { rsql: "${o}" }\n\t\t) {\n\t\t\tcontent {\n\t\t\t\tid\n\t\t\t\tlayoutId\n\t\t\t\tversion\n\t\t\t\tversionName\n\t\t\t\tcreateDate\n\t\t\t\tcreateUserName\n\t\t\t}\n\t\t}\n\t}\n}\n`;return i["CastHelper"].cast((yield Xh.query(Zh,n)).data.uiDesignerViewLayoutHistoryQuery.queryPage)}))}static fetchHistoryInfoById(e){return J(this,void 0,void 0,(function*(){const t=`{\n\tuiDesignerViewLayoutProxyQuery {\n\t\tqueryByHistoryId(request: { historyId: ${e} }) {\n\t\t  designerJson\n\t\t\tmodelDefinitions {\n\t\t\t\tmodel\n\t\t\t\tdisplayName\n\t\t\t}\n\t\t}\n\t}\n}\n`;return i["CastHelper"].cast((yield Xh.query(Zh,t)).data.uiDesignerViewLayoutProxyQuery.queryByHistoryId)}))}static update(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerViewLayoutHistoryMutation {\n\t\tupdate(data: { id: "${e.id}", versionName: "${e.versionName}" }) {\n\t\t\tid\n\t\t}\n\t}\n}\n`;return i["CastHelper"].cast((yield Xh.query(Zh,t)).data.uiDesignerViewLayoutHistoryMutation.update)}))}static recover(e){return J(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerViewLayoutHistoryMutation {\n\t\trestore(history: { id: "${e}" }) {\n\t\t\tid\n\t\t}\n\t}\n}\n`;return i["CastHelper"].cast((yield Xh.query(Zh,t)).data.uiDesignerViewLayoutHistoryMutation.restore)}))}}const tf={currentPage:1,size:50};var of=Object(a["defineComponent"])({name:"PageHistory",components:{OioInput:r["OioInput"],OioInputSearch:r["OioInputSearch"],OioIcon:r["OioIcon"],OioButton:r["OioButton"],AList:B["a"],AListItem:_["a"]},props:{lastedVersion:{type:Object},currentVersion:{type:Object}},emits:["select"],setup(e,t){const o=Object(a["ref"])(!1),r=Object(a["ref"])([]),l=Object(a["ref"])(""),s=Object(a["ref"])(!1);let c=Object.assign({},tf);const d=(e,t)=>{t.visibleToolbar=!0},u=(e,t)=>{t.visibleToolbar=!1},b=(e,t)=>{t.editValue=t.versionName,t.isEditTitle=!0,s.value=!0},g=(e,t)=>{t.editValue===t.versionName?(t.isEditTitle=!1,s.value=!1):(o.value=!0,ef.update({id:t.id,versionName:t.editValue}).then(()=>{t.versionName=t.editValue,t.isEditTitle=!1,s.value=!1}).finally(()=>{o.value=!1}))},v=t=>{var o;return(null===(o=e.currentVersion)||void 0===o?void 0:o.id)===t.id},m=t=>{var o,i;return!s.value&&(!((null===(o=e.currentVersion)||void 0===o?void 0:o.id)!==t.id&&!t.visibleToolbar)&&(null===(i=e.lastedVersion)||void 0===i?void 0:i.id)!==t.id)},y=(e,o)=>{t.emit("select",e,o)},h=(t,n)=>{const a=e.lastedVersion;if(!a)return;o.value=!0;let l=`layoutId == '${a.layoutId}'`;n&&(n=i["GraphqlHelper"].serializableString(n),l=`${l} and versionName =like= \\"%${n}%\\"`),t&&(c=Object.assign({},tf)),ef.fetchHistoryList(c.currentPage,c.size,l).then(e=>{t?(c.total=e.totalElements,r.value=[a,...e.content]):r.value=[...r.value,...e.content]}).finally(()=>{o.value=!1})},f=Object(a["computed"])(()=>!!c.total&&r.value.length<c.total),O=()=>{c.currentPage+=1,h(!1,l.value)};return Object(a["watch"])(l,Object(p["a"])(e=>{h(!0,e)},500)),Object(a["watch"])(()=>e.lastedVersion,()=>{h(!0)}),Object(a["onMounted"])(()=>{h(!0)}),{CURRENT_VERSION:n["h"],loading:o,list:r,searchValue:l,onEditVersionNameBlur:g,onMouseenter:d,onMouseleave:u,onClickEdit:b,isActive:v,isVisibleToolbar:m,onSelect:y,hasMore:f,loadMore:O}}});const nf={class:"page-history-list"},rf={class:"page-history-list-search"},af={class:"page-history-list-item-toolbar"},lf=["title"],sf={key:1},cf={key:0,class:"page-history-list-item-content"};function df(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-input-search"),s=Object(a["resolveComponent"])("oio-button"),c=Object(a["resolveComponent"])("oio-input"),d=Object(a["resolveComponent"])("a-list-item"),u=Object(a["resolveComponent"])("a-list");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",nf,[Object(a["createElementVNode"])("div",rf,[Object(a["createVNode"])(l,{value:e.searchValue,"onUpdate:value":t[0]||(t[0]=t=>e.searchValue=t),"allow-clear":"",placeholder:e.$translate("请输入版本名称"),style:{width:"100%"}},null,8,["value","placeholder"])]),Object(a["createVNode"])(u,{bordered:!1,"data-source":e.list,loading:e.loading,split:!1,class:"page-history-list-content oio-scrollbar","item-layout":"vertical"},Object(a["createSlots"])({renderItem:Object(a["withCtx"])(({item:o})=>[Object(a["createVNode"])(d,{class:Object(a["normalizeClass"])(["page-history-list-item",e.isActive(o)?"page-history-list-item-active":"",o.versionName?"page-history-list-item-has-title":""]),onClick:t=>e.onSelect(t,o),onMouseenter:t=>e.onMouseenter(t,o),onMouseleave:t=>e.onMouseleave(t,o)},{default:Object(a["withCtx"])(()=>[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",af,[Object(a["createVNode"])(s,{icon:"oinone-xiugai1",type:"link",onClick:Object(a["withModifiers"])(t=>e.onClickEdit(t,o),["stop"])},null,8,["onClick"])],512),[[a["vShow"],e.isVisibleToolbar(o)]]),Object(a["createElementVNode"])("div",{title:o.id===e.CURRENT_VERSION?e.$translate(o.versionName):o.versionName,class:"page-history-list-item-title"},[o.isEditTitle?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,value:o.editValue,"onUpdate:value":e=>o.editValue=e,maxlength:128,autofocus:!0,placeholder:e.$translate("请输入版本名称"),onBlur:t=>e.onEditVersionNameBlur(t,o),onPressEnter:t[1]||(t[1]=e=>e.target.blur()),onClick:t[2]||(t[2]=Object(a["withModifiers"])(()=>{},["stop"]))},null,8,["value","onUpdate:value","placeholder","onBlur"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",sf,Object(a["toDisplayString"])((o.id===e.CURRENT_VERSION?e.$translate(o.versionName):o.versionName)||""),1))],8,lf),o.id!==e.CURRENT_VERSION?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",cf,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(o.createDate),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(o.createUserName||""),1)])):Object(a["createCommentVNode"])("v-if",!0)]),_:2},1032,["class","onClick","onMouseenter","onMouseleave"])]),_:2},[e.hasMore?{name:"loadMore",fn:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{onClick:e.loadMore},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("加载更多")),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["data-source","loading"])])}function uf(e,t){const o=Object(a["ref"])(void 0),r=Object(a["ref"])(void 0),l=Object(a["ref"])([]),s=(e,t)=>{const a={id:n["h"],layoutId:e,designerJson:Object(n["Vb"])(t),version:n["h"],versionName:n["i"],createDate:i["DateUtil"].dateFormat(new Date,i["defaultFormat"])};o.value=a,r.value=a,l.value=[a]},c=o=>{e(o);const i=o.designerData;i||o.designerJson&&(o.designerData=JSON.parse(JSON.parse(o.designerJson))),r.value=o,t(o)};return{lastedVersion:o,currentVersion:r,historyVersionInit:s,switchVersion:c}}of.render=df,of.__file="src/view/page-history/component/page-history-list/page-history-list.vue";const pf=316,bf=300;function gf(e){const{visible:t}=e,o=Object(a["ref"])(!0),i=Object(a["ref"])(pf+"px"),n=()=>{let e=pf;t.rightDrawer&&o.value&&(e+=bf),i.value=e+"px"};return{isRightDrawerAnchored:o,contentOtherWidth:i,computeLayout:n}}function vf(){const e=Object(a["reactive"])({leftDrawer:!1,content:!1,rightDrawer:!1}),t=Object(a["ref"])(void 0),o=Object(a["reactive"])({rightDrawer:!1}),i=Object(a["computed"])(()=>!e.leftDrawer&&!e.content&&!e.rightDrawer),n=Object(a["ref"])(void 0),r=Object(a["ref"])(),l=Object(a["ref"])("");return{loading:e,visible:o,viewType:t,isReady:i,designerData:n,widgetInstanceRoot:r,protocolVersion:l}}function mf(){const e=Object(a["ref"])(new Map),t=Object(a["ref"])(new Map),o=Object(a["ref"])(new Map),i=(i,r)=>{const{categoryGroup:a,widgetNameGroup:l,widgetTypeGroup:s}=Object(n["Gb"])(i,r);e.value=a,t.value=l,o.value=s};return{widgetCategoryGroup:e,widgetNameGroup:t,widgetTypeGroup:o,initWidgetGroup:i}}const yf=Object(a["defineComponent"])({name:"PageHistoryList",components:{OioTooltip:r["OioTooltip"],OioTooltipHelp:r["OioTooltipHelp"],OioButton:r["OioButton"],OioIcon:r["OioIcon"],OioSpin:r["OioSpin"],PageHistory:of,AnchorDrawer:n["d"],WidgetSetting:Bg,DesignerHeader:Qh,DesignerDraggable:n["t"]},inheritAttrs:!1,props:{layoutId:{type:String,required:!0},initForm:{type:Function,required:!0},destroyForm:{type:Function,required:!0},setDesignerFieldReference:{type:Function,required:!0},goBackToViewDesignEdit:{type:Function}},setup(e){const t=Object(a["ref"])(),o=Object(a["ref"])(),l=Object(a["ref"])(),s=vf(),{loading:c,visible:d,viewType:p,isReady:b,designerData:g,widgetInstanceRoot:v,protocolVersion:m}=s,{widgetCategoryGroup:y,widgetNameGroup:h,widgetTypeGroup:f,initWidgetGroup:O}=mf(),{isRightDrawerAnchored:w,contentOtherWidth:j,computeLayout:k}=gf(s),C=Object(a["ref"])(void 0),D=Object(a["computed"])(()=>C.value&&Object.keys(C.value).length>=1),T=()=>{C.value=void 0,e.destroyForm()},{lastedVersion:$,currentVersion:E,historyVersionInit:S,switchVersion:N}=uf(()=>{T()},e=>{V.value=e.designerData}),V=Object(a["computed"])({get(){return g.value},set(e){g.value=e,v.value=e?Object(n["Ib"])(f.value,e):void 0}}),{hasOpenModal:x,isAllowOpenDesignerModal:I,isReadyOpenDesignerModal:M,onOpenDesignerModal:A}=Jg({currentSelectedInstance:C,widgetNameGroup:h,widgetTypeGroup:f}),{hasOpenDrawer:F,isAllowOpenDesignerDrawer:L,isReadyOpenDesignerDrawer:R,onOpenDesignerDrawer:B}=qg({currentSelectedInstance:C,widgetNameGroup:h,widgetTypeGroup:f}),{isAllowPreviewDesignerConfirm:_,onOpenDesignerConfirm:W}=Kg(C),P=Object(a["computed"])(()=>p.value===i["ViewType"].Gallery),{isShowCardDesign:z,cardWidgetInstanceRoot:G}=Ug(i["CastHelper"].cast(s)),U=e=>{z.value=e.target.value},K=Object(a["ref"])({}),q=Object(a["ref"])({}),H=Object(a["ref"])(""),Y=Object(a["ref"])([]),Q=Object(a["computed"])(()=>Object(n["hc"])(C.value));Object(a["onMounted"])(()=>{Object(a["nextTick"])(()=>X(e.layoutId,!0))});const X=(e,t)=>J(this,void 0,void 0,(function*(){c.leftDrawer=!0,c.content=!0,c.rightDrawer=!0;try{const o=yield n["yb"].INSTANCE.get(),r=yield Qt(e),{widgetDefinitionList:a=[],widgetList:l=[]}=o,{viewType:s,viewTitle:d="",viewName:u="",viewDescription:b="",viewCategoryId:g="",viewThumbnail:v="",designerJson:y,module:h="",modules:f=[],protocolVersion:w}=r;p.value=s,O(a,l),K.value={name:d||u||Object(i["translateValueByKey"])("未命名视图"),description:b,currentCategoryId:g,thumbnailUrl:v},q.value=Object.assign({},K.value);const j=JSON.parse(y);V.value=j,S(e,j),t&&(H.value=h,Y.value=f),m.value=w||""}finally{c.leftDrawer=!1,c.content=!1,c.rightDrawer=!1}})),Z=(o,i,l)=>{var s;Object(u["a"])(l)&&(l=o.element.initialization),Object(a["nextTick"])(()=>{d.rightDrawer=!0,k()}),c.content=!0,c.rightDrawer=!0,r["Optional"].ofNullable(Object(n["sc"])(o,e.layoutId,null===(s=E.value)||void 0===s?void 0:s.version)).ifPresent(t=>{e.setDesignerFieldReference(t)}),e.initForm(o,i,!0).then(({propertiesSettingFormWidget:e,metadataSettingFormWidget:i})=>{const{isDialog:r,isDrawer:a,isRowAction:l,isInContainer:s,widgetViewType:c,widgetName:d,elementSource:u}=Object(n["uc"])(o);i&&(o.metadata=i.getData(),o.metadata[n["yc"]]=r,o.metadata[n["Ac"]]=a,o.metadata[n["Dc"]]=l,o.metadata[n["Cc"]]=s,o.metadata[n["Pc"]]=o.element.model,o.metadata[n["rd"]]=c,o.metadata[n["td"]]=d,o.metadata[n["cc"]]=u),e&&(o.element.properties=e.getData(),o.element.properties[n["Oc"]]=o.metadata,o.element.properties[n["yc"]]=r,o.element.properties[n["Ac"]]=a,o.element.properties[n["Dc"]]=l,o.element.properties[n["Cc"]]=s,o.element.properties[n["Pc"]]=o.element.model,o.element.properties[n["rd"]]=c,o.element.properties[n["td"]]=d,o.element.properties[n["cc"]]=u),t.value&&t.value.refreshTabSelectData(o),C.value=o}).finally(()=>{c.content=!1,c.rightDrawer=!1})},te=(e,t)=>{T(),e&&Z(e,!1,t)},oe=()=>{c.leftDrawer=!0,c.content=!0,c.rightDrawer=!0,ef.recover(E.value.id).then(()=>{r["OioNotification"].success(Object(i["translateValueByKey"])("成功"),Object(i["translateValueByKey"])("恢复成功")),history.go(-1)}).finally(()=>{c.leftDrawer=!1,c.content=!1,c.rightDrawer=!1})},ie=e=>{Object(a["nextTick"])(()=>{w.value=e,k()})},ne=()=>{Object(a["nextTick"])(()=>{d.rightDrawer=!0,k()})},re=()=>{T(),Object(a["nextTick"])(()=>{d.rightDrawer=!1,k()})},ae=(e,t)=>{if(E.value=t,c.leftDrawer=!0,c.content=!0,re(),t.designerJson||t.designerData)try{N(t)}finally{c.leftDrawer=!1,c.content=!1}else ef.fetchHistoryInfoById(t.id).then(e=>{t.designerData=JSON.parse(e.designerJson),N(t)}).finally(()=>{c.leftDrawer=!1,c.content=!1})},{browserCopyAndNotify:le}=Object(i["useCopy"])(),se=e=>{le(e.target.innerText)};return Object(n["jd"])(Object.assign(Object.assign({},Object(n["fd"])()),{viewClientType:Object(a["computed"])(()=>i["ViewClientType"].PC),isPreviewHistory:Object(a["computed"])(()=>!0),protocolVersion:Object(a["computed"])(()=>m.value),loadingState:Object(a["computed"])(()=>c.content),getContentContainerHTMLElement:()=>o.value,getContainerHTMLElement:()=>o.value})),ee({currentSelectedInstance:Object(a["computed"])(()=>C.value),widgetNameGroup:Object(a["computed"])(()=>h.value),widgetTypeGroup:Object(a["computed"])(()=>f.value),onSelectCurrentInstance:te}),{DEFAULT_BRAND_LOGO:i["DEFAULT_BRAND_LOGO"],widgetSettingRef:t,designerContentRef:o,designerContentBodyRef:l,loading:c,visible:d,isReady:b,designerData:V,widgetInstanceRoot:v,widgetCategoryGroup:y,widgetNameGroup:h,widgetTypeGroup:f,hasOpenModal:x,isAllowOpenDesignerModal:I,isReadyOpenDesignerModal:M,onOpenDesignerModal:A,hasOpenDrawer:F,isAllowOpenDesignerDrawer:L,isReadyOpenDesignerDrawer:R,onOpenDesignerDrawer:B,isAllowPreviewDesignerConfirm:_,onOpenDesignerConfirm:W,showCardDesignOptions:Gg,isShowCardDesignVisible:P,isShowCardDesign:z,cardWidgetInstanceRoot:G,switchCardDesign:U,isRightDrawerAnchored:w,contentOtherWidth:j,currentSelectedInstance:C,hasSelectedInstance:D,originPageSettingData:K,currentPageSettingData:q,currentModule:H,currentModules:Y,rightDrawerTitle:Q,onSelectInstance:te,onRecoverView:oe,onRightDrawerAnchored:ie,onRightDrawerOpened:ne,onRightDrawerClosed:re,onSelectVersion:ae,onCopy:se,lastedVersion:$,currentVersion:E}}}),hf=()=>{Object(a["useCssVars"])(e=>({"445979cd-contentOtherWidth":e.contentOtherWidth}))},ff=yf.setup;yf.setup=ff?(e,t)=>(hf(),ff(e,t)):hf;const Of={class:"page-designer page-history"},wf={class:"page-designer-content"},jf={key:0,class:"page-designer-gallery-card-design ui-designer-short-radio"},kf={class:"page-designer-gallery-card-design-content"},Cf={class:"page-designer-main-content"},Df={class:"designer-widget-aside designer-widget-aside-left"},Tf={ref:"designerContentRef",class:"designer-main-content"},$f={key:0,class:"designer-content-mask"},Ef={class:"designer-widget-aside designer-widget-aside-right"},Sf={class:"designer-widget-aside-right-anchor-drawer-header"},Nf=["title"],Vf={key:1,class:"designer-widget-aside-right-anchor-drawer-header-widget"},xf={key:2},If={class:"designer-widget-aside-right-anchor-drawer-header-data-name"},Mf={key:0,class:"designer-properties-setting-form-button"},Af={key:0},Ff={key:1},Lf={key:2},Rf={key:1,class:"designer-widget-not-selected"},Bf=Object(a["createElementVNode"])("br",null,null,-1);function _f(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("designer-header"),s=Object(a["resolveComponent"])("oio-icon"),c=Object(a["resolveComponent"])("a-radio-button"),d=Object(a["resolveComponent"])("a-radio-group"),u=Object(a["resolveComponent"])("page-history",!0),p=Object(a["resolveComponent"])("designer-draggable"),b=Object(a["resolveComponent"])("oio-spin"),g=Object(a["resolveComponent"])("oio-tooltip-help"),v=Object(a["resolveComponent"])("oio-tooltip"),m=Object(a["resolveComponent"])("oio-button"),y=Object(a["resolveComponent"])("widget-setting"),h=Object(a["resolveComponent"])("anchor-drawer");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Of,[Object(a["createVNode"])(l,{"current-page-setting-data":e.currentPageSettingData,"current-version":e.currentVersion,disabled:!e.isReady,recoverView:e.onRecoverView,onGoBack:e.goBackToViewDesignEdit},null,8,["current-page-setting-data","current-version","disabled","recoverView","onGoBack"]),Object(a["createElementVNode"])("div",wf,[e.isShowCardDesignVisible?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jf,[Object(a["createVNode"])(d,{value:e.isShowCardDesign,onChange:e.switchCardDesign},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.showCardDesignOptions,t=>(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:t.key,value:t.value},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",kf,[Object(a["createVNode"])(s,{icon:t.icon},null,8,["icon"]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate(t.label)),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])])):Object(a["createCommentVNode"])("v-if",!0),Object(a["createElementVNode"])("div",Cf,[Object(a["createElementVNode"])("div",Df,[Object(a["createVNode"])(u,{"current-version":e.currentVersion,"lasted-version":e.lastedVersion,onSelect:e.onSelectVersion},null,8,["current-version","lasted-version","onSelect"])]),Object(a["createElementVNode"])("div",Tf,[e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$f)):Object(a["createCommentVNode"])("v-if",!0),(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:e.layoutId,ref:"designerContentBodyRef",class:Object(a["normalizeClass"])(["designer-main-content-body","oio-scrollbar",e.hasOpenModal||e.hasOpenDrawer||e.isShowCardDesign?"designer-main-content-body-pointer-events-none":""])},[Object(a["createVNode"])(b,{loading:e.loading.content},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{"current-selected":e.currentSelectedInstance,data:e.widgetInstanceRoot,"focus-data":e.cardWidgetInstanceRoot,"is-focus-designer":e.isShowCardDesign,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:e.onSelectInstance},null,8,["current-selected","data","focus-data","is-focus-designer","widget-category-group","widget-name-group","widget-type-group","onSelectedChange"])]),_:1},8,["loading"])],2))],512),Object(a["createElementVNode"])("div",Ef,[Object(a["createVNode"])(h,{class:Object(a["normalizeClass"])([e.hasSelectedInstance?"":"designer-widget-not-selected-drawer"]),loading:e.loading.rightDrawer,visible:e.visible.rightDrawer,"anchor-class-name":"designer-widget-aside-absolute","default-anchor":"",width:"300px",onOnAnchored:e.onRightDrawerAnchored,onOnClosed:e.onRightDrawerClosed,onOnOpened:e.onRightDrawerOpened},{header:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",Sf,[e.rightDrawerTitle.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"designer-widget-aside-right-anchor-drawer-header-field",title:e.$translate(e.rightDrawerTitle.title)},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.title)),9,Nf)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.widgetDisplayName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Vf,Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.widgetDisplayName)),1)):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",xf,[Object(a["createVNode"])(g,{content:e.rightDrawerTitle.help},null,8,["content"])])):Object(a["createCommentVNode"])("v-if",!0),e.rightDrawerTitle.dataName?(Object(a["openBlock"])(),Object(a["createBlock"])(v,{key:3,title:e.rightDrawerTitle.dataName,placement:"bm"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",If,[Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=(...t)=>e.onCopy&&e.onCopy(...t))},Object(a["toDisplayString"])(e.$translate(e.rightDrawerTitle.dataName)),1)])]),_:1},8,["title"])):Object(a["createCommentVNode"])("v-if",!0)])]),default:Object(a["withCtx"])(()=>[e.hasSelectedInstance?(Object(a["openBlock"])(),Object(a["createBlock"])(y,{key:0,ref:"widgetSettingRef","current-instance":e.currentSelectedInstance},{propertiesSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"propertiesSettingForm"),e.isAllowPreviewDesignerConfirm||e.isAllowOpenDesignerModal||e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mf,[e.isAllowPreviewDesignerConfirm?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Af,[Object(a["createVNode"])(m,{type:"link",onClick:e.onOpenDesignerConfirm},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("预览二次确认")),1)]),_:1},8,["onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerModal?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ff,[Object(a["createVNode"])(m,{loading:!e.isReadyOpenDesignerModal,style:{width:"100%"},type:"default",onClick:e.onOpenDesignerModal},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("查看弹窗")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0),e.isAllowOpenDesignerDrawer?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Lf,[Object(a["createVNode"])(m,{loading:!e.isReadyOpenDesignerDrawer,style:{width:"100%"},type:"default",onClick:e.onOpenDesignerDrawer},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$translate("查看抽屉")),1)]),_:1},8,["loading","onClick"])])):Object(a["createCommentVNode"])("v-if",!0)])):Object(a["createCommentVNode"])("v-if",!0)]),metadataSettingForm:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"metadataSettingForm")]),_:3},8,["current-instance"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Rf,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{icon:"oinone-shuxingshezhikongyemian",size:"60px"}),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("请在左侧画布中选择组件"))+" ",1),Bf,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.$translate("设置或查看其属性")),1)])]))]),_:3},8,["class","loading","visible","onOnAnchored","onOnClosed","onOnOpened"])])])])])}yf.render=_f,yf.__file="src/view/page-history/PageHistory.vue";let Wf=class extends Gv{initialize(e){return super.initialize(e),this.setComponent(yf),this}goBackToViewDesignEdit(){this.goToViewDesignEdit(this.layoutId)}};Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Wf.prototype,"goBackToViewDesignEdit",null),Wf=Y([i["SPI"].ClassFactory(i["MaskWidget"].Token({widget:"PageHistoryList"}))],Wf);var Pf=Object(a["defineComponent"])({name:"UiDesigner",components:{OioTooltip:r["OioTooltip"]},inheritAttrs:!1,props:{tabs:{type:Array},activeTab:{type:String},onClickTab:{type:Function}},setup(e){const t=t=>{const o=e.activeTab;return null!=o&&-1!==t.indexOf(o)},o=e=>!e.disabled,i=o=>{var i;if(o.disabled)return;let n=o.data.id;Array.isArray(n)&&(n=n[0]),t(n)||null===(i=e.onClickTab)||void 0===i||i.call(e,n)};return{isActiveTab:t,isAllowClick:o,onSelectTab:i}}});const zf={class:"ui-designer"},Gf={class:"ui-designer-header"},Uf={class:"ui-designer-tabs"},Kf=["onClick"];function qf(e,t,o,i,n,r){const l=Object(a["resolveComponent"])("oio-tooltip");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zf,[Object(a["createElementVNode"])("div",Gf,[Object(a["createElementVNode"])("div",Uf,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.tabs,t=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t.key,class:Object(a["normalizeClass"])(["ui-designer-tab",e.isAllowClick(t)&&"ui-designer-tab-allow-click",e.isActiveTab(t.key)&&"ui-designer-tab-active"]),onClick:()=>e.onSelectTab(t)},[Object(a["createVNode"])(l,{disabled:!t.disabled,title:e.$translate(t.data.help),placement:"tm"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.$translate(t.label)),1)]),_:2},1032,["disabled","title"])],10,Kf))),128))])]),Object(a["renderSlot"])(e.$slots,"default")])}Pf.render=qf,Pf.__file="src/view/ui-desinger/UiDesigner.vue";let Hf=class extends i["MaskWidget"]{constructor(){super(...arguments),this.matchedSub=null,this.uiDesignerServer=i["SPI"].RawInstantiate(l["Q"]),this.currentTheme=[]}get tabs(){var e;return null===(e=this.uiDesignerServer)||void 0===e?void 0:e.getTabs().map(e=>{const t=Array.isArray(e.id)?e.id.join("#"):e.id;return{key:t,value:t,label:e.name,disabled:e.disabled,data:e}})}initialize(e){return super.initialize(e),this.setComponent(Pf),this}onClickTab(e){l["P"].jumpTo(this.router,e)}renderTabWidgets(){var e;null===(e=this.contentWidget)||void 0===e||e.dispose(),this.contentWidget=void 0;const{page:t}=this.matched.segmentParams,o=l["R"].Selector({actionName:t.action,tab:this.activeTab});o&&(this.contentWidget=this.createWidget(o))}mounted(){this.router=Object(i["useRouter"])().router;const{matched:e}=Object(i["useMatched"])();this.matched=e;const{page:t}=e.segmentParams;this.activeTab=t.tab||l["L"].PAGE,this.matchedSub=Object(i["useMatched"])().getMatched$().subscribe(e=>{var t;const o=null===(t=e.segmentParams)||void 0===t?void 0:t.page.tab;o&&this.activeTab!==o&&(this.activeTab=o,this.renderTabWidgets())}),this.renderTabWidgets()}unmounted(){var e;null===(e=this.matchedSub)||void 0===e||e.unsubscribe()}$$mounted(){const e=Object.create(null,{$$mounted:{get:()=>super.$$mounted}});return J(this,void 0,void 0,(function*(){e.$$mounted.call(this),this.currentTheme=Object(i["getCurrentTheme"])(),i["OioProvider"].setTheme([i["DefaultThemeName"].DEFAULT_LARGE])}))}$$beforeUnmount(){const e=Object.create(null,{$$beforeUnmount:{get:()=>super.$$beforeUnmount}});return J(this,void 0,void 0,(function*(){e.$$beforeUnmount.call(this),i["OioProvider"].setTheme(this.currentTheme)}))}};Y([i["Widget"].Reactive(),Q("design:type",String)],Hf.prototype,"activeTab",void 0),Y([i["Widget"].Reactive(),Q("design:type",Object),Q("design:paramtypes",[])],Hf.prototype,"tabs",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[String]),Q("design:returntype",void 0)],Hf.prototype,"onClickTab",null),Y([i["Widget"].Method(),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],Hf.prototype,"renderTabWidgets",null),Hf=Y([i["SPI"].ClassFactory(i["MaskWidget"].Token({widget:"UiDesigner"}))],Hf)}).call(this,o("c8ba"))},2695:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var i=o("9127"),n=o("3af9"),r=o("7a23"),a=o("b90b");n["q"].register(`${n["B"].VIEW}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-96f04202").then(o.bind(null,"cc09")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].FORM}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-96f04202").then(o.bind(null,"cc09")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DETAIL}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-96f04202").then(o.bind(null,"cc09")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].SEARCH}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-96f04202").then(o.bind(null,"cc09")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TABLE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-71c78e79"),o.e("chunk-3b01d934")]).then(o.bind(null,"bff7")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].FORM}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-ced8d26a").then(o.bind(null,"b919")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DETAIL}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-d8646a60").then(o.bind(null,"3b687")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].SEARCH}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-71c78e79"),o.e("chunk-00fff913")]).then(o.bind(null,"74f2")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].GALLERY}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-b9e4bc46").then(o.bind(null,"7e45")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].ACTION_BAR}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0c1947").then(o.bind(null,"473a")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TREE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0dd47c").then(o.bind(null,"815b")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CARD}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-7a1095a3").then(o.bind(null,"fbe9")))),n["q"].register(`${n["A"].CARD}#${n["A"].TITLE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-8de0a7ea").then(o.bind(null,"89aa")))),n["q"].register(`${n["A"].CARD}#${n["A"].CONTENT}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-73fb9fc4").then(o.bind(null,"3184")))),n["q"].register(`${n["A"].CARD}#${n["A"].ROW_ACTIONS}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0e62d2").then(o.bind(null,"9841")))),n["q"].register(`${n["A"].CARD}#${n["A"].TITLE_TOOLBAR}#${i["N"].MOBILE}`,n["q"].fetchFragment()),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CARD_CASCADER}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0a43cd").then(o.bind(null,"061b")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DROPDOWN}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-2d21b0aa"),o.e("chunk-2d0de908")]).then(o.bind(null,"85d9")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TOOLBAR_DROPDOWN}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-2d21b0aa"),o.e("chunk-2d0e28d0")]).then(o.bind(null,"7ed0")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATETIME_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-5aec29de").then(o.bind(null,"f448")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATE_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-5aec29de"),o.e("chunk-2d0c4ab0")]).then(o.bind(null,"3c8b")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TIME_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-5aec29de"),o.e("chunk-2d2176f8")]).then(o.bind(null,"c75c")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].YEAR_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>Promise.all([o.e("chunk-5aec29de"),o.e("chunk-2d0b1bac")]).then(o.bind(null,"20a9")))),n["q"].register(`${n["B"].PACK}#${n["A"].ROW}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d2293a8").then(o.bind(null,"dd0b")))),n["q"].register(`${n["B"].PACK}#${n["A"].COL}#${i["N"].MOBILE}`,n["q"].fetchFragment()),n["q"].register(`${n["B"].PACK}#${n["A"].BLOCK}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d2293a8").then(o.bind(null,"dd0b")))),n["q"].register(`${n["B"].PACK}#${n["A"].GROUP}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-cd4fa762").then(o.bind(null,"172e")))),n["q"].register(`${n["B"].PACK}#${n["A"].TABS}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-4954664a").then(o.bind(null,"0d7a")))),n["q"].register(`${n["B"].PACK}#${n["A"].TAB}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-39ba76f5").then(o.bind(null,"d3ae")))),n["q"].register(`${n["B"].PACK}#${n["A"].CONTAINERS}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-f4ca2a30").then(o.bind(null,"ecf4")))),n["q"].register(`${n["B"].PACK}#${n["A"].CONTAINER}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-49019409").then(o.bind(null,"723c")))),n["q"].register(`${n["B"].PACK}#${n["A"].MODAL}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-06ab6347").then(o.bind(null,"b30d")))),n["q"].register(`${n["A"].MODAL}#${n["A"].FOOTER}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d217a69").then(o.bind(null,"c842")))),n["q"].register(`${n["B"].PACK}#${n["A"].DRAWER}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-1f0081db").then(o.bind(null,"8d12")))),n["q"].register(`${n["A"].DRAWER}#${n["A"].FOOTER}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d217a69").then(o.bind(null,"c842")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].CHART}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-4fcf85c6").then(o.bind(null,"0ef3")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].REPORT}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-4fcf85c6").then(o.bind(null,"0ef3")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].DATA_DASHBOARD}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-4fcf85c6").then(o.bind(null,"0ef3")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].PARAGRAPH}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-77131672").then(o.bind(null,"bae13")))),n["q"].register(`${n["B"].ELEMENT}#${n["A"].TEXT_INFO}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0c49e5").then(o.bind(null,"3c32")))),n["q"].register(`${n["B"].FIELD}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-52fdbbfc").then(o.bind(null,"3767")))),n["q"].register(`${n["B"].FIELD}#${n["A"].DATETIME_COUNTDOWN}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d207eb9").then(o.bind(null,"a31b")))),n["q"].register(`${n["B"].FIELD}#${n["A"].DATE_COUNTDOWN}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d207eb9").then(o.bind(null,"a31b")))),n["q"].register(`${n["B"].ACTION}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d21b0aa").then(o.bind(null,"bda3")))),n["q"].register(`${n["A"].TABLE}#${n["B"].FIELD}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d21dfe8").then(o.bind(null,"d457")))),n["q"].register(`${n["A"].TABLE}#${n["A"].DATETIME_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-0d319a46").then(o.bind(null,"06cc")))),n["q"].register(`${n["A"].TABLE}#${n["A"].DATE_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-0d319a46").then(o.bind(null,"06cc")))),n["q"].register(`${n["A"].TABLE}#${n["A"].TIME_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-0d319a46").then(o.bind(null,"06cc")))),n["q"].register(`${n["A"].TABLE}#${n["A"].YEAR_RANGE}#${i["N"].MOBILE}`,Object(r["defineAsyncComponent"])(()=>o.e("chunk-0d319a46").then(o.bind(null,"06cc"))));const l={components:{OioRow:a["cb"],OioCol:a["y"]},props:{currentInstance:{type:Object,required:!0}},methods:{allowWrap(){return!0},useFullSpan(){const{isCard:e}=Object(n["ed"])();return e.value},extendRowData(){return{}},extendColData(){return{}},colComponentData(e){const t=n["O"].fetchColComponentData(e,e.level,void 0,this.useFullSpan(),void 0,!0);return Object.assign(Object.assign({},t),{span:24,fixed:!1})},mapper({element:e,index:t}){return{element:e,index:t,colData:this.colComponentData(e)}}},computed:{rowComponentData(){const e=Object.assign(Object.assign({},n["O"].fetchRowComponentData(this.currentInstance,this.currentInstance.level,i["L"].parse(this.$attrs.style),this.allowWrap())),this.extendRowData()||{});return e.style=Object.assign(Object.assign({},e.style),{gap:"unset",rowGap:"12px"}),e}}}},"3a43":function(e,t,o){"use strict";o.d(t,"a",(function(){return i["a"]})),o.d(t,"d",(function(){return n["a"]})),o.d(t,"e",(function(){return r["a"]})),o.d(t,"b",(function(){return a["a"]})),o.d(t,"o",(function(){return l["a"]})),o.d(t,"p",(function(){return s["a"]})),o.d(t,"k",(function(){return c["a"]})),o.d(t,"j",(function(){return d["a"]})),o.d(t,"n",(function(){return u["a"]})),o.d(t,"s",(function(){return p["a"]})),o.d(t,"m",(function(){return b["a"]})),o.d(t,"f",(function(){return g["a"]})),o.d(t,"g",(function(){return v["a"]})),o.d(t,"q",(function(){return m["a"]})),o.d(t,"r",(function(){return y["a"]})),o.d(t,"h",(function(){return h["a"]})),o.d(t,"t",(function(){return f["a"]})),o.d(t,"c",(function(){return O})),o.d(t,"i",(function(){return D})),o.d(t,"l",(function(){return T})),o.d(t,"u",(function(){return $}));var i=o("dba1"),n=o("2bd2"),r=o("a6e8"),a=o("e9b9"),l=o("17f5"),s=o("ab21"),c=o("5670"),d=o("69dd"),u=o("ebb6"),p=o("b7d7"),b=o("c351"),g=o("4f18"),v=o("3e18"),m=o("280c"),y=o("d792"),h=o("1a2de"),f=o("c4cc");class O{constructor(e){this._contextValue=e,this.value$=new i["a"](e)}initValue(e){this._contextValue=e,this.value$.next(e)}setValue(e,t){const o=Object.assign(Object.assign({},this._contextValue),{[e]:t});this._contextValue=o,this.value$.next(o)}setValues(e){const t=Object.assign(Object.assign({},this._contextValue),e);this._contextValue=t,this.value$.next(t)}getContext(){return this._contextValue}getValues(e){return e.map(e=>this._contextValue[e])}getValueByKey(e){return this._contextValue[e]}pluck(e){const t=this.value$.pipe(Object(u["a"])(t=>t[e]),Object(d["a"])((e,t)=>e===t));return t}pluckSome(e){const t=this.value$.pipe(Object(u["a"])(t=>e.map(e=>t[e])),Object(d["a"])((e,t)=>e===t));return t}subscribe(e){this.value$.pipe(Object(h["a"])(1)).subscribe(e)}unsubscribe(){this.value$&&this.value$.unsubscribe()}}const w=e=>"[object Object]"===Object.prototype.toString.call(e),j=Object.create({}),k="__OIO_ID__",C=new Map;function D(e,t){let o,i,n,r;"string"===typeof e?(o=e,i=t||j):(i=e,o=e.id||k);const a=new O({});function l(){let e,t={};"function"===typeof i.state&&(t=i.state(),e=JSON.parse(JSON.stringify(w(t)?t:{}))),a.initValue(t);const l=i.actions||{},s=i.plugins||[],c=i.getters||{},d={},u=[];Reflect.ownKeys(l).forEach(e=>{if("string"===typeof e){const t=l[e];d[e]=(...o)=>{const i=t.call({context:r},...o);return u.forEach(t=>t({type:e,payload:o},a.getContext())),i}}});const p=()=>{a.unsubscribe(),C.set(o,null)},b=t=>{const o=t||e;a.initValue(o),e=o},g=(e,...t)=>{const o=d.hasOwnProperty(e);return o&&d[e].call({context:r},...t),r};function v(e){a.subscribe(t=>{const o={};Object.keys(c).forEach(e=>{o[e]=r[e]}),e(Object.assign(Object.assign({},t),o))})}function m(e){u.push(e)}const y=new Set;n=Object.assign(Object.assign(Object.assign(Object.assign({},a.getContext()),d),c),{get _state(){return a.getContext()},get _initState(){return e},_actions:d,_p:s,_customProperties:y,id:o,dispose:p,reset:b,dispatch:g,watch:v,subscribeAction:m});const h=["_state","_initState","_actions","_p","_customProperties","id","dispose","reset","dispatch","watch","subscribeAction"],f=e=>"string"===typeof e&&h.includes(e)||d[e];function O(e){return new Proxy(e,{get(e,t,o){const i=Reflect.get(e,t,o);return f(t)||!w(i)&&!Array.isArray(i)?i:O(i)},set(e,o,i,n){if(f(o))return!1;const l=Reflect.set(e,o,i,n),s={};return Object.keys(t).forEach(e=>{s[e]=r[e]}),a.initValue(s),l}})}return r=O(n),Reflect.ownKeys(c).forEach(e=>{"string"===typeof e&&Reflect.defineProperty(r,e,{get(){return c[e](a.getContext())}})}),s.forEach(e=>{if("function"===typeof e){const t=e(r);t&&w(t)&&(y.add(t),a.setValues(t))}}),r}return l.$id=o,C.set(o,l),l}function T(e){const t=e||k;if(C.has(t)){const e=C.get(t);return e}return null}function $(){return e=>{const t=console;let o=JSON.parse(JSON.stringify(e.$state));"undefined"!==typeof t&&e.subscribeAction((e,i)=>{const n=JSON.parse(JSON.stringify(i)),r="'action' "+e.type;E(t,r,!0),t.log("%c prev state","color: #9E9E9E; font-weight: bold",o),t.log("%c action","color: #03A9F4; font-weight: bold",e),t.log("%c next state","color: #4CAF50; font-weight: bold",n),S(t),o=n})}}function E(e,t,o){const i=o?e.groupCollapsed:e.group;try{i.call(e,t)}catch(n){e.log(t)}}function S(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}},"3af9":function(e,t,o){"use strict";o.d(t,"a",(function(){return Ua})),o.d(t,"b",(function(){return Ka})),o.d(t,"c",(function(){return H})),o.d(t,"d",(function(){return Le})),o.d(t,"e",(function(){return Ve})),o.d(t,"f",(function(){return St})),o.d(t,"g",(function(){return $t})),o.d(t,"h",(function(){return ye})),o.d(t,"i",(function(){return he})),o.d(t,"j",(function(){return No})),o.d(t,"k",(function(){return Ri})),o.d(t,"l",(function(){return Pi})),o.d(t,"m",(function(){return Q})),o.d(t,"n",(function(){return dr})),o.d(t,"o",(function(){return Ha})),o.d(t,"p",(function(){return qa})),o.d(t,"q",(function(){return qi})),o.d(t,"r",(function(){return On})),o.d(t,"s",(function(){return ka})),o.d(t,"t",(function(){return Dn})),o.d(t,"u",(function(){return fn})),o.d(t,"v",(function(){return ct})),o.d(t,"w",(function(){return hn})),o.d(t,"x",(function(){return Sn})),o.d(t,"y",(function(){return yn})),o.d(t,"z",(function(){return xa})),o.d(t,"A",(function(){return ne})),o.d(t,"B",(function(){return ie})),o.d(t,"C",(function(){return Ca})),o.d(t,"D",(function(){return wn})),o.d(t,"E",(function(){return Fe})),o.d(t,"F",(function(){return X})),o.d(t,"G",(function(){return Va})),o.d(t,"H",(function(){return jn})),o.d(t,"I",(function(){return rt})),o.d(t,"J",(function(){return Ea})),o.d(t,"K",(function(){return xo})),o.d(t,"L",(function(){return vt})),o.d(t,"M",(function(){return Rt})),o.d(t,"N",(function(){return fe})),o.d(t,"O",(function(){return Po})),o.d(t,"P",(function(){return Io})),o.d(t,"Q",(function(){return Ot})),o.d(t,"R",(function(){return So})),o.d(t,"S",(function(){return nt})),o.d(t,"T",(function(){return xe})),o.d(t,"U",(function(){return te})),o.d(t,"V",(function(){return Sa})),o.d(t,"W",(function(){return Vo})),o.d(t,"X",(function(){return Dt})),o.d(t,"Y",(function(){return dt})),o.d(t,"Z",(function(){return ja})),o.d(t,"ab",(function(){return zo})),o.d(t,"bb",(function(){return oe})),o.d(t,"cb",(function(){return Et})),o.d(t,"db",(function(){return z})),o.d(t,"eb",(function(){return P})),o.d(t,"fb",(function(){return Tt})),o.d(t,"gb",(function(){return Go})),o.d(t,"hb",(function(){return Ui})),o.d(t,"ib",(function(){return Yi})),o.d(t,"jb",(function(){return F})),o.d(t,"kb",(function(){return br})),o.d(t,"lb",(function(){return L})),o.d(t,"mb",(function(){return ta})),o.d(t,"nb",(function(){return Sr})),o.d(t,"ob",(function(){return ho})),o.d(t,"pb",(function(){return Y})),o.d(t,"qb",(function(){return J})),o.d(t,"rb",(function(){return K})),o.d(t,"sb",(function(){return Z})),o.d(t,"tb",(function(){return Qi})),o.d(t,"ub",(function(){return ae})),o.d(t,"vb",(function(){return le})),o.d(t,"wb",(function(){return Gi})),o.d(t,"xb",(function(){return Ki})),o.d(t,"yb",(function(){return _})),o.d(t,"zb",(function(){return Ie})),o.d(t,"Ab",(function(){return de})),o.d(t,"Bb",(function(){return se})),o.d(t,"Cb",(function(){return Yt})),o.d(t,"Db",(function(){return Ht})),o.d(t,"Eb",(function(){return Kn})),o.d(t,"Fb",(function(){return wr})),o.d(t,"Gb",(function(){return me})),o.d(t,"Hb",(function(){return A})),o.d(t,"Ib",(function(){return Bo})),o.d(t,"Jb",(function(){return pe})),o.d(t,"Kb",(function(){return ue})),o.d(t,"Lb",(function(){return _o})),o.d(t,"Mb",(function(){return Bi})),o.d(t,"Nb",(function(){return Xr})),o.d(t,"Ob",(function(){return U})),o.d(t,"Pb",(function(){return Fi})),o.d(t,"Qb",(function(){return G})),o.d(t,"Rb",(function(){return $e})),o.d(t,"Sb",(function(){return je})),o.d(t,"Tb",(function(){return Hr})),o.d(t,"Ub",(function(){return Ma})),o.d(t,"Vb",(function(){return so})),o.d(t,"Wb",(function(){return Fa})),o.d(t,"Xb",(function(){return M})),o.d(t,"Yb",(function(){return La})),o.d(t,"Zb",(function(){return Aa})),o.d(t,"ac",(function(){return I})),o.d(t,"bc",(function(){return Ia})),o.d(t,"cc",(function(){return to})),o.d(t,"dc",(function(){return co})),o.d(t,"ec",(function(){return uo})),o.d(t,"fc",(function(){return ea})),o.d(t,"gc",(function(){return wo})),o.d(t,"hc",(function(){return fo})),o.d(t,"ic",(function(){return Yr})),o.d(t,"jc",(function(){return Uo})),o.d(t,"kc",(function(){return oi})),o.d(t,"lc",(function(){return Ko})),o.d(t,"mc",(function(){return qo})),o.d(t,"nc",(function(){return Oo})),o.d(t,"oc",(function(){return Jr})),o.d(t,"pc",(function(){return gi})),o.d(t,"qc",(function(){return bo})),o.d(t,"rc",(function(){return po})),o.d(t,"sc",(function(){return ui})),o.d(t,"tc",(function(){return _i})),o.d(t,"uc",(function(){return jo})),o.d(t,"vc",(function(){return ko})),o.d(t,"wc",(function(){return Kr})),o.d(t,"xc",(function(){return ao})),o.d(t,"yc",(function(){return zt})),o.d(t,"zc",(function(){return Zo})),o.d(t,"Ac",(function(){return Gt})),o.d(t,"Bc",(function(){return ei})),o.d(t,"Cc",(function(){return qt})),o.d(t,"Dc",(function(){return Ut})),o.d(t,"Ec",(function(){return oo})),o.d(t,"Fc",(function(){return Yo})),o.d(t,"Gc",(function(){return Me})),o.d(t,"Hc",(function(){return Hn})),o.d(t,"Ic",(function(){return Yn})),o.d(t,"Jc",(function(){return qn})),o.d(t,"Kc",(function(){return Jn})),o.d(t,"Lc",(function(){return Qn})),o.d(t,"Mc",(function(){return Wi})),o.d(t,"Nc",(function(){return Xi})),o.d(t,"Oc",(function(){return Pt})),o.d(t,"Pc",(function(){return Jt})),o.d(t,"Qc",(function(){return Ra})),o.d(t,"Rc",(function(){return fr})),o.d(t,"Sc",(function(){return Or})),o.d(t,"Tc",(function(){return Qr})),o.d(t,"Uc",(function(){return Ur})),o.d(t,"Vc",(function(){return vn})),o.d(t,"Wc",(function(){return bn})),o.d(t,"Xc",(function(){return un})),o.d(t,"Yc",(function(){return Qt})),o.d(t,"Zc",(function(){return yi})),o.d(t,"ad",(function(){return qr})),o.d(t,"bd",(function(){return To})),o.d(t,"cd",(function(){return Mi})),o.d(t,"dd",(function(){return fi})),o.d(t,"ed",(function(){return It})),o.d(t,"fd",(function(){return He})),o.d(t,"gd",(function(){return Lt})),o.d(t,"hd",(function(){return Ni})),o.d(t,"id",(function(){return xt})),o.d(t,"jd",(function(){return qe})),o.d(t,"kd",(function(){return Ft})),o.d(t,"ld",(function(){return R})),o.d(t,"md",(function(){return Ci})),o.d(t,"nd",(function(){return Hi})),o.d(t,"od",(function(){return $o})),o.d(t,"pd",(function(){return ki})),o.d(t,"qd",(function(){return Si})),o.d(t,"rd",(function(){return Zt})),o.d(t,"sd",(function(){return pi})),o.d(t,"td",(function(){return eo}));o("4c8a");var i=o("c621"),n=o("6b16"),r=o("7a23"),a=o("2eb5"),l=o("ec41"),s=o("7ee8"),c=o("ff51"),d=o("5c8a"),u=o("8121"),p=o("79f6"),b=o("e8b2"),g=o("7ec8"),v=o("85b1"),m=o("d5fa"),y=o("b76a"),h=o.n(y),f=o("f6f2"),O=o("768f"),w=o("a600"),j=o("55f1"),k=o("fc25"),C=o("54bb"),D=o("e9d5"),T=o("47ce"),$=o("35c8"),E=o("edc4"),S=o("31d7");
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function N(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}function V(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function x(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{s(i.next(e))}catch(t){r(t)}}function l(e){try{s(i["throw"](e))}catch(t){r(t)}}function s(e){e.done?o(e.value):n(e.value).then(a,l)}s((i=i.apply(e,t||[])).next())}))}const I="designerTtypeOption",M="designerModelFieldInfo",A=new i["StateStream"]({designerTtypeOption:"",designerModelFieldInfo:{},designerExpFieldReference:{}}),F="uiDesigner",L={MODULE_MODULE:n["e"].UI_DESIGNER,module:"ui.designer.UiDesignerModuleProxy",model:"ui.designer.UiDesignerModelProxy"};function R(){Object(n["fb"])(L)}const B=i["HttpClient"].getInstance();class _{get(e){return x(this,void 0,void 0,(function*(){let t=this.cache;return t||(t=yield W(e),t&&(this.cache=t)),t}))}clear(){this.cache=void 0}}_.INSTANCE=new _;const W=e=>x(void 0,void 0,void 0,(function*(){var t,o;const n="\nquery (\n  $id: Long\n) {\n  uiDesignerViewLayoutProxyQuery {\n    queryWidgets ( request: { id: $id }) {\n      widgetDefinitionList {\n        name\n        displayName\n        description\n        help\n        icon\n        widgetCategory\n        show\n        priority\n        group\n        groupDisplayName\n        scope\n      }\n      widgetList {\n        id\n        widgetName\n        multi\n        widgetDisplayName\n        widgetSummary\n        viewType\n        isDefault\n        widgetAttrModel\n        widgetAttrFormViewName\n        widgetAttrDetailViewName\n        widgetStyleFormViewName\n        widgetStyleDetailViewName\n        widgetMetaModel\n        widgetMetaFormViewName\n        widgetMetaDetailViewName\n        icon\n        widgetCategory\n        widgetDefinitionName\n        widgetBizType\n        widgetSubtype\n        widgetDefaultSpan\n        widgetMinSpan\n        widgetMaxSpan\n        show\n        sys\n        fieldRelModels\n        widgetPriority\n        slotList {\n          slotName\n          sort\n          availableWidgets\n        }\n      }\n    }\n  }\n}",r=yield B.mutate(F,n,{id:e||""}),a=r.data.uiDesignerViewLayoutProxyQuery.queryWidgets;return null===(t=a.widgetDefinitionList)||void 0===t||t.forEach(e=>e.displayName=Object(i["translateValueByKey"])(e.displayName)),null===(o=a.widgetList)||void 0===o||o.forEach(e=>e.widgetDisplayName=Object(i["translateValueByKey"])(e.widgetDisplayName)),a})),P=[i["ModelFieldType"].OneToOne,i["ModelFieldType"].ManyToOne,i["ModelFieldType"].ManyToMany,i["ModelFieldType"].OneToMany],z=["Table","Form"];function G(e,t,o,i){return Object(r["reactive"])({initialization:!0,model:e,displayName:t,fields:o,actions:i})}function U(e,t){return Object(r["reactive"])({initialization:!1,model:e,displayName:t,fields:[],actions:[]})}class K{}var q,H;K.MODEL_MODEL="ui.designer.UiDesignerView",function(e){e["TOP_ACTION"]="TOP_ACTION",e["LINE_ACTION"]="LINE_ACTION",e["SEARCH_FIELD"]="SEARCH",e["FORM_FIELD"]="FORM",e["TABLE_FIELD"]="TABLE",e["GROUP"]="GROUP",e["TABS"]="TABS"}(q||(q={})),function(e){e["ALL"]="ALL",e["ACTIVE"]="ACTIVE",e["INACTIVE"]="INACTIVE"}(H||(H={}));const Y=[{label:"全部",value:H.ALL,icon:"oinone-all-type"},{label:"可见",value:H.ACTIVE,icon:"oinone-visible"},{label:"隐藏",value:H.INACTIVE,icon:"oinone-invisible"}];var Q,J,X,Z;(function(e){e["MANUAL"]="MANUAL",e["SYSTEM"]="SYSTEM"})(Q||(Q={})),function(e){e["ALL"]="ALL",e["OPERATIONS_MANAGEMENT"]="OPERATIONS_MANAGEMENT",e["PORTAL"]="PORTAL",e["MALL"]="MALL",e["COMMON"]="COMMON"}(J||(J={})),function(e){e["DEFAULT"]="DEFAULT",e["TREE"]="TREE",e["CASCADER"]="CASCADER"}(X||(X={})),function(e){e["DETAIL"]="DETAIL",e["FORM"]="FORM",e["DIALOGFORM"]="DIALOGFORM",e["TABLE"]="TABLE",e["CALENDAR"]="CALENDAR",e["KANBAN"]="KANBAN",e["GALLERY"]="GALLERY",e["TREE"]="TREE",e["CUSTOM"]="CUSTOM",e["CHART"]="CHART",e["SEARCH"]="SEARCH",e["ALL"]="ALL"}(Z||(Z={}));const ee=[{label:"自定义",value:Q.MANUAL},{label:"系统",value:Q.SYSTEM}];class te{}var oe,ie,ne,re,ae;te.MODEL_MODEL="ui.designer.UiDesignerMenu",function(e){e["BINDING"]="BINDING",e["COPY"]="COPY",e["CREATE"]="CREATE"}(oe||(oe={})),function(e){e["VIEW"]="VIEW",e["PACK"]="PACK",e["ELEMENT"]="ELEMENT",e["FIELD"]="FIELD",e["ACTION"]="ACTION",e["SLOT"]="SLOT"}(ie||(ie={})),function(e){e["TABLE"]="TABLE",e["FORM"]="FORM",e["DETAIL"]="DETAIL",e["SEARCH"]="SEARCH",e["GALLERY"]="GALLERY",e["ACTION_BAR"]="ACTION_BAR",e["DROPDOWN"]="dropdown",e["TOOLBAR_DROPDOWN"]="ToolbarDropdown",e["DATETIME_RANGE"]="DATETIME_RANGE",e["DATE_RANGE"]="DATE_RANGE",e["TIME_RANGE"]="TIME_RANGE",e["YEAR_RANGE"]="YEAR_RANGE",e["FLOAT_PLAT"]="FLOAT_PLAT",e["DATETIME_COUNTDOWN"]="DateTimeCountdown",e["DATE_COUNTDOWN"]="DateCountdown",e["TREE"]="TREE",e["CARD"]="CARD",e["CARD_CASCADER"]="CARD_CASCADER",e["DEFAULT"]="default",e["HEADER"]="header",e["FOOTER"]="footer",e["EXPAND_COLUMN"]="expandColumn",e["ROW_ACTIONS"]="rowActions",e["ROW_ACTIONS_WIDGET"]="ROW_ACTIONS",e["TITLE"]="title",e["TITLE_TOOLBAR"]="titleToolbar",e["CONTENT"]="content",e["CLICK"]="click",e["EXPAND_ROW"]="expandRow",e["PIC_ICON"]="picIcon",e["TEXT_INFO_NONE"]="textInfoNone",e["ROW"]="row",e["COL"]="col",e["BLOCK"]="block",e["MODAL"]="modal",e["DRAWER"]="drawer",e["INNER_POPUP"]="innerPopup",e["GROUP"]="group",e["TABS"]="tabs",e["TAB"]="tab",e["COLLAPSE"]="collapse",e["COLLAPSE_PANEL"]="collapsePanel",e["CHART"]="chart",e["REPORT"]="report",e["DATA_DASHBOARD"]="dashboard",e["PARAGRAPH"]="paragraph",e["TEXT_INFO"]="textInfo",e["PICTURE"]="picture",e["ICON"]="icon",e["TEXT_CONTENT"]="TextContent",e["CONTAINERS"]="containers",e["CONTAINER"]="container",e["URL_ACTION"]="UrlAction",e["SERVER_ACTION"]="ServerAction",e["VIEW_ACTION"]="ViewAction",e["CLIENT_ACTION"]="ClientAction",e["CLIENT_FUNCTION_ACTION"]="ClientFunctionAction",e["CLIENT_VIEW_ACTION"]="ClientViewAction",e["URL_ACTION_TYPE"]="URL_ACTION",e["SERVER_ACTION_TYPE"]="SERVER_ACTION",e["VIEW_ACTION_TYPE"]="VIEW_ACTION",e["CLIENT_ACTION_TYPE"]="CLIENT_ACTION",e["CLIENT_FUNCTION_ACTION_TYPE"]="CLIENT_FUNCTION_ACTION",e["CLIENT_VIEW_ACTION_TYPE"]="CLIENT_VIEW_ACTION",e["BatchUpdateViewAction"]="BatchUpdate"}(ne||(ne={})),function(e){e["LAYOUT"]="LAYOUT",e["VIEW"]="VIEW"}(re||(re={})),function(e){e["VIEW"]="VIEW",e["CONTAINER"]="CONTAINER",e["FIELD"]="FIELD",e["ACTION"]="ACTION",e["DATA"]="DATA",e["MEDIA"]="MEDIA"}(ae||(ae={}));const le=[{name:ae.CONTAINER,displayName:"布局"},{name:ae.FIELD,displayName:"字段"},{name:ae.ACTION,displayName:"动作"},{name:ae.DATA,displayName:"数据",autoInvisible:!0},{name:ae.MEDIA,displayName:"媒体"}];var se,ce,de;function ue(e){if(e)switch(e){case ce.VIEW_ACTION:return i["ActionType"].View;case ce.SERVER_ACTION:return i["ActionType"].Server;case ce.URL_ACTION:return i["ActionType"].URL;case ce.CLIENT_ACTION:return i["ActionType"].Client}}function pe(e){if(e)switch(e){case i["ActionType"].View:return"oinone-tiaozhuananniu";case i["ActionType"].Server:return"oinone-tijiaoanniu";case i["ActionType"].URL:return"oinone-lianjieanniu";case i["ActionType"].Client:return"oinone-kehuduananniu"}}function be(e,t){const o=e.widgetBizType;switch(o){case ie.FIELD:{const o=e.multi||!1;return`${t}#${o}`}case ie.VIEW:case ie.PACK:case ie.ELEMENT:case ie.ACTION:case ie.SLOT:return t;default:return}}function ge(e,t,o,n,r){const{widgetCategory:a,widgetBizType:l,widgetSubtype:s,widgetName:c,widgetDisplayName:d,widgetSummary:u,icon:p,widgetDefaultSpan:b,widgetDefinitionName:g}=r,v=e.get(a);if(v){const e=be(r,`${l}#${c}`);if(g&&e){let m=t.get(g);if(!m){const e=n.find(e=>e.name===g);e&&(m={name:g,groupDisplayName:e.groupDisplayName,group:e.group,widgetCategory:e.widgetCategory,widgetBizType:l,widgetSubtype:s,widgetName:c,help:e.help,scope:e.scope,widgetDisplayName:e.displayName,widgetSummary:e.description,icon:e.icon,multi:r.multi,show:e.show,priority:i["NumberHelper"].toNumber(e.priority),hasGhost:!1,defaultColSpan:b,widgetList:[]}),m?(t.set(g,m),v.items.push(m)):console.error("Invalid widget definition name. value="+g)}m&&(r.group=Object.assign(Object.assign({},m),{widgetList:[]}),m.widgetList.push(r));let y=o.get(e);y||(y={name:c,widgetCategory:a,widgetBizType:l,widgetSubtype:s,widgetName:c,widgetDisplayName:d,widgetSummary:u,icon:p,multi:r.multi,show:!1,priority:i["NumberHelper"].toNumber(r.widgetPriority),hasGhost:!1,defaultColSpan:r.widgetDefaultSpan,widgetList:[]},o.set(e,y)),y.widgetList.push(r),y.show||(y.show=i["Optional"].ofNullable(r.show).orElse(!0))}}}function ve(e,t){const o=be(t,`${t.widgetBizType}#${t.widgetSubtype}`);if(o){let i=e.get(o);i||(i=[],e.set(o,i)),i.push(t)}}function me(e,t){const o=new Map;for(const l of le)o.set(l.name,Object.assign(Object.assign({},l),{displayName:Object(i["translateValueByKey"])(l.displayName),items:[]}));const n=new Map,r=new Map,a=new Map;if(t)for(const i of t)ge(o,n,r,e,i),ve(a,i);return{categoryGroup:o,widgetDefinitionGroup:n,widgetNameGroup:r,widgetTypeGroup:a}}(function(e){e["TABLE"]="TABLE",e["FORM"]="FORM",e["DETAIL"]="DETAIL",e["SEARCH"]="SEARCH",e["GALLERY"]="GALLERY",e["TREE"]="TREE"})(se||(se={})),function(e){e["VIEW_ACTION"]="VIEW_ACTION",e["SERVER_ACTION"]="SERVER_ACTION",e["URL_ACTION"]="URL_ACTION",e["CLIENT_ACTION"]="CLIENT_ACTION"}(ce||(ce={})),function(e){e["WIDGET_GROUP"]="WIDGET_GROUP",e["FIELD"]="FIELD",e["ACTION"]="ACTION"}(de||(de={}));const ye="__CURRENT_VERSION__",he="当前页面",fe="__designer_draggable__",Oe="designer-draggable-ignored",we="."+Oe,je={top:"-8px",right:"-8px"},ke={},Ce={backgroundColor:"#f5f5f5"},De={backgroundColor:"#e5eeff"},Te={backgroundColor:"#fbe8e8"},$e={borderWidth:"8px",borderColor:"transparent",borderStyle:"solid",borderRadius:"4px",top:"-8px",left:"-8px",width:"calc(100% + 16px)",height:"calc(100% + 16px)"},Ee={borderColor:"#f5f5f5"},Se={borderColor:"#e5eeff"},Ne={borderColor:"#fbe8e8"},Ve=1080,xe=99999;class Ie{constructor(e,t,o,n,r){this.isWidgetInstance=!0;let{id:l=e.id,isReady:s=!0}=r||{};l||(l=Object(i["uniqueKeyGenerator"])()),Object(a["a"])(s)&&(s=!0),this.id=l,e.id=l,this.isReady=s,e.key?this.key=e.key:(this.key=Object(i["uniqueKeyGenerator"])(),e.key=this.key),this.element=e,this.defaultProperties=e.defaultProperties,this.internalProperties=e.internalProperties,this.originWidget=e.widget,this.superRoot=t,this.root=o,this.parent=n,this.children=[],this.level=n?n.level+1:1,this.fieldCollection=new Map,this.actionCollection=new Map,this.metadata={},e.properties||(e.properties={}),this.draggableGroup=fe}forceUpdate(){this.key=Object(i["uniqueKeyGenerator"])(),this.element.key=this.key}notifyParentIsReady(){const e=this.parent;e&&(e.isReady=!0,e.notifyParentIsReady())}clone(){const e=Object.assign({},this.element),t=new Ie(e,this.superRoot,this.root,this.parent,{id:this.id,isReady:this.isReady});return t.defaultProperties=this.defaultProperties,t.children=this.children,t.level=this.level,this.fieldCollection.forEach((e,o)=>{t.fieldCollection.set(o,e)}),this.actionCollection.forEach((e,o)=>{t.actionCollection.set(o,e)}),t.metadata=this.metadata,t.currentWidget=this.currentWidget,t.widgetList=this.widgetList,t.options=this.options,t.extendData=this.extendData,Object(r["reactive"])(t)}}function Me(e){return!Object(a["a"])(e)&&(e instanceof Ie||(e.isWidgetInstance||!1))}var Ae;(function(e){e["TEXT_CONTENT"]="TextContent"})(Ae||(Ae={}));const Fe=[Ae.TEXT_CONTENT],Le=Object(r["defineComponent"])({name:"AnchorDrawer",components:{OioSpin:m["OioSpin"],OioIcon:m["OioIcon"]},props:{title:{type:String},visible:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},defaultAnchor:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},width:{type:String||Number,default:"256px"},zIndex:{type:Number,default:1e3},anchorClassName:{type:String,default:""},wrapClassName:{type:String,default:""},hasFooter:{type:Boolean,default:!1}},emits:["update:visible","onOpened","onClosed","onAnchored","onRegenerate"],setup(e,t){const o=Object(r["ref"])(""),i=Object(r["ref"])(0);Object(r["onMounted"])(()=>{e.defaultAnchor?(o.value="",i.value=-45):(o.value=e.anchorClassName,i.value=0)});const n=()=>{t.emit("update:visible",!1),t.emit("onClosed")},a=()=>{o.value?(o.value="",i.value=-45,t.emit("onAnchored",!0)):(o.value=e.anchorClassName,i.value=0,t.emit("onAnchored",!1))};return{currentAnchorClass:o,anchorIconRotate:i,onClosed:n,onAnchored:a}}}),Re=()=>{Object(r["useCssVars"])(e=>({"6a9db4c0-width":e.width,"6a9db4c0-zIndex":e.zIndex}))},Be=Le.setup;Le.setup=Be?(e,t)=>(Re(),Be(e,t)):Re;const _e={class:"anchor-drawer-title"},We=["title"],Pe={class:"anchor-drawer-icon-button-group"},ze={class:"anchor-drawer-footer"};function Ge(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("oio-icon"),s=Object(r["resolveComponent"])("oio-spin");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["anchor-drawer",e.currentAnchorClass])},[Object(r["createVNode"])(s,{"wrapper-class-name":"anchor-drawer-spin",loading:e.loading},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",_e,[e.title?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:"anchor-drawer-title-text",title:e.$translate(e.title)},Object(r["toDisplayString"])(e.$translate(e.title)),9,We)):Object(r["renderSlot"])(e.$slots,"header",{key:1}),Object(r["createElementVNode"])("div",Pe,[Object(r["renderSlot"])(e.$slots,"extendBtn"),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"anchor-drawer-icon-button",onClick:t[0]||(t[0]=Object(r["withModifiers"])((...t)=>e.onAnchored&&e.onAnchored(...t),["stop"]))},[Object(r["createVNode"])(l,{icon:"oinone-tuding",size:"10px",rotate:e.anchorIconRotate},null,8,["rotate"])],512),[[r["vShow"],e.anchorClassName]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"anchor-drawer-icon-button",onClick:t[1]||(t[1]=Object(r["withModifiers"])((...t)=>e.onClosed&&e.onClosed(...t),["stop"]))},[Object(r["createVNode"])(l,{icon:"oinone-guanbi1",size:"10px"})],512),[[r["vShow"],e.closable]])])]),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["anchor-drawer-content","oio-scrollbar-hidden",e.hasFooter?" anchor-drawer-has-footer":"",e.wrapClassName])},[Object(r["renderSlot"])(e.$slots,"default")],2),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ze,[Object(r["renderSlot"])(e.$slots,"footer")],512),[[r["vShow"],e.hasFooter]])]),_:3},8,["loading"])],2)),[[r["vShow"],e.visible]])}Le.render=Ge,Le.__file="src/view/component/anchor-drawer/anchor-drawer.vue";const Ue={viewClientType:Object(r["computed"])(()=>i["ViewClientType"].PC),isPreviewHistory:Object(r["computed"])(()=>!1),protocolVersion:Object(r["computed"])(()=>""),currentMoveResult:Object(r["ref"])(void 0),loadingState:Object(r["computed"])(()=>!1),onSelectInstance:()=>{},onMoveInstance:()=>{},onSettingChange:()=>{},onSwitchWidget:()=>{},onRemoveInstance:()=>{},recomputeSpanOptions:()=>{},getContainerHTMLElement:()=>document.body,getContentContainerHTMLElement:()=>{},getModalManager:Object(r["computed"])(()=>{}),getDrawerManager:Object(r["computed"])(()=>{}),getInnerPopupManager:Object(r["computed"])(()=>{}),isInFocusModal:Object(r["computed"])(()=>!1),hasFocusDesigner:Object(r["computed"])(()=>!1),focusModalVisible:Object(r["computed"])(()=>!1),rootData:Object(r["computed"])(()=>{}),focusData:Object(r["computed"])(()=>{})},Ke=Symbol("DesignerDraggableContext"),qe=e=>{Object(r["provide"])(Ke,Object.assign(Object.assign({},Ue),e))},He=()=>Object(r["inject"])(Ke,Object.assign({},Ue)),Ye={startCallback:{type:Function},endCallback:{type:Function},addedCallback:{type:Function},movedCallback:{type:Function},removedCallback:{type:Function},moveToSelfCallback:{type:Function},moveToOtherCallback:{type:Function}};var Qe;(function(e){e["HORIZONTAL"]="horizontal",e["VERTICAL"]="vertical"})(Qe||(Qe={}));const Je={list:{type:Array,required:!0},itemKey:{type:[String,Function],required:!0},group:{type:[String,Object]},clone:{type:Function},tag:{type:String,default:"div"},componentData:{type:Object,required:!1,default:null},sort:{type:Boolean,default:!0},direction:{type:String},swapThreshold:{type:Number},invertSwap:{type:Boolean,default:!1},invertedSwapThreshold:{type:Number},animation:{type:Number,default:150},delay:{type:Number},disabled:{type:Boolean,default:!1}},Xe=Object.assign(Object.assign(Object.assign({},Je),Ye),{disableAdd:{type:Boolean,default:!1},disableMove:{type:Boolean,default:!1},filter:{type:Function},draggableFilter:{type:[String,Function]},mapper:{type:Function}});function Ze(e){return i["Optional"].ofNullable(e.relatedContext).map(e=>e.component).map(e=>e.$parent).orElse(void 0)}function et(e){return e.__draggable_component__}function tt(e){return["transition-group","TransitionGroup"].includes(e)}const ot=["Symbol(Fragment)"];function it(e){return ot.includes(e.type.toString())?e.children:e}var nt=Object(r["defineComponent"])({name:"KDraggable",components:{draggable:h()},inheritAttrs:!1,props:Object.assign(Object.assign({},Xe),{currentInstance:{type:Object}}),emits:["change"],setup(e,{emit:t}){const o=Object(r["ref"])(),n=Object(r["ref"])(),a=Object(r["ref"])(),l=(t,o)=>{var r,l;const s=o.target,c=i["DomHelper"].getClientRect(s),d=a.value;if(d&&i["DomHelper"].clientRectEquals(d.clientRect,c))return d.result;let u;return u=t.from===t.to?null===(r=e.moveToSelfCallback)||void 0===r?void 0:r.call(e,t,o):!i["Optional"].ofNullable(Ze(t)).map(e=>e.disableAdd).orElse(!1)&&(null===(l=e.moveToOtherCallback)||void 0===l?void 0:l.call(e,t,o)),!1===u?n.value&&(n.value=void 0):n.value={sendEvent:t,originalEvent:o},a.value={dom:s,clientRect:c,result:u},u},s=()=>{a.value=void 0},c=t=>{s();const{startCallback:o}=e;if(!o)return;const{oldIndex:n}=t;i["Optional"].ofNullable(e.list).map(e=>e[n]).ifPresent(e=>{o({element:e,index:n})})},d=t=>{s();const{endCallback:o}=e;if(!o)return;const{oldIndex:n}=t;i["Optional"].ofNullable(e.list).map(e=>e[n]).ifPresent(e=>{o({fromComponent:et(t.from),oldElement:e,oldIndex:n,toComponent:et(t.to),newIndex:t.newIndex})})},u=i=>{var n,r,a;const{added:l,moved:s,removed:c}=i;l&&e.addedCallback&&e.addedCallback(Object.assign(Object.assign({},l),{component:null===(n=o.value)||void 0===n?void 0:n.$parent})),s&&e.movedCallback&&e.movedCallback(Object.assign(Object.assign({},s),{component:null===(r=o.value)||void 0===r?void 0:r.$parent})),c&&e.removedCallback&&e.removedCallback(Object.assign(Object.assign({},c),{component:null===(a=o.value)||void 0===a?void 0:a.$parent})),t("change",i)},p=e=>{e.preventDefault(),e.stopPropagation()};return{origin:o,move:l,onStart:c,onEnd:d,onChange:u,onDrop:p}},render(){const{item:e}=this.$slots,{list:t}=this;if(t&&e){const[o,n]=["header","footer"].map(e=>{const t=this.$slots[e];return t||(()=>[])}),a=[];t.forEach((t,o)=>{let n=!0;this.filter&&(n=this.filter(t,o)),n&&a.push(e(i["Optional"].ofNullable(this.mapper).map(e=>e({element:t,index:o})).orElse({element:t,index:o})).map(e=>it(e)))});const l=this.componentData||{},s=i["StringHelper"].append([],i["CastHelper"].cast(l.class),i["CastHelper"].cast(this.$attrs.class)),c=Object.assign(Object.assign({},i["StyleHelper"].parse(i["CastHelper"].cast(l.style))||{}),i["StyleHelper"].parse(i["CastHelper"].cast(this.$attrs.style))||{});l.class=s,l.style=c;const d=Object.assign(Object.assign({},this.$attrs),{list:t,itemKey:this.itemKey,group:this.group,clone:this.clone,tag:this.tag,componentData:l,sort:this.sort,direction:this.direction,swapThreshold:this.swapThreshold,invertSwap:this.invertSwap,invertedSwapThreshold:this.invertedSwapThreshold,animation:this.animation,disabled:this.disabled,move:this.move,onStart:this.onStart,onEnd:this.onEnd,onChange:this.onChange,dragoverBubble:!1,filter:this.draggableFilter,ref:"origin",class:s,style:c});return tt(this.tag)||(d.onDrop=this.onDrop),Object(r["createVNode"])(h.a,d,Object.assign({header:o,footer:n,item:({element:e,index:t})=>a[t]},i["StableSlotProp"]))}return Object(r["h"])("div")}});nt.__file="src/view/component/k-draggable/k-draggable.vue";const rt={widgetCategoryGroup:{type:Object,required:!0},widgetNameGroup:{type:Object,required:!0},widgetTypeGroup:{type:Object,required:!0}},at=Object.assign(Object.assign({},rt),{data:{type:Object},inFocusModal:{type:Boolean,default:void 0},isFocusDesigner:{type:Boolean,default:void 0},focusData:{type:Object},currentSelected:{type:Object}}),lt={currentInstance:{type:Object,required:!0},currentIndex:{type:Number,required:!0}},st=Object.assign(Object.assign(Object.assign({},lt),rt),{invisibleToolbar:{type:Boolean,default:!1}}),ct=Object.assign(Object.assign(Object.assign({},lt),rt),Ye);class dt{constructor(){this.cache=new Map}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t)}clear(){this.cache.clear()}}dt.INSTANCE=new dt;const ut=new Map,pt="__default__";var bt;(function(e){e["open"]="open",e["close"]="close",e["dispose"]="dispose"})(bt||(bt={}));const gt=new Map;class vt{constructor(){this.drawerCounter=new Map,this.drawerInstances=new Map,this.drawerOpenCounter=0,this.eventHandlerMap=new Map}static newInstance(e){e||(e=pt);const t=new vt;return ut.set(e,t),t}static getInstance(e){return e||(e=pt),ut.get(e)}open(e,t){this.drawerCounter.get(e)||(this.drawerCounter.set(e,!0),this.drawerInstances.set(e,t),this.drawerOpenCounter++,this.notifyHandler(bt.open))}close(e){this.drawerCounter.get(e)&&(this.drawerCounter.set(e,!1),this.drawerOpenCounter--,this.notifyHandler(bt.close))}dispose(e){this.drawerCounter.delete(e),this.drawerInstances.delete(e),this.notifyHandler(bt.dispose)}openKeys(){const e=[],t=this.drawerCounter.entries();let o=t.next();while(!o.done){const[i,n]=o.value;n&&e.push(i),o=t.next()}return e}get(e){return this.drawerInstances.get(e)}hasOpen(){for(const[e,t]of this.drawerCounter)if(t)return!0;return!1}on(e,t){let o=this.eventHandlerMap.get(e);o||(o=[],this.eventHandlerMap.set(e,o)),o.push(t)}clearOn(e,t){const o=this.eventHandlerMap.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}onOpen(e){this.on(bt.open,e)}clearOnOpen(e){this.clearOn(bt.open,e)}onClose(e){this.on(bt.close,e)}clearOnClose(e){this.clearOn(bt.close,e)}onDispose(e){this.on(bt.dispose,e)}clearOnDispose(e){this.clearOn(bt.dispose,e)}notifyHandler(e){var t,o;null===(t=this.eventHandlerMap.get(e))||void 0===t||t.forEach(e=>e(this)),null===(o=gt.get(e))||void 0===o||o.forEach(e=>e(this))}static hasOpen(){const e=ut.values();let t=e.next();while(!t.done){const o=t.value;if(null===o||void 0===o?void 0:o.hasOpen())return!0;t=e.next()}return!1}static on(e,t){let o=gt.get(e);o||(o=[],gt.set(e,o)),o.push(t)}static clearOn(e,t){const o=gt.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}static onOpen(e){vt.on(bt.open,e)}static clearOnOpen(e){vt.clearOn(bt.open,e)}static onClose(e){vt.on(bt.close,e)}static clearOnClose(e){vt.clearOn(bt.close,e)}static onDispose(e){vt.on(bt.dispose,e)}static clearOnDispose(e){vt.clearOn(bt.dispose,e)}}vt.newInstance();const mt=new Map,yt="__default__";var ht;(function(e){e["open"]="open",e["close"]="close",e["dispose"]="dispose"})(ht||(ht={}));const ft=new Map;class Ot{constructor(){this.counter=new Map,this.instances=new Map,this.openCounter=0,this.eventHandlerMap=new Map}static newInstance(e){e||(e=yt);const t=new Ot;return mt.set(e,t),t}static getInstance(e){return e||(e=yt),mt.get(e)}open(e,t){this.counter.get(e)||(this.counter.set(e,!0),this.instances.set(e,t),this.openCounter++,this.notifyHandler(ht.open))}close(e){this.counter.get(e)&&(this.counter.set(e,!1),this.openCounter--,this.notifyHandler(ht.close))}dispose(e){this.counter.delete(e),this.instances.delete(e),this.notifyHandler(ht.dispose)}openKeys(){const e=[],t=this.counter.entries();let o=t.next();while(!o.done){const[i,n]=o.value;n&&e.push(i),o=t.next()}return e}get(e){return this.instances.get(e)}hasOpen(){for(const[e,t]of this.counter)if(t)return!0;return!1}on(e,t){let o=this.eventHandlerMap.get(e);o||(o=[],this.eventHandlerMap.set(e,o)),o.push(t)}clearOn(e,t){const o=this.eventHandlerMap.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}onOpen(e){this.on(ht.open,e)}clearOnOpen(e){this.clearOn(ht.open,e)}onClose(e){this.on(ht.close,e)}clearOnClose(e){this.clearOn(ht.close,e)}onDispose(e){this.on(ht.dispose,e)}clearOnDispose(e){this.clearOn(ht.dispose,e)}notifyHandler(e){var t,o;null===(t=this.eventHandlerMap.get(e))||void 0===t||t.forEach(e=>e(this)),null===(o=ft.get(e))||void 0===o||o.forEach(e=>e(this))}static hasOpen(){const e=mt.values();let t=e.next();while(!t.done){const o=t.value;if(null===o||void 0===o?void 0:o.hasOpen())return!0;t=e.next()}return!1}static on(e,t){let o=ft.get(e);o||(o=[],ft.set(e,o)),o.push(t)}static clearOn(e,t){const o=ft.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}static onOpen(e){Ot.on(ht.open,e)}static clearOnOpen(e){Ot.clearOn(ht.open,e)}static onClose(e){Ot.on(ht.close,e)}static clearOnClose(e){Ot.clearOn(ht.close,e)}static onDispose(e){Ot.on(ht.dispose,e)}static clearOnDispose(e){Ot.clearOn(ht.dispose,e)}}Ot.newInstance();const wt=new Map,jt="__default__";var kt;(function(e){e["open"]="open",e["close"]="close",e["dispose"]="dispose"})(kt||(kt={}));const Ct=new Map;class Dt{constructor(){this.modalCounter=new Map,this.modalInstances=new Map,this.modalOpenCounter=0,this.eventHandlerMap=new Map}static newInstance(e){e||(e=jt);const t=new Dt;return wt.set(e,t),t}static getInstance(e){return e||(e=jt),wt.get(e)}open(e,t){this.modalCounter.get(e)||(this.modalCounter.set(e,!0),this.modalInstances.set(e,t),this.modalOpenCounter++,this.notifyHandler(kt.open))}close(e){this.modalCounter.get(e)&&(this.modalCounter.set(e,!1),this.modalOpenCounter--,this.notifyHandler(kt.close))}dispose(e){this.modalCounter.delete(e),this.modalInstances.delete(e),this.notifyHandler(kt.dispose)}openKeys(){const e=[],t=this.modalCounter.entries();let o=t.next();while(!o.done){const[i,n]=o.value;n&&e.push(i),o=t.next()}return e}get(e){return this.modalInstances.get(e)}hasOpen(){for(const[e,t]of this.modalCounter)if(t)return!0;return!1}on(e,t){let o=this.eventHandlerMap.get(e);o||(o=[],this.eventHandlerMap.set(e,o)),o.push(t)}clearOn(e,t){const o=this.eventHandlerMap.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}onOpen(e){this.on(kt.open,e)}clearOnOpen(e){this.clearOn(kt.open,e)}onClose(e){this.on(kt.close,e)}clearOnClose(e){this.clearOn(kt.close,e)}onDispose(e){this.on(kt.dispose,e)}clearOnDispose(e){this.clearOn(kt.dispose,e)}notifyHandler(e){var t,o;null===(t=this.eventHandlerMap.get(e))||void 0===t||t.forEach(e=>e(this)),null===(o=Ct.get(e))||void 0===o||o.forEach(e=>e(this))}static hasOpen(){const e=wt.values();let t=e.next();while(!t.done){const o=t.value;if(null===o||void 0===o?void 0:o.hasOpen())return!0;t=e.next()}return!1}static on(e,t){let o=Ct.get(e);o||(o=[],Ct.set(e,o)),o.push(t)}static clearOn(e,t){const o=Ct.get(e);if(!o)return;const i=o.findIndex(e=>e===t);-1!==i&&o.splice(i,1)}static onOpen(e){Dt.on(kt.open,e)}static clearOnOpen(e){Dt.clearOn(kt.open,e)}static onClose(e){Dt.on(kt.close,e)}static clearOnClose(e){Dt.clearOn(kt.close,e)}static onDispose(e){Dt.on(kt.dispose,e)}static clearOnDispose(e){Dt.clearOn(kt.dispose,e)}}Dt.newInstance();const Tt="标题区",$t="内容区",Et="动作区",St="点击动作区",Nt={isCard:Object(r["computed"])(()=>!1)},Vt=Symbol("DesignerCardContextKey"),xt=e=>{Object(r["provide"])(Vt,Object.assign(Object.assign({},Nt),e))},It=()=>Object(r["inject"])(Vt,Nt),Mt={layout:Object(r["computed"])(()=>i["FormLayout"].VERTICAL)},At=Symbol("DesignerFieldContext"),Ft=e=>{Object(r["provide"])(At,Object.assign(Object.assign({},Mt),e))},Lt=()=>Object(r["inject"])(At,Object.assign({},Mt));var Rt=Object(r["defineComponent"])({name:"EmptyDraggable",components:{},props:{text:{type:String,default:"请拖拽"},height:{type:[Number,String],default:100},minHeight:{type:[Number,String]}},setup(e){const t=Object(r["computed"])(()=>Object(i["translateValueByKey"])(e.text)),o=Object(r["computed"])(()=>i["StyleHelper"].px(e.height)),n=Object(r["computed"])(()=>{const t=e.minHeight;if(t)return i["StyleHelper"].px(t)});return{text:t,realHeight:o,realMinHeight:n}}});const Bt=["title"];function _t(e,t,o,i,n,a){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{style:Object(r["normalizeStyle"])({height:e.realHeight,minHeight:e.realMinHeight}),title:e.$translate(e.text),class:"empty-draggable"},[Object(r["renderSlot"])(e.$slots,"default",{},()=>[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.$translate(e.text)),1)])],12,Bt)}Rt.render=_t,Rt.__file="src/view/component/designer-draggable/component/empty-draggable/empty-draggable.vue";const Wt="element",Pt="_metadata",zt="_isDialog",Gt="_isDrawer",Ut="_isRowAction",Kt="_isExpandRow",qt="_isInContainer",Ht="_actionLabel",Yt="_actionContextType",Qt="_rootModel",Jt="_model",Xt="_clientType",Zt="_viewType",eo="_widgetName",to="_source",oo="_isSelectMulti",io="_index",no="_preNodeValue",ro="_isCardCascader",ao="_isDesignerComponent",lo=[i["ActiveRecordExtendKeys"].DRAFT_ID,Wt,Pt,zt,Gt,Ut,Kt,qt,Ht,Yt,Qt,Jt,Xt,Zt,eo,to,oo,io,no,ro,ao];function so(e){return i["JSONUtils"].toJSONString(i["JSONUtils"].toJSONString(e,(e,t)=>null==t||lo.includes(e)||e.startsWith("_"),(e,t)=>"elements"===e&&Array.isArray(t)&&t.every(e=>e.bizType===ie.SLOT)?[...t].sort((e,t)=>{const o=e.subtype,i=t.subtype;return o===i?0:o<i?-1:1}):t))}function co(e,t){let o=0;for(const n of t){const t=Object(l["a"])(e,n);t?(o++,t.initialization=!1,t.isValidator=!0,t.widgetData=void 0,t.properties={}):Object(i["isDev"])()&&console.warn("errorJsonPath error.",e,n)}return o}function uo(e,t){let o=0;for(const i of t){const t=Object(l["a"])(e,i);t?(o++,t.isValidator=!1):console.warn("errorWidgetJsonPath error.",e,i)}return o}function po(e){const{element:t}=e,o=t.bizType;switch(o){case ie.VIEW:return t.subtype;case ie.PACK:if(t.subtype&&[ne.MODAL,ne.DRAWER].includes(t.subtype))return t.containerWidgetViewType?t.containerWidgetViewType:void 0;break;case ie.FIELD:{const o=t.widgetData;if(o&&i["RELATION_2M_FIELD_TTYPES"].includes(o.ttype)){if(t.containerWidgetViewType)return t.containerWidgetViewType;if(z[0]===e.currentWidget.widgetName)return se.TABLE}break}case ie.SLOT:{const t=e.parent;if(t)return po(t);break}}const n=e.root;if(n)return po(n)}function bo(e,t,o){let i;if(i=o?o(e):e.parent,i)return t(i)?i:bo(i,t,o)}const go="属性设置",vo="v3",mo="v4",yo={ViewAction:{BizAuditRecordViewAction:"需在「业务审计」中为页面模型定义审计规则后该动作方可生效。"}};class ho{static isV3(e){return[vo,mo].includes(e)}}function fo(e){var t,o,n,a,l;if(e){const s=e.currentWidget,c=e.element.widgetData;if(s){const d=s.widgetBizType,u=null===(t=s.group)||void 0===t?void 0:t.help;let p=u||"";switch(d){case ie.VIEW:case ie.SLOT:break;case ie.PACK:case ie.ELEMENT:{const t=Object(r["unref"])(null===(o=e.options)||void 0===o?void 0:o.title);return t?(p+=i["Optional"].ofNullable(null===(n=s.group)||void 0===n?void 0:n.name).map(e=>{var t;return null===(t=yo[e])||void 0===t?void 0:t[s.widgetName]}).map(e=>"\n\n"+e).orElse(""),{title:t,widgetDisplayName:s.widgetDisplayName,help:p}):{title:s.widgetDisplayName,help:u}}case ie.FIELD:if(c){const e=c;return p+=i["Optional"].ofNullable(null===(a=s.group)||void 0===a?void 0:a.name).map(t=>{var o;return null===(o=yo[t])||void 0===o?void 0:o[e.name]}).map(e=>"\n\n"+e).orElse(""),{title:e.displayName||"",widgetDisplayName:s.widgetDisplayName,dataName:e.name,help:p}}break;case ie.ACTION:if(c){const e=c;return p+=i["Optional"].ofNullable(null===(l=s.group)||void 0===l?void 0:l.name).map(t=>{var o;return null===(o=yo[t])||void 0===o?void 0:o[e.name]}).map(e=>"\n\n"+e).orElse(""),{title:e.displayName||"",widgetDisplayName:s.widgetDisplayName,dataName:e.name,help:p}}break;default:throw new Error("Invalid widget biz type. value="+d)}return{title:s.widgetDisplayName,help:u}}}return{title:go}}function Oo(e){return e.split("_")[0]}function wo(e){if(e)switch(e){case i["ModelFieldType"].Integer:return"请输入整数";case i["ModelFieldType"].Float:return"请输入小数";case i["ModelFieldType"].DateTime:return Object(m["fetchDatetimePickerPlaceholder"])(i["DateTimePickerMode"].datetime);case i["ModelFieldType"].Date:return Object(m["fetchDatetimePickerPlaceholder"])(i["DateTimePickerMode"].date);case i["ModelFieldType"].Time:return Object(m["fetchDatetimePickerPlaceholder"])(i["DateTimePickerMode"].time);case i["ModelFieldType"].Year:return Object(m["fetchDatetimePickerPlaceholder"])(i["DateTimePickerMode"].year)}return"请输入"}function jo(e){var t,o;const i=null===(t=e.superRoot)||void 0===t?void 0:t.id,n=!!i&&!!bo(e,e=>{const{bizType:t,subtype:o}=e.element;return[ie.ELEMENT,ie.PACK].includes(t)&&o===ne.MODAL},e=>{var t,o;const i=null===(o=null===(t=e.root)||void 0===t?void 0:t.element)||void 0===o?void 0:o.subtype;if(!i||![ne.DRAWER,ne.INNER_POPUP].includes(i))return e.root}),r=!!i&&!!bo(e,e=>{const{bizType:t,subtype:o}=e.element;return[ie.ELEMENT,ie.PACK].includes(t)&&o===ne.DRAWER},e=>{var t,o;const i=null===(o=null===(t=e.root)||void 0===t?void 0:t.element)||void 0===o?void 0:o.subtype;if(!i||![ne.MODAL,ne.INNER_POPUP].includes(i))return e.root}),a=!!i&&!!bo(e,e=>{const{bizType:t,subtype:o}=e.element;return[ie.PACK].includes(t)&&o===ne.INNER_POPUP},e=>{var t,o;const i=null===(o=null===(t=e.root)||void 0===t?void 0:t.element)||void 0===o?void 0:o.subtype;if(!i||![ne.MODAL,ne.DRAWER].includes(i))return e.root}),l=null===(o=e.parent)||void 0===o?void 0:o.element,s=null===l||void 0===l?void 0:l.bizType,c=null===l||void 0===l?void 0:l.subtype,d=s&&c&&[ne.ROW_ACTIONS,ne.ROW_ACTIONS_WIDGET,ne.DROPDOWN,ne.TOOLBAR_DROPDOWN].includes(c),u=s===ie.PACK&&c===ne.CONTAINER,p=po(e),b=e.element.name;return{isDialog:n,isDrawer:r,isInnerPopup:a,isRowAction:d,isInContainer:u,widgetViewType:p,widgetName:b,elementSource:e.element.source}}function ko(e,t,o){const n=Oo(t.widgetSubtype),r=po(e);if(!r)return m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])("无法识别当前组件实例所在视图类型")),{isSelectMulti:!1,metadataMulti:!1};let l,s;for(const i of o.widgetList){const e=Oo(i.widgetSubtype);if(i.viewType!==r||!i.show||e!==n)continue;const t=i.multi;if(!Object(a["a"])(t))if(Object(a["a"])(l))l=!1,s=t;else if(s!==t){l=!0,s=void 0;break}}return{isSelectMulti:l,metadataMulti:s}}let Co,Do=[];function To(){const e=()=>Do,t=()=>Do[Do.length-1],o=()=>Do[0],i=e=>{Do=e},n=e=>{Do.push(e)},r=()=>Do.pop(),a=()=>{Do=[]};return{get:e,set:i,peek:t,first:o,push:n,pop:r,clear:a}}function $o(){const e=e=>{Co=e},t=()=>({widgetCategoryGroup:Object(r["unref"])(Co.widgetCategoryGroup),widgetDefinitionGroup:Object(r["unref"])(Co.widgetDefinitionGroup),widgetNameGroup:Object(r["unref"])(Co.widgetNameGroup),widgetTypeGroup:Object(r["unref"])(Co.widgetTypeGroup)});return{init:e,get:t}}const Eo={result:!1};var So,No,Vo,xo,Io;function Mo(e,t,o){var i,n;const{bizType:r,subtype:a}=t;if(o&&r===ie.SLOT&&a){const{bizType:t,subtype:l}=o;if(t&&l){const t=l+"#slot",o=null===(n=null===(i=e.get(`${r}#${a}`))||void 0===i?void 0:i.filter(e=>e.widgetName===t))||void 0===n?void 0:n[0];if(o)return{currentWidget:o,widgetList:[]}}}}function Ao(e,t,o){var n,r,l,c;const{widget:d}=t;let u;if(!d)return Mo(e,t,o);{const{widgetBizType:s,widgetSubtype:p,widgetName:b}=d;switch(s){case ie.FIELD:{const o=d,s=(null===(n=t.widgetData)||void 0===n?void 0:n.ttype)||p;let c=null===(r=t.widgetData)||void 0===r?void 0:r.multi;if(Object(a["a"])(c)&&(c=o.multi),u=e.get(`${ie.FIELD}#${s}#${c}`)||[],s===i["ModelFieldType"].Related){const o=null===(l=t.widgetData)||void 0===l?void 0:l.relatedTtype;o&&(u=[...u,...e.get(`${ie.FIELD}#${o}#${c}`)||[]])}break}case ie.ACTION:{const t=d;u=e.get(`${ie.ACTION}#${t.widgetSubtype}`);break}case ie.VIEW:case ie.PACK:case ie.ELEMENT:u=null===(c=e.get(`${s}#${p}`))||void 0===c?void 0:c.filter(e=>e.widgetName===b);break;case ie.SLOT:return Mo(e,t,o);default:throw new Error(`Invalid category value. widgetName=${b}, widgetType: ${p}`)}}if(d){if(Object(s["a"])(u))return;const e=d.viewType;let t;if(u=u.filter(t=>t.viewType===e),1===u.length)t=u[0],u=[];else{const e=d.widgetName,o=u.findIndex(t=>t.widgetName===e);if(-1===o)return;t=u[o],u.splice(o,1)}return{currentWidget:t,widgetList:u}}}function Fo(e,t,o,i,n){n.elements||(n.elements=[]),n.isFixed&&(n.disableAddElement=!0,n.disableElementSort=!0),Object(a["a"])(n.initialization)&&(n.initialization=!0),Object(a["a"])(n.isVirtual)&&(n.isVirtual=!1),Object(a["a"])(n.isSkip)&&(n.isSkip=!1),Object(a["a"])(n.isShow)&&(n.isShow=!0);const l=new Ie(n,t,o,i,{isReady:n.initialization}),s=Ao(e,n,null===i||void 0===i?void 0:i.element);if(s){const{currentWidget:e,widgetList:t}=s;n.widget=e,l.currentWidget=e,l.widgetList=t.filter(e=>e.show)}else l.widgetList=[];return Object(r["reactive"])(l)}function Lo(e,t,o){const n=e.model,{bizType:r,model:a,referenceModel:l,widgetData:s}=t,{model:c}=o;let d=l||c||a;switch(r){case ie.FIELD:if(s){const{model:e,references:t}=s;d=l||t||e||d}break;case ie.ACTION:if(s){const{actionType:e,model:t}=s;if(e===i["ActionType"].View){const{resModel:e}=i["CastHelper"].cast(s);d=l||e||t||d}}break;case ie.SLOT:return}n&&n===d||(d?(Object(i["isDev"])()&&console.warn("修正组件模型编码",n,d,t,e),e.model=d):Object(i["isDev"])()&&console.warn("无法修正模型编码",n,d,t,e))}function Ro(e,t,o,i,n,r,a){let l=t,c=o;for(const d of r){Lo(d,t.element,o.element);const r=Fo(e,t,o,i,d);switch(d.bizType){case ie.VIEW:c=r;break;case ie.PACK:{const{subtype:e}=d;e&&[ne.MODAL,ne.DRAWER,ne.INNER_POPUP].includes(e)&&(c=r);break}case ie.FIELD:{const{widget:e,isContainerWidget:t}=d;e&&(t||z.includes(e.widgetName))&&(l=r,c=r),Object(s["a"])(d.name)||So.collectionFieldInstance(o.fieldCollection,r);break}case ie.ACTION:-1!==d.elements.findIndex(e=>Vo.isModalByType(e.bizType,e.subtype)||xo.isDrawerByType(e.bizType,e.subtype)||Io.isInnerPopupByType(e.bizType,e.subtype))&&(l=r,c=r),Object(s["a"])(d.name)||So.collectionActionInstance(o.actionCollection,r);break}a&&a(r),n.push(r),Object(s["a"])(d.elements)||Ro(e,l,c,r,r.children,d.elements,a),l=t,c=o}}function Bo(e,t,o){const i=Fo(e,void 0,void 0,void 0,t);return o&&o(i),Object(s["a"])(t.elements)||Ro(e,i,i,i,i.children,t.elements,o),i}function _o(e,t,o,i){let n;n=Object(u["a"])(i)?JSON.parse(i):i;const r=Fo(e,t,t,t,n);return n.model=o,Object(s["a"])(n.elements)||Ro(e,t,r,r,r.children,n.elements),r}(function(e){function t(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.VIEW].includes(e.element.bizType),slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function o(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.ROW,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function n(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.COL,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function r(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.BLOCK,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function a(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.MODAL,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function l(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.DRAWER,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function c(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK].includes(e.element.bizType)&&e.element.subtype===ne.INNER_POPUP,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function d(e){let t=Eo;return R(e,(e,o)=>{t={result:[ie.PACK,ie.ELEMENT].includes(e.element.bizType)&&e.element.subtype===ne.TABLE&&(!o||o.element.subtype===ne.DEFAULT),slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function u(e){let t=Eo;return R(e,(e,o)=>{if([ie.PACK,ie.ELEMENT].includes(e.element.bizType)){const i=e.element.subtype,n=null===o||void 0===o?void 0:o.element.subtype;t={result:i===ne.ACTION_BAR||i===ne.TABLE&&n&&[ne.ROW_ACTIONS,ne.ROW_ACTIONS_WIDGET].includes(n)||i===ne.MODAL&&n===ne.FOOTER,slotName:null===o||void 0===o?void 0:o.element.subtype}}}),t}function p(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.PACK&&e.element.subtype===ne.CONTAINERS,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function b(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.PACK&&e.element.subtype===ne.CONTAINER,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function g(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ELEMENT&&e.element.subtype===ne.CARD,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function v(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ELEMENT&&e.element.subtype===ne.TREE,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function m(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ELEMENT&&e.element.subtype===ne.CARD_CASCADER,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function y(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ACTION,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function h(e){const t=e.root;return!!bo(e,e=>{const{bizType:t,subtype:o}=e.element;return t===ie.ELEMENT&&o===ne.CARD},e=>{const o=e.parent;if(!t||!o||t.id!==o.id)return o})}function f(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ELEMENT&&e.element.subtype===ne.PICTURE,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function O(e){let t=Eo;return R(e,(e,o)=>{t={result:e.element.bizType===ie.ELEMENT&&e.element.subtype===ne.ICON,slotName:null===o||void 0===o?void 0:o.element.subtype}}),t}function w(e){var t,o;return Object(s["a"])(null===e||void 0===e?void 0:e.internalProperties)&&Object(s["a"])(null===e||void 0===e?void 0:e.defaultProperties)?(null===(t=null===e||void 0===e?void 0:e.element)||void 0===t?void 0:t.properties)||{}:Object.assign(Object.assign(Object.assign({},(null===e||void 0===e?void 0:e.internalProperties)||{}),(null===e||void 0===e?void 0:e.defaultProperties)||{}),(null===(o=null===e||void 0===e?void 0:e.element)||void 0===o?void 0:o.properties)||{})}function j(e){let t=e.options;return t||(t={},e.options=t),t}function k(e){let t=e.extendData;return t||(t={},e.extendData=t),i["CastHelper"].cast(t)}function C(e){let t=e.defaultProperties;return t||(t={},e.defaultProperties=t),t}function D(e,t){const o=T(e,t);if(!o)throw new Error("Invalid area template. name = "+t);return o}function T(e,t){return t||(t=ne.DEFAULT),i["Optional"].ofNullable(e).map(e=>e.children).map(e=>{for(const o in e){const i=e[o],{isWidgetInstance:n,element:r}=i;if(n&&r.bizType===ie.SLOT&&r.subtype===t)return{element:i,index:Number(o)}}}).orElse(void 0)}function $(e,t,o){const{children:i}=e,{length:n}=i;for(let r=0;r<n;r++){const e=i[r];if(e.isWidgetInstance){const{bizType:i,subtype:n}=e.element;if(i===t&&n&&o.includes(n))return{element:e,index:r}}}}function E(e,t,o){if(t){if(null==o)e.children.push(t),e.element.elements.push(t.element);else{o<0&&(o=0);const i=e.children;i.length<=o?i.push(t):i.splice(o,0,t);const n=e.element.elements;n.length<=o?n.push(t.element):n.splice(o,0,t.element)}t.parent=e,S(t,e.level+1),N(t)}}function S(e,t){e.level=t;const o=t+1;e.children.forEach(e=>S(e,o))}function N(e){var t,o;const i=e.element;if(!i.skipMetadataCollection)switch(i.bizType){case ie.ELEMENT:{const n=i.subtype;if(n)switch(n){case ne.DATETIME_RANGE:case ne.DATE_RANGE:case ne.TIME_RANGE:case ne.YEAR_RANGE:{const n=i.widgetData;if(n){const r=i.model,a=e.root.fieldCollection,l=null===(t=n.startMetadata)||void 0===t?void 0:t.name;Object(s["a"])(l)||a.set(`${r}#${l}`,e);const c=null===(o=n.endMetadata)||void 0===o?void 0:o.name;Object(s["a"])(c)||a.set(`${r}#${c}`,e)}break}}break}case ie.FIELD:V(e.root.fieldCollection,e);break;case ie.ACTION:x(e.root.actionCollection,e);break}}function V(e,t){var o;const n=t.element;if(!n)return;const{model:r,name:a}=n;if(Object(s["a"])(a))return;const l=To().get();if(l.length>=1){const{bizType:r}=n;if(r===ie.FIELD&&(null===(o=n.widgetData)||void 0===o?void 0:o.ttype)!==i["ModelFieldType"].Related)return void e.set(`${l[0].model}#field${n.id}`,t)}e.set(`${r}#${a}`,t)}function x(e,t){var o;const n=t.element;if(!n)return;const{model:r,name:a}=n;if(Object(s["a"])(a))return;const l=`${r}#${a}`,c=null===(o=n.widgetData)||void 0===o?void 0:o.contextType,d=t.parent;d&&c===i["ActionContextType"].SingleAndBatch?R(d,o=>{var i;e.set(`${l}#${I(null===(i=o.root)||void 0===i?void 0:i.id,o)}`,t)}):e.set(l,t)}function I(e,t){var o;let i="";while(t){if(t.id===e)break;const n=null===(o=t.element)||void 0===o?void 0:o.subtype;if(!n)break;i=i?`${i}#${n}`:n,t=t.parent}return i}function M(e){var t,o,n,r;const a=e.element;if(!a.skipMetadataCollection){switch(a.bizType){case ie.ELEMENT:{const i=a.subtype;if(i)switch(i){case ne.DATETIME_RANGE:case ne.DATE_RANGE:case ne.TIME_RANGE:case ne.YEAR_RANGE:{const i=a.widgetData;if(i){const n=a.model,r=e.root.fieldCollection,l=null===(t=i.startMetadata)||void 0===t?void 0:t.name;Object(s["a"])(l)||r.delete(`${n}#${l}`);const c=null===(o=i.endMetadata)||void 0===o?void 0:o.name;Object(s["a"])(c)||r.delete(`${n}#${c}`)}break}}break}case ie.FIELD:e.root.fieldCollection.delete(`${a.model}#${a.name}`);break;case ie.ACTION:{const t=a.name;if(Object(s["a"])(t))break;const o=`${a.model}#${t}`,l=null===(n=a.widgetData)||void 0===n?void 0:n.contextType,c=e.root.actionCollection;l===i["ActionContextType"].SingleAndBatch?e.parent?R(e.parent,e=>{var t;c.delete(`${o}#${I(null===(t=e.root)||void 0===t?void 0:t.id,e)}`)}):c.delete(`${o}#${null===(r=e.root)||void 0===r?void 0:r.element.subtype}`):c.delete(o);break}}e.children.forEach(e=>M(e))}}function A(e,t){var o;const i=e.children.splice(t,1)[0];null===(o=e.element)||void 0===o||o.elements.splice(t,1),M(i)}function F(e){while((o(e).result||r(e).result||p(e).result)&&0===e.children.length){const t=e.parent;if(!t)break;{const o=e.id;A(t,t.children.findIndex(e=>e.id===o)),e=t}}return e}function L(e,t){if(e){const o=t.targetInstance.element,i=o.bizType,n=o.subtype;([ie.SLOT].includes(i)||n&&![ne.ROW,ne.BLOCK].includes(n))&&(e.value=t)}return t.move}function R(e,t){var o;const i=null===(o=e.element)||void 0===o?void 0:o.bizType;i&&(i===ie.SLOT?t(e.parent,e):t(e))}function B(e,t){const o=e.id;if(o){let e=t;while(e){if(o===e.id)return!0;e=e.parent}}return!1}e.isView=t,e.isRow=o,e.isCol=n,e.isBlock=r,e.isModal=a,e.isDrawer=l,e.isInnerPopup=c,e.isTable=d,e.isActionArea=u,e.isContainers=p,e.isContainer=b,e.isCard=g,e.isTree=v,e.isCardCascader=m,e.isAction=y,e.isInCard=h,e.isPicture=f,e.isIcon=O,e.fetchProperties=w,e.fetchOptions=j,e.fetchExtendData=k,e.fetchDefaultProperties=C,e.fetchAreaInstance=D,e.fetchAreaInstanceNullable=T,e.findWidgetInstance=$,e.add=E,e.collectionRootElement=N,e.collectionFieldInstance=V,e.collectionActionInstance=x,e.generatorWidgetPath=I,e.remove=A,e.removeEmptyBlockWidgetInstance=F,e.moveResultProcess=L,e.consumerInstance=R,e.contains=B})(So||(So={})),function(e){function t(e,t){const o=So.fetchExtendData(e),i=o.activeKey;return i!==t&&(o.activeKey=t,!0)}function o(e){return i["Optional"].ofNullable(e).map(e=>So.fetchProperties(e)).map(e=>e.title).filter(e=>!Object(s["a"])(e)).orElse(i["DEFAULT_COLLAPSE_PANEL_TITLE"])}e.setActiveKey=t,e.computePanelTitle=o}(No||(No={})),function(e){function t(e){var t,o,n;const{element:r,metadata:a}=e;if(!r)return!1;if(!r.initialization)return!1;if((null===(t=r.componentData)||void 0===t?void 0:t.disablePopupDesign)||(null===(o=r.componentData)||void 0===o?void 0:o.disableModalDesign))return!1;const l=r.bizType,s=null===(n=r.widget)||void 0===n?void 0:n.widgetSubtype;if(l!==ie.ACTION||!s)return!1;if(s===ne.VIEW_ACTION_TYPE&&a.target===i["ViewActionTarget"].Dialog){const{popupSettingType:e,dialogSettingType:t,dialogModel:o,viewType:n,view:r,copiedView:l}=a,s=e||t;if(s)switch(s){case oe.BINDING:return!!r;case oe.COPY:return l&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(l.type);case oe.CREATE:return n&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(n)&&o&&!!o.model}}const c=r.name;return!(![ne.CLIENT_FUNCTION_ACTION_TYPE,ne.CLIENT_VIEW_ACTION_TYPE].includes(s)||!p(c))}function o(e,t){return[ie.PACK,ie.ELEMENT].includes(e)&&t===ne.MODAL}function n(e){if(!e.isWidgetInstance)return!1;const{element:t}=e;return!!t&&o(t.bizType,t.subtype)}function r(e){return!!e.children.length&&-1!==e.children.findIndex(n)}function a(e){var t,o,n;let r,a;if(Object(c["a"])(e))r=i["CastHelper"].cast({elements:e});else{const s=l(e);if(!s)return;const{subtype:c}=s;if(!c)return;switch(c){case ne.TABLE:r=s;break;case ne.FORM:case ne.DETAIL:r=s,a=i["CastHelper"].cast({elements:Object(d["a"])((null===(n=null===(o=null===(t=s.elements.find(e=>e.subtype===ne.ACTION_BAR))||void 0===t?void 0:t.elements)||void 0===o?void 0:o.find(e=>e.subtype===ne.DEFAULT))||void 0===n?void 0:n.elements)||[])});break;default:return}}return{default:r,footer:a}}function l(e){const{subtype:t}=e;if(e.bizType===ie.VIEW&&t&&[ne.TABLE,ne.FORM,ne.DETAIL].includes(t))return e;for(const o of e.elements){const e=l(o);if(e)return e}}function s(e){var t,o,i;const n=null===(o=null===(t=e.parent)||void 0===t?void 0:t.element)||void 0===o?void 0:o.name,{popupSettingType:r,dialogSettingType:a}=(null===(i=e.parent)||void 0===i?void 0:i.metadata)||{},l=r||a;if((!l||l===oe.BINDING)&&!p(n))return;const s={};e.children.forEach((e,t)=>s[e.element.subtype]={instance:e,index:t});const c=s[ne.DEFAULT].instance.children.find(e=>e.element.bizType===ie.VIEW),d={header:void 0,footer:void 0};c.children.forEach((e,t)=>{const o=e.element.subtype;if(o&&o!==ne.DEFAULT){const i=s[o];i&&o in d&&(d[o]={instance:e,index:t})}});for(const u in d){const t=d[u];if(t){const o=t.instance.clone(),i=o.element;o.children=t.instance.children,i.elements=t.instance.element.elements,i.isVirtual=!0,i.isShow=!0;const n=e.children.findIndex(e=>e.element.subtype===u);So.remove(e,n),So.add(e,o)}else{const e=s[u],t=e.instance,o=t.clone(),i=o.element;o.children=t.children,i.elements=t.element.elements,i.isVirtual=!1,i.isShow=!1,So.add(c,o)}}}function u(e){var t,o;const i=null===(o=null===(t=e.children.find(e=>e.element.subtype===ne.DEFAULT))||void 0===t?void 0:t.children.find(e=>e.element.bizType===ie.VIEW&&[ne.FORM,ne.DETAIL].includes(e.element.subtype)))||void 0===o?void 0:o.children.find(e=>e.element.subtype===ne.ACTION_BAR);i&&(So.fetchOptions(i).isShow=!1)}function p(e){return e&&[i["ModelDefaultActionName"].$$internal_GotoO2MCreateDialog,i["ModelDefaultActionName"].$$internal_GotoO2MEditDialog,i["ModelDefaultActionName"].$$internal_GotoM2MListDialog].includes(e)}function b(e){var t,o,i,n;if(e.element.bizType!==ie.ACTION||"footer"!==(null===(o=null===(t=e.parent)||void 0===t?void 0:t.element)||void 0===o?void 0:o.slot))return;const r=null===(n=null===(i=e.parent)||void 0===i?void 0:i.parent)||void 0===n?void 0:n.parent;return null===r||void 0===r?void 0:r.metadata}e.isAllowHasModal=t,e.isModalByType=o,e.isModal=n,e.hasModal=r,e.findModalSlotTemplate=a,e.findViewElement=l,e.bindingSlotToView=s,e.hideFormAndDetailActionBar=u,e.isInternalDialogViewAction=p,e.findHostViewMetadata=b}(Vo||(Vo={})),function(e){function t(e){var t,o,n;const{element:r,metadata:a}=e;if(!r)return!1;if(!r.initialization)return!1;if((null===(t=r.componentData)||void 0===t?void 0:t.disablePopupDesign)||(null===(o=r.componentData)||void 0===o?void 0:o.disableDrawerDesign))return!1;const l=r.bizType,s=null===(n=r.widget)||void 0===n?void 0:n.widgetSubtype;if(l!==ie.ACTION||!s)return!1;if(s===ne.VIEW_ACTION_TYPE&&a.target===i["ViewActionTarget"].Drawer){const{popupSettingType:e,dialogSettingType:t,dialogModel:o,viewType:n,view:r,copiedView:l}=a,s=e||t;if(s)switch(s){case oe.BINDING:return!!r;case oe.COPY:return l&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(l.type);case oe.CREATE:return n&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(n)&&o&&!!o.model}}return!1}function o(e,t){return[ie.PACK,ie.ELEMENT].includes(e)&&t===ne.DRAWER}function n(e){if(!e.isWidgetInstance)return!1;const t=e.element;return!!t&&o(t.bizType,t.subtype)}function r(e){return!!e.children.length&&-1!==e.children.findIndex(n)}function a(e){return Vo.findModalSlotTemplate(e)}function l(e){return Vo.findViewElement(e)}function s(e){Vo.bindingSlotToView(e)}function c(e){Vo.hideFormAndDetailActionBar(e)}e.isAllowHasDrawer=t,e.isDrawerByType=o,e.isDrawer=n,e.hasDrawer=r,e.findDrawerSlotTemplate=a,e.findViewElement=l,e.bindingSlotToView=s,e.hideFormAndDetailActionBar=c}(xo||(xo={})),function(e){function t(e){var t,o,n;const{element:r,metadata:a}=e;if(!r)return!1;if(!r.initialization)return!1;if((null===(t=r.componentData)||void 0===t?void 0:t.disablePopupDesign)||(null===(o=r.componentData)||void 0===o?void 0:o.disableDrawerDesign))return!1;const l=r.bizType,s=null===(n=r.widget)||void 0===n?void 0:n.widgetSubtype;if(l!==ie.ACTION||!s)return!1;if(s===ne.VIEW_ACTION_TYPE&&a.target===i["ViewActionTarget"].Inner){const{popupSettingType:e,dialogSettingType:t,dialogModel:o,viewType:n,view:r,copiedView:l}=a,s=e||t;if(s)switch(s){case oe.BINDING:return!!r;case oe.COPY:return l&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(l.type);case oe.CREATE:return n&&[i["ViewType"].Table,i["ViewType"].Form,i["ViewType"].Detail].includes(n)&&o&&!!o.model}}return!1}function o(e,t){return[ie.PACK].includes(e)&&t===ne.INNER_POPUP}function n(e){if(!e.isWidgetInstance)return!1;const t=e.element;return!!t&&o(t.bizType,t.subtype)}function r(e){return!!e.children.length&&-1!==e.children.findIndex(n)}function a(e){return Vo.findModalSlotTemplate(e)}function l(e){return Vo.findViewElement(e)}function s(e){Vo.bindingSlotToView(e)}function c(e){Vo.hideFormAndDetailActionBar(e)}e.isAllowHasInnerPopup=t,e.isInnerPopupByType=o,e.isInnerPopup=n,e.hasInnerPopup=r,e.findInnerPopupSlotTemplate=a,e.findViewElement=l,e.bindingSlotToView=s,e.hideFormAndDetailActionBar=c}(Io||(Io={}));const Wo={top:"flex-start",middle:"center",bottom:"flex-end"};var Po,zo,Go;function Uo(e){return"designer-element-"+e}function Ko(e){return e.draggedContext.element}function qo(e){return i["Optional"].ofNullable(e.relatedContext).map(e=>e.component).map(e=>e.$parent).map(e=>e.currentInstance).orElse(void 0)}function Ho(e){var t;const o=e;if(null===o||void 0===o?void 0:o.isWidgetInstance){let e=Object(r["unref"])(null===(t=o.options)||void 0===t?void 0:t.isFixed);return Object(a["a"])(e)&&(e=o.element.isFixed),!Object(a["a"])(e)&&e}return!1}function Yo(e){var t,o;const i=e;if(null===i||void 0===i?void 0:i.isWidgetInstance){let e=Object(r["unref"])(null===(t=i.options)||void 0===t?void 0:t.isShow);return Object(a["a"])(e)&&(e=null===(o=i.element)||void 0===o?void 0:o.isShow),!!Object(a["a"])(e)||e}return!1}function Qo(e){var t;const o=e;let i=!1;if(null===o||void 0===o?void 0:o.isWidgetInstance){let e=Object(r["unref"])(null===(t=o.options)||void 0===t?void 0:t.disabledDraggable);Object(a["a"])(e)&&(e=o.element.disabledDraggable),Object(a["a"])(e)||(i=e)}return i?Oe:""}function Jo(e){var t;const o=e;if(null===o||void 0===o?void 0:o.isWidgetInstance){let e=Object(r["unref"])(null===(t=o.options)||void 0===t?void 0:t.disableAddElement);return Object(a["a"])(e)&&(e=o.element.disableAddElement),!Object(a["a"])(e)&&e}return!1}function Xo(e){var t;const o=e;if(null===o||void 0===o?void 0:o.isWidgetInstance){let e=Object(r["unref"])(null===(t=o.options)||void 0===t?void 0:t.disableElementSort);return Object(a["a"])(e)&&(e=o.element.disableElementSort),!!Object(a["a"])(e)||!e}return!0}function Zo(e){var t;const o=e;if(null===o||void 0===o?void 0:o.isWidgetInstance){let e=Object(r["unref"])(null===(t=o.options)||void 0===t?void 0:t.disableSelected);if(Object(a["a"])(e)&&(e=o.element.disableSelected),Object(a["a"])(e)){const e=o.currentWidget;return e?!e.widgetMetaFormViewName&&!e.widgetAttrFormViewName:!o.originWidget}return e}return!1}function ei(e){let t=!0;return So.consumerInstance(e,(e,o)=>{t=!(o||e).children.some(e=>Yo(e))}),t}function ti(e){return i["Optional"].ofNullable(e).map(e=>e.currentInstance).orElse(void 0)}function oi(e){return i["Optional"].ofNullable(e).map(e=>So.fetchProperties(e)).map(e=>e.style).map(e=>i["StyleHelper"].parse(e)).orElse(void 0)}(function(e){function t(e,t,o,n,r,l){var s;let c=i["DEFAULT_GUTTERS"];So.isInCard(e)&&(c=i["DEFAULT_CARD_GUTTERS"]);const d=Object.assign({gutter:c,wrap:!!n},i["Optional"].ofNullable(e).map(e=>So.fetchProperties(e)).map(t=>{var o,n;const l={},{gutter:s,align:d,justify:u,wrap:p,style:b}=t;if(Object(a["a"])(s)||(l.gutter=i["LayoutHelper"].convertGutter(s,c)),Object(a["a"])(d)?i["ObjectUtils"].safeSetter(l,r,"align"):l.align=null===(o=null===d||void 0===d?void 0:d.toLowerCase)||void 0===o?void 0:o.call(d),!Object(a["a"])(u)){const e=null===(n=null===u||void 0===u?void 0:u.toUpperCase)||void 0===n?void 0:n.call(u);if(e){const t=i["FlexRowJustify"][e];l.justify=t||u}}return Object(a["a"])(p)||(l.wrap=i["BooleanHelper"].toBoolean(p)),b&&(l.style=i["StyleHelper"].parse(b)),Object.assign(Object.assign({},i["Optional"].ofNullable(e).map(e=>e.element).map(e=>e.row).orElse({})),l)}).orElse({})),u=Object.assign(Object.assign(Object.assign({},d.style||{}),o||{}),{position:"relative",display:"flex",gap:Array.isArray(d.gutter)?d.gutter.map(e=>e+"px").join(" "):d.gutter+"px",flexWrap:d.wrap?"wrap":"nowrap",alignItems:d.align,justifyContent:d.justify,zIndex:Object(p["a"])(10*t-2)});return u.gap=l&&"vertical"===l?Array.isArray(d.gutter)?d.gutter.map(e=>e+"px").reverse().join(" "):d.gutter+"px":Array.isArray(d.gutter)?d.gutter.map(e=>e+"px").join(" "):d.gutter+"px",u.alignContent=Wo[null!==(s=d.align)&&void 0!==s?s:"top"],Object.assign(Object.assign({},d),{style:u})}function o(e,t,o,r,s,c=!1){const u=Object(d["a"])(i["Optional"].ofNullable(e).map(e=>e.element).map(e=>e.col).orElse({}));r&&u.span&&(u.span=i["DEFAULT_COLS"]);const b=Object(d["a"])(i["Optional"].ofNullable(e).map(e=>So.fetchProperties(e)).map(e=>{var t;const o={},{mode:n,span:r,colSpan:l,width:s,minWidth:c,maxWidth:d,style:p}=e;Object(a["a"])(n)||(o.mode=null===(t=null===n||void 0===n?void 0:n.toLowerCase)||void 0===t?void 0:t.call(n)),n===i["FlexColMode"].FULL&&(o.span=i["DEFAULT_COLS"]),Object(a["a"])(r)?Object(a["a"])(l)||(o.span=l):o.span=r;const b=i["CastHelper"].cast(i["StyleHelper"].parse(p)||{}),g=i["StyleHelper"].px(s),v=i["StyleHelper"].px(c),m=i["StyleHelper"].px(d);(g||v||m)&&(g&&(b.minWidth=g,b.maxWidth=g),v&&(b.minWidth=v),m&&(b.maxWidth=m)),o.style=b;const y=Object.assign(Object.assign({},u),o);return y}).orElse({}));b.span=n(b.span);const g=Object.assign(Object.assign(Object.assign({},b.style||{}),o||{}),{zIndex:Object(p["a"])(10*t-1)});return c?(b.span=i["DEFAULT_COLS"],g.flex="0 0 100%"):g.flex=l(b.span,s),"number"!==typeof b.span||g.maxWidth||(g.maxWidth=b.span/24*100+"%"),Object.assign(Object.assign({span:i["DEFAULT_COLS"]},b),{style:g})}function n(e,t){if(t||(t=i["DEFAULT_COLS"]),e){let o;return Object(u["a"])(e)&&(o=i["ColSpanEnum"][e]),o?t*o:Number(e)}return i["DEFAULT_COLS"]}function l(e,t){let o=0;Array.isArray(t)?[o]=t:o=t||0,24===e&&(o=0);const i=e/24*100,n=e/24*o;return`0 0 calc(${i}% + ${n}px - ${o}px)`}function s(e){const t=e.element,o=t.properties;return n(i["Optional"].ofNullable(o.span).orElseGet(()=>i["Optional"].ofNullable(o.colSpan).orElseGet(()=>t.col.span)))}function c(e,t){const o=t.id;let n=0,a=0;return e.children.forEach(e=>{var t;if(e.id===o)return;const l=Object(r["unref"])(null===(t=e.options)||void 0===t?void 0:t.colMode);if(l)switch(l){case i["FlexColMode"].FULL:n++;break;case i["FlexColMode"].MANUAL:a+=s(e),a>=i["DEFAULT_COLS"]&&(n=0,a-=i["DEFAULT_COLS"]);break}}),Math.trunc((i["DEFAULT_COLS"]-a)/(n+1))}e.fetchRowComponentData=t,e.fetchColComponentData=o,e.computeColSpan=n,e.computeColFlex=l,e.fetchColSpan=s,e.computeSwitchModeColSpan=c})(Po||(Po={})),function(e){function t(e){So.fetchOptions(e).popupReady=!0}function o(e){So.fetchOptions(e).popupError=!0}function i(e){const t=So.fetchOptions(e),{popupVisible:o}=t;return!o&&(t.popupVisible=!0,!0)}function n(e){const t=So.fetchOptions(e),{popupVisible:o}=t;return!!o&&(t.popupVisible=!1,!0)}function r(e){const t=e.element.containerWidgetViewType;if(!t)throw new Error("Invalid container view type.");e.element.elements.forEach(e=>{e.isVirtual=e.subtype!==ne.FOOTER});const o=e.children.find(e=>e.element.subtype===ne.DEFAULT);o&&a(o)}function a(e){var t;null===(t=e.children)||void 0===t||t.forEach(e=>{if(!e)return;const t=So.fetchOptions(e);t.isFixed=!0,t.disableSelected=!0,a(e)})}e.isReady=t,e.isError=o,e.open=i,e.close=n,e.disableDesign=r}(zo||(zo={})),function(e){function t(e,t){const o=So.fetchExtendData(e),i=o.activeKey;return i!==t&&(o.activeKey=t,!0)}function o(e){return i["Optional"].ofNullable(e).map(e=>So.fetchProperties(e)).map(e=>e.title).filter(e=>!Object(s["a"])(e)).orElse(i["DEFAULT_TAB_TITLE"])}e.setActiveKey=t,e.computeTabTitle=o}(Go||(Go={}));const ii=["height","width"];function ni(e){const t=oi(e);if(t){const e={};return ii.forEach(o=>{const i=t[o];i&&(e[o]=i)}),Object.assign({},e)}return t}function ri(e){var t,o;const n=(null===(t=null===e||void 0===e?void 0:e.element)||void 0===t?void 0:t.componentData)||{},r=(null===(o=null===e||void 0===e?void 0:e.options)||void 0===o?void 0:o.componentData)||{};return Object.assign(Object.assign(Object.assign({},n),r),{style:Object.assign(Object.assign(Object.assign({},i["StyleHelper"].parse(n.style)||{}),i["StyleHelper"].parse(r.style)||{}),ni(e)||{})})}function ai(e){var t;const o=(null===(t=null===e||void 0===e?void 0:e.options)||void 0===t?void 0:t.toolbarComponentData)||{};return Object.assign(Object.assign({},o),{style:Object.assign(Object.assign({},i["StyleHelper"].parse(o.style)||{}),ni(e)||{})})}function li(e){var t;const o=(null===(t=null===e||void 0===e?void 0:e.options)||void 0===t?void 0:t.draggableItemComponentData)||{};return Object.assign(Object.assign({},o),{style:Object.assign(Object.assign({},i["StyleHelper"].parse(o.style)||{}),ni(e)||{})})}function si(e){const t=null===e||void 0===e?void 0:e.fieldCollection,o={model:null===e||void 0===e?void 0:e.element.model},n=[];return null===t||void 0===t||t.forEach(e=>{var t;const{element:o}=e,{widgetData:r,properties:a}=o,l=Object.assign(Object.assign({},r),{field:null===r||void 0===r?void 0:r.name});Object(i["isComplexField"])(l)&&a.optionFieldsSelect&&(l.modelFields=(null===(t=a.optionFieldsSelect)||void 0===t?void 0:t.filter(e=>!!e&&Object(b["a"])(e)).map(e=>Object.assign(Object.assign({},e),{name:e.field})))||[]),n.push(l)}),o.modelFields=n,o}function ci(e){var t;const{bizType:o,metaExtends:n}=e.element;if(o===ie.ACTION){const o=JSON.parse(n||"{}"),r=(null===(t=e.metadata)||void 0===t?void 0:t.target)||(null===o||void 0===o?void 0:o.target);if([i["ViewActionTarget"].Dialog,i["ViewActionTarget"].Drawer,i["ViewActionTarget"].Inner].includes(r))return!0}return!1}function di(e){const{superRoot:t}=e;return t&&ci(t)?di(t):t}function ui(e,t,o){return i["Optional"].ofNullable(e).map(n=>{var r;const a=n.element,l=a.bizType,s=a.subtype,c={};c.designKey=`ui.designer.UiDesignerViewLayout#${t}#${e.id}#${l}`,c.designModel=a.model,e.root&&(c.designModelDefinition=si(e.root));const d=di(e),u=si(d);if(c.rootModelDefinition=u,c.rootModel=u.model,e.superRoot&&ci(e.superRoot)){const t=si(e.superRoot);c.openerModelDefinition=t}if(c.version=o===ye?void 0:o,null!=a.name&&(c.designField=a.name),l===ie.FIELD&&a.widgetData){const e=a.widgetData;return c.designField=e.name,e.references&&(c.designReferenceModel=e.references),c}if(l===ie.ELEMENT&&a.widgetData&&s&&[ne.DATE_RANGE,ne.DATETIME_RANGE,ne.TIME_RANGE,ne.YEAR_RANGE].includes(s)){const e=a.widgetData;return c.designField=e.startMetadata.name,e.startMetadata.references&&(c.designReferenceModel=e.startMetadata.references),c}return l===ie.ACTION?(c.designReferenceModel=a.model,c.designModel=i["Optional"].ofNullable(e).map(e=>e.superRoot).map(e=>null===e||void 0===e?void 0:e.element).map(e=>null===e||void 0===e?void 0:e.model).orElse(a.model)||a.model,c):[ie.ELEMENT,ie.PACK].includes(l)?(c.designField=a.name||(null===(r=a.widget)||void 0===r?void 0:r.widgetName)||a.key,c.designReferenceModel=a.model,c):null}).orElse(null)}function pi(e){return e.initialization&&(Object(a["a"])(e.isValidator)||e.isValidator)}function bi(e){var t;const{children:o}=e,i=e.element.elements;if(o.length!==(null===i||void 0===i?void 0:i.length))return!1;for(const n in o){const e=o[n];if(!e.isWidgetInstance||!e.isReady||e.id!==(null===(t=null===i||void 0===i?void 0:i[n])||void 0===t?void 0:t.id))return!1;if(e.element.bizType===ie.SLOT&&!bi(e))return!1}return!0}function gi(e){var t,o;const n=i["Optional"].ofNullable(e).map(e=>e.element).orElse(void 0);if(n&&(null===e||void 0===e?void 0:e.isReady)&&bi(e)){const e=Object.assign({},n.properties);lo.forEach(t=>{delete e[t]});let i=n.elements.length;return null===(t=n.elements)||void 0===t||t.forEach(e=>{var t;e.bizType===ie.SLOT&&(i+=(null===(t=e.elements)||void 0===t?void 0:t.length)||0)}),Object.assign(Object.assign({},n),{properties:e,elements:i,widget:{id:null===(o=null===n||void 0===n?void 0:n.widget)||void 0===o?void 0:o.id},widgetData:null})}}const vi=Symbol("__ui_designer_field_widget_creator");function mi(e,t){return i["SPIOperator"].register(vi,e,t)}function yi(e){return i["SPIOperator"].selector(vi,e)}i["SPIOperator"].createStorage({key:vi,matchKeys:["viewType","ttype","multi",{key:"widget",weight:999},"model","viewName","name"]});const hi=Object(r["ref"])([]),fi=()=>{const e=e=>{hi.value=e};return{setGroupList:e,groupList:hi}};let Oi;const wi=e=>{Oi=e},ji=()=>Oi||null,ki=()=>({setScope:wi,getScope:ji}),Ci=e=>{Object(r["onBeforeMount"])(e)},Di=Object(r["ref"])(),Ti=e=>{Di.value=e},$i=Object(r["ref"])(void 0),Ei=e=>{$i.value=e},Si=()=>({currentSelectedInstance:Di,setCurrentSelectedInstance:Ti}),Ni=()=>({lazySelectedInstance:$i,setLazySelectedInstance:Ei}),Vi=Object(r["ref"])([]),xi=()=>Vi,Ii=e=>{Vi.value=e},Mi=()=>({getExistEnumOptions:xi,setExistEnumOptions:Ii}),{getExistEnumOptions:Ai}=Mi();function Fi(e){var t,o;const n=(null===e||void 0===e?void 0:e.element.properties)||{},{ttype:r,dictionary:a,options:l}=(null===e||void 0===e?void 0:e.element.widgetData)||{};let s=n.defaultValue;r===i["ModelFieldType"].Boolean?s=""+n.defaultValue:n.startDefaultValue&&(s=[n.startDefaultValue,n.endDefaultValue]);const c=Object.assign({},n);if(r===i["ModelFieldType"].Enum){const e=null===(t=Ai().value.find(e=>e.dictionary===a))||void 0===t?void 0:t.options;c.options=n.options||e||(null===(o=n._metadata)||void 0===o?void 0:o.selectionOptions)||[]}return"CUSTOM"===c.emptyStyle&&(c.emptyStyle=c.customEmptyStyle),Object.assign(Object.assign({},c),{value:s,_FROM_UI_DESIGNER:!0})}class Li{static compare(e,t){return e=Number(e),t=Number(t),e===t?0:e-t}}class Ri{static comparingNumber(e){return(t,o)=>Li.compare(e(t),e(o))}}function Bi(e){switch(e){case se.TABLE:return i["ViewType"].Table;case se.FORM:return i["ViewType"].Form;case se.DETAIL:return i["ViewType"].Detail;case se.SEARCH:return i["ViewType"].Search;case se.GALLERY:return i["ViewType"].Gallery;case se.TREE:return i["ViewType"].Tree;default:throw new Error("Invalid widget view type. "+e)}}function _i(e){return Object(i["genStaticPath"])("ui-designer/"+e)}function Wi(e,t){const o=e[t];o&&Object.defineProperty(e,t,{get(){return _i(o)}})}const Pi={DesignerActionBar:{emptyHeight:40,emptyHint:"动作区：拖拽「动作」组件在这里配置动作"},DesignerGroup:{emptyHeight:40,emptyHint:"表单区：拖拽「字段」「分组」相关组件在这里配置表单",removeMessage:"确定删除分组和其中的组件"},DesignerTab:{emptyHeight:40,emptyHint:"表单区：拖拽「字段」「分组」相关组件在这里配置表单",removeMessage:"确定删除选项页和其中的组件"},DesignerCollapsePanel:{emptyHeight:40,emptyHint:"表单区：拖拽「字段」「分组」相关组件在这里配置表单",removeMessage:"确定删除折叠面板项和其中的组件"},DesignerContainer:{emptyHeight:40,emptyHint:"拖拽组件到容器中",removeMessage:"确定删除容器和其中的组件"},DesignerDropdown:{emptyHeight:40,emptyHint:"动作区"},DesignerTable:{emptyHeight:54,emptyHint:"表格区: 拖拽「字段」相关组件在这里配置表格字段"},DesignerForm:{emptyHeight:500,emptyHint:"表单区：拖拽「字段」「分组」相关组件在这里配置表单"},DesignerDetail:{emptyHeight:500,emptyHint:"表单区：拖拽「字段」「分组」相关组件在这里配置表单"}},zi={[i["ModelDefaultActionName"].$$internal_ValidateForm]:{displayName:"校验"},[i["ModelDefaultActionName"].$$internal_GotoListTableRouter]:{displayName:"返回"},[i["ModelDefaultActionName"].$$internal_ReloadData]:{displayName:"刷新"},[i["ModelDefaultActionName"].$$internal_GotoListImportDialog]:{displayName:"导入"},[i["ModelDefaultActionName"].$$internal_GotoListExportDialog]:{displayName:"导出"},[i["ModelDefaultActionName"].$$internal_DialogSubmit]:{displayName:"确定"},[i["ModelDefaultActionName"].$$internal_DeleteOne]:{displayName:"删除"},[i["ModelDefaultActionName"].$$internal_DialogCancel]:{displayName:"关闭"},[i["ModelDefaultActionName"].$$internal_SaveDraft]:{displayName:"保存草稿"}};var Gi,Ui;(function(e){function t(e,t,o){if(Object(s["a"])(t))return;let i;return e&&(i=po(e),!i)||(t=i?t.filter(e=>e.viewType===i&&(o||e.show)):t.filter(e=>o||e.show),Object(s["a"])(t))?void 0:t}function o(e,o){const i=t(e,o);if(!i)return;let n;return 1===i.length?n=i[0]:(n=i.find(e=>e.isDefault),n||(n=i[0])),n}function n(e,o,i){const n=t(e,o,i);if(!n)return;let r;return 1===n.length?(r=n[0],o=[]):(r=n.find(e=>e.isDefault),r||(r=n[0]),o=n.filter(e=>e.id!==r.id)),{defaultWidget:r,widgetList:o}}function l(e){if(e&&e.widgetName===ne.ROW)return{align:i["FlexRowAlign"].TOP,gutter:[24,24],justify:i["FlexRowJustify"].START,wrap:!1}}function d(e){let t;return e&&(t=e.widgetDefaultSpan),Object(s["a"])(t)&&(t=i["DEFAULT_COLS"]),{span:t}}function p(e,t,o,i,a){const l=a||n(e,i.widgetList);if(!l)return;const s=i.widgetBizType,{defaultWidget:c,widgetList:u}=l,p=e.element,b=[ie.VIEW,ie.PACK].includes(s)||!c.widgetMetaFormViewName;let g=i.widgetSubtype;switch(s){case ie.FIELD:case ie.ACTION:g=i.widgetName;break}const v={initialization:b,isValidator:!0,bizType:s,subtype:g,elements:[],widget:c,properties:{},model:p.model,title:i.widgetDisplayName,col:d(c),disableSelected:!1},m=new Ie(v,e.superRoot,e.root,e,{isReady:b});return m.currentWidget=c,m.widgetList=u,Object(r["reactive"])(m)}function b(e,t){let o,i,n=t.widgetList,r=t.widgetList;if(!Object(s["a"])(n)&&(!e||(o=po(e),o))&&(n=o?n.filter(e=>e.viewType===o):n.filter(e=>e.show),!Object(s["a"])(n)&&(r=n,r)))return 1===r.length?(i=r[0],n=[]):(i=r.find(e=>e.isDefault),i||(i=r[0]),n=r.filter(e=>e.id!==i.id)),{defaultWidget:i,widgetList:n}}function g(e,t){let o=t.multi;o||(o=!1);let n=t.ttype,r=e.get(`${ie.FIELD}#${n}#${o}`)||[];return n===i["ModelFieldType"].Related&&(n=t.relatedTtype,r=[...r,...e.get(`${ie.FIELD}#${n}#${o}`)||[]]),r}function v(e,t,o,a){var l,s;const c=g(o,a),u=n(e,c);if(!u)return;const{defaultWidget:p,widgetList:b}=u,v={initialization:!0,isValidator:!0,bizType:ie.FIELD,elements:[],widget:p,widgetData:a,properties:{},model:a.model,name:a.name,col:d(p)},y=new Ie(v,e.superRoot,e.root,e,{isReady:!1});if(y.currentWidget=p,y.widgetList=b,null===(l=yi({viewType:Bi(p.viewType),widget:p.widgetName,ttype:a.ttype,multi:a.multi,model:a.model,name:a.name}))||void 0===l||l({currentInstance:e,newWidgetInstance:y,element:a}),a.isVirtual)v.isMock=!0,y.defaultProperties={label:a.displayName},y.metadata=a;else{const e=To().get();if(e.length>=1){const t=y.element;if(t){const{bizType:o}=t;o===ie.FIELD&&(null===(s=t.widgetData)||void 0===s?void 0:s.ttype)!==i["ModelFieldType"].Related&&m(y,e)}}}return Object(r["reactive"])(y)}function m(e,t){const{element:o}=e;let{name:n}=o;if(!n)return;const{model:r}=t[0],a=o.widgetData,l=t.map(e=>e.name);l.push(n),n="field"+o.id,o.model=r,o.name=n,o.isMock=!0;const s=Object.assign(Object.assign({},a),{ttype:i["ModelFieldType"].Related,relatedTtype:a.ttype,related:l,model:r,name:n,store:!1,relationStore:!1,sys:!1,systemSource:i["SystemSource"].UI,isVirtual:!0});o.widgetData=s,e.metadata=s,e.defaultProperties=Object.assign(Object.assign({},e.defaultProperties||{}),{label:s.displayName})}function y(e,t,o){const n=Object.assign({initialization:!0,isValidator:!0,bizType:ie.FIELD,elements:[],widgetData:t,properties:{},model:t.model,name:t.name,col:{span:i["DEFAULT_COLS"]}},(null===o||void 0===o?void 0:o.element)||{}),a=new Ie(n,e.superRoot,e.root,e,{isReady:!0});return Object(r["reactive"])(a)}function h(e,t){return e.get(`${ie.ACTION}#${t}`)}function f(e,t,o){const i=h(t,o.actionDesignerType),a=n(e,i);if(!a)return;const{defaultWidget:l,widgetList:s}=a,c=o.componentData,u={initialization:!0,isValidator:!0,bizType:ie.ACTION,subtype:l.widgetSubtype,elements:[],widget:l,widgetData:o,properties:{},model:o.model,name:o.name,title:o.displayName,componentData:c&&JSON.parse(c),isMock:o.isMock,col:d(l)},p=new Ie(u,e.superRoot,e.root,e,{isReady:!1});return p.currentWidget=l,p.widgetList=s,Object(r["reactive"])(p)}function O(e,t,o){const i=po(e),n=t.get(`${ie.ACTION}#${ne.VIEW_ACTION}`).widgetList.find(e=>e.viewType===i),a=Object.assign({initialization:!0,isValidator:!0,bizType:ie.ACTION,subtype:ne.VIEW_ACTION,elements:[],widget:n,properties:{},model:e.element.model,title:"跳转动作",col:d(n)},(null===o||void 0===o?void 0:o.element)||{}),l=new Ie(a,e.superRoot,e.root,e,{isReady:!0});return l.currentWidget=n,l.widgetList=[],Object(r["reactive"])(l)}function w(e,t){const o=po(e),n=e.element,a=t.get(`${ie.PACK}#${ne.TAB}`).widgetList.find(e=>e.viewType===o),l={initialization:!0,isValidator:!0,bizType:ie.PACK,subtype:ne.TAB,elements:[],properties:{},model:n.model,widget:a,title:Object(i["translateValueByKey"])(i["DEFAULT_TAB_TITLE"]),col:d(a),disableRemoved:!0},s=new Ie(l,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=a,s.widgetList=[],Object(r["reactive"])(s)}function j(e,t){const o=po(e),n=e.element,a=t.get(`${ie.PACK}#${ne.COLLAPSE_PANEL}`).widgetList.find(e=>e.viewType===o),l={initialization:!0,isValidator:!0,bizType:ie.PACK,subtype:ne.COLLAPSE_PANEL,elements:[],properties:{},model:n.model,widget:a,title:Object(i["translateValueByKey"])(i["DEFAULT_COLLAPSE_PANEL_TITLE"]),col:d(a),disableRemoved:!0},s=new Ie(l,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=a,s.widgetList=[],Object(r["reactive"])(s)}function k(e,t,o){const i=po(e),n=e.element,a=t.get(`${ie.ELEMENT}#${o}`).widgetList.find(e=>e.viewType===i),l={initialization:!0,isValidator:!1,bizType:ie.ELEMENT,subtype:o,elements:[],properties:{},model:n.model,widget:a,title:"",col:d(a),disableRemoved:!0},s=new Ie(l,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=a,s.widgetList=[],Object(r["reactive"])(s)}function C(e,t){const o=po(e),i=e.element,n=t.get(`${ie.PACK}#${ne.ROW}`).widgetList.find(e=>e.viewType===o),a={initialization:!0,isValidator:!0,bizType:ie.PACK,subtype:ne.ROW,elements:[],model:i.model,widget:n,properties:{},title:"行",row:l(n),col:d(n),disableSelected:!0,disabledDraggable:!0},s=new Ie(a,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=n,s.widgetList=[],Object(r["reactive"])(s)}function D(t,o){const n=e.createRowWidgetInstance(t,o),r=n.element;return r.row={wrap:!0,align:void 0,justify:void 0},r.col={span:i["DEFAULT_COLS"]},r.disableAddElement=!0,r.disableElementSort=!0,n}function T(e,t,o){const n=po(e),a=e.element,l=t.get(`${ie.PACK}#${ne.CONTAINERS}`).widgetList.find(e=>e.viewType===n),s=Object.assign({initialization:!0,isValidator:!0,bizType:ie.PACK,subtype:ne.CONTAINERS,elements:[],model:a.model,widget:l,properties:{},title:"容器",col:{span:i["DEFAULT_COLS"]},disabledDraggable:!0},(null===o||void 0===o?void 0:o.element)||{}),c=new Ie(s,e.superRoot,e.root,e,{isReady:!0});return c.currentWidget=l,c.widgetList=[],Object(r["reactive"])(c)}function $(e,t,o){const n=po(e),a=e.element,l=t.get(`${ie.PACK}#${ne.CONTAINER}`).widgetList.find(e=>e.viewType===n),s=Object.assign({initialization:!0,isValidator:!0,bizType:ie.PACK,subtype:ne.CONTAINER,elements:[],model:a.model,widget:l,properties:{},title:"容器",row:{type:"flex",gutter:i["DEFAULT_GUTTERS"]},col:{fixed:!1,flex:"1 1 0"},disabledDraggable:!0},(null===o||void 0===o?void 0:o.element)||{}),c=new Ie(s,e.superRoot,e.root,e,{isReady:!0});return c.currentWidget=l,c.widgetList=[],Object(r["reactive"])(c)}function E(e,t,o){const i=po(e),n=e.element,a=t.get(`${ie.ELEMENT}#${ne.DROPDOWN}`).widgetList.find(e=>e.viewType===i),l=Object.assign({initialization:!0,isValidator:!0,bizType:ie.ELEMENT,subtype:ne.DROPDOWN,elements:[],model:n.model,widget:a,properties:{},title:"下拉菜单",col:d(a)},(null===o||void 0===o?void 0:o.element)||{}),s=new Ie(l,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=a,s.widgetList=[],Object(r["reactive"])(s)}function S(e,t,o){const i=po(e),n=e.element,a=t.get(`${ie.ELEMENT}#${ne.TOOLBAR_DROPDOWN}`).widgetList.find(e=>e.viewType===i),l=Object.assign({initialization:!0,isValidator:!0,bizType:ie.ELEMENT,subtype:ne.TOOLBAR_DROPDOWN,elements:[],model:n.model,widget:a,properties:{},title:"下拉菜单",col:d(a)},(null===o||void 0===o?void 0:o.element)||{}),s=new Ie(l,e.superRoot,e.root,e,{isReady:!0});return s.currentWidget=a,s.widgetList=[],Object(r["reactive"])(s)}function N(e,t,o,i){const n=po(e),a=e.element,l=t.get(`${ie.FIELD}#${o}#false`).widgetList.find(e=>e.viewType===n),s=Object.assign({initialization:!0,isValidator:!0,bizType:ie.FIELD,subtype:o,elements:[],model:a.model,widget:l,properties:{},title:"倒计时",col:d(l)},(null===i||void 0===i?void 0:i.element)||{}),c=new Ie(s,e.superRoot,e.root,e,{isReady:!0});return c.currentWidget=l,c.widgetList=[],Object(r["reactive"])(c)}function V(e,t,o){const i=e.element,n=Object.assign({initialization:!0,isValidator:!0,bizType:ie.SLOT,subtype:t,elements:[],model:i.model,properties:{},title:"区域",col:{},disableSelected:!0,disabledDraggable:!0},(null===o||void 0===o?void 0:o.element)||{}),a=new Ie(n,e.superRoot,e.root,e,{isReady:!0});return a.widgetList=[],Object(r["reactive"])(a)}function x(e,t){const o=po(e),i=e.element,n=t.get(`${ie.ELEMENT}#${ne.EXPAND_COLUMN}`).widgetList.find(e=>e.viewType===o),a={initialization:!0,isValidator:!0,bizType:ie.ELEMENT,subtype:ne.EXPAND_COLUMN,slot:ne.EXPAND_ROW,elements:[],model:i.model,widget:n,properties:{},title:"展开行",col:{},disableSelected:!0,disabledDraggable:!0},l=new Ie(a,e.superRoot,e.root,e,{isReady:!0});return l.currentWidget=n,l.widgetList=[],Object(r["reactive"])(l)}function I(e,t,o,i){return _o(o,e,i,`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.TABLE}",\n    "title": "内嵌表格",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.TABLE}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.TABLE}",\n        "widgetName": "${ne.TABLE}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.VIEW}",\n            "subtype": "${ne.SEARCH}",\n            "isFixed": true,\n            "disableRemoved": true,\n            "disableSelected": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.VIEW}",\n                "widgetSubtype": "${ne.SEARCH}",\n                "widgetName": "${ne.SEARCH}",\n                "multi": false\n            },\n            "elements": [\n              {\n                  "bizType": "${ie.ELEMENT}",\n                  "subtype": "${ne.SEARCH}",\n                  "isFixed": true,\n                  "slot": "search",\n                  "disableRemoved": true,\n                  "widget": {\n                      "viewType": "${se.SEARCH}",\n                      "widgetBizType": "${ie.ELEMENT}",\n                      "widgetSubtype": "${ne.SEARCH}",\n                      "widgetName": "search",\n                      "multi": false\n                  },\n                  "elements": [\n                    {\n                        "bizType": "${ie.SLOT}",\n                        "subtype": "${ne.DEFAULT}",\n                        "disableRemoved": true,\n                        "disableSelected": true\n                    }\n                  ]\n              }\n            ]\n        },\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.ACTION_BAR}",\n            "slot": "actionBar",\n            "disableRemoved": true,\n            "disableSelected": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.ACTION_BAR}",\n                "widgetName": "actionBar",\n                "multi": false\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableRemoved": true,\n                    "disableSelected": true\n                }\n            ]\n        },\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.TABLE}",\n            "slot": "table",\n            "isFixed": true,\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.TABLE}",\n                "widgetName": "table",\n                "multi": false\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                },\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.ROW_ACTIONS}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }\n    ]\n}\n`)}function M(e,t,o,i){return _o(o,e,i,`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.FORM}",\n    "title": "内嵌表单",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.FORM}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.FORM}",\n        "widgetName": "${ne.FORM}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.FORM}",\n            "slot": "form",\n            "isFixed": true,\n            "disableRemoved": true,\n            "disableSelected": true,\n            "widget": {\n                "viewType": "${se.FORM}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.FORM}",\n                "widgetName": "form",\n                "multi": false\n            },\n            "componentData": {\n                "emptyHeight": 120,\n                "emptyHint": "表单区：拖拽「字段」相关组件在这里配置表单"\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }\n    ]\n}`)}function A(e,t,o,i){return _o(o,e,i,`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.DETAIL}",\n    "title": "内嵌详情",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.DETAIL}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.DETAIL}",\n        "widgetName": "${ne.DETAIL}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "DETAIL",\n            "slot": "detail",\n            "isFixed": true,\n            "disableSelected": true,\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.DETAIL}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.DETAIL}",\n                "widgetName": "detail",\n                "multi": false\n            },\n            "componentData": {\n                "emptyHeight": 120,\n                "emptyHint": "表单区：拖拽「字段」相关组件在这里配置表单"\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }\n    ]\n}`)}function F(e,t,o){const n=po(e),r=e.element,a=t.get(`${ie.ACTION}#${ne.CLIENT_FUNCTION_ACTION}`).widgetList.find(e=>e.viewType===n),l=zi[o];if(!l)throw new Error("Invalid action. fun="+o);return{initialization:!0,isValidator:!0,bizType:ie.ACTION,subtype:ne.CLIENT_FUNCTION_ACTION,elements:[],model:r.model,widget:a,widgetData:{actionDesignerType:ce.CLIENT_ACTION,actionType:i["ActionType"].Client,model:r.model,name:o,displayName:Object(i["translateValueByKey"])(l.displayName)},properties:{},metaExtends:JSON.stringify({fun:o}),name:o,title:Object(i["translateValueByKey"])(l.displayName),col:d(a),disableRemoved:!0}}function L(e,t,o){const i=F(e,t,o),n=new Ie(i,e.superRoot,e.root,e,{isReady:!1});return n.currentWidget=i.widget,n.widgetList=[],Object(r["reactive"])(n)}function R(e,t){const o=e.children;for(let i=0;i<o.length;i++){const e=o[i],n=e.element;if(n.subtype===ne.CLIENT_FUNCTION_ACTION&&n.name===t)return{instance:e,index:i}}}function B(e,t,o){var i;const n=null===(i=R(e,o))||void 0===i?void 0:i.instance;if(n)return n.element.isVirtual=!1,n.element.isShow=!0,n;const r=L(e,t,o);return So.add(e,r),r}function _(e,t){var o;const i=null===(o=R(e,t))||void 0===o?void 0:o.index;Object(a["a"])(i)||i>=0&&So.remove(e,i)}function W(e,t,o,n){const r=po(e),a=e.element,l=t.get(`${ie.ACTION}#${ne.CLIENT_VIEW_ACTION}`).widgetList.find(e=>e.viewType===r);return{initialization:!0,isValidator:!0,bizType:ie.ACTION,subtype:ne.CLIENT_VIEW_ACTION,elements:[],model:a.model,widget:l,widgetData:{actionDesignerType:ce.VIEW_ACTION,actionType:i["ActionType"].View,contextType:n.contextType,model:a.model,displayName:Object(i["translateValueByKey"])(n.displayName)},properties:{},metaExtends:JSON.stringify({viewType:n.viewType,displayName:Object(i["translateValueByKey"])(n.displayName),label:Object(i["translateValueByKey"])(n.label||n.displayName),contextType:n.contextType,target:n.target}),name:o,title:Object(i["translateValueByKey"])(n.displayName),col:d(l),disableRemoved:!0}}function P(e,t,o){let n;switch(o){case i["ModelDefaultActionName"].$$internal_GotoO2MCreateDialog:n={viewType:i["ViewType"].Form,displayName:"创建",contextType:i["ActionContextType"].ContextFree,target:i["ViewActionTarget"].Dialog};break;case i["ModelDefaultActionName"].$$internal_GotoO2MEditDialog:n={viewType:i["ViewType"].Form,displayName:"编辑",contextType:i["ActionContextType"].Single,target:i["ViewActionTarget"].Dialog};break;case i["ModelDefaultActionName"].$$internal_GotoM2MListDialog:n={viewType:i["ViewType"].Table,displayName:"添加",contextType:i["ActionContextType"].ContextFree,target:i["ViewActionTarget"].Dialog};break;default:throw new Error("Invalid fun value. value = "+o)}const a=W(e,t,o,n),l=new Ie(a,e.superRoot,e.root,e,{isReady:!1});return l.currentWidget=a.widget,l.widgetList=[],Object(r["reactive"])(l)}function z(e,t){const o=e.children,i=[];for(let n=0;n<o.length;n++){const e=o[n],r=e.element,{subtype:a,name:l}=r;a&&[ne.CLIENT_FUNCTION_ACTION,ne.CLIENT_VIEW_ACTION].includes(a)&&l===t&&i.push({instance:e,index:n})}if(i.length)return i}function G(e,t,o){const i=z(e,o);if(i){let e,t;return i.forEach(o=>{const i=o.instance;i.element.subtype===ne.CLIENT_FUNCTION_ACTION?e=i:i.element.subtype===ne.CLIENT_VIEW_ACTION&&(t=i)}),e?(e.element.isVirtual=!1,e.element.isShow=!0,e):(t.element.isVirtual=!1,t.element.isShow=!0,t)}const n=P(e,t,o);return So.add(e,n),n}function U(e,t){var o,i;const n=null===(i=null===(o=z(e,t))||void 0===o?void 0:o[0])||void 0===i?void 0:i.index;Object(a["a"])(n)||n>=0&&So.remove(e,n)}function K(e,t){const o=z(e,t);if(o){let e,t;o.forEach(o=>{const i=o.instance;i.element.subtype===ne.CLIENT_FUNCTION_ACTION?e=i:i.element.subtype===ne.CLIENT_VIEW_ACTION&&(t=i)}),e&&(e.element.isVirtual=!0,e.element.isShow=!1),t&&(t.element.isVirtual=!0,t.element.isShow=!1)}}function q(e,t){B(e,t,i["ModelDefaultActionName"].$$internal_DeleteOne)}function H(e){_(e,i["ModelDefaultActionName"].$$internal_DeleteOne)}function Y(e,t,o){const n=G(e,t,i["ModelDefaultActionName"].$$internal_GotoO2MCreateDialog);Vo.hasModal(n)||Oe(n,t,o,e.element.model,i["ViewType"].Form,!0)}function Q(e){U(e,i["ModelDefaultActionName"].$$internal_GotoO2MCreateDialog)}function J(e){K(e,i["ModelDefaultActionName"].$$internal_GotoO2MCreateDialog)}function X(e,t,o){const n=G(e,t,i["ModelDefaultActionName"].$$internal_GotoO2MEditDialog);Vo.hasModal(n)||Oe(n,t,o,e.element.model,i["ViewType"].Form,!0)}function Z(e){U(e,i["ModelDefaultActionName"].$$internal_GotoO2MEditDialog)}function ee(e){K(e,i["ModelDefaultActionName"].$$internal_GotoO2MEditDialog)}function te(e,t,o){const n=G(e,t,i["ModelDefaultActionName"].$$internal_GotoM2MListDialog);Vo.hasModal(n)||Oe(n,t,o,e.element.model,i["ViewType"].Table,!0)}function oe(e){U(e,i["ModelDefaultActionName"].$$internal_GotoM2MListDialog)}function re(e){K(e,i["ModelDefaultActionName"].$$internal_GotoM2MListDialog)}function ae(e,t){const o=B(e,t,i["ModelDefaultActionName"].$$internal_GotoListImportDialog);o.defaultProperties={type:i["ButtonType"].default.toUpperCase()}}function le(e){_(e,i["ModelDefaultActionName"].$$internal_GotoListImportDialog)}function de(e,t){const o=B(e,t,i["ModelDefaultActionName"].$$internal_GotoListExportDialog);o.defaultProperties={type:i["ButtonType"].default.toUpperCase()}}function ue(e){_(e,i["ModelDefaultActionName"].$$internal_GotoListExportDialog)}function pe(e,t,o,i,n,r){return be(e,t,o,i,n,{default:fe(e,o,n)},r)}function be(e,t,o,n,r,a,l){const s=e.element.properties.label||e.metadata.displayName||e.element.title,c=t.get(`${ie.PACK}#${ne.MODAL}`).widgetList.find(e=>e.viewType===r),d=JSON.parse(`{\n  "bizType": "${ie.PACK}",\n  "subtype": "${ne.MODAL}",\n  "title": "弹窗",\n  "slot": "default",\n  "isFixed": true,\n  "isVirtual": true,\n  "disableRemoved": true,\n  "elements": [\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.HEADER}",\n      "slot": "${ne.HEADER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.DEFAULT}",\n      "isFixed": true,\n      "disableRemoved": true,\n      "disableSelected": true\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.FOOTER}",\n      "slot": "${ne.FOOTER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    }\n  ]\n}`);d.containerWidgetViewType=r,d.widget=c;const{header:u=[],default:p=[],footer:b=[]}=a||{};if(he(d,0,u),he(d,1,p),he(d,2,b),l){const o=d.elements[2];o.disableAddElement=!0;const n=[];o.elements=n,n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogCancel)),n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogSubmit))}const g=_o(o,e,n,d);return g.defaultProperties={title:s},g}function ge(e,t,o,i,n,r){return ve(e,t,o,i,n,{default:fe(e,o,n)},r)}function ve(e,t,o,n,r,a,l){const s=e.element.properties.label||e.metadata.displayName||e.element.title,c=t.get(`${ie.PACK}#${ne.DRAWER}`).widgetList.find(e=>e.viewType===r),d=JSON.parse(`{\n  "bizType": "${ie.PACK}",\n  "subtype": "${ne.DRAWER}",\n  "title": "抽屉",\n  "slot": "default",\n  "isFixed": true,\n  "isVirtual": true,\n  "disableRemoved": true,\n  "elements": [\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.HEADER}",\n      "slot": "${ne.HEADER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.DEFAULT}",\n      "isFixed": true,\n      "disableRemoved": true,\n      "disableSelected": true\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.FOOTER}",\n      "slot": "${ne.FOOTER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    }\n  ]\n}`);d.containerWidgetViewType=r,d.widget=c;const{header:u=[],default:p=[],footer:b=[]}=a||{};if(he(d,0,u),he(d,1,p),he(d,2,b),l){const o=d.elements[2];o.disableAddElement=!0;const n=[];o.elements=n,n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogCancel)),n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogSubmit))}const g=_o(o,e,n,d);return g.defaultProperties={title:s},g}function me(e,t,o,i,n,r){return ye(e,t,o,i,n,{default:fe(e,o,n)},r)}function ye(e,t,o,n,r,a,l){const s=e.element.properties.label||e.metadata.displayName||e.element.title,c=t.get(`${ie.PACK}#${ne.INNER_POPUP}`).widgetList.find(e=>e.viewType===r),d=JSON.parse(`{\n  "bizType": "${ie.PACK}",\n  "subtype": "${ne.INNER_POPUP}",\n  "title": "内嵌弹出层",\n  "slot": "default",\n  "isFixed": true,\n  "isVirtual": true,\n  "disableRemoved": true,\n  "elements": [\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.HEADER}",\n      "slot": "${ne.HEADER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.DEFAULT}",\n      "isFixed": true,\n      "disableRemoved": true,\n      "disableSelected": true\n    },\n    {\n      "bizType": "${ie.SLOT}",\n      "subtype": "${ne.FOOTER}",\n      "slot": "${ne.FOOTER}",\n      "disableRemoved": true,\n      "disableSelected": true,\n      "isVirtual": true,\n      "source": "LAYOUT"\n    }\n  ]\n}`);d.containerWidgetViewType=r,d.widget=c;const{header:u=[],default:p=[],footer:b=[]}=a||{};if(he(d,0,u),he(d,1,p),he(d,2,b),l){const o=d.elements[2];o.disableAddElement=!0;const n=[];o.elements=n,n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogCancel)),n.push(F(e,t,i["ModelDefaultActionName"].$$internal_DialogSubmit))}const g=_o(o,e,n,d);return g.defaultProperties={title:s},g}function he(e,t,o){let i,n;i=Object(u["a"])(o)?JSON.parse(o):o,n=Object(c["a"])(i)?i:[i],e.elements[t].elements=n}function fe(e,t,o){var i;let n;switch(o){case se.TABLE:n=JSON.parse(`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.TABLE}",\n    "title": "内嵌表格",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.TABLE}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.TABLE}",\n        "widgetName": "${ne.TABLE}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.VIEW}",\n            "subtype": "${ne.SEARCH}",\n            "isFixed": true,\n            "disableRemoved": true,\n            "disableSelected": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.VIEW}",\n                "widgetSubtype": "${ne.SEARCH}",\n                "widgetName": "${ne.SEARCH}",\n                "multi": false\n            },\n            "elements": [\n              {\n                  "bizType": "${ie.ELEMENT}",\n                  "subtype": "${ne.SEARCH}",\n                  "slot": "search",\n                  "disableRemoved": true,\n                  "widget": {\n                      "viewType": "${se.SEARCH}",\n                      "widgetBizType": "${ie.ELEMENT}",\n                      "widgetSubtype": "${ne.SEARCH}",\n                      "widgetName": "search",\n                      "multi": false\n                  },\n                  "elements": [\n                    {\n                        "bizType": "${ie.SLOT}",\n                        "subtype": "${ne.DEFAULT}",\n                        "disableRemoved": true,\n                        "disableSelected": true\n                    }\n                  ]\n              }\n            ]\n        },\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.ACTION_BAR}",\n            "slot": "actionBar",\n            "disableRemoved": true,\n            "disableSelected": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.ACTION_BAR}",\n                "widgetName": "actionBar",\n                "multi": false\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableRemoved": true,\n                    "disableSelected": true\n                }\n            ]\n        },\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.TABLE}",\n            "slot": "table",\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.TABLE}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.TABLE}",\n                "widgetName": "table",\n                "multi": false\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                },\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.ROW_ACTIONS}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }\n    ]\n}`);break;case se.FORM:n=JSON.parse(`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.FORM}",\n    "title": "内嵌表单",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.FORM}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.FORM}",\n        "widgetName": "${ne.FORM}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "${ne.FORM}",\n            "slot": "form",\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.FORM}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.FORM}",\n                "widgetName": "form",\n                "multi": false\n            },\n            "componentData": {\n                "emptyHeight": 240,\n                "emptyHint": "${Pi.DesignerDetail.emptyHint}"\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }${(null===(i=e.currentWidget)||void 0===i?void 0:i.widgetName)===ne.BatchUpdateViewAction?`,\n        {\n            "bizType": "${ie.PACK}",\n            "subtype": "${ne.GROUP}",\n            "propSlot": "tableGroup",\n            "isFixed": true,\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.FORM}",\n                "widgetBizType": "${ie.PACK}",\n                "widgetSubtype": "${ne.GROUP}",\n                "widgetName": "group",\n                "multi": false\n            },\n            "defaultProperties": {\n                "title": "待提交数据"\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.VIEW}",\n                    "subtype": "${ne.TABLE}",\n                    "title": "预览表格视图",\n                    "isFixed": true,\n                    "disableRemoved": true,\n                    "disableSelected": true,\n                    "widget": {\n                        "viewType": "${se.TABLE}",\n                        "widgetBizType": "${ie.VIEW}",\n                        "widgetSubtype": "${ne.TABLE}",\n                        "widgetName": "${ne.TABLE}",\n                        "multi": false\n                    },\n                    "elements": [\n                        {\n                            "bizType": "${ie.ELEMENT}",\n                            "subtype": "${ne.TABLE}",\n                            "title": "预览表格",\n                            "slot": "table",\n                            "isFixed": true,\n                            "disableRemoved": true,\n                            "disableSelected": true,\n                            "widget": {\n                                "viewType": "${se.TABLE}",\n                                "widgetBizType": "${ie.ELEMENT}",\n                                "widgetSubtype": "${ne.TABLE}",\n                                "widgetName": "table",\n                                "multi": false\n                            },\n                            "elements": [\n                                {\n                                    "bizType": "${ie.SLOT}",\n                                    "subtype": "${ne.DEFAULT}",\n                                    "disableSelected": true,\n                                    "disableRemoved": true\n                                }\n                            ]\n                        }\n                    ]\n                }\n            ]\n        }`:""}\n    ]\n}`);break;case se.DETAIL:n=JSON.parse(`{\n    "bizType": "${ie.VIEW}",\n    "subtype": "${ne.DETAIL}",\n    "title": "内嵌详情",\n    "isFixed": true,\n    "disableRemoved": true,\n    "disableSelected": true,\n    "widget": {\n        "viewType": "${se.DETAIL}",\n        "widgetBizType": "${ie.VIEW}",\n        "widgetSubtype": "${ne.DETAIL}",\n        "widgetName": "${ne.DETAIL}",\n        "multi": false\n    },\n    "elements": [\n        {\n            "bizType": "${ie.ELEMENT}",\n            "subtype": "DETAIL",\n            "slot": "detail",\n            "disableRemoved": true,\n            "widget": {\n                "viewType": "${se.DETAIL}",\n                "widgetBizType": "${ie.ELEMENT}",\n                "widgetSubtype": "${ne.DETAIL}",\n                "widgetName": "detail",\n                "multi": false\n            },\n            "componentData": {\n                "emptyHeight": 240,\n                "emptyHint": "${Pi.DesignerDetail.emptyHint}"\n            },\n            "elements": [\n                {\n                    "bizType": "${ie.SLOT}",\n                    "subtype": "${ne.DEFAULT}",\n                    "disableSelected": true,\n                    "disableRemoved": true\n                }\n            ]\n        }\n    ]\n}`);break}return n}function Oe(e,t,o,n,r,a){return ke(i["PopupScene"].dialog,e,t,o,n,r,a)}function we(e,t,o,n,r,a){return ke(i["PopupScene"].drawer,e,t,o,n,r,a)}function je(e,t,o,n,r,a){return ke(i["PopupScene"].inner,e,t,o,n,r,a)}function ke(t,o,n,r,a,l,s){let c,d;switch(l){case i["ViewType"].Table:c=se.TABLE;break;case i["ViewType"].Form:c=se.FORM;break;case i["ViewType"].Detail:c=se.DETAIL;break;default:throw new Error("Invalid view type. value = "+l)}switch(t){case i["PopupScene"].dialog:d=e.createModalWidgetInstance(o,n,r,a,c,s);break;case i["PopupScene"].drawer:d=e.createDrawerWidgetInstance(o,n,r,a,c,s);break;case i["PopupScene"].inner:d=e.createInnerPopupWidgetInstance(o,n,r,a,c,s);break;default:throw new Error("Invalid popup scene.")}return So.add(o,d),zo.isReady(o),d}e.fetchDefaultWidget=o,e.fetchWidgetGroup=n,e.fetchDefaultRow=l,e.fetchDefaultCol=d,e.createWidgetInstance=p,e.fetchTextContentFinalWidgetGroup=b,e.fetchWidgetListByField=g,e.createWidgetInstanceByField=v,e.onlyCreateWidgetInstanceByField=y,e.fetchWidgetListByAction=h,e.createWidgetInstanceByAction=f,e.createViewWidgetInstance=O,e.createTabWidgetInstance=w,e.createCollapsePanelWidgetInstance=j,e.createPicIconAreaWidgetInstance=k,e.createRowWidgetInstance=C,e.createContainerRowWidgetInstance=D,e.createContainersWidgetInstance=T,e.createContainerWidgetInstance=$,e.createDropdownWidgetInstance=E,e.createToolbarDropdownWidgetInstance=S,e.createCountdownWidgetInstance=N,e.createAreaWidgetInstance=V,e.createExpandColumnWidgetInstance=x,e.createInlineTableWidgetInstance=I,e.createInlineFormWidgetInstance=M,e.createInlineDetailWidgetInstance=A,e.appendRelationTableDeleteOne=q,e.removeRelationTableDeleteOne=H,e.appendRelationTableGotoO2MCreateDialog=Y,e.removeRelationTableGotoO2MCreateDialog=Q,e.hideRelationTableGotoO2MCreateDialog=J,e.appendRelationTableGotoO2MEditDialog=X,e.removeRelationTableGotoO2MEditDialog=Z,e.hideRelationTableGotoO2MEditDialog=ee,e.appendRelationTableGotoM2MListDialog=te,e.removeRelationTableGotoM2MListDialog=oe,e.hideRelationTableGotoM2MListDialog=re,e.appendImportDialog=ae,e.removeImportDialog=le,e.appendExportDialog=de,e.removeExportDialog=ue,e.createModalWidgetInstance=pe,e.rawCreateModalWidgetInstance=be,e.createDrawerWidgetInstance=ge,e.rawCreateDrawerWidgetInstance=ve,e.createInnerPopupWidgetInstance=me,e.rawCreateInnerPopupWidgetInstance=ye,e.generatorInlineViewElement=fe,e.createAndAddModal=Oe,e.createAndAddDrawer=we,e.createAndAddInnerPopup=je})(Gi||(Gi={})),mi({widget:i["TABLE_WIDGET"]},({currentInstance:e,newWidgetInstance:t,element:o})=>{const{element:i}=t;i.isContainerWidget=!0,i.containerWidgetViewType=se.TABLE;const{widgetNameGroup:n,widgetTypeGroup:r}=$o().get();So.add(t,Gi.createInlineTableWidgetInstance(t,n,r,o.references))}),mi({widget:i["FORM_WIDGET"]},({currentInstance:e,newWidgetInstance:t,element:o})=>{const{element:i}=t;i.isContainerWidget=!0;const{widgetNameGroup:n,widgetTypeGroup:r}=$o().get(),a=po(t);a===se.DETAIL?(i.containerWidgetViewType=se.DETAIL,So.add(t,Gi.createInlineDetailWidgetInstance(t,n,r,o.references))):(i.containerWidgetViewType=se.FORM,So.add(t,Gi.createInlineFormWidgetInstance(t,n,r,o.references)))});class Ki{static isFieldWidget(e){return e.widgetBizType===ie.FIELD}}class qi{static fetchFragment(){let e=qi.FRAGMENT;return e||(e=Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0a4972").then(o.bind(null,"06a7"))),e.isDesignerFragment=!0,qi.FRAGMENT=e),e}static fetchNotFound(){return Object(r["defineAsyncComponent"])(()=>o.e("chunk-2d0b1c55").then(o.bind(null,"20ef")))}static fetchComponentKey(e,t,o){const n=[e];return t&&n.push(t),o===i["ViewClientType"].MOBILE&&n.push(o.toString()),n.join("#")}static register(e,t){qi.provider.set(e,t)}static getExtension(e){return qi.provider.get(e)}}function Hi(e){const{currentSelectedInstance:t}=Si(),{lazySelectedInstance:o}=Ni(),n=Object(r["ref"])(!1),{currentMoveResult:l,isPreviewHistory:c,onSelectInstance:d,onSwitchWidget:u,onRemoveInstance:p,recomputeSpanOptions:b,focusModalVisible:g,focusData:v}=He(),m=Object(r["computed"])(()=>{const t=v.value,o=e.currentInstance;return!(!t||!o)&&So.contains(t,o)}),y=Object(r["ref"])(!1);Object(r["watchEffect"])(()=>{var i,n,r;const a=null===(i=e.currentInstance)||void 0===i?void 0:i.id,l=(null===(n=o.value)||void 0===n?void 0:n.id)||(null===(r=t.value)||void 0===r?void 0:r.id);y.value=l===a});const h=Object(r["computed"])(()=>!g.value&&y.value),f=Object(r["computed"])(()=>!g.value&&!$.value&&(n.value||h.value)),O=Object(r["computed"])(()=>i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).map(e=>Object(r["unref"])(e.toolbarStyle)).orElse(je)),w=Object(r["computed"])(()=>{const t=i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).orElse({}),o=Object(r["unref"])(t.normalStyle||ke);return h.value?Object.assign(Object.assign({},o),Object(r["unref"])(t.selectedStyle||De)):n.value?Object.assign(Object.assign({},o),Object(r["unref"])(t.hoverStyle||Ce)):i["Optional"].ofNullable(e.currentInstance).map(e=>e.element).map(e=>pi(e)).orElse(!0)?o:Object.assign(Object.assign({},o),Object(r["unref"])(t.validatorErrorStyle||Te))}),j=Object(r["computed"])(()=>{const t=i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).orElse({}),o=Object(r["unref"])(t.normalMaskStyle||$e);return h.value?Object.assign(Object.assign({},o),Object(r["unref"])(t.selectedMaskStyle||Se)):n.value?Object.assign(Object.assign({},o),Object(r["unref"])(t.hoverMaskStyle||Ee)):i["Optional"].ofNullable(e.currentInstance).map(e=>e.element).map(e=>pi(e)).orElse(!0)?o:Object.assign(Object.assign({},o),Object(r["unref"])(t.validatorErrorMaskStyle||Ne))}),k=Object(r["computed"])(()=>i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).map(e=>Object(r["unref"])(e.toolbarMaskTooltipStyle)).orElse(void 0)),C=Object(r["computed"])(()=>{var t,o,i;const n=[];let a=null===(t=e.currentInstance)||void 0===t?void 0:t.parent;while(a){const e=a.parent;if(Yo(a)&&!Zo(a)){const{id:t}=a,l=(null===(o=null===e||void 0===e?void 0:e.children)||void 0===o?void 0:o.findIndex(e=>e.id===t))||0;n.push({id:t,displayName:Object(r["unref"])(null===(i=a.options)||void 0===i?void 0:i.title)||"未命名组件",instance:a,index:l})}a=e}return n}),D=Object(r["computed"])(()=>!c.value&&i["Optional"].ofNullable(e.currentInstance).filter(e=>e.element&&e.element.initialization||!1).map(e=>e.widgetList).map(e=>e.length>=1).orElse(!1)),T=Object(r["computed"])(()=>!c.value&&i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).map(e=>{const t=Object(r["unref"])(e.disableRemoved);if(!Object(a["a"])(t))return!t}).orElseGet(()=>i["Optional"].ofNullable(e.currentInstance).map(e=>e.element).map(e=>!e.disableRemoved).orElse(!0))),$=Object(r["computed"])(()=>m.value||Zo(e.currentInstance)),E=e=>{const t=!$.value;t&&e.stopPropagation(),n.value=t},S=e=>{const t=!$.value;t&&e.stopPropagation(),n.value=!1},N=(e,t,o)=>{d({event:e,selectedInstance:t,selectedIndex:o})},V=e=>{const{key:t}=e,o=C.value.find(e=>e.id===t);N(e.domEvent,o.instance,o.index);const i=e.selectedKeys;i.splice(0,i.length)},x=t=>{const{key:o}=t,n=t.selectedKeys;n.splice(0,n.length);const a=e.currentInstance,l=a.widgetList,s=l.findIndex(e=>e.id===o),c=l[s],d=e.currentInstance.currentWidget;Object(r["nextTick"])(()=>{const e=a.element;e.isValidator=!0,a.currentWidget=c,e.widget=c,e.col=Gi.fetchDefaultCol(c)}).then(()=>{const t=a.parent;if(t&&(So.isRow(t).result||So.isBlock(t).result)){const o=t.options,n=o.cols,l=Po.computeColSpan(i["Optional"].ofNullable(a.element).map(e=>e.properties).map(e=>e.colSpan).orElse(0),n);let s=Po.computeColSpan(c.widgetDefaultSpan,n);const d=Po.computeColSpan(c.widgetMinSpan,n),u=Po.computeColSpan(c.widgetMaxSpan,n);l<d?s=d:l>u?s=u:l>0&&(s=l);const p=n-Object(r["unref"])(o.spanTotal)+Po.computeColSpan(l,n);if(p<s){const o=a.id;So.remove(t,t.children.findIndex(e=>e.id===o)),b&&b(t);const i=t.parent,n=Gi.createRowWidgetInstance(i,e.widgetNameGroup);So.add(n,a);const r=t.id,l=i.children.findIndex(e=>e.id===r);So.add(i,n,l+1)}}}).then(()=>{u({selectedInstance:a,originWidget:d,targetWidget:c})}).then(()=>{setTimeout(()=>{l.splice(s,1,d)},1e3)})},I=(e,t)=>{const o=(null===e||void 0===e?void 0:e.children)||[];for(const i of o){if(i.id===t)return!0;if(I(i,t))return!0}return!1},M=()=>{Object(r["nextTick"])(()=>{const t=e.currentInstance.parent;So.remove(t,e.currentIndex),So.removeEmptyBlockWidgetInstance(t)}).then(()=>{var o;const i=null===(o=t.value)||void 0===o?void 0:o.id;i&&(h.value||I(e.currentInstance,i))&&N(void 0,void 0,void 0),p(e.currentInstance)})},A=t=>{$.value||(h.value?t.stopPropagation():(t.stopPropagation(),N(t,e.currentInstance,e.currentIndex)))},F=Object(r["computed"])(()=>{var t,o,i;if(Object(s["a"])(L.value))return!1;const n=null===(o=null===(t=e.currentInstance)||void 0===t?void 0:t.options)||void 0===o?void 0:o.removeCondition;return n?n():((null===(i=e.currentInstance)||void 0===i?void 0:i.children.length)||0)>=1}),L=Object(r["computed"])(()=>i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).map(e=>e.removeMessage).filter(e=>!Object(s["a"])(e)).orElse(void 0)),R=Object(r["computed"])(()=>!m.value&&!Object(s["a"])(B.value)),B=Object(r["computed"])(()=>{if(!m.value)return i["Optional"].ofNullable(e.currentInstance).map(e=>e.options).map(e=>Object(r["unref"])(e.maskMessage)).orElseGet(()=>i["Optional"].ofNullable(l).map(e=>e.value).filter(t=>e.currentInstance.id===t.targetInstance.id).map(e=>e.message).orElse(void 0))});return{hover:n,isContainsFocusData:m,isSelected:h,barShow:f,toolbarStyle:O,toolbarContentStyle:w,toolbarContentMaskStyle:j,toolbarMaskTooltipStyle:k,allowSelectedInstances:C,allowSwitch:D,allowRemove:T,disableSelect:$,onMouseover:E,onMouseout:S,onSelectCurrentInstance:N,onSelectOtherInstance:V,onSwitchInstanceWidget:x,onRemoveCurrentInstance:M,onClick:A,removeCondition:F,removeMessage:L,isMask:R,maskMessage:B}}qi.provider=new Map,function(e){e["custom"]="custom",e["selector"]="selector",e["switcher"]="switcher",e["remove"]="remove"}(Ui||(Ui={}));const Yi=[{key:i["ModelFieldType"].Integer,label:"整数"},{key:i["ModelFieldType"].Float,label:"浮点数"},{key:i["ModelFieldType"].Currency,label:"金额"},{key:i["ModelFieldType"].Boolean,label:"布尔型"},{key:i["ModelFieldType"].String,label:"文本"},{key:i["ModelFieldType"].Text,label:"多行文本"},{key:i["ModelFieldType"].HTML,label:"富文本"},{key:i["ModelFieldType"].DateTime,label:"日期时间"},{key:i["ModelFieldType"].Year,label:"年份"},{key:i["ModelFieldType"].Date,label:"日期"},{key:i["ModelFieldType"].Time,label:"时间"},{key:i["ModelFieldType"].Enum,label:"数据字典"},{key:i["ModelFieldType"].Map,label:"键值对"},{key:i["ModelFieldType"].Phone,label:"手机"},{key:i["ModelFieldType"].Email,label:"邮箱"},{key:i["ModelFieldType"].OneToMany,label:"一对多"},{key:i["ModelFieldType"].ManyToOne,label:"多对一"},{key:i["ModelFieldType"].ManyToMany,label:"多对多"}].map(e=>Object.assign(Object.assign({},e),{value:e.key,data:void 0})),Qi=[{key:i["ViewType"].Table,label:"表格"},{key:i["ViewType"].Form,label:"表单"},{key:i["ViewType"].Detail,label:"详情"},{key:i["ViewType"].Search,label:"搜索"},{key:i["ViewType"].Gallery,label:"画廊"}].map(e=>Object.assign(Object.assign({},e),{value:e.key,data:void 0}));var Ji;(function(e){e["MetaPanelField"]="MetaPanelField",e["MetaPanelAction"]="MetaPanelAction",e["MetaPanelDisplayField"]="MetaPanelDisplayField",e["MetaPanelDisplayAction"]="MetaPanelDisplayAction",e["MetaPanelFieldAndAction"]="MetaPanelFieldAndAction"})(Ji||(Ji={}));const Xi=[Ji.MetaPanelField,Ji.MetaPanelAction,Ji.MetaPanelDisplayField,Ji.MetaPanelDisplayAction,Ji.MetaPanelFieldAndAction];let Zi=null;function en(){return Zi||(Zi=tn()),Zi}function tn(){const e={top:-100,left:-100,width:0,height:0},t=Object(r["ref"])(!1),o=Object(r["ref"])(e),i=Object(r["ref"])([]);let n=null;function a(){c(!1),o.value=e,n=null,i.value=[]}function l({target:e,options:t,onSelect:r}){a(),setTimeout(()=>{const a=e.getBoundingClientRect();o.value={top:a.top,left:a.left,width:a.width,height:a.height},i.value=t,c(!0),n=r},200)}function s(e){c(!1),n&&n(e),n=null,i.value=[]}function c(e){t.value=e}return{dropdownOpen:t,dropdownPosition:o,dropdownOptions:i,triggerDropdown:l,onDropdownSelect:s,setVisible:c}}const on="未命名组件";var nn,rn=Object(r["defineComponent"])({name:"DesignerDraggableToolbar",components:{ElIcon:C["a"],ElIconGrid:f["Grid"],ElIconDelete:f["Delete"],ElIconSwitch:f["Switch"],APopconfirm:O["a"]},props:Object.assign(Object.assign({},st),{toolbarWrapper:{type:Boolean},toolbarAllowOptions:{type:Array},toolbarExtendNode:{type:Object},zIndex:{type:Number},toolbar:{type:Object,required:!0}}),setup(e){const t=en(),o=fi(),{rootData:n}=He(),l=Object(r["computed"])(()=>ki().getScope()),s=Object(r["ref"])(!1),d=Object(r["ref"])(!1);Object(r["onMounted"])(()=>{var e;d.value=!!(null===(e=y())||void 0===e?void 0:e.length)});const u=Object(r["computed"])(()=>{var t,o;return e.currentInstance&&(Object(r["unref"])(null===(t=e.currentInstance.options)||void 0===t?void 0:t.title)||(null===(o=e.currentInstance.currentWidget)||void 0===o?void 0:o.widgetDisplayName))||on}),p=Object(r["computed"])(()=>{var t;return{zIndex:""+(Ve+10*((null===(t=e.currentInstance)||void 0===t?void 0:t.level)||1))}}),b=Object(r["computed"])(()=>Object(a["a"])(e.toolbarExtendNode)?[]:Object(c["a"])(e.toolbarExtendNode)?e.toolbarExtendNode:[e.toolbarExtendNode]),g=Object(r["computed"])(()=>{var t,o;return!i["ObjectUtils"].equals(null===(t=n.value)||void 0===t?void 0:t.id,null===(o=e.currentInstance)||void 0===o?void 0:o.id)&&(!e.toolbarAllowOptions||e.toolbarAllowOptions.includes(Ui.selector))}),v=Object(r["computed"])(()=>{var t,o,i,n;return e.toolbarAllowOptions?null===(o=null===(t=e.toolbarAllowOptions)||void 0===t?void 0:t.includes)||void 0===o?void 0:o.call(t,Ui.switcher):!!(null===(n=null===(i=e.toolbar)||void 0===i?void 0:i.allowSwitch)||void 0===n?void 0:n.value)}),m=Object(r["computed"])(()=>{var t,o,i,n;return e.toolbarAllowOptions?null===(o=null===(t=e.toolbarAllowOptions)||void 0===t?void 0:t.includes)||void 0===o?void 0:o.call(t,Ui.remove):!!(null===(n=null===(i=e.toolbar)||void 0===i?void 0:i.allowRemove)||void 0===n?void 0:n.value)});function y(){var t;const o=[];for(const r of e.toolbar.allowSelectedInstances.value){if(o.push(r),So.isModal(r.instance).result||So.isDrawer(r.instance).result||So.isInnerPopup(r.instance).result)break;if(i["ObjectUtils"].equals(null===(t=n.value)||void 0===t?void 0:t.id,r.id))break}return o}function h(){var t;return e.widgetCategoryGroup?Array.from(null===(t=e.widgetCategoryGroup)||void 0===t?void 0:t.values()).flatMap(e=>e.items):[]}function f(){var t;const n=[],r=new Map,a=(null===(t=e.currentInstance)||void 0===t?void 0:t.widgetList)||[],s=h(),c=a.filter(e=>!Xi.includes(e.widgetName)),d=a.filter(e=>Xi.includes(e.widgetName));return o.groupList.value.filter(e=>e.widgetCount).forEach(e=>{const t=c.filter(t=>{var o;return Object(i["translateValueByKey"])(null===(o=t.group)||void 0===o?void 0:o.groupDisplayName)===e.displayName});t.length&&r.set(e.displayName,t)}),d.length&&r.set(Object(i["translateValueByKey"])("模型相关"),d),r.forEach((t,o)=>{const i=[];t.forEach(t=>{var o,n,r;const a=t.fieldRelModels||[];if(a.length){const t=null===(r=null===(n=null===(o=e.currentInstance)||void 0===o?void 0:o.element)||void 0===n?void 0:n.widgetData)||void 0===r?void 0:r.references;if(t&&!a.includes(t))return}const c=s.find(e=>e.name===t.widgetDefinitionName);if(c){const e=c.scope||[];if(e.length&&!e.includes(l.value))return}i.push({id:t.id,displayName:t.widgetDisplayName})}),i.length&&n.push({title:o,items:i})}),n}function O(o){const i=y();i.length&&t.triggerDropdown({target:o.currentTarget,options:i,onSelect:t=>{e.toolbar.onSelectOtherInstance(t)}})}function w(o){const i=f();i.length&&t.triggerDropdown({target:o.currentTarget,options:i,onSelect:t=>{e.toolbar.onSwitchInstanceWidget(t)}})}function j(){return x(this,void 0,void 0,(function*(){s.value?s.value=!1:e.toolbar.removeCondition.value?s.value=!0:e.toolbar.onRemoveCurrentInstance()}))}function k(){e.toolbar.onRemoveCurrentInstance()}const C=Object(r["computed"])(()=>{var t;return null!==(t=e.toolbar.toolbarStyle.value)&&void 0!==t?t:{}});return{rootData:n,widgetDisplayName:u,hasSelectOptions:d,overlayStyle:p,zIndex:e.zIndex,customExtendOptions:b,allowSelectOption:g,allowSwitchOption:v,allowRemoveOption:m,onSelectOptionClick:O,onSwitchOptionClick:w,popconfirmVisible:s,onRemoveVisibleChange:j,onRemoveConfirmed:k,toolbarStyle:C}}});function an(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("el-icon-grid"),s=Object(r["resolveComponent"])("el-icon"),c=Object(r["resolveComponent"])("el-icon-switch"),d=Object(r["resolveComponent"])("el-icon-delete"),u=Object(r["resolveComponent"])("a-popconfirm");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"designer-draggable-toolbar-bar",style:Object(r["normalizeStyle"])(e.toolbarStyle)},[Object(r["createCommentVNode"])(" 不要在此处添加keep-alive，无明显收益，增加内存负担 "),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.customExtendOptions,e=>(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e),{key:e.key}))),128)),e.allowSelectOption&&e.hasSelectOptions?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:0,class:"designer-draggable-toolbar-options designer-draggable-toolbar-selector",onClickCapture:t[0]||(t[0]=Object(r["withModifiers"])((...t)=>e.onSelectOptionClick&&e.onSelectOptionClick(...t),["stop"]))},[Object(r["createVNode"])(s,null,{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(l)]),_:1}),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.$translate(e.widgetDisplayName)),1)],32)):Object(r["createCommentVNode"])("v-if",!0),e.allowSwitchOption?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:1,class:"designer-draggable-toolbar-options",onClickCapture:t[1]||(t[1]=Object(r["withModifiers"])((...t)=>e.onSwitchOptionClick&&e.onSwitchOptionClick(...t),["stop"]))},[Object(r["createVNode"])(s,null,{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(c)]),_:1})],32)):Object(r["createCommentVNode"])("v-if",!0),e.allowRemoveOption?(Object(r["openBlock"])(),Object(r["createBlock"])(u,{key:2,class:"designer-draggable-toolbar-options",placement:"bottomRight",visible:e.popconfirmVisible,title:e.toolbar.removeMessage.value,onVisibleChange:e.onRemoveVisibleChange,onConfirm:e.onRemoveConfirmed},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(s,{onClickCapture:Object(r["withModifiers"])(e.onRemoveVisibleChange,["stop"])},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(d)]),_:1},8,["onClickCapture"])]),_:1},8,["visible","title","onVisibleChange","onConfirm"])):Object(r["createCommentVNode"])("v-if",!0)],4)}rn.render=an,rn.__file="src/view/component/designer-draggable/designer-draggable-toolbar.vue",function(e){e["WIDGET"]="WIDGET",e["FIELD"]="FIELD",e["ACTION"]="ACTION"}(nn||(nn={}));const ln=new Map;function sn(e,t,o){let i=`${e}#${t}`;return o&&(i=`${i}#${o}`),i}function cn(e,t,o,n){ln.set(sn(e,t,o),i["CastHelper"].cast(n))}function dn(e,t,o){let i=ln.get(sn(e,t,o));return i||(i=ln.get(sn(e,t))),i}function un(e,t,o){cn(nn.WIDGET,e,t,o)}function pn(e,t){return dn(nn.WIDGET,e,t)}function bn(e,t,o){cn(nn.FIELD,e,t,o)}function gn(e,t){return dn(nn.FIELD,e,t)}function vn(e,t,o){cn(nn.ACTION,e,t,o)}function mn(e,t){return dn(nn.ACTION,e,t)}var yn;(function(e){const t="该元素不可拖拽进此区域";function o(e){var t,o;const{currentInstance:i,targetInstance:n}=e;if(i){const e=null===(t=bo(i,e=>e.element.bizType===ie.VIEW,e=>e.root))||void 0===t?void 0:t.id,r=null===(o=bo(n,e=>e.element.bizType===ie.VIEW,e=>e.root))||void 0===o?void 0:o.id;if(e&&r)return e===r}return!0}function n(e){var t;const{targetInstance:o}=e,n=o.element;let r=!1,a=!1;const l=(null===(t=To().first())||void 0===t?void 0:t.model)||e.model,s=n.model;if(l){if(a=!0,l===s&&(r=!0),!r){const{currentWidget:e}=o;if(e&&z.includes(e.widgetName)){const e=n.widgetData;if(e){let{ttype:t}=e;t===i["ModelFieldType"].Related&&(t=e.relatedTtype);const{references:o}=e;t&&o&&P.includes(t)&&l===o&&(r=!0)}}}}else r=!0;return{isAllowMove:r,hasModel:a}}function r(e,t){const o=null===t||void 0===t?void 0:t.element.subtype;return o?o===ne.DEFAULT?e:t:e}function a(e){const{targetInstance:t}=e,{isAllowMove:i}=n(e);let a,l=i;return So.consumerInstance(t,(t,i)=>{if(a=r(t,i),o(e))if(l){l=!1;const o=t.element,{bizType:n}=o,{subtype:r}=o,a=pn(n,r);a&&(l=a(e,t,i))}else l=d(t);else l=c(t)}),l=u(l,a||t),l}function l(e){const{targetInstance:t}=e,{isAllowMove:i,hasModel:a}=n(e);let l,s=i;return So.consumerInstance(t,(t,i)=>{if(l=r(t,i),o(e))if(s){s=!1;const o=t.element,{bizType:n,subtype:r}=o,a=gn(n,r);a&&(s=a(e,t,i))}else s=d(t);else s=c(t)}),s=u(s,l||t),p(e,e=>e.fieldCollection,a,s,"字段已存在")}function s(e){const{targetInstance:t}=e,{isAllowMove:i,hasModel:a}=n(e);let l,s=i;return So.consumerInstance(t,(t,i)=>{if(l=r(t,i),o(e))if(s){s=!1;const o=t.element,{bizType:n,subtype:r}=o,a=mn(n,r);a&&(s=a(e,t,i))}else s=d(t);else s=c(t)}),s=u(s,l||t),p(e,e=>e.actionCollection,a,s,"动作已存在")}function c(e){return{move:!1,targetInstance:e,message:"不允许拖入其他视图"}}function d(e){return{move:!1,targetInstance:e,message:"模型不匹配，不允许拖拽进此区域"}}function u(e,o){if("boolean"===typeof e){let i="";e||(i=t),e={move:e,targetInstance:o,message:i}}else e?e.targetInstance=o:e={move:!1,targetInstance:o,message:t};return e}function p(e,t,o,n,r){var a;const{currentInstance:l,targetInstance:s,currentWidget:c,model:d,name:u,focusModalVisible:p,focusData:b,widgetData:g}=e;if(o&&n.move){const e=i["Optional"].ofNullable(l).map(e=>e.root).orElse(void 0);let o=s.root;const n=`${d}#${u}`;let v=!0;const m=t(o);if(c.widgetBizType===ie.ACTION&&(null===(a=g)||void 0===a?void 0:a.contextType)===i["ActionContextType"].SingleAndBatch?So.consumerInstance(s,e=>{var t;v=m.has(`${n}#${So.generatorWidgetPath(null===(t=e.root)||void 0===t?void 0:t.id,e)}`)}):v=m.has(n),v&&e&&e.id===o.id&&(v=!1),v)return p&&b&&!So.contains(b,o)&&(o=b),{move:!1,targetInstance:o,message:r}}return n}e.fetchRealTargetInstance=r,e.widgetDraggableRule=a,e.fieldDraggableRule=l,e.actionDraggableRule=s})(yn||(yn={}));const hn=Object(r["defineComponent"])({name:"DesignerDraggableItem",components:{},props:Object.assign({},st),setup(e){const t=Hi(e),o=Object(r["shallowRef"])(void 0),{viewClientType:n,protocolVersion:l,currentMoveResult:s,onSelectInstance:c,onMoveInstance:d,onSettingChange:u,recomputeSpanOptions:p,focusModalVisible:b,rootData:g,focusData:v}=He(),y=e=>qi.getExtension(qi.fetchComponentKey(e.bizType,e.subtype,n.value)),h=e=>{const t=e.element;let o;const i=t.bizType,r=t.subtype;switch(i){case ie.VIEW:o=y(t),o||(o=qi.getExtension(qi.fetchComponentKey(t.bizType,void 0,n.value)));break;case ie.SLOT:{const t=e.parent.element;if(o=qi.getExtension(qi.fetchComponentKey(t.subtype,r,n.value)),!o)switch(t.bizType){case ie.VIEW:r===ne.DEFAULT&&(o=qi.getExtension(qi.fetchComponentKey(t.bizType,t.subtype,n.value)));break;case ie.PACK:case ie.ELEMENT:case ie.ACTION:o=qi.fetchFragment();break}break}case ie.FIELD:case ie.ACTION:if(r&&[ne.DATETIME_COUNTDOWN,ne.DATE_COUNTDOWN].includes(r)&&(o=y(t)),!o){const t=e.parent.element;o=qi.getExtension(qi.fetchComponentKey(t.subtype,i,n.value))}if(!o){const t=e.root.element;o=qi.getExtension(qi.fetchComponentKey(t.subtype,i,n.value))}o||(o=qi.getExtension(qi.fetchComponentKey(i,void 0,n.value)));break;case ie.PACK:{const t=e.root.element;o=qi.getExtension(qi.fetchComponentKey(t.subtype,r,n.value));break}case ie.ELEMENT:{const t=e.root.element;o=qi.getExtension(qi.fetchComponentKey(t.subtype,r,n.value));break}}return o||(o=y(t)),o},f=Object(r["computed"])(()=>ri(e.currentInstance)),O=Object(r["computed"])(()=>ai(e.currentInstance)),w=Object(r["computed"])(()=>li(e.currentInstance)),j=Object(r["computed"])(()=>{var t,o,i;let n=null===(o=null===(t=e.currentInstance)||void 0===t?void 0:t.options)||void 0===o?void 0:o.zIndex;return Object(a["a"])(n)&&(n=10*((null===(i=e.currentInstance)||void 0===i?void 0:i.level)||1)),n}),k=Object(r["computed"])(()=>{var t;const{bizType:o,subtype:i}=(null===(t=e.currentInstance)||void 0===t?void 0:t.element)||{};return[ie.FIELD,ie.ACTION].includes(o)||[ne.DATETIME_RANGE,ne.DATE_RANGE,ne.TIME_RANGE,ne.YEAR_RANGE,ne.FLOAT_PLAT].includes(i)});Object(r["watch"])(()=>{var t;const o=null===(t=e.currentInstance)||void 0===t?void 0:t.element;if(o)return{viewClientType:n.value,bizType:o.bizType,subtype:o.subtype}},()=>{const t=e.currentInstance;t&&t.element&&(o.value=h(t),o.value||(console.error("找不到对应的设计组件",t),o.value=qi.fetchNotFound()))},{immediate:!0}),Object(r["watch"])(()=>gi(e.currentInstance),e=>{e&&u()},{deep:!0});const C=(e,t,o)=>{c({event:e,selectedInstance:t,selectedIndex:o})},D=(e,t,o)=>{d({fromInstance:e,toInstance:t,targetInstance:o})},T=()=>{s.value=void 0,dt.INSTANCE.clear()},$=Object(r["ref"])(""),E=()=>{if(s.value=void 0,dt.INSTANCE.clear(),e.currentInstance){const{bizType:t}=e.currentInstance.element;if([ie.FIELD,ie.ACTION].includes(t))return;$.value=Object(m["uniqueKeyGenerator"])()}},S=t=>{let o,i;return ho.isV3(l.value)||So.isRow(t).result||So.isBlock(t).result||So.isTable(t).result||So.isActionArea(t).result||So.isContainer(t).result?(o=t,i=!1):(o=Gi.createRowWidgetInstance(t,e.widgetNameGroup),i=!0),{realParentInstance:o,isNewRow:i}},N=(t,o,i)=>{const{realParentInstance:n,isNewRow:a}=S(t);let l;const s=o.widgetKind;let c;switch(s){case de.WIDGET_GROUP:if(l=Gi.createWidgetInstance(n,e.widgetNameGroup,e.widgetTypeGroup,o),l){const t=l.element.subtype;if(t)switch(t){case ne.TABS:So.add(l,Gi.createTabWidgetInstance(l,e.widgetNameGroup));break;case ne.COLLAPSE:So.add(l,Gi.createCollapsePanelWidgetInstance(l,e.widgetNameGroup));break;case ne.CONTAINERS:{const t=Gi.createContainerRowWidgetInstance(l,e.widgetNameGroup);So.add(t,Gi.createContainerWidgetInstance(t,e.widgetNameGroup)),So.add(t,Gi.createContainerWidgetInstance(t,e.widgetNameGroup)),So.add(l,t);break}}}else c="该布局在该视图无对应组件";break;case de.FIELD:l=Gi.createWidgetInstanceByField(n,e.widgetNameGroup,e.widgetTypeGroup,o),l||(c="该字段在该视图无对应组件");break;case de.ACTION:l=Gi.createWidgetInstanceByAction(n,e.widgetTypeGroup,o),l||(c="该动作在该视图无对应组件");break;default:throw new Error("Invalid widget kind. value="+s)}if(!l)return m["OioNotification"].error("异常",c),void t.children.splice(i,1);Object(r["nextTick"])(()=>{let e;a?(e=n,So.add(n,l)):e=l,t.children.splice(i,1),So.add(t,e,i)}).then(()=>{l.element.disableSelected||C(void 0,l,i)})},V=(e,t)=>{const{realParentInstance:o,isNewRow:i}=S(e);Object(r["nextTick"])(()=>{let n;i?(n=o,So.add(o,t)):n=t;const r=e.children.findIndex(e=>e.id===t.id);e.children.splice(r,1),So.add(e,n,r),D(void 0,e,n)}).then(()=>{const{currentSelectedInstance:e}=Si();p&&e.value&&p(e.value)})},x=t=>{const{component:o,element:i,newIndex:n}=t,r=ti(o)||e.currentInstance;if(Me(i)){const e=i;V(r,e)}else N(r,i,n);E()},I=e=>{const{element:t,oldIndex:o}=e,i=t.element,n=t.parent,a=n.element.elements;Object(r["nextTick"])(()=>{a.splice(o,1);const e=n.children.findIndex(e=>e.id===t.id);a.length<=e?a.push(i):a.splice(e,0,i),D(n,n,t)}),E()},M=e=>{const{element:t,oldIndex:o}=e,i=t.parent;Object(r["nextTick"])(()=>{i.element.elements.splice(o,1),So.removeEmptyBlockWidgetInstance(i)}),E()},A=()=>(s&&(s.value=void 0),!0),F=e=>{const t=qo(e);if(!t)return!1;const o=dt.INSTANCE.get(t.id);if(!Object(a["a"])(o))return L(o);const n=Ko(e),r=n.element,l=n.currentWidget;if(!l)return!1;const s={currentInstance:n,targetInstance:t,currentWidget:Object.assign(Object.assign({},l),{widgetSpan:Po.computeColSpan(i["Optional"].ofNullable(r).map(e=>e.properties).map(e=>e.colSpan).orElseGet(()=>i["Optional"].ofNullable(r).map(e=>e.col).map(e=>e.span).orElse(l.widgetMinSpan)))}),model:r.model,name:r.name,widgetData:r.widgetData,focusModalVisible:b.value,rootData:g.value,focusData:v.value};let c;switch(r.bizType){case ie.VIEW:case ie.SLOT:break;case ie.PACK:case ie.ELEMENT:c=yn.widgetDraggableRule(s);break;case ie.FIELD:c=yn.fieldDraggableRule(s);break;case ie.ACTION:c=yn.actionDraggableRule(s);break}if(!c)throw new Error("Invalid move result.");return dt.INSTANCE.set(t.id,c),L(c)},L=e=>So.moveResultProcess(s,e);return{dynamicKey:$,toolbar:t,dynamicWidget:o,componentData:f,draggableItemComponentData:w,zIndex:j,hasMask:k,onStartCallback:T,onEndCallback:E,onAddedCallback:x,onMovedCallback:I,onRemovedCallback:M,moveToSelfCallback:A,moveToOtherCallback:F,toolbarComponentData:O}},render(){var e,t;const{currentInstance:o,currentIndex:n,widgetCategoryGroup:a,widgetNameGroup:l,widgetTypeGroup:s,onStartCallback:c,onEndCallback:d,onAddedCallback:u,onMovedCallback:p,onRemovedCallback:b,moveToSelfCallback:g,moveToOtherCallback:v,toolbarComponentData:m={},toolbar:y,dynamicKey:h,dynamicWidget:f,componentData:O={},draggableItemComponentData:w={},zIndex:j}=this;if(!o)return[];const{key:k,isWidgetInstance:C}=o;if(!C)return[];const D=this.$slots.default;let T;const $=Object.assign({key:k,currentInstance:o,currentIndex:n,dynamicKey:h,widgetCategoryGroup:a,widgetNameGroup:l,widgetTypeGroup:s,startCallback:c,endCallback:d,addedCallback:u,movedCallback:p,removedCallback:b,moveToSelfCallback:g,moveToOtherCallback:v},O);if(D)T=D($);else{if(!f)return[];const t=()=>Object(r["createVNode"])(f,$,Object.assign(Object.assign({},i["StableSlotProp"]),{default:({instance:e,index:t})=>[Object(r["createVNode"])(hn,{key:null===e||void 0===e?void 0:e.id,currentInstance:e,currentIndex:t,widgetCategoryGroup:a,widgetNameGroup:l,widgetTypeGroup:s})]}));if(null===(e=f)||void 0===e?void 0:e.isDesignerFragment)return t();T=[t()]}if(!this.invisibleToolbar){if(this.hasMask){const e=Object(r["createVNode"])("div",{class:"designer-draggable-item-transparent__mask",style:{zIndex:j-4}});T.push(e)}const e=Object(r["createVNode"])("div",{class:"designer-draggable-item-mask",style:Object.assign(Object.assign({},y.toolbarContentMaskStyle.value),y.toolbarContentStyle.value)});T.push(e);const t=Object(r["withDirectives"])(Object(r["createVNode"])(rn,{zIndex:j+1,currentInstance:o,currentIndex:n,widgetCategoryGroup:a,widgetNameGroup:l,widgetTypeGroup:s,key:null===o||void 0===o?void 0:o.key,toolbar:y,toolbarWrapper:m.toolbarWrapper,toolbarExtendNode:m.toolbarExtendNode,toolbarAllowOptions:m.toolbarAllowOptions}),[[r["vShow"],y.hover.value||y.isSelected.value]]);T.push(t)}return(null===(t=this.currentInstance)||void 0===t?void 0:t.element.bizType)!==ie.FIELD&&T.push(Object(r["withDirectives"])(Object(r["createVNode"])("div",{class:"designer-draggable-mask-tooltip",style:Object.assign(Object.assign({},y.toolbarMaskTooltipStyle),{zIndex:j-2})},[Object(r["createVNode"])("span",{},y.isMask.value?Object(i["translateValueByKey"])(y.maskMessage.value):"")]),[[r["vShow"],y.isMask.value]])),Object(r["createVNode"])("div",Object.assign(Object.assign({},w),{class:i["StringHelper"].append(["designer-draggable-item"],i["CastHelper"].cast(w.class)),style:Object.assign(Object.assign({},w.style||{}),{zIndex:y.hover.value?10*j:j}),onMouseover:y.onMouseover,onMouseout:y.onMouseout,onClick:y.onClick}),T)}});hn.__file="src/view/component/designer-draggable/designer-draggable-item.vue";const fn={components:{KDraggable:nt,EmptyDraggable:Rt,DesignerDraggableItem:hn},inheritAttrs:!1,props:Object.assign({},ct),data(){var e,t;const{isPreviewHistory:o,protocolVersion:i,focusData:n}=He();return{DraggableDirection:Qe,draggableIgnoredClassName:Oe,draggableFilter:we,isFixedInstance:e=>{const t=n.value,i=e;return!!(t&&i&&i.isWidgetInstance&&So.contains(t,i))||(Ho(e)||o.value)},isShowInstance:Yo,fetchDraggableIgnoredClass:Qo,isDisableAddElement:Jo,isAllowElementSort:Xo,isEmptyInstance:ei,fetchInstanceDomId:Uo,isInline:(null===(t=null===(e=this.currentInstance)||void 0===e?void 0:e.superRoot)||void 0===t?void 0:t.element.bizType)===ie.FIELD,isV3ProtocolVersion:ho.isV3(i.value)}},computed:{componentStyle(){return oi(this.currentInstance)}}},On={props:{currentInstance:{type:Object,required:!0}},created(){const e=po(this.currentInstance),t=this.currentInstance;if(t&&e===se.TABLE)if(t.children.some(e=>{var t;return(null===(t=e.element)||void 0===t?void 0:t.bizType)!==ie.SLOT})){const e=So.fetchAreaInstanceNullable(t);if(e){const{element:o,index:i}=e;o.children.length||So.remove(t,i)}}else So.fetchAreaInstanceNullable(t)||t.children.length||So.add(t,Gi.createAreaWidgetInstance(t,ne.DEFAULT))},computed:{mainArea(){var e;return this.currentInstance.children.some(e=>{var t;return(null===(t=e.element)||void 0===t?void 0:t.bizType)!==ie.SLOT})?this.currentInstance:(null===(e=So.fetchAreaInstanceNullable(this.currentInstance))||void 0===e?void 0:e.element)||this.currentInstance},mainAreaChildren(){var e;return(null===(e=this.mainArea)||void 0===e?void 0:e.children)||[]}}},wn={components:{OioRow:m["OioRow"],OioCol:m["OioCol"]},props:{currentInstance:{type:Object,required:!0}},methods:{allowWrap(){return!0},useFullSpan(){const{isCard:e}=It();return e.value},extendRowData(){return{}},extendColData(){return{}},colComponentData(e){var t,o,n,a;const l=Po.fetchColComponentData(e,e.level,void 0,this.useFullSpan()),s=Object(r["unref"])(null===(t=e.options)||void 0===t?void 0:t.colMode)||l.mode;if(s){l.mode=s;let t=e.element.col;switch(t||(t={},e.element.col=t),s){case i["FlexColMode"].MANUAL:if(!l.fixed){const t=Po.computeSwitchModeColSpan(this.currentInstance,e);l.span=t;const{properties:o}=e.element;o&&Object.keys(o).length&&(o.span=t)}t.fixed=!0,delete l.flex;break;case i["FlexColMode"].FULL:{t.fixed=!1;const{properties:i}=e.element;return i&&Object.keys(i).length&&(i.span=void 0),delete l.span,Object.assign(Object.assign({flex:"1 1 0"},Object.assign(Object.assign({},l),{style:Object.assign(Object.assign({},null!==(o=l.style)&&void 0!==o?o:{}),{flex:"1 1 0"})})),{fixed:!1})}case i["FlexColMode"].AUTO:{t.fixed=!1;const{properties:o}=e.element;o&&Object.keys(o).length&&(o.span=void 0),delete l.span;const i=Object.assign(Object.assign({},l),{fixed:!1});if(!this.rowComponentData.wrap){let e=i.style;e||(e={},i.style=e),e.maxWidth||(e.maxWidth="unset")}return Object.assign(Object.assign({},i),{style:Object.assign(Object.assign({},null!==(n=i.style)&&void 0!==n?n:{}),{flex:"1 1 0"})})}}}const c=null!==(a=l.style)&&void 0!==a?a:{},{gutter:d}=this.rowComponentData,u=Po.computeColSpan(l.span);return c.flex=Po.computeColFlex(u,d),Object.assign(Object.assign(Object.assign({colMode:null!==s&&void 0!==s?s:"no mode"},l),this.extendColData()||{}),{style:c})},mapper({element:e,index:t}){return{element:e,index:t,colData:this.colComponentData(e)}}},computed:{rowComponentData(){return Object.assign(Object.assign({},Po.fetchRowComponentData(this.currentInstance,this.currentInstance.level,i["StyleHelper"].parse(this.$attrs.style),this.allowWrap(),void 0,this.layout)),this.extendRowData()||{})}}},jn={props:{currentInstance:{type:Object,required:!0}},computed:{instanceStyleProperties(){var e,t;return i["StyleHelper"].convertStyleByDslDefinition(null===(t=null===(e=this.currentInstance)||void 0===e?void 0:e.element)||void 0===t?void 0:t.properties)||{}}}};var kn={name:"ToolbarDropdown",components:{Dropdown:w["a"],Menu:j["a"],"Menu.Item":j["a"].Item,"Menu.ItemGroup":j["a"].ItemGroup},setup(){const e=en(),t=Object(r["computed"])(()=>e.dropdownOptions.value),o=Object(r["computed"])(()=>e.dropdownOpen.value),i=Object(r["computed"])(()=>{const t=e.dropdownPosition.value;return{left:t.left+"px",top:t.top+"px",width:t.width+"px",height:t.height+"px"}}),n=e=>e.items&&Array.isArray(e.items),a=t=>{e.onDropdownSelect(t)},l=t=>{e.setVisible(t)};return{menuGroupItems:t,visible:o,triggerPosStyle:i,isGroup:n,onSelect:a,onVisibleChange:l}}};function Cn(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("Menu.Item"),s=Object(r["resolveComponent"])("Menu.ItemGroup"),c=Object(r["resolveComponent"])("Menu"),d=Object(r["resolveComponent"])("Dropdown",!0);return Object(r["openBlock"])(),Object(r["createBlock"])(d,{class:"designer-draggable-toolbar-options",overlayClassName:"designer-draggable-toolbar-switch-dropdown",placement:"bottomLeft",visible:i.visible,trigger:"click",onVisibleChange:i.onVisibleChange},{overlay:Object(r["withCtx"])(()=>[Object(r["createVNode"])(c,{selectable:!0,onSelect:i.onSelect},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(i.menuGroupItems,e=>(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:e.title},[i.isGroup(e)?(Object(r["openBlock"])(),Object(r["createBlock"])(s,{title:e.title,key:e.title},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.items,e=>(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:e.id},{default:Object(r["withCtx"])(()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.displayName),1)]),_:2},1024))),128))]),_:2},1032,["title"])):(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:e.id},{default:Object(r["withCtx"])(()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.displayName),1)]),_:2},1024))],64))),128))]),_:1},8,["onSelect"])]),default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",{class:"designer-toolbar-dropdown-trigger",style:Object(r["normalizeStyle"])(i.triggerPosStyle)},null,4)]),_:1},8,["visible","onVisibleChange"])}kn.render=Cn,kn.__file="src/view/component/designer-draggable/toolbar/dropdown.vue";var Dn=Object(r["defineComponent"])({name:"DesignerDraggable",components:{DesignerDraggableItem:hn,OioModal:m["OioModal"],ToolbarDropdown:kn},props:Object.assign({},at),emits:["selectedChange","settingChange","switchWidget","moveInstance","removeInstance","update:modalVisible"],setup(e,t){const o=He(),i=Object(r["ref"])(),n=Object(r["ref"])(),l=Object(r["ref"])(),s=Object(r["ref"])([]),c=Object(r["ref"])(),{currentSelectedInstance:d,setCurrentSelectedInstance:u}=Si(),{setLazySelectedInstance:p}=Ni(),b=Dt.getInstance(),g=vt.getInstance(),v=Ot.getInstance(),m=Object(r["computed"])(()=>!Object(a["a"])(e.isFocusDesigner)),y=Object(r["computed"])(()=>{var t,o;return(null===(o=null===(t=e.focusData)||void 0===t?void 0:t.options)||void 0===o?void 0:o.focusModalComponentData)||{}});Object(r["watch"])(()=>e.data,e=>{l.value=e,e?(s.value=e.children,c.value=e.draggableGroup):(s.value=[],c.value=void 0)},{immediate:!0});const h=e=>{const t=e=>{const{bizType:t,subtype:o}=e.element;return t===ie.PACK&&o===ne.TAB};let o;if(o=t(e)?e:bo(e,t),!o)return;const i=bo(o,e=>{const{bizType:t,subtype:o}=e.element;return t===ie.PACK&&o===ne.TABS});i&&Go.setActiveKey(i,o.id)&&h(i)};Object(r["watch"])(()=>e.currentSelected,e=>{u(e),e&&h(e)},{immediate:!0}),Object(r["onUnmounted"])(()=>{u(void 0),p(void 0)});const f=e=>{u(e.selectedInstance),t.emit("selectedChange",d.value)},O=e=>{t.emit("settingChange",e)},w=e=>{t.emit("switchWidget",e)},j=e=>{t.emit("moveInstance",e)},k=e=>{t.emit("removeInstance",e)},C=()=>{var e;return(null===(e=i.value)||void 0===e?void 0:e.parentElement)||i.value||document.body},D=Object(r["computed"])(()=>n.value||document.body);return e.inFocusModal?qe(Object.assign(Object.assign({},o),{isInFocusModal:Object(r["computed"])(()=>!!e.inFocusModal),hasFocusDesigner:m,focusModalVisible:Object(r["computed"])(()=>!!m.value&&!!e.isFocusDesigner),rootData:Object(r["computed"])(()=>l.value),focusData:Object(r["computed"])(()=>e.focusData)})):qe(Object.assign(Object.assign({},o),{onSelectInstance:f,onMoveInstance:j,onSettingChange:O,onSwitchWidget:w,onRemoveInstance:k,getContainerHTMLElement:C,getModalManager:Object(r["computed"])(()=>b),getDrawerManager:Object(r["computed"])(()=>g),getInnerPopupManager:Object(r["computed"])(()=>v),isInFocusModal:Object(r["computed"])(()=>!!e.inFocusModal),hasFocusDesigner:m,focusModalVisible:Object(r["computed"])(()=>!!m.value&&!!e.isFocusDesigner),rootData:Object(r["computed"])(()=>l.value),focusData:Object(r["computed"])(()=>e.focusData)})),{BASIC_POPUP_Z_INDEX:Ve,loading:o.loadingState,designerDraggableRef:i,designerFocusDraggableRef:n,root:l,children:s,group:c,currentSelectedInstance:d,modalManager:b,hasFocusDesigner:m,focusModelComponentData:y,onSelectInstance:f,onSettingChange:O,onSwitchWidget:w,getContainerHTMLElement:()=>{var e;return(null===(e=o.getContentContainerHTMLElement)||void 0===e?void 0:e.call(o))||C()},focusModalContainer:D}}});const Tn={class:"designer-draggable",ref:"designerDraggableRef"},$n={class:"designer-focus-draggable",ref:"designerFocusDraggableRef"};function En(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("designer-draggable-item"),s=Object(r["resolveComponent"])("designer-draggable",!0),c=Object(r["resolveComponent"])("oio-modal"),d=Object(r["resolveComponent"])("toolbar-dropdown");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Tn,[e.root?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:e.root.id,"current-instance":e.root,"current-index":0,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup},null,8,["current-instance","widget-category-group","widget-name-group","widget-type-group"])):Object(r["createCommentVNode"])("v-if",!0),Object(r["createVNode"])(c,Object(r["mergeProps"])({visible:e.isFocusDesigner,closable:!1,keyboard:!1,mask:!1,loading:e.loading,"z-index":e.BASIC_POPUP_Z_INDEX,"destroy-on-close":!1,"wrapper-class-name":"designer-focus-modal","get-trigger-container":e.getContainerHTMLElement},e.focusModelComponentData),{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",$n,[Object(r["createVNode"])(s,{data:e.focusData,"in-focus-modal":"","current-selected":e.currentSelectedInstance,"widget-category-group":e.widgetCategoryGroup,"widget-name-group":e.widgetNameGroup,"widget-type-group":e.widgetTypeGroup,onSelectedChange:t[0]||(t[0]=(...t)=>e.$emit("selectedChange",...t)),onSettingChange:t[1]||(t[1]=(...t)=>e.$emit("settingChange",...t)),onSwitchWidget:t[2]||(t[2]=(...t)=>e.$emit("switchWidget",...t)),onMoveInstance:t[3]||(t[3]=(...t)=>e.$emit("moveInstance",...t)),onRemoveInstance:t[4]||(t[4]=(...t)=>e.$emit("removeInstance",...t))},null,8,["data","current-selected","widget-category-group","widget-name-group","widget-type-group"])],512)]),_:1},16,["visible","loading","z-index","get-trigger-container"]),Object(r["createVNode"])(d)],512)}Dn.render=En,Dn.__file="src/view/component/designer-draggable/designer-draggable.vue";const Sn=Object(r["defineComponent"])({name:"DesignerDraggableMask",props:{mask:{type:Boolean,default:!1},maskStyle:{type:Object},maskMessage:{type:String},disabled:{type:Boolean,default:!1},wrapperClassName:{type:String},zIndex:{type:Number,default:1e3}},inheritAttrs:!1,setup(e){const t=Object(r["computed"])(()=>{if(e.mask){const t=e.maskStyle;return t||{backgroundColor:"rgba(245, 245, 245, 0.5)"}}return{}});return{maskStyle:t}}}),Nn=()=>{Object(r["useCssVars"])(e=>({"09b8bb46-zIndex":e.zIndex}))},Vn=Sn.setup;Sn.setup=Vn?(e,t)=>(Nn(),Vn(e,t)):Nn;const xn={class:"designer-draggable-mask"};function In(e,t,o,i,n,a){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",xn,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"designer-draggable-mask-spinning",style:Object(r["normalizeStyle"])(e.maskStyle)},[Object(r["renderSlot"])(e.$slots,"mask",{},()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate(e.maskMessage)),1)])],4),[[r["vShow"],e.mask||e.disabled]]),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["designer-draggable-mask-container",e.wrapperClassName||""])},[Object(r["renderSlot"])(e.$slots,"default")],2)])}Sn.render=In,Sn.__file="src/view/component/designer-draggable/designer-draggable-mask.vue";var Mn=Object(r["defineComponent"])({name:"DesignerLayoutHeader"});const An={class:"designer-layout-header"},Fn={class:"designer-layout-header-left"},Ln={class:"designer-layout-header-right"};function Rn(e,t,o,i,n,a){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",An,[Object(r["createElementVNode"])("div",Fn,[Object(r["renderSlot"])(e.$slots,"left")]),Object(r["renderSlot"])(e.$slots,"default"),Object(r["createElementVNode"])("div",Ln,[Object(r["renderSlot"])(e.$slots,"right")])])}Mn.render=Rn,Mn.__file="src/view/component/layout-header/layout-header.vue";const Bn="uiDesigner",_n="ui.designer.UiDesignerView",Wn="homepage",Pn="ui_designer_界面设计器页面编辑",zn="ui_designer_界面设计器页面历史版本",Gn="界面设计器元件设计",Un="/ui_designer/homepage";function Kn(e){var t,o;const{element:i,metadata:n}=e;if(!i)return{allowViewActionDesign:!1};if(!i.initialization)return{allowViewActionDesign:!1};if(null===(t=i.componentData)||void 0===t?void 0:t.disableViewActionDesign)return{allowViewActionDesign:!1};const r=i.bizType,a=null===(o=i.widget)||void 0===o?void 0:o.widgetSubtype;if(r!==ie.ACTION)return{allowViewActionDesign:!1};if(a===ne.VIEW_ACTION_TYPE){const e=n.designerViewId,{view:t}=n,o=null===t||void 0===t?void 0:t.name;return o?e?{disable:null===t||void 0===t?void 0:t.sys,allowViewActionDesign:!0,designerViewId:e}:{disable:!0,allowViewActionDesign:!0}:{allowViewActionDesign:!1}}return{allowViewActionDesign:!1}}const qn=(e,t,o)=>{Zn(Wn,i["ViewType"].Table,null,e,t,o,Un)},Hn=(e,t,o,n)=>{Zn(Pn,i["ViewType"].Form,e,t,o,n)},Yn=(e,t,o,n)=>{Zn(zn,i["ViewType"].Form,e,t,o,n)},Qn=(e,t,o,n)=>{Xn(e,t,Wn,i["ViewType"].Gallery,o,n)},Jn=(e,t,o,n)=>{Zn(Gn,i["ViewType"].Form,e,t,o,n)},Xn=(e,t,o,n,r,a)=>{const l={viewType:n,name:o,model:_n,resModuleName:Bn,target:i["ViewActionTarget"].Router};Object(i["executeViewAction"])(l,e,t,r,a)},Zn=(e,t,o,i,n,r,a)=>{Xn(i,n,e,t,{id:o,sessionPath:a},r)};var er=Object(r["defineComponent"])({name:"UiSortTabs",components:{OioDraggable:i["OioDraggable"]},inheritAttrs:!1,props:{currentInstance:{type:Object,required:!0}},setup(e){const t=Object(r["computed"])(()=>e.currentInstance.children||[]),o=e=>i["Optional"].ofNullable(e).map(So.fetchProperties).map(e=>e.title).orElse(e.element.title),n=t=>{const{oldIndex:o,newIndex:i}=t,n=e.currentInstance.element.elements,r=n[o];n.splice(o,1),n.splice(i,0,r)};return{list:t,computeTabTitle:o,movedCallback:n}},render(){return Object(r["createVNode"])(i["OioDraggable"],{class:"designer-ui-sort-tabs",list:this.list,itemKey:"id",handle:".designer-ui-sort-tab-handle",movedCallback:this.movedCallback},{item:({element:e})=>Object(r["createVNode"])("div",{class:"designer-ui-sort-tab"},[Object(r["createVNode"])("div",{class:"designer-ui-sort-tab-handle"},[Object(r["createVNode"])(i["OioIcon"],{icon:"oinone-yidong",size:"16px"})]),Object(r["createVNode"])("div",{class:"designer-ui-sort-tab-title"},this.computeTabTitle(e))])})}});er.__file="src/components/sort-tabs/UiSortTabs.vue";let tr=class extends i["BaseElementWidget"]{initialize(e){return super.initialize(e),this.setComponent(er),this}};N([i["Widget"].Reactive(),i["Widget"].Inject(),V("design:type",Ie)],tr.prototype,"currentInstance",void 0),tr=N([i["SPI"].ClassFactory(i["BaseElementWidget"].Token({widget:"UiSortTabs"}))],tr);var or=Object(r["defineComponent"])({props:["value","options","change","placeholder","change","blur","disabled"],setup(e){const t=Object(r["ref"])(null),o=Object(r["ref"])(!1),i=()=>{o.value=!0},n=()=>{o.value=!1,e.blur()},a=t=>{e.change(t),o.value=!1};return Object(r["onMounted"])(()=>{var e,o,i;const n=null===(i=null===(o=null===(e=t.value.parentNode)||void 0===e?void 0:e.parentNode)||void 0===o?void 0:o.parentNode)||void 0===i?void 0:i.parentNode;n.style.overflow="visible"}),{node:t,show:o,onFocus:i,onBlur:n,onChange:a}}});const ir={ref:"node",class:"form-data-paging"},nr={key:0,style:{"line-height":"40px"}},rr={key:1},ar={class:"form-data-paging-select"},lr=["onMousedown"],sr={class:"ant-select-item-option-content"};function cr(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("a-input-number");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ir,[e.disabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nr,Object(r["toDisplayString"])(e.value),1)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",rr,[Object(r["createVNode"])(l,{value:e.value,onBlur:e.onBlur,onChange:e.change,onFocus:e.onFocus},null,8,["value","onBlur","onChange","onFocus"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ar,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.options,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t.value,class:Object(r["normalizeClass"])([[e.value===t.value&&"ant-select-item-option-selected"],"ant-select-item ant-select-item-option"]),onMousedown:o=>e.onChange(t.value)},[Object(r["createElementVNode"])("div",sr,Object(r["toDisplayString"])(t.value),1)],42,lr))),128))],512),[[r["vShow"],e.show]])]))],512)}or.render=cr,or.__file="src/components/data-paging/DataPaging.vue";var dr=Object(r["defineComponent"])({components:{SearchOutlined:D["a"]},props:{value:{type:String},bizName:{type:String,default:""},options:{type:Array,default:ee}},emits:["change"],setup(e,t){const o=e=>{t.emit("change",e.target.value)};return{onChange:o}}});const ur={class:"page-view-type-radio data-source-radio"};function pr(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("a-radio-button"),s=Object(r["resolveComponent"])("a-radio-group");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ur,[Object(r["createVNode"])(s,{value:e.value,"button-style":"solid",size:"large",onChange:e.onChange},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.options,t=>(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:t.value,value:t.value},{default:Object(r["withCtx"])(()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate(t.label))+Object(r["toDisplayString"])(e.bizName),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])])}dr.render=pr,dr.__file="src/components/data-source-radio/DataSourceRadio.vue";var br=Object(r["defineComponent"])({name:"UiCateEmpty",props:{icon:{type:String},iconColor:{type:String,default:"rgba(0,0,0,0.25)"},content:{type:String},contentColor:{type:String,default:"rgba(0,0,0,0.65)"},bgMode:{type:String}},components:{OioIcon:m["OioIcon"]}});const gr={class:"icon"};function vr(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("oio-icon");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])([["pure"===e.bgMode&&"pure-bg"],"add-view-empty-cate"])},[Object(r["createElementVNode"])("div",gr,[Object(r["createVNode"])(l,{color:e.iconColor,icon:e.icon?e.icon:"oinone-beizhu",size:"14px"},null,8,["color","icon"])]),Object(r["createElementVNode"])("div",{style:Object(r["normalizeStyle"])("color: "+e.contentColor),class:"tips"},Object(r["toDisplayString"])(e.$translate(e.content?e.content:"暂无分组数据")),5)],2)}br.render=vr,br.__file="src/components/category/UiCateEmpty.vue";const mr=i["HttpClient"].getInstance(),yr="uiDesigner";function hr(e,t,o){return x(this,void 0,void 0,(function*(){const i=`\n  {\n    uiDesignerViewCategoryQuery {\n      otherUiDesignerViewCategory(page: { size: ${o.pageSize}, currentPage: ${o.current} }, data: {id: ${e} }, category: { ${t?`name: "${t}"`:""}}) {\n        totalElements\n        totalPages\n        currentPage\n        size\n        content {\n          id\n          name\n        }\n      }\n    }\n  }\n  `,n=yield mr.query(yr,i);return n.data.uiDesignerViewCategoryQuery.otherUiDesignerViewCategory}))}function fr(e){return x(this,void 0,void 0,(function*(){const t=`\n  query {\n    uiDesignerViewCategoryQuery {\n      moduleRel(data: {id: "${e}"}) {\n        id\n        name\n      }\n    }\n  }\n  `,o=yield mr.query(yr,t);return o.data.uiDesignerViewCategoryQuery.moduleRel}))}function Or(e){return x(this,void 0,void 0,(function*(){const t=`\n  query {\n    uiDesignerViewCategoryQuery {\n      moduleRel(data: {module: "${e}"}) {\n        id\n        name\n      }\n    }\n  }\n  `,o=yield mr.query(yr,t);return o.data.uiDesignerViewCategoryQuery.moduleRel}))}function wr(e,t){return x(this,void 0,void 0,(function*(){const o=t.map(e=>`{id: "${e}"}`).join(","),i=`\n  mutation {\n    uiDesignerViewCategoryMutation {\n      chooseModelCategory(data:\n        {\n          module: "${e}",\n          designerCategory: [\n            ${o}\n          ]\n        }) {\n        name\n        designerCategory {\n          hasRel\n          id\n          name\n        }\n      }\n    }\n  }\n  `,n=yield mr.mutate(yr,i);return n.data.uiDesignerViewCategoryMutation.chooseModelCategory}))}function jr(e,t){return x(this,void 0,void 0,(function*(){const o=`\n  mutation {\n    uiDesignerViewCategoryMutation {\n      createModuleRel(data:{id: "${e}"}, cate:{id: "${t}"}) {\n        id\n      }\n    }\n  }\n  `,i=yield mr.mutate(yr,o);return i.data.uiDesignerViewCategoryMutation.createModuleRel}))}function kr(e,t){return x(this,void 0,void 0,(function*(){const o=`\n  mutation {\n    uiDesignerViewCategoryMutation {\n      delModuleRel(data:{id: "${e}"}, cate:{id: "${t}"}) {\n        id\n      }\n    }\n  }\n  `,i=yield mr.mutate(yr,o);return i.data.uiDesignerViewCategoryMutation.delModuleRel}))}function Cr(e,t){return x(this,void 0,void 0,(function*(){const o=`\n  mutation {\n    uiDesignerViewCategoryMutation {\n      createAndModuleRel(data:{id: "${e}"}, cate:{name: "${t}"}) {\n        id\n      }\n    }\n  }\n  `,i=yield mr.mutate(yr,o);return i.data.uiDesignerViewCategoryMutation.createAndModuleRel}))}function Dr(e){return x(this,void 0,void 0,(function*(){const t=`\n  mutation {\n    uiDesignerViewCategoryMutation {\n      deleteByEntity(data:{id: ${e}}) {\n        id\n      }\n    }\n  }\n  `,o=yield mr.mutate(yr,t);return o.data.uiDesignerViewCategoryMutation.deleteByEntity}))}function Tr(e){let t;if(!e||e.length<2||e.length>15)return t="分组名称长度不能少于2个字符不能超过15个字符",Object(i["translateValueByKey"])(t)||t;if(!/^[\u4E00-\u9FA5A-Za-z]+[\u4E00-\u9FA5A-Za-z0-9]+$/.test(e))return t="只允许数字、中文和英文字符, 且只能由中文或英文字符开头",Object(i["translateValueByKey"])(t)||t;const o=/[\u4E00-\u9FA5]/g,n=e.match(o);return n&&n.length>4?(t="分组名称中文不能超过4个",Object(i["translateValueByKey"])(t)||t):""}const $r=15,Er={pageSize:8,current:1,total:0};var Sr=Object(r["defineComponent"])({props:{modelValue:{type:String,required:!0,default:""},moduleViewCateList:{type:Array,required:!0,default:()=>[]},currentModule:{type:Object,required:!0,default:()=>({})},model:{type:String}},components:{UiCateEmpty:br,CustomDialog:n["c"],PlusOutlined:T["a"],OioButton:m["OioButton"],OioIcon:m["OioIcon"],OioSpin:m["OioSpin"]},emits:["update:modelValue","changeModuleViewCates","edit-cate","select-cate","pagination-change","refresh-cate"],setup(e,{emit:t}){const o=Object(r["ref"])(!1),n=Object(r["ref"])(!1),a=Object(r["ref"])(!1),l=Object(r["ref"])(!1),s=Object(r["ref"])(""),c=Object(r["ref"])(null),d=Object(r["ref"])(null),u=Object(r["ref"])(null),p=Object(r["ref"])(),b=Object(r["ref"])(!1),y=Object(r["ref"])(!1),h=Object(r["computed"])({get:()=>y.value,set:e=>{y.value=e,e?Object(r["nextTick"])(()=>{const e=p.value;e&&(k=Object(i["useCleanableEvent"])(e,"scroll",q))}):null===k||void 0===k||k.remove()}}),f=Object(r["ref"])($r),O=Object(r["ref"])([]);let w=!1;const j=Object(r["ref"])(!1);let k;const C=Object(r["computed"])(()=>e.moduleViewCateList&&e.moduleViewCateList.length?[{id:"all",name:Object(i["translateValueByKey"])("全部")},...e.moduleViewCateList]:[{id:"all",name:Object(i["translateValueByKey"])("全部")}]);Object(r["watch"])(()=>C.value,()=>{let e=document.getElementById("ui-cate-content");setTimeout(()=>{j.value=!!(e&&e.scrollHeight>42)},300)},{deep:!0,immediate:!0});const D=Object(r["computed"])(()=>{const t=C.value.find(t=>t.id==e.modelValue);return t||C.value.find(e=>"all"==e.id)}),T=Object(r["ref"])([]),$=e=>{t("update:modelValue",e.id),t("select-cate",e.id)},E=o=>x(this,void 0,void 0,(function*(){T.value.length>=$r?m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`最多允许为应用添加${$r}个页面分组`)):(yield jr(e.currentModule.id,o.id),t("refresh-cate"),l.value=!1,h.value=!1,O.value=[])})),S=()=>{o.value=!1},N=()=>{h.value=!0};let V=!1;const I=o=>x(this,void 0,void 0,(function*(){if(V)return;if(V=!0,l.value=!1,h.value=!1,!s.value)return void setTimeout(()=>{V=!1},200);if(T.value.length>=$r)return m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`最多允许为应用添加${$r}个页面分组`)),void setTimeout(()=>{V=!1},200);const o=Tr(s.value);if(o)return m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),o),void setTimeout(()=>{V=!1},200);yield Cr(e.currentModule.id,s.value),s.value="",t("refresh-cate"),l.value=!1,h.value=!1,V=!1})),M=(e,o)=>{const r=Tr(o.name);if(r)return m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),r),o.name=o.oldName,void(n.value=!1);n.value=!1,o.editable=!1,t("edit-cate",o)},A=(e,t)=>{e.relatedTarget&&e.relatedTarget.className&&e.relatedTarget.className.includes("ant-btn-primary")||(n.value=!1,t.editable=!1,t.name=t.oldName)},F=(e,t)=>{t.name!=t.oldName?n.value=!0:t.editable=!1},L=e=>x(this,void 0,void 0,(function*(){yield Dr(e.id),O.value=[],z.value=Object.assign({},Er),yield G(),h.value=!1,h.value=!0})),R=o=>x(this,void 0,void 0,(function*(){l.value=!1,h.value=!1,yield kr(e.currentModule.id,o.id),t("refresh-cate")})),B=e=>{n.value=!1,T.value.filter(e=>e.editable).forEach(e=>e.editable=!1),e.oldName=e.name,e.editable=!0},_=()=>{15!==T.value.length?(V=!1,s.value="",l.value=!0,Object(r["nextTick"])(()=>{d.value.focus(),w=!1,setTimeout(()=>{w=!0},300)}),h.value=!0):m["OioNotification"].error(Object(i["translateValueByKey"])("错误"),Object(i["translateValueByKey"])(`最多允许为应用添加${$r}个页面分组`))};Object(r["watch"])(()=>e.moduleViewCateList,()=>{T.value=JSON.parse(JSON.stringify(e.moduleViewCateList))},{deep:!0,immediate:!0}),Object(r["watch"])(o,()=>{o.value||(h.value=!1)});const W=Object(r["ref"])(null),P=Object(r["ref"])(!0),z=Object(r["ref"])(Object.assign({},Er));function G(t){return x(this,void 0,void 0,(function*(){const{content:o,totalElements:i=0,totalPages:n=0}=yield hr(e.currentModule.id,s.value,z.value);O.value=t?[...O.value,...o||[]]:o||[],z.value.total=Object(g["a"])(i),z.value.totalPageSize=Object(g["a"])(n)}))}const U=()=>{a.value=!a.value};Object(r["watch"])(s,()=>{(l.value||h.value)&&(z.value=Object.assign({},Er),G())}),Object(r["watch"])(l,()=>{l.value}),Object(r["watch"])(h,()=>{h.value&&(z.value=Object.assign({},Er),G(),Object(r["nextTick"])(()=>{Object(i["autoSetPopoverCss"])(d.value.$el,u.value)}))}),Object(r["watch"])(()=>e.currentModule,()=>{a.value=!1},{immediate:!0,deep:!0});const K=e=>{const t=e.target;!w||!c.value||c.value.contains(t)||u.value&&u.value.contains(t)||(h.value=!1,I(),w=!1),!w&&(c.value&&c.value.contains(t)||u.value&&u.value.contains(t))&&(w=!0)},q=Object(v["a"])(e=>x(this,void 0,void 0,(function*(){if(b.value)return;const{target:t}=e,o=t.scrollTop+t.offsetHeight,i=t.scrollHeight,n=z.value;if(o>=i-1&&o<i+1&&n&&n.current&&n.totalPageSize)if(n.current<n.totalPageSize){n.current+=1,b.value=!0;try{yield G(!0)}finally{b.value=!1}}else null===k||void 0===k||k.remove()})),300);return Object(r["onMounted"])(()=>{document.body.addEventListener("click",K),P.value=!1}),Object(r["onBeforeUnmount"])(()=>{document.body.removeEventListener("click",K),h.value=!1}),{disableTeleport:P,pagination:z,loadMoreCates:a,visibleDialog:o,visibleConfirm:n,inputVisible:l,inputValue:s,addInputRef:c,inputRef:d,dropdownRef:u,categoryListRef:p,categoryListLoading:b,currentCate:D,allModuleViewCateList:C,allViewCateList:O,manageModuleViewCateList:T,viewCatesBoxRef:W,isShowDropdown:h,cateNameMax:f,showOpenClose:j,onSearchClick:$,usePlatformViewCate:E,onOk:S,onHandleFocus:N,onHandleInputConfirm:I,onHandleCateEditSubmitConfirm:F,onHandleCateEditConfirm:M,onHandleCateEditCancel:A,onDelModuleRel:R,onClose:L,onShowInput:_,onShowEdit:B,openClose:U}}});const Nr={id:"ui-cate-content",class:"ui-cate-content"},Vr=["title","onClick"],xr={class:"cate-name"},Ir={class:"action"},Mr={class:"openClose"},Ar={class:"origin-cates"},Fr={key:0,ref:"addInputRef",class:"add-input"},Lr={class:"add-input-count"},Rr={ref:"dropdownRef",style:{"z-index":"1000"}},Br={class:"ant-input-control-dropdown view-cate-dropdown"},_r={class:"title"},Wr={ref:"categoryListRef",class:"cate-item-list"},Pr=["onClick"];function zr(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("oio-icon"),s=Object(r["resolveComponent"])("oio-button"),c=Object(r["resolveComponent"])("ui-cate-empty"),d=Object(r["resolveComponent"])("a-input"),u=Object(r["resolveComponent"])("a-popconfirm"),p=Object(r["resolveComponent"])("a-tag"),b=Object(r["resolveComponent"])("plus-outlined"),g=Object(r["resolveComponent"])("a-empty"),v=Object(r["resolveComponent"])("oio-spin"),m=Object(r["resolveComponent"])("custom-dialog");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])([[e.loadMoreCates?"more":""],"view-categories"])},[Object(r["createElementVNode"])("div",Nr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.allModuleViewCateList,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t.name,class:Object(r["normalizeClass"])([[e.currentCate&&t.id===e.currentCate.id&&"active"],"cate"]),title:t.name,onClick:o=>e.onSearchClick(t)},[Object(r["createElementVNode"])("span",xr,Object(r["toDisplayString"])(t.name),1)],10,Vr))),128))]),Object(r["createElementVNode"])("div",Ir,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Mr,[Object(r["createVNode"])(s,{type:"link",onClick:e.openClose},{default:Object(r["withCtx"])(()=>[e.loadMoreCates?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate("收起分组"))+" ",1),Object(r["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-xiala",size:"14px",style:{transform:"rotate(180deg)"}})],64)):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate("展开分组"))+" ",1),Object(r["createVNode"])(l,{color:"var(--oio-primary-color)",icon:"oinone-xiala",size:"14px"})],64))]),_:1},8,["onClick"])],512),[[r["vShow"],e.showOpenClose]]),Object(r["createElementVNode"])("div",{class:"manage",onClick:t[0]||(t[0]=t=>e.visibleDialog=!0)},[Object(r["createVNode"])(c,{bgMode:"pure",content:"管理分组",contentColor:"#035DFF",icon:"oinone-bianji","icon-color":"var(--oio-primary-color)"})])]),Object(r["createVNode"])(m,{visible:e.visibleDialog,width:720,class:"view-categories-dialog",title:"页面分组管理",onCancel:t[2]||(t[2]=t=>e.visibleDialog=!1),onOk:e.onOk},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",Ar,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.manageModuleViewCateList,(t,o)=>(Object(r["openBlock"])(),Object(r["createBlock"])(p,{key:t.id,closable:!t.editable,class:"processing",color:"processing",visible:"",onClose:o=>e.onDelModuleRel(t),onDblclick:o=>e.onShowEdit(t)},{default:Object(r["withCtx"])(()=>[t.editable?(Object(r["openBlock"])(),Object(r["createBlock"])(u,{key:1,visible:e.visibleConfirm,"cancel-text":e.$translate("取消"),"ok-text":e.$translate("确认"),title:e.$translate("页面分组可以被多个应用公用，修改分组名称将影响所有使用该分组的应用，请确认是否修改？"),onCancel:o=>e.onHandleCateEditCancel(o,t),onConfirm:o=>e.onHandleCateEditConfirm(o,t)},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(d,{value:t.name,"onUpdate:value":e=>t.name=e,maxlength:e.cateNameMax,class:"edit-input oio-input",size:"small",type:"text",onBlur:o=>e.onHandleCateEditSubmitConfirm(o,t),onKeyup:Object(r["withKeys"])(o=>e.onHandleCateEditSubmitConfirm(o,t),["enter"])},null,8,["value","onUpdate:value","maxlength","onBlur","onKeyup"])]),_:2},1032,["visible","cancel-text","ok-text","title","onCancel","onConfirm"])):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.name),1)],64))]),_:2},1032,["closable","onClose","onDblclick"]))),128)),e.inputVisible||e.isShowDropdown?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fr,[Object(r["createVNode"])(d,{ref:"inputRef",value:e.inputValue,"onUpdate:value":t[1]||(t[1]=t=>e.inputValue=t),maxlength:e.cateNameMax,class:"oio-input",size:"small",type:"text",onKeyup:Object(r["withKeys"])(e.onHandleInputConfirm,["enter"])},null,8,["value","maxlength","onKeyup"]),Object(r["createElementVNode"])("span",Lr,Object(r["toDisplayString"])(e.inputValue.length)+" / "+Object(r["toDisplayString"])(e.cateNameMax),1)],512)):(Object(r["openBlock"])(),Object(r["createBlock"])(p,{key:1,class:"add-cate",onClick:e.onShowInput},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(b),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$translate("页面分组")),1)]),_:1},8,["onClick"])),e.isShowDropdown?(Object(r["openBlock"])(),Object(r["createBlock"])(r["Teleport"],{key:2,to:"body"},[Object(r["createElementVNode"])("div",Rr,[Object(r["createElementVNode"])("div",Br,[Object(r["createElementVNode"])("div",_r,Object(r["toDisplayString"])(e.$translate("其它应用使用的分组")),1),Object(r["createElementVNode"])("div",Wr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.allViewCateList,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"cate-item",key:t.id},[Object(r["createElementVNode"])("span",{class:"cate-name",onClick:o=>e.usePlatformViewCate(t)},Object(r["toDisplayString"])(t.name),9,Pr),Object(r["createVNode"])(l,{class:"cate-delete",icon:"oinone-shanchu",onClick:o=>e.onClose(t)},null,8,["onClick"])]))),128)),e.allViewCateList&&0!==e.allViewCateList.length?Object(r["createCommentVNode"])("v-if",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(g,{key:0,class:"empty",description:e.$translate("暂无数据")},null,8,["description"]))],512),e.categoryListLoading?(Object(r["openBlock"])(),Object(r["createBlock"])(v,{key:0,size:"small"})):Object(r["createCommentVNode"])("v-if",!0)])],512)])):Object(r["createCommentVNode"])("v-if",!0)])]),_:1},8,["visible","onOk"])],2)}Sr.render=zr,Sr.__file="src/components/category/UiViewCategory.vue";const Gr=i["HttpClient"].getInstance();function Ur(e,t,o,n,r,a,l,s){return x(this,void 0,void 0,(function*(){const c=new i["Condition"]("1 == 1");e&&c.and(new i["Condition"]("model").equal(e)),t&&c.and(new i["Condition"]("title",{quote:'\\"'}).like(`%${i["GraphqlHelper"].serializableString(t)}%`)),o&&o!==H.ALL&&c.and(new i["Condition"]("show").equal(o)),n&&n!==Z.ALL&&c.and(new i["Condition"]("type").equal(n)),n&&n===Z.ALL&&c.and(new i["Condition"]("type").in([Z.TABLE,Z.FORM,Z.DETAIL,Z.GALLERY,Z.TREE])),r&&r!==J.ALL&&c.and(new i["Condition"]("bizType").equal(r)),a&&c.and(new i["Condition"]("sys").equal(a===Q.MANUAL?0:1)),s&&"all"!==s&&c.and(new i["Condition"]("categoryId").equal(s));const d=`\n      {\n        uiDesignerViewQuery {\n          queryPage(page: { size: ${l.pageSize}, currentPage: ${l.current},sort:{orders:{field:"writeDate",direction:DESC}} }, queryWrapper: {rsql: "${c}"}) {\n            totalElements\n            totalPages\n            currentPage\n            size\n            content {\n            id\n            thumbnail\n            title\n            name\n            model\n            type\n            designerLayoutType\n            designerActionBarType\n            active\n            show\n            template\n            bizType\n            summary\n            description\n            sys\n            systemSource\n            priority\n            categoryId\n            designerViewId\n            }\n          }\n        }\n      }\n\n  `,u=yield Gr.query(F,d);return u.data.uiDesignerViewQuery.queryPage}))}function Kr(e){return x(this,void 0,void 0,(function*(){const t=`\n      mutation {\n        uiDesignerViewMutation {\n          disabled(view: {id: ${e}}) {\n            id\n          }\n        }\n      }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerViewMutation.hide}))}function qr(e){return x(this,void 0,void 0,(function*(){const t=`\n      mutation {\n        uiDesignerViewMutation {\n          active(view: {id: ${e}}) {\n            id\n          }\n        }\n      }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerViewMutation.show}))}function Hr(e){return x(this,void 0,void 0,(function*(){const t=`\n      mutation {\n        uiDesignerViewMutation {\n          deleteOne(data: {id: ${e}}) {\n            id\n          }\n        }\n      }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerViewMutation.id}))}function Yr(e,t){return x(this,void 0,void 0,(function*(){const o=`\n     query{\n        fieldQuery {\n            queryOne(query: { model: "${e}", name: "${t}" }){\n                id\n                name\n            }\n    }\n}\n  `,i=yield Gr.query("base",o);return i.data.fieldQuery.queryOne}))}const Qr=(e,t,o,n="",r,a,l)=>x(void 0,void 0,void 0,(function*(){a=a||{sortField:"id",direction:i["EDirection"].DESC};const s=yield Object(i["getModel"])(e),c={currentPage:r.current,pageSize:r.pageSize,condition:n,sort:a},d=yield Object(i["customQueryPage"])(e,t,c,[],s.modelFields.filter(e=>o.includes(e.name)),l,{});return d}));function Jr(e,t){return x(this,void 0,void 0,(function*(){const t=`\n      mutation{\n        uiDesignerViewMutation {\n          fetchViewRels(view:{id:${e}}) {\n            reledViews{\n              id\n              designerViewId\n              relViewLabel\n            }\n            reledMenus{\n              id\n              relMenuLabel\n            }\n          }\n        }\n      }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerViewMutation.fetchViewRels}))}function Xr(e){return x(this,void 0,void 0,(function*(){const t=`\n      mutation {\n        uiDesignerViewLayoutProxyMutation {\n          copy(\n            source: { id: "${e.designerViewId}" }\n            target: {\n              ${i["GraphqlHelper"].buildStringGQLParameter("viewTitle",e.viewTitle)}\n              ${i["GraphqlHelper"].buildStringGQLParameter("viewDescription",e.viewDescription)}\n              ${i["GraphqlHelper"].buildStringGQLParameter("viewCategoryId",e.viewCategoryId)}\n              ${i["GraphqlHelper"].buildNotStringGQLParameter("designerLayoutType",e.designerLayoutType)}\n              ${i["GraphqlHelper"].buildNotStringGQLParameter("designerActionBarType",e.designerActionBarType)}\n              ${i["GraphqlHelper"].buildNotStringGQLParameter("viewType",e.type)}\n              ${i["GraphqlHelper"].buildNotStringGQLParameter("modelDefinition",`{model: "${e.model}"}`)}\n              ${i["GraphqlHelper"].buildNotStringGQLParameter("moduleDefinition",`{module: "${e.module}"}`)}\n            }\n          ) {\n            id\n          }\n        }\n  }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerViewLayoutProxyMutation.copy}))}function Zr(e){return x(this,void 0,void 0,(function*(){const t=`\n     mutation{\n      uiDesignerAppDependencyMutation{\n          queryModuleDependence(appDependency:{\n              appModule:"${e}"\n          }) {\n              appModule\n              moduleList{\n                  id\n                  name\n                  displayName\n                  module\n                  application\n              }\n              \n          }\n      }\n  }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerAppDependencyMutation.queryModuleDependence.moduleList}))}function ea(e){return x(this,void 0,void 0,(function*(){const t=`\n     mutation {\n        uiDesignerExpressionDefinitionProxyMutation{\n           deleteByCode(data:\n            {\n                model:"${e.designModel}",\n                field:"${e.designField}",\n                key:"${e.designKey+"#attr_name:optionLabel"}"\n            }\n        ){\n            id\n            code\n        }\n        }\n    }\n  `,o=yield Gr.mutate(F,t);return o.data.uiDesignerExpressionDefinitionProxyMutation.deleteByCode}))}var ta=Object(r["defineComponent"])({name:"UiModelFilterCascade",props:{currentApp:{type:Object,default:()=>({})},currentModular:{type:Object,default:()=>({})},currentModel:{type:Object,default:()=>({})},applicationOptions:{type:Array,default:()=>({})},modelList:{type:Array,default:()=>[]},onChangeModule:{type:Function,default:()=>()=>{}}},components:{PlusOutlined:T["a"],OioButton:m["OioButton"],OioInput:m["OioInput"],OioIcon:m["OioIcon"],DownOutlined:$["a"],UserOutlined:E["a"],RightOutlined:S["a"]},emits:["slipModel","searchModel","filterChangeModel","filterChangeModular","filterChangeModularList"],setup(e,{emit:t}){const o=Object(r["ref"])(k["a"].PRESENTED_IMAGE_SIMPLE),i=Object(r["ref"])(""),n=e=>{i.value=e,t("searchModel",e)},a=Object(r["ref"])(""),l=e=>{a.value=e},s=Object(r["computed"])(()=>{let e={modular:!1,model:!1};return a.value&&!i.value?(e.modular=!0,e.model=!1):!a.value&&i.value&&(e.modular=!1,e.model=!0),e}),c=Object(r["ref"])(),d=Object(r["ref"])(!1),u=e=>{d.value=e,!1===e&&(a.value="")},p=Object(r["ref"])(!1),b=e=>{p.value=e},g=()=>{u(!d.value)},v=Object(r["ref"])(!1),m=e=>{v.value=e},y=e=>{t("slipModel",e)},h=e=>x(this,void 0,void 0,(function*(){return yield Zr(e)})),f=Object(r["ref"])([]),O=Object(r["ref"])(e.currentApp),w=e=>{p.value=!0,t("filterChangeModular",e)},j=Object(r["ref"])(e.currentModel),C=o=>{o!==j.value.model&&(t("filterChangeModel",o),j.value=e.modelList.find(e=>e.model===o))},D=Object(r["ref"])(),T=e=>{u(!0)},$=e=>{e.relatedTarget||u(!1)},E=Object(r["ref"])(),S=e=>{u(!0)},N=e=>{e.relatedTarget||u(!1)},V=Object(r["computed"])(()=>{let t="";return e.currentModel&&e.currentModel.displayName?(t=t.concat(e.currentModel.displayName),t):""}),I=e=>e.parentNode||document.body;Object(r["ref"])({width:"200px",color:"red",margin:"0 !important","margin-left":"-12px !important",left:"0px !important"});const M=Object(r["ref"])({"margin-top":"12px !important"});return Object(r["watch"])(()=>e.currentApp,o=>x(this,void 0,void 0,(function*(){f.value=[],f.value=yield h(o.module),t("filterChangeModularList",f.value),j.value=e.modelList.length>0?e.modelList[0]:{}}))),Object(r["watch"])(()=>e.modelList,t=>x(this,void 0,void 0,(function*(){e.modelList&&e.modelList.length?j.value&&j.value.model:j.value={}}))),{dataEmptyBg:o,showCascade:d,changeShowCascade:u,showModelCascade:p,changeShowModelCascade:b,autoShowHideCascade:g,cascadeModuleList:f,currentCascadeModule:O,currentCascadeModel:j,changeSelectCascadeModular:w,slipCascadeModel:y,searchCascadeModel:n,searchCascadeModular:l,cascadeModelSearchKeyword:i,computeNeedCustomSelectStyle:s,changeSelectCascadeModel:C,cascadeModularSelectRef:D,cascadeModularSelectRefFocusStop:T,cascadeModularSelectRefBlur:$,cascadeModelSelectRef:E,cascadeModelSelectRefFocusStop:S,cascadeModelSelectRefBlur:N,currentSelectModularModelLabel:V,getPopupContainer:I,dropdownModelStyle:M,uiModelFilterInput:c,entranceMouseover:v,changeEntranceMouseover:m}}});const oa=["title"],ia={class:"real-cascade"},na={class:"real-cascade-panel module"},ra={class:"ui-model-filter-custom-cascade-select-item-option-icon"},aa=["title"],la={class:"option-right module"},sa={class:"ui-model-filter-custom-cascade-select-item-option-icon"},ca=["title"],da={class:"option-right"},ua={style:{"font-size":"12px"}},pa={class:"real-cascade-panel real-cascade-panel-large model"},ba={class:"ui-model-filter-custom-cascade-select-item-option-icon"},ga=["title"],va={style:{"font-size":"12px"}};function ma(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("down-outlined"),s=Object(r["resolveComponent"])("oio-input"),c=Object(r["resolveComponent"])("RightOutlined"),d=Object(r["resolveComponent"])("a-select-option"),u=Object(r["resolveComponent"])("a-select-opt-group"),p=Object(r["resolveComponent"])("a-empty"),b=Object(r["resolveComponent"])("a-select");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"ui-model-filter-custom-cascade",tabindex:"10",onBlur:t[6]||(t[6]=t=>e.changeShowCascade(!1))},[Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])([[(e.showCascade||e.entranceMouseover)&&"show-cascade-focus"],"entrance"]),title:e.currentSelectModularModelLabel,onClick:t[0]||(t[0]=(...t)=>e.autoShowHideCascade&&e.autoShowHideCascade(...t)),onMouseleave:t[1]||(t[1]=t=>e.changeEntranceMouseover(!1)),onMouseover:t[2]||(t[2]=t=>e.changeEntranceMouseover(!0))},[Object(r["createVNode"])(s,{ref:"uiModelFilterInput",value:e.currentSelectModularModelLabel,placeholder:e.$translate("请选择模型"),onFocus:e=>null},{suffix:Object(r["withCtx"])(()=>[Object(r["createVNode"])(l,{style:{color:"rgba(0, 0, 0, 0.25)","font-size":"12px"}})]),prefix:Object(r["withCtx"])(()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate("模型"))+":",1)]),_:1},8,["value","placeholder"])],42,oa),e.showCascade?(Object(r["openBlock"])(),Object(r["createBlock"])(r["Teleport"],{key:0,to:".custom-cascade"},[Object(r["createElementVNode"])("div",ia,[Object(r["createElementVNode"])("div",na,[Object(r["createVNode"])(b,{ref:"cascadeModularSelectRef",class:Object(r["normalizeClass"])([e.computeNeedCustomSelectStyle.modular&&"custom-select"]),defaultActiveFirstOption:!1,getPopupContainer:e.getPopupContainer,open:!0,"show-arrow":!0,"show-search":!0,value:e.currentModular.module,dropdownClassName:"ui-model-filter-custom-cascade-dropdown","option-filter-prop":"label",optionLabelProp:"label",onBlur:e.cascadeModularSelectRefBlur,onChange:e.changeSelectCascadeModular,onSearch:e.searchCascadeModular,onFocus:Object(r["withModifiers"])(e.cascadeModularSelectRefFocusStop,["stop"])},{notFoundContent:Object(r["withCtx"])(()=>[Object(r["createVNode"])(p,{image:e.dataEmptyBg},{description:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("span",ua,Object(r["toDisplayString"])(e.$translate("暂无匹配的应用或模块")),1)]),_:1},8,["image"])]),default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(u,{label:e.$translate("当前应用"),onBlur:t[3]||(t[3]=t=>e.changeShowCascade(!1))},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(),Object(r["createBlock"])(d,{key:e.currentApp.module,label:e.currentApp.displayName,value:e.currentApp.module},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",ra,[Object(r["createElementVNode"])("div",{title:e.currentApp.displayName,class:"option-displayName"},Object(r["toDisplayString"])(e.currentApp.displayName),9,aa),Object(r["createElementVNode"])("div",la,[Object(r["createVNode"])(c,{style:{color:"rgba(0, 0, 0, 0.25)","font-size":"12px"}})])])]),_:1},8,["label","value"]))]),_:1},8,["label"]),Object(r["createVNode"])(u,{label:`${e.$translate("依赖模块")}(${e.cascadeModuleList.length})`},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.cascadeModuleList,e=>(Object(r["openBlock"])(),Object(r["createBlock"])(d,{key:e.module,label:e.displayName,value:e.module},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",sa,[Object(r["createElementVNode"])("div",{title:e.displayName,class:"option-displayName"},Object(r["toDisplayString"])(e.displayName),9,ca),Object(r["createElementVNode"])("div",da,[Object(r["createVNode"])(c,{style:{color:"rgba(0, 0, 0, 0.25)","font-size":"12px"}})])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["label"])]),_:1},8,["class","getPopupContainer","value","onBlur","onChange","onSearch","onFocus"])]),Object(r["createElementVNode"])("div",pa,[Object(r["createVNode"])(b,{ref:"cascadeModelSelectRef",class:Object(r["normalizeClass"])([e.computeNeedCustomSelectStyle.model&&"custom-select"]),defaultActiveFirstOption:!1,dropdownStyle:e.dropdownModelStyle,getPopupContainer:e.getPopupContainer,open:!0,"show-search":!0,showArrow:!0,value:e.currentModel?e.currentModel.model:void 0,dropdownClassName:"ui-model-filter-custom-cascade-dropdown custom-cascade-dropdown-large","filter-option":!1,onBlur:e.cascadeModelSelectRefBlur,onChange:e.changeSelectCascadeModel,onPopupScroll:e.slipCascadeModel,onSearch:e.searchCascadeModel,onSelect:t[4]||(t[4]=t=>e.changeShowCascade(!1)),onFocus:Object(r["withModifiers"])(e.cascadeModelSelectRefFocusStop,["stop"]),onMousedown:t[5]||(t[5]=()=>{e.cascadeModelSelectRef.focus()})},{notFoundContent:Object(r["withCtx"])(()=>[Object(r["createVNode"])(p,{image:e.dataEmptyBg},{description:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("span",va,Object(r["toDisplayString"])(e.$translate("暂无匹配的模型")),1)]),_:1},8,["image"])]),default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.modelList,e=>(Object(r["openBlock"])(),Object(r["createBlock"])(d,{key:e.id,label:e.displayName,value:e.model},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("div",ba,[Object(r["createElementVNode"])("div",{title:e.displayName,class:"option-displayName"},Object(r["toDisplayString"])(e.displayName),9,ga)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["class","dropdownStyle","getPopupContainer","value","onBlur","onChange","onPopupScroll","onSearch","onFocus"])])])])):Object(r["createCommentVNode"])("v-if",!0)],32)}ta.render=ma,ta.__file="src/components/model-filter/UiModelFilterCascade.vue";const ya=50,ha={queueMaxLength:ya};class fa{constructor(e){e=Object.assign(Object.assign({},ha),e||{}),this.verificationAndSet(e),this._options=e}get options(){return this._options}verificationAndSet(e){const t=e.queueMaxLength;(!t||t<=0)&&(e.queueMaxLength=ya)}}var Oa;(function(e){e["QUEUE_CHANGE"]="queue-change",e["INDEX_CHANGE"]="index-change"})(Oa||(Oa={}));class wa extends fa{constructor(e){super(e),this._queue=[],this._currentIndex=0}get currentIndex(){return this._currentIndex}get currentLength(){return this._queue.length}get currentData(){return this._queue[this._currentIndex]}init(e){this._queue=[e],this._currentIndex=0}push(e){const t=this._queue.length;this._currentIndex===t-1?t>=this.options.queueMaxLength?this._queue=[...this._queue.slice(1),e]:this._queue=[...this._queue,e]:this._queue=[...this._queue.slice(0,this._currentIndex+1),e],this._currentIndex=this._queue.length-1}cancel(){return!(this._currentIndex-1<=-1)&&(this._currentIndex-=1,!0)}recover(){const e=this._queue.length;return!(this._currentIndex+1>=e)&&(this._currentIndex+=1,!0)}}class ja extends fa{constructor(e){super(e),this._editorMap=new Map,this._editorStack=[],this._switchStack=[],this._currentKey="",this._currentIndex=0}get currentKey(){return this._currentKey}get currentIndex(){return this._currentIndex}get editorEntries(){return this._editorMap.entries()}get currentLength(){return this._editorStack.length}get currentEditor(){return this._editorStack[this._currentIndex]}get firstEditor(){return this._editorStack[0]}get lastedEditor(){return this._editorStack[this._editorStack.length-1]}get previousEditor(){let e=this._currentIndex-1;return e<0&&(e=0),this._editorStack[e]}static fetchEditorKey(e){return Object(u["a"])(e)?e:Object(i["uniqueKeyGenerator"])()}init(e,t,o){o=ja.fetchEditorKey(o),this._editorMap=new Map;const i=new wa(this.options);i.init(e);const n={key:o,editor:i,context:t};this._editorMap.set(o,n),this._currentKey=o,this._editorStack=[],this._editorStack.push(n),this._currentIndex=0,this._switchStack=[]}switchEditor(e){const t=this.fetchEditorInfo(e);if(t){const e=t.key;return this._currentKey===e||(this._currentKey=e,this._currentIndex=this._editorStack.findIndex(t=>t.key===e),this._switchStack.push(e)),t}console.warn("Invalid queue key. key = "+e)}usePreviousEditor(){var e;this._switchStack=this._switchStack.slice(0,this._switchStack.length-1);let t=this._switchStack[this._switchStack.length-1];t||(t=null===(e=this._editorStack[0])||void 0===e?void 0:e.key),this._currentKey=t,this._currentIndex=this._editorStack.findIndex(e=>e.key===t)}push(e,t,o){return this.editorOperator(t=>t.editor.push(e),o,()=>{const i=new wa(this.options);i.init(e);const n={key:ja.fetchEditorKey(o),editor:i,context:t};return this.pushStack(n),n})}pop(e){return this.popStack(e)}cancel(){return this.editorOperator(e=>e.editor.cancel())||!1}recover(){return this.editorOperator(e=>e.editor.recover())||!1}pushStack(e){this._editorMap.set(e.key,e),this._editorStack.push(e)}popStack(e){return this.editorOperator(t=>{const o=t.key,i=[];let n;for(let r=this._editorStack.length-1;r>=1;r--){const t=this._editorStack[r];if(i.push(t.key),e===o){n=t;break}}if(n){i.forEach(e=>this._editorMap.delete(e)),this._currentKey=n.key;const e=i.length-1;return this._editorStack=this._editorStack.slice(e),this._currentIndex=e,n}},e)}editorOperator(e,t,o){let i;if(Object(a["a"])(t)&&(t=this._currentKey),i=this.fetchEditorInfo(t),i||(o?i=o():console.warn("Invalid queue key. key = "+t)),i)return e(i)}fetchEditorInfo(e){let t;return t=Object(u["a"])(e)?this._editorMap.get(e):this._editorStack[e],t}}class ka extends i["DetailWidget"]{constructor(e){super(),this.currentInstance=e}}N([i["Widget"].Reactive(),i["Widget"].Provide(),V("design:type",Ie)],ka.prototype,"currentInstance",void 0);class Ca extends i["FormWidget"]{constructor(e){super(),this.currentInstance=e}}N([i["Widget"].Reactive(),i["Widget"].Provide(),V("design:type",Ie)],Ca.prototype,"currentInstance",void 0);class Da extends i["FormWidget"]{constructor(e,t){super(),this.formValidator=!1,this.enableScrollToErrorField=!1,this.metaDataFields=[],this.currentInstance=e,this.mountedValidator=t}fieldsCommit(e){this.metaDataFields.push(e)}isDispose(){return!this.getOperator()}mounted(){this.patchMetaDataFields(),this.formValidator=!1,this.mountedValidator?this.validator().then(e=>{this.currentInstance.element.isValidator=e,this.watchFieldValidateEnd()}):this.watchFieldValidateEnd()}patchMetaDataFields(){const e=this.currentInstance.element.metadataFields||[],t=this.metaDataFields;if(!e.length&&!t.length)return;const o=Array.from(new Set([...e,...t]));e.length!==o.length&&(this.currentInstance.element.metadataFields=t)}watchFieldValidateEnd(){this.onFieldEvent("*","validateEnd",()=>{this.isDispose()||this.formValidator||(this.formValidator=!0,this.validator().then(e=>{this.currentInstance.element.isValidator=e}).catch(e=>{Object(i["isDev"])()&&console.error(e)}).finally(()=>{this.formValidator=!1}))})}}N([i["Widget"].Reactive(),i["Widget"].Provide(),V("design:type",Ie)],Da.prototype,"currentInstance",void 0),N([i["Widget"].Provide(),V("design:type",Function),V("design:paramtypes",[String]),V("design:returntype",void 0)],Da.prototype,"fieldsCommit",null),N([i["Widget"].Reactive(),V("design:type",Object)],Da.prototype,"enableScrollToErrorField",void 0);const Ta=i["HttpClient"].getInstance(),$a="uiDesigner";var Ea;(function(e){e["IN"]="IN",e["BEFORE"]="BEFORE",e["AFTER"]="AFTER"})(Ea||(Ea={}));class Sa{static queryListByModule(e){var t;return x(this,void 0,void 0,(function*(){const o=`{\n  uiDesignerMenuQuery {\n    queryListWithViewId(menu: {module: "${e}"}) {\n      id\n      displayName\n      name\n      sys\n      module\n      moduleDefinition{\n\t\t\t\tid\n        module\n\t\t\t\tdisplayName\n\t\t\t}\n      actionType\n      model\n      actionName\n      icon\n      description\n      priority\n      parentName\n      show\n      viewType\n      viewId\n      url\n      urlAction {\n        target\n      }\n      target\n      clientTypes\n      designerViewId\n      filterCondition\n      forceRefresh\n    }\n  }\n}\n`,i=(yield Ta.query($a,o)).data.uiDesignerMenuQuery.queryListWithViewId;return i.target=(null===i||void 0===i?void 0:i.target)||(null===(t=i.urlAction)||void 0===t?void 0:t.target),delete i.urlAction,i}))}static queryListByCondition(e){var t;return x(this,void 0,void 0,(function*(){const o=new i["Condition"]("name").like(e.searchValue);o.and(new i["Condition"]("visibility").equal(e.visibility));const n=`{\n  uiDesignerMenuQuery {\n    queryListWithViewId(menu: {\n      module: "${e.module}"\n      model: "${e.model}"\n      rsql: "${o.toString()}"\n    }) {\n      id\n      displayName\n      name\n      sys\n      module\n      actionType\n      model\n      actionName\n      icon\n      description\n      priority\n      parentName\n      show\n      viewType\n      viewId\n      url\n      urlAction {\n        target\n      }\n      clientTypes\n      designerViewId\n    }\n  }\n}\n`,r=(yield Ta.query($a,n)).data.uiDesignerMenuQuery.queryListWithViewId;return r.target=(null===r||void 0===r?void 0:r.target)||(null===(t=r.urlAction)||void 0===t?void 0:t.target),delete r.urlAction,r}))}static create(e){return x(this,void 0,void 0,(function*(){let t="";t=e.parentName?`parentName: "${e.parentName}"`:"parentName: null";const o=`mutation {\n\tuiDesignerMenuMutation {\n\t\tcreate(\n\t\t\tdata: {\n\t\t\t\tmodule: "${e.module}"\n\t\t\t\tdisplayName: "${e.displayName}"\n\t\t\t\ticon: "${e.icon||""}"\n\t\t\t\t${t}\n\t\t\t\tpreMenuName: "${e.preMenuName||""}"\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t\tname\n\t\t\ticon\n\t\t\tdisplayName\n\t\t\tmodule\n\t\t\tpriority\n\t\t\tshow\n\t\t\tsys\n\t\t\tclientTypes\n\t\t}\n\t}\n}\n`;return(yield Ta.mutate($a,o)).data.uiDesignerMenuMutation.create}))}static updateMenuInfo(e){return x(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerMenuMutation {\n\t\tupdateMenuInfo(\n\t\t\tdata: {\n\t\t\t  id: "${e.id}"\n\t\t\t  displayName: "${e.displayName}"\n\t\t\t  icon: "${e.icon}"\n        clientTypes: ${i["GraphqlHelper"].serializableEnumerationArray(e.clientTypes||[])}\n      }\n\t\t) {\n\t\t\tid\n\t\t\tname\n\t\t\ticon\n\t\t\tdisplayName\n\t\t\tmodule\n\t\t\tpriority\n\t\t\tshow\n\t\t\tsys\n\t\t\tclientTypes\n\t\t}\n\t}\n}\n`;return(yield Ta.mutate($a,t)).data.uiDesignerMenuMutation.updateMenuInfo}))}static updateMenuViewByViewId(e){return x(this,void 0,void 0,(function*(){const t=`mutation {\n\tuiDesignerMenuMutation {\n\t\tupdateMenuView(data: { id: "${e.id}", viewId: "${e.viewId}" }) {\n\t\t\tid\n\t\t  model\n\t\t\tviewId\n\t\t  designerViewId\n\t\t}\n\t}\n}\n`;return(yield Ta.mutate($a,t)).data.uiDesignerMenuMutation.updateMenuView}))}static updateMenuViewAndCreate(e,t,o){return x(this,void 0,void 0,(function*(){const n=`mutation {\n\tuiDesignerMenuMutation {\n\t\tupdateMenuView(\n\t\t\tdata: {\n\t\t\t\tid: "${e.id}"\n\t\t\t\tmodel: "${t.model}"\n\t\t\t\ttitle: "${i["GraphqlHelper"].serializableSimpleString(t.title)}"\n\t\t\t\tviewType: ${t.type}\n\t\t\t\tviewBizType: ${t.bizType}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("designerLayoutType",t.designerLayoutType)}\n\t\t\t\t${i["GraphqlHelper"].buildNotStringGQLParameter("designerActionBarType",t.designerActionBarType)}\n\t\t\t\tviewDescription: "${i["GraphqlHelper"].serializableSimpleString(t.description||"")}"\n\t\t\t\tmodule:"${o}"\n\t\t\t}\n\t\t) {\n\t\t\tid\n\t\t\tdesignerViewId\n\t\t\tviewId\n\t\t}\n\t}\n}\n`;return(yield Ta.mutate($a,n)).data.uiDesignerMenuMutation.updateMenuView}))}static updateMenuUrl(e,t){return x(this,void 0,void 0,(function*(){const o=`mutation {\n\tuiDesignerMenuMutation {\n\t\tupdateMenuUrl(\n\t\t  data: {\n\t\t    id: "${e.id}"\n\t\t    url: "${t.url}"\n\t\t    urlAction: { target: ${t.target} } \n\t\t  }\n\t\t) {\n\t\t\tid\n\t\t}\n\t}\n}\n`;return(yield Ta.mutate($a,o)).data.uiDesignerMenuMutation.updateMenuUrl}))}static show(e){return x(this,void 0,void 0,(function*(){const t=`mutation {\n  uiDesignerMenuMutation {\n    show(menu: {id: "${e}"}) {\n      id\n    }\n  }\n}\n`;return(yield Ta.mutate($a,t)).data.uiDesignerMenuMutation.show}))}static hide(e){return x(this,void 0,void 0,(function*(){const t=`mutation {\n  uiDesignerMenuMutation {\n    hide(menu: {id: "${e}"}) {\n      id\n    }\n  }\n}\n`;return(yield Ta.mutate($a,t)).data.uiDesignerMenuMutation.hide}))}static dragMenu(e,t,o){return x(this,void 0,void 0,(function*(){const i=`mutation {\n  uiDesignerMenuMutation {\n    dragMenu(request: {source: {id: "${e}"}, target: {id: "${t}"}, dragType: ${o}}) {\n      id\n    }\n  }\n}\n`;return(yield Ta.mutate($a,i)).data.uiDesignerMenuMutation.dragMenu}))}}const Na={filterValue:{type:String},searchValue:{type:String},onFilterValueChange:{type:Function},onSearchValueChange:{type:Function},onSearch:{type:Function}},Va=Object.assign(Object.assign({},Na),{loading:{type:Boolean},dataSource:{type:Array,default:()=>[]},pagination:{type:Object},onPaginationChange:{type:Function},onDelete:{type:Function},onShow:{type:Function},onHide:{type:Function},onSeekReferences:{type:Function},onRedirectDesign:{type:Function},onRedirectDesignByBlank:{type:Function},onChangeWidgetGroup:{type:Function},onChangeComponentType:{type:Function},widgetGroup:{type:Object},isSysComponent:{type:Boolean,default:!1}}),xa={layoutId:{type:String},setLayoutId:{type:Function},isDestroyForm:{type:Boolean},destroyForm:{type:Function},propertiesSettingFormWidget:{type:Object},metadataSettingFormWidget:{type:Object},initForm:{type:Function},initMetadataSettingForm:{type:Function}},Ia=Symbol("designerTtypeOptions"),Ma=Symbol("designerContextTypeOptions"),Aa=Symbol("designerSpanOptions"),Fa=Symbol("designerFieldReference"),La=Symbol("designerSearchFields"),Ra=Symbol("modelLabel"),Ba="ui.designer.BaseWidget",_a="ui.designer.BaseWidget.styleForm",Wa="ui.designer.BaseWidget.detail.styleForm";function Pa(e){var t,o,n,r;const a=null===(t=e.element)||void 0===t?void 0:t.bizType;if(a===ie.FIELD){const t=null===(o=e.element)||void 0===o?void 0:o.widgetData,a=null===(n=e.currentWidget)||void 0===n?void 0:n.widgetSubtype;if((null===t||void 0===t?void 0:t.ttype)===i["ModelFieldType"].Related&&a&&a!==i["ModelFieldType"].Related)return null===(r=e.widgetList)||void 0===r?void 0:r.find(e=>e.widgetSubtype===i["ModelFieldType"].Related)}}function za(){return[{name:"element",ttype:i["ModelFieldType"].ManyToOne,references:"ui.designer.UiDesignerElement"}]}function Ga(e){return[{field:i["MetadataHelper"].buildSimpleModelField(e,e,{data:"element",ttype:i["ModelFieldType"].ManyToOne,references:"ui.designer.UiDesignerElement"})}]}class Ua extends n["p"]{constructor(){super(...arguments),this.isDestroyForm=!1,this.viewClientType=i["ViewClientType"].PC}setDesignerTtypeOptions(e){this.designerTtypeOptions.subject.next(e)}setDesignerContextTypeOptions(e){this.designerContextTypeOptions.subject.next(e)}setDesignerSpanOptions(e){this.designerSpanOptions.subject.next(e)}setDesignerFieldReference(e){this.designerFieldReference.subject.next(e)}setDesignerModelFieldInfo(e){A.setValue(M,e)}setViewClientType(e){if(this.viewClientType=e,this.propertiesSettingFormWidget){const t=Object.assign(Object.assign({},this.propertiesSettingFormWidget.getData()),{[Xt]:e});this.propertiesSettingFormWidget.setData(t)}}destroyForm(){this.isDestroyForm=!0}getDesignerId(){return this.designerId}setDesignerId(e){this.designerId=e}getDesignerManagementId(){return this.designerManagementId}setDesignerManagementId(e){this.designerManagementId=e}initForm(e,t,o){return x(this,void 0,void 0,(function*(){const[[i,n],r]=yield Promise.all([this.initPropertiesSettingForm(e,t,o).then(t=>x(this,void 0,void 0,(function*(){return[t,yield this.initStyleSettingForm(e,t)]}))),this.initMetadataSettingForm(e,t,o)]);return{propertiesSettingFormWidget:i,styleSettingFormWidget:n,metadataSettingFormWidget:r}}))}initFormByView(e,t,o,n,r,a,l,s,c,d,u=1){return x(this,void 0,void 0,(function*(){this.isDestroyForm=!1;let p=t();p&&p.dispose();const b=yield i["ViewCache"].get(l,s);if(!b)return;let g;n===i["ViewType"].Detail?(g=i["DetailWidget"],b.type=i["ViewType"].Detail):(g=e(a),b.type=i["ViewType"].Form);const v=Object(i["createRuntimeContextForWidget"])(b),m=v.handle,y=d(a);let h;if("boolean"===typeof y?(r=!0,y&&(h=a.defaultProperties)):(h=Object.assign({},y||{}),y||(r=!0)),h||(h={}),r){h.element=this.generatorRequestElementData(a);const e=yield v.getInitialValue();Object.keys(e).forEach(t=>{i["ObjectUtils"].isEmpty(h[t])&&i["ObjectUtils"].isNotEmpty(e[t])&&(h[t]=e[t])}),h=yield Object(i["customQuery"])(l,"construct",h,this.fetchRequestFields2(v),void 0,void 0,{maxDepth:u}),delete h.element}return h[Xt]=this.viewClientType,Array.isArray(h.optionFieldsSelect)&&(h.optionFieldsSelect=h.optionFieldsSelect.filter(e=>!!e)),p=this.createWidget(g,c,{metadataHandle:m,rootHandle:m,dataSource:h,activeRecords:h,template:this.getViewTemplate(v.viewTemplate),inline:!0}),o(p),p}))}fetchRequestFields2(e){const t=e.getRequestFields(),o=t.findIndex(e=>"element"===e.data);return-1===o&&za().forEach(e=>t.push(e)),t}fetchRequestFields(e,t){const o=t.getRequestModelFields(),i=o.findIndex(e=>"element"===e.field.data);return-1===i&&Ga(e).forEach(e=>o.push(e)),o}getViewTemplate(e){var t;const o=null===(t=e.widgets)||void 0===t?void 0:t[0];if(o){const{dslNodeType:t}=o;t===i["DslDefinitionType"].TEMPLATE&&(e.widgets=o.widgets)}return e}generatorRequestElementData(e){const{element:t}=e,o=this.usingFullSpan(e);return{bizType:t.bizType,subtype:t.subtype,model:t.model,widget:t.widget,name:t.name,title:t.title,metaExtends:t.metaExtends,isMock:t.isMock,usingFullSpan:o}}usingFullSpan(e){const t=e.parent;return!!t&&(So.isContainer(t).result||So.isInCard(t))}initPropertiesSettingForm(e,t,o){return x(this,void 0,void 0,(function*(){const n=e.currentWidget;if(!n)return;let r=!0;const{widgetBizType:a,widgetSubtype:l,widgetAttrModel:c,widgetAttrFormViewName:d,widgetAttrDetailViewName:u}=n;switch(a){case ie.ELEMENT:switch(l){case ne.DATETIME_RANGE:case ne.DATE_RANGE:case ne.TIME_RANGE:case ne.YEAR_RANGE:r=e.element.initialization&&!Object(s["a"])(e.element.widgetData);break}break;case ie.FIELD:case ie.ACTION:r=e.element.initialization&&!Object(s["a"])(e.element.name);break}let p=i["ViewType"].Form,b=d;return o&&(p=i["ViewType"].Detail,b=u||d),r&&c&&b?this.initFormByView(e=>new Da(e,!0),()=>this.propertiesSettingFormWidget,e=>this.propertiesSettingFormWidget=e,p,t,e,c,b,"propertiesSettingForm",e=>i["Optional"].ofNullable(e.element).map(e=>e.properties).filter(e=>Object.keys(e).length>=1).orElse(!0),2):void 0}))}initStyleSettingForm(e,t){var o;return x(this,void 0,void 0,(function*(){if(!t)return;const n=e.currentWidget;if(!n)return;const{widgetAttrModel:r,widgetStyleFormViewName:a,widgetStyleDetailViewName:l}=Pa(e)||n,s=(null===(o=t.view)||void 0===o?void 0:o.type)||i["ViewType"].Form;let c=r,d=a;return s===i["ViewType"].Form?d||(c=Ba,d=_a):s===i["ViewType"].Detail&&(d=l||a,d||(c=Ba,d=Wa)),c&&d?this.initFormByView(e=>new Da(e,!1),()=>this.styleSettingFormWidget,e=>this.styleSettingFormWidget=e,s,!1,e,c,d,"styleSettingForm",()=>({})):void 0}))}initMetadataSettingForm(e,t,o){return x(this,void 0,void 0,(function*(){const n=e.currentWidget;if(!n)return;const{widgetMetaModel:r,widgetMetaFormViewName:a,widgetMetaDetailViewName:l}=Pa(e)||n;let s=i["ViewType"].Form,c=a;return(o||e.element.initialization)&&(s=i["ViewType"].Detail,c=l||a),r&&c?this.initFormByView(e=>new Da(e,!1),()=>this.metadataSettingFormWidget,e=>this.metadataSettingFormWidget=e,s,t,e,r,c,"metadataSettingForm",e=>i["Optional"].ofNullable(e.metadata).filter(e=>Object.keys(e).length>=1).map(e=>t?{displayName:Object(i["translateValueByKey"])(e.displayName)}:e).orElse(void 0)):void 0}))}saveMetaInfo(e){var t;return x(this,void 0,void 0,(function*(){const o=yield this.metadataSettingFormWidget.validator();if(o){const o=null===(t=yield this.metadataSettingFormWidget.submit())||void 0===t?void 0:t.records;return Object(i["customMutation"])(e.currentWidget.widgetMetaModel,"saveMetaInfo",this.generatorSaveMetaInfoData(e,o))}}))}generatorSaveMetaInfoData(e,t){var o;const i=(null===(o=Vo.findHostViewMetadata(e))||void 0===o?void 0:o.designerViewId)||this.designerId;return Object.assign(Object.assign({},t),{layoutId:i,model:e.element.model})}mounted(){super.mounted();const{id:e}=this.matched.segmentParams.page;e&&(this.designerId=e)}}N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"propertiesSettingFormWidget",void 0),N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"styleSettingFormWidget",void 0),N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"metadataSettingFormWidget",void 0),N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"isDestroyForm",void 0),N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"designerId",void 0),N([i["Widget"].Reactive(),i["Widget"].Provide(),V("design:type",Object)],Ua.prototype,"viewClientType",void 0),N([i["Widget"].Reactive(),V("design:type",Object)],Ua.prototype,"designerManagementId",void 0),N([i["Widget"].BehaviorSubContext(Ia,[]),V("design:type",Object)],Ua.prototype,"designerTtypeOptions",void 0),N([i["Widget"].BehaviorSubContext(Ma,[]),V("design:type",Object)],Ua.prototype,"designerContextTypeOptions",void 0),N([i["Widget"].BehaviorSubContext(Aa,[]),V("design:type",Object)],Ua.prototype,"designerSpanOptions",void 0),N([i["Widget"].BehaviorSubContext(Fa,{}),V("design:type",Object)],Ua.prototype,"designerFieldReference",void 0),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Array]),V("design:returntype",void 0)],Ua.prototype,"setDesignerTtypeOptions",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Array]),V("design:returntype",void 0)],Ua.prototype,"setDesignerContextTypeOptions",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Array]),V("design:returntype",void 0)],Ua.prototype,"setDesignerSpanOptions",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Object]),V("design:returntype",void 0)],Ua.prototype,"setDesignerFieldReference",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Object]),V("design:returntype",void 0)],Ua.prototype,"setDesignerModelFieldInfo",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[String]),V("design:returntype",void 0)],Ua.prototype,"setViewClientType",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[]),V("design:returntype",void 0)],Ua.prototype,"destroyForm",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Ie,Boolean,Boolean]),V("design:returntype",Promise)],Ua.prototype,"initForm",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Ie,Boolean,Boolean]),V("design:returntype",Promise)],Ua.prototype,"initMetadataSettingForm",null),N([i["Widget"].Method(),V("design:type",Function),V("design:paramtypes",[Ie]),V("design:returntype",Promise)],Ua.prototype,"saveMetaInfo",null);class Ka extends n["o"]{redirectDesign(e,t){Hn(e,this.router,this.matched,t)}clearCache(){return x(this,void 0,void 0,(function*(){_.INSTANCE.clear()}))}}const qa={title:{type:String},saving:{type:Boolean,default:void 0},saveResult:{type:Boolean,default:!0}};var Ha=Object(r["defineComponent"])({name:"DesignerCommonHeader",components:{DesignerLayoutHeader:Mn,OioDivider:m["OioDivider"],OioIcon:m["OioIcon"]},props:Object.assign({},qa),slots:["default","title","toolbar"],emits:["go-back"],setup(e,t){const o=()=>{t.emit("go-back")};return{gotoBack:o}}});const Ya=["title"],Qa={class:"ui-designer-save-status"},Ja={key:0,style:{color:"rgba(0, 0, 0, 0.25)"}},Xa={key:1},Za={key:2};function el(e,t,o,i,n,a){const l=Object(r["resolveComponent"])("oio-icon"),s=Object(r["resolveComponent"])("oio-divider"),c=Object(r["resolveComponent"])("designer-layout-header");return Object(r["openBlock"])(),Object(r["createBlock"])(c,{class:"ui-designer-common-header"},{left:Object(r["withCtx"])(()=>[Object(r["createVNode"])(l,{color:"#696C71",icon:"oinone-fanhui",size:"14px",onClick:e.gotoBack},null,8,["onClick"]),e.title?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,title:e.$translate(e.title),class:"ui-designer-header-title"},[Object(r["renderSlot"])(e.$slots,"title",{title:e.title},()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$translate(e.title)),1)])],8,Ya)):Object(r["createCommentVNode"])("v-if",!0)]),right:Object(r["withCtx"])(()=>[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qa,[e.saving?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ja,Object(r["toDisplayString"])(e.$translate("自动保存中")+"..."),1)):e.saveResult?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Xa,Object(r["toDisplayString"])(e.$translate("保存成功")),1)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Za,Object(r["toDisplayString"])(e.$translate("保存失败")),1)),e.saving?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:3,loading:!0,color:"#979797",icon:"oinone-jiazai"})):e.saveResult?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:4,color:"#90DE3D",icon:"oinone-chenggong"})):(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:5,color:"#E75555",icon:"oinone-shibai"}))],512),[[r["vShow"],null!=e.saving]]),Object(r["withDirectives"])(Object(r["createVNode"])(s,{type:"vertical"},null,512),[[r["vShow"],null!=e.saving]]),Object(r["renderSlot"])(e.$slots,"toolbar")]),default:Object(r["withCtx"])(()=>[Object(r["renderSlot"])(e.$slots,"default")]),_:3})}Ha.render=el,Ha.__file="src/view/common/designer-header/DesignerCommonHeader.vue"},"4c8a":function(e,t,o){"use strict";o("f171")},7595:function(e,t,o){"use strict";var i=o("1bdc");o.d(t,"a",(function(){return i["c"]})),o.d(t,"b",(function(){return i["e"]}));o("c621"),o("3af9"),o("d5fa"),o("7a23"),o("6b16"),o("b76a")},"8adb":function(e,t,o){},"923e":function(e,t,o){"use strict";o.d(t,"p",(function(){return i})),o.d(t,"m",(function(){return n})),o.d(t,"f",(function(){return r})),o.d(t,"n",(function(){return a})),o.d(t,"l",(function(){return bt})),o.d(t,"k",(function(){return Io})),o.d(t,"j",(function(){return Qi})),o.d(t,"i",(function(){return gr})),o.d(t,"d",(function(){return je})),o.d(t,"o",(function(){return ke})),o.d(t,"g",(function(){return Ce})),o.d(t,"e",(function(){return v})),o.d(t,"a",(function(){return b})),o.d(t,"c",(function(){return g})),o.d(t,"b",(function(){return d})),o.d(t,"h",(function(){return p}));const i=new Map,n=(e,t)=>{i.set(e,t)},r=e=>i.get(e),a=(e,t)=>{const o=e,n=i.get(o);n?Object.assign(n,t):i.set(o,t)},l={"font-size":"14px","font-size-lg":"16px","font-size-sm":"12px",padding:"24px",margin:"24px","row-gap":"24px","line-height":"18px","line-height-lg":"20px","line-height-sm":"16px","line-height-xs":"14px","line-height-xxs":"12px","border-radius":"4px","border-radius-lg":"8px","border-radius-sm":"2px","padding-lg":"24px","padding-md":"16px","padding-sm":"12px","padding-xs":"8px","padding-xxs":"4px","margin-lg":"24px","margin-md":"16px","margin-sm":"12px","margin-xs":"8px","margin-xxs":"4px",height:"40px","height-lg":"54px","height-sm":"32px","min-height":"32px","label-height":"30px","horizontal-label-height":"32px"},s={"font-size":"14px","font-size-lg":"16px","font-size-sm":"12px",padding:"16px",margin:"16px","row-gap":"16px","line-height":"18px","line-height-lg":"20px","line-height-sm":"16px","line-height-xs":"14px","line-height-xxs":"12px","border-radius":"4px","border-radius-lg":"8px","border-radius-sm":"2px","padding-lg":"16px","padding-md":"12px","padding-sm":"8px","padding-xs":"4px","padding-xxs":"2px","margin-lg":"16px","margin-md":"12px","margin-sm":"8px","margin-xs":"4px","margin-xxs":"2px",height:"32px","height-lg":"48px","height-sm":"32px","min-height":"32px","label-height":"28px","horizontal-label-height":"32px"},c={"font-size":"14px","font-size-lg":"16px","font-size-sm":"12px",padding:"12px",margin:"12px","row-gap":"12px","line-height":"18px","line-height-lg":"20px","line-height-sm":"12px","line-height-xs":"14px","line-height-xxs":"12px","border-radius":"4px","border-radius-lg":"8px","border-radius-sm":"2px","padding-lg":"12px","padding-md":"10px","padding-sm":"8px","padding-xs":"4px","padding-xxs":"2px","margin-lg":"12px","margin-md":"10px","margin-sm":"8px","margin-xs":"4px","margin-xxs":"2px",height:"24px","height-lg":"40px","height-sm":"24px","min-height":"24px","label-height":"24px","horizontal-label-height":"32px"};var d,u=o("857d");(function(e){e["DEFAULT_LARGE"]="default-large",e["DEFAULT_MEDIUM"]="default-medium",e["DEFAULT_SMALL"]="default-small",e["DEFAULT_MINIMALISM_LARGE"]="default-minimalism-large",e["DEFAULT_MINIMALISM_MEDIUM"]="default-minimalism-medium",e["DEFAULT_MINIMALISM_SMALL"]="default-minimalism-small",e["DARK_LARGE"]="dark-large",e["DARK_MEDIUM"]="dark-medium",e["DARK_SMALL"]="dark-small",e["DARK_MINIMALISM_LARGE"]="dark-minimalism-large",e["DARK_MINIMALISM_MEDIUM"]="dark-minimalism-medium",e["DARK_MINIMALISM_SMALL"]="dark-minimalism-small"})(d||(d={}));const p=e=>{const t=Object.values(d);return t.includes(e)},b="oio",g={};function v(e,t,o){const i=document.querySelector("head"),n=t?document.getElementsByClassName(t)[0]:document.documentElement;if(!n)throw new Error("挂载dom匹配失败");const a=Array.from(document.getElementsByTagName("style"))||[],l=[d.DEFAULT_MEDIUM,...e],s=l.map(e=>r(e)||{}).reduce((e,t)=>Object.assign(e,t),{});if(!Object.keys(s).length)return;const c="oio-theme",u=a.find(e=>e.getAttribute("theme-id")===c),p=Object.keys(s).map(e=>"[object Object]"===Object.prototype.toString.call(s[e])?(g[e]=s[e],""):`--${o||b}-${e}: ${s[e]};`).filter(e=>e),v=`:root{${p.join("")}}`;if(u)u.innerHTML=v;else{const e=document.createElement("style");[{key:"type",value:"text/css"},{key:"theme-id",value:c}].forEach(({key:t,value:o})=>e.setAttribute(t,o)),e.innerHTML=v,i.appendChild(e)}}u["a"].register({name:"theme",priority:100},{getConfig(e){return g[e]||g[e+"-config"]}});const m={"border-width":`var(--${b}-border-width)`,"border-radius":`var(--${b}-border-radius)`,"line-height":"22px","counter-font-size":`var(--${b}-font-size-sm)`},y={"border-width":`var(--${b}-border-width)`,"border-radius":`var(--${b}-border-radius)`,"line-height":"22px","counter-font-size":`var(--${b}-font-size-sm)`},h={"thead-height":"54px","user-prefer-top":"12px","user-prefer-right":"22px"},f={"thead-height":"48px","user-prefer-top":"8px","user-prefer-right":"22px"},O={"thead-height":"40px","user-prefer-top":"4px","user-prefer-right":"22px"},w={padding:"0 16px","margin-top":"4px","item-height":"40px","item-margin-top":"4px","area-width":"263px","collapsed-popup-item-padding":"0 16px","collapsed-popup-margin-left":"-16px","collapsed-button-border-radius":"4px","collapsed-button-height":"40px","collapsed-button-line-height":"38px","designer-collapsed-button-height":"40px","designer-collapsed-button-line-height":"30px","designer-collapsed-button-border-radius":"4px","border-radius":"4px","selected-root-border-radius":"4px","selected-margin-top":"4px"},j={padding:"0 16px","margin-top":"8px","item-height":"32px","item-margin-top":"4px","area-width":"263px","collapsed-popup-item-padding":"0 16px","collapsed-popup-margin-left":"-16px","collapsed-button-border-radius":"4px","collapsed-button-height":"32px","collapsed-button-line-height":"30px","designer-collapsed-button-height":"32px","designer-collapsed-button-line-height":"30px","designer-collapsed-button-border-radius":"4px","border-radius":"4px","selected-root-border-radius":"4px","selected-margin-top":"4px"},k={padding:"0 16px","margin-top":"8px","item-height":"24px","item-margin-top":"4px","area-width":"263px","collapsed-popup-item-padding":"0 16px","collapsed-popup-margin-left":"-16px","collapsed-button-border-radius":"4px","collapsed-button-height":"24px","collapsed-button-line-height":"22px","designer-collapsed-button-height":"24px","designer-collapsed-button-line-height":"22px","designer-collapsed-button-border-radius":"4px","border-radius":"4px","selected-root-border-radius":"4px","selected-margin-top":"4px"},C={height:"32px","item-height":"30px","item-width":"32px"},D={height:"32px","item-height":"30px","item-width":"32px"},T={height:"24px","item-height":"22px","item-width":"24px"},$={"line-height":"22px"},E={"line-height":"22px"},S={"line-height":"16px"},N={"selection-height":"24px","selection-line-height":"22px"},V={"selection-height":"24px","selection-line-height":"22px"},x={"selection-height":"16px","selection-line-height":"16px"},I={"font-size":`var(--${b}-font-size-lg)`},M={"font-size":`var(--${b}-font-size)`},A={"font-size":`var(--${b}-font-size)`},F="app-switch",L={"background-color":`var(--${b}-primary-color)`,"border-color":"none","app-name-overflow":"unset","app-name-margin-right":"8px","app-name-caret-down-display":"unset","logo-color":`var(--${b}-primary-color)`,"designer-background-color":`var(--${b}-primary-color)`,"designer-logo-color":`var(--${b}-primary-color)`},R="button",B=`${b}-${R}`,_={"default-danger-background":`var(--${B}-background)`,"default-danger-border-width":`var(--${B}-border-width)`,"default-danger-border-style":`var(--${B}-border-style)`,"default-danger-border-color":`var(--${b}-error-color)`,"default-danger-border-radius":`var(--${B}-border-radius)`,"default-danger-outline":`var(--${b}-error-color-outline)`,"default-danger-shadow":"none","default-danger-text-color":`var(--${b}-error-color)`,"default-danger-background-active":`var(--${B}-default-danger-background)`,"default-danger-border-width-active":`var(--${B}-default-danger-border-width)`,"default-danger-border-style-active":`var(--${B}-default-danger-border-style)`,"default-danger-border-color-active":`var(--${b}-error-color-active)`,"default-danger-border-radius-active":`var(--${B}-default-danger-border-radius)`,"default-danger-outline-active":`var(--${B}-default-danger-outline)`,"default-danger-shadow-active":`var(--${B}-default-danger-shadow)`,"default-danger-text-color-active":`var(--${b}-error-color-active)`,"default-danger-background-focus":`var(--${B}-default-danger-background)`,"default-danger-border-width-focus":`var(--${B}-default-danger-border-width)`,"default-danger-border-style-focus":`var(--${B}-default-danger-border-style)`,"default-danger-border-color-focus":`var(--${b}-error-color-focus)`,"default-danger-border-radius-focus":`var(--${B}-default-danger-border-radius)`,"default-danger-outline-focus":`var(--${B}-default-danger-outline)`,"default-danger-shadow-focus":`var(--${B}-default-danger-shadow)`,"default-danger-text-color-focus":`var(--${b}-error-color-focus)`,"default-danger-background-hover":`var(--${B}-default-danger-background)`,"default-danger-border-width-hover":`var(--${B}-default-danger-border-width)`,"default-danger-border-style-hover":`var(--${B}-default-danger-border-style)`,"default-danger-border-color-hover":`var(--${b}-error-color-hover)`,"default-danger-border-radius-hover":`var(--${B}-default-danger-border-radius)`,"default-danger-outline-hover":`var(--${B}-default-danger-outline)`,"default-danger-shadow-hover":`var(--${B}-default-danger-shadow)`,"default-danger-text-color-hover":`var(--${b}-error-color-hover)`,"default-danger-background-visited":`var(--${B}-default-danger-background)`,"default-danger-border-width-visited":`var(--${B}-default-danger-border-width)`,"default-danger-border-style-visited":`var(--${B}-default-danger-border-style)`,"default-danger-border-color-visited":`var(--${B}-default-danger-border-color)`,"default-danger-border-radius-visited":`var(--${B}-default-danger-border-radius)`,"default-danger-outline-visited":`var(--${B}-default-danger-outline)`,"default-danger-shadow-visited":`var(--${B}-default-danger-shadow)`,"default-danger-text-color-visited":`var(--${B}-default-danger-text-color)`},W={"primary-danger-background":`var(--${b}-error-color)`,"primary-danger-border-width":`var(--${B}-primary-border-width)`,"primary-danger-border-style":`var(--${B}-primary-border-style)`,"primary-danger-border-color":`var(--${b}-error-color)`,"primary-danger-border-radius":`var(--${B}-primary-border-radius)`,"primary-danger-outline":`var(--${b}-error-color)`,"primary-danger-shadow":"none","primary-danger-text-color":"#ffffff","primary-danger-background-active":`var(--${b}-error-color-active)`,"primary-danger-border-width-active":`var(--${B}-primary-danger-border-width)`,"primary-danger-border-style-active":`var(--${B}-primary-danger-border-style)`,"primary-danger-border-color-active":`var(--${b}-error-color-active)`,"primary-danger-border-radius-active":`var(--${B}-primary-danger-border-radius)`,"primary-danger-outline-active":`var(--${B}-primary-danger-outline)`,"primary-danger-shadow-active":`var(--${B}-primary-danger-shadow)`,"primary-danger-text-color-active":`var(--${B}-primary-danger-text-color)`,"primary-danger-background-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-width-focus":`var(--${B}-primary-danger-border-width)`,"primary-danger-border-style-focus":`var(--${B}-primary-danger-border-style)`,"primary-danger-border-color-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-radius-focus":`var(--${B}-primary-danger-border-radius)`,"primary-danger-outline-focus":`var(--${B}-primary-danger-outline)`,"primary-danger-shadow-focus":`var(--${B}-primary-danger-shadow)`,"primary-danger-text-color-focus":`var(--${B}-primary-danger-text-color)`,"primary-danger-background-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-width-hover":`var(--${B}-primary-danger-border-width)`,"primary-danger-border-style-hover":`var(--${B}-primary-danger-border-style)`,"primary-danger-border-color-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-radius-hover":`var(--${B}-primary-danger-border-radius)`,"primary-danger-outline-hover":`var(--${B}-primary-danger-outline)`,"primary-danger-shadow-hover":`var(--${B}-primary-danger-shadow)`,"primary-danger-text-color-hover":`var(--${B}-primary-danger-text-color)`,"primary-danger-background-visited":`var(--${B}-primary-danger-background)`,"primary-danger-border-width-visited":`var(--${B}-primary-danger-border-width)`,"primary-danger-border-style-visited":`var(--${B}-primary-danger-border-style)`,"primary-danger-border-color-visited":`var(--${B}-primary-danger-border-color)`,"primary-danger-border-radius-visited":`var(--${B}-primary-danger-border-radius)`,"primary-danger-outline-visited":`var(--${B}-primary-danger-outline)`,"primary-danger-shadow-visited":`var(--${B}-primary-danger-shadow)`,"primary-danger-text-color-visited":`var(--${B}-primary-danger-text-color)`},P={"link-danger-background":`var(--${B}-link-background)`,"link-danger-border-width":`var(--${B}-link-border-width)`,"link-danger-border-style":`var(--${B}-link-border-style)`,"link-danger-border-color":`var(--${B}-link-border-color)`,"link-danger-border-radius":`var(--${B}-link-border-radius)`,"link-danger-outline":"none","link-danger-shadow":"none","link-danger-text-color":`var(--${b}-error-color)`,"link-danger-background-active":`var(--${B}-link-danger-color)`,"link-danger-border-width-active":`var(--${B}-link-danger-border-width)`,"link-danger-border-style-active":`var(--${B}-link-danger-border-style)`,"link-danger-border-color-active":`var(--${B}-link-danger-color)`,"link-danger-border-radius-active":`var(--${B}-link-danger-border-radius)`,"link-danger-outline-active":`var(--${B}-link-danger-outline)`,"link-danger-shadow-active":`var(--${B}-link-danger-shadow)`,"link-danger-text-color-active":`var(--${b}-error-color-active)`,"link-danger-background-focus":`var(--${B}-link-danger-color)`,"link-danger-border-width-focus":`var(--${B}-link-danger-border-width)`,"link-danger-border-style-focus":`var(--${B}-link-danger-border-style)`,"link-danger-border-color-focus":`var(--${B}-link-danger-color)`,"link-danger-border-radius-focus":`var(--${B}-link-danger-border-radius)`,"link-danger-outline-focus":`var(--${B}-link-danger-outline)`,"link-danger-shadow-focus":`var(--${B}-link-danger-shadow)`,"link-danger-text-color-focus":`var(--${b}-error-color-focus)`,"link-danger-background-hover":`var(--${B}-link-danger-color)`,"link-danger-border-width-hover":`var(--${B}-link-danger-border-width)`,"link-danger-border-style-hover":`var(--${B}-link-danger-border-style)`,"link-danger-border-color-hover":`var(--${B}-link-danger-color)`,"link-danger-border-radius-hover":`var(--${B}-link-danger-border-radius)`,"link-danger-outline-hover":`var(--${B}-link-danger-outline)`,"link-danger-shadow-hover":`var(--${B}-link-danger-shadow)`,"link-danger-text-color-hover":`var(--${b}-error-color-hover)`,"link-danger-background-visited":`var(--${B}-link-danger-background)`,"link-danger-border-width-visited":`var(--${B}-link-danger-border-width)`,"link-danger-border-style-visited":`var(--${B}-link-danger-border-style)`,"link-danger-border-color-visited":`var(--${B}-link-danger-border-color)`,"link-danger-border-radius-visited":`var(--${B}-link-danger-border-radius)`,"link-danger-outline-visited":`var(--${B}-link-danger-outline)`,"link-danger-shadow-visited":`var(--${B}-link-danger-shadow)`,"link-danger-text-color-visited":`var(--${B}-link-danger-text-color)`},z={"default-info-background":`var(--${B}-background)`,"default-info-border-width":`var(--${B}-border-width)`,"default-info-border-style":`var(--${B}-border-style)`,"default-info-border-color":`var(--${b}-info-color)`,"default-info-border-radius":`var(--${B}-border-radius)`,"default-info-outline":"none","default-info-shadow":"none","default-info-text-color":`var(--${b}-info-color)`,"default-info-background-active":`var(--${B}-default-info-background)`,"default-info-border-width-active":`var(--${B}-default-info-border-width)`,"default-info-border-style-active":`var(--${B}-default-info-border-style)`,"default-info-border-color-active":`var(--${b}-info-color-active)`,"default-info-border-radius-active":`var(--${B}-default-info-border-radius)`,"default-info-outline-active":`var(--${B}-default-info-outline)`,"default-info-shadow-active":`var(--${B}-default-info-shadow)`,"default-info-text-color-active":`var(--${b}-info-color-active)`,"default-info-background-focus":`var(--${B}-default-info-background)`,"default-info-border-width-focus":`var(--${B}-default-info-border-width)`,"default-info-border-style-focus":`var(--${B}-default-info-border-style)`,"default-info-border-color-focus":`var(--${b}-info-color-focus)`,"default-info-border-radius-focus":`var(--${B}-default-info-border-radius)`,"default-info-outline-focus":`var(--${B}-default-info-outline)`,"default-info-shadow-focus":`var(--${B}-default-info-shadow)`,"default-info-text-color-focus":`var(--${b}-info-color-focus)`,"default-info-background-hover":`var(--${B}-default-info-background)`,"default-info-border-width-hover":`var(--${B}-default-info-border-width)`,"default-info-border-style-hover":`var(--${B}-default-info-border-style)`,"default-info-border-color-hover":`var(--${b}-info-color-hover)`,"default-info-border-radius-hover":`var(--${B}-default-info-border-radius)`,"default-info-outline-hover":`var(--${B}-default-info-outline)`,"default-info-shadow-hover":`var(--${B}-default-info-shadow)`,"default-info-text-color-hover":`var(--${b}-info-color-hover)`,"default-info-background-visited":`var(--${B}-default-info-background)`,"default-info-border-width-visited":`var(--${B}-default-info-border-width)`,"default-info-border-style-visited":`var(--${B}-default-info-border-style)`,"default-info-border-color-visited":`var(--${B}-default-info-border-color)`,"default-info-border-radius-visited":`var(--${B}-default-info-border-radius)`,"default-info-outline-visited":`var(--${B}-default-info-outline)`,"default-info-shadow-visited":`var(--${B}-default-info-shadow)`,"default-info-text-color-visited":`var(--${B}-default-info-text-color)`},G={"primary-info-background":`var(--${b}-info-color)`,"primary-info-border-width":`var(--${B}-primary-border-width)`,"primary-info-border-style":`var(--${B}-primary-border-style)`,"primary-info-border-color":`var(--${b}-info-color)`,"primary-info-border-radius":`var(--${B}-primary-border-radius)`,"primary-info-outline":"none","primary-info-shadow":"none","primary-info-text-color":"#ffffff","primary-info-background-active":`var(--${b}-info-color-active)`,"primary-info-border-width-active":`var(--${B}-primary-info-border-width)`,"primary-info-border-style-active":`var(--${B}-primary-info-border-style)`,"primary-info-border-color-active":`var(--${b}-info-color-active)`,"primary-info-border-radius-active":`var(--${B}-primary-info-border-radius)`,"primary-info-outline-active":`var(--${B}-primary-info-outline)`,"primary-info-shadow-active":`var(--${B}-primary-info-shadow)`,"primary-info-text-color-active":`var(--${B}-primary-info-text-color)`,"primary-info-background-focus":`var(--${b}-info-color-focus)`,"primary-info-border-width-focus":`var(--${B}-primary-info-border-width)`,"primary-info-border-style-focus":`var(--${B}-primary-info-border-style)`,"primary-info-border-color-focus":`var(--${b}-info-color-focus)`,"primary-info-border-radius-focus":`var(--${B}-primary-info-border-radius)`,"primary-info-outline-focus":`var(--${B}-primary-info-outline)`,"primary-info-shadow-focus":`var(--${B}-primary-info-shadow)`,"primary-info-text-color-focus":`var(--${B}-primary-info-text-color)`,"primary-info-background-hover":`var(--${b}-info-color-hover)`,"primary-info-border-width-hover":`var(--${B}-primary-info-border-width)`,"primary-info-border-style-hover":`var(--${B}-primary-info-border-style)`,"primary-info-border-color-hover":`var(--${b}-info-color-hover)`,"primary-info-border-radius-hover":`var(--${B}-primary-info-border-radius)`,"primary-info-outline-hover":`var(--${B}-primary-info-outline)`,"primary-info-shadow-hover":`var(--${B}-primary-info-shadow)`,"primary-info-text-color-hover":`var(--${B}-primary-info-text-color)`,"primary-info-background-visited":`var(--${B}-primary-info-background)`,"primary-info-border-width-visited":`var(--${B}-primary-info-border-width)`,"primary-info-border-style-visited":`var(--${B}-primary-info-border-style)`,"primary-info-border-color-visited":`var(--${B}-primary-info-border-color)`,"primary-info-border-radius-visited":`var(--${B}-primary-info-border-radius)`,"primary-info-outline-visited":`var(--${B}-primary-info-outline)`,"primary-info-shadow-visited":`var(--${B}-primary-info-shadow)`,"primary-info-text-color-visited":`var(--${B}-primary-info-text-color)`},U={"link-info-background":`var(--${B}-link-background)`,"link-info-border-width":`var(--${B}-link-border-width)`,"link-info-border-style":`var(--${B}-link-border-style)`,"link-info-border-color":`var(--${B}-link-border-color)`,"link-info-border-radius":`var(--${B}-link-border-radius)`,"link-info-outline":"none","link-info-shadow":"none","link-info-text-color":`var(--${b}-info-color)`,"link-info-background-active":`var(--${B}-link-info-color)`,"link-info-border-width-active":`var(--${B}-link-info-border-width)`,"link-info-border-style-active":`var(--${B}-link-info-border-style)`,"link-info-border-color-active":`var(--${B}-link-info-color)`,"link-info-border-radius-active":`var(--${B}-link-info-border-radius)`,"link-info-outline-active":`var(--${B}-link-info-outline)`,"link-info-shadow-active":`var(--${B}-link-info-shadow)`,"link-info-text-color-active":`var(--${b}-info-color-active)`,"link-info-background-focus":`var(--${B}-link-info-color)`,"link-info-border-width-focus":`var(--${B}-link-info-border-width)`,"link-info-border-style-focus":`var(--${B}-link-info-border-style)`,"link-info-border-color-focus":`var(--${B}-link-info-color)`,"link-info-border-radius-focus":`var(--${B}-link-info-border-radius)`,"link-info-outline-focus":`var(--${B}-link-info-outline)`,"link-info-shadow-focus":`var(--${B}-link-info-shadow)`,"link-info-text-color-focus":`var(--${b}-info-color-focus)`,"link-info-background-hover":`var(--${B}-link-info-color)`,"link-info-border-width-hover":`var(--${B}-link-info-border-width)`,"link-info-border-style-hover":`var(--${B}-link-info-border-style)`,"link-info-border-color-hover":`var(--${B}-link-info-color)`,"link-info-border-radius-hover":`var(--${B}-link-info-border-radius)`,"link-info-outline-hover":`var(--${B}-link-info-outline)`,"link-info-shadow-hover":`var(--${B}-link-info-shadow)`,"link-info-text-color-hover":`var(--${b}-info-color-hover)`,"link-info-background-visited":`var(--${B}-link-info-background)`,"link-info-border-width-visited":`var(--${B}-link-info-border-width)`,"link-info-border-style-visited":`var(--${B}-link-info-border-style)`,"link-info-border-color-visited":`var(--${B}-link-info-border-color)`,"link-info-border-radius-visited":`var(--${B}-link-info-border-radius)`,"link-info-outline-visited":`var(--${B}-link-info-outline)`,"link-info-shadow-visited":`var(--${B}-link-info-shadow)`,"link-info-text-color-visited":`var(--${B}-link-info-text-color)`},K={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":"#d9d9d9","border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-active":`var(--${B}-background)`,"border-width-active":`var(--${B}-border-width)`,"border-style-active":`var(--${B}-border-style)`,"border-color-active":`var(--${B}-border-color)`,"border-radius-active":`var(--${B}-border-radius)`,"outline-active":`var(--${B}-outline)`,"shadow-active":`var(--${B}-shadow)`,"text-color-active":`var(--${b}-primary-color-active)`,"background-focus":`var(--${B}-background)`,"border-width-focus":`var(--${B}-border-width)`,"border-style-focus":`var(--${B}-border-style)`,"border-color-focus":`var(--${B}-border-color)`,"border-radius-focus":`var(--${B}-border-radius)`,"outline-focus":`var(--${B}-outline)`,"shadow-focus":`var(--${B}-shadow)`,"text-color-focus":`var(--${b}-primary-color-focus)`,"background-hover":`var(--${B}-background)`,"border-width-hover":`var(--${B}-border-width)`,"border-style-hover":`var(--${B}-border-style)`,"border-color-hover":`var(--${B}-border-color)`,"border-radius-hover":`var(--${B}-border-radius)`,"outline-hover":`var(--${B}-outline)`,"shadow-hover":`var(--${B}-shadow)`,"text-color-hover":`var(--${b}-primary-color-hover)`,"background-visited":`var(--${B}-background)`,"border-width-visited":`var(--${B}-border-width)`,"border-style-visited":`var(--${B}-border-style)`,"border-color-visited":`var(--${B}-border-color)`,"border-radius-visited":`var(--${B}-border-radius)`,"outline-visited":`var(--${B}-outline)`,"shadow-visited":`var(--${B}-shadow)`,"text-color-visited":`var(--${B}-text-color)`},q={"primary-background":`var(--${b}-primary-color)`,"primary-border-width":`var(--${b}-border-width)`,"primary-border-style":`var(--${b}-border-style)`,"primary-border-color":`var(--${b}-primary-color)`,"primary-border-radius":`var(--${b}-border-radius)`,"primary-outline":`var(--${b}-primary-color-outline)`,"primary-shadow":"none","primary-text-color":"#ffffff","primary-background-active":`var(--${b}-primary-color-active)`,"primary-border-width-active":`var(--${B}-primary-border-width)`,"primary-border-style-active":`var(--${B}-primary-border-style)`,"primary-border-color-active":`var(--${b}-primary-color-active)`,"primary-border-radius-active":`var(--${B}-primary-border-radius)`,"primary-outline-active":`var(--${B}-primary-outline)`,"primary-shadow-active":`var(--${B}-primary-shadow)`,"primary-text-color-active":`var(--${B}-primary-text-color)`,"primary-background-focus":`var(--${b}-primary-color-focus)`,"primary-border-width-focus":`var(--${B}-primary-border-width)`,"primary-border-style-focus":`var(--${B}-primary-border-style)`,"primary-border-color-focus":`var(--${b}-primary-color-focus)`,"primary-border-radius-focus":`var(--${B}-primary-border-radius)`,"primary-outline-focus":`var(--${B}-primary-outline)`,"primary-shadow-focus":`var(--${B}-primary-shadow)`,"primary-text-color-focus":`var(--${B}-primary-text-color)`,"primary-background-hover":`var(--${b}-primary-color-hover)`,"primary-border-width-hover":`var(--${B}-primary-border-width)`,"primary-border-style-hover":`var(--${B}-primary-border-style)`,"primary-border-color-hover":`var(--${b}-primary-color-hover)`,"primary-border-radius-hover":`var(--${B}-primary-border-radius)`,"primary-outline-hover":`var(--${B}-primary-outline)`,"primary-shadow-hover":`var(--${B}-primary-shadow)`,"primary-text-color-hover":`var(--${B}-primary-text-color)`,"primary-background-visited":`var(--${B}-primary-background)`,"primary-border-width-visited":`var(--${B}-primary-border-width)`,"primary-border-style-visited":`var(--${B}-primary-border-style)`,"primary-border-color-visited":`var(--${B}-primary-border-color)`,"primary-border-radius-visited":`var(--${B}-primary-border-radius)`,"primary-outline-visited":`var(--${B}-primary-outline)`,"primary-shadow-visited":`var(--${B}-primary-shadow)`,"primary-text-color-visited":`var(--${B}-primary-text-color)`},H={"link-background":"transparent","link-border-width":"none","link-border-style":"none","link-border-color":"none","link-border-radius":"none","link-outline":"none","link-shadow":"none","link-text-color":`var(--${b}-primary-color)`,"link-background-active":`var(--${B}-link-background)`,"link-border-width-active":`var(--${B}-link-border-width)`,"link-border-style-active":`var(--${B}-link-border-style)`,"link-border-color-active":`var(--${B}-link-border-color)`,"link-border-radius-active":`var(--${B}-link-border-radius)`,"link-outline-active":`var(--${B}-link-outline)`,"link-shadow-active":`var(--${B}-link-shadow)`,"link-text-color-active":`var(--${B}-link-text-color)`,"link-background-focus":`var(--${B}-link-background)`,"link-border-width-focus":`var(--${B}-link-border-width)`,"link-border-style-focus":`var(--${B}-link-border-style)`,"link-border-color-focus":`var(--${B}-link-border-color)`,"link-border-radius-focus":`var(--${B}-link-border-radius)`,"link-outline-focus":`var(--${B}-link-outline)`,"link-shadow-focus":`var(--${B}-link-shadow)`,"link-text-color-focus":`var(--${B}-link-text-color)`,"link-background-hover":`var(--${B}-link-background)`,"link-border-width-hover":`var(--${B}-link-border-width)`,"link-border-style-hover":`var(--${B}-link-border-style)`,"link-border-color-hover":`var(--${B}-link-border-color)`,"link-border-radius-hover":`var(--${B}-link-border-radius)`,"link-outline-hover":`var(--${B}-link-outline)`,"link-shadow-hover":`var(--${B}-link-shadow)`,"link-text-color-hover":`var(--${B}-link-text-color)`,"link-background-visited":`var(--${B}-link-background)`,"link-border-width-visited":`var(--${B}-link-border-width)`,"link-border-style-visited":`var(--${B}-link-border-style)`,"link-border-color-visited":`var(--${B}-link-border-color)`,"link-border-radius-visited":`var(--${B}-link-border-radius)`,"link-outline-visited":`var(--${B}-link-outline)`,"link-shadow-visited":`var(--${B}-link-shadow)`,"link-text-color-visited":`var(--${B}-link-text-color)`},Y={"default-success-background":`var(--${B}-background)`,"default-success-border-width":`var(--${B}-border-width)`,"default-success-border-style":`var(--${B}-border-style)`,"default-success-border-color":`var(--${b}-success-color)`,"default-success-border-radius":`var(--${B}-border-radius)`,"default-success-outline":"none","default-success-shadow":"none","default-success-text-color":`var(--${b}-success-color)`,"default-success-background-active":`var(--${B}-default-success-background)`,"default-success-border-width-active":`var(--${B}-default-success-border-width)`,"default-success-border-style-active":`var(--${B}-default-success-border-style)`,"default-success-border-color-active":`var(--${b}-success-color-active)`,"default-success-border-radius-active":`var(--${B}-default-success-border-radius)`,"default-success-outline-active":`var(--${B}-default-success-outline)`,"default-success-shadow-active":`var(--${B}-default-success-shadow)`,"default-success-text-color-active":`var(--${b}-success-color-active)`,"default-success-background-focus":`var(--${B}-default-success-background)`,"default-success-border-width-focus":`var(--${B}-default-success-border-width)`,"default-success-border-style-focus":`var(--${B}-default-success-border-style)`,"default-success-border-color-focus":`var(--${b}-success-color-focus)`,"default-success-border-radius-focus":`var(--${B}-default-success-border-radius)`,"default-success-outline-focus":`var(--${B}-default-success-outline)`,"default-success-shadow-focus":`var(--${B}-default-success-shadow)`,"default-success-text-color-focus":`var(--${b}-success-color-focus)`,"default-success-background-hover":`var(--${B}-default-success-background)`,"default-success-border-width-hover":`var(--${B}-default-success-border-width)`,"default-success-border-style-hover":`var(--${B}-default-success-border-style)`,"default-success-border-color-hover":`var(--${b}-success-color-hover)`,"default-success-border-radius-hover":`var(--${B}-default-success-border-radius)`,"default-success-outline-hover":`var(--${B}-default-success-outline)`,"default-success-shadow-hover":`var(--${B}-default-success-shadow)`,"default-success-text-color-hover":`var(--${b}-success-color-hover)`,"default-success-background-visited":`var(--${B}-default-success-background)`,"default-success-border-width-visited":`var(--${B}-default-success-border-width)`,"default-success-border-style-visited":`var(--${B}-default-success-border-style)`,"default-success-border-color-visited":`var(--${B}-default-success-border-color)`,"default-success-border-radius-visited":`var(--${B}-default-success-border-radius)`,"default-success-outline-visited":`var(--${B}-default-success-outline)`,"default-success-shadow-visited":`var(--${B}-default-success-shadow)`,"default-success-text-color-visited":`var(--${B}-default-success-text-color)`},Q={"primary-success-background":`var(--${b}-success-color)`,"primary-success-border-width":`var(--${B}-primary-border-width)`,"primary-success-border-style":`var(--${B}-primary-border-style)`,"primary-success-border-color":`var(--${b}-success-color)`,"primary-success-border-radius":`var(--${B}-primary-border-radius)`,"primary-success-outline":"none","primary-success-shadow":"none","primary-success-text-color":"#ffffff","primary-success-background-active":`var(--${b}-success-color-active)`,"primary-success-border-width-active":`var(--${B}-primary-success-border-width)`,"primary-success-border-style-active":`var(--${B}-primary-success-border-style)`,"primary-success-border-color-active":`var(--${b}-success-color-active)`,"primary-success-border-radius-active":`var(--${B}-primary-success-border-radius)`,"primary-success-outline-active":`var(--${B}-primary-success-outline)`,"primary-success-shadow-active":`var(--${B}-primary-success-shadow)`,"primary-success-text-color-active":`var(--${B}-primary-success-text-color)`,"primary-success-background-focus":`var(--${b}-success-color-focus)`,"primary-success-border-width-focus":`var(--${B}-primary-success-border-width)`,"primary-success-border-style-focus":`var(--${B}-primary-success-border-style)`,"primary-success-border-color-focus":`var(--${b}-success-color-focus)`,"primary-success-border-radius-focus":`var(--${B}-primary-success-border-radius)`,"primary-success-outline-focus":`var(--${B}-primary-success-outline)`,"primary-success-shadow-focus":`var(--${B}-primary-success-shadow)`,"primary-success-text-color-focus":`var(--${B}-primary-success-text-color)`,"primary-success-background-hover":`var(--${b}-success-color-hover)`,"primary-success-border-width-hover":`var(--${B}-primary-success-border-width)`,"primary-success-border-style-hover":`var(--${B}-primary-success-border-style)`,"primary-success-border-color-hover":`var(--${b}-success-color-hover)`,"primary-success-border-radius-hover":`var(--${B}-primary-success-border-radius)`,"primary-success-outline-hover":`var(--${B}-primary-success-outline)`,"primary-success-shadow-hover":`var(--${B}-primary-success-shadow)`,"primary-success-text-color-hover":`var(--${B}-primary-success-text-color)`,"primary-success-background-visited":`var(--${B}-primary-success-background)`,"primary-success-border-width-visited":`var(--${B}-primary-success-border-width)`,"primary-success-border-style-visited":`var(--${B}-primary-success-border-style)`,"primary-success-border-color-visited":`var(--${B}-primary-success-border-color)`,"primary-success-border-radius-visited":`var(--${B}-primary-success-border-radius)`,"primary-success-outline-visited":`var(--${B}-primary-success-outline)`,"primary-success-shadow-visited":`var(--${B}-primary-success-shadow)`,"primary-success-text-color-visited":`var(--${B}-primary-success-text-color)`},J={"link-success-background":`var(--${B}-link-background)`,"link-success-border-width":`var(--${B}-link-border-width)`,"link-success-border-style":`var(--${B}-link-border-style)`,"link-success-border-color":`var(--${B}-link-border-color)`,"link-success-border-radius":`var(--${B}-link-border-radius)`,"link-success-outline":"none","link-success-shadow":"none","link-success-text-color":`var(--${b}-success-color)`,"link-success-background-active":`var(--${B}-link-success-color)`,"link-success-border-width-active":`var(--${B}-link-success-border-width)`,"link-success-border-style-active":`var(--${B}-link-success-border-style)`,"link-success-border-color-active":`var(--${B}-link-success-color)`,"link-success-border-radius-active":`var(--${B}-link-success-border-radius)`,"link-success-outline-active":`var(--${B}-link-success-outline)`,"link-success-shadow-active":`var(--${B}-link-success-shadow)`,"link-success-text-color-active":`var(--${b}-success-color-active)`,"link-success-background-focus":`var(--${B}-link-success-color)`,"link-success-border-width-focus":`var(--${B}-link-success-border-width)`,"link-success-border-style-focus":`var(--${B}-link-success-border-style)`,"link-success-border-color-focus":`var(--${B}-link-success-color)`,"link-success-border-radius-focus":`var(--${B}-link-success-border-radius)`,"link-success-outline-focus":`var(--${B}-link-success-outline)`,"link-success-shadow-focus":`var(--${B}-link-success-shadow)`,"link-success-text-color-focus":`var(--${b}-success-color-focus)`,"link-success-background-hover":`var(--${B}-link-success-color)`,"link-success-border-width-hover":`var(--${B}-link-success-border-width)`,"link-success-border-style-hover":`var(--${B}-link-success-border-style)`,"link-success-border-color-hover":`var(--${B}-link-success-color)`,"link-success-border-radius-hover":`var(--${B}-link-success-border-radius)`,"link-success-outline-hover":`var(--${B}-link-success-outline)`,"link-success-shadow-hover":`var(--${B}-link-success-shadow)`,"link-success-text-color-hover":`var(--${b}-success-color-hover)`,"link-success-background-visited":`var(--${B}-link-success-background)`,"link-success-border-width-visited":`var(--${B}-link-success-border-width)`,"link-success-border-style-visited":`var(--${B}-link-success-border-style)`,"link-success-border-color-visited":`var(--${B}-link-success-border-color)`,"link-success-border-radius-visited":`var(--${B}-link-success-border-radius)`,"link-success-outline-visited":`var(--${B}-link-success-outline)`,"link-success-shadow-visited":`var(--${B}-link-success-shadow)`,"link-success-text-color-visited":`var(--${B}-link-success-text-color)`},X={"default-warning-background":`var(--${B}-background)`,"default-warning-border-width":`var(--${B}-border-width)`,"default-warning-border-style":`var(--${B}-border-style)`,"default-warning-border-color":`var(--${b}-warning-color)`,"default-warning-border-radius":`var(--${B}-border-radius)`,"default-warning-outline":"none","default-warning-shadow":"none","default-warning-text-color":`var(--${b}-warning-color)`,"default-warning-background-active":`var(--${B}-default-warning-background)`,"default-warning-border-width-active":`var(--${B}-default-warning-border-width)`,"default-warning-border-style-active":`var(--${B}-default-warning-border-style)`,"default-warning-border-color-active":`var(--${b}-warning-color-active)`,"default-warning-border-radius-active":`var(--${B}-default-warning-border-radius)`,"default-warning-outline-active":`var(--${B}-default-warning-outline)`,"default-warning-shadow-active":`var(--${B}-default-warning-shadow)`,"default-warning-text-color-active":`var(--${b}-warning-color-active)`,"default-warning-background-focus":`var(--${B}-default-warning-background)`,"default-warning-border-width-focus":`var(--${B}-default-warning-border-width)`,"default-warning-border-style-focus":`var(--${B}-default-warning-border-style)`,"default-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-border-radius-focus":`var(--${B}-default-warning-border-radius)`,"default-warning-outline-focus":`var(--${B}-default-warning-outline)`,"default-warning-shadow-focus":`var(--${B}-default-warning-shadow)`,"default-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-background-hover":`var(--${B}-default-warning-background)`,"default-warning-border-width-hover":`var(--${B}-default-warning-border-width)`,"default-warning-border-style-hover":`var(--${B}-default-warning-border-style)`,"default-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-border-radius-hover":`var(--${B}-default-warning-border-radius)`,"default-warning-outline-hover":`var(--${B}-default-warning-outline)`,"default-warning-shadow-hover":`var(--${B}-default-warning-shadow)`,"default-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-background-visited":`var(--${B}-default-warning-background)`,"default-warning-border-width-visited":`var(--${B}-default-warning-border-width)`,"default-warning-border-style-visited":`var(--${B}-default-warning-border-style)`,"default-warning-border-color-visited":`var(--${B}-default-warning-border-color)`,"default-warning-border-radius-visited":`var(--${B}-default-warning-border-radius)`,"default-warning-outline-visited":`var(--${B}-default-warning-outline)`,"default-warning-shadow-visited":`var(--${B}-default-warning-shadow)`,"default-warning-text-color-visited":`var(--${B}-default-warning-text-color)`},Z={"primary-warning-background":`var(--${b}-warning-color)`,"primary-warning-border-width":`var(--${B}-primary-border-width)`,"primary-warning-border-style":`var(--${B}-primary-border-style)`,"primary-warning-border-color":`var(--${b}-warning-color)`,"primary-warning-border-radius":`var(--${B}-primary-border-radius)`,"primary-warning-outline":"none","primary-warning-shadow":"none","primary-warning-text-color":"#ffffff","primary-warning-background-active":`var(--${b}-warning-color-active)`,"primary-warning-border-width-active":`var(--${B}-primary-warning-border-width)`,"primary-warning-border-style-active":`var(--${B}-primary-warning-border-style)`,"primary-warning-border-color-active":`var(--${b}-warning-color-active)`,"primary-warning-border-radius-active":`var(--${B}-primary-warning-border-radius)`,"primary-warning-outline-active":`var(--${B}-primary-warning-outline)`,"primary-warning-shadow-active":`var(--${B}-primary-warning-shadow)`,"primary-warning-text-color-active":`var(--${B}-primary-warning-text-color)`,"primary-warning-background-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-width-focus":`var(--${B}-primary-warning-border-width)`,"primary-warning-border-style-focus":`var(--${B}-primary-warning-border-style)`,"primary-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-radius-focus":`var(--${B}-primary-warning-border-radius)`,"primary-warning-outline-focus":`var(--${B}-primary-warning-outline)`,"primary-warning-shadow-focus":`var(--${B}-primary-warning-shadow)`,"primary-warning-text-color-focus":`var(--${B}-primary-warning-text-color)`,"primary-warning-background-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-width-hover":`var(--${B}-primary-warning-border-width)`,"primary-warning-border-style-hover":`var(--${B}-primary-warning-border-style)`,"primary-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-radius-hover":`var(--${B}-primary-warning-border-radius)`,"primary-warning-outline-hover":`var(--${B}-primary-warning-outline)`,"primary-warning-shadow-hover":`var(--${B}-primary-warning-shadow)`,"primary-warning-text-color-hover":`var(--${B}-primary-warning-text-color)`,"primary-warning-background-visited":`var(--${B}-primary-warning-background)`,"primary-warning-border-width-visited":`var(--${B}-primary-warning-border-width)`,"primary-warning-border-style-visited":`var(--${B}-primary-warning-border-style)`,"primary-warning-border-color-visited":`var(--${B}-primary-warning-border-color)`,"primary-warning-border-radius-visited":`var(--${B}-primary-warning-border-radius)`,"primary-warning-outline-visited":`var(--${B}-primary-warning-outline)`,"primary-warning-shadow-visited":`var(--${B}-primary-warning-shadow)`,"primary-warning-text-color-visited":`var(--${B}-primary-warning-text-color)`},ee={"link-warning-background":`var(--${B}-link-background)`,"link-warning-border-width":`var(--${B}-link-border-width)`,"link-warning-border-style":`var(--${B}-link-border-style)`,"link-warning-border-color":`var(--${B}-link-border-color)`,"link-warning-border-radius":`var(--${B}-link-border-radius)`,"link-warning-outline":"none","link-warning-shadow":"none","link-warning-text-color":`var(--${b}-warning-color)`,"link-warning-background-active":`var(--${B}-link-warning-color)`,"link-warning-border-width-active":`var(--${B}-link-warning-border-width)`,"link-warning-border-style-active":`var(--${B}-link-warning-border-style)`,"link-warning-border-color-active":`var(--${B}-link-warning-color)`,"link-warning-border-radius-active":`var(--${B}-link-warning-border-radius)`,"link-warning-outline-active":`var(--${B}-link-warning-outline)`,"link-warning-shadow-active":`var(--${B}-link-warning-shadow)`,"link-warning-text-color-active":`var(--${b}-warning-color-active)`,"link-warning-background-focus":`var(--${B}-link-warning-color)`,"link-warning-border-width-focus":`var(--${B}-link-warning-border-width)`,"link-warning-border-style-focus":`var(--${B}-link-warning-border-style)`,"link-warning-border-color-focus":`var(--${B}-link-warning-color)`,"link-warning-border-radius-focus":`var(--${B}-link-warning-border-radius)`,"link-warning-outline-focus":`var(--${B}-link-warning-outline)`,"link-warning-shadow-focus":`var(--${B}-link-warning-shadow)`,"link-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"link-warning-background-hover":`var(--${B}-link-warning-color)`,"link-warning-border-width-hover":`var(--${B}-link-warning-border-width)`,"link-warning-border-style-hover":`var(--${B}-link-warning-border-style)`,"link-warning-border-color-hover":`var(--${B}-link-warning-color)`,"link-warning-border-radius-hover":`var(--${B}-link-warning-border-radius)`,"link-warning-outline-hover":`var(--${B}-link-warning-outline)`,"link-warning-shadow-hover":`var(--${B}-link-warning-shadow)`,"link-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"link-warning-background-visited":`var(--${B}-link-warning-background)`,"link-warning-border-width-visited":`var(--${B}-link-warning-border-width)`,"link-warning-border-style-visited":`var(--${B}-link-warning-border-style)`,"link-warning-border-color-visited":`var(--${B}-link-warning-border-color)`,"link-warning-border-radius-visited":`var(--${B}-link-warning-border-radius)`,"link-warning-outline-visited":`var(--${B}-link-warning-outline)`,"link-warning-shadow-visited":`var(--${B}-link-warning-shadow)`,"link-warning-text-color-visited":`var(--${B}-link-warning-text-color)`},te=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},K),_),z),Y),X),q),W),G),Q),Z),H),P),U),J),ee),oe="checkbox",ie={color:`var(--${b}-text-color)`,background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"disabled-border-color":`var(--${b}-disabled-border-color)`},ne="datetime",re={padding:"4px 12px","text-color-hover":`var(--${b}-primary-color)`,"text-color-active":"#fff","text-color-selected":"#fff","cell-internal-text-color-hover":"#fff","background-hover":`var(--${b}-hover-background-color)`},ae="drawer",le={"width-small":"20%","width-medium":"40%","width-large":"80%","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},se="dropdown",ce={"background-color":`var(--${b}-background)`,"background-hover":`var(--${b}-hover-background-color)`,"border-color":`var(--${b}-border-color)`,"box-shadow":"-2px 2px 6px 0px rgba(136, 156, 176, 0.2)",color:`var(--${b}-text-color)`,"color-hover":`var(--${b}-hover-text-color)`,"color-disabled":`var(--${b}-disabled-color)`,"color-disabled-hover":`var(--${b}-disabled-color)`,"item-background-color-hover":`var(--${b}-hover-background-color)`,"item-background-color-disabled-hover":"transparent","button-text-color":`var(--${b}-button-link-text-color)`},de="form-item",ue={config:{readonlyShowPlaceholder:!1,disabledShowPlaceholder:!1},"label-color":"var(--oio-text-color)","label-weight":"bold"},pe="header",be={"border-bottom":"1px solid rgba(0, 0, 0, 0.06)",color:"rgba(0,0,0,0.65)"},ge="input",ve=`${b}-${ge}`,me={background:"#ffffff","background-color":"#ffffff","border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","background-hover":`var(--${ve}-background)`,"border-width-hover":`var(--${ve}-border-width)`,"border-style-hover":`var(--${ve}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${ve}-border-radius)`,"outline-hover":`var(--${ve}-outline)`,"shadow-hover":`var(--${ve}-shadow)`,"text-color-hover":`var(--${ve}-text-color)`,"background-focus":`var(--${ve}-background)`,"border-width-focus":`var(--${ve}-border-width)`,"border-style-focus":`var(--${ve}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${ve}-border-radius)`,"outline-focus":`var(--${ve}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${ve}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"error-border-color":"#ff4d4f","disabled-border-color":`var(--${b}-disabled-border-color)`,"addon-background":"#F7F7F7","addon-color":" rgba(0,0,0,0.65)","tag-background":"rgba(3,93,255, 0.1)","ready-delete-tag-background":"rgba(224, 32, 32, 0.1)","ready-delete-tag-color":"#ff4d4f","clear-background":"#fff","clear-color":"rgba(0,0,0,.25)"},ye={"primary-color-rgb":"3, 93, 255","primary-color":"#035DFF","primary-color-hover":"#3F84FF","primary-color-focus":"#3F84FF","primary-color-active":"#024CDE","primary-color-outline":"#035DFF","success-color":"#6DD400","success-color-hover":"#90DE3D","success-color-focus":"#90DE3D","success-color-active":"#6BBB00","success-color-outline":"#6DD400","warning-color":"#F7B500","warning-color-hover":"#F9C73D","warning-color-focus":"#F9C73D","warning-color-active":"#D99200","warning-color-outline":"#F7B500","info-color":"#8c8c8c","info-color-hover":"#999999","info-color-focus":"#999999","info-color-active":"#666666","info-color-outline":"#8c8c8c","error-color":"#E02020","error-color-hover":"#E75555","error-color-focus":"#E75555","error-color-active":"#C51C26","error-color-outline":"#E02020","notification-info":"#035DFF","notification-error":"#FF4D4F","notification-success":"#52C41A","notification-warning":"#FAAD14",background:"#1F2935","body-background":"#15232E","search-background":"#1F2935","header-background":"#1F2935","main-background":"#1F2935","footer-background":"#1F2935","menu-background":"#1F2935","multi-tabs-background":"#F3F7FA","stripe-color":"rgba(255, 255, 255, 0.1)","placeholder-color":"rgba(255,255,255,0.25)","hover-background-color":"rgba(255, 255, 255, 0.1)","hover-text-color":`var(--${b}-text-color)`,"selected-background-color":"rgba(255, 255, 255, 0.1)","selected-text-color":`var(--${b}-text-color-secondary)`,"font-family":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol','Noto Color Emoji';","text-color":"rgba(255,255,255,0.65)","text-color-rgb":"38, 38, 38","text-color-secondary":"rgba(255,255,255,0.45)","text-color-three":"rgba(255,255,255,0.25)","font-weight-thick":`var(--${b}-font-weight-bold)`,"font-weight":"400","font-weight-lighter":"lighter","font-weight-bold":"bold","font-weight-bolder":"bolder","readonly-color":"rgba(255,255,255,0.65)","readonly-bg":"#1D2E3C","readonly-active-bg":"#1D2E3C","readonly-border-color":"#333e4c","disabled-color":"rgba(255,255,255,0.25)","disabled-bg":"#1D2E3C","disabled-active-bg":"#1D2E3C","disabled-border-color":"#333e4c","border-color":"#333e4c","border-color-danger":"#E02020","border-width":"1px","border-style":"solid","icon-color":"rgba(255,255,255,0.65)","default-icon-color":"rgba(255,255,255,0.65)","normal-icon-filter":`var(--${b}-icon-filter)`,"icon-filter":"invert(0.7) hue-rotate(180deg) brightness(0.5)","icon-filter-opacity":"0.4","close-icon-background":"#333E4C","group-border-width":"0px","box-shadow-size":"0px","box-shadow":"0px 0px 6px 0px rgba(0,0,0,0.2)","addon-color-pick-background":`var(--${b}-primary-color)`,"addon-color-pick-readonly-background":"rgba(92,104,127, 0.25)","addon-color-pick-border-color":"#ffffff","addon-color-pick-icon-color":"#ffffff","addon-color-pick-dropdown-background":`var(--${b}-background)`,"addon-color-pick-dropdown-border-color":`var(--${b}-border-color)`,"user-dropdown-icon-color":`var(--${b}-text-color)`,"tag-select-background":"rgba(255,255,255,0.1)","spin-background":"rgba(31,41,53,0.7)","gemini-mini-icon-color":"rgba(3,93,255, 0.2)"};class he{static hexToRgb(e){e=e.replace(/^#/,"");const t=parseInt(e.substring(0,2),16),o=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return{r:t,g:o,b:i}}static rgbToHex(e){const t=he.componentToHex(e.r),o=he.componentToHex(e.g),i=he.componentToHex(e.b);return`#${t}${o}${i}`}static componentToHex(e){const t=e.toString(16);return 1===t.length?"0"+t:t}static getAlphaColor(e,t,o="#FFFFFF"){if(t<0||t>1)throw new Error("透明度必须是0到1之间的数值");const i=he.hexToRgb(e),n=he.hexToRgb(o),r=Math.round(i.r*t+n.r*(1-t)),a=Math.round(i.g*t+n.g*(1-t)),l=Math.round(i.b*t+n.b*(1-t));return he.rgbToHex({r:r,g:a,b:l})}}const fe={"primary-color":"#035dff","success-color":"#6dd400","warning-color":"#f7b500","info-color":"#8c8c8c","error-color":"#e02020"};function Oe(e){const t={};for(const[o,i]of Object.entries(e))t[o+"-10"]=he.getAlphaColor(i,.1);return t}const we=Object.assign(Object.assign(Object.assign({},fe),Oe(fe)),{"primary-color-rgb":"3, 93, 255","primary-color-hover":"#3F84FF","primary-color-focus":"#3F84FF","primary-color-active":"#024CDE","primary-color-outline":"#035DFF","success-color-hover":"#90DE3D","success-color-focus":"#90DE3D","success-color-active":"#6BBB00","success-color-outline":"#6DD400","warning-color-hover":"#F9C73D","warning-color-focus":"#F9C73D","warning-color-active":"#D99200","warning-color-outline":"#F7B500","info-color-hover":"#999999","info-color-focus":"#999999","info-color-active":"#666666","info-color-outline":"#8C8C8C","error-color-rgb":"224, 32, 32","error-color-hover":"#E75555","error-color-focus":"#E75555","error-color-active":"#C51C26","error-color-outline":"#E02020","notification-info":"#035DFF","notification-error":"#FF4D4F","notification-success":"#52C41A","notification-warning":"#FAAD14",background:"#ffffff","body-background":"#F3F7FA","search-background":"#ffffff","header-background":"#ffffff","main-background":"#ffffff","footer-background":"#ffffff","menu-background":"#ffffff","stripe-color":"#f7f8fa","placeholder-color":"rgba(0,0,0,0.25)","hover-background-color":"rgba(3, 93, 255, 0.1)","hover-text-color":`var(--${b}-primary-color)`,"selected-background-color":"#EBF2FF","selected-text-color":`var(--${b}-primary-color)`,"font-family":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol','Noto Color Emoji';","text-color":"rgba(0,0,0,0.85)","text-color-rgb":"38, 38, 38","text-color-secondary":"rgba(0,0,0,0.65)","text-color-three":"rgba(0,0,0,0.45)","font-weight-thick":`var(--${b}-font-weight-bold)`,"font-weight":"400","font-weight-lighter":"lighter","font-weight-bold":"bold","font-weight-bolder":"bolder","readonly-color":"rgba(0,0,0,0.85)","readonly-bg":"#F7F7F7","readonly-active-bg":"#F7F7F7","readonly-border-color":"rgba(217,217,217,1)","disabled-color":"rgba(0, 0, 0, 0.45)","disabled-bg":"#F7F7F7","disabled-active-bg":"#F7F7F7","disabled-border-color":"rgba(217,217,217,1)","border-color":"#e3e7ee","border-color-danger":"#E02020","border-width":"1px","border-style":"solid","icon-color":"rgba(0, 0, 0, 0.45)","default-icon-color":"rgba(0, 0, 0, 0.45)","normal-icon-filter":"","icon-filter":"invert(0.7) hue-rotate(180deg) brightness(0.5)","icon-filter-opacity":"0.2","close-icon-background":"#f1f1f1","group-border-width":"1px","box-shadow-size":"6px","box-shadow":"rgba(136, 156, 176, 0.1) 0px 2px 4px 0px","addon-color-pick-background":"#ffffff","addon-color-pick-readonly-background":`var(--${b}-disabled-bg)`,"addon-color-pick-border-color":`var(--${b}-border-color)`,"addon-color-pick-icon-color":"#909399","addon-color-pick-dropdown-background":"#ffffff","addon-color-pick-dropdown-border-color":"#e4e7ed","user-dropdown-icon-color":"rgba(0, 0, 0, 0.45)","tag-select-background":"#f1f1f1","spin-background":"","gemini-mini-icon-color":"#cfe1ff"});let je="default";function ke(e){je=e}function Ce(e){var t;const o=(null===(t=e.sideBarTheme)||void 0===t?void 0:t.mode)||"default";ke(o.toLocaleLowerCase()),bt(),Qi(),Io(),gr()}const De={"main-background":we["main-background"],"body-background":we["main-background"],"border-color":we["border-color"],"text-color":we["text-color"],"icon-color":we["icon-color"],"text-color-rgb":we["text-color-rgb"],"primary-color":we["primary-color"],"hover-background-color":we["hover-background-color"],"text-color-secondary":we["text-color-secondary"],"active-parent-title-color":"rgba(0, 0, 0, 0.85)","collapsed-button-background-color":"rgba(38, 38, 38, 0.05)","designer-font-color":"#333333","select-background":we["main-background"],"placeholder-color":we["placeholder-color"],"select-color":we["text-color"],"select-dropdown-background":we["main-background"],"select-dropdown-selected-color":we["primary-color"],"select-dropdown-color":we["text-color-secondary"],"select-dropdown-selected":we["hover-background-color"],"select-dropdown-box-shadow":"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 9px 28px 8px rgba(0, 0, 0, 0.05)"},Te={"main-background":ye["main-background"],"body-background":ye["body-background"],"border-color":ye["border-color"],"text-color":ye["text-color"],"icon-color":ye["icon-color"],"text-color-rgb":ye["text-color-rgb"],"primary-color":"#fff","hover-background-color":ye["hover-background-color"],"text-color-secondary":ye["text-color-secondary"],"active-parent-title-color":"#fff","collapsed-button-background-color":"rgba(38, 38, 38, 0.05)","designer-font-color":"#333333","select-background":ye["body-background"],"placeholder-color":ye["placeholder-color"],"select-color":ye["text-color"],"select-dropdown-background":ye["main-background"],"select-dropdown-selected-color":"#fff","select-dropdown-color":ye["text-color"],"select-dropdown-selected":ye["hover-background-color"],"select-dropdown-box-shadow":"0px 0px 6px 0px rgba(0,0,0,0.2)"},$e=()=>{const e="dark"===je?Te:De;return{"background-color":e["main-background"],"border-color":e["border-color"],"font-color":e["text-color"],"expand-background-color":e["main-background"],"default-icon-color":e["icon-color"],"default-expand-icon-color":`rgba(${e["text-color-rgb"]}, 0.75)`,"search-background-color":e["body-background"],"select-dropdown-background":e["select-dropdown-background"],"select-dropdown-color":e["select-dropdown-color"],"select-dropdown-selected-color":e["select-dropdown-selected-color"],"select-dropdown-selected":e["select-dropdown-selected"],"select-dropdown-box-shadow":e["select-dropdown-box-shadow"],"select-color":e["select-color"],"select-background":e["select-background"],"select-placeholder-color":e["placeholder-color"],"selected-icon-color":e["primary-color"],"selected-background-color":e["hover-background-color"],"selected-title-color":e["primary-color"],"selected-title-hover-color":e["primary-color"],"selected-root-title-color":e["primary-color"],"selected-root-icon-color":e["primary-color"],"selected-root-background-color":e["hover-background-color"],"hover-background-color":e["hover-background-color"],"root-title-hover-color":e["primary-color"],"root-title-hover-icon-color":e["primary-color"],"active-parent-title-color":e["active-parent-title-color"],"search-display":"unset","search-background":e["body-background"],"collapsed-button-hover-background-color":e["hover-background-color"],"collapsed-button-background-color":e["collapsed-button-background-color"],"collapsed-button-title-color":e["text-color-secondary"],"designer-font-color":e["designer-font-color"],"designer-background-color":e["main-background"],"designer-collapsed-button-hover-background-color":e["hover-background-color"],"designer-collapsed-button-background-color":e["collapsed-button-background-color"]}},Ee={"primary-color-rgb":"3, 93, 255","primary-color":"#035DFF","primary-color-hover":"#3F84FF","primary-color-focus":"#3F84FF","primary-color-active":"#024CDE","primary-color-outline":"#035DFF","success-color":"#6DD400","success-color-hover":"#90DE3D","success-color-focus":"#90DE3D","success-color-active":"#6BBB00","success-color-outline":"#6DD400","warning-color":"#F7B500","warning-color-hover":"#F9C73D","warning-color-focus":"#F9C73D","warning-color-active":"#D99200","warning-color-outline":"#F7B500","info-color":"#8c8c8c","info-color-hover":"#999999","info-color-focus":"#999999","info-color-active":"#666666","info-color-outline":"#8c8c8c","error-color":"#E02020","error-color-hover":"#E75555","error-color-focus":"#E75555","error-color-active":"#C51C26","error-color-outline":"#E02020","notification-info":"#035DFF","notification-error":"#FF4D4F","notification-success":"#52C41A","notification-warning":"#FAAD14",background:"#1F2935","body-background":"#15232E","search-background":"#1F2935","header-background":"#1F2935","main-background":"#1F2935","footer-background":"#1F2935","menu-background":"#1F2935","multi-tabs-background":"#F3F7FA","stripe-color":"rgba(255, 255, 255, 0.1)","placeholder-color":"rgba(255,255,255,0.25)","hover-background-color":"rgba(255, 255, 255, 0.1)","hover-text-color":"var(--oio-text-color)","selected-background-color":"rgba(255, 255, 255, 0.1)","selected-text-color":`var(--${b}-text-color-secondary)`,"font-family":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol','Noto Color Emoji';","text-color":"rgba(255,255,255,0.65)","text-color-rgb":"38, 38, 38","text-color-secondary":"rgba(255,255,255,0.45)","text-color-three":"rgba(255,255,255,0.25)","font-weight-thick":`var(--${b}-font-weight-bold)`,"font-weight":"400","font-weight-lighter":"lighter","font-weight-bold":"bold","font-weight-bolder":"bolder","readonly-color":"rgba(255,255,255,0.65)","readonly-bg":"#1D2E3C","readonly-active-bg":"#1D2E3C","readonly-border-color":"#333e4c","disabled-color":"rgba(255,255,255,0.25)","disabled-bg":"#1D2E3C","disabled-active-bg":"#1D2E3C","disabled-border-color":"#333e4c","border-color":"#333e4c","border-color-danger":"#E02020","border-width":"1px","border-style":"solid","icon-color":"rgba(255,255,255,0.65)","default-icon-color":"rgba(255,255,255,0.65)","normal-icon-filter":`var(--${b}-icon-filter)`,"icon-filter":"invert(0.7) hue-rotate(180deg) brightness(0.5)","icon-filter-opacity":"0.4","close-icon-background":"transparent","group-border-width":"0px","box-shadow-size":"0px","box-shadow":"0px 0px 6px 0px rgba(0,0,0,0.2)","addon-color-pick-background":`var(--${b}-primary-color)`,"addon-color-pick-readonly-background":"rgba(92,104,127, 0.25)","addon-color-pick-border-color":"#ffffff","addon-color-pick-icon-color":"#ffffff","addon-color-pick-dropdown-background":`var(--${b}-background)`,"addon-color-pick-dropdown-border-color":`var(--${b}-border-color)`,"user-dropdown-icon-color":`var(--${b}-text-color)`,"tag-select-background":"rgba(255,255,255,0.1)","spin-background":"rgba(31,41,53,0.7)","gemini-mini-icon-color":"rgba(3,93,255, 0.2)"},Se={"primary-color-rgb":"3, 93, 255","primary-color":"#035DFF","primary-color-hover":"#3F84FF","primary-color-focus":"#3F84FF","primary-color-active":"#024CDE","primary-color-outline":"#035DFF","success-color":"#6DD400","success-color-hover":"#90DE3D","success-color-focus":"#90DE3D","success-color-active":"#6BBB00","success-color-outline":"#6DD400","warning-color":"#F7B500","warning-color-hover":"#F9C73D","warning-color-focus":"#F9C73D","warning-color-active":"#D99200","warning-color-outline":"#F7B500","info-color":"#8c8c8c","info-color-hover":"#999999","info-color-focus":"#999999","info-color-active":"#666666","info-color-outline":"#8c8c8c","error-color-rgb":"224, 32, 32","error-color":"#E02020","error-color-hover":"#E75555","error-color-focus":"#E75555","error-color-active":"#C51C26","error-color-outline":"#E02020","notification-info":"#035DFF","notification-error":"#FF4D4F","notification-success":"#52C41A","notification-warning":"#FAAD14",background:"#ffffff","body-background":"#F3F7FA","search-background":"#ffffff","header-background":"#ffffff","main-background":"#ffffff","footer-background":"#ffffff","menu-background":"#ffffff","stripe-color":"#f7f8fa","placeholder-color":"rgba(0,0,0,0.25)","hover-background-color":"#F7F8FA","hover-text-color":`var(--${b}-text-color-secondary)`,"selected-background-color":"#EBF2FF","selected-text-color":`var(--${b}-primary-color)`,"font-family":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol','Noto Color Emoji';","text-color":"rgba(0,0,0,0.85)","text-color-rgb":"38, 38, 38","text-color-secondary":"rgba(0,0,0,0.65)","text-color-three":"rgba(0,0,0,0.45)","font-weight-thick":`var(--${b}-font-weight-bold)`,"font-weight":"400","font-weight-lighter":"lighter","font-weight-bold":"bold","font-weight-bolder":"bolder","readonly-color":"rgba(0,0,0,0.85)","readonly-bg":"#F7F7F7","readonly-active-bg":"#F7F7F7","readonly-border-color":"rgba(217,217,217,1)","disabled-color":"rgba(0, 0, 0, 0.45)","disabled-bg":"#F7F7F7","disabled-active-bg":"#F7F7F7","disabled-border-color":"rgba(217,217,217,1)","border-color":"#e3e7ee","border-color-danger":"#E02020","border-width":"1px","border-style":"solid","icon-color":"rgba(0, 0, 0, 0.45)","default-icon-color":"rgba(0, 0, 0, 0.45)","normal-icon-filter":"","icon-filter":"invert(0.7) hue-rotate(180deg) brightness(0.5)","icon-filter-opacity":"0.2","close-icon-background":"transparent","group-border-width":"1px","box-shadow-size":"6px","box-shadow":"rgba(136, 156, 176, 0.1) 0px 2px 4px 0px","addon-color-pick-background":"#ffffff","addon-color-pick-readonly-background":`var(--${b}-disabled-bg)`,"addon-color-pick-border-color":`var(--${b}-border-color)`,"addon-color-pick-icon-color":"#909399","addon-color-pick-dropdown-background":"#ffffff","addon-color-pick-dropdown-border-color":"#e4e7ed","user-dropdown-icon-color":"rgba(0, 0, 0, 0.45)","tag-select-background":"#f1f1f1","spin-background":"","gemini-mini-icon-color":"#cfe1ff"},Ne="menu",Ve=()=>$e(),xe="modal",Ie={color:"rgba(0, 0, 0, 0.85)","width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},Me="multi-tabs",Ae={background:"#e9e9e9",color:`var(--${b}-text-color-secondary)`,"active-color":`var(--${b}-primary-color)`,"active-font-weight":500,"active-background":"#ffffff","icon-color":"rgba(0, 0, 0, 0.3)","hover-background-color":"#f6f6f6","background-color-inline":"#ffffff","color-inline":`var(--${b}-text-color)`,"active-color-inline":`var(--${b}-primary-color)`,"active-background-color-inline":`var(--${b}-body-background)`,"hover-background-color-inline":`var(--${b}-body-background)`,"background-color-theme1":"#f6f6f6","background-color-active-theme1":"#ffffff","border-color-theme1":"#e2e6e9","background-color-theme1-inline":"#ffffff","background-color-active-theme1-inline":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme1-inline":`var(--${b}-primary-color)`,"icon-color-active-theme1-inline":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme2":"#ffffff","border-color-theme2":"#e2e6e9","background-color-theme3":"#f6f6f6","background-color-active-theme3":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme3":`var(--${b}-primary-color)`,"icon-color-active-theme3":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme3-inline":"#ffffff","background-color-theme4-inline":"#ffffff","background-color-active-theme4-inline":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme4-inline":`var(--${b}-primary-color)`,"icon-color-active-theme4-inline":`var(--${b}-multi-tabs-icon-color)`},Fe="pagination",Le={background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"text-color":`var(--${b}-text-color)`,"background-active":`var(--${b}-primary-color)`,"border-color-active":`var(--${b}-border-color)`,"text-color-active":"#fff","background-hover":`var(--${b}-primary-color-hover)`,"border-color-hover":`var(--${b}-border-color)`,"text-color-hover":"#fff"},Re="popconfirm",Be={background:"var(--oio-background)",color:"var(--oio-text-color)",borderColor:"var(--oio-border-color)",arrowBackground:"ar(--oio-background)"},_e="rich-text",We={"textarea-bg-color":`var(--${b}-background)`,"textarea-color":`var(--${b}-text-color)`,"textarea-border-color":`var(--${b}-border-color)`,"textarea-slight-border-color":`var(--${b}-border-color)`,"textarea-slight-color":`var(--${b}-text-color)`,"textarea-slight-bg-color":`var(--${b}-body-background)`,"textarea-selected-border-color":"#b4d5ff","textarea-handler-bg-color":"#4290f7","toolbar-color":`var(--${b}-select-dropdown-color)`,"toolbar-bg-color":`var(--${b}-select-dropdown-background)`,"toolbar-active-color":`var(--${b}-select-dropdown-selected-color)`,"toolbar-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-color-active-bg-color":`var(--${b}-primary-color)`,"toolbar-disabled-color":`var(--${b}-disabled-color)`,"toolbar-border-color":`var(--${b}-border-color)`,"modal-button-bg-color":"#fafafa","modal-button-border-color":"#d9d9d9","button-tooltip-bg-color":"#333","button-tooltip-color":"#fff"},Pe="scrollbar",ze={"thumb-background-color":"#d9d9d9","thumb-background-color-hover":"#cccccc"},Ge="select",Ue=`${b}-${Ge}`,Ke={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","counter-font-size":`var(--${b}-font-size-sm)`,"background-hover":`var(--${Ue}-background)`,"border-width-hover":`var(--${Ue}-border-width)`,"border-style-hover":`var(--${Ue}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Ue}-border-radius)`,"outline-hover":`var(--${Ue}-outline)`,"shadow-hover":`var(--${Ue}-shadow)`,"text-color-hover":`var(--${Ue}-text-color)`,"background-focus":`var(--${Ue}-background)`,"border-width-focus":`var(--${Ue}-border-width)`,"border-style-focus":`var(--${Ue}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${Ue}-border-radius)`,"outline-focus":`var(--${Ue}-outline)`,"shadow-focus":"0px 0px 0px 2px rgba(3,93,255,0.1);","text-color-focus":`var(--${Ue}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"item-readonly-bg":`var(--${b}-primary-color-rgb)`,"item-readonly-color":`var(--${b}-primary-color)`,"item-readonly-radius":`var(--${b}-border-radius)`,"dropdown-background":"#fff","dropdown-selected-color":"var(--oio-primary-color)","dropdown-color":"var(--oio-text-color-secondary)","dropdown-selected":"rgba(var(--oio-primary-color-rgb), 0.1)","dropdown-hover-color":"var(--oio-text-color-secondary)","dropdown-hover-background":"rgba(var(--oio-primary-color-rgb), 0.1)","dropdown-box-shadow":"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 9px 28px 8px rgba(0, 0, 0, 0.05)"},qe="switch",He={background:"rgba(0, 0, 0, 0.25)"},Ye="table",Qe={"thead-bg":"#f7f8fa","body-bg":"#ffffff","text-color":"rgba(0, 0, 0, 0.65)","title-color":"rgba(0, 0, 0, 0.85)","title-font-weight":500,"title-sort-icon-size":"11px","tr-height":`var(--${b}-height-lg)`,"tr-stripe-bg":"#fafafa","tr-checked-bg":`rgba(var(--${b}-primary-color-rgb), 0.1)`,"tr-hover-bg":`rgba(var(--${b}-primary-color-rgb), 0.1)`,"row-border":"rgba(243, 243, 243, 1)","row-body-border":"#e8eaec",config:{border:"full",stripe:!0,isCurrent:!0,isHover:!0}},Je="tabs",Xe={"card-tab-background":"#f7f8fa","card-tab-active-background":"var(--oio-background)","active-text-color":"var(--oio-primary-color)"},Ze="textarea",et=`${b}-${Ze}`,tt={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${et}-background)`,"border-width-hover":`var(--${et}-border-width)`,"border-style-hover":`var(--${et}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${et}-border-radius)`,"outline-hover":`var(--${et}-outline)`,"shadow-hover":`var(--${et}-shadow)`,"text-color-hover":`var(--${et}-text-color)`,"background-focus":`var(--${et}-background)`,"border-width-focus":`var(--${et}-border-width)`,"border-style-focus":`var(--${et}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${et}-border-radius)`,"outline-focus":`var(--${et}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${et}-text-color)`},ot="transfer",it={"background-color":"#f7f7f7","header-border-color":"#e3e7ee"},nt="tree-select",rt="upload",at=`${b}-${rt}`,lt={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":"dashed","border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${at}-background)`,"border-width-hover":`var(--${at}-border-width)`,"border-style-hover":`var(--${at}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${at}-border-radius)`,"outline-hover":`var(--${at}-outline)`,"shadow-hover":`var(--${at}-shadow)`,"text-color-hover":`var(--${at}-text-color)`,"background-focus":`var(--${at}-background)`,"border-width-focus":`var(--${at}-border-width)`,"border-style-focus":`var(--${at}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${at}-border-radius)`,"outline-focus":`var(--${at}-outline)`,"shadow-focus":`var(--${at}-shadow)`,"text-color-focus":`var(--${at}-text-color)`},st="card",ct={"action-background":`var(--${b}-background)`,"action-border-color":`var(--${b}-border-color)`,"action-divider-color":`var(--${b}-border-color)`,"action-text-color":`var(--${b}-primary-color)`},dt=()=>({[Me]:{large:Object.assign({},Ae),medium:Object.assign({},Ae),small:Object.assign({},Ae)},[R]:{large:te,medium:te,small:te},[ge]:{large:Object.assign(Object.assign({},me),m),medium:Object.assign(Object.assign({},me),y),small:Object.assign(Object.assign({},me),y)},[oe]:{large:Object.assign({},ie),medium:Object.assign({},ie),small:Object.assign({},ie)},[ne]:{large:Object.assign({},re),medium:Object.assign({},re),small:Object.assign({},re)},[qe]:{large:Object.assign({},He),medium:Object.assign({},He),small:Object.assign({},He)},[Fe]:{large:Object.assign(Object.assign({},Le),C),medium:Object.assign(Object.assign({},Le),D),small:Object.assign(Object.assign({},Le),T)},[Ge]:{large:Object.assign(Object.assign({},Ke),$),medium:Object.assign(Object.assign({},Ke),E),small:Object.assign(Object.assign({},Ke),S)},[Ze]:{large:tt,medium:tt,small:tt},[rt]:{large:lt,medium:lt,small:lt},[Ne]:{large:Object.assign(Object.assign({},Ve()),w),medium:Object.assign(Object.assign({},Ve()),j),small:Object.assign(Object.assign({},Ve()),k)},[F]:{large:L,medium:L,small:L},[Ye]:{large:Object.assign(Object.assign({},Qe),h),medium:Object.assign(Object.assign({},Qe),f),small:Object.assign(Object.assign({},Qe),O)},[pe]:{large:be,medium:be,small:be},[xe]:{large:Ie,medium:Ie,small:Ie},[Re]:{large:Be,medium:Be,small:Be},[nt]:{large:N,medium:V,small:x},[ot]:{large:it,medium:it,small:it},[Pe]:{large:ze,medium:ze,small:ze},[ae]:{large:le,medium:le,small:le},[se]:{large:ce,medium:ce,small:ce},[de]:{large:ue,medium:ue,small:ue},[_e]:{large:We,medium:We,small:We},[Je]:{large:Object.assign(Object.assign({},I),Xe),medium:Object.assign(Object.assign({},M),Xe),small:Object.assign(Object.assign({},A),Xe)},[st]:{large:ct,medium:ct,small:ct}});function ut(e){return function(t,o){Object.entries(o).forEach(([o,i])=>{e[`${t}-${o}`]=i})}}function pt(e){const t="large"===e?l:"medium"===e?s:c,o=Object.assign(Object.assign({},we),t),i=ut(o),r=dt();Object.entries(r).forEach(([t,o])=>{o[e]&&i(t,o[e])}),n("default-"+e,o)}function bt(){pt("large"),pt("medium"),pt("small")}const gt="app-switch",vt={"background-color":`var(--${b}-primary-color)`,"border-color":"none","app-name-overflow":"unset","app-name-margin-right":"8px","app-name-caret-down-display":"unset","logo-color":`var(--${b}-primary-color)`,"designer-background-color":`var(--${b}-primary-color)`,"designer-logo-color":`var(--${b}-primary-color)`},mt="button",yt=`${b}-${mt}`,ht={"default-danger-background":`var(--${yt}-background)`,"default-danger-border-width":`var(--${yt}-border-width)`,"default-danger-border-style":`var(--${yt}-border-style)`,"default-danger-border-color":`var(--${b}-error-color)`,"default-danger-border-radius":`var(--${yt}-border-radius)`,"default-danger-outline":`var(--${b}-error-color-outline)`,"default-danger-shadow":"none","default-danger-text-color":`var(--${b}-error-color)`,"default-danger-background-active":`var(--${yt}-default-danger-background)`,"default-danger-border-width-active":`var(--${yt}-default-danger-border-width)`,"default-danger-border-style-active":`var(--${yt}-default-danger-border-style)`,"default-danger-border-color-active":`var(--${b}-error-color-active)`,"default-danger-border-radius-active":`var(--${yt}-default-danger-border-radius)`,"default-danger-outline-active":`var(--${yt}-default-danger-outline)`,"default-danger-shadow-active":`var(--${yt}-default-danger-shadow)`,"default-danger-text-color-active":`var(--${b}-error-color-active)`,"default-danger-background-focus":`var(--${yt}-default-danger-background)`,"default-danger-border-width-focus":`var(--${yt}-default-danger-border-width)`,"default-danger-border-style-focus":`var(--${yt}-default-danger-border-style)`,"default-danger-border-color-focus":`var(--${b}-error-color-focus)`,"default-danger-border-radius-focus":`var(--${yt}-default-danger-border-radius)`,"default-danger-outline-focus":`var(--${yt}-default-danger-outline)`,"default-danger-shadow-focus":`var(--${yt}-default-danger-shadow)`,"default-danger-text-color-focus":`var(--${b}-error-color-focus)`,"default-danger-background-hover":`var(--${yt}-default-danger-background)`,"default-danger-border-width-hover":`var(--${yt}-default-danger-border-width)`,"default-danger-border-style-hover":`var(--${yt}-default-danger-border-style)`,"default-danger-border-color-hover":`var(--${b}-error-color-hover)`,"default-danger-border-radius-hover":`var(--${yt}-default-danger-border-radius)`,"default-danger-outline-hover":`var(--${yt}-default-danger-outline)`,"default-danger-shadow-hover":`var(--${yt}-default-danger-shadow)`,"default-danger-text-color-hover":`var(--${b}-error-color-hover)`,"default-danger-background-visited":`var(--${yt}-default-danger-background)`,"default-danger-border-width-visited":`var(--${yt}-default-danger-border-width)`,"default-danger-border-style-visited":`var(--${yt}-default-danger-border-style)`,"default-danger-border-color-visited":`var(--${yt}-default-danger-border-color)`,"default-danger-border-radius-visited":`var(--${yt}-default-danger-border-radius)`,"default-danger-outline-visited":`var(--${yt}-default-danger-outline)`,"default-danger-shadow-visited":`var(--${yt}-default-danger-shadow)`,"default-danger-text-color-visited":`var(--${yt}-default-danger-text-color)`},ft={"primary-danger-background":`var(--${b}-error-color)`,"primary-danger-border-width":`var(--${yt}-primary-border-width)`,"primary-danger-border-style":`var(--${yt}-primary-border-style)`,"primary-danger-border-color":`var(--${b}-error-color)`,"primary-danger-border-radius":`var(--${yt}-primary-border-radius)`,"primary-danger-outline":`var(--${b}-error-color)`,"primary-danger-shadow":"none","primary-danger-text-color":"#ffffff","primary-danger-background-active":`var(--${b}-error-color-active)`,"primary-danger-border-width-active":`var(--${yt}-primary-danger-border-width)`,"primary-danger-border-style-active":`var(--${yt}-primary-danger-border-style)`,"primary-danger-border-color-active":`var(--${b}-error-color-active)`,"primary-danger-border-radius-active":`var(--${yt}-primary-danger-border-radius)`,"primary-danger-outline-active":`var(--${yt}-primary-danger-outline)`,"primary-danger-shadow-active":`var(--${yt}-primary-danger-shadow)`,"primary-danger-text-color-active":`var(--${yt}-primary-danger-text-color)`,"primary-danger-background-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-width-focus":`var(--${yt}-primary-danger-border-width)`,"primary-danger-border-style-focus":`var(--${yt}-primary-danger-border-style)`,"primary-danger-border-color-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-radius-focus":`var(--${yt}-primary-danger-border-radius)`,"primary-danger-outline-focus":`var(--${yt}-primary-danger-outline)`,"primary-danger-shadow-focus":`var(--${yt}-primary-danger-shadow)`,"primary-danger-text-color-focus":`var(--${yt}-primary-danger-text-color)`,"primary-danger-background-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-width-hover":`var(--${yt}-primary-danger-border-width)`,"primary-danger-border-style-hover":`var(--${yt}-primary-danger-border-style)`,"primary-danger-border-color-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-radius-hover":`var(--${yt}-primary-danger-border-radius)`,"primary-danger-outline-hover":`var(--${yt}-primary-danger-outline)`,"primary-danger-shadow-hover":`var(--${yt}-primary-danger-shadow)`,"primary-danger-text-color-hover":`var(--${yt}-primary-danger-text-color)`,"primary-danger-background-visited":`var(--${yt}-primary-danger-background)`,"primary-danger-border-width-visited":`var(--${yt}-primary-danger-border-width)`,"primary-danger-border-style-visited":`var(--${yt}-primary-danger-border-style)`,"primary-danger-border-color-visited":`var(--${yt}-primary-danger-border-color)`,"primary-danger-border-radius-visited":`var(--${yt}-primary-danger-border-radius)`,"primary-danger-outline-visited":`var(--${yt}-primary-danger-outline)`,"primary-danger-shadow-visited":`var(--${yt}-primary-danger-shadow)`,"primary-danger-text-color-visited":`var(--${yt}-primary-danger-text-color)`},Ot={"link-danger-background":`var(--${yt}-link-background)`,"link-danger-border-width":`var(--${yt}-link-border-width)`,"link-danger-border-style":`var(--${yt}-link-border-style)`,"link-danger-border-color":`var(--${yt}-link-border-color)`,"link-danger-border-radius":`var(--${yt}-link-border-radius)`,"link-danger-outline":"none","link-danger-shadow":"none","link-danger-text-color":`var(--${b}-error-color)`,"link-danger-background-active":`var(--${yt}-link-danger-color)`,"link-danger-border-width-active":`var(--${yt}-link-danger-border-width)`,"link-danger-border-style-active":`var(--${yt}-link-danger-border-style)`,"link-danger-border-color-active":`var(--${yt}-link-danger-color)`,"link-danger-border-radius-active":`var(--${yt}-link-danger-border-radius)`,"link-danger-outline-active":`var(--${yt}-link-danger-outline)`,"link-danger-shadow-active":`var(--${yt}-link-danger-shadow)`,"link-danger-text-color-active":`var(--${b}-error-color-active)`,"link-danger-background-focus":`var(--${yt}-link-danger-color)`,"link-danger-border-width-focus":`var(--${yt}-link-danger-border-width)`,"link-danger-border-style-focus":`var(--${yt}-link-danger-border-style)`,"link-danger-border-color-focus":`var(--${yt}-link-danger-color)`,"link-danger-border-radius-focus":`var(--${yt}-link-danger-border-radius)`,"link-danger-outline-focus":`var(--${yt}-link-danger-outline)`,"link-danger-shadow-focus":`var(--${yt}-link-danger-shadow)`,"link-danger-text-color-focus":`var(--${b}-error-color-focus)`,"link-danger-background-hover":`var(--${yt}-link-danger-color)`,"link-danger-border-width-hover":`var(--${yt}-link-danger-border-width)`,"link-danger-border-style-hover":`var(--${yt}-link-danger-border-style)`,"link-danger-border-color-hover":`var(--${yt}-link-danger-color)`,"link-danger-border-radius-hover":`var(--${yt}-link-danger-border-radius)`,"link-danger-outline-hover":`var(--${yt}-link-danger-outline)`,"link-danger-shadow-hover":`var(--${yt}-link-danger-shadow)`,"link-danger-text-color-hover":`var(--${b}-error-color-hover)`,"link-danger-background-visited":`var(--${yt}-link-danger-background)`,"link-danger-border-width-visited":`var(--${yt}-link-danger-border-width)`,"link-danger-border-style-visited":`var(--${yt}-link-danger-border-style)`,"link-danger-border-color-visited":`var(--${yt}-link-danger-border-color)`,"link-danger-border-radius-visited":`var(--${yt}-link-danger-border-radius)`,"link-danger-outline-visited":`var(--${yt}-link-danger-outline)`,"link-danger-shadow-visited":`var(--${yt}-link-danger-shadow)`,"link-danger-text-color-visited":`var(--${yt}-link-danger-text-color)`},wt={"default-info-background":`var(--${yt}-background)`,"default-info-border-width":`var(--${yt}-border-width)`,"default-info-border-style":`var(--${yt}-border-style)`,"default-info-border-color":`var(--${b}-info-color)`,"default-info-border-radius":`var(--${yt}-border-radius)`,"default-info-outline":"none","default-info-shadow":"none","default-info-text-color":`var(--${b}-info-color)`,"default-info-background-active":`var(--${yt}-default-info-background)`,"default-info-border-width-active":`var(--${yt}-default-info-border-width)`,"default-info-border-style-active":`var(--${yt}-default-info-border-style)`,"default-info-border-color-active":`var(--${b}-info-color-active)`,"default-info-border-radius-active":`var(--${yt}-default-info-border-radius)`,"default-info-outline-active":`var(--${yt}-default-info-outline)`,"default-info-shadow-active":`var(--${yt}-default-info-shadow)`,"default-info-text-color-active":`var(--${b}-info-color-active)`,"default-info-background-focus":`var(--${yt}-default-info-background)`,"default-info-border-width-focus":`var(--${yt}-default-info-border-width)`,"default-info-border-style-focus":`var(--${yt}-default-info-border-style)`,"default-info-border-color-focus":`var(--${b}-info-color-focus)`,"default-info-border-radius-focus":`var(--${yt}-default-info-border-radius)`,"default-info-outline-focus":`var(--${yt}-default-info-outline)`,"default-info-shadow-focus":`var(--${yt}-default-info-shadow)`,"default-info-text-color-focus":`var(--${b}-info-color-focus)`,"default-info-background-hover":`var(--${yt}-default-info-background)`,"default-info-border-width-hover":`var(--${yt}-default-info-border-width)`,"default-info-border-style-hover":`var(--${yt}-default-info-border-style)`,"default-info-border-color-hover":`var(--${b}-info-color-hover)`,"default-info-border-radius-hover":`var(--${yt}-default-info-border-radius)`,"default-info-outline-hover":`var(--${yt}-default-info-outline)`,"default-info-shadow-hover":`var(--${yt}-default-info-shadow)`,"default-info-text-color-hover":`var(--${b}-info-color-hover)`,"default-info-background-visited":`var(--${yt}-default-info-background)`,"default-info-border-width-visited":`var(--${yt}-default-info-border-width)`,"default-info-border-style-visited":`var(--${yt}-default-info-border-style)`,"default-info-border-color-visited":`var(--${yt}-default-info-border-color)`,"default-info-border-radius-visited":`var(--${yt}-default-info-border-radius)`,"default-info-outline-visited":`var(--${yt}-default-info-outline)`,"default-info-shadow-visited":`var(--${yt}-default-info-shadow)`,"default-info-text-color-visited":`var(--${yt}-default-info-text-color)`},jt={"primary-info-background":`var(--${b}-info-color)`,"primary-info-border-width":`var(--${yt}-primary-border-width)`,"primary-info-border-style":`var(--${yt}-primary-border-style)`,"primary-info-border-color":`var(--${b}-info-color)`,"primary-info-border-radius":`var(--${yt}-primary-border-radius)`,"primary-info-outline":"none","primary-info-shadow":"none","primary-info-text-color":"#ffffff","primary-info-background-active":`var(--${b}-info-color-active)`,"primary-info-border-width-active":`var(--${yt}-primary-info-border-width)`,"primary-info-border-style-active":`var(--${yt}-primary-info-border-style)`,"primary-info-border-color-active":`var(--${b}-info-color-active)`,"primary-info-border-radius-active":`var(--${yt}-primary-info-border-radius)`,"primary-info-outline-active":`var(--${yt}-primary-info-outline)`,"primary-info-shadow-active":`var(--${yt}-primary-info-shadow)`,"primary-info-text-color-active":`var(--${yt}-primary-info-text-color)`,"primary-info-background-focus":`var(--${b}-info-color-focus)`,"primary-info-border-width-focus":`var(--${yt}-primary-info-border-width)`,"primary-info-border-style-focus":`var(--${yt}-primary-info-border-style)`,"primary-info-border-color-focus":`var(--${b}-info-color-focus)`,"primary-info-border-radius-focus":`var(--${yt}-primary-info-border-radius)`,"primary-info-outline-focus":`var(--${yt}-primary-info-outline)`,"primary-info-shadow-focus":`var(--${yt}-primary-info-shadow)`,"primary-info-text-color-focus":`var(--${yt}-primary-info-text-color)`,"primary-info-background-hover":`var(--${b}-info-color-hover)`,"primary-info-border-width-hover":`var(--${yt}-primary-info-border-width)`,"primary-info-border-style-hover":`var(--${yt}-primary-info-border-style)`,"primary-info-border-color-hover":`var(--${b}-info-color-hover)`,"primary-info-border-radius-hover":`var(--${yt}-primary-info-border-radius)`,"primary-info-outline-hover":`var(--${yt}-primary-info-outline)`,"primary-info-shadow-hover":`var(--${yt}-primary-info-shadow)`,"primary-info-text-color-hover":`var(--${yt}-primary-info-text-color)`,"primary-info-background-visited":`var(--${yt}-primary-info-background)`,"primary-info-border-width-visited":`var(--${yt}-primary-info-border-width)`,"primary-info-border-style-visited":`var(--${yt}-primary-info-border-style)`,"primary-info-border-color-visited":`var(--${yt}-primary-info-border-color)`,"primary-info-border-radius-visited":`var(--${yt}-primary-info-border-radius)`,"primary-info-outline-visited":`var(--${yt}-primary-info-outline)`,"primary-info-shadow-visited":`var(--${yt}-primary-info-shadow)`,"primary-info-text-color-visited":`var(--${yt}-primary-info-text-color)`},kt={"link-info-background":`var(--${yt}-link-background)`,"link-info-border-width":`var(--${yt}-link-border-width)`,"link-info-border-style":`var(--${yt}-link-border-style)`,"link-info-border-color":`var(--${yt}-link-border-color)`,"link-info-border-radius":`var(--${yt}-link-border-radius)`,"link-info-outline":"none","link-info-shadow":"none","link-info-text-color":`var(--${b}-info-color)`,"link-info-background-active":`var(--${yt}-link-info-color)`,"link-info-border-width-active":`var(--${yt}-link-info-border-width)`,"link-info-border-style-active":`var(--${yt}-link-info-border-style)`,"link-info-border-color-active":`var(--${yt}-link-info-color)`,"link-info-border-radius-active":`var(--${yt}-link-info-border-radius)`,"link-info-outline-active":`var(--${yt}-link-info-outline)`,"link-info-shadow-active":`var(--${yt}-link-info-shadow)`,"link-info-text-color-active":`var(--${b}-info-color-active)`,"link-info-background-focus":`var(--${yt}-link-info-color)`,"link-info-border-width-focus":`var(--${yt}-link-info-border-width)`,"link-info-border-style-focus":`var(--${yt}-link-info-border-style)`,"link-info-border-color-focus":`var(--${yt}-link-info-color)`,"link-info-border-radius-focus":`var(--${yt}-link-info-border-radius)`,"link-info-outline-focus":`var(--${yt}-link-info-outline)`,"link-info-shadow-focus":`var(--${yt}-link-info-shadow)`,"link-info-text-color-focus":`var(--${b}-info-color-focus)`,"link-info-background-hover":`var(--${yt}-link-info-color)`,"link-info-border-width-hover":`var(--${yt}-link-info-border-width)`,"link-info-border-style-hover":`var(--${yt}-link-info-border-style)`,"link-info-border-color-hover":`var(--${yt}-link-info-color)`,"link-info-border-radius-hover":`var(--${yt}-link-info-border-radius)`,"link-info-outline-hover":`var(--${yt}-link-info-outline)`,"link-info-shadow-hover":`var(--${yt}-link-info-shadow)`,"link-info-text-color-hover":`var(--${b}-info-color-hover)`,"link-info-background-visited":`var(--${yt}-link-info-background)`,"link-info-border-width-visited":`var(--${yt}-link-info-border-width)`,"link-info-border-style-visited":`var(--${yt}-link-info-border-style)`,"link-info-border-color-visited":`var(--${yt}-link-info-border-color)`,"link-info-border-radius-visited":`var(--${yt}-link-info-border-radius)`,"link-info-outline-visited":`var(--${yt}-link-info-outline)`,"link-info-shadow-visited":`var(--${yt}-link-info-shadow)`,"link-info-text-color-visited":`var(--${yt}-link-info-text-color)`},Ct={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":"#d9d9d9","border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-active":`var(--${yt}-background)`,"border-width-active":`var(--${yt}-border-width)`,"border-style-active":`var(--${yt}-border-style)`,"border-color-active":`var(--${yt}-border-color)`,"border-radius-active":`var(--${yt}-border-radius)`,"outline-active":`var(--${yt}-outline)`,"shadow-active":`var(--${yt}-shadow)`,"text-color-active":`var(--${b}-primary-color-active)`,"background-focus":`var(--${yt}-background)`,"border-width-focus":`var(--${yt}-border-width)`,"border-style-focus":`var(--${yt}-border-style)`,"border-color-focus":`var(--${yt}-border-color)`,"border-radius-focus":`var(--${yt}-border-radius)`,"outline-focus":`var(--${yt}-outline)`,"shadow-focus":`var(--${yt}-shadow)`,"text-color-focus":`var(--${b}-primary-color-focus)`,"background-hover":`var(--${yt}-background)`,"border-width-hover":`var(--${yt}-border-width)`,"border-style-hover":`var(--${yt}-border-style)`,"border-color-hover":`var(--${yt}-border-color)`,"border-radius-hover":`var(--${yt}-border-radius)`,"outline-hover":`var(--${yt}-outline)`,"shadow-hover":`var(--${yt}-shadow)`,"text-color-hover":`var(--${b}-primary-color-hover)`,"background-visited":`var(--${yt}-background)`,"border-width-visited":`var(--${yt}-border-width)`,"border-style-visited":`var(--${yt}-border-style)`,"border-color-visited":`var(--${yt}-border-color)`,"border-radius-visited":`var(--${yt}-border-radius)`,"outline-visited":`var(--${yt}-outline)`,"shadow-visited":`var(--${yt}-shadow)`,"text-color-visited":`var(--${yt}-text-color)`},Dt={"primary-background":`var(--${b}-primary-color)`,"primary-border-width":`var(--${b}-border-width)`,"primary-border-style":`var(--${b}-border-style)`,"primary-border-color":`var(--${b}-primary-color)`,"primary-border-radius":`var(--${b}-border-radius)`,"primary-outline":`var(--${b}-primary-color-outline)`,"primary-shadow":"none","primary-text-color":"#ffffff","primary-background-active":`var(--${b}-primary-color-active)`,"primary-border-width-active":`var(--${yt}-primary-border-width)`,"primary-border-style-active":`var(--${yt}-primary-border-style)`,"primary-border-color-active":`var(--${b}-primary-color-active)`,"primary-border-radius-active":`var(--${yt}-primary-border-radius)`,"primary-outline-active":`var(--${yt}-primary-outline)`,"primary-shadow-active":`var(--${yt}-primary-shadow)`,"primary-text-color-active":`var(--${yt}-primary-text-color)`,"primary-background-focus":`var(--${b}-primary-color-focus)`,"primary-border-width-focus":`var(--${yt}-primary-border-width)`,"primary-border-style-focus":`var(--${yt}-primary-border-style)`,"primary-border-color-focus":`var(--${b}-primary-color-focus)`,"primary-border-radius-focus":`var(--${yt}-primary-border-radius)`,"primary-outline-focus":`var(--${yt}-primary-outline)`,"primary-shadow-focus":`var(--${yt}-primary-shadow)`,"primary-text-color-focus":`var(--${yt}-primary-text-color)`,"primary-background-hover":`var(--${b}-primary-color-hover)`,"primary-border-width-hover":`var(--${yt}-primary-border-width)`,"primary-border-style-hover":`var(--${yt}-primary-border-style)`,"primary-border-color-hover":`var(--${b}-primary-color-hover)`,"primary-border-radius-hover":`var(--${yt}-primary-border-radius)`,"primary-outline-hover":`var(--${yt}-primary-outline)`,"primary-shadow-hover":`var(--${yt}-primary-shadow)`,"primary-text-color-hover":`var(--${yt}-primary-text-color)`,"primary-background-visited":`var(--${yt}-primary-background)`,"primary-border-width-visited":`var(--${yt}-primary-border-width)`,"primary-border-style-visited":`var(--${yt}-primary-border-style)`,"primary-border-color-visited":`var(--${yt}-primary-border-color)`,"primary-border-radius-visited":`var(--${yt}-primary-border-radius)`,"primary-outline-visited":`var(--${yt}-primary-outline)`,"primary-shadow-visited":`var(--${yt}-primary-shadow)`,"primary-text-color-visited":`var(--${yt}-primary-text-color)`},Tt={"link-background":"transparent","link-border-width":"none","link-border-style":"none","link-border-color":"none","link-border-radius":"none","link-outline":"none","link-shadow":"none","link-text-color":`var(--${b}-primary-color)`,"link-background-active":`var(--${yt}-link-background)`,"link-border-width-active":`var(--${yt}-link-border-width)`,"link-border-style-active":`var(--${yt}-link-border-style)`,"link-border-color-active":`var(--${yt}-link-border-color)`,"link-border-radius-active":`var(--${yt}-link-border-radius)`,"link-outline-active":`var(--${yt}-link-outline)`,"link-shadow-active":`var(--${yt}-link-shadow)`,"link-text-color-active":`var(--${yt}-link-text-color)`,"link-background-focus":`var(--${yt}-link-background)`,"link-border-width-focus":`var(--${yt}-link-border-width)`,"link-border-style-focus":`var(--${yt}-link-border-style)`,"link-border-color-focus":`var(--${yt}-link-border-color)`,"link-border-radius-focus":`var(--${yt}-link-border-radius)`,"link-outline-focus":`var(--${yt}-link-outline)`,"link-shadow-focus":`var(--${yt}-link-shadow)`,"link-text-color-focus":`var(--${yt}-link-text-color)`,"link-background-hover":`var(--${yt}-link-background)`,"link-border-width-hover":`var(--${yt}-link-border-width)`,"link-border-style-hover":`var(--${yt}-link-border-style)`,"link-border-color-hover":`var(--${yt}-link-border-color)`,"link-border-radius-hover":`var(--${yt}-link-border-radius)`,"link-outline-hover":`var(--${yt}-link-outline)`,"link-shadow-hover":`var(--${yt}-link-shadow)`,"link-text-color-hover":`var(--${yt}-link-text-color)`,"link-background-visited":`var(--${yt}-link-background)`,"link-border-width-visited":`var(--${yt}-link-border-width)`,"link-border-style-visited":`var(--${yt}-link-border-style)`,"link-border-color-visited":`var(--${yt}-link-border-color)`,"link-border-radius-visited":`var(--${yt}-link-border-radius)`,"link-outline-visited":`var(--${yt}-link-outline)`,"link-shadow-visited":`var(--${yt}-link-shadow)`,"link-text-color-visited":`var(--${yt}-link-text-color)`},$t={"default-success-background":`var(--${yt}-background)`,"default-success-border-width":`var(--${yt}-border-width)`,"default-success-border-style":`var(--${yt}-border-style)`,"default-success-border-color":`var(--${b}-success-color)`,"default-success-border-radius":`var(--${yt}-border-radius)`,"default-success-outline":"none","default-success-shadow":"none","default-success-text-color":`var(--${b}-success-color)`,"default-success-background-active":`var(--${yt}-default-success-background)`,"default-success-border-width-active":`var(--${yt}-default-success-border-width)`,"default-success-border-style-active":`var(--${yt}-default-success-border-style)`,"default-success-border-color-active":`var(--${b}-success-color-active)`,"default-success-border-radius-active":`var(--${yt}-default-success-border-radius)`,"default-success-outline-active":`var(--${yt}-default-success-outline)`,"default-success-shadow-active":`var(--${yt}-default-success-shadow)`,"default-success-text-color-active":`var(--${b}-success-color-active)`,"default-success-background-focus":`var(--${yt}-default-success-background)`,"default-success-border-width-focus":`var(--${yt}-default-success-border-width)`,"default-success-border-style-focus":`var(--${yt}-default-success-border-style)`,"default-success-border-color-focus":`var(--${b}-success-color-focus)`,"default-success-border-radius-focus":`var(--${yt}-default-success-border-radius)`,"default-success-outline-focus":`var(--${yt}-default-success-outline)`,"default-success-shadow-focus":`var(--${yt}-default-success-shadow)`,"default-success-text-color-focus":`var(--${b}-success-color-focus)`,"default-success-background-hover":`var(--${yt}-default-success-background)`,"default-success-border-width-hover":`var(--${yt}-default-success-border-width)`,"default-success-border-style-hover":`var(--${yt}-default-success-border-style)`,"default-success-border-color-hover":`var(--${b}-success-color-hover)`,"default-success-border-radius-hover":`var(--${yt}-default-success-border-radius)`,"default-success-outline-hover":`var(--${yt}-default-success-outline)`,"default-success-shadow-hover":`var(--${yt}-default-success-shadow)`,"default-success-text-color-hover":`var(--${b}-success-color-hover)`,"default-success-background-visited":`var(--${yt}-default-success-background)`,"default-success-border-width-visited":`var(--${yt}-default-success-border-width)`,"default-success-border-style-visited":`var(--${yt}-default-success-border-style)`,"default-success-border-color-visited":`var(--${yt}-default-success-border-color)`,"default-success-border-radius-visited":`var(--${yt}-default-success-border-radius)`,"default-success-outline-visited":`var(--${yt}-default-success-outline)`,"default-success-shadow-visited":`var(--${yt}-default-success-shadow)`,"default-success-text-color-visited":`var(--${yt}-default-success-text-color)`},Et={"primary-success-background":`var(--${b}-success-color)`,"primary-success-border-width":`var(--${yt}-primary-border-width)`,"primary-success-border-style":`var(--${yt}-primary-border-style)`,"primary-success-border-color":`var(--${b}-success-color)`,"primary-success-border-radius":`var(--${yt}-primary-border-radius)`,"primary-success-outline":"none","primary-success-shadow":"none","primary-success-text-color":"#ffffff","primary-success-background-active":`var(--${b}-success-color-active)`,"primary-success-border-width-active":`var(--${yt}-primary-success-border-width)`,"primary-success-border-style-active":`var(--${yt}-primary-success-border-style)`,"primary-success-border-color-active":`var(--${b}-success-color-active)`,"primary-success-border-radius-active":`var(--${yt}-primary-success-border-radius)`,"primary-success-outline-active":`var(--${yt}-primary-success-outline)`,"primary-success-shadow-active":`var(--${yt}-primary-success-shadow)`,"primary-success-text-color-active":`var(--${yt}-primary-success-text-color)`,"primary-success-background-focus":`var(--${b}-success-color-focus)`,"primary-success-border-width-focus":`var(--${yt}-primary-success-border-width)`,"primary-success-border-style-focus":`var(--${yt}-primary-success-border-style)`,"primary-success-border-color-focus":`var(--${b}-success-color-focus)`,"primary-success-border-radius-focus":`var(--${yt}-primary-success-border-radius)`,"primary-success-outline-focus":`var(--${yt}-primary-success-outline)`,"primary-success-shadow-focus":`var(--${yt}-primary-success-shadow)`,"primary-success-text-color-focus":`var(--${yt}-primary-success-text-color)`,"primary-success-background-hover":`var(--${b}-success-color-hover)`,"primary-success-border-width-hover":`var(--${yt}-primary-success-border-width)`,"primary-success-border-style-hover":`var(--${yt}-primary-success-border-style)`,"primary-success-border-color-hover":`var(--${b}-success-color-hover)`,"primary-success-border-radius-hover":`var(--${yt}-primary-success-border-radius)`,"primary-success-outline-hover":`var(--${yt}-primary-success-outline)`,"primary-success-shadow-hover":`var(--${yt}-primary-success-shadow)`,"primary-success-text-color-hover":`var(--${yt}-primary-success-text-color)`,"primary-success-background-visited":`var(--${yt}-primary-success-background)`,"primary-success-border-width-visited":`var(--${yt}-primary-success-border-width)`,"primary-success-border-style-visited":`var(--${yt}-primary-success-border-style)`,"primary-success-border-color-visited":`var(--${yt}-primary-success-border-color)`,"primary-success-border-radius-visited":`var(--${yt}-primary-success-border-radius)`,"primary-success-outline-visited":`var(--${yt}-primary-success-outline)`,"primary-success-shadow-visited":`var(--${yt}-primary-success-shadow)`,"primary-success-text-color-visited":`var(--${yt}-primary-success-text-color)`},St={"link-success-background":`var(--${yt}-link-background)`,"link-success-border-width":`var(--${yt}-link-border-width)`,"link-success-border-style":`var(--${yt}-link-border-style)`,"link-success-border-color":`var(--${yt}-link-border-color)`,"link-success-border-radius":`var(--${yt}-link-border-radius)`,"link-success-outline":"none","link-success-shadow":"none","link-success-text-color":`var(--${b}-success-color)`,"link-success-background-active":`var(--${yt}-link-success-color)`,"link-success-border-width-active":`var(--${yt}-link-success-border-width)`,"link-success-border-style-active":`var(--${yt}-link-success-border-style)`,"link-success-border-color-active":`var(--${yt}-link-success-color)`,"link-success-border-radius-active":`var(--${yt}-link-success-border-radius)`,"link-success-outline-active":`var(--${yt}-link-success-outline)`,"link-success-shadow-active":`var(--${yt}-link-success-shadow)`,"link-success-text-color-active":`var(--${b}-success-color-active)`,"link-success-background-focus":`var(--${yt}-link-success-color)`,"link-success-border-width-focus":`var(--${yt}-link-success-border-width)`,"link-success-border-style-focus":`var(--${yt}-link-success-border-style)`,"link-success-border-color-focus":`var(--${yt}-link-success-color)`,"link-success-border-radius-focus":`var(--${yt}-link-success-border-radius)`,"link-success-outline-focus":`var(--${yt}-link-success-outline)`,"link-success-shadow-focus":`var(--${yt}-link-success-shadow)`,"link-success-text-color-focus":`var(--${b}-success-color-focus)`,"link-success-background-hover":`var(--${yt}-link-success-color)`,"link-success-border-width-hover":`var(--${yt}-link-success-border-width)`,"link-success-border-style-hover":`var(--${yt}-link-success-border-style)`,"link-success-border-color-hover":`var(--${yt}-link-success-color)`,"link-success-border-radius-hover":`var(--${yt}-link-success-border-radius)`,"link-success-outline-hover":`var(--${yt}-link-success-outline)`,"link-success-shadow-hover":`var(--${yt}-link-success-shadow)`,"link-success-text-color-hover":`var(--${b}-success-color-hover)`,"link-success-background-visited":`var(--${yt}-link-success-background)`,"link-success-border-width-visited":`var(--${yt}-link-success-border-width)`,"link-success-border-style-visited":`var(--${yt}-link-success-border-style)`,"link-success-border-color-visited":`var(--${yt}-link-success-border-color)`,"link-success-border-radius-visited":`var(--${yt}-link-success-border-radius)`,"link-success-outline-visited":`var(--${yt}-link-success-outline)`,"link-success-shadow-visited":`var(--${yt}-link-success-shadow)`,"link-success-text-color-visited":`var(--${yt}-link-success-text-color)`},Nt={"default-warning-background":`var(--${yt}-background)`,"default-warning-border-width":`var(--${yt}-border-width)`,"default-warning-border-style":`var(--${yt}-border-style)`,"default-warning-border-color":`var(--${b}-warning-color)`,"default-warning-border-radius":`var(--${yt}-border-radius)`,"default-warning-outline":"none","default-warning-shadow":"none","default-warning-text-color":`var(--${b}-warning-color)`,"default-warning-background-active":`var(--${yt}-default-warning-background)`,"default-warning-border-width-active":`var(--${yt}-default-warning-border-width)`,"default-warning-border-style-active":`var(--${yt}-default-warning-border-style)`,"default-warning-border-color-active":`var(--${b}-warning-color-active)`,"default-warning-border-radius-active":`var(--${yt}-default-warning-border-radius)`,"default-warning-outline-active":`var(--${yt}-default-warning-outline)`,"default-warning-shadow-active":`var(--${yt}-default-warning-shadow)`,"default-warning-text-color-active":`var(--${b}-warning-color-active)`,"default-warning-background-focus":`var(--${yt}-default-warning-background)`,"default-warning-border-width-focus":`var(--${yt}-default-warning-border-width)`,"default-warning-border-style-focus":`var(--${yt}-default-warning-border-style)`,"default-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-border-radius-focus":`var(--${yt}-default-warning-border-radius)`,"default-warning-outline-focus":`var(--${yt}-default-warning-outline)`,"default-warning-shadow-focus":`var(--${yt}-default-warning-shadow)`,"default-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-background-hover":`var(--${yt}-default-warning-background)`,"default-warning-border-width-hover":`var(--${yt}-default-warning-border-width)`,"default-warning-border-style-hover":`var(--${yt}-default-warning-border-style)`,"default-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-border-radius-hover":`var(--${yt}-default-warning-border-radius)`,"default-warning-outline-hover":`var(--${yt}-default-warning-outline)`,"default-warning-shadow-hover":`var(--${yt}-default-warning-shadow)`,"default-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-background-visited":`var(--${yt}-default-warning-background)`,"default-warning-border-width-visited":`var(--${yt}-default-warning-border-width)`,"default-warning-border-style-visited":`var(--${yt}-default-warning-border-style)`,"default-warning-border-color-visited":`var(--${yt}-default-warning-border-color)`,"default-warning-border-radius-visited":`var(--${yt}-default-warning-border-radius)`,"default-warning-outline-visited":`var(--${yt}-default-warning-outline)`,"default-warning-shadow-visited":`var(--${yt}-default-warning-shadow)`,"default-warning-text-color-visited":`var(--${yt}-default-warning-text-color)`},Vt={"primary-warning-background":`var(--${b}-warning-color)`,"primary-warning-border-width":`var(--${yt}-primary-border-width)`,"primary-warning-border-style":`var(--${yt}-primary-border-style)`,"primary-warning-border-color":`var(--${b}-warning-color)`,"primary-warning-border-radius":`var(--${yt}-primary-border-radius)`,"primary-warning-outline":"none","primary-warning-shadow":"none","primary-warning-text-color":"#ffffff","primary-warning-background-active":`var(--${b}-warning-color-active)`,"primary-warning-border-width-active":`var(--${yt}-primary-warning-border-width)`,"primary-warning-border-style-active":`var(--${yt}-primary-warning-border-style)`,"primary-warning-border-color-active":`var(--${b}-warning-color-active)`,"primary-warning-border-radius-active":`var(--${yt}-primary-warning-border-radius)`,"primary-warning-outline-active":`var(--${yt}-primary-warning-outline)`,"primary-warning-shadow-active":`var(--${yt}-primary-warning-shadow)`,"primary-warning-text-color-active":`var(--${yt}-primary-warning-text-color)`,"primary-warning-background-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-width-focus":`var(--${yt}-primary-warning-border-width)`,"primary-warning-border-style-focus":`var(--${yt}-primary-warning-border-style)`,"primary-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-radius-focus":`var(--${yt}-primary-warning-border-radius)`,"primary-warning-outline-focus":`var(--${yt}-primary-warning-outline)`,"primary-warning-shadow-focus":`var(--${yt}-primary-warning-shadow)`,"primary-warning-text-color-focus":`var(--${yt}-primary-warning-text-color)`,"primary-warning-background-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-width-hover":`var(--${yt}-primary-warning-border-width)`,"primary-warning-border-style-hover":`var(--${yt}-primary-warning-border-style)`,"primary-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-radius-hover":`var(--${yt}-primary-warning-border-radius)`,"primary-warning-outline-hover":`var(--${yt}-primary-warning-outline)`,"primary-warning-shadow-hover":`var(--${yt}-primary-warning-shadow)`,"primary-warning-text-color-hover":`var(--${yt}-primary-warning-text-color)`,"primary-warning-background-visited":`var(--${yt}-primary-warning-background)`,"primary-warning-border-width-visited":`var(--${yt}-primary-warning-border-width)`,"primary-warning-border-style-visited":`var(--${yt}-primary-warning-border-style)`,"primary-warning-border-color-visited":`var(--${yt}-primary-warning-border-color)`,"primary-warning-border-radius-visited":`var(--${yt}-primary-warning-border-radius)`,"primary-warning-outline-visited":`var(--${yt}-primary-warning-outline)`,"primary-warning-shadow-visited":`var(--${yt}-primary-warning-shadow)`,"primary-warning-text-color-visited":`var(--${yt}-primary-warning-text-color)`},xt={"link-warning-background":`var(--${yt}-link-background)`,"link-warning-border-width":`var(--${yt}-link-border-width)`,"link-warning-border-style":`var(--${yt}-link-border-style)`,"link-warning-border-color":`var(--${yt}-link-border-color)`,"link-warning-border-radius":`var(--${yt}-link-border-radius)`,"link-warning-outline":"none","link-warning-shadow":"none","link-warning-text-color":`var(--${b}-warning-color)`,"link-warning-background-active":`var(--${yt}-link-warning-color)`,"link-warning-border-width-active":`var(--${yt}-link-warning-border-width)`,"link-warning-border-style-active":`var(--${yt}-link-warning-border-style)`,"link-warning-border-color-active":`var(--${yt}-link-warning-color)`,"link-warning-border-radius-active":`var(--${yt}-link-warning-border-radius)`,"link-warning-outline-active":`var(--${yt}-link-warning-outline)`,"link-warning-shadow-active":`var(--${yt}-link-warning-shadow)`,"link-warning-text-color-active":`var(--${b}-warning-color-active)`,"link-warning-background-focus":`var(--${yt}-link-warning-color)`,"link-warning-border-width-focus":`var(--${yt}-link-warning-border-width)`,"link-warning-border-style-focus":`var(--${yt}-link-warning-border-style)`,"link-warning-border-color-focus":`var(--${yt}-link-warning-color)`,"link-warning-border-radius-focus":`var(--${yt}-link-warning-border-radius)`,"link-warning-outline-focus":`var(--${yt}-link-warning-outline)`,"link-warning-shadow-focus":`var(--${yt}-link-warning-shadow)`,"link-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"link-warning-background-hover":`var(--${yt}-link-warning-color)`,"link-warning-border-width-hover":`var(--${yt}-link-warning-border-width)`,"link-warning-border-style-hover":`var(--${yt}-link-warning-border-style)`,"link-warning-border-color-hover":`var(--${yt}-link-warning-color)`,"link-warning-border-radius-hover":`var(--${yt}-link-warning-border-radius)`,"link-warning-outline-hover":`var(--${yt}-link-warning-outline)`,"link-warning-shadow-hover":`var(--${yt}-link-warning-shadow)`,"link-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"link-warning-background-visited":`var(--${yt}-link-warning-background)`,"link-warning-border-width-visited":`var(--${yt}-link-warning-border-width)`,"link-warning-border-style-visited":`var(--${yt}-link-warning-border-style)`,"link-warning-border-color-visited":`var(--${yt}-link-warning-border-color)`,"link-warning-border-radius-visited":`var(--${yt}-link-warning-border-radius)`,"link-warning-outline-visited":`var(--${yt}-link-warning-outline)`,"link-warning-shadow-visited":`var(--${yt}-link-warning-shadow)`,"link-warning-text-color-visited":`var(--${yt}-link-warning-text-color)`},It=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ct),ht),wt),$t),Nt),Dt),ft),jt),Et),Vt),Tt),Ot),kt),St),xt),Mt="checkbox",At={color:`var(--${b}-text-color)`,background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"disabled-border-color":`var(--${b}-disabled-border-color)`},Ft="datetime",Lt={padding:"4px 12px","text-color-hover":`var(--${b}-text-color)`,"text-color-active":"#fff","text-color-selected":"#fff","cell-internal-text-color-hover":`var(--${b}-text-color)`,"background-hover":`var(--${b}-hover-background-color)`},Rt="drawer",Bt={"width-small":"20%","width-medium":"40%","width-large":"80%","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},_t="dropdown",Wt={"background-color":"var(--oio-background)","background-hover":`var(--${b}-hover-background-color)`,"border-color":"var(--oio-border-color)","box-shadow":"-2px 2px 6px 0px rgba(136, 156, 176, 0.2)",color:"var(--oio-text-color)","color-hover":`var(--${b}-text-color-secondary)`,"color-disabled":"var(--oio-disabled-color)","color-disabled-hover":"var(--oio-disabled-color)","item-background-color-hover":"var(--oio-hover-background-color)","item-background-color-disabled-hover":"transparent","button-text-color":`var(--${b}-text-color-secondary)`},Pt="form-item",zt={config:{readonlyShowPlaceholder:!1,disabledShowPlaceholder:!1},"label-color":"var(--oio-text-color-secondary)","label-weight":"0"},Gt="header",Ut={"border-bottom":"1px solid rgba(0, 0, 0, 0.06)",color:"rgba(0,0,0,0.65)"},Kt="input",qt=`${b}-${Kt}`,Ht={background:"#ffffff","background-color":"#ffffff","border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","background-hover":`var(--${qt}-background)`,"border-width-hover":`var(--${qt}-border-width)`,"border-style-hover":`var(--${qt}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${qt}-border-radius)`,"outline-hover":`var(--${qt}-outline)`,"shadow-hover":`var(--${qt}-shadow)`,"text-color-hover":`var(--${qt}-text-color)`,"background-focus":`var(--${qt}-background)`,"border-width-focus":`var(--${qt}-border-width)`,"border-style-focus":`var(--${qt}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${qt}-border-radius)`,"outline-focus":`var(--${qt}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${qt}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"error-border-color":"#ff4d4f","disabled-border-color":`var(--${b}-disabled-border-color)`,"addon-background":"#F7F7F7","addon-color":" rgba(0,0,0,0.65)","tag-background":"rgba(3,93,255, 0.1)","ready-delete-tag-background":"rgba(224, 32, 32, 0.1)","ready-delete-tag-color":"#ff4d4f","clear-background":"#fff","clear-color":"rgba(0,0,0,.25)"},Yt="menu",Qt=()=>$e(),Jt="modal",Xt={color:"rgba(0, 0, 0, 0.85)","width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},Zt="multi-tabs",eo={background:"#e9e9e9",color:`var(--${b}-text-color-secondary)`,"active-color":`var(--${b}-primary-color)`,"active-font-weight":500,"active-background":"#ffffff","icon-color":"rgba(0, 0, 0, 0.3)","hover-background-color":"#f6f6f6","background-color-inline":"#ffffff","color-inline":`var(--${b}-text-color)`,"active-color-inline":`var(--${b}-primary-color)`,"active-background-color-inline":`var(--${b}-body-background)`,"hover-background-color-inline":`var(--${b}-body-background)`,"background-color-theme1":"#f6f6f6","background-color-active-theme1":"#ffffff","border-color-theme1":"#e2e6e9","background-color-theme1-inline":"#ffffff","background-color-active-theme1-inline":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme1-inline":`var(--${b}-primary-color)`,"icon-color-active-theme1-inline":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme2":"#ffffff","border-color-theme2":"#e2e6e9","background-color-theme3":"#f6f6f6","background-color-active-theme3":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme3":`var(--${b}-primary-color)`,"icon-color-active-theme3":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme3-inline":"#ffffff","background-color-theme4-inline":"#ffffff","background-color-active-theme4-inline":`rgba(var(--${b}-primary-color-rgb), 0.2)`,"active-color-active-theme4-inline":`var(--${b}-primary-color)`,"icon-color-active-theme4-inline":`var(--${b}-multi-tabs-icon-color)`},to="pagination",oo={background:`var(--${b}-background)`,"border-color":"none","text-color":`var(--${b}-text-color)`,"background-active":"#fff","border-color-active":`var(--${b}-primary-color)`,"text-color-active":`var(--${b}-primary-color)`,"background-hover":`var(--${b}-primary-color-hover)`,"border-color-hover":"#fff","text-color-hover":"#fff"},io="popconfirm",no={background:"var(--oio-background)",color:"var(--oio-text-color)",borderColor:"var(--oio-border-color)",arrowBackground:"ar(--oio-background)"},ro="rich-text",ao={"textarea-bg-color":`var(--${b}-background)`,"textarea-color":`var(--${b}-text-color)`,"textarea-border-color":`var(--${b}-border-color)`,"textarea-slight-border-color":`var(--${b}-border-color)`,"textarea-slight-color":`var(--${b}-text-color)`,"textarea-slight-bg-color":`var(--${b}-body-background)`,"textarea-selected-border-color":"#b4d5ff","textarea-handler-bg-color":"#4290f7","toolbar-color":`var(--${b}-select-dropdown-color)`,"toolbar-bg-color":`var(--${b}-select-dropdown-background)`,"toolbar-active-color":`var(--${b}-select-dropdown-selected-color)`,"toolbar-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-color-active-bg-color":`var(--${b}-primary-color)`,"toolbar-disabled-color":`var(--${b}-disabled-color)`,"toolbar-border-color":`var(--${b}-border-color)`,"modal-button-bg-color":"#fafafa","modal-button-border-color":"#d9d9d9","button-tooltip-bg-color":"#333","button-tooltip-color":"#fff"},lo="scrollbar",so={"thumb-background-color":"#d9d9d9","thumb-background-color-hover":"#cccccc"},co="select",uo=`${b}-${co}`,po={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","counter-font-size":`var(--${b}-font-size-sm)`,"background-hover":`var(--${uo}-background)`,"border-width-hover":`var(--${uo}-border-width)`,"border-style-hover":`var(--${uo}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${uo}-border-radius)`,"outline-hover":`var(--${uo}-outline)`,"shadow-hover":`var(--${uo}-shadow)`,"text-color-hover":`var(--${uo}-text-color)`,"background-focus":`var(--${uo}-background)`,"border-width-focus":`var(--${uo}-border-width)`,"border-style-focus":`var(--${uo}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${uo}-border-radius)`,"outline-focus":`var(--${uo}-outline)`,"shadow-focus":"0px 0px 0px 2px rgba(3,93,255,0.1);","text-color-focus":`var(--${uo}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"item-readonly-bg":`var(--${b}-primary-color-rgb)`,"item-readonly-color":`var(--${b}-primary-color)`,"item-readonly-radius":`var(--${b}-border-radius)`,"dropdown-background":"#fff","dropdown-selected-color":"var(--oio-primary-color)","dropdown-color":"var(--oio-text-color-secondary)","dropdown-selected":"rgba(var(--oio-primary-color-rgb), 0.1)","dropdown-hover-color":"var(--oio-select-dropdown-color)","dropdown-hover-background":`var(--${b}-hover-background-color)`,"dropdown-box-shadow":"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 9px 28px 8px rgba(0, 0, 0, 0.05)"},bo="switch",go={background:"rgba(0, 0, 0, 0.25)"},vo="table",mo={"thead-bg":"#f7f8fa","body-bg":"#ffffff","text-color":"rgba(0, 0, 0, 0.65)","title-color":"rgba(0, 0, 0, 0.85)","title-font-weight":500,"title-sort-icon-size":"11px","tr-height":`var(--${b}-height-lg)`,"tr-stripe-bg":"#fafafa","tr-checked-bg":`rgba(var(--${b}-primary-color-rgb), 0.1)`,"tr-hover-bg":`rgba(var(--${b}-primary-color-rgb), 0.1)`,"row-border":"rgba(243, 243, 243, 1)","row-body-border":"#e8eaec",config:{border:"full",stripe:!0,isCurrent:!0,isHover:!0}},yo="tabs",ho={"card-tab-background":"#f7f8fa","card-tab-active-background":"var(--oio-background)","active-text-color":"var(--oio-primary-color)"},fo="textarea",Oo=`${b}-${fo}`,wo={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${Oo}-background)`,"border-width-hover":`var(--${Oo}-border-width)`,"border-style-hover":`var(--${Oo}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Oo}-border-radius)`,"outline-hover":`var(--${Oo}-outline)`,"shadow-hover":`var(--${Oo}-shadow)`,"text-color-hover":`var(--${Oo}-text-color)`,"background-focus":`var(--${Oo}-background)`,"border-width-focus":`var(--${Oo}-border-width)`,"border-style-focus":`var(--${Oo}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${Oo}-border-radius)`,"outline-focus":`var(--${Oo}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${Oo}-text-color)`},jo="transfer",ko={"background-color":"#f7f7f7","header-border-color":"#e3e7ee"},Co="tree-select",Do="upload",To=`${b}-${Do}`,$o={background:"#ffffff","border-width":`var(--${b}-border-width)`,"border-style":"dashed","border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${To}-background)`,"border-width-hover":`var(--${To}-border-width)`,"border-style-hover":`var(--${To}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${To}-border-radius)`,"outline-hover":`var(--${To}-outline)`,"shadow-hover":`var(--${To}-shadow)`,"text-color-hover":`var(--${To}-text-color)`,"background-focus":`var(--${To}-background)`,"border-width-focus":`var(--${To}-border-width)`,"border-style-focus":`var(--${To}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${To}-border-radius)`,"outline-focus":`var(--${To}-outline)`,"shadow-focus":`var(--${To}-shadow)`,"text-color-focus":`var(--${To}-text-color)`},Eo="card",So={"action-background":"#F7F8FA;","action-border-color":"transparent","action-divider-color":`var(--${b}-border-color)`,"action-text-color":`var(--${b}-text-color-secondary)`},No=()=>({[Zt]:{large:Object.assign({},eo),medium:Object.assign({},eo),small:Object.assign({},eo)},[mt]:{large:It,medium:It,small:It},[Kt]:{large:Object.assign(Object.assign({},Ht),m),medium:Object.assign(Object.assign({},Ht),y),small:Object.assign(Object.assign({},Ht),y)},[Mt]:{large:Object.assign({},At),medium:Object.assign({},At),small:Object.assign({},At)},[Ft]:{large:Object.assign({},Lt),medium:Object.assign({},Lt),small:Object.assign({},Lt)},[bo]:{large:Object.assign({},go),medium:Object.assign({},go),small:Object.assign({},go)},[to]:{large:Object.assign(Object.assign({},oo),C),medium:Object.assign(Object.assign({},oo),D),small:Object.assign(Object.assign({},oo),T)},[co]:{large:Object.assign(Object.assign({},po),$),medium:Object.assign(Object.assign({},po),E),small:Object.assign(Object.assign({},po),S)},[fo]:{large:wo,medium:wo,small:wo},[Do]:{large:$o,medium:$o,small:$o},[Yt]:{large:Object.assign(Object.assign({},Qt()),w),medium:Object.assign(Object.assign({},Qt()),j),small:Object.assign(Object.assign({},Qt()),k)},[gt]:{large:vt,medium:vt,small:vt},[vo]:{large:Object.assign(Object.assign({},mo),h),medium:Object.assign(Object.assign({},mo),f),small:Object.assign(Object.assign({},mo),O)},[Gt]:{large:Ut,medium:Ut,small:Ut},[Jt]:{large:Xt,medium:Xt,small:Xt},[io]:{large:no,medium:no,small:no},[Co]:{large:N,medium:V,small:x},[jo]:{large:ko,medium:ko,small:ko},[lo]:{large:so,medium:so,small:so},[Rt]:{large:Bt,medium:Bt,small:Bt},[_t]:{large:Wt,medium:Wt,small:Wt},[Pt]:{large:zt,medium:zt,small:zt},[ro]:{large:ao,medium:ao,small:ao},[yo]:{large:Object.assign(Object.assign({},I),ho),medium:Object.assign(Object.assign({},M),ho),small:Object.assign(Object.assign({},A),ho)},[Eo]:{large:So,medium:So,small:So}});function Vo(e){return function(t,o){Object.entries(o).forEach(([o,i])=>{e[`${t}-${o}`]=i})}}function xo(e){const t="large"===e?l:"medium"===e?s:c,o=Object.assign(Object.assign({},Se),t),i=Vo(o),r=No();Object.entries(r).forEach(([t,o])=>{o[e]&&i(t,o[e])}),n("default-minimalism-"+e,o)}function Io(){xo("large"),xo("medium"),xo("small")}const Mo="app-switch",Ao={"background-color":"#333E4C","border-color":"var(--oio-border-color)","app-name-overflow":"unset","app-name-margin-right":"8px","app-name-caret-down-display":"unset","logo-color":`var(--${b}-primary-color)`,"designer-background-color":`var(--${b}-primary-color)`,"designer-logo-color":`var(--${b}-primary-color)`},Fo="button",Lo=`${b}-${Fo}`,Ro={"default-danger-background":`var(--${Lo}-background)`,"default-danger-border-width":`var(--${Lo}-border-width)`,"default-danger-border-style":`var(--${Lo}-border-style)`,"default-danger-border-color":`var(--${b}-error-color)`,"default-danger-border-radius":`var(--${Lo}-border-radius)`,"default-danger-outline":`var(--${b}-error-color-outline)`,"default-danger-shadow":"none","default-danger-text-color":`var(--${b}-error-color)`,"default-danger-background-active":`var(--${Lo}-default-danger-background)`,"default-danger-border-width-active":`var(--${Lo}-default-danger-border-width)`,"default-danger-border-style-active":`var(--${Lo}-default-danger-border-style)`,"default-danger-border-color-active":`var(--${b}-error-color-active)`,"default-danger-border-radius-active":`var(--${Lo}-default-danger-border-radius)`,"default-danger-outline-active":`var(--${Lo}-default-danger-outline)`,"default-danger-shadow-active":`var(--${Lo}-default-danger-shadow)`,"default-danger-text-color-active":`var(--${b}-error-color-active)`,"default-danger-background-focus":`var(--${Lo}-default-danger-background)`,"default-danger-border-width-focus":`var(--${Lo}-default-danger-border-width)`,"default-danger-border-style-focus":`var(--${Lo}-default-danger-border-style)`,"default-danger-border-color-focus":`var(--${b}-error-color-focus)`,"default-danger-border-radius-focus":`var(--${Lo}-default-danger-border-radius)`,"default-danger-outline-focus":`var(--${Lo}-default-danger-outline)`,"default-danger-shadow-focus":`var(--${Lo}-default-danger-shadow)`,"default-danger-text-color-focus":`var(--${b}-error-color-focus)`,"default-danger-background-hover":`var(--${Lo}-default-danger-background)`,"default-danger-border-width-hover":`var(--${Lo}-default-danger-border-width)`,"default-danger-border-style-hover":`var(--${Lo}-default-danger-border-style)`,"default-danger-border-color-hover":`var(--${b}-error-color-hover)`,"default-danger-border-radius-hover":`var(--${Lo}-default-danger-border-radius)`,"default-danger-outline-hover":`var(--${Lo}-default-danger-outline)`,"default-danger-shadow-hover":`var(--${Lo}-default-danger-shadow)`,"default-danger-text-color-hover":`var(--${b}-error-color-hover)`,"default-danger-background-visited":`var(--${Lo}-default-danger-background)`,"default-danger-border-width-visited":`var(--${Lo}-default-danger-border-width)`,"default-danger-border-style-visited":`var(--${Lo}-default-danger-border-style)`,"default-danger-border-color-visited":`var(--${Lo}-default-danger-border-color)`,"default-danger-border-radius-visited":`var(--${Lo}-default-danger-border-radius)`,"default-danger-outline-visited":`var(--${Lo}-default-danger-outline)`,"default-danger-shadow-visited":`var(--${Lo}-default-danger-shadow)`,"default-danger-text-color-visited":`var(--${Lo}-default-danger-text-color)`},Bo={"primary-danger-background":`var(--${b}-error-color)`,"primary-danger-border-width":`var(--${Lo}-primary-border-width)`,"primary-danger-border-style":`var(--${Lo}-primary-border-style)`,"primary-danger-border-color":`var(--${b}-error-color)`,"primary-danger-border-radius":`var(--${Lo}-primary-border-radius)`,"primary-danger-outline":`var(--${b}-error-color)`,"primary-danger-shadow":"none","primary-danger-text-color":"#ffffff","primary-danger-background-active":`var(--${b}-error-color-active)`,"primary-danger-border-width-active":`var(--${Lo}-primary-danger-border-width)`,"primary-danger-border-style-active":`var(--${Lo}-primary-danger-border-style)`,"primary-danger-border-color-active":`var(--${b}-error-color-active)`,"primary-danger-border-radius-active":`var(--${Lo}-primary-danger-border-radius)`,"primary-danger-outline-active":`var(--${Lo}-primary-danger-outline)`,"primary-danger-shadow-active":`var(--${Lo}-primary-danger-shadow)`,"primary-danger-text-color-active":`var(--${Lo}-primary-danger-text-color)`,"primary-danger-background-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-width-focus":`var(--${Lo}-primary-danger-border-width)`,"primary-danger-border-style-focus":`var(--${Lo}-primary-danger-border-style)`,"primary-danger-border-color-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-radius-focus":`var(--${Lo}-primary-danger-border-radius)`,"primary-danger-outline-focus":`var(--${Lo}-primary-danger-outline)`,"primary-danger-shadow-focus":`var(--${Lo}-primary-danger-shadow)`,"primary-danger-text-color-focus":`var(--${Lo}-primary-danger-text-color)`,"primary-danger-background-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-width-hover":`var(--${Lo}-primary-danger-border-width)`,"primary-danger-border-style-hover":`var(--${Lo}-primary-danger-border-style)`,"primary-danger-border-color-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-radius-hover":`var(--${Lo}-primary-danger-border-radius)`,"primary-danger-outline-hover":`var(--${Lo}-primary-danger-outline)`,"primary-danger-shadow-hover":`var(--${Lo}-primary-danger-shadow)`,"primary-danger-text-color-hover":`var(--${Lo}-primary-danger-text-color)`,"primary-danger-background-visited":`var(--${Lo}-primary-danger-background)`,"primary-danger-border-width-visited":`var(--${Lo}-primary-danger-border-width)`,"primary-danger-border-style-visited":`var(--${Lo}-primary-danger-border-style)`,"primary-danger-border-color-visited":`var(--${Lo}-primary-danger-border-color)`,"primary-danger-border-radius-visited":`var(--${Lo}-primary-danger-border-radius)`,"primary-danger-outline-visited":`var(--${Lo}-primary-danger-outline)`,"primary-danger-shadow-visited":`var(--${Lo}-primary-danger-shadow)`,"primary-danger-text-color-visited":`var(--${Lo}-primary-danger-text-color)`},_o={"link-danger-background":`var(--${Lo}-link-background)`,"link-danger-border-width":`var(--${Lo}-link-border-width)`,"link-danger-border-style":`var(--${Lo}-link-border-style)`,"link-danger-border-color":`var(--${Lo}-link-border-color)`,"link-danger-border-radius":`var(--${Lo}-link-border-radius)`,"link-danger-outline":"none","link-danger-shadow":"none","link-danger-text-color":`var(--${b}-error-color)`,"link-danger-background-active":`var(--${Lo}-link-danger-color)`,"link-danger-border-width-active":`var(--${Lo}-link-danger-border-width)`,"link-danger-border-style-active":`var(--${Lo}-link-danger-border-style)`,"link-danger-border-color-active":`var(--${Lo}-link-danger-color)`,"link-danger-border-radius-active":`var(--${Lo}-link-danger-border-radius)`,"link-danger-outline-active":`var(--${Lo}-link-danger-outline)`,"link-danger-shadow-active":`var(--${Lo}-link-danger-shadow)`,"link-danger-text-color-active":`var(--${b}-error-color-active)`,"link-danger-background-focus":`var(--${Lo}-link-danger-color)`,"link-danger-border-width-focus":`var(--${Lo}-link-danger-border-width)`,"link-danger-border-style-focus":`var(--${Lo}-link-danger-border-style)`,"link-danger-border-color-focus":`var(--${Lo}-link-danger-color)`,"link-danger-border-radius-focus":`var(--${Lo}-link-danger-border-radius)`,"link-danger-outline-focus":`var(--${Lo}-link-danger-outline)`,"link-danger-shadow-focus":`var(--${Lo}-link-danger-shadow)`,"link-danger-text-color-focus":`var(--${b}-error-color-focus)`,"link-danger-background-hover":`var(--${Lo}-link-danger-color)`,"link-danger-border-width-hover":`var(--${Lo}-link-danger-border-width)`,"link-danger-border-style-hover":`var(--${Lo}-link-danger-border-style)`,"link-danger-border-color-hover":`var(--${Lo}-link-danger-color)`,"link-danger-border-radius-hover":`var(--${Lo}-link-danger-border-radius)`,"link-danger-outline-hover":`var(--${Lo}-link-danger-outline)`,"link-danger-shadow-hover":`var(--${Lo}-link-danger-shadow)`,"link-danger-text-color-hover":`var(--${b}-error-color-hover)`,"link-danger-background-visited":`var(--${Lo}-link-danger-background)`,"link-danger-border-width-visited":`var(--${Lo}-link-danger-border-width)`,"link-danger-border-style-visited":`var(--${Lo}-link-danger-border-style)`,"link-danger-border-color-visited":`var(--${Lo}-link-danger-border-color)`,"link-danger-border-radius-visited":`var(--${Lo}-link-danger-border-radius)`,"link-danger-outline-visited":`var(--${Lo}-link-danger-outline)`,"link-danger-shadow-visited":`var(--${Lo}-link-danger-shadow)`,"link-danger-text-color-visited":`var(--${Lo}-link-danger-text-color)`},Wo={"default-info-background":`var(--${Lo}-background)`,"default-info-border-width":`var(--${Lo}-border-width)`,"default-info-border-style":`var(--${Lo}-border-style)`,"default-info-border-color":`var(--${b}-info-color)`,"default-info-border-radius":`var(--${Lo}-border-radius)`,"default-info-outline":"none","default-info-shadow":"none","default-info-text-color":`var(--${b}-info-color)`,"default-info-background-active":`var(--${Lo}-default-info-background)`,"default-info-border-width-active":`var(--${Lo}-default-info-border-width)`,"default-info-border-style-active":`var(--${Lo}-default-info-border-style)`,"default-info-border-color-active":`var(--${b}-info-color-active)`,"default-info-border-radius-active":`var(--${Lo}-default-info-border-radius)`,"default-info-outline-active":`var(--${Lo}-default-info-outline)`,"default-info-shadow-active":`var(--${Lo}-default-info-shadow)`,"default-info-text-color-active":`var(--${b}-info-color-active)`,"default-info-background-focus":`var(--${Lo}-default-info-background)`,"default-info-border-width-focus":`var(--${Lo}-default-info-border-width)`,"default-info-border-style-focus":`var(--${Lo}-default-info-border-style)`,"default-info-border-color-focus":`var(--${b}-info-color-focus)`,"default-info-border-radius-focus":`var(--${Lo}-default-info-border-radius)`,"default-info-outline-focus":`var(--${Lo}-default-info-outline)`,"default-info-shadow-focus":`var(--${Lo}-default-info-shadow)`,"default-info-text-color-focus":`var(--${b}-info-color-focus)`,"default-info-background-hover":`var(--${Lo}-default-info-background)`,"default-info-border-width-hover":`var(--${Lo}-default-info-border-width)`,"default-info-border-style-hover":`var(--${Lo}-default-info-border-style)`,"default-info-border-color-hover":`var(--${b}-info-color-hover)`,"default-info-border-radius-hover":`var(--${Lo}-default-info-border-radius)`,"default-info-outline-hover":`var(--${Lo}-default-info-outline)`,"default-info-shadow-hover":`var(--${Lo}-default-info-shadow)`,"default-info-text-color-hover":`var(--${b}-info-color-hover)`,"default-info-background-visited":`var(--${Lo}-default-info-background)`,"default-info-border-width-visited":`var(--${Lo}-default-info-border-width)`,"default-info-border-style-visited":`var(--${Lo}-default-info-border-style)`,"default-info-border-color-visited":`var(--${Lo}-default-info-border-color)`,"default-info-border-radius-visited":`var(--${Lo}-default-info-border-radius)`,"default-info-outline-visited":`var(--${Lo}-default-info-outline)`,"default-info-shadow-visited":`var(--${Lo}-default-info-shadow)`,"default-info-text-color-visited":`var(--${Lo}-default-info-text-color)`},Po={"primary-info-background":`var(--${b}-info-color)`,"primary-info-border-width":`var(--${Lo}-primary-border-width)`,"primary-info-border-style":`var(--${Lo}-primary-border-style)`,"primary-info-border-color":`var(--${b}-info-color)`,"primary-info-border-radius":`var(--${Lo}-primary-border-radius)`,"primary-info-outline":"none","primary-info-shadow":"none","primary-info-text-color":"#ffffff","primary-info-background-active":`var(--${b}-info-color-active)`,"primary-info-border-width-active":`var(--${Lo}-primary-info-border-width)`,"primary-info-border-style-active":`var(--${Lo}-primary-info-border-style)`,"primary-info-border-color-active":`var(--${b}-info-color-active)`,"primary-info-border-radius-active":`var(--${Lo}-primary-info-border-radius)`,"primary-info-outline-active":`var(--${Lo}-primary-info-outline)`,"primary-info-shadow-active":`var(--${Lo}-primary-info-shadow)`,"primary-info-text-color-active":`var(--${Lo}-primary-info-text-color)`,"primary-info-background-focus":`var(--${b}-info-color-focus)`,"primary-info-border-width-focus":`var(--${Lo}-primary-info-border-width)`,"primary-info-border-style-focus":`var(--${Lo}-primary-info-border-style)`,"primary-info-border-color-focus":`var(--${b}-info-color-focus)`,"primary-info-border-radius-focus":`var(--${Lo}-primary-info-border-radius)`,"primary-info-outline-focus":`var(--${Lo}-primary-info-outline)`,"primary-info-shadow-focus":`var(--${Lo}-primary-info-shadow)`,"primary-info-text-color-focus":`var(--${Lo}-primary-info-text-color)`,"primary-info-background-hover":`var(--${b}-info-color-hover)`,"primary-info-border-width-hover":`var(--${Lo}-primary-info-border-width)`,"primary-info-border-style-hover":`var(--${Lo}-primary-info-border-style)`,"primary-info-border-color-hover":`var(--${b}-info-color-hover)`,"primary-info-border-radius-hover":`var(--${Lo}-primary-info-border-radius)`,"primary-info-outline-hover":`var(--${Lo}-primary-info-outline)`,"primary-info-shadow-hover":`var(--${Lo}-primary-info-shadow)`,"primary-info-text-color-hover":`var(--${Lo}-primary-info-text-color)`,"primary-info-background-visited":`var(--${Lo}-primary-info-background)`,"primary-info-border-width-visited":`var(--${Lo}-primary-info-border-width)`,"primary-info-border-style-visited":`var(--${Lo}-primary-info-border-style)`,"primary-info-border-color-visited":`var(--${Lo}-primary-info-border-color)`,"primary-info-border-radius-visited":`var(--${Lo}-primary-info-border-radius)`,"primary-info-outline-visited":`var(--${Lo}-primary-info-outline)`,"primary-info-shadow-visited":`var(--${Lo}-primary-info-shadow)`,"primary-info-text-color-visited":`var(--${Lo}-primary-info-text-color)`},zo={"link-info-background":`var(--${Lo}-link-background)`,"link-info-border-width":`var(--${Lo}-link-border-width)`,"link-info-border-style":`var(--${Lo}-link-border-style)`,"link-info-border-color":`var(--${Lo}-link-border-color)`,"link-info-border-radius":`var(--${Lo}-link-border-radius)`,"link-info-outline":"none","link-info-shadow":"none","link-info-text-color":`var(--${b}-info-color)`,"link-info-background-active":`var(--${Lo}-link-info-color)`,"link-info-border-width-active":`var(--${Lo}-link-info-border-width)`,"link-info-border-style-active":`var(--${Lo}-link-info-border-style)`,"link-info-border-color-active":`var(--${Lo}-link-info-color)`,"link-info-border-radius-active":`var(--${Lo}-link-info-border-radius)`,"link-info-outline-active":`var(--${Lo}-link-info-outline)`,"link-info-shadow-active":`var(--${Lo}-link-info-shadow)`,"link-info-text-color-active":`var(--${b}-info-color-active)`,"link-info-background-focus":`var(--${Lo}-link-info-color)`,"link-info-border-width-focus":`var(--${Lo}-link-info-border-width)`,"link-info-border-style-focus":`var(--${Lo}-link-info-border-style)`,"link-info-border-color-focus":`var(--${Lo}-link-info-color)`,"link-info-border-radius-focus":`var(--${Lo}-link-info-border-radius)`,"link-info-outline-focus":`var(--${Lo}-link-info-outline)`,"link-info-shadow-focus":`var(--${Lo}-link-info-shadow)`,"link-info-text-color-focus":`var(--${b}-info-color-focus)`,"link-info-background-hover":`var(--${Lo}-link-info-color)`,"link-info-border-width-hover":`var(--${Lo}-link-info-border-width)`,"link-info-border-style-hover":`var(--${Lo}-link-info-border-style)`,"link-info-border-color-hover":`var(--${Lo}-link-info-color)`,"link-info-border-radius-hover":`var(--${Lo}-link-info-border-radius)`,"link-info-outline-hover":`var(--${Lo}-link-info-outline)`,"link-info-shadow-hover":`var(--${Lo}-link-info-shadow)`,"link-info-text-color-hover":`var(--${b}-info-color-hover)`,"link-info-background-visited":`var(--${Lo}-link-info-background)`,"link-info-border-width-visited":`var(--${Lo}-link-info-border-width)`,"link-info-border-style-visited":`var(--${Lo}-link-info-border-style)`,"link-info-border-color-visited":`var(--${Lo}-link-info-border-color)`,"link-info-border-radius-visited":`var(--${Lo}-link-info-border-radius)`,"link-info-outline-visited":`var(--${Lo}-link-info-outline)`,"link-info-shadow-visited":`var(--${Lo}-link-info-shadow)`,"link-info-text-color-visited":`var(--${Lo}-link-info-text-color)`},Go={background:`var(--${b}-background)`,"border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-active":`var(--${Lo}-background)`,"border-width-active":`var(--${Lo}-border-width)`,"border-style-active":`var(--${Lo}-border-style)`,"border-color-active":`var(--${Lo}-border-color)`,"border-radius-active":`var(--${Lo}-border-radius)`,"outline-active":`var(--${Lo}-outline)`,"shadow-active":`var(--${Lo}-shadow)`,"text-color-active":`var(--${b}-primary-color-active)`,"background-focus":`var(--${Lo}-background)`,"border-width-focus":`var(--${Lo}-border-width)`,"border-style-focus":`var(--${Lo}-border-style)`,"border-color-focus":`var(--${Lo}-border-color)`,"border-radius-focus":`var(--${Lo}-border-radius)`,"outline-focus":`var(--${Lo}-outline)`,"shadow-focus":`var(--${Lo}-shadow)`,"text-color-focus":`var(--${b}-primary-color-focus)`,"background-hover":`var(--${Lo}-background)`,"border-width-hover":`var(--${Lo}-border-width)`,"border-style-hover":`var(--${Lo}-border-style)`,"border-color-hover":`var(--${Lo}-border-color)`,"border-radius-hover":`var(--${Lo}-border-radius)`,"outline-hover":`var(--${Lo}-outline)`,"shadow-hover":`var(--${Lo}-shadow)`,"text-color-hover":`var(--${b}-primary-color-hover)`,"background-visited":`var(--${Lo}-background)`,"border-width-visited":`var(--${Lo}-border-width)`,"border-style-visited":`var(--${Lo}-border-style)`,"border-color-visited":`var(--${Lo}-border-color)`,"border-radius-visited":`var(--${Lo}-border-radius)`,"outline-visited":`var(--${Lo}-outline)`,"shadow-visited":`var(--${Lo}-shadow)`,"text-color-visited":`var(--${Lo}-text-color)`},Uo={"primary-background":`var(--${b}-primary-color)`,"primary-border-width":`var(--${b}-border-width)`,"primary-border-style":`var(--${b}-border-style)`,"primary-border-color":`var(--${b}-primary-color)`,"primary-border-radius":`var(--${b}-border-radius)`,"primary-outline":`var(--${b}-primary-color-outline)`,"primary-shadow":"none","primary-text-color":"#ffffff","primary-background-active":`var(--${b}-primary-color-active)`,"primary-border-width-active":`var(--${Lo}-primary-border-width)`,"primary-border-style-active":`var(--${Lo}-primary-border-style)`,"primary-border-color-active":`var(--${b}-primary-color-active)`,"primary-border-radius-active":`var(--${Lo}-primary-border-radius)`,"primary-outline-active":`var(--${Lo}-primary-outline)`,"primary-shadow-active":`var(--${Lo}-primary-shadow)`,"primary-text-color-active":`var(--${Lo}-primary-text-color)`,"primary-background-focus":`var(--${b}-primary-color-focus)`,"primary-border-width-focus":`var(--${Lo}-primary-border-width)`,"primary-border-style-focus":`var(--${Lo}-primary-border-style)`,"primary-border-color-focus":`var(--${b}-primary-color-focus)`,"primary-border-radius-focus":`var(--${Lo}-primary-border-radius)`,"primary-outline-focus":`var(--${Lo}-primary-outline)`,"primary-shadow-focus":`var(--${Lo}-primary-shadow)`,"primary-text-color-focus":`var(--${Lo}-primary-text-color)`,"primary-background-hover":`var(--${b}-primary-color-hover)`,"primary-border-width-hover":`var(--${Lo}-primary-border-width)`,"primary-border-style-hover":`var(--${Lo}-primary-border-style)`,"primary-border-color-hover":`var(--${b}-primary-color-hover)`,"primary-border-radius-hover":`var(--${Lo}-primary-border-radius)`,"primary-outline-hover":`var(--${Lo}-primary-outline)`,"primary-shadow-hover":`var(--${Lo}-primary-shadow)`,"primary-text-color-hover":`var(--${Lo}-primary-text-color)`,"primary-background-visited":`var(--${Lo}-primary-background)`,"primary-border-width-visited":`var(--${Lo}-primary-border-width)`,"primary-border-style-visited":`var(--${Lo}-primary-border-style)`,"primary-border-color-visited":`var(--${Lo}-primary-border-color)`,"primary-border-radius-visited":`var(--${Lo}-primary-border-radius)`,"primary-outline-visited":`var(--${Lo}-primary-outline)`,"primary-shadow-visited":`var(--${Lo}-primary-shadow)`,"primary-text-color-visited":`var(--${Lo}-primary-text-color)`},Ko={"link-background":"transparent","link-border-width":"none","link-border-style":"none","link-border-color":"none","link-border-radius":"none","link-outline":"none","link-shadow":"none","link-text-color":`var(--${b}-primary-color)`,"link-background-active":`var(--${Lo}-link-background)`,"link-border-width-active":`var(--${Lo}-link-border-width)`,"link-border-style-active":`var(--${Lo}-link-border-style)`,"link-border-color-active":`var(--${Lo}-link-border-color)`,"link-border-radius-active":`var(--${Lo}-link-border-radius)`,"link-outline-active":`var(--${Lo}-link-outline)`,"link-shadow-active":`var(--${Lo}-link-shadow)`,"link-text-color-active":`var(--${Lo}-link-text-color)`,"link-background-focus":`var(--${Lo}-link-background)`,"link-border-width-focus":`var(--${Lo}-link-border-width)`,"link-border-style-focus":`var(--${Lo}-link-border-style)`,"link-border-color-focus":`var(--${Lo}-link-border-color)`,"link-border-radius-focus":`var(--${Lo}-link-border-radius)`,"link-outline-focus":`var(--${Lo}-link-outline)`,"link-shadow-focus":`var(--${Lo}-link-shadow)`,"link-text-color-focus":`var(--${Lo}-link-text-color)`,"link-background-hover":`var(--${Lo}-link-background)`,"link-border-width-hover":`var(--${Lo}-link-border-width)`,"link-border-style-hover":`var(--${Lo}-link-border-style)`,"link-border-color-hover":`var(--${Lo}-link-border-color)`,"link-border-radius-hover":`var(--${Lo}-link-border-radius)`,"link-outline-hover":`var(--${Lo}-link-outline)`,"link-shadow-hover":`var(--${Lo}-link-shadow)`,"link-text-color-hover":`var(--${Lo}-link-text-color)`,"link-background-visited":`var(--${Lo}-link-background)`,"link-border-width-visited":`var(--${Lo}-link-border-width)`,"link-border-style-visited":`var(--${Lo}-link-border-style)`,"link-border-color-visited":`var(--${Lo}-link-border-color)`,"link-border-radius-visited":`var(--${Lo}-link-border-radius)`,"link-outline-visited":`var(--${Lo}-link-outline)`,"link-shadow-visited":`var(--${Lo}-link-shadow)`,"link-text-color-visited":`var(--${Lo}-link-text-color)`},qo={"default-success-background":`var(--${Lo}-background)`,"default-success-border-width":`var(--${Lo}-border-width)`,"default-success-border-style":`var(--${Lo}-border-style)`,"default-success-border-color":`var(--${b}-success-color)`,"default-success-border-radius":`var(--${Lo}-border-radius)`,"default-success-outline":"none","default-success-shadow":"none","default-success-text-color":`var(--${b}-success-color)`,"default-success-background-active":`var(--${Lo}-default-success-background)`,"default-success-border-width-active":`var(--${Lo}-default-success-border-width)`,"default-success-border-style-active":`var(--${Lo}-default-success-border-style)`,"default-success-border-color-active":`var(--${b}-success-color-active)`,"default-success-border-radius-active":`var(--${Lo}-default-success-border-radius)`,"default-success-outline-active":`var(--${Lo}-default-success-outline)`,"default-success-shadow-active":`var(--${Lo}-default-success-shadow)`,"default-success-text-color-active":`var(--${b}-success-color-active)`,"default-success-background-focus":`var(--${Lo}-default-success-background)`,"default-success-border-width-focus":`var(--${Lo}-default-success-border-width)`,"default-success-border-style-focus":`var(--${Lo}-default-success-border-style)`,"default-success-border-color-focus":`var(--${b}-success-color-focus)`,"default-success-border-radius-focus":`var(--${Lo}-default-success-border-radius)`,"default-success-outline-focus":`var(--${Lo}-default-success-outline)`,"default-success-shadow-focus":`var(--${Lo}-default-success-shadow)`,"default-success-text-color-focus":`var(--${b}-success-color-focus)`,"default-success-background-hover":`var(--${Lo}-default-success-background)`,"default-success-border-width-hover":`var(--${Lo}-default-success-border-width)`,"default-success-border-style-hover":`var(--${Lo}-default-success-border-style)`,"default-success-border-color-hover":`var(--${b}-success-color-hover)`,"default-success-border-radius-hover":`var(--${Lo}-default-success-border-radius)`,"default-success-outline-hover":`var(--${Lo}-default-success-outline)`,"default-success-shadow-hover":`var(--${Lo}-default-success-shadow)`,"default-success-text-color-hover":`var(--${b}-success-color-hover)`,"default-success-background-visited":`var(--${Lo}-default-success-background)`,"default-success-border-width-visited":`var(--${Lo}-default-success-border-width)`,"default-success-border-style-visited":`var(--${Lo}-default-success-border-style)`,"default-success-border-color-visited":`var(--${Lo}-default-success-border-color)`,"default-success-border-radius-visited":`var(--${Lo}-default-success-border-radius)`,"default-success-outline-visited":`var(--${Lo}-default-success-outline)`,"default-success-shadow-visited":`var(--${Lo}-default-success-shadow)`,"default-success-text-color-visited":`var(--${Lo}-default-success-text-color)`},Ho={"primary-success-background":`var(--${b}-success-color)`,"primary-success-border-width":`var(--${Lo}-primary-border-width)`,"primary-success-border-style":`var(--${Lo}-primary-border-style)`,"primary-success-border-color":`var(--${b}-success-color)`,"primary-success-border-radius":`var(--${Lo}-primary-border-radius)`,"primary-success-outline":"none","primary-success-shadow":"none","primary-success-text-color":"#ffffff","primary-success-background-active":`var(--${b}-success-color-active)`,"primary-success-border-width-active":`var(--${Lo}-primary-success-border-width)`,"primary-success-border-style-active":`var(--${Lo}-primary-success-border-style)`,"primary-success-border-color-active":`var(--${b}-success-color-active)`,"primary-success-border-radius-active":`var(--${Lo}-primary-success-border-radius)`,"primary-success-outline-active":`var(--${Lo}-primary-success-outline)`,"primary-success-shadow-active":`var(--${Lo}-primary-success-shadow)`,"primary-success-text-color-active":`var(--${Lo}-primary-success-text-color)`,"primary-success-background-focus":`var(--${b}-success-color-focus)`,"primary-success-border-width-focus":`var(--${Lo}-primary-success-border-width)`,"primary-success-border-style-focus":`var(--${Lo}-primary-success-border-style)`,"primary-success-border-color-focus":`var(--${b}-success-color-focus)`,"primary-success-border-radius-focus":`var(--${Lo}-primary-success-border-radius)`,"primary-success-outline-focus":`var(--${Lo}-primary-success-outline)`,"primary-success-shadow-focus":`var(--${Lo}-primary-success-shadow)`,"primary-success-text-color-focus":`var(--${Lo}-primary-success-text-color)`,"primary-success-background-hover":`var(--${b}-success-color-hover)`,"primary-success-border-width-hover":`var(--${Lo}-primary-success-border-width)`,"primary-success-border-style-hover":`var(--${Lo}-primary-success-border-style)`,"primary-success-border-color-hover":`var(--${b}-success-color-hover)`,"primary-success-border-radius-hover":`var(--${Lo}-primary-success-border-radius)`,"primary-success-outline-hover":`var(--${Lo}-primary-success-outline)`,"primary-success-shadow-hover":`var(--${Lo}-primary-success-shadow)`,"primary-success-text-color-hover":`var(--${Lo}-primary-success-text-color)`,"primary-success-background-visited":`var(--${Lo}-primary-success-background)`,"primary-success-border-width-visited":`var(--${Lo}-primary-success-border-width)`,"primary-success-border-style-visited":`var(--${Lo}-primary-success-border-style)`,"primary-success-border-color-visited":`var(--${Lo}-primary-success-border-color)`,"primary-success-border-radius-visited":`var(--${Lo}-primary-success-border-radius)`,"primary-success-outline-visited":`var(--${Lo}-primary-success-outline)`,"primary-success-shadow-visited":`var(--${Lo}-primary-success-shadow)`,"primary-success-text-color-visited":`var(--${Lo}-primary-success-text-color)`},Yo={"link-success-background":`var(--${Lo}-link-background)`,"link-success-border-width":`var(--${Lo}-link-border-width)`,"link-success-border-style":`var(--${Lo}-link-border-style)`,"link-success-border-color":`var(--${Lo}-link-border-color)`,"link-success-border-radius":`var(--${Lo}-link-border-radius)`,"link-success-outline":"none","link-success-shadow":"none","link-success-text-color":`var(--${b}-success-color)`,"link-success-background-active":`var(--${Lo}-link-success-color)`,"link-success-border-width-active":`var(--${Lo}-link-success-border-width)`,"link-success-border-style-active":`var(--${Lo}-link-success-border-style)`,"link-success-border-color-active":`var(--${Lo}-link-success-color)`,"link-success-border-radius-active":`var(--${Lo}-link-success-border-radius)`,"link-success-outline-active":`var(--${Lo}-link-success-outline)`,"link-success-shadow-active":`var(--${Lo}-link-success-shadow)`,"link-success-text-color-active":`var(--${b}-success-color-active)`,"link-success-background-focus":`var(--${Lo}-link-success-color)`,"link-success-border-width-focus":`var(--${Lo}-link-success-border-width)`,"link-success-border-style-focus":`var(--${Lo}-link-success-border-style)`,"link-success-border-color-focus":`var(--${Lo}-link-success-color)`,"link-success-border-radius-focus":`var(--${Lo}-link-success-border-radius)`,"link-success-outline-focus":`var(--${Lo}-link-success-outline)`,"link-success-shadow-focus":`var(--${Lo}-link-success-shadow)`,"link-success-text-color-focus":`var(--${b}-success-color-focus)`,"link-success-background-hover":`var(--${Lo}-link-success-color)`,"link-success-border-width-hover":`var(--${Lo}-link-success-border-width)`,"link-success-border-style-hover":`var(--${Lo}-link-success-border-style)`,"link-success-border-color-hover":`var(--${Lo}-link-success-color)`,"link-success-border-radius-hover":`var(--${Lo}-link-success-border-radius)`,"link-success-outline-hover":`var(--${Lo}-link-success-outline)`,"link-success-shadow-hover":`var(--${Lo}-link-success-shadow)`,"link-success-text-color-hover":`var(--${b}-success-color-hover)`,"link-success-background-visited":`var(--${Lo}-link-success-background)`,"link-success-border-width-visited":`var(--${Lo}-link-success-border-width)`,"link-success-border-style-visited":`var(--${Lo}-link-success-border-style)`,"link-success-border-color-visited":`var(--${Lo}-link-success-border-color)`,"link-success-border-radius-visited":`var(--${Lo}-link-success-border-radius)`,"link-success-outline-visited":`var(--${Lo}-link-success-outline)`,"link-success-shadow-visited":`var(--${Lo}-link-success-shadow)`,"link-success-text-color-visited":`var(--${Lo}-link-success-text-color)`},Qo={"default-warning-background":`var(--${Lo}-background)`,"default-warning-border-width":`var(--${Lo}-border-width)`,"default-warning-border-style":`var(--${Lo}-border-style)`,"default-warning-border-color":`var(--${b}-warning-color)`,"default-warning-border-radius":`var(--${Lo}-border-radius)`,"default-warning-outline":"none","default-warning-shadow":"none","default-warning-text-color":`var(--${b}-warning-color)`,"default-warning-background-active":`var(--${Lo}-default-warning-background)`,"default-warning-border-width-active":`var(--${Lo}-default-warning-border-width)`,"default-warning-border-style-active":`var(--${Lo}-default-warning-border-style)`,"default-warning-border-color-active":`var(--${b}-warning-color-active)`,"default-warning-border-radius-active":`var(--${Lo}-default-warning-border-radius)`,"default-warning-outline-active":`var(--${Lo}-default-warning-outline)`,"default-warning-shadow-active":`var(--${Lo}-default-warning-shadow)`,"default-warning-text-color-active":`var(--${b}-warning-color-active)`,"default-warning-background-focus":`var(--${Lo}-default-warning-background)`,"default-warning-border-width-focus":`var(--${Lo}-default-warning-border-width)`,"default-warning-border-style-focus":`var(--${Lo}-default-warning-border-style)`,"default-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-border-radius-focus":`var(--${Lo}-default-warning-border-radius)`,"default-warning-outline-focus":`var(--${Lo}-default-warning-outline)`,"default-warning-shadow-focus":`var(--${Lo}-default-warning-shadow)`,"default-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-background-hover":`var(--${Lo}-default-warning-background)`,"default-warning-border-width-hover":`var(--${Lo}-default-warning-border-width)`,"default-warning-border-style-hover":`var(--${Lo}-default-warning-border-style)`,"default-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-border-radius-hover":`var(--${Lo}-default-warning-border-radius)`,"default-warning-outline-hover":`var(--${Lo}-default-warning-outline)`,"default-warning-shadow-hover":`var(--${Lo}-default-warning-shadow)`,"default-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-background-visited":`var(--${Lo}-default-warning-background)`,"default-warning-border-width-visited":`var(--${Lo}-default-warning-border-width)`,"default-warning-border-style-visited":`var(--${Lo}-default-warning-border-style)`,"default-warning-border-color-visited":`var(--${Lo}-default-warning-border-color)`,"default-warning-border-radius-visited":`var(--${Lo}-default-warning-border-radius)`,"default-warning-outline-visited":`var(--${Lo}-default-warning-outline)`,"default-warning-shadow-visited":`var(--${Lo}-default-warning-shadow)`,"default-warning-text-color-visited":`var(--${Lo}-default-warning-text-color)`},Jo={"primary-warning-background":`var(--${b}-warning-color)`,"primary-warning-border-width":`var(--${Lo}-primary-border-width)`,"primary-warning-border-style":`var(--${Lo}-primary-border-style)`,"primary-warning-border-color":`var(--${b}-warning-color)`,"primary-warning-border-radius":`var(--${Lo}-primary-border-radius)`,"primary-warning-outline":"none","primary-warning-shadow":"none","primary-warning-text-color":"#ffffff","primary-warning-background-active":`var(--${b}-warning-color-active)`,"primary-warning-border-width-active":`var(--${Lo}-primary-warning-border-width)`,"primary-warning-border-style-active":`var(--${Lo}-primary-warning-border-style)`,"primary-warning-border-color-active":`var(--${b}-warning-color-active)`,"primary-warning-border-radius-active":`var(--${Lo}-primary-warning-border-radius)`,"primary-warning-outline-active":`var(--${Lo}-primary-warning-outline)`,"primary-warning-shadow-active":`var(--${Lo}-primary-warning-shadow)`,"primary-warning-text-color-active":`var(--${Lo}-primary-warning-text-color)`,"primary-warning-background-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-width-focus":`var(--${Lo}-primary-warning-border-width)`,"primary-warning-border-style-focus":`var(--${Lo}-primary-warning-border-style)`,"primary-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-radius-focus":`var(--${Lo}-primary-warning-border-radius)`,"primary-warning-outline-focus":`var(--${Lo}-primary-warning-outline)`,"primary-warning-shadow-focus":`var(--${Lo}-primary-warning-shadow)`,"primary-warning-text-color-focus":`var(--${Lo}-primary-warning-text-color)`,"primary-warning-background-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-width-hover":`var(--${Lo}-primary-warning-border-width)`,"primary-warning-border-style-hover":`var(--${Lo}-primary-warning-border-style)`,"primary-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-radius-hover":`var(--${Lo}-primary-warning-border-radius)`,"primary-warning-outline-hover":`var(--${Lo}-primary-warning-outline)`,"primary-warning-shadow-hover":`var(--${Lo}-primary-warning-shadow)`,"primary-warning-text-color-hover":`var(--${Lo}-primary-warning-text-color)`,"primary-warning-background-visited":`var(--${Lo}-primary-warning-background)`,"primary-warning-border-width-visited":`var(--${Lo}-primary-warning-border-width)`,"primary-warning-border-style-visited":`var(--${Lo}-primary-warning-border-style)`,"primary-warning-border-color-visited":`var(--${Lo}-primary-warning-border-color)`,"primary-warning-border-radius-visited":`var(--${Lo}-primary-warning-border-radius)`,"primary-warning-outline-visited":`var(--${Lo}-primary-warning-outline)`,"primary-warning-shadow-visited":`var(--${Lo}-primary-warning-shadow)`,"primary-warning-text-color-visited":`var(--${Lo}-primary-warning-text-color)`},Xo={"link-warning-background":`var(--${Lo}-link-background)`,"link-warning-border-width":`var(--${Lo}-link-border-width)`,"link-warning-border-style":`var(--${Lo}-link-border-style)`,"link-warning-border-color":`var(--${Lo}-link-border-color)`,"link-warning-border-radius":`var(--${Lo}-link-border-radius)`,"link-warning-outline":"none","link-warning-shadow":"none","link-warning-text-color":`var(--${b}-warning-color)`,"link-warning-background-active":`var(--${Lo}-link-warning-color)`,"link-warning-border-width-active":`var(--${Lo}-link-warning-border-width)`,"link-warning-border-style-active":`var(--${Lo}-link-warning-border-style)`,"link-warning-border-color-active":`var(--${Lo}-link-warning-color)`,"link-warning-border-radius-active":`var(--${Lo}-link-warning-border-radius)`,"link-warning-outline-active":`var(--${Lo}-link-warning-outline)`,"link-warning-shadow-active":`var(--${Lo}-link-warning-shadow)`,"link-warning-text-color-active":`var(--${b}-warning-color-active)`,"link-warning-background-focus":`var(--${Lo}-link-warning-color)`,"link-warning-border-width-focus":`var(--${Lo}-link-warning-border-width)`,"link-warning-border-style-focus":`var(--${Lo}-link-warning-border-style)`,"link-warning-border-color-focus":`var(--${Lo}-link-warning-color)`,"link-warning-border-radius-focus":`var(--${Lo}-link-warning-border-radius)`,"link-warning-outline-focus":`var(--${Lo}-link-warning-outline)`,"link-warning-shadow-focus":`var(--${Lo}-link-warning-shadow)`,"link-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"link-warning-background-hover":`var(--${Lo}-link-warning-color)`,"link-warning-border-width-hover":`var(--${Lo}-link-warning-border-width)`,"link-warning-border-style-hover":`var(--${Lo}-link-warning-border-style)`,"link-warning-border-color-hover":`var(--${Lo}-link-warning-color)`,"link-warning-border-radius-hover":`var(--${Lo}-link-warning-border-radius)`,"link-warning-outline-hover":`var(--${Lo}-link-warning-outline)`,"link-warning-shadow-hover":`var(--${Lo}-link-warning-shadow)`,"link-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"link-warning-background-visited":`var(--${Lo}-link-warning-background)`,"link-warning-border-width-visited":`var(--${Lo}-link-warning-border-width)`,"link-warning-border-style-visited":`var(--${Lo}-link-warning-border-style)`,"link-warning-border-color-visited":`var(--${Lo}-link-warning-border-color)`,"link-warning-border-radius-visited":`var(--${Lo}-link-warning-border-radius)`,"link-warning-outline-visited":`var(--${Lo}-link-warning-outline)`,"link-warning-shadow-visited":`var(--${Lo}-link-warning-shadow)`,"link-warning-text-color-visited":`var(--${Lo}-link-warning-text-color)`},Zo=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Go),Ro),Wo),qo),Qo),Uo),Bo),Po),Ho),Jo),Ko),_o),zo),Yo),Xo),ei="checkbox",ti={color:`var(--${b}-text-color)`,background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"disabled-border-color":`var(--${b}-disabled-border-color)`},oi="drawer",ii={"width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},ni="dropdown",ri={"background-color":"var(--oio-background)","border-color":"var(--oio-border-color)","box-shadow":"0px 0px 6px 0px rgba(0, 0, 0, 0.2)",color:"var(--oio-text-color)","color-hover":"var(--oio-hover-text-color)","color-disabled":"var(--oio-disabled-color)","color-disabled-hover":"var(--oio-disabled-color)","item-background-color-hover":"var(--oio-hover-background-color)","item-background-color-disabled-hover":"transparent"},ai="form-item",li={config:{readonlyShowPlaceholder:!1,disabledShowPlaceholder:!1},"label-color":"var(--oio-text-color)","label-weight":"bold"},si="header",ci={"border-bottom":"var(--oio-border-color)",color:"rgba(255,255,255,0.65)"},di="input",ui=`${b}-${di}`,pi={background:"#15232E","background-color":"#15232E","border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","background-hover":`var(--${ui}-background)`,"border-width-hover":`var(--${ui}-border-width)`,"border-style-hover":`var(--${ui}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${ui}-border-radius)`,"outline-hover":`var(--${ui}-outline)`,"shadow-hover":`var(--${ui}-shadow)`,"text-color-hover":`var(--${ui}-text-color)`,"background-focus":`var(--${ui}-background)`,"border-width-focus":`var(--${ui}-border-width)`,"border-style-focus":`var(--${ui}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${ui}-border-radius)`,"outline-focus":`var(--${ui}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${ui}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"error-border-color":"#ff4d4f","disabled-border-color":`var(--${b}-disabled-border-color)`,"addon-background":"#303B48","addon-color":"rgba(255,255,255,0.65)","tag-background":"rgba(3,93,255,0.2)","ready-delete-tag-background":"rgba(224, 32, 32, 0.2)","ready-delete-tag-color":"#ff4d4f","clear-background":"#000","clear-color":"var(--oio-text-color)"},bi="menu",gi=()=>$e(),vi="modal",mi={color:"rgba(255, 255, 255, 0.85)","width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},yi="multi-tabs",hi={background:`var(--${b}-body-background)`,color:`var(--${b}-text-color)`,"active-color":"#ffffff","active-font-weight":500,"active-background":`var(--${b}-background)`,"icon-color":"rgba(255, 255, 255, 0.3)","hover-background-color":"rgba(255, 255, 255, 0.10)","background-color-inline":`var(--${b}-background)`,"color-inline":`var(--${b}-text-color)`,"active-color-inline":`var(--${b}-primary-color)`,"active-background-color-inline":`var(--${b}-body-background)`,"hover-background-color-inline":`var(--${b}-body-background)`,"background-color-theme1":`var(--${b}-body-background)`,"background-color-active-theme1":`var(--${b}-background)`,"border-color-theme1":"var(--oio-border-color)","background-color-theme1-inline":`var(--${b}-background)`,"background-color-active-theme1-inline":"rgba(255, 255, 255, 0.2)","active-color-active-theme1-inline":"#ffffff","icon-color-active-theme1-inline":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme2":`var(--${b}-background)`,"border-color-theme2":"var(--oio-border-color)","background-color-theme3":`var(--${b}-body-background)`,"background-color-active-theme3":"rgba(255, 255, 255, 0.2)","active-color-active-theme3":"#ffffff","icon-color-active-theme3":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme3-inline":`var(--${b}-background)`,"background-color-theme4-inline":`var(--${b}-background)`,"background-color-active-theme4-inline":"rgba(255, 255, 255, 0.2)","active-color-active-theme4-inline":"#ffffff","icon-color-active-theme4-inline":`var(--${b}-multi-tabs-icon-color)`},fi="pagination",Oi={background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"text-color":`var(--${b}-text-color)`},wi="popconfirm",ji={background:"var(--oio-background)",color:"var(--oio-text-color)",borderColor:"var(--oio-border-color)",arrowBackground:"ar(--oio-background)"},ki="rich-text",Ci={"textarea-bg-color":`var(--${b}-background)`,"textarea-color":`var(--${b}-text-color)`,"textarea-border-color":`var(--${b}-border-color)`,"textarea-slight-border-color":`var(--${b}-border-color)`,"textarea-slight-color":`var(--${b}-text-color)`,"textarea-slight-bg-color":`var(--${b}-body-background)`,"textarea-selected-border-color":"#333e4c","textarea-handler-bg-color":"#4290f7","toolbar-color":`var(--${b}-select-dropdown-color)`,"toolbar-bg-color":`var(--${b}-select-dropdown-background)`,"toolbar-active-color":`var(--${b}-select-dropdown-selected-color)`,"toolbar-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-color-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-disabled-color":`var(--${b}-disabled-color)`,"toolbar-border-color":`var(--${b}-border-color)`,"modal-button-bg-color":"#fafafa","modal-button-border-color":"#d9d9d9","button-tooltip-bg-color":"#333","button-tooltip-color":"#fff"},Di="scrollbar",Ti={"thumb-background-color":"#7e7e7e","thumb-background-color-hover":"#999999"},$i="select",Ei=`${b}-${$i}`,Si={background:"#15232E","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#15232E","counter-color":"rgba(255,255,255,0.65)","counter-font-size":`var(--${b}-font-size-sm)`,"background-hover":`var(--${Ei}-background)`,"border-width-hover":`var(--${Ei}-border-width)`,"border-style-hover":`var(--${Ei}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Ei}-border-radius)`,"outline-hover":`var(--${Ei}-outline)`,"shadow-hover":`var(--${Ei}-shadow)`,"text-color-hover":`var(--${Ei}-text-color)`,"background-focus":`var(--${Ei}-background)`,"border-width-focus":`var(--${Ei}-border-width)`,"border-style-focus":`var(--${Ei}-border-style)`,"border-color-focus":`var(--${b}-primary-color-focus)`,"border-radius-focus":`var(--${Ei}-border-radius)`,"outline-focus":`var(--${Ei}-outline)`,"shadow-focus":"0px 0px 0px 2px rgba(3,93,255,0.1);","text-color-focus":`var(--${Ei}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"item-readonly-bg":`var(--${b}-primary-color-rgb)`,"item-readonly-color":`var(--${b}-primary-color)`,"item-readonly-radius":`var(--${b}-border-radius)`,"dropdown-background":"#1F2935","dropdown-selected-color":"#fff","dropdown-color":"rgba(255,255,255,0.65)","dropdown-selected":"rgba(255,255,255,0.1)","dropdown-hover-color":"rgba(255,255,255,0.65)","dropdown-hover-background":"rgba(255,255,255,0.1)","dropdown-box-shadow":"0px 0px 6px 0px rgba(0,0,0,0.2)"},Ni="switch",Vi={background:"rgba(255,255,255,0.25)"},xi="table",Ii={"thead-bg":"var(--oio-background)","body-bg":"var(--oio-background)","text-color":`var(--${b}-text-color)`,"title-color":"rgba(255,255,255,0.85)","title-font-weight":500,"title-sort-icon-size":"11px","tr-height":`var(--${b}-height-lg)`,"tr-stripe-bg":"rgba(255,255,255,0.1)","tr-checked-bg":"rgba(255,255,255,0.1)","tr-hover-bg":"rgba(255,255,255,0.1)","row-border":"rgba(51,62,76,1)","row-body-border":"rgba(51,62,76,1)",config:{border:"full",stripe:!1,isCurrent:!0,isHover:!0}},Mi="tabs",Ai={"card-tab-background":"var(--oio-background)","card-tab-active-background":"var(--oio-stripe-color)","active-text-color":"#fff"},Fi="textarea",Li=`${b}-${Fi}`,Ri={background:"#15232E","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${Li}-background)`,"border-width-hover":`var(--${Li}-border-width)`,"border-style-hover":`var(--${Li}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Li}-border-radius)`,"outline-hover":`var(--${Li}-outline)`,"shadow-hover":`var(--${Li}-shadow)`,"text-color-hover":`var(--${Li}-text-color)`,"background-focus":`var(--${Li}-background)`,"border-width-focus":`var(--${Li}-border-width)`,"border-style-focus":`var(--${Li}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${Li}-border-radius)`,"outline-focus":`var(--${Li}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${Li}-text-color)`},Bi="transfer",_i={"background-color":"var(--oio-background)","header-border-color":"var(--oio-border-color)"},Wi="tree-select",Pi="upload",zi=`${b}-${Pi}`,Gi={background:`var(--${b}-background)`,"border-width":`var(--${b}-border-width)`,"border-style":"dashed","border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${zi}-background)`,"border-width-hover":`var(--${zi}-border-width)`,"border-style-hover":`var(--${zi}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${zi}-border-radius)`,"outline-hover":`var(--${zi}-outline)`,"shadow-hover":`var(--${zi}-shadow)`,"text-color-hover":`var(--${zi}-text-color)`,"background-focus":`var(--${zi}-background)`,"border-width-focus":`var(--${zi}-border-width)`,"border-style-focus":`var(--${zi}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${zi}-border-radius)`,"outline-focus":`var(--${zi}-outline)`,"shadow-focus":`var(--${zi}-shadow)`,"text-color-focus":`var(--${zi}-text-color)`},Ui="card",Ki={"action-background":`var(--${b}-background)`,"action-border-color":`var(--${b}-border-color)`,"action-divider-color":`var(--${b}-border-color)`,"action-text-color":`var(--${b}-primary-color)`},qi=()=>({[yi]:{large:Object.assign({},hi),medium:Object.assign({},hi),small:Object.assign({},hi)},[Fo]:{large:Zo,medium:Zo,small:Zo},[di]:{large:Object.assign(Object.assign({},pi),m),medium:Object.assign(Object.assign({},pi),y),small:Object.assign(Object.assign({},pi),y)},[ei]:{large:Object.assign({},ti),medium:Object.assign({},ti),small:Object.assign({},ti)},[Ni]:{large:Object.assign({},Vi),medium:Object.assign({},Vi),small:Object.assign({},Vi)},[fi]:{large:Object.assign(Object.assign({},Oi),C),medium:Object.assign(Object.assign({},Oi),D),small:Object.assign(Object.assign({},Oi),T)},[$i]:{large:Object.assign(Object.assign({},Si),$),medium:Object.assign(Object.assign({},Si),E),small:Object.assign(Object.assign({},Si),S)},[Fi]:{large:Ri,medium:Ri,small:Ri},[Pi]:{large:Gi,medium:Gi,small:Gi},[bi]:{large:Object.assign(Object.assign({},gi()),w),medium:Object.assign(Object.assign({},gi()),j),small:Object.assign(Object.assign({},gi()),k)},[Mo]:{large:Ao,medium:Ao,small:Ao},[xi]:{large:Object.assign(Object.assign({},Ii),h),medium:Object.assign(Object.assign({},Ii),f),small:Object.assign(Object.assign({},Ii),O)},[si]:{large:ci,medium:ci,small:ci},[vi]:{large:mi,medium:mi,small:mi},[wi]:{large:ji,medium:ji,small:ji},[Wi]:{large:N,medium:V,small:x},[Bi]:{large:_i,medium:_i,small:_i},[Di]:{large:Ti,medium:Ti,small:Ti},[oi]:{large:ii,medium:ii,small:ii},[ni]:{large:ri,medium:ri,small:ri},[ai]:{large:li,medium:li,small:li},[ki]:{large:Ci,medium:Ci,small:Ci},[Mi]:{large:Object.assign(Object.assign({},I),Ai),medium:Object.assign(Object.assign({},M),Ai),small:Object.assign(Object.assign({},A),Ai)},[Ui]:{large:Ki,medium:Ki,small:Ki}});function Hi(e){return function(t,o){Object.entries(o).forEach(([o,i])=>{e[`${t}-${o}`]=i})}}function Yi(e){const t="large"===e?l:"medium"===e?s:c,o=Object.assign(Object.assign({},ye),t),i=Hi(o),r=qi();Object.entries(r).forEach(([t,o])=>{o[e]&&i(t,o[e])}),n("dark-"+e,o)}function Qi(){Yi("large"),Yi("medium"),Yi("small")}const Ji="app-switch",Xi={"background-color":"#333E4C","border-color":"var(--oio-border-color)","app-name-overflow":"unset","app-name-margin-right":"8px","app-name-caret-down-display":"unset","logo-color":`var(--${b}-primary-color)`,"designer-background-color":`var(--${b}-primary-color)`,"designer-logo-color":`var(--${b}-primary-color)`},Zi="button",en=`${b}-${Zi}`,tn={"default-danger-background":`var(--${en}-background)`,"default-danger-border-width":`var(--${en}-border-width)`,"default-danger-border-style":`var(--${en}-border-style)`,"default-danger-border-color":`var(--${b}-error-color)`,"default-danger-border-radius":`var(--${en}-border-radius)`,"default-danger-outline":`var(--${b}-error-color-outline)`,"default-danger-shadow":"none","default-danger-text-color":`var(--${b}-error-color)`,"default-danger-background-active":`var(--${en}-default-danger-background)`,"default-danger-border-width-active":`var(--${en}-default-danger-border-width)`,"default-danger-border-style-active":`var(--${en}-default-danger-border-style)`,"default-danger-border-color-active":`var(--${b}-error-color-active)`,"default-danger-border-radius-active":`var(--${en}-default-danger-border-radius)`,"default-danger-outline-active":`var(--${en}-default-danger-outline)`,"default-danger-shadow-active":`var(--${en}-default-danger-shadow)`,"default-danger-text-color-active":`var(--${b}-error-color-active)`,"default-danger-background-focus":`var(--${en}-default-danger-background)`,"default-danger-border-width-focus":`var(--${en}-default-danger-border-width)`,"default-danger-border-style-focus":`var(--${en}-default-danger-border-style)`,"default-danger-border-color-focus":`var(--${b}-error-color-focus)`,"default-danger-border-radius-focus":`var(--${en}-default-danger-border-radius)`,"default-danger-outline-focus":`var(--${en}-default-danger-outline)`,"default-danger-shadow-focus":`var(--${en}-default-danger-shadow)`,"default-danger-text-color-focus":`var(--${b}-error-color-focus)`,"default-danger-background-hover":`var(--${en}-default-danger-background)`,"default-danger-border-width-hover":`var(--${en}-default-danger-border-width)`,"default-danger-border-style-hover":`var(--${en}-default-danger-border-style)`,"default-danger-border-color-hover":`var(--${b}-error-color-hover)`,"default-danger-border-radius-hover":`var(--${en}-default-danger-border-radius)`,"default-danger-outline-hover":`var(--${en}-default-danger-outline)`,"default-danger-shadow-hover":`var(--${en}-default-danger-shadow)`,"default-danger-text-color-hover":`var(--${b}-error-color-hover)`,"default-danger-background-visited":`var(--${en}-default-danger-background)`,"default-danger-border-width-visited":`var(--${en}-default-danger-border-width)`,"default-danger-border-style-visited":`var(--${en}-default-danger-border-style)`,"default-danger-border-color-visited":`var(--${en}-default-danger-border-color)`,"default-danger-border-radius-visited":`var(--${en}-default-danger-border-radius)`,"default-danger-outline-visited":`var(--${en}-default-danger-outline)`,"default-danger-shadow-visited":`var(--${en}-default-danger-shadow)`,"default-danger-text-color-visited":`var(--${en}-default-danger-text-color)`},on={"primary-danger-background":`var(--${b}-error-color)`,"primary-danger-border-width":`var(--${en}-primary-border-width)`,"primary-danger-border-style":`var(--${en}-primary-border-style)`,"primary-danger-border-color":`var(--${b}-error-color)`,"primary-danger-border-radius":`var(--${en}-primary-border-radius)`,"primary-danger-outline":`var(--${b}-error-color)`,"primary-danger-shadow":"none","primary-danger-text-color":"#ffffff","primary-danger-background-active":`var(--${b}-error-color-active)`,"primary-danger-border-width-active":`var(--${en}-primary-danger-border-width)`,"primary-danger-border-style-active":`var(--${en}-primary-danger-border-style)`,"primary-danger-border-color-active":`var(--${b}-error-color-active)`,"primary-danger-border-radius-active":`var(--${en}-primary-danger-border-radius)`,"primary-danger-outline-active":`var(--${en}-primary-danger-outline)`,"primary-danger-shadow-active":`var(--${en}-primary-danger-shadow)`,"primary-danger-text-color-active":`var(--${en}-primary-danger-text-color)`,"primary-danger-background-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-width-focus":`var(--${en}-primary-danger-border-width)`,"primary-danger-border-style-focus":`var(--${en}-primary-danger-border-style)`,"primary-danger-border-color-focus":`var(--${b}-error-color-focus)`,"primary-danger-border-radius-focus":`var(--${en}-primary-danger-border-radius)`,"primary-danger-outline-focus":`var(--${en}-primary-danger-outline)`,"primary-danger-shadow-focus":`var(--${en}-primary-danger-shadow)`,"primary-danger-text-color-focus":`var(--${en}-primary-danger-text-color)`,"primary-danger-background-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-width-hover":`var(--${en}-primary-danger-border-width)`,"primary-danger-border-style-hover":`var(--${en}-primary-danger-border-style)`,"primary-danger-border-color-hover":`var(--${b}-error-color-hover)`,"primary-danger-border-radius-hover":`var(--${en}-primary-danger-border-radius)`,"primary-danger-outline-hover":`var(--${en}-primary-danger-outline)`,"primary-danger-shadow-hover":`var(--${en}-primary-danger-shadow)`,"primary-danger-text-color-hover":`var(--${en}-primary-danger-text-color)`,"primary-danger-background-visited":`var(--${en}-primary-danger-background)`,"primary-danger-border-width-visited":`var(--${en}-primary-danger-border-width)`,"primary-danger-border-style-visited":`var(--${en}-primary-danger-border-style)`,"primary-danger-border-color-visited":`var(--${en}-primary-danger-border-color)`,"primary-danger-border-radius-visited":`var(--${en}-primary-danger-border-radius)`,"primary-danger-outline-visited":`var(--${en}-primary-danger-outline)`,"primary-danger-shadow-visited":`var(--${en}-primary-danger-shadow)`,"primary-danger-text-color-visited":`var(--${en}-primary-danger-text-color)`},nn={"link-danger-background":`var(--${en}-link-background)`,"link-danger-border-width":`var(--${en}-link-border-width)`,"link-danger-border-style":`var(--${en}-link-border-style)`,"link-danger-border-color":`var(--${en}-link-border-color)`,"link-danger-border-radius":`var(--${en}-link-border-radius)`,"link-danger-outline":"none","link-danger-shadow":"none","link-danger-text-color":`var(--${b}-error-color)`,"link-danger-background-active":`var(--${en}-link-danger-color)`,"link-danger-border-width-active":`var(--${en}-link-danger-border-width)`,"link-danger-border-style-active":`var(--${en}-link-danger-border-style)`,"link-danger-border-color-active":`var(--${en}-link-danger-color)`,"link-danger-border-radius-active":`var(--${en}-link-danger-border-radius)`,"link-danger-outline-active":`var(--${en}-link-danger-outline)`,"link-danger-shadow-active":`var(--${en}-link-danger-shadow)`,"link-danger-text-color-active":`var(--${b}-error-color-active)`,"link-danger-background-focus":`var(--${en}-link-danger-color)`,"link-danger-border-width-focus":`var(--${en}-link-danger-border-width)`,"link-danger-border-style-focus":`var(--${en}-link-danger-border-style)`,"link-danger-border-color-focus":`var(--${en}-link-danger-color)`,"link-danger-border-radius-focus":`var(--${en}-link-danger-border-radius)`,"link-danger-outline-focus":`var(--${en}-link-danger-outline)`,"link-danger-shadow-focus":`var(--${en}-link-danger-shadow)`,"link-danger-text-color-focus":`var(--${b}-error-color-focus)`,"link-danger-background-hover":`var(--${en}-link-danger-color)`,"link-danger-border-width-hover":`var(--${en}-link-danger-border-width)`,"link-danger-border-style-hover":`var(--${en}-link-danger-border-style)`,"link-danger-border-color-hover":`var(--${en}-link-danger-color)`,"link-danger-border-radius-hover":`var(--${en}-link-danger-border-radius)`,"link-danger-outline-hover":`var(--${en}-link-danger-outline)`,"link-danger-shadow-hover":`var(--${en}-link-danger-shadow)`,"link-danger-text-color-hover":`var(--${b}-error-color-hover)`,"link-danger-background-visited":`var(--${en}-link-danger-background)`,"link-danger-border-width-visited":`var(--${en}-link-danger-border-width)`,"link-danger-border-style-visited":`var(--${en}-link-danger-border-style)`,"link-danger-border-color-visited":`var(--${en}-link-danger-border-color)`,"link-danger-border-radius-visited":`var(--${en}-link-danger-border-radius)`,"link-danger-outline-visited":`var(--${en}-link-danger-outline)`,"link-danger-shadow-visited":`var(--${en}-link-danger-shadow)`,"link-danger-text-color-visited":`var(--${en}-link-danger-text-color)`},rn={"default-info-background":`var(--${en}-background)`,"default-info-border-width":`var(--${en}-border-width)`,"default-info-border-style":`var(--${en}-border-style)`,"default-info-border-color":`var(--${b}-info-color)`,"default-info-border-radius":`var(--${en}-border-radius)`,"default-info-outline":"none","default-info-shadow":"none","default-info-text-color":`var(--${b}-info-color)`,"default-info-background-active":`var(--${en}-default-info-background)`,"default-info-border-width-active":`var(--${en}-default-info-border-width)`,"default-info-border-style-active":`var(--${en}-default-info-border-style)`,"default-info-border-color-active":`var(--${b}-info-color-active)`,"default-info-border-radius-active":`var(--${en}-default-info-border-radius)`,"default-info-outline-active":`var(--${en}-default-info-outline)`,"default-info-shadow-active":`var(--${en}-default-info-shadow)`,"default-info-text-color-active":`var(--${b}-info-color-active)`,"default-info-background-focus":`var(--${en}-default-info-background)`,"default-info-border-width-focus":`var(--${en}-default-info-border-width)`,"default-info-border-style-focus":`var(--${en}-default-info-border-style)`,"default-info-border-color-focus":`var(--${b}-info-color-focus)`,"default-info-border-radius-focus":`var(--${en}-default-info-border-radius)`,"default-info-outline-focus":`var(--${en}-default-info-outline)`,"default-info-shadow-focus":`var(--${en}-default-info-shadow)`,"default-info-text-color-focus":`var(--${b}-info-color-focus)`,"default-info-background-hover":`var(--${en}-default-info-background)`,"default-info-border-width-hover":`var(--${en}-default-info-border-width)`,"default-info-border-style-hover":`var(--${en}-default-info-border-style)`,"default-info-border-color-hover":`var(--${b}-info-color-hover)`,"default-info-border-radius-hover":`var(--${en}-default-info-border-radius)`,"default-info-outline-hover":`var(--${en}-default-info-outline)`,"default-info-shadow-hover":`var(--${en}-default-info-shadow)`,"default-info-text-color-hover":`var(--${b}-info-color-hover)`,"default-info-background-visited":`var(--${en}-default-info-background)`,"default-info-border-width-visited":`var(--${en}-default-info-border-width)`,"default-info-border-style-visited":`var(--${en}-default-info-border-style)`,"default-info-border-color-visited":`var(--${en}-default-info-border-color)`,"default-info-border-radius-visited":`var(--${en}-default-info-border-radius)`,"default-info-outline-visited":`var(--${en}-default-info-outline)`,"default-info-shadow-visited":`var(--${en}-default-info-shadow)`,"default-info-text-color-visited":`var(--${en}-default-info-text-color)`},an={"primary-info-background":`var(--${b}-info-color)`,"primary-info-border-width":`var(--${en}-primary-border-width)`,"primary-info-border-style":`var(--${en}-primary-border-style)`,"primary-info-border-color":`var(--${b}-info-color)`,"primary-info-border-radius":`var(--${en}-primary-border-radius)`,"primary-info-outline":"none","primary-info-shadow":"none","primary-info-text-color":"#ffffff","primary-info-background-active":`var(--${b}-info-color-active)`,"primary-info-border-width-active":`var(--${en}-primary-info-border-width)`,"primary-info-border-style-active":`var(--${en}-primary-info-border-style)`,"primary-info-border-color-active":`var(--${b}-info-color-active)`,"primary-info-border-radius-active":`var(--${en}-primary-info-border-radius)`,"primary-info-outline-active":`var(--${en}-primary-info-outline)`,"primary-info-shadow-active":`var(--${en}-primary-info-shadow)`,"primary-info-text-color-active":`var(--${en}-primary-info-text-color)`,"primary-info-background-focus":`var(--${b}-info-color-focus)`,"primary-info-border-width-focus":`var(--${en}-primary-info-border-width)`,"primary-info-border-style-focus":`var(--${en}-primary-info-border-style)`,"primary-info-border-color-focus":`var(--${b}-info-color-focus)`,"primary-info-border-radius-focus":`var(--${en}-primary-info-border-radius)`,"primary-info-outline-focus":`var(--${en}-primary-info-outline)`,"primary-info-shadow-focus":`var(--${en}-primary-info-shadow)`,"primary-info-text-color-focus":`var(--${en}-primary-info-text-color)`,"primary-info-background-hover":`var(--${b}-info-color-hover)`,"primary-info-border-width-hover":`var(--${en}-primary-info-border-width)`,"primary-info-border-style-hover":`var(--${en}-primary-info-border-style)`,"primary-info-border-color-hover":`var(--${b}-info-color-hover)`,"primary-info-border-radius-hover":`var(--${en}-primary-info-border-radius)`,"primary-info-outline-hover":`var(--${en}-primary-info-outline)`,"primary-info-shadow-hover":`var(--${en}-primary-info-shadow)`,"primary-info-text-color-hover":`var(--${en}-primary-info-text-color)`,"primary-info-background-visited":`var(--${en}-primary-info-background)`,"primary-info-border-width-visited":`var(--${en}-primary-info-border-width)`,"primary-info-border-style-visited":`var(--${en}-primary-info-border-style)`,"primary-info-border-color-visited":`var(--${en}-primary-info-border-color)`,"primary-info-border-radius-visited":`var(--${en}-primary-info-border-radius)`,"primary-info-outline-visited":`var(--${en}-primary-info-outline)`,"primary-info-shadow-visited":`var(--${en}-primary-info-shadow)`,"primary-info-text-color-visited":`var(--${en}-primary-info-text-color)`},ln={"link-info-background":`var(--${en}-link-background)`,"link-info-border-width":`var(--${en}-link-border-width)`,"link-info-border-style":`var(--${en}-link-border-style)`,"link-info-border-color":`var(--${en}-link-border-color)`,"link-info-border-radius":`var(--${en}-link-border-radius)`,"link-info-outline":"none","link-info-shadow":"none","link-info-text-color":`var(--${b}-info-color)`,"link-info-background-active":`var(--${en}-link-info-color)`,"link-info-border-width-active":`var(--${en}-link-info-border-width)`,"link-info-border-style-active":`var(--${en}-link-info-border-style)`,"link-info-border-color-active":`var(--${en}-link-info-color)`,"link-info-border-radius-active":`var(--${en}-link-info-border-radius)`,"link-info-outline-active":`var(--${en}-link-info-outline)`,"link-info-shadow-active":`var(--${en}-link-info-shadow)`,"link-info-text-color-active":`var(--${b}-info-color-active)`,"link-info-background-focus":`var(--${en}-link-info-color)`,"link-info-border-width-focus":`var(--${en}-link-info-border-width)`,"link-info-border-style-focus":`var(--${en}-link-info-border-style)`,"link-info-border-color-focus":`var(--${en}-link-info-color)`,"link-info-border-radius-focus":`var(--${en}-link-info-border-radius)`,"link-info-outline-focus":`var(--${en}-link-info-outline)`,"link-info-shadow-focus":`var(--${en}-link-info-shadow)`,"link-info-text-color-focus":`var(--${b}-info-color-focus)`,"link-info-background-hover":`var(--${en}-link-info-color)`,"link-info-border-width-hover":`var(--${en}-link-info-border-width)`,"link-info-border-style-hover":`var(--${en}-link-info-border-style)`,"link-info-border-color-hover":`var(--${en}-link-info-color)`,"link-info-border-radius-hover":`var(--${en}-link-info-border-radius)`,"link-info-outline-hover":`var(--${en}-link-info-outline)`,"link-info-shadow-hover":`var(--${en}-link-info-shadow)`,"link-info-text-color-hover":`var(--${b}-info-color-hover)`,"link-info-background-visited":`var(--${en}-link-info-background)`,"link-info-border-width-visited":`var(--${en}-link-info-border-width)`,"link-info-border-style-visited":`var(--${en}-link-info-border-style)`,"link-info-border-color-visited":`var(--${en}-link-info-border-color)`,"link-info-border-radius-visited":`var(--${en}-link-info-border-radius)`,"link-info-outline-visited":`var(--${en}-link-info-outline)`,"link-info-shadow-visited":`var(--${en}-link-info-shadow)`,"link-info-text-color-visited":`var(--${en}-link-info-text-color)`},sn={background:`var(--${b}-background)`,"border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-active":`var(--${en}-background)`,"border-width-active":`var(--${en}-border-width)`,"border-style-active":`var(--${en}-border-style)`,"border-color-active":`var(--${en}-border-color)`,"border-radius-active":`var(--${en}-border-radius)`,"outline-active":`var(--${en}-outline)`,"shadow-active":`var(--${en}-shadow)`,"text-color-active":`var(--${b}-primary-color-active)`,"background-focus":`var(--${en}-background)`,"border-width-focus":`var(--${en}-border-width)`,"border-style-focus":`var(--${en}-border-style)`,"border-color-focus":`var(--${en}-border-color)`,"border-radius-focus":`var(--${en}-border-radius)`,"outline-focus":`var(--${en}-outline)`,"shadow-focus":`var(--${en}-shadow)`,"text-color-focus":`var(--${b}-primary-color-focus)`,"background-hover":`var(--${en}-background)`,"border-width-hover":`var(--${en}-border-width)`,"border-style-hover":`var(--${en}-border-style)`,"border-color-hover":`var(--${en}-border-color)`,"border-radius-hover":`var(--${en}-border-radius)`,"outline-hover":`var(--${en}-outline)`,"shadow-hover":`var(--${en}-shadow)`,"text-color-hover":`var(--${b}-primary-color-hover)`,"background-visited":`var(--${en}-background)`,"border-width-visited":`var(--${en}-border-width)`,"border-style-visited":`var(--${en}-border-style)`,"border-color-visited":`var(--${en}-border-color)`,"border-radius-visited":`var(--${en}-border-radius)`,"outline-visited":`var(--${en}-outline)`,"shadow-visited":`var(--${en}-shadow)`,"text-color-visited":`var(--${en}-text-color)`},cn={"primary-background":`var(--${b}-primary-color)`,"primary-border-width":`var(--${b}-border-width)`,"primary-border-style":`var(--${b}-border-style)`,"primary-border-color":`var(--${b}-primary-color)`,"primary-border-radius":`var(--${b}-border-radius)`,"primary-outline":`var(--${b}-primary-color-outline)`,"primary-shadow":"none","primary-text-color":"#ffffff","primary-background-active":`var(--${b}-primary-color-active)`,"primary-border-width-active":`var(--${en}-primary-border-width)`,"primary-border-style-active":`var(--${en}-primary-border-style)`,"primary-border-color-active":`var(--${b}-primary-color-active)`,"primary-border-radius-active":`var(--${en}-primary-border-radius)`,"primary-outline-active":`var(--${en}-primary-outline)`,"primary-shadow-active":`var(--${en}-primary-shadow)`,"primary-text-color-active":`var(--${en}-primary-text-color)`,"primary-background-focus":`var(--${b}-primary-color-focus)`,"primary-border-width-focus":`var(--${en}-primary-border-width)`,"primary-border-style-focus":`var(--${en}-primary-border-style)`,"primary-border-color-focus":`var(--${b}-primary-color-focus)`,"primary-border-radius-focus":`var(--${en}-primary-border-radius)`,"primary-outline-focus":`var(--${en}-primary-outline)`,"primary-shadow-focus":`var(--${en}-primary-shadow)`,"primary-text-color-focus":`var(--${en}-primary-text-color)`,"primary-background-hover":`var(--${b}-primary-color-hover)`,"primary-border-width-hover":`var(--${en}-primary-border-width)`,"primary-border-style-hover":`var(--${en}-primary-border-style)`,"primary-border-color-hover":`var(--${b}-primary-color-hover)`,"primary-border-radius-hover":`var(--${en}-primary-border-radius)`,"primary-outline-hover":`var(--${en}-primary-outline)`,"primary-shadow-hover":`var(--${en}-primary-shadow)`,"primary-text-color-hover":`var(--${en}-primary-text-color)`,"primary-background-visited":`var(--${en}-primary-background)`,"primary-border-width-visited":`var(--${en}-primary-border-width)`,"primary-border-style-visited":`var(--${en}-primary-border-style)`,"primary-border-color-visited":`var(--${en}-primary-border-color)`,"primary-border-radius-visited":`var(--${en}-primary-border-radius)`,"primary-outline-visited":`var(--${en}-primary-outline)`,"primary-shadow-visited":`var(--${en}-primary-shadow)`,"primary-text-color-visited":`var(--${en}-primary-text-color)`},dn={"link-background":"transparent","link-border-width":"none","link-border-style":"none","link-border-color":"none","link-border-radius":"none","link-outline":"none","link-shadow":"none","link-text-color":`var(--${b}-primary-color)`,"link-background-active":`var(--${en}-link-background)`,"link-border-width-active":`var(--${en}-link-border-width)`,"link-border-style-active":`var(--${en}-link-border-style)`,"link-border-color-active":`var(--${en}-link-border-color)`,"link-border-radius-active":`var(--${en}-link-border-radius)`,"link-outline-active":`var(--${en}-link-outline)`,"link-shadow-active":`var(--${en}-link-shadow)`,"link-text-color-active":`var(--${en}-link-text-color)`,"link-background-focus":`var(--${en}-link-background)`,"link-border-width-focus":`var(--${en}-link-border-width)`,"link-border-style-focus":`var(--${en}-link-border-style)`,"link-border-color-focus":`var(--${en}-link-border-color)`,"link-border-radius-focus":`var(--${en}-link-border-radius)`,"link-outline-focus":`var(--${en}-link-outline)`,"link-shadow-focus":`var(--${en}-link-shadow)`,"link-text-color-focus":`var(--${en}-link-text-color)`,"link-background-hover":`var(--${en}-link-background)`,"link-border-width-hover":`var(--${en}-link-border-width)`,"link-border-style-hover":`var(--${en}-link-border-style)`,"link-border-color-hover":`var(--${en}-link-border-color)`,"link-border-radius-hover":`var(--${en}-link-border-radius)`,"link-outline-hover":`var(--${en}-link-outline)`,"link-shadow-hover":`var(--${en}-link-shadow)`,"link-text-color-hover":`var(--${en}-link-text-color)`,"link-background-visited":`var(--${en}-link-background)`,"link-border-width-visited":`var(--${en}-link-border-width)`,"link-border-style-visited":`var(--${en}-link-border-style)`,"link-border-color-visited":`var(--${en}-link-border-color)`,"link-border-radius-visited":`var(--${en}-link-border-radius)`,"link-outline-visited":`var(--${en}-link-outline)`,"link-shadow-visited":`var(--${en}-link-shadow)`,"link-text-color-visited":`var(--${en}-link-text-color)`},un={"default-success-background":`var(--${en}-background)`,"default-success-border-width":`var(--${en}-border-width)`,"default-success-border-style":`var(--${en}-border-style)`,"default-success-border-color":`var(--${b}-success-color)`,"default-success-border-radius":`var(--${en}-border-radius)`,"default-success-outline":"none","default-success-shadow":"none","default-success-text-color":`var(--${b}-success-color)`,"default-success-background-active":`var(--${en}-default-success-background)`,"default-success-border-width-active":`var(--${en}-default-success-border-width)`,"default-success-border-style-active":`var(--${en}-default-success-border-style)`,"default-success-border-color-active":`var(--${b}-success-color-active)`,"default-success-border-radius-active":`var(--${en}-default-success-border-radius)`,"default-success-outline-active":`var(--${en}-default-success-outline)`,"default-success-shadow-active":`var(--${en}-default-success-shadow)`,"default-success-text-color-active":`var(--${b}-success-color-active)`,"default-success-background-focus":`var(--${en}-default-success-background)`,"default-success-border-width-focus":`var(--${en}-default-success-border-width)`,"default-success-border-style-focus":`var(--${en}-default-success-border-style)`,"default-success-border-color-focus":`var(--${b}-success-color-focus)`,"default-success-border-radius-focus":`var(--${en}-default-success-border-radius)`,"default-success-outline-focus":`var(--${en}-default-success-outline)`,"default-success-shadow-focus":`var(--${en}-default-success-shadow)`,"default-success-text-color-focus":`var(--${b}-success-color-focus)`,"default-success-background-hover":`var(--${en}-default-success-background)`,"default-success-border-width-hover":`var(--${en}-default-success-border-width)`,"default-success-border-style-hover":`var(--${en}-default-success-border-style)`,"default-success-border-color-hover":`var(--${b}-success-color-hover)`,"default-success-border-radius-hover":`var(--${en}-default-success-border-radius)`,"default-success-outline-hover":`var(--${en}-default-success-outline)`,"default-success-shadow-hover":`var(--${en}-default-success-shadow)`,"default-success-text-color-hover":`var(--${b}-success-color-hover)`,"default-success-background-visited":`var(--${en}-default-success-background)`,"default-success-border-width-visited":`var(--${en}-default-success-border-width)`,"default-success-border-style-visited":`var(--${en}-default-success-border-style)`,"default-success-border-color-visited":`var(--${en}-default-success-border-color)`,"default-success-border-radius-visited":`var(--${en}-default-success-border-radius)`,"default-success-outline-visited":`var(--${en}-default-success-outline)`,"default-success-shadow-visited":`var(--${en}-default-success-shadow)`,"default-success-text-color-visited":`var(--${en}-default-success-text-color)`},pn={"primary-success-background":`var(--${b}-success-color)`,"primary-success-border-width":`var(--${en}-primary-border-width)`,"primary-success-border-style":`var(--${en}-primary-border-style)`,"primary-success-border-color":`var(--${b}-success-color)`,"primary-success-border-radius":`var(--${en}-primary-border-radius)`,"primary-success-outline":"none","primary-success-shadow":"none","primary-success-text-color":"#ffffff","primary-success-background-active":`var(--${b}-success-color-active)`,"primary-success-border-width-active":`var(--${en}-primary-success-border-width)`,"primary-success-border-style-active":`var(--${en}-primary-success-border-style)`,"primary-success-border-color-active":`var(--${b}-success-color-active)`,"primary-success-border-radius-active":`var(--${en}-primary-success-border-radius)`,"primary-success-outline-active":`var(--${en}-primary-success-outline)`,"primary-success-shadow-active":`var(--${en}-primary-success-shadow)`,"primary-success-text-color-active":`var(--${en}-primary-success-text-color)`,"primary-success-background-focus":`var(--${b}-success-color-focus)`,"primary-success-border-width-focus":`var(--${en}-primary-success-border-width)`,"primary-success-border-style-focus":`var(--${en}-primary-success-border-style)`,"primary-success-border-color-focus":`var(--${b}-success-color-focus)`,"primary-success-border-radius-focus":`var(--${en}-primary-success-border-radius)`,"primary-success-outline-focus":`var(--${en}-primary-success-outline)`,"primary-success-shadow-focus":`var(--${en}-primary-success-shadow)`,"primary-success-text-color-focus":`var(--${en}-primary-success-text-color)`,"primary-success-background-hover":`var(--${b}-success-color-hover)`,"primary-success-border-width-hover":`var(--${en}-primary-success-border-width)`,"primary-success-border-style-hover":`var(--${en}-primary-success-border-style)`,"primary-success-border-color-hover":`var(--${b}-success-color-hover)`,"primary-success-border-radius-hover":`var(--${en}-primary-success-border-radius)`,"primary-success-outline-hover":`var(--${en}-primary-success-outline)`,"primary-success-shadow-hover":`var(--${en}-primary-success-shadow)`,"primary-success-text-color-hover":`var(--${en}-primary-success-text-color)`,"primary-success-background-visited":`var(--${en}-primary-success-background)`,"primary-success-border-width-visited":`var(--${en}-primary-success-border-width)`,"primary-success-border-style-visited":`var(--${en}-primary-success-border-style)`,"primary-success-border-color-visited":`var(--${en}-primary-success-border-color)`,"primary-success-border-radius-visited":`var(--${en}-primary-success-border-radius)`,"primary-success-outline-visited":`var(--${en}-primary-success-outline)`,"primary-success-shadow-visited":`var(--${en}-primary-success-shadow)`,"primary-success-text-color-visited":`var(--${en}-primary-success-text-color)`},bn={"link-success-background":`var(--${en}-link-background)`,"link-success-border-width":`var(--${en}-link-border-width)`,"link-success-border-style":`var(--${en}-link-border-style)`,"link-success-border-color":`var(--${en}-link-border-color)`,"link-success-border-radius":`var(--${en}-link-border-radius)`,"link-success-outline":"none","link-success-shadow":"none","link-success-text-color":`var(--${b}-success-color)`,"link-success-background-active":`var(--${en}-link-success-color)`,"link-success-border-width-active":`var(--${en}-link-success-border-width)`,"link-success-border-style-active":`var(--${en}-link-success-border-style)`,"link-success-border-color-active":`var(--${en}-link-success-color)`,"link-success-border-radius-active":`var(--${en}-link-success-border-radius)`,"link-success-outline-active":`var(--${en}-link-success-outline)`,"link-success-shadow-active":`var(--${en}-link-success-shadow)`,"link-success-text-color-active":`var(--${b}-success-color-active)`,"link-success-background-focus":`var(--${en}-link-success-color)`,"link-success-border-width-focus":`var(--${en}-link-success-border-width)`,"link-success-border-style-focus":`var(--${en}-link-success-border-style)`,"link-success-border-color-focus":`var(--${en}-link-success-color)`,"link-success-border-radius-focus":`var(--${en}-link-success-border-radius)`,"link-success-outline-focus":`var(--${en}-link-success-outline)`,"link-success-shadow-focus":`var(--${en}-link-success-shadow)`,"link-success-text-color-focus":`var(--${b}-success-color-focus)`,"link-success-background-hover":`var(--${en}-link-success-color)`,"link-success-border-width-hover":`var(--${en}-link-success-border-width)`,"link-success-border-style-hover":`var(--${en}-link-success-border-style)`,"link-success-border-color-hover":`var(--${en}-link-success-color)`,"link-success-border-radius-hover":`var(--${en}-link-success-border-radius)`,"link-success-outline-hover":`var(--${en}-link-success-outline)`,"link-success-shadow-hover":`var(--${en}-link-success-shadow)`,"link-success-text-color-hover":`var(--${b}-success-color-hover)`,"link-success-background-visited":`var(--${en}-link-success-background)`,"link-success-border-width-visited":`var(--${en}-link-success-border-width)`,"link-success-border-style-visited":`var(--${en}-link-success-border-style)`,"link-success-border-color-visited":`var(--${en}-link-success-border-color)`,"link-success-border-radius-visited":`var(--${en}-link-success-border-radius)`,"link-success-outline-visited":`var(--${en}-link-success-outline)`,"link-success-shadow-visited":`var(--${en}-link-success-shadow)`,"link-success-text-color-visited":`var(--${en}-link-success-text-color)`},gn={"default-warning-background":`var(--${en}-background)`,"default-warning-border-width":`var(--${en}-border-width)`,"default-warning-border-style":`var(--${en}-border-style)`,"default-warning-border-color":`var(--${b}-warning-color)`,"default-warning-border-radius":`var(--${en}-border-radius)`,"default-warning-outline":"none","default-warning-shadow":"none","default-warning-text-color":`var(--${b}-warning-color)`,"default-warning-background-active":`var(--${en}-default-warning-background)`,"default-warning-border-width-active":`var(--${en}-default-warning-border-width)`,"default-warning-border-style-active":`var(--${en}-default-warning-border-style)`,"default-warning-border-color-active":`var(--${b}-warning-color-active)`,"default-warning-border-radius-active":`var(--${en}-default-warning-border-radius)`,"default-warning-outline-active":`var(--${en}-default-warning-outline)`,"default-warning-shadow-active":`var(--${en}-default-warning-shadow)`,"default-warning-text-color-active":`var(--${b}-warning-color-active)`,"default-warning-background-focus":`var(--${en}-default-warning-background)`,"default-warning-border-width-focus":`var(--${en}-default-warning-border-width)`,"default-warning-border-style-focus":`var(--${en}-default-warning-border-style)`,"default-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-border-radius-focus":`var(--${en}-default-warning-border-radius)`,"default-warning-outline-focus":`var(--${en}-default-warning-outline)`,"default-warning-shadow-focus":`var(--${en}-default-warning-shadow)`,"default-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"default-warning-background-hover":`var(--${en}-default-warning-background)`,"default-warning-border-width-hover":`var(--${en}-default-warning-border-width)`,"default-warning-border-style-hover":`var(--${en}-default-warning-border-style)`,"default-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-border-radius-hover":`var(--${en}-default-warning-border-radius)`,"default-warning-outline-hover":`var(--${en}-default-warning-outline)`,"default-warning-shadow-hover":`var(--${en}-default-warning-shadow)`,"default-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"default-warning-background-visited":`var(--${en}-default-warning-background)`,"default-warning-border-width-visited":`var(--${en}-default-warning-border-width)`,"default-warning-border-style-visited":`var(--${en}-default-warning-border-style)`,"default-warning-border-color-visited":`var(--${en}-default-warning-border-color)`,"default-warning-border-radius-visited":`var(--${en}-default-warning-border-radius)`,"default-warning-outline-visited":`var(--${en}-default-warning-outline)`,"default-warning-shadow-visited":`var(--${en}-default-warning-shadow)`,"default-warning-text-color-visited":`var(--${en}-default-warning-text-color)`},vn={"primary-warning-background":`var(--${b}-warning-color)`,"primary-warning-border-width":`var(--${en}-primary-border-width)`,"primary-warning-border-style":`var(--${en}-primary-border-style)`,"primary-warning-border-color":`var(--${b}-warning-color)`,"primary-warning-border-radius":`var(--${en}-primary-border-radius)`,"primary-warning-outline":"none","primary-warning-shadow":"none","primary-warning-text-color":"#ffffff","primary-warning-background-active":`var(--${b}-warning-color-active)`,"primary-warning-border-width-active":`var(--${en}-primary-warning-border-width)`,"primary-warning-border-style-active":`var(--${en}-primary-warning-border-style)`,"primary-warning-border-color-active":`var(--${b}-warning-color-active)`,"primary-warning-border-radius-active":`var(--${en}-primary-warning-border-radius)`,"primary-warning-outline-active":`var(--${en}-primary-warning-outline)`,"primary-warning-shadow-active":`var(--${en}-primary-warning-shadow)`,"primary-warning-text-color-active":`var(--${en}-primary-warning-text-color)`,"primary-warning-background-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-width-focus":`var(--${en}-primary-warning-border-width)`,"primary-warning-border-style-focus":`var(--${en}-primary-warning-border-style)`,"primary-warning-border-color-focus":`var(--${b}-warning-color-focus)`,"primary-warning-border-radius-focus":`var(--${en}-primary-warning-border-radius)`,"primary-warning-outline-focus":`var(--${en}-primary-warning-outline)`,"primary-warning-shadow-focus":`var(--${en}-primary-warning-shadow)`,"primary-warning-text-color-focus":`var(--${en}-primary-warning-text-color)`,"primary-warning-background-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-width-hover":`var(--${en}-primary-warning-border-width)`,"primary-warning-border-style-hover":`var(--${en}-primary-warning-border-style)`,"primary-warning-border-color-hover":`var(--${b}-warning-color-hover)`,"primary-warning-border-radius-hover":`var(--${en}-primary-warning-border-radius)`,"primary-warning-outline-hover":`var(--${en}-primary-warning-outline)`,"primary-warning-shadow-hover":`var(--${en}-primary-warning-shadow)`,"primary-warning-text-color-hover":`var(--${en}-primary-warning-text-color)`,"primary-warning-background-visited":`var(--${en}-primary-warning-background)`,"primary-warning-border-width-visited":`var(--${en}-primary-warning-border-width)`,"primary-warning-border-style-visited":`var(--${en}-primary-warning-border-style)`,"primary-warning-border-color-visited":`var(--${en}-primary-warning-border-color)`,"primary-warning-border-radius-visited":`var(--${en}-primary-warning-border-radius)`,"primary-warning-outline-visited":`var(--${en}-primary-warning-outline)`,"primary-warning-shadow-visited":`var(--${en}-primary-warning-shadow)`,"primary-warning-text-color-visited":`var(--${en}-primary-warning-text-color)`},mn={"link-warning-background":`var(--${en}-link-background)`,"link-warning-border-width":`var(--${en}-link-border-width)`,"link-warning-border-style":`var(--${en}-link-border-style)`,"link-warning-border-color":`var(--${en}-link-border-color)`,"link-warning-border-radius":`var(--${en}-link-border-radius)`,"link-warning-outline":"none","link-warning-shadow":"none","link-warning-text-color":`var(--${b}-warning-color)`,"link-warning-background-active":`var(--${en}-link-warning-color)`,"link-warning-border-width-active":`var(--${en}-link-warning-border-width)`,"link-warning-border-style-active":`var(--${en}-link-warning-border-style)`,"link-warning-border-color-active":`var(--${en}-link-warning-color)`,"link-warning-border-radius-active":`var(--${en}-link-warning-border-radius)`,"link-warning-outline-active":`var(--${en}-link-warning-outline)`,"link-warning-shadow-active":`var(--${en}-link-warning-shadow)`,"link-warning-text-color-active":`var(--${b}-warning-color-active)`,"link-warning-background-focus":`var(--${en}-link-warning-color)`,"link-warning-border-width-focus":`var(--${en}-link-warning-border-width)`,"link-warning-border-style-focus":`var(--${en}-link-warning-border-style)`,"link-warning-border-color-focus":`var(--${en}-link-warning-color)`,"link-warning-border-radius-focus":`var(--${en}-link-warning-border-radius)`,"link-warning-outline-focus":`var(--${en}-link-warning-outline)`,"link-warning-shadow-focus":`var(--${en}-link-warning-shadow)`,"link-warning-text-color-focus":`var(--${b}-warning-color-focus)`,"link-warning-background-hover":`var(--${en}-link-warning-color)`,"link-warning-border-width-hover":`var(--${en}-link-warning-border-width)`,"link-warning-border-style-hover":`var(--${en}-link-warning-border-style)`,"link-warning-border-color-hover":`var(--${en}-link-warning-color)`,"link-warning-border-radius-hover":`var(--${en}-link-warning-border-radius)`,"link-warning-outline-hover":`var(--${en}-link-warning-outline)`,"link-warning-shadow-hover":`var(--${en}-link-warning-shadow)`,"link-warning-text-color-hover":`var(--${b}-warning-color-hover)`,"link-warning-background-visited":`var(--${en}-link-warning-background)`,"link-warning-border-width-visited":`var(--${en}-link-warning-border-width)`,"link-warning-border-style-visited":`var(--${en}-link-warning-border-style)`,"link-warning-border-color-visited":`var(--${en}-link-warning-border-color)`,"link-warning-border-radius-visited":`var(--${en}-link-warning-border-radius)`,"link-warning-outline-visited":`var(--${en}-link-warning-outline)`,"link-warning-shadow-visited":`var(--${en}-link-warning-shadow)`,"link-warning-text-color-visited":`var(--${en}-link-warning-text-color)`},yn=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sn),tn),rn),un),gn),cn),on),an),pn),vn),dn),nn),ln),bn),mn),hn="checkbox",fn={color:`var(--${b}-text-color)`,background:`var(--${b}-background)`,"border-color":`var(--${b}-border-color)`,"disabled-border-color":`var(--${b}-disabled-border-color)`},On="drawer",wn={"width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},jn="dropdown",kn={"background-color":"var(--oio-background)","border-color":"var(--oio-border-color)","box-shadow":"0px 0px 6px 0px rgba(0, 0, 0, 0.2)",color:"var(--oio-text-color)","color-hover":"var(--oio-hover-text-color)","color-disabled":"var(--oio-disabled-color)","color-disabled-hover":"var(--oio-disabled-color)","item-background-color-hover":"var(--oio-hover-background-color)","item-background-color-disabled-hover":"transparent"},Cn="form-item",Dn={config:{readonlyShowPlaceholder:!1,disabledShowPlaceholder:!1},"label-color":"var(--oio-text-color-secondary)","label-weight":"0"},Tn="header",$n={"border-bottom":"var(--oio-border-color)",color:"rgba(255,255,255,0.65)"},En="input",Sn=`${b}-${En}`,Nn={background:"#15232E","background-color":"#15232E","border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#ffffff","counter-color":"rgba(0, 0, 0, 0.25)","background-hover":`var(--${Sn}-background)`,"border-width-hover":`var(--${Sn}-border-width)`,"border-style-hover":`var(--${Sn}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Sn}-border-radius)`,"outline-hover":`var(--${Sn}-outline)`,"shadow-hover":`var(--${Sn}-shadow)`,"text-color-hover":`var(--${Sn}-text-color)`,"background-focus":`var(--${Sn}-background)`,"border-width-focus":`var(--${Sn}-border-width)`,"border-style-focus":`var(--${Sn}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${Sn}-border-radius)`,"outline-focus":`var(--${Sn}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${Sn}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"error-border-color":"#ff4d4f","disabled-border-color":`var(--${b}-disabled-border-color)`,"addon-background":"#303B48","addon-color":"rgba(255,255,255,0.65)","tag-background":"rgba(3,93,255,0.2)","ready-delete-tag-background":"rgba(224, 32, 32, 0.2)","ready-delete-tag-color":"#ff4d4f","clear-background":"#000","clear-color":"var(--oio-text-color)"},Vn="menu",xn=()=>$e(),In="modal",Mn={color:"rgba(255, 255, 255, 0.85)","width-small":"560px","width-medium":"890px","width-large":"1200px","height-small":"40vh","height-medium":"60vh","height-large":"90vh"},An="multi-tabs",Fn={background:`var(--${b}-body-background)`,color:`var(--${b}-text-color)`,"active-color":"#ffffff","active-font-weight":500,"active-background":`var(--${b}-background)`,"icon-color":"rgba(255, 255, 255, 0.3)","hover-background-color":"rgba(255, 255, 255, 0.10)","background-color-inline":`var(--${b}-background)`,"color-inline":`var(--${b}-text-color)`,"active-color-inline":`var(--${b}-primary-color)`,"active-background-color-inline":`var(--${b}-body-background)`,"hover-background-color-inline":`var(--${b}-body-background)`,"background-color-theme1":`var(--${b}-body-background)`,"background-color-active-theme1":`var(--${b}-background)`,"border-color-theme1":"var(--oio-border-color)","background-color-theme1-inline":`var(--${b}-background)`,"background-color-active-theme1-inline":"rgba(255, 255, 255, 0.2)","active-color-active-theme1-inline":"#ffffff","icon-color-active-theme1-inline":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme2":`var(--${b}-background)`,"border-color-theme2":"var(--oio-border-color)","background-color-theme3":`var(--${b}-body-background)`,"background-color-active-theme3":"rgba(255, 255, 255, 0.2)","active-color-active-theme3":"#ffffff","icon-color-active-theme3":`var(--${b}-multi-tabs-icon-color)`,"background-color-theme3-inline":`var(--${b}-background)`,"background-color-theme4-inline":`var(--${b}-background)`,"background-color-active-theme4-inline":"rgba(255, 255, 255, 0.2)","active-color-active-theme4-inline":"#ffffff","icon-color-active-theme4-inline":`var(--${b}-multi-tabs-icon-color)`},Ln="pagination",Rn={background:`var(--${b}-background)`,"border-color":"none","text-color":`var(--${b}-text-color)`,"background-active":"transparent","border-color-active":`var(--${b}-primary-color)`,"text-color-active":`var(--${b}-text-color)`,"background-hover":`var(--${b}-primary-color-hover)`,"border-color-hover":"transparent","text-color-hover":`var(--${b}-text-color)`},Bn="popconfirm",_n={background:"var(--oio-background)",color:"var(--oio-text-color)",borderColor:"var(--oio-border-color)",arrowBackground:"ar(--oio-background)"},Wn="rich-text",Pn={"textarea-bg-color":`var(--${b}-background)`,"textarea-color":`var(--${b}-text-color)`,"textarea-border-color":`var(--${b}-border-color)`,"textarea-slight-border-color":`var(--${b}-border-color)`,"textarea-slight-color":`var(--${b}-text-color)`,"textarea-slight-bg-color":`var(--${b}-body-background)`,"textarea-selected-border-color":"#333e4c","textarea-handler-bg-color":"#4290f7","toolbar-color":`var(--${b}-select-dropdown-color)`,"toolbar-bg-color":`var(--${b}-select-dropdown-background)`,"toolbar-active-color":`var(--${b}-select-dropdown-selected-color)`,"toolbar-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-color-active-bg-color":`var(--${b}-select-dropdown-selected)`,"toolbar-disabled-color":`var(--${b}-disabled-color)`,"toolbar-border-color":`var(--${b}-border-color)`,"modal-button-bg-color":"#fafafa","modal-button-border-color":"#d9d9d9","button-tooltip-bg-color":"#333","button-tooltip-color":"#fff"},zn="scrollbar",Gn={"thumb-background-color":"#7e7e7e","thumb-background-color-hover":"#999999"},Un="select",Kn=`${b}-${Un}`,qn={background:"#15232E","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"counter-background":"#15232E","counter-color":"rgba(255,255,255,0.65)","counter-font-size":`var(--${b}-font-size-sm)`,"background-hover":`var(--${Kn}-background)`,"border-width-hover":`var(--${Kn}-border-width)`,"border-style-hover":`var(--${Kn}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${Kn}-border-radius)`,"outline-hover":`var(--${Kn}-outline)`,"shadow-hover":`var(--${Kn}-shadow)`,"text-color-hover":`var(--${Kn}-text-color)`,"background-focus":`var(--${Kn}-background)`,"border-width-focus":`var(--${Kn}-border-width)`,"border-style-focus":`var(--${Kn}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${Kn}-border-radius)`,"outline-focus":`var(--${Kn}-outline)`,"shadow-focus":"0px 0px 0px 2px rgba(3,93,255,0.1);","text-color-focus":`var(--${Kn}-text-color)`,"readonly-border-color":`var(--${b}-readonly-border-color)`,"item-readonly-bg":`var(--${b}-primary-color-rgb)`,"item-readonly-color":`var(--${b}-primary-color)`,"item-readonly-radius":`var(--${b}-border-radius)`,"dropdown-background":"#1F2935","dropdown-selected-color":"#fff","dropdown-color":"rgba(255,255,255,0.65)","dropdown-selected":"rgba(255,255,255,0.1)","dropdown-hover-color":"rgba(255,255,255,0.65)","dropdown-hover-background":"rgba(255,255,255,0.1)","dropdown-box-shadow":"0px 0px 6px 0px rgba(0,0,0,0.2)"},Hn="switch",Yn={background:"rgba(255,255,255,0.25)"},Qn="table",Jn={"thead-bg":"var(--oio-background)","body-bg":"var(--oio-background)","text-color":`var(--${b}-text-color)`,"title-color":"rgba(255,255,255,0.85)","title-font-weight":500,"title-sort-icon-size":"11px","tr-height":`var(--${b}-height-lg)`,"tr-stripe-bg":"rgba(255,255,255,0.1)","tr-checked-bg":"rgba(255,255,255,0.1)","tr-hover-bg":"rgba(255,255,255,0.1)","row-border":"rgba(51,62,76,1)","row-body-border":"rgba(51,62,76,1)",config:{border:"full",stripe:!1,isCurrent:!0,isHover:!0}},Xn="tabs",Zn={"card-tab-background":"var(--oio-background)","card-tab-active-background":"var(--oio-stripe-color)","active-text-color":"#fff"},er="textarea",tr=`${b}-${er}`,or={background:"#15232E","border-width":`var(--${b}-border-width)`,"border-style":`var(--${b}-border-style)`,"border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${tr}-background)`,"border-width-hover":`var(--${tr}-border-width)`,"border-style-hover":`var(--${tr}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${tr}-border-radius)`,"outline-hover":`var(--${tr}-outline)`,"shadow-hover":`var(--${tr}-shadow)`,"text-color-hover":`var(--${tr}-text-color)`,"background-focus":`var(--${tr}-background)`,"border-width-focus":`var(--${tr}-border-width)`,"border-style-focus":`var(--${tr}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${tr}-border-radius)`,"outline-focus":`var(--${tr}-outline)`,"shadow-focus":`0px 0px 0px 2px rgba(var(--${b}-primary-color-rgb),0.1);`,"text-color-focus":`var(--${tr}-text-color)`},ir="transfer",nr={"background-color":"var(--oio-background)","header-border-color":"var(--oio-border-color)"},rr="tree-select",ar="upload",lr=`${b}-${ar}`,sr={background:`var(--${b}-background)`,"border-width":`var(--${b}-border-width)`,"border-style":"dashed","border-color":`var(--${b}-border-color)`,"border-radius":`var(--${b}-border-radius)`,outline:"none",shadow:"none","text-color":`var(--${b}-text-color)`,"background-hover":`var(--${lr}-background)`,"border-width-hover":`var(--${lr}-border-width)`,"border-style-hover":`var(--${lr}-border-style)`,"border-color-hover":`var(--${b}-primary-color-hover)`,"border-radius-hover":`var(--${lr}-border-radius)`,"outline-hover":`var(--${lr}-outline)`,"shadow-hover":`var(--${lr}-shadow)`,"text-color-hover":`var(--${lr}-text-color)`,"background-focus":`var(--${lr}-background)`,"border-width-focus":`var(--${lr}-border-width)`,"border-style-focus":`var(--${lr}-border-style)`,"border-color-focus":`var(--${b}-primary-color-hover)`,"border-radius-focus":`var(--${lr}-border-radius)`,"outline-focus":`var(--${lr}-outline)`,"shadow-focus":`var(--${lr}-shadow)`,"text-color-focus":`var(--${lr}-text-color)`},cr="card",dr={"action-background":`var(--${b}-background)`,"action-border-color":`var(--${b}-border-color)`,"action-divider-color":`var(--${b}-border-color)`,"action-text-color":`var(--${b}-primary-color)`},ur=()=>({[An]:{large:Object.assign({},Fn),medium:Object.assign({},Fn),small:Object.assign({},Fn)},[Zi]:{large:yn,medium:yn,small:yn},[En]:{large:Object.assign(Object.assign({},Nn),m),medium:Object.assign(Object.assign({},Nn),y),small:Object.assign(Object.assign({},Nn),y)},[hn]:{large:Object.assign({},fn),medium:Object.assign({},fn),small:Object.assign({},fn)},[Hn]:{large:Object.assign({},Yn),medium:Object.assign({},Yn),small:Object.assign({},Yn)},[Ln]:{large:Object.assign(Object.assign({},Rn),C),medium:Object.assign(Object.assign({},Rn),D),small:Object.assign(Object.assign({},Rn),T)},[Un]:{large:Object.assign(Object.assign({},qn),$),medium:Object.assign(Object.assign({},qn),E),small:Object.assign(Object.assign({},qn),S)},[er]:{large:or,medium:or,small:or},[ar]:{large:sr,medium:sr,small:sr},[Vn]:{large:Object.assign(Object.assign({},xn()),w),medium:Object.assign(Object.assign({},xn()),j),small:Object.assign(Object.assign({},xn()),k)},[Ji]:{large:Xi,medium:Xi,small:Xi},[Qn]:{large:Object.assign(Object.assign({},Jn),h),medium:Object.assign(Object.assign({},Jn),f),small:Object.assign(Object.assign({},Jn),O)},[Tn]:{large:$n,medium:$n,small:$n},[In]:{large:Mn,medium:Mn,small:Mn},[Bn]:{large:_n,medium:_n,small:_n},[rr]:{large:N,medium:V,small:x},[ir]:{large:nr,medium:nr,small:nr},[zn]:{large:Gn,medium:Gn,small:Gn},[On]:{large:wn,medium:wn,small:wn},[jn]:{large:kn,medium:kn,small:kn},[Cn]:{large:Dn,medium:Dn,small:Dn},[Wn]:{large:Pn,medium:Pn,small:Pn},[Xn]:{large:Object.assign(Object.assign({},I),Zn),medium:Object.assign(Object.assign({},M),Zn),small:Object.assign(Object.assign({},A),Zn)},[cr]:{large:dr,medium:dr,small:dr}});function pr(e){return function(t,o){Object.entries(o).forEach(([o,i])=>{e[`${t}-${o}`]=i})}}function br(e){const t="large"===e?l:"medium"===e?s:c,o=Object.assign(Object.assign({},Ee),t),i=pr(o),r=ur();Object.entries(r).forEach(([t,o])=>{o[e]&&i(t,o[e])}),n("dark-minimalism-"+e,o)}function gr(){br("large"),br("medium"),br("small")}},c77b:function(e,t,o){},d7168:function(e,t,o){"use strict";o("e486"),o("c77b"),o("8adb"),o("3af9"),o("7595"),o("2695")},e486:function(e,t,o){},f171:function(e,t,o){}}]);