@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/components/avatar/index.esm.js +155 -148
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/button-edit/index.esm.js +1 -1
  4. package/components/button-edit/index.umd.cjs +1 -1
  5. package/components/calendar/index.esm.js +226 -224
  6. package/components/calendar/index.umd.cjs +3 -3
  7. package/components/collection-property-editor/index.esm.js +225 -223
  8. package/components/collection-property-editor/index.umd.cjs +2 -2
  9. package/components/combo-list/index.esm.js +76 -71
  10. package/components/combo-list/index.umd.cjs +1 -1
  11. package/components/comment/index.esm.js +169 -167
  12. package/components/comment/index.umd.cjs +6 -6
  13. package/components/component/index.esm.js +3691 -3043
  14. package/components/component/index.umd.cjs +2 -2
  15. package/components/condition/index.esm.js +2015 -1352
  16. package/components/condition/index.umd.cjs +2 -2
  17. package/components/data-grid/index.esm.js +407 -430
  18. package/components/data-grid/index.umd.cjs +1 -1
  19. package/components/data-view/index.esm.js +3082 -3196
  20. package/components/data-view/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.esm.js +3364 -2713
  22. package/components/designer-canvas/index.umd.cjs +1 -1
  23. package/components/drawer/index.esm.js +66 -64
  24. package/components/drawer/index.umd.cjs +2 -2
  25. package/components/dynamic-form/index.esm.js +1176 -524
  26. package/components/dynamic-form/index.umd.cjs +1 -1
  27. package/components/dynamic-resolver/index.esm.js +182 -180
  28. package/components/dynamic-resolver/index.umd.cjs +2 -2
  29. package/components/dynamic-view/index.esm.js +531 -455
  30. package/components/dynamic-view/index.umd.cjs +1 -1
  31. package/components/events-editor/index.esm.js +2352 -1700
  32. package/components/events-editor/index.umd.cjs +3 -3
  33. package/components/expression-editor/index.esm.js +8 -3
  34. package/components/expression-editor/index.umd.cjs +2 -2
  35. package/components/filter-bar/index.esm.js +422 -413
  36. package/components/filter-bar/index.umd.cjs +2 -2
  37. package/components/filter-condition-editor/index.esm.js +8 -3
  38. package/components/filter-condition-editor/index.umd.cjs +1 -1
  39. package/components/image/index.esm.js +363 -354
  40. package/components/image/index.umd.cjs +2 -2
  41. package/components/language-textbox/index.esm.js +189 -187
  42. package/components/language-textbox/index.umd.cjs +2 -2
  43. package/components/list-view/index.esm.js +388 -389
  44. package/components/list-view/index.umd.cjs +5 -5
  45. package/components/mapping-editor/index.esm.js +1465 -1488
  46. package/components/mapping-editor/index.umd.cjs +1 -1
  47. package/components/number-range/index.esm.js +180 -173
  48. package/components/number-range/index.umd.cjs +1 -1
  49. package/components/order/index.esm.js +815 -811
  50. package/components/order/index.umd.cjs +5 -5
  51. package/components/property-panel/index.esm.js +429 -420
  52. package/components/property-panel/index.umd.cjs +3 -3
  53. package/components/query-solution/index.esm.js +4746 -4085
  54. package/components/query-solution/index.umd.cjs +7 -7
  55. package/components/schema-selector/index.esm.js +1401 -1402
  56. package/components/schema-selector/index.umd.cjs +5 -5
  57. package/components/section/index.esm.js +102 -100
  58. package/components/section/index.umd.cjs +2 -2
  59. package/components/sort-condition-editor/index.esm.js +8 -3
  60. package/components/sort-condition-editor/index.umd.cjs +1 -1
  61. package/components/transfer/index.esm.js +537 -538
  62. package/components/transfer/index.umd.cjs +5 -5
  63. package/components/tree-grid/index.esm.js +280 -283
  64. package/components/tree-grid/index.umd.cjs +1 -1
  65. package/components/tree-view/index.esm.js +200 -202
  66. package/components/tree-view/index.umd.cjs +1 -1
  67. package/components/uploader/index.esm.js +533 -519
  68. package/components/uploader/index.umd.cjs +2 -2
  69. package/designer/data-grid/index.esm.js +3806 -3905
  70. package/designer/data-grid/index.umd.cjs +9 -9
  71. package/designer/drawer/index.esm.js +188 -186
  72. package/designer/drawer/index.umd.cjs +2 -2
  73. package/designer/dynamic-form/index.esm.js +1562 -1073
  74. package/designer/dynamic-form/index.umd.cjs +2 -2
  75. package/designer/farris-designer.all.esm.js +9793 -8613
  76. package/designer/farris-designer.all.umd.cjs +8 -8
  77. package/designer/list-view/index.esm.js +564 -564
  78. package/designer/list-view/index.umd.cjs +6 -6
  79. package/designer/radio-group/index.esm.js +236 -229
  80. package/designer/radio-group/index.umd.cjs +1 -1
  81. package/designer/response-layout-editor/index.esm.js +178 -171
  82. package/designer/response-layout-editor/index.umd.cjs +1 -1
  83. package/designer/tabs/index.esm.js +3154 -2508
  84. package/designer/tabs/index.umd.cjs +2 -2
  85. package/designer/time-picker/index.esm.js +193 -186
  86. package/designer/time-picker/index.umd.cjs +1 -1
  87. package/designer/tree-grid/index.esm.js +444 -447
  88. package/designer/tree-grid/index.umd.cjs +1 -1
  89. package/farris.all.esm.js +60126 -59649
  90. package/farris.all.umd.cjs +30 -30
  91. package/index.css +1 -1
  92. package/package.json +1 -1
  93. package/types/components.d.ts +1 -1
  94. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  95. package/types/data-grid/index.d.ts +2 -5
  96. package/types/data-grid/src/data-grid.component.d.ts +1 -2
  97. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  98. package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
  99. package/types/data-view/composition/types.d.ts +0 -4
  100. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
  101. package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
  102. package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
  103. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  104. package/types/dynamic-form/designer.d.ts +0 -1
  105. package/types/dynamic-form/index.d.ts +4 -3
  106. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  107. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  108. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  109. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  110. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  111. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  112. package/types/dynamic-form/src/types.d.ts +1 -0
  113. package/types/dynamic-resolver/src/types.d.ts +1 -0
  114. package/types/dynamic-view/index.d.ts +43 -3
  115. package/types/dynamic-view/src/components/maps.d.ts +6 -6
  116. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  117. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  118. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  119. package/types/language-textbox/index.d.ts +3 -3
  120. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  121. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  122. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
  123. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  124. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  125. package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
  126. package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
  127. package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
  128. package/types/tree-view/src/tree-view.props.d.ts +0 -1
@@ -1,3 +1,3 @@
1
- (function(S,me){typeof exports=="object"&&typeof module<"u"?me(exports,require("../../components/common/index.umd.js"),require("../../components/tabs/index.umd.js"),require("../response-toolbar/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("lodash-es"),require("../../components/capsule/index.umd.js"),require("../../components/locale/index.umd.js"),require("@vueuse/core"),require("../../components/data-view/index.umd.js"),require("../../components/accordion/index.umd.js"),require("../../components/avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../../components/button-group/index.umd.js"),require("../../components/calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../checkbox-group/index.umd.js"),require("../../components/combo-list/index.umd.js"),require("../../components/combo-tree/index.umd.js"),require("../../components/component/index.umd.js"),require("../../components/color-picker/index.umd.js"),require("../../components/content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../data-grid/index.umd.js"),require("../../components/dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../../components/events-editor/index.umd.js"),require("../../components/filter-bar/index.umd.js"),require("../../components/field-selector/index.umd.js"),require("../../components/binding-selector/index.umd.js"),require("../../components/image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../../components/layout/index.umd.js"),require("../../components/list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../../components/lookup/index.umd.js"),require("../../components/mapping-editor/index.umd.js"),require("../../components/nav/index.umd.js"),require("../../components/number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../../components/order/index.umd.js"),require("../../components/page-header/index.umd.js"),require("../../components/page-footer/index.umd.js"),require("../../components/pagination/index.umd.js"),require("../../components/progress/index.umd.js"),require("../../components/query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../../components/response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../../components/search-box/index.umd.js"),require("../section/index.umd.js"),require("../../components/smoke-detector/index.umd.js"),require("../../components/splitter/index.umd.js"),require("../../components/step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../../components/text/index.umd.js"),require("../time-picker/index.umd.js"),require("../../components/transfer/index.umd.js"),require("../../components/tree-view/index.umd.js"),require("../../components/uploader/index.umd.js"),require("../../components/verify-detail/index.umd.js"),require("../../components/video/index.umd.js"),require("../textarea/index.umd.js"),require("../../components/schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../../components/event-parameter/index.umd.js"),require("../../components/filter-condition-editor/index.umd.js"),require("../../components/fieldset/index.umd.js"),require("../../components/sort-condition-editor/index.umd.js"),require("../../components/menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../../components/json-editor/index.umd.js"),require("../../components/property-editor/index.umd.js"),require("../../components/expression-editor/index.umd.js"),require("../../components/code-editor/index.umd.js"),require("../../components/html-template/index.umd.js"),require("../../components/collection-property-editor/index.umd.js"),require("../modal/index.umd.js"),require("../../components/external-container/index.umd.js"),require("../../components/language-textbox/index.umd.js"),require("../../components/image/index.umd.js"),require("../../components/comment/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("../../components/notify/index.umd.js"),require("../../components/section/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/tabs/index.umd.js","../response-toolbar/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/response-toolbar/index.umd.js","lodash-es","../../components/capsule/index.umd.js","../../components/locale/index.umd.js","@vueuse/core","../../components/data-view/index.umd.js","../../components/accordion/index.umd.js","../../components/avatar/index.umd.js","../button-edit/index.umd.js","../../components/button-group/index.umd.js","../../components/calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../checkbox-group/index.umd.js","../../components/combo-list/index.umd.js","../../components/combo-tree/index.umd.js","../../components/component/index.umd.js","../../components/color-picker/index.umd.js","../../components/content-container/index.umd.js","../date-picker/index.umd.js","../data-grid/index.umd.js","../../components/dropdown/index.umd.js","../dynamic-form/index.umd.js","../../components/events-editor/index.umd.js","../../components/filter-bar/index.umd.js","../../components/field-selector/index.umd.js","../../components/binding-selector/index.umd.js","../../components/image-cropper/index.umd.js","../input-group/index.umd.js","../../components/layout/index.umd.js","../../components/list-nav/index.umd.js","../list-view/index.umd.js","../../components/lookup/index.umd.js","../../components/mapping-editor/index.umd.js","../../components/nav/index.umd.js","../../components/number-range/index.umd.js","../number-spinner/index.umd.js","../../components/order/index.umd.js","../../components/page-header/index.umd.js","../../components/page-footer/index.umd.js","../../components/pagination/index.umd.js","../../components/progress/index.umd.js","../../components/query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../../components/response-layout/index.umd.js","../response-layout-editor/index.umd.js","../../components/search-box/index.umd.js","../section/index.umd.js","../../components/smoke-detector/index.umd.js","../../components/splitter/index.umd.js","../../components/step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../../components/text/index.umd.js","../time-picker/index.umd.js","../../components/transfer/index.umd.js","../../components/tree-view/index.umd.js","../../components/uploader/index.umd.js","../../components/verify-detail/index.umd.js","../../components/video/index.umd.js","../textarea/index.umd.js","../../components/schema-selector/index.umd.js","../tree-grid/index.umd.js","../../components/event-parameter/index.umd.js","../../components/filter-condition-editor/index.umd.js","../../components/fieldset/index.umd.js","../../components/sort-condition-editor/index.umd.js","../../components/menu-lookup/index.umd.js","../drawer/index.umd.js","../../components/json-editor/index.umd.js","../../components/property-editor/index.umd.js","../../components/expression-editor/index.umd.js","../../components/code-editor/index.umd.js","../../components/html-template/index.umd.js","../../components/collection-property-editor/index.umd.js","../modal/index.umd.js","../../components/external-container/index.umd.js","../../components/language-textbox/index.umd.js","../../components/image/index.umd.js","../../components/comment/index.umd.js","../../components/property-panel/index.umd.js","../../components/notify/index.umd.js","../../components/section/index.umd.js"],me):(S=typeof globalThis<"u"?globalThis:S||self,me(S.tabs={},S.common,S.FTabs,S.FResponseToolbar,S.Vue,S.designerCanvas,S.dynamicResolver,S.responseToolbar,S.LodashES,S.FCapsule,S.locale,S.VueUseCore,S.dataView,S.FAccordion,S.FAvatar,S.FButtonEdit,S.FButtonGroup,S.FCalendar,S.FCapsule$1,S.FCheckbox,S.FCheckboxGroup,S.FComboList,S.FComboTree,S.FComponent,S.FColorPicker,S.FContentContainer,S.FDatePicker,S.FDataGrid,S.FDropdown,S.FDynamicForm,S.FEventsEditor,S.FFilterBar,S.FFieldSelector,S.FBindingSelector,S.FImageCropper,S.FInputGroup,S.FLayout,S.FListNav,S.FListView,S.FLookup,S.FMappingEditor,S.FNav,S.FNumberRange,S.FNumberSpinner,S.FOrder,S.FPageHeader,S.FPageFooter,S.FPagination,S.FProgress,S.FQuerySolution,S.FRadioGroup,S.FRate,S.FResponseLayout,S.FResponseLayoutEditorSetting,S.FSearchBox,S.FSection,S.FSmokeDetector,S.FSplitter,S.FStep$1,S.FSwitch,S.FTabs$1,S.FTags,S.FText,S.FTimePicker,S.FTransfer,S.FTreeview,S.FUploader,S.FVerifyDetail,S.FVideo,S.FTextArea,S.FSchemaSelector,S.FTreeGrid$1,S.FEventParameter,S.FFilterConditionEditor,S.FFieldset,S.FSortConditionEditor,S.FMenuLookup,S.FDrawer,S.FJsonEditor,S.FPropertyEditor,S.FExpressionEditor,S.FCodeEditor,S.FHtmlTemplate,S.FCollectionPropertyEditor,S.FModal$1,S.FExternalContainer,S.FLanguageTextbox,S.FImage,S.FComment,S.propertyPanel,null,S.FSection$1))})(this,function(S,me,Oe,ut,e,ke,xe,Kt,Me,en,ze,tn,oe,nn,on,rn,an,sn,ln,Bt,kt,cn,un,dn,fn,mn,pn,hn,gn,vn,yn,bn,Cn,wn,xn,Tn,Sn,jn,In,Nn,Pn,Fn,Bn,kn,Vn,En,Mn,Rn,On,Dn,$n,qn,Ln,Hn,An,zn,_n,Wn,Un,Gn,Yn,Xn,Jn,Qn,Zn,Kn,eo,to,no,oo,io,ro,ao,so,lo,co,uo,fo,mo,po,ho,go,vo,yo,bo,Co,wo,xo,To,Vt,_i,So){"use strict";var Ai=Object.defineProperty;var zi=(S,me,Oe)=>me in S?Ai(S,me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):S[me]=Oe;var We=(S,me,Oe)=>zi(S,typeof me!="symbol"?me+"":me,Oe);const ot=new Map([["appearance",xe.resolveAppearance]]);function jo(t,n){var l,i;if(!(n!=null&&n.schema))return;const o=((i=(l=n.schema)==null?void 0:l.appearance)==null?void 0:i.class)||"",a=n.elementRef,s=window.getComputedStyle(a);s&&s.display==="flex"&&!o.includes("f-page-child-fill")&&(t.appearance.class+=" d-block")}function Io(t,n){var d;const o=Math.random().toString().slice(2,6),a=n.parentComponentInstance,s=t.getSchemaByType("tab-page");s.id=`tab-page-${o}`,s.title="标题",s.toolbar={id:`tab-page-toolbar-${o}`,buttons:[]};const l=t.getSchemaByType("tabs");Object.assign(l,{id:`tabs-${o}`,appearance:{class:"f-component-tabs f-tabs-has-grid"},contents:[s],activeId:s.id});const i=t.getSchemaByType("section");Object.assign(i,{id:`section-${o}`,appearance:{class:"f-section-tabs f-section-in-mainsubcard"},fill:!1,showHeader:!1,contents:[l]});const r=t.getSchemaByType("content-container");Object.assign(r,{id:`container-${o}`,appearance:{class:"f-struct-wrapper"},contents:[i]});const c=a.schema,f=((d=c.appearance)==null?void 0:d.class)||"";switch(c&&c.type){case ke.DgControl["splitter-pane"].type:{i.appearance.class="f-section-tabs f-section-in-main",l.appearance.class="f-component-tabs",f.includes("f-page-child-fill")&&(r.appearance.class+=" f-struct-wrapper-child",i.fill=!0,l.fill=!0);break}case ke.DgControl["content-container"].type:c.isLikeCardContainer&&f.includes("f-struct-like-card-child-fill")&&(r.appearance.class+=" f-struct-wrapper-child",i.fill=!0,l.fill=!0)}return jo(r,a),r}function Et(t,n,o){if(o.parentComponentInstance)return Io(t,o);{const s=t.getSchemaByType("tab-page");return n.contents=[s],n}}function Mt(t,n,o){return n}const Rt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tabs.schema.json",title:"tabs",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Tabs",type:"string"},type:{description:"The type string of Tabs component",type:"string",default:"tabs"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},autoTitleWidth:{description:"",type:"boolean",default:!1},titleWidth:{description:"",type:"number"},titleLength:{description:"",type:"number",default:7},fill:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},activeId:{description:"",type:"string",default:""}},required:["id","type","contents"],events:{onTabChange:"切换标签页事件",onTabRemove:"移除标签页事件"}},No={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar.schema.json",title:"tab-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Tab Toolbar",type:"string"},type:{description:"The type string of Tab Toolbar",type:"string",default:"tab-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"The alignment of Tab Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Tab Toolbar.",type:"array",default:[]},buttonSize:{type:"string",default:""},visible:{description:"",type:"boolean",default:!0}},required:["id","type","buttons"],events:{onClick:"点击事件"}},Po=xe.createPropsResolver(Oe.tabsProps,Rt,ot,Et),Ot=Object.assign({},Oe.tabsProps,{componentId:{type:String,default:""}}),Fo=xe.createPropsResolver(Ot,Rt,ot,Et),Bo=xe.createTabsEventHandlerResolver(),ko=xe.createPropsResolver(Kt.responseToolbarProps,No,ot,ut.schemaResolver);function Vo(t,n,o,a,s,l){const{activeId:i,selectTab:r,removeDesignTab:c,selectDesignTab:f,addTabPageToolbar:d,resetPositionForSelectedElement:u}=s,h=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),y=e.computed(()=>{const E={"farris-component":!0,"nav-item":!0,"f-state-active":n.id===i.value};return E[`${n.id}-design-item`]=!0,E}),m=e.computed(()=>{const E={};return n.tabWidth&&n.tabWidth>0&&(E.width=`${n.tabWidth}px`),E}),p=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===i.value}));function F(){return e.createVNode("span",{class:h.value,title:n.title},[n.title])}const V=e.ref(n.removeable);function T(){return V.value?e.createVNode("span",{class:"st-drop-close",style:"opacity:0.6"},[e.createVNode("i",{class:"f-icon f-icon-close"},null)]):""}function $(){return V.value?n.titleHtml+`<span class="st-drop-close" style="opacity:0.6">
1
+ (function(N,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("../../components/common/index.umd.js"),require("../../components/tabs/index.umd.js"),require("../response-toolbar/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("lodash-es"),require("../../components/capsule/index.umd.js"),require("../../components/locale/index.umd.js"),require("@vueuse/core"),require("../../components/data-view/index.umd.js"),require("../../components/dynamic-view/index.umd.js"),require("../../components/accordion/index.umd.js"),require("../../components/avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../../components/button-group/index.umd.js"),require("../../components/calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../checkbox-group/index.umd.js"),require("../../components/combo-list/index.umd.js"),require("../../components/combo-tree/index.umd.js"),require("../../components/component/index.umd.js"),require("../../components/color-picker/index.umd.js"),require("../../components/content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../data-grid/index.umd.js"),require("../../components/dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../../components/events-editor/index.umd.js"),require("../../components/filter-bar/index.umd.js"),require("../../components/field-selector/index.umd.js"),require("../../components/binding-selector/index.umd.js"),require("../../components/image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../../components/layout/index.umd.js"),require("../../components/list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../../components/lookup/index.umd.js"),require("../../components/mapping-editor/index.umd.js"),require("../../components/nav/index.umd.js"),require("../../components/number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../../components/order/index.umd.js"),require("../../components/page-header/index.umd.js"),require("../../components/page-footer/index.umd.js"),require("../../components/pagination/index.umd.js"),require("../../components/progress/index.umd.js"),require("../../components/query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../../components/response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../../components/search-box/index.umd.js"),require("../section/index.umd.js"),require("../../components/smoke-detector/index.umd.js"),require("../../components/splitter/index.umd.js"),require("../../components/step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../../components/text/index.umd.js"),require("../time-picker/index.umd.js"),require("../../components/transfer/index.umd.js"),require("../../components/tree-view/index.umd.js"),require("../../components/uploader/index.umd.js"),require("../../components/verify-detail/index.umd.js"),require("../../components/video/index.umd.js"),require("../textarea/index.umd.js"),require("../../components/schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../../components/event-parameter/index.umd.js"),require("../../components/filter-condition-editor/index.umd.js"),require("../../components/fieldset/index.umd.js"),require("../../components/sort-condition-editor/index.umd.js"),require("../../components/menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../../components/json-editor/index.umd.js"),require("../../components/property-editor/index.umd.js"),require("../../components/expression-editor/index.umd.js"),require("../../components/code-editor/index.umd.js"),require("../../components/html-template/index.umd.js"),require("../../components/collection-property-editor/index.umd.js"),require("../modal/index.umd.js"),require("../../components/external-container/index.umd.js"),require("../../components/language-textbox/index.umd.js"),require("../../components/image/index.umd.js"),require("../../components/comment/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("../../components/notify/index.umd.js"),require("../../components/section/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/tabs/index.umd.js","../response-toolbar/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/response-toolbar/index.umd.js","lodash-es","../../components/capsule/index.umd.js","../../components/locale/index.umd.js","@vueuse/core","../../components/data-view/index.umd.js","../../components/dynamic-view/index.umd.js","../../components/accordion/index.umd.js","../../components/avatar/index.umd.js","../button-edit/index.umd.js","../../components/button-group/index.umd.js","../../components/calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../checkbox-group/index.umd.js","../../components/combo-list/index.umd.js","../../components/combo-tree/index.umd.js","../../components/component/index.umd.js","../../components/color-picker/index.umd.js","../../components/content-container/index.umd.js","../date-picker/index.umd.js","../data-grid/index.umd.js","../../components/dropdown/index.umd.js","../dynamic-form/index.umd.js","../../components/events-editor/index.umd.js","../../components/filter-bar/index.umd.js","../../components/field-selector/index.umd.js","../../components/binding-selector/index.umd.js","../../components/image-cropper/index.umd.js","../input-group/index.umd.js","../../components/layout/index.umd.js","../../components/list-nav/index.umd.js","../list-view/index.umd.js","../../components/lookup/index.umd.js","../../components/mapping-editor/index.umd.js","../../components/nav/index.umd.js","../../components/number-range/index.umd.js","../number-spinner/index.umd.js","../../components/order/index.umd.js","../../components/page-header/index.umd.js","../../components/page-footer/index.umd.js","../../components/pagination/index.umd.js","../../components/progress/index.umd.js","../../components/query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../../components/response-layout/index.umd.js","../response-layout-editor/index.umd.js","../../components/search-box/index.umd.js","../section/index.umd.js","../../components/smoke-detector/index.umd.js","../../components/splitter/index.umd.js","../../components/step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../../components/text/index.umd.js","../time-picker/index.umd.js","../../components/transfer/index.umd.js","../../components/tree-view/index.umd.js","../../components/uploader/index.umd.js","../../components/verify-detail/index.umd.js","../../components/video/index.umd.js","../textarea/index.umd.js","../../components/schema-selector/index.umd.js","../tree-grid/index.umd.js","../../components/event-parameter/index.umd.js","../../components/filter-condition-editor/index.umd.js","../../components/fieldset/index.umd.js","../../components/sort-condition-editor/index.umd.js","../../components/menu-lookup/index.umd.js","../drawer/index.umd.js","../../components/json-editor/index.umd.js","../../components/property-editor/index.umd.js","../../components/expression-editor/index.umd.js","../../components/code-editor/index.umd.js","../../components/html-template/index.umd.js","../../components/collection-property-editor/index.umd.js","../modal/index.umd.js","../../components/external-container/index.umd.js","../../components/language-textbox/index.umd.js","../../components/image/index.umd.js","../../components/comment/index.umd.js","../../components/property-panel/index.umd.js","../../components/notify/index.umd.js","../../components/section/index.umd.js"],ce):(N=typeof globalThis<"u"?globalThis:N||self,ce(N.tabs={},N.common,N.FTabs,N.FResponseToolbar,N.Vue,N.designerCanvas,N.dynamicResolver,N.responseToolbar,N.LodashES,N.FCapsule,N.locale,N.VueUseCore,N.dataView,N.dynamicView,N.FAccordion,N.FAvatar,N.FButtonEdit,N.FButtonGroup,N.FCalendar,N.FCapsule$1,N.FCheckbox,N.FCheckboxGroup,N.FComboList,N.FComboTree,N.FComponent,N.FColorPicker,N.FContentContainer,N.FDatePicker,N.FDataGrid,N.FDropdown,N.FDynamicForm$1,N.FEventsEditor,N.FFilterBar,N.FFieldSelector,N.FBindingSelector,N.FImageCropper,N.FInputGroup,N.FLayout,N.FListNav,N.FListView,N.FLookup,N.FMappingEditor,N.FNav,N.FNumberRange,N.FNumberSpinner,N.FOrder,N.FPageHeader,N.FPageFooter,N.FPagination,N.FProgress,N.FQuerySolution,N.FRadioGroup,N.FRate,N.FResponseLayout,N.FResponseLayoutEditorSetting,N.FSearchBox,N.FSection,N.FSmokeDetector,N.FSplitter,N.FStep$1,N.FSwitch,N.FTabs$1,N.FTags,N.FText,N.FTimePicker,N.FTransfer,N.FTreeview,N.FUploader,N.FVerifyDetail,N.FVideo,N.FTextArea,N.FSchemaSelector,N.FTreeGrid$1,N.FEventParameter,N.FFilterConditionEditor,N.FFieldset,N.FSortConditionEditor,N.FMenuLookup,N.FDrawer,N.FJsonEditor,N.FPropertyEditor,N.FExpressionEditor,N.FCodeEditor,N.FHtmlTemplate,N.FCollectionPropertyEditor,N.FModal$1,N.FExternalContainer,N.FLanguageTextbox,N.FImage,N.FComment,N.propertyPanel,null,N.FSection$1))})(this,function(N,ce,De,dt,e,Me,Ce,an,Pe,ln,He,cn,se,Ue,un,dn,fn,pn,mn,gn,Bt,kt,hn,vn,yn,bn,Cn,xn,wn,Tn,jn,Sn,In,Nn,Fn,Pn,Vn,Mn,Bn,kn,On,En,$n,Rn,Dn,qn,Ln,Hn,An,zn,_n,Un,Wn,Gn,Yn,Xn,Jn,Qn,Zn,Kn,eo,to,no,oo,ro,io,so,ao,lo,co,uo,fo,po,mo,go,ho,vo,yo,bo,Co,xo,wo,To,jo,So,Io,No,Fo,Po,Vo,Ot,ei,Mo){"use strict";var Zr=Object.defineProperty;var Kr=(N,ce,De)=>ce in N?Zr(N,ce,{enumerable:!0,configurable:!0,writable:!0,value:De}):N[ce]=De;var Re=(N,ce,De)=>Kr(N,typeof ce!="symbol"?ce+"":ce,De);const ot=new Map([["appearance",Ce.resolveAppearance]]);function Bo(t,n){var a,s;if(!(n!=null&&n.schema))return;const o=((s=(a=n.schema)==null?void 0:a.appearance)==null?void 0:s.class)||"",r=n.elementRef,i=window.getComputedStyle(r);i&&i.display==="flex"&&!o.includes("f-page-child-fill")&&(t.appearance.class+=" d-block")}function ko(t,n){var g;const o=Math.random().toString().slice(2,6),r=n.parentComponentInstance,i=t.getSchemaByType("tab-page");i.id=`tab-page-${o}`,i.title="标题",i.toolbar={id:`tab-page-toolbar-${o}`,buttons:[]};const a=t.getSchemaByType("tabs");Object.assign(a,{id:`tabs-${o}`,appearance:{class:"f-component-tabs f-tabs-has-grid"},contents:[i],activeId:i.id});const s=t.getSchemaByType("section");Object.assign(s,{id:`section-${o}`,appearance:{class:"f-section-tabs f-section-in-mainsubcard"},fill:!1,showHeader:!1,contents:[a]});const l=t.getSchemaByType("content-container");Object.assign(l,{id:`container-${o}`,appearance:{class:"f-struct-wrapper"},contents:[s]});const u=r.schema,c=((g=u.appearance)==null?void 0:g.class)||"";switch(u&&u.type){case Me.DgControl["splitter-pane"].type:{s.appearance.class="f-section-tabs f-section-in-main",a.appearance.class="f-component-tabs",c.includes("f-page-child-fill")&&(l.appearance.class+=" f-struct-wrapper-child",s.fill=!0,a.fill=!0);break}case Me.DgControl["content-container"].type:u.isLikeCardContainer&&c.includes("f-struct-like-card-child-fill")&&(l.appearance.class+=" f-struct-wrapper-child",s.fill=!0,a.fill=!0)}return Bo(l,r),l}function Et(t,n,o){if(o.parentComponentInstance)return ko(t,o);{const i=t.getSchemaByType("tab-page");return n.contents=[i],n}}function $t(t,n,o){return n}const Rt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tabs.schema.json",title:"tabs",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Tabs",type:"string"},type:{description:"The type string of Tabs component",type:"string",default:"tabs"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},autoTitleWidth:{description:"",type:"boolean",default:!1},titleWidth:{description:"",type:"number"},titleLength:{description:"",type:"number",default:7},fill:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},activeId:{description:"",type:"string",default:""}},required:["id","type","contents"],events:{onTabChange:"切换标签页事件",onTabRemove:"移除标签页事件"}},Oo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar.schema.json",title:"tab-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Tab Toolbar",type:"string"},type:{description:"The type string of Tab Toolbar",type:"string",default:"tab-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"The alignment of Tab Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Tab Toolbar.",type:"array",default:[]},buttonSize:{type:"string",default:""},visible:{description:"",type:"boolean",default:!0}},required:["id","type","buttons"],events:{onClick:"点击事件"}},Eo=Ce.createPropsResolver(De.tabsProps,Rt,ot,Et),Dt=Object.assign({},De.tabsProps,{componentId:{type:String,default:""}}),$o=Ce.createPropsResolver(Dt,Rt,ot,Et),Ro=Ce.createTabsEventHandlerResolver(),Do=Ce.createPropsResolver(an.responseToolbarProps,Oo,ot,dt.schemaResolver);function qo(t,n,o,r,i,a){const{activeId:s,selectTab:l,removeDesignTab:u,selectDesignTab:c,addTabPageToolbar:g,resetPositionForSelectedElement:d}=i,p=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),m=e.computed(()=>{const z={"farris-component":!0,"nav-item":!0,"f-state-active":n.id===s.value};return z[`${n.id}-design-item`]=!0,z}),b=e.computed(()=>{const z={};return n.tabWidth&&n.tabWidth>0&&(z.width=`${n.tabWidth}px`),z}),h=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===s.value}));function k(){return e.createVNode("span",{class:p.value,title:n.title},[n.title])}const E=e.ref(n.removeable);function C(){return E.value?e.createVNode("span",{class:"st-drop-close",style:"opacity:0.6"},[e.createVNode("i",{class:"f-icon f-icon-close"},null)]):""}function P(){return E.value?n.titleHtml+`<span class="st-drop-close" style="opacity:0.6">
2
2
  <i class="f-icon f-icon-close"></i>
3
- </span>`:n.titleHtml}function x(E){r(n.id),t.tabType==="one-page"&&a.scrollToByPaggId(n.id)}function v(E){E&&(E.stopPropagation(),E.preventDefault()),f(E,n.id,l.value)}function B(E){c(E,n.id)}function b(E){d(E,n.id)}e.watch(()=>n.toolbarPosition,()=>{e.nextTick(()=>{u()})}),e.watch(()=>n.tabWidth,()=>{e.nextTick(()=>{u()})}),e.watch(()=>n.titleHtml,()=>{e.nextTick(()=>{u()})});function O(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:E=>B(E)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function P(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增按钮",ref:"addComponent",onClick:E=>b(E)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle"},null)])}function k(){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[O(),!n.toolbar||!n.toolbar.buttons||!n.toolbar.buttons.length?P():""])])}function C(){return o.slots.title?e.createVNode("a",{class:p.value,onClick:x,id:`${n.id}-design-item`},[o.slots.title(o),T()]):n.titleHtml?e.createVNode("a",{class:p.value,onClick:x,id:`${n.id}-design-item`,innerHTML:$()},null):e.createVNode("a",{class:p.value,onClick:x,id:`${n.id}-design-item`},[F(),T()])}return e.createVNode("li",{onClick:E=>v(E),class:y.value,style:m.value,pageId:`${n.id}-design-item`},[k(),C()])}function Eo(t,n){let o;function a(u){const{properties:h,title:y,ignore:m}=u,p=m&&Array.isArray(m),F=Object.keys(h).reduce((V,T)=>((!p||!m.find($=>$===T))&&(V[T]=h[T].type==="object"&&h[T].properties?a(h[T]):Me.cloneDeep(h[T].default)),V),{});if(y&&(!p||!m.find(V=>V==="id"))){const V=y.toLowerCase().replace(/-/g,"_");F.id=`${V}_${Math.random().toString().slice(2,6)}`}return F}function s(u){const{properties:h,title:y,required:m}=u;if(m&&Array.isArray(m)){const p=m.reduce((F,V)=>(F[V]=h[V].type==="object"&&h[V].properties?a(h[V]):Me.cloneDeep(h[V].default),F),{});if(y&&m.find(F=>F==="id")){const F=y.toLowerCase().replace(/-/g,"_");p.id=`${F}_${Math.random().toString().slice(2,6)}`}return p}return{type:y}}function l(u,h={},y){const m=t[u];if(m){let p=s(m);const F=n[u];return p=F?F({getSchemaByType:l},p,h,y):p,o!=null&&o.appendIdentifyForNewControl&&o.appendIdentifyForNewControl(p),p}return null}function i(u,h){const y=a(h);return Object.keys(y).reduce((m,p)=>(Object.prototype.hasOwnProperty.call(u,p)&&(m[p]&&Me.isPlainObject(m[p])&&Me.isPlainObject(u[p]||!u[p])?Object.assign(m[p],u[p]||{}):m[p]=u[p]),m),y),y}function r(u,h){return Object.keys(u).filter(m=>u[m]!=null).reduce((m,p)=>{if(h.has(p)){const F=h.get(p);if(typeof F=="string")m[F]=u[p];else{const V=F(p,u[p],u);Object.assign(m,V)}}else m[p]=u[p];return m},{})}function c(u,h,y=new Map){const m=i(u,h);return r(m,y)}function f(u){var y;const h=u.type;if(h){const m=t[h];if(!m)return u;const p=i(u,m),F=((y=u.editor)==null?void 0:y.type)||"";if(F){const V=t[F],T=i(u.editor,V);p.editor=T}return p}return u}function d(u){o=u}return{getSchemaByType:l,resolveSchemaWithDefaultValue:f,resolveSchemaToProps:c,mappingSchemaToProps:r,setDesignerContext:d}}const Mo={},Ro={},{getSchemaByType:Dt}=Eo(Mo,Ro);function Oo(t,n,o,a,s,l,i){const{tabPages:r,selectTab:c,emitSelectionChange:f}=s,d=e.computed(()=>({spacer:!0,"f-utils-fill":!0})),u=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),h=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"})),y=e.computed(()=>({overflow:"auto"})),m=function(p){var V;p&&(p.stopPropagation(),p.preventDefault());const F=Dt("tab-page");F.id=`tab_page_${Math.random().toString().slice(2,6)}`,F.title="标题",F.toolbar={id:`${F.id}_toolbar`,buttons:[],type:"tab-toolbar"},(V=l.value.schema.contents)==null||V.push(F),c(F.id),e.nextTick(()=>{f(F.id,l.value)})};return()=>e.createVNode("div",{class:d.value,style:u.value},[e.createVNode("ul",{class:h.value,style:y.value,ref:n},[r.value.map(p=>Vo(t,p.props,p,a,s,l)),e.createVNode("li",{class:"nav-item no-drag add-nav-item"},[e.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:p=>m(p)},[e.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function Do(t,n,o,a,s){const l=e.ref(),{shouldShowNavigationButtons:i}=o,{activeId:r,tabPages:c,selectTab:f}=s,d=e.ref(r.value),u=e.computed(()=>c.value.map(p=>({name:p.props.title,value:p.props.id,show:p.props.show,disabled:p.props.disabled}))),h=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":i.value})),y=e.computed(()=>({width:"100%",display:"flex","justify-content":t.justifyContent}));e.onMounted(()=>{l.value&&(n.value=l.value.$el)});function m(p){f(p)}return e.watch(()=>r.value,p=>{p!==d.value&&(d.value=p)},{immediate:!0}),()=>e.createVNode("div",{class:h.value,style:y.value},[e.createVNode(en,{items:u.value,modelValue:d.value,"onUpdate:modelValue":p=>d.value=p,onChange:m,ref:l},null)])}function $o(t,n,o,a){const s=e.ref(!1),{selectTab:l,tabPages:i,needUpdateNavigationLayout:r,activeId:c}=a,f=4,d=e.computed(()=>({btn:!0,"sc-nav-btn":!0,"px-1":!0,"sc-nav-lr":!0,"d-none":!s.value})),u=e.computed(()=>({"btn-group":!0,"sc-nav-btn":!0,dropdown:!0,"d-none":!s.value})),h=e.computed(()=>({btn:!0,"sc-nav-rg":!0,"d-none":!s.value}));function y(T,$){if(!n.value)return;const x=n.value.scrollLeft,v=n.value.scrollWidth-n.value.offsetWidth;if($>0){if(n.value.scrollLeft>=v)return;n.value.scrollLeft=x+t.scrollStep+T}else if($<0){if(n.value.scrollLeft<=0)return;n.value.scrollLeft=x-t.scrollStep-T}}function m(T=-1){if(!s.value||!n.value)return;T<0&&(T=i.value.findIndex(b=>b.props.id===c.value));const $=t.tabType==="pills"?".f-capsule-item":".nav-item",x=n.value.querySelectorAll($),{parentElement:v}=n.value,B=x[T];if(B&&v){const b=v.getBoundingClientRect().left,O=v.getBoundingClientRect().right,P=B.getBoundingClientRect().left,k=B.getBoundingClientRect().right;P<b?y(b-P,-1):O<k&&y(k-O,1),t.tabType==="one-page"&&o.scrollTo(T)}}function p(){var x;if(!n.value)return;const T=n.value,$=(x=n.value)==null?void 0:x.parentElement;s.value=$&&T&&$.offsetWidth<T.scrollWidth-f,s.value&&e.nextTick(()=>{m()})}function F(T){T.disabled||l(T.id)}function V(){["default","one-page"].indexOf(t.tabType)>-1&&e.nextTick(()=>{m()})}return e.watch(r,()=>{p()}),{previousButtonClass:d,nextButtonGroupClass:u,nextButtonClass:h,scrollTab:y,selectAndScrollToTab:F,shouldShowNavigationButtons:s,updateNavigationLayout:p,scrollToSelectedTab:V}}function qo(t,n){const{tabPages:o}=n,a=e.ref(""),s=e.ref(!0),l=e.computed(()=>t.searchBoxVisible),i=e.computed(()=>l.value?o.value.filter(c=>c.props.title.includes(a.value)):o.value.slice());return e.watch(s,r=>{r||(a.value="")}),{searchTabText:a,hideDropDown:s,shouldShowSearchBox:l,tabsInDropdownMenu:i}}function Lo(t,n,o){const a=".farris-tab-page",{tabPages:s}=o;function l(r){const c=n.value;if(c){const f=n.value.querySelectorAll(a);if(f.length>0){const d=f[r],{offsetTop:u}=d,h=u-32>0?u-32:0;c.scrollTop=h}}}function i(r){const c=s.value.findIndex(f=>f.props.id===r);c>-1&&l(c)}return{scrollTo:l,scrollToByPaggId:i}}e.ref(0);var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ho(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $t={exports:{}};(function(t,n){(function(o){t.exports=o()})(function(){return function(){function o(a,s,l){function i(f,d){if(!s[f]){if(!a[f]){var u=typeof dt=="function"&&dt;if(!d&&u)return u(f,!0);if(r)return r(f,!0);var h=new Error("Cannot find module '"+f+"'");throw h.code="MODULE_NOT_FOUND",h}var y=s[f]={exports:{}};a[f][0].call(y.exports,function(m){var p=a[f][1][m];return i(p||m)},y,y.exports,o,a,s,l)}return s[f].exports}for(var r=typeof dt=="function"&&dt,c=0;c<l.length;c++)i(l[c]);return i}return o}()({1:[function(o,a,s){var l={},i="(?:^|\\s)",r="(?:\\s|$)";function c(u){var h=l[u];return h?h.lastIndex=0:l[u]=h=new RegExp(i+u+r,"g"),h}function f(u,h){var y=u.className;y.length?c(h).test(y)||(u.className+=" "+h):u.className=h}function d(u,h){u.className=u.className.replace(c(h)," ").trim()}a.exports={add:f,rm:d}},{}],2:[function(o,a,s){(function(l){var i=o("contra/emitter"),r=o("crossvent"),c=o("./classes"),f=document,d=f.documentElement;function u(C,E){var Y=arguments.length;Y===1&&Array.isArray(C)===!1&&(E=C,C=[]);var U,J,ee,re,H,A,K,X,ie,ge=null,Ce,te,Te=!1,we=0,ae,G=E||{};G.moves===void 0&&(G.moves=T),G.accepts===void 0&&(G.accepts=T),G.invalid===void 0&&(G.invalid=Ye),G.containers===void 0&&(G.containers=C||[]),G.isContainer===void 0&&(G.isContainer=V),G.copy===void 0&&(G.copy=!1),G.copySortSource===void 0&&(G.copySortSource=!1),G.revertOnSpill===void 0&&(G.revertOnSpill=!1),G.removeOnSpill===void 0&&(G.removeOnSpill=!1),G.direction===void 0&&(G.direction="vertical"),G.ignoreInputTextSelection===void 0&&(G.ignoreInputTextSelection=!0),G.mirrorContainer===void 0&&(G.mirrorContainer=f.body);var le=i({containers:G.containers,start:He,end:tt,cancel:I,remove:nt,destroy:de,canMove:De,dragging:!1});return G.removeOnSpill===!0&&le.on("over",bt).on("out",Ct),j(),le;function g(w){return le.containers.indexOf(w)!==-1||G.isContainer(w)}function j(w){var L=w?"remove":"add";m(d,L,"mousedown",Ie),m(d,L,"mouseup",$e)}function N(w){var L=w?"remove":"add";m(d,L,"mousemove",fe)}function _(w){var L=w?"remove":"add";r[L](d,"selectstart",ue),r[L](d,"click",ue)}function de(){j(!0),$e({})}function ue(w){Ce&&w.preventDefault()}function Ie(w){re=w.clientX,H=w.clientY;var L=p(w)!==1||w.metaKey||w.ctrlKey;if(!L){var z=w.target,Q=ye(z);Q&&(Ce=Q,N(),w.type==="mousedown"&&(B(z)?z.focus():w.preventDefault()))}}function fe(w){if(Ce){if(p(w)===0){$e({});return}if(!(w.clientX!==void 0&&Math.abs(w.clientX-re)<=(G.slideFactorX||0)&&w.clientY!==void 0&&Math.abs(w.clientY-H)<=(G.slideFactorY||0))){if(G.ignoreInputTextSelection){var L=k("clientX",w)||0,z=k("clientY",w)||0,Q=f.elementFromPoint(L,z);if(B(Q))return}var se=Ce;N(!0),_(),tt(),_e(se),c.add(X||ee,"gu-transit"),xt(),wt(),we=0,Ne(w)}}}function ye(w){if(!(le.dragging&&U)&&!g(w)){for(var L=w;v(w)&&g(v(w))===!1;)if(G.invalid(w,L)||(w=v(w),!w))return;var z=v(w);if(z&&!G.invalid(w,L)){var Q=G.moves(w,z,L,O(w));if(Q)return{item:w,source:z}}}}function De(w){return!!ye(w)}function He(w){var L=ye(w);L&&_e(L)}function _e(w){Ft(w.item,w.source)&&(X=w.item.cloneNode(!0),le.emit("cloned",X,w.item,"copy")),J=w.source,ee=w.item,A=K=O(w.item),le.dragging=!0,le.emit("drag",ee,J)}function Ye(){return!1}function tt(){if(le.dragging){var w=X||ee;Je(w,v(w))}}function Xe(){Ce=!1,N(!0),_(!0)}function $e(w){if(Xe(),!!le.dragging){var L=X||ee,z=k("clientX",w)||0,Q=k("clientY",w)||0,se=F(U,z,Q),ce=he(se,z,Q);ce&&(X&&G.copySortSource||!X||ce!==J)?Je(L,ce):G.removeOnSpill?nt():I()}}function Je(w,L){var z=v(w);X&&G.copySortSource&&L===J&&z.removeChild(ee),pe(L)?le.emit("cancel",w,J):le.emit("drop",w,L,J,K),ne()}function nt(){if(le.dragging){var w=X||ee,L=v(w);L&&L.removeChild(w),le.emit(X?"cancel":"remove",w,L,J),ne()}}function I(w){if(le.dragging){var L=arguments.length>0?w:G.revertOnSpill,z=X||ee,Q=v(z),se=pe(Q);se===!1&&L&&(X?Q&&Q.removeChild(X):J.insertBefore(z,A)),se||L?le.emit("cancel",z,J,J):le.emit("drop",z,Q,J,K),ne()}}function ne(){var w=X||ee;Xe(),Tt(),St(),w&&c.rm(w,"gu-transit"),ie&&clearTimeout(ie),le.dragging=!1,ge&&le.emit("out",w,ge,J),le.emit("dragend",w,we),J=ee=X=A=K=ie=ge=null}function pe(w,L){var z;return L!==void 0?z=L:U?z=K:z=O(X||ee),w===J&&z===A}function he(w,L,z){for(var Q=w;Q&&!se();)Q=v(Q);return Q;function se(){var ce=g(Q);if(ce===!1)return!1;var qe=mt(Q,w),Be=pt(Q,qe,L,z),Re=pe(Q,Be);return Re?!0:G.accepts(ee,Q,J,Be)}}function Ne(w){if(!U)return;w.preventDefault();var L=k("clientX",w)||0,z=k("clientY",w)||0;U.style.left=L-2+"px",U.style.top=z-2+"px";var Q=X||ee,se=F(U,L,z),ce=he(se,L,z),qe=ce!==null&&ce!==ge;(qe||ce===null)&&(Ve(),ge=ce,Ae()),Pt(se,z);var Be=v(Q);if(ce===J&&X&&!G.copySortSource){Be&&Be.removeChild(Q);return}var Re,Le=mt(ce,se);if(Te=jt(Le,ce),Le!==null)Re=pt(ce,Le,L,z);else if(G.revertOnSpill===!0&&!X)Re=A,ce=J;else{X&&Be&&Be.removeChild(Q),X&&te&&(te.style.display="none");return}te.style.display="block",yt(Re,Q,qe),Re?It(Le,Re):Nt(ce);function Se(Pe){le.emit(Pe,Q,ge,J)}function Ae(){qe&&Se("over")}function Ve(){ge&&Se("out")}}function yt(w,L,z){(w===L||w===O(L))&&(K=O(L)),(w===null&&z||w!==L&&w!==O(L))&&(K=w)}function bt(w){c.rm(w,"gu-hide")}function Ct(w){le.dragging&&c.add(w,"gu-hide")}function wt(){U||(U=document.createElement("div"),U.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",U.innerHTML=G.getMirrorText&&G.getMirrorText(ee)||"控件",c.add(U,"gu-mirror"),G.mirrorContainer.appendChild(U),m(d,"add","mousemove",Ne),c.add(G.mirrorContainer,"gu-unselectable"),le.emit("cloned",U,ee,"mirror"))}function xt(){if(te=document.createElement("div"),c.add(te,"gu-insertion"),ee){var w=ee.getBoundingClientRect();te.style.left=w.left+"px",te.style.top=w.top+"px"}Te=!1,G.mirrorContainer.appendChild(te)}function Tt(){U&&(c.rm(G.mirrorContainer,"gu-unselectable"),m(d,"remove","mousemove",Ne),v(U).removeChild(U),U=null)}function St(){te&&(v(te).removeChild(te),te=null)}function mt(w,L){for(var z=L;z!==w&&v(z)!==w;)z=v(z);return z===d?null:z}function jt(w,L){if(!L)return Te;var z=w||L&&L.lastElementChild;if(!z)return!0;var Q=getComputedStyle(w),se=/^inline/.test(Q.getPropertyValue("display"))||/^(left|right)$/.test(Q.getPropertyValue("float"));if(se)return!0;if(L){var ce=getComputedStyle(L),qe=ce.getPropertyValue("display");if(/flex$/.test(qe)){var Be=ce.getPropertyValue("flex-direction")||"row";if(Be==="row"||Be==="row-reverse")return!at(L)}return!1}return!0}function at(w){if(!w.children||!w.children.length)return!1;for(const L of Array.from(w.children)){const Q=(L.className&&L.className.split(" ")||[]).filter(se=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(se));if(!Q.length)return!1;for(const se of Q){const ce=se.slice(se.lastIndexOf("-")+1);if(parseInt(ce,10)!==12)return!1}}return!0}function It(w,L){const z=L.getBoundingClientRect();if(te.style.left=z.left+"px",te.style.top=z.top+"px",Te){if(te.style.height=z.height+"px",te.style.width="4px",w){const Q=w.getBoundingClientRect();Q.top!==z.top&&(te.style.left=Q.right+"px",te.style.top=Q.top+"px",te.style.height=Q.height+"px")}}else if(te.style.height="4px",te.style.width=z.width+"px",ae){const Q=ae.getBoundingClientRect();z.top<Q.top&&(te.style.display="none")}L===ee&&ee&&(te.style.display="none")}function Nt(w){K=null;var L=w.lastElementChild;if(L){var z=L.getBoundingClientRect();Te?(te.style.left=z.right+"px",te.style.top=z.top+"px",te.style.height=z.height+"px",te.style.width="4px"):(te.style.left=z.left+"px",te.style.top=z.bottom+"px",te.style.height="4px",te.style.width=z.width+"px"),L===ee&&ee&&(te.style.display="none")}else te.style.display="none"}function Pt(w,L){if(!G.mirrorContainer.contains(w)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(ae=h(w),!ae||!ae.contains(w)))return;const z=document.querySelector(".dgComponentSelected"),Q=ae.getBoundingClientRect();if(L-30<Q.top&&ae.scrollTop>0){let se=ae.scrollTop<10?ae.scrollTop:10;ae.scrollBy(0,-1*se),z&&ae.contains(z)&&(we=we+-1*se)}if(L+30>Q.bottom&&ae.scrollTop<ae.scrollHeight-ae.clientHeight){const se=ae.scrollHeight-ae.clientHeight-ae.scrollTop;let ce=se<10?se:10;ae.scrollBy(0,ce),z&&ae.contains(z)&&(we=we+ce)}}function pt(w,L,z,Q){var se=G.direction==="horizontal",ce=G.direction==="mixed",qe=L!==w?Re():Be();return qe;function Be(){var Se=w.children.length,Ae,Ve,Pe;for(Ae=0;Ae<Se;Ae++)if(Ve=w.children[Ae],Pe=Ve.getBoundingClientRect(),se&&Pe.left+Pe.width/2>z||!ce&&!se&&Pe.top+Pe.height/2>Q||ce&&Pe.left+Pe.width>z&&Pe.top+Pe.height>Q)return Ve;return null}function Re(){var Se=L.getBoundingClientRect();if(ce){var Ae=Q-Se.top,Ve=z-Se.left,Pe=Se.bottom-Q,st=Se.right-z,lt=Math.min(Ve,st,Ae,Pe),ct;return Te?ct=st<Ve:ct=Pe===lt||st===lt||Ve===lt,Le(ct)}return Le(se?z>Se.left+$(Se)/2:Q>Se.top+x(Se)/2)}function Le(Se){return Se?O(L):L}}function Ft(w,L){return typeof G.copy=="boolean"?G.copy:G.copy(w,L)}}function h(C){const E=Array.from(window.scrollContainerList);if(E.length===1){const U=Array.from(window.scrollContainerList)[0];return document.getElementById(U)}const Y=y(E);for(const U of Y)if(U.contains(C))return U;return null}function y(C){const E=[];return C.forEach(Y=>{const U=document.getElementById(Y);U&&E.push(U)}),E.sort((Y,U)=>Y.contains(U)?1:U.contains(Y)?-1:0),E}function m(C,E,Y,U){var J={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},ee={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},re={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?r[E](C,ee[Y],U):l.navigator.msPointerEnabled?r[E](C,re[Y],U):(r[E](C,J[Y],U),r[E](C,Y,U))}function p(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var E=C.button;if(E!==void 0)return E&1?1:E&2?3:E&4?2:0}function F(C,E,Y){C=C||{};var U=C.className||"",J;return C.className+=" gu-hide",J=f.elementFromPoint(E,Y),C.className=U,J}function V(){return!1}function T(){return!0}function $(C){return C.width||C.right-C.left}function x(C){return C.height||C.bottom-C.top}function v(C){return C.parentNode===f?null:C.parentNode}function B(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||b(C)}function b(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:b(v(C))}function O(C){return C.nextElementSibling||E();function E(){var Y=C;do Y=Y.nextSibling;while(Y&&Y.nodeType!==1);return Y}}function P(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function k(C,E){var Y=P(E),U={pageX:"clientX",pageY:"clientY"};return C in U&&!(C in Y)&&U[C]in Y&&(C=U[C]),Y[C]}a.exports=u}).call(this,typeof Ue<"u"?Ue:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,a,s){a.exports=function(i,r){return Array.prototype.slice.call(i,r)}},{}],4:[function(o,a,s){var l=o("ticky");a.exports=function(r,c,f){r&&l(function(){r.apply(f||null,c||[])})}},{ticky:10}],5:[function(o,a,s){var l=o("atoa"),i=o("./debounce");a.exports=function(c,f){var d=f||{},u={};return c===void 0&&(c={}),c.on=function(h,y){return u[h]?u[h].push(y):u[h]=[y],c},c.once=function(h,y){return y._once=!0,c.on(h,y),c},c.off=function(h,y){var m=arguments.length;if(m===1)delete u[h];else if(m===0)u={};else{var p=u[h];if(!p)return c;p.splice(p.indexOf(y),1)}return c},c.emit=function(){var h=l(arguments);return c.emitterSnapshot(h.shift()).apply(this,h)},c.emitterSnapshot=function(h){var y=(u[h]||[]).slice(0);return function(){var m=l(arguments),p=this||c;if(h==="error"&&d.throws!==!1&&!y.length)throw m.length===1?m[0]:m;return y.forEach(function(V){d.async?i(V,m,p):V.apply(p,m),V._once&&c.off(h,V)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(o,a,s){(function(l){var i=o("custom-event"),r=o("./eventmap"),c=l.document,f=h,d=m,u=[];l.addEventListener||(f=y,d=p),a.exports={add:f,remove:d,fabricate:F};function h(v,B,b,O){return v.addEventListener(B,b,O)}function y(v,B,b){return v.attachEvent("on"+B,T(v,B,b))}function m(v,B,b,O){return v.removeEventListener(B,b,O)}function p(v,B,b){var O=$(v,B,b);if(O)return v.detachEvent("on"+B,O)}function F(v,B,b){var O=r.indexOf(B)===-1?k():P();v.dispatchEvent?v.dispatchEvent(O):v.fireEvent("on"+B,O);function P(){var C;return c.createEvent?(C=c.createEvent("Event"),C.initEvent(B,!0,!0)):c.createEventObject&&(C=c.createEventObject()),C}function k(){return new i(B,{detail:b})}}function V(v,B,b){return function(P){var k=P||l.event;k.target=k.target||k.srcElement,k.preventDefault=k.preventDefault||function(){k.returnValue=!1},k.stopPropagation=k.stopPropagation||function(){k.cancelBubble=!0},k.which=k.which||k.keyCode,b.call(v,k)}}function T(v,B,b){var O=$(v,B,b)||V(v,B,b);return u.push({wrapper:O,element:v,type:B,fn:b}),O}function $(v,B,b){var O=x(v,B,b);if(O){var P=u[O].wrapper;return u.splice(O,1),P}}function x(v,B,b){var O,P;for(O=0;O<u.length;O++)if(P=u[O],P.element===v&&P.type===B&&P.fn===b)return O}}).call(this,typeof Ue<"u"?Ue:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,a,s){(function(l){var i=[],r="",c=/^on/;for(r in l)c.test(r)&&i.push(r.slice(2));a.exports=i}).call(this,typeof Ue<"u"?Ue:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,a,s){(function(l){var i=l.CustomEvent;function r(){try{var c=new i("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}a.exports=r()?i:typeof document<"u"&&typeof document.createEvent=="function"?function(f,d){var u=document.createEvent("CustomEvent");return d?u.initCustomEvent(f,d.bubbles,d.cancelable,d.detail):u.initCustomEvent(f,!1,!1,void 0),u}:function(f,d){var u=document.createEventObject();return u.type=f,d?(u.bubbles=!!d.bubbles,u.cancelable=!!d.cancelable,u.detail=d.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof Ue<"u"?Ue:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,a,s){var l=a.exports={},i,r;function c(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=c}catch{i=c}try{typeof clearTimeout=="function"?r=clearTimeout:r=f}catch{r=f}})();function d(x){if(i===setTimeout)return setTimeout(x,0);if((i===c||!i)&&setTimeout)return i=setTimeout,setTimeout(x,0);try{return i(x,0)}catch{try{return i.call(null,x,0)}catch{return i.call(this,x,0)}}}function u(x){if(r===clearTimeout)return clearTimeout(x);if((r===f||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(x);try{return r(x)}catch{try{return r.call(null,x)}catch{return r.call(this,x)}}}var h=[],y=!1,m,p=-1;function F(){!y||!m||(y=!1,m.length?h=m.concat(h):p=-1,h.length&&V())}function V(){if(!y){var x=d(F);y=!0;for(var v=h.length;v;){for(m=h,h=[];++p<v;)m&&m[p].run();p=-1,v=h.length}m=null,y=!1,u(x)}}l.nextTick=function(x){var v=new Array(arguments.length-1);if(arguments.length>1)for(var B=1;B<arguments.length;B++)v[B-1]=arguments[B];h.push(new T(x,v)),h.length===1&&!y&&d(V)};function T(x,v){this.fun=x,this.array=v}T.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function $(){}l.on=$,l.addListener=$,l.once=$,l.off=$,l.removeListener=$,l.removeAllListeners=$,l.emit=$,l.prependListener=$,l.prependOnceListener=$,l.listeners=function(x){return[]},l.binding=function(x){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(x){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(o,a,s){(function(l){var i=typeof l=="function",r;i?r=function(c){l(c)}:r=function(c){setTimeout(c,0)},a.exports=r}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,a,s){(function(l,i){var r=o("process/browser.js").nextTick,c=Function.prototype.apply,f=Array.prototype.slice,d={},u=0;s.setTimeout=function(){return new h(c.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new h(c.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(y){y.close()};function h(y,m){this._id=y,this._clearFn=m}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(y,m){clearTimeout(y._idleTimeoutId),y._idleTimeout=m},s.unenroll=function(y){clearTimeout(y._idleTimeoutId),y._idleTimeout=-1},s._unrefActive=s.active=function(y){clearTimeout(y._idleTimeoutId);var m=y._idleTimeout;m>=0&&(y._idleTimeoutId=setTimeout(function(){y._onTimeout&&y._onTimeout()},m))},s.setImmediate=typeof l=="function"?l:function(y){var m=u++,p=arguments.length<2?!1:f.call(arguments,1);return d[m]=!0,r(function(){d[m]&&(p?y.apply(null,p):y.call(null),s.clearImmediate(m))}),m},s.clearImmediate=typeof i=="function"?i:function(y){delete d[y]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})($t);var Ao=$t.exports;const qt=Ho(Ao),zo={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object},safeHtml:{type:Boolean,default:!0}},_o={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},ht=e.defineComponent({name:"Toast",props:_o,emits:["close","click"],setup:(t,n)=>{const o=e.ref(t.animate),a="fadeOut",s=e.computed(()=>t.options),l=e.ref(!1),i=e.computed(()=>s.value.title&&s.value.message),r=e.computed(()=>!s.value.title&&s.value.message),c=e.computed(()=>{const T={animated:l.value,toast:!0,"toast--only-content":!i.value};return T[t.animate]=!1,T[a]=l.value,T["toasty-type-"+s.value.type]=!0,s.value.theme&&(T[s.value.theme]=!0),T}),f=e.computed(()=>{const x=`f-icon-${s.value&&s.value.type?s.value.type.replace("toasty-type-",""):"default"}`,v={"f-icon":!0};return v[x]=!0,v}),d=e.computed(()=>s.value.title||s.value.message),u=e.computed(()=>t.showCloseButton),h=e.computed(()=>!!s.value.buttons||!!n.slots.default),y=e.computed(()=>ze.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function m(T){T.stopPropagation(),T.preventDefault(),l.value=!1,setTimeout(()=>{n.emit("close",s.value)},200)}function p(T,$){}function F(T){return`f-preten-link ${T.customClass?T.customClass:""}`}e.watch(o,()=>{o.value});const V=()=>{var T;return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((T=s.value.buttons)==null?void 0:T.map($=>e.createVNode("span",{class:F($),onClick:x=>void 0},[$.text]))),n.slots.default&&n.slots.default()])])};return()=>e.createVNode("div",{class:c.value,style:"min-height:44px"},[u.value&&e.createVNode("button",{title:ze.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:m},[e.createVNode("span",{class:"f-icon modal_close"},null)]),d.value&&e.createVNode("section",{class:"modal-tips"},[!i.value&&e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:f.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[i.value&&e.createVNode(e.Fragment,null,[e.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:s.value.title},null),e.createVNode("p",{class:"toast-msg",innerHTML:s.value.message,style:y.value},null),h.value&&V()]),r.value&&(s.value.buttons?e.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:y.value,innerHTML:s.value.message},null),e.createVNode("div",{class:"after-toast-title text-right ml-auto"},[V()])]):e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:y.value,innerHTML:s.value.message},null))])])])}}),ft=e.defineComponent({name:"Notify",props:zo,emits:["close","empty"],setup(t,n){const o=e.computed(()=>({"farris-notify":!0})),a={left:12,right:12,top:20,bottom:12},s=e.ref(),l=e.ref(t.options),i=e.ref(t.showCloseButton),r=e.computed(()=>t.position||"bottom-right"),c=e.computed(()=>t.timeout!=null?t.timeout:3e3),f=e.computed(()=>{const h=t.bottom?t.bottom:a.bottom,y=t.top?t.top:a.top,m={transition:"all 0.2s ease",left:r.value.indexOf("left")>-1?`${t.left?t.left:a.left}px`:"",right:r.value.indexOf("right")>-1?`${t.right?t.right:a.right}px`:"",top:r.value.indexOf("top")>-1?`${y}px`:"",bottom:r.value.indexOf("bottom")>-1?`${h}px`:""};return r.value.indexOf("center")>-1&&(m.left="50%",m.marginLeft="calc(-24rem / 2)",r.value==="center-center"&&(m.top="50%",m.transform="translate(-50%, -50%)")),m});function d(h){n.emit("close")}c.value&&setTimeout(()=>{d()},c.value),n.expose({closeToast:d,container:s,notifyPosition:r});function u(h,y){d()}return()=>e.createVNode("div",{class:o.value,style:f.value,ref:s},[e.createVNode(ht,{options:l.value,showCloseButton:i.value,animate:t.animate,onClose:h=>u(h,l.value)},null)])}});class Wo{constructor(){We(this,"notifyRefs",[]);We(this,"globalConfig",e.reactive({}))}escapeAllHtml(n){if(typeof n!="string"||!n)return"";const o=document.createElement("div");return o.textContent=n||"",o.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,s=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),l=document.createElement("div");l.style.display="contents";const i=e.createApp({setup(){var f;const r=e.ref();function c(){r.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(s,r),i.unmount()},220)}if(s.position.indexOf("top")>-1){const d=o.getNotifyInstances(s.position),u=d[d.length-1];if(u){const h=u.value.container.getBoundingClientRect();s.top=h.bottom}}return s.safeHtml&&((f=s.options)!=null&&f.message)&&(s.options.message=o.escapeAllHtml(s.options.message)),e.onUnmounted(()=>{document.body.removeChild(l)}),e.onMounted(()=>{o.updateNotifyPositionForCreate(s,r)}),()=>e.createVNode(e.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[e.createVNode(ft,e.mergeProps({ref:r},s,{onClose:c}),null)]})}});return i.provide("NotifyService",this),document.body.appendChild(l),i.use(ze.LocaleService.i18n),i.mount(l),i}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const a=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(s=>{const l=s.value.container.getBoundingClientRect();s.value.container.style.bottom=l.height+a-l.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const a=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const s=this.getNotifyInstances(n.position),l=s.indexOf(o);s.slice(l+1).forEach(i=>{i.value.container.style.top=i.value.container.offsetTop-i.value.container.offsetHeight+"px"})}a>-1&&this.notifyRefs.splice(a,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let a="",s="",l,i,r;typeof o=="string"?a=o:o&&(a=o.message||"",s=o.title||"",i=o.position||null,r=o.showCloseButton!=null?o.showCloseButton:null,l=o.timeout!=null?o.timeout:null);const f={options:{type:n,message:a,title:s}};return i!=null&&(f.position=i),r!=null&&(f.showCloseButton=r),l!=null&&(f.timeout=l),f}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const Uo=Symbol("NOTIFY_SERVICE_TOKEN");ft.install=t=>{t.component(ft.name,ft),t.component(ht.name,ht);const n=new Wo;t.provide(Uo,n),t.provide("FNotifyService",n)},`${ze.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Go={customClass:{type:String,default:""},sort:{type:Object},filter:{type:Object},autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loadData:{type:Function},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:36,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!1}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1},emptyTemplate:{type:Object},summary:{type:Object,default:{enable:!1,groupFields:["numericField1","numericField2"]}},autoHeight:{type:Boolean,default:!1},checkboxPosition:{type:String,default:"after-expand"}};function Yo(t,n,o,a,s,l,i,r,c,f,d,u,h,y,m,p,F,V,T){const{calculateCellPositionInRow:$}=l,{columnContext:x,hasLeftFixedColumn:v,hasRightFixedColumn:B}=i,{gridDataStyle:b,leftFixedGridDataStyle:O,rightFixedGridDataStyle:P}=y,{renderDataRow:k}=oe.getHierarchyRow(t,n,x,F,r,c,f,d,u,h,y,m,p,V,T),C=[k];function E(re,H){const A=$(re);return F.value.filter(K=>K.visible!==!1).map((K,X)=>C[K.type](K,A,H,X))}function Y(){return e.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:O.value},[E(x.value.leftColumns.filter(re=>re.visible),"left")])])}function U(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:b.value},[E(x.value.primaryColumns.filter(re=>re.visible),"primary")])])}function J(){return e.createVNode("div",{ref:s,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:P.value},[E(x.value.rightColumns.filter(re=>re.visible),"right")])])}function ee(){const re=[];return v.value&&re.push(Y()),re.push(U()),B.value&&re.push(J()),re}return{renderDataArea:ee}}const Xo=e.defineComponent({name:"FTreeGrid",props:Go,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged","selectionUpdate"],setup(t,n){var Jt,Qt;const o=e.ref(!1),a=0,s=e.ref(((Jt=t.rowOption)==null?void 0:Jt.height)||28),l=e.ref(20),i=e.ref(t.columns),r=oe.useIdentify(t),{idField:c}=r,f=e.ref(),d=e.ref(),u=e.ref(),h=e.ref(),y=e.ref(),m=e.ref([]),p=e.ref(!1),F=e.ref(((Qt=t.rowOption)==null?void 0:Qt.wrapContent)||!1),V=oe.useGroupData(t,r),T=oe.useFilter(t,n),$=oe.useHierarchy(t),{collapseField:x}=$,{showLoading:v,renderLoading:B}=oe.useLoading(t,f),b=oe.useDataView(t,new Map,T,$,r),{dataView:O}=b,P=oe.useSelection(t,b,r,m,n),{showSelection:k,selectedValues:C}=P,E=oe.useSelectHierarchyItem(t,m,b,r,P,n),Y=e.computed(()=>t.disabled),U=e.computed(()=>t.virtualized?Math.min(b.dataView.value.length,l.value):b.dataView.value.length),J=oe.usePagination(t,b),{shouldRenderPagination:ee}=J,{containerStyleObject:re}=oe.useDataViewContainerStyle(t),H=oe.useCommandColumn(t),{applyCommands:A}=H;A(i);const{applyColumnSetting:K,removeColumnSetting:X}=oe.useSettingColumn(t);t.showSetting&&K(i);const ie=oe.useColumn(t,n),ge=oe.useSort(t),{applyColumnSorter:Ce,columnContext:te,updateColumnRenderContext:Te}=ie;Ce(b,ge);const we=oe.useGroupColumn(t,te),ae=oe.useRow(t,n,P,r),G=oe.useEdit(t,n,r,ae,m),le=oe.useVisualDataBound(t,b,s),g=oe.useVisualDataCell(t,G,le),j=oe.useVisualDataRow(t,b,G,$,r,le,g,s),N=oe.useVisualData(t,i,b,U,a,j),{getVisualData:_}=N,de=oe.useCellPosition(t,te,s,o),ue=oe.useSidebar(t,P),{sidebarWidth:Ie}=ue,fe=oe.useVirtualScroll(t,b,m,te,N,U,a,Ie,s,o),{onWheel:ye,dataGridWidth:De,viewPortHeight:He,viewPortWidth:_e,resetScroll:Ye,updateVisibleRowsOnLatestVisibleScope:tt}=fe,Xe=oe.useFitColumn(t,te,d,_e,we),{calculateColumnsSize:$e}=Xe,Je=oe.useFilterHistory(),nt=oe.useColumnFilter(d,y,b,Je,fe),I=oe.useDragColumn(t,n,ie,b,we,V,fe),ne=e.computed(()=>{const W={"fv-grid":!0,"fv-grid-bordered":t.showBorder,"fv-grid-horizontal-bordered":t.showHorizontalLines,"fv-datagrid-strip":t.showStripe};return me.getCustomClass(W,t.customClass)}),pe=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":p.value,"fv-grid-wrap-content":F.value})),{renderDataArea:he}=Yo(t,n,u,h,y,de,ie,b,G,$,ae,P,E,fe,N,le,m,s,o),{renderGridHeader:Ne,renderGridColumnResizeOverlay:yt,shouldShowHeader:bt}=oe.getColumnHeader(t,n,d,h,y,ie,b,I,nt,T,Je,Xe,we,P,ue,ge,fe,_e,m),{renderDataGridSidebar:Ct}=oe.getSidebar(t,ae,P,ue,fe),{renderDisableMask:wt}=oe.getDisableMask(),{renderHorizontalScrollbar:xt}=oe.getHorizontalScrollbar(t,d,fe),{renderVerticalScrollbar:Tt}=oe.getVerticalScrollbar(t,d,fe);function St(){var W,Z,be;if(d.value&&d.value.clientHeight>0&&((W=d.value)==null?void 0:W.clientWidth)>0){const Fe=Math.ceil(d.value.clientHeight/s.value);Fe>l.value&&(l.value=Fe,tt()),He.value=((Z=u.value)==null?void 0:Z.clientHeight)||0,De.value=((be=d.value)==null?void 0:be.clientWidth)||0}d.value&&(d.value.clientHeight>0||d.value.clientWidth>0)&&$e()}e.onMounted(()=>{d.value&&(l.value=Math.max(Math.ceil(d.value.clientHeight/s.value),l.value),m.value=_(0,U.value+a-1),tn.useResizeObserver(d.value,St),$e(),e.nextTick(()=>{d.value&&(De.value=d.value.clientWidth),u.value&&(_e.value=u.value.clientWidth,He.value=u.value.clientHeight)})),v.value&&B()}),e.onUnmounted(()=>{}),e.watch(_e,()=>{d.value&&$e()});function mt(W){b.collapseTo(W),b.reOrderVisibleIndex(),Ye()}function jt(W){b.expandTo(W),b.reOrderVisibleIndex(),Ye()}function at(){const W=P.getSelectionRow();return W?W.dataIndex-1:-1}function It(W){const Z=W!==void 0?W:at(),be=b.insertNewDataItem(Z===-1?0:Z);return m.value=_(0,U.value+a-1),be}function Nt(){const W=at();b.insertNewChildDataItem(W),m.value=_(0,U.value+a-1)}function Pt(W,Z){const be=m.value.find(Ee=>Ee.raw[c.value]===Z),Fe=be?be.dataIndex-1:-1;b.insertNewChildDataItems(W,Fe)}function pt(){const W=at(),Z=E.getNextSelectableHierarchyItemId(W);b.removeHierarchyDataItem(W),m.value=_(0,U.value+a-1),Z&&E.selectItemById(Z)}function Ft(W){G.onEditingRow(W)}function w(W){G.acceptEditingRow(W)}function L(W){G.cancelEditingRow(W)}function z(W){W&&(i.value=W,A(i),Te(i.value),Ce(b,ge),$e())}e.watch(()=>t.columns,W=>{z(W)});function Q(W,Z){W&&(b.load(W),b.reOrderVisibleIndex(),Z!=null&&Z.keepScrollPosition?fe.scrollTo(fe.offsetY.value):Ye())}function se(W){ae.activeRowById(W)}function ce(W,Z={isCurrent:!0}){Z!=null&&Z.isCurrent&&se(W),E.selectItemById(W)}function qe(W){const Z=m.value.find(be=>be.raw[r.idField.value]===W);Z&&ae.clickRowItem(Z)}function Be(W){E.selectItemByIds(W)}function Re(){return P.getSelectedItems()}function Le(){P.clearSelection()}function Se(){P.emptyCurrentRowId()}const Ae=e.computed(()=>!m.value||!m.value.length),{renderEmpty:Ve}=oe.getEmpty(t,n);function Pe(){return P.getSelectionRow()}function st(W,Z={clearCurrent:!0}){Z!=null&&Z.clearCurrent&&se(""),E.unSelectItemByIds(W)}function lt(){return P.currentSelectedDataId.value}function ct(W,Z,be){const Fe=O.value.find(Ee=>Ee[c.value]===W);if(Fe){if(Object.keys(Fe).forEach(je=>{Object.prototype.hasOwnProperty.call(Z,je)&&(Fe[je]=Z[je])}),be){const{collapseField:je,disabledField:Qe,checkedField:Ze,visibleField:Ke}=be;je&&!Me.isUndefined(Z[je])&&(Fe.__fv_collapse__=Z[je]),Ze&&!Me.isUndefined(Z[Ze])&&(Fe.__fv_checked__=Z[Ze]),Qe&&!Me.isUndefined(Z[Qe])&&(Fe.__fv_disabled__=Z[Qe]),Ke&&!Me.isUndefined(Z[Ke])&&(Fe.__fv_visible__=Z[Ke])}const Ee=m.value.find(je=>je.raw[c.value]===W),Zt=m.value.findIndex(je=>je.raw[c.value]===W);if(Ee){if(Ee.raw=Fe,Object.keys(Ee.data).forEach(je=>{Ee.data[je].updateData(Fe)}),be){const{collapseField:je,disabledField:Qe,checkedField:Ze,visibleField:Ke}=be;je&&!Me.isUndefined(Z[je])&&(Ee.collapse=Z[je]),Ze&&!Me.isUndefined(Z[Ze])&&(Ee.checked=Z[Ze]),Qe&&!Me.isUndefined(Z[Qe])&&(Ee.disabled=Z[Qe]),Ke&&!Me.isUndefined(Z[Ke])&&(Ee.visible=Z[Ke])}m.value=[...m.value.slice(0,Zt),Ee,...m.value.slice(Zt+1)],b.updateSummary()}}}function ki(W){return Object.prototype.hasOwnProperty.call(W,"raw")?b.hasRealChildren(W.raw):b.hasRealChildren(W)}function Vi(W){const Z=b.dataView.value.find(be=>be[c.value]===W);return Z?Z[x.value]:""}function Ei(){return x.value}e.watch(()=>t.showSetting,(W,Z)=>{W!==Z&&(W?K(i):X(i),z(i.value))});function Mi(W){return m.value.filter(Z=>W.includes(Z.raw[t.idField]))}function Ri(W){const Z=r.idField.value,be=m.value.find(Fe=>Fe.raw[Z]===W);be&&ae.changeRow(be)}function Oi(){P.keepSelectingOnPaging.value||Le(),b.updateVisibleDataSummary(m.value)}n.expose({activeRowById:se,addNewDataItem:It,addNewChildDataItem:Nt,addChildrenToNode:Pt,collapseTo:mt,expandTo:jt,removeDataItem:pt,editDataItem:Ft,acceptDataItem:w,cancelDataItem:L,updateColumns:z,updateDataSource:Q,selectItemById:ce,selectItemByIds:Be,getSelectedItems:Re,clearSelection:Le,getSelectionRow:Pe,clickRowItemById:qe,unSelectItemByIds:st,getCurrentRowId:lt,reassignRowData:ct,hasChildren:ki,getCollapseField:Ei,getCollapseStatusById:Vi,getVisibleDataByIds:Mi,selectRowById:Ri,updateDerivedData:Oi,emptyCurrentRowId:Se,calculateColumnsSize:$e});const Di=e.computed(()=>{const W={};return fe.shouldShowHorizontalScrollbar.value&&(W.paddingBottom="10px"),fe.shouldShowVirticalScrollbar.value&&(W.paddingRight="10px"),W}),$i=e.computed(()=>({...re.value,borderRadius:"5px"})),{renderDataGridPagination:Mr}=oe.getPagination(t,n,b,fe,J,P),qi=e.computed(()=>({"d-flex":!0,"justify-content-between":ee.value&&k.value,"justify-content-end":ee.value&&!k.value,"position-relative":!0})),Li=e.computed(()=>({"d-flex":!0,"align-items-center":!0})),{renderDataGridSummary:Hi}=oe.getSummary(t,b,ie);return()=>e.createVNode("div",{ref:f,class:ne.value,style:$i.value,onWheel:ye},[d.value&&bt.value&&Ne(),e.createVNode("div",{ref:d,class:pe.value,onMouseover:()=>p.value=!0,onMouseleave:()=>p.value=!1,onTouchstart:W=>{W.stopPropagation(),p.value=!0,fe.onTouchstartScrollThumb(W,d)},onTouchend:W=>{p.value=!1},style:Di.value},[d.value&&Ct(m),d.value&&he(),d.value&&Ae.value&&Ve(),d.value&&xt(),d.value&&Tt()]),d.value&&Hi(),k.value&&e.createVNode("div",{class:qi.value},[k.value&&e.createVNode("div",{class:Li.value},[e.createVNode("div",null,["已选:"+C.value.length,e.createTextVNode(" 条")])])]),yt(),Y.value&&wt()])}});me.withInstall(Xo);const Jo=new Map([["appearance",xe.resolveAppearance]]);function Qo(t,n,o){return n}const Zo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ko={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},gt={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},Lt=xe.createPropsResolver(gt,Zo,Jo,Qo,Ko),et=e.defineComponent({name:"FStep",props:gt,emits:["click"],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),s=e.ref(t.height),l=e.ref(t.steps),i=e.ref(t.activeIndex),r=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),c=e.computed(()=>({height:o.value==="vertical"?`${s.value}px`:""}));function f(x,v){const B={step:!0,active:v===i.value,clickable:t.clickable,current:v===i.value,finish:v<i.value};return x.status&&(B[x.status]=!0),me.getCustomClass(B,x.class||"")}function d(x,v){if(!t.clickable)return;const B={step:x,stepIndex:v};n.emit("click",B)}function u(x,v){const B={"f-progressstep-row":!0,"step-active":v===i.value,"step-current":v===i.value,"step-finish":v<i.value};return x.status&&(B["step-"+x.status]=!0),B}function h(x,v){const B={"step-icon":!0,"step-success":v,"f-icon":v,"f-icon-check":v};return me.getCustomClass(B,x.icon||"")}function y(x,v){const B=[];return x.icon?B.push(e.createVNode("span",{class:h(x,!1)},null)):v>=i.value?B.push(e.createVNode("span",{class:"step-icon"},[v+1])):B.push(e.createVNode("span",{class:h(x,!0)},null)),B}function m(x,v){return{"step-name":!0,"step-name-success":v<i.value}}function p(x,v){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:m(x,v)},[x.title])])}function F(x,v){return{"f-progress-step-line":!0,"f-progress-step-line-success":v===i.value}}function V(x,v){return v!==l.value.length-1}const T=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function $(){return l.value.map((x,v)=>e.createVNode("li",{class:f(x,v),onClick:B=>d(x,v)},[e.createVNode("div",{class:u(x,v)},[e.createVNode("div",{class:"f-progress-step-content"},[y(x,v),p(x,v)]),V(x,v)&&e.createVNode("div",{class:F(x,v)},[e.createVNode("span",{class:T.value},null)])])]))}return e.watch(()=>t.activeIndex,()=>{t.activeIndex>-1&&t.activeIndex<=l.value.length&&(i.value=t.activeIndex,$())}),()=>e.createVNode("div",{class:"f-progress-step"},[e.createVNode("ul",{class:r.value,style:c.value},[$()])])}}),ei=e.defineComponent({name:"FStepDesign",props:gt,emits:[],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),s=e.ref(t.height),l=e.ref(t.steps),i=e.ref(0),r=e.ref(t.clickable),c=e.ref(0),f=e.ref(),d=e.inject("design-item-context"),u=ke.useDesignerComponent(f,d);e.onMounted(()=>{f.value.componentInstance=u}),n.expose(u.value);const h=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),y=e.computed(()=>({height:o.value==="vertical"?`${s.value}px`:""}));function m(P,k){const C={step:!0,active:k===i.value,clickable:r.value,"click-disable":P.disable,current:k===i.value};return k<i.value&&(C.finish=!0),P.status&&(C[P.status]=!0),P.hasOwnProperty("class")&&P.class.split(" ").reduce((E,Y)=>(E[Y]=!0,E),C),C}function p(P,k){}function F(P,k){const C={"f-progressstep-row":!0,"step-active":k===i.value,"step-current":k===i.value};return k<i.value&&(C["step-finish"]=!0),P.status&&(C["step-"+P.status]=!0),C}function V(P,k){const C={"step-icon":!0,"step-success":k,"k-icon":k,"k-i-check":k};return P.hasOwnProperty("icon")&&P.class.split(" ").reduce((E,Y)=>(E[Y]=!0,E),C),C}function T(P,k){const C=[];return P.icon?C.push(e.createVNode("span",{class:V(P,!1)},null)):k>=i.value||k===c.value?C.push(e.createVNode("span",{class:"step-icon"},[k+1])):C.push(e.createVNode("span",{class:V(P,!0)},null)),C}function $(P,k){return{"step-name":!0,"step-name-success":k<i.value}}function x(P,k){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:$(P,k)},[P.title])])}function v(P,k){return{"f-progress-step-line":!0,"f-progress-step-line-success":k===i.value}}function B(P,k){return k!==l.value.length-1}const b=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function O(){return l.value.map((P,k)=>e.createVNode("li",{class:m(P,k),onClick:C=>void 0},[e.createVNode("div",{class:F(P,k)},[e.createVNode("div",{class:"f-progress-step-content"},[T(P,k),x(P,k)]),B(P,k)&&e.createVNode("div",{class:v(P,k)},[e.createVNode("span",{class:b.value},null)])])]))}return()=>e.createVNode("div",{ref:f,class:"f-progress-step"},[e.createVNode("ul",{class:h.value,style:y.value},[O()])])}});et.install=t=>{t.component(et.name,et)},et.register=(t,n,o,a)=>{t.step=et,n.step=Lt},et.registerDesigner=(t,n,o)=>{t.step=ei,n.step=Lt};const ti={customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0},adaptForLanguage:{type:Boolean,default:!0}},vt=e.defineComponent({name:"FResponseForm",props:ti,emits:[],setup(t,n){const o=e.ref(),a=e.computed(()=>{const s=ze.LocaleService.getLocale(),l=t.customClass.split(" "),i={"drag-container":!0};return l.reduce((r,c)=>(r[c]=!0,r),i),t.adaptForLanguage&&s&&(i["farris-form-controls-inline"]=s!=="en"),i});return()=>t.visible&&e.withDirectives(e.createVNode("div",{ref:o,class:a.value,style:t.customStyle},[n.slots.default&&n.slots.default()]),[[e.resolveDirective("area-response")]])}}),ni={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number]},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},showLabelType:{type:String,default:"visible"},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null},fill:{type:Boolean,default:!1}},oi={id:{type:String},required:{type:Boolean,default:!1},text:{type:String,default:""},title:{type:String},valid:{type:Boolean,default:!0},inValidTip:{type:String,default:""},showType:{type:String,default:"visible"}},ii=e.defineComponent({name:"FDynamicFormLabel",props:oi,emits:[],setup(t,n){e.ref(t.title||t.text);const o=e.ref(t.required),a=e.ref(t.text),s=e.ref(t.valid),l=e.ref(t.inValidTip);e.watch(()=>t.text,()=>{a.value=t.text}),e.watch(()=>t.required,(d,u)=>{d!==u&&(o.value=d)}),e.watch([()=>t.valid,()=>t.inValidTip],([d,u])=>{s.value=d,l.value=u});const i=e.computed(()=>s.value?a.value:l.value),r=e.computed(()=>s.value?"":"color:red"),c=e.computed(()=>({"col-form-label":!0,"f-width-auto":o.value&&(t.showType==="none"||!a.value)})),f=e.computed(()=>t.showType==="force-none"?!1:t.showType==="reserve-space"||o.value||!!a.value&&t.showType!=="none");return()=>f.value&&e.createVNode("label",{class:c.value,title:i.value,style:r.value},[!s.value&&e.createVNode("span",{class:"f-icon f-icon-warning mr-1",style:"color: red; min-width: 16px;",title:l.value},null),e.createVNode("span",{class:"farris-label-text"},[o.value&&e.createVNode("span",{class:"farris-label-info text-danger"},[e.createTextVNode("*")]),t.showType==="visible"&&a.value])])}}),{globalStorageKey:ri}=me.useThirdComponent(),M={},R={},D={},q={};async function ai(){{const t={schemaMap:xe.schemaMap,propertyConfigSchemaMap:xe.propertyConfigSchemaMap,propertyEffectMap:xe.propertyEffectMap,schemaResolverMap:xe.schemaResolverMap};on.register(M,R,D,q),nn.register(M,R,D,q),rn.register(M,R,D,q),an.register(M,R,D,q),sn.register(M,R,D,q,t),ln.register(M,R,D,q),Bt.register(M,R,D,q,t),kt.register(M,R,D,q,t),Bt.register(M,R,D,q,t),kt.register(M,R,D,q,t),cn.register(M,R,D,q,t),un.register(M,R,D,q),dn.register(M,R,D,q),mn.register(M,R,D,q,t),fn.register(M,R,D,q),pn.register(M,R,D,q,t),hn.register(M,R,D,q,t),gn.register(M,R,D,q),vn.register(M,R,D,q,t),yn.register(M,R,D,q),ho.register(M,R,D,q),bn.register(M,R,D,q),Cn.register(M,R,D,q),so.register(M,R,D,q),xn.register(M,R,D,q),Tn.register(M,R,D,q,t),Sn.register(M,R,D,q,t),In.register(M,R,D,q,t),jn.register(M,R,D,q),Nn.register(M,R,D,q,t),Pn.register(M,R,D,q),Fn.register(M,R,D,q),Bn.register(M,R,D,q),kn.register(M,R,D,q,t),Vn.register(M,R,D,q),En.register(M,R,D,q,t),Mn.register(M,R,D,q),Rn.register(M,R,D,q),On.register(M,R,D,q),Dn.register(M,R,D,q,t),$n.register(M,R,D,q,t),qn.register(M,R,D,q),Ln.register(M,R,D,q,t),Hn.register(M,R,D,q),ut.register(M,R,D,q),io.register(M,R,D),An.register(M,R,D,q),zn.register(M,R,D,q,t),_n.register(M,R,D,q),Wn.register(M,R,D,q),Un.register(M,R,D,q),Gn.register(M,R,D,q,t),co.register(M,R,D,q),Yn.register(M,R,D,q,t),Xn.register(M,R,D,q),Jn.register(M,R,D,q),Qn.register(M,R,D,q,t),Zn.register(M,R,D,q),Kn.register(M,R,D,q),to.register(M,R,D,q),eo.register(M,R,D,q),no.register(M,R,D,q),oo.register(M,R,D,q,t),ro.register(M,R,D,q),wn.register(M,R,D,q),ao.register(M,R,D,q),lo.register(M,R,D,q,t),uo.register(M,R,D,q),fo.register(M,R,D,q),mo.register(M,R,D,q),po.register(M,R,D,q),go.register(M,R,D,q),vo.register(M,R,D,q,t),yo.register(M,R,D,q),bo.register(M,R,D,q),Co.register(M,R,D,q),wo.register(M,R,D,q,t),xo.register(M,R,D,q,t),To.register(M,R,D,q);const n=window[ri];if(n)for(const o in n)n[o].createPropsResolver=xe.createPropsResolver,n[o].register(M,R,D)}}function si(){ai();function t(i){const r=M[i];if(!r)throw new Error(`Could not find the editor of type '${i}'`);return r}function n(i,r){const c=R[i];return c?c(r):{}}function o(i){switch(i){case"check-box":return"onChangeValue";case"switch":return"onModelValueChanged";case"check-group":return"onChangeValue";case"combo-list":case"combo-tree":return"onChange";case"combo-lookup":return"";case"year-range":case"year-picker":case"month-range":case"month-picker":case"date-range":case"datetime-range":case"datetime-picker":return"onDatePicked";case"date-picker":return"onUpdate:modelValue";case"time-picker":return"onValueChange";case"input-group":return"onChange";case"lookup":case"sort-condition-editor":case"filter-condition-editor":case"code-editor":case"language-textbox":case"rich-text-editor":return"onUpdate:modelValue";case"number-range":return"onValueChange";case"number-spinner":return"onValueChange";case"radio-group":return"onChangeValue";case"text":return"";case"events-editor":return"onSavedCommandListChanged";case"grid-field-editor":case"item-collection-editor":case"response-form-layout-setting":case"response-layout-editor-setting":case"response-layout-splitter":case"menu-lookup":case"json-editor":return"onChange";case"field-selector":case"binding-selector":return"onFieldSelected";case"schema-selector":return"onSchemaSelected";case"mapping-editor":return"onMappingFieldsChanged";case"textarea":return"onChange";case"query-solution-config":case"solution-preset":case"filter-bar-config":return"onFieldsChanged";case"property-editor":return"onValueChange";case"expression-editor":return"onExpressionChanged";case"collection-property-editor":return"onValueChange";default:return"onUpdate:modelValue"}}function a(i){switch(i){case"combo-list":case"input-group":case"textarea":return"onClear"}}function s(i){switch(i){case"input-group":case"textarea":return"onMousedownEvent"}}function l(i){switch(i){case"input-group":case"textarea":return"onMouseupEvent"}}return{resolveEditorProps:n,resolveEditorType:t,getChangeFunctionName:o,getClearFunctionName:a,getMousedownFunctionName:s,getMouseupFunctionName:l}}const li={errors:{type:Object,default:null}},ci=e.defineComponent({name:"FValidationMessage",props:li,emits:[],setup(t,n){const o=e.ref(t.errors);e.watch(()=>t.errors,l=>{o.value=l});const a=e.ref(!0),s=e.computed(()=>{if(o.value){const l=Object.keys(o.value).map(i=>{var r;return(r=o.value[i])==null?void 0:r.name});return l.length?l.join(" "):""}return""});return()=>s.value&&e.createVNode("div",{class:"farris-feedback f-state-invalid",onClick:()=>a.value=!a.value},[!a.value&&e.createVNode("span",{class:"f-icon f-icon-message_warning f-feedback-icon"},null),a.value&&e.createVNode("span",{class:"f-feedback-message"},[s.value])])}}),Ht=e.defineComponent({name:"FDynamicFormGroup",props:ni,emits:["change","update:modelValue"],setup(t,n){var E;const o=e.ref(t.id),a=e.ref(t.customClass),s=e.ref(t.editor),l=e.ref(t.label),i=e.ref(t.modelValue),r=e.ref(t.readonly),c=e.ref(((E=t.editor)==null?void 0:E.required)||t.required),f=e.ref(t.showLabel),d=e.ref(t.visible);e.ref(t.type);const u=e.ref(),h=e.ref(t.errors),y=me.isMobilePhone(),m=e.ref(t.editor.type||"input-group"),p=e.computed(()=>f.value?t.showLabelType:"none"),{resolveEditorProps:F,resolveEditorType:V,getChangeFunctionName:T,getClearFunctionName:$}=si(),x=e.computed(()=>{const Y={"form-group":!0,"farris-form-group":!0,"common-group":!0,"q-state-readonly":r.value,"form-group--in-mobile":y};return Y["form-group--has-"+m.value]=!0,Y}),v=e.computed(()=>{if(t.fill)return{maxWidth:"none"}});function B(Y,U,J){i.value=U!==void 0?U:Y,n.emit("update:modelValue",i.value),n.emit("change",i.value,{newValue:Y,newModelValue:U,parameters:J})}function b(){n.emit("update:modelValue","")}function O(Y){return(...U)=>{b(),typeof Y=="function"&&Y(...U)}}function P(Y){return(U,J,ee)=>{B(U,J,ee),typeof Y=="function"&&Y(U,J,ee)}}const k=e.computed(()=>{const Y=s.value.type||"input-group",U=V(Y),J=F(Y,s.value),ee=T(Y),re=$(s.value.type);return re&&(J[re]=O(J[re])),ee&&(J[ee]=P(J[ee])),(J.id==null||J.id==="")&&(J.id=o.value),Y==="number-range"&&s.value.onBeginValueChange&&typeof s.value.onBeginValueChange=="function"?(s.value.onBeginValueChange&&typeof s.value.onBeginValueChange=="function"&&(J.onBeginValueChange=s.value.onBeginValueChange),s.value.onEndValueChange&&typeof s.value.onEndValueChange=="function"&&(J.onEndValueChange=s.value.onEndValueChange)):Y==="lookup"&&s.value["onUpdate:idValue"]&&typeof s.value["onUpdate:idValue"]=="function"?(J["onUpdate:idValue"]=s.value["onUpdate:idValue"],J.id=o.value):Y==="collection-property-editor"&&s.value.onSelectionChange&&typeof s.value.onSelectionChange=="function"?J.onSelectionChange=s.value.onSelectionChange:Y==="property-editor"&&(J.onBeforeOpenVariables=s.value.onBeforeOpenVariables),()=>e.createVNode(U,e.mergeProps({ref:u},J,{modelValue:i.value,"onUpdate:modelValue":H=>i.value=H}),n.slots)});function C(){return e.createVNode(ci,{id:`${o.value}-validation-message`,errors:h.value},null)}return e.watch([()=>t.id,()=>t.customClass,()=>t.editor,()=>t.label,()=>t.modelValue,()=>t.readonly,()=>t.required,()=>t.showLabel,()=>t.visible,()=>t.errors],([Y,U,J,ee,re,H,A,K,X,ie])=>{var ge;o.value=Y,a.value=U,s.value=J,l.value=ee,i.value=re,r.value=H,c.value=((ge=s.value)==null?void 0:ge.required)||A,f.value=K,d.value=X,h.value=ie}),n.expose({editorRef:u}),()=>d.value&&e.createVNode("div",{id:`${o.value}-form-group`,class:a.value,style:t.customStyle},[e.createVNode("div",{class:"farris-group-wrap",style:v.value},[e.createVNode("div",{class:x.value},[e.createVNode(ii,{id:`${o.value}-lable`,showType:p.value,required:c.value,text:l.value,title:l.value},null),e.createVNode("div",{class:"farris-input-wrap"},[k.value(),C()])])])])}});vt.install=t=>{t.component(vt.name,vt).component(Ht.name,Ht)};const ui={tabs:{name:"标签页"}},{globalStorageKey:yr}=me.useThirdComponent(),di={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"},isMessager:{type:Boolean,default:!1}};class ve{constructor(n,o){this.x=n,this.y=o}static getTransformInfo(n){const a=window.getComputedStyle(n).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(a.length>=6){const s=parseInt(a[4],10),l=parseInt(a[5],10);return{x:s,y:l}}return{x:0,y:0}}static fromEvent(n,o=null){if(this.isMouseEvent(n))return new ve(n.clientX,n.clientY);if(o===null||n.changedTouches.length===1)return new ve(n.changedTouches[0].clientX,n.changedTouches[0].clientY);for(let a=0;a<n.changedTouches.length;a++)if(n.changedTouches[a].target===o)return new ve(n.changedTouches[a].clientX,n.changedTouches[a].clientY)}static isMouseEvent(n){return Object.prototype.toString.apply(n).indexOf("MouseEvent")===8}static isIPosition(n){return!!n&&"x"in n&&"y"in n}static getCurrent(n){const o=new ve(0,0);if(window){const a=window.getComputedStyle(n);if(a){const s=parseInt(a.getPropertyValue("left"),10),l=parseInt(a.getPropertyValue("top"),10);o.x=isNaN(s)?0:s,o.y=isNaN(l)?0:l}return o}return null}static copy(n){return new ve(0,0).set(n)}get value(){return{x:this.x,y:this.y}}add(n){return this.x+=n.x,this.y+=n.y,this}subtract(n){return this.x-=n.x,this.y-=n.y,this}multiply(n){this.x*=n,this.y*=n}divide(n){this.x/=n,this.y/=n}reset(){return this.x=0,this.y=0,this}set(n){return this.x=n.x,this.y=n.y,this}}class Ge{constructor(n,o){this.width=n,this.height=o}static getCurrent(n){const o=new Ge(0,0);if(window){const a=window.getComputedStyle(n);return a&&(o.width=parseInt(a.getPropertyValue("width"),10),o.height=parseInt(a.getPropertyValue("height"),10)),o}return null}static copy(n){return new Ge(0,0).set(n)}set(n){return this.width=n.width,this.height=n.height,this}}function fi(t,n){const o=e.ref(),a=e.ref(),s=e.ref(),l=e.ref(),i=e.ref(),r=e.ref(),c=e.ref(),f=e.ref(),d=e.ref(),u=e.ref(),h=e.ref(),y=e.ref(t.resizeable),m=e.ref(),p=e.ref(t.draggable),F=e.ref(!1);function V(){const H=a.value||document.body,A=window.getComputedStyle(H);if(!A||!o.value)return;const K=ve.getTransformInfo(o.value),X={};c.value&&(X.deltaL=o.value.offsetLeft-c.value.x,X.deltaT=o.value.offsetTop-c.value.y);const ie=A.getPropertyValue("position");X.width=H.clientWidth,X.height=H.clientHeight,X.pr=parseInt(A.getPropertyValue("padding-right"),10),X.pb=parseInt(A.getPropertyValue("padding-bottom"),10),X.position=A.getPropertyValue("position"),ie==="static"&&(H.style.position="relative"),X.translateX=K.x,X.translateY=K.y,u.value=X}function T(H){if(o.value){l.value=Ge.getCurrent(o.value),i.value=ve.getCurrent(o.value),r.value=l.value?Ge.copy(l.value):null,c.value=i.value?ve.copy(i.value):null,V();const A=H.target.getAttribute("type")||"";f.value={n:!!A.match(/n/),s:!!A.match(/s/),w:!!A.match(/w/),e:!!A.match(/e/)}}}function $(){var H,A,K,X;if(o.value){const ie=o.value;f.value&&((f.value.n||f.value.s)&&((H=r.value)!=null&&H.height)&&(ie.style.height=r.value.height+"px"),(f.value.w||f.value.e)&&((A=r.value)!=null&&A.width)&&(ie.style.width=r.value.width+"px"),c.value&&((K=c.value)!=null&&K.x&&(ie.style.left=c.value.x+"px"),(X=c.value)!=null&&X.y&&(ie.style.top=c.value.y+"px")))}}function x(){const H=t.minHeight?t.minHeight:1,A=t.minWidth?t.minWidth:1;r.value&&c.value&&f.value&&l.value&&(r.value.height<H&&(r.value.height=H,f.value.n&&i.value&&(c.value.y=i.value.y+(l.value.height-H))),r.value.width<A&&(r.value.width=A,f.value.w&&i.value&&(c.value.x=i.value.x+(l.value.width-A))),t.maxHeight&&r.value.height>t.maxHeight&&(r.value.height=t.maxHeight,i.value&&f.value.n&&(c.value.y=i.value.y+(l.value.height-t.maxHeight))),t.maxWidth&&r.value.width>t.maxWidth&&(r.value.width=t.maxWidth,f.value.w&&i.value&&(c.value.x=i.value.x+(l.value.width-t.maxWidth))))}function v(){if(a.value){const H=u.value;if(c.value&&r.value&&f.value&&l.value){const A=H.width-H.pr-H.deltaL-H.translateX-c.value.x,K=H.height-H.pb-H.deltaT-H.translateY-c.value.y;f.value.n&&c.value.y+H.translateY<0&&i.value&&(c.value.y=-H.translateY,r.value.height=l.value.height+i.value.y+H.translateY),f.value.w&&c.value.x+H.translateX<0&&i.value&&(c.value.x=-H.translateX,r.value.width=l.value.width+i.value.x+H.translateX),r.value.width>A&&(r.value.width=A),r.value.height>K&&(r.value.height=K)}}}function B(H){if(!s.value||!l.value||!i.value||!f.value)return;H.subtract(s.value);const A=H.x,K=H.y;f.value.n?(c.value.y=i.value.y+K,r.value.height=l.value.height-K):f.value.s&&(r.value.height=l.value.height+K),f.value.e?r.value.width=l.value.width+A:f.value.w&&(r.value.width=l.value.width-A,c.value.x=i.value.x+A),v(),x(),$()}function b(H){if(!d.value)return;const A=ve.fromEvent(H);A&&B(A)}function O(){if(o.value){const{width:H,height:A,x:K,y:X}=o.value.getBoundingClientRect(),ie=ve.getTransformInfo(o.value);return{size:{width:H,height:A},position:{x:K-ie.x,y:X-ie.y}}}return null}function P(H){if(o.value){const A=O();h.value=A}s.value=void 0,l.value=null,i.value=null,r.value=null,c.value=null,f.value=null,d.value=null,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",P)}function k(){document.addEventListener("mousemove",b),document.addEventListener("mouseup",P)}function C(H){H instanceof MouseEvent&&H.button===2||p.value&&(document.body.click(),H.stopPropagation(),H.preventDefault(),s.value=ve.fromEvent(H),d.value=H.target,T(H),k())}function E(H){return o.value=H,y.value&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:A=>C(A)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:A=>C(A)},null)])}function Y(H=!0){document.body.click();const A=a.value||document.body,K=Ge.getCurrent(A),X=o.value;H&&X&&(m.value=O(),m.value.transform=X.style.transform),K&&X&&(r.value=K,r.value.height-=14,r.value.width-=14,X.style.height=r.value.height+"px",X.style.width=r.value.width+"px",X.style.left="7px",X.style.top="7px",X.style.transform="",h.value={size:r.value,position:{x:0,y:0}},p.value=!1,F.value=!0)}function U(){var H,A;if(document.body.click(),m.value){const K={width:m.value.size.width||0,height:m.value.size.height||0},X={x:(window.innerWidth-K.width)/2,y:(window.innerHeight-K.height)/2};(H=r.value)==null||H.set(K),(A=c.value)==null||A.set(X);const ie=o.value;ie.style.height=K.height+"px",ie.style.width=K.width+"px",ie.style.left=`${X.x}px`,ie.style.top=`${X.y}px`,ie.style.transform="",h.value={size:K,position:X},p.value=t.draggable,F.value=!1}}function J(){if(o.value){const H=Ge.getCurrent(o.value);if(H){const{width:A,height:K}=H;o.value.style.left=`${(window.innerWidth-A)/2}px`,o.value.style.top=`${(window.innerHeight-K)/2}px`,o.value.style.transform=""}}}function ee(){const H=()=>{F.value?Y(!1):J(),document.body.click()};return window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}}const re=ee();return{renderResizeBar:E,boundingElement:a,resizedEventParam:h,maximize:Y,restore:U,allowDrag:p,isMaximized:F,unWindowResizeHandle:re,moveToCenter:J}}function mi(t,n,o){const a=e.ref(),s=e.ref(t.draggable),l=e.ref(t.lockAxis),i=e.ref(),r=e.ref(),c=e.ref(!1),f=e.ref(new ve(0,0)),d=e.ref(new ve(0,0)),u=e.ref(new ve(0,0)),h=e.ref(new ve(0,0));e.watch(()=>o.value,b=>{i.value.style.cursor=b?"move":"default"});function y(b,O){if(O.tagName==="BUTTON")return!1;if(O===b)return!0;for(const P in O.children)if(Object.prototype.hasOwnProperty.call(O.children,P)&&y(b,O.children[P]))return!0;return!1}function m(){var k,C;let b=u.value.x+d.value.x,O=u.value.y+d.value.y;l.value==="x"?(b=((k=f.value)==null?void 0:k.x)||0,u.value.x=0):l.value==="y"&&(O=((C=f.value)==null?void 0:C.y)||0,u.value.y=0);const P=`translate3d(${Math.round(b)}px, ${Math.round(O)}px, 0px)`;a.value&&(a.value.style.transform=P),h.value.x=b,h.value.y=O}function p(){if(!r.value||!a.value)return null;const b=r.value.getBoundingClientRect(),O=a.value.getBoundingClientRect(),P={top:b.top<O.top,right:b.right>O.right,bottom:b.bottom>O.bottom,left:b.left<O.left};return P.top||(u.value.y-=O.top-b.top),P.bottom||(u.value.y-=O.bottom-b.bottom),P.right||(u.value.x-=O.right-b.right),P.left||(u.value.x-=O.left-b.left),m(),P}function F(b){b&&(f.value&&b.subtract(f.value),u.value.set(b),m(),p())}function V(b){c.value&&s.value&&(b.stopPropagation(),b.preventDefault(),F(ve.fromEvent(b,i.value)))}function T(){var b;c.value&&(c.value=!1,d.value.add(u.value),u.value.reset(),(b=a.value)==null||b.classList.remove("ng-dragging"),n.emit("stopMove"),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",T))}function $(){!c.value&&i.value&&(c.value=!0,i.value.classList.add("ng-dragging"),document.addEventListener("mousemove",V),document.addEventListener("mouseup",T))}function x(){if(a.value){const b=ve.getTransformInfo(a.value);d.value.set(b);return}d.value.reset()}function v(b){if(!o.value||b instanceof MouseEvent&&b.button===2)return;const O=b.target||b.srcElement;i.value!==void 0&&O&&!y(O,i.value)||s.value!==!1&&(document.body.click(),b.stopPropagation(),b.preventDefault(),f.value=ve.fromEvent(b,a.value),x(),$())}function B(b,O,P){if(s.value&&O){if(b)i.value=b;else if(t.dragHandle){if(t.dragHandle instanceof HTMLElement)i.value=t.dragHandle;else if(typeof t.dragHandle=="string"){const k=O.querySelector(t.dragHandle);k&&(i.value=k)}}a.value=O,r.value=P,i.value?(i.value.classList.add("ng-draggable"),i.value.addEventListener("mousedown",v)):s.value=!1}}return{registerDraggle:B,resetTranslate:x}}function At(t,n){if(t){const o=a=>{a.key.toLowerCase()===t.toLowerCase()&&n({event:a,key:t})};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}}}function pi(t,n){const o=e.ref(t.enableEsc);let a=null;return o.value?(a=At("Escape",s=>{n.emit("esc",{event:s.event,type:"esc"})}),{remove:a}):null}function hi(t,n){const o=e.ref(t.enableEnter);let a=null;return o.value?(a=At("Enter",s=>{n.emit("enter",{event:s.event,type:"enter"})}),{remove:a}):null}const it=e.defineComponent({name:"FModal",props:di,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(t,n){const o=e.ref(t.width||300),a=e.ref(t.height||200),s=e.ref(t.modelValue),l=e.ref(""),i=e.ref(t.class),r=e.ref(t.fitContent),c=e.ref(t.showHeader),f=e.ref(""),d=e.ref(t.showCloseButton),u=e.ref(t.showMaxButton),h=e.ref(!1),y=e.ref(t.dialogType),m=e.ref(t.src),p=e.ref(""),F=e.ref(t.showButtons),V=e.ref(t.title),T=e.ref(t.containment||null),$=e.ref();V.value==="错误提示"&&(V.value=ze.LocaleService.getLocaleValue("messageBox.errorTitle"));const x=e.ref(!1);function v(I,ne){const pe=ne?"accept":"cancel";Promise.resolve().then(()=>{var he;return(he=t.beforeClose)==null?void 0:he.call(t,{closeType:pe})}).then(he=>{he&&(s.value=!1,n.emit("update:modelValue",!1),ne!=null&&n.emit(ne?"accept":"cancel"),n.emit("closed",I))})}const B=[{name:"cancel",text:ze.LocaleService.getLocaleValue("messageBox.cancel")||"取消",class:"btn btn-secondary",handle:I=>{v(I,!1)}},{name:"accept",text:ze.LocaleService.getLocaleValue("messageBox.ok")||"确定",class:"btn btn-primary",handle:I=>{v(I,!0)}}],b=e.ref(t.buttons&&t.buttons.length?t.buttons:B),O=e.computed(()=>!!f.value),P=e.computed(()=>!!F.value&&!!b.value),k=e.ref(),C=e.ref(),E=e.ref(!1),{renderResizeBar:Y,maximize:U,restore:J,boundingElement:ee,resizedEventParam:re,allowDrag:H,unWindowResizeHandle:A,moveToCenter:K}=fi(t),{registerDraggle:X}=mi(t,n,H);function ie(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function ge(){const I=document.querySelectorAll(".farris-modal").length;(!I||I-1<=0)&&document.body.classList.remove("modal-open"),$.value&&$.value.classList.remove("show")}e.watch(()=>t.title,(I,ne)=>{I!==ne&&(V.value=I)}),e.watch(()=>t.modelValue,(I,ne)=>{I!==ne&&(s.value=I,s.value&&t.draggable&&e.nextTick(()=>{C.value&&!T.value&&(T.value=C.value.parentElement,ee.value=T.value,X(k.value,C.value,ee.value),K())}),I||(T.value&&(T.value=null),ge())),s.value?x.value=ie():(E.value=!1,H.value=t.draggable)}),e.watch(()=>t.showHeader,(I,ne)=>{I!==ne&&(c.value=I)}),e.watch(()=>t.showButtons,(I,ne)=>{I!==ne&&(F.value=I)}),e.watch(()=>re.value,(I,ne)=>{const pe=I||{},he=ne||{};JSON.stringify(pe)!==JSON.stringify(he)&&n.emit("resize",{newSize:I,oldSize:ne,isMaximized:E.value})}),e.watch([()=>t.width,()=>t.height],(I,ne)=>{(I[0]!==ne[0]||I[1]!==ne[1])&&(o.value=I[0]||500,a.value=I[1]||600)}),e.watch(()=>t.class,(I,ne)=>{i.value=I});const Ce=e.computed(()=>(s.value&&document.body.classList.add("modal-open"),s.value)),te=e.computed(()=>{var pe;const I={modal:!0,"farris-modal":!0,fade:!0};I["f-modal-fitContent"]=!!r.value,I.show=!!Ce.value;const ne=(pe=t.maskClass)==null?void 0:pe.split(" ");return ne==null||ne.reduce((he,Ne)=>(he[Ne]=!0,he),I),I}),Te=e.computed(()=>{var pe;const I={"modal-dialog":!0},ne=(pe=i.value)==null?void 0:pe.split(" ");return ne==null||ne.reduce((he,Ne)=>(he[Ne]=!0,he),I),I}),we=()=>me.isMobilePhone()&&!t.isMessager,ae=e.computed(()=>{const I=document.documentElement.clientWidth,ne=document.documentElement.clientHeight,pe=Math.min(o.value,I),he=r.value?"auto":`${Math.min(a.value,ne-10)}px`,Ne={position:"absolute",top:`${(window.innerHeight-parseInt(he==="auto"?"0":he))/2}px`,left:`${(window.innerWidth-pe)/2}px`,width:`${pe}px`,height:he};return we()&&(Ne.top="0px",Ne.left="0px",Ne.width=`${window.innerWidth}px`,Ne.height=`${window.innerHeight}px`),t.mask||(Ne.pointerEvents="auto"),Ne}),G=e.ref(me.getMaxZIndex()||1050),le=e.computed(()=>{const I={display:"block",overflow:"hidden"};return t.mask||(I.pointerEvents="none",I.backgroundColor="transparent"),x.value&&(I.backgroundColor="transparent"),I.zIndex=G.value,I}),g=e.computed(()=>({"modal-content":!0,"modal-content-has-header":c.value,"is-mobile":we()})),j=e.computed(()=>{const I={display:c.value?"":"none"};return I["pointer-events"]=H.value?"auto":"none",I}),N=e.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:E.value})),_=e.computed(()=>({"modal-body":!0,"f-utils-flex-column":y.value==="iframe","f-utils-fill":!0}));function de(){return{height:`${t.footerHeight||60}px`}}const ue=e.computed(()=>{const I={textAlgin:p.value},ne=de();return Object.assign(I,ne)});function Ie(I){if(I==null||I.stopPropagation(),E.value){E.value=!1,J();return}U(),E.value=!0}async function fe(I,ne){I.handle&&await I.handle(ne,I)&&n.emit("closed",ne)}function ye(I){I.width&&(o.value=I.width),I.height&&(a.value=I.height),I.buttons&&(b.value=I.buttons),I.title&&(V.value=I.title)}let De=null,He=null;e.onBeforeMount(()=>{x.value=ie()}),e.onMounted(()=>{C.value&&!T.value&&(T.value=C.value.parentElement,ee.value=T.value,X(k.value,C.value,ee.value)),Ce.value&&document.body.classList.add("modal-open"),De=pi(t,n),He=hi(t,n)}),e.onUnmounted(()=>{A&&A(),De&&De.remove(),He&&He.remove()}),n.expose({modalElementRef:C,updateModalOptions:ye,close:v,maxDialog:Ie,isMaximized:E});function _e(){return e.createVNode("ul",null,[h.value&&e.createVNode("li",{class:"f-btn-icon f-bare"},[e.createVNode("span",{class:"f-icon modal_minimize"},null)]),u.value&&e.createVNode("li",{onClick:Ie,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[e.createVNode("span",{class:N.value},null)]),d.value&&e.createVNode("li",{class:"f-btn-icon f-bare",onClick:I=>v(I,!1),style:"pointer-events: auto;"},[e.createVNode("span",{class:"f-icon modal_close"},null)])])}function Ye(){return e.createVNode("div",{class:"modal-footer",style:ue.value},[b.value&&b.value.map(I=>{const ne=e.ref(I.disabled);return e.createVNode("button",{name:I.name,type:"button",disabled:ne.value,class:I.class+(I.iconClass?" btn-icontext":""),onClick:pe=>{fe(I,pe)}},[!!I.iconClass&&e.createVNode("i",{class:I.iconClass},null),I.text])})])}function tt(){return e.createVNode("div",{ref:k,class:"modal-header",style:j.value},[n.slots.headerTemplate?n.slots.headerTemplate():e.createVNode("div",{class:"modal-title"},[O.value&&e.createVNode("span",{class:f.value,style:"margin-right: 8px"},null),e.createVNode("span",{class:"modal-title-label"},[V.value])]),e.createVNode("div",{class:"actions"},[_e()])])}function Xe(){return n.slots.footerTemplate?n.slots.footerTemplate():P.value&&Ye()}function $e(I){if(I.stopPropagation(),t.allowClickMaskToClose){if(I.target!==$.value)return;v(I,!1)}}function Je(){var I,ne;return e.createVNode("div",{id:l.value,class:Te.value,style:ae.value,ref:C},[e.createVNode("div",{class:g.value},[c.value&&tt(),e.createVNode("div",{class:_.value},[(ne=(I=n.slots).default)==null?void 0:ne.call(I),y.value==="iframe"&&e.createVNode("iframe",{title:l.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:m.value},null)]),Xe()]),!r.value&&C.value&&!E.value&&Y(C.value)])}function nt(I){return I||"body"}return e.watchEffect(()=>{Ce.value&&(G.value=me.getMaxZIndex()||1050)}),()=>e.createVNode(e.Teleport,{to:nt(t.host)},{default:()=>[Ce.value&&e.createVNode(e.Transition,{name:"fade",appear:!0},{default:()=>[e.createVNode("div",{ref:$,class:te.value,style:le.value,onClick:$e},[Je()])]})]})}});function zt(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function gi(t){const n=document.createElement("div");n.style.display="contents";const o=e.createApp({setup(a,s){e.onUnmounted(()=>{document.body.removeChild(n)});const l=e.ref(),i=e.ref(t.class||""),r=e.ref(!!t.showButtons),c=e.ref(!!t.showHeader),f=e.ref(t.showCloseButton==null?!0:t.showCloseButton),d=e.ref(!0),u=e.ref(t.title||""),h=t.acceptCallback||(()=>{}),y=t.rejectCallback||(()=>{}),m=t.closedCallback||($=>{}),p=t.resizeHandle||($=>{}),F=t.stopMoveHandle||($=>{}),V=zt(t),T=$=>{d.value=!1,o.unmount(),m($)};return e.onMounted(()=>{}),s.expose({modalRef:l}),()=>e.createVNode(it,{ref:l,class:i.value,modelValue:d.value,"onUpdate:modelValue":$=>d.value=$,title:u.value,width:t.width,height:t.height,buttons:t.buttons,"show-header":c.value,"show-buttons":r.value,"show-close-button":f.value,"show-max-button":!1,onAccept:h,onCancel:y,fitContent:t.fitContent==null?!0:t.fitContent,onClosed:T,onResize:p,onStopMove:F},{default:()=>[V&&V(o)]})}});return document.body.appendChild(n),o.use(ze.LocaleService.i18n),o.mount(n),o}class vi{constructor(n){We(this,"appContext",null);We(this,"modalRef",e.ref());We(this,"activeModalIndex",e.ref(0));We(this,"modalRefs",{});We(this,"isUseEscCloseModal",e.ref(!1));We(this,"activeModalInstance",e.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=n,this.appContext=n?n._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(n,o){const{width:a,height:s}={width:window.innerWidth,height:window.innerHeight};return a<n&&(n=a-14),s<o&&(o=s-14),{width:n,height:o}}static show(n){const o=Object.assign({title:"",showButtons:!0,showHeader:!0},n);return gi(o)}close(n){var o,a;n?(a=n.value)==null||a.close():(o=this.getCurrentModal())==null||o.close()}open(n){const o=document.createDocumentFragment();n.showMaxButton&&n.fitContent&&(n.showMaxButton=!1);const a=e.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},n)),s=e.ref(!0),l=a.value.acceptCallback||(()=>{}),i=a.value.rejectCallback||(()=>{}),r=a.value.closedCallback||((v,B)=>{}),c=a.value.resizeHandle||(v=>{}),f=n.stopMoveHandle||(v=>{});let d;const u=zt(a.value),h=v=>{var b;s.value=!1;const B=(b=v==null?void 0:v.target)==null?void 0:b.classList.contains("modal_close");r(v,this.isUseEscCloseModal.value?"esc":B?"icon":"button")},y=v=>{h(v),d&&e.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],e.render(null,o),d=null,this.modalRef.value=null,this.modalRefs){const B=Object.keys(this.modalRefs).map(b=>Number(b));B.length>0?this.activeModalIndex.value=Math.max(...B):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},m=v=>{var B;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((B=this.activeModalInstance.value)==null||B.close(v==null?void 0:v.event))},{width:p,height:F}=a.value,V=this.adaptToWindow(p||500,F||320);Object.assign(a.value,V);const T=()=>e.createVNode(it,e.mergeProps({ref:this.modalRef,modelValue:s.value,"onUpdate:modelValue":v=>s.value=v},a.value,{isMessager:a.value.class&&a.value.class.indexOf("modal-message")>-1,onAccept:l,onCancel:i,onClosed:y,onResize:c,onEsc:m,onStopMove:f}),{default:()=>[u&&u(this.app)]});return d=(v=>{const B=e.h(T,v);return B.appContext=this.appContext,e.render(B,o),B})({...a.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:v=>{a.value={...a.value,...v},d&&e.render(e.cloneVNode(d,{...a}),o)},destroy:y,modalRef:this.activeModalInstance,close:()=>this.close()}}}const yi=Symbol("FModalService");it.install=t=>{t.component(it.name,it);const n=new vi(t);t.provide(yi,n),t.provide("FModalService",n)},e.ref(0);class bi extends Vt.BaseControlProperty{constructor(n,o){super(n,o)}getPropertyConfig(n){return this.getBasicPropConfig(n),this.getAppearanceProperties(n),this.getBehaviorProperties(n),this.getToolbarProperties(n),this.propertyConfig}getBehaviorProperties(n){const o=this.getPropertyEditorParams(n,[],"show",{},{},"visible"),a=this.getPropertyEditorParams(n,[],"disabled"),s=this;this.propertyConfig.categories.behavior={description:"",title:"行为",properties:{show:{description:"是否可见",type:"boolean",title:"是否可见",editor:o},disabled:{description:"是否禁用",type:"boolean",title:"是否禁用",editor:a},removeable:{description:"是否可移除",type:"boolean",title:"是否可移除"},titleHtml:{title:"标签页模板",type:"string",description:"设置标签页HTML模板",refreshPanelAfterChanged:!0,editor:{type:"code-editor",language:"html"}}},setPropertyRelates(l,i){if(l)switch(l.propertyID){case"disabled":case"show":s.afterMutilEditorChanged(n,l);break}}}}getBasicPropConfig(n){this.propertyConfig.categories.basic={description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标签页项的标识",title:"标识",type:"string",readonly:!0},title:{description:"标签页项的标题",title:"标题",type:"string"}},setPropertyRelates(o,a){if(o)switch(o&&o.propertyID){case"title":{o.needRefreshControlTree=!0;break}}}}}getAppearanceProperties(n){this.propertyConfig.categories.appearance={title:"外观",description:"",properties:{customTitleClass:{title:"标题class",type:"string",description:"为标签页的标题指定class样式名"},tabWidth:{description:"为标签页的标题指定宽度",type:"number",title:"标签页的标题宽度(px)",editor:{nullable:!0,min:0,decimals:0,needValid:!0}}}}}getToolbarProperties(n){this.propertyConfig.categories.toolbar={title:"工具栏",description:"",properties:{toolbarPosition:{title:"工具栏位置",type:"string",description:"为工具栏指定位置",editor:{type:"combo-list",data:[{id:"inHead",name:"标题区域"},{id:"inContent",name:"内容区域"}]}}}}}}class Ci extends Vt.BaseControlProperty{constructor(n,o){super(n,o)}getPropertyConfig(n){return this.propertyConfig.categories.basic=this.getBasicPropConfig(n),this.propertyConfig.categories.appearance=this.getAppearanceProperties(n),this.propertyConfig.categories.behavior=this.getBehaviorProperties(n),this.getEventPropConfig(n),this.propertyConfig}getAppearanceProperties(n){return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:""},titleWidth:{description:"标题区域宽度占标签头部区域的横向比例",type:"number",title:"标题区域宽度(%)",editor:{min:0,decimals:0,max:100,nullable:!0,needValid:!0}},autoTitleWidth:{description:"是,则标题显示全部字符;否,则标题最多显示20个字符",type:"boolean",title:"标题自适应宽度"},fill:{description:"flex布局下,是否填充满剩余部分",type:"boolean",title:"填充"}}}}getBehaviorProperties(n){const o=this.getCurrentTabPages(n);n.activeId&&typeof n.activeId=="string"&&(o.find(i=>i.id===n.activeId)||(n.activeId=""));const a=this.getPropertyEditorParams(n,["Const","Variable"],"activeId",{constType:"enum",constEnums:o},{newVariablePrefix:"",newVariableType:"String"}),s=this;return{description:"",title:"行为",properties:{activeId:{title:"默认选中标签页",type:"string",description:"默认选中标签页",defaultValue:o.length>0?o[0].id:"",editor:a}},setPropertyRelates(l,i){if(l)switch(l.propertyID){case"activeId":s.addNewVariableToViewModel(l,s.viewModelId);break}}}}getCurrentTabPages(n){const o=n.contents||[],a=[];return o.forEach(s=>{a.push({name:s.title,id:s.id})}),a}getEventPropConfig(n){const o=[{label:"onTabChange",name:"切换标签页事件"},{label:"onTabRemove",name:"移除标签页事件"}],a=this,s=a.eventsEditorUtils.formProperties(n,a.viewModelId,o),l=a.createBaseEventProperty(s);this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:l,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(i,r){const c=i.propertyValue;delete n[a.viewModelId],c&&(c.setPropertyRelates=this.setPropertyRelates,a.eventsEditorUtils.saveRelatedParameters(n,a.viewModelId,c.events,c))}}}}function wi(t,n){const o=t.schema,a=new ke.UseTemplateDragAndDropRules,{canMove:s,canAccept:l,canDelete:i}=a.getTemplateRule(t,n);function r(p){return p.componentType==="list-view"?!0:l}function c(){return i}function f(){return s}function d(){return!s&&!i}function u(p){var x;let F=document.querySelector(".dgComponentFocused");F||(F=t.designerItemElementRef.value.querySelector(".farris-nav-tabs .f-state-active"));const V=(F==null?void 0:F.id)||(F==null?void 0:F.getAttribute("pageid"))||"";if(V===`${o.id}-design-item`)return new Ci(p,n).getPropertyConfig(o);const T=new bi(p,n),$=(x=o.contents)==null?void 0:x.find(v=>V===`${v.id}-design-item`);return T.getPropertyConfig($||o)}function h(){t.designerItemElementRef.value&&e.nextTick(()=>{const p=t.designerItemElementRef.value.querySelector(".dgComponentSelected");p!=null&&p.className.includes("dgComponentSelected")&&p.click()})}function y(p){if(!p)return;const{changeObject:F}=p;F&&F.propertyID==="title"&&h()}function m(){var p;if(t&&n){const{formSchemaUtils:F}=n,V=ui.tabs.name;F.getControlBasicInfoMap().set(t.schema.id,{componentTitle:V,parentPathName:V});const T=t.designerItemElementRef.value.querySelector(".farris-tabs-content");(p=t.schema.contents)==null||p.forEach($=>{const x=T==null?void 0:T.querySelector(`#${$.id}-design-item`);x&&x.componentInstance&&x.componentInstance.value.setComponentBasicInfoMap()})}}return{canAccepts:r,checkCanDeleteComponent:c,checkCanMoveComponent:f,getPropsConfig:u,hideNestedPaddingInDesginerView:d,onPropertyChanged:y,setComponentBasicInfoMap:m}}function xi(t,n,o,a,s,l){const i=e.ref([]),r=e.ref(t.activeId||""),c=e.ref(!0),f=e.ref(),d=e.ref([]),u=e.ref(!0),h=e.ref(0),y=e.computed(()=>{const g=i.value.find(N=>N.props.id===r.value);return(g==null?void 0:g.props.toolbarPosition)==="inHead"});let m;function p(g){m=g}function F(g,j=!0){const N=g.value&&g.value.length>0?0:-1;if(d.value=[],N!==-1&&(!r.value||typeof r.value=="object")){if(r.value=g.value[N].props.id,!j)return;const _=g.value[N];_&&_.props.toolbar&&_.props.toolbar.buttons&&_.props.toolbar.buttons.length&&(d.value=[..._.props.toolbar.buttons])}}function V(){const g=i.value.find(_=>_.props.id===r.value);if(d.value=[],g&&g.props.toolbar){const _=Object.prototype.hasOwnProperty.call(g.props.toolbar,"contents")?"contents":"buttons";g.props.toolbar[_]&&g.props.toolbar[_].length&&(d.value=[...g.props.toolbar[_]])}const j=a.schema.contents,N=j==null?void 0:j.find(_=>_.id===r.value);N!=null&&N.toolbar&&!N.toolbar.type&&(N.toolbar.type="tab-toolbar"),f.value=N==null?void 0:N.toolbar}function T(g){const j=r.value;s.changeSelectedId(""),r.value=g,V(),n.emit("tabChange",{prevId:j,nextId:g})}function $(g){let j=-1;!r.value&&(j=g.value.findIndex(N=>r.value===N.props.id),j>-1)||(F(g,!1),T(r.value))}function x(g){let j=!1;j=!i.value.find(_=>_.props.id===g),j?(r.value="",$(i)):(r.value=g,T(r.value))}function v(g,j){g.classList.contains(j)||g.classList.add(j)}function B(g,j){g.classList.remove(j)}function b(g){const{parentElement:j}=g;j&&(g.scrollWidth>j.offsetWidth?v(g,"farris-title-text-custom"):B(g,"farris-title-text-custom"))}e.watch(()=>t.activeId,(g,j)=>{g!==j&&x(g)});function O(g){var N;if(t.autoTitleWidth)return;const j=(N=g.value)==null?void 0:N.querySelectorAll(".st-tab-text");j&&j.forEach(_=>b(_))}const P=g=>{g.preventDefault(),g.stopPropagation()};function k(g){i.value=i.value.filter(j=>j.props.id!==g),r.value===g&&(r.value="",F(i))}function C(g,j,N=!1){const _=i.value.findIndex(de=>de.props.id===j);k(j),P(g),e.nextTick(()=>{h.value++,O(o),N&&(c.value=!0),n.emit("tabRemove",{removeIndex:_,removeId:j,activeId:r.value})})}function E(g,j=!0){r.value===g&&(r.value="",F(i)),e.nextTick(()=>{h.value++,j&&(c.value=!0)})}function Y(g){T(g)}function U(g){i.value.findIndex(N=>N.props.id===g.props.id)===-1&&i.value.push(g),h.value++}function J(g){i.value.findIndex(N=>N.props.id===g.props.id)!==-1&&(i.value.forEach(N=>{N.props.id===g.props.id&&(N=g)}),g.props.id===r.value&&y.value,e.nextTick(()=>{h.value++,O(o)}))}function ee(g){g&&(g.stopPropagation(),g.preventDefault())}function re(g){var _;const j=a.designerItemElementRef.value.querySelector(".farris-tabs-content"),N=j==null?void 0:j.querySelector(`#${g}-design-item`);(_=N==null?void 0:N.componentInstance)!=null&&_.value.onRemoveComponent&&N.componentInstance.value.onRemoveComponent(l)}function H(g){var ue,Ie;const j=l.formSchemaUtils.getExpressions();if(!j||!j.length)return;const N=a.schema.contents,_=N==null?void 0:N.find(fe=>fe.id===g);if(!_||!((Ie=(ue=_.toolbar)==null?void 0:ue.buttons)!=null&&Ie.length))return;const de=fe=>{fe.forEach(ye=>{const De=j.findIndex(He=>He.target===ye.id);De>-1&&j.splice(De,1),ye.children&&ye.children.length&&de(ye.children)})};de(_.toolbar.buttons)}function A(g,j){var de,ue;ee(g);const N=a.schema.contents,_=N==null?void 0:N.findIndex(Ie=>Ie.id===j);!N||_===-1||_===void 0||(de=l==null?void 0:l.designerContext)!=null&&de.checkCanDeleteControl&&!l.designerContext.checkCanDeleteControl(N[_])||(H(j),re(j),N==null||N.splice(_,1),k(j),V(),(ue=a==null?void 0:a.setupContext)==null||ue.emit("selectionChange"),ke.canvasChanged.value++)}function K(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(j=>j.classList.remove("dgComponentFocused"));const g=document.getElementsByClassName("dgComponentSelected");Array.from(g).forEach(j=>j.classList.remove("dgComponentSelected"))}function X(g){g.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function ie(g,j){var ue;const{contents:N=[]}=a.schema,_=N==null?void 0:N.findIndex(Ie=>Ie.id===g),de=N[_];(ue=a==null?void 0:a.setupContext)==null||ue.emit("selectionChange",de.type,de,t.componentId,j)}function ge(g,j){const N=j.getBoundingClientRect(),_=g.getBoundingClientRect(),de=_.left+_.width<=N.left+N.width,ue=_.left+_.width>=N.left;return de&&ue}function Ce(g,j){if(g||(g=m.value.querySelector(".farris-tabs-header").querySelector(".dgComponentSelected")),j||(j=m.value.querySelector(".farris-nav-tabs")),g&&j){const N=g.querySelector(".component-btn-group");ge(g,j)?ke.setPositionForSelectedElement(g):N&&(N.style.display="none")}}function te(){o&&o.value&&o.value.addEventListener("scroll",g=>{const j=g.target.querySelector(".dgComponentSelected");Ce(j,g.target)})}function Te(g){if(g&&g.parentElement){let j=g.getBoundingClientRect(),N=g.parentElement.getBoundingClientRect();(j.left<N.left||j.right>N.right)&&(o.value.scrollLeft=0,j=g.getBoundingClientRect(),N=g.parentElement.getBoundingClientRect(),o.value.scrollLeft=j.left-N.left),ke.setPositionOfButtonGroup(g)}}function we(g,j,N){var ue,Ie,fe;K(),ee(g),X(g),ie(j,N);const _=g.currentTarget;Te(_);const de=(Ie=(ue=N.schema)==null?void 0:ue.contents)==null?void 0:Ie.find(ye=>ye.id===j);if(de&&(!de.toolbar||((fe=de.toolbar.buttons)==null?void 0:fe.length)===0)){const ye=g.currentTarget;e.nextTick(()=>{K(),ye==null||ye.classList.add("dgComponentFocused","dgComponentSelected"),Te(ye)})}}function ae(g){var _;const j=a.designerItemElementRef.value.querySelector(".farris-tabs-content"),N=j==null?void 0:j.querySelector(`#${g}-design-item`);(_=N==null?void 0:N.componentInstance)!=null&&_.value.onRemoveComponent&&N.componentInstance.value.setComponentBasicInfoMap()}function G(g,j){ee(g);const N=a.schema.contents,_=N==null?void 0:N.find(ue=>ue.id===j);if(!_)return;(!_.toolbar||!_.toolbar.buttons)&&(_.toolbar={id:`${_.id}_toolbar`,buttons:[]}),_.toolbar.id||(_.toolbar.id=`${_.id}_toolbar`);const de=Dt("tab-toolbar-item");de.id=`tab_toolbar_item_${Math.random().toString().slice(2,6)}`,_.toolbar.buttons.push(de),d.value=[..._.toolbar.buttons],f.value=_.toolbar,ae(_.id),e.nextTick(()=>{if(o&&o.value){const ue=o.value.querySelector(".f-state-active");ue&&Te(ue)}})}function le(g){}return{activeId:r,addTab:U,changeTitleStyle:O,removeTab:C,selectTab:Y,tabPages:i,updateTab:J,toolbarItems:d,removeDesignTab:A,selectDesignTab:we,toolbarSchema:f,changeToolbarItems:V,addTabPageToolbar:G,listenTabNavElementScroll:te,setHorizontalScrollbarPosition:Te,needUpdateNavigationLayout:h,checkActiveIdAndSelect:x,toggleShowTab:E,hasInHeadClass:y,emitSelectionChange:ie,resetPositionForSelectedElement:Ce,setTabsRef:p,setScrollToSelectedTabFunction:le,toolbarVisible:u,updateComponentBasicInfoMap:ae}}function Ti(t,n,o,a,s){var h;const{toolbarItems:l,toolbarSchema:i,changeToolbarItems:r,hasInHeadClass:c}=t,f=i.value.id||`${((h=a==null?void 0:a.schema)==null?void 0:h.id)||""}-toolbar`;function d(y,m,p,F){var V;(V=a.setupContext)==null||V.emit("selectionChange",y,m,p,F)}function u(){r()}return e.createVNode("div",{class:"farris-tabs-toolbar",style:"overflow:unset;"},[e.createVNode("div",{class:"farris-tabs-inline-flex w-100",style:"flex:1"},[e.createVNode(ke.FDesignerInnerItem,{modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,class:"w-100 position-relative",key:f,canAdd:!1,childType:"tab-toolbar-item",childLabel:"按钮",contentKey:"buttons",id:f,onSelectionChange:d,componentId:s,onAddComponent:u},{default:()=>[e.createVNode(ut,{alignment:c.value?"right":"left",items:l.value,componentId:s},null)]})])])}function Si(t,n){let o;function a(r){var d;const f=Array.from(r.children).find(u=>u.className.includes("add-nav-item"));f&&!((d=f.className)!=null&&d.includes("d-none"))&&(f.className+=" d-none")}function s(r){var d;const f=Array.from(r.children).find(u=>u.className.includes("add-nav-item"));f&&((d=f.className)!=null&&d.includes(" d-none"))&&(f.className=f.className.replace(" d-none",""))}function l(r,c,f){s(c);const d=t.schema;if(!(d!=null&&d.contents))return;let u;if(f){const p=f.getAttribute("pageId");u=Array.from(c.children).findIndex(F=>F.getAttribute("pageId")===p)}else u=Array.from(c.children).length;const h=r.getAttribute("pageId"),y=Array.from(c.children).findIndex(p=>p.getAttribute("pageId")===h),m=d.contents[y];if(y!==u&&y>-1&&u>-1){if(y<u&&(u=u-1),d.contents.splice(y,1),d.contents.splice(u,0,m),n.value){const p=n.value[y];n.value.splice(y,1),n.value.splice(u,0,p)}e.nextTick(()=>{r.className.includes("dgComponentSelected")&&(r.classList.remove("dgComponentSelected"),r.classList.remove("dgComponentFocused"),r.click()),ke.canvasChanged.value++})}}function i(r,c){o&&o.destroy(),!(!qt||!r||!c)&&(o=qt([r],{mirrorContainer:c,direction:"horizontal",moves(f){return!f.classList.contains("no-drag")},getMirrorText(f){return f.innerText},accepts(f,d,u,h){return a(d),h&&h.className.includes("nav-item")}}).on("drop",(f,d,u,h)=>l(f,d,h)))}return{dragulaInstance:o,initHeaderDragula:i}}const rt=e.defineComponent({name:"FTabsDesign",props:Ot,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(),a=e.inject("designer-host-service"),s=e.inject("design-item-context"),l=wi(s,a),i=ke.useDesignerComponent(o,s,l),r=e.ref(t.tabType),c=e.shallowRef(),f=e.shallowRef(),d={updateToolbarItems:function(){},changeSelectedId:g=>{}},u=xi(t,n,c,s,d,a),{activeId:h,changeTitleStyle:y,tabPages:m,addTab:p,updateTab:F,toolbarItems:V,setTabsRef:T,checkActiveIdAndSelect:$,listenTabNavElementScroll:x,toolbarSchema:v,toggleShowTab:B,hasInHeadClass:b,updateComponentBasicInfoMap:O}=u;T(o);const P=Lo(t,f,u),k=$o(t,c,P,u),{updateNavigationLayout:C}=k,E=qo(t,u),{hideDropDown:Y}=E,U=Oo(t,c,k,P,u,i),J=U,ee=Do(t,c,k,P,u),re=new Map([["default",U],["one-page",J],["pills",ee]]);e.computed(()=>{const g=m.value.find(j=>j.props.id===h.value);return g==null?void 0:g.slots});function H(){const g=i.value.schema.contents||[];return g.length<1?null:g.find(N=>N.id===h.value)}d.updateToolbarItems=function(){var j,N;const g=H();(j=g==null?void 0:g.toolbar)!=null&&j.buttons?V.value=[...(N=g==null?void 0:g.toolbar)==null?void 0:N.buttons]:V.value=[],v.value=g==null?void 0:g.toolbar,g!=null&&g.id&&O(g.id)};const A=e.ref(!0);e.provide("tabs",{activeId:h,addTab:p,updateTab:F,tabPages:m,tabType:r,toggleShowTab:B,toolbarVisible:A}),e.provide("toolbar-item-handler",d);const K=e.computed(()=>t.fill),X=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":b.value,"farris-tabs-inContent":!b.value,"farris-tabs-nav-fill":t.tabType==="fill","farris-tabs-nav-pills":t.tabType==="pills"})),ie=e.computed(()=>{const g={width:b.value&&t.titleWidth?`${t.titleWidth}%`:""};return g.width&&(g.flex="unset"),g}),ge=e.computed(()=>({"farris-tabs":!0,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page","f-tabs-content-fill":K.value})),{initHeaderDragula:Ce,dragulaInstance:te}=Si(s,m);e.onMounted(()=>{m.value.length&&$(t.activeId||m.value[0].props.id),e.nextTick(()=>{C()}),y(c),window.addEventListener("click",g=>{var j;Y.value||(j=o.value)!=null&&j.contains(g.target)||(Y.value=!0)}),window.addEventListener("resize",()=>{C()}),x(),o.value.componentInstance=i,t.tabType==="default"&&Ce(c.value,c.value)}),e.onUnmounted(()=>{te&&te.destroy&&te.destroy()});function Te(){return!!V.value.length&&Ti(u,i,l,s,t.componentId)}const we=re.get(t.tabType)||re.get("default");function ae(){var g,j,N,_;return e.createVNode("div",{class:X.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(j=(g=n.slots).headerPrefix)==null?void 0:j.call(g)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:ie.value},[we&&we()]),Te(),e.createVNode("div",{class:"farris-tabs-header-post"},[(_=(N=n.slots).headerSuffix)==null?void 0:_.call(N)])])}const G=e.computed(()=>({"farris-tabs-content":!0,"f-utils-fill-flex-column":K.value}));function le(){var g,j,N,_;return e.createVNode("div",{class:G.value,ref:f},[(j=(g=s==null?void 0:s.schema)==null?void 0:g.contents)!=null&&j.length?(_=(N=n.slots).default)==null?void 0:_.call(N):""])}return n.expose(i.value),i.value.updateToolbarItems=d.updateToolbarItems,()=>e.createVNode("div",{class:ge.value,ref:o},[ae(),le()])}});function ji(t,n,o){return n&&n.contents&&n.contents.length&&(n.contents.forEach(a=>{a.title&&(a.text=a.title)}),n.buttons=n.contents,delete n.contents),n&&Object.prototype.hasOwnProperty.call(n,"visible")?{toolbar:n,toolbarVisible:n.visible}:{toolbar:n}}const _t=new Map([["appearance",xe.resolveAppearance],["toolbar",ji]]),Wt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-page.schema.json",title:"tab-page",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a tab-page Item",type:"string"},type:{description:"The type string of tab-page Item component",type:"string",default:"tab-page"},contents:{description:"",type:"array",default:[]},title:{description:"",type:"string",default:"标题"},disabled:{description:"",type:"boolean",default:!1},removeable:{description:"",type:"boolean",default:!1},show:{description:"",type:"boolean",default:!0},toolbar:{description:"",type:"object"},tabWidth:{description:"",type:"number"},toolbarPosition:{description:"",type:"string",default:"inHead"},customTitleClass:{description:"",type:"string",default:""},onTabChange:{description:"",type:"string",default:"切换标签页事件"},onTabRemove:{description:"",type:"string",default:"移除标签页事件"},titleHtml:{description:"",type:"string",default:""},titleRenderFunction:{description:"",type:"function",default:null}},required:["id","type","contents"]},Ut=xe.createPropsResolver(Oe.tabPageProps,Wt,_t),Gt=Object.assign({},Oe.tabPageProps,{titleHtml:{type:String,default:""}});xe.createPropsResolver(Gt,Wt,_t);function Ii(t,n){const o=new ke.UseTemplateDragAndDropRules,{canAccept:a}=o.getTemplateRule(t,n);function s(c){if(!ke.useDragulaCommonRule().basalDragulaRuleForContainer(c,n))return!1;const{schema:d}=t;return d.contents&&d.contents.length>0?!1:a}function l(c){return null}function i(){const{schema:c,parent:f}=t;f!=null&&f.schema.activeId&&c.id===f.schema.activeId&&(f.schema.activeId="")}function r(){var c,f;if(t&&n){const{formSchemaUtils:d}=n,u=d.getControlBasicInfoMap(),{schema:h}=t;u.set(h.id,{componentTitle:h.title,parentPathName:h.title}),(f=(c=h.toolbar)==null?void 0:c.buttons)!=null&&f.length&&h.toolbar.buttons.map(y=>{var m;u.set(y.id,{componentTitle:y.text,parentPathName:`${h.title} > ${y.text}`}),(m=y.children)!=null&&m.length&&y.children.map(p=>{u.set(p.id,{componentTitle:p.text,parentPathName:`${h.title} > ${p.text}`})})})}}return{canAccepts:s,getDraggableDesignItemElement:l,onRemoveComponent:i,setComponentBasicInfoMap:r}}function Ni(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const Pi=e.defineComponent({name:"FTabPageDesign",props:Gt,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),s=e.inject("designer-host-service"),l=Ii(a,s),i=ke.useDesignerComponent(o,a,l);i.value.canNested=!1,i.value.canDelete=!1,i.value.canMove=!1,n.expose(i.value);const r=e.inject("tabs"),c=e.ref(!0),f={slots:n.slots,props:t},d=e.ref((r==null?void 0:r.tabType.value)||"default");e.onMounted(()=>{o.value.componentInstance=i;const T=r.tabPages.value.findIndex($=>$.props.id===t.id);!T||T===-1?r==null||r.addTab(f):T>-1&&(c.value=!1,console.warn(`已经存在id为${t.id}的页签啦`))}),e.onUnmounted(()=>{});const u=e.computed(()=>(t==null?void 0:t.id)===(r==null?void 0:r.activeId.value)),h=e.computed(()=>({display:u.value?"":"none"}));e.watch(()=>t,T=>{r==null||r.updateTab({props:T,slots:n.slots})},{immediate:!0,deep:!0});function y(){var $,x;const T=(x=($=n.slots).default)==null?void 0:x.call($);return e.createVNode(So,{"main-title":t.title,class:"farris-tab-page"},Ni(T)?T:{default:()=>[T]})}const m=e.computed(()=>({"farris-tab-page":!0,"drag-container":!0,"f-tab-active":u.value}));function p(){var $,x;const T=(x=($=n.slots).default)==null?void 0:x.call($);return e.createVNode("div",{ref:o,id:t.id,class:m.value,"data-dragref":`${a.schema.id}-container`,style:h.value},[T])}const V=new Map([["default",p],["one-page",y]]).get(d.value)||p;return()=>c.value?V():null}}),Yt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar-item.schema.json",title:"tab-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"tab-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"}},default:{}},text:{description:"按钮",type:"string",default:"按钮"},icon:{description:"图标",type:"string",default:""},disabled:{description:"禁用",type:"boolean",default:!1},visible:{description:"是否可见",type:"boolean",default:!0},onClick:{description:"点击事件",type:"string",default:""},tipsEnable:{description:"",type:"boolean",default:!1},tipsText:{description:"",type:"string",default:""},dropdownClass:{description:"处于下拉菜单时的样式",type:"string",default:""},split:{description:"",type:"boolean",default:!1}},required:["id","type","text"],events:{onClick:"点击事件"}},Xt={id:{type:String,default:""},items:{type:Object,default:{}},class:{type:String,default:""},text:{type:String,default:""},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},componentId:{type:String,default:""},expanded:{type:Boolean,default:!1},alignment:{Type:String,default:"right"},split:{type:Boolean,default:!1},isDP:{type:Boolean,default:!1},isDPItem:{type:Boolean,default:!1}},Fi=xe.createPropsResolver(Xt,Yt,ot,Mt);xe.getPropsResolverGenerator(Xt,Yt,ot,Mt),rt.register=(t,n,o,a)=>{t.tabs=Oe,t["tab-page"]=Oe.FTabPage,n.tabs=Po,n["tab-page"]=Ut,a.tabs={eventHandlerResolver:Bo}},rt.registerDesigner=(t,n,o)=>{t.tabs=rt,t["tab-page"]=Pi,n.tabs=Fo,n["tab-page"]=Ut,n["tab-toolbar-item"]=Fi,t["tab-toolbar"]=ut,n["tab-toolbar"]=ko};const Bi=me.withInstall(rt);S.FTabsDesign=rt,S.default=Bi,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
3
+ </span>`:n.titleHtml}function T(z){l(n.id),t.tabType==="one-page"&&r.scrollToByPaggId(n.id)}function v(z){z&&(z.stopPropagation(),z.preventDefault()),c(z,n.id,a.value)}function j(z){u(z,n.id)}function F(z){g(z,n.id)}e.watch(()=>n.toolbarPosition,()=>{e.nextTick(()=>{d()})}),e.watch(()=>n.tabWidth,()=>{e.nextTick(()=>{d()})}),e.watch(()=>n.titleHtml,()=>{e.nextTick(()=>{d()})});function V(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:z=>j(z)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function R(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增按钮",ref:"addComponent",onClick:z=>F(z)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle"},null)])}function $(){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[V(),!n.toolbar||!n.toolbar.buttons||!n.toolbar.buttons.length?R():""])])}function x(){return o.slots.title?e.createVNode("a",{class:h.value,onClick:T,id:`${n.id}-design-item`},[o.slots.title(o),C()]):n.titleHtml?e.createVNode("a",{class:h.value,onClick:T,id:`${n.id}-design-item`,innerHTML:P()},null):e.createVNode("a",{class:h.value,onClick:T,id:`${n.id}-design-item`},[k(),C()])}return e.createVNode("li",{onClick:z=>v(z),class:m.value,style:b.value,pageId:`${n.id}-design-item`},[$(),x()])}function Lo(t,n){let o;function r(d){const{properties:p,title:m,ignore:b}=d,h=b&&Array.isArray(b),k=Object.keys(p).reduce((E,C)=>((!h||!b.find(P=>P===C))&&(E[C]=p[C].type==="object"&&p[C].properties?r(p[C]):Pe.cloneDeep(p[C].default)),E),{});if(m&&(!h||!b.find(E=>E==="id"))){const E=m.toLowerCase().replace(/-/g,"_");k.id=`${E}_${Math.random().toString().slice(2,6)}`}return k}function i(d){const{properties:p,title:m,required:b}=d;if(b&&Array.isArray(b)){const h=b.reduce((k,E)=>(k[E]=p[E].type==="object"&&p[E].properties?r(p[E]):Pe.cloneDeep(p[E].default),k),{});if(m&&b.find(k=>k==="id")){const k=m.toLowerCase().replace(/-/g,"_");h.id=`${k}_${Math.random().toString().slice(2,6)}`}return h}return{type:m}}function a(d,p={},m){const b=t[d];if(b){let h=i(b);const k=n[d];return h=k?k({getSchemaByType:a},h,p,m):h,o!=null&&o.appendIdentifyForNewControl&&o.appendIdentifyForNewControl(h),h}return null}function s(d,p){const m=r(p);return Object.keys(m).reduce((b,h)=>(Object.prototype.hasOwnProperty.call(d,h)&&(b[h]&&Pe.isPlainObject(b[h])&&Pe.isPlainObject(d[h]||!d[h])?Object.assign(b[h],d[h]||{}):b[h]=d[h]),b),m),m}function l(d,p){return Object.keys(d).filter(b=>d[b]!=null).reduce((b,h)=>{if(p.has(h)){const k=p.get(h);if(typeof k=="string")b[k]=d[h];else{const E=k(h,d[h],d);Object.assign(b,E)}}else b[h]=d[h];return b},{})}function u(d,p,m=new Map){const b=s(d,p);return l(b,m)}function c(d){var m;const p=d.type;if(p){const b=t[p];if(!b)return d;const h=s(d,b),k=((m=d.editor)==null?void 0:m.type)||"";if(k){const E=t[k],C=s(d.editor,E);h.editor=C}return h}return d}function g(d){o=d}return{getSchemaByType:a,resolveSchemaWithDefaultValue:c,resolveSchemaToProps:u,mappingSchemaToProps:l,setDesignerContext:g}}const Ho={},Ao={},{getSchemaByType:qt}=Lo(Ho,Ao);function zo(t,n,o,r,i,a,s){const{tabPages:l,selectTab:u,emitSelectionChange:c}=i,g=e.computed(()=>({spacer:!0,"f-utils-fill":!0})),d=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),p=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"})),m=e.computed(()=>({overflow:"auto"})),b=function(h){var E;h&&(h.stopPropagation(),h.preventDefault());const k=qt("tab-page");k.id=`tab_page_${Math.random().toString().slice(2,6)}`,k.title="标题",k.toolbar={id:`${k.id}_toolbar`,buttons:[],type:"tab-toolbar"},(E=a.value.schema.contents)==null||E.push(k),u(k.id),e.nextTick(()=>{c(k.id,a.value)})};return()=>e.createVNode("div",{class:g.value,style:d.value},[e.createVNode("ul",{class:p.value,style:m.value,ref:n},[l.value.map(h=>qo(t,h.props,h,r,i,a)),e.createVNode("li",{class:"nav-item no-drag add-nav-item"},[e.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:h=>b(h)},[e.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function _o(t,n,o,r,i){const a=e.ref(),{shouldShowNavigationButtons:s}=o,{activeId:l,tabPages:u,selectTab:c}=i,g=e.ref(l.value),d=e.computed(()=>u.value.map(h=>({name:h.props.title,value:h.props.id,show:h.props.show,disabled:h.props.disabled}))),p=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":s.value})),m=e.computed(()=>({width:"100%",display:"flex","justify-content":t.justifyContent}));e.onMounted(()=>{a.value&&(n.value=a.value.$el)});function b(h){c(h)}return e.watch(()=>l.value,h=>{h!==g.value&&(g.value=h)},{immediate:!0}),()=>e.createVNode("div",{class:p.value,style:m.value},[e.createVNode(ln,{items:d.value,modelValue:g.value,"onUpdate:modelValue":h=>g.value=h,onChange:b,ref:a},null)])}function Uo(t,n,o,r){const i=e.ref(!1),{selectTab:a,tabPages:s,needUpdateNavigationLayout:l,activeId:u}=r,c=4,g=e.computed(()=>({btn:!0,"sc-nav-btn":!0,"px-1":!0,"sc-nav-lr":!0,"d-none":!i.value})),d=e.computed(()=>({"btn-group":!0,"sc-nav-btn":!0,dropdown:!0,"d-none":!i.value})),p=e.computed(()=>({btn:!0,"sc-nav-rg":!0,"d-none":!i.value}));function m(C,P){if(!n.value)return;const T=n.value.scrollLeft,v=n.value.scrollWidth-n.value.offsetWidth;if(P>0){if(n.value.scrollLeft>=v)return;n.value.scrollLeft=T+t.scrollStep+C}else if(P<0){if(n.value.scrollLeft<=0)return;n.value.scrollLeft=T-t.scrollStep-C}}function b(C=-1){if(!i.value||!n.value)return;C<0&&(C=s.value.findIndex(F=>F.props.id===u.value));const P=t.tabType==="pills"?".f-capsule-item":".nav-item",T=n.value.querySelectorAll(P),{parentElement:v}=n.value,j=T[C];if(j&&v){const F=v.getBoundingClientRect().left,V=v.getBoundingClientRect().right,R=j.getBoundingClientRect().left,$=j.getBoundingClientRect().right;R<F?m(F-R,-1):V<$&&m($-V,1),t.tabType==="one-page"&&o.scrollTo(C)}}function h(){var T;if(!n.value)return;const C=n.value,P=(T=n.value)==null?void 0:T.parentElement;i.value=P&&C&&P.offsetWidth<C.scrollWidth-c,i.value&&e.nextTick(()=>{b()})}function k(C){C.disabled||a(C.id)}function E(){["default","one-page"].indexOf(t.tabType)>-1&&e.nextTick(()=>{b()})}return e.watch(l,()=>{h()}),{previousButtonClass:g,nextButtonGroupClass:d,nextButtonClass:p,scrollTab:m,selectAndScrollToTab:k,shouldShowNavigationButtons:i,updateNavigationLayout:h,scrollToSelectedTab:E}}function Wo(t,n){const{tabPages:o}=n,r=e.ref(""),i=e.ref(!0),a=e.computed(()=>t.searchBoxVisible),s=e.computed(()=>a.value?o.value.filter(u=>u.props.title.includes(r.value)):o.value.slice());return e.watch(i,l=>{l||(r.value="")}),{searchTabText:r,hideDropDown:i,shouldShowSearchBox:a,tabsInDropdownMenu:s}}function Go(t,n,o){const r=".farris-tab-page",{tabPages:i}=o;function a(l){const u=n.value;if(u){const c=n.value.querySelectorAll(r);if(c.length>0){const g=c[l],{offsetTop:d}=g,p=d-32>0?d-32:0;u.scrollTop=p}}}function s(l){const u=i.value.findIndex(c=>c.props.id===l);u>-1&&a(u)}return{scrollTo:a,scrollToByPaggId:s}}e.ref(0);var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ft(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Lt={exports:{}};(function(t,n){(function(o){t.exports=o()})(function(){return function(){function o(r,i,a){function s(c,g){if(!i[c]){if(!r[c]){var d=typeof ft=="function"&&ft;if(!g&&d)return d(c,!0);if(l)return l(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var m=i[c]={exports:{}};r[c][0].call(m.exports,function(b){var h=r[c][1][b];return s(h||b)},m,m.exports,o,r,i,a)}return i[c].exports}for(var l=typeof ft=="function"&&ft,u=0;u<a.length;u++)s(a[u]);return s}return o}()({1:[function(o,r,i){var a={},s="(?:^|\\s)",l="(?:\\s|$)";function u(d){var p=a[d];return p?p.lastIndex=0:a[d]=p=new RegExp(s+d+l,"g"),p}function c(d,p){var m=d.className;m.length?u(p).test(m)||(d.className+=" "+p):d.className=p}function g(d,p){d.className=d.className.replace(u(p)," ").trim()}r.exports={add:c,rm:g}},{}],2:[function(o,r,i){(function(a){var s=o("contra/emitter"),l=o("crossvent"),u=o("./classes"),c=document,g=c.documentElement;function d(x,z){var G=arguments.length;G===1&&Array.isArray(x)===!1&&(z=x,x=[]);var J,W,te,he,f,S,H,O,oe,ue=null,de,ee,fe=!1,pe=0,ne,U=z||{};U.moves===void 0&&(U.moves=C),U.accepts===void 0&&(U.accepts=C),U.invalid===void 0&&(U.invalid=st),U.containers===void 0&&(U.containers=x||[]),U.isContainer===void 0&&(U.isContainer=E),U.copy===void 0&&(U.copy=!1),U.copySortSource===void 0&&(U.copySortSource=!1),U.revertOnSpill===void 0&&(U.revertOnSpill=!1),U.removeOnSpill===void 0&&(U.removeOnSpill=!1),U.direction===void 0&&(U.direction="vertical"),U.ignoreInputTextSelection===void 0&&(U.ignoreInputTextSelection=!0),U.mirrorContainer===void 0&&(U.mirrorContainer=c.body);var ie=s({containers:U.containers,start:$e,end:Je,cancel:M,remove:nt,destroy:ge,canMove:qe,dragging:!1});return U.removeOnSpill===!0&&ie.on("over",xt).on("out",wt),I(),ie;function y(w){return ie.containers.indexOf(w)!==-1||U.isContainer(w)}function I(w){var A=w?"remove":"add";b(g,A,"mousedown",me),b(g,A,"mouseup",Ye)}function B(w){var A=w?"remove":"add";b(g,A,"mousemove",Ee)}function Q(w){var A=w?"remove":"add";l[A](g,"selectstart",ve),l[A](g,"click",ve)}function ge(){I(!0),Ye({})}function ve(w){de&&w.preventDefault()}function me(w){he=w.clientX,f=w.clientY;var A=h(w)!==1||w.metaKey||w.ctrlKey;if(!A){var X=w.target,Z=xe(X);Z&&(de=Z,B(),w.type==="mousedown"&&(j(X)?X.focus():w.preventDefault()))}}function Ee(w){if(de){if(h(w)===0){Ye({});return}if(!(w.clientX!==void 0&&Math.abs(w.clientX-he)<=(U.slideFactorX||0)&&w.clientY!==void 0&&Math.abs(w.clientY-f)<=(U.slideFactorY||0))){if(U.ignoreInputTextSelection){var A=$("clientX",w)||0,X=$("clientY",w)||0,Z=c.elementFromPoint(A,X);if(j(Z))return}var ae=de;B(!0),Q(),Je(),Ge(ae),u.add(O||te,"gu-transit"),jt(),Tt(),pe=0,Ie(w)}}}function xe(w){if(!(ie.dragging&&J)&&!y(w)){for(var A=w;v(w)&&y(v(w))===!1;)if(U.invalid(w,A)||(w=v(w),!w))return;var X=v(w);if(X&&!U.invalid(w,A)){var Z=U.moves(w,X,A,V(w));if(Z)return{item:w,source:X}}}}function qe(w){return!!xe(w)}function $e(w){var A=xe(w);A&&Ge(A)}function Ge(w){Mt(w.item,w.source)&&(O=w.item.cloneNode(!0),ie.emit("cloned",O,w.item,"copy")),W=w.source,te=w.item,S=H=V(w.item),ie.dragging=!0,ie.emit("drag",te,W)}function st(){return!1}function Je(){if(ie.dragging){var w=O||te;tt(w,v(w))}}function Ae(){de=!1,B(!0),Q(!0)}function Ye(w){if(Ae(),!!ie.dragging){var A=O||te,X=$("clientX",w)||0,Z=$("clientY",w)||0,ae=k(J,X,Z),le=be(ae,X,Z);le&&(O&&U.copySortSource||!O||le!==W)?tt(A,le):U.removeOnSpill?nt():M()}}function tt(w,A){var X=v(w);O&&U.copySortSource&&A===W&&X.removeChild(te),ye(A)?ie.emit("cancel",w,W):ie.emit("drop",w,A,W,H),re()}function nt(){if(ie.dragging){var w=O||te,A=v(w);A&&A.removeChild(w),ie.emit(O?"cancel":"remove",w,A,W),re()}}function M(w){if(ie.dragging){var A=arguments.length>0?w:U.revertOnSpill,X=O||te,Z=v(X),ae=ye(Z);ae===!1&&A&&(O?Z&&Z.removeChild(O):W.insertBefore(X,S)),ae||A?ie.emit("cancel",X,W,W):ie.emit("drop",X,Z,W,H),re()}}function re(){var w=O||te;Ae(),St(),It(),w&&u.rm(w,"gu-transit"),oe&&clearTimeout(oe),ie.dragging=!1,ue&&ie.emit("out",w,ue,W),ie.emit("dragend",w,pe),W=te=O=S=H=oe=ue=null}function ye(w,A){var X;return A!==void 0?X=A:J?X=H:X=V(O||te),w===W&&X===S}function be(w,A,X){for(var Z=w;Z&&!ae();)Z=v(Z);return Z;function ae(){var le=y(Z);if(le===!1)return!1;var Le=ht(Z,w),Ve=vt(Z,Le,A,X),Be=ye(Z,Ve);return Be?!0:U.accepts(te,Z,W,Ve)}}function Ie(w){if(!J)return;w.preventDefault();var A=$("clientX",w)||0,X=$("clientY",w)||0;J.style.left=A-2+"px",J.style.top=X-2+"px";var Z=O||te,ae=k(J,A,X),le=be(ae,A,X),Le=le!==null&&le!==ue;(Le||le===null)&&(ke(),ue=le,_e()),Vt(ae,X);var Ve=v(Z);if(le===W&&O&&!U.copySortSource){Ve&&Ve.removeChild(Z);return}var Be,ze=ht(le,ae);if(fe=at(ze,le),ze!==null)Be=vt(le,ze,A,X);else if(U.revertOnSpill===!0&&!O)Be=S,le=W;else{O&&Ve&&Ve.removeChild(Z),O&&ee&&(ee.style.display="none");return}ee.style.display="block",Ct(Be,Z,Le),Be?Ft(ze,Be):Pt(le);function je(Ne){ie.emit(Ne,Z,ue,W)}function _e(){Le&&je("over")}function ke(){ue&&je("out")}}function Ct(w,A,X){(w===A||w===V(A))&&(H=V(A)),(w===null&&X||w!==A&&w!==V(A))&&(H=w)}function xt(w){u.rm(w,"gu-hide")}function wt(w){ie.dragging&&u.add(w,"gu-hide")}function Tt(){J||(J=document.createElement("div"),J.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",J.innerHTML=U.getMirrorText&&U.getMirrorText(te)||"控件",u.add(J,"gu-mirror"),U.mirrorContainer.appendChild(J),b(g,"add","mousemove",Ie),u.add(U.mirrorContainer,"gu-unselectable"),ie.emit("cloned",J,te,"mirror"))}function jt(){if(ee=document.createElement("div"),u.add(ee,"gu-insertion"),te){var w=te.getBoundingClientRect();ee.style.left=w.left+"px",ee.style.top=w.top+"px"}fe=!1,U.mirrorContainer.appendChild(ee)}function St(){J&&(u.rm(U.mirrorContainer,"gu-unselectable"),b(g,"remove","mousemove",Ie),v(J).removeChild(J),J=null)}function It(){ee&&(v(ee).removeChild(ee),ee=null)}function ht(w,A){for(var X=A;X!==w&&v(X)!==w;)X=v(X);return X===g?null:X}function at(w,A){if(!A)return fe;var X=w||A&&A.lastElementChild;if(!X)return!0;var Z=getComputedStyle(w),ae=/^inline/.test(Z.getPropertyValue("display"))||/^(left|right)$/.test(Z.getPropertyValue("float"));if(ae)return!0;if(A){var le=getComputedStyle(A),Le=le.getPropertyValue("display");if(/flex$/.test(Le)){var Ve=le.getPropertyValue("flex-direction")||"row";if(Ve==="row"||Ve==="row-reverse")return!Nt(A)}return!1}return!0}function Nt(w){if(!w.children||!w.children.length)return!1;for(const A of Array.from(w.children)){const Z=(A.className&&A.className.split(" ")||[]).filter(ae=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ae));if(!Z.length)return!1;for(const ae of Z){const le=ae.slice(ae.lastIndexOf("-")+1);if(parseInt(le,10)!==12)return!1}}return!0}function Ft(w,A){const X=A.getBoundingClientRect();if(ee.style.left=X.left+"px",ee.style.top=X.top+"px",fe){if(ee.style.height=X.height+"px",ee.style.width="4px",w){const Z=w.getBoundingClientRect();Z.top!==X.top&&(ee.style.left=Z.right+"px",ee.style.top=Z.top+"px",ee.style.height=Z.height+"px")}}else if(ee.style.height="4px",ee.style.width=X.width+"px",ne){const Z=ne.getBoundingClientRect();X.top<Z.top&&(ee.style.display="none")}A===te&&te&&(ee.style.display="none")}function Pt(w){H=null;var A=w.lastElementChild;if(A){var X=A.getBoundingClientRect();fe?(ee.style.left=X.right+"px",ee.style.top=X.top+"px",ee.style.height=X.height+"px",ee.style.width="4px"):(ee.style.left=X.left+"px",ee.style.top=X.bottom+"px",ee.style.height="4px",ee.style.width=X.width+"px"),A===te&&te&&(ee.style.display="none")}else ee.style.display="none"}function Vt(w,A){if(!U.mirrorContainer.contains(w)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(ne=p(w),!ne||!ne.contains(w)))return;const X=document.querySelector(".dgComponentSelected"),Z=ne.getBoundingClientRect();if(A-30<Z.top&&ne.scrollTop>0){let ae=ne.scrollTop<10?ne.scrollTop:10;ne.scrollBy(0,-1*ae),X&&ne.contains(X)&&(pe=pe+-1*ae)}if(A+30>Z.bottom&&ne.scrollTop<ne.scrollHeight-ne.clientHeight){const ae=ne.scrollHeight-ne.clientHeight-ne.scrollTop;let le=ae<10?ae:10;ne.scrollBy(0,le),X&&ne.contains(X)&&(pe=pe+le)}}function vt(w,A,X,Z){var ae=U.direction==="horizontal",le=U.direction==="mixed",Le=A!==w?Be():Ve();return Le;function Ve(){var je=w.children.length,_e,ke,Ne;for(_e=0;_e<je;_e++)if(ke=w.children[_e],Ne=ke.getBoundingClientRect(),ae&&Ne.left+Ne.width/2>X||!le&&!ae&&Ne.top+Ne.height/2>Z||le&&Ne.left+Ne.width>X&&Ne.top+Ne.height>Z)return ke;return null}function Be(){var je=A.getBoundingClientRect();if(le){var _e=Z-je.top,ke=X-je.left,Ne=je.bottom-Z,lt=je.right-X,ct=Math.min(ke,lt,_e,Ne),ut;return fe?ut=lt<ke:ut=Ne===ct||lt===ct||ke===ct,ze(ut)}return ze(ae?X>je.left+P(je)/2:Z>je.top+T(je)/2)}function ze(je){return je?V(A):A}}function Mt(w,A){return typeof U.copy=="boolean"?U.copy:U.copy(w,A)}}function p(x){const z=Array.from(window.scrollContainerList);if(z.length===1){const J=Array.from(window.scrollContainerList)[0];return document.getElementById(J)}const G=m(z);for(const J of G)if(J.contains(x))return J;return null}function m(x){const z=[];return x.forEach(G=>{const J=document.getElementById(G);J&&z.push(J)}),z.sort((G,J)=>G.contains(J)?1:J.contains(G)?-1:0),z}function b(x,z,G,J){var W={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},te={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},he={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};a.navigator.pointerEnabled?l[z](x,te[G],J):a.navigator.msPointerEnabled?l[z](x,he[G],J):(l[z](x,W[G],J),l[z](x,G,J))}function h(x){if(x.touches!==void 0)return x.touches.length;if(x.which!==void 0&&x.which!==0)return x.which;if(x.buttons!==void 0)return x.buttons;var z=x.button;if(z!==void 0)return z&1?1:z&2?3:z&4?2:0}function k(x,z,G){x=x||{};var J=x.className||"",W;return x.className+=" gu-hide",W=c.elementFromPoint(z,G),x.className=J,W}function E(){return!1}function C(){return!0}function P(x){return x.width||x.right-x.left}function T(x){return x.height||x.bottom-x.top}function v(x){return x.parentNode===c?null:x.parentNode}function j(x){return x.tagName==="INPUT"||x.tagName==="TEXTAREA"||x.tagName==="SELECT"||F(x)}function F(x){return!x||x.contentEditable==="false"?!1:x.contentEditable==="true"?!0:F(v(x))}function V(x){return x.nextElementSibling||z();function z(){var G=x;do G=G.nextSibling;while(G&&G.nodeType!==1);return G}}function R(x){return x.targetTouches&&x.targetTouches.length?x.targetTouches[0]:x.changedTouches&&x.changedTouches.length?x.changedTouches[0]:x}function $(x,z){var G=R(z),J={pageX:"clientX",pageY:"clientY"};return x in J&&!(x in G)&&J[x]in G&&(x=J[x]),G[x]}r.exports=d}).call(this,typeof We<"u"?We:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,r,i){r.exports=function(s,l){return Array.prototype.slice.call(s,l)}},{}],4:[function(o,r,i){var a=o("ticky");r.exports=function(l,u,c){l&&a(function(){l.apply(c||null,u||[])})}},{ticky:10}],5:[function(o,r,i){var a=o("atoa"),s=o("./debounce");r.exports=function(u,c){var g=c||{},d={};return u===void 0&&(u={}),u.on=function(p,m){return d[p]?d[p].push(m):d[p]=[m],u},u.once=function(p,m){return m._once=!0,u.on(p,m),u},u.off=function(p,m){var b=arguments.length;if(b===1)delete d[p];else if(b===0)d={};else{var h=d[p];if(!h)return u;h.splice(h.indexOf(m),1)}return u},u.emit=function(){var p=a(arguments);return u.emitterSnapshot(p.shift()).apply(this,p)},u.emitterSnapshot=function(p){var m=(d[p]||[]).slice(0);return function(){var b=a(arguments),h=this||u;if(p==="error"&&g.throws!==!1&&!m.length)throw b.length===1?b[0]:b;return m.forEach(function(E){g.async?s(E,b,h):E.apply(h,b),E._once&&u.off(p,E)}),u}},u}},{"./debounce":4,atoa:3}],6:[function(o,r,i){(function(a){var s=o("custom-event"),l=o("./eventmap"),u=a.document,c=p,g=b,d=[];a.addEventListener||(c=m,g=h),r.exports={add:c,remove:g,fabricate:k};function p(v,j,F,V){return v.addEventListener(j,F,V)}function m(v,j,F){return v.attachEvent("on"+j,C(v,j,F))}function b(v,j,F,V){return v.removeEventListener(j,F,V)}function h(v,j,F){var V=P(v,j,F);if(V)return v.detachEvent("on"+j,V)}function k(v,j,F){var V=l.indexOf(j)===-1?$():R();v.dispatchEvent?v.dispatchEvent(V):v.fireEvent("on"+j,V);function R(){var x;return u.createEvent?(x=u.createEvent("Event"),x.initEvent(j,!0,!0)):u.createEventObject&&(x=u.createEventObject()),x}function $(){return new s(j,{detail:F})}}function E(v,j,F){return function(R){var $=R||a.event;$.target=$.target||$.srcElement,$.preventDefault=$.preventDefault||function(){$.returnValue=!1},$.stopPropagation=$.stopPropagation||function(){$.cancelBubble=!0},$.which=$.which||$.keyCode,F.call(v,$)}}function C(v,j,F){var V=P(v,j,F)||E(v,j,F);return d.push({wrapper:V,element:v,type:j,fn:F}),V}function P(v,j,F){var V=T(v,j,F);if(V){var R=d[V].wrapper;return d.splice(V,1),R}}function T(v,j,F){var V,R;for(V=0;V<d.length;V++)if(R=d[V],R.element===v&&R.type===j&&R.fn===F)return V}}).call(this,typeof We<"u"?We:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,r,i){(function(a){var s=[],l="",u=/^on/;for(l in a)u.test(l)&&s.push(l.slice(2));r.exports=s}).call(this,typeof We<"u"?We:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,r,i){(function(a){var s=a.CustomEvent;function l(){try{var u=new s("cat",{detail:{foo:"bar"}});return u.type==="cat"&&u.detail.foo==="bar"}catch{}return!1}r.exports=l()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(c,g){var d=document.createEvent("CustomEvent");return g?d.initCustomEvent(c,g.bubbles,g.cancelable,g.detail):d.initCustomEvent(c,!1,!1,void 0),d}:function(c,g){var d=document.createEventObject();return d.type=c,g?(d.bubbles=!!g.bubbles,d.cancelable=!!g.cancelable,d.detail=g.detail):(d.bubbles=!1,d.cancelable=!1,d.detail=void 0),d}}).call(this,typeof We<"u"?We:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,r,i){var a=r.exports={},s,l;function u(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=u}catch{s=u}try{typeof clearTimeout=="function"?l=clearTimeout:l=c}catch{l=c}})();function g(T){if(s===setTimeout)return setTimeout(T,0);if((s===u||!s)&&setTimeout)return s=setTimeout,setTimeout(T,0);try{return s(T,0)}catch{try{return s.call(null,T,0)}catch{return s.call(this,T,0)}}}function d(T){if(l===clearTimeout)return clearTimeout(T);if((l===c||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(T);try{return l(T)}catch{try{return l.call(null,T)}catch{return l.call(this,T)}}}var p=[],m=!1,b,h=-1;function k(){!m||!b||(m=!1,b.length?p=b.concat(p):h=-1,p.length&&E())}function E(){if(!m){var T=g(k);m=!0;for(var v=p.length;v;){for(b=p,p=[];++h<v;)b&&b[h].run();h=-1,v=p.length}b=null,m=!1,d(T)}}a.nextTick=function(T){var v=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)v[j-1]=arguments[j];p.push(new C(T,v)),p.length===1&&!m&&g(E)};function C(T,v){this.fun=T,this.array=v}C.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function P(){}a.on=P,a.addListener=P,a.once=P,a.off=P,a.removeListener=P,a.removeAllListeners=P,a.emit=P,a.prependListener=P,a.prependOnceListener=P,a.listeners=function(T){return[]},a.binding=function(T){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(T){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],10:[function(o,r,i){(function(a){var s=typeof a=="function",l;s?l=function(u){a(u)}:l=function(u){setTimeout(u,0)},r.exports=l}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,r,i){(function(a,s){var l=o("process/browser.js").nextTick,u=Function.prototype.apply,c=Array.prototype.slice,g={},d=0;i.setTimeout=function(){return new p(u.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new p(u.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(m){m.close()};function p(m,b){this._id=m,this._clearFn=b}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(m,b){clearTimeout(m._idleTimeoutId),m._idleTimeout=b},i.unenroll=function(m){clearTimeout(m._idleTimeoutId),m._idleTimeout=-1},i._unrefActive=i.active=function(m){clearTimeout(m._idleTimeoutId);var b=m._idleTimeout;b>=0&&(m._idleTimeoutId=setTimeout(function(){m._onTimeout&&m._onTimeout()},b))},i.setImmediate=typeof a=="function"?a:function(m){var b=d++,h=arguments.length<2?!1:c.call(arguments,1);return g[b]=!0,l(function(){g[b]&&(h?m.apply(null,h):m.call(null),i.clearImmediate(b))}),b},i.clearImmediate=typeof s=="function"?s:function(m){delete g[m]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Lt);var Xo=Lt.exports;const Ht=Yo(Xo),Jo={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object},safeHtml:{type:Boolean,default:!0}},Qo={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},yt=e.defineComponent({name:"Toast",props:Qo,emits:["close","click"],setup:(t,n)=>{const o=e.ref(t.animate),r="fadeOut",i=e.computed(()=>t.options),a=e.ref(!1),s=e.computed(()=>i.value.title&&i.value.message),l=e.computed(()=>!i.value.title&&i.value.message),u=e.computed(()=>{const C={animated:a.value,toast:!0,"toast--only-content":!s.value};return C[t.animate]=!1,C[r]=a.value,C["toasty-type-"+i.value.type]=!0,i.value.theme&&(C[i.value.theme]=!0),C}),c=e.computed(()=>{const T=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,v={"f-icon":!0};return v[T]=!0,v}),g=e.computed(()=>i.value.title||i.value.message),d=e.computed(()=>t.showCloseButton),p=e.computed(()=>!!i.value.buttons||!!n.slots.default),m=e.computed(()=>He.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function b(C){C.stopPropagation(),C.preventDefault(),a.value=!1,setTimeout(()=>{n.emit("close",i.value)},200)}function h(C,P){}function k(C){return`f-preten-link ${C.customClass?C.customClass:""}`}e.watch(o,()=>{o.value});const E=()=>{var C;return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((C=i.value.buttons)==null?void 0:C.map(P=>e.createVNode("span",{class:k(P),onClick:T=>void 0},[P.text]))),n.slots.default&&n.slots.default()])])};return()=>e.createVNode("div",{class:u.value,style:"min-height:44px"},[d.value&&e.createVNode("button",{title:He.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:b},[e.createVNode("span",{class:"f-icon modal_close"},null)]),g.value&&e.createVNode("section",{class:"modal-tips"},[!s.value&&e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:c.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[s.value&&e.createVNode(e.Fragment,null,[e.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),e.createVNode("p",{class:"toast-msg",innerHTML:i.value.message,style:m.value},null),p.value&&E()]),l.value&&(i.value.buttons?e.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:m.value,innerHTML:i.value.message},null),e.createVNode("div",{class:"after-toast-title text-right ml-auto"},[E()])]):e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:m.value,innerHTML:i.value.message},null))])])])}}),pt=e.defineComponent({name:"Notify",props:Jo,emits:["close","empty"],setup(t,n){const o=e.computed(()=>({"farris-notify":!0})),r={left:12,right:12,top:20,bottom:12},i=e.ref(),a=e.ref(t.options),s=e.ref(t.showCloseButton),l=e.computed(()=>t.position||"bottom-right"),u=e.computed(()=>t.timeout!=null?t.timeout:3e3),c=e.computed(()=>{const p=t.bottom?t.bottom:r.bottom,m=t.top?t.top:r.top,b={transition:"all 0.2s ease",left:l.value.indexOf("left")>-1?`${t.left?t.left:r.left}px`:"",right:l.value.indexOf("right")>-1?`${t.right?t.right:r.right}px`:"",top:l.value.indexOf("top")>-1?`${m}px`:"",bottom:l.value.indexOf("bottom")>-1?`${p}px`:""};return l.value.indexOf("center")>-1&&(b.left="50%",b.marginLeft="calc(-24rem / 2)",l.value==="center-center"&&(b.top="50%",b.transform="translate(-50%, -50%)")),b});function g(p){n.emit("close")}u.value&&setTimeout(()=>{g()},u.value),n.expose({closeToast:g,container:i,notifyPosition:l});function d(p,m){g()}return()=>e.createVNode("div",{class:o.value,style:c.value,ref:i},[e.createVNode(yt,{options:a.value,showCloseButton:s.value,animate:t.animate,onClose:p=>d(p,a.value)},null)])}});class Zo{constructor(){Re(this,"notifyRefs",[]);Re(this,"globalConfig",e.reactive({}))}escapeAllHtml(n){if(typeof n!="string"||!n)return"";const o=document.createElement("div");return o.textContent=n||"",o.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),a=document.createElement("div");a.style.display="contents";const s=e.createApp({setup(){var c;const l=e.ref();function u(){l.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,l),s.unmount()},220)}if(i.position.indexOf("top")>-1){const g=o.getNotifyInstances(i.position),d=g[g.length-1];if(d){const p=d.value.container.getBoundingClientRect();i.top=p.bottom}}return i.safeHtml&&((c=i.options)!=null&&c.message)&&(i.options.message=o.escapeAllHtml(i.options.message)),e.onUnmounted(()=>{document.body.removeChild(a)}),e.onMounted(()=>{o.updateNotifyPositionForCreate(i,l)}),()=>e.createVNode(e.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[e.createVNode(pt,e.mergeProps({ref:l},i,{onClose:u}),null)]})}});return s.provide("NotifyService",this),document.body.appendChild(a),s.use(He.LocaleService.i18n),s.mount(a),s}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const r=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(i=>{const a=i.value.container.getBoundingClientRect();i.value.container.style.bottom=a.height+r-a.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const r=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const i=this.getNotifyInstances(n.position),a=i.indexOf(o);i.slice(a+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}r>-1&&this.notifyRefs.splice(r,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let r="",i="",a,s,l;typeof o=="string"?r=o:o&&(r=o.message||"",i=o.title||"",s=o.position||null,l=o.showCloseButton!=null?o.showCloseButton:null,a=o.timeout!=null?o.timeout:null);const c={options:{type:n,message:r,title:i}};return s!=null&&(c.position=s),l!=null&&(c.showCloseButton=l),a!=null&&(c.timeout=a),c}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const Ko=Symbol("NOTIFY_SERVICE_TOKEN");pt.install=t=>{t.component(pt.name,pt),t.component(yt.name,yt);const n=new Zo;t.provide(Ko,n),t.provide("FNotifyService",n)},`${He.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const er={customClass:{type:String,default:""},sort:{type:Object},filter:{type:Object},autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loadData:{type:Function},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:36,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!1}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1},emptyTemplate:{type:Object},summary:{type:Object,default:{enable:!1,groupFields:["numericField1","numericField2"]}},autoHeight:{type:Boolean,default:!1}};function tr(t,n,o,r,i,a,s,l,u,c,g,d,p,m,b,h,k){const{calculateCellPositionInRow:E}=a,{columnContext:C,hasLeftFixedColumn:P,hasRightFixedColumn:T}=s,{gridDataStyle:v,leftFixedGridDataStyle:j,rightFixedGridDataStyle:F}=m,{renderDataRow:V}=se.getHierarchyRow(t,n,C,k,l,u,c,g,d,p,m,b,h),R=[V];function $(W,te){const he=E(W);return k.value.filter(f=>f.visible!==!1).map((f,S)=>R[f.type](f,he,te,S))}function x(){return e.createVNode("div",{ref:r,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:j.value},[$(C.value.leftColumns.filter(W=>W.visible),"left")])])}function z(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:v.value},[$(C.value.primaryColumns.filter(W=>W.visible),"primary")])])}function G(){return e.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:F.value},[$(C.value.rightColumns.filter(W=>W.visible),"right")])])}function J(){const W=[];return P.value&&W.push(x()),W.push(z()),T.value&&W.push(G()),W}return{renderDataArea:J}}const nr=e.defineComponent({name:"FTreeGrid",props:er,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged","selectionUpdate"],setup(t,n){var on,rn;const r=((on=t.rowOption)==null?void 0:on.height)||28,i=e.ref(20),a=e.ref(t.columns),s=se.useIdentify(t),{idField:l}=s,u=e.ref(),c=e.ref(),g=e.ref(),d=e.ref(),p=e.ref(),m=e.ref([]),b=e.ref(!1),h=e.ref(((rn=t.rowOption)==null?void 0:rn.wrapContent)||!1),k=se.useGroupData(t,s),E=se.useFilter(t,n),C=se.useHierarchy(t),{collapseField:P}=C,{showLoading:T,renderLoading:v}=se.useLoading(t,u),j=se.useDataView(t,new Map,E,C,s),{dataView:F}=j,V=se.useSelection(t,j,s,m,n),{showSelection:R,selectedValues:$}=V,x=se.useSelectHierarchyItem(t,m,j,s,V,n),z=e.computed(()=>t.disabled),G=e.computed(()=>t.virtualized?Math.min(j.dataView.value.length,i.value):j.dataView.value.length),J=se.usePagination(t,j),{shouldRenderPagination:W}=J,{containerStyleObject:te}=se.useDataViewContainerStyle(t),he=se.useCommandColumn(t),{applyCommands:f}=he;f(a);const{applyColumnSetting:S,removeColumnSetting:H}=se.useSettingColumn(t);t.showSetting&&S(a);const O=se.useColumn(t,n),oe=se.useSort(t),{applyColumnSorter:ue,columnContext:de,updateColumnRenderContext:ee}=O;ue(j,oe);const fe=se.useGroupColumn(t,de),pe=se.useRow(t,n,V,s),ne=se.useEdit(t,n,s,pe,m),U=se.useVisualDataBound(t),ie=se.useVisualDataCell(t,ne,U),y=se.useVisualDataRow(t,j,ne,C,s,U,ie),I=se.useVisualData(t,a,j,G,0,y),{getVisualData:B}=I,Q=se.useCellPosition(t,de),ge=se.useSidebar(t,V),{sidebarWidth:ve}=ge,me=se.useVirtualScroll(t,j,m,de,I,G,0,ve),{onWheel:Ee,dataGridWidth:xe,viewPortHeight:qe,viewPortWidth:$e,resetScroll:Ge,updateVisibleRowsOnLatestVisibleScope:st}=me,Je=se.useFitColumn(t,de,c,$e,fe),{calculateColumnsSize:Ae}=Je,Ye=se.useFilterHistory(),tt=se.useColumnFilter(c,p,j,Ye,me),nt=se.useDragColumn(t,n,O,j,fe,k,me),M=e.computed(()=>{const Y={"fv-grid":!0,"fv-grid-bordered":t.showBorder,"fv-grid-horizontal-bordered":t.showHorizontalLines,"fv-datagrid-strip":t.showStripe};return ce.getCustomClass(Y,t.customClass)}),re=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":b.value,"fv-grid-wrap-content":h.value})),{renderDataArea:ye}=tr(t,n,g,d,p,Q,O,j,ne,C,pe,V,x,me,I,U,m),{renderGridHeader:be,renderGridColumnResizeOverlay:Ie,shouldShowHeader:Ct}=se.getColumnHeader(t,n,c,d,p,O,j,nt,tt,E,Ye,Je,fe,V,ge,oe,me,$e,m),{renderDataGridSidebar:xt}=se.getSidebar(t,pe,V,ge,me),{renderDisableMask:wt}=se.getDisableMask(),{renderHorizontalScrollbar:Tt}=se.getHorizontalScrollbar(t,c,me),{renderVerticalScrollbar:jt}=se.getVerticalScrollbar(t,c,me);function St(){var Y,K,Te;if(c.value&&c.value.clientHeight>0&&((Y=c.value)==null?void 0:Y.clientWidth)>0){const Fe=Math.ceil(c.value.clientHeight/r);Fe>i.value&&(i.value=Fe,st()),qe.value=((K=g.value)==null?void 0:K.clientHeight)||0,xe.value=((Te=c.value)==null?void 0:Te.clientWidth)||0}c.value&&(c.value.clientHeight>0||c.value.clientWidth>0)&&Ae()}e.onMounted(()=>{c.value&&(i.value=Math.max(Math.ceil(c.value.clientHeight/r),i.value),m.value=B(0,G.value+0-1),cn.useResizeObserver(c.value,St),Ae(),e.nextTick(()=>{c.value&&(xe.value=c.value.clientWidth),g.value&&($e.value=g.value.clientWidth,qe.value=g.value.clientHeight)})),T.value&&v()}),e.onUnmounted(()=>{}),e.watch($e,()=>{c.value&&Ae()});function It(Y){j.collapseTo(Y),j.reOrderVisibleIndex(),Ge()}function ht(Y){j.expandTo(Y),j.reOrderVisibleIndex(),Ge()}function at(){const Y=V.getSelectionRow();return Y?Y.dataIndex-1:-1}function Nt(Y){const K=Y!==void 0?Y:at(),Te=j.insertNewDataItem(K===-1?0:K);return m.value=B(0,G.value+0-1),Te}function Ft(){const Y=at();j.insertNewChildDataItem(Y),m.value=B(0,G.value+0-1)}function Pt(Y,K){const Te=m.value.find(Oe=>Oe.raw[l.value]===K),Fe=Te?Te.dataIndex-1:-1;j.insertNewChildDataItems(Y,Fe)}function Vt(){const Y=at(),K=x.getNextSelectableHierarchyItemId(Y);j.removeHierarchyDataItem(Y),m.value=B(0,G.value+0-1),K&&x.selectItemById(K)}function vt(Y){ne.onEditingRow(Y)}function Mt(Y){ne.acceptEditingRow(Y)}function w(Y){ne.cancelEditingRow(Y)}function A(Y){Y&&(a.value=Y,f(a),ee(a.value),ue(j,oe),Ae())}e.watch(()=>t.columns,Y=>{A(Y)});function X(Y,K){Y&&(j.load(Y),j.reOrderVisibleIndex(),K!=null&&K.keepScrollPosition?me.scrollTo(me.offsetY.value):Ge())}function Z(Y){pe.activeRowById(Y)}function ae(Y,K={isCurrent:!0}){K!=null&&K.isCurrent&&Z(Y),x.selectItemById(Y)}function le(Y){const K=m.value.find(Te=>Te.raw[s.idField.value]===Y);K&&pe.clickRowItem(K)}function Le(Y){x.selectItemByIds(Y)}function Ve(){return V.getSelectedItems()}function Be(){V.clearSelection()}function ze(){V.emptyCurrentRowId()}const je=e.computed(()=>!m.value||!m.value.length),{renderEmpty:_e}=se.getEmpty(t,n);function ke(){return V.getSelectionRow()}function Ne(Y,K={clearCurrent:!0}){K!=null&&K.clearCurrent&&Z(""),x.unSelectItemByIds(Y)}function lt(){return V.currentSelectedDataId.value}function ct(Y,K,Te){const Fe=F.value.find(Oe=>Oe[l.value]===Y);if(Fe){if(Object.keys(Fe).forEach(Se=>{Object.prototype.hasOwnProperty.call(K,Se)&&(Fe[Se]=K[Se])}),Te){const{collapseField:Se,disabledField:Qe,checkedField:Ze,visibleField:Ke}=Te;Se&&!Pe.isUndefined(K[Se])&&(Fe.__fv_collapse__=K[Se]),Ze&&!Pe.isUndefined(K[Ze])&&(Fe.__fv_checked__=K[Ze]),Qe&&!Pe.isUndefined(K[Qe])&&(Fe.__fv_disabled__=K[Qe]),Ke&&!Pe.isUndefined(K[Ke])&&(Fe.__fv_visible__=K[Ke])}const Oe=m.value.find(Se=>Se.raw[l.value]===Y),sn=m.value.findIndex(Se=>Se.raw[l.value]===Y);if(Oe){if(Oe.raw=Fe,Object.keys(Oe.data).forEach(Se=>{Oe.data[Se].updateData(Fe)}),Te){const{collapseField:Se,disabledField:Qe,checkedField:Ze,visibleField:Ke}=Te;Se&&!Pe.isUndefined(K[Se])&&(Oe.collapse=K[Se]),Ze&&!Pe.isUndefined(K[Ze])&&(Oe.checked=K[Ze]),Qe&&!Pe.isUndefined(K[Qe])&&(Oe.disabled=K[Qe]),Ke&&!Pe.isUndefined(K[Ke])&&(Oe.visible=K[Ke])}m.value=[...m.value.slice(0,sn),Oe,...m.value.slice(sn+1)],j.updateSummary()}}}function ut(Y){return Object.prototype.hasOwnProperty.call(Y,"raw")?j.hasRealChildren(Y.raw):j.hasRealChildren(Y)}function Ar(Y){const K=j.dataView.value.find(Te=>Te[l.value]===Y);return K?K[P.value]:""}function zr(){return P.value}e.watch(()=>t.showSetting,(Y,K)=>{Y!==K&&(Y?S(a):H(a),A(a.value))});function _r(Y){return m.value.filter(K=>Y.includes(K.raw[t.idField]))}function Ur(Y){const K=s.idField.value,Te=m.value.find(Fe=>Fe.raw[K]===Y);Te&&pe.changeRow(Te)}function Wr(){V.keepSelectingOnPaging.value||Be(),j.updateVisibleDataSummary(m.value)}n.expose({activeRowById:Z,addNewDataItem:Nt,addNewChildDataItem:Ft,addChildrenToNode:Pt,collapseTo:It,expandTo:ht,removeDataItem:Vt,editDataItem:vt,acceptDataItem:Mt,cancelDataItem:w,updateColumns:A,updateDataSource:X,selectItemById:ae,selectItemByIds:Le,getSelectedItems:Ve,clearSelection:Be,getSelectionRow:ke,clickRowItemById:le,unSelectItemByIds:Ne,getCurrentRowId:lt,reassignRowData:ct,hasChildren:ut,getCollapseField:zr,getCollapseStatusById:Ar,getVisibleDataByIds:_r,selectRowById:Ur,updateDerivedData:Wr,emptyCurrentRowId:ze,calculateColumnsSize:Ae});const Gr=e.computed(()=>{const Y={};return me.shouldShowHorizontalScrollbar.value&&(Y.paddingBottom="10px"),me.shouldShowVirticalScrollbar.value&&(Y.paddingRight="10px"),Y}),Yr=e.computed(()=>({...te.value,borderRadius:"5px"})),{renderDataGridPagination:rs}=se.getPagination(t,n,j,me,J,V),Xr=e.computed(()=>({"d-flex":!0,"justify-content-between":W.value&&R.value,"justify-content-end":W.value&&!R.value,"position-relative":!0})),Jr=e.computed(()=>({"d-flex":!0,"align-items-center":!0})),{renderDataGridSummary:Qr}=se.getSummary(t,j,O);return()=>e.createVNode("div",{ref:u,class:M.value,style:Yr.value,onWheel:Ee},[c.value&&Ct.value&&be(),e.createVNode("div",{ref:c,class:re.value,onMouseover:()=>b.value=!0,onMouseleave:()=>b.value=!1,onTouchstart:Y=>{Y.stopPropagation(),b.value=!0,me.onTouchstartScrollThumb(Y,c)},onTouchend:Y=>{b.value=!1},style:Gr.value},[c.value&&xt(m),c.value&&ye(),c.value&&je.value&&_e(),c.value&&Tt(),c.value&&jt()]),c.value&&Qr(),R.value&&e.createVNode("div",{class:Xr.value},[R.value&&e.createVNode("div",{class:Jr.value},[e.createVNode("div",null,["已选:"+$.value.length,e.createTextVNode(" 条")])])]),Ie(),z.value&&wt()])}});ce.withInstall(nr);const or=new Map([["appearance",Ce.resolveAppearance]]);function rr(t,n,o){return n}const ir={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},sr={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},bt={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},At=Ce.createPropsResolver(bt,ir,or,rr,sr),et=e.defineComponent({name:"FStep",props:bt,emits:["click"],setup(t,n){const o=e.ref(t.direction),r=e.ref(t.fill),i=e.ref(t.height),a=e.ref(t.steps),s=e.ref(t.activeIndex),l=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&r.value,"f-progress-step-vertical-fill":o.value==="vertical"&&r.value})),u=e.computed(()=>({height:o.value==="vertical"?`${i.value}px`:""}));function c(T,v){const j={step:!0,active:v===s.value,clickable:t.clickable,current:v===s.value,finish:v<s.value};return T.status&&(j[T.status]=!0),ce.getCustomClass(j,T.class||"")}function g(T,v){if(!t.clickable)return;const j={step:T,stepIndex:v};n.emit("click",j)}function d(T,v){const j={"f-progressstep-row":!0,"step-active":v===s.value,"step-current":v===s.value,"step-finish":v<s.value};return T.status&&(j["step-"+T.status]=!0),j}function p(T,v){const j={"step-icon":!0,"step-success":v,"f-icon":v,"f-icon-check":v};return ce.getCustomClass(j,T.icon||"")}function m(T,v){const j=[];return T.icon?j.push(e.createVNode("span",{class:p(T,!1)},null)):v>=s.value?j.push(e.createVNode("span",{class:"step-icon"},[v+1])):j.push(e.createVNode("span",{class:p(T,!0)},null)),j}function b(T,v){return{"step-name":!0,"step-name-success":v<s.value}}function h(T,v){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:b(T,v)},[T.title])])}function k(T,v){return{"f-progress-step-line":!0,"f-progress-step-line-success":v===s.value}}function E(T,v){return v!==a.value.length-1}const C=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function P(){return a.value.map((T,v)=>e.createVNode("li",{class:c(T,v),onClick:j=>g(T,v)},[e.createVNode("div",{class:d(T,v)},[e.createVNode("div",{class:"f-progress-step-content"},[m(T,v),h(T,v)]),E(T,v)&&e.createVNode("div",{class:k(T,v)},[e.createVNode("span",{class:C.value},null)])])]))}return e.watch(()=>t.activeIndex,()=>{t.activeIndex>-1&&t.activeIndex<=a.value.length&&(s.value=t.activeIndex,P())}),()=>e.createVNode("div",{class:"f-progress-step"},[e.createVNode("ul",{class:l.value,style:u.value},[P()])])}}),ar=e.defineComponent({name:"FStepDesign",props:bt,emits:[],setup(t,n){const o=e.ref(t.direction),r=e.ref(t.fill),i=e.ref(t.height),a=e.ref(t.steps),s=e.ref(0),l=e.ref(t.clickable),u=e.ref(0),c=e.ref(),g=e.inject("design-item-context"),d=Me.useDesignerComponent(c,g);e.onMounted(()=>{c.value.componentInstance=d}),n.expose(d.value);const p=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&r.value,"f-progress-step-vertical-fill":o.value==="vertical"&&r.value})),m=e.computed(()=>({height:o.value==="vertical"?`${i.value}px`:""}));function b(R,$){const x={step:!0,active:$===s.value,clickable:l.value,"click-disable":R.disable,current:$===s.value};return $<s.value&&(x.finish=!0),R.status&&(x[R.status]=!0),R.hasOwnProperty("class")&&R.class.split(" ").reduce((z,G)=>(z[G]=!0,z),x),x}function h(R,$){}function k(R,$){const x={"f-progressstep-row":!0,"step-active":$===s.value,"step-current":$===s.value};return $<s.value&&(x["step-finish"]=!0),R.status&&(x["step-"+R.status]=!0),x}function E(R,$){const x={"step-icon":!0,"step-success":$,"k-icon":$,"k-i-check":$};return R.hasOwnProperty("icon")&&R.class.split(" ").reduce((z,G)=>(z[G]=!0,z),x),x}function C(R,$){const x=[];return R.icon?x.push(e.createVNode("span",{class:E(R,!1)},null)):$>=s.value||$===u.value?x.push(e.createVNode("span",{class:"step-icon"},[$+1])):x.push(e.createVNode("span",{class:E(R,!0)},null)),x}function P(R,$){return{"step-name":!0,"step-name-success":$<s.value}}function T(R,$){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:P(R,$)},[R.title])])}function v(R,$){return{"f-progress-step-line":!0,"f-progress-step-line-success":$===s.value}}function j(R,$){return $!==a.value.length-1}const F=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function V(){return a.value.map((R,$)=>e.createVNode("li",{class:b(R,$),onClick:x=>void 0},[e.createVNode("div",{class:k(R,$)},[e.createVNode("div",{class:"f-progress-step-content"},[C(R,$),T(R,$)]),j(R,$)&&e.createVNode("div",{class:v(R,$)},[e.createVNode("span",{class:F.value},null)])])]))}return()=>e.createVNode("div",{ref:c,class:"f-progress-step"},[e.createVNode("ul",{class:p.value,style:m.value},[V()])])}});et.install=t=>{t.component(et.name,et)},et.register=(t,n,o,r)=>{t.step=et,n.step=At},et.registerDesigner=(t,n,o)=>{t.step=ar,n.step=At};const lr="root-viewmodel";class cr{constructor(n,o){Re(this,"formSchemaUtils");Re(this,"controlCreatorUtils");Re(this,"designViewModelUtils");this.resolver=n,this.designerHostService=o,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(n){const o=this.createComponentRefNode(n),r=this.createComponentNode(n),i=this.createViewModeNode(n),a=this.formSchemaUtils.getFormSchema();return a.module.viewmodels.push(i),a.module.components.push(r),this.designViewModelUtils.assembleDesignViewModel(),o}createComponentRefNode(n){const o=this.resolver.getSchemaByType("component-ref");return Object.assign(o,{id:`${n.componentId}-component-ref`,component:`${n.componentId}-component`}),o}createComponentNode(n){const o=this.resolver.getSchemaByType("component"),r=this.createFormComponentContents(n);return Object.assign(o,{id:`${n.componentId}-component`,viewModel:`${n.componentId}-component-viewmodel`,componentType:n.componentType,appearance:{class:this.getFormComponentClass(n)},formColumns:n.formColumns,contents:r}),o}getFormComponentClass(n){var r,i;const{templateId:o}=this.formSchemaUtils.getFormSchema().module;if(o==="double-list-in-tab-template"&&((i=(r=n.parentComponentInstance)==null?void 0:r.schema)==null?void 0:i.type)==="tab-page"){const a=n.parentComponentInstance.parent&&n.parentComponentInstance.parent.schema;if((a==null?void 0:a.type)==="tabs"&&(a==null?void 0:a.fill)===!0)return"f-struct-wrapper f-utils-fill-flex-column"}return"f-struct-wrapper"}createFormComponentContents(n){var l,u;const o=this.resolver.getSchemaByType("section");Object.assign(o,{id:n.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:n.componentName});const r=this.resolver.getSchemaByType("response-form"),i=[];Object.assign(r,{id:n.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:i,controlsInline:!0}),o.contents=[r];const{selectedFields:a}=n;a==null||a.forEach(c=>{if(c.$type===ce.FormSchemaEntityField$Type.SimpleField){const g=Pe.cloneDeep(c),d=this.resolveControlClassByFormColumns(n),p=this.controlCreatorUtils.setFormFieldProperty(g,"",d);p&&i.push(p)}});const{templateId:s}=this.formSchemaUtils.getFormSchema().module;if(s==="double-list-in-tab-template"&&((u=(l=n.parentComponentInstance)==null?void 0:l.schema)==null?void 0:u.type)==="tab-page"){const c=n.parentComponentInstance.parent&&n.parentComponentInstance.parent.schema;(c==null?void 0:c.type)==="tabs"&&(c==null?void 0:c.fill)===!0&&(o.appearance.class="f-section-grid f-section-in-main px-0 pt-0",o.fill=!0)}return[o]}resolveControlClassByFormColumns(n){let o="";switch(n.formColumns){case 1:{o="col-12 col-md-12 col-xl-12 col-el-12";break}case 2:{o="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{o="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{o="col-12 col-md-6 col-xl-3 col-el-2";break}}return o}createViewModeNode(n){return{id:`${n.componentId}-component-viewmodel`,code:`${n.componentId}-component-viewmodel`,name:n.componentName,bindTo:n.bindTo,parent:lr,fields:this.assembleViewModelFields(n),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(n){const o=[],{selectedFields:r}=n;return r==null||r.forEach(i=>{if(i.$type===ce.FormSchemaEntityField$Type.SimpleField){let a="blur";const s=i.type.name;(s===ce.FormSchemaEntityFieldTypeName.Enum||s===ce.FormSchemaEntityFieldTypeName.Boolean)&&(a="change"),o.push({type:"Form",id:i.id,fieldName:i.bindingField,groupId:null,groupName:null,updateOn:a,fieldSchema:{}})}}),o}}function zt(t,n,o,r){var a,s,l,u,c,g;const i=o.parentComponentInstance;if(i&&r){const d=(a=i.schema)==null?void 0:a.type,m={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((s=o.bindingSourceContext)==null?void 0:s.entityTitle)||((u=(l=o.bindingSourceContext)==null?void 0:l.bindingEntity)==null?void 0:u.name)||"标题",componentType:"form",formColumns:d==="splitter-pane"?1:4,parentContainerId:i.schema.id,parentComponentInstance:i,bindTo:((c=o.bindingSourceContext)==null?void 0:c.bindTo)||"/",selectedFields:(g=o.bindingSourceContext)==null?void 0:g.bindingEntityFields};return new cr(t,r).createComponent(m)}else return n}const ur={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1},adaptForLanguage:{description:"",type:"boolean",default:!0},layout:{description:"",type:"string",default:"col-12 col-md-6 col-xl-3 col-el-2"},fields:{description:"",type:"array"},formData:{description:"",type:"object"},formType:{description:"",type:"string",default:"static"}},required:["id","type","contents"]},_t=new Map([["appearance",Ce.resolveAppearance]]),dr={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dynamic-form.schema.json",title:"dynamic-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"dynamic-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1},adaptForLanguage:{description:"",type:"boolean",default:!0},formType:{description:"",type:"string",default:"dynamic"},layout:{description:"",type:"string",default:"col-12 col-md-6 col-xl-3 col-el-2"},fields:{description:"",type:"array"},formData:{description:"",type:"object"}},required:["id","type","contents"]},mt={customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0},adaptForLanguage:{type:Boolean,default:!0},fields:{type:Array,default:[]},formData:{type:Object,default:null},layout:{type:String,default:"col-12 col-md-6 col-xl-3 col-el-2"}},fr=Object.assign({},mt,{canRenderForm:{type:Boolean,default:!0},callback:{type:Function}});Ce.createPropsResolver(mt,ur,_t,zt),Ce.createPropsResolver(mt,dr,_t,zt);const gt=e.defineComponent({name:"FDynamicForm",props:fr,emits:["update:modelValue","event"],setup(t,n){const o=e.ref(t.fields),r=new Map,i=e.ref(t.callback);Ue.loadRegister();const a=Ue.useComponentManager(),s=e.ref(t.formData||{}),l=Ue.useBindingData(s,n);Ue.useEntityState(o.value).setup();const c=new Map,g=e.ref(t.canRenderForm),{mergeArray:d,resolveCallbacks:p,resolveEvents:m}=Ue.useDynamicViewUtils(),b=e.computed(()=>{const f=He.LocaleService.getLocale(),S=t.fields&&t.fields.length>0,H={"f-form-layout":S,"farris-form":S};return t.adaptForLanguage&&f&&(H["farris-form-controls-inline"]=f!=="en"),ce.getCustomClass(H,t.customClass)});function h(){function f(S,H){const{id:O}=S||{},{field:oe}=S.binding||{};return{modelValue:H.getValue(O),"onUpdate:modelValue":ue=>{H.setValue(O,oe||O,ue)}}}return{resolve:f}}function k(f){const S=h();return l.getValue(f.id)===void 0&&Object.hasOwnProperty.call(f,"modelValue")&&l.setValue(f.id,void 0,f.modelValue),S.resolve(f,l)}function E(f){const S={};return f&&Object.entries(f).forEach(([H,O])=>{S[H]=()=>Array.isArray(O)?O.map(oe=>v(oe)):v(O)}),S}function C(f){return f.type?f.type:f.fields?"fieldset":"form-group"}function P(f){const S=C(f);let H=f.customClass;H||(H=S==="form-group"?t.layout:"col-12 px-0");const{fields:O,customClass:oe,...ue}=f,de={...m(f,n,S)},ee={...p(f,i,S)};return{props:{...{...ue,customClass:H,...k(f)},key:f.id,ref:ne=>{if(ne&&f.id&&!a.has(f.id)){a.register(f.id,ne);const U={token:f.id,name:"component:ready",type:C(f),payloads:[e.ref(ne)],schema:f};n.emit("event",U)}},onVnodeUnmounted:ne=>{if(f.id&&a.has(f.id)){a.remove(f.id);const U={token:f.id,name:"component:unmounted",type:C(f),payloads:[ne],schema:f};n.emit("event",U)}}},eventProps:de,callbackProps:ee}}function T(f,S){return Array.isArray(f)?f.map(H=>S(H)):S(f)}function v(f,S){var ee;const H=C(f),O=Ue.componentMap[H];if(f.id&&r.set(f.id,f),!O)return null;const oe=()=>f.fields?f.fields.map(fe=>v(fe)):null,ue=(fe,pe,ne)=>{let U;return ne&&ne.length>0?U=e.createVNode(fe,{...pe},ne):U=e.createVNode(fe,{...pe},null),U},de=((ee=c.get(f.id))==null?void 0:ee.props)||{};return f.fields&&f.fields.length>0?ue(O,de,[oe()]):f.slots?ue(O,de,[...Object.values(E(f.slots))]):ue(O,de)}function j(f){const S=C(f);if(!Ue.componentMap[S])return;const{props:O,eventProps:oe,callbackProps:ue}=P(f),de=Ue.resolverMap[S],ee=de?de.editorResolver:null,{componentEventProps:fe,editorEventProps:pe}=oe,{componentCallbackProps:ne,editorCallbackProps:U}=ue;if(fe&&Object.keys(fe).length>0&&Object.assign(O,fe),ne&&Object.keys(ne).length>0&&Object.assign(O,ne),ee&&pe&&Object.keys(pe).length>0){const ie=ee.resolve(f);Object.assign(ie,pe)}if(ee&&U&&Object.keys(U).length>0){const ie=ee.resolve(f);Object.assign(ie,U)}if(O&&Object.keys(O).length>0){const ie=c.get(f.id);ie?Pe.merge(ie==null?void 0:ie.props,O):c.set(f.id,e.reactive({props:O}))}!f.fields||!Array.isArray(f.fields)||f.fields.forEach(ie=>j(ie))}function F(f){const S=C(f);Ue.componentMap[S]&&(V(f),!(!f.fields||!Array.isArray(f.fields))&&f.fields.forEach(O=>F(O)))}function V(f){const S=k(f);if(S&&Object.keys(S).length>0){const H=c.get(f.id);if(!H)c.set(f.id,e.reactive({props:S}));else{const O={...H==null?void 0:H.props};Object.keys(S).forEach(oe=>{O[oe]=S[oe]}),Object.assign(H==null?void 0:H.props,O)}}}e.onMounted(()=>{}),e.watch(()=>t.formData,f=>{s.value=f}),e.watch(()=>s.value,f=>{T(o.value,F)},{deep:!0});function R(f){f&&T(o.value,j)}e.watch(()=>t.fields,f=>{r.clear(),a.clear(),s.value=t.formData||{},c.clear(),o.value=f,R(f)}),R(t.fields);function $(f){f.$forceUpdate&&f.$forceUpdate()}function x(f){return l.getValue(f)}function z(){return s.value}function G(f,S){l.setValue(f,void 0,S);const H=r.get(f);H&&V(H)}function J(f){var S;return(S=c.get(f))==null?void 0:S.props}function W(f,S){const H=c.get(f);Pe.mergeWith(H==null?void 0:H.props,S,d)}n.expose({componentManager:a,rerender:$,getProps:J,setProps:W,getControlValue:x,setControlValue:G,getValues:z});function te(){return g.value&&e.withDirectives(e.createVNode("div",{class:b.value,style:t.customStyle},[n.slots.default&&n.slots.default(),o.value&&o.value.length>0&&T(o.value,v)]),[[e.resolveDirective("area-response")]])}function he(){return!g.value&&o.value&&o.value.length>0&&T(o.value,v)}return()=>t.visible?te()||he():null}}),Ut=e.defineComponent({name:"FResponseForm",props:mt,emits:[],setup(t,n){var d;const o=e.ref(),r=e.ref(),i=e.computed(()=>{const p=He.LocaleService.getLocale(),m=t.fields&&t.fields.length>0,b={"drag-container":!0,"f-form-layout":m,"farris-form":m};return t.adaptForLanguage&&p&&(b["farris-form-controls-inline"]=p!=="en"),ce.getCustomClass(b,t.customClass)}),a=(d=r.value)==null?void 0:d.componentManager;function s(p){r.value.render(p)}function l(p){return r.value.getControlValue(p)}function u(p,m){r.value.setControlValue(p,m)}function c(p){return r.value.getProps(p)}function g(p,m){r.value.setProps(p,m)}return n.expose({componentManager:a,rerender:s,getProps:c,setProps:g,getControlValue:l,setControlValue:u}),()=>t.visible&&e.withDirectives(e.createVNode("div",{ref:o,class:i.value,style:t.customStyle},[n.slots.default&&n.slots.default(),t.fields&&t.fields.length>0&&e.createVNode(gt,{ref:r,fields:t.fields,canRenderForm:!1,formData:t.formData,layout:t.layout},null)]),[[e.resolveDirective("area-response")]])}}),pr={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number],default:null},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},showLabelType:{type:String,default:"visible"},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null},fill:{type:Boolean,default:!1}},mr={id:{type:String},required:{type:Boolean,default:!1},text:{type:String,default:""},title:{type:String},valid:{type:Boolean,default:!0},inValidTip:{type:String,default:""},showType:{type:String,default:"visible"}},gr=e.defineComponent({name:"FDynamicFormLabel",props:mr,emits:[],setup(t,n){e.ref(t.title||t.text);const o=e.ref(t.required),r=e.ref(t.text),i=e.ref(t.valid),a=e.ref(t.inValidTip);e.watch(()=>t.text,()=>{r.value=t.text}),e.watch(()=>t.required,(g,d)=>{g!==d&&(o.value=g)}),e.watch([()=>t.valid,()=>t.inValidTip],([g,d])=>{i.value=g,a.value=d});const s=e.computed(()=>i.value?r.value:a.value),l=e.computed(()=>i.value?"":"color:red"),u=e.computed(()=>({"col-form-label":!0,"f-width-auto":o.value&&(t.showType==="none"||!r.value)})),c=e.computed(()=>t.showType==="force-none"?!1:t.showType==="reserve-space"||o.value||!!r.value&&t.showType!=="none");return()=>c.value&&e.createVNode("label",{class:u.value,title:s.value,style:l.value},[!i.value&&e.createVNode("span",{class:"f-icon f-icon-warning mr-1",style:"color: red; min-width: 16px;",title:a.value},null),e.createVNode("span",{class:"farris-label-text"},[o.value&&e.createVNode("span",{class:"farris-label-info text-danger"},[e.createTextVNode("*")]),t.showType==="visible"&&r.value])])}}),{globalStorageKey:hr}=ce.useThirdComponent(),D={},q={},L={},_={};async function vr(){{const t={schemaMap:Ce.schemaMap,propertyConfigSchemaMap:Ce.propertyConfigSchemaMap,propertyEffectMap:Ce.propertyEffectMap,schemaResolverMap:Ce.schemaResolverMap};dn.register(D,q,L,_),un.register(D,q,L,_),fn.register(D,q,L,_),pn.register(D,q,L,_),mn.register(D,q,L,_,t),gn.register(D,q,L,_),Bt.register(D,q,L,_,t),kt.register(D,q,L,_,t),Bt.register(D,q,L,_,t),kt.register(D,q,L,_,t),hn.register(D,q,L,_,t),vn.register(D,q,L,_),yn.register(D,q,L,_),Cn.register(D,q,L,_,t),bn.register(D,q,L,_),xn.register(D,q,L,_,t),wn.register(D,q,L,_,t),Tn.register(D,q,L,_),jn.register(D,q,L,_,t),Sn.register(D,q,L,_),wo.register(D,q,L,_),In.register(D,q,L,_),Nn.register(D,q,L,_),go.register(D,q,L,_),Pn.register(D,q,L,_),Vn.register(D,q,L,_,t),Mn.register(D,q,L,_,t),kn.register(D,q,L,_,t),Bn.register(D,q,L,_),On.register(D,q,L,_,t),En.register(D,q,L,_),$n.register(D,q,L,_),Rn.register(D,q,L,_),Dn.register(D,q,L,_,t),qn.register(D,q,L,_),Ln.register(D,q,L,_,t),Hn.register(D,q,L,_),An.register(D,q,L,_),zn.register(D,q,L,_),_n.register(D,q,L,_,t),Un.register(D,q,L,_,t),Wn.register(D,q,L,_),Gn.register(D,q,L,_,t),Yn.register(D,q,L,_),dt.register(D,q,L,_),fo.register(D,q,L),Xn.register(D,q,L,_),Jn.register(D,q,L,_,t),Qn.register(D,q,L,_),Zn.register(D,q,L,_),Kn.register(D,q,L,_),eo.register(D,q,L,_,t),vo.register(D,q,L,_),to.register(D,q,L,_,t),no.register(D,q,L,_),oo.register(D,q,L,_),ro.register(D,q,L,_,t),io.register(D,q,L,_),so.register(D,q,L,_),lo.register(D,q,L,_),ao.register(D,q,L,_),co.register(D,q,L,_),uo.register(D,q,L,_,t),po.register(D,q,L,_),Fn.register(D,q,L,_),mo.register(D,q,L,_),ho.register(D,q,L,_,t),yo.register(D,q,L,_),bo.register(D,q,L,_),Co.register(D,q,L,_),xo.register(D,q,L,_),To.register(D,q,L,_),jo.register(D,q,L,_,t),So.register(D,q,L,_),Io.register(D,q,L,_),No.register(D,q,L,_),Fo.register(D,q,L,_,t),Po.register(D,q,L,_,t),Vo.register(D,q,L,_);const n=window[hr];if(n)for(const o in n)n[o].createPropsResolver=Ce.createPropsResolver,n[o].register(D,q,L)}}function Wt(){vr();function t(s){const l=D[s];if(!l)throw new Error(`Could not find the editor of type '${s}'`);return l}function n(s,l){const u=q[s];return u?u(l):{}}function o(s){switch(s){case"check-box":return"onChangeValue";case"switch":return"onModelValueChanged";case"check-group":return"onChangeValue";case"combo-list":case"combo-tree":return"onChange";case"combo-lookup":return"";case"year-range":case"year-picker":case"month-range":case"month-picker":case"date-range":case"datetime-range":case"datetime-picker":return"onDatePicked";case"date-picker":return"onUpdate:modelValue";case"time-picker":return"onValueChange";case"input-group":return"onChange";case"lookup":case"sort-condition-editor":case"filter-condition-editor":case"code-editor":case"language-textbox":case"rich-text-editor":return"onUpdate:modelValue";case"number-range":return"onValueChange";case"number-spinner":return"onValueChange";case"radio-group":return"onChangeValue";case"text":return"";case"events-editor":return"onSavedCommandListChanged";case"grid-field-editor":case"item-collection-editor":case"response-form-layout-setting":case"response-layout-editor-setting":case"response-layout-splitter":case"menu-lookup":case"json-editor":return"onChange";case"field-selector":case"binding-selector":return"onFieldSelected";case"schema-selector":return"onSchemaSelected";case"mapping-editor":return"onMappingFieldsChanged";case"textarea":return"onChange";case"query-solution-config":case"solution-preset":case"filter-bar-config":return"onFieldsChanged";case"property-editor":return"onValueChange";case"expression-editor":return"onExpressionChanged";case"collection-property-editor":return"onValueChange";default:return"onUpdate:modelValue"}}function r(s){switch(s){case"combo-list":case"input-group":case"textarea":return"onClear"}}function i(s){switch(s){case"input-group":case"textarea":return"onMousedownEvent"}}function a(s){switch(s){case"input-group":case"textarea":return"onMouseupEvent"}}return{resolveEditorProps:n,resolveEditorType:t,getChangeFunctionName:o,getClearFunctionName:r,getMousedownFunctionName:i,getMouseupFunctionName:a}}const yr={errors:{type:Object,default:null}},br=e.defineComponent({name:"FValidationMessage",props:yr,emits:[],setup(t,n){const o=e.ref(t.errors);e.watch(()=>t.errors,a=>{o.value=a});const r=e.ref(!0),i=e.computed(()=>{if(o.value){const a=Object.keys(o.value).map(s=>{var l;return(l=o.value[s])==null?void 0:l.name});return a.length?a.join(" "):""}return""});return()=>i.value&&e.createVNode("div",{class:"farris-feedback f-state-invalid",onClick:()=>r.value=!r.value},[!r.value&&e.createVNode("span",{class:"f-icon f-icon-message_warning f-feedback-icon"},null),r.value&&e.createVNode("span",{class:"f-feedback-message"},[i.value])])}}),Gt=e.defineComponent({name:"FDynamicFormGroup",props:pr,emits:["change","update:modelValue"],setup(t,n){var z;const o=e.ref(t.id),r=e.ref(t.customClass),i=e.ref(t.editor),a=e.ref(t.label),s=e.ref(t.modelValue),l=e.ref(t.readonly),u=e.ref(((z=t.editor)==null?void 0:z.required)||t.required),c=e.ref(t.showLabel),g=e.ref(t.visible);e.ref(t.type);const d=e.ref(),p=e.ref(t.errors),m=ce.isMobilePhone(),b=e.ref(t.editor.type||"input-group"),h=e.computed(()=>c.value?t.showLabelType:"none"),{resolveEditorProps:k,resolveEditorType:E,getChangeFunctionName:C,getClearFunctionName:P}=Wt(),T=e.computed(()=>{const G={"form-group":!0,"farris-form-group":!0,"common-group":!0,"q-state-readonly":l.value,"form-group--in-mobile":m};return G["form-group--has-"+b.value]=!0,G}),v=e.computed(()=>{if(t.fill)return{maxWidth:"none"}});function j(G,J,W){s.value=J!==void 0?J:G,n.emit("update:modelValue",s.value),n.emit("change",s.value,{newValue:G,newModelValue:J,parameters:W})}function F(){n.emit("update:modelValue","")}function V(G){return(...J)=>{F(),typeof G=="function"&&G(...J)}}function R(G){return(J,W,te)=>{j(J,W,te),typeof G=="function"&&G(J,W,te)}}const $=e.computed(()=>{const G=i.value.type||"input-group",J=E(G),W=k(G,i.value),te=C(G),he=P(i.value.type);return he&&(W[he]=V(W[he])),te&&(W[te]=R(W[te])),(W.id==null||W.id==="")&&(W.id=o.value),G==="number-range"&&i.value.onBeginValueChange&&typeof i.value.onBeginValueChange=="function"?(i.value.onBeginValueChange&&typeof i.value.onBeginValueChange=="function"&&(W.onBeginValueChange=i.value.onBeginValueChange),i.value.onEndValueChange&&typeof i.value.onEndValueChange=="function"&&(W.onEndValueChange=i.value.onEndValueChange)):G==="lookup"&&i.value["onUpdate:idValue"]&&typeof i.value["onUpdate:idValue"]=="function"?(W["onUpdate:idValue"]=i.value["onUpdate:idValue"],W.id=o.value):G==="collection-property-editor"&&i.value.onSelectionChange&&typeof i.value.onSelectionChange=="function"?W.onSelectionChange=i.value.onSelectionChange:G==="property-editor"&&(W.onBeforeOpenVariables=i.value.onBeforeOpenVariables),()=>e.createVNode(J,e.mergeProps({ref:d},W,{modelValue:s.value,"onUpdate:modelValue":f=>s.value=f}),n.slots)});function x(){return e.createVNode(br,{id:`${o.value}-validation-message`,errors:p.value},null)}return e.watch([()=>t.id,()=>t.customClass,()=>t.editor,()=>t.label,()=>t.modelValue,()=>t.readonly,()=>t.required,()=>t.showLabel,()=>t.visible,()=>t.errors],([G,J,W,te,he,f,S,H,O,oe])=>{var ue;o.value=G,r.value=J,i.value=W,a.value=te,s.value=he,l.value=f,u.value=((ue=i.value)==null?void 0:ue.required)||S,c.value=H,g.value=O,p.value=oe}),n.expose({editorRef:d}),()=>g.value&&e.createVNode("div",{id:`${o.value}-form-group`,class:r.value,style:t.customStyle},[e.createVNode("div",{class:"farris-group-wrap",style:v.value},[e.createVNode("div",{class:T.value},[e.createVNode(gr,{id:`${o.value}-lable`,showType:h.value,required:u.value,text:a.value,title:a.value},null),e.createVNode("div",{class:"farris-input-wrap"},[$.value(),x()])])])])}}),Cr={id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number]},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},Yt=e.defineComponent({name:"FDynamicFormInput",props:Cr,emits:["change","update:modelValue","mousedown","mouseup"],setup(t,n){const o=e.ref(t.id),r=e.ref(t.editor),i=e.ref(t.modelValue),{resolveEditorProps:a,resolveEditorType:s,getChangeFunctionName:l,getMousedownFunctionName:u,getMouseupFunctionName:c,getClearFunctionName:g}=Wt();function d(C,P,T){i.value=P!==void 0?P:C,n.emit("update:modelValue",i.value),n.emit("change",i.value,{newValue:C,newModelValue:P,parameters:T})}function p(C){n.emit("mousedown",C)}function m(C){n.emit("mouseup",C)}function b(){n.emit("update:modelValue","")}function h(C){return(...P)=>{b(),typeof C=="function"&&C(...P)}}function k(C){return(P,T,v)=>{d(P,T,v),typeof C=="function"&&C(P,T,v)}}const E=e.computed(()=>{const C=s(r.value.type),P=a(r.value.type,r.value);P.focusOnCreated=t.focusOnCreated,P.selectOnCreated=t.selectOnCreated;const T=l(r.value.type),v=g(r.value.type);v&&(P[v]=h(P[v])),T&&(P[T]=k(P[T]));const j=u(r.value.type);P[j]=p;const F=c(r.value.type);return P[F]=m,P.id=o.value,()=>e.createVNode(C,e.mergeProps(P,{modelValue:i.value,"onUpdate:modelValue":V=>i.value=V}),null)});return e.watch([()=>t.id,()=>t.editor,()=>t.modelValue],([C,P,T])=>{o.value=C,r.value=P,i.value=T}),()=>E.value()}});gt.install=t=>{t.component(Ut.name,Ut).component(Yt.name,Yt).component(gt.name,gt).component(Gt.name,Gt)};const xr={tabs:{name:"标签页"}},{globalStorageKey:Ai}=ce.useThirdComponent(),wr={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"},isMessager:{type:Boolean,default:!1}};class we{constructor(n,o){this.x=n,this.y=o}static getTransformInfo(n){const r=window.getComputedStyle(n).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(r.length>=6){const i=parseInt(r[4],10),a=parseInt(r[5],10);return{x:i,y:a}}return{x:0,y:0}}static fromEvent(n,o=null){if(this.isMouseEvent(n))return new we(n.clientX,n.clientY);if(o===null||n.changedTouches.length===1)return new we(n.changedTouches[0].clientX,n.changedTouches[0].clientY);for(let r=0;r<n.changedTouches.length;r++)if(n.changedTouches[r].target===o)return new we(n.changedTouches[r].clientX,n.changedTouches[r].clientY)}static isMouseEvent(n){return Object.prototype.toString.apply(n).indexOf("MouseEvent")===8}static isIPosition(n){return!!n&&"x"in n&&"y"in n}static getCurrent(n){const o=new we(0,0);if(window){const r=window.getComputedStyle(n);if(r){const i=parseInt(r.getPropertyValue("left"),10),a=parseInt(r.getPropertyValue("top"),10);o.x=isNaN(i)?0:i,o.y=isNaN(a)?0:a}return o}return null}static copy(n){return new we(0,0).set(n)}get value(){return{x:this.x,y:this.y}}add(n){return this.x+=n.x,this.y+=n.y,this}subtract(n){return this.x-=n.x,this.y-=n.y,this}multiply(n){this.x*=n,this.y*=n}divide(n){this.x/=n,this.y/=n}reset(){return this.x=0,this.y=0,this}set(n){return this.x=n.x,this.y=n.y,this}}class Xe{constructor(n,o){this.width=n,this.height=o}static getCurrent(n){const o=new Xe(0,0);if(window){const r=window.getComputedStyle(n);return r&&(o.width=parseInt(r.getPropertyValue("width"),10),o.height=parseInt(r.getPropertyValue("height"),10)),o}return null}static copy(n){return new Xe(0,0).set(n)}set(n){return this.width=n.width,this.height=n.height,this}}function Tr(t,n){const o=e.ref(),r=e.ref(),i=e.ref(),a=e.ref(),s=e.ref(),l=e.ref(),u=e.ref(),c=e.ref(),g=e.ref(),d=e.ref(),p=e.ref(),m=e.ref(t.resizeable),b=e.ref(),h=e.ref(t.draggable),k=e.ref(!1);function E(){const f=r.value||document.body,S=window.getComputedStyle(f);if(!S||!o.value)return;const H=we.getTransformInfo(o.value),O={};u.value&&(O.deltaL=o.value.offsetLeft-u.value.x,O.deltaT=o.value.offsetTop-u.value.y);const oe=S.getPropertyValue("position");O.width=f.clientWidth,O.height=f.clientHeight,O.pr=parseInt(S.getPropertyValue("padding-right"),10),O.pb=parseInt(S.getPropertyValue("padding-bottom"),10),O.position=S.getPropertyValue("position"),oe==="static"&&(f.style.position="relative"),O.translateX=H.x,O.translateY=H.y,d.value=O}function C(f){if(o.value){a.value=Xe.getCurrent(o.value),s.value=we.getCurrent(o.value),l.value=a.value?Xe.copy(a.value):null,u.value=s.value?we.copy(s.value):null,E();const S=f.target.getAttribute("type")||"";c.value={n:!!S.match(/n/),s:!!S.match(/s/),w:!!S.match(/w/),e:!!S.match(/e/)}}}function P(){var f,S,H,O;if(o.value){const oe=o.value;c.value&&((c.value.n||c.value.s)&&((f=l.value)!=null&&f.height)&&(oe.style.height=l.value.height+"px"),(c.value.w||c.value.e)&&((S=l.value)!=null&&S.width)&&(oe.style.width=l.value.width+"px"),u.value&&((H=u.value)!=null&&H.x&&(oe.style.left=u.value.x+"px"),(O=u.value)!=null&&O.y&&(oe.style.top=u.value.y+"px")))}}function T(){const f=t.minHeight?t.minHeight:1,S=t.minWidth?t.minWidth:1;l.value&&u.value&&c.value&&a.value&&(l.value.height<f&&(l.value.height=f,c.value.n&&s.value&&(u.value.y=s.value.y+(a.value.height-f))),l.value.width<S&&(l.value.width=S,c.value.w&&s.value&&(u.value.x=s.value.x+(a.value.width-S))),t.maxHeight&&l.value.height>t.maxHeight&&(l.value.height=t.maxHeight,s.value&&c.value.n&&(u.value.y=s.value.y+(a.value.height-t.maxHeight))),t.maxWidth&&l.value.width>t.maxWidth&&(l.value.width=t.maxWidth,c.value.w&&s.value&&(u.value.x=s.value.x+(a.value.width-t.maxWidth))))}function v(){if(r.value){const f=d.value;if(u.value&&l.value&&c.value&&a.value){const S=f.width-f.pr-f.deltaL-f.translateX-u.value.x,H=f.height-f.pb-f.deltaT-f.translateY-u.value.y;c.value.n&&u.value.y+f.translateY<0&&s.value&&(u.value.y=-f.translateY,l.value.height=a.value.height+s.value.y+f.translateY),c.value.w&&u.value.x+f.translateX<0&&s.value&&(u.value.x=-f.translateX,l.value.width=a.value.width+s.value.x+f.translateX),l.value.width>S&&(l.value.width=S),l.value.height>H&&(l.value.height=H)}}}function j(f){if(!i.value||!a.value||!s.value||!c.value)return;f.subtract(i.value);const S=f.x,H=f.y;c.value.n?(u.value.y=s.value.y+H,l.value.height=a.value.height-H):c.value.s&&(l.value.height=a.value.height+H),c.value.e?l.value.width=a.value.width+S:c.value.w&&(l.value.width=a.value.width-S,u.value.x=s.value.x+S),v(),T(),P()}function F(f){if(!g.value)return;const S=we.fromEvent(f);S&&j(S)}function V(){if(o.value){const{width:f,height:S,x:H,y:O}=o.value.getBoundingClientRect(),oe=we.getTransformInfo(o.value);return{size:{width:f,height:S},position:{x:H-oe.x,y:O-oe.y}}}return null}function R(f){if(o.value){const S=V();p.value=S}i.value=void 0,a.value=null,s.value=null,l.value=null,u.value=null,c.value=null,g.value=null,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",R)}function $(){document.addEventListener("mousemove",F),document.addEventListener("mouseup",R)}function x(f){f instanceof MouseEvent&&f.button===2||h.value&&(document.body.click(),f.stopPropagation(),f.preventDefault(),i.value=we.fromEvent(f),g.value=f.target,C(f),$())}function z(f){return o.value=f,m.value&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:S=>x(S)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:S=>x(S)},null)])}function G(f=!0){document.body.click();const S=r.value||document.body,H=Xe.getCurrent(S),O=o.value;f&&O&&(b.value=V(),b.value.transform=O.style.transform),H&&O&&(l.value=H,l.value.height-=14,l.value.width-=14,O.style.height=l.value.height+"px",O.style.width=l.value.width+"px",O.style.left="7px",O.style.top="7px",O.style.transform="",p.value={size:l.value,position:{x:0,y:0}},h.value=!1,k.value=!0)}function J(){var f,S;if(document.body.click(),b.value){const H={width:b.value.size.width||0,height:b.value.size.height||0},O={x:(window.innerWidth-H.width)/2,y:(window.innerHeight-H.height)/2};(f=l.value)==null||f.set(H),(S=u.value)==null||S.set(O);const oe=o.value;oe.style.height=H.height+"px",oe.style.width=H.width+"px",oe.style.left=`${O.x}px`,oe.style.top=`${O.y}px`,oe.style.transform="",p.value={size:H,position:O},h.value=t.draggable,k.value=!1}}function W(){if(o.value){const f=Xe.getCurrent(o.value);if(f){const{width:S,height:H}=f;o.value.style.left=`${(window.innerWidth-S)/2}px`,o.value.style.top=`${(window.innerHeight-H)/2}px`,o.value.style.transform=""}}}function te(){const f=()=>{k.value?G(!1):W(),document.body.click()};return window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}}const he=te();return{renderResizeBar:z,boundingElement:r,resizedEventParam:p,maximize:G,restore:J,allowDrag:h,isMaximized:k,unWindowResizeHandle:he,moveToCenter:W}}function jr(t,n,o){const r=e.ref(),i=e.ref(t.draggable),a=e.ref(t.lockAxis),s=e.ref(),l=e.ref(),u=e.ref(!1),c=e.ref(new we(0,0)),g=e.ref(new we(0,0)),d=e.ref(new we(0,0)),p=e.ref(new we(0,0));e.watch(()=>o.value,F=>{s.value.style.cursor=F?"move":"default"});function m(F,V){if(V.tagName==="BUTTON")return!1;if(V===F)return!0;for(const R in V.children)if(Object.prototype.hasOwnProperty.call(V.children,R)&&m(F,V.children[R]))return!0;return!1}function b(){var $,x;let F=d.value.x+g.value.x,V=d.value.y+g.value.y;a.value==="x"?(F=(($=c.value)==null?void 0:$.x)||0,d.value.x=0):a.value==="y"&&(V=((x=c.value)==null?void 0:x.y)||0,d.value.y=0);const R=`translate3d(${Math.round(F)}px, ${Math.round(V)}px, 0px)`;r.value&&(r.value.style.transform=R),p.value.x=F,p.value.y=V}function h(){if(!l.value||!r.value)return null;const F=l.value.getBoundingClientRect(),V=r.value.getBoundingClientRect(),R={top:F.top<V.top,right:F.right>V.right,bottom:F.bottom>V.bottom,left:F.left<V.left};return R.top||(d.value.y-=V.top-F.top),R.bottom||(d.value.y-=V.bottom-F.bottom),R.right||(d.value.x-=V.right-F.right),R.left||(d.value.x-=V.left-F.left),b(),R}function k(F){F&&(c.value&&F.subtract(c.value),d.value.set(F),b(),h())}function E(F){u.value&&i.value&&(F.stopPropagation(),F.preventDefault(),k(we.fromEvent(F,s.value)))}function C(){var F;u.value&&(u.value=!1,g.value.add(d.value),d.value.reset(),(F=r.value)==null||F.classList.remove("ng-dragging"),n.emit("stopMove"),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",C))}function P(){!u.value&&s.value&&(u.value=!0,s.value.classList.add("ng-dragging"),document.addEventListener("mousemove",E),document.addEventListener("mouseup",C))}function T(){if(r.value){const F=we.getTransformInfo(r.value);g.value.set(F);return}g.value.reset()}function v(F){if(!o.value||F instanceof MouseEvent&&F.button===2)return;const V=F.target||F.srcElement;s.value!==void 0&&V&&!m(V,s.value)||i.value!==!1&&(document.body.click(),F.stopPropagation(),F.preventDefault(),c.value=we.fromEvent(F,r.value),T(),P())}function j(F,V,R){if(i.value&&V){if(F)s.value=F;else if(t.dragHandle){if(t.dragHandle instanceof HTMLElement)s.value=t.dragHandle;else if(typeof t.dragHandle=="string"){const $=V.querySelector(t.dragHandle);$&&(s.value=$)}}r.value=V,l.value=R,s.value?(s.value.classList.add("ng-draggable"),s.value.addEventListener("mousedown",v)):i.value=!1}}return{registerDraggle:j,resetTranslate:T}}function Xt(t,n){if(t){const o=r=>{r.key.toLowerCase()===t.toLowerCase()&&n({event:r,key:t})};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}}}function Sr(t,n){const o=e.ref(t.enableEsc);let r=null;return o.value?(r=Xt("Escape",i=>{n.emit("esc",{event:i.event,type:"esc"})}),{remove:r}):null}function Ir(t,n){const o=e.ref(t.enableEnter);let r=null;return o.value?(r=Xt("Enter",i=>{n.emit("enter",{event:i.event,type:"enter"})}),{remove:r}):null}const rt=e.defineComponent({name:"FModal",props:wr,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(t,n){const o=e.ref(t.width||300),r=e.ref(t.height||200),i=e.ref(t.modelValue),a=e.ref(""),s=e.ref(t.class),l=e.ref(t.fitContent),u=e.ref(t.showHeader),c=e.ref(""),g=e.ref(t.showCloseButton),d=e.ref(t.showMaxButton),p=e.ref(!1),m=e.ref(t.dialogType),b=e.ref(t.src),h=e.ref(""),k=e.ref(t.showButtons),E=e.ref(t.title),C=e.ref(t.containment||null),P=e.ref();E.value==="错误提示"&&(E.value=He.LocaleService.getLocaleValue("messageBox.errorTitle"));const T=e.ref(!1);function v(M,re){const ye=re?"accept":"cancel";Promise.resolve().then(()=>{var be;return(be=t.beforeClose)==null?void 0:be.call(t,{closeType:ye})}).then(be=>{be&&(i.value=!1,n.emit("update:modelValue",!1),re!=null&&n.emit(re?"accept":"cancel"),n.emit("closed",M))})}const j=[{name:"cancel",text:He.LocaleService.getLocaleValue("messageBox.cancel")||"取消",class:"btn btn-secondary",handle:M=>{v(M,!1)}},{name:"accept",text:He.LocaleService.getLocaleValue("messageBox.ok")||"确定",class:"btn btn-primary",handle:M=>{v(M,!0)}}],F=e.ref(t.buttons&&t.buttons.length?t.buttons:j),V=e.computed(()=>!!c.value),R=e.computed(()=>!!k.value&&!!F.value),$=e.ref(),x=e.ref(),z=e.ref(!1),{renderResizeBar:G,maximize:J,restore:W,boundingElement:te,resizedEventParam:he,allowDrag:f,unWindowResizeHandle:S,moveToCenter:H}=Tr(t),{registerDraggle:O}=jr(t,n,f);function oe(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function ue(){const M=document.querySelectorAll(".farris-modal").length;(!M||M-1<=0)&&document.body.classList.remove("modal-open"),P.value&&P.value.classList.remove("show")}e.watch(()=>t.title,(M,re)=>{M!==re&&(E.value=M)}),e.watch(()=>t.modelValue,(M,re)=>{M!==re&&(i.value=M,i.value&&t.draggable&&e.nextTick(()=>{x.value&&!C.value&&(C.value=x.value.parentElement,te.value=C.value,O($.value,x.value,te.value),H())}),M||(C.value&&(C.value=null),ue())),i.value?T.value=oe():(z.value=!1,f.value=t.draggable)}),e.watch(()=>t.showHeader,(M,re)=>{M!==re&&(u.value=M)}),e.watch(()=>t.showButtons,(M,re)=>{M!==re&&(k.value=M)}),e.watch(()=>he.value,(M,re)=>{const ye=M||{},be=re||{};JSON.stringify(ye)!==JSON.stringify(be)&&n.emit("resize",{newSize:M,oldSize:re,isMaximized:z.value})}),e.watch([()=>t.width,()=>t.height],(M,re)=>{(M[0]!==re[0]||M[1]!==re[1])&&(o.value=M[0]||500,r.value=M[1]||600)}),e.watch(()=>t.class,(M,re)=>{s.value=M});const de=e.computed(()=>(i.value&&document.body.classList.add("modal-open"),i.value)),ee=e.computed(()=>{var ye;const M={modal:!0,"farris-modal":!0,fade:!0};M["f-modal-fitContent"]=!!l.value,M.show=!!de.value;const re=(ye=t.maskClass)==null?void 0:ye.split(" ");return re==null||re.reduce((be,Ie)=>(be[Ie]=!0,be),M),M}),fe=e.computed(()=>{var ye;const M={"modal-dialog":!0},re=(ye=s.value)==null?void 0:ye.split(" ");return re==null||re.reduce((be,Ie)=>(be[Ie]=!0,be),M),M}),pe=()=>ce.isMobilePhone()&&!t.isMessager,ne=e.computed(()=>{const M=document.documentElement.clientWidth,re=document.documentElement.clientHeight,ye=Math.min(o.value,M),be=l.value?"auto":`${Math.min(r.value,re-10)}px`,Ie={position:"absolute",top:`${(window.innerHeight-parseInt(be==="auto"?"0":be))/2}px`,left:`${(window.innerWidth-ye)/2}px`,width:`${ye}px`,height:be};return pe()&&(Ie.top="0px",Ie.left="0px",Ie.width=`${window.innerWidth}px`,Ie.height=`${window.innerHeight}px`),t.mask||(Ie.pointerEvents="auto"),Ie}),U=e.ref(ce.getMaxZIndex()||1050),ie=e.computed(()=>{const M={display:"block",overflow:"hidden"};return t.mask||(M.pointerEvents="none",M.backgroundColor="transparent"),T.value&&(M.backgroundColor="transparent"),M.zIndex=U.value,M}),y=e.computed(()=>({"modal-content":!0,"modal-content-has-header":u.value,"is-mobile":pe()})),I=e.computed(()=>{const M={display:u.value?"":"none"};return M["pointer-events"]=f.value?"auto":"none",M}),B=e.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:z.value})),Q=e.computed(()=>({"modal-body":!0,"f-utils-flex-column":m.value==="iframe","f-utils-fill":!0}));function ge(){return{height:`${t.footerHeight||60}px`}}const ve=e.computed(()=>{const M={textAlgin:h.value},re=ge();return Object.assign(M,re)});function me(M){if(M==null||M.stopPropagation(),z.value){z.value=!1,W();return}J(),z.value=!0}async function Ee(M,re){M.handle&&await M.handle(re,M)&&n.emit("closed",re)}function xe(M){M.width&&(o.value=M.width),M.height&&(r.value=M.height),M.buttons&&(F.value=M.buttons),M.title&&(E.value=M.title)}let qe=null,$e=null;e.onBeforeMount(()=>{T.value=oe()}),e.onMounted(()=>{x.value&&!C.value&&(C.value=x.value.parentElement,te.value=C.value,O($.value,x.value,te.value)),de.value&&document.body.classList.add("modal-open"),qe=Sr(t,n),$e=Ir(t,n)}),e.onUnmounted(()=>{S&&S(),qe&&qe.remove(),$e&&$e.remove()}),n.expose({modalElementRef:x,updateModalOptions:xe,close:v,maxDialog:me,isMaximized:z});function Ge(){return e.createVNode("ul",null,[p.value&&e.createVNode("li",{class:"f-btn-icon f-bare"},[e.createVNode("span",{class:"f-icon modal_minimize"},null)]),d.value&&e.createVNode("li",{onClick:me,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[e.createVNode("span",{class:B.value},null)]),g.value&&e.createVNode("li",{class:"f-btn-icon f-bare",onClick:M=>v(M,!1),style:"pointer-events: auto;"},[e.createVNode("span",{class:"f-icon modal_close"},null)])])}function st(){return e.createVNode("div",{class:"modal-footer",style:ve.value},[F.value&&F.value.map(M=>{const re=e.ref(M.disabled);return e.createVNode("button",{name:M.name,type:"button",disabled:re.value,class:M.class+(M.iconClass?" btn-icontext":""),onClick:ye=>{Ee(M,ye)}},[!!M.iconClass&&e.createVNode("i",{class:M.iconClass},null),M.text])})])}function Je(){return e.createVNode("div",{ref:$,class:"modal-header",style:I.value},[n.slots.headerTemplate?n.slots.headerTemplate():e.createVNode("div",{class:"modal-title"},[V.value&&e.createVNode("span",{class:c.value,style:"margin-right: 8px"},null),e.createVNode("span",{class:"modal-title-label"},[E.value])]),e.createVNode("div",{class:"actions"},[Ge()])])}function Ae(){return n.slots.footerTemplate?n.slots.footerTemplate():R.value&&st()}function Ye(M){if(M.stopPropagation(),t.allowClickMaskToClose){if(M.target!==P.value)return;v(M,!1)}}function tt(){var M,re;return e.createVNode("div",{id:a.value,class:fe.value,style:ne.value,ref:x},[e.createVNode("div",{class:y.value},[u.value&&Je(),e.createVNode("div",{class:Q.value},[(re=(M=n.slots).default)==null?void 0:re.call(M),m.value==="iframe"&&e.createVNode("iframe",{title:a.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:b.value},null)]),Ae()]),!l.value&&x.value&&!z.value&&G(x.value)])}function nt(M){return M||"body"}return e.watchEffect(()=>{de.value&&(U.value=ce.getMaxZIndex()||1050)}),()=>e.createVNode(e.Teleport,{to:nt(t.host)},{default:()=>[de.value&&e.createVNode(e.Transition,{name:"fade",appear:!0},{default:()=>[e.createVNode("div",{ref:P,class:ee.value,style:ie.value,onClick:Ye},[tt()])]})]})}});function Jt(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function Nr(t){const n=document.createElement("div");n.style.display="contents";const o=e.createApp({setup(r,i){e.onUnmounted(()=>{document.body.removeChild(n)});const a=e.ref(),s=e.ref(t.class||""),l=e.ref(!!t.showButtons),u=e.ref(!!t.showHeader),c=e.ref(t.showCloseButton==null?!0:t.showCloseButton),g=e.ref(!0),d=e.ref(t.title||""),p=t.acceptCallback||(()=>{}),m=t.rejectCallback||(()=>{}),b=t.closedCallback||(P=>{}),h=t.resizeHandle||(P=>{}),k=t.stopMoveHandle||(P=>{}),E=Jt(t),C=P=>{g.value=!1,o.unmount(),b(P)};return e.onMounted(()=>{}),i.expose({modalRef:a}),()=>e.createVNode(rt,{ref:a,class:s.value,modelValue:g.value,"onUpdate:modelValue":P=>g.value=P,title:d.value,width:t.width,height:t.height,buttons:t.buttons,"show-header":u.value,"show-buttons":l.value,"show-close-button":c.value,"show-max-button":!1,onAccept:p,onCancel:m,fitContent:t.fitContent==null?!0:t.fitContent,onClosed:C,onResize:h,onStopMove:k},{default:()=>[E&&E(o)]})}});return document.body.appendChild(n),o.use(He.LocaleService.i18n),o.mount(n),o}class Fr{constructor(n){Re(this,"appContext",null);Re(this,"modalRef",e.ref());Re(this,"activeModalIndex",e.ref(0));Re(this,"modalRefs",{});Re(this,"isUseEscCloseModal",e.ref(!1));Re(this,"activeModalInstance",e.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=n,this.appContext=n?n._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(n,o){const{width:r,height:i}={width:window.innerWidth,height:window.innerHeight};return r<n&&(n=r-14),i<o&&(o=i-14),{width:n,height:o}}static show(n){const o=Object.assign({title:"",showButtons:!0,showHeader:!0},n);return Nr(o)}close(n){var o,r;n?(r=n.value)==null||r.close():(o=this.getCurrentModal())==null||o.close()}open(n){const o=document.createDocumentFragment();n.showMaxButton&&n.fitContent&&(n.showMaxButton=!1);const r=e.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},n)),i=e.ref(!0),a=r.value.acceptCallback||(()=>{}),s=r.value.rejectCallback||(()=>{}),l=r.value.closedCallback||((v,j)=>{}),u=r.value.resizeHandle||(v=>{}),c=n.stopMoveHandle||(v=>{});let g;const d=Jt(r.value),p=v=>{var F;i.value=!1;const j=(F=v==null?void 0:v.target)==null?void 0:F.classList.contains("modal_close");l(v,this.isUseEscCloseModal.value?"esc":j?"icon":"button")},m=v=>{p(v),g&&e.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],e.render(null,o),g=null,this.modalRef.value=null,this.modalRefs){const j=Object.keys(this.modalRefs).map(F=>Number(F));j.length>0?this.activeModalIndex.value=Math.max(...j):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},b=v=>{var j;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((j=this.activeModalInstance.value)==null||j.close(v==null?void 0:v.event))},{width:h,height:k}=r.value,E=this.adaptToWindow(h||500,k||320);Object.assign(r.value,E);const C=()=>e.createVNode(rt,e.mergeProps({ref:this.modalRef,modelValue:i.value,"onUpdate:modelValue":v=>i.value=v},r.value,{isMessager:r.value.class&&r.value.class.indexOf("modal-message")>-1,onAccept:a,onCancel:s,onClosed:m,onResize:u,onEsc:b,onStopMove:c}),{default:()=>[d&&d(this.app)]});return g=(v=>{const j=e.h(C,v);return j.appContext=this.appContext,e.render(j,o),j})({...r.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:v=>{r.value={...r.value,...v},g&&e.render(e.cloneVNode(g,{...r}),o)},destroy:m,modalRef:this.activeModalInstance,close:()=>this.close()}}}const Pr=Symbol("FModalService");rt.install=t=>{t.component(rt.name,rt);const n=new Fr(t);t.provide(Pr,n),t.provide("FModalService",n)},e.ref(0);class Vr extends Ot.BaseControlProperty{constructor(n,o){super(n,o)}getPropertyConfig(n){return this.getBasicPropConfig(n),this.getAppearanceProperties(n),this.getBehaviorProperties(n),this.getToolbarProperties(n),this.propertyConfig}getBehaviorProperties(n){const o=this.getPropertyEditorParams(n,[],"show",{},{},"visible"),r=this.getPropertyEditorParams(n,[],"disabled"),i=this;this.propertyConfig.categories.behavior={description:"",title:"行为",properties:{show:{description:"是否可见",type:"boolean",title:"是否可见",editor:o},disabled:{description:"是否禁用",type:"boolean",title:"是否禁用",editor:r},removeable:{description:"是否可移除",type:"boolean",title:"是否可移除"},titleHtml:{title:"标签页模板",type:"string",description:"设置标签页HTML模板",refreshPanelAfterChanged:!0,editor:{type:"code-editor",language:"html"}}},setPropertyRelates(a,s){if(a)switch(a.propertyID){case"disabled":case"show":i.afterMutilEditorChanged(n,a);break}}}}getBasicPropConfig(n){this.propertyConfig.categories.basic={description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标签页项的标识",title:"标识",type:"string",readonly:!0},title:{description:"标签页项的标题",title:"标题",type:"string"}},setPropertyRelates(o,r){if(o)switch(o&&o.propertyID){case"title":{o.needRefreshControlTree=!0;break}}}}}getAppearanceProperties(n){this.propertyConfig.categories.appearance={title:"外观",description:"",properties:{customTitleClass:{title:"标题class",type:"string",description:"为标签页的标题指定class样式名"},tabWidth:{description:"为标签页的标题指定宽度",type:"number",title:"标签页的标题宽度(px)",editor:{nullable:!0,min:0,decimals:0,needValid:!0}}}}}getToolbarProperties(n){this.propertyConfig.categories.toolbar={title:"工具栏",description:"",properties:{toolbarPosition:{title:"工具栏位置",type:"string",description:"为工具栏指定位置",editor:{type:"combo-list",data:[{id:"inHead",name:"标题区域"},{id:"inContent",name:"内容区域"}]}}}}}}class Mr extends Ot.BaseControlProperty{constructor(n,o){super(n,o)}getPropertyConfig(n){return this.propertyConfig.categories.basic=this.getBasicPropConfig(n),this.propertyConfig.categories.appearance=this.getAppearanceProperties(n),this.propertyConfig.categories.behavior=this.getBehaviorProperties(n),this.getEventPropConfig(n),this.propertyConfig}getAppearanceProperties(n){return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:""},titleWidth:{description:"标题区域宽度占标签头部区域的横向比例",type:"number",title:"标题区域宽度(%)",editor:{min:0,decimals:0,max:100,nullable:!0,needValid:!0}},autoTitleWidth:{description:"是,则标题显示全部字符;否,则标题最多显示20个字符",type:"boolean",title:"标题自适应宽度"},fill:{description:"flex布局下,是否填充满剩余部分",type:"boolean",title:"填充"}}}}getBehaviorProperties(n){const o=this.getCurrentTabPages(n);n.activeId&&typeof n.activeId=="string"&&(o.find(s=>s.id===n.activeId)||(n.activeId=""));const r=this.getPropertyEditorParams(n,["Const","Variable"],"activeId",{constType:"enum",constEnums:o},{newVariablePrefix:"",newVariableType:"String"}),i=this;return{description:"",title:"行为",properties:{activeId:{title:"默认选中标签页",type:"string",description:"默认选中标签页",defaultValue:o.length>0?o[0].id:"",editor:r}},setPropertyRelates(a,s){if(a)switch(a.propertyID){case"activeId":i.addNewVariableToViewModel(a,i.viewModelId);break}}}}getCurrentTabPages(n){const o=n.contents||[],r=[];return o.forEach(i=>{r.push({name:i.title,id:i.id})}),r}getEventPropConfig(n){const o=[{label:"onTabChange",name:"切换标签页事件"},{label:"onTabRemove",name:"移除标签页事件"}],r=this,i=r.eventsEditorUtils.formProperties(n,r.viewModelId,o),a=r.createBaseEventProperty(i);this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:a,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(s,l){const u=s.propertyValue;delete n[r.viewModelId],u&&(u.setPropertyRelates=this.setPropertyRelates,r.eventsEditorUtils.saveRelatedParameters(n,r.viewModelId,u.events,u))}}}}function Br(t,n){const o=t.schema,r=new Me.UseTemplateDragAndDropRules,{canMove:i,canAccept:a,canDelete:s}=r.getTemplateRule(t,n);function l(h){return h.componentType==="list-view"?!0:a}function u(){return s}function c(){return i}function g(){return!i&&!s}function d(h){var T;let k=document.querySelector(".dgComponentFocused");k||(k=t.designerItemElementRef.value.querySelector(".farris-nav-tabs .f-state-active"));const E=(k==null?void 0:k.id)||(k==null?void 0:k.getAttribute("pageid"))||"";if(E===`${o.id}-design-item`)return new Mr(h,n).getPropertyConfig(o);const C=new Vr(h,n),P=(T=o.contents)==null?void 0:T.find(v=>E===`${v.id}-design-item`);return C.getPropertyConfig(P||o)}function p(){t.designerItemElementRef.value&&e.nextTick(()=>{const h=t.designerItemElementRef.value.querySelector(".dgComponentSelected");h!=null&&h.className.includes("dgComponentSelected")&&h.click()})}function m(h){if(!h)return;const{changeObject:k}=h;k&&k.propertyID==="title"&&p()}function b(){var h;if(t&&n){const{formSchemaUtils:k}=n,E=xr.tabs.name;k.getControlBasicInfoMap().set(t.schema.id,{componentTitle:E,parentPathName:E});const C=t.designerItemElementRef.value.querySelector(".farris-tabs-content");(h=t.schema.contents)==null||h.forEach(P=>{const T=C==null?void 0:C.querySelector(`#${P.id}-design-item`);T&&T.componentInstance&&T.componentInstance.value.setComponentBasicInfoMap()})}}return{canAccepts:l,checkCanDeleteComponent:u,checkCanMoveComponent:c,getPropsConfig:d,hideNestedPaddingInDesginerView:g,onPropertyChanged:m,setComponentBasicInfoMap:b}}function kr(t,n,o,r,i,a){const s=e.ref([]),l=e.ref(t.activeId||""),u=e.ref(!0),c=e.ref(),g=e.ref([]),d=e.ref(!0),p=e.ref(0),m=e.computed(()=>{const y=s.value.find(B=>B.props.id===l.value);return(y==null?void 0:y.props.toolbarPosition)==="inHead"});let b;function h(y){b=y}function k(y,I=!0){const B=y.value&&y.value.length>0?0:-1;if(g.value=[],B!==-1&&(!l.value||typeof l.value=="object")){if(l.value=y.value[B].props.id,!I)return;const Q=y.value[B];Q&&Q.props.toolbar&&Q.props.toolbar.buttons&&Q.props.toolbar.buttons.length&&(g.value=[...Q.props.toolbar.buttons])}}function E(){const y=s.value.find(Q=>Q.props.id===l.value);if(g.value=[],y&&y.props.toolbar){const Q=Object.prototype.hasOwnProperty.call(y.props.toolbar,"contents")?"contents":"buttons";y.props.toolbar[Q]&&y.props.toolbar[Q].length&&(g.value=[...y.props.toolbar[Q]])}const I=r.schema.contents,B=I==null?void 0:I.find(Q=>Q.id===l.value);B!=null&&B.toolbar&&!B.toolbar.type&&(B.toolbar.type="tab-toolbar"),c.value=B==null?void 0:B.toolbar}function C(y){const I=l.value;i.changeSelectedId(""),l.value=y,E(),n.emit("tabChange",{prevId:I,nextId:y})}function P(y){let I=-1;!l.value&&(I=y.value.findIndex(B=>l.value===B.props.id),I>-1)||(k(y,!1),C(l.value))}function T(y){let I=!1;I=!s.value.find(Q=>Q.props.id===y),I?(l.value="",P(s)):(l.value=y,C(l.value))}function v(y,I){y.classList.contains(I)||y.classList.add(I)}function j(y,I){y.classList.remove(I)}function F(y){const{parentElement:I}=y;I&&(y.scrollWidth>I.offsetWidth?v(y,"farris-title-text-custom"):j(y,"farris-title-text-custom"))}e.watch(()=>t.activeId,(y,I)=>{y!==I&&T(y)});function V(y){var B;if(t.autoTitleWidth)return;const I=(B=y.value)==null?void 0:B.querySelectorAll(".st-tab-text");I&&I.forEach(Q=>F(Q))}const R=y=>{y.preventDefault(),y.stopPropagation()};function $(y){s.value=s.value.filter(I=>I.props.id!==y),l.value===y&&(l.value="",k(s))}function x(y,I,B=!1){const Q=s.value.findIndex(ge=>ge.props.id===I);$(I),R(y),e.nextTick(()=>{p.value++,V(o),B&&(u.value=!0),n.emit("tabRemove",{removeIndex:Q,removeId:I,activeId:l.value})})}function z(y,I=!0){l.value===y&&(l.value="",k(s)),e.nextTick(()=>{p.value++,I&&(u.value=!0)})}function G(y){C(y)}function J(y){s.value.findIndex(B=>B.props.id===y.props.id)===-1&&s.value.push(y),p.value++}function W(y){s.value.findIndex(B=>B.props.id===y.props.id)!==-1&&(s.value.forEach(B=>{B.props.id===y.props.id&&(B=y)}),y.props.id===l.value&&m.value,e.nextTick(()=>{p.value++,V(o)}))}function te(y){y&&(y.stopPropagation(),y.preventDefault())}function he(y){var Q;const I=r.designerItemElementRef.value.querySelector(".farris-tabs-content"),B=I==null?void 0:I.querySelector(`#${y}-design-item`);(Q=B==null?void 0:B.componentInstance)!=null&&Q.value.onRemoveComponent&&B.componentInstance.value.onRemoveComponent(a)}function f(y){var ve,me;const I=a.formSchemaUtils.getExpressions();if(!I||!I.length)return;const B=r.schema.contents,Q=B==null?void 0:B.find(Ee=>Ee.id===y);if(!Q||!((me=(ve=Q.toolbar)==null?void 0:ve.buttons)!=null&&me.length))return;const ge=Ee=>{Ee.forEach(xe=>{const qe=I.findIndex($e=>$e.target===xe.id);qe>-1&&I.splice(qe,1),xe.children&&xe.children.length&&ge(xe.children)})};ge(Q.toolbar.buttons)}function S(y,I){var ge,ve;te(y);const B=r.schema.contents,Q=B==null?void 0:B.findIndex(me=>me.id===I);!B||Q===-1||Q===void 0||(ge=a==null?void 0:a.designerContext)!=null&&ge.checkCanDeleteControl&&!a.designerContext.checkCanDeleteControl(B[Q])||(f(I),he(I),B==null||B.splice(Q,1),$(I),E(),(ve=r==null?void 0:r.setupContext)==null||ve.emit("selectionChange"),Me.canvasChanged.value++)}function H(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(I=>I.classList.remove("dgComponentFocused"));const y=document.getElementsByClassName("dgComponentSelected");Array.from(y).forEach(I=>I.classList.remove("dgComponentSelected"))}function O(y){y.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function oe(y,I){var ve;const{contents:B=[]}=r.schema,Q=B==null?void 0:B.findIndex(me=>me.id===y),ge=B[Q];(ve=r==null?void 0:r.setupContext)==null||ve.emit("selectionChange",ge.type,ge,t.componentId,I)}function ue(y,I){const B=I.getBoundingClientRect(),Q=y.getBoundingClientRect(),ge=Q.left+Q.width<=B.left+B.width,ve=Q.left+Q.width>=B.left;return ge&&ve}function de(y,I){if(y||(y=b.value.querySelector(".farris-tabs-header").querySelector(".dgComponentSelected")),I||(I=b.value.querySelector(".farris-nav-tabs")),y&&I){const B=y.querySelector(".component-btn-group");ue(y,I)?Me.setPositionForSelectedElement(y):B&&(B.style.display="none")}}function ee(){o&&o.value&&o.value.addEventListener("scroll",y=>{const I=y.target.querySelector(".dgComponentSelected");de(I,y.target)})}function fe(y){if(y&&y.parentElement){let I=y.getBoundingClientRect(),B=y.parentElement.getBoundingClientRect();(I.left<B.left||I.right>B.right)&&(o.value.scrollLeft=0,I=y.getBoundingClientRect(),B=y.parentElement.getBoundingClientRect(),o.value.scrollLeft=I.left-B.left),Me.setPositionOfButtonGroup(y)}}function pe(y,I,B){var ve,me,Ee;H(),te(y),O(y),oe(I,B);const Q=y.currentTarget;fe(Q);const ge=(me=(ve=B.schema)==null?void 0:ve.contents)==null?void 0:me.find(xe=>xe.id===I);if(ge&&(!ge.toolbar||((Ee=ge.toolbar.buttons)==null?void 0:Ee.length)===0)){const xe=y.currentTarget;e.nextTick(()=>{H(),xe==null||xe.classList.add("dgComponentFocused","dgComponentSelected"),fe(xe)})}}function ne(y){var Q;const I=r.designerItemElementRef.value.querySelector(".farris-tabs-content"),B=I==null?void 0:I.querySelector(`#${y}-design-item`);(Q=B==null?void 0:B.componentInstance)!=null&&Q.value.onRemoveComponent&&B.componentInstance.value.setComponentBasicInfoMap()}function U(y,I){te(y);const B=r.schema.contents,Q=B==null?void 0:B.find(ve=>ve.id===I);if(!Q)return;(!Q.toolbar||!Q.toolbar.buttons)&&(Q.toolbar={id:`${Q.id}_toolbar`,buttons:[]}),Q.toolbar.id||(Q.toolbar.id=`${Q.id}_toolbar`);const ge=qt("tab-toolbar-item");ge.id=`tab_toolbar_item_${Math.random().toString().slice(2,6)}`,Q.toolbar.buttons.push(ge),g.value=[...Q.toolbar.buttons],c.value=Q.toolbar,ne(Q.id),e.nextTick(()=>{if(o&&o.value){const ve=o.value.querySelector(".f-state-active");ve&&fe(ve)}})}function ie(y){}return{activeId:l,addTab:J,changeTitleStyle:V,removeTab:x,selectTab:G,tabPages:s,updateTab:W,toolbarItems:g,removeDesignTab:S,selectDesignTab:pe,toolbarSchema:c,changeToolbarItems:E,addTabPageToolbar:U,listenTabNavElementScroll:ee,setHorizontalScrollbarPosition:fe,needUpdateNavigationLayout:p,checkActiveIdAndSelect:T,toggleShowTab:z,hasInHeadClass:m,emitSelectionChange:oe,resetPositionForSelectedElement:de,setTabsRef:h,setScrollToSelectedTabFunction:ie,toolbarVisible:d,updateComponentBasicInfoMap:ne}}function Or(t,n,o,r,i){var p;const{toolbarItems:a,toolbarSchema:s,changeToolbarItems:l,hasInHeadClass:u}=t,c=s.value.id||`${((p=r==null?void 0:r.schema)==null?void 0:p.id)||""}-toolbar`;function g(m,b,h,k){var E;(E=r.setupContext)==null||E.emit("selectionChange",m,b,h,k)}function d(){l()}return e.createVNode("div",{class:"farris-tabs-toolbar",style:"overflow:unset;"},[e.createVNode("div",{class:"farris-tabs-inline-flex w-100",style:"flex:1"},[e.createVNode(Me.FDesignerInnerItem,{modelValue:s.value,"onUpdate:modelValue":m=>s.value=m,class:"w-100 position-relative",key:c,canAdd:!1,childType:"tab-toolbar-item",childLabel:"按钮",contentKey:"buttons",id:c,onSelectionChange:g,componentId:i,onAddComponent:d},{default:()=>[e.createVNode(dt,{alignment:u.value?"right":"left",items:a.value,componentId:i},null)]})])])}function Er(t,n){let o;function r(l){var g;const c=Array.from(l.children).find(d=>d.className.includes("add-nav-item"));c&&!((g=c.className)!=null&&g.includes("d-none"))&&(c.className+=" d-none")}function i(l){var g;const c=Array.from(l.children).find(d=>d.className.includes("add-nav-item"));c&&((g=c.className)!=null&&g.includes(" d-none"))&&(c.className=c.className.replace(" d-none",""))}function a(l,u,c){i(u);const g=t.schema;if(!(g!=null&&g.contents))return;let d;if(c){const h=c.getAttribute("pageId");d=Array.from(u.children).findIndex(k=>k.getAttribute("pageId")===h)}else d=Array.from(u.children).length;const p=l.getAttribute("pageId"),m=Array.from(u.children).findIndex(h=>h.getAttribute("pageId")===p),b=g.contents[m];if(m!==d&&m>-1&&d>-1){if(m<d&&(d=d-1),g.contents.splice(m,1),g.contents.splice(d,0,b),n.value){const h=n.value[m];n.value.splice(m,1),n.value.splice(d,0,h)}e.nextTick(()=>{l.className.includes("dgComponentSelected")&&(l.classList.remove("dgComponentSelected"),l.classList.remove("dgComponentFocused"),l.click()),Me.canvasChanged.value++})}}function s(l,u){o&&o.destroy(),!(!Ht||!l||!u)&&(o=Ht([l],{mirrorContainer:u,direction:"horizontal",moves(c){return!c.classList.contains("no-drag")},getMirrorText(c){return c.innerText},accepts(c,g,d,p){return r(g),p&&p.className.includes("nav-item")}}).on("drop",(c,g,d,p)=>a(c,g,p)))}return{dragulaInstance:o,initHeaderDragula:s}}const it=e.defineComponent({name:"FTabsDesign",props:Dt,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(),r=e.inject("designer-host-service"),i=e.inject("design-item-context"),a=Br(i,r),s=Me.useDesignerComponent(o,i,a),l=e.ref(t.tabType),u=e.shallowRef(),c=e.shallowRef(),g={updateToolbarItems:function(){},changeSelectedId:y=>{}},d=kr(t,n,u,i,g,r),{activeId:p,changeTitleStyle:m,tabPages:b,addTab:h,updateTab:k,toolbarItems:E,setTabsRef:C,checkActiveIdAndSelect:P,listenTabNavElementScroll:T,toolbarSchema:v,toggleShowTab:j,hasInHeadClass:F,updateComponentBasicInfoMap:V}=d;C(o);const R=Go(t,c,d),$=Uo(t,u,R,d),{updateNavigationLayout:x}=$,z=Wo(t,d),{hideDropDown:G}=z,J=zo(t,u,$,R,d,s),W=J,te=_o(t,u,$,R,d),he=new Map([["default",J],["one-page",W],["pills",te]]);e.computed(()=>{const y=b.value.find(I=>I.props.id===p.value);return y==null?void 0:y.slots});function f(){const y=s.value.schema.contents||[];return y.length<1?null:y.find(B=>B.id===p.value)}g.updateToolbarItems=function(){var I,B;const y=f();(I=y==null?void 0:y.toolbar)!=null&&I.buttons?E.value=[...(B=y==null?void 0:y.toolbar)==null?void 0:B.buttons]:E.value=[],v.value=y==null?void 0:y.toolbar,y!=null&&y.id&&V(y.id)};const S=e.ref(!0);e.provide("tabs",{activeId:p,addTab:h,updateTab:k,tabPages:b,tabType:l,toggleShowTab:j,toolbarVisible:S}),e.provide("toolbar-item-handler",g);const H=e.computed(()=>t.fill),O=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":F.value,"farris-tabs-inContent":!F.value,"farris-tabs-nav-fill":t.tabType==="fill","farris-tabs-nav-pills":t.tabType==="pills"})),oe=e.computed(()=>{const y={width:F.value&&t.titleWidth?`${t.titleWidth}%`:""};return y.width&&(y.flex="unset"),y}),ue=e.computed(()=>({"farris-tabs":!0,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page","f-tabs-content-fill":H.value})),{initHeaderDragula:de,dragulaInstance:ee}=Er(i,b);e.onMounted(()=>{b.value.length&&P(t.activeId||b.value[0].props.id),e.nextTick(()=>{x()}),m(u),window.addEventListener("click",y=>{var I;G.value||(I=o.value)!=null&&I.contains(y.target)||(G.value=!0)}),window.addEventListener("resize",()=>{x()}),T(),o.value.componentInstance=s,t.tabType==="default"&&de(u.value,u.value)}),e.onUnmounted(()=>{ee&&ee.destroy&&ee.destroy()});function fe(){return!!E.value.length&&Or(d,s,a,i,t.componentId)}const pe=he.get(t.tabType)||he.get("default");function ne(){var y,I,B,Q;return e.createVNode("div",{class:O.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(I=(y=n.slots).headerPrefix)==null?void 0:I.call(y)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:oe.value},[pe&&pe()]),fe(),e.createVNode("div",{class:"farris-tabs-header-post"},[(Q=(B=n.slots).headerSuffix)==null?void 0:Q.call(B)])])}const U=e.computed(()=>({"farris-tabs-content":!0,"f-utils-fill-flex-column":H.value}));function ie(){var y,I,B,Q;return e.createVNode("div",{class:U.value,ref:c},[(I=(y=i==null?void 0:i.schema)==null?void 0:y.contents)!=null&&I.length?(Q=(B=n.slots).default)==null?void 0:Q.call(B):""])}return n.expose(s.value),s.value.updateToolbarItems=g.updateToolbarItems,()=>e.createVNode("div",{class:ue.value,ref:o},[ne(),ie()])}});function $r(t,n,o){return n&&n.contents&&n.contents.length&&(n.contents.forEach(r=>{r.title&&(r.text=r.title)}),n.buttons=n.contents,delete n.contents),n&&Object.prototype.hasOwnProperty.call(n,"visible")?{toolbar:n,toolbarVisible:n.visible}:{toolbar:n}}const Qt=new Map([["appearance",Ce.resolveAppearance],["toolbar",$r]]),Zt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-page.schema.json",title:"tab-page",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a tab-page Item",type:"string"},type:{description:"The type string of tab-page Item component",type:"string",default:"tab-page"},contents:{description:"",type:"array",default:[]},title:{description:"",type:"string",default:"标题"},disabled:{description:"",type:"boolean",default:!1},removeable:{description:"",type:"boolean",default:!1},show:{description:"",type:"boolean",default:!0},toolbar:{description:"",type:"object"},tabWidth:{description:"",type:"number"},toolbarPosition:{description:"",type:"string",default:"inHead"},customTitleClass:{description:"",type:"string",default:""},onTabChange:{description:"",type:"string",default:"切换标签页事件"},onTabRemove:{description:"",type:"string",default:"移除标签页事件"},titleHtml:{description:"",type:"string",default:""},titleRenderFunction:{description:"",type:"function",default:null}},required:["id","type","contents"]},Kt=Ce.createPropsResolver(De.tabPageProps,Zt,Qt),en=Object.assign({},De.tabPageProps,{titleHtml:{type:String,default:""}});Ce.createPropsResolver(en,Zt,Qt);function Rr(t,n){const o=new Me.UseTemplateDragAndDropRules,{canAccept:r}=o.getTemplateRule(t,n);function i(u){if(!Me.useDragulaCommonRule().basalDragulaRuleForContainer(u,n))return!1;const{schema:g}=t;return g.contents&&g.contents.length>0?!1:r}function a(u){return null}function s(){const{schema:u,parent:c}=t;c!=null&&c.schema.activeId&&u.id===c.schema.activeId&&(c.schema.activeId="")}function l(){var u,c;if(t&&n){const{formSchemaUtils:g}=n,d=g.getControlBasicInfoMap(),{schema:p}=t;d.set(p.id,{componentTitle:p.title,parentPathName:p.title}),(c=(u=p.toolbar)==null?void 0:u.buttons)!=null&&c.length&&p.toolbar.buttons.map(m=>{var b;d.set(m.id,{componentTitle:m.text,parentPathName:`${p.title} > ${m.text}`}),(b=m.children)!=null&&b.length&&m.children.map(h=>{d.set(h.id,{componentTitle:h.text,parentPathName:`${p.title} > ${h.text}`})})})}}return{canAccepts:i,getDraggableDesignItemElement:a,onRemoveComponent:s,setComponentBasicInfoMap:l}}function Dr(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const qr=e.defineComponent({name:"FTabPageDesign",props:en,emits:[],setup(t,n){const o=e.ref(),r=e.inject("design-item-context"),i=e.inject("designer-host-service"),a=Rr(r,i),s=Me.useDesignerComponent(o,r,a);s.value.canNested=!1,s.value.canDelete=!1,s.value.canMove=!1,n.expose(s.value);const l=e.inject("tabs"),u=e.ref(!0),c={slots:n.slots,props:t},g=e.ref((l==null?void 0:l.tabType.value)||"default");e.onMounted(()=>{o.value.componentInstance=s;const C=l.tabPages.value.findIndex(P=>P.props.id===t.id);!C||C===-1?l==null||l.addTab(c):C>-1&&(u.value=!1,console.warn(`已经存在id为${t.id}的页签啦`))}),e.onUnmounted(()=>{});const d=e.computed(()=>(t==null?void 0:t.id)===(l==null?void 0:l.activeId.value)),p=e.computed(()=>({display:d.value?"":"none"}));e.watch(()=>t,C=>{l==null||l.updateTab({props:C,slots:n.slots})},{immediate:!0,deep:!0});function m(){var P,T;const C=(T=(P=n.slots).default)==null?void 0:T.call(P);return e.createVNode(Mo,{"main-title":t.title,class:"farris-tab-page"},Dr(C)?C:{default:()=>[C]})}const b=e.computed(()=>({"farris-tab-page":!0,"drag-container":!0,"f-tab-active":d.value}));function h(){var P,T;const C=(T=(P=n.slots).default)==null?void 0:T.call(P);return e.createVNode("div",{ref:o,id:t.id,class:b.value,"data-dragref":`${r.schema.id}-container`,style:p.value},[C])}const E=new Map([["default",h],["one-page",m]]).get(g.value)||h;return()=>u.value?E():null}}),tn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar-item.schema.json",title:"tab-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"tab-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"}},default:{}},text:{description:"按钮",type:"string",default:"按钮"},icon:{description:"图标",type:"string",default:""},disabled:{description:"禁用",type:"boolean",default:!1},visible:{description:"是否可见",type:"boolean",default:!0},onClick:{description:"点击事件",type:"string",default:""},tipsEnable:{description:"",type:"boolean",default:!1},tipsText:{description:"",type:"string",default:""},dropdownClass:{description:"处于下拉菜单时的样式",type:"string",default:""},split:{description:"",type:"boolean",default:!1}},required:["id","type","text"],events:{onClick:"点击事件"}},nn={id:{type:String,default:""},items:{type:Object,default:{}},class:{type:String,default:""},text:{type:String,default:""},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},componentId:{type:String,default:""},expanded:{type:Boolean,default:!1},alignment:{Type:String,default:"right"},split:{type:Boolean,default:!1},isDP:{type:Boolean,default:!1},isDPItem:{type:Boolean,default:!1}},Lr=Ce.createPropsResolver(nn,tn,ot,$t);Ce.getPropsResolverGenerator(nn,tn,ot,$t),it.register=(t,n,o,r)=>{t.tabs=De,t["tab-page"]=De.FTabPage,n.tabs=Eo,n["tab-page"]=Kt,r.tabs={eventHandlerResolver:Ro}},it.registerDesigner=(t,n,o)=>{t.tabs=it,t["tab-page"]=qr,n.tabs=$o,n["tab-page"]=Kt,n["tab-toolbar-item"]=Lr,t["tab-toolbar"]=dt,n["tab-toolbar"]=Do};const Hr=ce.withInstall(it);N.FTabsDesign=it,N.default=Hr,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});