@ibiz-template/vue3-components 0.7.41-alpha.23 → 0.7.41-alpha.24

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 (146) hide show
  1. package/dist/index-YM3srtwD.js +11 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{wang-editor-g7C0GfoE.js → wang-editor-I3j_b1zm.js} +1 -1
  5. package/dist/{xlsx-util-l4u_wJSg.js → xlsx-util-K2jHv3GW.js} +1 -1
  6. package/es/common/anchor-container/anchor-bar-list/anchor-bar-list.d.ts +1 -1
  7. package/es/common/custom-theme/custom-theme.d.ts +2 -2
  8. package/es/common/data-import2-table/data-import2-table.d.ts +2 -2
  9. package/es/common/emoji-select/components/emoji-list/emoji-list.d.ts +1 -1
  10. package/es/common/extend-action-timeline/extend-action-timeline.d.ts +1 -1
  11. package/es/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.d.ts +1 -1
  12. package/es/common/fullscreen-toolbar/fullscreen-toolbar.d.ts +3 -3
  13. package/es/control/app-menu/app-menu.css +1 -1
  14. package/es/control/app-menu/app-menu.d.ts +11 -11
  15. package/es/control/app-menu/app-menu.mjs +47 -21
  16. package/es/control/app-menu/custom-menu-design/custom-menu-design.d.ts +2 -2
  17. package/es/control/app-menu/index.d.ts +11 -11
  18. package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +2 -2
  19. package/es/control/calendar/components/calendar-daily/index.d.ts +2 -2
  20. package/es/control/calendar/components/calendar-user/calendar-user.d.ts +2 -2
  21. package/es/control/calendar/components/calendar-user/index.d.ts +2 -2
  22. package/es/control/calendar/components/calendar-week/calendar-week.d.ts +2 -2
  23. package/es/control/calendar/components/calendar-week/index.d.ts +2 -2
  24. package/es/control/calendar/components/custom-calendar/custom-calendar.d.ts +1 -1
  25. package/es/control/calendar/components/custom-calendar/index.d.ts +1 -1
  26. package/es/control/caption-bar/caption-bar.d.ts +2 -68
  27. package/es/control/caption-bar/caption-bar.mjs +6 -0
  28. package/es/control/caption-bar/index.d.ts +1 -39
  29. package/es/control/chart/chart.d.ts +2 -2
  30. package/es/control/context-menu/context-menu.d.ts +2 -2
  31. package/es/control/context-menu/index.d.ts +2 -2
  32. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +5 -1
  33. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.d.ts +4 -4
  34. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.d.ts +1 -1
  35. package/es/control/data-view/data-view.d.ts +3 -3
  36. package/es/control/data-view/index.d.ts +3 -3
  37. package/es/control/drbar/drbar.controller.mjs +2 -0
  38. package/es/control/drtab/drtab-control.util.mjs +1 -1
  39. package/es/control/drtab/drtab.controller.mjs +2 -0
  40. package/es/control/drtab/flow-drtab.d.ts +1 -1
  41. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.d.ts +2 -1
  42. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +9 -2
  43. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.d.ts +1 -1
  44. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.d.ts +4 -4
  45. package/es/control/form/form-detail/form-rawitem/form-rawitem.d.ts +1 -1
  46. package/es/control/form/form-detail/form-rawitem/index.d.ts +1 -1
  47. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.d.ts +0 -1
  48. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +4 -34
  49. package/es/control/form/form-detail/form-tab-panel/index.d.ts +0 -1
  50. package/es/control/gantt/gantt.css +1 -1
  51. package/es/control/gantt/gantt.d.ts +4 -3
  52. package/es/control/gantt/gantt.mjs +8 -0
  53. package/es/control/gantt/index.d.ts +1 -0
  54. package/es/control/grid/grid/grid.d.ts +4 -4
  55. package/es/control/grid/grid/grid.mjs +11 -5
  56. package/es/control/grid/grid/index.d.ts +3 -3
  57. package/es/control/grid/row-edit-popover/use-row-edit-popover.d.ts +1 -1
  58. package/es/control/grid/virtualized-table/index.d.ts +2 -2
  59. package/es/control/grid/virtualized-table/virtualized-table.d.ts +2 -2
  60. package/es/control/kanban/index.d.ts +1 -1
  61. package/es/control/kanban/kanban.d.ts +1 -1
  62. package/es/control/kanban/swimlane-kanban/swimlane-kanban.d.ts +2 -2
  63. package/es/control/list/index.d.ts +1 -1
  64. package/es/control/list/list.d.ts +1 -1
  65. package/es/control/search-bar/filter-tree/filter-tree.d.ts +1 -1
  66. package/es/control/search-bar/index.d.ts +1 -1
  67. package/es/control/search-bar/search-bar.d.ts +1 -1
  68. package/es/control/tree/index.d.ts +3 -3
  69. package/es/control/tree/tree.d.ts +3 -3
  70. package/es/control/tree-grid/index.d.ts +1 -1
  71. package/es/control/tree-grid/tree-grid.d.ts +1 -1
  72. package/es/control/tree-grid-ex/index.d.ts +3 -3
  73. package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.css +1 -1
  74. package/es/control/tree-grid-ex/tree-grid-ex.css +1 -1
  75. package/es/control/tree-grid-ex/tree-grid-ex.d.ts +2 -2
  76. package/es/control/tree-grid-ex/tree-grid-ex.mjs +13 -7
  77. package/es/control/tree-grid-ex/use-row-edit-popover.d.ts +1 -1
  78. package/es/editor/array/ibiz-array/ibiz-array.d.ts +1 -1
  79. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.d.ts +3 -3
  80. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -1
  81. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +1 -1
  82. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +1 -1
  83. package/es/editor/code/monaco-editor/monaco-editor.d.ts +4 -4
  84. package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.d.ts +1 -1
  85. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -1
  86. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +2 -2
  87. package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +3 -3
  88. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.d.ts +3 -3
  89. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +1 -1
  90. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.d.ts +1 -1
  91. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +2 -2
  92. package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.d.ts +1 -1
  93. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.d.ts +1 -1
  94. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +1 -1
  95. package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.d.ts +1 -1
  96. package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.d.ts +1 -1
  97. package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +3 -3
  98. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +1 -1
  99. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +2 -2
  100. package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.d.ts +1 -1
  101. package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +1 -1
  102. package/es/editor/html/wang-editor/wang-editor.d.ts +4 -4
  103. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +1 -1
  104. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +1 -1
  105. package/es/editor/preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.d.ts +1 -1
  106. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +1 -1
  107. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +1 -1
  108. package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +1 -1
  109. package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +1 -1
  110. package/es/editor/span/span-link/span-link.d.ts +1 -1
  111. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +1 -1
  112. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -1
  113. package/es/editor/switch/ibiz-switch-tristate/ibiz-switch-tristate.d.ts +1 -1
  114. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -1
  115. package/es/editor/text-box/input/input.d.ts +1 -1
  116. package/es/editor/text-box/signature/signature.d.ts +1 -1
  117. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -1
  118. package/es/editor/upload/ibiz-image-cropping/ibiz-image-cropping.d.ts +1 -1
  119. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +1 -1
  120. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -1
  121. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.d.ts +1 -1
  122. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +1 -1
  123. package/es/panel-component/short-cut/index.d.ts +3 -3
  124. package/es/panel-component/short-cut/short-cut.d.ts +3 -3
  125. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  126. package/lib/control/app-menu/app-menu.cjs +47 -21
  127. package/lib/control/app-menu/app-menu.css +1 -1
  128. package/lib/control/caption-bar/caption-bar.cjs +6 -0
  129. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +5 -1
  130. package/lib/control/drbar/drbar.controller.cjs +2 -0
  131. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  132. package/lib/control/drtab/drtab.controller.cjs +2 -0
  133. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +8 -1
  134. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +3 -33
  135. package/lib/control/gantt/gantt.cjs +8 -0
  136. package/lib/control/gantt/gantt.css +1 -1
  137. package/lib/control/grid/grid/grid.cjs +11 -5
  138. package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.css +1 -1
  139. package/lib/control/tree-grid-ex/tree-grid-ex.cjs +13 -7
  140. package/lib/control/tree-grid-ex/tree-grid-ex.css +1 -1
  141. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +1 -1
  142. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  143. package/package.json +5 -5
  144. package/dist/index-5vhiqrNL.js +0 -11
  145. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.23_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  146. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.23_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -1,11 +0,0 @@
1
- System.register(["vue","@ibiz-template/vue3-util","@ibiz-template/core","@ibiz-template/runtime","qx-util","element-plus","ramda","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@wangeditor/editor","vue-router","@ibiz-template/devtool","axios","dayjs/plugin/customParseFormat","vue-i18n","@ibiz-template/model-helper"],(function(e,t){"use strict";var a,n,o,i,s,l,r,c,d,u,p,h,m,v,b,g,f,w,y,C,I,D,E,S,x,P,k,T,z,A,O,M,N,B,_,R,L,j,V,F,U,H,q,G,W,K,Y,X,$,J,Q,Z,ee,te,ae,ne,oe,ie,se,le,re,ce,de,ue,pe,he,me,ve,be,ge,fe,we,ye,Ce,Ie,De,Ee,Se,xe,Pe,ke,Te,ze,Ae,Oe,Me,Ne,Be,_e,Re,Le,je,Ve,Fe,Ue,He,qe,Ge,We,Ke,Ye,Xe,$e,Je,Qe,Ze,et,tt,at,nt,ot,it,st,lt,rt,ct,dt,ut,pt,ht,mt,vt,bt,gt,ft,wt,yt,Ct,It,Dt,Et,St,xt,Pt,kt,Tt,zt,At,Ot,Mt,Nt,Bt,_t,Rt,Lt,jt,Vt,Ft,Ut,Ht,qt,Gt,Wt,Kt,Yt,Xt,$t,Jt,Qt,Zt,ea,ta,aa,na,oa,ia,sa,la,ra,ca,da,ua,pa,ha,ma,va,ba,ga,fa,wa,ya,Ca,Ia,Da,Ea,Sa,xa,Pa,ka,Ta,za,Aa,Oa,Ma,Na,Ba,_a,Ra,La,ja,Va,Fa,Ua,Ha,qa,Ga,Wa,Ka,Ya,Xa,$a,Ja,Qa,Za,en,tn,an,nn,on,sn,ln,rn,cn,dn,un,pn,hn,mn,vn,bn,gn,fn,wn,yn,Cn,In,Dn,En,Sn,xn,Pn,kn,Tn,zn,An,On,Mn,Nn,Bn,_n,Rn,Ln,jn,Vn,Fn,Un,Hn,qn,Gn,Wn,Kn,Yn,Xn,$n,Jn,Qn,Zn,eo,to,ao,no,oo,io,so,lo,ro,co,uo,po,ho,mo,vo,bo,go,fo,wo,yo,Co,Io,Do,Eo,So,xo,Po,ko,To,zo,Ao,Oo,Mo,No,Bo,_o,Ro,Lo,jo,Vo,Fo,Uo,Ho,qo,Go,Wo,Ko,Yo,Xo,$o,Jo,Qo,Zo,ei,ti,ai,ni,oi,ii,si,li,ri,ci,di,ui,pi,hi,mi,vi,bi,gi,fi,wi,yi,Ci,Ii,Di,Ei,Si,xi,Pi,ki,Ti,zi,Ai,Oi,Mi,Ni,Bi,_i,Ri,Li,ji,Vi,Fi,Ui,Hi,qi,Gi,Wi,Ki,Yi,Xi,$i,Ji,Qi,Zi,es,ts,as,ns,os,is;return{setters:[function(e){a=e.defineComponent,n=e.ref,o=e.createVNode,i=e.resolveComponent,s=e.isVNode,l=e.computed,r=e.h,c=e.watch,d=e.onMounted,u=e.reactive,p=e.onUnmounted,h=e.createTextVNode,m=e.onBeforeUnmount,v=e.createApp,b=e.nextTick,g=e.withDirectives,f=e.vShow,w=e.mergeProps,y=e.resolveDirective,C=e.getCurrentInstance,I=e.vModelText,D=e.onActivated,E=e.onDeactivated,S=e.defineAsyncComponent,x=e.watchEffect,P=e.renderSlot,k=e.toRaw,T=e.isReactive,z=e.warn,A=e.inject,O=e.toRefs,M=e.KeepAlive,N=e.Fragment},function(e){B=e.useNamespace,_=e.usePopoverVisible,R=e.routerCallback,L=e.generateRoutePath,j=e.generateRoutePathByModal,V=e.openViewModal,F=e.openViewPopover,U=e.getDrawerPlacement,H=e.openViewDrawer,q=e.OverlayPopoverContainer,G=e.useUIStore,W=e.OverlayContainer,K=e.route2routePath,Y=e.routePath2string,X=e.IBizControlBase,$=e.IBizIcon,J=e.IBizRouterView,Q=e.IBizViewShell,Z=e.IBizControlShell,ee=e.IBizCodeList,te=e.IBizBadge,ae=e.IBizSignaturePad,ne=e.useControlController,oe=e.withInstall,ie=e.computedAsync,se=e.useCodeListListen,le=e.useClickOutside,re=e.useEventListener,ce=e.hasEmptyPanelRenderer,de=e.IBizCustomRender,ue=e.useControlPopoverzIndex,pe=e.useController,he=e.useCtx,me=e.getNestedRoutePath,ve=e.onRouteChange,be=e.useLocalCacheKey,ge=e.ControlLoadingPlaceholder,fe=e.usePopoverzIndex,we=e.PanelContainerController,ye=e.IBizPanelCtrlViewPageCaption,Ce=e.IBizPanelContainer,Ie=e.IBizPanelCtrlPos,De=e.IBizScrollContainer,Ee=e.IBizNavPos,Se=e.IBizSingleDataContainer,xe=e.IBizMultiDataContainer,Pe=e.IBizMultiDataContainerRaw,ke=e.IBizPanelField,Te=e.IBizPanelRawItem,ze=e.IBizGridContainer,Ae=e.IBizPanelTabPage,Oe=e.IBizPanelContainerGroup,Me=e.IBizPanelContainerImage,Ne=e.IBizPanelItemRender,Be=e.IBizTeleportPlaceholder,_e=e.IBizPanelContainerTabs,Re=e.IBizAuthWxmpQrcode,Le=e.getSpanProps,je=e.useFocusAndBlur,Ve=e.getEditorEmits,Fe=e.getInputProps,Ue=e.getInputNumberProps,He=e.getInputIpProps,qe=e.getDropdownProps,Ge=e.getCheckboxProps,We=e.useAutoFocusBlur,Ke=e.getCheckboxListProps,Ye=e.getRadioProps,Xe=e.getDatePickerProps,$e=e.getRawProps,Je=e.getStepperProps,Qe=e.getRateProps,Ze=e.getSwitchProps,et=e.getSliderProps,tt=e.getListBoxProps,at=e.getAutoCompleteProps,nt=e.getUploadProps,ot=e.getDataPickerProps,it=e.renderString,st=e.getNumberRangeProps,lt=e.getDateRangeProps,rt=e.getCodeProps,ct=e.getArrayProps,dt=e.getCascaderProps,ut=e.getColorPickerProps,pt=e.getEditorProps,ht=e.getDateRangeSelectProps,mt=e.getDateRangeSelectEmits,vt=e.getMapPickerProps,bt=e.useViewController,gt=e.AppHooks,ft=e.IBizView,wt=e.IBizPortalView,yt=e.IBizHtmlView,Ct=e.IBizDeRedirectView,It=e.IBizViewLayoutPanelControl,Dt=e.IBizPanelControl,Et=e.piniaInstance,St=e.parseRouteViewData,xt=e.createOverlayView,Pt=e.AppRedirectView,kt=e.useAppStore,Tt=e.PluginFactory},function(e){zt=e.showTitle,At=e.Namespace,Ot=e.UrlHelper,Mt=e.calcOpenModeStyle,Nt=e.IBizContext,Bt=e.listenJSEvent,_t=e.RuntimeError,Rt=e.findRecursiveChild,Lt=e.NOOP,jt=e.eventPath,Vt=e.recursiveIterate,Ft=e.ModelError,Ut=e.mergeInLeft,Ht=e.clone,qt=e.downloadFileFromBlob,Gt=e.RuntimeModelError,Wt=e.DataTypes,Kt=e.isEmoji,Yt=e.base64ToStr,Xt=e.StringUtil,$t=e.getAppCookie,Jt=e.CoreConst,Qt=e.base64ToBlob,Zt=e.strToBase64,ea=e.HttpError,ta=e.debounce,aa=e.LoginMode,na=e.install},function(e){oa=e.calcContentAlignStyle,ia=e.calcDeCodeNameById,sa=e.Modal,la=e.ViewMode,ra=e.ViewShellHooks,ca=e.SysUIActionTag,da=e.GridRowState,ua=e.ControlVO,pa=e.getAsyncActionProvider,ha=e.getDeACMode,ma=e.ConfigService,va=e.UIActionUtil,ba=e.downloadImportTemplate,ga=e.selectAndImport,fa=e.getDefaultDataImport,wa=e.getImportSchema,ya=e.updateImportSchema,Ca=e.createImportSchema,Ia=e.asyncImportData2,Da=e.fetchImportSchemas,Ea=e.deleteImportSchema,Sa=e.findChildFormDetails,xa=e.ValueOP,Pa=e.getEditorProvider,ka=e.calcNavParams,Ta=e.compareDateEqualByScale,za=e.getAreaLevelByCode,Aa=e.getAreaLevelNum,Oa=e.formatSeparator,Ma=e.AppMenuController,Na=e.ViewCallTag,Ba=e.registerControlProvider,_a=e.ControlType,Ra=e.AppMenuIconViewController,La=e.GridFieldColumnController,ja=e.ValueExUtil,Va=e.registerGridColumnProvider,Fa=e.GridUAColumnController,Ua=e.GridFieldEditColumnController,Ha=e.GridGroupColumnController,qa=e.Srfuf,Ga=e.GridController,Wa=e.ScriptFactory,Ka=e.ListController,Ya=e.SearchFormController,Xa=e.FormGroupPanelController,$a=e.registerFormDetailProvider,Ja=e.FormItemController,Qa=e.FormPageController,Za=e.FormButtonController,en=e.FormDRUIPartController,tn=e.FormMDCtrlController,an=e.FormMDCtrlFormController,nn=e.FormMDCtrlMDController,on=e.FormMDCtrlRepeaterController,sn=e.EditFormController,ln=e.FormRawItemController,rn=e.FormTabPanelController,cn=e.FormTabPageController,dn=e.FormButtonListController,un=e.FormIFrameController,pn=e.ToolbarController,hn=e.CaptionBarController,mn=e.DataViewControlController,vn=e.getControl,bn=e.getControlPanel,gn=e.TreeController,fn=e.AppDataEntity,wn=e.PanelItemEventName,yn=e.PickupViewPanelController,Cn=e.TabExpPanelController,In=e.TreeExpBarController,Dn=e.ExpBarControlController,En=e.CalendarExpBarController,Sn=e.ChartExpBarController,xn=e.SearchBarController,Pn=e.WizardPanelController,kn=e.ControlController,Tn=e.calcItemVisibleByCounter,zn=e.calcItemVisible,An=e.hasSubRoute,On=e.CounterService,Mn=e.DashboardController,Nn=e.getPortletProvider,Bn=e.CustomDashboardController,_n=e.ContainerPortletController,Rn=e.registerPortletProvider,Ln=e.PortletPartController,jn=e.ViewPortletController,Vn=e.MenuPortletController,Fn=e.ChartPortletController,Un=e.RawItemPortletController,Hn=e.ListPortletController,qn=e.HtmlPortletController,Gn=e.ActionBarPortletController,Wn=e.ReportPortletController,Kn=e.FilterPortletController,Yn=e.filterPortletByID,Xn=e.CalendarController,$n=e.KanbanController,Jn=e.TreeGridExController,Qn=e.TreeGridExFieldColumnController,Zn=e.TreeGridExRowState,eo=e.registerTreeGridExColumnProvider,to=e.TreeGridExNodeColumnController,ao=e.TreeGridExUAColumnController,no=e.TreeGridController,oo=e.MEditViewPanelController,io=e.MapController,so=e.ReportPanelController,lo=e.GanttController,ro=e.ContextMenuController,co=e.ViewPanelController,uo=e.PanelItemController,po=e.registerPanelItemProvider,ho=e.PanelItemState,mo=e.RouteConst,vo=e.UIActionButtonState,bo=e.AppFuncCommand,go=e.parseViewProtocol,fo=e.OpenAppViewCommand,wo=e.getInternalMessageProvider,yo=e.registerInternalMessageProvider,Co=e.PresetIdentifier,Io=e.registerAsyncActionProvider,Do=e.ButtonContainerState,Eo=e.getAcItemProvider,So=e.UtilService,xo=e.getAppMenuItemProvider,Po=e.CodeListEditorController,ko=e.useCodeListSelection,To=e.EditorController,zo=e.useCalcOrMode,Ao=e.getEntitySchema,Oo=e.calcFilterModelBySchema,Mo=e.SearchBarFilterController,No=e.getOriginFilterNodes,Bo=e.SearchCondEx2filterNode,_o=e.calcSearchCondExs,Ro=e.registerEditorProvider,Lo=e.WFStepTraceViewController,jo=e.registerViewProvider,Vo=e.ViewType,Fo=e.ViewController,Uo=e.getErrorViewProvider,Ho=e.DEMainViewEngine,qo=e.getControlsByView,Go=e.getAppViewRef,Wo=e.calcDynaSysParams,Ko=e.getDeDataMajorField,Yo=e.convertNavData,Xo=e.MDViewEngine,$o=e.ViewEngineBase,Jo=e.getWFSubmitViewId,Qo=e.registerErrorViewProvider,Zo=e.install},function(e){ei=e.createUUID,ti=e.clearAll,ai=e.notNilEmpty,ni=e.isNilOrEmpty},function(e){oi=e.ElLoading,ii=e.ElMessage,si=e.ElMessageBox,li=e.ElNotification,ri=e.default,ci=e.useLocale},function(e){di=e.mergeRight,ui=e.isNil,pi=e.clone,hi=e.isNotNil,mi=e.reject,vi=e.mergeDeepLeft,bi=e.isEmpty,gi=e.mergeDeepRight},function(e){fi=e.isNumber,wi=e.isFunction,yi=e.isString,Ci=e.chunk,Ii=e.debounce,Di=e.cloneDeep,Ei=e.orderBy,Si=e.isNil,xi=e.uniqueId,Pi=e.fromPairs,ki=e.isObject,Ti=e.isArray,zi=e.isDate,Ai=e.toNumber,Oi=e.clone},function(e){Mi=e.autoUpdate,Ni=e.offset,Bi=e.flip,_i=e.shift,Ri=e.arrow,Li=e.computePosition},function(e){ji=e.default},function(e){Vi=e.default},function(e){Fi=e.default},function(e){Ui=e.default},function(e){Hi=e.DomEditor,qi=e.SlateEditor,Gi=e.Boot,Wi=e.createEditor,Ki=e.SlatePath},function(e){Yi=e.useRoute,Xi=e.useRouter,$i=e.onBeforeRouteUpdate,Ji=e.createRouter,Qi=e.createWebHashHistory},function(e){Zi=e.updateDevToolConfig,es=e.install,ts=e.listenOpenDevTool},function(e){as=e.default},function(e){ns=e.default},function(e){os=e.createI18n},function(e){is=e.ModelHelper}],execute:function(){e({b$:rl,bW:Ws,c:Qs,c0:cl,c1:ys,c5:async function(e,t){gt.createApp.tap(((t,a)=>{e&&e.forEach((e=>{a.use(e)}))})),na(),Zo(),gt.appResorceInited.call(ibiz.hub),ibiz.util.getGlobalParam=()=>kt().appStore,ibiz.util.getRouterParams=()=>K(XO.getRouter().currentRoute.value).pathNodes,ibiz.plugin=new Tt,ibiz.util.error.register(new VO);const a=NO(RO);let n;W.createVueApp=NO,window.onerror=function(e,t,a,n,o){return o&&ibiz.util.error.handle(o),!0},window.addEventListener("unhandledrejection",(function(e){e.preventDefault(),e.promise.catch((e=>{ibiz.util.error.handle(e)}))})),await _O(),es(),n=(null==t?void 0:t.getAuthGuard)?t.getAuthGuard():new AO;XO.setAuthGuard(((e,t)=>n.verify(e,t))),a.use(XO.getRouter()),ts(XO.getRouter()),ibiz.appUtil=new tl(XO.getRouter()),ibiz.openView=new _s(XO.getRouter()),ibiz.render=new Js,ibiz.message=new vs,ibiz.modal=new bs,ibiz.confirm=new ws,ibiz.notification=new Bs,ibiz.loading=new ps,ibiz.notice=new $s,ibiz.overlay=new Gs,ibiz.util.text.format=(e,t)=>a.config.globalProperties.$textFormat(e,t),ibiz.fullscreenUtil=new ll,await ibiz.i18n.init(),a.mount("#app")},o:qd,p:Gd,q:Wd,r:Kd,u:Hd});const ss=e("f",a({name:"IBizActionToolbar",props:{actionDetails:{type:Array,required:!0},actionsState:{type:Object,required:!0},caption:String,mode:{type:String,default:"buttons"},groupLevelKeys:{type:Object,default:[50]},zIndex:{type:Number,required:!0},popperClass:String,actionCallBack:{type:Function}},setup(e,{emit:t}){var a;const o=B("action-toolbar"),i=n(),s=n(),{popoverVisible:l,setPopoverVisible:r}=_(s,(e=>e.ref));null==(a=e.actionDetails)||a.forEach((e=>{e.capLanguageRes&&e.capLanguageRes.lanResTag&&(e.caption=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),e.tooltipLanguageRes&&e.tooltipLanguageRes.lanResTag&&(e.tooltip=ibiz.i18n.t(e.tooltipLanguageRes.lanResTag,e.tooltip))}));const c=n([]),d=n([]);e.actionDetails&&e.actionDetails.forEach((t=>{-1!==e.groupLevelKeys.findIndex((e=>e===t.actionLevel))?d.value.push(t):c.value.push(t)}));const u=e.zIndex;return{ns:o,dropdownRef:i,popoverIndex:u,groupDetails:d,expandDetails:c,groupButtonRef:s,popoverVisible:l,handleClick:async(a,n)=>{n.stopPropagation(),e.actionCallBack&&await e.actionCallBack(a,n),"buttons"===e.mode?r(!1):i.value&&i.value.handleClose(),e.actionCallBack||t("action-click",a,n)},calcActionItemClass:e=>{const{actionLevel:t}=e;return[o.e("item"),o.is("disabled",!1),o.em("item","level-".concat(t))]}}},render(){var e;const t=this.actionDetails||[],a=e=>o(i("el-divider"),{class:this.ns.e("separator"),"border-style":"double",direction:e?"vertical":"horizontal"},null),n=(e,t=!0)=>{var n;const s=e.refUIActionGroup;if(!(null==(n=null==s?void 0:s.uiactionGroupDetails)?void 0:n.length))return null;return-1!==s.uiactionGroupDetails.findIndex((e=>!0===this.actionsState[e.id].visible))?[e.addSeparator&&a(t),o(i("el-popover"),{teleported:!1,placement:"right-start","popper-class":this.ns.e("popover"),"popper-options":{modifiers:[{name:"offset",options:{offset:[0,4]}}]},"popper-style":"z-index:".concat(this.popoverIndex+1)},{reference:()=>o(i("el-button"),{text:!0,size:"small",class:[...this.calcActionItemClass(e),this.ns.e("group-item")]},{default:()=>[o("div",{class:this.ns.em("group-item","caption")},[o("span",null,[s.id]),o("ion-icon",{class:this.ns.em("group-item","caption-icon"),name:"chevron-forward-outline"},null)])]}),default:()=>l(s.uiactionGroupDetails||[],t)})]:null},l=(e,t=!0)=>e.map((e=>{var s;return"DEUIACTIONGROUP"===e.detailType&&e.refUIActionGroup?n(e):(null==(s=this.actionsState[e.id])?void 0:s.visible)?[e.addSeparator&&a(t),o(i("el-button"),{text:!0,size:"small",onClick:t=>this.handleClick(e,t),title:zt(e.tooltip),disabled:this.actionsState[e.id].disabled,class:this.calcActionItemClass(e)},{default:()=>[o("div",{class:[this.ns.em("item","icon"),this.ns.is("has-caption",e.showCaption&&!!e.caption),this.ns.is("has-icon",e.showIcon&&!!e.sysImage)]},[e.showIcon&&e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null)]),o("div",{class:[this.ns.em("item","label"),this.ns.is("has-caption",e.showCaption&&!!e.caption),this.ns.is("has-icon",e.showIcon&&!!e.sysImage)]},[e.showCaption?e.caption:""])]})]:null})),r=()=>{let e;if(0===this.groupDetails.length)return null;if(!(-1!==this.groupDetails.findIndex((e=>!0===this.actionsState[e.id].visible))))return null;const t=-1===this.groupDetails.findIndex((e=>!1===this.actionsState[e.id].disabled));return[o(i("el-button"),{size:"small",text:!0,disabled:t,ref:"groupButtonRef",class:[this.ns.e("item"),this.ns.is("group",!0),this.ns.is("expand",this.popoverVisible)],onClick:()=>{this.popoverVisible=!this.popoverVisible}},{icon:()=>o("ion-icon",{class:this.ns.e("icon"),name:"ellipsis-vertical",title:zt(ibiz.i18n.t("component.actionToolbar.more"))},null)}),o(i("el-popover"),{placement:"bottom-start","virtual-ref":this.groupButtonRef,visible:this.popoverVisible,"popper-class":this.ns.e("popover"),"virtual-triggering":!0,"popper-style":"z-index:".concat(this.popoverIndex)},(a=e=l(this.groupDetails,!1),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?e:{default:()=>[e]}))];var a};if(null==(e=this.actionsState)?void 0:e.visible)return"buttons"===this.mode?o("div",{class:[this.ns.b(),this.ns.m("buttons")],onClick:e=>e.stopPropagation()},[l(this.expandDetails),r()]):o(i("el-dropdown"),{ref:"dropdownRef",onCommand:e=>this.handleClick(e,new MouseEvent("click")),class:[this.ns.b(),this.ns.m("dropdown")],"popper-class":this.popperClass},{default:()=>o("span",{class:this.ns.e("caption")},[this.caption,o("ion-icon",{class:this.ns.e("caption-icon"),name:"ellipsis-vertical"},null)]),dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>[t.length>0&&t.map((e=>this.actionsState[e.id].visible?o(i("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("disabled",!1)],title:zt(e.tooltip),disabled:this.actionsState[e.id].disabled,command:e},{default:()=>[e.showIcon&&e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),e.showCaption?e.caption:""]}):null))]})})}}));function ls(e,t,a){const n=t&&-1!==t?t:0,o={span:(e&&-1!==e?e:"TABLE_24COL"===a?24:12)*("TABLE_24COL"===a?1:2)};return 0!==n&&(o.offset=n),o}const rs=e("d",a({name:"IBizCol",props:{layoutPos:{type:Object,required:!0},state:{type:Object,required:!0}},setup(e){const t=B("col"),a=l((()=>{const t=B("spacing"),a=[],n={top:e.layoutPos.spacingTop,bottom:e.layoutPos.spacingBottom,left:e.layoutPos.spacingLeft,right:e.layoutPos.spacingRight};return Object.keys(n).forEach((e=>{const o=n[e];o&&a.push(t.bm(e,o.toLowerCase()))})),a})),n=l((()=>{const t=e.layoutPos;if("FLEX"===t.layout)return{};const{colXS:a,colXSOffset:n,colSM:o,colSMOffset:i,colMD:s,colMDOffset:l,colLG:r,colLGOffset:c}=t;return{xs:ls(a,n,t.layout),sm:ls(o,i,t.layout),md:ls(s,l,t.layout),lg:ls(r,c,t.layout)}})),o=oa(e.layoutPos),i=l((()=>{const t=e.state.layout,a={width:t.width,height:t.height,...o||{}};return Object.assign(a,t.extraStyle),a})),s=l((()=>{var n;return[t.b(),"FLEX"===(null==(n=e.layoutPos)?void 0:n.layout)?t.m("flex"):t.m("grid"),t.is("hidden",!e.state.visible),...a.value,o?t.m("self-align"):"",...e.state.layout.extraClass]}));return{ns:t,colClass:s,gridAttrs:n,cssVars:i}},render(){var e,t,a;if(!this.state.visible&&!this.state.keepAlive)return null;const n=null==(t=(e=this.$slots).default)?void 0:t.call(e);if("FLEX"===(null==(a=this.layoutPos)?void 0:a.layout)){const e=this.layoutPos;return o("div",{class:this.colClass,style:{flexGrow:e.grow,flexShrink:1===e.shrink?void 0:e.shrink,flexBasis:e.basis,...this.cssVars}},[n])}return r(i("el-col"),{class:this.colClass,style:this.cssVars,...this.gridAttrs},{default:()=>n})}}));const cs=e("e",a({name:"IBizRow",props:{layout:Object},setup:()=>({ns:B("row")}),render(){var e,t,a;const n=null==(t=(e=this.$slots).default)?void 0:t.call(e);if("FLEX"===(null==(a=this.layout)?void 0:a.layout)){const{dir:e,align:t,valign:a}=this.layout,i=e;return o("div",{class:[this.ns.b(),this.ns.m("flex"),this.ns.m(i)],style:{flexDirection:i,justifyContent:t,alignItems:a}},[n])}return o(i("el-row"),{class:[this.ns.b(),this.ns.m("grid")]},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?n:{default:()=>[n]});var l}}));var ds=Object.defineProperty,us=(e,t,a)=>(((e,t,a)=>{t in e?ds(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ps{constructor(){us(this,"count",0),us(this,"countRedirect",0),us(this,"loading")}show(){0===this.count&&(this.loading=oi.service({lock:!0,fullscreen:!0})),this.count+=1}hide(){this.count>0&&(this.count-=1),0===this.count&&this.loading&&this.loading.close()}showRedirect(){}hideRedirect(){}}e("bP",ps);var hs=Object.defineProperty,ms=(e,t,a)=>(((e,t,a)=>{t in e?hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vs{constructor(){ms(this,"ns",B("message"))}info(e,t,a){ii.info({message:e,duration:t?1e3*t:t,showClose:a})}success(e,t,a){ii.success({message:e,duration:t?1e3*t:t,showClose:a})}warning(e,t,a){ii.warning({message:e,duration:t?1e3*t:t,showClose:a})}error(e,t,a){ii.error({message:e,duration:t?1e3*t:t,showClose:a})}formatParams(e){const t=di({type:"info"},e),a={};return Object.keys(t).forEach((e=>{const n=t[e];switch(e){case"duration":ui(n)||(a.duration=1e3*n);break;case"styleType":ui(n)||(a.customClass=this.ns.m(n));break;default:a[e]=n}})),a}notice(e){ii(this.formatParams(e))}}e("bQ",vs);class bs{async info(e){await si.alert(e.desc,e.title,{...e.options,type:"info"})}async success(e){await si.alert(e.desc,e.title,{...e.options,type:"success"})}async warning(e){await si.alert(e.desc,e.title,{...e.options,type:"warning"})}async error(e){await si.alert(e.desc,e.title,{...e.options,type:"error"})}async confirm(e){return new Promise((t=>{si.confirm(e.desc,e.title,e).then((()=>t(!0))).catch((()=>t(!1)))}))}}e("bR",bs);var gs=Object.defineProperty,fs=(e,t,a)=>(((e,t,a)=>{t in e?gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ws{constructor(){fs(this,"ns",new At("confirm"))}async info(e){return new Promise((t=>{si.confirm(e.desc,e.title,{customClass:"".concat(this.ns.b()," ").concat(this.ns.e("info")),type:"info",cancelButtonClass:"".concat(this.ns.b("cancel")," el-button--info"),confirmButtonClass:"".concat(this.ns.b("ok")),...e.options}).then((()=>t(!0))).catch((()=>t(!1)))}))}async success(e){return new Promise((t=>{si.confirm(e.desc,e.title,{customClass:"".concat(this.ns.b()," ").concat(this.ns.e("success")),cancelButtonClass:"".concat(this.ns.b("cancel")," el-button--info"),confirmButtonClass:"".concat(this.ns.b("ok")),type:"success",...e.options}).then((()=>t(!0))).catch((()=>t(!1)))}))}async warning(e){return new Promise((t=>{si.confirm(e.desc,e.title,{customClass:"".concat(this.ns.b()," ").concat(this.ns.e("warning")),cancelButtonClass:"".concat(this.ns.b("cancel")," el-button--info"),confirmButtonClass:"".concat(this.ns.b("ok")),type:"warning",...e.options}).then((()=>t(!0))).catch((()=>t(!1)))}))}async error(e){return new Promise((t=>{si.confirm(e.desc,e.title,{customClass:"".concat(this.ns.b()," ").concat(this.ns.e("error")),cancelButtonClass:"".concat(this.ns.b("cancel")," el-button--info"),confirmButtonClass:"".concat(this.ns.b("ok")),type:"error",...e.options}).then((()=>t(!0))).catch((()=>t(!1)))}))}}function ys(e){const t=/<span\sdata-w-e-type="emoji"\sclass=['"]emoji['"]>(.+?)<\/span>/g;let a,n=e;for(;null!==(a=t.exec(e));){const e=a[1],t=decodeURIComponent(atob(e));n=n.replace(a[0],"<span data-w-e-type=\"emoji\" class='emoji'>".concat(t,"</span>"))}return n}e("bS",ws);const Cs=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9641"},[o("path",{d:"M852.537678 966.322357c7.542461 0 14.818718-3.016984 20.142807-8.341075s8.341075-12.600347 8.341075-20.142807V262.033969c0-6.743847-2.395841-13.22149-6.743848-18.368111L725.469393 67.793414c-5.412825-6.388908-13.39896-10.115771-21.740034-10.115771h-532.231543c-7.542461 0-14.818718 3.016984-20.142807 8.341075s-8.341075 12.600347-8.341075 20.142807v851.67695c0 7.542461 3.016984 14.818718 8.341075 20.142807s12.600347 8.341075 20.142807 8.341075h681.039862z",fill:"#CA223D","p-id":"9642"},null),o("path",{d:"M881.02156 265.228423v-3.194454c0-6.743847-2.395841-13.22149-6.743848-18.368111L725.469393 67.793414c-5.412825-6.388908-13.39896-10.115771-21.740034-10.115771h-1.331023v207.55078h178.623224z",opacity:".15","p-id":"9643"},null),o("path",{d:"M359.083258 657.52513c-10.293241 0-16.14974-4.614211-19.432929-9.494627-10.027036-15.262392 2.040901-40.640555 14.197574-52.442288 6.300173-6.033969 25.023224-21.562565 65.131369-37.889775 8.07487-19.07799 15.97227-40.55182 23.071057-62.469324 11.801733-36.647487 18.989255-74.271057 22.982323-100.447834-8.696014-16.061005-34.162912-65.042634-34.162912-83.676949 0-10.470711 2.307106-18.989255 7.010052-25.200693 4.880416-6.566378 11.979203-10.204506 20.054073-10.204507 9.228423 0 18.456846 4.702946 25.466898 12.955286 7.098787 8.25234 11.00312 19.255459 11.003119 30.702253 0 17.569497-2.307106 44.012478-6.300173 71.254073 17.392028 31.323397 36.292548 59.984749 52.087348 78.885269 15.617331 18.634315 34.340381 35.493934 55.902946 50.223917 37.97851-3.283189 82.878336-4.348007 99.205546 2.218371 20.852686 8.429809 24.40208 22.272444 20.763952 32.476949-6.388908 17.924437-34.87279 27.951473-58.742461 20.586482-9.760832-3.016984-35.493934-12.067938-66.994801-32.47695-26.176776 2.484575-53.240901 6.388908-78.619064 11.358059-27.507799 5.32409-53.063432 12.422877-76.045754 21.030156-19.521664 44.278683-37.357366 70.10052-53.152166 76.755633-9.583362 4.259272-17.303293 5.856499-23.425997 5.856499z m-0.976083-22.272444c1.419757 0.17747 6.033969 0.266205 15.883536-3.904332 5.945234-2.484575 16.948354-15.351127 30.968457-42.947661-21.917504 11.00312-32.388215 20.054073-35.582669 23.159792-7.808666 7.453726-12.067938 19.699133-11.269324 23.692201z m271.794801-95.478683c15.97227 8.07487 28.128943 12.245407 33.985442 14.108839 14.996187 4.614211 29.105026-2.57331 31.145927-6.388908-0.621144-0.798614-2.57331-2.662045-7.986135-4.880416-5.235355-2.129636-24.490815-4.170537-57.145234-2.839515z m-181.728943 6.477643l-0.443674 1.064818c18.72305-6.033969 38.777123-11.091854 59.807279-15.173656 17.480763-3.371924 35.848873-6.300173 54.128249-8.607279l-0.709878-0.532409 2.129636-0.17747c-14.818718-11.979203-28.128943-25.023224-39.841941-39.043328-14.996187-17.835702-29.193761-39.487002-40.37435-57.943847l-0.17747 1.153553-0.532409-0.887349c-4.348007 22.893588-10.559445 49.691508-18.989255 76.045754-4.880416 15.173657-10.204506 30.258579-15.706066 44.456153l0.709879-0.35494z m9.849567-248.368804c-0.887348 0-1.508492 0.17747-2.307106 1.242288-0.798614 1.064818-2.57331 4.259272-2.57331 11.890468 0 4.525477 5.50156 20.586482 17.037088 44.722357 1.419757-14.108839 2.129636-26.709185 2.129636-36.381283 0-13.842634-9.494627-21.47383-14.286308-21.47383z",fill:"#FFFFFF","p-id":"9644"},null),o("path",{d:"M404.808319 775.25851h17.125823l1.419757 8.252339h0.532409c6.655113-5.679029 14.996187-10.293241 23.514732-10.293241 19.699133 0 31.323397 16.14974 31.323397 40.640555 0 27.330329-16.415945 43.213865-33.896707 43.213865-7.010052 0-13.665165-3.105719-19.787869-8.696014l0.532409 13.132755v24.224611h-20.763951v-110.47487z m52.442288 38.954592c0-15.262392-4.880416-23.692201-15.794801-23.692201-5.412825 0-10.293241 2.75078-15.794801 8.25234v35.05026c5.14662 4.436742 10.293241 5.945234 14.552513 5.945234 9.583362 0.088735 17.037088-8.163605 17.037089-25.555633zM492.034662 815.366655c0-26.088042 16.238475-42.060312 33.453033-42.060312 8.962218 0 14.552513 3.460659 20.231542 8.696014l-0.887348-12.511612v-28.128943h20.941421v113.758059h-16.948353l-1.685962-8.252339h-0.443674c-5.856499 5.679029-13.842634 10.293241-22.094974 10.293241-19.787868-0.088735-32.565685-15.706066-32.565685-41.794108z m52.885962 16.238475v-35.05026c-4.880416-4.436742-9.849567-5.945234-14.818718-5.945234-8.962218 0-16.504679 8.518544-16.504679 24.490815 0 16.504679 5.945234 24.757019 16.504679 24.757019 5.50156 0 10.204506-2.307106 14.818718-8.25234zM630.993414 757.600277c-2.75078-0.976083-5.856499-1.685962-8.429809-1.685962-6.300173 0-9.672097 3.726863-9.672097 12.511612v6.832583h14.996187v16.504679h-14.996187v63.356672h-20.941421v-63.267937h-10.648181v-15.528596l10.648181-0.887349v-6.566378c0-16.682149 7.719931-29.459965 27.774003-29.459965 6.122704 0 11.535529 1.419757 15.084922 2.839515l-3.815598 15.351126z",fill:"#FFFFFF","p-id":"9645"},null)]),Is=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"11602"},[o("path",{d:"M146.879977 0A52.335992 52.335992 0 0 0 95.999985 51.167992v921.647856a49.039992 49.039992 0 0 0 15.279998 35.791994A49.839992 49.839992 0 0 0 146.863977 1023.99984h746.287883a48.559992 48.559992 0 0 0 35.567995-15.359998A50.719992 50.719992 0 0 0 943.999853 972.815848V290.015955L655.679898 0H146.847977h0.016z",fill:"#3662EC","p-id":"11603"},null),o("path",{d:"M943.999853 287.999955H706.84789A52.127992 52.127992 0 0 1 655.999898 237.199963V0l287.951955 287.999955H943.999853z",fill:"#FFFFFF","fill-opacity":".7","p-id":"11604"},null),o("path",{d:"M336.831947 751.999883h45.823993v-152.575977h51.711992V561.279912h-148.991977v38.143994h51.455992V751.999883z m102.399984 0h48.639993l16.383997-37.119995c4.351999-9.983998 8.703999-19.967997 13.055998-31.743995h1.024c5.119999 11.775998 9.471999 21.759997 14.079998 31.743995L550.079914 751.999883h50.943992l-52.479992-95.999985 49.151993-94.719986h-48.383993l-13.823998 34.303995c-3.839999 8.959999-7.935999 18.943997-12.287998 31.231995h-1.024c-5.375999-12.287998-9.471999-22.271997-13.823997-31.231995l-15.359998-34.303995h-50.943992l49.407992 92.671986L439.231931 751.999883z m217.855966 0h45.823993v-152.575977h51.711992V561.279912h-148.991977v38.143994h51.455992V751.999883z",fill:"#FFFFFF","p-id":"11605"},null)]),Ds=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"17449"},[o("path",{d:"M947.2 216.064l-192.256-204.8A38.144 38.144 0 0 0 728.064 0h-614.4a40.192 40.192 0 0 0-38.912 41.472v941.056A40.192 40.192 0 0 0 113.664 1024H921.6a40.192 40.192 0 0 0 38.912-41.472V245.504A42.752 42.752 0 0 0 947.2 216.064zM652.8 768l-137.216-203.008L378.624 768h-95.488l184.576-264.704L295.424 256h95.488l124.672 185.088L640 256h95.488L563.2 503.04 748.032 768z",fill:"#25C273","p-id":"17450"},null)]),Es=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"19451"},[o("path",{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM296 136v64h64v-64h-64z m64 64v64h64v-64h-64z m-64 64v64h64v-64h-64z m64 64v64h64v-64h-64z m-64 64v64h64v-64h-64z m64 64v64h64v-64h-64z m-64 64v64h64v-64h-64z m0 64v160h128V584H296z m48 48h32v64h-32v-64z",fill:"#515151","p-id":"19452"},null)]),Ss=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"26339"},[o("path",{d:"M794.574 930.64h-562.47c-24.262 0-44-19.738-44-44V142.99c0-24.262 19.738-44 44-44h344.009v64H252.104v703.65h522.471V345h64v541.64c-0.001 24.261-19.739 44-44.001 44z",fill:"","p-id":"26340"},null),o("path",{d:"M619 301.79h220v64H619z",fill:"","p-id":"26341"},null),o("path",{d:"M618 98.228h64v266.078h-64z",fill:"","p-id":"26342"},null),o("path",{d:"M632.307 136.573l51.007-38.649 155.153 204.764-51.008 38.649zM916.137 779.999H110.146c-6.6 0-12-5.4-12-12V493.127c0-6.6 5.4-12 12-12h805.991c6.6 0 12 5.4 12 12v274.872c0 6.6-5.4 12-12 12z",fill:"","p-id":"26343"},null),o("path",{d:"M266.631 551.092h47.454c52.831 0 85.559 24.867 85.559 77.998 0 52.918-32.728 79.271-83.688 79.271h-49.324V551.092z m45.35 131.978c32.26 0 52.363-15.727 52.363-53.98 0-38.467-20.104-52.92-52.363-52.92h-10.753v106.9h10.753zM436.581 629.09c0-51.219 31.559-80.973 77.376-80.973s77.376 29.967 77.376 80.973-31.559 82.246-77.376 82.246-77.376-31.24-77.376-82.246z m119.453 0c0-33.793-16.363-53.982-42.077-53.982s-42.077 20.189-42.077 53.982c0 33.578 16.363 55.043 42.077 55.043s42.077-21.465 42.077-55.043zM628.271 630.365c0-51.857 36.701-82.248 80.415-82.248 21.975 0 39.507 9.564 50.728 20.189l-18.234 19.979c-8.649-7.652-18.701-13.178-31.792-13.178-26.182 0-45.817 20.402-45.817 54.193 0 34.217 17.766 54.832 45.116 54.832 14.728 0 26.416-6.375 35.767-15.514l18.233 19.553c-14.26 15.088-32.728 23.164-55.169 23.164-43.714 0.001-79.247-28.478-79.247-80.97z",fill:"#FFFFFF","p-id":"26344"},null)]),xs=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"27355"},[o("path",{d:"M170.65984 42.65984l682.65984 0q53.00224 0 90.50112 37.49888t37.49888 90.50112l0 682.65984q0 53.00224-37.49888 90.50112t-90.50112 37.49888l-682.65984 0q-53.00224 0-90.50112-37.49888t-37.49888-90.50112l0-682.65984q0-53.00224 37.49888-90.50112t90.50112-37.49888zM896 742.99392l-213.34016-213.34016-366.32576 366.32576 537.00608 0q17.67424 0 30.16704-12.4928t12.4928-30.16704l0-110.32576zM853.34016 128l-682.65984 0q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 682.65984q0 17.67424 12.4928 30.16704t30.16704 12.4928l25.00608 0 486.99392-486.99392 213.34016 213.34016 0-451.66592q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM341.34016 213.34016q53.00224 0 90.50112 37.49888t37.49888 90.50112-37.49888 90.50112-90.50112 37.49888-90.50112-37.49888-37.49888-90.50112 37.49888-90.50112 90.50112-37.49888zM341.34016 298.65984q-17.67424 0-30.16704 12.4928t-12.4928 30.16704 12.4928 30.16704 30.16704 12.4928 30.16704-12.4928 12.4928-30.16704-12.4928-30.16704-30.16704-12.4928z",fill:"#444444","p-id":"27356"},null)]),Ps=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"28365"},[o("path",{d:"M622.95253333 327.29173333l0.02133334-224.4384H176.6688V921.14133333h670.72853333V327.29173333H622.95253333z m5.1552 195.20533334c-9.32266667-19.97866667-28.90666667-28.61866667-46.624-30.93866667-17.4432-2.34346667-33.1712 1.17973333-44.7872 3.58826667v153.4144c1.2448 22.29866667-12.25066667 46.25066667-36.144 60.04693333-31.80586667 18.3552-70.0032 11.75253333-85.3056-14.752-15.3024-26.5088-1.92213333-62.88 29.8848-81.2416 24.368-14.0736 52.48853333-13.49013333 71.18826667-0.53013333V489.48266667l-0.12053333-0.0544 0.12053333-0.2784V442.35733333c0-5.64266667 4.57066667-10.30613333 10.208-10.31146666a10.18026667 10.18026667 0 0 1 9.16266667 5.86026666c16.0512 13.97013333 31.22346667 19.11466667 48.1472 25.62453334 13.45173333 5.19466667 25.44 13.16693333 32.98666666 24.08533333 7.73333333 10.6656 11.0208 24.26346667 11.328 34.9568l-0.0448-0.07573333z",fill:"#2C2C2C","p-id":"28366"},null),o("path",{d:"M833.74933333 293.94026667L656.82346667 119.28533333l0.28373333 174.65386667z",fill:"#2C2C2C","p-id":"28367"},null)]),ks=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"30241"},[o("path",{d:"M838.85646561 290.47900106L659.12225186 113.05176719l0.28823703 177.42615027z",fill:"#2C2C2C","p-id":"30242"},null),o("path",{d:"M624.71368465 324.35985608l0.02167197-228.00091428H171.34608254V927.63564021h681.37501799V324.35985608H624.71368465z m13.17655027 250.27210159c-0.75418413 2.25821799-3.01240211 3.76658624-5.27062011 5.27603809L437.46255238 699.71166138c-7.53425608 5.2771217-18.08633227 3.01240211-23.35695238-5.27062011a20.12783068 20.12783068 0 0 1-2.25821799-9.04370794V446.53985186c0-9.79897566 7.53425608-17.33323175 17.33214815-17.33323175 3.01240211 0 6.02480424 0.75526773 9.04262433 2.26471957l194.4082963 119.8090836c7.51800211 4.51535238 10.53040424 15.06201059 5.25978413 23.35153439z",fill:"#2C2C2C","p-id":"30243"},null)]),Ts=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"31313"},[o("path",{d:"M112 16h736v992H112z",fill:"#EDF2F9","p-id":"31314"},null),o("path",{d:"M480 576a128 128 0 1 0 0 256 128 128 0 0 0 0-256z m0 192a64 64 0 1 1 0-128 64 64 0 0 1 0 128z",fill:"#C2CDDC","p-id":"31315"},null),o("path",{d:"M480 784c44.192 0 80-35.808 80-80s-35.808-80-80-80-80 35.808-80 80 35.808 80 80 80z m0-128a48 48 0 1 1 0 96 48 48 0 0 1 0-96z m-176 80h36.016a144.208 144.208 0 0 0 18.576 44.16l-25.664 25.664a15.984 15.984 0 0 0 0 22.624l22.624 22.624a15.984 15.984 0 0 0 22.624 0l25.536-25.536a141.92 141.92 0 0 0 44.304 18.768V880a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-35.68a141.92 141.92 0 0 0 44.304-18.768l25.536 25.536a15.984 15.984 0 0 0 22.624 0l22.624-22.624a15.984 15.984 0 0 0 0-22.624l-25.664-25.664a143.824 143.824 0 0 0 18.576-44.16H656a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-36.016a144.208 144.208 0 0 0-18.576-44.16l25.664-25.664a15.984 15.984 0 0 0 0-22.624l-22.624-22.624a15.984 15.984 0 0 0-22.624 0l-25.536 25.536a142.288 142.288 0 0 0-44.304-18.768V528a16 16 0 0 0-16-16h-32a16 16 0 0 0-16 16v35.68a142.288 142.288 0 0 0-44.304 18.768l-25.536-25.536a15.984 15.984 0 0 0-22.624 0l-22.624 22.624a15.984 15.984 0 0 0 0 22.624l25.664 25.664a143.824 143.824 0 0 0-18.576 44.16H304a16 16 0 0 0-16 16v32A16 16 0 0 0 304 736z m176-144a112 112 0 1 1 0 224 112 112 0 0 1 0-224zM896 128h-32V32a32 32 0 0 0-32-32H128a32 32 0 0 0-32 32v960a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V416h32a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32z m-64 0H448a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h384v576H128V32h704v96z",fill:"#8592A5","p-id":"31316"},null),o("path",{d:"M603.952 214.112v20.8h-47.824v27.2h36.624v20h-36.624v27.76h47.824v20.8h-75.04v-116.56h75.04zM648.032 270.752l-36.08-56.64h27.04a8.48 8.48 0 0 1 3.872 0.688 5.824 5.824 0 0 1 2.192 2.288l23.216 39.28a13.376 13.376 0 0 1 0.912-2c0.336-0.64 0.736-1.312 1.152-2l20.336-34.896c1.328-2.24 3.136-3.36 5.44-3.36h25.92l-36.56 55.44 37.376 61.12h-27.056a6.688 6.688 0 0 1-4.272-1.28 10.016 10.016 0 0 1-2.608-3.024l-23.344-40.816a15.84 15.84 0 0 1-1.456 3.04l-21.76 37.76a11.008 11.008 0 0 1-2.56 3.008 6.016 6.016 0 0 1-4 1.312h-25.264l37.504-59.92zM808.288 214.112v20.8h-47.84v27.2h36.624v20h-36.624v27.76h47.84v20.8h-75.04v-116.56h75.04z",fill:"#FFFFFF","p-id":"31317"},null)]),zs=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"21634"},[o("path",{d:"M640 42.688H170.688A42.688 42.688 0 0 0 128 85.376v853.312c0 23.616 19.072 42.688 42.688 42.688h682.688a42.688 42.688 0 0 0 42.752-42.688v-640c-100.16-99.968-156.16-156.096-256.128-256zM499.2 853.312a42.688 42.688 0 1 1 0-85.376 42.688 42.688 0 0 1 0 85.376z m88-239.36c-26.496 13.568-42.688 23.936-48.384 31.168-9.6 11.072-18.304 27.2-18.24 37.568q0.128 10.88 0 42.688h-51.2v-42.688c0-36.16 8.704-48.512 17.408-62.912 7.68-11.072 19.008-21.504 33.984-31.104 33.856-19.264 54.208-31.744 61.504-37.568 22.208-18.816 33.28-41.92 33.28-69.376 0-38.656-17.344-65.6-52.032-81.024a125.632 125.632 0 0 0-51.328-10.112c-49.216 0-83.392 22.72-102.72 68.032l-9.344 28.16c-1.024 3.904-1.728 8.192-2.24 12.992l-56.384-12.288c11.072-69.376 45.12-115.008 102.016-136.704a194.56 194.56 0 0 1 72.96-12.992c54.016 0 96.896 16.384 128.704 49.216l15.232 18.112c13.952 21.696 21.504 46.976 22.4 75.904-0.128 54.848-32 99.2-95.616 132.992zM640 298.752V128l170.688 170.688H640z",fill:"#515151","p-id":"21635"},null)]);function As(e){switch(e){case"text/csv":case"text/plain":return Is;case"application/pdf":return Cs;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return Ss;case"image/jpeg":case"image/png":case"image/gif":return xs;case"audio/mpeg":case"audio/wav":case"audio/ogg":return Ps;case"video/mp4":case"video/x-msvideo":case"video/x-matroska":return ks;case"application/zip":case"application/x-rar-compressed":return Es;case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.ms-excel":return Ds;case"application/x-msdownload":case"application/x-apple-diskimage":return Ts;default:return zs}}const Os=a({name:"IBizUploadManager",props:{params:{type:Object,required:!0}},emits:{close:()=>!0,uploadComplete:e=>!0},setup(e,{emit:t}){const a=B("upload-manager"),o=n([]),i=n(!0);for(let t=0;t<e.params.files.length;t++)o.value.push({file:e.params.files[t],status:10,progress:0});const s=l((()=>-1!==o.value.findIndex((e=>10===e.status)))),r=l((()=>-1===o.value.findIndex((e=>30===e.status)))),u=l((()=>{const e=o.value.filter((e=>10!==e.status));return Math.floor(e.length/o.value.length*100)}));c((()=>s.value),(()=>{if(!s.value){const e=o.value.filter((e=>20===e.status&&!!e.data)).map((e=>e.data));t("uploadComplete",e)}}));const p=async t=>{const a=new FormData;a.append("file",t.file);const n=ibiz.util.file.getUploadHeaders();return await ibiz.net.axios({url:e.params.uploadUrl,method:"post",headers:n,data:a,onUploadProgress:e=>{const a=Math.round(100*e.loaded/(e.total||1));t.progress=a}})};return d((async()=>{for(let e=0;e<o.value.length;e++){const t=o.value[e];p(t).then((e=>{t.data=e.data,t.status=200===e.status?20:30,t.statusText=e.statusText})).catch((e=>{t.status=30,t.statusText=e.message?e.message:ibiz.i18n.t("util.uploadManager.failed")}))}})),{ns:a,fileList:o,uploading:s,progress:u,uploadStatus:r,showFileList:i,onClose:()=>{t("close")},onChangeShowFileList:()=>{i.value=!i.value}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("header")},[o("div",{class:this.ns.em("header","loading")},[this.uploading?o(i("el-progress"),{type:"circle",percentage:this.progress,showText:!1},null):this.uploadStatus?o("ion-icon",{name:"checkmark-circle",class:"icon success"},null):o("ion-icon",{name:"close-circle",class:"icon danger"},null)]),o("div",{class:this.ns.em("header","title")},[o("span",{class:"caption"},[ibiz.i18n.t("util.uploadManager.title")]),o("span",{class:"progress"},["".concat(this.fileList.filter((e=>20===e.status)).length," / ").concat(this.fileList.length)])]),o("div",{class:this.ns.em("header","actions")},[o("ion-icon",{name:this.showFileList?"chevron-down-outline":"chevron-up-outline",class:"icon down-up",onClick:this.onChangeShowFileList},null),o("ion-icon",{name:"close-outline",class:"icon close",onClick:this.onClose},null)])]),this.showFileList&&o("div",{class:this.ns.e("content")},[this.fileList.map((e=>o("div",{class:this.ns.e("file-item")},[o("div",{class:this.ns.em("file-item","icon")},[As(e.file.type)]),o("div",{class:this.ns.em("file-item","name")},[e.file.name]),o("div",{class:this.ns.em("file-item","status")},[10===e.status&&o(i("el-progress"),{type:"circle",percentage:e.progress},null),20===e.status&&o("ion-icon",{name:"checkmark-circle",class:"icon success"},null),30===e.status&&o("ion-icon",{name:"close-circle",class:"icon danger"},null)]),30===e.status&&o("div",{class:this.ns.em("file-item","status-text")},[e.statusText])])))])])}});var Ms=Object.defineProperty,Ns=(e,t,a)=>(((e,t,a)=>{t in e?Ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Bs{constructor(){Ns(this,"callStack",[]),Ns(this,"intervalId",null),Ns(this,"uploadManagerHandle")}executeNext(){const e=this.callStack.shift();e?e():(clearInterval(this.intervalId),this.intervalId=null)}handleNotice(e,t){const a=e.duration?1e3*e.duration:4500,n=e.desc?ys(e.desc):e.desc;li({title:e.title,message:n,dangerouslyUseHTMLString:!!e.isHtmlDesc,type:t,position:e.position||"top-right",duration:a,customClass:e.class,onClick:e.onClick})}setTimer(){this.intervalId||(this.intervalId=setInterval((()=>{this.executeNext()}),50))}default(e){this.callStack.push((()=>this.handleNotice(e,""))),this.setTimer()}info(e){this.callStack.push((()=>this.handleNotice(e,"info"))),this.setTimer()}success(e){this.callStack.push((()=>this.handleNotice(e,"success"))),this.setTimer()}warning(e){this.callStack.push((()=>this.handleNotice(e,"warning"))),this.setTimer()}error(e){this.callStack.push((()=>this.handleNotice(e,"error"))),this.setTimer()}uploadManager(e){var t;return null==(t=this.uploadManagerHandle)||t.close(),this.uploadManagerHandle=void 0,new Promise((t=>{const a=B("upload-manager-notic");this.uploadManagerHandle=li({duration:0,showClose:!1,customClass:a.b(),position:"bottom-right",message:r(Os,{params:e,onUploadComplete:e=>{t(e)},onClose:()=>{var e;null==(e=this.uploadManagerHandle)||e.close(),this.uploadManagerHandle=void 0}})})}))}}e("bT",Bs);class _s{constructor(e){this.router=e}push(e){return R.open(this.router,e)}async verify(e,t,a,n={},o={}){if(!e||!t)return!0;const i=await ibiz.hub.config.view.get(t);if(!i)return!0;const{openMode:s="INDEXVIEWTAB"}=i,l=o.openMode||s;if("INDEXVIEWTAB"!==l&&"INDEXVIEWTAB_POPUP"!==l)return!0;if(e.model.id!==i.id)return!0;if(e.model.appDataEntityId&&i.appDataEntityId&&e.model.appDataEntityId===i.appDataEntityId&&a.srfkey){const t=ia(e.model.appDataEntityId);if(e.context[t]===a.srfkey)return!1}return!0}async root(e,t,a,n){const o=await ibiz.hub.config.view.get(e),{path:i}=await L(o,this.router.currentRoute.value,t,a);return n&&!0===n.replace?this.router.replace({path:i}):this.router.push({path:i}),{ok:!1}}async rootByModal(e,t,a){const n=await ibiz.hub.config.view.get(e),{path:o}=await j(n,this.router.currentRoute.value,t,a);return this.push(o)}async modal(e,t,a,n={}){const o=await ibiz.hub.config.view.get(e),i=JSON.parse(ibiz.config.common.modalOption||"{}"),s={width:o.width||"80%",height:o.height||"80%",footerHide:!0,...i,...n,...o.modalOption};return V({context:t,params:a,viewId:o.id,ctx:n.ctx},s)}async popover(e,t,a,n,o={}){const i=await ibiz.hub.config.view.get(e),s={width:i.width,height:i.height,autoClose:!0,placement:"bottom",...o,...i.modalOption};return F(t,{context:a,params:n,viewId:i.id,ctx:o.ctx},s)}async drawer(e,t,a,n={}){const o=await ibiz.hub.config.view.get(e),i=U(o.openMode),s=JSON.parse(ibiz.config.common.drawerOption||"{}"),l={width:o.width,height:o.height,placement:i,...s,...n,...o.modalOption};return H({context:t,params:a,viewId:o.id,ctx:n.ctx},l)}async custom(e,t,a){const n=await ibiz.hub.config.view.get(e);throw ibiz.log.warn("openUserCustom",n,t,a),new Error}async popupApp(e,t,a){const n=await ibiz.hub.config.view.get(e),{path:o}=await L(n,this.router.currentRoute.value,t,a);window.open("".concat(Ot.routeBase).concat(o),"_blank")}}e("bU",_s);const Rs=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("popover"),o=n(!1),i=n(),s=n(),{zIndex:l}=G(),r=l.increment(),c=u({}),{width:d,height:h}=e.opts;d&&(fi(d)?c.width=Mt(d,"popover"):c.width=d),h&&(fi(h)?c.height=Mt(h,"popover"):c.height=h);const m=new sa({mode:la.POPOVER,viewUsage:2,dismiss:e=>{l.decrement(),t.emit("dismiss",e)}});async function v(e){await m.dismiss(e)}let b=()=>{};p((()=>{b()}));return{ns:a,el:i,arrEl:s,isShow:o,modal:m,popoverZIndex:r,onMaskClick:()=>{!0===e.opts.autoClose&&v()},present:async function(t){o.value=!0,b=Mi(t,i.value,(()=>async function(e,t,a,n){const o=[Ni(n.offsetOpts||6),Bi(),_i()];n.noArrow||o.push(Ri({element:a}));const i={placement:n.placement,strategy:"absolute",middleware:o};n.options&&Object.assign(i,n.options);const s=await Li(e,t,i);{const{x:e,y:o,placement:i,middlewareData:l}=s,{style:r}=t;if(r.left="".concat(e,"px"),r.top="".concat(o,"px"),!n.noArrow){const{x:e,y:t}=l.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(a.style,{left:null!=e?"".concat(e,"px"):"",top:null!=t?"".concat(t,"px"):"",right:"",bottom:"",[n]:"-4px"})}}}(t,i.value,s.value,e.opts)))},dismiss:v,customStyle:c}},render(){var e,t;const a=o("div",{class:[this.ns.b(),this.ns.is("show",this.isShow),this.opts.modalClass||""],ref:"el",style:this.customStyle,onClick:e=>{e.stopPropagation()}},[!this.opts.noArrow&&o("div",{class:[this.ns.e("arrow")],ref:"arrEl"},null),null==(t=(e=this.$slots).default)?void 0:t.call(e,this.modal)]);return!0===this.opts.autoClose?o("div",{class:[this.ns.e("overlay")],style:{zIndex:this.popoverZIndex},onClick:()=>{this.onMaskClick()}},[a]):a}});const Ls=e("c2",(()=>o("svg",{"data-v-9a20e128":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[o("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"},null)]))),js=e("c3",(()=>o("svg",{"data-v-9a20e128":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[o("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"},null)])));function Vs(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Fs=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("modal"),o=n(!1),{zIndex:i}=G(),s=i.increment();let l;const r=u({}),{width:c,height:d}=e.opts;c&&(fi(c)?r.width=Mt(c,"modal"):r.width=c),d&&(fi(d)?r.height=Mt(d,"modal"):r.height=d);const p=n({footerHide:!0,modalClass:""});e.opts&&Object.assign(p.value,e.opts);const h=new sa({mode:p.value.isRouteModal?la.ROUTE_MODAL:la.MODAL,viewUsage:2,dismiss:e=>{i.decrement(),o.value=!1,t.emit("dismiss",e)}}),m=new ra;m.hooks.viewCreated.tapPromise((async e=>{l=e.view}));return{ns:a,isShow:o,options:p,modalZIndex:s,customStyle:r,modal:h,viewShellHooks:m,present:()=>{o.value=!0},dismiss:e=>{h.dismiss(e)},onBeforeClose:async e=>{await h.dismiss()&&e()},prevRecord:()=>{null==l||l.call(ca.PREV_RECORD)},nextRecord:()=>{null==l||l.call(ca.NEXT_RECORD)},handleViewCreated:e=>{l=e.view}}},render(){var e,t;let a,n;return r(i("el-dialog"),{modelValue:this.isShow,alignCenter:!0,class:[this.ns.b(),this.options.placement&&this.ns.m(this.options.placement),this.options.modalClass],style:this.customStyle,zIndex:this.modalZIndex,beforeClose:this.onBeforeClose,...this.options},[null==(t=(e=this.$slots).default)?void 0:t.call(e,this.modal,this.viewShellHooks),this.options.openIndicator&&o("div",{class:this.ns.e("record")},[o(i("el-button"),{class:this.ns.em("record","prev"),title:ibiz.i18n.t("util.appModal.prev"),onClick:this.prevRecord},Vs(a=Ls())?a:{default:()=>[a]}),o(i("el-button"),{class:this.ns.em("record","next"),title:ibiz.i18n.t("util.appModal.next"),onClick:this.nextRecord},Vs(n=js())?n:{default:()=>[n]})])])}});const Us=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("drawer"),o=n(!1);let i;const{zIndex:s}=G(),l=s.increment(),r=n("100%"),{width:c,height:d,placement:u}=e.opts;"top"!==u&&"bottom"!==u||(fi(d)?r.value=Mt(d,"drawer"):r.value="100%"),"left"!==u&&"right"!==u||(fi(c)?r.value=Mt(c,"drawer"):r.value=800);const p=new sa({mode:la.DRAWER,viewUsage:2,dismiss:e=>{s.decrement(),o.value=!1,i=e}});let h="";switch(e.opts.placement){case"left":h="ltr";break;case"top":h="ttb";break;case"bottom":h="btt";break;default:h="rtl"}return{ns:a,isShow:o,size:r,direction:h,drawerZIndex:l,modal:p,dismiss:e=>{p.dismiss(e)},present:()=>{o.value=!0},onClosed:()=>{t.emit("dismiss",i)},onBeforeClose:async e=>{await p.dismiss()&&e()}}},render(){var e,t;const a=this.opts||{};return r(i("el-drawer"),{modelValue:this.isShow,lockScroll:!0,size:this.size,class:this.ns.b(),zIndex:this.drawerZIndex,direction:this.direction,beforeClose:this.onBeforeClose,onClosed:this.onClosed,...a},null==(t=(e=this.$slots).default)?void 0:t.call(e,this.modal))}});const Hs=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("float-window"),o=n(),i=n(!1);let s;const{zIndex:l}=G(),r=l.increment(),c=n({width:500,height:600,x:100,y:100});e.opts&&Object.assign(c.value,e.opts);const p=u({x:window.innerWidth-600,y:100,width:500,height:600,minWidth:300,minHeight:300}),h=()=>({left:"".concat(p.x,"px"),top:"".concat(p.y,"px"),height:"".concat(p.height,"px"),width:"".concat(p.width,"px"),zIndex:r}),m=()=>{Object.assign(o.value,h())};d((()=>{const e=o.value.getElementsByClassName(a.b("drag-handle")),t=e[0]?e[0]:o.value;ji(t).draggable({modifiers:[ji.modifiers.restrictRect({restriction:document.body,endOnly:!0})],cursorChecker:()=>"move",listeners:{move:e=>{p.x+=e.dx,p.y+=e.dy,m()}}}),ji(o.value).resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},margin:6,modifiers:[ji.modifiers.restrictEdges({outer:document.body}),ji.modifiers.restrictSize({min:{width:p.minWidth,height:p.minHeight}})],inertia:!0,listeners:{move:e=>{p.x+=e.deltaRect.left,p.y+=e.deltaRect.top,p.width=e.rect.width,p.height=e.rect.height,m()}}})}));const v=new sa({mode:la.MODAL,viewUsage:2,dismiss:e=>{l.decrement(),i.value=!1,s=e}});return{ns:a,isShow:i,options:c,modalZIndex:r,modal:v,calcStyle:h,present:()=>{i.value=!0},dismiss:e=>{v.dismiss(e)},onClosed:()=>{t.emit("dismiss",s)},containerRef:o}},render(){var e,t;return o("div",{class:[this.ns.b(),this.ns.is("show",this.isShow),this.options.windowClass],style:this.calcStyle(),"z-index":this.modalZIndex,ref:"containerRef"},[o("div",{class:this.ns.b("header")},[o("div",{class:this.ns.be("header","caption")},null),o("div",{class:this.ns.b("actions")},[o("i",{class:this.ns.b("action-item"),onClick:()=>{this.dismiss()}},null)])]),o("div",{class:this.ns.b("content")},[null==(t=(e=this.$slots).default)?void 0:t.call(e,this.modal),h("+")])])}});function qs(e){return yi(e)?i(e):e}class Gs{popover(e,t,a,n){const o=this.createPopover(t,a,n);return o.present(e),o.onWillDismiss()}createPopover(e,t,a){return function(e,t){return new q(Rs,e,t)}(wi(e)?e:()=>r(qs(e),{...t}),a)}drawer(e,t,a){const n=this.createDrawer(e,t,a);return n.present(),n.onWillDismiss()}createDrawer(e,t,a){return function(e,t){return new W(Us,e,t)}(wi(e)?e:()=>r(qs(e),{...t}),a)}async modal(e,t,a){const n=this.createModal(e,t,a);return n.present(),n.onWillDismiss()}createModal(e,t,a){return function(e,t){return new W(Fs,e,t)}(wi(e)?e:()=>r(qs(e),{...t}),a)}async floatWindow(e,t,a){const n=this.createFloatWindow(e,t,a);return n.present(),n.onWillDismiss()}createFloatWindow(e,t,a){return function(e,t){return new W(Hs,e,t)}(wi(e)?e:()=>r(qs(e),{...t}),a)}}function Ws(e){const t=()=>{const t=e;Array.isArray(t.state.simpleData)&&(t.state.items=Ci(t.state.simpleData,t.state.size)[t.state.curPage-1]||[],t.state.rows=t.state.items.map((e=>new da(new ua(e),t))))};return{onPageChange:function(a){a&&a!==e.state.curPage&&(e.state.curPage=a,"DESIGN"!==e.runMode?e.load():t())},onPageSizeChange:function(a){a&&a!==e.state.size&&(e.state.size=a,"DESIGN"!==e.runMode?(1!==e.state.curPage&&(e.state.curPage=1),e.load()):t())},onPageRefresh:function(){e.load()}}}e("bV",Gs);const Ks=a({name:"IBizAddinChanged",props:{msg:{type:Object,required:!0}},emits:{close:()=>!0},setup:()=>({ns:B("addin-changed"),onClick:()=>{window.location.reload()}}),render(){return o("div",{class:[this.ns.b()],onClick:this.onClick,title:zt(ibiz.i18n.t("panelComponent.addinChanged.tip"))},[o("div",{class:this.ns.b("left")},[o("ion-icon",{name:"list-outline"},null)]),o("div",{class:this.ns.b("center")},[o("div",{class:this.ns.e("caption")},[ibiz.i18n.t("panelComponent.addinChanged.title")]),o("div",{class:this.ns.e("content")},[ibiz.i18n.t("panelComponent.addinChanged.content")])])])}});var Ys=Object.defineProperty,Xs=(e,t,a)=>(((e,t,a)=>{t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class $s{constructor(){Xs(this,"doingNotice")}async showAsyncAction(e){const t=B("async-action-notice"),a=await pa(e);if(a.render){const n=li({customClass:t.b(),message:a.render({action:e,onClose:()=>{n.close()}}),position:"bottom-right",duration:[10,20].includes(e.actionstate)?0:void 0})}}showDoingNotice(e){if(this.doingNotice)Object.assign(this.doingNotice.info,e);else{const t=u(e),a=li({message:r(xl,{info:t}),onClose:()=>{this.closeDoingNotice()},position:"bottom-right",duration:0});this.doingNotice={info:t,close:()=>a.close()}}}closeDoingNotice(){this.doingNotice&&(this.doingNotice.close(),this.doingNotice=void 0)}showAddInChangedNotice(e){const t=B("addin-changed-notice"),a=li({customClass:t.b(),message:r(Ks),onClose:()=>{a.close()},position:"bottom-right"})}}e("bX",$s);class Js{renderViewShell(e,t,a,n,o={}){const s={viewId:e,modelData:t,context:a,params:n,...o};return r(i("IBizViewShell"),s)}renderCtrlShell(e,t,a,n={}){const o={modelData:e,context:t,params:a,...n};return r(i("IBizControlShell"),o)}renderComponent(e,t){return r(i(e),t)}}function Qs(e){var t,a;const n=[],o=[],i=[],s=[];return null==(a=null==(t=e.deuiactionGroup)?void 0:t.uiactionGroupDetails)||a.forEach((e=>{var t,a,l,r,c;const d={appId:e.appId,id:e.uiactionId,label:e.showCaption?e.caption:"",title:e.tooltip,icon:{showIcon:e.showIcon,cssClass:null==(t=e.sysImage)?void 0:t.cssClass,imagePath:null==(a=e.sysImage)?void 0:a.imagePath}};e.sysImage&&e.sysImage.imagePath&&!e.sysImage.imagePath.startsWith("http")&&(d.icon.imagePath="".concat(ibiz.env.assetsUrl,"/images/").concat(e.sysImage.imagePath)),(null==(l=e.uiactionId)?void 0:l.startsWith("msg_content_"))?n.push(d):(null==(r=e.uiactionId)?void 0:r.startsWith("msg_footer_"))?o.push(d):(null==(c=e.uiactionId)?void 0:c.startsWith("question_"))?i.push(d):s.push(d)})),{contentToolbarItems:n,footerToolbarItems:o,questionToolbarItems:i,otherToolbarItems:s}}e("bY",Js);var Zs=Object.defineProperty,el=(e,t,a)=>(((e,t,a)=>{t in e?Zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tl{constructor(e){this.router=e,el(this,"viewCacheCenter",new Map)}async onRouteIsReady(){return this.router.isReady()}async login(e,t,a,n,o){const i=await ibiz.auth.login(e,t,a,n);return!0===i&&(window.location.hash=this.router.currentRoute.value.query.ru||"/",window.history.pushState({},""),window.location.reload()),i}async logout(e){const t=await ibiz.auth.logout();if(t){const e=window.location;if(-1!==e.search.indexOf("isAnonymous=true")){const t="".concat(e.origin).concat(e.pathname).concat(e.hash);window.history.replaceState({},"",t)}await this.router.push("/login"),ibiz.util.showAppLoading(),window.location.reload()}return t}async changePwd(e,t,a){if(this.validatePwd(e,t,a)){return await ibiz.auth.changePwd(e,t)}return{ok:!1,result:{}}}switchOrg(e,t,a){throw new Error("Method not implemented.")}switchTheme(e,t,a){throw new Error("Method not implemented.")}switchLanguage(e,t,a){throw new Error("Method not implemented.")}getAppContext(){return K(this.router.currentRoute.value).appContext}validatePwd(e,t,a={}){const{surePwd:n}=a;return e?t?n?e===t?(ibiz.message.error("新密码不能与旧密码一致"),!1):t===n||(ibiz.message.error("两次密码不一致"),!1):(ibiz.message.error("确认密码不能为空"),!1):(ibiz.message.error("新密码不能为空"),!1):(ibiz.message.error("原密码不能为空"),!1)}async openAiChat(e){const{data:a,view:n,ctrl:o,params:i,context:s,appDEACModeId:l,appDataEntityId:r}=e,c=await ha(l,r,s.srfappid);if(!c)return Promise.resolve([]);const{contentToolbarItems:d,footerToolbarItems:u,questionToolbarItems:p,otherToolbarItems:h}=Qs(c),m=await t.import("@ibiz-template-plugin/ai-chat"),v=m.chat||m.default.chat,b=[],g=ia(r);let f="".concat(s.srfsystemid,"_").concat(s.srfappid,"_").concat(r,"_").concat(l,"_");f+=s[g]?s[g]:ei();const w="[".concat(c.logicName,"]").concat((null==a?void 0:a.srfmajortext)||""),y={...i,srfactag:c.codeName},{zIndex:C}=G(),I=C.increment();return new Promise((e=>{let t,l="";v.create({mode:"TOPIC",containerOptions:{zIndex:I,enableBackFill:!1},topicOptions:{appid:ibiz.env.appId,id:f,caption:w,url:window.location.hash.substring(1),type:s.srftopicpath||"default",beforeDelete:async(...e)=>{const t=e[4];return await ibiz.confirm.warning({title:ibiz.i18n.t("util.appUtil.".concat(t?"clearTopic":"aiTitle")),desc:ibiz.i18n.t("util.appUtil.".concat(t?"clearTopicDesc":"aiDesc"))})},action:async(e,t,a,n,o)=>("LINK"===e&&await ibiz.openView.push(n.url),!0),configService:(e,t,a)=>new ma(e,t,a)},chatOptions:{caption:c.logicName,context:{...s},params:y,appendCurData:"true"===s.srfaiappendcurdata?a:void 0,appDataEntityId:r,contentToolbarItems:d,footerToolbarItems:u,questionToolbarItems:p,otherToolbarItems:h,question:async(e,a,n,o,i,s)=>{l=ei(),t=new AbortController;const r=await ibiz.hub.getApp(a.srfappid).deService.getService(a,o.appDataEntityId);try{await r.aiChatSse((t=>{if(20===t.actionstate&&t.actionresult)e.addMessage({messageid:l,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t.actionresult});else if(30===t.actionstate&&t.actionresult){const a=JSON.parse(t.actionresult).choices;a&&a.length>0&&e.replaceMessage({messageid:l,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:a[0].content||""})}else 40===t.actionstate&&e.replaceMessage({messageid:l,state:t.actionstate,type:"ERROR",role:"ASSISTANT",content:t.actionresult})}),t,a,n,{messages:i,sessionid:s})}catch(a){e.replaceMessage({messageid:l,state:40,type:"ERROR",role:"ASSISTANT",content:a.message||ibiz.i18n.t("app.aiError")}),null==t||t.abort()}finally{return e.completeMessage(l,!0),!0}},abortQuestion:async e=>{null==t||t.abort(),await e.stopMessage({messageid:l,state:30,type:"DEFAULT",role:"ASSISTANT",content:""}),await e.completeMessage(l,!0)},closed:()=>{e(b)},history:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=a.appendCurData?a.appendCurData:{},i=await n.aiChatHistory(e,t,o);if(i.data&&Array.isArray(i.data)){let e;i.data.forEach((t=>{if("TOOL"===t.role)e&&t.content&&v.aiChat.updateRecommendPrompt(e,t.content);else{const a={messageid:ei(),state:30,type:"DEFAULT",role:t.role,content:t.content,completed:!0};e=a,v.aiChat.addMessage(a)}}))}return!0},recommendPrompt:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=await n.aiChatRecommendPrompt(e,t,a.message);if(o.ok&&o.data){const e=o.data.choices;return e&&e.length>0?e[0]:null}return null},uploader:{onUpload:async(e,t,a)=>{const{uploadUrl:n}=ibiz.util.file.calcFileUpDownUrl((null==a?void 0:a.context)||s,(null==a?void 0:a.params)||i,{}),o=ibiz.util.file.getUploadHeaders(),l=new FormData;l.append("file",e);return(await ibiz.net.axios({url:n,method:"post",headers:o,data:l,onUploadProgress:e=>{const a=e.loaded/e.total*100;t(a)}})).data}},extendToolbarClick:async(e,t,a,i,s)=>{var l,r;const c=await va.exec(t.id,{view:n,ctrl:o,context:Nt.create(a),params:i,data:[s],event:e},t.appId);if(c.closeView)n.closeView({ok:!0});else if(c.refresh)switch(c.refreshMode){case 1:n.callUIAction(ca.REFRESH);break;case 2:null==(l=n.parentView)||l.callUIAction(ca.REFRESH);break;case 3:null==(r=n.getTopView())||r.callUIAction(ca.REFRESH)}return c}}})}))}route2routeObject(e){return K(this.router.currentRoute.value)}routeObject2String(e){return Y(e)}}e("bZ",tl);const al="ibiz",nl=a({name:"AlarmClock",setup(){const e=B("alarm-clock"),t=n("00:00");let a,i=0,s=0;function l(){var e,a;s++,60===s&&(s=0,i++),60===i&&(i=0),t.value=(a=s,"".concat((e=i)<10?"0".concat(e):e,":").concat(a<10?"0".concat(a):a))}d((()=>{a=setInterval(l,1e3)})),m((()=>{clearInterval(a)}));return{ns:e,close:()=>{const e=document.getElementById("alarm-clock");e&&e.parentElement&&e.parentElement.removeChild(e)},closeSvg:()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{id:"atjaction/quit","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M11.628 2.015a7.438 7.438 0 0 1 1.855 1.5 7.256 7.256 0 0 1 1.858 4.853c0 4.05-3.324 7.332-7.42 7.332C3.824 15.7.5 12.419.5 8.368c0-1.812.668-3.523 1.858-4.854a7.428 7.428 0 0 1 1.855-1.5.6.6 0 0 1 .595 1.043 6.238 6.238 0 0 0-1.556 1.257A6.056 6.056 0 0 0 1.7 8.368c0 3.385 2.783 6.132 6.22 6.132 3.438 0 6.221-2.747 6.221-6.132 0-1.514-.558-2.941-1.552-4.054a6.228 6.228 0 0 0-1.556-1.257.6.6 0 1 1 .595-1.042zM7.921.5a.6.6 0 0 1 .592.503l.008.097v7.18a.6.6 0 0 1-1.193.097l-.007-.098V1.1a.6.6 0 0 1 .6-.6z",id:"atj形状结合"},null)])]),formattedTime:t,timerInterval:a}},render(){return o("div",{ref:"componentRef",class:this.ns.b()},[o("div",{class:this.ns.e("wrapper")},[o("div",{class:this.ns.e("light-counter")},[this.formattedTime]),o("div",{class:this.ns.e("svg-wrapper")},[o("div",{class:this.ns.e("svg"),onClick:()=>this.close()},[this.closeSvg()])])])])}}),ol=a({name:"IBizFullscreenToolbar",setup(){const e=B("fullscreen-toolbar"),t=n(),a=n(),i=n(!1),s=n(0),l=n(0);let r=0,c=0;const u=()=>{if(a.value.globalCompositeOperation="destination-out",a.value.fillStyle="rgba(0, 0, 0, 0.05)",a.value.fillRect(0,0,t.value.width,t.value.height),a.value.globalCompositeOperation="source-over",i.value){const e=Math.sqrt((s.value-r)**2+(l.value-c)**2),t=Math.max(Math.round(e/5),1);for(let e=0;e<t;e++){const n=e/t,o=r+(s.value-r)*n,i=c+(l.value-c)*n;a.value.beginPath(),a.value.arc(o,i,5,0,2*Math.PI),a.value.fillStyle="#eb4c4a",a.value.fill()}r=s.value,c=l.value}requestAnimationFrame(u)},p=()=>{if(ibiz.fullscreenUtil.FullscreenClass){const e=document.querySelector(".".concat(ibiz.fullscreenUtil.FullscreenClass));e&&e.classList.toggle(ibiz.fullscreenUtil.FullscreenClass)}},h=n(),b=()=>{if(document.fullscreenElement);else{const e=document.getElementById("fullscreen");e&&(p(),e.parentElement&&e.parentElement.removeChild(e))}};return d((()=>{a.value=t.value.getContext("2d"),window.addEventListener("resize",(()=>{t.value.width=window.innerWidth,t.value.height=window.innerHeight})),t.value.addEventListener("mousemove",(e=>{s.value=e.clientX,l.value=e.clientY})),document.addEventListener("mousemove",(e=>{i.value||(s.value=e.clientX,l.value=e.clientY,r=e.clientX,c=e.clientY)})),a.value.clearRect(0,0,t.value.width,t.value.height),a.value.fillStyle="lightgray",a.value.fillRect(0,0,t.value.width,t.value.height),u(),window.dispatchEvent(new Event("resize")),document.addEventListener("fullscreenchange",b)})),m((()=>{document.removeEventListener("fullscreenchange",b)})),{ns:e,laserPointerSvg:()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{id:"aoeeditor/laser-pointer","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M8.203 15.947a3 3 0 0 1-.198-5.993l-.069.005.926-1.19H3c-1.543 0-2.461-1.648-1.762-2.945l.075-.129.086-.125.083-.103.098-.093L8.97.097c.42-.3.941.15.755.593l-.04.078-2.483 4h5.75c1.488 0 2.414 1.548 1.813 2.841l-.067.133-.079.13-.066.092-3.351 5.098.002-.115a3 3 0 0 1-3 3zm0-4.8a1.8 1.8 0 1 0 0 3.6 1.8 1.8 0 0 0 0-3.6zm-.685-8.785L2.215 6.149l-.024.032c-.436.59-.092 1.416.589 1.564l.11.018.11.006h6.884a.5.5 0 0 1 .442.734l-.047.073-1.174 1.51-.011-.004a3.008 3.008 0 0 1 1.826 1.592l-.001-.003L13.728 7.4l.064-.09c.408-.624-.003-1.456-.73-1.534l-.112-.006H6.304a.5.5 0 0 1-.462-.69l.037-.074 1.64-2.643z",id:"aoe形状结合"},null)])]),alarmClockSvg:()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{id:"aah工时","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M9.6.2v1.2H8.099v1.427a6.486 6.486 0 0 1 4.27 2.167l.663-.528-.332-.41.933-.756 1.321 1.632-.932.755-.235-.289-.708.565A6.5 6.5 0 1 1 6.9 2.827V1.4H5.4V.2h4.2zM7.5 4a5.3 5.3 0 1 0 0 10.6A5.3 5.3 0 0 0 7.5 4zm.6 1.687v3.45l3.187.001v1.2H6.9v-4.65h1.2z",id:"aah形状结合"},null)])]),compressArrowsSvg:()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{id:"ahsaction/compress-arrows","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M4.069 5.246L.792 1.815a.6.6 0 1 1 .868-.83l3.204 3.356V2.92a.6.6 0 1 1 1.2 0V5.84l.002.007a.6.6 0 0 1-.601.6H2.543a.6.6 0 0 1 0-1.2h1.526zm6.175 1.01l-.007.002a.599.599 0 0 1-.6-.6V2.737a.6.6 0 1 1 1.2 0v1.526l3.43-3.277a.601.601 0 0 1 .83.868l-3.355 3.204h1.419a.6.6 0 0 1 0 1.2h-2.917zm1.586 4.802l3.276 3.431a.6.6 0 1 1-.868.829l-3.204-3.355v1.419a.6.6 0 1 1-1.2 0v-2.917l-.001-.007a.6.6 0 0 1 .6-.6h2.922a.6.6 0 1 1 0 1.2H11.83zm-6.185-.996a.6.6 0 0 1 .6.6v2.922a.6.6 0 1 1-1.2 0v-1.526l-3.43 3.277a.6.6 0 1 1-.83-.868l3.355-3.204H2.721a.6.6 0 1 1 0-1.2h2.917l.007-.001z",id:"ahs形状结合"},null)])]),laserPointerClick:()=>{i.value=!i.value},alarmClockClick:()=>{const e=document.getElementById("fullscreen"),t=document.createElement("div");if(t.id="alarm-clock",t.style.zIndex="9999",e){e.appendChild(t);v(nl).mount(t)}},compressArrowsClick:()=>{const e=document.getElementById("fullscreen");e&&(document.exitFullscreen(),p(),e.parentElement&&e.parentElement.removeChild(e))},laserPointerCanvas:t,isLaserEnabled:i,editorRef:h}},render(){return o("div",{class:[this.ns.b()],ref:"editorRef"},[o("div",{class:[this.ns.e("wrapper")]},[o("div",{class:[this.ns.e("wrapper-content")]},[o(i("el-tooltip"),{effect:"dark",content:"激光笔",placement:"top",offset:10,teleported:!0,"append-to":this.editorRef,"popper-class":this.ns.e("tooltip"),"popper-options":{modifiers:[{name:"offset",options:{offset:[0,20]}}]}},{default:()=>[o("div",{class:this.ns.e("item"),onClick:()=>this.laserPointerClick()},[this.laserPointerSvg()])]}),o(i("el-tooltip"),{effect:"dark",content:"关灯计时",placement:"top",offset:10,teleported:!0,"append-to":this.editorRef,"popper-class":this.ns.e("tooltip"),"popper-options":{modifiers:[{name:"offset",options:{offset:[0,20]}}]}},{default:()=>[o("div",{class:this.ns.e("item"),onClick:()=>this.alarmClockClick()},[this.alarmClockSvg()])]}),o("div",{class:this.ns.e("divider")},null),o(i("el-tooltip"),{effect:"dark",content:"退出演示模式",placement:"top",offset:10,teleported:!0,"append-to":this.editorRef,"popper-class":this.ns.e("tooltip"),"popper-options":{modifiers:[{name:"offset",options:{offset:[0,20]}}]}},{default:()=>[o("div",{class:this.ns.e("item"),onClick:()=>this.compressArrowsClick()},[this.compressArrowsSvg()])]})])]),o("div",{class:this.ns.e("canvas")},[o("canvas",{ref:"laserPointerCanvas",style:"background-color: transparent;",class:this.isLaserEnabled?"cursor":"nocursor"},null)])])}});var il=Object.defineProperty,sl=(e,t,a)=>(((e,t,a)=>{t in e?il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ll{constructor(){sl(this,"FullscreenClass","")}get isFullScreen(){return!!document.fullscreenElement}openElementFullscreen(e,t){if(!this.FullscreenClass&&t&&t.class&&(this.FullscreenClass=t.class),!document.fullscreenElement&&e){e.requestFullscreen(),this.FullscreenClass&&e.classList.toggle(this.FullscreenClass),e.style.background="var(--".concat(al,"-color-bg-1)");const t=document.createElement("div");t.id="fullscreen",t.style.position="absolute",t.style.bottom="20px",t.style.left="45%",e.appendChild(t);const a=v(ol);a.use(ri),a.mount(t)}}closeElementFullscreen(){document.exitFullscreen()}}function rl(e=document,t=["a","input","button","textarea","select",'[tabindex]:not([tabindex="-1"])'],a){const n=t.join(",");return{cleanup:Bt(window,"keydown",(t=>{if("Enter"===t.key){t.preventDefault();const o=document.activeElement,i=Array.from(e.querySelectorAll(n)),s=i.indexOf(o),l=i[s+1];l?l.focus():null==a||a()}}),{capture:!0})}}function cl(e){let t="default";return e&&["PRIMARY","SUCCESS","WARNING","DANGER","INFO"].includes(e)&&(t=e.toLowerCase()),e&&["INVERSE"].includes(e)&&(t="text"),t}e("b_",ll);const dl=e("g",a({name:"IBizRawItem",props:{type:{type:String,required:!1},content:{type:[String,Object,Number]},rawItem:{type:Object,required:!1}},setup(e){var t,a;const o=B("rawitem");let i=null,s="";e.rawItem&&(i=e.rawItem.rawItem,s=i.contentType);const l=n(e.type||s||""),r=n("");let d;"IMAGE"===s&&(d=i.sysImage),"RAW"===s||"HTML"===s?"RAW"===s?(l.value="TEXT",r.value=i.caption):r.value=i.content:["INFO","WARNING","ERROR"].includes(s)?r.value=i.rawContent:["VIDEO","DIVIDER"].includes(s)||"IMAGE"===s&&d&&(r.value=d);const u=n({id:ei(),path:"",mute:!0,autoplay:!0,replay:!1,showcontrols:!0}),p=n({contentPosition:"center",html:""}),h=n({type:"info",title:"",closeabled:!0,showIcon:!1}),m=n(""),v=()=>{var t;if("IMAGE"===l.value&&(e.content&&"string"==typeof e.content?(t=e.content,/^https?:|^http?:|(\.png|\.svg|\.jpg|\.png|\.gif|\.psd|\.tif|\.bmp|\.jpeg)/.test(t)?r.value={imagePath:e.content}:r.value={cssClass:e.content}):d&&(r.value=d)),["TEXT","HEADING1","HEADING2","HEADING3","HEADING4","HEADING5","HEADING6","PARAGRAPH","HTML","RAW"].includes(l.value)&&(m.value=r.value,"string"==typeof m.value)){const e=m.value;m.value=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;nbsp;/g," ").replace(/&nbsp;/g," ")}if("HTML"!==l.value||(e=>{try{return(new DOMParser).parseFromString(e,"text/html").body.children.length>0}catch(e){return!1}})(m.value)||(m.value=m.value.replace(/\n/g,"<br>")),"HTML"===l.value&&(m.value=ys(m.value)),["VIDEO","DIVIDER","INFO","WARNING","ERROR"].includes(l.value)&&r.value){let e={};try{if("string"==typeof r.value){switch(e=new Function("return (".concat(r.value,");"))(),l.value){case"VIDEO":Object.assign(u.value,e);break;case"DIVIDER":Object.assign(p.value,e);break;case"INFO":case"WARNING":case"ERROR":h.value.type=l.value.toLocaleLowerCase(),Object.assign(h.value,e)}}}catch(e){ibiz.log.error(ibiz.i18n.t("component.rawItem.errorConfig",{type:l.value}))}}};return(null==(a=null==(t=e.rawItem)?void 0:t.rawItem)?void 0:a.templateMode)||v(),c((()=>e.content),((e,t)=>{e&&e!==t&&(r.value=e,v())}),{immediate:!0}),{ns:o,rawItemText:m,playerParams:u,dividerParams:p,alertParams:h,rawItemType:l,rawItemContent:r}},render(){return o("div",{class:this.ns.b()},[(()=>"IMAGE"===this.rawItemType?o(i("i-biz-icon"),{class:[this.ns.e("image")],icon:this.rawItemContent},null):"TEXT"===this.rawItemType||"RAW"===this.rawItemType?o("span",{class:this.ns.e("text")},[this.rawItemText]):"HEADING1"===this.rawItemType?o("h1",{class:this.ns.e("h1")},[this.rawItemText]):"HEADING2"===this.rawItemType?o("h2",{class:this.ns.e("h2")},[this.rawItemText]):"HEADING3"===this.rawItemType?o("h3",{class:this.ns.e("h3")},[this.rawItemText]):"HEADING4"===this.rawItemType?o("h4",{class:this.ns.e("h4")},[this.rawItemText]):"HEADING5"===this.rawItemType?o("h5",{class:this.ns.e("h5")},[this.rawItemText]):"HEADING6"===this.rawItemType?o("h6",{class:this.ns.e("h6")},[this.rawItemText]):"PARAGRAPH"===this.rawItemType?o("p",{class:this.ns.e("paragraph")},[this.rawItemText]):"HTML"===this.rawItemType?o("div",{class:this.ns.e("paragraph"),innerHTML:this.rawItemText},null):"VIDEO"===this.rawItemType?o("div",{class:this.ns.e("video")},[o("video",{id:this.playerParams.id,src:this.playerParams.path,autoplay:this.playerParams.autoplay,controls:this.playerParams.showcontrols,loop:this.playerParams.replay,muted:this.playerParams.mute},[o("source",{src:this.playerParams.path,type:"video/mp4"},null),o("source",{src:this.playerParams.path,type:"video/ogg"},null),o("source",{src:this.playerParams.path,type:"video/webm"},null),ibiz.i18n.t("component.rawItem.noSupportVideo")])]):"DIVIDER"===this.rawItemType?o(i("el-divider"),{"content-position":this.dividerParams.contentPosition},{default:()=>[o("span",{innerHTML:this.dividerParams.html},null)]}):"INFO"===this.rawItemType||"WARNING"===this.rawItemType||"ERROR"===this.rawItemType?o(i("el-alert"),{title:this.alertParams.title,type:this.alertParams.type,"show-icon":this.alertParams.showIcon,closable:this.alertParams.closeabled},null):"MARKDOWN"===this.rawItemType?o(i("iBizMarkDown"),{value:this.content,disabled:!0},null):(["PLACEHOLDER"].includes(this.rawItemType),null))()])}})),ul=a({name:"IBizNoData",props:{text:{type:String,default:"暂无数据"},emptyTextLanguageRes:{type:Object,default:void 0},hideNoDataImage:{type:Boolean,default:!1}},setup(e){const t=B("no-data"),a=n(e.text);return e.emptyTextLanguageRes&&(a.value=ibiz.i18n.t(e.emptyTextLanguageRes.lanResTag,e.text)),{ns:t,label:a}},render(){return o(i("el-empty"),{class:[this.ns.b(),this.hideNoDataImage?"hideImage":""],description:this.label},{default:()=>{var e,t;return[null==(t=(e=this.$slots).default)?void 0:t.call(e)]}})}}),pl=e("h",a({name:"IBizSplit",props:{modelValue:{type:[Number,String],default:.5},mode:{validator:e=>["horizontal","vertical"].includes(e),default:"horizontal"},min:{type:[Number,String],default:"30px"},max:{type:[Number,String],default:"30px"}},emits:["update:modelValue","on-move-start","on-moving","on-move-end"],setup(e,{emit:t}){const a=B("split"),o=n(null),i=n(0),s=n(0),r=n(!1),u=n(0),p=n(0),h=n(.5),v=n(0),g=l((()=>[a.b("wrapper"),a.is("no-select",r.value)])),f=l((()=>[a.b("pane"),r.value?a.bm("pane","moving"):""])),w=l((()=>"horizontal"===e.mode)),y=l((()=>100-i.value)),C=l((()=>"string"==typeof e.modelValue)),I=l((()=>w.value?"offsetWidth":"offsetHeight")),D=(e,t)=>parseFloat(e)/parseFloat(t),E=t=>{const a=o.value[I.value];return C.value?"string"==typeof e[t]?e[t]:a*e[t]:"string"==typeof e[t]?D(e[t],a):e[t]},S=(e,t)=>C.value?"".concat(Math.max(parseFloat(e),parseFloat(t)),"px"):Math.max(e,t),x=e=>{let t=0;return t=C.value?"".concat(o.value[I.value]-parseFloat(e),"px"):1-e,t},P=a=>{const n=(w.value?a.pageX:a.pageY)-v.value,i=o.value[I.value];let l=C.value?"".concat(parseFloat(s.value)+n,"px"):D(i*s.value+n,i);const r=x(l);parseFloat(l)<=parseFloat(u.value)&&(l=S(l,u.value)),parseFloat(r)<=parseFloat(p.value)&&(l=x(S(r,p.value))),Object.assign(a,{atMin:e.modelValue===u.value,atMax:C.value?x(e.modelValue)===p.value:x(e.modelValue).toFixed(5)===p.value.toFixed(5)}),t("update:modelValue",l),t("on-moving",a)},k=()=>{r.value=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",k),t("on-move-end")},T=()=>{b((()=>{u.value=E("min"),p.value=E("max"),i.value=1e4*(C.value?D(e.modelValue,o.value[I.value]):e.modelValue)/100}))};return c((()=>e.modelValue),(e=>{e!==h.value&&(h.value=e,T())})),d((()=>{b((()=>{T()})),window.addEventListener("resize",T)})),m((()=>{window.removeEventListener("resize",T)})),{ns:a,outerWrapper:o,offset:i,wrapperClasses:g,paneClasses:f,isHorizontal:w,anotherOffset:y,handleMousedown:a=>{v.value=w.value?a.pageX:a.pageY,s.value=e.modelValue,r.value=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",k),t("on-move-start")}}},render(){var e,t,a,n,s,l,r,c,d,u,p,h;return o("div",{class:this.wrapperClasses,ref:"outerWrapper"},[this.isHorizontal?o("div",{class:this.ns.m("horizontal")},[o("div",{style:{width:"".concat(this.offset,"%")},class:[this.paneClasses,this.ns.bm("pane","left")]},[null==(t=(e=this.$slots).left)?void 0:t.call(e)]),o("div",{style:{left:"".concat(this.offset,"%")},class:this.ns.b("trigger-con"),onMousedown:e=>this.handleMousedown(e)},[(null==(n=(a=this.$slots).trigger)?void 0:n.call(a))||o(i("iBizSplitTrigger"),{mode:"vertical"},null)]),o("div",{style:{width:"".concat(this.anotherOffset,"%")},class:[this.paneClasses,this.ns.bm("pane","right")]},[null==(l=(s=this.$slots).right)?void 0:l.call(s)])]):o("div",{class:this.ns.m("vertical")},[o("div",{style:{bottom:"".concat(this.anotherOffset,"%")},class:[this.paneClasses,this.ns.bm("pane","top")]},[null==(c=(r=this.$slots).top)?void 0:c.call(r)]),o("div",{style:{top:"".concat(this.offset,"%")},class:this.ns.b("trigger-con"),onMousedown:e=>this.handleMousedown(e)},[(null==(u=(d=this.$slots).trigger)?void 0:u.call(d))||o(i("iBizSplitTrigger"),{mode:"horizontal"},null)]),o("div",{style:{top:"".concat(this.offset,"%")},class:[this.paneClasses,this.ns.bm("pane","bottom")]},[null==(h=(p=this.$slots).bottom)?void 0:h.call(p)])])])}})),hl=e("j",a({name:"IBizSplitTrigger",props:{mode:String},setup(e){const t=B("split-trigger"),a=l((()=>"vertical"===e.mode)),n=l((()=>[t.b(),a.value?t.m("vertical"):t.m("horizontal")])),o=l((()=>[t.b("bar-con"),a.value?t.bm("bar-con","vertical"):t.bm("bar-con","horizontal")])),i=Array(8).fill(0);return{ns:t,classes:n,barConClasses:o,items:i}},render(){return o("div",{class:this.classes},[o("div",{class:this.barConClasses},[this.items.map(((e,t)=>o("i",{class:this.ns.b("bar"),key:"trigger-".concat(t)},null)))])])}})),ml=a({name:"IBizExtendActionTimeLine",props:{data:{type:Object}},setup(e){const t=B("extend-action-timeline"),a=n([]),s=(e,t)=>Date.parse(t.time)-Date.parse(e.time),l=e=>{const t=[];let a=pi(e);if(a.length>0)return a=a.reverse(),a.forEach((e=>{if(e.usertasks){const t=pi(e.usertasks);Object.assign(e,{tasks:l(t)}),e.isShow=!1}if(0===e.identitylinks.length&&0===e.comments.length&&(Object.assign(e,{taskName:e.userTaskName}),t.push(e)),e.identitylinks.length>0){const a=((e,t)=>{const a=[];return(null==t?void 0:t.length)>0&&e&&t.forEach((t=>{a.push(t[e])})),[...new Set(a)]})("displayname",e.identitylinks);t.push({authorName:a.join("、"),taskName:e.userTaskName,isLink:!0})}e.comments.length>0&&(e.comments.forEach((t=>{Object.assign(t,{taskName:e.userTaskName})})),e.comments.sort(s),t.push(...e.comments))})),t},r=e=>{const t=new Map;for(let a=0;a<e.length;a++)t.has(e[a])||t.set(e[a],!0);return t},d=e=>{e.forEach((e=>{const t=[];if(e.tasks&&d(e.tasks),e.tasks)for(let a=0;a<e.tasks.length;a++){if(e.tasks[a].isLink){const n=-1!==e.tasks[a].authorName.indexOf("、")?e.tasks[a].authorName.split("、"):e.tasks[a].authorName;"string"==typeof n?t.push(n):t.push(...n)}if(e.tasks[a].linkName){const n=-1!==e.tasks[a].linkName.indexOf("、")?e.tasks[a].linkName.split("、"):e.tasks[a].linkName;"string"==typeof n?t.push(n):t.push(...n)}}const a=[...r(t).keys()];e.linkName=a.join("、")}))};c((()=>e.data),((e,t)=>{if(e!==t&&e){const t=pi(e).usertasks;if(t){const e=l(t);e&&(d(e),a.value=e)}}}),{immediate:!0});const u=e=>e.map((e=>o("div",{class:[t.b("task"),t.is("wrong",e.type&&e.type.includes("驳回")),t.is("link",e.isLink),t.is("linkname",e.linkName)]},[o("div",{class:t.be("task","tail")},null),o("div",{class:[t.be("task","head"),t.is("link-head",e.linkName)]},null),o("div",{class:t.be("task","top")},[o("div",{class:[t.be("task","user-task-name"),t.is("task-link",e.linkName)]},[e.taskName]),e.linkName?o("div",{class:t.be("task","link-name"),title:zt(e.linkName)},[e.linkName]):null,o("div",{class:[t.be("task","author-name"),t.is("has-type",e.type)],title:zt(e.authorName)},[e.authorName]),e.type&&o("div",{class:t.be("task","type")},[e.type]),e.time&&o("div",{class:t.be("task","last-time")},[e.time&&ibiz.i18n.t("component.extendActionTimeLine.processTime"),o("span",{class:t.be("task","last-time-text")},[e.time])])]),o("div",{class:t.be("task","bottom")},[o("div",{class:t.be("task","full-message")},[e.fullMessage?"".concat(ibiz.i18n.t("component.extendActionTimeLine.comments"),": ").concat(e.fullMessage):e.fullMessage])]),e.tasks&&e.tasks.length>=1&&o("div",{class:t.be("task","trigger"),"on-click":()=>{var t;(t=e).isShow=!t.isShow}},[o(i("i-icon"),{type:e.isShow?"md-remove":"md-add"},null)]),e.tasks&&g(o("div",{class:t.be("task","moreTask")},[u(e.tasks)]),[[f,e.isShow]])])));return{ns:t,formatDate:(e,t)=>Vi(e).format(t),UIData:a,renderTimeline:u}},render(){return o("div",{class:this.ns.b()},[this.UIData&&this.renderTimeline(this.UIData)])}});const vl=a({name:"ViewMessage",props:{messages:{type:Array},scroll:{type:Boolean,default:!1},context:{type:Object,required:!1},params:{type:Object,required:!1},controller:{type:Object}},setup(e){const t=B("view-message"),a=n([]),o=n(0),i=n(""),s=n(!1);c((()=>e.messages),(()=>{o.value=0,i.value=ei(),Array.isArray(e.messages)?(a.value=e.messages.filter((e=>e.title||e.message||e.layoutPanel&&e.data)).map((e=>({...e}))),s.value=!1):(a.value=[],s.value=!0)}),{immediate:!0});const l=n(null),r=n("");d((()=>{b((()=>{const e=l.value;if(!e)return;const t=e.querySelector(".el-alert");t&&(r.value="".concat(t.offsetHeight,"px"))}))}));return{ns:t,getType:e=>{switch(e){case"WARN":return"warning";case"ERROR":return"error";default:return"info"}},items:a,container:l,carouselHeight:r,initialIndex:o,uuid:i,isHiddenContainer:s,handleAlertClose:t=>{var n;a.value[t].hidden=!0;a.value.every((e=>e.hidden))&&(s.value=!0),i.value=ei();const o=a.value[t];null==(n=e.controller)||n.setMsgRemoveModeStorage(o)},handleChange:e=>{o.value=e}}},render(){const e=e=>o(i("iBizControlShell"),{data:e.data,modelData:e.layoutPanel,context:this.context,params:this.params},null),t=()=>{let t;return o("div",{class:[this.ns.b(),this.isHiddenContainer&&this.ns.m("hidden")],ref:"container"},[o(i("el-carousel"),{key:this.uuid,indicatorPosition:"none",arrow:"never",height:this.carouselHeight,initialIndex:this.initialIndex,onChange:this.handleChange},(a=t=this.items.map(((t,a)=>{if(t.hidden)return;const n=t.message||t.layoutPanel&&t.data;return o(i("el-carousel-item"),null,{default:()=>{var s;return[o(i("el-alert"),{type:this.getType(t.messageType),class:[this.ns.b("carousel-alert"),this.ns.bm("carousel-alert",t.title&&n?"":"single"),null==(s=t.sysCss)?void 0:s.cssName],closable:0!==t.removeMode,onClose:()=>this.handleAlertClose(a)},{title:()=>o("div",{class:this.ns.be("carousel-alert","title")},[t.title||""]),default:()=>t.layoutPanel&&t.data?e(t):o("div",{class:this.ns.be("carousel-alert","message"),innerHTML:t.message||""},null)})]}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?t:{default:()=>[t]}))]);var a};if(this.items.length)return this.items.length>1&&this.scroll?t():(()=>o("div",{class:[this.ns.b(),this.isHiddenContainer&&this.ns.m("hidden")]},[this.items.map(((t,a)=>{var n;const s=t.message||t.layoutPanel&&t.data;return o(i("el-alert"),{type:this.getType(t.messageType),class:[this.ns.b("alert"),this.ns.bm("alert",t.title&&s?"":"single"),this.ns.bm("alert",!t.title&&s?"single-message":""),null==(n=t.sysCss)?void 0:n.cssName],closable:0!==t.removeMode,onClose:()=>this.handleAlertClose(a)},{title:()=>o("div",{class:this.ns.be("alert","title")},[t.title||""]),default:()=>t.layoutPanel&&t.data?e(t):o("div",{class:this.ns.be("alert","message"),innerHTML:t.message||""},null)})}))]))()}}),bl=a({name:"IBizPagination",props:{total:{type:Number,required:!0},curPage:{type:Number,required:!0},size:{type:Number,required:!0},totalPages:{type:Number||void 0,required:!1},popperClass:{type:String,required:!1}},emits:["change","pageSizeChange","pageRefresh"],setup:(e,{emit:t})=>({ns:B("pagination"),start:l((()=>(e.curPage-1)*e.size+1)),end:l((()=>e.curPage*e.size)),onPageChange:e=>{t("change",e)},onPageSizeChange:e=>{t("pageSizeChange",e)},pageRefresh:()=>{t("pageRefresh")},inputChange:e=>{var t;null==(t=e.stopPropagation)||t.call(e)},calcTotalPages:l((()=>Math.ceil(e.total/e.size)))}),render(){return o("div",{class:this.ns.b()},[o(i("el-pagination"),w({layout:"slot, prev, pager, next, sizes, jumper",background:!0,total:this.total,"page-count":ui(this.totalPages)||this.calcTotalPages!==this.totalPages?this.totalPages:this.calcTotalPages,"current-page":this.curPage,"page-size":this.size,"popper-class":this.popperClass,"page-sizes":[10,20,30,40,50,60,70,80,90,100]},{"onUpdate:currentPage":this.onPageChange,"onUpdate:pageSize":this.onPageSizeChange,onChange:this.inputChange}),{default:()=>[o("span",{class:this.ns.b("btn")},[o(i("el-button"),{title:zt(ibiz.i18n.t("app.refresh")),onClick:this.pageRefresh},{default:()=>[o("ion-icon",{name:"refresh-outline"},null)]})]),ui(this.totalPages)||this.calcTotalPages===this.totalPages?o("span",null,[ibiz.i18n.t("component.pagination.display"),h(" "),this.start,h(" - "),this.end,h(" "),ibiz.i18n.t("component.pagination.piece"),h(",")]):null,o("span",null,[ibiz.i18n.t("component.pagination.total"),h(" "),this.total,h(" "),ibiz.i18n.t("component.pagination.pieceData")])]})])}}),gl=e("k",a({name:"IBizSortBar",props:{sortItems:{type:Array,required:!0}},emits:{SortChange:(e,t)=>!0},setup:(e,{emit:t})=>({ns:B("sort-bar"),onItemClick:a=>{"asc"===a.order?a.order="desc":"desc"===a.order?a.order=void 0:(e.sortItems.forEach((e=>{e.order=void 0})),a.order="asc"),t("SortChange",a,a.order)}}),render(){return o("div",{class:this.ns.b()},[this.sortItems.length>0&&this.sortItems.map((e=>o("div",{onClick:()=>this.onItemClick(e),class:[this.ns.b("item"),"asc"===e.order?this.ns.bm("item","asc"):"","desc"===e.order?this.ns.bm("item","desc"):""]},[e.caption,o("div",{class:this.ns.b("icon-wrapper")},[o("i",{class:this.ns.be("icon-wrapper","icon-asc")},null),o("i",{class:this.ns.be("icon-wrapper","icon-desc")},null)])])))])}}));function fl(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const wl=a({name:"DataImport",props:{dismiss:{type:Function,required:!0},appDataEntity:{type:Object,required:!0},dataImport:{type:Object,required:!1},context:{type:Object,required:!1},params:{type:Object,required:!1}},setup(e){const t=B("data-import"),a=n({state:"ready",message:""}),o=n(""),i=n(!1),s=()=>{e.dismiss()};return{ns:t,onLinkClick:async()=>{ba(e.appDataEntity,e.dataImport,e.context,e.params)},selectFile:async()=>{i.value=!0;const t=await ga({appDataEntity:e.appDataEntity,dataImport:e.dataImport,context:e.context,params:e.params});if(t.cancel)i.value=!1;else{if(!t.isAsync)if(t.errorMessage)o.value=t.errorMessage;else{const{success:e,total:n,message:o}=t,i=n?Number(n):0,s=e?Number(e):0,l=n-e;a.value.state=o?"error":"over",a.value.message=o||ibiz.i18n.t("component.dataImport.importSuccess",{totalNum:i,successNum:s,errorNum:l})}i.value=!1,t.isAsync&&s()}},onCancelButtonClick:s,isLoading:i,message:a,errorMessage:o}},render(){let e,t;return g(o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("caption")},[ibiz.i18n.t("component.dataImport.importData")]),"ready"===this.message.state?o("div",{class:this.ns.b("upload"),onClick:this.selectFile},[o("img",{class:this.ns.be("upload","img"),src:"./assets/images/icon-import.svg"},null),o("span",{class:this.ns.be("upload","text")},[ibiz.i18n.t("component.dataImport.clickToUpload")])]):o("div",{class:[this.ns.b("message")]},[o("div",{class:this.ns.be("message","title")},[ibiz.i18n.t("component.dataImport.importResults")]),o("div",{class:[this.ns.be("message","content"),this.ns.is("error","error"===this.message.state)]},[this.message.message])]),this.errorMessage&&o("div",{class:this.ns.b("error-message")},[this.errorMessage]),o("div",{class:this.ns.e("template-container")},[o("div",{class:this.ns.e("template-description")},[ibiz.i18n.t("component.dataImport.downloadTemplate")]),o("div",{class:this.ns.e("template-link"),onClick:this.onLinkClick},[o("ion-icon",{class:this.ns.e("link-icon"),name:"link"},null),this.appDataEntity.logicName,ibiz.i18n.t("component.dataImport.templateFile")])]),o("div",{class:this.ns.e("button-bar")},[o(i("el-button"),{onClick:this.onCancelButtonClick},fl(e=ibiz.i18n.t("app.cancel"))?e:{default:()=>[e]}),"ready"!==this.message.state&&o(i("el-button"),{onClick:this.selectFile},fl(t=ibiz.i18n.t("component.dataImport.continue"))?t:{default:()=>[t]})])]),[[y("loading"),this.isLoading]])}});function yl(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Cl=a({name:"DataImport2",props:{dismiss:{type:Function,required:!0},appDataEntity:{type:Object,required:!0},dataImport:{type:Object,required:!1},context:{type:Object,required:!1},params:{type:Object,required:!1}},setup(e){const t=B("data-import2"),a=n(!1),o=()=>{e.dismiss()},i=n([[]]),s=new Map,r=n([]),u=n([]),p=n(),h=n(),m=n("");let v="";const b=n(!0),g=n(""),f=new Map,w=n([]),y=n(!1),C=e.dataImport||fa(e.appDataEntity),I=()=>{[...s.keys()].forEach((e=>{const t=s.get(e),a=pi(t);t&&a&&(a.name="",s.set(e,a),r.value[t.index]="")}))},D=async e=>{if(e){const t=f.get(e);if(!t)return;let a=t.fields;if(!t.fields){const n=await wa(t.id);200===n.status&&n.data&&(a=n.data.fields),t.fields=n.data.fields,f.set(e,t)}""!==t.owner_type&&"PERSONAL"!==t.owner_type&&(y.value=!0);const n=[...s.keys()],o=new Map;I(),n.forEach((e=>{const t=s.get(e),n=e.lastIndexOf("-"),i=e.substring(0,n);let l=o.get(i);l||(o.set(i,0),l=0);const c=a&&a.filter((e=>e.caption===i)),d=c&&c[l];if(d){u.value.find((e=>e.id===d.name))&&t&&(o.set(i,l+1),d.index=t.index,s.set(e,d),r.value[d.index]=d.name)}}))}else I()};c(g,((e,t)=>{D(e)}));const E=async()=>{if(""!==r.value.join(""))if(i.value[0].length){b.value=!0;const t=[...s.values()].filter((e=>""!==e.name)),a={name:"".concat(m.value.split(".")[0],"|").concat((new Date).toLocaleString()),fields:t};if(e.params&&Object.assign(a,e.params),g.value){const t=f.get(g.value);t&&(a.name=t.name,a.id=t.id);const n=await ya({appDataEntity:e.appDataEntity,dataImport:C,data:a});200===n.status&&n.ok&&f.set(g.value,n.data)}else{w.value.push({value:a.name,label:a.name,oldLabel:a.name,edit:!0,checkmark:!1,close:!1});const t=await Ca({appDataEntity:e.appDataEntity,dataImport:C,data:a});200===t.status&&t.ok&&f.set(a.name,t.data),g.value=a.name}}else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.uploadPlease"));else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.atLastOne"))},S=async()=>{if(i.value[0].length)if(g.value&&b.value){const t=f.get(g.value);let a="";t&&(a=t.id),await Ia({appDataEntity:e.appDataEntity,dataImport:C,fileId:v,schemaId:a}),o()}else await E(),await S();else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.uploadPlease"))},x=e=>{/\bel-dialog\b/.test(e.className)?e.style.maxWidth="calc(100% - 100px)":e.parentElement&&x(e.parentElement)};d((()=>{C&&C.dedataImportItems?u.value=C.dedataImportItems:e.appDataEntity.appDEFields&&(u.value=e.appDataEntity.appDEFields),p.value&&p.value.parentElement&&x(p.value.parentElement),(async()=>{const t=await Da({appDataEntity:e.appDataEntity,dataImport:C});200===t.status&&t.data&&t.data.forEach((e=>{w.value.push({value:e.name,label:e.name,oldLabel:e.name,edit:!0,checkmark:!1,close:!1}),f.set(e.name,e)}))})()}));const P=ibiz.util.file.getUploadHeaders(),k=n({...P}),T=l((()=>{let e;e=-1!==ibiz.env.uploadFileUrl.indexOf("{cat}")?ibiz.env.uploadFileUrl.replace("/{cat}","/temp"):"".concat(ibiz.env.uploadFileUrl,"/temp");let t="".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId).concat(e);return t+=Fi.stringify({preview:!0},{addQueryPrefix:!0}),t}));return{ns:t,onButtonColumnMappingImportClick:E,onButtonImportClick:S,onCancelButtonClick:o,isLoading:a,UploadUrl:T,headers:k,onSuccess:(e,t,n)=>{if(m.value="",v="",e.name&&(m.value=e.name),e.fileid&&(v=e.fileid),e.previewinfo&&(i.value=JSON.parse(e.previewinfo),i.value[0]&&i.value[0].length>0)){const e=i.value[0].length;for(let t=1;t<i.value.length;t++){const a=i.value[t],n=a.length;if(n<e){const t=e-n;for(let e=0;e<t;e++)a.push("")}}s.clear(),i.value[0].forEach(((e,t)=>{s.set("".concat(e,"-").concat(t),{name:"",index:t,caption:e}),r.value[t]=""}))}a.value=!1,D(g.value)},previewinfo:i,selectValues:r,beforeUpload:()=>{a.value=!0},dataimport2:p,listValue:g,options:w,select:h,isNoPersonel:y,fileName:m,dataOption:u,ColumnMappingSave:b,columnMap:s,columnMappingSaveChange:e=>{b.value=e},selectValuesChange:(e,t)=>{r.value[e]=t},columnMapChange:(e,t)=>{s.set(e,t)},columnMappingListMap:f,listValueChange:e=>{g.value=e},columnMappingListMapChange:(e,t)=>{t?f.set(e,t):f.delete(e)},optionsChange:(e,t)=>{if(t){const a=w.value.findIndex((t=>t.label===e)),n=w.value[a];Object.keys(t).forEach((e=>{n[e]=t[e]}))}else{const t=w.value.findIndex((t=>t.label===e));-1!==t&&w.value.splice(t,1)}}}},render(){let e,t;return g(o("div",{class:[this.ns.b(),"ibiz-view"],ref:"dataimport2"},[o("div",{class:[this.ns.e("data-import2-toolbar"),"ibiz-panel-view-header"]},[o("div",{class:[this.ns.e("caption")]},[o("div",{class:"ibiz-panel-container"},[o("div",{class:"ibiz-control-captionbar"},[o("div",{class:"ibiz-control-captionbar-caption"},[ibiz.i18n.t("component.dataImport.importData")])])])]),o("div",{class:[this.ns.e("data-import2-toolbar-container"),"ibiz-panel-container--view_header_right"]},[o("div",{class:"ibiz-panel-container"},[o("div",{class:"ibiz-control-toolbar"},[o("div",{class:"ibiz-control-toolbar__item"},[this.fileName?ibiz.i18n.t("component.dataImport2.fileName",{fileName:this.fileName}):""]),this.previewinfo[0]&&this.previewinfo[0].length?o(i("data-import2-select"),{previewinfo:this.previewinfo,options:this.options,columnMappingListMap:this.columnMappingListMap,listValue:this.listValue,onListValueChange:this.listValueChange,onColumnMappingListMapChange:this.columnMappingListMapChange,onOptionsChange:this.optionsChange},null):"",this.previewinfo[0]&&this.previewinfo[0].length?o("div",{class:"ibiz-control-toolbar__item"},[o(i("el-button"),{onClick:this.onButtonColumnMappingImportClick,disabled:this.isNoPersonel},yl(e=ibiz.i18n.t("component.dataImport2.saveMode"))?e:{default:()=>[e]})]):"",o(i("el-upload"),{class:"ibiz-control-toolbar__item",action:this.UploadUrl,headers:this.headers,data:this.params,"show-file-list":!1,onSuccess:this.onSuccess,"before-upload":this.beforeUpload},{default:()=>[o(i("el-button"),null,{default:()=>[this.previewinfo[0]&&this.previewinfo[0].length?ibiz.i18n.t("component.dataImport2.reUpload"):ibiz.i18n.t("component.dataImport2.fileUpload")]})]}),this.previewinfo[0]&&this.previewinfo[0].length?o("div",{class:"ibiz-control-toolbar__item"},[o(i("el-button"),{onClick:this.onButtonImportClick,disabled:!this.selectValues.join(""),title:zt(this.selectValues.join("")?"":ibiz.i18n.t("component.dataImport2.selectProperties"))},yl(t=ibiz.i18n.t("component.dataImport2.import"))?t:{default:()=>[t]})]):""])])])]),o(i("data-import2-table"),{previewinfo:this.previewinfo,selectValues:this.selectValues,dataOption:this.dataOption,columnMappingSave:this.ColumnMappingSave,columnMap:this.columnMap,onSelectValuesChange:this.selectValuesChange,onColumnMappingSaveChange:this.columnMappingSaveChange,onColumnMapChange:this.columnMapChange},null)]),[[y("loading"),this.isLoading]])}});const Il=a({name:"DataImport2Table",props:{previewinfo:{type:Object,required:!0},dataOption:{type:Object,required:!0},selectValues:{type:Object,required:!0},columnMappingSave:{type:Boolean,required:!0},columnMap:{type:Object,required:!0}},setup(e,{emit:t}){const a=B("data-import2-table"),n=(n,l)=>{let r;return o(i("el-select"),{modelValue:e.selectValues[l],filterable:!0,placeholder:ibiz.i18n.t("component.dataImport2Table.selectAttribute"),onChange:a=>{t("selectValuesChange",l,a);const o=e.columnMap.get("".concat(n,"-").concat(l));o&&(o.name=a),t("columnMapChange","".concat(n,"-").concat(l),o),t("columnMappingSaveChange",!1)},key:l,"popper-class":a.e("dataimport-select"),class:a.e("select")},"function"==typeof(c=r=e.dataOption.map((e=>o(i("el-option"),{key:e.name,value:e.id,label:e.caption?e.caption:e.logicName},null))))||"[object Object]"===Object.prototype.toString.call(c)&&!s(c)?r:{default:()=>[r]});var c};return{ns:a,renderEmpty:()=>o("div",{class:a.e("empty")},[ibiz.i18n.t("app.noData")]),renderTable:()=>{const t=e.previewinfo,i=t.map(((e,t)=>o("tr",{key:t},[e.map(((e,n)=>0===t?o("th",{key:n,class:a.e("dataimport2-table-th")},[e]):o("td",{key:n,class:a.e("dataimport2-table-td")},[e])))]))),s=[o("tr",{key:"newRow"},[t[0].map(((e,t)=>o("td",{key:t,class:a.e("dataimpoer2-table-select")},[n(e,t)])))]),...i];return o("table",{class:a.e("dataimport-table")},[o("tbody",null,[s])])}}},render(){return o("div",{class:[this.ns.e("template-container"),"ibiz-panel-view-content"]},[this.previewinfo[0]&&this.previewinfo[0].length?this.renderTable():this.renderEmpty()])}});function Dl(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const El=a({name:"DataImport2Select",props:{previewinfo:{type:Object,required:!0},options:{type:Object,required:!0},columnMappingListMap:{type:Object,required:!0},listValue:{type:String,required:!0}},setup:(e,{emit:t})=>({ns:B("data-import2-select"),inputClick:e=>{e.stopPropagation()},editLabel:(e,a)=>{e.stopPropagation(),t("optionsChange",a.label,{edit:!1,checkmark:!0,close:!0})},saveLabel:async(a,n)=>{a.stopPropagation(),t("optionsChange",n.label,{edit:!0,checkmark:!1,close:!1,value:n.label,label:n.label});const o=e.columnMappingListMap.get(n.oldLabel);if(o){o.name=n.label;const e=await ya({data:o});200===e.status&&e.ok&&t("columnMappingListMapChange",n.label,e.data)}e.listValue===n.oldLabel&&t("listValueChange",n.label),t("optionsChange",n.label,{oldLabel:n.label})},notSaveLabel:(e,a)=>{e.stopPropagation(),t("optionsChange",a.label,{edit:!0,checkmark:!1,close:!1,label:a.oldLabel})},handleDeleteOption:async(a,n)=>{a.stopPropagation();const o=e.columnMappingListMap.get(n);if(o){const a=await Ea(o.id);200===a.status&&a.ok&&(t("optionsChange",n),t("columnMappingListMapChange",n),e.listValue===n&&t("listValueChange",""))}},valueChange:e=>{t("listValueChange",e)}}),render(){let e;return o("div",{class:"ibiz-control-toolbar__item"},[o(i("el-select"),{ref:"select","model-value":this.listValue,onChange:this.valueChange,clearable:!0,placeholder:ibiz.i18n.t("component.dataImport2Select.selectMode"),disabled:!(this.previewinfo[0]&&this.previewinfo[0].length),"popper-class":this.ns.e("dataimport-select")},Dl(e=this.options.map((e=>o(i("el-option"),{label:e.label,value:e.value,class:[this.ns.e("select-option")]},{default:()=>{let t;return o("div",{class:[this.ns.e("select-option-item")]},[e.edit?o("span",null,[e.label]):"",e.edit?"":o(i("el-input"),{"model-value":e.label,onClick:e=>this.inputClick(e),class:[this.ns.e("select-option-item-input")],onInput:t=>{e.label=t}},null),e.edit?o(i("el-button"),{text:!0,size:"small",onClick:t=>this.editLabel(t,e)},Dl(t=ibiz.i18n.t("component.dataImport2Select.edit"))?t:{default:()=>[t]}):"",e.checkmark?o(i("el-button"),{size:"small",onClick:t=>this.saveLabel(t,e)},{default:()=>[o("ion-icon",{name:"checkmark-outline"},null)]}):"",e.close?o(i("el-button"),{size:"small",onClick:t=>this.notSaveLabel(t,e)},{default:()=>[o("ion-icon",{name:"close-outline"},null)]}):"",o(i("el-button"),{text:!0,size:"small",onClick:t=>this.handleDeleteOption(t,e.value),class:this.ns.e("select-option-item-button-delete")},{default:()=>[o("ion-icon",{name:"trash-outline",class:this.ns.e("select-option-item-button-delete-icon")},null)]})])}}))))?e:{default:()=>[e]})])}}),Sl=a({name:"IBizGridSetting",components:{draggable:Ui},props:{columnStates:{type:Array,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("grid-setting"),a=e.controller,n=l((()=>{const t=[];return e.columnStates.forEach((e=>{e.uaColumn||t.push({...e})})),t})),o=l((()=>!1));return{ns:t,c:a,dragColumnStates:n,isDraggable:o,handleClick:e=>{const t=a.state.columnStates.find((t=>t.key===e.key));t&&a.setColumnVisible(t)},onDragChange:async e=>{if(e.moved){const t=e.moved.newIndex,n=e.moved.oldIndex,o=e.moved.element;a.changeColumnStateSort(o.key,t,n)}}}},render(){return o("div",{class:this.ns.b()},[o(i("el-popover"),{placement:"right-start",trigger:"click",width:"auto"},{reference:()=>o("ion-icon",{name:"options-outline",class:this.ns.b("set-icon"),title:zt(ibiz.i18n.t("component.gridSetting.hideControl"))},null),default:()=>o(Ui,{class:this.ns.b("column-states"),modelValue:this.dragColumnStates,"onUpdate:modelValue":e=>this.dragColumnStates=e,group:this.c.model.id,itemKey:"key",sort:this.isDraggable,"force-fallback":!0,animation:500,"ghost-class":this.ns.b("column-state-ghost"),filter:".unmover",onChange:e=>this.onDragChange(e)},{item:({element:e})=>o("div",{class:[this.ns.b("column-state"),this.ns.is("disabled",e.hidden),this.ns.is("fixed",!!e.fixed),!!e.fixed&&"unmover"],onClick:()=>this.handleClick(e)},[this.isDraggable&&!e.fixed&&o(i("iBizIcon"),{class:this.ns.b("drag-icon"),icon:{imagePath:"svg/drag.svg"},baseDir:"iconfont"},null),o(i("iBizIcon"),{class:this.ns.b("disable-icon"),icon:{imagePath:"svg/disable.svg"},baseDir:"iconfont"},null),o(i("iBizIcon"),{class:this.ns.b("enable-icon"),icon:{imagePath:"svg/enable.svg"},baseDir:"iconfont"},null),o("div",{class:this.ns.b("state-caption")},[e.caption])])})}),this.c.state.enableNavView&&this.c.state.showNavIcon?this.c.state.showNavView?o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),name:"eye-off-outline",onClick:()=>this.c.onShowNavViewChange()},null):o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),name:"eye-outline",onClick:()=>this.c.onShowNavViewChange()},null):null])}}),xl=e("D",a({name:"DoingNotice",props:{info:{type:Object,required:!0}},setup:()=>({ns:B("doing-notice")}),render(){return o("div",{class:[this.ns.b()]},[o("span",{class:this.ns.e("text"),innerHTML:ibiz.i18n.t("component.doingNotice.jobInProgress",{class:this.ns.e("num"),num:this.info.num})},null),o("svg",{class:this.ns.e("loading-icon"),viewBox:"-10, -10, 50, 50"},[o("path",{class:"path",d:"M 30 15 L 28 17 M 25.61 25.61 A 15 15, 0, 0, 1, 15 30 A 15 15, 0, 1, 1, 27.99 7.5 L 15 15",style:"stroke-width: 4px; fill: rgba(0, 0, 0, 0)"},null)])])}}));const Pl=a({name:"IBizCarouselComponent",props:{carouselData:{type:Array,required:!0},isAuto:{type:Boolean,default:!0},timeSpan:{type:Number,default:3e3},showMode:{type:String,required:!0}},setup(e){const t=B("carousel-component"),a=n([]);return c((()=>e.carouselData),((e,t)=>{e!==t&&(a.value=e)}),{immediate:!0}),{ns:t,swipeData:a}},render(){let e;const t=e=>e.cssClass?-1!==e.cssClass.indexOf("fa-")?o("i",{class:[e.cssClass]},null):o("ion-icon",{name:e.cssClass},null):e.imgUrl?o("img",{src:e.imgUrl,alt:e.name},null):void 0;return o("div",null,["CARD"===this.showMode?o(i("IBizCarousel-card"),{swipeData:this.swipeData,isAuto:this.isAuto,timeSpan:this.timeSpan},null):o(i("el-carousel"),{class:this.ns.b(),autoplay:this.isAuto,interval:this.timeSpan},(a=e=this.swipeData.map((e=>o(i("el-carousel-item"),{key:e.id},{default:()=>[e.linkPath?o("a",{href:e.linkPath},[t(e)]):t(e)]}))),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?e:{default:()=>[e]}))]);var a}}),kl=a({name:"IBizCoopAlert",props:{title:{type:String},type:{type:String,default:"info"},closable:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0}},setup:()=>({ns:B("coop-alert")}),render(){if(this.title)return o(i("el-alert"),w({class:this.ns.b()},this.$props),null)}});function Tl(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function zl(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function Al(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(a),!0).forEach((function(t){Tl(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):zl(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Ol(e,t){if(null==e)return{};var a,n,o=function(e,t){if(null==e)return{};var a,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}function Ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function Nl(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Bl(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function _l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Bl(Object(a),!0).forEach((function(t){Nl(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Bl(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Rl(e){return function t(){for(var a=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(a,[].concat(o,n))}}}function Ll(e){return{}.toString.call(e).includes("Object")}function jl(e){return"function"==typeof e}var Vl=Rl((function(e,t){throw new Error(e[t]||e.default)}))({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),Fl={changes:function(e,t){return Ll(t)||Vl("changeType"),Object.keys(t).some((function(t){return a=e,n=t,!Object.prototype.hasOwnProperty.call(a,n);var a,n}))&&Vl("changeField"),t},selector:function(e){jl(e)||Vl("selectorType")},handler:function(e){jl(e)||Ll(e)||Vl("handlerType"),Ll(e)&&Object.values(e).some((function(e){return!jl(e)}))&&Vl("handlersType")},initial:function(e){var t;e||Vl("initialIsRequired"),Ll(e)||Vl("initialType"),t=e,Object.keys(t).length||Vl("initialContent")}};function Ul(e,t){return jl(t)?t(e.current):t}function Hl(e,t){return e.current=_l(_l({},e.current),t),t}function ql(e,t,a){return jl(t)?t(e.current):Object.keys(a).forEach((function(a){var n;return null===(n=t[a])||void 0===n?void 0:n.call(t,e.current[a])})),a}var Gl={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Fl.initial(e),Fl.handler(t);var a={current:e},n=Rl(ql)(a,t),o=Rl(Hl)(a),i=Rl(Fl.changes)(e),s=Rl(Ul)(a);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return Fl.selector(e),e(a.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}}(n,o,i,s)(e)}]}};var Wl,Kl={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},Yl=(Wl=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];return n.length>=Wl.length?Wl.apply(this,n):function(){for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})(Kl),Xl={config:function(e){var t;return e||Yl("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||Yl("configType"),e.urls?(console.warn(Kl.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};function $l(e,t){return Object.keys(t).forEach((function(a){t[a]instanceof Object&&e[a]&&Object.assign(t[a],$l(e[a],t[a]))})),Al(Al({},e),t)}var Jl={type:"cancelation",msg:"operation is manually canceled"};function Ql(e){var t=!1,a=new Promise((function(a,n){e.then((function(e){return t?n(Jl):a(e)})),e.catch(n)}));return a.cancel=function(){return t=!0},a}var Zl,er,tr=Gl.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),ar=(er=2,function(e){if(Array.isArray(e))return e}(Zl=tr)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var a=[],n=!0,o=!1,i=void 0;try{for(var s,l=e[Symbol.iterator]();!(n=(s=l.next()).done)&&(a.push(s.value),!t||a.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return a}}(Zl,er)||function(e,t){if(e){if("string"==typeof e)return Ml(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ml(e,t):void 0}}(Zl,er)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),nr=ar[0],or=ar[1];function ir(e){return document.body.appendChild(e)}function sr(e){var t,a,n=nr((function(e){return{config:e.config,reject:e.reject}})),o=(t="".concat(n.config.paths.vs,"/loader.js"),a=document.createElement("script"),t&&(a.src=t),a);return o.onload=function(){return e()},o.onerror=n.reject,o}function lr(){var e=nr((function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}})),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],(function(t){rr(t),e.resolve(t)}),(function(t){e.reject(t)}))}function rr(e){nr().monaco||or({monaco:e})}var cr=new Promise((function(e,t){return or({resolve:e,reject:t})})),dr={config:function(e){var t=Xl.config(e),a=t.monaco,n=Ol(t,["monaco"]);or((function(e){return{config:$l(e.config,n),monaco:a}}))},init:function(){var e=nr((function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}}));if(!e.isInitialized){if(or({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Ql(cr);if(window.monaco&&window.monaco.editor)return rr(window.monaco),e.resolve(window.monaco),Ql(cr);!function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}}(ir,sr)(lr)}return Ql(cr)},__getMonacoInstance:function(){return nr((function(e){return e.monaco}))}};const ur=[{caption:"应用",labelLang:"app",children:[{caption:"字体",labelLang:"font",vars:[{label:"字号",value:"--ibiz-font-size-regular",labelLang:"fontSize",descLang:"fontSizeDesc",unit:"px",type:"size",kindVars:{"--ibiz-font-size-small":-2,"--ibiz-font-size-header-6":2,"--ibiz-font-size-header-5":4,"--ibiz-font-size-header-4":6,"--ibiz-font-size-header-3":8,"--ibiz-font-size-header-2":10,"--ibiz-font-size-header-1":12}},{label:"字重",value:"--ibiz-font-weight-regular",labelLang:"fontWeight",descLang:"fontWeightDesc",type:"size",kindVars:{"--ibiz-font-weight-light":-200,"--ibiz-font-weight-bold":200}}]},{caption:"颜色",labelLang:"color",children:[{caption:"主要颜色",labelLang:"primaryColor",vars:[{label:"主要颜色",description:"主要颜色,仅在需要非常强调的情况下使用",labelLang:"primaryColor",descLang:"primaryColorDesc",value:"--ibiz-color-primary"},{label:"主要文本颜色",description:"主要颜色文字色,和背景色形成对比",labelLang:"primaryTextColor",descLang:"primaryTextColorDesc",value:"--ibiz-color-primary-text"},{label:"主要悬浮颜色",description:"主要颜色悬浮态",labelLang:"primaryHoverColor",descLang:"primaryHoverColorDesc",value:"--ibiz-color-primary-hover"},{label:"主要悬浮文本颜色",description:"主要颜色悬浮态文字色,和背景色形成对比",labelLang:"primaryHoverTextColor",descLang:"primaryHoverTextColorDesc",value:"--ibiz-color-primary-hover-text"},{label:"主要激活颜色",description:"主要颜色激活态",labelLang:"primaryActiveColor",descLang:"primaryActiveColorDesc",value:"--ibiz-color-primary-active"},{label:"主要激活文本颜色",description:"主要颜色激活态文字色,和背景色形成对比",labelLang:"primaryActiveTextColor",descLang:"primaryActiveTextColorDesc",value:"--ibiz-color-primary-active-text"},{label:"主要禁用颜色",description:"主要颜色禁用态",labelLang:"primaryDisabledColor",descLang:"primaryDisabledColorDesc",value:"--ibiz-color-primary-disabled"},{label:"主要禁用文本颜色",description:"主要颜色禁用态文字色,和背景色形成对比",labelLang:"primaryDisabledTextColor",descLang:"primaryDisabledTextColorDesc",value:"--ibiz-color-primary-disabled-text"},{label:"主要浅版颜色",description:"浅版主要颜色(多用于背景)。仅在需要非常强调的情况下使用",labelLang:"primaryLightDefaultColor",descLang:"primaryLightDefaultColorDesc",value:"--ibiz-color-primary-light-default"},{label:"主要浅版悬浮色",description:"浅版主要颜色悬浮态",labelLang:"primaryLightHoverColor",descLang:"primaryLightHoverColorDesc",value:"--ibiz-color-primary-light-hover"},{label:"主要浅版激活色",description:"浅版主要颜色激活态",labelLang:"primaryLightActiveColor",descLang:"primaryLightActiveColorDesc",value:"--ibiz-color-primary-light-active"}]},{caption:"文本颜色",labelLang:"text",vars:[{label:"文本主色",description:"文本颜色 - 最主要",labelLang:"mainTextColor",descLang:"mianTextColorDesc",value:"--ibiz-color-text-0"},{label:"文本稍次色",description:"文本颜色 - 稍次要",labelLang:"minorTextColor",descLang:"minorTextColorDesc",value:"--ibiz-color-text-1"},{label:"文本次色",description:"文本颜色 - 次要",labelLang:"secondaryTextColor",descLang:"secondaryTextColorDesc",value:"--ibiz-color-text-2"},{label:"文本最次色",description:"文本颜色 - 最次要",labelLang:"lastTextColor",descLang:"lastTextColorDesc",value:"--ibiz-color-text-3"}]},{caption:"链接颜色",labelLang:"linkColor",vars:[{label:"文本链接色",description:"链接颜色 - 最主要",labelLang:"textLinkColor",descLang:"textLinkColorDesc",value:"--ibiz-color-link"},{label:"文本链接悬浮色",description:"链接颜色 - 悬浮态",labelLang:"textLinkHoverColor",descLang:"textLinkHoverColorDesc",value:"--ibiz-color-link-hover"},{label:"文本链接激活色",description:"链接颜色 - 激活态",labelLang:"textLinkActiveColor",descLang:"textLinkActiveColorDesc",value:"--ibiz-color-link-active"},{label:"文本链接已访问色",description:"链接颜色 - 已访问",labelLang:"textLinkVisitedColor",descLang:"textLinkVisitedColorDesc",value:"--ibiz-color-link-visited"}]},{caption:"背景色",labelLang:"bgColor",vars:[{label:"背景色最下层",description:"背景色 - 最下层(底部页面)",labelLang:"bgColorLowestLayer",descLang:"bgColorLowestLayerDesc",value:"--ibiz-color-bg-0"},{label:"背景色次下层",description:"背景色 - 次下层(页面中需要提升的内容)",labelLang:"bgColorLowerLayer",descLang:"bgColorLowerLayerDesc",value:"--ibiz-color-bg-1"},{label:"背景色中层",description:"背景色 - 中间层(模态等容器)",labelLang:"bgColorCenterLayer",descLang:"bgColorCenterLayerDesc",value:"--ibiz-color-bg-2"},{label:"背景色次上层",description:"背景色 - 次上层(通知,Toast等)",labelLang:"bgColorSecondaryUpperLayer",descLang:"bgColorSecondaryUpperLayerDesc",value:"--ibiz-color-bg-3"},{label:"背景色最上层",description:"背景色 - 最上层(特殊)",labelLang:"bgColorTopLayer",descLang:"bgColorTopLayerDesc",value:"--ibiz-color-bg-4"}]},{caption:"填充色",labelLang:"fillColor",vars:[{label:"默认填充色",description:"填充色 - 默认态",labelLang:"fillDefault",descLang:"fillDefaultDesc",value:"--ibiz-color-fill-0"},{label:"悬浮填充色",description:"填充色 - 悬浮态",labelLang:"fillHover",descLang:"fillHoverDesc",value:"--ibiz-color-fill-1"},{label:"激活填充色",description:"填充色 - 激活态",labelLang:"fillActive",descLang:"fillActiveDesc",value:"--ibiz-color-fill-2"}]},{caption:"边框",labelLang:"border",vars:[{label:"边框色",description:"默认描边颜色",labelLang:"borderColor",descLang:"borderColorDesc",value:"--ibiz-color-border"}]},{caption:"禁用态",labelLang:"disabledState",vars:[{label:"禁用文本色",description:"禁用态 - 文字",labelLang:"disabledText",descLang:"disabledTextDesc",value:"--ibiz-color-disabled-text"},{label:"禁用描边色",description:"禁用态 - 描边",labelLang:"disabledTextBorder",descLang:"disabledTextBorderDesc",value:"--ibiz-color-disabled-border"},{label:"禁用背景色",description:"禁用态 - 背景",labelLang:"disabledBg",descLang:"disabledBgDesc",value:"--ibiz-color-disabled-bg"},{label:"禁用填充色",description:"禁用态 - 填充",labelLang:"disabledFill",descLang:"disabledFillDesc",value:"--ibiz-color-disabled-fill"}]}]},{caption:"其他",labelLang:"other",vars:[{label:"间距",value:"--ibiz-spacing-base",labelLang:"spacing",descLang:"spacingDesc",unit:"px",type:"size",kindVars:{"--ibiz-spacing-super-tight":-14,"--ibiz-spacing-extra-tight":-12,"--ibiz-spacing-tight":-8,"--ibiz-spacing-base-tight":-4,"--ibiz-spacing-base-loose":4,"--ibiz-spacing-loose":8,"--ibiz-spacing-extra-loose":16,"--ibiz-spacing-super-loose":24}},{label:"圆角",value:"--ibiz-border-radius-medium",labelLang:"borderRadius",descLang:"borderRadiusDesc",unit:"px",type:"size",kindVars:{"--ibiz-border-radius-extra-small":-6,"--ibiz-border-radius-small":-4,"--ibiz-border-radius-large":4}},{label:"图标尺寸",value:"--ibiz-width-icon-medium",labelLang:"widthIcon",descLang:"widthIconDesc",unit:"px",type:"size",kindVars:{"--ibiz-width-icon-extra-small":-16,"--ibiz-width-icon-small":-4,"--ibiz-width-icon-large":4,"--ibiz-width-icon-extra-large":8}}]}]},{caption:"顶部导航栏",labelLang:"top",vars:[{label:"字体主要颜色",value:"--ibiz-panel-app-header-horizontal-color",defaultValue:"--ibiz-color-primary-text",labelLang:"mainColor",descLang:"mainColorDesc",className:"ibiz-panel-app-header"},{label:"字体次要颜色",value:"--ibiz-panel-app-header-horizontal-color-1",defaultValue:"--ibiz-color-text-5",labelLang:"secondaryColor",descLang:"secondaryColorDesc",className:"ibiz-panel-app-header"},{label:"背景主要颜色",value:"--ibiz-panel-app-header-horizontal-bg-color",defaultValue:"--ibiz-color-primary",labelLang:"mainBgColor",descLang:"mainBgColorDesc",className:"ibiz-panel-app-header"},{label:"背景次要颜色",value:"--ibiz-panel-app-header-horizontal-bg-color-1",defaultValue:"--ibiz-color-bg-5",labelLang:"secondaryBgColor",descLang:"secondaryBgColorDesc",className:"ibiz-panel-app-header"},{label:"图标主要颜色",value:"--ibiz-panel-app-header-horizontal-color-icon-0",defaultValue:"--ibiz-color-icon-0",labelLang:"iconMainColor",descLang:"iconMainColorDesc",className:"ibiz-panel-app-header"},{label:"图标次要颜色",value:"--ibiz-panel-app-header-horizontal-color-icon-1",defaultValue:"--ibiz-color-icon-1",labelLang:"iconSecondaryColor",descLang:"iconSecondaryColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单字体颜色",value:"--ibiz-panel-app-header-horizontal-menu-color",defaultValue:"--ibiz-color-text-menu",labelLang:"appMenuColor",descLang:"appMenuColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单悬浮字体色",value:"--ibiz-panel-app-header-horizontal-active-color",defaultValue:"--ibiz-color-primary-active-text",labelLang:"appMenuHoverColor",descLang:"appMenuHoverColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单悬浮背景色",value:"--ibiz-panel-app-header-horizontal-active-bg-color",defaultValue:"--ibiz-color-primary-active",labelLang:"appMenuHoverBgColor",descLang:"appMenuHoverBgColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单选中字体色",value:"--ibiz-panel-app-header-horizontal-hover-color",defaultValue:"--ibiz-color-primary-hover-text",labelLang:"appMenuActiveColor",descLang:"appMenuActiveColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单选中背景色",value:"--ibiz-panel-app-header-horizontal-hover-bg-color",defaultValue:"--ibiz-color-primary-hover",labelLang:"appMenuActiveBgColor",descLang:"appMenuActiveBgColorDesc",className:"ibiz-panel-app-header"}]},{caption:"侧边导航栏",labelLang:"sidebar",vars:[{label:"字体主要颜色",value:"--ibiz-panel-app-header-color",defaultValue:"--ibiz-color-primary-text",labelLang:"mainColor",descLang:"mainColorDesc",className:"ibiz-panel-app-header"},{label:"字体次要颜色",value:"--ibiz-panel-app-header-color-1",defaultValue:"--ibiz-color-text-5",labelLang:"secondaryColor",descLang:"secondaryColorDesc",className:"ibiz-panel-app-header"},{label:"背景主要颜色",value:"--ibiz-panel-app-header-bg-color",defaultValue:"--ibiz-color-primary",labelLang:"mainBgColor",descLang:"mainBgColorDesc",className:"ibiz-panel-app-header"},{label:"背景次要颜色",value:"--ibiz-panel-app-header-bg-color-1",defaultValue:"--ibiz-color-bg-5",labelLang:"secondaryBgColor",descLang:"secondaryBgColorDesc",className:"ibiz-panel-app-header"},{label:"图标主要颜色",value:"--ibiz-panel-app-header-color-icon-0",defaultValue:"--ibiz-color-icon-0",labelLang:"iconMainColor",descLang:"iconMainColorDesc",className:"ibiz-panel-app-header"},{label:"图标次要颜色",value:"--ibiz-panel-app-header-color-icon-1",defaultValue:"--ibiz-color-icon-1",labelLang:"iconSecondaryColor",descLang:"iconSecondaryColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单字体颜色",value:"--ibiz-panel-app-header-menu-color",defaultValue:"--ibiz-color-text-menu",labelLang:"appMenuColor",descLang:"appMenuColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单悬浮字体色",value:"--ibiz-panel-app-header-active-color",defaultValue:"--ibiz-color-primary-active-text",labelLang:"appMenuHoverColor",descLang:"appMenuHoverColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单悬浮背景色",value:"--ibiz-panel-app-header-active-bg-color",defaultValue:"--ibiz-color-primary-active",labelLang:"appMenuHoverBgColor",descLang:"appMenuHoverBgColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单选中字体色",value:"--ibiz-panel-app-header-hover-color",defaultValue:"--ibiz-color-primary-hover-text",labelLang:"appMenuActiveColor",descLang:"appMenuActiveColorDesc",className:"ibiz-panel-app-header"},{label:"应用菜单选中背景色",value:"--ibiz-panel-app-header-hover-bg-color",defaultValue:"--ibiz-color-primary-hover",labelLang:"appMenuActiveBgColor",descLang:"appMenuActiveBgColorDesc",className:"ibiz-panel-app-header"}]},{caption:"控件",labelLang:"ctrl",children:[{caption:"表格",labelLang:"grid",vars:[{label:"表格头字体色",value:"--ibiz-control-grid-header-text-color",defaultValue:"--ibiz-color-text-2",labelLang:"gridHeaderColor",descLang:"gridHeaderColorDesc",className:"ibiz-control-grid"},{label:"表格头背景色",value:"--ibiz-control-grid-header-bg-color",defaultValue:"--ibiz-color-fill-1",labelLang:"gridHeaderBg",descLang:"gridHeaderBgDesc",className:"ibiz-control-grid"},{label:"表格行字体色",value:"--ibiz-control-grid-text-color",defaultValue:"--ibiz-color-text-0",labelLang:"gridRowColor",descLang:"gridRowColorDesc",className:"ibiz-control-grid"},{label:"表格行背景色亮色",value:"--ibiz-control-grid-row-bg-color",defaultValue:"--ibiz-color-bg-1",labelLang:"gridRowBg",descLang:"gridRowBgDesc",className:"ibiz-control-grid"},{label:"表格行背景色暗色",value:"--ibiz-control-grid-row-bg-color-2",defaultValue:"--ibiz-color-bg-0",labelLang:"gridRowBg2",descLang:"gridRowBg2Desc",className:"ibiz-control-grid"},{label:"表格行悬浮色",value:"--ibiz-control-grid-row-hover-color",defaultValue:"--ibiz-grey-1",labelLang:"gridRowHover",descLang:"gridRowHoverDesc",className:"ibiz-control-grid"},{label:"表格行选中色",value:"--ibiz-control-grid-row-select-color",defaultValue:"--ibiz-color-primary-light-default",labelLang:"gridRowSelect",descLang:"gridRowSelectDesc",className:"ibiz-control-grid"}]},{caption:"树",labelLang:"tree",vars:[{label:"树视图文本色",value:"--ibiz-control-treeview-text-color",defaultValue:"--ibiz-color-text-0",labelLang:"treeTextColor",descLang:"treeTextColorDesc",className:"ibiz-control-treeview"},{label:"树视图背景色",value:"--ibiz-control-treeview-bg-color",defaultValue:"#00000000",labelLang:"treeBgColor",descLang:"treeBgColorDesc",className:"ibiz-control-treeview"},{label:"树视图禁用色",value:"--ibiz-control-treeview-disabled-color",defaultValue:"--ibiz-color-disabled-text",labelLang:"treeDisabledColor",descLang:"treeDisabledColorDesc",className:"ibiz-control-treeview"},{label:"树视图悬浮色",value:"--ibiz-control-treeview-row-hover-color",defaultValue:"--ibiz-color-text-0",labelLang:"treeHoverColor",descLang:"treeHoverColorDesc",className:"ibiz-control-treeview"},{label:"树视图悬浮背景色",value:"--ibiz-control-treeview-row-hover-bg-color",defaultValue:"--ibiz-color-fill-0",labelLang:"treeHoverBgColor",descLang:"treeHoverBgColorDesc",className:"ibiz-control-treeview"},{label:"树视图选中色",value:"--ibiz-control-treeview-row-select-color",defaultValue:"--ibiz-color-text-0",labelLang:"treeSelectColor",descLang:"treeSelectColorDesc",className:"ibiz-control-treeview"},{label:"树视图选中背景色",value:"--ibiz-control-treeview-row-select-bg-color",defaultValue:"--ibiz-color-primary-light-default",labelLang:"treeSelectBgColor",descLang:"treeSelectBgColorDesc",className:"ibiz-control-treeview"}]}]}];var pr=Object.defineProperty,hr=(e,t,a)=>(((e,t,a)=>{t in e?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class mr{constructor(){hr(this,"state",{}),hr(this,"model",[]),hr(this,"modelMapping",{}),hr(this,"predefineType",[{codeName:"light",label:"亮色",labelLang:"light",color:"#557da5",isCustom:!1},{codeName:"dark",label:"暗色",labelLang:"dark",color:"#1c1c1c",isCustom:!1},{codeName:"blue",label:"蓝色",labelLang:"blue",color:"rgba(0, 132, 255, 1)",isCustom:!1},{codeName:"user1",label:"自定义1",labelLang:"user1",color:"#999",isCustom:!0},{codeName:"user2",label:"自定义2",labelLang:"user2",color:"#888",isCustom:!0},{codeName:"user3",label:"自定义3",labelLang:"user3",color:"#777",isCustom:!0}]),this.model=ur;const e=ibiz.util.theme.getCustomTheme();this.state=pi(e),this.state=u(this.state),this.model.forEach((e=>{this.initModelMapping(e)}))}initModelMapping(e){e.children&&e.children.length>0&&e.children.forEach((e=>{this.initModelMapping(e)})),e.vars&&e.vars.length>0&&e.vars.forEach((e=>{this.modelMapping[e.value]=e}))}getModelEditData(){const e={};return this.model.forEach((t=>{const a={};this.getSingleGroupModelData(t,a),e[t.labelLang]=a})),e}getSingleGroupModelData(e,t){e.children&&e.children.length>0&&e.children.forEach((e=>{this.getSingleGroupModelData(e,t)})),e.vars&&e.vars.length>0&&e.vars.forEach((e=>{if(this.modelMapping[e.value]=e,"size"===e.type)t[e.value]=this.getCssVar(e.value);else{let a=e.value;e.className&&(a="".concat(e.className,":").concat(a)),t[e.value]=this.getCssVar(a,e.defaultValue)}}))}getCssVar(e,t){var a;let n=t||e;if(this.state.themeVars&&this.state.themeVars[e])n=this.state.themeVars[e];else{let o=document.documentElement,i=t||e;if(2===e.split(":").length){const t=e.split(":")[0],n=null==(a=document.getElementsByClassName(t))?void 0:a[0];n&&(o=n,i=e.split(":")[1])}const s=window.getComputedStyle(o);s&&(n=s.getPropertyValue(i)||n)}return n.toString().endsWith("px")&&(n=Number(n.toString().slice(0,-2))),n.toString().includes(",")&&!n.toString().startsWith("rgb")&&(n="rgba(".concat(n,", 1)")),n}async handleThemeChange(e){await ibiz.util.theme.clearCustomThemeParams(this.state.themeTag),this.state.themeTag=e,this.state.themeVars={},await this.handleThemePreview(!0)}async computeChangeThemeVars(e){const t=[],a=this.getModelEditData();Object.keys(e).forEach((n=>{const o=e[n];Object.keys(o).forEach((e=>{a[n][e]!==o[e]&&t.push({key:e,value:o[e]})}))})),t.length>0&&t.forEach((e=>{const t=this.modelMapping[e.key];if(t)if("size"===t.type)this.calcSizeChange(e.key,Number(e.value),t);else{let a=e.key;t.className&&(a="".concat(t.className,":").concat(e.key)),this.state.themeVars[a]=e.value}}))}async handleThemePreview(e){const{themeTag:t,themeVars:a}=await ibiz.util.theme.previewCustomTheme(this.state.themeTag,this.state.themeVars,e);this.state.themeTag=t,this.state.themeVars=a}async handleThemeSave(e){await this.handleThemePreview(!1),await ibiz.util.theme.saveCustomTheme(this.state.themeTag,this.state.themeVars,e)}async handleThemeReset(e){if(!await ibiz.confirm.info({title:ibiz.i18n.t("control.common.customTheme.resetConfirmation"),desc:e?ibiz.i18n.t("control.common.customTheme.resetConfirmationGlobalDesc"):ibiz.i18n.t("control.common.customTheme.resetConfirmationDesc")}))return;const{themeVars:t}=await ibiz.util.theme.resetCustomTheme(this.state.themeTag,e);this.state.themeVars=t}calcSizeChange(e,t,a){this.state.themeVars[e]="".concat(t).concat(a.unit||""),a.kindVars&&Object.keys(a.kindVars).forEach((e=>{const n=a.kindVars[e];this.state.themeVars[e]="".concat(t+n).concat(a.unit||"")}))}}function vr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const br=a({name:"IBizCustomTheme",props:{controller:{type:Object,required:!0}},emits:[],setup(){const e=B("custom-theme"),t=C().proxy,a=new mr,s=n(0),r=n(),u=n(""),h=n(!1);let m,v;const{UIStore:g}=G(),f=e=>"dark"===e?"vs-".concat(g.theme):"vs";c((()=>g.theme),(e=>{v.setTheme(f(e))}));d((()=>{b((()=>{dr.config({paths:{vs:"".concat(ibiz.env.pluginBaseUrl,"/monaco-editor@0.45.0/min/vs")}}),dr.init().then((e=>{m||(v=e.editor,m=v.create(r.value,{language:"json",theme:f(g.theme),foldingStrategy:"indentation",renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!0},fontSize:16,scrollBeyondLastLine:!1,overviewRulerBorder:!1})),setTimeout((()=>{m.layout(),m.setValue(u.value)})),window.addEventListener("resize",(()=>{m.layout()}))}))}))})),p((()=>{null==m||m.dispose()}));const w=l((()=>{if(ibiz.appData){if(!1===ibiz.appData.enablepermissionvalid)return!0;if(ibiz.appData.unires.length){if(ibiz.appData.unires.find((e=>"UNIRES_CLOUD_CONF_CONFIG_SHARE"===e)))return!0}}return!1})),y=n(["rgb(241, 4, 4)","rgb(242, 76, 4)","rgb(238, 153, 33)","rgb(98, 230, 10)","rgb(10, 230, 164)","rgb(3, 144, 245)","rgb(3, 7, 245)","rgb(108, 3, 245)","rgb(245, 3, 241)","rgb(245, 3, 92)"]),I=e=>{let{value:t}=e;return e.className&&(t="".concat(e.className,":").concat(t)),o(i("el-color-picker"),{predefine:y.value,onChange:t=>{((e,t,n)=>{let o=e;n&&(o="".concat(n,":").concat(e)),a.state.themeVars[o]=t})(e.value,t,e.className)},"show-alpha":!0,"model-value":a.getCssVar(t,e.defaultValue)},null)},D=e=>{const t=a.getCssVar(e.value);return o(i("el-input-number"),{"model-value":t,step:t>=100?100:1,min:0,onChange:t=>{var n,o,i;n=e.value,o=t,i=e,a.calcSizeChange(n,o,i)}},null)},E=t=>t.children?t.children.map((e=>E(e))):o("div",{class:e.b("item")},[o("div",{class:e.be("item","caption")},[ibiz.i18n.t("control.common.customTheme.".concat(t.labelLang))]),o("div",{class:e.be("item","content")},[t.vars.map((t=>{let a=I(t);return"size"===t.type&&(a=D(t)),o("div",{class:e.b("var")},[o("span",{class:e.be("var","description"),title:zt(ibiz.i18n.t("control.common.customTheme.".concat(t.descLang)))},[ibiz.i18n.t("control.common.customTheme.".concat(t.labelLang))]),a])}))])]),S=()=>o("span",{class:e.b("content-setting"),onClick:()=>{(async()=>{const e=!h.value;if(h.value)m&&await a.computeChangeThemeVars(JSON.parse(m.getValue())),h.value=e,t.$forceUpdate();else{const n=a.getModelEditData();h.value=e,b((()=>{u.value=JSON.stringify(n,null,2),null==m||m.setValue(u.value),null==m||m.layout(),t.$forceUpdate()}))}})()}},[h.value?ibiz.i18n.t("control.common.customTheme.closeModelEdit"):ibiz.i18n.t("control.common.customTheme.modelEdit")]);return{ns:e,c:a,showSaveAndShare:w,handlePreview:async()=>{h.value&&m&&await a.computeChangeThemeVars(JSON.parse(m.getValue())),await a.handleThemePreview(!1),t.$forceUpdate()},handleReset:async()=>{if(await a.handleThemeReset(!1),h.value){const e=a.getModelEditData();b((()=>{u.value=JSON.stringify(e,null,2),null==m||m.setValue(u.value),null==m||m.layout()}))}t.$forceUpdate()},handleSave:async()=>{h.value&&m&&await a.computeChangeThemeVars(JSON.parse(m.getValue())),await a.handleThemeSave(!1),t.$forceUpdate()},handleSaveAndShare:async()=>{h.value&&m&&await a.computeChangeThemeVars(JSON.parse(m.getValue())),await a.handleThemeSave(!0),t.$forceUpdate()},handleResetAndShare:async()=>{if(await a.handleThemeReset(!0),h.value){const e=a.getModelEditData();b((()=>{u.value=JSON.stringify(e,null,2),null==m||m.setValue(u.value),null==m||m.layout()}))}t.$forceUpdate()},renderHeader:()=>o("div",{class:e.b("item")},[o("div",{class:e.be("item","caption")},[ibiz.i18n.t("control.common.customTheme.themeColor")]),o("div",{class:e.be("item","container")},[o("div",{class:e.be("item","content")},[a.predefineType.map((e=>o(i("el-button"),{color:e.color,title:zt(ibiz.i18n.t("control.common.customTheme.".concat(e.labelLang))),onClick:()=>{(async e=>{if(await a.handleThemeChange(e),h.value){const e=a.getModelEditData();b((()=>{u.value=JSON.stringify(e,null,2),null==m||m.setValue(u.value),null==m||m.layout()}))}t.$forceUpdate()})(e.codeName)}},{default:()=>[a.state.themeTag===e.codeName&&o("ion-icon",{name:"checkmark-sharp"},null)]})))]),S()])]),renderContent:()=>{let t;return o("div",{class:e.b("content-container")},[o("div",{ref:r,class:[e.b("edit-container"),e.is("hidden",!h.value)]},null),o("div",{class:[e.b("default-container"),e.is("hidden",h.value)]},[o(i("el-tabs"),{modelValue:s.value,"onUpdate:modelValue":e=>s.value=e},vr(t=a.model.map(((e,t)=>{let a;return o(i("el-tab-pane"),{name:t,label:ibiz.i18n.t("control.common.customTheme.".concat(e.labelLang))},vr(a=E(e))?a:{default:()=>[a]})})))?t:{default:()=>[t]})])])}}},render(){let e,t,a;return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("header")},[this.renderHeader()]),o("div",{class:this.ns.b("content")},[this.renderContent()]),o("div",{class:this.ns.b("footer")},[o(i("el-button"),{onClick:this.handlePreview},vr(e=ibiz.i18n.t("control.common.customTheme.preview"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.handleSave},vr(t=ibiz.i18n.t("control.common.customTheme.save"))?t:{default:()=>[t]}),o(i("el-button"),{onClick:this.handleReset},vr(a=ibiz.i18n.t("control.common.customTheme.reset"))?a:{default:()=>[a]}),this.showSaveAndShare&&o(i("el-dropdown"),{"split-button":!0,type:"primary",trigger:"click"},{default:()=>ibiz.i18n.t("control.common.customTheme.adminOperation"),dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>[o(i("el-dropdown-item"),null,{default:()=>[o("span",{onClick:this.handleSaveAndShare},[ibiz.i18n.t("control.common.customTheme.saveAndShare")])]}),o(i("el-dropdown-item"),null,{default:()=>[o("span",{onClick:this.handleResetAndShare},[ibiz.i18n.t("control.common.customTheme.resetAndShare")])]})]})})])])}}),gr=a({name:"IBizCarouselCard",props:{swipeData:{type:Object,required:!0},isAuto:{type:Boolean,default:!0},timeSpan:{type:Number,default:3e3}},setup(e){const t=B("carousel-card"),a=n(3),o=n(),i=n(),s=n(600),r=n(0),c=l((()=>(r.value-s.value-0)/2));let u=null;const p=document.getElementsByClassName("swiper-slide-card"),h=500,v=l((()=>e.swipeData.length>2?[...e.swipeData.slice(-2),...e.swipeData,...e.swipeData.slice(0,2)]:[...e.swipeData])),g=()=>{for(let t=0;t<p.length;t++)2===e.swipeData.length?(p[0].style.left="".concat(r.value/4-s.value/2,"px"),p[1].style.left="".concat(r.value/4*3-s.value/2,"px")):1===e.swipeData.length?p[t].style.left="".concat(r.value/2-s.value/2,"px"):p[t].style.left="".concat((t-1)*(s.value+0),"px"),t===a.value-1?p[t].style.transform="scale(1)":p[t].style.transform="scale(".concat(.8,")")},f=t=>{2===e.swipeData.length?(a.value=a.value?0:1,g()):1===e.swipeData.length||(a.value>=2&&(o.value.style.transition="left ".concat(t/1e3,"s"),o.value.style.left="".concat(parseInt(o.value.style.left,10)-(0+s.value),"px")),a.value===e.swipeData.length+1?(a.value=e.swipeData.length+2,g(),setTimeout((()=>{a.value=2,g(),o.value.style.transitionProperty="none",o.value.style.left="".concat(-(s.value-c.value),"px")}),t)):(a.value++,g()))};g(),d((()=>{e.isAuto&&(u=window.setInterval((()=>f(h)),e.timeSpan))})),m((()=>{u&&(window.clearInterval(u),u=null)})),b((()=>{r.value=i.value.clientWidth,s.value=p[0].clientWidth,o.value&&(o.value.style.left="".concat(-(2*s.value+0-c.value),"px"),o.value.style.width="".concat((e.swipeData.length+2)*(s.value+0),"px")),g()}));return{ns:t,btnClick:t=>{var n;"left"===t?(n=h,2===e.swipeData.length?(a.value=a.value?0:1,g()):1===e.swipeData.length||(a.value--,o.value.style.transition="left ".concat(n/1e3,"s"),o.value.style.left="".concat(parseInt(o.value.style.left,10)+(0+s.value),"px"),1===a.value?(g(),setTimeout((()=>{a.value=e.swipeData.length+1,g(),o.value.style.transitionProperty="none",o.value.style.left="".concat(-(parseInt(p[a.value].style.left,10)-c.value-0),"px")}),n)):g())):"right"===t&&f(h)},mainDom:o,listDom:i,imgWidth:s,resImgArr:v,dotClick:t=>{a.value=t+2+1,a.value===e.swipeData.length+2&&(a.value=2),o.value.style.transition="left ".concat(.5,"s"),o.value.style.left="".concat(-((a.value-1)*s.value+0-c.value),"px"),g()},nowIndex:a}},render(){const e=e=>e.cssClass?-1!==e.cssClass.indexOf("fa-")?o("i",{class:[e.cssClas,"swiper-slide-card"]},null):o("ion-icon",{class:"swiper-slide-card",name:e.cssClass},null):e.imgUrl?o("img",{class:"swiper-slide-card",style:"width: ".concat(this.imgWidth,"px"),alt:e.name,src:e.imgUrl},null):void 0;let t=this.nowIndex;return this.nowIndex<this.swipeData.length&&(t=this.nowIndex+this.swipeData.length),o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("swiper-list"),ref:"listDom"},[o("div",{class:this.ns.e("swiper-main"),ref:"mainDom"},[this.resImgArr.map((t=>e(t)))]),o("div",{id:"prev-card",class:this.ns.e("leftBtn"),style:"width:".concat(this.imgWidth,"px"),onClick:()=>this.btnClick("left")},null),o("div",{id:"next-card",class:this.ns.e("rightBtn"),style:"width:".concat(this.imgWidth,"px"),onClick:()=>this.btnClick("right")},null)]),o("div",{class:this.ns.e("dot")},[this.swipeData.map(((e,a)=>o("div",{class:[this.ns.e("dot-item"),a===t-3?"isActive":""],onClick:()=>this.dotClick(a)},null)))])])}});var fr=Object.defineProperty,wr=(e,t,a)=>(((e,t,a)=>{t in e?fr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yr{constructor(e,t,a){wr(this,"name"),wr(this,"icon"),wr(this,"text"),this.name=e,this.icon=t,this.text=a}get label(){return this.name}}var Cr=Object.defineProperty,Ir=(e,t,a)=>(((e,t,a)=>{t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);let Dr=class{constructor(e,t,a){Ir(this,"data"),Ir(this,"category"),Ir(this,"aliases"),this.data=e,this.category=t,this.aliases=a}};const Er=[new Dr("😀","peoples",["grinning"]),new Dr("😃","peoples",["smiley"]),new Dr("😄","peoples",["smile"]),new Dr("😁","peoples",["grin"]),new Dr("😆","peoples",["laughing","satisfied"]),new Dr("😅","peoples",["sweat_smile"]),new Dr("😂","peoples",["joy"]),new Dr("🤣","peoples",["rofl"]),new Dr("😌","peoples",["relaxed"]),new Dr("😊","peoples",["blush"]),new Dr("😇","peoples",["innocent"]),new Dr("🙂","peoples",["slightly_smiling_face"]),new Dr("🙃","peoples",["upside_down_face"]),new Dr("😉","peoples",["wink"]),new Dr("😌","peoples",["relieved"]),new Dr("😍","peoples",["heart_eyes"]),new Dr("😘","peoples",["kissing_heart"]),new Dr("😗","peoples",["kissing"]),new Dr("😙","peoples",["kissing_smiling_eyes"]),new Dr("😚","peoples",["kissing_closed_eyes"]),new Dr("😋","peoples",["yum"]),new Dr("😜","peoples",["stuck_out_tongue_winking_eye"]),new Dr("😝","peoples",["stuck_out_tongue_closed_eyes"]),new Dr("😛","peoples",["stuck_out_tongue"]),new Dr("🤑","peoples",["money_mouth_face"]),new Dr("🤗","peoples",["hugs"]),new Dr("🤓","peoples",["nerd_face"]),new Dr("😎","peoples",["sunglasses"]),new Dr("🤡","peoples",["clown_face"]),new Dr("🤠","peoples",["cowboy_hat_face"]),new Dr("😏","peoples",["smirk"]),new Dr("😒","peoples",["unamused"]),new Dr("😞","peoples",["disappointed"]),new Dr("😔","peoples",["pensive"]),new Dr("😟","peoples",["worried"]),new Dr("😕","peoples",["confused"]),new Dr("🙁","peoples",["slightly_frowning_face"]),new Dr("☹️","peoples",["frowning_face"]),new Dr("😣","peoples",["persevere"]),new Dr("😖","peoples",["confounded"]),new Dr("😫","peoples",["tired_face"]),new Dr("😩","peoples",["weary"]),new Dr("😤","peoples",["triumph"]),new Dr("😠","peoples",["angry"]),new Dr("😡","peoples",["rage","pout"]),new Dr("😶","peoples",["no_mouth"]),new Dr("😐","peoples",["neutral_face"]),new Dr("😑","peoples",["expressionless"]),new Dr("😯","peoples",["hushed"]),new Dr("😦","peoples",["frowning"]),new Dr("😧","peoples",["anguished"]),new Dr("😮","peoples",["open_mouth"]),new Dr("😲","peoples",["astonished"]),new Dr("😵","peoples",["dizzy_face"]),new Dr("😳","peoples",["flushed"]),new Dr("😱","peoples",["scream"]),new Dr("😨","peoples",["fearful"]),new Dr("😰","peoples",["cold_sweat"]),new Dr("😢","peoples",["cry"]),new Dr("😥","peoples",["disappointed_relieved"]),new Dr("🤤","peoples",["drooling_face"]),new Dr("😭","peoples",["sob"]),new Dr("😓","peoples",["sweat"]),new Dr("😪","peoples",["sleepy"]),new Dr("😴","peoples",["sleeping"]),new Dr("🙄","peoples",["roll_eyes"]),new Dr("🤔","peoples",["thinking"]),new Dr("🤥","peoples",["lying_face"]),new Dr("😬","peoples",["grimacing"]),new Dr("🤐","peoples",["zipper_mouth_face"]),new Dr("🤢","peoples",["nauseated_face"]),new Dr("🤧","peoples",["sneezing_face"]),new Dr("😷","peoples",["mask"]),new Dr("🤒","peoples",["face_with_thermometer"]),new Dr("🤕","peoples",["face_with_head_bandage"]),new Dr("😈","peoples",["smiling_imp"]),new Dr("👿","peoples",["imp"]),new Dr("👹","peoples",["japanese_ogre"]),new Dr("👺","peoples",["japanese_goblin"]),new Dr("💩","peoples",["hankey","poop","shit"]),new Dr("👻","peoples",["ghost"]),new Dr("💀","peoples",["skull"]),new Dr("☠️","peoples",["skull_and_crossbones"]),new Dr("👽","peoples",["alien"]),new Dr("👾","peoples",["space_invader"]),new Dr("🤖","peoples",["robot"]),new Dr("🎃","peoples",["jack_o_lantern"]),new Dr("😺","peoples",["smiley_cat"]),new Dr("😸","peoples",["smile_cat"]),new Dr("😹","peoples",["joy_cat"]),new Dr("😻","peoples",["heart_eyes_cat"]),new Dr("😼","peoples",["smirk_cat"]),new Dr("😽","peoples",["kissing_cat"]),new Dr("🙀","peoples",["scream_cat"]),new Dr("😿","peoples",["crying_cat_face"]),new Dr("😾","peoples",["pouting_cat"]),new Dr("👐","peoples",["open_hands"]),new Dr("🙌","peoples",["raised_hands"]),new Dr("👏","peoples",["clap"]),new Dr("🙏","peoples",["pray"]),new Dr("🤝","peoples",["handshake"]),new Dr("👍","peoples",["+1","thumbsup"]),new Dr("👎","peoples",["-1","thumbsdown"]),new Dr("👊","peoples",["fist_oncoming","facepunch","punch"]),new Dr("✊","peoples",["fist_raised","fist"]),new Dr("🤛","peoples",["fist_left"]),new Dr("🤜","peoples",["fist_right"]),new Dr("🤞","peoples",["crossed_fingers"]),new Dr("✌️","peoples",["v"]),new Dr("🤘","peoples",["metal"]),new Dr("👌","peoples",["ok_hand"]),new Dr("👈","peoples",["point_left"]),new Dr("👉","peoples",["point_right"]),new Dr("👆","peoples",["point_up_2"]),new Dr("👇","peoples",["point_down"]),new Dr("☝️","peoples",["point_up"]),new Dr("✋","peoples",["hand","raised_hand"]),new Dr("🤚","peoples",["raised_back_of_hand"]),new Dr("🖐","peoples",["raised_hand_with_fingers_splayed"]),new Dr("🖖","peoples",["vulcan_salute"]),new Dr("👋","peoples",["wave"]),new Dr("🤙","peoples",["call_me_hand"]),new Dr("💪","peoples",["muscle"]),new Dr("🖕","peoples",["middle_finger","fu"]),new Dr("✍️","peoples",["writing_hand"]),new Dr("🤳","peoples",["selfie"]),new Dr("💅","peoples",["nail_care"]),new Dr("💍","peoples",["ring"]),new Dr("💄","peoples",["lipstick"]),new Dr("💋","peoples",["kiss"]),new Dr("👄","peoples",["lips"]),new Dr("👅","peoples",["tongue"]),new Dr("👂","peoples",["ear"]),new Dr("👃","peoples",["nose"]),new Dr("👣","peoples",["footprints"]),new Dr("👁","peoples",["eye"]),new Dr("👀","peoples",["eyes"]),new Dr("🗣","peoples",["speaking_head"]),new Dr("👤","peoples",["bust_in_silhouette"]),new Dr("👥","peoples",["busts_in_silhouette"]),new Dr("👶","peoples",["baby"]),new Dr("👦","peoples",["boy"]),new Dr("👧","peoples",["girl"]),new Dr("👨","peoples",["man"]),new Dr("👩","peoples",["woman"]),new Dr("👱‍♀","peoples",["blonde_woman"]),new Dr("👱","peoples",["blonde_man","person_with_blond_hair"]),new Dr("👴","peoples",["older_man"]),new Dr("👵","peoples",["older_woman"]),new Dr("👲","peoples",["man_with_gua_pi_mao"]),new Dr("👳‍♀","peoples",["woman_with_turban"]),new Dr("👳","peoples",["man_with_turban"]),new Dr("👮‍♀","peoples",["policewoman"]),new Dr("👮","peoples",["policeman","cop"]),new Dr("👷‍♀","peoples",["construction_worker_woman"]),new Dr("👷","peoples",["construction_worker_man","construction_worker"]),new Dr("💂‍♀","peoples",["guardswoman"]),new Dr("💂","peoples",["guardsman"]),new Dr("👩‍⚕","peoples",["woman_health_worker"]),new Dr("👨‍⚕","peoples",["man_health_worker"]),new Dr("👩‍🌾","peoples",["woman_farmer"]),new Dr("👨‍🌾","peoples",["man_farmer"]),new Dr("👩‍🍳","peoples",["woman_cook"]),new Dr("👨‍🍳","peoples",["man_cook"]),new Dr("👩‍🎓","peoples",["woman_student"]),new Dr("👨‍🎓","peoples",["man_student"]),new Dr("👩‍🎤","peoples",["woman_singer"]),new Dr("👨‍🎤","peoples",["man_singer"]),new Dr("👩‍🏫","peoples",["woman_teacher"]),new Dr("👨‍🏫","peoples",["man_teacher"]),new Dr("👩‍🏭","peoples",["woman_factory_worker"]),new Dr("👨‍🏭","peoples",["man_factory_worker"]),new Dr("👩‍💻","peoples",["woman_technologist"]),new Dr("👨‍💻","peoples",["man_technologist"]),new Dr("👩‍💼","peoples",["woman_office_worker"]),new Dr("👨‍💼","peoples",["man_office_worker"]),new Dr("👩‍🔧","peoples",["woman_mechanic"]),new Dr("👨‍🔧","peoples",["man_mechanic"]),new Dr("👩‍🔬","peoples",["woman_scientist"]),new Dr("👨‍🔬","peoples",["man_scientist"]),new Dr("👩‍🎨","peoples",["woman_artist"]),new Dr("👨‍🎨","peoples",["man_artist"]),new Dr("👩‍🚒","peoples",["woman_firefighter"]),new Dr("👨‍🚒","peoples",["man_firefighter"]),new Dr("👩‍🚀","peoples",["woman_astronaut"]),new Dr("👨‍🚀","peoples",["man_astronaut"]),new Dr("🤶","peoples",["mrs_claus"]),new Dr("🎅","peoples",["santa"]),new Dr("👸","peoples",["princess"]),new Dr("🤴","peoples",["prince"]),new Dr("👰","peoples",["bride_with_veil"]),new Dr("🤵","peoples",["man_in_tuxedo"]),new Dr("👼","peoples",["angel"]),new Dr("🤰","peoples",["pregnant_woman"]),new Dr("🙇‍♀","peoples",["bowing_woman"]),new Dr("🙇","peoples",["bowing_man","bow"]),new Dr("💁","peoples",["tipping_hand_woman","information_desk_person","sassy_woman"]),new Dr("💁‍♂","peoples",["tipping_hand_man","sassy_man"]),new Dr("🙅","peoples",["no_good_woman","no_good","ng_woman"]),new Dr("🙅‍♂","peoples",["no_good_man","ng_man"]),new Dr("🙆","peoples",["ok_woman"]),new Dr("🙆‍♂","peoples",["ok_man"]),new Dr("🙋","peoples",["raising_hand_woman","raising_hand"]),new Dr("🙋‍♂","peoples",["raising_hand_man"]),new Dr("🤦‍♀","peoples",["woman_facepalming"]),new Dr("🤦‍♂","peoples",["man_facepalming"]),new Dr("🤷‍♀","peoples",["woman_shrugging"]),new Dr("🤷‍♂","peoples",["man_shrugging"]),new Dr("🙎","peoples",["pouting_woman","person_with_pouting_face"]),new Dr("🙎‍♂","peoples",["pouting_man"]),new Dr("🙍","peoples",["frowning_woman","person_frowning"]),new Dr("🙍‍♂","peoples",["frowning_man"]),new Dr("💇","peoples",["haircut_woman","haircut"]),new Dr("💇‍♂","peoples",["haircut_man"]),new Dr("💆","peoples",["massage_woman","massage"]),new Dr("💆‍♂","peoples",["massage_man"]),new Dr("🕴","peoples",["business_suit_levitating"]),new Dr("💃","peoples",["dancer"]),new Dr("🕺","peoples",["man_dancing"]),new Dr("👯","peoples",["dancing_women","dancers"]),new Dr("👯‍♂","peoples",["dancing_men"]),new Dr("🚶‍♀","peoples",["walking_woman"]),new Dr("🚶","peoples",["walking_man","walking"]),new Dr("🏃‍♀","peoples",["running_woman"]),new Dr("🏃","peoples",["running_man","runner","running"]),new Dr("👫","peoples",["couple"]),new Dr("👭","peoples",["two_women_holding_hands"]),new Dr("👬","peoples",["two_men_holding_hands"]),new Dr("💑","peoples",["couple_with_heart_woman_man","couple_with_heart"]),new Dr("👩‍❤️‍👩","peoples",["couple_with_heart_woman_woman"]),new Dr("👨‍❤️‍👨","peoples",["couple_with_heart_man_man"]),new Dr("💏","peoples",["couplekiss_man_woman"]),new Dr("👩‍❤️‍💋‍👩","peoples",["couplekiss_woman_woman"]),new Dr("👨‍❤️‍💋‍👨","peoples",["couplekiss_man_man"]),new Dr("👪","peoples",["family_man_woman_boy","family"]),new Dr("👨‍👩‍👧","peoples",["family_man_woman_girl"]),new Dr("👨‍👩‍👧‍👦","peoples",["family_man_woman_girl_boy"]),new Dr("👨‍👩‍👦‍👦","peoples",["family_man_woman_boy_boy"]),new Dr("👨‍👩‍👧‍👧","peoples",["family_man_woman_girl_girl"]),new Dr("👩‍👩‍👦","peoples",["family_woman_woman_boy"]),new Dr("👩‍👩‍👧","peoples",["family_woman_woman_girl"]),new Dr("👩‍👩‍👧‍👦","peoples",["family_woman_woman_girl_boy"]),new Dr("👩‍👩‍👦‍👦","peoples",["family_woman_woman_boy_boy"]),new Dr("👩‍👩‍👧‍👧","peoples",["family_woman_woman_girl_girl"]),new Dr("👨‍👨‍👦","peoples",["family_man_man_boy"]),new Dr("👨‍👨‍👧","peoples",["family_man_man_girl"]),new Dr("👨‍👨‍👧‍👦","peoples",["family_man_man_girl_boy"]),new Dr("👨‍👨‍👦‍👦","peoples",["family_man_man_boy_boy"]),new Dr("👨‍👨‍👧‍👧","peoples",["family_man_man_girl_girl"]),new Dr("👩‍👦","peoples",["family_woman_boy"]),new Dr("👩‍👧","peoples",["family_woman_girl"]),new Dr("👩‍👧‍👦","peoples",["family_woman_girl_boy"]),new Dr("👩‍👦‍👦","peoples",["family_woman_boy_boy"]),new Dr("👩‍👧‍👧","peoples",["family_woman_girl_girl"]),new Dr("👨‍👦","peoples",["family_man_boy"]),new Dr("👨‍👧","peoples",["family_man_girl"]),new Dr("👨‍👧‍👦","peoples",["family_man_girl_boy"]),new Dr("👨‍👦‍👦","peoples",["family_man_boy_boy"]),new Dr("👨‍👧‍👧","peoples",["family_man_girl_girl"]),new Dr("👚","peoples",["womans_clothes"]),new Dr("👕","peoples",["shirt","tshirt"]),new Dr("👖","peoples",["jeans"]),new Dr("👔","peoples",["necktie"]),new Dr("👗","peoples",["dress"]),new Dr("👙","peoples",["bikini"]),new Dr("👘","peoples",["kimono"]),new Dr("👠","peoples",["high_heel"]),new Dr("👡","peoples",["sandal"]),new Dr("👢","peoples",["boot"]),new Dr("👞","peoples",["mans_shoe","shoe"]),new Dr("👟","peoples",["athletic_shoe"]),new Dr("👒","peoples",["womans_hat"]),new Dr("🎩","peoples",["tophat"]),new Dr("🎓","peoples",["mortar_board"]),new Dr("👑","peoples",["crown"]),new Dr("⛑","peoples",["rescue_worker_helmet"]),new Dr("🎒","peoples",["school_satchel"]),new Dr("👝","peoples",["pouch"]),new Dr("👛","peoples",["purse"]),new Dr("👜","peoples",["handbag"]),new Dr("💼","peoples",["briefcase"]),new Dr("👓","peoples",["eyeglasses"]),new Dr("🕶","peoples",["dark_sunglasses"]),new Dr("🌂","peoples",["closed_umbrella"]),new Dr("☂️","peoples",["open_umbrella"]),new Dr("🐶","nature",["dog"]),new Dr("🐱","nature",["cat"]),new Dr("🐭","nature",["mouse"]),new Dr("🐹","nature",["hamster"]),new Dr("🐰","nature",["rabbit"]),new Dr("🦊","nature",["fox_face"]),new Dr("🐻","nature",["bear"]),new Dr("🐼","nature",["panda_face"]),new Dr("🐨","nature",["koala"]),new Dr("🐯","nature",["tiger"]),new Dr("🦁","nature",["lion"]),new Dr("🐮","nature",["cow"]),new Dr("🐷","nature",["pig"]),new Dr("🐽","nature",["pig_nose"]),new Dr("🐸","nature",["frog"]),new Dr("🐵","nature",["monkey_face"]),new Dr("🙈","nature",["see_no_evil"]),new Dr("🙉","nature",["hear_no_evil"]),new Dr("🙊","nature",["speak_no_evil"]),new Dr("🐒","nature",["monkey"]),new Dr("🐔","nature",["chicken"]),new Dr("🐧","nature",["penguin"]),new Dr("🐦","nature",["bird"]),new Dr("🐤","nature",["baby_chick"]),new Dr("🐣","nature",["hatching_chick"]),new Dr("🐥","nature",["hatched_chick"]),new Dr("🦆","nature",["duck"]),new Dr("🦅","nature",["eagle"]),new Dr("🦉","nature",["owl"]),new Dr("🦇","nature",["bat"]),new Dr("🐺","nature",["wolf"]),new Dr("🐗","nature",["boar"]),new Dr("🐴","nature",["horse"]),new Dr("🦄","nature",["unicorn"]),new Dr("🐝","nature",["bee","honeybee"]),new Dr("🐛","nature",["bug"]),new Dr("🦋","nature",["butterfly"]),new Dr("🐌","nature",["snail"]),new Dr("🐚","nature",["shell"]),new Dr("🐞","nature",["beetle"]),new Dr("🐜","nature",["ant"]),new Dr("🕷","nature",["spider"]),new Dr("🕸","nature",["spider_web"]),new Dr("🐢","nature",["turtle"]),new Dr("🐍","nature",["snake"]),new Dr("🦎","nature",["lizard"]),new Dr("🦂","nature",["scorpion"]),new Dr("🦀","nature",["crab"]),new Dr("🦑","nature",["squid"]),new Dr("🐙","nature",["octopus"]),new Dr("🦐","nature",["shrimp"]),new Dr("🐠","nature",["tropical_fish"]),new Dr("🐟","nature",["fish"]),new Dr("🐡","nature",["blowfish"]),new Dr("🐬","nature",["dolphin","flipper"]),new Dr("🦈","nature",["shark"]),new Dr("🐳","nature",["whale"]),new Dr("🐋","nature",["whale2"]),new Dr("🐊","nature",["crocodile"]),new Dr("🐆","nature",["leopard"]),new Dr("🐅","nature",["tiger2"]),new Dr("🐃","nature",["water_buffalo"]),new Dr("🐂","nature",["ox"]),new Dr("🐄","nature",["cow2"]),new Dr("🦌","nature",["deer"]),new Dr("🐪","nature",["dromedary_camel"]),new Dr("🐫","nature",["camel"]),new Dr("🐘","nature",["elephant"]),new Dr("🦏","nature",["rhinoceros"]),new Dr("🦍","nature",["gorilla"]),new Dr("🐎","nature",["racehorse"]),new Dr("🐖","nature",["pig2"]),new Dr("🐐","nature",["goat"]),new Dr("🐏","nature",["ram"]),new Dr("🐑","nature",["sheep"]),new Dr("🐕","nature",["dog2"]),new Dr("🐩","nature",["poodle"]),new Dr("🐈","nature",["cat2"]),new Dr("🐓","nature",["rooster"]),new Dr("🦃","nature",["turkey"]),new Dr("🕊","nature",["dove"]),new Dr("🐇","nature",["rabbit2"]),new Dr("🐁","nature",["mouse2"]),new Dr("🐀","nature",["rat"]),new Dr("🐿","nature",["chipmunk"]),new Dr("🐾","nature",["feet","paw_prints"]),new Dr("🐉","nature",["dragon"]),new Dr("🐲","nature",["dragon_face"]),new Dr("🌵","nature",["cactus"]),new Dr("🎄","nature",["christmas_tree"]),new Dr("🌲","nature",["evergreen_tree"]),new Dr("🌳","nature",["deciduous_tree"]),new Dr("🌴","nature",["palm_tree"]),new Dr("🌱","nature",["seedling"]),new Dr("🌿","nature",["herb"]),new Dr("☘️","nature",["shamrock"]),new Dr("🍀","nature",["four_leaf_clover"]),new Dr("🎍","nature",["bamboo"]),new Dr("🎋","nature",["tanabata_tree"]),new Dr("🍃","nature",["leaves"]),new Dr("🍂","nature",["fallen_leaf"]),new Dr("🍁","nature",["maple_leaf"]),new Dr("🍄","nature",["mushroom"]),new Dr("🌾","nature",["ear_of_rice"]),new Dr("💐","nature",["bouquet"]),new Dr("🌷","nature",["tulip"]),new Dr("🌹","nature",["rose"]),new Dr("🥀","nature",["wilted_flower"]),new Dr("🌻","nature",["sunflower"]),new Dr("🌼","nature",["blossom"]),new Dr("🌸","nature",["cherry_blossom"]),new Dr("🌺","nature",["hibiscus"]),new Dr("🌎","nature",["earth_americas"]),new Dr("🌍","nature",["earth_africa"]),new Dr("🌏","nature",["earth_asia"]),new Dr("🌕","nature",["full_moon"]),new Dr("🌖","nature",["waning_gibbous_moon"]),new Dr("🌗","nature",["last_quarter_moon"]),new Dr("🌘","nature",["waning_crescent_moon"]),new Dr("🌑","nature",["new_moon"]),new Dr("🌒","nature",["waxing_crescent_moon"]),new Dr("🌓","nature",["first_quarter_moon"]),new Dr("🌔","nature",["moon","waxing_gibbous_moon"]),new Dr("🌚","nature",["new_moon_with_face"]),new Dr("🌝","nature",["full_moon_with_face"]),new Dr("🌞","nature",["sun_with_face"]),new Dr("🌛","nature",["first_quarter_moon_with_face"]),new Dr("🌜","nature",["last_quarter_moon_with_face"]),new Dr("🌙","nature",["crescent_moon"]),new Dr("💫","nature",["dizzy"]),new Dr("⭐️","nature",["star"]),new Dr("🌟","nature",["star2"]),new Dr("✨","nature",["sparkles"]),new Dr("⚡️","nature",["zap"]),new Dr("🔥","nature",["fire"]),new Dr("💥","nature",["boom","collision"]),new Dr("☄","nature",["comet"]),new Dr("☀️","nature",["sunny"]),new Dr("🌤","nature",["sun_behind_small_cloud"]),new Dr("⛅️","nature",["partly_sunny"]),new Dr("🌥","nature",["sun_behind_large_cloud"]),new Dr("🌦","nature",["sun_behind_rain_cloud"]),new Dr("🌈","nature",["rainbow"]),new Dr("☁️","nature",["cloud"]),new Dr("🌧","nature",["cloud_with_rain"]),new Dr("⛈","nature",["cloud_with_lightning_and_rain"]),new Dr("🌩","nature",["cloud_with_lightning"]),new Dr("🌨","nature",["cloud_with_snow"]),new Dr("☃️","nature",["snowman_with_snow"]),new Dr("⛄️","nature",["snowman"]),new Dr("❄️","nature",["snowflake"]),new Dr("🌬","nature",["wind_face"]),new Dr("💨","nature",["dash"]),new Dr("🌪","nature",["tornado"]),new Dr("🌫","nature",["fog"]),new Dr("🌊","nature",["ocean"]),new Dr("💧","nature",["droplet"]),new Dr("💦","nature",["sweat_drops"]),new Dr("☔️","nature",["umbrella"]),new Dr("🍏","foods",["green_apple"]),new Dr("🍎","foods",["apple"]),new Dr("🍐","foods",["pear"]),new Dr("🍊","foods",["tangerine","orange","mandarin"]),new Dr("🍋","foods",["lemon"]),new Dr("🍌","foods",["banana"]),new Dr("🍉","foods",["watermelon"]),new Dr("🍇","foods",["grapes"]),new Dr("🍓","foods",["strawberry"]),new Dr("🍈","foods",["melon"]),new Dr("🍒","foods",["cherries"]),new Dr("🍑","foods",["peach"]),new Dr("🍍","foods",["pineapple"]),new Dr("🥝","foods",["kiwi_fruit"]),new Dr("🥑","foods",["avocado"]),new Dr("🍅","foods",["tomato"]),new Dr("🍆","foods",["eggplant"]),new Dr("🥒","foods",["cucumber"]),new Dr("🥕","foods",["carrot"]),new Dr("🌽","foods",["corn"]),new Dr("🌶","foods",["hot_pepper"]),new Dr("🥔","foods",["potato"]),new Dr("🍠","foods",["sweet_potato"]),new Dr("🌰","foods",["chestnut"]),new Dr("🥜","foods",["peanuts"]),new Dr("🍯","foods",["honey_pot"]),new Dr("🥐","foods",["croissant"]),new Dr("🍞","foods",["bread"]),new Dr("🥖","foods",["baguette_bread"]),new Dr("🧀","foods",["cheese"]),new Dr("🥚","foods",["egg"]),new Dr("🍳","foods",["fried_egg"]),new Dr("🥓","foods",["bacon"]),new Dr("🥞","foods",["pancakes"]),new Dr("🍤","foods",["fried_shrimp"]),new Dr("🍗","foods",["poultry_leg"]),new Dr("🍖","foods",["meat_on_bone"]),new Dr("🍕","foods",["pizza"]),new Dr("🌭","foods",["hotdog"]),new Dr("🍔","foods",["hamburger"]),new Dr("🍟","foods",["fries"]),new Dr("🥙","foods",["stuffed_flatbread"]),new Dr("🌮","foods",["taco"]),new Dr("🌯","foods",["burrito"]),new Dr("🥗","foods",["green_salad"]),new Dr("🥘","foods",["shallow_pan_of_food"]),new Dr("🍝","foods",["spaghetti"]),new Dr("🍜","foods",["ramen"]),new Dr("🍲","foods",["stew"]),new Dr("🍥","foods",["fish_cake"]),new Dr("🍣","foods",["sushi"]),new Dr("🍱","foods",["bento"]),new Dr("🍛","foods",["curry"]),new Dr("🍚","foods",["rice"]),new Dr("🍙","foods",["rice_ball"]),new Dr("🍘","foods",["rice_cracker"]),new Dr("🍢","foods",["oden"]),new Dr("🍡","foods",["dango"]),new Dr("🍧","foods",["shaved_ice"]),new Dr("🍨","foods",["ice_cream"]),new Dr("🍦","foods",["icecream"]),new Dr("🍰","foods",["cake"]),new Dr("🎂","foods",["birthday"]),new Dr("🍮","foods",["custard"]),new Dr("🍭","foods",["lollipop"]),new Dr("🍬","foods",["candy"]),new Dr("🍫","foods",["chocolate_bar"]),new Dr("🍿","foods",["popcorn"]),new Dr("🍩","foods",["doughnut"]),new Dr("🍪","foods",["cookie"]),new Dr("🥛","foods",["milk_glass"]),new Dr("🍼","foods",["baby_bottle"]),new Dr("☕️","foods",["coffee"]),new Dr("🍵","foods",["tea"]),new Dr("🍶","foods",["sake"]),new Dr("🍺","foods",["beer"]),new Dr("🍻","foods",["beers"]),new Dr("🥂","foods",["clinking_glasses"]),new Dr("🍷","foods",["wine_glass"]),new Dr("🥃","foods",["tumbler_glass"]),new Dr("🍸","foods",["cocktail"]),new Dr("🍹","foods",["tropical_drink"]),new Dr("🍾","foods",["champagne"]),new Dr("🥄","foods",["spoon"]),new Dr("🍴","foods",["fork_and_knife"]),new Dr("🍽","foods",["plate_with_cutlery"]),new Dr("⚽️","activity",["soccer"]),new Dr("🏀","activity",["basketball"]),new Dr("🏈","activity",["football"]),new Dr("⚾️","activity",["baseball"]),new Dr("🎾","activity",["tennis"]),new Dr("🏐","activity",["volleyball"]),new Dr("🏉","activity",["rugby_football"]),new Dr("🎱","activity",["8ball"]),new Dr("🏓","activity",["ping_pong"]),new Dr("🏸","activity",["badminton"]),new Dr("🥅","activity",["goal_net"]),new Dr("🏒","activity",["ice_hockey"]),new Dr("🏑","activity",["field_hockey"]),new Dr("🏏","activity",["cricket"]),new Dr("⛳️","activity",["golf"]),new Dr("🏹","activity",["bow_and_arrow"]),new Dr("🎣","activity",["fishing_pole_and_fish"]),new Dr("🥊","activity",["boxing_glove"]),new Dr("🥋","activity",["martial_arts_uniform"]),new Dr("⛸","activity",["ice_skate"]),new Dr("🎿","activity",["ski"]),new Dr("⛷","activity",["skier"]),new Dr("🏂","activity",["snowboarder"]),new Dr("🏋️‍♀️","activity",["weight_lifting_woman"]),new Dr("🏋","activity",["weight_lifting_man"]),new Dr("🤺","activity",["person_fencing"]),new Dr("🤼‍♀","activity",["women_wrestling"]),new Dr("🤼‍♂","activity",["men_wrestling"]),new Dr("🤸‍♀","activity",["woman_cartwheeling"]),new Dr("🤸‍♂","activity",["man_cartwheeling"]),new Dr("⛹️‍♀️","activity",["basketball_woman"]),new Dr("⛹","activity",["basketball_man"]),new Dr("🤾‍♀","activity",["woman_playing_handball"]),new Dr("🤾‍♂","activity",["man_playing_handball"]),new Dr("🏌️‍♀️","activity",["golfing_woman"]),new Dr("🏌","activity",["golfing_man"]),new Dr("🏄‍♀","activity",["surfing_woman"]),new Dr("🏄","activity",["surfing_man","surfer"]),new Dr("🏊‍♀","activity",["swimming_woman"]),new Dr("🏊","activity",["swimming_man","swimmer"]),new Dr("🤽‍♀","activity",["woman_playing_water_polo"]),new Dr("🤽‍♂","activity",["man_playing_water_polo"]),new Dr("🚣‍♀","activity",["rowing_woman"]),new Dr("🚣","activity",["rowing_man","rowboat"]),new Dr("🏇","activity",["horse_racing"]),new Dr("🚴‍♀","activity",["biking_woman"]),new Dr("🚴","activity",["biking_man","bicyclist"]),new Dr("🚵‍♀","activity",["mountain_biking_woman"]),new Dr("🚵","activity",["mountain_biking_man","mountain_bicyclist"]),new Dr("🎽","activity",["running_shirt_with_sash"]),new Dr("🏅","activity",["medal_sports"]),new Dr("🎖","activity",["medal_military"]),new Dr("🥇","activity",["1st_place_medal"]),new Dr("🥈","activity",["2nd_place_medal"]),new Dr("🥉","activity",["3rd_place_medal"]),new Dr("🏆","activity",["trophy"]),new Dr("🏵","activity",["rosette"]),new Dr("🎗","activity",["reminder_ribbon"]),new Dr("🎫","activity",["ticket"]),new Dr("🎟","activity",["tickets"]),new Dr("🎪","activity",["circus_tent"]),new Dr("🤹‍♀","activity",["woman_juggling"]),new Dr("🤹‍♂","activity",["man_juggling"]),new Dr("🎭","activity",["performing_arts"]),new Dr("🎨","activity",["art"]),new Dr("🎬","activity",["clapper"]),new Dr("🎤","activity",["microphone"]),new Dr("🎧","activity",["headphones"]),new Dr("🎼","activity",["musical_score"]),new Dr("🎹","activity",["musical_keyboard"]),new Dr("🥁","activity",["drum"]),new Dr("🎷","activity",["saxophone"]),new Dr("🎺","activity",["trumpet"]),new Dr("🎸","activity",["guitar"]),new Dr("🎻","activity",["violin"]),new Dr("🎲","activity",["game_die"]),new Dr("🎯","activity",["dart"]),new Dr("🎳","activity",["bowling"]),new Dr("🎮","activity",["video_game"]),new Dr("🎰","activity",["slot_machine"]),new Dr("🚗","places",["car","red_car"]),new Dr("🚕","places",["taxi"]),new Dr("🚙","places",["blue_car"]),new Dr("🚌","places",["bus"]),new Dr("🚎","places",["trolleybus"]),new Dr("🏎","places",["racing_car"]),new Dr("🚓","places",["police_car"]),new Dr("🚑","places",["ambulance"]),new Dr("🚒","places",["fire_engine"]),new Dr("🚐","places",["minibus"]),new Dr("🚚","places",["truck"]),new Dr("🚛","places",["articulated_lorry"]),new Dr("🚜","places",["tractor"]),new Dr("🛴","places",["kick_scooter"]),new Dr("🚲","places",["bike"]),new Dr("🛵","places",["motor_scooter"]),new Dr("🏍","places",["motorcycle"]),new Dr("🚨","places",["rotating_light"]),new Dr("🚔","places",["oncoming_police_car"]),new Dr("🚍","places",["oncoming_bus"]),new Dr("🚘","places",["oncoming_automobile"]),new Dr("🚖","places",["oncoming_taxi"]),new Dr("🚡","places",["aerial_tramway"]),new Dr("🚠","places",["mountain_cableway"]),new Dr("🚟","places",["suspension_railway"]),new Dr("🚃","places",["railway_car"]),new Dr("🚋","places",["train"]),new Dr("🚞","places",["mountain_railway"]),new Dr("🚝","places",["monorail"]),new Dr("🚄","places",["bullettrain_side"]),new Dr("🚅","places",["bullettrain_front"]),new Dr("🚈","places",["light_rail"]),new Dr("🚂","places",["steam_locomotive"]),new Dr("🚆","places",["train2"]),new Dr("🚇","places",["metro"]),new Dr("🚊","places",["tram"]),new Dr("🚉","places",["station"]),new Dr("🚁","places",["helicopter"]),new Dr("🛩","places",["small_airplane"]),new Dr("✈️","places",["airplane"]),new Dr("🛫","places",["flight_departure"]),new Dr("🛬","places",["flight_arrival"]),new Dr("🚀","places",["rocket"]),new Dr("🛰","places",["artificial_satellite"]),new Dr("💺","places",["seat"]),new Dr("🛶","places",["canoe"]),new Dr("⛵️","places",["boat","sailboat"]),new Dr("🛥","places",["motor_boat"]),new Dr("🚤","places",["speedboat"]),new Dr("🛳","places",["passenger_ship"]),new Dr("⛴","places",["ferry"]),new Dr("🚢","places",["ship"]),new Dr("⚓️","places",["anchor"]),new Dr("🚧","places",["construction"]),new Dr("⛽️","places",["fuelpump"]),new Dr("🚏","places",["busstop"]),new Dr("🚦","places",["vertical_traffic_light"]),new Dr("🚥","places",["traffic_light"]),new Dr("🗺","places",["world_map"]),new Dr("🗿","places",["moyai"]),new Dr("🗽","places",["statue_of_liberty"]),new Dr("⛲️","places",["fountain"]),new Dr("🗼","places",["tokyo_tower"]),new Dr("🏰","places",["european_castle"]),new Dr("🏯","places",["japanese_castle"]),new Dr("🏟","places",["stadium"]),new Dr("🎡","places",["ferris_wheel"]),new Dr("🎢","places",["roller_coaster"]),new Dr("🎠","places",["carousel_horse"]),new Dr("⛱","places",["parasol_on_ground"]),new Dr("🏖","places",["beach_umbrella"]),new Dr("🏝","places",["desert_island"]),new Dr("⛰","places",["mountain"]),new Dr("🏔","places",["mountain_snow"]),new Dr("🗻","places",["mount_fuji"]),new Dr("🌋","places",["volcano"]),new Dr("🏜","places",["desert"]),new Dr("🏕","places",["camping"]),new Dr("⛺️","places",["tent"]),new Dr("🛤","places",["railway_track"]),new Dr("🛣","places",["motorway"]),new Dr("🏗","places",["building_construction"]),new Dr("🏭","places",["factory"]),new Dr("🏠","places",["house"]),new Dr("🏡","places",["house_with_garden"]),new Dr("🏘","places",["houses"]),new Dr("🏚","places",["derelict_house"]),new Dr("🏢","places",["office"]),new Dr("🏬","places",["department_store"]),new Dr("🏣","places",["post_office"]),new Dr("🏤","places",["european_post_office"]),new Dr("🏥","places",["hospital"]),new Dr("🏦","places",["bank"]),new Dr("🏨","places",["hotel"]),new Dr("🏪","places",["convenience_store"]),new Dr("🏫","places",["school"]),new Dr("🏩","places",["love_hotel"]),new Dr("💒","places",["wedding"]),new Dr("🏛","places",["classical_building"]),new Dr("⛪️","places",["church"]),new Dr("🕌","places",["mosque"]),new Dr("🕍","places",["synagogue"]),new Dr("🕋","places",["kaaba"]),new Dr("⛩","places",["shinto_shrine"]),new Dr("🗾","places",["japan"]),new Dr("🎑","places",["rice_scene"]),new Dr("🏞","places",["national_park"]),new Dr("🌅","places",["sunrise"]),new Dr("🌄","places",["sunrise_over_mountains"]),new Dr("🌠","places",["stars"]),new Dr("🎇","places",["sparkler"]),new Dr("🎆","places",["fireworks"]),new Dr("🌇","places",["city_sunrise"]),new Dr("🌆","places",["city_sunset"]),new Dr("🏙","places",["cityscape"]),new Dr("🌃","places",["night_with_stars"]),new Dr("🌌","places",["milky_way"]),new Dr("🌉","places",["bridge_at_night"]),new Dr("🌁","places",["foggy"]),new Dr("⌚️","objects",["watch"]),new Dr("📱","objects",["iphone"]),new Dr("📲","objects",["calling"]),new Dr("💻","objects",["computer"]),new Dr("⌨️","objects",["keyboard"]),new Dr("🖥","objects",["desktop_computer"]),new Dr("🖨","objects",["printer"]),new Dr("🖱","objects",["computer_mouse"]),new Dr("🖲","objects",["trackball"]),new Dr("🕹","objects",["joystick"]),new Dr("🗜","objects",["clamp"]),new Dr("💽","objects",["minidisc"]),new Dr("💾","objects",["floppy_disk"]),new Dr("💿","objects",["cd"]),new Dr("📀","objects",["dvd"]),new Dr("📼","objects",["vhs"]),new Dr("📷","objects",["camera"]),new Dr("📸","objects",["camera_flash"]),new Dr("📹","objects",["video_camera"]),new Dr("🎥","objects",["movie_camera"]),new Dr("📽","objects",["film_projector"]),new Dr("🎞","objects",["film_strip"]),new Dr("📞","objects",["telephone_receiver"]),new Dr("☎️","objects",["phone","telephone"]),new Dr("📟","objects",["pager"]),new Dr("📠","objects",["fax"]),new Dr("📺","objects",["tv"]),new Dr("📻","objects",["radio"]),new Dr("🎙","objects",["studio_microphone"]),new Dr("🎚","objects",["level_slider"]),new Dr("🎛","objects",["control_knobs"]),new Dr("⏱","objects",["stopwatch"]),new Dr("⏲","objects",["timer_clock"]),new Dr("⏰","objects",["alarm_clock"]),new Dr("🕰","objects",["mantelpiece_clock"]),new Dr("⌛️","objects",["hourglass"]),new Dr("⏳","objects",["hourglass_flowing_sand"]),new Dr("📡","objects",["satellite"]),new Dr("🔋","objects",["battery"]),new Dr("🔌","objects",["electric_plug"]),new Dr("💡","objects",["bulb"]),new Dr("🔦","objects",["flashlight"]),new Dr("🕯","objects",["candle"]),new Dr("🗑","objects",["wastebasket"]),new Dr("🛢","objects",["oil_drum"]),new Dr("💸","objects",["money_with_wings"]),new Dr("💵","objects",["dollar"]),new Dr("💴","objects",["yen"]),new Dr("💶","objects",["euro"]),new Dr("💷","objects",["pound"]),new Dr("💰","objects",["moneybag"]),new Dr("💳","objects",["credit_card"]),new Dr("💎","objects",["gem"]),new Dr("⚖️","objects",["balance_scale"]),new Dr("🔧","objects",["wrench"]),new Dr("🔨","objects",["hammer"]),new Dr("⚒","objects",["hammer_and_pick"]),new Dr("🛠","objects",["hammer_and_wrench"]),new Dr("⛏","objects",["pick"]),new Dr("🔩","objects",["nut_and_bolt"]),new Dr("⚙️","objects",["gear"]),new Dr("⛓","objects",["chains"]),new Dr("🔫","objects",["gun"]),new Dr("💣","objects",["bomb"]),new Dr("🔪","objects",["hocho","knife"]),new Dr("🗡","objects",["dagger"]),new Dr("⚔️","objects",["crossed_swords"]),new Dr("🛡","objects",["shield"]),new Dr("🚬","objects",["smoking"]),new Dr("⚰️","objects",["coffin"]),new Dr("⚱️","objects",["funeral_urn"]),new Dr("🏺","objects",["amphora"]),new Dr("🔮","objects",["crystal_ball"]),new Dr("📿","objects",["prayer_beads"]),new Dr("💈","objects",["barber"]),new Dr("⚗️","objects",["alembic"]),new Dr("🔭","objects",["telescope"]),new Dr("🔬","objects",["microscope"]),new Dr("🕳","objects",["hole"]),new Dr("💊","objects",["pill"]),new Dr("💉","objects",["syringe"]),new Dr("🌡","objects",["thermometer"]),new Dr("🚽","objects",["toilet"]),new Dr("🚰","objects",["potable_water"]),new Dr("🚿","objects",["shower"]),new Dr("🛁","objects",["bathtub"]),new Dr("🛀","objects",["bath"]),new Dr("🛎","objects",["bellhop_bell"]),new Dr("🔑","objects",["key"]),new Dr("🗝","objects",["old_key"]),new Dr("🚪","objects",["door"]),new Dr("🛋","objects",["couch_and_lamp"]),new Dr("🛏","objects",["bed"]),new Dr("🛌","objects",["sleeping_bed"]),new Dr("🖼","objects",["framed_picture"]),new Dr("🛍","objects",["shopping"]),new Dr("🛒","objects",["shopping_cart"]),new Dr("🎁","objects",["gift"]),new Dr("🎈","objects",["balloon"]),new Dr("🎏","objects",["flags"]),new Dr("🎀","objects",["ribbon"]),new Dr("🎊","objects",["confetti_ball"]),new Dr("🎉","objects",["tada"]),new Dr("🎎","objects",["dolls"]),new Dr("🏮","objects",["izakaya_lantern","lantern"]),new Dr("🎐","objects",["wind_chime"]),new Dr("✉️","objects",["email","envelope"]),new Dr("📩","objects",["envelope_with_arrow"]),new Dr("📨","objects",["incoming_envelope"]),new Dr("📧","objects",["e-mail"]),new Dr("💌","objects",["love_letter"]),new Dr("📥","objects",["inbox_tray"]),new Dr("📤","objects",["outbox_tray"]),new Dr("📦","objects",["package"]),new Dr("🏷","objects",["label"]),new Dr("📪","objects",["mailbox_closed"]),new Dr("📫","objects",["mailbox"]),new Dr("📬","objects",["mailbox_with_mail"]),new Dr("📭","objects",["mailbox_with_no_mail"]),new Dr("📮","objects",["postbox"]),new Dr("📯","objects",["postal_horn"]),new Dr("📜","objects",["scroll"]),new Dr("📃","objects",["page_with_curl"]),new Dr("📄","objects",["page_facing_up"]),new Dr("📑","objects",["bookmark_tabs"]),new Dr("📊","objects",["bar_chart"]),new Dr("📈","objects",["chart_with_upwards_trend"]),new Dr("📉","objects",["chart_with_downwards_trend"]),new Dr("🗒","objects",["spiral_notepad"]),new Dr("🗓","objects",["spiral_calendar"]),new Dr("📆","objects",["calendar"]),new Dr("📅","objects",["date"]),new Dr("📇","objects",["card_index"]),new Dr("🗃","objects",["card_file_box"]),new Dr("🗳","objects",["ballot_box"]),new Dr("🗄","objects",["file_cabinet"]),new Dr("📋","objects",["clipboard"]),new Dr("📁","objects",["file_folder"]),new Dr("📂","objects",["open_file_folder"]),new Dr("🗂","objects",["card_index_dividers"]),new Dr("🗞","objects",["newspaper_roll"]),new Dr("📰","objects",["newspaper"]),new Dr("📓","objects",["notebook"]),new Dr("📔","objects",["notebook_with_decorative_cover"]),new Dr("📒","objects",["ledger"]),new Dr("📕","objects",["closed_book"]),new Dr("📗","objects",["green_book"]),new Dr("📘","objects",["blue_book"]),new Dr("📙","objects",["orange_book"]),new Dr("📚","objects",["books"]),new Dr("📖","objects",["book","open_book"]),new Dr("🔖","objects",["bookmark"]),new Dr("🔗","objects",["link"]),new Dr("📎","objects",["paperclip"]),new Dr("🖇","objects",["paperclips"]),new Dr("📐","objects",["triangular_ruler"]),new Dr("📏","objects",["straight_ruler"]),new Dr("📌","objects",["pushpin"]),new Dr("📍","objects",["round_pushpin"]),new Dr("✂️","objects",["scissors"]),new Dr("🖊","objects",["pen"]),new Dr("🖋","objects",["fountain_pen"]),new Dr("✒️","objects",["black_nib"]),new Dr("🖌","objects",["paintbrush"]),new Dr("🖍","objects",["crayon"]),new Dr("📝","objects",["memo","pencil"]),new Dr("✏️","objects",["pencil2"]),new Dr("🔍","objects",["mag"]),new Dr("🔎","objects",["mag_right"]),new Dr("🔏","objects",["lock_with_ink_pen"]),new Dr("🔐","objects",["closed_lock_with_key"]),new Dr("🔒","objects",["lock"]),new Dr("🔓","objects",["unlock"]),new Dr("❤️","symbols",["heart"]),new Dr("💛","symbols",["yellow_heart"]),new Dr("💚","symbols",["green_heart"]),new Dr("💙","symbols",["blue_heart"]),new Dr("💜","symbols",["purple_heart"]),new Dr("🖤","symbols",["black_heart"]),new Dr("💔","symbols",["broken_heart"]),new Dr("❣️","symbols",["heavy_heart_exclamation"]),new Dr("💕","symbols",["two_hearts"]),new Dr("💞","symbols",["revolving_hearts"]),new Dr("💓","symbols",["heartbeat"]),new Dr("💗","symbols",["heartpulse"]),new Dr("💖","symbols",["sparkling_heart"]),new Dr("💘","symbols",["cupid"]),new Dr("💝","symbols",["gift_heart"]),new Dr("💟","symbols",["heart_decoration"]),new Dr("☮️","symbols",["peace_symbol"]),new Dr("✝️","symbols",["latin_cross"]),new Dr("☪️","symbols",["star_and_crescent"]),new Dr("🕉","symbols",["om"]),new Dr("☸️","symbols",["wheel_of_dharma"]),new Dr("✡️","symbols",["star_of_david"]),new Dr("🔯","symbols",["six_pointed_star"]),new Dr("🕎","symbols",["menorah"]),new Dr("☯️","symbols",["yin_yang"]),new Dr("☦️","symbols",["orthodox_cross"]),new Dr("🛐","symbols",["place_of_worship"]),new Dr("⛎","symbols",["ophiuchus"]),new Dr("♈️","symbols",["aries"]),new Dr("♉️","symbols",["taurus"]),new Dr("♊️","symbols",["gemini"]),new Dr("♋️","symbols",["cancer"]),new Dr("♌️","symbols",["leo"]),new Dr("♍️","symbols",["virgo"]),new Dr("♎️","symbols",["libra"]),new Dr("♏️","symbols",["scorpius"]),new Dr("♐️","symbols",["sagittarius"]),new Dr("♑️","symbols",["capricorn"]),new Dr("♒️","symbols",["aquarius"]),new Dr("♓️","symbols",["pisces"]),new Dr("🆔","symbols",["id"]),new Dr("⚛️","symbols",["atom_symbol"]),new Dr("🉑","symbols",["accept"]),new Dr("☢️","symbols",["radioactive"]),new Dr("☣️","symbols",["biohazard"]),new Dr("📴","symbols",["mobile_phone_off"]),new Dr("📳","symbols",["vibration_mode"]),new Dr("🈶","symbols",["u6709"]),new Dr("🈚️","symbols",["u7121"]),new Dr("🈸","symbols",["u7533"]),new Dr("🈺","symbols",["u55b6"]),new Dr("🈷️","symbols",["u6708"]),new Dr("✴️","symbols",["eight_pointed_black_star"]),new Dr("🆚","symbols",["vs"]),new Dr("💮","symbols",["white_flower"]),new Dr("🉐","symbols",["ideograph_advantage"]),new Dr("㊙️","symbols",["secret"]),new Dr("㊗️","symbols",["congratulations"]),new Dr("🈴","symbols",["u5408"]),new Dr("🈵","symbols",["u6e80"]),new Dr("🈹","symbols",["u5272"]),new Dr("🈲","symbols",["u7981"]),new Dr("🅰️","symbols",["a"]),new Dr("🅱️","symbols",["b"]),new Dr("🆎","symbols",["ab"]),new Dr("🆑","symbols",["cl"]),new Dr("🅾️","symbols",["o2"]),new Dr("🆘","symbols",["sos"]),new Dr("❌","symbols",["x"]),new Dr("⭕️","symbols",["o"]),new Dr("🛑","symbols",["stop_sign"]),new Dr("⛔️","symbols",["no_entry"]),new Dr("📛","symbols",["name_badge"]),new Dr("🚫","symbols",["no_entry_sign"]),new Dr("💯","symbols",["100"]),new Dr("💢","symbols",["anger"]),new Dr("♨️","symbols",["hotsprings"]),new Dr("🚷","symbols",["no_pedestrians"]),new Dr("🚯","symbols",["do_not_litter"]),new Dr("🚳","symbols",["no_bicycles"]),new Dr("🚱","symbols",["non-potable_water"]),new Dr("🔞","symbols",["underage"]),new Dr("📵","symbols",["no_mobile_phones"]),new Dr("🚭","symbols",["no_smoking"]),new Dr("❗️","symbols",["exclamation","heavy_exclamation_mark"]),new Dr("❕","symbols",["grey_exclamation"]),new Dr("❓","symbols",["question"]),new Dr("❔","symbols",["grey_question"]),new Dr("‼️","symbols",["bangbang"]),new Dr("⁉️","symbols",["interrobang"]),new Dr("🔅","symbols",["low_brightness"]),new Dr("🔆","symbols",["high_brightness"]),new Dr("〽️","symbols",["part_alternation_mark"]),new Dr("⚠️","symbols",["warning"]),new Dr("🚸","symbols",["children_crossing"]),new Dr("🔱","symbols",["trident"]),new Dr("⚜️","symbols",["fleur_de_lis"]),new Dr("🔰","symbols",["beginner"]),new Dr("♻️","symbols",["recycle"]),new Dr("✅","symbols",["white_check_mark"]),new Dr("🈯️","symbols",["u6307"]),new Dr("💹","symbols",["chart"]),new Dr("❇️","symbols",["sparkle"]),new Dr("✳️","symbols",["eight_spoked_asterisk"]),new Dr("❎","symbols",["negative_squared_cross_mark"]),new Dr("🌐","symbols",["globe_with_meridians"]),new Dr("💠","symbols",["diamond_shape_with_a_dot_inside"]),new Dr("Ⓜ️","symbols",["m"]),new Dr("🌀","symbols",["cyclone"]),new Dr("💤","symbols",["zzz"]),new Dr("🏧","symbols",["atm"]),new Dr("🚾","symbols",["wc"]),new Dr("♿️","symbols",["wheelchair"]),new Dr("🅿️","symbols",["parking"]),new Dr("🈳","symbols",["u7a7a"]),new Dr("🈂️","symbols",["sa"]),new Dr("🛂","symbols",["passport_control"]),new Dr("🛃","symbols",["customs"]),new Dr("🛄","symbols",["baggage_claim"]),new Dr("🛅","symbols",["left_luggage"]),new Dr("🚹","symbols",["mens"]),new Dr("🚺","symbols",["womens"]),new Dr("🚼","symbols",["baby_symbol"]),new Dr("🚻","symbols",["restroom"]),new Dr("🚮","symbols",["put_litter_in_its_place"]),new Dr("🎦","symbols",["cinema"]),new Dr("📶","symbols",["signal_strength"]),new Dr("🈁","symbols",["koko"]),new Dr("🔣","symbols",["symbols"]),new Dr("ℹ️","symbols",["information_source"]),new Dr("🔤","symbols",["abc"]),new Dr("🔡","symbols",["abcd"]),new Dr("🔠","symbols",["capital_abcd"]),new Dr("🆖","symbols",["ng"]),new Dr("🆗","symbols",["ok"]),new Dr("🆙","symbols",["up"]),new Dr("🆒","symbols",["cool"]),new Dr("🆕","symbols",["new"]),new Dr("🆓","symbols",["free"]),new Dr("0️⃣","symbols",["zero"]),new Dr("1️⃣","symbols",["one"]),new Dr("2️⃣","symbols",["two"]),new Dr("3️⃣","symbols",["three"]),new Dr("4️⃣","symbols",["four"]),new Dr("5️⃣","symbols",["five"]),new Dr("6️⃣","symbols",["six"]),new Dr("7️⃣","symbols",["seven"]),new Dr("8️⃣","symbols",["eight"]),new Dr("9️⃣","symbols",["nine"]),new Dr("🔟","symbols",["keycap_ten"]),new Dr("🔢","symbols",["1234"]),new Dr("#️⃣","symbols",["hash"]),new Dr("*️⃣","symbols",["asterisk"]),new Dr("▶️","symbols",["arrow_forward"]),new Dr("⏸","symbols",["pause_button"]),new Dr("⏯","symbols",["play_or_pause_button"]),new Dr("⏹","symbols",["stop_button"]),new Dr("⏺","symbols",["record_button"]),new Dr("⏭","symbols",["next_track_button"]),new Dr("⏮","symbols",["previous_track_button"]),new Dr("⏩","symbols",["fast_forward"]),new Dr("⏪","symbols",["rewind"]),new Dr("⏫","symbols",["arrow_double_up"]),new Dr("⏬","symbols",["arrow_double_down"]),new Dr("◀️","symbols",["arrow_backward"]),new Dr("🔼","symbols",["arrow_up_small"]),new Dr("🔽","symbols",["arrow_down_small"]),new Dr("➡️","symbols",["arrow_right"]),new Dr("⬅️","symbols",["arrow_left"]),new Dr("⬆️","symbols",["arrow_up"]),new Dr("⬇️","symbols",["arrow_down"]),new Dr("↗️","symbols",["arrow_upper_right"]),new Dr("↘️","symbols",["arrow_lower_right"]),new Dr("↙️","symbols",["arrow_lower_left"]),new Dr("↖️","symbols",["arrow_upper_left"]),new Dr("↕️","symbols",["arrow_up_down"]),new Dr("↔️","symbols",["left_right_arrow"]),new Dr("↪️","symbols",["arrow_right_hook"]),new Dr("↩️","symbols",["leftwards_arrow_with_hook"]),new Dr("⤴️","symbols",["arrow_heading_up"]),new Dr("⤵️","symbols",["arrow_heading_down"]),new Dr("🔀","symbols",["twisted_rightwards_arrows"]),new Dr("🔁","symbols",["repeat"]),new Dr("🔂","symbols",["repeat_one"]),new Dr("🔄","symbols",["arrows_counterclockwise"]),new Dr("🔃","symbols",["arrows_clockwise"]),new Dr("🎵","symbols",["musical_note"]),new Dr("🎶","symbols",["notes"]),new Dr("➕","symbols",["heavy_plus_sign"]),new Dr("➖","symbols",["heavy_minus_sign"]),new Dr("➗","symbols",["heavy_division_sign"]),new Dr("✖️","symbols",["heavy_multiplication_x"]),new Dr("💲","symbols",["heavy_dollar_sign"]),new Dr("💱","symbols",["currency_exchange"]),new Dr("™️","symbols",["tm"]),new Dr("©️","symbols",["copyright"]),new Dr("®️","symbols",["registered"]),new Dr("〰️","symbols",["wavy_dash"]),new Dr("➰","symbols",["curly_loop"]),new Dr("➿","symbols",["loop"]),new Dr("🔚","symbols",["end"]),new Dr("🔙","symbols",["back"]),new Dr("🔛","symbols",["on"]),new Dr("🔝","symbols",["top"]),new Dr("🔜","symbols",["soon"]),new Dr("✔️","symbols",["heavy_check_mark"]),new Dr("☑️","symbols",["ballot_box_with_check"]),new Dr("🔘","symbols",["radio_button"]),new Dr("⚪️","symbols",["white_circle"]),new Dr("⚫️","symbols",["black_circle"]),new Dr("🔴","symbols",["red_circle"]),new Dr("🔵","symbols",["large_blue_circle"]),new Dr("🔺","symbols",["small_red_triangle"]),new Dr("🔻","symbols",["small_red_triangle_down"]),new Dr("🔸","symbols",["small_orange_diamond"]),new Dr("🔹","symbols",["small_blue_diamond"]),new Dr("🔶","symbols",["large_orange_diamond"]),new Dr("🔷","symbols",["large_blue_diamond"]),new Dr("🔳","symbols",["white_square_button"]),new Dr("🔲","symbols",["black_square_button"]),new Dr("▪️","symbols",["black_small_square"]),new Dr("▫️","symbols",["white_small_square"]),new Dr("◾️","symbols",["black_medium_small_square"]),new Dr("◽️","symbols",["white_medium_small_square"]),new Dr("◼️","symbols",["black_medium_square"]),new Dr("◻️","symbols",["white_medium_square"]),new Dr("⬛️","symbols",["black_large_square"]),new Dr("⬜️","symbols",["white_large_square"]),new Dr("🔈","symbols",["speaker"]),new Dr("🔇","symbols",["mute"]),new Dr("🔉","symbols",["sound"]),new Dr("🔊","symbols",["loud_sound"]),new Dr("🔔","symbols",["bell"]),new Dr("🔕","symbols",["no_bell"]),new Dr("📣","symbols",["mega"]),new Dr("📢","symbols",["loudspeaker"]),new Dr("👁‍🗨","symbols",["eye_speech_bubble"]),new Dr("💬","symbols",["speech_balloon"]),new Dr("💭","symbols",["thought_balloon"]),new Dr("🗯","symbols",["right_anger_bubble"]),new Dr("♠️","symbols",["spades"]),new Dr("♣️","symbols",["clubs"]),new Dr("♥️","symbols",["hearts"]),new Dr("♦️","symbols",["diamonds"]),new Dr("🃏","symbols",["black_joker"]),new Dr("🎴","symbols",["flower_playing_cards"]),new Dr("🀄️","symbols",["mahjong"]),new Dr("🕐","symbols",["clock1"]),new Dr("🕑","symbols",["clock2"]),new Dr("🕒","symbols",["clock3"]),new Dr("🕓","symbols",["clock4"]),new Dr("🕔","symbols",["clock5"]),new Dr("🕕","symbols",["clock6"]),new Dr("🕖","symbols",["clock7"]),new Dr("🕗","symbols",["clock8"]),new Dr("🕘","symbols",["clock9"]),new Dr("🕙","symbols",["clock10"]),new Dr("🕚","symbols",["clock11"]),new Dr("🕛","symbols",["clock12"]),new Dr("🕜","symbols",["clock130"]),new Dr("🕝","symbols",["clock230"]),new Dr("🕞","symbols",["clock330"]),new Dr("🕟","symbols",["clock430"]),new Dr("🕠","symbols",["clock530"]),new Dr("🕡","symbols",["clock630"]),new Dr("🕢","symbols",["clock730"]),new Dr("🕣","symbols",["clock830"]),new Dr("🕤","symbols",["clock930"]),new Dr("🕥","symbols",["clock1030"]),new Dr("🕦","symbols",["clock1130"]),new Dr("🕧","symbols",["clock1230"]),new Dr("🏳️","flags",["white_flag"]),new Dr("🏴","flags",["black_flag"]),new Dr("🏁","flags",["checkered_flag"]),new Dr("🚩","flags",["triangular_flag_on_post"]),new Dr("🏳️‍🌈","flags",["rainbow_flag"]),new Dr("🇦🇫","flags",["afghanistan"]),new Dr("🇦🇽","flags",["aland_islands"]),new Dr("🇦🇱","flags",["albania"]),new Dr("🇩🇿","flags",["algeria"]),new Dr("🇦🇸","flags",["american_samoa"]),new Dr("🇦🇩","flags",["andorra"]),new Dr("🇦🇴","flags",["angola"]),new Dr("🇦🇮","flags",["anguilla"]),new Dr("🇦🇶","flags",["antarctica"]),new Dr("🇦🇬","flags",["antigua_barbuda"]),new Dr("🇦🇷","flags",["argentina"]),new Dr("🇦🇲","flags",["armenia"]),new Dr("🇦🇼","flags",["aruba"]),new Dr("🇦🇺","flags",["australia"]),new Dr("🇦🇹","flags",["austria"]),new Dr("🇦🇿","flags",["azerbaijan"]),new Dr("🇧🇸","flags",["bahamas"]),new Dr("🇧🇭","flags",["bahrain"]),new Dr("🇧🇩","flags",["bangladesh"]),new Dr("🇧🇧","flags",["barbados"]),new Dr("🇧🇾","flags",["belarus"]),new Dr("🇧🇪","flags",["belgium"]),new Dr("🇧🇿","flags",["belize"]),new Dr("🇧🇯","flags",["benin"]),new Dr("🇧🇲","flags",["bermuda"]),new Dr("🇧🇹","flags",["bhutan"]),new Dr("🇧🇴","flags",["bolivia"]),new Dr("🇧🇶","flags",["caribbean_netherlands"]),new Dr("🇧🇦","flags",["bosnia_herzegovina"]),new Dr("🇧🇼","flags",["botswana"]),new Dr("🇧🇷","flags",["brazil"]),new Dr("🇮🇴","flags",["british_indian_ocean_territory"]),new Dr("🇻🇬","flags",["british_virgin_islands"]),new Dr("🇧🇳","flags",["brunei"]),new Dr("🇧🇬","flags",["bulgaria"]),new Dr("🇧🇫","flags",["burkina_faso"]),new Dr("🇧🇮","flags",["burundi"]),new Dr("🇨🇻","flags",["cape_verde"]),new Dr("🇰🇭","flags",["cambodia"]),new Dr("🇨🇲","flags",["cameroon"]),new Dr("🇨🇦","flags",["canada"]),new Dr("🇮🇨","flags",["canary_islands"]),new Dr("🇰🇾","flags",["cayman_islands"]),new Dr("🇨🇫","flags",["central_african_republic"]),new Dr("🇹🇩","flags",["chad"]),new Dr("🇨🇱","flags",["chile"]),new Dr("🇨🇳","flags",["cn"]),new Dr("🇨🇽","flags",["christmas_island"]),new Dr("🇨🇨","flags",["cocos_islands"]),new Dr("🇨🇴","flags",["colombia"]),new Dr("🇰🇲","flags",["comoros"]),new Dr("🇨🇬","flags",["congo_brazzaville"]),new Dr("🇨🇩","flags",["congo_kinshasa"]),new Dr("🇨🇰","flags",["cook_islands"]),new Dr("🇨🇷","flags",["costa_rica"]),new Dr("🇨🇮","flags",["cote_divoire"]),new Dr("🇭🇷","flags",["croatia"]),new Dr("🇨🇺","flags",["cuba"]),new Dr("🇨🇼","flags",["curacao"]),new Dr("🇨🇾","flags",["cyprus"]),new Dr("🇨🇿","flags",["czech_republic"]),new Dr("🇩🇰","flags",["denmark"]),new Dr("🇩🇯","flags",["djibouti"]),new Dr("🇩🇲","flags",["dominica"]),new Dr("🇩🇴","flags",["dominican_republic"]),new Dr("🇪🇨","flags",["ecuador"]),new Dr("🇪🇬","flags",["egypt"]),new Dr("🇸🇻","flags",["el_salvador"]),new Dr("🇬🇶","flags",["equatorial_guinea"]),new Dr("🇪🇷","flags",["eritrea"]),new Dr("🇪🇪","flags",["estonia"]),new Dr("🇪🇹","flags",["ethiopia"]),new Dr("🇪🇺","flags",["eu","european_union"]),new Dr("🇫🇰","flags",["falkland_islands"]),new Dr("🇫🇴","flags",["faroe_islands"]),new Dr("🇫🇯","flags",["fiji"]),new Dr("🇫🇮","flags",["finland"]),new Dr("🇫🇷","flags",["fr"]),new Dr("🇬🇫","flags",["french_guiana"]),new Dr("🇵🇫","flags",["french_polynesia"]),new Dr("🇹🇫","flags",["french_southern_territories"]),new Dr("🇬🇦","flags",["gabon"]),new Dr("🇬🇲","flags",["gambia"]),new Dr("🇬🇪","flags",["georgia"]),new Dr("🇩🇪","flags",["de"]),new Dr("🇬🇭","flags",["ghana"]),new Dr("🇬🇮","flags",["gibraltar"]),new Dr("🇬🇷","flags",["greece"]),new Dr("🇬🇱","flags",["greenland"]),new Dr("🇬🇩","flags",["grenada"]),new Dr("🇬🇵","flags",["guadeloupe"]),new Dr("🇬🇺","flags",["guam"]),new Dr("🇬🇹","flags",["guatemala"]),new Dr("🇬🇬","flags",["guernsey"]),new Dr("🇬🇳","flags",["guinea"]),new Dr("🇬🇼","flags",["guinea_bissau"]),new Dr("🇬🇾","flags",["guyana"]),new Dr("🇭🇹","flags",["haiti"]),new Dr("🇭🇳","flags",["honduras"]),new Dr("🇭🇰","flags",["hong_kong"]),new Dr("🇭🇺","flags",["hungary"]),new Dr("🇮🇸","flags",["iceland"]),new Dr("🇮🇳","flags",["india"]),new Dr("🇮🇩","flags",["indonesia"]),new Dr("🇮🇷","flags",["iran"]),new Dr("🇮🇶","flags",["iraq"]),new Dr("🇮🇪","flags",["ireland"]),new Dr("🇮🇲","flags",["isle_of_man"]),new Dr("🇮🇱","flags",["israel"]),new Dr("🇮🇹","flags",["it"]),new Dr("🇯🇲","flags",["jamaica"]),new Dr("🇯🇵","flags",["jp"]),new Dr("🎌","flags",["crossed_flags"]),new Dr("🇯🇪","flags",["jersey"]),new Dr("🇯🇴","flags",["jordan"]),new Dr("🇰🇿","flags",["kazakhstan"]),new Dr("🇰🇪","flags",["kenya"]),new Dr("🇰🇮","flags",["kiribati"]),new Dr("🇽🇰","flags",["kosovo"]),new Dr("🇰🇼","flags",["kuwait"]),new Dr("🇰🇬","flags",["kyrgyzstan"]),new Dr("🇱🇦","flags",["laos"]),new Dr("🇱🇻","flags",["latvia"]),new Dr("🇱🇧","flags",["lebanon"]),new Dr("🇱🇸","flags",["lesotho"]),new Dr("🇱🇷","flags",["liberia"]),new Dr("🇱🇾","flags",["libya"]),new Dr("🇱🇮","flags",["liechtenstein"]),new Dr("🇱🇹","flags",["lithuania"]),new Dr("🇱🇺","flags",["luxembourg"]),new Dr("🇲🇴","flags",["macau"]),new Dr("🇲🇰","flags",["macedonia"]),new Dr("🇲🇬","flags",["madagascar"]),new Dr("🇲🇼","flags",["malawi"]),new Dr("🇲🇾","flags",["malaysia"]),new Dr("🇲🇻","flags",["maldives"]),new Dr("🇲🇱","flags",["mali"]),new Dr("🇲🇹","flags",["malta"]),new Dr("🇲🇭","flags",["marshall_islands"]),new Dr("🇲🇶","flags",["martinique"]),new Dr("🇲🇷","flags",["mauritania"]),new Dr("🇲🇺","flags",["mauritius"]),new Dr("🇾🇹","flags",["mayotte"]),new Dr("🇲🇽","flags",["mexico"]),new Dr("🇫🇲","flags",["micronesia"]),new Dr("🇲🇩","flags",["moldova"]),new Dr("🇲🇨","flags",["monaco"]),new Dr("🇲🇳","flags",["mongolia"]),new Dr("🇲🇪","flags",["montenegro"]),new Dr("🇲🇸","flags",["montserrat"]),new Dr("🇲🇦","flags",["morocco"]),new Dr("🇲🇿","flags",["mozambique"]),new Dr("🇲🇲","flags",["myanmar"]),new Dr("🇳🇦","flags",["namibia"]),new Dr("🇳🇷","flags",["nauru"]),new Dr("🇳🇵","flags",["nepal"]),new Dr("🇳🇱","flags",["netherlands"]),new Dr("🇳🇨","flags",["new_caledonia"]),new Dr("🇳🇿","flags",["new_zealand"]),new Dr("🇳🇮","flags",["nicaragua"]),new Dr("🇳🇪","flags",["niger"]),new Dr("🇳🇬","flags",["nigeria"]),new Dr("🇳🇺","flags",["niue"]),new Dr("🇳🇫","flags",["norfolk_island"]),new Dr("🇲🇵","flags",["northern_mariana_islands"]),new Dr("🇰🇵","flags",["north_korea"]),new Dr("🇳🇴","flags",["norway"]),new Dr("🇴🇲","flags",["oman"]),new Dr("🇵🇰","flags",["pakistan"]),new Dr("🇵🇼","flags",["palau"]),new Dr("🇵🇸","flags",["palestinian_territories"]),new Dr("🇵🇦","flags",["panama"]),new Dr("🇵🇬","flags",["papua_new_guinea"]),new Dr("🇵🇾","flags",["paraguay"]),new Dr("🇵🇪","flags",["peru"]),new Dr("🇵🇭","flags",["philippines"]),new Dr("🇵🇳","flags",["pitcairn_islands"]),new Dr("🇵🇱","flags",["poland"]),new Dr("🇵🇹","flags",["portugal"]),new Dr("🇵🇷","flags",["puerto_rico"]),new Dr("🇶🇦","flags",["qatar"]),new Dr("🇷🇪","flags",["reunion"]),new Dr("🇷🇴","flags",["romania"]),new Dr("🇷🇺","flags",["ru"]),new Dr("🇷🇼","flags",["rwanda"]),new Dr("🇧🇱","flags",["st_barthelemy"]),new Dr("🇸🇭","flags",["st_helena"]),new Dr("🇰🇳","flags",["st_kitts_nevis"]),new Dr("🇱🇨","flags",["st_lucia"]),new Dr("🇵🇲","flags",["st_pierre_miquelon"]),new Dr("🇻🇨","flags",["st_vincent_grenadines"]),new Dr("🇼🇸","flags",["samoa"]),new Dr("🇸🇲","flags",["san_marino"]),new Dr("🇸🇹","flags",["sao_tome_principe"]),new Dr("🇸🇦","flags",["saudi_arabia"]),new Dr("🇸🇳","flags",["senegal"]),new Dr("🇷🇸","flags",["serbia"]),new Dr("🇸🇨","flags",["seychelles"]),new Dr("🇸🇱","flags",["sierra_leone"]),new Dr("🇸🇬","flags",["singapore"]),new Dr("🇸🇽","flags",["sint_maarten"]),new Dr("🇸🇰","flags",["slovakia"]),new Dr("🇸🇮","flags",["slovenia"]),new Dr("🇸🇧","flags",["solomon_islands"]),new Dr("🇸🇴","flags",["somalia"]),new Dr("🇿🇦","flags",["south_africa"]),new Dr("🇬🇸","flags",["south_georgia_south_sandwich_islands"]),new Dr("🇰🇷","flags",["kr"]),new Dr("🇸🇸","flags",["south_sudan"]),new Dr("🇪🇸","flags",["es"]),new Dr("🇱🇰","flags",["sri_lanka"]),new Dr("🇸🇩","flags",["sudan"]),new Dr("🇸🇷","flags",["suriname"]),new Dr("🇸🇿","flags",["swaziland"]),new Dr("🇸🇪","flags",["sweden"]),new Dr("🇨🇭","flags",["switzerland"]),new Dr("🇸🇾","flags",["syria"]),new Dr("🇹🇼","flags",["taiwan"]),new Dr("🇹🇯","flags",["tajikistan"]),new Dr("🇹🇿","flags",["tanzania"]),new Dr("🇹🇭","flags",["thailand"]),new Dr("🇹🇱","flags",["timor_leste"]),new Dr("🇹🇬","flags",["togo"]),new Dr("🇹🇰","flags",["tokelau"]),new Dr("🇹🇴","flags",["tonga"]),new Dr("🇹🇹","flags",["trinidad_tobago"]),new Dr("🇹🇳","flags",["tunisia"]),new Dr("🇹🇷","flags",["tr"]),new Dr("🇹🇲","flags",["turkmenistan"]),new Dr("🇹🇨","flags",["turks_caicos_islands"]),new Dr("🇹🇻","flags",["tuvalu"]),new Dr("🇺🇬","flags",["uganda"]),new Dr("🇺🇦","flags",["ukraine"]),new Dr("🇦🇪","flags",["united_arab_emirates"]),new Dr("🇬🇧","flags",["gb","uk"]),new Dr("🇺🇸","flags",["us"]),new Dr("🇻🇮","flags",["us_virgin_islands"]),new Dr("🇺🇾","flags",["uruguay"]),new Dr("🇺🇿","flags",["uzbekistan"]),new Dr("🇻🇺","flags",["vanuatu"]),new Dr("🇻🇦","flags",["vatican_city"]),new Dr("🇻🇪","flags",["venezuela"]),new Dr("🇻🇳","flags",["vietnam"]),new Dr("🇼🇫","flags",["wallis_futuna"]),new Dr("🇪🇭","flags",["western_sahara"]),new Dr("🇾🇪","flags",["yemen"]),new Dr("🇿🇲","flags",["zambia"]),new Dr("🇿🇼","flags",["zimbabwe"])],Sr='\n <svg width="1em" height="1em"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 303.6 303.6">\n <path d="M291.503 11.6c-10.4-10.4-37.2-11.6-48.4-11.6-50.4 0-122.4 18.4-173.6 69.6-77.2 76.8-78.4 201.6-58.4 222 10.8 10.4 35.6 12 49.2 12 49.6 0 121.2-18.4 173.2-70 76.4-76.4 80.4-199.6 58-222zm-231.2 277.2c-24.4 0-36-4.8-38.8-7.6-5.2-5.2-8.4-24.4-6.8-49.6l57.2 56.8c-4 .4-8 .4-11.6.4zm162.8-66c-38.8 38.8-90.4 57.2-132.4 63.6l-74-73.6c6-42 24-94 63.2-133.2 38-38 88-56.4 130.8-62.8l75.6 75.6c-6 40.8-24.4 91.6-63.2 130.4zm65.2-148.8l-58.8-59.2c4.8-.4 9.2-.4 13.6-.4 24.4 0 35.6 4.8 38 7.2 5.6 5.6 9.2 25.6 7.2 52.4z"/>\n <path d="M215.103 139.6l-20.8-20.8 13.2-13.2c2.8-2.8 2.8-7.6 0-10.4s-7.6-2.8-10.4 0l-13.2 13.6-20.8-20.8c-2.8-2.8-7.6-2.8-10.4 0-2.8 2.8-2.8 7.6 0 10.4l20.8 20.8-22 22-20.8-20.8c-2.8-2.8-7.6-2.8-10.4 0s-2.8 7.6 0 10.4l20.8 20.8-22 22-20.8-20.8c-2.8-2.8-7.6-2.8-10.4 0s-2.8 7.6 0 10.4l20.8 20.8-13.2 13.2c-2.8 2.8-2.8 7.6 0 10.4 1.6 1.6 3.2 2 5.2 2s3.6-.8 5.2-2l13.2-13.2 20.8 20.8c1.6 1.6 3.2 2 5.2 2s3.6-.8 5.2-2c2.8-2.8 2.8-7.6 0-10.4l-20.8-21.2 22-22 20.8 20.8c1.6 1.6 3.2 2 5.2 2s3.6-.8 5.2-2c2.8-2.8 2.8-7.6 0-10.4l-20.8-20.8 22-22 20.8 20.8c1.6 1.6 3.2 2 5.2 2s3.6-.8 5.2-2c2.8-2.8 2.8-7.6 0-10.4zM169.103 47.6c-1.2-4-5.2-6-9.2-4.8-3.2 1.2-80.8 25.6-110.4 98-1.6 4 0 8.4 4 9.6.8.4 2 .4 2.8.4 2.8 0 5.6-1.6 6.8-4.4 27.2-66 100.4-89.6 101.2-89.6 4-1.2 6-5.2 4.8-9.2z"/>\n </svg>\n ',xr='\n <svg width="1em" height="1em"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n <path d="M472.928 34.72c-4.384-2.944-9.984-3.52-14.912-1.568-1.088.448-106.528 42.176-195.168.384C186.752-2.4 102.944 14.4 64 25.76V16c0-8.832-7.168-16-16-16S32 7.168 32 16v480c0 8.832 7.168 16 16 16s16-7.168 16-16V315.296c28.352-9.248 112.384-31.232 185.184 3.168 34.592 16.352 70.784 21.792 103.648 21.792 63.2 0 114.016-20.128 117.184-21.408 6.016-2.464 9.984-8.32 9.984-14.848V48c0-5.312-2.656-10.272-7.072-13.28zM448 292.672c-28.512 9.248-112.512 31.136-185.184-3.168C186.752 253.6 102.944 270.4 64 281.76V59.328c28.352-9.248 112.384-31.232 185.184 3.168 76 35.872 159.872 19.104 198.816 7.712v222.464z"/>\n </svg>\n ',Pr='\n <svg width="1em" height="1em"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.999 511.999">\n <path d="M413.949 155.583a10.153 10.153 0 0 0-3.24-2.16c-.61-.25-1.24-.44-1.87-.57-3.25-.66-6.701.41-9.03 2.73a10.093 10.093 0 0 0-2.93 7.07 10.098 10.098 0 0 0 1.69 5.56c.36.54.779 1.05 1.24 1.52 1.86 1.86 4.44 2.93 7.07 2.93.65 0 1.31-.07 1.96-.2.63-.13 1.26-.32 1.87-.57a10.146 10.146 0 0 0 3.24-2.16c.47-.47.88-.98 1.25-1.52a10.098 10.098 0 0 0 1.49-3.6 10.038 10.038 0 0 0-2.74-9.03zM115.289 385.873c-.12-.64-.32-1.27-.57-1.87-.25-.6-.55-1.18-.91-1.73-.37-.54-.79-1.06-1.25-1.52a9.57 9.57 0 0 0-1.52-1.24c-.54-.36-1.12-.67-1.72-.92-.61-.25-1.24-.44-1.88-.57a9.847 9.847 0 0 0-3.9 0c-.64.13-1.27.32-1.87.57-.61.25-1.19.56-1.73.92-.55.36-1.06.78-1.52 1.24-.46.46-.88.98-1.24 1.52-.36.55-.67 1.13-.92 1.73-.25.6-.45 1.23-.57 1.87-.13.651-.2 1.3-.2 1.96 0 .65.07 1.3.2 1.95.12.64.32 1.27.57 1.87.25.6.56 1.18.92 1.73.36.54.78 1.06 1.24 1.52.46.46.97.88 1.52 1.24.54.36 1.12.67 1.73.92.6.25 1.23.44 1.87.57s1.3.2 1.95.2c.65 0 1.31-.07 1.95-.2.64-.13 1.27-.32 1.88-.57.6-.25 1.18-.56 1.72-.92.55-.36 1.059-.78 1.52-1.24.46-.46.88-.98 1.25-1.52.36-.55.66-1.13.91-1.73.25-.6.45-1.23.57-1.87.13-.65.2-1.3.2-1.95 0-.66-.07-1.31-.2-1.96z"/>\n <path d="M511.999 222.726c0-14.215-9.228-26.315-22.007-30.624-1.628-74.155-62.456-133.978-136.994-133.978H159.002c-74.538 0-135.366 59.823-136.994 133.978C9.228 196.411 0 208.51 0 222.726a32.076 32.076 0 0 0 3.847 15.203 44.931 44.931 0 0 0-.795 8.427v.708c0 14.06 6.519 26.625 16.693 34.833-10.178 8.275-16.693 20.891-16.693 35.001 0 15.114 7.475 28.515 18.921 36.702v26.668c0 40.588 33.021 73.608 73.608 73.608h320.836c40.588 0 73.608-33.021 73.608-73.608V353.6c11.446-8.186 18.921-21.587 18.921-36.702 0-13.852-6.354-26.385-16.361-34.702 9.983-8.212 16.361-20.656 16.361-34.562v-.708c0-2.985-.294-5.944-.877-8.845a32.082 32.082 0 0 0 3.93-15.355zM44.033 173.229h322.441c5.523 0 10-4.477 10-10s-4.477-10-10-10H49.737c16.896-43.883 59.503-75.106 109.265-75.106h193.996c62.942 0 114.438 49.953 116.934 112.295H42.068c.234-5.848.9-11.588 1.965-17.189zM23.052 316.896c0-13.837 11.257-25.094 25.094-25.094h117.298l55.346 50.188H48.146c-13.837 0-25.094-11.256-25.094-25.094zm.976-62.945c.422.111.847.215 1.275.309 7.421 1.634 14.68 8.002 22.365 14.744a576.29 576.29 0 0 0 3.206 2.799h-3.081c-11.253-.001-20.774-7.551-23.765-17.852zm308.727 89.752l57.233-51.899 49.904.57-81.871 74.24-25.266-22.911zm7.861 34.126H295.12l17.467-15.839h10.563l17.466 15.839zm19.599-86.027l-82.499 74.811-82.499-74.811h164.998zm-59.529-20c.849-.842 1.677-1.675 2.49-2.493 9.531-9.587 17.059-17.16 32.89-17.16 15.832 0 23.359 7.573 32.89 17.162.812.817 1.64 1.65 2.489 2.491h-70.759zm-160.13 0a485.82 485.82 0 0 0 2.489-2.492c9.531-9.588 17.059-17.161 32.89-17.161 15.83 0 23.358 7.573 32.888 17.16.813.818 1.641 1.651 2.49 2.493h-70.757zm275.862 162.073H95.582c-29.56 0-53.608-24.049-53.608-53.608v-18.275h200.872l17.467 15.839H145.897c-5.523 0-10 4.477-10 10s4.477 10 10 10H467.07c-7.288 20.958-27.242 36.044-50.652 36.044zm53.608-56.046h-94.6l17.467-15.839h77.133v15.839zm-6.174-35.837h-48.906l54.624-49.533c11.135 2.604 19.376 12.665 19.376 24.439 0 13.836-11.257 25.094-25.094 25.094zm-2.728-70.19l.262-.227.101-.087.342-.298c.848-.738 1.682-1.469 2.501-2.187 4.105-3.601 8.089-7.095 12.04-9.819 3.446-2.375 6.868-4.164 10.326-4.925l.359-.081.04-.01.317-.076.065-.016a22.897 22.897 0 0 0 .42-.107l.196-.052a.374.374 0 0 0 .048-.012c-2.433 9.276-10.129 16.443-19.691 18.102a9.984 9.984 0 0 0-2.016-.205h-5.31zm21.271-37.073a40.746 40.746 0 0 0-4.536 1.281c-10.109 3.489-18.327 10.602-26.283 17.58l-.434.381c-9.178 8.052-17.923 15.723-29.033 17.834h-13.146c-11.249-1.93-17.833-8.552-25.823-16.591-10.213-10.275-22.923-23.062-47.074-23.062-24.15 0-36.86 12.786-47.074 23.06-7.992 8.04-14.576 14.663-25.829 16.593h-14.327c-11.253-1.93-17.837-8.553-25.829-16.593-10.213-10.274-22.923-23.06-47.072-23.06-24.151 0-36.861 12.787-47.074 23.062-7.991 8.039-14.574 14.661-25.824 16.591h-7.065c-14.134 0-24.325-8.939-35.113-18.404-9.248-8.112-18.81-16.501-31.252-19.241a12.237 12.237 0 0 1-7.025-4.453 10.027 10.027 0 0 0-1.153-1.252 12.234 12.234 0 0 1-1.428-5.727c-.001-6.788 5.52-12.309 12.307-12.309h447.384c6.787 0 12.308 5.521 12.308 12.308 0 5.729-4.039 10.776-9.605 12.002z"/>\n </svg>\n ',kr='\n <svg\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 219.15 219.15" width="1em" height="1em">\n <path d="M109.575 0C49.156 0 .001 49.155.001 109.574c0 60.42 49.154 109.576 109.573 109.576 60.42 0 109.574-49.156 109.574-109.576C219.149 49.155 169.995 0 109.575 0zm0 204.15c-52.148 0-94.573-42.427-94.573-94.576C15.001 57.426 57.427 15 109.575 15c52.148 0 94.574 42.426 94.574 94.574 0 52.15-42.426 94.576-94.574 94.576z"/>\n <path d="M166.112 108.111h-52.051V51.249a7.5 7.5 0 0 0-15 0v64.362a7.5 7.5 0 0 0 7.5 7.5h59.551a7.5 7.5 0 0 0 0-15z"/>\n </svg>\n ',Tr='\n <svg\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em">\n <path d="M490.815 3.784C480.082 5.7 227.049 51.632 148.477 130.203c-39.153 39.153-64.259 87.884-70.694 137.218-5.881 45.081 4.347 85.929 28.878 116.708L.001 490.789 21.212 512l106.657-106.657c33.094 26.378 75.092 34.302 116.711 28.874 49.334-6.435 98.065-31.541 137.218-70.695C460.368 284.951 506.3 31.918 508.216 21.185L511.999 0l-21.184 3.784zm-43.303 39.493L309.407 181.383l-7.544-98.076c46.386-15.873 97.819-29.415 145.649-40.03zm-174.919 50.64l8.877 115.402-78.119 78.119-11.816-153.606c19.947-13.468 47.183-26.875 81.058-39.915zm-109.281 64.119l12.103 157.338-47.36 47.36c-39.246-52.892-24.821-139.885 35.257-204.698zm57.113 247.849c-26.548-.001-51.267-7.176-71.161-21.938l47.363-47.363 157.32 12.102c-40.432 37.475-89.488 57.201-133.522 57.199zm157.743-85.421l-153.605-11.816 78.118-78.118 115.403 8.877c-13.04 33.876-26.448 61.111-39.916 81.057zm50.526-110.326l-98.076-7.544L468.725 64.485c-10.589 47.717-24.147 99.232-40.031 145.653z"/>\n </svg>\n ',zr='\n <svg\n xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 792 792">\n <path d="M425.512 741.214H365.58c-14.183 0-25.164 11.439-25.164 25.622S351.397 792 365.58 792h59.932c15.101 0 26.54-10.981 26.54-25.164s-11.44-25.622-26.54-25.622zM472.638 671.209H319.821c-14.183 0-26.081 10.98-26.081 25.163s11.898 25.164 26.081 25.164h152.817c14.183 0 25.164-10.981 25.164-25.164s-10.982-25.163-25.164-25.163zM639.188 138.634c-25.164-42.548-59.181-76.135-102.49-101.113C493.526 12.621 446.566 0 395.771 0 320.28 0 247.19 31.684 197.205 81.445c-49.761 49.527-81.904 121.24-81.904 196.282 0 33.861 7.779 68.629 22.879 103.866 15.1 35.228 38.565 78.614 70.005 130.396 7.448 12.269 15.764 31.205 25.623 56.271 12.104 30.757 22.87 51.713 31.566 63.602 5.027 6.872 11.899 10.063 20.596 10.063h228.766c9.605 0 16.359-4.188 21.504-11.898 6.754-10.132 13.987-27.516 22.42-51.693 8.951-25.691 16.838-43.982 23.329-55.364 30.571-53.587 54.446-99.747 70.464-137.717 16.018-37.979 24.246-74.124 24.246-107.526 0-49.878-12.347-96.545-37.511-139.093zm-35.696 232.437c-15.012 34.348-36.398 76.974-65.427 126.736-9.41 16.125-18.458 37.003-26.989 63.592-3.367 10.474-7.32 20.596-11.439 30.2H300.153c-6.862-11.439-12.26-25.837-18.761-42.089-12.718-31.801-23.338-52.621-30.2-64.061-28.824-48.043-49.868-87.39-64.051-118.957s-20.537-60.859-21.044-88.766c-2.235-121.718 106.13-228.991 229.674-226.941 41.631.693 80.527 10.063 115.765 30.659 35.227 20.586 63.134 48.043 83.729 82.812 20.586 34.768 31.108 72.748 31.108 113.47-.001 27.449-7.692 58.596-22.881 93.345z"/>\n </svg>\n ',Ar='\n <svg\n xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 106.059 106.059">\n <path d="M90.544 90.542c20.687-20.684 20.685-54.341.002-75.024-20.688-20.689-54.347-20.689-75.031-.006-20.688 20.687-20.686 54.346.002 75.034 20.682 20.684 54.341 20.684 75.027-.004zM21.302 21.3c17.494-17.493 45.959-17.495 63.457.002 17.494 17.494 17.492 45.963-.002 63.455-17.494 17.494-45.96 17.496-63.455.003-17.498-17.498-17.496-45.966 0-63.46zM27 69.865s-2.958-11.438 6.705-8.874c0 0 17.144 9.295 38.651 0 9.662-2.563 6.705 8.874 6.705 8.874C73.539 86.824 53.03 85.444 53.03 85.444S32.521 86.824 27 69.865zm6.24-31.194a6.202 6.202 0 1 1 12.399.001 6.202 6.202 0 0 1-12.399-.001zm28.117 0a6.202 6.202 0 1 1 12.403.001 6.202 6.202 0 0 1-12.403-.001z"/>\n </svg>\n ',Or='\n <svg\n xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 611.999 611.998">\n <path d="M596.583 15.454C586.226 5.224 573.354.523 558.423.523c-15.597 0-31.901 4.906-49.452 14.599-17.296 9.551-32.851 20.574-46.458 32.524h-.665c-2.655 2.322-10.953 10.287-25.219 24.553-14.272 14.272-26.217 26.223-35.845 36.51L112.401 26.406c-6.896-1.968-12.928.014-17.593 4.645L46.687 78.839c-4.326 4.297-5.805 9.268-4.977 15.597.829 6.287 3.979 10.627 9.629 13.607L280.32 228.839 161.514 347.978l-95.91 3.32c-4.645.164-8.637 1.643-12.276 5.311L5.872 404.397c-4.312 4.34-6.641 9.289-5.643 16.262 1.657 6.967 5.31 11.611 11.618 13.602l117.142 48.787 48.787 117.148c2.421 5.812 6.634 9.621 13.607 11.279h3.313c4.977 0 9.296-1.658 12.942-5.311l47.456-47.457c3.653-3.645 5.494-7.965 5.643-12.275l3.32-95.91 118.807-118.807 121.128 228.99c2.988 5.643 7.32 8.793 13.607 9.621 6.329.836 11.271-1.316 15.597-5.643l47.456-47.457c4.978-4.977 6.945-10.697 4.978-17.586l-82.296-288.389 59.732-59.739c10.287-10.287 21.699-24.149 33.183-45.134 5.777-10.542 10.032-20.886 12.942-31.194 5.722-20.218 3.258-44.07-12.608-59.73zm-59.4 110.176l-67.039 67.372c-5.628 5.657-6.811 11.122-4.977 17.586l81.637 288.388-22.563 22.238L403.438 292.89c-2.98-5.643-7.299-8.963-12.941-9.621-6.301-1.331-11.611.325-16.263 4.977l-141.37 141.37c-2.987 2.986-4.644 6.973-5.643 11.949l-3.32 95.904-22.896 23.236-41.48-98.566c-1.331-4.645-4.553-8.184-9.629-10.287L51.338 411.03l23.229-22.895 95.578-3.654c5.643-.99 9.622-2.654 12.276-5.309l141.37-141.371c4.651-4.645 6.308-9.954 4.984-16.262-.666-5.643-3.986-9.954-9.629-12.942L90.829 87.47l22.231-22.238 288.389 81.637c6.464 1.833 11.951.666 17.587-4.977l28.545-28.539 26.217-25.884 11.278-11.285 1.331-.666c27.873-23.895 55.088-38.16 72.016-38.16 5.969 0 9.954 1.324 11.611 3.979 18.917 18.585-21.099 72.484-32.851 84.293z"/>\n </svg>\n ',Mr='\n <svg\n xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 511.626 511.626">\n <path d="M475.366 71.949c-24.175-23.606-57.575-35.404-100.215-35.404-11.8 0-23.843 2.046-36.117 6.136-12.279 4.093-23.702 9.615-34.256 16.562-10.568 6.945-19.65 13.467-27.269 19.556a263.828 263.828 0 0 0-21.696 19.414 264.184 264.184 0 0 0-21.698-19.414c-7.616-6.089-16.702-12.607-27.268-19.556-10.564-6.95-21.985-12.468-34.261-16.562-12.275-4.089-24.316-6.136-36.116-6.136-42.637 0-76.039 11.801-100.211 35.404C12.087 95.55 0 128.286 0 170.16c0 12.753 2.24 25.891 6.711 39.398 4.471 13.514 9.566 25.031 15.275 34.546 5.708 9.514 12.181 18.792 19.414 27.834 7.233 9.041 12.519 15.272 15.846 18.698 3.33 3.426 5.948 5.903 7.851 7.427L243.25 469.938c3.427 3.426 7.614 5.144 12.562 5.144s9.138-1.718 12.563-5.144l177.87-171.31c43.588-43.58 65.38-86.406 65.38-128.472.001-41.877-12.085-74.61-36.259-98.207zm-53.961 199.846L255.813 431.391 89.938 271.507C54.344 235.922 36.55 202.133 36.55 170.156c0-15.415 2.046-29.026 6.136-40.824 4.093-11.8 9.327-21.177 15.703-28.124 6.377-6.949 14.132-12.607 23.268-16.988 9.141-4.377 18.086-7.328 26.84-8.85 8.754-1.52 18.079-2.281 27.978-2.281 9.896 0 20.557 2.424 31.977 7.279 11.418 4.853 21.934 10.944 31.545 18.271 9.613 7.332 17.845 14.183 24.7 20.557 6.851 6.38 12.559 12.229 17.128 17.559 3.424 4.189 8.091 6.283 13.989 6.283 5.9 0 10.562-2.094 13.99-6.283 4.568-5.33 10.28-11.182 17.131-17.559 6.852-6.374 15.085-13.222 24.694-20.557 9.613-7.327 20.129-13.418 31.553-18.271 11.416-4.854 22.08-7.279 31.977-7.279s19.219.761 27.977 2.281c8.757 1.521 17.702 4.473 26.84 8.85 9.137 4.38 16.892 10.042 23.267 16.988 6.376 6.947 11.612 16.324 15.705 28.124 4.086 11.798 6.132 25.409 6.132 40.824-.002 31.977-17.89 65.86-53.675 101.639z"/>\n </svg>\n ',Nr=a({name:"IBizCategories",props:{categories:{type:Array,required:!0,default:()=>[]},current:{type:String,required:!0}},emits:["select"],setup:(e,{emit:t})=>({ns:B("emoji-categories"),onSelect:e=>{t("select",e)}}),render(){return o("div",{class:this.ns.b()},[this.categories.map((e=>o("div",{class:[this.ns.e("category"),this.ns.is("active",e.name===this.current)],onClick:()=>this.onSelect(e)},[o("span",{class:this.ns.em("category","svg"),title:zt(e.label),innerHTML:e.icon},null)])))])}}),Br=a({name:"IBizCategoryLabel",props:{name:{type:String,default:""}},emits:["select"],setup:()=>({ns:B("emoji-category-label")}),render(){return o("div",{class:this.ns.b()},[this.name])}}),_r=a({name:"IBizEmojiItem",props:{emoji:{type:Object,required:!0,default:()=>{}},size:{type:Number,required:!0},withBorder:{type:Boolean,required:!0}},emits:["click"],setup:(e,{emit:t})=>({ns:B("emoji-item"),styleSize:l((()=>({fontSize:"".concat(e.size-5,"px"),lineHeight:"".concat(e.size,"px"),height:"".concat(e.size,"px"),width:"".concat(e.size,"px")}))),onClick:()=>{t("click",e.emoji)}}),render(){return o("span",{class:[this.ns.b(),this.ns.is("border",this.withBorder)],style:this.styleSize,onClick:this.onClick,innerHTML:this.emoji.data},null)}}),Rr=(e,t)=>t.aliases.some((t=>(t=>t.toLowerCase().includes(e))(t))),Lr=a({name:"IBizEmojiList",props:{data:{type:Object,required:!0},emojisByRow:{type:Number,required:!0},emojiWithBorder:{type:Boolean},emojiSize:{type:Number},filter:{type:String,default:""},continuousList:{type:Boolean},category:{type:String,default:""},categories:{type:Object,required:!0,default:()=>{}},hasSearch:{type:Boolean}},emits:["select","data"],setup(e,{emit:t}){const a=B("emoji-list"),i=n({}),s=n({}),r=l((()=>{let t=e.data[e.category];const a=e.filter.trim().toLowerCase();return a&&(t=t.filter((e=>Rr(a,e)))),t})),d=l((()=>Object.keys(e.data))),u=l((()=>{const t=100/e.emojisByRow;return{gridTemplateColumns:"repeat(".concat(e.emojisByRow,", ").concat(t,"%)")}})),p=l((()=>{const t={};Object.assign(t,e.data);const a=e.filter.trim().toLowerCase();return a&&d.value.forEach((n=>{t[n]=e.data[n].filter((e=>Rr(a,e)))})),t})),h=e=>{t("select",e)};c((()=>e.data),(()=>{i.value.$el.scrollTop=0})),c((()=>e.category),(t=>{if(e.continuousList){const a=s.value[t].$el;i.value.scrollTop=a.offsetTop-(e.hasSearch?88:44)}}));return{ns:a,emojisRef:i,gridDynamic:u,dataFiltered:r,dataFilteredByCategory:p,onSelect:h,setCategoryRef:(e,t)=>{t&&(s.value[e]=t)},renderGridEmojis:e=>{const{emojis:t,style:n,size:i,withBorder:s}=e;return t&&t.length>0?o("div",{class:[a.m("grid-emojis")],style:n},[t.map((e=>o(_r,{emoji:e,size:i,withBorder:s,onClick:()=>h(e)},null)))]):""}}},render(){return o("div",{class:[this.ns.b()]},[o("div",{ref:"emojisRef",class:[this.ns.e("container")]},[this.continuousList?Object.keys(this.dataFilteredByCategory).map((e=>{const t=this.dataFilteredByCategory[e],a=this.categories[e],n=a?a.text:e;return o("div",null,[t.length?o(Br,{name:n,ref:t=>this.setCategoryRef(e,t)},null):"",this.renderGridEmojis({emojis:t,style:this.gridDynamic,size:this.emojiSize,withBorder:this.emojiWithBorder})])})):this.renderGridEmojis({emojis:this.dataFiltered||[],style:this.gridDynamic,size:this.emojiSize,withBorder:this.emojiWithBorder})])])}}),jr=a({name:"IBizInputSearch",emits:["update"],setup(e,{emit:t}){const a=B("emoji-input-search"),o=n(""),i=()=>{t("update",o.value)};return{ns:a,inputSearch:o,onSearch:i,handleKeyUp:e=>{e&&"Enter"===e.code&&i()}}},render(){return o("div",{class:[this.ns.b()]},[o("div",{class:this.ns.e("container"),onKeyup:this.handleKeyUp},[o("div",{class:this.ns.em("container","search"),onClick:this.onSearch},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{"stroke-width":"1"},[o("path",{d:"M6.751 12.303A5.557 5.557 0 0 1 1.2 6.751C1.2 3.691 3.69 1.2 6.751 1.2a5.558 5.558 0 0 1 5.551 5.551 5.557 5.557 0 0 1-5.551 5.552M6.751 0a6.751 6.751 0 1 0 4.309 11.949l3.855 3.855a.6.6 0 1 0 .849-.849l-3.854-3.853A6.751 6.751 0 0 0 6.751 0"},null)])])]),g(o("input",{class:this.ns.em("container","input"),type:"text","onUpdate:modelValue":e=>this.inputSearch=e,placeholder:ibiz.i18n.t("app.search")},null),[[I,this.inputSearch]])])])}}),Vr=a({name:"IBizEmojiSelect",props:{customEmojis:{type:Array,required:!0,default:()=>Er},customCategories:{type:Array,required:!0,default:()=>[]},limitFrequently:{type:Number,default:15},emojisByRow:{type:Number,default:8},continuousList:{type:Boolean,default:!1},emojiSize:{type:Number,default:27},emojiWithBorder:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showCategories:{type:Boolean,default:!0},dark:{type:Boolean,default:!1},initialCategory:{type:String,default:"peoples"},exceptCategories:{type:Array,default:()=>[]},exceptEmojis:{type:Array,default:()=>[]}},emits:["select","changeCategory","customEmojis"],setup(e,{emit:t}){const a=B("emoji-select"),o=n([]),i=n([]),s=n("peoples"),r=n([]),u=n([]),h=n([]),m=n({}),v=n({}),b=n("");b.value=s.value;const g=n(""),f=i.value.map((e=>e.name));f.includes(s.value)||(s.value=f[0]);const w=l((()=>i.value.filter((e=>!r.value.includes(e))))),y=e=>{Object.assign(v.value,{frequently:[]}),e.filter((e=>!u.value.includes(e))).forEach((e=>{const t=e.category;v.value[t]||Object.assign(v.value,{[t]:[]}),v.value[t].push(e)}))},C=async t=>{const a=v.value.frequently,n=[...new Set([t,...a])];v.value.frequently=n.slice(0,e.limitFrequently),(e=>{const t=e.map((e=>o.value.indexOf(e)));h.value=t})(n)};return c((()=>e.customEmojis),(t=>{o.value=e.customEmojis,t&&t.length&&(v.value={},y(t))}),{immediate:!0,deep:!0}),c((()=>e.customCategories),(e=>{e&&e.length>0?i.value=e:i.value=[new yr("frequently",kr,ibiz.i18n.t("component.emojiSelect.frequently")),new yr("peoples",Ar,ibiz.i18n.t("component.emojiSelect.peoples")),new yr("nature",Tr,ibiz.i18n.t("component.emojiSelect.nature")),new yr("foods",Pr,ibiz.i18n.t("component.emojiSelect.foods")),new yr("activity",Sr,ibiz.i18n.t("component.emojiSelect.activity")),new yr("objects",zr,ibiz.i18n.t("component.emojiSelect.objects")),new yr("places",Or,ibiz.i18n.t("component.emojiSelect.places")),new yr("symbols",Mr,ibiz.i18n.t("component.emojiSelect.symbols")),new yr("flags",xr,ibiz.i18n.t("component.emojiSelect.flags"))],i.value.forEach((e=>{Object.assign(m.value,{[e.name]:e})}))}),{immediate:!0,deep:!0}),c((()=>e.initialCategory),(()=>{s.value=e.initialCategory})),c((()=>e.exceptCategories),(()=>{r.value=e.exceptCategories})),c((()=>e.exceptEmojis),(()=>{u.value=e.exceptEmojis})),d((()=>{y(o.value),(async()=>{const e=h.value||[];Object.assign(v.value,{frequently:e.map((e=>o.value[e]))})})()})),p((()=>{v.value={},h.value=[]})),{ns:a,mapEmojis:v,filterEmoji:g,mapCategories:m,currentCategory:b,categoriesFiltered:w,onSearch:async e=>{g.value=e},onSelectEmoji:async e=>{await C(e),t("select",e)},changeCategory:async e=>{const a=v.value[e.name].length;b.value=e.name,a&&t("changeCategory",e)}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("dark",this.dark)]},[this.showCategories&&o(Nr,{categories:this.categoriesFiltered,current:this.currentCategory,onSelect:this.changeCategory},null),this.showSearch&&o(jr,{onUpdate:this.onSearch},null),o(Lr,{data:this.mapEmojis,category:this.currentCategory,filter:this.filterEmoji,categories:this.mapCategories,emojiWithBorder:this.emojiWithBorder,emojiSize:this.emojiSize,emojisByRow:this.emojisByRow,continuousList:this.continuousList,hasSearch:this.showSearch,onSelect:this.onSelectEmoji},null)])}});function Fr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Ur=a({name:"IBizQuickEdit",props:{context:{type:Object,required:!0},params:{type:Object,required:!0},modelData:{type:Object},isFilterHiddenItem:{type:Boolean,default:!0}},emits:{close:e=>!0},setup(e,{emit:t}){const a=B("quick-edit"),o=n(void 0),i=[],s=[],l=e=>{Sa(e).forEach((e=>{"FORMITEM"!==e.detailType||e.hidden||i.push(e),"FORMITEM"===e.detailType&&e.hidden&&s.push(e),l(e)}))};var r;e.modelData&&(null==(r=e.modelData.deformPages)||r.forEach((e=>{l(e)})));return{ns:a,onCreated:e=>{o.value=e.ctrl},onConfirm:()=>{let a;if(o.value){const t=e.isFilterHiddenItem?(()=>{const e={},t=o.value.getDiffData();return i.forEach((a=>{const n=a.id.toLowerCase(),o=a.fieldName||a.appDEFieldId;t[n]&&(e[o]=t[n])})),e})():(()=>{const e={},t=o.value.getDiffData();return[...i,...s].forEach((a=>{const n=a.id.toLowerCase(),o=a.fieldName||a.appDEFieldId;t[n]&&(e[o]=t[n])})),e})();Object.keys(t).length>0&&(a=[t])}t("close",{ok:!0,data:a})},onCancel:()=>{t("close",{ok:!1})}}},render(){let e,t;return o("div",{class:this.ns.b()},[o(i("iBizControlShell"),w({params:this.params,context:this.context,modelData:this.modelData,onCreated:this.onCreated},this.$attrs),null),o("div",{class:this.ns.e("footer")},[o(i("el-button"),{text:!0,onClick:this.onCancel},Fr(e=ibiz.i18n.t("app.cancel"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.onConfirm},Fr(t=ibiz.i18n.t("app.confirm"))?t:{default:()=>[t]})])])}});function Hr(e,t,a,n,o){return{sel:e,data:t,children:a,text:n,elm:o,key:void 0===t?void 0:t.key}}const qr=Array.isArray;function Gr(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function Wr(e,t,a){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==a&&void 0!==t)for(let e=0;e<t.length;++e){const a=t[e];if("string"==typeof a)continue;const n=a.data;void 0!==n&&Wr(n,a.children,a.sel)}}function Kr(e,t,a){let n,o,i,s={};if(void 0!==a?(null!==t&&(s=t),qr(a)?n=a:Gr(a)?o=a.toString():a&&a.sel&&(n=[a])):null!=t&&(qr(t)?n=t:Gr(t)?o=t.toString():t&&t.sel?n=[t]:s=t),void 0!==n)for(i=0;i<n.length;++i)Gr(n[i])&&(n[i]=Hr(void 0,void 0,void 0,n[i],void 0));return"s"!==e[0]||"v"!==e[1]||"g"!==e[2]||3!==e.length&&"."!==e[3]&&"#"!==e[3]||Wr(s,n,e),Hr(e,s,n,o,void 0)}const Yr=[{valueOP:xa.EQ,label:"等于",sqlOP:"="},{valueOP:xa.NOT_EQ,label:"不等于",sqlOP:"<>"},{valueOP:xa.GT,label:"大于",sqlOP:">"},{valueOP:xa.GT_AND_EQ,label:"大于等于",sqlOP:">="},{valueOP:xa.LT,label:"小于",sqlOP:"<"},{valueOP:xa.LT_AND_EQ,label:"小于等于",sqlOP:"<="},{valueOP:xa.IS_NULL,label:"为空",sqlOP:"IS NULL"},{valueOP:xa.IS_NOT_NULL,label:"非空",sqlOP:"IS NOT NULL"},{valueOP:xa.IN,label:"属于",sqlOP:"IN"},{valueOP:xa.NOT_IN,label:"不属于",sqlOP:"NOT IN"},{valueOP:xa.LIKE,label:"文本包含",sqlOP:"LIKE"}],Xr=[xa.IN,xa.NOT_IN,xa.LIKE],$r=[xa.IS_NULL,xa.IS_NOT_NULL,xa.EXISTS,xa.NOT_EXISTS],Jr=[xa.IN,xa.NOT_IN],Qr=new Map;Yr.forEach((e=>{Qr.set(e.valueOP,e)}));const Zr=new Map;Yr.forEach((e=>{Zr.set(e.sqlOP,e.valueOP)}));const ec=(e,t)=>{var a,n;if(!e||!t)return[];const o=[];for(;e;)o.push(e),e=t(e);const i=[];o.reverse();let s={type:"condition"};for(let e=0;e<o.length;e++){const t=o[e];if("pql-field"===t.type&&(s.key||s.operator||s.value?(i.push(s),s={type:"condition",key:t}):s.key=t),"pql-field-operator"===t.type&&(s.operator||s.value?(i.push(s),s={type:"condition",operator:t}):s.operator=t,t.value&&Jr.includes(t.value)&&e<o.length-1&&"pql-field-connection"!==o[e+1].type)){if("pql-field"===o[e+1].type||"pql-field-operator"===o[e+1].type)continue;for(s.value=[],e++;e<o.length&&"pql-field-connection"!==o[e].type&&"pql-field"!==o[e].type&&"pql-field-operator"!==o[e].type;)s.value.push(o[e]),e++;e<o.length&&("pql-field-connection"===o[e].type||"pql-field"===o[e].type||"pql-field-operator"===o[e].type)&&e--}"pql-field-value"===t.type&&(s.value||(null==(a=s.operator)?void 0:a.value)&&$r.includes(s.operator.value)?s={type:"condition",value:[t]}:s.value=[t]),"pql-field-connection"===t.type&&((s.key||s.operator||s.value)&&i.push(s),i.push({type:"connection",value:[t]}),s={type:"condition"}),!t.type&&t.text&&(s.value||(null==(n=s.operator)?void 0:n.value)&&$r.includes(s.operator.value)?(i.push(s),s={type:"condition",value:[t]}):s.value=[t])}return(s.key||s.operator||s.value)&&i.push(s),i},tc=e=>{var t,a;try{const n=e.split(" "),o=[];for(let e=0;e<n.length;e++){if(0!==e){const t=n[e];if("and"!==t&&"or"!==t)throw new _t("pql自定义条件解析错误");if(e===n.length-1)throw new _t("pql自定义条件解析错误");o.push({type:"connection",value:{label:t,value:t}})}const i=n[0!==e?++e:e],s=n[++e];if(i&&/^\$/.test(i)&&s){const l=JSON.parse(i.slice(1));if($r.includes(Zr.get(s))){o.push({type:"condition",key:{label:l.caption,value:l.name},operator:{label:(null==(t=Qr.get(Zr.get(s)))?void 0:t.label)||"",value:Zr.get(s)}});continue}{const t=n[++e];if(t){const e=/^\$/.test(t)?JSON.parse(t.slice(1)):{caption:t,value:t};o.push({type:"condition",key:{label:l.caption,value:l.name},operator:{label:(null==(a=Qr.get(Zr.get(s)))?void 0:a.label)||"",value:Zr.get(s)},value:{type:/^\$/.test(t)?"pql-field-value":void 0,label:e.caption,value:e.value}});continue}}}throw new _t("pql自定义条件解析错误")}return o}catch(e){ibiz.log.error(null==e?void 0:e.message)}},ac=async e=>{const t=[];return e.forEach((e=>{var a,n;if("condition"===e.type){const{key:a,operator:n,value:o}=e;if(t.push({type:"pql-field",label:null==a?void 0:a.label,value:null==a?void 0:a.value}),t.push({type:"pql-field-operator",label:null==n?void 0:n.label,value:null==n?void 0:n.value}),null==o?void 0:o.type)t.push({type:"pql-field-value",label:null==o?void 0:o.label,value:null==o?void 0:o.value});else{if((null==n?void 0:n.value)&&Jr.includes(n.value)&&(null==o?void 0:o.value)&&/^\(.*?\)$/.test(o.value)){let e=o.value.slice(1,-1).trim().split(/\},\s*/g);if(e=e.map(((t,a)=>a===e.length-1?t:"".concat(t,"}"))),e.length&&e.every((e=>/^\$/.test(e))))return t.push({text:"["}),e.forEach(((a,n)=>{let o;try{o=JSON.parse(a.slice(1))}catch(e){o={caption:a,value:a}}t.push({type:"pql-field-value",label:null==o?void 0:o.caption,value:null==o?void 0:o.value}),n!==e.length-1&&t.push({text:","})})),void t.push({text:"]"})}if((null==n?void 0:n.value)===xa.LIKE&&(null==o?void 0:o.value)&&o.value.startsWith("'%")&&o.value.endsWith("%'"))return void t.push({text:o.value.slice(2,-2)});t.push({text:null==o?void 0:o.value})}}"connection"===e.type&&t.push({type:"pql-field-connection",label:null==(a=e.value)?void 0:a.label,value:null==(n=e.value)?void 0:n.value})})),t},nc=e=>{let t="<p>";return e.forEach((e=>{t+=(e=>{const t=e.type||"";return t?'<span\n data-pql="true"\n data-w-e-type="'.concat(t,'"\n data-w-e-is-void\n data-w-e-is-inline\n data-label="').concat(e.label||"",'"\n data-value="').concat(e.value||"",'"\n ></span>'):e.text||""})(e)})),t+="</p>",t};function oc(e){return!!e&&(!("element"!==e.getAttribute("data-slate-node")||!e.getAttribute("data-slate-inline")||!e.getAttribute("data-slate-void"))||oc(e.parentElement))}const ic=["pql-field","pql-field-value","pql-field-operator","pql-field-connection"];function sc(e){const{type:t,label:a=""}=e;if("pql-field-operator"===t||"pql-field-connection"===t)return Kr("span",{props:{contentEditable:!1},style:{display:"inline-block",lineHeight:"22px"}},[a]);if("pql-field-value"===t)return Kr("span",{props:{contentEditable:!1},style:{display:"inline-block",lineHeight:"22px",color:"#5dcfff"}},[a]);return Kr("span",{props:{contentEditable:!1},style:{color:"#6698ff",backgroundColor:"#edf2fd",display:"inline-block",padding:"0 5px",borderRadius:"3px",lineHeight:"22px"}},[a])}function lc(e){const t=e.type||"";if(!t)return e.text||"";return'<span\n data-pql="true"\n data-w-e-type="'.concat(t,'"\n data-w-e-is-void\n data-w-e-is-inline\n data-label="').concat(e.label||"",'"\n data-value="').concat(e.value||"",'"\n ></span>')}const rc={editorPlugin:function(e){var t;const{isVoid:a,isInline:n,deleteBackward:o,deleteFragment:i,insertText:s}=e,l=e,r=null==(t=l.getConfig().EXTEND_CONF)?void 0:t.pql;let c;const d=()=>{var t;const{selection:a}=e;if(a&&0===(null==(t=a.focus)?void 0:t.offset)){const t=qi.node(e,a)[0];if(t){oc(e.toDOMNode(t))&&e.move(1)}}};return l.isVoid=e=>{const t=Hi.getNodeType(e);return!!ic.includes(t)||a(e)},l.isInline=e=>{const t=Hi.getNodeType(e);return!!ic.includes(t)||n(e)},l.deleteBackward=e=>{o(e),r&&r.showSuggestion&&(window.clearTimeout(c),c=window.setTimeout((()=>{d(),r.showSuggestion()}),10))},l.deleteFragment=e=>{i(e),r&&r.showSuggestion&&(window.clearTimeout(c),c=window.setTimeout((()=>{d(),r.showSuggestion()}),10))},l.insertText=e=>{s(e),r&&r.showSuggestion&&(window.clearTimeout(c),c=window.setTimeout((()=>{r.showSuggestion()}),10))},l},renderElems:ic.map((e=>({type:e,renderElem:sc}))),elemsToHtml:ic.map((e=>({type:e,elemToHtml:lc}))),parseElemsHtml:[{selector:'span[data-pql="true"]',parseElemHtml:function(e){const t=e.getAttribute("data-w-e-type")||"",a=e.getAttribute("data-label")||"",n=e.getAttribute("data-value")||"";return t?{type:t,label:a,value:n,children:[{text:""}]}:{children:[{text:""}]}}}]},cc=a({name:"IBizPqlEditorSuggestion",props:{items:{type:Array,default:()=>[]},renderItem:{type:Function}},emits:{select:e=>!0},setup:(e,{emit:t})=>({ns:B("pql-editor-suggestion"),handleClick:e=>{t("select",e)}}),render(){var e,t;return o("div",{class:this.ns.b()},[(null==(e=this.items[0])?void 0:e._msg)?o("div",{class:this.ns.bm("item","empty")},[this.items[0]._msg]):null,!(null==(t=this.items[0])?void 0:t._msg)&&this.items.map((e=>o("div",{class:[this.ns.b("item")],onClick:t=>{t.stopPropagation(),this.handleClick(e)}},[this.renderItem?this.renderItem(e):o("div",{class:this.ns.be("item","text")},[e.label||""])])))])}}),dc=a({name:"IBizPqlEditor",props:{fields:{type:Array,default:()=>[]},value:{type:String,default:""},readonly:{type:Boolean,default:!1},placeholder:{type:String,default:""},context:{type:Object,required:!0},params:{type:Object},renderItem:{type:Function}},emits:{change:e=>!0},setup(e,{emit:t}){const a=B("pql-editor"),i=n();let s,l;const r=[{type:"pql-field-connection",label:"and",value:"and"},{type:"pql-field-connection",label:"or",value:"or"}],u=async t=>{if(!e.context)return[];const a=ibiz.hub.getApp(e.context.srfappid);return await a.codeList.get(t,e.context)},h=e=>{var t;if(!s||!e)return;const a=Hi.findPath(s,e);if(a&&Ki.hasPrevious(a)){const e=null==(t=qi.node(s,Ki.previous(a)))?void 0:t[0];if(e)return e.type||e.text?e:h(e)}},m=async t=>{if(!t||!t.appDataEntityId)return;const a=await ibiz.hub.getAppDEService(e.context.srfappid,t.appDataEntityId,e.context),n=await a.fetchDefault(e.context,e.params);if(n&&Array.isArray(n.data)){const e=n.data;return e.length?e.map((e=>({type:"pql-field-value",label:e.srfmajortext,value:e.srfkey}))):[{_msg:ibiz.i18n.t("control.common.currentNoData")}]}},v=async()=>{var t,a,n,o,i,l,c,d;if(!s)return[];const p=(()=>{var e;if(!s)return;const t=s.selection;if(t){const a=null==(e=qi.node(s,t))?void 0:e[0];if(a)return a.type||a.text?a:h(a)}})(),{selection:v}=s;if(!v)return[];if(v&&0!==(null==(a=null==(t=v.focus)?void 0:t.path)?void 0:a[0]))return[];if(!p&&v&&0===(null==(n=v.focus)?void 0:n.offset)){const e=qi.node(s,v)[0];if(e){if(oc(s.toDOMNode(e)))return[]}}if(s.selection){const e=qi.node(s,s.selection);if(e&&(null==(o=e[0])?void 0:o.type))return[]}const b=ec(p,h),g=b[b.length-1];if(g&&"condition"===g.type&&(null==(i=g.operator)?void 0:i.value)&&Jr.includes(g.operator.value)){if(g.value&&p===g.value[g.value.length-1]&&p.text){const t=p.text.slice(0,v.focus.offset).trim();if(","===t||"["===t){const t=e.fields.find((e=>{var t;return e.appDEFieldId===(null==(t=g.key)?void 0:t.value)}));if(t&&t.appCodeListId){return(await u(t.appCodeListId)).map((e=>({type:"pql-field-value",label:e.text,value:e.value})))}const a=await m(t);if(a)return a}if("]"===t||"[]"===t)return r;if(1===g.value.length&&t)return r}return[]}if(p&&"pql-field"===p.type){const t=e.fields.find((e=>e.appDEFieldId===p.value));return t&&t.valueOPs?Yr.filter((e=>t.valueOPs.includes(e.valueOP))).map((e=>({type:"pql-field-operator",label:e.label,value:e.valueOP}))):[]}if(p&&"pql-field-value"===p.type)return r;if(p&&"pql-field-operator"===p.type){const t=Yr.find((e=>e.valueOP===p.value));if(t){if(Xr.includes(t.valueOP))return[];if($r.includes(t.valueOP))return r;const a=h(p);if(a&&"pql-field"===a.type){const t=e.fields.find((e=>e.appDEFieldId===a.value));if(t&&t.appCodeListId){return(await u(t.appCodeListId)).map((e=>({type:"pql-field-value",label:e.text,value:e.value})))}const n=await m(t);if(n)return n}}return[]}if(p&&"pql-field-connection"===p.type)return e.fields.map((e=>({type:"pql-field",label:e.caption,value:e.appDEFieldId})));if(p&&!p.type){const t=h(p);if(t&&"pql-field-operator"===t.type)return 0!==(null==(l=s.selection)?void 0:l.focus.offset)?r:[];if(t&&"pql-field"===t.type){if(0!==(null==(c=s.selection)?void 0:c.focus.offset))return r;const a=e.fields.find((e=>e.appDEFieldId===t.value));if(a&&a.valueOPs)return Yr.filter((e=>a.valueOPs.includes(e.valueOP))).map((e=>({type:"pql-field-operator",label:e.label,value:e.valueOP})))}return t&&"pql-field-connection"===t.type?0!==(null==(d=s.selection)?void 0:d.focus.offset)?r:e.fields.map((e=>({type:"pql-field",label:e.caption,value:e.appDEFieldId}))):t&&"pql-field-value"===t.type?r:[]}return e.fields.map((e=>({type:"pql-field",label:e.caption,value:e.appDEFieldId})))},b=e=>{if(!s)return;if(s.restoreSelection(),!e.type)return void s.insertText(e.label);const t={type:e.type,label:e.label,value:e.value,children:[{text:""}]};s.insertNode(t),s.move(1),"pql-field-operator"===e.type&&Jr.includes(e.value)&&(s.insertText("[]"),s.moveReverse(1))},g=async()=>{if(!s)return;const t=l;l=void 0,await(null==t?void 0:t.dismiss());const a=window.getSelection();if(!a)return;const{focusNode:n}=a;if(!n||!n.parentNode)return;const i=await v();!l&&s.isFocused()&&i&&i.length&&(l=ibiz.overlay.createPopover((()=>o(cc,{items:i,renderItem:e.renderItem,onSelect:b},null)),void 0,{placement:"bottom-start",autoClose:!0,width:"200px",noArrow:!0}),await l.present(n.parentNode),await l.onWillDismiss(),l=void 0)},f=n(),w=n(),y=n(""),C=n("");c((()=>e.value),(async()=>{if(e.value===y.value)return;if(!e.value)return y.value="",C.value="",void(null==s||s.clear());const t=tc(e.value);if(t){const a=await ac(t);if(a&&a.length){const t=nc(a);return y.value=e.value,C.value=t,void(null==s||s.setHtml(t))}}y.value="",C.value="",null==s||s.clear()}),{immediate:!0}),c((()=>e.fields),(async()=>{if(!e.value)return y.value="",C.value="",void(null==s||s.clear());const t=tc(e.value);if(t){const a=await ac(t);if(a&&a.length){const t=nc(a);return y.value=e.value,C.value=t,void(null==s||s.setHtml(t))}}y.value="",C.value="",null==s||s.clear()}),{immediate:!0});const I=()=>{var n;if(!s)return;const o=((null==(n=s.children[0])?void 0:n.children)||[]).filter((e=>e.type||e.text));setTimeout((()=>{var n;if(!s)return;const{msg:i,child:l}=(()=>{var e,t,a,n,o,i,l,r,c,d,u,p,m,v,b;if(!s)return;const g=((null==(e=s.children[0])?void 0:e.children)||[]).filter((e=>e.type||e.text));if(!g.length)return;const f=ec(g[g.length-1],h);if(f.length)for(let e=0;e<f.length;e++){const s=f[e];if("connection"!==s.type){if("condition"===s.type&&"condition"===(null==(n=f[e-1])?void 0:n.type)){let e;return s.key?e=s.key:s.operator?e=s.operator:s.value&&(e=null==(o=s.value)?void 0:o[0]),{msg:ibiz.i18n.t("component.pqlEditor.noConnection"),child:e}}if(!s.key){let e;return s.operator?e=s.operator:s.value&&(e=null==(i=s.value)?void 0:i[0]),{msg:ibiz.i18n.t("component.pqlEditor.noKey"),child:e}}if(!s.operator){let t=s.key;return s.value?t=s.value[0]:f[e+1]&&("connection"===f[e+1].type?t=null==(l=f[e+1].value)?void 0:l[0]:f[e+1].key?t=f[e+1].key:f[e+1].operator?t=f[e+1].operator:f[e+1].value&&(t=null==(r=f[e+1].value)?void 0:r[0])),{msg:ibiz.i18n.t("component.pqlEditor.noOperator"),child:t}}if(s.operator.value&&!$r.includes(s.operator.value)&&!s.value){let t=s.operator;return f[e+1]&&("connection"===f[e+1].type?t=null==(c=f[e+1].value)?void 0:c[0]:f[e+1].key?t=f[e+1].key:f[e+1].operator?t=f[e+1].operator:f[e+1].value&&(t=null==(d=f[e+1].value)?void 0:d[0])),{msg:ibiz.i18n.t("component.pqlEditor.noValue"),child:t}}if(s.operator.value&&Jr.includes(s.operator.value)){const t=s.value;if(Array.isArray(t)){if(t.length>1&&"["!==(null==(u=t[0].text)?void 0:u.trim()))return{msg:ibiz.i18n.t("component.pqlEditor.errorCombination"),child:t[0]};let a="value";for(let n=1;n<t.length;n++)if(n!==t.length-1){if("value"===a){if("pql-field-value"!==t[n].type)return{msg:ibiz.i18n.t("component.pqlEditor.errorDelimiter"),child:t[n]};a="text"}else if("text"===a){if(t[n].type||","!==(null==(b=t[n].text)?void 0:b.trim()))return{msg:ibiz.i18n.t("component.pqlEditor.noDelimiter"),child:t[n]};a="value"}}else if("]"!==(null==(p=t[t.length-1].text)?void 0:p.trim())){let a=t[t.length-1];return"pql-field-value"===a.type&&f[e+1]&&("connection"===f[e+1].type?a=null==(m=f[e+1].value)?void 0:m[0]:f[e+1].key?a=f[e+1].key:f[e+1].operator?a=f[e+1].operator:f[e+1].value&&(a=null==(v=f[e+1].value)?void 0:v[0])),{msg:ibiz.i18n.t("component.pqlEditor.errorCombination"),child:a}}}}}else if("connection"===(null==(t=f[e-1])?void 0:t.type)||0===e||e===f.length-1)return{msg:ibiz.i18n.t("component.pqlEditor.noExpression"),child:null==(a=s.value)?void 0:a[0]}}})()||{};if(f.value=i||"",null==(n=w.value)||n.classList.remove(a.b("error-msg")),l){const e=s.toDOMNode(l);e&&(w.value=e,e.classList.add(a.b("error-msg")))}if(!i)try{const a=((e,t)=>{const a=new Map;t.forEach((e=>{a.set(e.appDEFieldId,e)}));let n="";return e.forEach((e=>{var t,o;if("condition"===e.type){const{key:o,operator:i,value:s}=e,l=null==(t=Qr.get(null==i?void 0:i.value))?void 0:t.sqlOP,r=null==s?void 0:s.filter((e=>e.type||e.text)).map((e=>{var t,n,s,l;return e.type?"$".concat(JSON.stringify({value:(null==e?void 0:e.value)||"",caption:(null==e?void 0:e.label)||"",field:"".concat((null==(t=a.get((null==o?void 0:o.value)||""))?void 0:t.appDataEntityFullTag)||"",".").concat((null==o?void 0:o.value)||"")})):(null==i?void 0:i.value)===xa.LIKE?"'%".concat((null==(n=e.text)?void 0:n.trim())||"","%'"):(null==i?void 0:i.value)&&Jr.includes(i.value)?(null==(s=e.text)?void 0:s.trim().replace(/^\[/,"(").replace(/\]$/,")"))||"":(null==(l=e.text)?void 0:l.trim())||""})).join("").replace(/\s+/g," "),c=s?" ".concat(r):"";n+="$".concat(JSON.stringify({name:(null==o?void 0:o.value)||"",caption:(null==o?void 0:o.label)||""})," ").concat(l).concat(c)}"connection"===e.type&&(n+=" ".concat(null==(o=e.value)?void 0:o.filter((e=>e.value)).map((e=>e.value)).join()," "))})),n})(ec(o[o.length-1],h),e.fields);y.value=a,t("change",a)}catch(e){ibiz.log.error(null==e?void 0:e.message)}}),10)};let D=()=>{},E=()=>{};return d((()=>{if(!i.value)return;window.PqlModule||(Gi.registerModule(rc),window.PqlModule=!0);const t={autoFocus:!1,readOnly:e.readonly,placeholder:e.placeholder,EXTEND_CONF:{pql:{showSuggestion:g}},onFocus:()=>{setTimeout((()=>{g()}),10)},onChange:I};s=Wi({selector:i.value,config:t,mode:"simple"}),s.setHtml(C.value),D=Bt(i.value,"keydown",(e=>{setTimeout((()=>{if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||!s||setTimeout((()=>{g()}),10),("ArrowLeft"===e.key||"ArrowRight"===e.key)&&s){const{selection:t}=s;if(t&&0===t.focus.offset){const a=qi.node(s,t)[0];if(a){oc(s.toDOMNode(a))&&("ArrowLeft"===e.key&&s.moveReverse(1),"ArrowRight"===e.key&&s.move(1))}}setTimeout((()=>{g()}),10)}}),10),"Escape"!==e.key&&"Enter"!==e.key||(e.stopPropagation(),null==l||l.dismiss())})),e.readonly||(E=Bt(i.value,"click",(()=>{setTimeout((()=>{g()}),10)})))})),p((()=>{D(),E(),null==l||l.dismiss()})),{ns:a,editorRef:i,editor:s,errorMsg:f,verify:()=>!f.value}},render(){return o("div",{class:this.ns.b()},[o("div",{ref:"editorRef",class:this.ns.b("content")},null),o("div",{class:this.ns.b("footer")},[this.errorMsg])])}});const uc=a({name:"IBizCustomFilterCondition",props:{value:{type:Object},context:{type:Object,required:!0},params:{type:Object},schemaFields:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const a=B("custom-filter-condition"),o=n([]),s=n(new Map),l=n([]),d=async t=>{t.editorProvider=void 0,t.editor=void 0;const a=s.value.get(t.field);if(!a||!t.valueOP||!e.context)return;const n=ibiz.util.jsonSchema.getMockEditor(e.context,a,t.valueOP);if(!n)return;const o=await Pa(n);if(o){t.editorProvider=o;const a=await o.createController(n,{context:e.context,params:e.params});t.editor=a}},u=async()=>{if(!e.value)return void(l.value=[]);const t=e.value.searchconds;Array.isArray(t)&&t.length?l.value=await Promise.all(t.map((async e=>{const t=e.fieldname||"",a=e.condop||"",n=e.value,o={key:ei(),field:t,valueOP:a,value:n};return await d(o),o}))):l.value=[]};c((()=>e.schemaFields),(()=>{(async()=>{Array.isArray(e.schemaFields)&&(o.value=e.schemaFields.map((e=>({...e,valueOPs:e.type?ibiz.util.jsonSchema.getValueOPsByDataType(e.type):[]}))),o.value.forEach((e=>{s.value.set(e.appDEFieldId,e)})),await u())})()}),{immediate:!0}),c((()=>e.value),(()=>{u()}),{immediate:!0});const p=()=>{if(!l.value.length)return void t("change",void 0);const e={condop:"AND",condtype:"GROUP",searchconds:[]};l.value.forEach((t=>{e.searchconds.push({condtype:"DEFIELD",fieldname:t.field,condop:t.valueOP,value:t.value})})),t("change",e)};return{ns:a,fields:o,fieldMap:s,items:l,handleAdd:async()=>{var e,t,a,n;let i=o.value;if(l.value.length){const e=new Set;l.value.forEach((t=>{e.add(t.field)})),i=o.value.filter((t=>!e.has(t.appDEFieldId))),i.length||(i=o.value)}const s={key:ei(),field:(null==(e=i[0])?void 0:e.appDEFieldId)||"",valueOP:(null==(n=null==(a=null==(t=i[0])?void 0:t.valueOPs)?void 0:a[0])?void 0:n.valueOP)||""};await d(s),l.value.push(s),p()},handleRemove:e=>{l.value.splice(e,1),p()},renderEditor:e=>{if(!e.valueOP)return null;if(e.editorProvider&&e.editor){const t=i(e.editorProvider.formEditor);return r(t,{value:e.value,controller:e.editor,data:{},onChange:t=>{e.value=t,p()}})}},handleFieldChange:async e=>{var t,a;const n=s.value.get(e.field);e.valueOP=(null==(a=null==(t=null==n?void 0:n.valueOPs)?void 0:t[0])?void 0:a.valueOP)||"",e.value=void 0,await d(e),p()},handleValueOPChange:async e=>{e.value=void 0,await d(e),p()}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("content")},[this.items.map(((e,t)=>{let a;return o("div",{class:this.ns.b("item")},[o("div",{class:this.ns.b("item-header")},[o("div",{class:this.ns.b("item-header-text")},[h("查询条件("),t+1,h(")")]),o("div",{class:this.ns.b("item-header-btn"),onClick:()=>this.handleRemove(t)},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M4.002 3.403V1a1 1 0 0 1 1-1h6.003a1 1 0 0 1 1 1v2.403h3.396a.6.6 0 1 1 0 1.2h-1.395V15a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.603H.6a.6.6 0 1 1 0-1.2h3.4zm8.804 1.205H3.2V14.8h9.605V4.608zM5.202 1.2v2.155h5.603V1.2H5.202zm.6 6.417a.6.6 0 0 1 1.201 0v4.758a.6.6 0 0 1-1.2 0V7.617zm3.202 0a.6.6 0 0 1 1.2 0v4.758a.6.6 0 0 1-1.2 0V7.617z"},null)])])])]),o("div",{class:this.ns.b("item-content")},[o("div",{class:this.ns.be("item","field")},[o(i("el-select"),{modelValue:e.field,"onUpdate:modelValue":t=>e.field=t,onChange:()=>{this.handleFieldChange(e)}},(n=a=this.fields.map((e=>o(i("el-option"),{key:e.appDEFieldId,value:e.appDEFieldId,label:e.caption},null))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]}))]),o("div",{class:this.ns.be("item","valueOP")},[o(i("el-select"),{modelValue:e.valueOP,"onUpdate:modelValue":t=>e.valueOP=t,onChange:()=>{this.handleValueOPChange(e)}},{default:()=>{var t,a;return[null==(a=null==(t=this.fieldMap.get(e.field))?void 0:t.valueOPs)?void 0:a.map((e=>o(i("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null)))]}})]),o("div",{class:this.ns.be("item","editor")},[this.renderEditor(e)])])]);var n}))]),o("div",{class:this.ns.b("footer")},[o("div",{class:this.ns.b("footer-btn"),onClick:this.handleAdd},[o("svg",{class:this.ns.be("footer-btn","icon"),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z"},null)])]),o("div",{class:this.ns.be("footer-btn","text")},[h("添加查询条件")])])])])}}),pc=a({name:"IBizAnchorBarList",props:{anchorList:{type:Array,default:[]},navBarStyle:{type:String},navBarPos:{type:String},selected:{type:String,default:""}},emits:["select"],setup(e,{emit:t}){const a=B("anchor-bar-list"),i=n("");return c((()=>e.selected),(e=>{i.value=e}),{immediate:!0}),{ns:a,renderAnchorDefaultStyle:()=>{var n,s;return i.value||(i.value=null==(s=null==(n=e.anchorList)?void 0:n[0])?void 0:s.id),e.anchorList.map((e=>o("div",{class:[a.e("item"),a.is("selected",i.value===e.id)],title:e.title,onClick:()=>{return a=e.id,void t("select",a);var a}},[o("div",{class:a.em("item","title")},[e.title])])))}}},render(){let e=null;return"DEFAULT"!==this.navBarStyle&&this.navBarStyle||(e=this.renderAnchorDefaultStyle()),o("div",{class:[this.ns.b(),this.ns.is("usermode","USER"===this.navBarPos||"USER2"===this.navBarPos)]},[e])}}),hc=a({name:"IBizAnchorContainer",components:{IBizAnchorBarList:pc},props:{anchorList:{type:Array,default:[]},anchorTargetEle:{type:Object,required:!0},navBarConfig:{type:Object,default:()=>{}}},setup(e){const t=B("anchor-container"),a=n(),o=n(!1),i=n(""),{navBarPos:s="USER",navBarSysCss:l,navBarWidth:r,navBarStyle:d,navbarHeight:u}=e.navBarConfig,h=()=>{if(o.value)return;let t=1/0,a="";for(let n=0;n<e.anchorList.length;n++){const o=document.querySelector("#".concat(e.anchorList[n].id));if(o){const i=o.getBoundingClientRect(),s=e.anchorTargetEle.$el.getBoundingClientRect(),l=i.top-s.top;i.bottom>s.top&&i.top<s.bottom&&l>=0&&l<t&&(t=l,a=e.anchorList[n].id)}}i.value=a},m=c((()=>e.anchorTargetEle&&e.anchorTargetEle.$el?e.anchorTargetEle.$el:null),(e=>{e&&(e.addEventListener("scroll",h),e.classList.add("no-slider"),m())}),{immediate:!0});return p((()=>{var t,a;(null==(t=e.anchorTargetEle)?void 0:t.$el)&&(null==(a=e.anchorTargetEle)?void 0:a.$el).removeEventListener("scroll",h)})),{ns:t,selected:i,navBarPos:s,navBarStyle:d,navBarSysCss:l,style:()=>{const e={};return r&&(1===r?Object.assign(e,{width:"auto"}):Object.assign(e,{width:"".concat(r,"px"),minWidth:"".concat(r,"px"),maxWidth:"".concat(r,"px")})),u&&(1===u?Object.assign(e,{height:"auto"}):Object.assign(e,{height:"".concat(u,"px"),minHeight:"".concat(u,"px")})),e},onSelect:e=>{clearInterval(a.value);const t=document.querySelector("#".concat(e));o.value=!0,i.value=e,t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),a.value=setTimeout((()=>{o.value=!1}),1e3))}}},render(){var e,t;return o("div",{class:[this.ns.b(),this.ns.is("".concat(this.navBarPos.toLowerCase()),!0),this.ns.is("broadside","USER"!==this.navBarPos&&"USER2"!==this.navBarPos),this.ns.is("usermode","USER"===this.navBarPos||"USER2"===this.navBarPos),this.ns.b("".concat(this.navBarStyle||"default").toLowerCase())]},[o("div",{class:[this.ns.e("anchor"),this.navBarSysCss],style:this.style()},[o(pc,{anchorList:this.anchorList,navBarStyle:this.navBarStyle,navBarPos:this.navBarPos,selected:this.selected,onSelect:this.onSelect},null)]),o("div",{class:this.ns.e("content")},[null==(t=(e=this.$slots).default)?void 0:t.call(e)])])}});function mc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const vc=a({name:"IBizButtonList",props:{model:{type:Object,required:!0},buttonsState:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},emits:{click:(e,t)=>!0},setup(e,{emit:t}){const a=B("button-list"),s=n(),r=n(),{actionGroupExtractMode:c,buttonListType:u,uiactionGroup:p}=e.model,h=n(-1),m=n(!0),v=n(!1),g=l((()=>"UIACTIONGROUP"===u?(null==p?void 0:p.uiactionGroupDetails)||[]:e.model.panelButtons||e.model.deformButtons||[])),f=l((()=>{const t=g.value.findIndex((t=>{var a;return!1!==(null==(a=e.buttonsState[t.id])?void 0:a.visible)}));return void 0===t?-1:t})),w=l((()=>{const{itemStyle:t,detailStyle:a}=e.model;return t||a||"DEFAULT"})),y=l((()=>"ITEMX"===c&&"STYLE2"===w.value?"hover":"click")),C=()=>{var e;if(!r.value)return-1;const t=Array.from(null!=(e=r.value.children)?e:[]),a=getComputedStyle(r.value),n=Number.parseInt(a.paddingLeft,10),o=Number.parseInt(a.paddingRight,10),i=r.value.clientWidth-n-o;let s=0,l=0;return t.forEach(((e,a)=>{s+=(e=>{const t=getComputedStyle(e),a=Number.parseInt(t.marginLeft,10),n=Number.parseInt(t.marginRight,10);return e.offsetWidth+a+n||0})(e);const n=a===t.length-1?i:i-44;s<=n&&(l=a+1)})),l===t.length?-1:l};let I,S=()=>{m.value&&h.value!==C()&&(h.value=-1,b((()=>{h.value=C()})))};D((()=>{m.value=!0})),E((()=>{m.value=!1})),d((()=>{"ITEM"!==c&&"BUTTONS"!==u||(S=Ii(S,33.34),r.value&&ResizeObserver&&(I=new ResizeObserver((()=>{S()})),I.observe(r.value)))}));const x=(n,l)=>{var r,c,d,u;return!1===(null==(r=e.buttonsState[n.id])?void 0:r.visible)?null:o(i("el-button"),{class:[a.e("item"),a.em("item","".concat(null==(c=n.id)?void 0:c.toLowerCase())),"".concat((null==(d=n.sysCss)?void 0:d.cssName)||"")],type:l||cl(n.buttonStyle),title:n.tooltip||n.caption,disabled:(null==(u=e.buttonsState[n.id])?void 0:u.disabled)||e.disabled,onClick:e=>((e,a)=>{var n,o;e.stopPropagation(),null==(o=null==(n=s.value)?void 0:n.handleClose)||o.call(n),t("click",a.id,e)})(e,n)},{default:()=>[o("div",{class:a.e("button-content")},[n.showIcon&&o(i("iBizIcon"),{icon:n.sysImage,class:a.em("button-content","icon")},null),n.showCaption&&o("span",{class:a.em("button-content","caption")},[n.caption])])]})},P=(n,l="chevron-down-outline")=>{const{id:r,caption:d,sysImage:u}=e.model;return o(i("el-dropdown"),{ref:s,trigger:y.value,disabled:e.disabled,class:[a.e("dropdown"),a.em("dropdown","".concat(w.value.toLowerCase()))],"popper-class":[a.e("dropdown-popper"),a.em("dropdown-popper","".concat(w.value.toLowerCase())),a.em("dropdown-popper","".concat(null==r?void 0:r.toLowerCase()))],"popper-options":{modifiers:[{name:"offset",options:{offset:[0,4]}}]},onVisibleChange:e=>{v.value=e}},{default:()=>{const r=n[f.value];return o(i("el-button-group"),null,{default:()=>["ITEMX"===c&&r&&x(r,cl(w.value)),("ITEMX"!==c||r)&&o(i("el-button"),{disabled:e.disabled,class:a.e("more-button"),title:"ITEMX"!==c&&d||ibiz.i18n.t("app.more"),type:cl(w.value),onClick:e=>((e,a)=>{var n,o,i,l;e.stopPropagation(),"hover"===y.value?t("click",a.id,e):v.value?null==(o=null==(n=s.value)?void 0:n.handleClose)||o.call(n):null==(l=null==(i=s.value)?void 0:i.handleOpen)||l.call(i)})(e,r)},{default:()=>[o("div",{class:a.e("button-content")},["ITEMS"===c?[o(i("iBizIcon"),{class:a.em("button-content","icon"),icon:u},null),d?o("span",{class:a.em("button-content","caption")},[d]):null]:o("ion-icon",{name:l,class:a.em("button-content","more")},null)])]})]})},dropdown:()=>{let t;return o(i("el-dropdown-menu"),null,mc(t=n.map(((t,a)=>{var n;if(!1!==(null==(n=e.buttonsState[t.id])?void 0:n.visible)&&("ITEMX"!==c||a!==f.value)){let e;return o(i("el-dropdown-item"),null,mc(e=x(t))?e:{default:()=>[e]})}return null})))?t:{default:()=>[t]})}})};return{ns:a,buttonListStyle:w,details:g,renderDropdown:P,renderActions:()=>{const e=g.value||[],t=-1===h.value?e:e.slice(0,h.value),n=-1===h.value?[]:e.slice(h.value);return o("div",{class:a.e("content"),ref:r},[t.map((e=>x(e))),n.length?P(n,"ellipsis-horizontal"):null])}}},render(){var e;return o("div",{class:[this.ns.b(),this.ns.m(this.model.id),this.ns.m(this.buttonListStyle.toLowerCase()),this.ns.m(null==(e=this.model.actionGroupExtractMode)?void 0:e.toLowerCase())],style:this.model.cssStyle},["ITEM"===this.model.actionGroupExtractMode||"BUTTONS"===this.model.buttonListType?this.renderActions():this.renderDropdown(this.details)])}});var bc=Object.defineProperty,gc=(e,t,a)=>(((e,t,a)=>{t in e?bc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fc{constructor(e){this.controller=e,gc(this,"navStack",[]),gc(this,"keyName","srfkey"),gc(this,"model"),gc(this,"navViewMsg",n()),this.model=e.model,e.state.enableNavView&&(e.evt.on("onNavDataChange",(e=>{this.onNavDataChange(e)})),e.evt.on("onLoadSuccess",(()=>{this.onNavDataByStack()})))}prepareParams(e,t,a,n){const{navDER:o,navFilter:i,navigateContexts:s,navigateParams:l,appDataEntityId:r}=e,c={deName:r?ia(r):void 0,navFilter:i,pickupDEFName:null==o?void 0:o.pickupDEFName,navContexts:s,navParams:l},d={context:a,params:n,data:t},{resultContext:u,resultParams:p}=ka(c,d);return{context:Object.assign(a.clone(),u),params:{...p}}}clearNavigation(){this.navStack=[],this.controller.setSelection([]),this.navViewMsg.value=void 0}setNavData(e){this.controller.setNavData(e),this.controller.setSelection([e])}onNavDataByStack(){const{items:e}=this.controller.state,t=this.navStack.map((t=>e.find((e=>e[this.keyName]===t)))).find((e=>void 0!==e))||e[0];t?this.setNavData(t):this.clearNavigation()}onNavDataChange(e){var t;const{navData:a}=e;(null==(t=this.navViewMsg.value)?void 0:t.key)!==a[this.keyName]&&(this.navStack.unshift(a[this.keyName]),this.navViewMsg.value=this.getNavViewMsg(a))}getNavViewMsg(e){const t=this.model.navAppViewId,a=this.prepareParams(this.model,e,this.controller.context,this.controller.params);return{key:e[this.keyName],context:a.context,params:a.params,viewId:t}}}var wc=Object.defineProperty,yc=(e,t,a)=>(((e,t,a)=>{t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cc extends fc{constructor(){super(...arguments),yc(this,"keyName","navId")}onNavDataByStack(){var e;const{controlParams:t,state:a,model:n}=this.controller,o=null==(e=n.calendarStyle)?void 0:e.toLowerCase(),i=a.items.filter((e=>("month"!==o||"daterange"===t.showmode)&&"user"!==o||Ta(e.beginTime,a.selectedDate,"user"===o?"week":"month"))),s=this.navStack.map((e=>i.find((t=>t[this.keyName]===e)))).find((e=>void 0!==e))||i[0];s?this.setNavData(s):this.clearNavigation()}getNavViewMsg(e){const{sysCalendarItems:t}=this.model,a=null==t?void 0:t.find((t=>t.itemType===e.itemType));if(a){const{context:t,params:n}=this.prepareParams(a,e.deData?e.deData:e,this.controller.context,this.controller.params);return{params:n,context:t,key:e.navId,viewId:a.navAppViewId}}return{key:e.navId,context:this.controller.context,params:this.controller.params}}}var Ic=Object.defineProperty,Dc=(e,t,a)=>(((e,t,a)=>{t in e?Ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ec extends fc{constructor(e){super(e),Dc(this,"keyName","_id"),Dc(this,"navNodeModelIds",[]);const{detreeNodes:t}=this.model;null==t||t.forEach((e=>{e.navAppViewId&&this.navNodeModelIds.push(e.id)}))}onNavDataByStack(){const{items:e,rootNodes:t}=this.controller.state,a=e.find((e=>!(!this.model.rootVisible&&t.includes(e))&&this.navNodeModelIds.includes(e._nodeId))),n=this.navStack.map((t=>e.find((e=>e[this.keyName]===t)))).find((e=>void 0!==e))||a;n?this.setNavData(n):this.clearNavigation()}getNavViewMsg(e){const{detreeNodes:t}=this.model,a=null==t?void 0:t.find((t=>t.id===e._nodeId)),n=Object.assign(this.controller.context.clone(),e._context||{}),o={...this.controller.params,...e._params||{}};if(a){const{context:t,params:i}=this.prepareParams(a,e._deData?e._deData:e,n,o);return{key:e[this.keyName],context:t,params:i,viewId:a.navAppViewId}}return{key:e[this.keyName],context:n,params:o}}}var Sc=Object.defineProperty,xc=(e,t,a)=>(((e,t,a)=>{t in e?Sc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Pc extends fc{constructor(){super(...arguments),xc(this,"keyName","_id")}onNavDataChange(e){var t;const{navData:a}=e;(null==(t=this.navViewMsg.value)?void 0:t.key)!==a[this.keyName]&&(this.navStack.unshift(a[this.keyName]),this.navViewMsg.value=this.getNavViewMsg(a))}onNavDataByStack(){const{items:e}=this.controller.state,t=this.navStack.map((t=>e.find((e=>e[this.keyName]===t)))).find((e=>void 0!==e))||e[0];if(t)if(t._itemStyle.startsWith("REGION")){const e={...t};t._areaCode&&(e.areaCode=this.controller.state.strAreaCode?"".concat(t._areaCode):Number(t._areaCode),e.areaLevel=za(t._areaCode.toString())),this.setNavData(e)}else this.setNavData(t);else this.clearNavigation()}getNavViewMsg(e){var t,a;const{sysMapItems:n}=this.model,{areaCode:o,areaLevel:i}=e,s=null==n?void 0:n.find((t=>t.id===e._mapItemId));if(s){const n=this.controller.context.clone(),l={...this.controller.params};if(null==(t=s.itemStyle)?void 0:t.startsWith("POINT")){n[ia(s.appDataEntityId)]=e._deData.srfkey}(null==(a=s.itemStyle)?void 0:a.startsWith("REGION"))&&(l.srfareacode=o,l.srfarealevel=i,l.srfarealevelnum=i?Aa(i):1);const{context:r,params:c}=this.prepareParams(s,{...e._deData,areaCode:o,areaLevel:i},n,l);return Object.assign(c,l),{params:c,context:r,key:e[this.keyName],viewId:s.navAppViewId}}return{key:e[this.keyName],context:this.controller.context,params:this.controller.params}}}const kc=a({name:"IBizControlNavigation",props:{controller:{type:Object,required:!0}},setup(e){var t;const a=B("control-navigation"),o=function(e){const{controlType:t}=e.model;return"CALENDAR"===t?new Cc(e):"TREEVIEW"===t||"TREEGRIDEX"===t?new Ec(e):"MAP"===t?new Pc(e):new fc(e)}(e.controller),s=n(null),u=n(!1),{navViewPos:p,controlParam:h,navViewWidth:m,navViewHeight:v,navViewMinWidth:b,navViewMaxWidth:g,navViewMinHeight:f,navViewMaxHeight:w}=e.controller.model,y={minWidth:b?b>0?"".concat(b,"px"):b:void 0,maxWidth:g?g>0?"".concat(g,"px"):g:void 0,minHeight:f?f>0?"".concat(f,"px"):f:void 0,maxHeight:w?w>0?"".concat(w,"px"):w:void 0},C=n(),I=(null==(t=null==h?void 0:h.ctrlParams)?void 0:t.navRenderMode)?h.ctrlParams.navRenderMode:"RELOAD",D=n(.5),E=n(["BOTTOM","ANY_BOTTOM"].includes(p)?"vertical":"horizontal"),S=l((()=>{const{controlType:t,height:a}=e.controller.model;if("MAP"===t&&"vertical"===E.value)return{height:"".concat(a?a+(w||v||400):1e3,"px")}}));c((()=>o.navViewMsg.value),(async(e,t)=>{if("REDRAW"===I||!e||t&&e.viewId!==t.viewId)C.value=e;else{const t=await ibiz.hub.getAppView(e.viewId);t&&"DEREDIRECTVIEW"===t.viewType&&(u.value=!0),C.value={context:e.context,params:e.params,viewId:e.viewId}}}),{deep:!0,immediate:!0}),d((()=>{if(s.value){const e="horizontal"===E.value?"offsetWidth":"offsetHeight",t=s.value[e],a="horizontal"===E.value?m:v;a&&(D.value=a>0&&a<1?1-a:"".concat(t-a,"px"))}}));return{ns:a,style:S,navStyle:y,provider:o,splitMode:E,splitValue:D,outerWrapper:s,renderNavView:()=>{var e;if(null==(e=C.value)?void 0:e.viewId)return r(i("IBizViewShell"),{...C.value,isEmbedCtrlNav:u.value,class:a.e("nav-view")})}}},render(){var e,t,a,n,s;const{state:l,model:r}=this.controller;return o("div",{ref:"outerWrapper",style:this.style,class:[this.ns.b(),this.ns.e(null==(e=r.controlType)?void 0:e.toLowerCase())]},[l.enableNavView?l.showNavView?o(i("iBizNavSplit"),{modelValue:this.splitValue,"onUpdate:modelValue":e=>this.splitValue=e,mode:this.splitMode,min:"horizontal"===this.splitMode?this.navStyle.minWidth:this.navStyle.minHeight,max:"horizontal"===this.splitMode?this.navStyle.maxWidth:this.navStyle.maxHeight},{left:()=>{var e,t;return null==(t=(e=this.$slots).default)?void 0:t.call(e)},right:()=>this.renderNavView(),top:()=>{var e,t;return null==(t=(e=this.$slots).default)?void 0:t.call(e)},bottom:()=>this.renderNavView()}):null==(a=(t=this.$slots).default)?void 0:a.call(t):null==(s=(n=this.$slots).default)?void 0:s.call(n)])}});function Tc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const zc=()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M6.751 12.303A5.557 5.557 0 0 1 1.2 6.751C1.2 3.691 3.69 1.2 6.751 1.2a5.558 5.558 0 0 1 5.551 5.551 5.557 5.557 0 0 1-5.551 5.552M6.751 0a6.751 6.751 0 1 0 4.309 11.949l3.855 3.855a.6.6 0 1 0 .849-.849l-3.854-3.853A6.751 6.751 0 0 0 6.751 0"},null)])]),Ac=a({name:"IBizGanttSetting",props:{modal:{type:Object,required:!0},columnStates:{type:Object,required:!0},mustShowColumns:{type:Array,required:!0,default:()=>["sn","name"]},limitsize:{type:Number,default:0}},emits:[],setup(e){const t=B("gantt-setting"),a=n(""),s=n(""),l=n([]),r=t=>e.mustShowColumns.some((e=>t.key===e)),d=()=>{l.value=pi(e.columnStates)};c((()=>e.columnStates),(()=>{d()}),{immediate:!0,deep:!0});const u=(n,i="optional")=>{const c=n.caption||"",d="optional"===i,u=r(n);if(!d&&n.hidden&&!u)return null;const p=d&&l.value.some((e=>n.key===e.key&&!n.hidden)),h=d?a.value:s.value,m=!c.includes(h);return o("div",{class:[t.b("list-item"),t.is("disabled",u&&d),t.is("filter-item",m)],onClick:()=>d&&!u&&(t=>{if(e.limitsize>0&&t.hidden){const t=l.value.filter((e=>!r(e)&&!e.hidden));if(t&&t.length>=e.limitsize)return void ibiz.message.warning(ibiz.i18n.t("component.ganttSetting.reachedMaximum"))}Object.assign(t,{hidden:!t.hidden})})(n)},[o("div",{class:t.be("list-item","caption")},[c]),o("div",{class:[t.be("list-item","end-icon")]},[(p||d&&u)&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M6.012 11.201L1.313 6.832l-.817.879 5.54 5.15 9.304-9.163-.842-.855z"},null)])]),!d&&!u&&o("div",{class:t.bem("list-item","end-icon","close"),onClick:e=>((e,t)=>{e.stopPropagation(),Object.assign(t,{hidden:!t.hidden})})(e,n)},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.456 7.456V-.115h1.2v7.571h7.572v1.2H8.656v7.572h-1.2V8.656H-.115v-1.2h7.571z",transform:"rotate(45 8.056 8.056)"},null)])])])])])};return{ns:t,optionalInput:a,selectedInput:s,states:l,renderSearchList:(n=[],l="optional")=>{const r="optional"===l,c=r?a.value:s.value;let d=[];n.forEach((e=>{var t;return(null==(t=e.caption)?void 0:t.includes(c))&&d.push(e)}));const p=r?d.length:n.filter((e=>!e.hidden)).length,h=r?ibiz.i18n.t("component.ganttSetting.optionalAttribute"):ibiz.i18n.t("component.ganttSetting.selectedAttribute"),m=ibiz.i18n.t("component.ganttSetting.limitsize",{max:e.limitsize+e.mustShowColumns.length});return o("div",{class:t.b("search-list")},[o("div",{class:t.be("search-list","caption")},["".concat(h," · ").concat(p," ").concat(!r&&e.limitsize>0?"(".concat(m,")"):"")]),o("div",{class:t.be("search-list","content")},[o("div",{class:t.be("search-list","search")},[o(i("el-input"),r?{placeholder:ibiz.i18n.t("app.search"),modelValue:a.value,"onUpdate:modelValue":e=>a.value=e,clearable:!0}:{placeholder:ibiz.i18n.t("app.search"),modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,clearable:!0},{prefix:()=>zc()})]),o("div",{class:t.be("search-list","list")},[d.map((e=>u(e,l)))])])])},onClose:()=>{e.modal.dismiss()},onConfirm:()=>{const t={ok:!0,data:l.value};e.modal.dismiss(t)},onResultDefault:()=>{d()}}},render(){let e,t,a;return o("div",{class:[this.ns.b()]},[o("div",{class:[this.ns.e("header")]},[ibiz.i18n.t("component.ganttSetting.headerCaption")]),o("div",{class:[this.ns.e("content")]},[o("div",{class:[this.ns.em("content","optional")]},[this.renderSearchList(this.states,"optional")]),o("div",{class:[this.ns.em("content","selected")]},[this.renderSearchList(this.states,"selected")])]),o("div",{class:[this.ns.e("bottom")]},[o(i("el-button"),{type:"text",onClick:this.onResultDefault},Tc(e=ibiz.i18n.t("component.ganttSetting.resultDefault"))?e:{default:()=>[e]}),o("div",{class:[this.ns.em("bottom","btn-right")]},[o(i("el-button"),{type:"text",onClick:this.onClose},Tc(t=ibiz.i18n.t("app.cancel"))?t:{default:()=>[t]}),o(i("el-button"),{onClick:this.onConfirm},Tc(a=ibiz.i18n.t("app.confirm"))?a:{default:()=>[a]})])])])}}),Oc=a({name:"IBizNavSplit",props:{modelValue:{type:[Number,String],default:.5},mode:{validator:e=>["horizontal","vertical"].includes(e),default:"horizontal"},min:{type:[Number,String],default:.2},max:{type:[Number,String],default:.8}},emits:["update:modelValue","on-move-start","on-moving","on-move-end"],setup(e,{emit:t}){const a=B("nav-split"),o=n(null),i=n(0),s=n(0),r=n(!1),u=n(0),p=n(0),h=n(.5),v=n(0),g=l((()=>[a.b("wrapper"),a.is("no-select",r.value)])),f=l((()=>[a.b("pane"),r.value?a.bm("pane","moving"):""])),w=l((()=>"horizontal"===e.mode)),y=l((()=>100-i.value)),C=l((()=>"string"==typeof e.modelValue)),I=l((()=>w.value?"offsetWidth":"offsetHeight")),D=(e,t)=>parseFloat(e)/parseFloat(t),E=t=>{const a=o.value[I.value];return C.value?"string"==typeof e[t]?e[t]:a*e[t]:"string"==typeof e[t]?D(e[t],a):e[t]},S=e=>{let t=0;return t=C.value?"".concat(o.value[I.value]-parseFloat(e),"px"):1-e,t},x=a=>{const n=(w.value?a.pageX:a.pageY)-v.value,i=o.value[I.value];let l=C.value?"".concat(parseFloat(s.value)+n,"px"):D(i*s.value+n,i);const r=S(l);var c,d;parseFloat(r)>parseFloat(p.value)&&(l=S((c=r,d=p.value,C.value?"".concat(Math.min(parseFloat(c),parseFloat(d)),"px"):Math.min(c,d)))),parseFloat(r)<=parseFloat(u.value)&&(l=S(((e,t)=>C.value?"".concat(Math.max(parseFloat(e),parseFloat(t)),"px"):Math.max(e,t))(r,u.value))),Object.assign(a,{atMin:e.modelValue===u.value,atMax:C.value?S(e.modelValue)===p.value:S(e.modelValue).toFixed(5)===p.value.toFixed(5)}),t("update:modelValue",l),t("on-moving",a)},P=()=>{r.value=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P),t("on-move-end")},k=()=>{b((()=>{u.value=E("min"),p.value=E("max");const a=o.value[I.value],n=parseFloat(a),s=1e4*(C.value?D(e.modelValue,n):e.modelValue)/100,l=n-100*s/1e4*n,r=parseFloat(p.value),c=parseFloat(u.value);if(Math.round(l)>=c&&Math.round(l)<=r)i.value=s;else if(Math.round(l)<c){const e=n-c;i.value=e/n*1e4/100,t("update:modelValue","".concat(e,"px"))}else{const e=n-r;i.value=e/n*1e4/100,t("update:modelValue","".concat(e,"px"))}}))};return c((()=>e.modelValue),(e=>{e!==h.value&&(h.value=e,k())})),d((()=>{b((()=>{k()})),window.addEventListener("resize",k)})),m((()=>{window.removeEventListener("resize",k)})),{ns:a,outerWrapper:o,offset:i,wrapperClasses:g,paneClasses:f,isHorizontal:w,anotherOffset:y,handleMousedown:a=>{v.value=w.value?a.pageX:a.pageY,s.value=e.modelValue,r.value=!0,document.addEventListener("mousemove",x),document.addEventListener("mouseup",P),t("on-move-start")},handleMove:x}},render(){var e,t,a,n,s,l,r,c,d,u,p,h;return o("div",{class:this.wrapperClasses,ref:"outerWrapper"},[this.isHorizontal?o("div",{class:this.ns.m("horizontal")},[o("div",{style:{width:"".concat(this.offset,"%")},class:[this.paneClasses,this.ns.bm("pane","left")]},[null==(t=(e=this.$slots).left)?void 0:t.call(e)]),o("div",{style:{left:"".concat(this.offset,"%")},class:this.ns.b("trigger-con"),onMousedown:e=>this.handleMousedown(e)},[(null==(n=(a=this.$slots).trigger)?void 0:n.call(a))||o(i("iBizSplitTrigger"),{mode:"vertical"},null)]),o("div",{style:{width:"".concat(this.anotherOffset,"%")},class:[this.paneClasses,this.ns.bm("pane","right")]},[null==(l=(s=this.$slots).right)?void 0:l.call(s)])]):o("div",{class:this.ns.m("vertical")},[o("div",{style:{bottom:"".concat(this.anotherOffset,"%")},class:[this.paneClasses,this.ns.bm("pane","top")]},[null==(c=(r=this.$slots).top)?void 0:c.call(r)]),o("div",{style:{top:"".concat(this.offset,"%")},class:this.ns.b("trigger-con"),onMousedown:e=>this.handleMousedown(e)},[(null==(u=(d=this.$slots).trigger)?void 0:u.call(d))||o(i("iBizSplitTrigger"),{mode:"horizontal"},null)]),o("div",{style:{top:"".concat(this.offset,"%")},class:[this.paneClasses,this.ns.bm("pane","bottom")]},[null==(h=(p=this.$slots).bottom)?void 0:h.call(p)])])])}}),Mc=a({name:"IBizCropping",props:{img:{type:Object},url:{type:String},cropareaWidth:{type:Number,default:400},cropareaHeight:{type:Number,default:200}},emits:["change"],setup(e,{emit:t}){const a=B("cropping"),o=n(1),i=n(!1),s=n(),r=n({x:0,y:0,tx:0,ty:0}),c=ei(),d=l((()=>{var t;return(null==(t=e.img)?void 0:t.raw)?URL.createObjectURL(e.img.raw):e.url?e.url:""})),u=()=>{o.value>1&&(o.value=(10*o.value-1)/10)},p=()=>{o.value<3&&(o.value=(10*o.value+1)/10)},h=l((()=>({maxWidth:"".concat(e.cropareaWidth,"px"),maxHeight:"".concat(e.cropareaHeight,"px"),objectFit:"contain",transform:"translate(calc(".concat(r.value.tx,"px - 50%),calc(").concat(r.value.ty,"px - 50%)) scale(").concat(o.value,")")})));return{ns:a,cropImgUrl:d,scaleNumber:o,style:h,uuid:c,imgRef:s,onReduce:u,onAdd:p,onMouseDown:e=>{const t=e.offsetX,a=e.offsetY;r.value.x=t,r.value.y=a,i.value=!0},onMouseMove:t=>{if(!i.value||!s.value)return;const a=t.offsetX,n=t.offsetY,o=document.getElementById(c);if(!o)return;const{left:l,top:d}=o.getBoundingClientRect(),{left:u,top:p,width:h,height:m}=s.value.getBoundingClientRect();let v=!1,b=!1;h>e.cropareaWidth&&(v=!0),m>e.cropareaHeight&&(b=!0);const g=a-r.value.x,f=n-r.value.y;v&&u+g<l&&u+h+g>l+e.cropareaWidth&&(r.value.tx+=g),b&&p+f<d&&p+m+f>d+e.cropareaHeight&&(r.value.ty+=f),r.value.x=a,r.value.y=n},onMouseUp:()=>{i.value=!1},onMouseLeave:()=>{i.value=!1},onCancel:()=>{t("change","")},onConfirm:async()=>{let a="";const n=document.getElementById(c);if(n&&s.value){const{left:t,top:o}=n.getBoundingClientRect(),{left:i,top:l,width:r,height:c}=s.value.getBoundingClientRect(),d=i-t,u=l-o,p=await ibiz.util.html2canvas.getCanvas(s.value,{x:-d,y:-u,width:e.cropareaWidth,height:e.cropareaHeight}),h=p.getContext("2d"),m=h.getImageData(0,0,p.width,p.height),v=m.data,b=p.width,g=p.height;for(let e=0;e<g;e++)for(let t=0;t<b;t++){(t<d||t>r+d-2||e<u||e>c+u-2)&&(v[4*(e*b+t)+3]=0)}h.putImageData(m,0,0),a=p.toDataURL("image/png")}t("change",a)},onWheel:async t=>{t.stopPropagation(),t.preventDefault(),t.deltaY>0?u():p();const a=document.getElementById(c);if(!a)return;await b();const{left:n,top:o}=a.getBoundingClientRect(),{left:i,top:l,width:d,height:h}=s.value.getBoundingClientRect(),m=i-n,v=l-o;d>e.cropareaWidth?(i>n&&(r.value.tx-=m),i+d<n+e.cropareaWidth&&(r.value.tx+=n+e.cropareaWidth-i-d)):r.value.tx=0,h>e.cropareaHeight?(l>o&&(r.value.ty-=v),l+h<o+e.cropareaHeight&&(r.value.ty+=o+e.cropareaHeight-l-h)):r.value.ty=0}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("content")},[o("div",{class:this.ns.em("content","crop")},[o("div",{id:this.uuid,class:this.ns.em("content","croparea"),style:{height:"".concat(this.cropareaHeight,"px"),width:"".concat(this.cropareaWidth,"px")},onMousedown:this.onMouseDown,onMousemove:this.onMouseMove,onMouseup:this.onMouseUp,onMouseleave:this.onMouseLeave,onWheel:this.onWheel},null),o("img",{style:this.style,ref:"imgRef",class:this.ns.em("content","img"),src:this.cropImgUrl,alt:""},null)]),o("div",{class:this.ns.em("content","scale-slider")},[o("ion-icon",{class:this.ns.em("content","scale-icon"),name:"remove-outline",onClick:this.onReduce},null),o(i("el-slider"),{modelValue:this.scaleNumber,"onUpdate:modelValue":e=>this.scaleNumber=e,max:3,min:1,step:.1},null),o("ion-icon",{class:this.ns.em("content","scale-icon"),name:"add-outline",onClick:this.onAdd},null)])]),o("div",{class:this.ns.e("footer")},[o("div",{class:this.ns.em("footer","cancel"),onClick:this.onCancel},[ibiz.i18n.t("editor.common.cancel")]),o("div",{class:this.ns.em("footer","confirm"),onClick:this.onConfirm},[ibiz.i18n.t("editor.common.confirm")])])])}}),Nc=a({name:"IBizEditorEmptyText",props:{showPlaceholder:{type:Boolean,default:!1},placeHolder:{type:String,default:""}},setup:()=>({ns:B("editor-empty-text")}),render(){return o("span",{class:[this.ns.b(),this.ns.is("placeholder",this.showPlaceholder)]},[this.showPlaceholder&&this.placeHolder?this.placeHolder:ibiz.config.common.emptyText])}}),Bc=a({name:"IBizKanbanSetting",props:{controller:{type:Object,required:!0},buttonStyle:{type:Object,default:()=>({circle:!1,type:"info"})}},setup:e=>({ns:B("kanban-setting"),groups:l((()=>e.controller.state.groups))}),render(){return o("div",{class:this.ns.b()},[o(i("el-popover"),{trigger:"click",placement:"bottom","popper-class":this.ns.e("popover")},{reference:()=>o(i("el-button"),this.buttonStyle,{default:()=>[o("ion-icon",{name:"options-outline",title:ibiz.i18n.t("component.kanbanSetting.hideGroup")},null)]}),default:()=>o("div",{class:this.ns.em("popover","content")},[this.groups.map((e=>o(i("el-checkbox"),{size:"small",label:e.caption,"model-value":!e.hidden,onChange:t=>{e.hidden=!t}},null)))])})])}}),_c=e("b",{install:e=>{e.component(Bc.name,Bc),e.component(Nc.name,Nc),e.component(Mc.name,Mc),e.component(X.name,X),e.component(Ur.name,Ur),e.component(Vr.name,Vr),e.component($.name,$),e.component(xl.name,xl),e.component(cs.name,cs),e.component(rs.name,rs),e.component(J.name,J),e.component(ss.name,ss),e.component(Q.name,Q),e.component(Z.name,Z),e.component(dl.name,dl),e.component(ee.name,ee),e.component(ul.name,ul),e.component(pl.name,pl),e.component(hl.name,hl),e.component(ml.name,ml),e.component(vl.name,vl),e.component(bl.name,bl),e.component(gl.name,gl),e.component(wl.name,wl),e.component(Cl.name,Cl),e.component(Il.name,Il),e.component(El.name,El),e.component(Sl.name,Sl),e.component("IBizMapChart",S({loader:()=>t.import("./map-chart-ICyEpflN.js")})),e.component("IBizMapChartUser",S({loader:()=>t.import("./map-chart-user-7zfETImI.js")})),e.component(te.name,te),e.component(Pl.name,Pl),e.component(kl.name,kl),e.component(br.name,br),e.component(gr.name,gr),e.component(ol.name,ol),e.component(dc.name,dc),e.component(uc.name,uc),e.component(hc.name,hc),e.component(vc.name,vc),e.component(kc.name,kc),e.component(Ac.name,Ac),e.component(Oc.name,Oc),e.component(ae.name,ae)}});function Rc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Lc=a({name:"IBizMenuDesign",props:{controller:{type:Object,required:!0},menus:{type:Array,required:!0}},emits:["saved","reset"],setup(e,{emit:t}){const a=B("menu-design"),s=e.controller,l=n(!1),r=n(!1),c=n([]),u=n([]);d((()=>{u.value=Oa("APPMENU",s.model.appMenuItems,s.state.menuItemsState)}));const p=e=>{e.stopPropagation()},h=e=>{const t=[];return e.forEach((e=>{var a;const n={key:e.key,name:e.label,type:e.itemType,visible:e.config.visible};(null==(a=e.children)?void 0:a.length)&&(n.children=h(e.children)),t.push(n)})),t},m=e=>{const t=[];return e.forEach((e=>{if(t.push(e),e.children&&e.children.length>0){const a=m(e.children);t.push(...a)}})),t},v=e=>{let t=[];return s.saveConfigs&&s.saveConfigs.length>0&&(t=m(s.saveConfigs)),e.map((e=>{var a;const n=t.find((t=>t.key===e.key)),o={...e,isCollapse:!0,config:{visible:!0}};return(null==(a=e.children)?void 0:a.length)&&(o.children=v(e.children)),n&&Object.assign(o,{config:{visible:n.visible}}),o}))},b=async()=>{s.saveConfigs=[],await s.customController.resetCustomModelData(),c.value=v(Di(e.menus)),t("reset")},g=async()=>{l.value=!0;const e=h(c.value);await s.customController.saveCustomModelData(e),s.saveConfigs=e,l.value=!1,t("saved",e)},f=e=>{var t;if((null==(t=s.state.menuItemsState[e.key])?void 0:t.visible)&&!u.value.includes(e.key)){if("MENUITEM"===e.itemType){let t;const n=s.itemProviders[e.key];return t=n&&n.renderText?function(e,t){const a=t.allAppMenuItems.find((t=>t.id===e));if(!a)throw new _t("".concat(ibiz.i18n.t("control.menuDesign.noMenuItemModel",{menu:e})));const n=t.itemProviders[e];if(!n.renderText)throw new _t("".concat(ibiz.i18n.t("control.menuDesign.noProviderRenderText",{menu:e})));return n.renderText(a,t)}(e.key,s):[e.image?o(i("iBizIcon"),{class:a.e("icon"),icon:e.image},null):null,o("span",null,[e.label])],t}if("SEPERATOR"===e.itemType){const t="TOP"===s.view.model.mainMenuAlign?"vertical":"horizontal";return o("div",{class:a.be("content","menu-seperator")},[o(i("el-divider"),{direction:t,class:a.e("separator"),id:e.key},null)])}}},w=e=>e.children&&e.children.length>0?e.isCollapse?o("i",{class:[a.be("menu-set-drawer","group-icon"),"fa fa-caret-right"],"aria-hidden":"true"},null):o("i",{class:[a.be("menu-set-drawer","group-icon"),"fa fa-sort-down"],"aria-hidden":"true"},null):null,y=e=>e.map((e=>{const t=f(e);return t?o("div",{class:a.be("content","menu-item")},[o("div",{class:[a.be("content","menu-item-content"),a.is("is-menuitem","MENUITEM"===e.itemType)]},[o("div",{class:a.bem("content","menu-item-content","label"),onClick:()=>{var t;(t=e).isCollapse=!t.isCollapse}},[w(e),o("div",{class:a.bem("content","menu-item-content","label-content")},[t])]),"SEPERATOR"!==e.itemType?o("div",{class:a.bem("content","menu-item-content","checks")},[o(i("el-checkbox"),{modelValue:e.config.visible,"onUpdate:modelValue":t=>e.config.visible=t,onClick:p,label:ibiz.i18n.t("control.menuDesign.visible"),size:"large"},null)]):null]),e.children&&e.children.length>0?o("div",{class:[a.bem("content","menu-item","children"),a.is("collapse",e.isCollapse)]},[y(e.children)]):null]):null}));return{ns:a,c:s,configs:c,visible:r,loading:l,onReset:b,renderContent:()=>o("div",{class:a.b("content")},[y(c.value)]),renderHeader:()=>{let e,t;return o("div",{class:a.b("header")},[o("div",{class:a.be("header","caption")},[ibiz.i18n.t("control.menuDesign.customMenu")]),o("div",{class:a.be("header","actions")},[o(i("el-button"),{onClick:b,loading:l.value},Rc(e=ibiz.i18n.t("control.menuDesign.reset"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:g,loading:l.value},Rc(t=ibiz.i18n.t("control.menuDesign.save"))?t:{default:()=>[t]})])])},onSave:g,openDesign:()=>{"DESIGN"!==s.runMode&&(u.value=Oa("APPMENU",s.model.appMenuItems,s.state.menuItemsState),c.value=v(Di(e.menus)),r.value=!0)}}},render(){return o("div",{class:this.ns.b()},[o("div",{title:zt(ibiz.i18n.t("control.menu.menuSetting")),onClick:this.openDesign},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false",fill:"currentColor"},[o("g",{id:"augaction/settings","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M11.405 13.975l3.398-5.889L11.405 2.2H4.607L1.208 8.087l3.399 5.889h6.798zm1.023-12.4l3.43 5.938c.205.356.205.793 0 1.149l-3.43 5.938a1.147 1.147 0 0 1-.993.574H4.577c-.41 0-.789-.218-.994-.573L.153 8.66a1.153 1.153 0 0 1 0-1.147l3.43-5.94c.205-.356.584-.575.994-.575h6.858c.409 0 .788.22.993.576zM8.006 9.879c.988 0 1.792-.804 1.792-1.792s-.804-1.792-1.792-1.792-1.792.804-1.792 1.792.804 1.792 1.792 1.792zm0-4.784a2.993 2.993 0 1 1-.002 5.985 2.993 2.993 0 0 1 .002-5.985z",id:"aug形状结合"},null)])])]),o(i("el-drawer"),{modelValue:this.visible,"onUpdate:modelValue":e=>this.visible=e,"append-to-body":!0,"custom-class":this.ns.b("menu-set-drawer")},{default:()=>this.renderContent(),header:()=>this.renderHeader()})])}});function jc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}function Vc(e){return e.map((e=>{var t;const a={key:e.id,label:e.caption,image:e.sysImage,counterId:e.counterId,disabled:!e.appFuncId,tooltip:e.tooltip,itemType:e.itemType,sysCss:e.sysCss};return(null==(t=e.appMenuItems)?void 0:t.length)&&(a.children=Vc(e.appMenuItems)),a}))}function Fc(e,t){const a=t.allAppMenuItems.find((t=>t.id===e));if(!a)throw new _t(ibiz.i18n.t("control.menu.noFoundModel",{menuKey:e}));const n=t.itemProviders[e];if(!n.renderText)throw new _t(ibiz.i18n.t("control.menu.noFoundFunction",{menuKey:e}));return n.renderText(a,t)}function Uc(e,t){let a;return t&&t.some((t=>t.key===e?(a=t,!0):!!(t.children&&t.children.length>0)&&(a=Uc(e,t.children),!!a))),a}function Hc(e,t,a){if(a.includes(e))return!1;const n=Uc(e,t);return!n||n.visible}function qc(e,t,a,n,s,l,r,c){var d,u;if(s.state.menuItemsState[t.key].visible&&Hc(t.key,r,c)){if("MENUITEM"===t.itemType){let r;const c=s.itemProviders[t.key];return r=c&&c.renderText?Fc(t.key,s):e&&a?[t.image?o(i("iBizIcon"),{class:n.e("icon"),icon:t.image},null):t.label.slice(0,1)]:[t.image?o(i("iBizIcon"),{class:n.e("icon"),icon:t.image},null):null,t.label,null!=l[t.counterId]?o(i("iBizBadge"),{class:n.e("counter"),value:l[t.counterId]},null):null],e&&a?o(i("el-tooltip"),{class:n.b("tooltip"),content:t.label,placement:"left",theme:"light"},{default:()=>{var e;return[o(i("el-menu-item"),{class:[n.e("item"),"".concat((null==(e=t.sysCss)?void 0:e.cssName)||"")],index:t.key,disabled:t.disabled},jc(r)?r:{default:()=>[r]})]}}):o(i("el-menu-item"),{class:[n.e("item"),"".concat((null==(d=t.sysCss)?void 0:d.cssName)||"")],index:t.key,disabled:t.disabled,title:zt(t.tooltip)},jc(r)?r:{default:()=>[r]})}if("SEPERATOR"===t.itemType){const a="TOP"===s.view.model.mainMenuAlign&&e?"vertical":"horizontal";return o(i("el-divider"),{direction:a,class:n.em("separator",a),id:t.key},null)}if("RAWITEM"===t.itemType){const e=Rt(s.model,t.key,{compareField:"id",childrenFields:["appMenuItems"]});return o(i("el-menu-item"),{index:t.key,title:zt(t.tooltip),class:[n.e("rawitem"),"".concat((null==(u=t.sysCss)?void 0:u.cssName)||"")]},{default:()=>[o(i("iBizRawItem"),{rawItem:e},null)]})}}}function Gc(e,t,a,n,s,l,r,c){var d,u,p,h,m;if(s.state.menuItemsState[t.key].visible&&Hc(t.key,r,c))return o(i("el-sub-menu"),{class:[n.b("submenu"),"".concat((null==(d=t.sysCss)?void 0:d.cssName)||"")],index:t.key,teleported:!0,"popper-class":[n.b("popup-container"),n.b("".concat(s.model.codeName.toLowerCase(),"--popper")),"".concat((null==(u=s.model.sysCss)?void 0:u.cssName)?"".concat(null==(p=s.model.sysCss)?void 0:p.cssName,"--popper"):""),"".concat((null==(h=t.sysCss)?void 0:h.cssName)?"".concat(null==(m=t.sysCss)?void 0:m.cssName,"--popper"):"")]},{default:()=>t.children.map((e=>e.children?Gc(!1,e,a,n,s,l,r,c):qc(!1,e,a,n,s,l,r,c))),title:()=>{const r=s.itemProviders[t.key];return r&&r.renderText?Fc(t.key,s):a?t.image?o(i("iBizIcon"),{class:n.e("icon"),icon:t.image},null):[e?t.label.slice(0,1):t.label,e?null:o("ion-icon",{name:"chevron-forward-outline"},null)]:[o(i("iBizIcon"),{class:n.e("icon"),icon:t.image},null),t.label,null!=l[t.counterId]?o(i("iBizBadge"),{class:n.e("counter"),value:l[t.counterId]},null):null]}})}const Wc=a({name:"IBizAppMenuControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:{type:Boolean},currentPath:{type:String}},setup(e){const t=ne(((...e)=>new Ma(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),i=n(Vc(t.model.appMenuItems)),s=n([]),r=n(""),u=n([]),h=Yi();let m=null;const v=n({}),g=n(ei()),f=n(),w=n(!1),y=n([]),C=()=>t.getAllItems().find((e=>{var t;if("MENUITEM"!==e.itemType||!e.appFuncId)return!1;if("VIEW"===ibiz.config.appMenu.echoMode){const t=ibiz.hub.getApp(e.appId);if(!t)return!1;const a=t.getAppFunc(e.appFuncId);if(a&&a.appViewId&&(null==h?void 0:h.params.view2))return a.appViewId.split(".")[1]===h.params.view2}else{if(!h)return!1;const a=K(h);if(a.pathNodes.length>1)return e.id===(null==(t=a.pathNodes[1].params)?void 0:t.srfmenuitem)}return!1})),I=async(e,a)=>{const n=C();if(n&&n.id===e)return;r.value=e;const o=t.getAllItems().find((t=>t.id===e));"RAWITEM"!==(null==o?void 0:o.itemType)&&"DESIGN"!==t.runMode&&await t.onClickMenuItem(e,a)};"DESIGN"!==t.runMode&&c((()=>null==h?void 0:h.params.view2),((e,t)=>{if(e!==t&&ibiz.config.appMenu.enableEcho){const e=C();r.value=e?e.id:""}}));const D=e=>{v.value=e};t.evt.on("onCreated",(async()=>{s.value=t.saveConfigs;const e=t.getAllItems(),a=e.find((e=>e.openDefault&&!e.hidden));if(!a||(null==h?void 0:h.params.view2)||(null==h?void 0:h.fullPath.includes("404"))){if(ibiz.config.appMenu.enableEcho){const e=C();r.value=e?e.id:""}}else r.value=a.id,I(r.value);const n=e.filter((e=>e.expanded&&!e.hidden));n.length>0&&n.forEach((e=>{u.value.push(e.id)})),y.value=Oa("APPMENU",t.model.appMenuItems,t.state.menuItemsState,s.value)})),t.evt.on("onMounted",(async()=>{const e=t.model.appCounterRefId;e&&(m=t.getCounter(e),m&&m.onChange(D))})),p((()=>{null==m||m.offChange(D),null==m||m.destroy()}));const E=l((()=>"TOP"===t.view.model.mainMenuAlign?"horizontal":"vertical")),S=()=>{if(f.value&&f.value.$el.children){const e=f.value.$el.children[0];e&&(w.value=e.scrollHeight>e.clientHeight)}};d((()=>{S()})),c((()=>e.collapse),(()=>{b((()=>{S()}))}),{immediate:!0}),t.view.model.mainMenuAlign&&"LEFT"!==t.view.model.mainMenuAlign&&"TOP"!==t.view.model.mainMenuAlign&&ibiz.message.warning(ibiz.i18n.t("control.menu.noSupportAlign",{align:t.view.model.mainMenuAlign}));const x=l((()=>"LEFT"===t.view.model.mainMenuAlign||void 0===t.view.model.mainMenuAlign)),P=l((()=>t.model.enableCustomized)),k=()=>{var e;null==(e=t.model.appMenuItems)||e.forEach((e=>{t.initMenuItemState(e)})),y.value=Oa("APPMENU",t.model.appMenuItems,t.state.menuItemsState,s.value)};return{menuRef:f,menus:i,c:t,key:g,onClick:I,ns:a,hasScroll:w,defaultActive:r,defaultOpens:u,menuMode:E,counterData:v,saveConfigs:s,configSaves:e=>{s.value=e,k()},configReset:()=>{s.value=[],k()},isShowCollapse:x,enableCustomized:P,ellipsisSvg:()=>o("ion-icon",{name:"ellipsis-horizontal"},null),hideSeparator:y}},render(){var e;return o(i("iBizControlBase"),{ref:"menuRef",class:[this.ns.b(),this.ns.b("".concat(this.c.model.codeName.toLowerCase())),this.ns.m(this.menuMode),this.ns.is("collapse",this.collapse),this.ns.is("show-collapse",this.isShowCollapse),this.ns.is("show-menu-design",this.enableCustomized),this.ns.is("scroll",this.hasScroll),"".concat((null==(e=this.c.model.sysCss)?void 0:e.cssName)||"")],controller:this.c},{default:()=>{var e,t;return[this.c.state.isCreated&&o(i("el-menu"),w({key:this.key,"popper-class":[this.ns.b("popper"),this.ns.b("".concat(this.c.model.codeName.toLowerCase(),"--popper")),"".concat((null==(e=this.c.model.sysCss)?void 0:e.cssName)?"".concat(null==(t=this.c.model.sysCss)?void 0:t.cssName,"--popper"):"")],"default-active":this.defaultActive,"default-openeds":this.defaultOpens,collapse:this.collapse,"collapse-transition":!1,onSelect:this.onClick,theme:"light",mode:this.menuMode,"ellipsis-icon":()=>this.ellipsisSvg(),ellipsis:"horizontal"===this.menuMode},this.$attrs),{default:()=>this.menus.map((e=>{var t;return(null==(t=e.children)?void 0:t.length)>0?Gc(!0,e,this.collapse,this.ns,this.c,this.counterData,this.saveConfigs,this.hideSeparator):qc(!0,e,this.collapse,this.ns,this.c,this.counterData,this.saveConfigs,this.hideSeparator)}))}),this.enableCustomized&&o(Lc,{class:[this.ns.b("menu-set"),this.ns.is("collapse",this.collapse),this.ns.is("horizontal","TOP"===this.c.view.model.mainMenuAlign)],controller:this.c,menus:this.menus,onSaved:this.configSaves,onReset:this.configReset},null),this.isShowCollapse&&o("div",{class:[this.ns.b("collapse-icon"),this.ns.is("collapse",this.collapse)],onClick:()=>{this.c.view.call(Na.TOGGLE_COLLAPSE)}},[o("ion-icon",{name:"menu-collapse"},null)])]}})}});var Kc=Object.defineProperty,Yc=(e,t,a)=>(((e,t,a)=>{t in e?Kc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Xc{constructor(){Yc(this,"component","IBizAppMenuControl")}}const $c=e("l",oe(Wc,(function(e){e.component(Lc.name,Lc),e.component(Wc.name,Wc),Ba(_a.APP_MENU,(()=>new Xc))})));var Jc=Object.defineProperty,Qc=(e,t,a)=>(((e,t,a)=>{t in e?Jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Zc{constructor(){Qc(this,"component","IBizAppMenuIconViewControl")}}function ed(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const td=a({name:"IBizAppMenuIconViewControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){var e;const t=ne(((...e)=>new Ra(...e))),a=B("control-".concat(t.model.controlType.toLowerCase(),"-iconview")),s=n(""),l=n([]);null==(e=t.model.appMenuItems)||e.forEach((e=>{"MENUITEM"===e.itemType&&l.value.push(e.id)}));const r=async(e,a)=>{await t.onClickMenuItem(e,a)},c=e=>t.state.menuItemsState[e.id].visible?o("div",{class:[a.b("item"),a.is("disabled",!e.appFuncId)],title:zt(e.tooltip||e.caption),onClick:t=>{e.appFuncId&&r(e.id,t)}},[o(i("iBizIcon"),{class:a.be("item","icon"),icon:e.sysImage},null),o("span",{class:a.be("item","label")},[e.caption])]):null;return{c:t,ns:a,defaultActive:s,defaultOpens:l,onClick:r,renderGroup:e=>t.state.menuItemsState[e.id].visible?o(i("el-collapse-item"),{class:a.b("group"),name:e.id,title:zt(e.caption)},{default:()=>{var t;return[null==(t=e.appMenuItems)?void 0:t.map((e=>c(e)))]}}):null,renderItem:c}},render(){var e;const{state:t,model:a}=this.c;let n=null;if(t.isCreated&&(null==(e=a.appMenuItems)?void 0:e.length)){let e;n=o(i("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":e=>this.defaultOpens=e},ed(e=a.appMenuItems.map((e=>"MENUITEM"!==e.itemType?null:this.renderGroup(e))))?e:{default:()=>[e]})}return o(i("iBizControlBase"),{class:[this.ns.b()],controller:this.c},ed(n)?n:{default:()=>[n]})}}),ad=e("m",oe(td,(function(e){e.component(td.name,td),Ba("".concat(_a.APP_MENU,"_ICONVIEW"),(()=>new Zc))}))),nd=a({name:"IBizGridFieldColumn",props:{controller:{type:La,required:!0},row:{type:da,required:!0}},setup(e){var t;const a=B("grid-field-column"),s=e.controller.grid.state.zIndex,r=null==(t=e.controller.model.userParam)?void 0:t.columntype,c=ie((async()=>await e.controller.getCustomHtml(e.row))),d=l((()=>e.row.data[e.controller.fieldName])),u=l((()=>e.controller.formatValue(d.value))),p=l((()=>{const{grid:t,fieldName:a}=e.controller;if(!t.percentkeys.includes(a))return"";const n=Number(d.value);if(!Number.isNaN(n)){const{totalResult:e={}}=t.state,o=e[a];if(o&&!Number.isNaN(o))return ibiz.util.text.format("".concat(n/o),"0.##%")}return""})),h=l((()=>!!d.value&&(!e.controller.grid.emptyHiddenUnit||!!u.value))),m=l((()=>ja.toText(e.controller.model,d.value))),v=n(""),b=l((()=>{if("ellipsis"===e.controller.grid.overflowMode&&hi(d.value)&&""!==d.value)return e.controller.codeList?v.value:u.value+(e.controller.model.unitName||"")})),g=n([]);e.controller.codeList&&(g.value=e.controller.codeListItems);se(e.controller.model.appCodeListId,e.controller.context.srfappid,(e=>{e&&(g.value=e)}));return{ns:a,onCellClick:t=>{e.controller.hasAction&&(t.stopPropagation(),e.controller.triggerAction(e.row,t))},onTextClick:t=>{e.controller.isLinkColumn&&(t.stopPropagation(),e.controller.openLinkView(e.row,t))},onInfoTextChange:e=>{v.value=e},onActionClick:(t,a)=>e.controller.onActionClick(t,e.row,a),CustomHtml:c,fieldValue:d,formatValue:u,percent:p,codeListValue:m,tooltip:b,zIndex:s,columnType:r,codeListItems:g,hiddenEmpty:h,findLayoutPanel:()=>{var t;const{controlRenders:a=[]}=e.controller.model;return null==(t=a.find((e=>"LAYOUTPANEL"===e.renderType)))?void 0:t.layoutPanel},renderPanelItemLayout:(t,a)=>{const{context:n,params:s}=e.controller;return o(i("iBizControlShell"),{data:t,modelData:a,context:n,params:s},null)}}},render(){var e;const t=this.controller,a=t.model.deuiactionGroup?o(i("iBizActionToolbar"),{class:this.ns.e("toolbar"),"action-details":t.model.deuiactionGroup.uiactionGroupDetails,"actions-state":this.row.uiActionGroupStates[this.controller.model.codeName],groupLevelKeys:[50,100],actionCallBack:this.onActionClick,zIndex:this.zIndex},null):null;let n=null;const s=this.findLayoutPanel();return n=t.isCustomCode?o("span",{class:this.ns.e("script"),innerHTML:this.CustomHtml},null):s?o(i("iBizControlShell"),{data:this.row.data,modelData:s,context:t.context,params:t.params},null):t.codeList?o(i("iBizCodeList"),{class:this.ns.e("text"),codeListItems:this.codeListItems,codeList:t.codeList,value:this.codeListValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:zt(this.tooltip)},null):"attachment"===this.columnType?o(i("iBizAttachmentColumn"),{data:this.row.data,value:this.fieldValue,controller:this.controller},null):o("span",{class:this.ns.e("text"),title:zt(this.tooltip),onClick:this.onTextClick},[this.formatValue,this.hiddenEmpty&&t.model.unitName,this.percent&&"(".concat(this.percent,")")]),o("div",{class:[this.ns.b(),t.clickable(this.row)&&this.ns.m("clickable"),this.ns.m(this.controller.grid.overflowMode),null==(e=this.controller.model.cellSysCss)?void 0:e.cssName,this.ns.is("has-action",!!t.model.deuiactionGroup)],onClick:this.onCellClick},[t.model.deuiactionGroup?[o("div",{class:this.ns.b("text-container")},[n]),o("div",{class:this.ns.b("toolbar-container")},[a])]:n])}});var od=Object.defineProperty,id=(e,t,a)=>(((e,t,a)=>{t in e?od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sd{constructor(){id(this,"component","IBizGridFieldColumn")}async createController(e,t){const a=new La(e,t);return await a.init(),a}}const ld=e=>{switch(e){case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"svg":case"webp":case"jfif":return"image";case"pdf":return"pdf";default:return"other"}};function rd(e,t){const a=n([]),o=n(""),i=new Map,s=()=>{const e={};return t.model.userParam?(t.model.userParam.appentitytag&&Object.assign(e,{appEntityTag:t.model.userParam.appentitytag}),t.model.userParam.datafieldtag&&Object.assign(e,{dataFieldTag:t.model.userParam.datafieldtag}),e):e},l=e=>{const t=i.get(e.id);t?Object.assign(e,{base64:t}):(async e=>{try{const t=await fetch(e);if(!t.ok)throw new Error("Failed to fetch SVG: ".concat(t.status));const a=await t.blob(),n=new FileReader;return new Promise(((e,t)=>{n.onloadend=()=>{const t=n.result;if(t){const a=t.replace("data:application/octet-stream;base64","data:image/svg+xml;base64");e(a)}},n.onerror=t,n.readAsDataURL(a)}))}catch(e){throw ibiz.log.error(null==e?void 0:e.message),e}})(e.url).then((t=>{Object.assign(e,{base64:t})}))},r=(e,a)=>{const n={};a&&a.folder&&(n.osscat=a.folder);return ibiz.util.file.calcFileUpDownUrl(t.context,t.params,e,n).downloadUrl};return c((()=>e.value),(e=>{a.value=e?yi(e)?JSON.parse(e):e:[]}),{immediate:!0}),c((()=>e.data),(e=>{if(e){const a=ibiz.util.file.calcFileUpDownUrl(t.context,t.params,e,{});o.value=a.uploadUrl}}),{immediate:!0,deep:!0}),c(a,(a=>{(null==a?void 0:a.length)&&a.forEach((a=>{const n=r(e.data,a);Object.assign(a,{url:a.url||n.replace("%fileId%",a.id)}),ibiz.config.common.enableDownloadTicket?ibiz.util.file.getDownloadTicket(t.context,t.params,e.data,{fileId:a.id},s()).then((e=>{e&&e.ticket&&(a.url=n.replace("%fileId%",e.ticket),"svg"===a.name.split(".").pop()&&l(a))})):"svg"===a.name.split(".").pop()&&l(a)}))}),{immediate:!0}),{files:a,uploadUrl:o,onDownload:a=>{const n=r(e.data,a),o=a.url||n.replace("%fileId%",a.id);ibiz.util.file.fileDownload(o,a.name,{context:t.context,params:t.params,data:e.data,file:{fileId:a.id,...a},extraParams:{},downloadTicketParams:s()})},getDownloadUrl:r,getDownloadTicketParams:s}}const cd=a({name:"IBizAttachmentColumn",props:{value:{type:[String,Array],required:!0},data:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("attachment-column"),{getDownloadUrl:a,files:i,onDownload:s,getDownloadTicketParams:l}=rd(e,e.controller),r=n(!0),c=()=>{r.value=!1},d=async e=>{const a=ibiz.overlay.createModal((e=>g(o("div",{class:t.e("image-preview")},[o("div",{class:t.em("image-preview","container")},[o("img",{alt:"--",src:e.base64||e.url,onLoad:c},null)])]),[[y("loading"),r.value]]))(e),void 0,{modalClass:t.e("image-preview"),width:700,height:"auto"});a.present(),await a.onWillDismiss()};return{ns:t,files:i,handleFileClick:t=>{var n,o;const i=null!=(o=null==(n=t.name.split(".").pop())?void 0:n.toLowerCase())?o:"";switch(ld(i)){case"image":d(t);break;case"pdf":(async t=>{const n=a(e.data,t);let o=t.url||n.replace("%fileId%",t.id);if(ibiz.config.common.enableDownloadTicket){const a=await ibiz.util.file.getDownloadTicket(e.controller.context,e.controller.params,e.data,{fileId:t.id},l());a&&a.ticket&&(o=n.replace("%fileId%",a.ticket))}const i=await ibiz.net.request(o,{method:"get",responseType:"blob",baseURL:""});if(i.data){const e=new Blob([i.data],{type:"application/pdf"}),a=URL.createObjectURL(e),n=document.createElement("a");n.href=a,n.target="_blank",n.style.cursor="pointer",n.textContent=t.name||"";const o=function(){n.removeEventListener("click",o),document.body.removeChild(n)};n.addEventListener("click",o),document.body.appendChild(n),n.click()}})(t);break;default:s(t)}}}},render(){return o("div",{class:this.ns.b()},[this.files.map((e=>{var t,a;const n=null!=(a=null==(t=e.name.split(".").pop())?void 0:t.toLowerCase())?a:"",i=ld(n);return o("div",{class:this.ns.e("file"),title:e.name,onClick:()=>this.handleFileClick(e)},["image"===i?o("img",{alt:"",class:this.ns.em("file","img"),src:e.base64||e.url},null):e.name])}))])}}),dd=e("s",oe(nd,(function(e){e.component(nd.name,nd),e.component(cd.name,cd),Va("DEFGRIDCOLUMN",(()=>new sd)),Va("DEFTREEGRIDCOLUMN",(()=>new sd))}))),ud=a({name:"IBizGridUAColumn",props:{controller:{type:Fa,required:!0},row:{type:da,required:!0}},setup:e=>({ns:B("grid-ua-column"),onStopPropagation:e=>{e.stopPropagation()},onActionClick:async(t,a)=>{await e.controller.onActionClick(t,e.row,a)}}),render(){var e,t,a;return o("div",{class:[this.ns.b(),null==(e=this.controller.model.cellSysCss)?void 0:e.cssName]},[(null==(a=null==(t=this.controller.model.deuiactionGroup)?void 0:t.uiactionGroupDetails)?void 0:a.length)&&o(i("iBizActionToolbar"),{onDblclick:this.onStopPropagation,onClick:this.onStopPropagation,"action-details":this.controller.model.deuiactionGroup.uiactionGroupDetails,"actions-state":this.row.uaColStates[this.controller.model.codeName],onActionClick:this.onActionClick},null)])}});var pd=Object.defineProperty,hd=(e,t,a)=>(((e,t,a)=>{t in e?pd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class md{constructor(){hd(this,"component","IBizGridUAColumn")}async createController(e,t){const a=new Fa(e,t);return await a.init(),a}}const vd=e("t",oe(ud,(function(e){e.component(ud.name,ud),Va("UAGRIDCOLUMN",(()=>new md))})));function bd(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.fieldName].disabled)),o=l((()=>e.row.editColStates[a.fieldName].readonly)),i=l((()=>e.controller.grid.state.rowEditOpen)),s=l((()=>o.value||!i.value)),r=l((()=>i.value&&n.value)),c=l((()=>i.value));return{gridEditItemProps:u({stopPropagation:c}),editorProps:u({disabled:r,readonly:s,onBlur:()=>{"cell-blur"===a.grid.editSaveMode&&a.grid.save(e.row.data)}})}}const gd=a({name:"IBizGridFieldEditColumn",props:{controller:{type:Ua,required:!0},row:{type:da,required:!0},attrs:{type:Object,required:!1}},setup(e){const t=B("grid-field-edit-column"),a=n(),o=e.controller,{gridEditItemProps:i,editorProps:s}=(()=>{switch(o.grid.editShowMode){case"cell":return function(e,t){const a=e.controller,o=l((()=>e.row.editColStates[a.fieldName].disabled)),i=l((()=>e.row.editColStates[a.fieldName].readonly)),s=l((()=>!!e.row.errors[a.fieldName])),r=l((()=>e.row.editColStates[a.fieldName].editable)),c=t=>{e.row.editColStates[a.fieldName].editable=t},d=l((()=>!o.value&&!i.value&&!s.value)),h=l((()=>s.value||d.value&&r.value)),m=l((()=>!h.value)),v=l((()=>!s.value)),b=l((()=>d.value&&!r.value)),g=l((()=>d.value||h.value));let f,w=Lt;const y=n(!1);return w=Bt(window,"keyup",(e=>{"Escape"===e.code&&r.value&&(c(!1),y.value=!0)})),p((()=>{w!==Lt&&w()})),{gridEditItemProps:u({showEditMask:b,stopPropagation:g,isEscOut:y,onMaskClick:()=>{c(!0),f=le(t,(async e=>{c(!1),f.stop()}))}}),editorProps:u({autoFocus:v,disabled:!1,readonly:m,onBlur:()=>{ibiz.log.debug("".concat(a.fieldName,"属性编辑器blur事件")),c(!1),"cell-blur"===a.grid.editSaveMode&&a.grid.save(e.row.data)},onFocus:()=>{f&&f.stop(),ibiz.log.debug("".concat(a.fieldName,"属性编辑器focus事件"))}})}}(e,a);case"row":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.fieldName].disabled)),o=l((()=>e.row.editColStates[a.fieldName].readonly)),i=l((()=>e.row.editColStates[a.fieldName].editable)),s=l((()=>o.value||!i.value)),r=l((()=>i.value&&n.value)),c=l((()=>i.value));return{gridEditItemProps:u({stopPropagation:c}),editorProps:u({disabled:r,readonly:s})}}(e);case"all":return bd(e);default:throw new _t(ibiz.i18n.t("control.common.noSupportItem",{name:o.grid.editShowMode}))}})(),r=n(void 0),c=l((()=>{if(s.readonly){if(ui(r.value)){const t=e.row.data[o.fieldName];return o.formatValue(t)}return r.value}}));return{ns:t,c:o,componentRef:a,tooltip:c,rowDataChange:async(t,a,n=!1)=>{ibiz.log.debug("".concat(o.fieldName,"值变更"),t);const{isEscOut:s}=i;if(s){i.isEscOut=!1;const t=e.row.data,a=t[o.fieldName];return t[o.fieldName]=null,void b((()=>{t[o.fieldName]=a}))}await o.setRowValue(e.row,t,a,n)},onInfoTextChange:e=>{r.value=e},gridEditItemProps:i,editorProps:s}},render(){var e;const t=this.row.data[this.c.fieldName];return o(i("iBizGridEditItem"),{ref:"componentRef",required:!this.c.editItem.allowEmpty,error:this.row.errors[this.c.fieldName],overflowMode:this.c.grid.overflowMode,class:[this.ns,this.ns.m(this.c.grid.overflowMode),null==(e=this.controller.model.cellSysCss)?void 0:e.cssName],...this.gridEditItemProps},{default:()=>[this.c.editorProvider&&r(i(this.c.editorProvider.gridEditor),{class:this.ns.e("editor"),value:t,data:this.row.data,controller:this.c.editor,overflowMode:this.c.grid.overflowMode,onChange:this.rowDataChange,onInfoTextChange:this.onInfoTextChange,title:this.tooltip,...this.editorProps,...this.attrs})]})}});var fd=Object.defineProperty,wd=(e,t,a)=>(((e,t,a)=>{t in e?fd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yd{constructor(){wd(this,"component","IBizGridFieldEditColumn")}async createController(e,t){const a=new Ua(e,t);return await a.init(),a}}const Cd=a({name:"IBizGridEditItem",props:{required:{type:Boolean,default:!1},showEditMask:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1},error:{type:String}},emits:{maskClick:e=>!0},setup(e,{emit:t}){const a=B("grid-edit-item"),n=l((()=>e.error));return{ns:a,tooltipContent:l((()=>e.error)),showTooltip:n,onClick:a=>{e.stopPropagation&&a.stopPropagation(),e.showEditMask&&t("maskClick",a)},onStopPropagation:t=>{e.stopPropagation&&t.stopPropagation()}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("error",!!this.error),this.showEditMask&&this.ns.m("show-mask")],onDblclick:this.onStopPropagation,onClick:this.onClick},[o(i("el-tooltip"),{content:this.tooltipContent,disabled:!this.showTooltip,transfer:!0,"popper-class":this.ns.e("tooltip-popper"),placement:"top"},{default:()=>{var e,t;return[o("div",{class:this.ns.e("tooltip")},[null==(t=(e=this.$slots).default)?void 0:t.call(e)])]}})])}}),Id=e("v",oe(gd,(function(e){e.component(gd.name,gd),e.component(Cd.name,Cd),Va("DEFGRIDCOLUMN_EDIT",(()=>new yd))}))),Dd=a({name:"IBizGridGroupColumn",props:{controller:{type:Ha,required:!0},row:{type:da,required:!0}},setup:()=>({ns:B("grid-group-column")}),render(){return o("div",{class:[this.ns.b()]},null)}});var Ed=Object.defineProperty,Sd=(e,t,a)=>(((e,t,a)=>{t in e?Ed(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class xd{constructor(){Sd(this,"component","")}async createController(e,t){const a=new Ha(e,t);return await a.init(),a}}const Pd=e("w",oe(Dd,(()=>{Va("GROUPGRIDCOLUMN",(()=>new xd))})));const kd=a({name:"IBizAutoGridFieldEditColumn",props:{controller:{type:Ua,required:!0},row:{type:da,required:!0},attrs:{type:Object,required:!1}},setup(e){const t=B("grid-field-edit-column"),a=n(),o=e.controller,{gridEditItemProps:i,editorProps:s}=(()=>{switch(o.grid.editShowMode){case"row":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.fieldName].disabled)),o=l((()=>e.row.editColStates[a.fieldName].readonly)),i=l((()=>e.row.editColStates[a.fieldName].editable)),s=l((()=>o.value||!i.value)),r=l((()=>i.value&&n.value));return{gridEditItemProps:u({}),editorProps:u({disabled:r,readonly:s,onClick:e=>{i.value&&e.stopPropagation()}})}}(e);case"all":return bd(e);default:throw new _t(ibiz.i18n.t("control.common.noSupportItem",{name:o.grid.editShowMode}))}})(),r=n(void 0),c=l((()=>{if(s.readonly){if(ui(r.value)){const t=e.row.data[o.fieldName];return o.formatValue(t)}return r.value}}));return{c:o,ns:t,componentRef:a,tooltip:c,rowDataChange:async(t,a,n=!1)=>{ibiz.log.debug("".concat(o.fieldName,"值变更"),t),await o.setRowValue(e.row,t,a,n)},onInfoTextChange:e=>{r.value=e},gridEditItemProps:i,editorProps:s}},render(){var e;const t=this.row.data[this.c.fieldName];return o(i("iBizGridEditItem"),{ref:"componentRef",required:!this.c.editItem.allowEmpty,error:this.row.errors[this.c.fieldName],overflowMode:this.c.grid.overflowMode,class:[this.ns.b(),this.ns.m("auto"),this.ns.m(this.c.grid.overflowMode),null==(e=this.controller.model.cellSysCss)?void 0:e.cssName],...this.gridEditItemProps},{default:()=>[this.c.editorProvider&&r(i(this.c.editorProvider.gridEditor),{class:this.ns.e("editor"),value:t,data:this.row.data,controller:this.c.editor,overflowMode:this.c.grid.overflowMode,onChange:this.rowDataChange,onInfoTextChange:this.onInfoTextChange,title:this.tooltip,...this.editorProps,...this.attrs})]})}});var Td=Object.defineProperty,zd=(e,t,a)=>(((e,t,a)=>{t in e?Td(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ad{constructor(){zd(this,"component","IBizAutoGridFieldEditColumn")}async createController(e,t){const a=new Ua(e,t);return await a.init(),a}}const Od=e("x",oe(kd,(function(e){e.component(kd.name,kd),Va("AUTO_DEFGRIDCOLUMN_EDIT",(()=>new Ad))})));function Md(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Nd=a({name:"IBizGridColumnHeader",props:{controller:{type:Object,required:!0},column:{type:Object,required:!0}},setup(e){const t=B("grid-column-header"),a=e.controller,o=n(),i=n(!1),s=n(),r=l((()=>{var e,t;const n=null==(t=null==(e=a.model.filterEditor)?void 0:e.id)?void 0:t.toLowerCase();return n?a.grid.state.columnFilter[n]:void 0}));let c;const d=()=>{i.value=!1,a.handleColumnScreen(s.value)};return p((()=>{null==c||c.stop()})),{c:a,ns:t,visible:i,content:o,curValue:s,filterValue:r,onShow:()=>{if(c)return c.proceed();c=le(o,(e=>{const t=[];jt(e).forEach((e=>{e&&e.classList&&t.push(...e.classList)})),t.includes("el-popper")||(i.value=!1)}))},onHide:()=>{s.value=r.value,null==c||c.pause()},onReset:()=>{s.value=void 0,d()},onClick:e=>{e.stopPropagation(),i.value=!0},onScreen:d,onFilterChange:(e,t)=>{s.value=e}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("caption")},[o(i("iBizIcon"),{class:this.ns.em("caption","icon"),icon:this.c.model.sysImage},null),o("span",{class:this.ns.em("caption","label")},[this.c.model.caption])]),this.c.filterEditorProvider&&o(i("el-popover"),{width:220,onShow:this.onShow,onHide:this.onHide,visible:this.visible,"popper-class":this.ns.e("popover")},{reference:()=>o("ion-icon",{name:"funnel",title:ibiz.i18n.t("app.search"),class:[this.ns.em("filter","icon"),this.ns.is("active",!!this.filterValue)],onClick:this.onClick},null),default:()=>{let e,t;return o("div",{ref:"content",class:this.ns.em("popover","content")},[o("div",{class:this.ns.em("popover","editor")},[r(i(this.c.filterEditorProvider.gridEditor),{data:{},autoFocus:!0,value:this.curValue,onChange:this.onFilterChange,controller:this.c.filterEditor})]),o("div",{class:this.ns.em("popover","bottom")},[o(i("el-button"),{type:"text",onClick:this.onScreen},Md(e=ibiz.i18n.t("app.search"))?e:{default:()=>[e]}),o(i("el-button"),{type:"text",onClick:this.onReset},Md(t=ibiz.i18n.t("app.reset"))?t:{default:()=>[t]})])])}})])}}),Bd=e("y",oe(Nd,(function(e){e.component(Nd.name,Nd)})));function _d(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Rd=a({name:"IBizRowEditPopover",props:{show:{type:Boolean,default:!1}},emits:{confirm:()=>!0,cancel:()=>!0},setup(e,{emit:t}){const a=B("row-edit-popover"),o=()=>{t("cancel")},i=n(document);return re(i,"keydown",(t=>{e.show&&"Escape"===t.key&&o()}),{capture:!0}),{ns:a,onCancel:o,onConfirm:()=>{t("confirm")}}},render(){let e,t;return o("div",{class:[this.ns.b(),this.ns.is("hidden",!this.show)]},[o(i("el-button"),{onClick:this.onConfirm},_d(e=ibiz.i18n.t("control.common.determine"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.onCancel},_d(t=ibiz.i18n.t("app.cancel"))?t:{default:()=>[t]})])}});const Ld=a({name:"IBizVirtualizedTableControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},rowEditOpen:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e){const t=ne(((...e)=>new Ga(...e))),a=B("control-virtualized-table"),{zIndex:r}=G();t.state.zIndex=r.increment();const{tableRef:d,tableData:u,sortValue:m,columnModel:v,isSelected:b,isAllSelected:g,handleRowClick:f,handleSortClick:w,handleSelectAll:y,calcColumnWidth:C,handleDbRowClick:I,handleHeaderCellClick:D,handleSelectionChange:E}=function(e,t){const a=()=>{t.data&&(e.state.items=t.data,e.state.rows=e.state.items.map((t=>new da(new ua(t),e))),e.calcAggResult(e.state.items),e.calcTotalData())};e.evt.on("onCreated",(async()=>{e.state.isSimple&&a()})),c((()=>t.data),(()=>{e.state.isSimple&&a()}),{deep:!0});const o=n(),i=l((()=>e.state.rows.map((e=>e.data)))),s=l((()=>{var t;const[a=e.model.minorSortAppDEFieldId,n=(null==(t=e.model.minorSortDir)?void 0:t.toLowerCase())]=e.state.sortQuery.split(",");return{prop:a,order:n}})),r=l((()=>{const{columnStates:t,singleSelect:a}=e.state,n=[];a||n.push({key:e.id,width:55,align:"center",type:"selection",widthUnit:"PX",hidden:!1,class:"is-selection",headerClass:"is-selection"});const{degridColumns:o}=e.model;return null==o||o.forEach((e=>{const{align:a,width:o,caption:i,codeName:s,widthUnit:l,columnType:r,cellSysCss:c,enableSort:d}=e,u=t.find((e=>e.key===s));n.push({key:s,title:i,width:o||160,hidden:!0===(null==u?void 0:u.hidden),enableSort:!!d,class:null==c?void 0:c.cssName,widthUnit:l||"PX",type:r.toLowerCase(),headerClass:null==c?void 0:c.cssName,align:(null==a?void 0:a.toLowerCase())||"center"})})),n}));function d(t,a){const n=e.fieldColumns[t].model.appDEFieldId;"".concat(n,",").concat(a)!==e.state.sortQuery&&(e.setSort(n,a),e.load({isInitialLoad:2===e.model.pagingMode||3===e.model.pagingMode}))}return{tableRef:o,tableData:i,sortValue:s,columnModel:r,isSelected:function(t){return!!e.state.selectedData.find((e=>e.srfkey===t.srfkey))},isAllSelected:function(){return i.value.length>0&&i.value.every((t=>!!e.state.selectedData.find((e=>t.srfkey===e.srfkey))))},handleRowClick:async function(t,a){a.srfuf!==qa.CREATE&&await e.onRowClick(a)},handleSortClick:function(e,t,a){e.stopPropagation();const{prop:n,order:o}=s.value,{key:i}=t;n===i&&a===o&&(a=void 0),d(i,a)},handleSelectAll:function(t){e.setSelection(t?[...e.state.items]:[])},calcColumnWidth:function(e,t){const a=[...e],n=r.value.filter((e=>!e.hidden)),o=n.reduce(((e,t)=>e+t.width),0);if(t>o&&n.length){let e=n.filter((e=>"STAR"===e.widthUnit));e.length||(e=[n[n.length-1]]);const a=(t-o-6)/e.length;e.forEach((e=>{e.width+=a}))}return a},handleDbRowClick:async function(t,a){a.srfuf!==qa.CREATE&&await e.onDbRowClick(a)},handleHeaderCellClick:function(e,t){const{enableSort:a,key:n}=t;if(a){const{prop:e,order:t}=s.value;let a="asc";e===n&&(a=function(e){const t=["asc","desc",void 0];if(void 0===e)return t[0];const a=t.indexOf(e||null);return t[a>t.length-2?0:a+1]}(t)),d(n,a)}},handleSelectionChange:function(t){const a=[...e.state.selectedData],n=a.findIndex((e=>e.srfkey===t.srfkey));-1===n?a.push(t):a.splice(n,1),e.setSelection([...a])}}}(t,e),{onPageChange:S,onPageRefresh:x,onPageSizeChange:P}=Ws(t);p((()=>{r.decrement()}));return{c:t,ns:a,tableRef:d,tableData:u,columnModel:v,onPageChange:S,onPageRefresh:x,onPageSizeChange:P,renderNoData:()=>{var e;const{isLoaded:n}=t.state;if(n){const n=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_quicktoolbar")));if(n)return o(i("iBizToolbarControl"),{modelData:n,context:t.context,params:t.params,class:a.e("quick-toolbar")},null);const r={};return ce(t)&&Object.assign(r,{customRender:()=>o(de,{controller:t},null)}),o(i("iBizNoData"),{text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes,hideNoDataImage:t.state.hideNoDataImage},"function"==typeof(l=r)||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?r:{default:()=>[r]})}var l;return o("div",null,null)},calcRowClass:e=>{const{rowData:t}=e;return"".concat(a.is("selected",t&&b(t)))},renderBodyCell:e=>{const{column:n,rowData:s}=e,{type:l,key:r,align:c}=n;if("selection"===l)return o("div",{class:[a.e("cell"),a.e("body-cell"),a.em("cell",c||"left")],onClick:e=>e.stopPropagation()},[o(i("el-checkbox"),{onChange:()=>E(s),modelValue:b(s)},null)]);const d=t.columns[r],{columnType:u}=d.model,p=t.findRowState(s);return o("div",{class:[a.e("cell"),a.e("body-cell"),a.em("cell",c||"left")]},[o(i("DEFGRIDCOLUMN"===u?"iBizGridFieldColumn":"iBizGridUAColumn"),{controller:d,row:p},null)])},handleRowClick:f,calcColumnWidth:C,handleDbRowClick:I,renderHeaderCell:e=>{const{column:n}=e,{type:s,enableSort:l,key:r,title:c,align:d}=n,{prop:u,order:p}=m.value;return"selection"===s?o("div",{class:[a.e("cell"),a.e("header-cell"),a.em("cell",d||"left")]},[o(i("el-checkbox"),{modelValue:g(),onChange:e=>y(e),indeterminate:t.state.selectedData.length>0&&!g()},null)]):o("div",{class:[a.e("cell"),a.e("header-cell"),a.is("sortable",!!l),a.em("cell",d||"left")],onClick:e=>D(e,n)},[o("span",{class:a.em("header-cell","caption")},[c]),l&&o("span",{class:a.e("caret-wrapper")},[o("i",{class:[a.em("caret-wrapper","asc"),a.em("caret-wrapper","sort-caret"),a.is("active",u===r&&"asc"===p)],onClick:e=>w(e,n,"asc")},null),o("i",{class:[a.em("caret-wrapper","desc"),a.em("caret-wrapper","sort-caret"),a.is("active",u===r&&"desc"===p)],onClick:e=>w(e,n,"desc")},null)])])},renderBatchToolBar:()=>{var e;const n=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_batchtoolbar")));if(n&&!t.state.singleSelect&&t.state.selectedData.length)return o("div",{class:[a.e("batch-toolbar"),a.is("show",t.state.selectedData.length>0)]},[o("div",{class:a.em("batch-toolbar","content")},[o("div",{class:a.em("batch-toolbar","text")},[ibiz.i18n.t("control.common.itemsSelected",{length:t.state.selectedData.length})]),o("div",{class:a.em("batch-toolbar","separator")},[h("|")]),o(i("iBizToolbarControl"),{modelData:n,context:t.context,params:t.params,class:a.b("batch-toolbar-items")},null)])])}}},render(){if(this.c.state.isCreated)return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b(),this.ns.m(this.c.overflowMode),this.ns.is("dynamic-grid",this.c.state.isAutoGrid),this.ns.is("show-header",!this.c.state.hideHeader),this.ns.is("enable-page",this.c.state.enablePagingBar),this.ns.is("enable-group",this.c.model.enableGroup),this.ns.is("single-select",this.c.state.singleSelect),this.ns.is("empty",0===this.c.state.items.length),this.ns.is("enable-customized",this.c.model.enableCustomized)]},{default:()=>[o(i("el-auto-resizer"),null,{default:({height:e,width:t})=>{const a=this.calcColumnWidth(this.columnModel,t);return g(o(i("el-table-v2"),{fixed:!0,ref:"tableRef",width:t,height:e,"row-height":54,columns:a,"header-height":54,hScrollbarSize:4,data:this.tableData,class:this.ns.e("table"),"row-class":this.calcRowClass,"row-event-handlers":{onClick:({event:e,rowData:t})=>this.handleRowClick(e,t),onDblclick:({event:e,rowData:t})=>this.handleDbRowClick(e,t)}},{empty:this.renderNoData,cell:this.renderBodyCell,"header-cell":this.renderHeaderCell}),[[y("scrollbarSize"),4]])}}),this.c.model.enableCustomized&&!this.c.state.hideHeader&&o("div",{class:this.ns.e("setting-box")},[o(i("iBizGridSetting"),{controller:this.c,columnStates:this.c.state.columnStates},null)]),this.renderBatchToolBar()]})]})}});var jd=Object.defineProperty,Vd=(e,t,a)=>(((e,t,a)=>{t in e?jd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Fd{constructor(){Vd(this,"component","IBizVirtualizedTableControl")}}const Ud=oe(Ld,(e=>{e.component(Ld.name,Ld),Ba("GRID_VIRTUALIZED_TABLE",(()=>new Fd))}));function Hd(e){const t=n();let a=!1,o=!1,i=Lt,s=Lt,r=Lt;if(e.state.isAutoGrid){"row"===e.editShowMode&&(i=Bt(window,"click",(async t=>{const a=[];if(jt(t).forEach((e=>{e&&e.classList&&a.push(...e.classList)})),a.includes("el-popper")||a.includes("el-scrollbar")||a.includes("el-table__row"))return;const n=e.state.rows.find((e=>e.showRowEdit));n&&await e.switchRowEdit(n)})));const a=setInterval((()=>{var n;const o=null==(n=t.value)?void 0:n.$el;if(o){clearInterval(a);const t=["tbody select","tbody textarea",'tbody input:not([type="checkbox"])'],n=async()=>{if("row"===e.editShowMode){const t=e.state.rows.find((e=>e.showRowEdit));t&&await e.switchRowEdit(t)}},{cleanup:i}=rl(o,t,n);s=i}}),300)}const d=[];Vt(e.model,(e=>{d.push(e)}),{childrenFields:["degridColumns"]}),e.evt.on("onToggleRowExpansion",(e=>{const{row:a,expand:n}=e;if(t.value)if(t.value.lazy){const{store:e}=t.value,{treeData:o}=t.value.store.states,i=o.value[a.srfkey];i&&i.expanded!==n&&e.loadOrToggle(a)}else t.value.toggleRowExpansion(a,n)}));const u=l((()=>{const t=[];return Vt({children:e.state.columnStates},(a=>{if(!a.uaColumn&&!a.hidden){const n=e.columns[a.key].model;n.enableRowEdit&&t.push(n)}})),t})),p=a=>{var n,o;const i=t.value.$el,s=document.activeElement;if("Tab"===a.key&&i.contains(s)){a.preventDefault();const t=[];jt(a).forEach((e=>{e&&e.classList&&t.push(...e.classList)}));const l=null==(n=t.filter((e=>e.startsWith("id-")))[0])?void 0:n.substring(3),r=null==(o=t.filter((e=>e.startsWith("defgridcolumn-")))[0])?void 0:o.substring(14),c=u.value.findIndex((e=>e.id.toLowerCase()===(null==r?void 0:r.toLowerCase()))),d=e.state.rows.findIndex((e=>l&&e.data.srfkey===l)),p=-1!==d?e.state.rows[d]:void 0,h=-1!==d?e.state.rows[d+1]:e.state.rows.find((e=>e.data.srfuf===qa.UPDATE));if(p)(h||c<u.value.length-1)&&Object.keys(p.editColStates).forEach((e=>{p.editColStates[e].editable=!1})),c<u.value.length-1?p.editColStates[u.value[c+1].id.toLowerCase()].editable=!0:h&&(h.editColStates[u.value[0].id.toLowerCase()].editable=!0);else{const e=Array.from(i.querySelectorAll('tbody select, tbody textarea, tbody input:not([type="checkbox"])')),t=e.indexOf(s),a=e[t+1];a?a.focus():h&&(h.editColStates[u.value[0].id.toLowerCase()].editable=!0)}}};function h(t){const a=[...e.state.selectedData],n=a.findIndex((e=>e.srfkey===t.srfkey));-1!==n?(a.splice(n,1),e.setSelection(a)):e.setSelection([...a,t])}c((()=>t.value),(t=>{const{enableRowEdit:a}=e.model;t&&a&&"cell"===e.editShowMode&&(r=Bt(window,"keydown",p,{capture:!0}))}));let m=null;function v(t){var a;null==(a=window.getSelection())||a.removeAllRanges();const n=e.findRowStateIndex(t),o=[...e.state.selectedData],i=o.includes(t);if(null!==m){const t=Math.min(m,n),a=Math.max(m,n);if(i)for(let n=t;n<=a;n++){const t=o.indexOf(e.state.items[n]);-1!==t&&o.splice(t,1)}else for(let n=t;n<=a;n++)o.includes(e.state.items[n])||o.push(e.state.items[n]);e.setSelection(o)}else e.setSelection([t]);m=n}let g=!1;const f=l((()=>{const a=[],n=e.state.selectedData.map((e=>e.srfkey));return t.value&&Vt({children:t.value.store.states.data.value},(e=>{n.includes(e.srfkey)&&a.push(e)})),a}));return c([()=>t.value,()=>e.state.isLoaded,()=>e.state.selectedData],(([t,n,o])=>{n&&t&&(a=!0,setTimeout((()=>{e.state.singleSelect?t.setCurrentRow(f.value[0]):t.store.states.selection.value=f.value,a=!1})))})),c((()=>e.state.sortQuery),(a=>{var n,i;if(a){const i=e.state.sortQuery.split(",")[0],s=e.state.sortQuery.split(",")[1],l=null==(n=e.model.degridColumns)?void 0:n.find((e=>{var t;return(null==(t=e.codeName)?void 0:t.toLowerCase())===i.toLowerCase()}));if(l&&s){const n="desc"===s?"descending":"ascending",i=()=>{t.value?b((()=>{a===e.state.sortQuery&&(o=!0,t.value.sort(l.codeName,n))})):setTimeout(i,500)};i()}}else null==(i=t.value)||i.clearSort()})),{tableRef:t,onRowClick:async function(a,n,o){var i;if(a.isGroupRow)return void(null==(i=t.value)||i.store.loadOrToggle(a));if(!o.shiftKey){const t=e.findRowStateIndex(a),n=e.state.selectedData.includes(a);m=n?null:t}if(e.state.isAutoGrid)return void await async function(t,a,n){if(t.srfuf!==qa.CREATE){if(n.ctrlKey&&!e.state.singleSelect)return h(t);if(n.shiftKey&&!e.state.singleSelect)return v(t);if("row"===e.editShowMode&&e.allowRowEdit){const a=e.findRowState(t);a&&await e.switchRowEdit(a)}else await e.onRowClick(t)}else if("row"===e.editShowMode&&!t.isGroupRow){const a=e.findRowState(t);a&&await e.switchRowEdit(a)}}(a,0,o);if(a.srfuf===qa.CREATE||g)return;if(o.ctrlKey&&!e.state.singleSelect)return h(a);if(o.shiftKey&&!e.state.singleSelect)return v(a);const s=o.target,{classList:l}=s.parentElement||{};if(l&&l.contains("el-table-column--selection"))t.value.toggleRowSelection(a);else{if("row"===e.editShowMode&&e.model.enableRowEdit){const t=e.findRowState(a);t&&!0!==t.showRowEdit&&await e.switchRowEdit(t,!0)}else await e.onRowClick(a);g=!0,setTimeout((()=>{g=!1}),200)}},onDbRowClick:function(t){t.srfuf===qa.CREATE||t.isGroupRow||e.onDbRowClick(t)},onSelectionChange:function(t){a||e.state.isLoading||e.setSelection(t)},onSortChange:function(t){if(o)return void(o=!1);const{prop:a,order:n}=t,i=e.fieldColumns[a].model.appDEFieldId;let s;if("ascending"===n?s="asc":"descending"===n&&(s="desc"),"".concat(i,",").concat(s)!==e.state.sortQuery){if("DESIGN"===e.runMode)return e.state.items=Ei(e.state.items,[e=>{var t;return(null==(t=null==e?void 0:e[i||""])?void 0:t.length)||0}],[s||"asc"]),void(e.state.rows=e.state.items.map((t=>new da(new ua(t),e))));e.setSort(i,s),"LOCAL"!==e.model.sortMode&&e.load({isInitialLoad:2===e.model.pagingMode||3===e.model.pagingMode})}},handleRowClassName:function({row:t}){let a="";e.state.selectedData.length>0&&e.state.selectedData.forEach((e=>{e!==t&&e.srfkey!==t.srfkey||(a="current-row")}));const n=e.findRowState(t);return(null==n?void 0:n.showRowEdit)&&(a+=" editing-row"),t.srfkey&&(a+=" id-".concat(t.srfkey)),e.enableRowEditOrder&&(a+=" enable-order"),a},handleHeaderCellClassName:function({_row:e,column:t,_rowIndex:a,_columnIndex:n}){const o=d.find((e=>e.codeName===t.property));return o&&o.headerSysCss&&o.headerSysCss.cssName?o.headerSysCss.cssName:""},cleanClick:i,cleanEnter:s,cleanTab:r}}function qd(e){return{onPageChange:function(t){t&&t!==e.state.curPage&&(e.state.curPage=t,e.load())},onPageSizeChange:function(t){t&&t!==e.state.size&&(e.state.size=t,1===e.state.curPage&&e.load())},onPageRefresh:function(){e.load()}}}function Gd(e,t,a){const n=()=>{if(!t.data)return;const a=t.data.map((e=>new ua(e)));e.state.items=a,"DESIGN"===e.runMode&&(e.state.simpleData=a,e.state.total=t.data.length,e.state.curPage=1,e.state.items=Ci(e.state.simpleData,e.state.size)[e.state.curPage-1]||[]),e.afterLoad({isInitialLoad:!0},e.state.items)},o=l((()=>{var t;const a=Object.values(e.fieldColumns).find((t=>t.model.appDEFieldId===e.model.minorSortAppDEFieldId));return{prop:null==a?void 0:a.model.codeName,order:"desc"===(null==(t=e.model.minorSortDir)?void 0:t.toLowerCase())?"descending":"ascending"}}));e.evt.on("onCreated",(async()=>{t.isSimple&&(n(),e.state.isLoaded=!0)})),c((()=>t.data),(()=>{t.isSimple&&n()}),{deep:!0});const i=l((()=>{const t=e.state;if(e.state.enableGroup){const a=e.controlParams.grouprowmode,n=[];return t.groups.forEach((e=>{if(e.children.length)if("NEWROW"===a)n.push({...e,srfkey:e.key,tempsrfkey:e.key,isGroupRow:!0});else{const t=[...e.children],a=t.shift();n.push({tempsrfkey:(null==a?void 0:a.tempsrfkey)||e.caption,srfkey:(null==a?void 0:a.srfkey)||e.caption,isGroupData:!0,caption:e.caption,first:a,children:t})}})),n}const{rowspankeys:a=[]}=e.controlParams;return a.length>0?function(e,t){const a=[],n=e[0]||"",o=t.filter((e=>(e[n]||a.push(e),e[n])));return o.sort(((t,a)=>{for(const n of e)if(t[n]!==a[n])return t[n]>a[n]?1:-1;return 0})),o.push(...a),o}(a,t.rows.map((e=>e.data))):t.rows.map((e=>e.data))})),s=t=>{const a={...t},n=[];return(t.degridColumns||[]).forEach((t=>{var a,o;if("GROUPGRIDCOLUMN"===t.columnType){const e=s(t);e.degridColumns&&e.degridColumns.length&&n.push(e)}else{const i=e.state.columnStates.find((e=>e.key===t.codeName));if(i&&!i.hidden){const t=(null==(a=e.fieldColumns[i.key])?void 0:a.model)||(null==(o=e.uaColumns[i.key])?void 0:o.model);t&&n.push(t)}}})),a.degridColumns=n,a},r=l((()=>{const t=[];if(e.isMultistageHeader){return(e.model.degridColumns||[]).forEach((a=>{var n,o;if("GROUPGRIDCOLUMN"===a.columnType){const e=s(a);e.degridColumns&&e.degridColumns.length&&t.push(e)}else{const i=e.state.columnStates.find((e=>e.key===a.codeName));if(i&&!i.hidden){const a=(null==(n=e.fieldColumns[i.key])?void 0:n.model)||(null==(o=e.uaColumns[i.key])?void 0:o.model);a&&t.push(a)}}})),t}return e.state.columnStates.forEach((a=>{var n,o;if(a.hidden)return;const i=(null==(n=e.fieldColumns[a.key])?void 0:n.model)||(null==(o=e.uaColumns[a.key])?void 0:o.model);i&&t.push(i)})),t}));return{tableData:i,renderColumns:r,defaultSort:o,summaryMethod:({columns:t})=>t.map(((t,a)=>0===a?e.aggTitle:e.state.aggResult[t.property])),spanMethod:({row:t,column:n,rowIndex:o,columnIndex:s})=>{var l;const c=null==(l=e.model.controlAttributes)?void 0:l.find((e=>"span-method"===e.attrName&&e.attrValue));if(c)return Wa.execScriptFn({...e.getEventArgs(),metadata:{row:t,column:n,rowIndex:o,columnIndex:s,items:a.value.store.states.data.value}},c.attrValue,{isAsync:!1});const{property:d}=n,{rowspankeys:u=[],colspankeys:p=[]}=e.controlParams;if(u.length>0&&u.includes(d)){const e=0===s||t[d];if(o>0&&e&&t[d]===i.value[o-1][d])return{rowspan:0,colspan:0};let a=1;for(let n=o+1;n<i.value.length&&(e&&i.value[n][d]===t[d]);n++)a+=1;return{rowspan:a,colspan:1}}if(p.length>0&&p.includes(d)){const e=r.value[s-1].codeName;if(s>0&&p.includes(e)&&t[d]===t[e])return{rowspan:0,colspan:0};let a=1;for(let e=s+1;e<r.value.length;e++){const n=r.value[e].codeName;if(!p.includes(n)||t[n]!==t[d])break;a+=1}return{rowspan:1,colspan:a}}if(t.isGroupRow){const t=e.state.singleSelect?r.value.length:r.value.length+1;return s===(e.state.singleSelect?0:1)?{rowspan:1,colspan:t}:{rowspan:0,colspan:0}}},headerDragend:(t,a,n)=>{const{property:o}=n,i=e.columns[o],s=e.state.columnStates.find((e=>e.key===o));if(i.isAdaptiveColumn){s&&(s.adaptive=!1),i.isAdaptiveColumn=!1,i.model.width=t;const a=r.value.findIndex((t=>e.columns[t.codeName].isAdaptiveColumn));e.hasAdaptiveColumn=-1!==a}s&&(s.columnWidth=t,e.saveColumnStates())}}}function Wd(e,t){let a=null,o=0;const i=n({}),s=x((()=>{e.value&&(()=>{if(window.ResizeObserver){const n=e.value.$el.querySelector(".el-table__header-wrapper");n&&(a=new ResizeObserver((e=>{const a=e[0].contentRect.height;if(a!==o){const e={"now-header-height":"".concat(a,"px")};i.value=t.cssVarBlock(e),o=a}})),a.observe(n))}})()}));return p((()=>{a&&a.disconnect(),s()})),{headerCssVars:i}}function Kd(e,t,a){if(!a.enableRowEditOrder)return{};let n=0,o=0,i=null,s=null;const l=[],r=e=>{let t="";return e.forEach((e=>{e.startsWith("id-")&&(t=e.replace("id-",""))})),t},d=()=>{l.forEach((e=>{e()}))},u=()=>{d();const t=e.value.$el;if(t){t.getElementsByClassName("el-table__row").forEach((e=>{(e=>{e.setAttribute("draggable","true");const t=Bt(e,"dragstart",(e=>{if(e.target){const t=e.target;e.dataTransfer.effectAllowed="move";const o=r(t.classList);n=a.state.rows.findIndex((e=>e.data.srfkey===o)),i=a.state.rows[n]}})),c=Bt(e,"dragenter",(e=>{e.preventDefault();const t=e.currentTarget,n=r(t.classList);o=a.state.rows.findIndex((e=>e.data.srfkey===n)),(null==i?void 0:i.data.srfkey)!==n&&-1!==o&&(s=a.state.rows[o])})),d=Bt(e,"dragover",(e=>{e.preventDefault()})),u=Bt(e,"dragend",(e=>{e.preventDefault(),i&&s&&a.onDragChange(i,s,o>n?"next":"prev")}));l.push(t),l.push(c),l.push(d),l.push(u)})(e)}))}};return c([()=>e.value,()=>a.state.isLoaded],((e,t)=>{t&&e&&u()})),{cleanup:d,setDragEvent:u}}function Yd(e,t){let a;const s=n(!1),l=n(),r=u({}),c=async t=>{const n=(t=>{if(!e.value)throw new _t(ibiz.i18n.t("control.common.citeErrMessage"));const a=e.value.$el;let n=".el-table__row";t.data.srfkey&&(n+='[class*="id-'.concat(t.data.srfkey,'"]'));const o=a.querySelector(n);if(!o)throw new _t(ibiz.i18n.t("control.common.noDomErrMessage"));return o})(t);if(!a)throw new _t(ibiz.i18n.t("control.common.noPopErrMessage"));const o=a.$el,{x:i,y:c}=await Li(n,o,{placement:"bottom"});Object.assign(r,{top:"".concat(c,"px"),left:"".concat(i,"px")}),l.value=t,s.value=!0},d=async()=>{l.value&&t.switchRowEdit(l.value,!1,!0)},p=async()=>{l.value&&t.switchRowEdit(l.value,!1,!1)};return t.evt.on("onRowEditChange",(e=>{e.row.showRowEdit&&!t.state.isAutoGrid?setTimeout((()=>{c(e.row)}),0):(l.value=void 0,s.value=!1,Object.assign(r,{top:void 0,left:void 0}))})),{renderPopover:()=>{const e=s.value&&t.state.rows[t.state.rows.length-1].showRowEdit;return[o("div",{class:"row-edit-popover__placeholder",style:{display:e?"block":"none"}},null),o(i("iBizRowEditPopover"),{ref:e=>{a=e},style:r,show:s.value,onConfirm:d,onCancel:p},null)]}}}function Xd(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}function $d(e,t){var a;const n={};return null==(a=e.controlAttributes)||a.forEach((e=>{"span-method"!==e.attrName&&e.attrName&&e.attrValue&&(n[e.attrName]=Wa.execSingleLine(e.attrValue,{...t}))})),n}function Jd(e,t,a,n){var s,c,d;const{codeName:u,width:p}=t,h=e.columns[u],m=e.state.columnStates.find((e=>e.key===u)),v=h.isAdaptiveColumn||!e.hasAdaptiveColumn&&n===a.length-1?"min-width":"width",b=(null==m?void 0:m.columnWidth)||p;return o(i("el-table-column"),w({className:"".concat(null==(s=t.columnType)?void 0:s.toLowerCase()," ").concat(null==(c=t.columnType)?void 0:c.toLowerCase(),"-").concat(u),label:t.caption,prop:u},{[v]:b},{fixed:m.fixed,sortable:!!t.enableSort&&("LOCAL"===e.model.sortMode||"custom"),sortMethod:(e,a)=>{const n=t.id.toLowerCase();return e[n]<a[n]||!e[n]?-1:e[n]>a[n]||!a[n]?1:0},align:(null==(d=t.align)?void 0:d.toLowerCase())||"center"}),{header:({column:e})=>o(i("iBizGridColumnHeader"),{key:e.property,controller:h},null),default:({row:a})=>{let n=a;if(n.isGroupRow)return o("div",{class:"ibiz-grid-field-column"},[o("span",{class:"ibiz-grid-field-column__text"},[a.caption])]);a.isGroupData&&(n=a.first);const s=e.findRowState(n);if(s){if(!("DEFGRIDCOLUMN"!==t.columnType&&"DEFTREEGRIDCOLUMN"!==t.columnType||"IBizGridFieldColumn"!==e.providers[u].component||h.isCustomCode||h.codeList))return function(e,t){var a,n,s;const r=B("grid-field-column"),c=t.data[e.fieldName];let d;if(e.model.deuiactionGroup){const a=(a,n)=>e.onActionClick(a,t,n),n=e.grid.state.zIndex;d=o(i("iBizActionToolbar"),{class:r.e("toolbar"),"action-details":e.model.deuiactionGroup.uiactionGroupDetails,"actions-state":t.uiActionGroupStates[e.model.codeName],groupLevelKeys:[50,100],actionCallBack:a,zIndex:n},null)}else d=null;let u=null;const{controlRenders:p=[]}=e.model,h=null==(a=p.find((e=>"LAYOUTPANEL"===e.renderType)))?void 0:a.layoutPanel,m=null==(n=e.model.userParam)?void 0:n.columntype;if(h)u=o(i("iBizControlShell"),{data:t.data,modelData:h,context:e.context,params:e.params},null);else if("attachment"===m)u=o(i("iBizAttachmentColumn"),{data:t.data,value:c,controller:e},null);else{const a=e.formatValue(c),n=l((()=>{if("ellipsis"===e.grid.overflowMode&&hi(c)&&""!==c)return a+(e.model.unitName||"")})),i=l((()=>!(!c||e.grid.emptyHiddenUnit&&!a))),s=l((()=>{const{grid:t,fieldName:a}=e;if(!t.percentkeys.includes(a))return"";const n=Number(c);if(!Number.isNaN(n)){const{totalResult:e={}}=t.state,o=e[a];if(o&&!Number.isNaN(o))return ibiz.util.text.format("".concat(n/o),"0.##%")}return""})),d=a=>{e.isLinkColumn&&(a.stopPropagation(),e.openLinkView(t,a))};u=o("span",{class:r.e("text"),title:zt(n.value),onClick:d},[a,i.value&&e.model.unitName,s.value&&"(".concat(s.value,")")])}return o("div",{class:[r.b(),e.clickable(t)&&r.m("clickable"),r.m(e.grid.overflowMode),null==(s=e.model.cellSysCss)?void 0:s.cssName,r.is("has-action",!!e.model.deuiactionGroup)],onClick:a=>{e.hasAction&&(a.stopPropagation(),e.triggerAction(t,a))}},[e.model.deuiactionGroup?[o("div",{class:r.b("text-container")},[u]),o("div",{class:r.b("toolbar-container")},[d])]:u])}(h,s);const a=i(e.providers[u].component);return r(a,{controller:h,row:s,key:n.tempsrfkey+u,attrs:$d(t,{...e.getEventArgs(),data:s.data})})}return null}})}function Qd(e,t,a,n){var s,l;if("GROUPGRIDCOLUMN"===t.columnType){const n=(null==(s=t.degridColumns)?void 0:s.filter((e=>!e.hideDefault&&!e.hiddenDataItem)))||[],{width:r,codeName:c}=t,d=e.columns[c],u=(null==(l=t.align)?void 0:l.toLowerCase())||"center";return o(i("el-table-column"),{prop:t.codeName,label:t.caption,"min-width":r,align:u},{header:({column:e})=>o(i("iBizGridColumnHeader"),{key:e.property,controller:d},null),default:()=>n.map(((t,n)=>Qd(e,t,a,n)))})}return Jd(e,t,a,n)}const Zd=a({name:"IBizGridControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},rowEditOpen:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e,{slots:t}){const a=ne(((...e)=>new Ga(...e))),s=B("control-".concat(a.model.controlType.toLowerCase()));ue(a);const{sysCss:d}=a.model,u=null==d?void 0:d.cssName,{tableRef:m,onRowClick:v,onDbRowClick:b,onSelectionChange:g,onSortChange:f,handleRowClassName:w,handleHeaderCellClassName:y,cleanClick:C=Lt,cleanEnter:I=Lt,cleanTab:D=Lt}=Hd(a),{onPageChange:E,onPageRefresh:S,onPageSizeChange:x}=Ws(a),{headerCssVars:k}=Wd(m,s),{cleanup:T=Lt,setDragEvent:z}=Kd(m,0,a);a.evt.on("onLoadSuccess",(()=>{z&&z()}));const{tableData:A,renderColumns:O,defaultSort:M,summaryMethod:N,spanMethod:_,headerDragend:R}=Gd(a,e,m),{renderPopover:L}=Yd(m,a);p((()=>{T!==Lt&&T(),C!==Lt&&C(),I!==Lt&&I(),D!==Lt&&D()}));const j=l((()=>2!==a.model.pagingMode||(a.state.items.length>=a.state.total||a.state.isLoading||a.state.total<=a.state.size))),V=n(),F=n(ei());return c((()=>a.state.curPage),(()=>{var e,t;if(1===a.state.curPage&&(2===a.model.pagingMode||3===a.model.pagingMode)){F.value=ei();const a=null==(t=null==(e=V.value)?void 0:e.ElInfiniteScroll)?void 0:t.containerEl;a&&(a.lastScrollTop=0,a.scrollTop=0)}})),{c:a,ns:s,tableRef:m,tableData:A,sysCssName:u,defaultSort:M,renderColumns:O,headerCssVars:k,infiniteScroll:V,infiniteScrollKey:F,isLodeMoreDisabled:j,onRowClick:v,spanMethod:_,onSortChange:f,onDbRowClick:b,onPageChange:E,renderNoData:()=>{var e;const{isLoaded:t}=a.state;if(t){const t=null==(e=a.model.controls)?void 0:e.find((e=>e.name==="".concat(a.model.name,"_quicktoolbar")));if(t)return o(i("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:s.b("quick-toolbar")},null);const n={};return ce(a)&&Object.assign(n,{customRender:()=>o(de,{controller:a},null)}),o(i("iBizNoData"),{text:a.model.emptyText,emptyTextLanguageRes:a.model.emptyTextLanguageRes,hideNoDataImage:a.state.hideNoDataImage},Xd(n)?n:{default:()=>[n]})}return o("div",null,null)},summaryMethod:N,headerDragend:R,renderPopover:L,onPageRefresh:S,renderRowDetail:()=>{const{navAppViewId:e,navViewHeight:t}=a.model;if(e&&a.state.showRowDetail)return o(i("el-table-column"),{type:"expand"},{default:({row:n})=>{const{context:o,params:l}=a.calcNavParams(n),c={height:t?"".concat(t,"px"):"auto"};return r(i("IBizViewShell"),{style:c,params:l,context:o,viewId:e,class:s.b("row-detail-view")})}})},onPageSizeChange:x,renderTableColumn:(e,n)=>t[e.id]?P(t,e.id,{model:e,data:a.state.items}):Qd(a,e,O.value,n),onSelectionChange:g,handleRowClassName:w,renderBatchToolBar:()=>{var e;const t=null==(e=a.model.controls)?void 0:e.find((e=>e.name==="".concat(a.model.name,"_batchtoolbar")));if(t&&!a.state.singleSelect)return o("div",{class:[s.b("batch-toolbar"),s.is("show",a.state.selectedData.length>0)]},[o("div",{class:s.b("batch-toolbar-content")},[o("div",{class:s.b("batch-toolbar-text")},[ibiz.i18n.t("control.common.itemsSelected",{length:a.state.selectedData.length})]),o("div",{class:s.b("batch-toolbar-separator")},[h("|")]),o(i("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:s.b("batch-toolbar-items")},null)])])},renderDragIconColumn:()=>o(i("el-table-column"),{"class-name":s.e("drag-icon"),type:"default",width:"16"},{default:()=>o("svg",{viewBox:"0 0 16 16",class:"icon",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{id:"drag-icon/drag--","stroke-width":"1","fill-rule":"evenodd"},[o("g",{id:"drag-icon",transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z",id:"drag-icon-air"},null)])])])}),handleHeaderCellClassName:y}},render(){if(!this.c.state.isCreated)return;const e=this.c.state,t="true"===this.c.controlParams.defaultexpandall;return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{class:[this.ns.b(),this.ns.is("dynamic-grid",this.c.state.isAutoGrid),this.ns.is("show-header",!this.c.state.hideHeader),this.ns.is("enable-page",this.c.state.enablePagingBar),this.ns.is("enable-group",this.c.state.enableGroup),this.ns.is("single-select",e.singleSelect),this.ns.is("empty",0===e.items.length),this.ns.is("enable-customized",this.c.model.enableCustomized),this.ns.is("group-row-mode","NEWROW"===this.c.controlParams.grouprowmode)],controller:this.c,style:this.headerCssVars},{default:()=>[o(i("el-table"),w({border:!0,ref:"tableRef",data:this.tableData,"row-key":"tempsrfkey","tooltip-effect":"light",class:this.ns.e("table"),"scrollbar-always-on":!0,onRowClick:this.onRowClick,"span-method":this.spanMethod,"default-sort":this.defaultSort,"show-summary":this.c.enableAgg,onSortChange:this.onSortChange,onRowDblclick:this.onDbRowClick,"summary-method":this.summaryMethod,onHeaderDragend:this.headerDragend,"default-expand-all":t,"show-header":!this.c.state.hideHeader,"row-class-name":this.handleRowClassName,"highlight-current-row":e.singleSelect,expandRowKeys:this.c.state.expandRowKeys,onSelectionChange:this.onSelectionChange,"header-cell-class-name":this.handleHeaderCellClassName,onExpandChange:(e,t)=>this.c.expandChange(e,t)},this.$attrs,$d(this.c.model,{...this.c.getEventArgs()})),{empty:this.renderNoData,default:()=>[this.c.enableRowEditOrder&&this.renderDragIconColumn(),!e.singleSelect&&o(i("el-table-column"),{width:"55",align:"center",type:"selection","reserve-selection":!0,"class-name":this.ns.e("selection")},null),this.renderRowDetail(),this.renderColumns.map(((e,t)=>this.renderTableColumn(e,t)))],append:()=>{let e;return[g(o("div",{ref:"infiniteScroll",key:this.infiniteScrollKey,"infinite-scroll-distance":10,"infinite-scroll-disabled":this.isLodeMoreDisabled},null),[[y("infinite-scroll"),()=>this.c.loadMore()]]),3===this.c.model.pagingMode&&!(this.c.state.items.length>=this.c.state.total||this.c.state.isLoading||this.c.state.total<=this.c.state.size)&&o("div",{class:this.ns.e("load-more-button")},[o(i("el-button"),{text:!0,onClick:()=>this.c.loadMore()},Xd(e=ibiz.i18n.t("control.common.loadMore"))?e:{default:()=>[e]})]),this.c.state.isAutoGrid?o(i("el-button"),{type:"info",class:this.ns.e("add"),onClick:()=>this.c.newRow()},{default:()=>[o("ion-icon",{name:"add-outline"},null),ibiz.i18n.t("app.add")]}):this.renderPopover()]}}),this.c.state.enablePagingBar&&o(i("iBizPagination"),{total:e.total,curPage:e.curPage,size:e.size,totalPages:e.totalPages,onChange:this.onPageChange,popperClass:"".concat(this.sysCssName,"--popper"),onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null),this.c.model.enableCustomized&&!this.c.state.hideHeader&&o("div",{class:this.ns.b("setting-box")},[o(i("iBizGridSetting"),{columnStates:e.columnStates,controller:this.c},null)]),this.renderBatchToolBar()]})]})}});var eu=Object.defineProperty,tu=(e,t,a)=>(((e,t,a)=>{t in e?eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class au{constructor(){tu(this,"component","IBizGridControl")}}const nu=e("n",oe(Zd,(e=>{e.component(Zd.name,Zd),e.component(Rd.name,Rd),e.use(dd),e.use(vd),e.use(Bd),e.use(Id),e.use(Pd),e.use(Od),e.use(Ud),Ba(_a.GRID,(()=>new au))})));const ou=a({name:"IBizListControl",components:{draggable:Ui},props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e){const t=ne(((...e)=>new Ka(...e))),a=B("control-".concat(t.model.controlType.toLowerCase()));ue(t);const{onPageChange:r,onPageRefresh:d,onPageSizeChange:u}=Ws(t),p=l((()=>!0===t.model.enablePagingBar||(2!==t.model.pagingMode||(t.state.items.length>=t.state.total||t.state.isLoading||t.state.total<=t.state.size)))),h=n(!1),m=l((()=>!t.state.enableGroup&&(2===t.model.pagingMode||3===t.model.pagingMode))),v=n(),b=n(ei());c((()=>t.state.curPage),(()=>{var e,a;if(1===t.state.curPage&&(2===t.model.pagingMode||3===t.model.pagingMode)){b.value=ei();const t=null==(a=null==(e=v.value)?void 0:e.ElInfiniteScroll)?void 0:a.containerEl;t&&(t.lastScrollTop=0,t.scrollTop=0)}}));let f=null;const w=()=>{e.data&&(t.state.items=e.data.map((e=>new ua(e))),t.afterLoad({},t.state.items))};t.evt.on("onCreated",(async()=>{e.isSimple&&(w(),t.state.isSimple=!0,t.state.isLoaded=!0)}));const C=()=>{var e;null==(e=v.value)||e.scrollTo({top:0,behavior:"smooth"})};t.evt.on("onScrollToTop",(()=>{C()}));const I=()=>{h.value=!0,C()},D=()=>{h.value=!1},E=e=>{let a=!!t.state.selectedData.find((t=>t.srfkey===e.srfkey));return"DELISTVIEW"===t.view.model.viewType&&1===t.state.mdctrlActiveMode&&!0===t.state.singleSelect&&(a=!1),a};c((()=>e.data),(()=>{e.isSimple&&w()}),{deep:!0});const S=(e,n)=>{const{context:s,params:l}=t;return o(i("iBizControlShell"),{data:e,params:l,context:s,class:a.b("item"),modelData:n,onClick:()=>t.onRowClick(e),onDblclick:()=>t.onDbRowClick(e)},null)},x=e=>o(i("iBizActionToolbar"),{class:a.bem("item","right","actions"),"action-details":t.getOptItemModel(),"actions-state":t.state.uaState[e.srfkey],zIndex:t.state.zIndex,onActionClick:(a,n)=>t.onActionClick(a,e,n)},null),P=e=>{const n=t.getOptItemModel();return o("div",{key:e.srfkey,class:a.b("item"),onClick:()=>t.onRowClick(e),onDblclick:()=>t.onDbRowClick(e)},[o("span",{class:a.be("item","caption")},["".concat(Si(e.srfmajortext)?"":e.srfmajortext)]),n.length?o("div",{class:a.be("item","right")},[x(e)]):null])},k=e=>{if(t.model.groupUIActionGroup&&e.groupActionGroupState)return o(i("iBizActionToolbar"),{zIndex:t.state.zIndex,class:a.be("group-content","header-actions"),"action-details":t.model.groupUIActionGroup.uiactionGroupDetails,"actions-state":e.groupActionGroupState,onActionClick:(a,n)=>{t.onGroupToolbarClick(a,n,e)}},null)},T=e=>{const{navAppViewId:n,navViewHeight:s}=t.model,{context:l,params:r}=t.calcNavParams(e),c={height:s?"".concat(s,"px"):"auto"};return o(i("iBizViewShell"),{style:c,params:r,context:l,viewId:n,class:a.be("row-detail","view")},null)},z=n=>{const s=a.cssVarBlock({"item-bg-color":"".concat(n.bgcolor||""),"text-color":"".concat(n.fontcolor||""),"hover-bg-color":"".concat(n.hovercolor||""),"active-bg-color":"".concat(n.activecolor||"")}),l=e.modelData.itemLayoutPanel;return o("div",{style:s,class:[a.b("scroll-item"),a.is("active",E(n))]},[t.state.draggable&&!t.state.readonly&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",class:a.e("drag-icon"),preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])]),"EXTVIEW2"===t.model.controlStyle&&!t.state.singleSelect&&o(i("el-checkbox"),{size:"large",class:a.be("scroll-item","checkbox"),modelValue:E(n),onChange:()=>(e=>{const a=t.state.selectedData,n=a.findIndex((t=>t.srfkey===e.srfkey));-1===n?a.push(e):a.splice(n,1),t.setSelection(a)})(n)},null),t.model.navAppViewId&&t.state.showRowDetail&&o("ion-icon",{name:n.__isExpand?"chevron-down-outline":"chevron-forward-outline",class:a.be("scroll-item","icon"),onClick:()=>n.__isExpand=!n.__isExpand},null),l?S(n,l):P(n)])},A=(e,n,i=!0)=>{const{navAppViewId:s}=t.model;return o(Ui,{itemKey:"srfkey",modelValue:e,group:t.model.id,handle:".".concat(a.e("drag-icon")),class:[a.e("layout-flex"),a.em("layout-flex","draggable")],disabled:i||t.state.updating||t.state.readonly,onChange:e=>((e,a)=>{e.moved&&t.onDragChange({from:a,to:a,fromIndex:e.moved.oldIndex,toIndex:e.moved.newIndex}),e.added&&(f={to:a,toIndex:e.added.newIndex}),e.removed&&(f&&(f.from=a,f.fromIndex=e.removed.oldIndex,t.onDragChange(f)),f=null)})(e,null==n?void 0:n.key)},{item:({element:e})=>s&&t.state.showRowDetail?o("div",{class:a.b("row-detail")},[z(e),e.__isExpand&&T(e)]):z(e),footer:()=>{if(t.enableNew&&!t.state.readonly)return(e=>o("div",{title:ibiz.i18n.t("app.newlyBuild"),class:[a.b("item"),a.be("item","new")],onClick:a=>{t.onClickNew(a,null==e?void 0:e.key)}},[o("ion-icon",{name:"add-outline"},null)]))(n)}})},O=e=>o(i("el-collapse-item"),{class:a.be("group-content","item"),name:e.key.toString()},{title:()=>o("div",{class:a.be("group-content","item-header")},[o("span",{class:a.be("group-content","item-title")},[zt(e.caption)]),o("span",{class:a.be("group-content","item-action")},[k(e)])]),default:()=>e.children.length>0?A(e.children,e,!t.state.draggable):o("div",{class:a.bem("group-content","item","empty")},[ibiz.i18n.t("app.noData")])}),M=()=>o("div",{class:a.e("collapse-expand-icon")},[o("i",{class:"fa fa-angle-double-up",title:ibiz.i18n.t("control.common.collapseData"),onClick:I,"aria-hidden":"true"},null)]),N=()=>o("div",{class:a.e("collapse-expand-icon")},[o("i",{class:"fa fa-angle-double-down",title:ibiz.i18n.t("control.common.expandData"),onClick:D,"aria-hidden":"true"},null)]);return{c:t,ns:a,infiniteScroll:v,renderListContent:()=>{return t.state.enableGroup&&!t.state.isSimple?"STYLE2"===t.model.groupStyle?o("div",{class:[a.b("content"),a.b("scroll"),a.b("group-style2-content")]},[null==(e=t.state.groups)?void 0:e.map((e=>o("div",{class:[a.b("group-style2")]},[o("div",{class:a.be("group-style2","header")},[o("div",{class:a.bem("group-style2","header","title")},[zt(e.caption)])]),o("div",{class:a.be("group-style2","content")},[e.children.length>0?A(e.children):o("div",{class:a.bem("group-style2","content","empty")},[ibiz.i18n.t("app.noData")])])])))]):o(i("el-collapse"),{modelValue:t.state.expandedKeys,"onUpdate:modelValue":e=>t.state.expandedKeys=e,class:[a.b("content"),a.b("group-content"),a.is("show-underLine","EXTVIEW1"!==t.model.controlStyle)]},{default:()=>{var e;return[null==(e=t.state.groups)?void 0:e.map((e=>o("div",{class:[a.b("group")]},[O(e)])))]}}):g(o("div",{class:[a.b("scroll"),a.b("content"),a.is("show-underLine","EXTVIEW1"!==t.model.controlStyle)],"infinite-scroll-distance":10,"infinite-scroll-disabled":p.value,ref:"infiniteScroll",key:b.value},[A(h.value?t.state.items.slice(0,t.state.size):t.state.items,void 0,!t.enableEditOrder)]),[[y("infinite-scroll"),()=>t.loadMore()]]);var e},renderNoData:()=>{var e;const{isLoaded:n}=t.state;if(!n)return;const l=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_quicktoolbar")));if(l)return o(i("iBizToolbarControl"),{modelData:l,context:t.context,params:t.params,class:a.e("quicktoolbar")},null);const r={};return ce(t)&&Object.assign(r,{customRender:()=>o(de,{controller:t},null)}),n&&o(i("iBizNoData"),{class:a.b("content"),text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes,hideNoDataImage:t.state.hideNoDataImage},"function"==typeof(c=r)||"[object Object]"===Object.prototype.toString.call(c)&&!s(c)?r:{default:()=>[r]});var c},renderBatchToolBar:()=>{var e;const n=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_batchtoolbar")));if(n)return o("div",{class:a.e("batchtoolbar")},[o(i("iBizToolbarControl"),{modelData:n,context:t.context,params:t.params},null)])},onPageChange:r,onPageRefresh:d,onPageSizeChange:u,renderCollapseExpandIcon:()=>{let e=null;const n=!(t.state.items.length>=t.state.total||t.state.total<=t.state.size);return m.value&&(2===t.model.pagingMode&&(h.value?e=N():t.state.items.length>t.state.size&&(e=M())),3===t.model.pagingMode&&(h.value?e=N():n?e=o("div",{class:a.e("load-more")},[o("i",{class:"fa fa-angle-double-down",title:ibiz.i18n.t("control.common.loadMore"),onClick:()=>t.loadMore(),"aria-hidden":"true"},null)]):t.state.isCreated&&t.state.items.length>t.state.size&&(e=M()))),e}}},render(){let e=null;return this.c.state.isCreated&&(e=[this.c.state.items.length>0?this.renderListContent():this.renderNoData(),this.renderBatchToolBar(),this.c.state.enablePagingBar&&1===this.c.model.pagingMode?o(i("iBizPagination"),{class:this.ns.e("pagination"),total:this.c.state.total,curPage:this.c.state.curPage,size:this.c.state.size,totalPages:this.c.state.totalPages,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null):null]),o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{class:[this.ns.is("enable-page",!!this.c.state.enablePagingBar)],controller:this.c},{default:()=>[e,this.c.state.enableNavView&&this.c.state.showNavIcon?this.c.state.showNavView?o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),name:"eye-off-outline",onClick:()=>this.c.onShowNavViewChange()},null):o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),name:"eye-outline",onClick:()=>this.c.onShowNavViewChange()},null):null,this.renderCollapseExpandIcon()]})]})}});var iu=Object.defineProperty,su=(e,t,a)=>(((e,t,a)=>{t in e?iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class lu{constructor(){su(this,"component","IBizListControl")}}const ru=e("z",oe(ou,(function(e){e.component(ou.name,ou),Ba(_a.LIST,(()=>new lu))})));function cu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const du=a({name:"IBizAdvanceSearch",props:{controller:{type:Object,required:!0},modal:{type:Object}},setup(e){const t=B("advance-search"),a=e.controller,n=e=>{var t;const n={};return null==(t=e.controlAttributes)||t.forEach((e=>{e.attrName&&e.attrValue&&(n[e.attrName]=Wa.execSingleLine(e.attrValue,{...a.getEventArgs(),data:a.data}))})),n},s=e=>{const{hidden:t,userTag:l}=e;if(t||"permanent"===l)return;const c=e.id,d={},u=Sa(e);u.length&&(d.default=()=>u.map((e=>s(e))));const p=a.providers[c];if(!p)return o("div",null,[ibiz.i18n.t("control.form.noSupportDetailType",{detailType:e.detailType})]);const h=i(p.component);return r(h,{modelData:e,controller:a.details[c],key:e.id,attrs:n(e)},d)};return{ns:t,renderByDetailType:s}},render(){let e,t;return o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("header")},[o("span",null,[ibiz.i18n.t("app.advanceSearch")])]),o("div",{class:this.ns.e("search-form")},[o(i("iBizFormPage"),{modelData:this.controller.model,controller:this.controller},{default:()=>{var e;return[null==(e=this.controller.model.deformPages)?void 0:e.map((e=>this.renderByDetailType(e)))]}})]),o("div",{class:this.ns.e("footer")},[o(i("el-button"),{type:"primary",onClick:()=>this.controller.search()},cu(e=ibiz.i18n.t("app.search"))?e:{default:()=>[e]}),o(i("el-button"),{type:"primary",onClick:()=>this.controller.reset()},cu(t=ibiz.i18n.t("app.reset"))?t:{default:()=>[t]})])])}}),uu=a({name:"IBizSearchFormControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},isSimple:{type:Boolean,required:!1},data:{type:Object,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e){const t=ne(((...e)=>new Ya(...e))),a=B("control-".concat(t.model.controlType.toLowerCase()));e.isSimple&&(t.evt.on("onMounted",(()=>{t.setSimpleData(e.data||{})})),c((()=>e.data),(e=>{const a=e||{};Object.keys(t.data).find((e=>a[e]!==t.data[e]))&&t.setSimpleData(a)}),{deep:!0})),t.evt.on("onCreated",(()=>{Object.keys(t.details).forEach((e=>{const a=t.details[e];a.state=u(a.state)}))}));return t.evt.on("openAdvanceSearch",(()=>(async()=>{const e=ibiz.overlay.createModal((e=>r(du,{controller:t,modal:e})),{},{width:"800px",height:"auto",closeOnClickModal:!1});e.present(),await e.onWillDismiss()})())),{c:t,ns:a}},render(){const{state:e}=this.c;if(e.isCreated)return o(i("iBizFormControl"),{class:[this.ns.b()],controller:this.c,onKeyup:e=>this.c.onKeyUp(e)},{...this.$slots})}});var pu=Object.defineProperty,hu=(e,t,a)=>(((e,t,a)=>{t in e?pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class mu{constructor(){hu(this,"component","IBizSearchFormControl")}}const vu=e("A",oe(uu,(function(e){e.component(uu.name,uu),Ba(_a.SEARCHFORM,(()=>new mu))})));function bu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const gu=a({name:"IBizFormGroupPanel",props:{modelData:{type:Object,required:!0},controller:{type:Xa,required:!0}},setup(e){const t=B("form-group"),a=e.controller;return{ns:t,zIndex:e.controller.form.state.zIndex,captionText:l((()=>{const{captionItemName:t,caption:a}=e.modelData;return t?e.controller.data[t]:a})),changeCollapse:()=>{a.disableClose||(a.state.collapse=!a.state.collapse)},onActionClick:async(t,a)=>{const n={srfgroupid:e.modelData.codeName};await e.controller.onActionClick(t,a,n)}}},render(){var e,t;let a;const{state:n}=this.controller,s=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],l=o(i("iBizRow"),{class:this.ns.be("content","row"),layout:this.modelData.layout},bu(a=s.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},bu(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]}),r=[this.ns.b(),this.ns.m(this.modelData.codeName),this.modelData.detailStyle?this.ns.m(this.modelData.detailStyle.toLowerCase()):"",...this.controller.containerClass];!0===this.modelData.showCaption&&(r.push(this.ns.m("show-header")),r.push(this.ns.b("collapse")),r.push(this.ns.is("collapse",this.controller.state.collapse)),this.controller.disableClose&&r.push(this.ns.bm("collapse","disable-close")),2===this.modelData.showMoreMode&&r.push(this.ns.m("show-more")));let c=null;this.modelData.showCaption&&(c=o("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[o("div",{class:[this.ns.be("header","left")]},[o("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.modelData.sysImage&&o(i("iBizIcon"),{class:this.ns.em("caption","icon"),icon:this.modelData.sysImage},null),this.captionText])]),o("div",{class:[this.ns.be("header","right")]},[this.modelData.uiactionGroup&&o(i("iBizActionToolbar"),{zIndex:this.zIndex,class:this.ns.e("toolbar"),"action-details":this.modelData.uiactionGroup.uiactionGroupDetails,"actions-state":n.actionGroupState,onActionClick:this.onActionClick,caption:this.modelData.uiactionGroup.name,mode:"ITEMS"===this.modelData.actionGroupExtractMode?"dropdown":"buttons"},null),void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.controller.state.collapse?o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em",class:this.ns.be("header","icon")},[o("title",null,[ibiz.i18n.t("control.form.formGroup.unfold")]),o("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null)]):o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em",class:this.ns.be("header","icon")},[o("title",null,[ibiz.i18n.t("control.form.formGroup.fold")]),o("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"},null)]))])]));let d=null;return 2===this.modelData.showMoreMode&&(d=o("div",{class:[this.ns.b("footer")]},[o("div",{class:this.ns.be("footer","show-more-button"),onClick:()=>{n.isShowMore=!n.isShowMore}},[n.isShowMore?ibiz.i18n.t("app.retract"):ibiz.i18n.t("control.form.formGroupPanel.showMore")])])),o("div",{id:"".concat(this.controller.form.view.model.codeName,"_").concat(this.controller.form.model.codeName,"_").concat(this.modelData.codeName),class:r,onClick:e=>this.controller.onClick(e)},[c,o("div",{class:[this.ns.b("content")]},[l]),d])}});var fu=Object.defineProperty,wu=(e,t,a)=>(((e,t,a)=>{t in e?fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yu{constructor(){wu(this,"component","IBizFormGroupPanel")}async createController(e,t,a){const n=new Xa(e,t,a);return await n.init(),n}}const Cu=e("B",oe(gu,(function(e){e.component(gu.name,gu),$a("GROUPPANEL",(()=>new yu))}))),Iu=a({name:"IBizCompositeFormItem",props:{modelData:{type:Object,required:!0},controller:{type:Ja,required:!0},attrs:{type:Object,required:!1}},setup(e){var t,a,o,i;const s=e.controller,l=n({});let r=ibiz.config.form.emptyHiddenUnit;const c=null==(a=null==(t=e.controller.form)?void 0:t.controlParams)?void 0:a.emptyhiddenunit;c&&(r=Object.is(c,"true"));const d=(null==(i=null==(o=e.controller.editor)?void 0:o.model)?void 0:i.editorParams)||{},{EMPTYHIDDENUNIT:u}=d;return u&&(r=Object.is(u,"true")),Object.assign(l.value,{emptyHiddenUnit:r}),{c:s,extraParams:l,onValueChange:(t,a)=>{e.controller.setDataValue(t,a)}}},render(){var e,t,a,n,s;if(!this.c.state.visible||"HIDDEN"===(null==(e=this.controller.model.editor)?void 0:e.editorType))return null;let l=null;const c=null==(n=null==(a=null==(t=this.controller.editor)?void 0:t.model)?void 0:a.editorParams)?void 0:n.editMode,d={style:null==(s=this.controller.editor)?void 0:s.style,value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,readonly:this.controller.state.readonly,onChange:this.onValueChange,extraParams:this.extraParams,controlParams:c?{...this.controller.form.controlParams,editmode:c}:this.controller.form.controlParams,onFocus:e=>this.c.onFocus(e),onBlur:e=>this.c.onBlur(e),onEnter:e=>this.controller.onEnter(e),onClick:(e,t)=>this.controller.onClick(e,t),...this.attrs};if(this.$slots.default)l=this.$slots.default(d);else if(this.controller.editorProvider){const e=i(this.controller.editorProvider.formEditor);l=r(e,{...d})}else l=o(i("not-supported-editor"),{modelData:this.modelData.editor,context:this.controller.context},null);return l}});const Du=a({name:"IBizFormItem",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0},attrs:{type:Object,required:!1}},setup(e){var t,a,o,i;const s=B("form-item"),l=e.controller,r=n({});let c=ibiz.config.form.emptyHiddenUnit;const d=null==(a=null==(t=e.controller.form)?void 0:t.controlParams)?void 0:a.emptyhiddenunit;d&&(c=Object.is(d,"true"));const u=(null==(i=null==(o=e.controller.editor)?void 0:o.model)?void 0:i.editorParams)||{},{EMPTYHIDDENUNIT:p}=u;return p&&(c=Object.is(p,"true")),Object.assign(r.value,{emptyHiddenUnit:c}),{ns:s,c:l,extraParams:r,onValueChange:(t,a,n=!1)=>{e.controller.setDataValue(t,a,n)}}},render(){var e,t,a,n,l;if(!this.c.state.visible||"HIDDEN"===(null==(e=this.c.model.editor)?void 0:e.editorType))return null;let c=null;const d=this.c.model.compositeItem;if(d){const{editorItems:e=[]}=this.c.model.editor||{};c=e.map(((t,a)=>{const n=this.c.form.details[t.id];return[o(Iu,{modelData:n.model,controller:n,attrs:this.attrs},null),e.length-1>a&&"STYLE2"===this.c.model.detailStyle&&o("span",{class:this.ns.e("composite-separator")},[h("-")])]}))}else{const e=null==(n=null==(a=null==(t=this.c.editor)?void 0:t.model)?void 0:a.editorParams)?void 0:n.editMode,s={style:null==(l=this.c.editor)?void 0:l.style,value:this.c.value,data:this.c.data,controller:this.c.editor,disabled:this.c.state.disabled,readonly:this.c.state.readonly,onChange:this.onValueChange,extraParams:this.extraParams,controlParams:e?{...this.c.form.controlParams,editmode:e}:this.c.form.controlParams,onFocus:e=>this.c.onFocus(e),onBlur:e=>this.c.onBlur(e),onEnter:e=>this.c.onEnter(e),onClick:(e,t)=>this.c.onClick(e,t),...this.attrs};if(this.$slots.default)c=this.$slots.default(s);else if(this.c.editorProvider){const e=i(this.c.editorProvider.formEditor);c=r(e,{...s})}else c=o(i("not-supported-editor"),{modelData:this.modelData.editor,context:this.c.context},null)}return o(i("iBizFormItemContainer"),{id:"".concat(this.c.form.view.model.codeName,"_").concat(this.c.form.model.codeName,"_").concat(this.modelData.codeName),class:[this.ns.b(),this.ns.m(this.modelData.id),this.ns.is("compositeItem",d),...this.c.containerClass],style:this.modelData.cssStyle,controller:this.c,onClick:e=>this.c.onClick(e)},"function"==typeof(u=c)||"[object Object]"===Object.prototype.toString.call(u)&&!s(u)?c:{default:()=>[c]});var u}}),Eu=e("E",a({name:"IBizFormItemContainer",props:{controller:{type:Object,required:!0}},setup(e){const t=B("form-item-container"),a=e.controller,s=n(!1),{sysImage:l,enableInputTip:r,labelPos:d}=a.model;c((()=>s.value),(()=>{s.value&&a.loadInputTip()})),p((()=>a.clearTipsCache()));const u=()=>{const{inputTip:e}=a.state;switch(ibiz.config.tooltiprendermode){case"none":return o("span",{class:t.m("text")},[e]);case"html":return o("div",{class:t.m("html"),innerHTML:e},null);default:return o(i("iBizMarkDown"),{value:e,disabled:!0},null)}};return{ns:t,renderLabel:()=>o("div",{title:r?void 0:zt(a.labelCaption),class:[t.e("label"),...a.labelClass||[]]},[o(i("el-tooltip"),{effect:"light",visible:s.value,"onUpdate:visible":e=>s.value=e,"popper-class":[t.e("popper"),t.is(ibiz.config.tooltiprendermode.toLowerCase(),!0)],disabled:!r,placement:"RIGHT"===d?"right":"left"},{default:()=>o("div",{class:[t.em("label","content"),t.is("tooltip",r)]},[r&&ibiz.config.form.showTipsIcon&&o("ion-icon",{name:"bulb-outline",class:t.em("label","icon")},null),l&&o($,{class:t.em("label","icon"),icon:l},null),o("div",{class:t.em("label","text")},[a.labelCaption])]),content:()=>o("div",{class:t.em("popper","content")},[o("div",{class:t.em("popper","tooltip")},[u()]),a.state.inputTipUrl&&o("a",{target:"_blank",href:a.state.inputTipUrl,title:ibiz.i18n.t("component.formItemContainer.more")},[ibiz.i18n.t("component.formItemContainer.more")])])})])}},render(){var e,t;const{labelPos:a,labelWidth:n}=this.controller.model,i=o("div",{class:[this.ns.e("content"),this.ns.em("content","label-".concat(null==a?void 0:a.toLowerCase()))]},[o("div",{class:[this.ns.e("editor")]},[null==(t=(e=this.$slots).default)?void 0:t.call(e)]),this.controller.state.error?o("div",{title:zt(this.controller.state.error),class:[this.ns.e("error")]},[this.controller.state.error]):null]);return o("div",{class:[this.ns.b(),this.ns.m(null==a?void 0:a.toLowerCase()),this.ns.is("required",this.controller.state.required),this.ns.is("error",!!this.controller.state.error)],style:this.ns.cssVarBlock({"label-width":"".concat(n||130,"px")})},[a&&["LEFT","TOP"].includes(a)&&this.renderLabel(),i,a&&["RIGHT","BOTTOM"].includes(a)&&this.renderLabel()])}}));var Su=Object.defineProperty,xu=(e,t,a)=>(((e,t,a)=>{t in e?Su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Pu{constructor(){xu(this,"component","IBizFormItem")}async createController(e,t,a){const n=new Ja(e,t,a);return await n.init(),n}}const ku=e("C",oe(Du,(function(e){e.component(Du.name,Du),e.component(Eu.name,Eu),$a("FORMITEM",(()=>new Pu))})));const Tu=a({name:"IBizFormPage",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("form-page");let a="top";e.modelData.tabHeaderPos&&(a=e.modelData.tabHeaderPos.toLowerCase());return{ns:t,position:a,onTabChange:t=>{e.controller.setActiveTab(t)}}},render(){var e,t,a,n;let l;const{noTabHeader:r}=this.modelData,c=(null==(a=null==(t=(e=this.$slots).default)?void 0:t.call(e)[0])?void 0:a.children)||[];return 1===c.length||r?o("div",{class:[this.ns.b(),this.ns.m("no-tab-header")]},[c]):o(i("el-tabs"),{class:[this.ns.b(),this.ns.b("tab"),this.ns.e(this.position)],"model-value":null==(n=c[0])?void 0:n.key,"tab-position":this.position,onTabChange:this.onTabChange},"function"==typeof(d=l=c.map((e=>{const t=e.props;if(!t||!t.controller)return e;const a=t.controller;return a.state.visible||a.state.keepAlive?o(i("el-tab-pane"),{class:this.ns.b("tab-item"),name:a.model.id,lazy:!0},{default:()=>e,label:()=>o("span",{class:a.labelClass},[a.model.sysImage?o(i("iBizIcon"),{icon:a.model.sysImage},null):null,a.model.caption])}):null})))||"[object Object]"===Object.prototype.toString.call(d)&&!s(d)?l:{default:()=>[l]});var d}});function zu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Au=e("G",a({name:"IBizFormPageItem",props:{modelData:{type:Object,required:!0},controller:{type:Qa,required:!0}},setup:()=>({ns:B("form-page-item")}),render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[];return n.forEach((e=>{var t;const a=null==(t=e.component)?void 0:t.data;a&&(a.class={[this.ns.b("child")]:!0})})),o(i("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],layout:this.modelData.layout},zu(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},zu(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]})}}));var Ou=Object.defineProperty,Mu=(e,t,a)=>(((e,t,a)=>{t in e?Ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Nu{constructor(){Mu(this,"component","IBizFormPageItem")}async createController(e,t,a){const n=new Qa(e,t);return await n.init(),n}}const Bu=e("F",oe(Tu,(function(e){e.component(Tu.name,Tu),e.component(Au.name,Au),$a("FORMPAGE",(()=>new Nu))}))),_u=a({name:"IBizFormButton",props:{modelData:{type:Object,required:!0},controller:{type:Za,required:!0}},setup:e=>({ns:B("form-button"),captionText:l((()=>{const{caption:t,captionItemName:a}=e.modelData;return a&&e.controller.data[a]?e.controller.data[a]:t}))}),render(){return this.controller.state.visible?o("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.ns.is("loading",this.controller.state.loading),this.modelData.detailStyle&&this.ns.m(this.modelData.detailStyle.toLowerCase()),...this.controller.containerClass]},[o(i("el-button"),{sime:"small",onClick:this.controller.onClick.bind(this.controller),type:cl(this.modelData.buttonStyle),loading:this.controller.state.loading,disabled:this.controller.state.disabled,title:zt(this.modelData.tooltip)},{default:()=>[o("div",{class:this.ns.b("content")},[o(i("iBizIcon"),{class:this.ns.bm("content","icon"),icon:this.modelData.sysImage},null),this.modelData.showCaption?o("span",{class:this.ns.bm("content","caption")},[this.captionText]):null])]})]):null}});var Ru=Object.defineProperty,Lu=(e,t,a)=>(((e,t,a)=>{t in e?Ru(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ju{constructor(){Lu(this,"component","IBizFormButton")}async createController(e,t,a){const n=new Za(e,t,a);return await n.init(),n}}const Vu=e("H",oe(_u,(function(e){e.component(_u.name,_u),$a("BUTTON",(()=>new ju))}))),Fu=a({name:"IBizFormDRUIPart",props:{modelData:{type:Object,required:!0},controller:{type:en,required:!0}},setup(e){var t;const a=B("form-druipart");pe(e.controller);return{ns:a,isDesignPreview:"DESIGN"===(null==(t=e.controller.context)?void 0:t.srfrunmode),onCreated:t=>{e.controller.setEmbedView(t.view)}}},render(){if(!this.controller.state.visible&&!this.controller.state.keepAlive||!this.controller.state.viewComponentKey)return null;if(this.isDesignPreview)return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("preview-content")},[ibiz.i18n.t("control.form.formDruipart.defaultText")])]);const e=i("IBizViewShell");return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],onClick:e=>this.controller.onClick(e)},[r(e,{context:this.controller.navContext,params:this.controller.navParams,key:this.controller.state.viewComponentKey,viewId:this.controller.model.appViewId,state:{noLoadDefault:!0},onCreated:this.onCreated}),this.controller.state.showMask&&o("div",{class:this.ns.e("mask")},[this.modelData.maskInfo||ibiz.i18n.t("control.form.formDruipart.saveFirst")])])}});var Uu=Object.defineProperty,Hu=(e,t,a)=>(((e,t,a)=>{t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qu{constructor(){Hu(this,"component","IBizFormDRUIPart")}async createController(e,t,a){const n=new en(e,t,a);return await n.init(),n}}const Gu=e("J",oe(Fu,(function(e){e.component(Fu.name,Fu),$a("DRUIPART",(()=>new qu))}))),Wu=a({name:"IBizFormMDCtrl",props:{modelData:{type:Object,required:!0},controller:{type:tn,required:!0}},setup(e){var t;const a=B("form-mdctrl");pe(e.controller);const n=e.controller,o=e.controller.form.state.zIndex,i=n.model.showCaption&&!!n.model.caption;return{c:n,ns:a,zIndex:o,hasHeader:i||n.model.uiactionGroup,hasCaption:i,isDesignPreview:"DESIGN"===(null==(t=n.context)?void 0:t.srfrunmode),onActionClick:async(t,a)=>{await e.controller.onActionClick(t,a)}}},render(){if(this.isDesignPreview)return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("preview-content")},[ibiz.i18n.t("control.form.formMDctrl.defaultText")])]);const{model:e}=this.c;let t;switch(e.contentType){case"GRID":case"LIST":case"DATAVIEW":t=o(i("iBizFormMDCtrlMD"),{controller:this.c},null);break;case"FORM":t=o(i("iBizFormMDCtrlForm"),{controller:this.c},null);break;case"REPEATER":t=o(i("iBizFormMDCtrlRepeater"),{controller:this.c},null);break;default:o("div",null,[ibiz.i18n.t("app.noSupport")])}return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass,this.hasCaption?this.ns.m("show-caption"):""]},[this.hasHeader&&o("div",{class:this.ns.b("header")},[o("div",{class:this.ns.e("title")},[this.hasCaption?this.c.model.caption:""]),e.uiactionGroup&&o(i("iBizActionToolbar"),{zIndex:this.zIndex,class:this.ns.e("toolbar"),"action-details":e.uiactionGroup.uiactionGroupDetails,"actions-state":this.controller.state.actionGroupState,onActionClick:this.onActionClick},null)]),t])}});const Ku=a({name:"IBizFormMDCtrlForm",props:{controller:{type:an,required:!0}},setup(e){const t=B("form-mdctrl-form"),a=l((()=>e.controller.enableCreate||e.controller.enableDelete));return{ns:t,showActions:a,onCreated:(t,a)=>{e.controller.setFormController(t,a.ctrl)},renderAddBtn:()=>{let a;return o(i("el-button"),{class:[t.be("item-actions","create"),t.be("item-actions","btn")],onClick:()=>e.controller.create()},"function"==typeof(n=a=ibiz.i18n.t("app.add"))||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}}},render(){const{state:e,formProvider:t,model:a}=this.controller;return"STYLE2"===a.detailStyle?o(i("iBizMDCtrlContainer2"),{controller:this.controller,items:e.items},{item:({data:e})=>{if(!t)return o("div",null,[ibiz.i18n.t("control.form.formMDctrlForm.noFindProvider")]);return r(i(t.component),{class:this.ns.be("item","form"),key:e.id,modelData:a.contentControl,context:e.context,params:e.params,onCreated:t=>{this.onCreated(e.id,t)}})}}):o(i("iBizMDCtrlContainer"),{class:this.ns.b(),items:e.items,enableCreate:this.controller.enableCreate,enableDelete:this.controller.enableDelete,onAddClick:()=>this.controller.create(),onRemoveClick:e=>this.controller.remove(e.id)},{item:({data:e,index:n})=>{if(!t)return o("div",null,[ibiz.i18n.t("control.form.formMDctrlForm.noFindProvider")]);return r(i(t.component),{class:this.ns.be("item","form"),key:e.id,modelData:a.contentControl,mdCtrlFormIndex:n,context:e.context,params:e.params,onCreated:t=>{this.onCreated(e.id,t)}})}})}});function Yu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Xu=a({name:"IBizFormMDCtrlMD",props:{controller:{type:nn,required:!0}},setup(e){const t=B("form-mdctrl-md"),a=l((()=>e.controller.enableCreate||e.controller.enableDelete)),o=n(!1);return{ns:t,showActions:a,isSelected:o,onCreated:t=>{e.controller.setMDControl(t.ctrl)},onSelectionChange:e=>{o.value=e.data.length>0}}},render(){let e,t;const{mdProvider:a,model:n}=this.controller;let s=null;const l={class:this.ns.b("content"),modelData:n.contentControl,context:this.controller.form.context,params:this.controller.form.params,loadDefault:!1,onCreated:this.onCreated,onSelectionChange:this.onSelectionChange};return"GRID"===n.contentType&&(l.rowEditOpen=!0),s=r(i(a.component),l),o("div",{class:this.ns.b()},[s,this.showActions&&o("div",{class:this.ns.b("actions")},[this.controller.enableCreate&&o(i("el-button"),{class:[this.ns.be("actions","create"),this.ns.be("actions","btn")],onClick:()=>this.controller.create()},Yu(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]}),this.controller.enableDelete&&o(i("el-button"),{type:"danger",disabled:!this.isSelected,class:[this.ns.be("actions","remove"),this.ns.be("actions","btn")],onClick:()=>this.controller.remove()},Yu(t=ibiz.i18n.t("app.delete"))?t:{default:()=>[t]})])])}}),$u=a({name:"IBizRepeaterSingleForm",props:{data:{type:Object,required:!0},controller:{type:on,required:!0},simpleDataIndex:{type:Number}},emits:{change:e=>!0,created:e=>!0},setup:(e,{emit:t})=>({ns:B("repeater-single-form"),onFormDataChange:e=>{const a=e.data[0],n=a instanceof ua?a.clone():{...a};t("change",n)},onCreated:e=>{t("created",e)}}),render(){if(!this.controller.repeatedForm)throw new _t(ibiz.i18n.t("control.form.repeaterSingleForm.errorMessage"));return o(i("iBizControlShell"),{class:this.ns.b(),context:this.controller.context,params:this.controller.params,modelData:this.controller.repeatedForm,isSimple:!0,simpleDataIndex:this.simpleDataIndex,data:this.data,onFormDataChange:this.onFormDataChange,onCreated:this.onCreated},null)}}),Ju=a({name:"IBizRepeaterMultiForm",props:{controller:{type:on,required:!0}},emits:{change:e=>!0},setup:(e,{emit:t})=>({ns:B("repeater-multi-form"),onValueChange:(a,n)=>{const o=[...e.controller.value];o[n]=a,t("change",o)},onCreated:(t,a)=>{e.controller.setRepeaterController("".concat(t),a.ctrl)}}),render(){const e=this.controller.value;let t="";return this.controller.model.userParam&&this.controller.model.userParam.STYLE&&(t=this.controller.model.userParam.STYLE),o(i("iBizMDCtrlContainer"),{class:this.ns.b(),userStyle:t,items:e,enableCreate:this.controller.enableCreate,enableDelete:this.controller.enableDelete,enableSort:this.controller.enableSort,onAddClick:()=>this.controller.create(),onRemoveClick:(e,t)=>this.controller.remove(t),onDragChange:(e,t)=>{this.controller.dragChange(e,t)}},{item:({data:e,index:t})=>o($u,{key:t,data:e,simpleDataIndex:t,controller:this.controller,onChange:e=>{this.onValueChange(e,t)},onCreated:e=>this.onCreated(t,e)},null)})}});
2
- /**!
3
- * Sortable 1.15.6
4
- * @author RubaXa <trash@rubaxa.org>
5
- * @author owenm <owen23355@gmail.com>
6
- * @license MIT
7
- */
8
- function Qu(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function Zu(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(a),!0).forEach((function(t){tp(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Qu(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function ep(e){return ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ep(e)}function tp(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ap(){return ap=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},ap.apply(this,arguments)}function np(e,t){if(null==e)return{};var a,n,o=function(e,t){if(null==e)return{};var a,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}function op(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var ip=op(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),sp=op(/Edge/i),lp=op(/firefox/i),rp=op(/safari/i)&&!op(/chrome/i)&&!op(/android/i),cp=op(/iP(ad|od|hone)/i),dp=op(/chrome/i)&&op(/android/i),up={capture:!1,passive:!1};function pp(e,t,a){e.addEventListener(t,a,!ip&&up)}function hp(e,t,a){e.removeEventListener(t,a,!ip&&up)}function mp(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function vp(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function bp(e,t,a,n){if(e){a=a||document;do{if(null!=t&&(">"===t[0]?e.parentNode===a&&mp(e,t):mp(e,t))||n&&e===a)return e;if(e===a)break}while(e=vp(e))}return null}var gp,fp=/\s+/g;function wp(e,t,a){if(e&&t)if(e.classList)e.classList[a?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(fp," ").replace(" "+t+" "," ");e.className=(n+(a?" "+t:"")).replace(fp," ")}}function yp(e,t,a){var n=e&&e.style;if(n){if(void 0===a)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(a=e.currentStyle),void 0===t?a:a[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=a+("string"==typeof a?"":"px")}}function Cp(e,t){var a="";if("string"==typeof e)a=e;else do{var n=yp(e,"transform");n&&"none"!==n&&(a=n+" "+a)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(a)}function Ip(e,t,a){if(e){var n=e.getElementsByTagName(t),o=0,i=n.length;if(a)for(;o<i;o++)a(n[o],o);return n}return[]}function Dp(){var e=document.scrollingElement;return e||document.documentElement}function Ep(e,t,a,n,o){if(e.getBoundingClientRect||e===window){var i,s,l,r,c,d,u;if(e!==window&&e.parentNode&&e!==Dp()?(s=(i=e.getBoundingClientRect()).top,l=i.left,r=i.bottom,c=i.right,d=i.height,u=i.width):(s=0,l=0,r=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||a)&&e!==window&&(o=o||e.parentNode,!ip))do{if(o&&o.getBoundingClientRect&&("none"!==yp(o,"transform")||a&&"static"!==yp(o,"position"))){var p=o.getBoundingClientRect();s-=p.top+parseInt(yp(o,"border-top-width")),l-=p.left+parseInt(yp(o,"border-left-width")),r=s+i.height,c=l+i.width;break}}while(o=o.parentNode);if(n&&e!==window){var h=Cp(o||e),m=h&&h.a,v=h&&h.d;h&&(r=(s/=v)+(d/=v),c=(l/=m)+(u/=m))}return{top:s,left:l,bottom:r,right:c,width:u,height:d}}}function Sp(e,t,a){for(var n=zp(e,!0),o=Ep(e)[t];n;){var i=Ep(n)[a];if(!("top"===a||"left"===a?o>=i:o<=i))return n;if(n===Dp())break;n=zp(n,!1)}return!1}function xp(e,t,a,n){for(var o=0,i=0,s=e.children;i<s.length;){if("none"!==s[i].style.display&&s[i]!==Nh.ghost&&(n||s[i]!==Nh.dragged)&&bp(s[i],a.draggable,e,!1)){if(o===t)return s[i];o++}i++}return null}function Pp(e,t){for(var a=e.lastElementChild;a&&(a===Nh.ghost||"none"===yp(a,"display")||t&&!mp(a,t));)a=a.previousElementSibling;return a||null}function kp(e,t){var a=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Nh.clone||t&&!mp(e,t)||a++;return a}function Tp(e){var t=0,a=0,n=Dp();if(e)do{var o=Cp(e),i=o.a,s=o.d;t+=e.scrollLeft*i,a+=e.scrollTop*s}while(e!==n&&(e=e.parentNode));return[t,a]}function zp(e,t){if(!e||!e.getBoundingClientRect)return Dp();var a=e,n=!1;do{if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var o=yp(a);if(a.clientWidth<a.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||a.clientHeight<a.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!a.getBoundingClientRect||a===document.body)return Dp();if(n||t)return a;n=!0}}}while(a=a.parentNode);return Dp()}function Ap(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Op(e,t){return function(){if(!gp){var a=arguments;1===a.length?e.call(this,a[0]):e.apply(this,a),gp=setTimeout((function(){gp=void 0}),t)}}}function Mp(e,t,a){e.scrollLeft+=t,e.scrollTop+=a}function Np(e){var t=window.Polymer,a=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):a?a(e).clone(!0)[0]:e.cloneNode(!0)}function Bp(e,t,a){var n={};return Array.from(e.children).forEach((function(o){var i,s,l,r;if(bp(o,t.draggable,e,!1)&&!o.animated&&o!==a){var c=Ep(o);n.left=Math.min(null!==(i=n.left)&&void 0!==i?i:1/0,c.left),n.top=Math.min(null!==(s=n.top)&&void 0!==s?s:1/0,c.top),n.right=Math.max(null!==(l=n.right)&&void 0!==l?l:-1/0,c.right),n.bottom=Math.max(null!==(r=n.bottom)&&void 0!==r?r:-1/0,c.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var _p="Sortable"+(new Date).getTime();function Rp(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==yp(e,"display")&&e!==Nh.ghost){t.push({target:e,rect:Ep(e)});var a=Zu({},t[t.length-1].rect);if(e.thisAnimationDuration){var n=Cp(e,!0);n&&(a.top-=n.f,a.left-=n.e)}e.fromRect=a}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var a in e)if(e.hasOwnProperty(a))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[a][n])return Number(a);return-1}(t,{target:e}),1)},animateAll:function(a){var n=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof a&&a());var o=!1,i=0;t.forEach((function(e){var t=0,a=e.target,s=a.fromRect,l=Ep(a),r=a.prevFromRect,c=a.prevToRect,d=e.rect,u=Cp(a,!0);u&&(l.top-=u.f,l.left-=u.e),a.toRect=l,a.thisAnimationDuration&&Ap(r,l)&&!Ap(s,l)&&(d.top-l.top)/(d.left-l.left)==(s.top-l.top)/(s.left-l.left)&&(t=function(e,t,a,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*n.animation}(d,r,c,n.options)),Ap(l,s)||(a.prevFromRect=s,a.prevToRect=l,t||(t=n.options.animation),n.animate(a,d,l,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout((function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null}),t),a.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof a&&a()}),i):"function"==typeof a&&a(),t=[]},animate:function(e,t,a,n){if(n){yp(e,"transition",""),yp(e,"transform","");var o=Cp(this.el),i=o&&o.a,s=o&&o.d,l=(t.left-a.left)/(i||1),r=(t.top-a.top)/(s||1);e.animatingX=!!l,e.animatingY=!!r,yp(e,"transform","translate3d("+l+"px,"+r+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),yp(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),yp(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){yp(e,"transition",""),yp(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}}var Lp=[],jp={initializeByDefault:!0},Vp={mount:function(e){for(var t in jp)jp.hasOwnProperty(t)&&!(t in e)&&(e[t]=jp[t]);Lp.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Lp.push(e)},pluginEvent:function(e,t,a){var n=this;this.eventCanceled=!1,a.cancel=function(){n.eventCanceled=!0};var o=e+"Global";Lp.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][o]&&t[n.pluginName][o](Zu({sortable:t},a)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](Zu({sortable:t},a)))}))},initializePlugins:function(e,t,a,n){for(var o in Lp.forEach((function(n){var o=n.pluginName;if(e.options[o]||n.initializeByDefault){var i=new n(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,ap(a,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var a={};return Lp.forEach((function(n){"function"==typeof n.eventProperties&&ap(a,n.eventProperties.call(t[n.pluginName],e))})),a},modifyOption:function(e,t,a){var n;return Lp.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(n=o.optionListeners[t].call(e[o.pluginName],a))})),n}};var Fp=["evt"],Up=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=a.evt,o=np(a,Fp);Vp.pluginEvent.bind(Nh)(e,t,Zu({dragEl:qp,parentEl:Gp,ghostEl:Wp,rootEl:Kp,nextEl:Yp,lastDownEl:Xp,cloneEl:$p,cloneHidden:Jp,dragStarted:dh,putSortable:nh,activeSortable:Nh.active,originalEvent:n,oldIndex:Qp,oldDraggableIndex:eh,newIndex:Zp,newDraggableIndex:th,hideGhostForTarget:zh,unhideGhostForTarget:Ah,cloneNowHidden:function(){Jp=!0},cloneNowShown:function(){Jp=!1},dispatchSortableEvent:function(e){Hp({sortable:t,name:e,originalEvent:n})}},o))};function Hp(e){!function(e){var t=e.sortable,a=e.rootEl,n=e.name,o=e.targetEl,i=e.cloneEl,s=e.toEl,l=e.fromEl,r=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,m=e.extraEventProperties;if(t=t||a&&a[_p]){var v,b=t.options,g="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||ip||sp?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=s||a,v.from=l||a,v.item=o||a,v.clone=i,v.oldIndex=r,v.newIndex=c,v.oldDraggableIndex=d,v.newDraggableIndex=u,v.originalEvent=p,v.pullMode=h?h.lastPutMode:void 0;var f=Zu(Zu({},m),Vp.getEventProperties(n,t));for(var w in f)v[w]=f[w];a&&a.dispatchEvent(v),b[g]&&b[g].call(t,v)}}(Zu({putSortable:nh,cloneEl:$p,targetEl:qp,rootEl:Kp,oldIndex:Qp,oldDraggableIndex:eh,newIndex:Zp,newDraggableIndex:th},e))}var qp,Gp,Wp,Kp,Yp,Xp,$p,Jp,Qp,Zp,eh,th,ah,nh,oh,ih,sh,lh,rh,ch,dh,uh,ph,hh,mh,vh=!1,bh=!1,gh=[],fh=!1,wh=!1,yh=[],Ch=!1,Ih=[],Dh="undefined"!=typeof document,Eh=cp,Sh=sp||ip?"cssFloat":"float",xh=Dh&&!dp&&!cp&&"draggable"in document.createElement("div"),Ph=function(){if(Dh){if(ip)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),kh=function(e,t){var a=yp(e),n=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),o=xp(e,0,t),i=xp(e,1,t),s=o&&yp(o),l=i&&yp(i),r=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ep(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ep(i).width;if("flex"===a.display)return"column"===a.flexDirection||"column-reverse"===a.flexDirection?"vertical":"horizontal";if("grid"===a.display)return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return o&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||r>=n&&"none"===a[Sh]||i&&"none"===a[Sh]&&r+c>n)?"vertical":"horizontal"},Th=function(e){function t(e,a){return function(n,o,i,s){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==e&&(a||l))return!0;if(null==e||!1===e)return!1;if(a&&"clone"===e)return e;if("function"==typeof e)return t(e(n,o,i,s),a)(n,o,i,s);var r=(a?n:o).options.group.name;return!0===e||"string"==typeof e&&e===r||e.join&&e.indexOf(r)>-1}}var a={},n=e.group;n&&"object"==ep(n)||(n={name:n}),a.name=n.name,a.checkPull=t(n.pull,!0),a.checkPut=t(n.put),a.revertClone=n.revertClone,e.group=a},zh=function(){!Ph&&Wp&&yp(Wp,"display","none")},Ah=function(){!Ph&&Wp&&yp(Wp,"display","")};Dh&&!dp&&document.addEventListener("click",(function(e){if(bh)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),bh=!1,!1}),!0);var Oh=function(e){if(qp){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,i=e.clientY,gh.some((function(e){var t=e[_p].options.emptyInsertThreshold;if(t&&!Pp(e)){var a=Ep(e),n=o>=a.left-t&&o<=a.right+t,l=i>=a.top-t&&i<=a.bottom+t;return n&&l?s=e:void 0}})),s);if(t){var a={};for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n]);a.target=a.rootEl=t,a.preventDefault=void 0,a.stopPropagation=void 0,t[_p]._onDragOver(a)}}var o,i,s},Mh=function(e){qp&&qp.parentNode[_p]._isOutsideThisEl(e.target)};function Nh(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ap({},t),e[_p]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return kh(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Nh.supportPointer&&"PointerEvent"in window&&(!rp||cp),emptyInsertThreshold:5};for(var n in Vp.initializePlugins(this,e,a),a)!(n in t)&&(t[n]=a[n]);for(var o in Th(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&xh,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pp(e,"pointerdown",this._onTapStart):(pp(e,"mousedown",this._onTapStart),pp(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pp(e,"dragover",this),pp(e,"dragenter",this)),gh.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ap(this,Rp())}function Bh(e,t,a,n,o,i,s,l){var r,c,d=e[_p],u=d.options.onMove;return!window.CustomEvent||ip||sp?(r=document.createEvent("Event")).initEvent("move",!0,!0):r=new CustomEvent("move",{bubbles:!0,cancelable:!0}),r.to=t,r.from=e,r.dragged=a,r.draggedRect=n,r.related=o||t,r.relatedRect=i||Ep(t),r.willInsertAfter=l,r.originalEvent=s,e.dispatchEvent(r),u&&(c=u.call(d,r,s)),c}function _h(e){e.draggable=!1}function Rh(){Ch=!1}function Lh(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,a=t.length,n=0;a--;)n+=t.charCodeAt(a);return n.toString(36)}function jh(e){return setTimeout(e,0)}function Vh(e){return clearTimeout(e)}Nh.prototype={constructor:Nh,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(uh=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,qp):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,a=this.el,n=this.options,o=n.preventOnFilter,i=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(s||e).target,r=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=n.filter;if(function(e){Ih.length=0;var t=e.getElementsByTagName("input"),a=t.length;for(;a--;){var n=t[a];n.checked&&Ih.push(n)}}(a),!qp&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||n.disabled)&&!r.isContentEditable&&(this.nativeDraggable||!rp||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=bp(l,n.draggable,a,!1))&&l.animated||Xp===l)){if(Qp=kp(l),eh=kp(l,n.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Hp({sortable:t,rootEl:r,name:"filter",targetEl:l,toEl:a,fromEl:a}),Up("filter",t,{evt:e}),void(o&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=bp(r,n.trim(),a,!1))return Hp({sortable:t,rootEl:n,name:"filter",targetEl:l,fromEl:a,toEl:a}),Up("filter",t,{evt:e}),!0}))))return void(o&&e.preventDefault());n.handle&&!bp(r,n.handle,a,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,t,a){var n,o=this,i=o.el,s=o.options,l=i.ownerDocument;if(a&&!qp&&a.parentNode===i){var r=Ep(a);if(Kp=i,Gp=(qp=a).parentNode,Yp=qp.nextSibling,Xp=a,ah=s.group,Nh.dragged=qp,oh={target:qp,clientX:(t||e).clientX,clientY:(t||e).clientY},rh=oh.clientX-r.left,ch=oh.clientY-r.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,qp.style["will-change"]="all",n=function(){Up("delayEnded",o,{evt:e}),Nh.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!lp&&o.nativeDraggable&&(qp.draggable=!0),o._triggerDragStart(e,t),Hp({sortable:o,name:"choose",originalEvent:e}),wp(qp,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){Ip(qp,e.trim(),_h)})),pp(l,"dragover",Oh),pp(l,"mousemove",Oh),pp(l,"touchmove",Oh),s.supportPointer?(pp(l,"pointerup",o._onDrop),!this.nativeDraggable&&pp(l,"pointercancel",o._onDrop)):(pp(l,"mouseup",o._onDrop),pp(l,"touchend",o._onDrop),pp(l,"touchcancel",o._onDrop)),lp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,qp.draggable=!0),Up("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(sp||ip))n();else{if(Nh.eventCanceled)return void this._onDrop();s.supportPointer?(pp(l,"pointerup",o._disableDelayedDrag),pp(l,"pointercancel",o._disableDelayedDrag)):(pp(l,"mouseup",o._disableDelayedDrag),pp(l,"touchend",o._disableDelayedDrag),pp(l,"touchcancel",o._disableDelayedDrag)),pp(l,"mousemove",o._delayedDragTouchMoveHandler),pp(l,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&pp(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){qp&&_h(qp),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;hp(e,"mouseup",this._disableDelayedDrag),hp(e,"touchend",this._disableDelayedDrag),hp(e,"touchcancel",this._disableDelayedDrag),hp(e,"pointerup",this._disableDelayedDrag),hp(e,"pointercancel",this._disableDelayedDrag),hp(e,"mousemove",this._delayedDragTouchMoveHandler),hp(e,"touchmove",this._delayedDragTouchMoveHandler),hp(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?pp(document,"pointermove",this._onTouchMove):pp(document,t?"touchmove":"mousemove",this._onTouchMove):(pp(qp,"dragend",this),pp(Kp,"dragstart",this._onDragStart));try{document.selection?jh((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(vh=!1,Kp&&qp){Up("dragStarted",this,{evt:t}),this.nativeDraggable&&pp(document,"dragover",Mh);var a=this.options;!e&&wp(qp,a.dragClass,!1),wp(qp,a.ghostClass,!0),Nh.active=this,e&&this._appendGhost(),Hp({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ih){this._lastX=ih.clientX,this._lastY=ih.clientY,zh();for(var e=document.elementFromPoint(ih.clientX,ih.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ih.clientX,ih.clientY))!==t;)t=e;if(qp.parentNode[_p]._isOutsideThisEl(e),t)do{if(t[_p]){if(t[_p]._onDragOver({clientX:ih.clientX,clientY:ih.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=vp(t));Ah()}},_onTouchMove:function(e){if(oh){var t=this.options,a=t.fallbackTolerance,n=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=Wp&&Cp(Wp,!0),s=Wp&&i&&i.a,l=Wp&&i&&i.d,r=Eh&&mh&&Tp(mh),c=(o.clientX-oh.clientX+n.x)/(s||1)+(r?r[0]-yh[0]:0)/(s||1),d=(o.clientY-oh.clientY+n.y)/(l||1)+(r?r[1]-yh[1]:0)/(l||1);if(!Nh.active&&!vh){if(a&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<a)return;this._onDragStart(e,!0)}if(Wp){i?(i.e+=c-(sh||0),i.f+=d-(lh||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");yp(Wp,"webkitTransform",u),yp(Wp,"mozTransform",u),yp(Wp,"msTransform",u),yp(Wp,"transform",u),sh=c,lh=d,ih=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Wp){var e=this.options.fallbackOnBody?document.body:Kp,t=Ep(qp,!0,Eh,!0,e),a=this.options;if(Eh){for(mh=e;"static"===yp(mh,"position")&&"none"===yp(mh,"transform")&&mh!==document;)mh=mh.parentNode;mh!==document.body&&mh!==document.documentElement?(mh===document&&(mh=Dp()),t.top+=mh.scrollTop,t.left+=mh.scrollLeft):mh=Dp(),yh=Tp(mh)}wp(Wp=qp.cloneNode(!0),a.ghostClass,!1),wp(Wp,a.fallbackClass,!0),wp(Wp,a.dragClass,!0),yp(Wp,"transition",""),yp(Wp,"transform",""),yp(Wp,"box-sizing","border-box"),yp(Wp,"margin",0),yp(Wp,"top",t.top),yp(Wp,"left",t.left),yp(Wp,"width",t.width),yp(Wp,"height",t.height),yp(Wp,"opacity","0.8"),yp(Wp,"position",Eh?"absolute":"fixed"),yp(Wp,"zIndex","100000"),yp(Wp,"pointerEvents","none"),Nh.ghost=Wp,e.appendChild(Wp),yp(Wp,"transform-origin",rh/parseInt(Wp.style.width)*100+"% "+ch/parseInt(Wp.style.height)*100+"%")}},_onDragStart:function(e,t){var a=this,n=e.dataTransfer,o=a.options;Up("dragStart",this,{evt:e}),Nh.eventCanceled?this._onDrop():(Up("setupClone",this),Nh.eventCanceled||(($p=Np(qp)).removeAttribute("id"),$p.draggable=!1,$p.style["will-change"]="",this._hideClone(),wp($p,this.options.chosenClass,!1),Nh.clone=$p),a.cloneId=jh((function(){Up("clone",a),Nh.eventCanceled||(a.options.removeCloneOnHide||Kp.insertBefore($p,qp),a._hideClone(),Hp({sortable:a,name:"clone"}))})),!t&&wp(qp,o.dragClass,!0),t?(bh=!0,a._loopId=setInterval(a._emulateDragOver,50)):(hp(document,"mouseup",a._onDrop),hp(document,"touchend",a._onDrop),hp(document,"touchcancel",a._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(a,n,qp)),pp(document,"drop",a),yp(qp,"transform","translateZ(0)")),vh=!0,a._dragStartId=jh(a._dragStarted.bind(a,t,e)),pp(document,"selectstart",a),dh=!0,window.getSelection().removeAllRanges(),rp&&yp(document.body,"user-select","none"))},_onDragOver:function(e){var t,a,n,o,i=this.el,s=e.target,l=this.options,r=l.group,c=Nh.active,d=ah===r,u=l.sort,p=nh||c,h=this,m=!1;if(!Ch){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=bp(s,l.draggable,i,!0),T("dragOver"),Nh.eventCanceled)return m;if(qp.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||h._ignoreWhileAnimating===s)return A(!1);if(bh=!1,c&&!l.disabled&&(d?u||(n=Gp!==Kp):nh===this||(this.lastPutMode=ah.checkPull(this,c,qp,e))&&r.checkPut(this,c,qp,e))){if(o="vertical"===this._getDirection(e,s),t=Ep(qp),T("dragOverValid"),Nh.eventCanceled)return m;if(n)return Gp=Kp,z(),this._hideClone(),T("revert"),Nh.eventCanceled||(Yp?Kp.insertBefore(qp,Yp):Kp.appendChild(qp)),A(!0);var v=Pp(i,l.draggable);if(!v||function(e,t,a){var n=Ep(Pp(a.el,a.options.draggable)),o=Bp(a.el,a.options,Wp),i=10;return t?e.clientX>o.right+i||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>o.bottom+i||e.clientX>n.right&&e.clientY>n.top}(e,o,this)&&!v.animated){if(v===qp)return A(!1);if(v&&i===e.target&&(s=v),s&&(a=Ep(s)),!1!==Bh(Kp,i,qp,t,s,a,e,!!s))return z(),v&&v.nextSibling?i.insertBefore(qp,v.nextSibling):i.appendChild(qp),Gp=i,O(),A(!0)}else if(v&&function(e,t,a){var n=Ep(xp(a.el,0,a.options,!0)),o=Bp(a.el,a.options,Wp),i=10;return t?e.clientX<o.left-i||e.clientY<n.top&&e.clientX<n.right:e.clientY<o.top-i||e.clientY<n.bottom&&e.clientX<n.left}(e,o,this)){var b=xp(i,0,l,!0);if(b===qp)return A(!1);if(a=Ep(s=b),!1!==Bh(Kp,i,qp,t,s,a,e,!1))return z(),i.insertBefore(qp,b),Gp=i,O(),A(!0)}else if(s.parentNode===i){a=Ep(s);var g,f,w,y=qp.parentNode!==i,C=!function(e,t,a){var n=a?e.left:e.top,o=a?e.right:e.bottom,i=a?e.width:e.height,s=a?t.left:t.top,l=a?t.right:t.bottom,r=a?t.width:t.height;return n===s||o===l||n+i/2===s+r/2}(qp.animated&&qp.toRect||t,s.animated&&s.toRect||a,o),I=o?"top":"left",D=Sp(s,"top","top")||Sp(qp,"top","top"),E=D?D.scrollTop:void 0;if(uh!==s&&(f=a[I],fh=!1,wh=!C&&l.invertSwap||y),g=function(e,t,a,n,o,i,s,l){var r=n?e.clientY:e.clientX,c=n?a.height:a.width,d=n?a.top:a.left,u=n?a.bottom:a.right,p=!1;if(!s)if(l&&hh<c*o){if(!fh&&(1===ph?r>d+c*i/2:r<u-c*i/2)&&(fh=!0),fh)p=!0;else if(1===ph?r<d+hh:r>u-hh)return-ph}else if(r>d+c*(1-o)/2&&r<u-c*(1-o)/2)return function(e){return kp(qp)<kp(e)?1:-1}(t);if((p=p||s)&&(r<d+c*i/2||r>u-c*i/2))return r>d+c/2?1:-1;return 0}(e,s,a,o,C?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,wh,uh===s),0!==g){var S=kp(qp);do{S-=g,w=Gp.children[S]}while(w&&("none"===yp(w,"display")||w===Wp))}if(0===g||w===s)return A(!1);uh=s,ph=g;var x=s.nextElementSibling,P=!1,k=Bh(Kp,i,qp,t,s,a,e,P=1===g);if(!1!==k)return 1!==k&&-1!==k||(P=1===k),Ch=!0,setTimeout(Rh,30),z(),P&&!x?i.appendChild(qp):s.parentNode.insertBefore(qp,P?x:s),D&&Mp(D,0,E-D.scrollTop),Gp=qp.parentNode,void 0===f||wh||(hh=Math.abs(f-Ep(s)[I])),O(),A(!0)}if(i.contains(qp))return A(!1)}return!1}function T(l,r){Up(l,h,Zu({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:n,dragRect:t,targetRect:a,canSort:u,fromSortable:p,target:s,completed:A,onMove:function(a,n){return Bh(Kp,i,qp,t,a,Ep(a),e,n)},changed:O},r))}function z(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function A(t){return T("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(h),h!==p&&(wp(qp,nh?nh.options.ghostClass:c.options.ghostClass,!1),wp(qp,l.ghostClass,!0)),nh!==h&&h!==Nh.active?nh=h:h===Nh.active&&nh&&(nh=null),p===h&&(h._ignoreWhileAnimating=s),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s===qp&&!qp.animated||s===i&&!s.animated)&&(uh=null),l.dragoverBubble||e.rootEl||s===document||(qp.parentNode[_p]._isOutsideThisEl(e.target),!t&&Oh(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function O(){Zp=kp(qp),th=kp(qp,l.draggable),Hp({sortable:h,name:"change",toEl:i,newIndex:Zp,newDraggableIndex:th,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){hp(document,"mousemove",this._onTouchMove),hp(document,"touchmove",this._onTouchMove),hp(document,"pointermove",this._onTouchMove),hp(document,"dragover",Oh),hp(document,"mousemove",Oh),hp(document,"touchmove",Oh)},_offUpEvents:function(){var e=this.el.ownerDocument;hp(e,"mouseup",this._onDrop),hp(e,"touchend",this._onDrop),hp(e,"pointerup",this._onDrop),hp(e,"pointercancel",this._onDrop),hp(e,"touchcancel",this._onDrop),hp(document,"selectstart",this)},_onDrop:function(e){var t=this.el,a=this.options;Zp=kp(qp),th=kp(qp,a.draggable),Up("drop",this,{evt:e}),Gp=qp&&qp.parentNode,Zp=kp(qp),th=kp(qp,a.draggable),Nh.eventCanceled||(vh=!1,wh=!1,fh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vh(this.cloneId),Vh(this._dragStartId),this.nativeDraggable&&(hp(document,"drop",this),hp(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rp&&yp(document.body,"user-select",""),yp(qp,"transform",""),e&&(dh&&(e.cancelable&&e.preventDefault(),!a.dropBubble&&e.stopPropagation()),Wp&&Wp.parentNode&&Wp.parentNode.removeChild(Wp),(Kp===Gp||nh&&"clone"!==nh.lastPutMode)&&$p&&$p.parentNode&&$p.parentNode.removeChild($p),qp&&(this.nativeDraggable&&hp(qp,"dragend",this),_h(qp),qp.style["will-change"]="",dh&&!vh&&wp(qp,nh?nh.options.ghostClass:this.options.ghostClass,!1),wp(qp,this.options.chosenClass,!1),Hp({sortable:this,name:"unchoose",toEl:Gp,newIndex:null,newDraggableIndex:null,originalEvent:e}),Kp!==Gp?(Zp>=0&&(Hp({rootEl:Gp,name:"add",toEl:Gp,fromEl:Kp,originalEvent:e}),Hp({sortable:this,name:"remove",toEl:Gp,originalEvent:e}),Hp({rootEl:Gp,name:"sort",toEl:Gp,fromEl:Kp,originalEvent:e}),Hp({sortable:this,name:"sort",toEl:Gp,originalEvent:e})),nh&&nh.save()):Zp!==Qp&&Zp>=0&&(Hp({sortable:this,name:"update",toEl:Gp,originalEvent:e}),Hp({sortable:this,name:"sort",toEl:Gp,originalEvent:e})),Nh.active&&(null!=Zp&&-1!==Zp||(Zp=Qp,th=eh),Hp({sortable:this,name:"end",toEl:Gp,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Up("nulling",this),Kp=qp=Gp=Wp=Yp=$p=Xp=Jp=oh=ih=dh=Zp=th=Qp=eh=uh=ph=nh=ah=Nh.dragged=Nh.ghost=Nh.clone=Nh.active=null,Ih.forEach((function(e){e.checked=!0})),Ih.length=sh=lh=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":qp&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],a=this.el.children,n=0,o=a.length,i=this.options;n<o;n++)bp(e=a[n],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Lh(e));return t},sort:function(e,t){var a={},n=this.el;this.toArray().forEach((function(e,t){var o=n.children[t];bp(o,this.options.draggable,n,!1)&&(a[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){a[e]&&(n.removeChild(a[e]),n.appendChild(a[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return bp(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var a=this.options;if(void 0===t)return a[e];var n=Vp.modifyOption(this,e,t);a[e]=void 0!==n?n:t,"group"===e&&Th(a)},destroy:function(){Up("destroy",this);var e=this.el;e[_p]=null,hp(e,"mousedown",this._onTapStart),hp(e,"touchstart",this._onTapStart),hp(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(hp(e,"dragover",this),hp(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),gh.splice(gh.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Jp){if(Up("hideClone",this),Nh.eventCanceled)return;yp($p,"display","none"),this.options.removeCloneOnHide&&$p.parentNode&&$p.parentNode.removeChild($p),Jp=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Jp){if(Up("showClone",this),Nh.eventCanceled)return;qp.parentNode!=Kp||this.options.group.revertClone?Yp?Kp.insertBefore($p,Yp):Kp.appendChild($p):Kp.insertBefore($p,qp),this.options.group.revertClone&&this.animate(qp,$p),yp($p,"display",""),Jp=!1}}else this._hideClone()}},Dh&&pp(document,"touchmove",(function(e){(Nh.active||vh)&&e.cancelable&&e.preventDefault()})),Nh.utils={on:pp,off:hp,css:yp,find:Ip,is:function(e,t){return!!bp(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e},throttle:Op,closest:bp,toggleClass:wp,clone:Np,index:kp,nextTick:jh,cancelNextTick:Vh,detectDirection:kh,getChild:xp,expando:_p},Nh.get=function(e){return e[_p]},Nh.mount=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Nh.utils=Zu(Zu({},Nh.utils),e.utils)),Vp.mount(e)}))},Nh.create=function(e,t){return new Nh(e,t)},Nh.version="1.15.6";var Fh,Uh,Hh,qh,Gh,Wh,Kh=[],Yh=!1;function Xh(){Kh.forEach((function(e){clearInterval(e.pid)})),Kh=[]}function $h(){clearInterval(Wh)}var Jh=Op((function(e,t,a,n){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,r=t.scrollSpeed,c=Dp(),d=!1;Uh!==a&&(Uh=a,Xh(),Fh=t.scroll,o=t.scrollFn,!0===Fh&&(Fh=zp(a,!0)));var u=0,p=Fh;do{var h=p,m=Ep(h),v=m.top,b=m.bottom,g=m.left,f=m.right,w=m.width,y=m.height,C=void 0,I=void 0,D=h.scrollWidth,E=h.scrollHeight,S=yp(h),x=h.scrollLeft,P=h.scrollTop;h===c?(C=w<D&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),I=y<E&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(C=w<D&&("auto"===S.overflowX||"scroll"===S.overflowX),I=y<E&&("auto"===S.overflowY||"scroll"===S.overflowY));var k=C&&(Math.abs(f-i)<=l&&x+w<D)-(Math.abs(g-i)<=l&&!!x),T=I&&(Math.abs(b-s)<=l&&P+y<E)-(Math.abs(v-s)<=l&&!!P);if(!Kh[u])for(var z=0;z<=u;z++)Kh[z]||(Kh[z]={});Kh[u].vx==k&&Kh[u].vy==T&&Kh[u].el===h||(Kh[u].el=h,Kh[u].vx=k,Kh[u].vy=T,clearInterval(Kh[u].pid),0==k&&0==T||(d=!0,Kh[u].pid=setInterval(function(){n&&0===this.layer&&Nh.active._onTouchMove(Gh);var t=Kh[this.layer].vy?Kh[this.layer].vy*r:0,a=Kh[this.layer].vx?Kh[this.layer].vx*r:0;"function"==typeof o&&"continue"!==o.call(Nh.dragged.parentNode[_p],a,t,e,Gh,Kh[this.layer].el)||Mp(Kh[this.layer].el,a,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==c&&(p=zp(p,!1)));Yh=d}}),30),Qh=function(e){var t=e.originalEvent,a=e.putSortable,n=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var r=a||o;s();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),r&&!r.el.contains(d)&&(i("spill"),this.onSpill({dragEl:n,putSortable:a}))}};function Zh(){}function em(){}function tm(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}Zh.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,a=e.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var n=xp(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),a&&a.animateAll()},drop:Qh},ap(Zh,{pluginName:"revertOnSpill"}),em.prototype={onSpill:function(e){var t=e.dragEl,a=e.putSortable||this.sortable;a.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),a.animateAll()},drop:Qh},ap(em,{pluginName:"removeOnSpill"}),Nh.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?pp(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pp(document,"pointermove",this._handleFallbackAutoScroll):t.touches?pp(document,"touchmove",this._handleFallbackAutoScroll):pp(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?hp(document,"dragover",this._handleAutoScroll):(hp(document,"pointermove",this._handleFallbackAutoScroll),hp(document,"touchmove",this._handleFallbackAutoScroll),hp(document,"mousemove",this._handleFallbackAutoScroll)),$h(),Xh(),clearTimeout(gp),gp=void 0},nulling:function(){Gh=Uh=Fh=Yh=Wh=Hh=qh=null,Kh.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var a=this,n=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(n,o);if(Gh=e,t||this.options.forceAutoScrollFallback||sp||ip||rp){Jh(e,this.options,i,t);var s=zp(i,!0);!Yh||Wh&&n===Hh&&o===qh||(Wh&&$h(),Wh=setInterval((function(){var i=zp(document.elementFromPoint(n,o),!0);i!==s&&(s=i,Xh()),Jh(e,a.options,i,t)}),10),Hh=n,qh=o)}else{if(!this.options.bubbleScroll||zp(i,!0)===Dp())return void Xh();Jh(e,this.options,zp(i,!1),!1)}}},ap(e,{pluginName:"scroll",initializeByDefault:!0})}),Nh.mount(em,Zh);const am=a({name:"IBizRepeaterGrid",props:{controller:{type:on,required:!0}},emits:{change:e=>!0},setup(e,{emit:t}){const a=B("repeater-grid"),s=[],l=n(),r=n(ei());Vt(e.controller.repeatedForm,(e=>{var t;"FORMITEM"===e.detailType&&"HIDDEN"!==(null==(t=e.editor)?void 0:t.editorType)&&s.push(e)}),{childrenFields:["deformPages","deformTabPages","deformDetails"]});const d=he(),h=u([]),m=async(a={})=>{const n=new sn(e.controller.repeatedForm,e.controller.context,e.controller.params,d);n.state.isSimple=!0,await n.created(),n.setSimpleData(a),h.push(n),e.controller.setRepeaterController("".concat(h.length-1),n),n.evt.on("onFormDataChange",(a=>{const o=a.data[0];((a,n)=>{const o=[...e.controller.value];o[n]=a,t("change",o)})(o instanceof ua?o.clone():{...o},h.indexOf(n))}))};let v;c((()=>e.controller.value),(e=>{e&&e.length>0&&(e.forEach(((e,t)=>{const a=h[t];if(a){const t=e||{};Object.keys(a.data).find((e=>t[e]!==a.data[e]))&&a.setSimpleData(t)}else m(e)})),e.length<h.length&&h.forEach(((t,a)=>{a>=e.length&&(t.state.isLoaded=!1)})))}),{immediate:!0,deep:!0});c((()=>l.value),(()=>{e.controller.enableSort&&(l.value?(()=>{var t,n;const o=null==(n=null==(t=l.value)?void 0:t.$el)?void 0:n.querySelector(".el-table__body-wrapper tbody");o&&e.controller.enableSort&&(v=Nh.create(o,{animation:150,handle:".".concat(a.e("drag-icon")),ghostClass:"".concat(a.e("sortable-ghost")),onEnd({newIndex:t,oldIndex:a}){e.controller.dragChange(a,t),r.value=ei()}}))})():null==v||v.destroy())})),p((()=>null==v?void 0:v.destroy()));return{ns:a,tableRef:l,tableKey:r,formItems:s,formControllers:h,renderRemoveBtn:t=>{let n;return e.controller.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?o(i("el-popconfirm"),{title:zt(ibiz.i18n.t("control.form.repeaterGrid.promptInformation")),"confirm-button-text":ibiz.i18n.t("app.confirm"),"cancel-button-text":ibiz.i18n.t("app.cancel"),onConfirm:()=>e.controller.remove(t)},{reference:()=>{let e;return o(i("el-button"),{text:!0,type:"danger",class:[a.be("index","remove")]},tm(e=ibiz.i18n.t("app.delete"))?e:{default:()=>[e]})}}):o(i("el-button"),{text:!0,type:"danger",class:[a.be("index","remove")],onClick:()=>e.controller.remove(t)},tm(n=ibiz.i18n.t("app.delete"))?n:{default:()=>[n]}):null}}},render(){let e;return o("div",{class:this.ns.b()},[this.controller.enableCreate&&o(i("el-button"),{class:this.ns.e("add-btn"),onClick:()=>{this.controller.create()}},tm(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]}),o(i("el-table"),{ref:"tableRef",key:this.tableKey,"show-header":!0,class:this.ns.e("table"),data:this.controller.value,"cell-class-name":({columnIndex:e})=>(this.controller.enableSort?1===e:0===e)?this.ns.b("index"):""},{default:()=>[this.controller.enableSort&&o(i("el-table-column"),{width:26,type:"default"},{default:()=>o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",class:this.ns.e("drag-icon"),preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])])}),o(i("el-table-column"),{type:"index",width:66,align:"center"},{default:e=>{const{$index:t}=e;return this.controller.enableDelete?[this.renderRemoveBtn(t),o("span",{class:this.ns.be("index","text")},[t+1])]:o("span",null,[t+1])}}),this.formItems.length>0&&this.formItems.map((e=>{const t=e.labelWidth;let a="";return"number"==typeof t&&(a="".concat(t,"px")),o(i("el-table-column"),{label:e.caption,prop:e.id,width:a,align:"center"},{default:t=>{const{$index:a}=t,n=k(this.formControllers[a]);if(!n||!n.state.isLoaded)return o("div",null,[ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);const s=n.formItems.find((t=>t.name===e.id));let l=null;if(s.editorProvider){const e=i(s.editorProvider.formEditor);l=r(e,{value:s.value,data:s.data,controller:s.editor,disabled:s.state.disabled,readonly:s.state.readonly,onChange:(e,t)=>{s.setDataValue(e,t)}})}else l=o(i("not-supported-editor"),{modelData:e.editor},null);return o(i("iBizGridEditItem"),{error:s.state.error,required:s.state.required},tm(l)?l:{default:()=>[l]})}})}))]})])}}),nm=a({name:"IBizFormMDCtrlRepeater",props:{controller:{type:on,required:!0}},setup:e=>({ns:B("form-mdctrl-repeater"),onDataChange:t=>{e.controller.setValue(t)}}),render(){const e=[this.ns.b()];switch(this.controller.repeaterStyle){case"MultiForm":return o(Ju,{class:e,onChange:this.onDataChange,controller:this.controller},null);case"Grid":return o(am,{class:e,controller:this.controller,onChange:this.onDataChange},null);case"SingleForm":return o($u,{class:e,data:this.controller.value,controller:this.controller,onChange:this.onDataChange},null);default:return o("div",{class:e},[ibiz.i18n.t("control.form.formMDctrlRepeater.noSupportStyle",{repeaterStyle:this.controller.repeaterStyle})])}}});var om=Object.defineProperty,im=(e,t,a)=>(((e,t,a)=>{t in e?om(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sm{constructor(){im(this,"component","IBizFormMDCtrl")}async createController(e,t,a){let n;switch(e.contentType){case"LIST":case"GRID":case"DATAVIEW":n=new nn(e,t,a);break;case"FORM":n=new an(e,t,a);break;case"REPEATER":n=new on(e,t,a);break;default:throw new Ft(e,"".concat(ibiz.i18n.t("control.form.formMDctrl.errorMessage",{contentType:e.contentType})))}return await n.init(),n}}function lm(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const rm=a({name:"IBizMDCtrlContainer",components:{draggable:Ui},props:{enableCreate:{type:Boolean,required:!0},enableDelete:{type:Boolean,required:!0},items:{type:Object,required:!0},userStyle:{type:String},enableSort:{type:Boolean,required:!1}},emits:{addClick:()=>!0,removeClick:(e,t)=>!0,dragChange:(e,t)=>!0},setup(e,{emit:t,slots:a}){const n=B("mdctrl-container"),s=n.be("item","icon-drag"),r=l((()=>e.enableCreate||e.enableDelete)),c=l((()=>[...e.items])),d=()=>o("div",{class:[s]},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])])]),u=()=>{let e;return o(i("el-button"),{class:[n.be("item-actions","create"),n.be("item-actions","btn")],onClick:()=>t("addClick")},lm(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]})},p=(a,s)=>{let l;return e.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?o(i("el-popconfirm"),{title:zt(ibiz.i18n.t("control.form.mdCtrlContainer.promptInformation")),"confirm-button-text":ibiz.i18n.t("app.confirm"),"cancel-button-text":ibiz.i18n.t("app.cancel"),onConfirm:()=>t("removeClick",a,s)},{reference:()=>{let e;return o(i("el-button"),{type:"danger",class:[n.be("item-actions","remove"),n.be("item-actions","btn")]},lm(e=ibiz.i18n.t("app.delete"))?e:{default:()=>[e]})}}):o(i("el-button"),{type:"danger",class:[n.be("item-actions","remove"),n.be("item-actions","btn")],onClick:()=>t("removeClick",a,s)},lm(l=ibiz.i18n.t("app.delete"))?l:{default:()=>[l]}):null};return{ns:n,showActions:r,dragClssName:s,dragItems:c,renderDragBtn:d,renderAddBtn:u,renderDefaultItem:(t,i)=>{const s=a.item?a.item({data:t,index:i}):o("div",null,[ibiz.i18n.t("control.form.mdCtrlContainer.noSlot")]);return o("div",{class:n.b("item")},[o("div",{class:n.be("item","left")},[e.enableSort&&d()]),s,p(t,i),e.enableCreate&&o("div",{class:n.be("item","right")},[0===i&&u()])])},renderRemoveBtn:p,renderStyle2AddBtn:()=>o(i("el-button"),{class:[n.be("style2-item-actions","create"),n.be("style2-item-actions","btn")],title:ibiz.i18n.t("app.add"),onClick:()=>t("addClick")},{default:()=>[o("ion-icon",{name:"add-outline"},null),ibiz.i18n.t("app.add")]}),renderStyle2RemoveBtn:(a,s)=>{let l;return e.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?o(i("el-popconfirm"),{title:zt(ibiz.i18n.t("control.form.mdCtrlContainer.promptInformation")),"confirm-button-text":ibiz.i18n.t("app.confirm"),"cancel-button-text":ibiz.i18n.t("app.cancel"),onConfirm:()=>t("removeClick",a,s)},{reference:()=>o(i("el-button"),{type:"danger",class:[n.be("style2-item-actions","remove"),n.be("style2-item-actions","btn")],title:ibiz.i18n.t("app.delete")},{default:()=>[o("ion-icon",{name:"trash-outline"},null)]})}):o(i("el-button"),{type:"danger",class:[n.be("item-actions","remove"),n.be("item-actions","btn")],onClick:()=>t("removeClick",a,s)},lm(l=ibiz.i18n.t("app.delete"))?l:{default:()=>[l]}):null},handleDragChange:e=>{const{moved:a}=e,n=a.oldIndex,o=a.newIndex;t("dragChange",n,o)}}},render(){var e,t;if("STYLE2"===this.userStyle)return o("div",{class:[this.ns.b(),this.ns.b("style2")]},[(null==(e=this.items)?void 0:e.length)?o("div",{class:this.ns.e("item-container")},[this.showActions&&this.enableCreate&&this.renderStyle2AddBtn(),this.items.map(((e,t)=>{const a=this.$slots.item?this.$slots.item({data:e,index:t}):o("div",null,[ibiz.i18n.t("control.form.mdCtrlContainer.noSlot")]);return o("div",{class:this.ns.b("item")},[a,this.showActions&&o("div",{class:this.ns.b("style2-item-actions")},[this.renderStyle2RemoveBtn(e,t)])])}))]):o("div",{class:this.ns.b("no-data")},[this.enableCreate&&o("div",{class:this.ns.b("style2-item-actions")},[this.renderStyle2AddBtn()])])]);let a;return(null==(t=this.items)?void 0:t.length)&&(a=this.enableSort?o(Ui,{itemKey:"id",ref:"container",list:this.dragItems,class:[this.ns.e("drag")],handle:".".concat(this.dragClssName),onChange:this.handleDragChange,chosenClass:this.ns.is("drag-chosen",!0)},{item:({element:e,index:t})=>this.renderDefaultItem(e,t)}):this.items.map(((e,t)=>this.renderDefaultItem(e,t)))),o("div",{class:this.ns.b()},[a||o("div",{class:this.ns.b("no-data")},[this.enableCreate&&o("div",{class:this.ns.b("item-actions")},[this.renderAddBtn()])])])}}),cm=a({name:"IBizMDCtrlContainer2",components:{draggable:Ui},props:{controller:{type:an,required:!0},items:{type:Array,default:()=>[]}},setup(e){const t=B("mdctrl-container2"),a=n("");c((()=>e.items),(()=>{var t;a.value||(a.value=(null==(t=e.items[0])?void 0:t.id)||"")}),{immediate:!0});const o=n(""),i=n(),s=n(!1),l=n(!1),r=n(!0);let u;const h=()=>{if(i.value){const e=i.value.$el;e&&(s.value=e.scrollLeft>0,l.value=e.scrollLeft<e.scrollWidth-e.offsetWidth,r.value=e.offsetWidth>e.scrollWidth)}};d((()=>{i.value&&i.value.$el&&(u=new ResizeObserver((e=>{e.forEach((()=>{h()}))})),u.observe(i.value.$el))})),p((()=>{u&&u.disconnect()}));return{ns:t,currentItem:a,draggingKey:o,container:i,isShowLeftArrow:s,isShowRightArrow:l,isShowBorder:r,handleSelect:(e,t)=>{e.stopPropagation(),a.value=t.id},handleAdd:t=>{var n;t.stopPropagation(),e.controller.create(),a.value=(null==(n=e.items[e.items.length-1])?void 0:n.id)||""},handleRemove:async(t,n)=>{var o;t.stopPropagation(),await e.controller.remove(n.id),a.value===n.id&&(a.value=(null==(o=e.items[0])?void 0:o.id)||""),h()},handleArrowClick:(e,a)=>{if(e.stopPropagation(),i.value){const e=i.value.$el;if(e){const n=Array.from(e.children||[]).find((e=>e.classList.contains(t.b("header-item"))));if(n){const t=n.offsetWidth;"right"===a&&(e.scrollLeft+=t),"left"===a&&(e.scrollLeft-=t)}h()}}},handleDragStart:e=>{o.value=e.id},handleDragEnd:()=>{o.value="",e.controller.updateData(),h()}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:[this.ns.b("header")]},[o(Ui,{ref:"container",class:[this.ns.b("header-content")],list:this.items,ghostClass:this.ns.bm("header-item","ghost"),itemKey:"id"},{item:({element:e})=>o("div",{class:[this.ns.b("header-item"),this.draggingKey&&this.ns.bm("header-item","dragging"),this.draggingKey===e.id&&this.ns.bm("header-item","drag"),this.currentItem===e.id&&this.ns.bm("header-item","active")],onDragstart:()=>{this.handleDragStart(e)},onDragend:()=>{this.handleDragEnd()},onClick:t=>{this.handleSelect(t,e)}},[o("div",{class:this.ns.be("header-item","drag-icon")},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])])]),o("div",{class:this.ns.be("header-item","text")},[e.title]),this.controller.enableDelete&&o("div",{class:this.ns.be("header-item","btn"),title:zt(ibiz.i18n.t("app.delete")),onClick:t=>{this.handleRemove(t,e)}},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M4.002 3.403V1a1 1 0 0 1 1-1h6.003a1 1 0 0 1 1 1v2.403h3.396a.6.6 0 1 1 0 1.2h-1.395V15a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.603H.6a.6.6 0 1 1 0-1.2h3.4zm8.804 1.205H3.2V14.8h9.605V4.608zM5.202 1.2v2.155h5.603V1.2H5.202zm.6 6.417a.6.6 0 0 1 1.201 0v4.758a.6.6 0 0 1-1.2 0V7.617zm3.202 0a.6.6 0 0 1 1.2 0v4.758a.6.6 0 0 1-1.2 0V7.617z"},null)])])])]),footer:()=>[this.controller.enableCreate&&o("div",{class:[this.ns.b("header-item"),!this.isShowBorder&&this.ns.bm("header-item","hidden-border")],onClick:e=>{this.handleAdd(e)}},[o("div",{class:this.ns.be("header-item","icon")},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z"},null)])])]),o("div",{class:this.ns.be("header-item","text")},[ibiz.i18n.t("app.add")])]),this.isShowLeftArrow&&o("div",{class:this.ns.b("header-left-arrow"),onClick:e=>{this.handleArrowClick(e,"left")}},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.028 10.976l5.951-5.952a.6.6 0 0 1 1.024.425V11.4a.6.6 0 0 1-.6.6H7.452a.6.6 0 0 1-.424-1.024z",transform:"scale(-1 1) rotate(-45 0 32.15)"},null)])])]),this.isShowRightArrow&&o("div",{class:this.ns.b("header-right-arrow"),onClick:e=>{this.handleArrowClick(e,"right")}},[o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M3.028 10.976l5.951-5.952a.6.6 0 0 1 1.024.425V11.4a.6.6 0 0 1-.6.6H3.452a.6.6 0 0 1-.424-1.024z",transform:"rotate(-45 6.003 8)"},null)])])])]})]),o("div",{class:this.ns.b("content")},[this.items.map((e=>{var t,a;return o("div",{key:e.id,class:this.ns.b("content-item"),style:{display:e.id!==this.currentItem?"none":""}},[null==(a=(t=this.$slots).item)?void 0:a.call(t,{data:e})])}))])])}}),dm=e("K",oe(Wu,(function(e){e.component(Wu.name,Wu),e.component(Ku.name,Ku),e.component(Xu.name,Xu),e.component(nm.name,nm),e.component(rm.name,rm),e.component(cm.name,cm),$a("MDCTRL",(()=>new sm))})));const um=a({name:"IBizFormRawItem",props:{modelData:{type:Object,required:!0},controller:{type:ln,required:!0}},setup(e){var t;const a=B("form-raw-item"),r=e.controller,d=n(""),u=l((()=>!(!e.controller.form.controlParams||"hover"!==e.controller.form.controlParams.editmode))),p="DESIGN"===(null==(t=r.context)?void 0:t.srfrunmode);return c((()=>r.data),(async e=>{if(e){const t=r.model.rawItem;if(!t)return;let a="";const n={...e};"RAW"===t.contentType?a=t.caption:"HTML"===t.contentType&&(a=t.content),a&&t.templateMode&&(a=await ibiz.util.hbs.render(a.replaceAll("//n","\n"),Object.assign(n,{data:{...e}}))),d.value=a}}),{immediate:!0}),{ns:a,content:d,showFormDefaultContent:u,isDesignPreview:p,renderPreviewContent:()=>{var t;let n;switch(null==(t=e.modelData.rawItem)?void 0:t.contentType){case"RAW":{const t=e.modelData.rawItem.caption||"";return o("div",{class:a.be("preview-content","raw")},[t])}case"HTML":{const t=e.modelData.rawItem.content||"";return o("div",{class:a.be("preview-content","html"),innerHTML:t},null)}case"IMAGE":return o("div",{class:a.be("preview-content","image")},[o("svg",{width:"56px",height:"56px",viewBox:"0 0 56 56",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[o("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[o("g",{transform:"translate(4.000000, 0.000000)",fill:"#8c8c8c","fill-rule":"nonzero"},[o("rect",{opacity:"0",x:"0",y:"0",width:"48",height:"48"},null),o("path",{d:"M43.5,7.5 L4.5,7.5 C3.6703125,7.5 3,8.1703125 3,9 L3,39 C3,39.8296875 3.6703125,40.5 4.5,40.5 L43.5,40.5 C44.3296875,40.5 45,39.8296875 45,39 L45,9 C45,8.1703125 44.3296875,7.5 43.5,7.5 Z M15.84375,14.25 C17.4984375,14.25 18.84375,15.5953125 18.84375,17.25 C18.84375,18.9046875 17.4984375,20.25 15.84375,20.25 C14.1890625,20.25 12.84375,18.9046875 12.84375,17.25 C12.84375,15.5953125 14.1890625,14.25 15.84375,14.25 Z M39.9328125,34.7390625 C39.8671875,34.7953125 39.778125,34.828125 39.6890625,34.828125 L8.30625,34.828125 C8.1,34.828125 7.93125,34.659375 7.93125,34.453125 C7.93125,34.3640625 7.9640625,34.2796875 8.0203125,34.209375 L16.003125,24.740625 C16.134375,24.58125 16.3734375,24.5625 16.5328125,24.69375 C16.546875,24.7078125 16.565625,24.721875 16.5796875,24.740625 L21.2390625,30.271875 L28.65,21.4828125 C28.78125,21.3234375 29.0203125,21.3046875 29.1796875,21.4359375 C29.19375,21.45 29.2125,21.4640625 29.2265625,21.4828125 L39.9890625,34.2140625 C40.1109375,34.36875 40.0921875,34.6078125 39.9328125,34.7390625 Z"},null)])])])]);case"VIDEO":return o("div",{class:a.be("preview-content","video")},[o("svg",{width:"56px",height:"56px",viewBox:"0 0 56 56",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[o("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[o("g",{transform:"translate(4.000000, 4.000000)","fill-rule":"nonzero"},[o("rect",{opacity:"0",x:"0",y:"0",width:"48",height:"48"},null),o("rect",{"stroke-width":"2",x:"5",y:"5",width:"38",height:"38",rx:"2",stroke:"#1890FF"},null),o("path",{d:"M19.842,16.7706563 L30.3061875,22.4005313 C31.4090625,22.993875 31.822125,24.369 31.2287812,25.4717812 C30.9959833,25.9045408 30.6289074,26.2499678 30.1828125,26.4560625 L19.7187188,31.290375 C18.5818125,31.8156563 17.2343438,31.3198125 16.7090625,30.1828125 C16.571335,29.8846905 16.5,29.560211 16.5,29.2318125 L16.5,18.767625 C16.5,17.5153125 17.5153125,16.5 18.767625,16.5 C19.142625,16.5 19.5118125,16.593 19.842,16.7706563 Z",fill:"#1890FF"},null)])])])]);case"PLACEHOLDER":return null;case"DIVIDER":return o(i("el-divider"),{class:a.be("preview-content","divider")},"function"==typeof(l=n=ibiz.i18n.t("control.form.formRawItem.dividerText"))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?n:{default:()=>[n]});case"INFO":return o(i("el-alert"),{class:a.be("preview-content","info"),title:ibiz.i18n.t("control.form.formRawItem.infoText"),type:"info",closable:!1,"show-icon":!0},null);case"WARNING":return o(i("el-alert"),{class:a.be("preview-content","warning"),title:ibiz.i18n.t("control.form.formRawItem.warningText"),type:"warning",closable:!1,"show-icon":!0},null);case"ERROR":return o(i("el-alert"),{class:a.be("preview-content","error"),title:ibiz.i18n.t("control.form.formRawItem.errorText"),type:"error",closable:!1,"show-icon":!0},null);default:return o("div",{class:a.be("preview-content","default")},[ibiz.i18n.t("control.form.formRawItem.defaultText")])}var l}}},render(){var e;return this.controller.state.visible?this.isDesignPreview?o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("preview-content")},[this.renderPreviewContent()])]):o(i("iBizRawItem"),{class:[this.ns.b(),...this.controller.containerClass,this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("form-text",["TEXT","RAW"].includes((null==(e=this.modelData.rawItem)?void 0:e.contentType)||""))],rawItem:this.modelData,content:this.content,onClick:e=>this.controller.onClick(e)},null):null}});var pm=Object.defineProperty,hm=(e,t,a)=>(((e,t,a)=>{t in e?pm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class mm{constructor(){hm(this,"component","IBizFormRawItem")}async createController(e,t,a){const n=new ln(e,t,a);return await n.init(),n}}const vm=e("L",oe(um,(function(e){e.component(um.name,um),$a("RAWITEM",(()=>new mm))})));function bm(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const gm=a({name:"IBizFormTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:rn,required:!0}},setup(e,{slots:t}){const a=B("form-tab-panel");pe(e.controller);let o=null;const i=u({}),s=n(""),l=e=>{i.value=e};return d((()=>{var a,n;const i=(null==(a=t.default)?void 0:a.call(t))||[];for(let e=0;e<i.length;e++){const t=null==(n=i[e].props)?void 0:n.controller;if(t&&t.model&&t.model.appCounterRefId){s.value=t.model.appCounterRefId;break}}s.value&&(o=e.controller.getCounter(s.value),o&&o.onChange(l))})),p((()=>{null==o||o.offChange(l)})),{ns:a,onTabClick:(t,a)=>{e.controller.onTabChange(t.props.name);const n=e.controller.form.details[t.props.name];n&&n.onClick(a)},counterData:i}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=e=>o("span",{class:[this.ns.b("tab-item-content"),...e.labelClass]},[e.model.sysImage&&o(i("iBizIcon"),{icon:e.model.sysImage},null),e.model.showCaption&&e.model.caption]);return o(i("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.modelData.detailStyle?this.ns.m(this.modelData.detailStyle.toLowerCase()):"",...this.controller.containerClass],"model-value":this.controller.state.activeTab,onTabClick:this.onTabClick},bm(a=n.map((e=>{const t=e.props;if(!t||!t.controller)return e;const a=t.controller;return a.state.visible||a.state.keepAlive?o(i("el-tab-pane"),{class:this.ns.b("tab-item"),label:a.model.caption,name:a.model.id,lazy:!0},{default:()=>e,label:()=>{let e;const t=a.model.counterId?this.counterData.value[a.model.counterId]:void 0;return a.model.counterId?o(i("el-badge"),{class:[this.ns.e("badge"),this.ns.is("no-counter",!t&&0!==t||1===a.model.counterMode&&t<=0)],value:t,hidden:!t&&0!==t||1===a.model.counterMode&&t<=0,max:99},bm(e=s(a))?e:{default:()=>[e]}):s(a)}}):null})))?a:{default:()=>[a]})}});var fm=Object.defineProperty,wm=(e,t,a)=>(((e,t,a)=>{t in e?fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ym{constructor(){wm(this,"component","IBizFormTabPanel")}async createController(e,t,a){const n=new rn(e,t,a);return await n.init(),n}}const Cm=e("M",oe(gm,(function(e){e.component(gm.name,gm),$a("TABPANEL",(()=>new ym))})));function Im(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Dm=a({name:"IBizFormTabPage",props:{modelData:{type:Object,required:!0},controller:{type:cn,required:!0}},setup(e){const t=B("form-tab-page");return pe(e.controller),{ns:t}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[];return o(i("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],layout:this.modelData.layout,onClick:e=>this.controller.onClick(e)},Im(a=n.map((e=>{const t=e.props;if(!t||!t.controller)return e;const a=t.controller;return o(i("iBizCol"),{layoutPos:a.model.layoutPos,state:a.state},Im(e)?e:{default:()=>[e]})})))?a:{default:()=>[a]})}});var Em=Object.defineProperty,Sm=(e,t,a)=>(((e,t,a)=>{t in e?Em(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class xm{constructor(){Sm(this,"component","IBizFormTabPage")}async createController(e,t,a){const n=new cn(e,t,a);return await n.init(),n}}const Pm=e("N",oe(Dm,(function(e){e.component(Dm.name,Dm),$a("TABPAGE",(()=>new xm))})));var km=Object.defineProperty,Tm=(e,t,a)=>(((e,t,a)=>{t in e?km(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class zm{constructor(){Tm(this,"component","IBizFormButtonList")}async createController(e,t,a){const n=new dn(e,t,a);return await n.init(),n}}const Am=a({name:"IBizFormButtonList",props:{modelData:{type:Object,required:!0},controller:{type:dn,required:!0}},setup(e){var t;const a=B("form-button-list"),n=e.controller,o="DESIGN"===(null==(t=n.context)?void 0:t.srfrunmode);return{ns:a,handleClick:async(e,t)=>{null==t||t.stopPropagation(),o||n.handleClick(e,t)}}},render(){const{state:e}=this.controller;return e.visible?o(i("iBizButtonList"),{class:[this.ns.b(),...this.controller.containerClass],model:this.modelData,disabled:e.disabled,buttonsState:e.buttonsState,onClick:this.handleClick},null):null}}),Om=e("O",oe(Am,(function(e){e.component(Am.name,Am),$a("BUTTONLIST",(()=>new zm))}))),Mm=a({name:"IBizFormIFrame",props:{modelData:{type:Object,required:!0},controller:{type:un,required:!0}},setup(e){const t=e.controller,a=B("form-iframe");pe(t);const o=n(!0);return{ns:a,url:l((()=>t.calcIFrameUrl())),loading:o,onLoad:()=>{o.value=!1}}},render(){return this.controller.state.visible&&this.url?g(o("div",{class:this.ns.b()},[o("iframe",{class:this.ns.e("iframe"),src:this.url,frameborder:"0",onLoad:()=>this.onLoad(),onError:()=>this.onLoad()},null)]),[[y("loading"),this.loading]]):null}});var Nm=Object.defineProperty,Bm=(e,t,a)=>(((e,t,a)=>{t in e?Nm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class _m{constructor(){Bm(this,"component","IBizFormIFrame")}async createController(e,t,a){const n=new un(e,t,a);return await n.init(),n}}const Rm=e("P",oe(Mm,(function(e){e.component(Mm.name,Mm),$a("IFRAME",(()=>new _m))})));var Lm=Object.defineProperty,jm=(e,t,a)=>(((e,t,a)=>{t in e?Lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Vm{constructor(){jm(this,"component","IBizEditFormControl")}}const Fm=a({name:"IBizEditFormControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},isSimple:{type:Boolean,required:!1},data:{type:Object,required:!1},loadDefault:{type:Boolean,default:!0},simpleDataIndex:{type:Number,required:!1},mdCtrlFormIndex:{type:Number,required:!1}},setup(e){const t=ne(((...e)=>new sn(...e)),{excludePropsKeys:["data"]}),a=B("control-edit-form"),o=n(""),i=n([]),s=n();e.isSimple&&((e.simpleDataIndex||0===e.simpleDataIndex)&&t.setSimpleDataIndex(e.simpleDataIndex),t.evt.on("onMounted",(()=>{t.setSimpleData(e.data||{})})),c((()=>e.data),(e=>{const a=e||{};Object.keys(t.data).find((e=>a[e]!==t.data[e]))&&t.setSimpleData(a)}),{deep:!0})),(e.mdCtrlFormIndex||0===e.mdCtrlFormIndex)&&t.setMdCtrlFormIndex(e.mdCtrlFormIndex),t.evt.on("onCreated",(()=>{Object.keys(t.details).forEach((e=>{const a=t.details[e];a.state=u(a.state)})),i.value=t.anchorData}));const l=Ii((e=>{t.filterDetail(e)}),300,{leading:!0});return{c:t,ns:a,filter:o,anchorList:i,anchorTargetRef:s,handleInput:l,calcNavBarConfig:()=>{const{navBarPos:e,navBarSysCss:a,navBarWidth:n,navBarStyle:o,navbarHeight:i}=t.model;return{navBarPos:e,navBarSysCss:a,navBarWidth:n,navBarStyle:o,navbarHeight:i}}}},render(){const{showFormNavBar:e,enableItemFilter:t}=this.c.model,a=o("div",{class:[this.ns.b(),this.ns.is("item-filter",t)]},[t&&o(i("el-input"),{clearable:!0,modelValue:this.filter,"onUpdate:modelValue":e=>this.filter=e,onInput:this.handleInput,class:this.ns.e("quick-search"),placeholder:ibiz.i18n.t("app.search")},null),o(i("iBizFormControl"),{ref:"anchorTargetRef",controller:this.c},{...this.$slots})]);return e?o(i("iBizAnchorContainer"),{anchorList:this.anchorList.filter((e=>e.pageId===this.c.state.activeTab)),anchorTargetEle:this.anchorTargetRef,navBarConfig:this.calcNavBarConfig()},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]}):a;var n}}),Um=e("Q",oe(Fm,(function(e){e.component(Fm.name,Fm),Ba(_a.FORM,(()=>new Vm))})));const Hm=a({name:"IBizFormControl",props:{controller:{type:Object,required:!0}},setup(e,{slots:t}){const a=B("control-form"),n=e.controller;ue(n);const s={form:n},l=t=>{var a;const n={};return null==(a=t.controlAttributes)||a.forEach((t=>{t.attrName&&t.attrValue&&(n[t.attrName]=Wa.execSingleLine(t.attrValue,{...e.controller.getEventArgs(),data:e.controller.data}))})),n},c=(e,a=!1)=>{const{hidden:s,userTag:d}=e;if(s||!a&&n.model.enableAdvanceSearch&&"permanent"!==d)return;const u=e.id;if(t[u])return P(t,u,{model:e,data:n.state.data,value:n.state.data[u]});const p={};"FORMITEM"===e.detailType&&t["".concat(u,"_editor")]&&(p.default=(...e)=>t["".concat(u,"_editor")](...e));const h=Sa(e);h.length&&(p.default=()=>h.map((e=>c(e))));const m=n.providers[u];if(!m)return o("div",null,[ibiz.i18n.t("control.form.noSupportDetailType",{detailType:e.detailType})]);const v=i(m.component);return r(v,{modelData:e,controller:n.details[u],key:e.id,attrs:l(e)},p)},d=e=>{const{modelData:t}=e;return(t instanceof Array?t:[t]).map((e=>c(e)))};return d.props=["modelData"],s.FormDetail=d,{ns:a,c:n,FormDetail:d,slotProps:s,renderByDetailType:c}},render(){const{state:e,model:t,controlPanel:a}=this.c,{isCreated:n}=e,l={};if(n)if(this.$slots.default)l.default=()=>this.$slots.default({...this.slotProps});else{const e=t.controlType===_a.SEARCHFORM?"searchform":"form";l[a?e:"default"]=()=>o(i("iBizFormPage"),{modelData:this.c.model,controller:this.c},{default:()=>{var e;return[null==(e=this.c.model.deformPages)?void 0:e.map((e=>this.renderByDetailType(e,!0)))]}})}return o(i("iBizControlBase"),{class:this.ns.b(),controller:this.c},"function"==typeof(r=l)||"[object Object]"===Object.prototype.toString.call(r)&&!s(r)?l:{default:()=>[l]});var r}}),qm=e("R",oe(Hm,(function(e){e.component(Hm.name,Hm),e.use(Bu),e.use(ku),e.use(Cu),e.use(Vu),e.use(Gu),e.use(dm),e.use(vm),e.use(Cm),e.use(Pm),e.use(Om),e.use(Rm)})));function Gm(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Wm=a({name:"IBizExportExcel",props:{mode:{type:String,required:!1},size:{type:String,required:!1},item:{type:Object,required:!0},btnContent:{type:Function,required:!0},controller:{type:Object}},emits:["exportExcel"],setup(e,{emit:t}){const a=B("export-excel"),o=n(1),i=n(9999);return{ns:a,endPage:i,startPage:o,onCommand:(e,a)=>{e&&t("exportExcel",a,{type:e,startPage:o.value,endPage:i.value})}}},render(){return"menu"===this.$props.mode?o(i("el-sub-menu"),{index:this.$props.item.id,class:this.ns.b("submenu"),"popper-class":this.ns.b("submenu-popper")},{title:()=>{let e;return o(i("el-button"),{title:zt(this.item.tooltip),size:this.$props.size,type:cl(this.item.buttonStyle),class:this.ns.b("submenu-button")},Gm(e=this.btnContent(this.item))?e:{default:()=>[e]})},default:()=>{let e,t,a,n;return[o(i("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("maxRowCount",e)},Gm(e=ibiz.i18n.t("control.toolbar.exportExcel.exportAll"))?e:{default:()=>[e]}),o(i("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("activatedPage",e)},Gm(t=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentPage"))?t:{default:()=>[t]}),o(i("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("selectedRows",e)},Gm(a=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentSelect"))?a:{default:()=>[a]}),o(i("el-menu-item"),{class:[this.ns.b("menu-item"),this.ns.e("custom")]},{default:()=>[o(i("el-input"),{type:"number",modelValue:this.startPage,"onUpdate:modelValue":e=>this.startPage=e,size:"small",maxlength:"4",onClick:e=>{e.stopPropagation()},onChange:e=>{this.startPage=e}},null),o("span",{class:"item-text",onClick:e=>{e.stopPropagation()}},[h("-")]),o(i("el-input"),{modelValue:this.endPage,"onUpdate:modelValue":e=>this.endPage=e,size:"small",type:"number",maxlength:"4",onClick:e=>{e.stopPropagation()}},null),o("span",{class:"item-text",onClick:e=>{e.stopPropagation()}},[ibiz.i18n.t("control.toolbar.exportExcel.page")]),o(i("el-button"),{onClick:e=>this.onCommand("customPage",e),size:"small"},Gm(n=ibiz.i18n.t("control.toolbar.exportExcel.export"))?n:{default:()=>[n]})]})]}}):o(i("el-dropdown"),{trigger:"click",size:this.$props.size,onCommand:this.onCommand,"popper-class":this.ns.b()},{default:()=>{let e;return o(i("el-button"),{size:this.$props.size,class:this.ns.e("button"),title:zt(this.item.tooltip),type:cl(this.item.buttonStyle)},Gm(e=this.btnContent(this.item))?e:{default:()=>[e]})},dropdown:()=>{let e,t,a,n;return o(i("el-dropdown-menu"),null,{default:()=>[o(i("el-dropdown-item"),{command:"maxRowCount"},Gm(e=ibiz.i18n.t("control.toolbar.exportExcel.exportAll"))?e:{default:()=>[e]}),o(i("el-dropdown-item"),{command:"activatedPage"},Gm(t=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentPage"))?t:{default:()=>[t]}),o(i("el-dropdown-item"),{command:"selectedRows"},Gm(a=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentSelect"))?a:{default:()=>[a]}),o(i("el-dropdown-item"),{class:this.ns.e("custom"),command:""},{default:()=>[o(i("el-input"),{type:"number",modelValue:this.startPage,"onUpdate:modelValue":e=>this.startPage=e,size:"small",maxlength:"4",onClick:e=>{e.stopPropagation()},onChange:e=>{this.startPage=e}},null),o("span",{class:"item-text",onClick:e=>{e.stopPropagation()}},[h("-")]),o(i("el-input"),{modelValue:this.endPage,"onUpdate:modelValue":e=>this.endPage=e,size:"small",type:"number",maxlength:"4",onClick:e=>{e.stopPropagation()}},null),o("span",{class:"item-text",onClick:e=>{e.stopPropagation()}},[ibiz.i18n.t("control.toolbar.exportExcel.page")]),o(i("el-button"),{onClick:e=>this.onCommand("customPage",e),size:"small"},Gm(n=ibiz.i18n.t("control.toolbar.exportExcel.export"))?n:{default:()=>[n]})]})]})}})}}),Km=a({name:"IBizShortCutButton",props:{mode:{type:String,required:!1},size:{type:String,required:!1},item:{type:Object,required:!0},controller:{type:Object,required:!0}},emits:["click"],setup(e,{emit:t}){var a;const n=B("short-cut-button"),o=B("toolbar-item"),i=null==(a=e.item.buttonStyle)?void 0:a.toLowerCase();return{ns:n,ns2:o,buttonState:l((()=>e.controller.state.buttonsState[e.item.id])),buttonType:i,isShortCut:l((()=>e.controller.view.state.isShortCut)),onClick:e=>{t("click",e)}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("short-cut",this.isShortCut)]},[o(i("el-button"),{title:zt(this.isShortCut?"".concat(ibiz.i18n.t("app.cancel")).concat(this.item.tooltip):this.item.tooltip),size:this.size,type:cl(this.item.buttonStyle),loading:this.buttonState.loading,disabled:this.buttonState.disabled,onClick:this.onClick},{default:()=>[this.item.showIcon&&this.item.sysImage&&o("span",{class:[this.ns2.b("icon"),this.ns.e("icon")]},[o(i("iBizIcon"),{icon:this.item.sysImage},null)]),this.item.showCaption&&o("span",{class:this.ns2.b("text")},[this.isShortCut?"".concat(ibiz.i18n.t("app.cancel")).concat(this.item.caption):this.item.caption])]})])}});function Ym(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Xm=(e,t)=>{const a=t&&e.counterId?t.counterData[e.counterId]:void 0,n=e.sysImage,s=[],l=B("toolbar-item");return e.showIcon&&n&&s.push(o("span",{class:l.b("icon")},[o(i("iBizIcon"),{icon:n},null)])),e.showCaption&&e.caption&&s.push(o("span",{class:l.b("text")},[e.caption])),a&&s.push(o(i("iBizBadge"),{class:l.b("counter"),value:a,counterMode:e.counterMode},null)),s},$m=e=>{var t;return null==(t=null==e?void 0:e.sysCss)?void 0:t.cssName},Jm=a({name:"IBizToolbarControl",props:{modelData:{type:Object,required:!0},runMode:{type:String,default:"RUNTIME"},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},manualCalcButtonState:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){var a;const s=ne(((...e)=>new pn(...e))),l=B("control-".concat(s.model.controlType.toLowerCase())),c=B("control-".concat(s.model.controlType.toLowerCase(),"-actions")),d=n("default"),u=null==(a=s.model.toolbarStyle)?void 0:a.toLowerCase(),p=async(a,n,o)=>{"RUNTIME"===e.runMode?await s.onItemClick(a,n,o):t("click",a)},m=async(a,n,o)=>{if("RUNTIME"===e.runMode){const e={};Object.assign(e,{...a,itemType:a.detailType}),await p(e,n,o)}else t("click",a)},v=(e,t)=>{var a,n;let c;const u=t.uiactionId,p=null==(a=s.state.buttonsState[t.id])?void 0:a.visible,h=s.itemProviders[t.id];if(!p)return null;if(h){const a=i(h.component);return r(a,{key:t.id,class:[l.e("item")],item:e,controller:s})}const v=null==(n=t.buttonStyle)?void 0:n.toLowerCase();return"exportexcel"===u||"gridview_exportaction"===u?o(Wm,{class:[l.e("menu-exportexcel"),l.em("item",v),$m(t)],mode:"menu",item:t,btnContent:e=>Xm(e,s.state),size:d.value,controller:s,onExportExcel:(e,a)=>{m(t,e,a)}},null):o(i("el-menu-item"),{class:[l.is("loading",s.state.buttonsState[t.id].loading),l.em("item",v),$m(t)],index:"menuitem".concat(t.id),disabled:s.state.buttonsState[t.id].disabled,title:zt(t.caption)},{default:()=>[o(i("el-button"),{loading:s.state.buttonsState[t.id].loading,onClick:e=>{t.uiactionId&&m(t,e)}},Ym(c=Xm(t,s.state))?c:{default:()=>[c]})]})},b=(e,t)=>{if(s.state.buttonsState[e.id].visible){let a;return o(i("el-button"),{size:d.value,class:$m(e),type:t||cl(e.buttonStyle),title:zt(e.tooltip||e.caption),loading:s.state.buttonsState[e.id].loading,disabled:s.state.buttonsState[e.id].disabled,onClick:t=>m(e,t)},Ym(a=Xm(e,s.state))?a:{default:()=>[a]})}return null},g=e=>{if(s.state.buttonsState[e.id].visible){let t;const a=s.state.buttonsState[e.id].disabled;return o(i("el-dropdown-item"),{class:[c.be("dropdown-popper","dropdown-item"),c.is("disabled",a),l.em("item",cl(e.buttonStyle))]},Ym(t=b(e))?t:{default:()=>[t]})}return null},f=(e,t)=>{const a=e[t];return a?s.state.buttonsState[a.id].visible?t:f(e,t+1):-1},w=(e,t=!1)=>{const{groupExtractMode:a}=e;switch(a){case"ITEMS":return((e,t)=>{const{uiactionGroup:a}=e;if(a&&a.uiactionGroupDetails){const{uiactionGroupDetails:n}=a,r=n.length>0,d=e.buttonStyle||"";if(t){const t=s.state.buttonsState[e.id].disabled||-1===n.findIndex((e=>{var t;return!1===(null==(t=s.state.buttonsState[e.id])?void 0:t.disabled)}));return o(i("el-sub-menu"),{class:[l.b("submenu"),l.be("submenu","groupdetails"),l.em("item",d.toLowerCase()),$m(e)],index:e.id,disabled:t,title:zt(e.tooltip),"popper-class":[l.b("submenu-popper"),l.em("submenu-popper","groupdetails"),l.bm("submenu-popper",u),l.em("submenu-popper",d.toLowerCase()),l.bm("submenu-popper",$m(e)),$m(e)]},{default:()=>n.map((t=>v(e,t))),title:()=>v(e,e)})}return o(i("el-dropdown"),{"popper-class":[c.b("dropdown-popper"),c.bm("dropdown-popper",u),c.em("dropdown-popper",d.toLowerCase()),c.bm("dropdown-popper",$m(e))]},{default:()=>b(e),dropdown:()=>{let e;return r&&o(i("el-dropdown-menu"),null,Ym(e=n.map((e=>g(e))))?e:{default:()=>[e]})}})}return null})(e,t);case"ITEMX":return((e,t)=>{const{uiactionGroup:a}=e;if(a&&a.uiactionGroupDetails){const{uiactionGroupDetails:n}=a,r=f(n,0);if(-1!==r){const a=n[r],d=n.slice(r+1).filter((e=>!!s.state.buttonsState[e.id].visible)),p=d.length>0;let h=e.buttonStyle||"";return t?(h=a.buttonStyle||"",o(i("el-sub-menu"),{class:[l.b("submenu"),l.be("submenu","groupdetails"),l.em("item",h.toLowerCase()),$m(a)],index:a.id,disabled:s.state.buttonsState[a.id].disabled,title:zt(a.tooltip),"popper-class":[l.b("submenu-popper"),l.be("submenu-popper","groupdetails"),l.bm("submenu-popper",u),l.em("submenu-popper",h.toLowerCase()),l.bm("submenu-popper",$m(a)),$m(a)]},{default:()=>d.map((t=>v(e,t))),title:()=>v(e,a)})):o(i("el-dropdown"),{"split-button":p,type:cl(h),"popper-class":[c.b("dropdown-popper"),c.bm("dropdown-popper",u),c.em("dropdown-popper",h.toLowerCase()),c.bm("dropdown-popper",$m(e))]},{default:()=>b(a,cl(h)),dropdown:()=>{let e;return p&&o(i("el-dropdown-menu"),null,Ym(e=d.map((e=>g(e))))?e:{default:()=>[e]})}})}}return null})(e,t);default:return((e,t)=>{const{uiactionGroup:a}=e;if(a&&a.uiactionGroupDetails){const{uiactionGroupDetails:n}=a;return t?n.map((t=>v(e,t))):n.map((e=>o("div",{class:[c.e("item-deuiaction"),l.em("item",cl(e.buttonStyle))]},[b(e)])))}return null})(e,t)}},y=e=>{const t=e.detoolbarItems||[],a=s.state.buttonsState[e.id].visible,n=s.state.buttonsState[e.id].disabled;if(!a)return null;const c=-1!==t.findIndex((e=>{var t;return null==(t=s.state.buttonsState[e.id])?void 0:t.loading})),h=-1!==t.findIndex((e=>{var t;return!0===(null==(t=s.state.buttonsState[e.id])?void 0:t.visible)})),m=n||-1===t.findIndex((e=>{var t;return!1===(null==(t=s.state.buttonsState[e.id])?void 0:t.disabled)}));if(e.uiactionGroup&&e.uiactionGroup.uiactionGroupDetails&&e.uiactionGroup.uiactionGroupDetails.length>0)return w(e,!0);if(!h)return null;const v=e.buttonStyle||"";return o(i("el-sub-menu"),{class:[l.b("submenu"),l.em("item",v.toLowerCase()),$m(e)],index:e.id,disabled:m,title:zt(e.tooltip),"popper-class":[l.b("submenu-popper"),l.bm("submenu-popper",u),l.em("submenu-popper",v.toLowerCase()),l.bm("submenu-popper",$m(e)),$m(e)]},{default:()=>t.map((t=>{var a,n;const c=t.uiactionId,u=null==(a=s.state.buttonsState[t.id])?void 0:a.visible,h=s.itemProviders[t.id];if(!u)return null;if(h){const a=i(h.component);return r(a,{key:t.id,class:[l.e("item")],item:e,controller:s})}if("SEPERATOR"!==t.itemType){if("RAWITEM"===t.itemType)return o(i("el-menu-item"),{index:"menuitem".concat(t.id),title:zt(t.tooltip)},{default:()=>[o(i("iBizRawItem"),{rawItem:t,content:t.rawItem.content,class:l.b("submenu-rawitem"),onClick:e=>p(t,e)},null)]});if("DEUIACTION"===t.itemType){let e;const a=null==(n=t.buttonStyle)?void 0:n.toLowerCase();return"exportexcel"===c||"gridview_exportaction"===c?o(Wm,{class:[l.e("menu-exportexcel"),l.em("item",a),$m(t)],mode:"menu",item:t,btnContent:e=>Xm(e,s.state),size:d.value,controller:s,onExportExcel:(e,a)=>{p(t,e,a)}},null):o(i("el-menu-item"),{class:[l.is("loading",s.state.buttonsState[t.id].loading),l.em("item",a),$m(t)],index:"menuitem".concat(t.id),disabled:s.state.buttonsState[t.id].disabled,title:zt(t.tooltip),onClick:e=>p(t,e)},{default:()=>[o(i("el-button"),{loading:s.state.buttonsState[t.id].loading},Ym(e=Xm(t,s.state))?e:{default:()=>[e]})]})}return"ITEMS"===t.itemType?y(t):null}})),title:()=>{let t;return o(i("el-button"),{loading:c,disabled:m,type:cl(v)},Ym(t=Xm(e,s.state))?t:{default:()=>[t]})}})};return{c:s,btnSize:d,ns:l,toolbarStyle:u,handleClick:p,renderExtraButtons:e=>e.map((e=>{let t;return o("div",{key:e.id,class:[l.e("item")]},[o(i("el-button"),{title:zt(e.tooltip),size:d.value,onClick:t=>p(e,t)},Ym(t=Xm(e,s.state))?t:{default:()=>[t]})])})),renderToolbarItem:e=>{var t,a;const n=e.id,u=null==(t=s.state.buttonsState[n])?void 0:t.visible,m=s.itemProviders[n];if(!u)return null;if(m){const t=i(m.component);return r(t,{key:n,class:[l.e("item")],item:e,controller:s})}if("SEPERATOR"===e.itemType)return s.state.hideSeparator.includes(n)?null:o("div",{key:n,class:[l.e("item"),l.e("item-separator")]},[h("|")]);if("RAWITEM"===e.itemType)return o("div",{key:n,class:[l.e("item"),l.e("item-rawitem")]},[o(i("iBizRawItem"),{rawItem:e,content:e.rawItem.content,onClick:t=>p(e,t)},null)]);if("DEUIACTION"===e.itemType){let t;const a=e.uiactionId,r=e.buttonStyle;return"exportexcel"===a||"gridview_exportaction"===a?o(Wm,{class:[l.e("item"),l.e("item-deuiaction"),l.em("item",null==r?void 0:r.toLowerCase()),$m(e)],item:e,btnContent:e=>Xm(e,s.state),size:d.value,controller:s,onExportExcel:(t,a)=>{p(e,t,a)}},null):"shortcut"===a?o(Km,{key:n,class:[l.e("item"),l.e("item-deuiaction"),l.em("item",null==r?void 0:r.toLowerCase()),$m(e)],item:e,controller:s,size:d.value,onClick:t=>p(e,t)},null):o("div",{key:n,class:[l.e("item"),l.e("item-deuiaction"),l.em("item",null==r?void 0:r.toLowerCase()),$m(e),l.is("loading",s.state.buttonsState[n].loading)]},[o(i("el-button"),{size:d.value,title:zt(e.tooltip),type:cl(r),loading:s.state.buttonsState[n].loading,disabled:s.state.buttonsState[n].disabled,onClick:t=>p(e,t)},Ym(t=Xm(e,s.state))?t:{default:()=>[t]})])}if("ITEMS"===e.itemType){let t;const n=e,s=n.buttonStyle||"";if(n.groupExtractMode&&n.uiactionGroup){const t="extract-mode-".concat((null==(a=n.groupExtractMode)?void 0:a.toLowerCase())||"item");return o("div",{class:[c.b(),c.e(t),c.em("item",s.toLowerCase()),$m(e)]},[w(e)])}return o(i("el-menu"),{mode:"horizontal",class:[l.e("menu"),l.em("menu",s.toLowerCase()),$m(e)],ellipsis:!1,"menu-trigger":"hover"},Ym(t=y(e))?t:{default:()=>[t]})}return null}}},render(){var e,t,a;const{state:n}=this.c;let s=null;return n.isCreated&&(s=[(null==(e=n.extraButtons.before)?void 0:e.length)>0&&this.renderExtraButtons(n.extraButtons.before),null==(t=this.modelData.detoolbarItems)?void 0:t.map(((e,t)=>{var a;const o=this.renderToolbarItem(e);return(null==(a=n.extraButtons[t])?void 0:a.length)?[o,this.renderExtraButtons(n.extraButtons[t])]:o})),(null==(a=n.extraButtons.after)?void 0:a.length)>0&&this.renderExtraButtons(n.extraButtons.after)]),o(i("iBizControlBase"),{controller:this.c,class:[this.ns.m(n.viewMode.toLowerCase()),this.ns.m(this.toolbarStyle)]},Ym(s)?s:{default:()=>[s]})}});var Qm=Object.defineProperty,Zm=(e,t,a)=>(((e,t,a)=>{t in e?Qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ev{constructor(){Zm(this,"component","IBizToolbarControl")}}const tv=e("S",oe(Jm,(function(e){e.component(Jm.name,Jm),Ba(_a.TOOLBAR,(()=>new ev))}))),av=a({name:"IBizCaptionBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=ne(((...e)=>new hn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));e.setBrowserTabTitle(),D((()=>{e.setBrowserTabTitle()}));const a=l((()=>void 0!==e.state.totalx));return{c:e,ns:t,showTotal:a}},render(){return o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[o("div",{class:[this.ns.b("caption"),this.ns.is("show-icon",!!this.c.model.sysImage)]},[this.c.model.sysImage&&o(i("iBizIcon"),{class:[this.ns.be("caption","icon")],icon:this.c.model.sysImage},null),o("div",{class:[this.ns.be("caption","content")]},[this.c.state.caption]),this.showTotal&&o("div",{class:[this.ns.be("caption","total")]},[ibiz.i18n.t("control.captionBar.total",{total:this.c.state.totalx,invisibleNum:this.c.state.totalx-this.c.state.total})])])]})}});var nv=Object.defineProperty,ov=(e,t,a)=>(((e,t,a)=>{t in e?nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class iv{constructor(){ov(this,"component","IBizCaptionBarControl")}}const sv=e("T",oe(av,(function(e){e.component(av.name,av),Ba(_a.CAPTIONBAR,(()=>new iv))})));function lv(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const rv=a({name:"IBizDataViewControl",components:{draggable:Ui},props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e){const t=ne(((...e)=>new mn(...e))),a=B("control-".concat(t.model.controlType.toLowerCase()));ue(t);const s=l((()=>[a.is("enable-page",!0===t.model.enablePagingBar)])),d=n(!1),u=l((()=>!0===t.model.enablePagingBar||(2!==t.model.pagingMode||(t.state.items.length>=t.state.total||t.state.isLoading||t.state.total<=t.state.size)))),p=l((()=>{var e,a;return(null==(a=null==(e=t.model.controlParam)?void 0:e.ctrlParams)?void 0:a.CARDSTYLE)||t.controlParams.cardstyle||"default"})),h=l((()=>!t.state.enableGroup&&(2===t.model.pagingMode||3===t.model.pagingMode))),m=n(),v=n(ei());c((()=>t.state.curPage),(()=>{var e,a;if(1===t.state.curPage&&(2===t.model.pagingMode||3===t.model.pagingMode)){v.value=ei();const t=null==(a=null==(e=m.value)?void 0:e.ElInfiniteScroll)?void 0:a.containerEl;t&&(t.lastScrollTop=0,t.scrollTop=0)}}));const b=()=>{e.data&&(t.state.items=e.data.map((e=>new ua(e))),t.afterLoad({},t.state.items))};t.evt.on("onCreated",(async()=>{e.isSimple&&(b(),t.state.isSimple=!0,t.state.isLoaded=!0)}));const f=e=>{let a=!!t.state.selectedData.find((t=>t.srfkey===e.srfkey));return"DEDATAVIEW"===t.view.model.viewType&&1===t.state.mdctrlActiveMode&&!0===t.state.singleSelect&&(a=!1),a};c((()=>e.data),(()=>{e.isSimple&&b()}),{deep:!0});const{onPageChange:w,onPageRefresh:C,onPageSizeChange:I}=Ws(t),D=(e,a)=>(a.stopPropagation(),t.onRowClick(e)),E=(e,a)=>(a.stopPropagation(),t.onDbRowClick(e));let S=null;const x=(e,a)=>{e.moved&&t.onDragChange({from:a,to:a,fromIndex:e.moved.oldIndex,toIndex:e.moved.newIndex}),e.added&&(S={to:a,toIndex:e.added.newIndex}),e.removed&&(S&&(S.from=a,S.fromIndex=e.removed.oldIndex,t.onDragChange(S)),S=null)},P=e=>o(i("el-card"),{shadow:"hover",class:[a.b("item"),a.be("item","new")],title:ibiz.i18n.t("app.newlyBuild"),"body-style":{width:t.model.cardWidth?"".concat(t.model.cardWidth,"px"):"auto",height:t.model.cardHeight?"".concat(t.model.cardHeight,"px"):"auto"},onClick:a=>{t.onClickNew(a,null==e?void 0:e.key)}},{default:()=>[o("ion-icon",{name:"add-outline"},null)]}),k=(e,a)=>{const{context:n,params:s}=t;return o(i("iBizControlShell"),{data:e,modelData:a,context:n,params:s,onClick:t=>D(e,t),onDblclick:t=>E(e,t)},null)},T=e=>o(i("iBizActionToolbar"),{class:a.bem("item-content","bottom","actions"),"action-details":t.getOptItemModel(),"actions-state":t.state.uaState[e.srfkey],zIndex:t.state.zIndex,onActionClick:(a,n)=>t.onActionClick(a,e,n)},null),z=e=>{const n=t.getOptItemModel();return o("div",{class:a.b("item-content")},[o("div",{class:a.be("item-content","top")},[o("div",{class:a.bem("item-content","top","title")},[e.srfmajortext]),o("div",{class:a.bem("item-content","top","description")},[e.content])]),n.length?o("div",{class:a.be("item-content","bottom")},[T(e)]):null])},A=n=>{const s=a.cssVarBlock({"item-bg-color":"".concat(n.bgcolor||""),"text-color":"".concat(n.fontcolor||""),"hover-bg-color":"".concat(n.hovercolor||""),"active-bg-color":"".concat(n.activecolor||"")}),l=e.modelData.itemLayoutPanel;return o(i("el-card"),{shadow:"hover",class:[a.b("item"),a.is("active",f(n))],style:s,"body-style":{width:t.model.cardWidth?"".concat(t.model.cardWidth,"px"):"auto",height:t.model.cardHeight?"".concat(t.model.cardHeight,"px"):"auto"},onClick:e=>D(n,e),onDblclick:e=>E(n,e)},{default:()=>[o("div",{class:a.be("item","content")},[t.state.draggable&&!t.state.readonly&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",class:a.e("drag-icon"),preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])]),"style2"===p.value&&!t.state.singleSelect&&o(i("el-checkbox"),{size:"large",class:a.bem("item","content","checkbox"),modelValue:f(n),onClick:e=>e.stopPropagation(),onChange:()=>(e=>{const a=t.state.selectedData,n=a.findIndex((t=>t.srfkey===e.srfkey));-1===n?a.push(e):a.splice(n,1),t.setSelection(a)})(n)},null),l?k(n,l):z(n)])]})},O=(e,n,s=!0)=>{const{cardColXS:l,cardColSM:r,cardColMD:c,cardColLG:d}=t.model;return l||r||c||d?o(Ui,{itemKey:"srfkey",modelValue:e,group:t.model.id,handle:".".concat(a.e("drag-icon")),class:["el-row",a.e("layout-row")],disabled:s||t.state.updating||t.state.readonly,onChange:e=>x(e,null==n?void 0:n.key)},{item:({element:e})=>o(i("el-col"),{xs:l,sm:r,md:c,lg:d,class:a.e("layout-col")},{default:()=>[o("div",{class:a.b("scroll-item")},[A(e)])]}),footer:()=>{if(t.enableNew&&!t.state.readonly)return o(i("el-col"),{xs:l,sm:r,md:c,lg:d,class:a.e("layout-col")},{default:()=>[o("div",{class:a.b("scroll-item")},[P(n)])]})}}):o(Ui,{itemKey:"srfkey",modelValue:e,group:t.model.id,class:[a.e("layout-flex"),a.em("layout-flex","draggable")],disabled:s||t.state.updating||t.state.readonly,onChange:e=>x(e,null==n?void 0:n.key)},{item:({element:e})=>o("div",{class:a.b("scroll-item")},[A(e)]),footer:()=>{if(t.enableNew&&!t.state.readonly)return o("div",{class:a.b("scroll-item")},[P(n)])}})},M=()=>t.state.enableGroup?o("div",{class:a.b("group-content")},[t.state.groups.map((e=>(e=>{const{groupSysCss:n}=t.model;return o("div",{class:[a.be("group-content","item"),null==n?void 0:n.cssName,a.is("collapse",t.state.collapseKeys.includes(e.key.toString()))]},[o("div",{class:a.be("group-content","item-header")},[o("span",{class:a.be("group-content","item-title")},[e.caption]),o("span",{class:a.be("group-content","item-action")},[t.model.groupUIActionGroup&&e.groupActionGroupState&&o(i("iBizActionToolbar"),{zIndex:t.state.zIndex,class:a.be("group-content","header-actions"),"action-details":t.model.groupUIActionGroup.uiactionGroupDetails,"actions-state":e.groupActionGroupState,onActionClick:(a,n)=>{t.onGroupToolbarClick(a,n,e)}},null)])]),e.children.length>0?O(e.children,e,!t.state.draggable):o("div",{class:a.bem("group-content","item","empty")},[ibiz.i18n.t("app.noData")])])})(e)))]):O(d.value?t.state.items.slice(0,t.state.size):t.state.items,void 0,!t.enableEditOrder),N=()=>{var e;null==(e=m.value)||e.scrollTo({top:0,behavior:"smooth"})};t.evt.on("onScrollToTop",(()=>{N()}));const _=()=>{d.value=!0,N()},R=()=>{d.value=!1},L=()=>o("div",{class:a.e("collapse-expand-icon")},[o("i",{class:"fa fa-angle-double-up",title:ibiz.i18n.t("control.common.collapseData"),onClick:_,"aria-hidden":"true"},null)]),j=()=>o("div",{class:a.e("collapse-expand-icon")},[o("i",{class:"fa fa-angle-double-down",title:ibiz.i18n.t("control.common.expandData"),onClick:R,"aria-hidden":"true"},null)]),V=()=>{var e;const n=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_batchtoolbar")));if(n)return o("div",{class:a.e("batchtoolbar")},[o(i("iBizToolbarControl"),{modelData:n,context:t.context,params:t.params},null)])},F=()=>{var e;const{isLoaded:n}=t.state;if(!n)return;const s=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_quicktoolbar")));if(s)return o(i("iBizToolbarControl"),{modelData:s,context:t.context,params:t.params,class:a.e("quicktoolbar")},null);const l={};return ce(t)&&Object.assign(l,{customRender:()=>o(de,{controller:t},null)}),o(i("iBizNoData"),{class:a.e("content"),text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes,hideNoDataImage:t.state.hideNoDataImage},lv(l)?l:{default:()=>[l]})},U=()=>{let e=null;const n=!(t.state.items.length>=t.state.total||t.state.total<=t.state.size);return h.value&&(2===t.model.pagingMode&&(d.value?e=j():t.state.items.length>t.state.size&&(e=L())),3===t.model.pagingMode&&(d.value?e=j():n?e=o("div",{class:a.e("load-more")},[o("i",{class:"fa fa-angle-double-down",title:ibiz.i18n.t("control.common.loadMore"),onClick:()=>t.loadMore(),"aria-hidden":"true"},null)]):t.state.isCreated&&t.state.items.length>t.state.size&&(e=L()))),e},H=()=>{const{enableNavView:e,showNavIcon:n,showNavView:i}=t.state;if(e&&n)return o("ion-icon",i?{name:"eye-off-outline",class:a.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),onClick:()=>t.onShowNavViewChange()}:{name:"eye-outline",class:a.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),onClick:()=>t.onShowNavViewChange()},null)},q=()=>{if(!t.state.noSort)return o(i("iBizSortBar"),{onSortChange:(e,a)=>{t.setSort(e.key,a),t.load({isInitialLoad:2===t.model.pagingMode||3===t.model.pagingMode})},sortItems:t.state.sortItems},null)},G=()=>[t.state.items.length>0?g(o("div",{class:a.e("content"),ref:"infiniteScroll","infinite-scroll-distance":10,"infinite-scroll-disabled":u.value,key:v.value},[M()]),[[y("infinite-scroll"),()=>t.loadMore()]]):F(),V(),H(),U()],W=()=>{if(t.state.enablePagingBar&&1===t.model.pagingMode)return o(i("iBizPagination"),{class:a.e("pagination"),total:t.state.total,curPage:t.state.curPage,size:t.state.size,totalPages:t.state.totalPages,onChange:w,onPageSizeChange:I,onPageRefresh:C},null)},K=()=>({sortbar:()=>q(),searchbar:()=>(()=>{const e=vn(t.view.model,"searchbar");if(!e)return;const a=e.name||e.id,n=t.view.providers[a];return r(i((null==n?void 0:n.component)||"IBizControlShell"),{context:t.view.context,params:t.view.params,modelData:e,...t.view.slotProps[a]||{},provider:n})})(),dataview:()=>o("div",{class:a.e("layout-content")},[G()]),pagingbar:()=>W()});return{c:t,ns:a,classNames:s,infiniteScroll:m,renderLayoutByStyle:()=>"userstyle"===p.value?K():(()=>{if(t.state.isCreated)return[q(),...G(),W()]})()}},render(){let e;return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{class:[this.ns.is("enable-page",!!this.c.state.enablePagingBar)],controller:this.c},lv(e=this.renderLayoutByStyle())?e:{default:()=>[e]})]})}});var cv=Object.defineProperty,dv=(e,t,a)=>(((e,t,a)=>{t in e?cv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uv{constructor(){dv(this,"component","IBizDataViewControl")}}e("V",uv);const pv=e("U",oe(rv,(function(e){e.component(rv.name,rv),Ba(_a.DATAVIEW,(()=>new uv))})));function hv(e,t){const a=t.state.items.find((t=>t._id===e));return a||t.state.items.find((t=>t._uuid===e))}function mv(e){switch(e){case"inner":return"inner";case"before":return"prev";case"after":return"next";default:throw new _t(ibiz.i18n.t("control.tree.noSupported",{dropType:e}))}}const vv=a({name:"IBizTreeControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},navigational:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},loadDefault:{type:Boolean,default:!0},checkStrictly:{type:Boolean,default:!0},isSimple:{type:Boolean,default:!1},data:{type:Array,required:!1}},setup(e){const a=ne(((...e)=>new gn(...e)));!function(e,t){t.defaultExpandedKeys&&(e.state.defaultExpandedKeys=t.defaultExpandedKeys);const a=()=>{t.data&&t.data.find((e=>!0===e.isRoot))&&(e.state.rootNodes=t.data,e.state.items=t.data)};e.evt.on("onCreated",(async()=>{t.isSimple&&(a(),e.state.isLoaded=!0)})),c((()=>t.data),(()=>{t.isSimple&&a()}),{deep:!0})}(a,e);const s=n(!1),r=n({}),u=n("default"),h=e=>{r.value=e};a.evt.on("onCreated",(()=>{a.counter&&a.counter.onChange(h,!0),a.controlParams.cascadeselect&&(s.value=!0),a.controlParams.menushowmode&&(u.value=a.controlParams.menushowmode)})),p((()=>{var e;null==(e=a.counter)||e.offChange(h)}));const m=B("control-".concat(a.model.controlType.toLowerCase())),v=n(null),g=n(null),f=n(""),w=n(null),y=n(null),C=n(null),I=n(),D=n(null),E=n(null),S=n(null),x=n("".concat(ei(),"-").concat(ei())),P=n(null),k=n(null),T=n(null);a.evt.on("onNewTreeNode",(async e=>{var t;const{nodeModel:a,defaultValue:n,parentNodeData:o}=e,{appId:i,appDataEntityId:s}=a,l=await ibiz.hub.getAppDataEntity(s,i),r=function(e){if(e.controlRenders){const t=e.controlRenders.find((e=>"newnoderender"===(e.id||"").split("_")[0]));if(!t)return;if("LAYOUTPANEL_MODEL"===t.renderType&&t.layoutPanelModel)return Wa.execScriptFn({},t.layoutPanelModel,{isAsync:!1});if("LAYOUTPANEL"===t.renderType&&t.layoutPanel)return t.layoutPanel}}(a);if(r&&(k.value=new fn(l,{}),T.value=r||null),S.value=n,y.value=null,C.value=null,P.value&&(null==(t=v.value)||t.remove(P.value),P.value=null),o&&v.value){const e={};Object.assign(e,{_id:x.value,_text:"",_leaf:!0}),v.value.append(e,o),P.value=e}E.value=a})),c((()=>w.value),(e=>{e&&e.$el.getElementsByTagName("input")[0].focus()}));const z=()=>{var e;const t=null==(e=v.value)?void 0:e.getCurrentKey();if(!t||t===y.value)return;const n=hv(t,a),o=a.getNodeModel(n._nodeId);(null==o?void 0:o.allowEditText)&&(y.value=t)},A=async()=>{var e;if(y.value)if(C.value){const e=hv(y.value,a);await a.modifyNodeText(e,C.value),y.value=null,C.value=null}else y.value=null;if(E.value){const t=k.value&&Object.values(k.value).some((e=>!!e));if(T.value&&t){const{textAppDEFieldId:e,id:t}=E.value,n={_nodeId:t,_text:[k.value[e]],_deData:{}};Object.assign(n._deData,k.value),S.value&&Object.keys(S.value).forEach((e=>{n._deData[e]||Object.assign(n._deData,{[e]:S.value[e]})})),await a.createDeNodeData([n])}else if(D.value){const{textAppDEFieldId:e,id:t}=E.value,n=D.value,o={_deData:{}};Object.assign(o,{_nodeId:t,_text:n}),S.value&&Object.assign(o._deData,S.value),Object.assign(o._deData,{[e]:n}),await a.createDeNodeData([o])}E.value=null,D.value=null,S.value=null,k.value=null,T.value=null,I.value=null,P.value&&(null==(e=v.value)||e.remove(P.value)),P.value=null}},O=async()=>{var e;y.value&&(y.value=null,C.value=null),E.value&&(E.value=null,D.value=null,S.value=null,k.value=null,T.value=null,I.value=null,P.value&&(null==(e=v.value)||e.remove(P.value)),P.value=null)},M=e=>{e.stopPropagation(),"Enter"!==e.code&&13!==e.keyCode||A(),"Escape"!==e.code&&27!==e.keyCode||O()},N=e=>{if(!e)return;const{panelItemEventName:t}=e;t===wn.ENTER&&A()},_=e=>{"Escape"!==e.code&&27!==e.keyCode||O()},{updateUI:R,triggerNodeExpand:L}=function(e,t){const a=()=>{const t=e.value;if(!t)throw new _t(ibiz.i18n.t("control.tree.noFoundInstance"));return t},n=()=>{var a;const o=e.value;o?(Object.values(o.store.nodesMap).forEach((e=>{const a=t.state.expandedKeys.includes(e.data._id);a!==e.expanded&&(a?e.expand():e.collapse())})),t.state.singleSelect?e.value.setCurrentKey((null==(a=t.state.selectedData[0])?void 0:a._id)||void 0):o.setCheckedKeys(t.state.selectedData.map((e=>e._id)))):setTimeout((()=>{n()}),200)},o=Ii(n,500);return{getTreeInstance:a,updateUI:o,triggerNodeExpand:e=>{const t=a().store.nodesMap[e];if(t)return t.expanded?(t.collapse(),!1):(t.expand(),!0)}}}(v,a),{addLoadMoreNode:j}=function(e,t){const a=e=>({_id:"".concat(e,"_load_more"),_text:ibiz.i18n.t("control.common.loadMore"),_leaf:!0,_disableSelect:!0,_load_more:!0});return{toLoadMoreNode:a,addLoadMoreNode:(n,o)=>{if(!e.value||!n||!o)return;const i=a(n);e.value.getNode(i)&&e.value.remove(i);const s=t.getLoadMoreInfoItems(n);s&&s.some((e=>e.curPage<e.totalPage-1))&&e.value.append(i,o)}}}(v,a),V=e=>e.map((e=>({_id:e._id,_uuid:e._uuid,_leaf:e._leaf,_text:e._text,_disableSelect:e._disableSelect})));a.evt.on("onAfterRefreshParent",(e=>{if(v.value){const{parentNode:t,children:a}=e,n=V(a);v.value.updateKeyChildren(t._id,n),R(),b((()=>{j(t._id,t)}))}})),a.evt.on("onAfterNodeDrop",(e=>{e.isChangedParent&&(f.value=ei())}));const F=l((()=>a.state.isLoaded?a.model.rootVisible?a.state.rootNodes:a.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[]));c(F,((e,t)=>{e!==t&&(f.value=ei())})),c((()=>a.state.expandedKeys),(()=>{R()}),{deep:!0});let U=!1;const H=l((()=>!(!0!==a.context.srfreadonly&&"true"!==a.context.srfreadonly)));let q;a.evt.on("onMounted",(()=>{if(Object.values(a.contextMenus).length>0){(()=>t.import("@imengyu/vue3-context-menu"))().then((e=>{q=e.default,q.default&&!q.showContextMenu&&(q=q.default)}))}}));const G=i("IBizRawItem"),W=i("IBizIcon"),K=(e,t,n,i)=>{const s=[];return e.forEach((e=>{var l,r;if("SEPERATOR"===e.itemType)return void s.push({divided:"self"});const c=i[e.id];if(c&&!c.visible)return;let d={};if(e.showCaption&&e.caption&&(d.label=e.caption),e.sysImage&&e.showIcon&&(d.icon=o(W,{icon:e.sysImage},null)),"DEUIACTION"===e.itemType){d.disabled=c.disabled,d.clickClose=!0;const{uiactionId:o}=e;o&&(d.onClick=()=>{a.doUIAction(o,t,n,e.appId)})}else if("RAWITEM"===e.itemType){const{rawItem:t}=e;t&&(d.label=o(G,{rawItem:e},null))}else if("ITEMS"===e.itemType){const c=e;if((null==(l=c.detoolbarItems)?void 0:l.length)&&(d.children=K(c.detoolbarItems,t,n,i)),c.uiactionGroup&&c.groupExtractMode){const e=null==(r=c.uiactionGroup.uiactionGroupDetails)?void 0:r.filter((e=>i[e.id].visible)).map((e=>{const s=i[e.id],{sysImage:l}=e;return{label:e.showCaption?e.caption:void 0,icon:e.showIcon?o(W,{icon:l},null):void 0,disabled:s.disabled,clickableWhenHasChildren:!0,onClick:()=>{q.closeContextMenu(),a.doUIAction(e.uiactionId,t,n,e.appId)}}}));switch(c.groupExtractMode){case"ITEMS":d.children=e;break;case"ITEMX":e&&(d=e[0],d.children=e.slice(1));break;default:d=void 0,e&&s.push(...e)}}}d&&s.push(d)})),s},Y=Ii((()=>{a.load()}),500),X=e=>{"F2"!==e.code&&"Enter"!==e.code||z()},$=()=>{var e;const t=null==(e=I.value)?void 0:e.$el.querySelector(".is-focus");T.value&&!t&&A()};d((()=>{var e;document.addEventListener("mouseup",$.bind(this)),null==(e=g.value)||e.$el.addEventListener("keydown",X)})),p((()=>{var e;document.removeEventListener("mouseup",$.bind(this)),null==(e=g.value)||e.$el.removeEventListener("keydown",X)}));return{c:a,ns:m,treeRef:v,treeviewRef:g,treeNodeTextInputRef:w,treeData:F,treeRefreshKey:f,editingNodeKey:y,editingNodeText:C,cascadeSelect:s,newNodeKey:x,newNodeData:P,findNodeData:hv,onCheck:(e,t)=>{const{checkedNodes:n}=t;a.setSelection(n)},onNodeClick:(t,n,o)=>{var i,s;if(o.stopPropagation(),!t._disableSelect&&!U){if((null==(i=v.value)?void 0:i.getCurrentKey())!==t._id||H.value||z(),null==(s=v.value)||s.setCurrentKey(t._id),a.state.navigational){const e=a.getNodeModel(t._nodeId);if(!(null==e?void 0:e.navAppViewId)){const e=L(t._id);a.onExpandChange(t,e)}}e.isSimple?v.value.setCurrentKey(null==n?void 0:n._id):a.onTreeNodeClick(t,o),U=!0,setTimeout((()=>{U=!1}),200)}},onNodeDbClick:(e,t)=>{t.stopPropagation(),e._disableSelect||a.onDbTreeNodeClick(e)},onNodeContextmenu:async(e,t)=>{var n;t.preventDefault(),t.stopPropagation();let o=ibiz.config.tree.contextMenuRightClickInvoke;if((null==(n=a.controlParams)?void 0:n.contextmenurightclickinvoke)&&(o=Object.is(a.controlParams.contextmenurightclickinvoke,"true")),!o)return;const i=a.getNodeModel(e._nodeId);if(!(null==i?void 0:i.decontextMenu))return;const s=a.contextMenus[i.decontextMenu.id];if(!s.model.detoolbarItems)return;await s.calcButtonState(e._deData||(e.srfkey?e:void 0),i.appDataEntityId,{view:a.view,ctrl:a});const l=s.state.buttonsState,r=K(s.model.detoolbarItems,e,t,l);r.length&&q.showContextMenu({x:t.x,y:t.y,customClass:m.b("context-menu"),items:r})},loadData:async(t,n)=>{if(e.isSimple){let o=[];if(0===t.level){const e=a.state.items.find((e=>e.isRoot));e&&(o=[e])}else o=function(e,t,a){const{detreeNodeRSs:n}=t,o=[];if(!n||0===n.length)return o;const i=n.filter((t=>{var n;const o=e.state.items.find((e=>e._uuid===a.data._uuid));return!!o&&t.parentDETreeNodeId===(null==(n=o._nodeId)?void 0:n.toLowerCase())}));return i.sort(((e,t)=>e.ordervalue-t.ordervalue)),i.forEach((t=>{const a=e.state.items.filter((e=>{var a;return(null==(a=e._nodeId)?void 0:a.toLowerCase())===t.childDETreeNodeId}));a.length&&a.forEach((e=>{const t=Di(e);t._id=ei(),o.push(t)}))})),o}(a,e.modelData,t);return t._children=o,n(V(o)),void R()}let o;if(0===t.level)o=F.value,ibiz.log.debug("初始加载");else{const e=hv(t.data._uuid,a);e._children?(ibiz.log.debug("节点展开加载-本地",e),o=e._children):(ibiz.log.debug("节点展开加载-远程",e),o=await a.loadNodes(e))}ibiz.log.debug("给树返回值",o),n(V(o)),R(),b((()=>{var e,n,o;j(0===t.level?null==(n=null==(e=a.state.rootNodes)?void 0:e[0])?void 0:n._id:null==(o=t.data)?void 0:o._id,t)}))},renderContextMenu:(e,t)=>{var n,s;if(!(null==(s=null==(n=null==e?void 0:e.decontextMenu)?void 0:n.detoolbarItems)?void 0:s.length))return;const l=a.contextMenuInfos[e.id];return l.clickTBUIActionItem&&l.onlyOneActionItem?null:o(i("iBizContextMenuControl"),{class:m.bem("node","buttons",u.value),modelData:e.decontextMenu,groupLevelKeys:[50,100],nodeModel:e,nodeData:t,context:a.context,actionCallBack:(e,n)=>a.doUIAction(e.uiactionId,t,n,e.appId)},null)},renderCounter:e=>{if(e.counterId){const t=r.value[e.counterId];return ui(t)||1===e.counterMode&&0===t?null:o(i("iBizBadge"),{class:m.e("counter"),value:t},null)}},updateNodeExpand:(t,n)=>{const o=hv(t._uuid,a);if(!o)throw new _t(ibiz.i18n.t("control.common.noFoundNode",{id:t._uuid}));if(e.isSimple){const e=Di(o);e._id=t._id,a.onExpandChange(e,n)}else a.onExpandChange(o,n)},onInput:e=>{a.state.query=e,Y()},allowDrop:(e,t,n)=>{var o;if(null==(o=t.data)?void 0:o._load_more)return!1;const i=hv(e.data._uuid,a),s=hv(t.data._uuid,a);return a.calcAllowDrop(i,s,n)},allowDrag:e=>{var t;if(null==(t=e.data)?void 0:t._load_more)return!1;const n=hv(e.data._uuid,a);return a.calcAllowDrag(n)},handleDrop:(e,t,n)=>{const o=mv(n),i=hv(e.data._uuid,a),s=hv(t.data._uuid,a);a.onNodeDrop(i,s,o)},onNodeTextEditBlur:A,renderNewNode:()=>{var e,t,n,s;return E.value?T.value?o(i("iBizControlShell"),{class:[m.b("new-node"),null==(e=E.value.sysCss)?void 0:e.cssName],ref:I,data:k.value,modelData:T.value,context:a.context,params:a.params,onMouseup:e=>e.stopPropagation(),onPanelItemEvent:N,onKeydown:_},null):o("div",{class:[m.b("new-node"),null==(t=E.value.sysCss)?void 0:t.cssName],onClick:e=>{e.preventDefault(),e.stopPropagation()}},[(null==(n=E.value)?void 0:n.sysImage)?o(W,{class:m.be("node","icon"),icon:null==(s=E.value)?void 0:s.sysImage},null):null,o(i("el-input"),{modelValue:D.value,"onUpdate:modelValue":e=>D.value=e,ref:"treeNodeTextInputRef",class:m.b("editing-node"),onBlur:()=>{A()},onKeydown:e=>{M(e)}},null)]):null},handleEditKeyDown:M,handleLoadMore:async(e,t)=>{var n,o;if(e.stopPropagation(),!t)return;if(0===t.level)return void await a.loadNodes(void 0,!0);const i=hv(null==(n=t.data)?void 0:n._uuid,a);if(!i)return;await a.loadNodes(i,!0);const s=V(i._children||[]);null==(o=v.value)||o.updateKeyChildren(i._id,s),R(),b((()=>{j(i._id,i)}))}}},render(){const e={searchbar:()=>this.c.enableQuickSearch?o(i("el-input"),{"model-value":this.c.state.query,class:this.ns.b("quick-search"),placeholder:this.c.state.placeHolder,onInput:this.onInput},{prefix:()=>o("ion-icon",{class:this.ns.e("search-icon"),name:"search"},null)}):null},t=this.c.controlPanel?"tree":"default";return e[t]=()=>{if(this.c.state.isLoaded&&this.treeRefreshKey)return[o(i("el-tree"),w({ref:"treeRef",class:this.ns.b("tree"),key:this.treeRefreshKey,"node-key":"_id","highlight-current":!0,"expand-on-click-node":!1,"auto-expand-parent":!1,"show-checkbox":!this.c.state.singleSelect,"check-strictly":!this.cascadeSelect&&this.checkStrictly,"default-expanded-keys":this.c.state.expandedKeys,props:{label:"_text",children:"_children",isLeaf:"_leaf",disabled:"_disableSelect",class:e=>(null==e?void 0:e._load_more)?this.ns.is("load-more",!0):""},lazy:!0,load:this.loadData,onCheck:this.onCheck,onNodeExpand:e=>{this.updateNodeExpand(e,!0)},onNodeCollapse:e=>{this.updateNodeExpand(e,!1)},draggable:!0,"allow-drop":this.allowDrop,"allow-drag":this.allowDrag,onNodeDrop:this.handleDrop},this.$attrs),{default:({data:e,node:t})=>{var a,n;if(e._load_more)return o("div",{class:this.ns.b("node"),onClick:e=>{this.handleLoadMore(e,null==t?void 0:t.parent)}},[e._text]);if(this.newNodeKey===e._id)return this.renderNewNode();const s=this.findNodeData(e._uuid,this.c);if(!s)return null;const l=this.c.getNodeModel(s._nodeId);if(this.editingNodeKey===s._id)return o("div",{class:[this.ns.b("node"),null==(a=l.sysCss)?void 0:a.cssName]},[o(i("el-input"),{modelValue:this.editingNodeText,"onUpdate:modelValue":e=>this.editingNodeText=e,ref:"treeNodeTextInputRef",class:this.ns.b("editing-node"),onBlur:()=>{this.onNodeTextEditBlur()},onKeydown:e=>{this.handleEditKeyDown(e)}},null)]);const r=function(e){if(e.controlRenders){const t=e.controlRenders.filter((e=>"newnoderender"!==(e.id||"").split("_")[0]));return bn({controlRenders:t})}}(l);let c;return c=r?o(i("iBizControlShell"),{data:s,modelData:r,context:this.c.context,params:this.c.params},null):[s._icon?o(i("iBizIcon"),{class:this.ns.be("node","icon"),icon:s._icon},null):null,s._textHtml?o("span",{class:this.ns.be("node","label"),innerHTML:s._textHtml},null):o("span",{class:this.ns.be("node","label")},[s._text])],o("div",{onDblclick:e=>this.onNodeDbClick(s,e),onClick:t=>this.onNodeClick(s,e,t),onContextmenu:e=>this.onNodeContextmenu(s,e),class:[this.ns.b("node"),s._disableSelect?this.ns.bm("node","disabled"):"",null==(n=l.sysCss)?void 0:n.cssName]},[c,this.renderCounter(l),this.renderContextMenu(l,s)])}}),!this.newNodeData&&this.renderNewNode(),this.c.state.enableNavView&&this.c.state.showNavIcon?this.c.state.showNavView?o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),name:"eye-off-outline",onClick:()=>this.c.onShowNavViewChange()},null):o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),name:"eye-outline",onClick:()=>this.c.onShowNavViewChange()},null):null]},o(i("iBizControlNavigation"),{controller:this.c},{default:()=>{return[g(o(i("iBizControlBase"),{ref:"treeviewRef",controller:this.c},(t=e,"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]})),[[y("loading"),this.c.state.isLoading]])];var t}})}});var bv=Object.defineProperty,gv=(e,t,a)=>(((e,t,a)=>{t in e?bv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fv{constructor(){gv(this,"component","IBizTreeControl")}}const wv=e("W",oe(vv,(function(e){e.component(vv.name,vv),Ba(_a.TREEVIEW,(()=>new fv))}))),yv=a({name:"IBizPickupViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},singleSelect:{type:Boolean,default:!0},noLoadDefault:{type:Boolean,default:!1}},setup(){const e=ne(((...e)=>new yn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return{c:e,ns:t,onCreated:t=>{e.setEmbedView(t.view)}}},render(){return o(i("iBizControlBase"),{controller:this.c},{default:()=>[this.c.state.isCreated&&(this.$slots.default?this.$slots.default({context:this.c.state.context,params:this.c.state.params,state:{singleSelect:this.c.state.singleSelect,noLoadDefault:this.noLoadDefault},onCreated:this.onCreated}):r(i("IBizViewShell"),{context:this.c.state.context,params:this.c.state.params,viewId:this.c.model.embeddedAppDEViewId,state:{singleSelect:this.c.state.singleSelect,noLoadDefault:this.noLoadDefault},onCreated:this.onCreated}))]})}});var Cv=Object.defineProperty,Iv=(e,t,a)=>(((e,t,a)=>{t in e?Cv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Dv{constructor(){Iv(this,"component","IBizPickupViewPanelControl")}}const Ev=e("X",oe(yv,(function(e){e.component(yv.name,yv),Ba(_a.PICKUP_VIEW_PANEL,(()=>new Dv))})));const Sv=a({name:"IBizTabExpPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},defaultTabName:{type:String,required:!1}},setup(){var e;const t=ne(((...e)=>new Cn(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),o=n({}),i=e=>{o.value=e};t.evt.on("onCreated",(()=>{t.counter&&t.counter.onChange(i,!0)})),p((()=>{var e;null==(e=t.counter)||e.offChange(i)}));const s=(null==(e=t.view.model.tabLayout)?void 0:e.toLowerCase())||"top",l=Yi();let r="";return t.routeDepth&&(r=me(l,t.routeDepth)),c((()=>l.fullPath),((e,a)=>{if(e!==a){const e=t.routeDepth;if(e){if(me(l,t.routeDepth)===r){const a=K(l),{srfnav:n}=a.pathNodes[e-1];n&&t.state.activeName&&t.state.activeName!==n&&(t.state.activeName=n,t.handleTabChange())}}}}),{immediate:!0}),{c:t,ns:a,tabPosition:s,counterData:o,handleTabChange:()=>{t.handleTabChange()}}},render(){let e;const{isCreated:t,tabPages:a}=this.c.state;return o(i("iBizControlBase"),{controller:this.c},{default:()=>{return[t&&o(i("el-tabs"),{modelValue:this.c.state.activeName,"onUpdate:modelValue":e=>this.c.state.activeName=e,tabPosition:this.tabPosition,onTabChange:this.handleTabChange},(n=e=a.map((e=>{const t=e.counterId?this.counterData[e.counterId]:void 0;return o(i("el-tab-pane"),{class:[this.ns.e("tab-item")],label:e.caption,name:e.tabTag},{label:()=>o("span",{class:[...e.class]},[this.c.isShowIcon&&o(i("iBizIcon"),{icon:e.sysImage},null),this.c.isShowCaption&&e.caption,!ui(t)&&o(i("iBizBadge"),{class:this.ns.e("counter"),value:t},null)])})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?e:{default:()=>[e]}))];var n}})}});var xv=Object.defineProperty,Pv=(e,t,a)=>(((e,t,a)=>{t in e?xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kv{constructor(){Pv(this,"component","IBizTabExpPanelControl")}}const Tv=e("Y",oe(Sv,(function(e){e.component(Sv.name,Sv),Ba(_a.TAB_EXP_PANEL,(()=>new kv))})));function zv(e,t){const a=B("exp-bar"),n=Ii((()=>{e.load()}),500),s=t=>{e.state.query=t,n()};return{renderTitle:()=>{const{model:n}=e;if(!n.showTitleBar)return null;let s=n.title;return n.titleLanguageRes&&(s=ibiz.i18n.t(n.titleLanguageRes.lanResTag,n.title)),o("div",{class:[t.b("caption"),a.b("caption")]},[n.sysImage&&o(i("iBizIcon"),{class:[a.be("caption","icon")],icon:n.sysImage},null),s&&o("span",{class:[t.be("caption","text")]},[s])])},renderSearchBar:()=>{var n,l;const{model:c}=e;if(!c.enableSearch)return null;const d=null==(l=null==(n=e.view.model.viewLayoutPanel)?void 0:n.controls)?void 0:l.find((e=>"searchbar"===e.id));if(d){const t={context:e.context,params:e.params},a=i("IBizControlShell");return r(a,{modelData:d,...t})}return o(i("el-input"),{"model-value":e.state.query,class:[t.b("quick-search"),a.b("quick-search")],placeholder:e.state.placeHolder,onInput:s},{prefix:()=>o("ion-icon",{class:t.e("search-icon"),name:"search"},null)})}}}function Av(e){const t=e.view.modal.routeDepth;if(t){const a=Yi();let n;ve((({currentKey:o,fullPath:i})=>{if(n){if(n===o){const n=K(a),{srfnav:o}=n.pathNodes[t-1];e.onRouterChange({srfnav:o||"",path:i})}}else n=o}),t)}}const Ov=a({name:"IBizTreeExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},noNeedNavView:{type:Boolean,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new In(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);Av(e);const o=l((()=>e.view.model.viewType&&!["DEMPICKUPVIEW2","DEPICKUPVIEW2"].includes(e.view.model.viewType)));return{c:e,ns:t,navigational:o,renderTitle:a,renderSearchBar:n}},render(){const{state:e,XDataModel:t}=this.c,{isCreated:a}=e,n={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(a&&t){const e=this.c.controlPanel?t.name:"default";n[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,navigational:this.navigational,mdctrlActiveMode:1,loadDefault:!1,"default-expanded-keys":this.c.defaultExpandedKeys},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?n:{default:()=>[n]});var l}});var Mv=Object.defineProperty,Nv=(e,t,a)=>(((e,t,a)=>{t in e?Mv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Bv{constructor(){Nv(this,"component","IBizTreeExpBarControl")}}const _v=e("Z",oe(Ov,(function(e){e.component(Ov.name,Ov),Ba(_a.TREE_EXP_BAR,(()=>new Bv))})));const Rv=a({name:"IBizListExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new Dn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);return Av(e),{c:e,ns:t,renderTitle:a,renderSearchBar:n}},render(){const{isCreated:e}=this.c.state,{XDataModel:t}=this.c,a={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(e&&t){const e=this.c.controlPanel?t.name:"default";a[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}});var Lv=Object.defineProperty,jv=(e,t,a)=>(((e,t,a)=>{t in e?Lv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Vv{constructor(){jv(this,"component","IBizListExpBarControl")}}const Fv=e("_",oe(Rv,(function(e){e.component(Rv.name,Rv),Ba(_a.LIST_EXPBAR,(()=>new Vv))})));const Uv=a({name:"IBizGridExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new Dn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);return Av(e),{c:e,ns:t,renderTitle:a,renderSearchBar:n}},render(){const{isCreated:e}=this.c.state,{XDataModel:t}=this.c,a={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(e&&t){const e=this.c.controlPanel?t.name:"default";a[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}});var Hv=Object.defineProperty,qv=(e,t,a)=>(((e,t,a)=>{t in e?Hv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Gv{constructor(){qv(this,"component","IBizGridExpBarControl")}}const Wv=e("$",oe(Uv,(function(e){e.component(Uv.name,Uv),Ba(_a.GRID_EXPBAR,(()=>new Gv))})));const Kv=a({name:"IBizDataViewExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new Dn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);return Av(e),{c:e,ns:t,renderTitle:a,renderSearchBar:n}},render(){const{isCreated:e}=this.c.state,{XDataModel:t}=this.c,a={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(e&&t){const e=this.c.controlPanel?t.name:"default";a[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}});var Yv=Object.defineProperty,Xv=(e,t,a)=>(((e,t,a)=>{t in e?Yv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class $v{constructor(){Xv(this,"component","IBizDataViewExpBarControl")}}const Jv=e("a0",oe(Kv,(function(e){e.component(Kv.name,Kv),Ba(_a.DATA_VIEW_EXPBAR,(()=>new $v))})));const Qv=a({name:"IBizCalendarExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new En(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);return Av(e),{c:e,ns:t,renderTitle:a,renderSearchBar:n}},render(){const{state:e,XDataModel:t}=this.c,{isCreated:a}=e,n={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(a&&t){const e=this.c.controlPanel?t.name:"default";n[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?n:{default:()=>[n]});var l}});var Zv=Object.defineProperty,eb=(e,t,a)=>(((e,t,a)=>{t in e?Zv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tb{constructor(){eb(this,"component","IBizCalendarExpBarControl")}}const ab=e("a1",oe(Qv,(function(e){e.component(Qv.name,Qv),Ba(_a.CALENDAR_EXPBAR,(()=>new tb))})));const nb=a({name:"IBizChartExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new Sn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=zv(e,t);return Av(e),{c:e,ns:t,renderTitle:a,renderSearchBar:n}},render(){const{isCreated:e}=this.c.state,{XDataModel:t}=this.c,a={captionbar:this.renderTitle,searchbar:this.renderSearchBar};if(e&&t){const e=this.c.controlPanel?t.name:"default";a[e]=()=>o(i("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}});var ob=Object.defineProperty,ib=(e,t,a)=>(((e,t,a)=>{t in e?ob(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sb{constructor(){ib(this,"component","IBizChartExpBarControl")}}const lb=e("a2",oe(nb,(function(e){e.component(nb.name,nb),Ba(_a.CHART_EXPBAR,(()=>new sb))}))),rb=a({name:"IBizSearchBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){var e;const t=ne(((...e)=>new xn(...e))),a=n({}),s=e=>{a.value=e};t.evt.on("onCreated",(()=>{t.counter&&t.counter.onChange(s,!0)})),p((()=>{var e;null==(e=t.counter)||e.offChange(s)})),t.setStorageKeyFn(be(t.context,"SEARCH_BAR_SELECTED_GROUP",t.view.modal.routeDepth,"@","".concat(t.view.model.codeName,"@").concat(t.model.codeName)));const r=B("control-".concat(t.model.controlType.toLowerCase()));let c=!1;const d=()=>{c=!0,t.onSearch()},u=l((()=>t.model.quickSearchWidth?r.cssVarBlock({"quick-search-width":"".concat(t.model.quickSearchWidth,"px")}):{}));t.model.enableGroup&&t.model.searchBarGroups&&(null==(e=t.model.searchBarGroups)?void 0:e.length)>0&&(t.state.selectedGroupItem=t.model.searchBarGroups[0]);const h=n();let m;return{c:t,ns:r,cssVars:u,filterButtonRef:h,counterData:a,onClear:()=>{!0===c&&(c=!1,t.onSearch())},onSearch:d,onKeydown:e=>{"Enter"===e.code&&d()},onGroupClick:e=>{t.state.selectedGroupItem=e,t.evt.emit("onTabChange",{data:[e]}),d()},triggerFilter:()=>{m?m.dismiss():(async()=>{m=ibiz.overlay.createPopover((()=>o(i("iBizFilterTreeControl"),{filterControllers:t.filterControllers,filterNodes:t.state.filterNodes,parent:"search-bar",filterMode:t.state.filterMode,customCond:t.state.customCond,context:t.context,params:t.params,schemaEntityMap:t.schemaEntityMap,onCustomCondChange:e=>{t.state.customCond=e},onConfirm:(e,a)=>{t.state.filterMode=e,t.state.customCond=a,t.onSearch(),m&&m.dismiss()},onCancel:()=>{t.resetFilter(),t.state.customCond=""}},null)),void 0,{placement:"bottom-end",autoClose:!0}),m.present(h.value.$el),await m.onWillDismiss(),m=void 0})()},handleSave:()=>{t.handleSave()},renderAdvancedSearch:()=>t.state.advancedQuickSearch?o(i("iBizQuickSearchSelect"),{controller:t},null):null}},render(){return o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b()],style:this.cssVars},{default:()=>{var e;return[this.c.model.enableGroup&&(this.c.isBackendSearchGroup?o(i("iBizSearchGroups"),{controller:this.c,counterData:this.counterData},null):o("div",{class:this.ns.b("quick-group")},[null==(e=this.c.model.searchBarGroups)?void 0:e.map((e=>{var t;return this.c.calcCountVisible(e)?o("span",{class:[this.ns.b("quick-group-item"),this.ns.is("selected",(null==(t=this.c.state.selectedGroupItem)?void 0:t.id)===e.id)],onClick:()=>this.onGroupClick(e)},[e.caption,e.counterId&&o(i("iBizBadge"),{class:this.ns.e("counter"),value:this.counterData[e.counterId],counterMode:e.counterMode},null)]):null}))])),this.c.model.enableGroup&&this.c.isBackendSearchGroup&&o(i("el-button"),{class:this.ns.b("save"),title:zt(ibiz.i18n.t("control.searchBar.saveGroup")),onClick:this.handleSave},{default:()=>[o("ion-icon",{name:"save-outline"},null)]}),this.c.model.enableQuickSearch&&o(i("el-input"),{modelValue:this.c.state.query,"onUpdate:modelValue":e=>this.c.state.query=e,class:[this.ns.b("quick-search"),this.ns.is("advanced-quick-search",this.c.state.advancedQuickSearch)],placeholder:this.c.state.quickSearchPlaceHolder,clearable:!0,onKeydown:this.onKeydown,onClear:this.onClear,"suffix-icon":o("ion-icon",{onClick:this.onSearch,class:this.ns.e("search-icon"),name:"search"},null)},{prepend:()=>this.renderAdvancedSearch()}),this.c.enableFilter&&o(i("el-button"),{ref:"filterButtonRef",type:"primary",title:zt(ibiz.i18n.t("control.searchBar.filter")),class:this.ns.b("filter"),onClick:()=>this.triggerFilter()},{default:()=>[o(i("iBizIcon"),{icon:{cssClass:"funnel-outline"}},null)]})]}})}});var cb=Object.defineProperty,db=(e,t,a)=>(((e,t,a)=>{t in e?cb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ub{constructor(){db(this,"component","IBizSearchBarControl")}}function pb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const hb=[{valueOP:xa.EQ,label:"等于(=)"},{valueOP:xa.NOT_EQ,label:"不等于(<>)"},{valueOP:xa.GT,label:"大于(>)"},{valueOP:xa.GT_AND_EQ,label:"大于等于(>=)"},{valueOP:xa.LT,label:"小于(<)"},{valueOP:xa.LT_AND_EQ,label:"小于等于(<=)"},{valueOP:xa.IS_NULL,label:"值为空(Nil)"},{valueOP:xa.IS_NOT_NULL,label:"值不为空(NotNil)"},{valueOP:xa.IN,label:"值在范围中(In)"},{valueOP:xa.NOT_IN,label:"值不在范围中(NotIn)"},{valueOP:xa.LIKE,label:"文本包含(%)"},{valueOP:xa.LIFT_LIKE,label:"文本左包含(%#)"},{valueOP:xa.RIGHT_LIKE,label:"文本右包含(#%)"},{valueOP:xa.EXISTS,label:"存在(EXISTS)"},{valueOP:xa.NOT_EXISTS,label:"不存在(NOTEXISTS)"}],mb=[xa.IS_NULL,xa.IS_NOT_NULL,xa.EXISTS,xa.NOT_EXISTS],vb=a({name:"IBizFilterTreeControl",props:{filterControllers:{type:Array,required:!0},filterNodes:{type:Array,required:!0},parent:{type:String,required:!0},filterMode:{type:String,default:"default"},customCond:{type:String,default:""},context:{type:Object},params:{type:Object},schemaEntityMap:{type:Object,default:()=>new Map}},emits:["confirm","cancel","change","customCondChange"],setup(e,{emit:t}){const a=B("filter-tree"),s=l((()=>"search-bar"===e.parent)),d=l((()=>e.filterNodes)),u=t=>{if("ITEMS"===t.nodeType&&t.simple){const a=t.children[0];return e.filterControllers.find((e=>{if("SIMPLE_ITEMS"===e.type){const n=e;if(n.fieldName===t.field&&n.valueOP===t.valueOP&&n.subFieldName===a.field&&n.subValueOP===a.valueOP)return!0}return!1}))}const{field:a,valueOP:n}=t;return e.filterControllers.find((e=>"SIMPLE_ITEMS"!==e.type&&(e.fieldName===a&&(!e.valueOP||e.valueOP===n))))},p=[];e.filterControllers.forEach((e=>{let t=p.find((t=>t.name===e.key));e.hidden||(void 0===t&&(t={name:e.key,fieldName:e.fieldName,label:e.label,valueOPs:[]},"SIMPLE_ITEMS"===e.type&&(t.simpleFilterC=e),p.push(t)),e.valueOP?t.valueOPs.push(e.valueOP):t.valueOPs=hb.map((e=>e.valueOP)))}));const m=n([]);p.forEach((async t=>{var a,n;const o=e.filterControllers.find((e=>e.key===t.name));o&&m.value.push({appDEFieldId:t.fieldName,caption:t.label,valueOPs:t.valueOPs,appDataEntityId:e.schemaEntityMap.get(t.fieldName),appDataEntityFullTag:null==(a=o.appDataEntity)?void 0:a.defullTag,appCodeListId:null==(n=o.model.editor)?void 0:n.appCodeListId})}));const v=n(),b=n(e.filterMode||"default"),g=n(""),f=e=>{g.value=e,t("customCondChange",g.value)};c((()=>e.customCond),(()=>{g.value=e.customCond}),{immediate:!0});const w=(e,t,a=p)=>{const n=a.find((e=>e.name===t));n?(ti(e),n.simpleFilterC?n.simpleFilterC.addSimpleFilterNode(e):(e.nodeType="FIELD",e.field=n.fieldName)):ibiz.log.error("allFields找不到属性标识为".concat(t,"的"))},y=e=>{e.children.push({nodeType:"FIELD",field:null,valueOP:null,value:null})},C=(e,t)=>{if(t.noEditor||e.valueOP&&mb.includes(e.valueOP))return null;let n=null;if(t.editorProvider){const{data:a,value:o}=t.calcEditorProps(e),s=i(t.editorProvider.formEditor);n=r(s,{key:t.editor.model.id,value:o,controller:t.editor,disabled:e.disabled,data:a,onChange:(a,n)=>{t.onEditorChange(e,a,n)}})}else n=o(i("not-supported-editor"),{modelData:t.model.editor},null);return o("div",{class:a.e("editor")},[n])},I=(e,t)=>{if(e.hidden)return;let n=p;t&&(n=t.allFields);const s=((e,t=p)=>{if(!e)return;const a=t.find((t=>t.name===e));return a?a.valueOPs:void 0})(e.field,n);let l=null;if(e.field&&e.valueOP)if(t){const a=t.getSubFilterController(e.field,e.valueOP);l=C(e,a)}else{const t=u(e);t&&!["EXISTS","NOTEXISTS"].includes(t.valueOP)&&(l=C(e,t))}return o("div",{class:a.b("item")},[o(i("el-select"),{disabled:e.disabled,"model-value":e.field,teleported:!1,class:a.e("field-select"),onChange:t=>{w(e,t,n)}},{default:()=>[null==n?void 0:n.map((e=>o(i("el-option"),{key:e.name,value:e.name,label:e.label},null)))]}),s&&s.length>0&&o(i("iBizFilterModeSelect"),{disabled:e.disabled,class:a.e("mode-select"),value:e.valueOP,modes:s,onChange:t=>{((e,t)=>{e.valueOP=t,e.value=null,["EXISTS","NOTEXISTS"].includes(t)?Object.assign(e,{nodeType:"ITEMS",children:[{nodeType:"FIELD",field:null,valueOP:null,value:null}]}):Object.assign(e,{nodeType:"FIELD",children:void 0})})(e,t)}},null),l])};let D=e=>o("div",null,null);const E=(t,n,l)=>{if(!t.hidden)return"ITEMS"===t.nodeType?D(t):o("div",{class:a.b("group")},[o("div",{class:a.be("group","actions")},[o(i("el-button"),{text:!0,type:"primary",onClick:()=>{"pql"!==b.value?(e=>{e.children.push({nodeType:"GROUP",logicType:"AND",children:[{nodeType:"FIELD",field:null,valueOP:null,value:null}]})})(t):b.value="default"}},{default:()=>["pql"===b.value?"切换组":"添加组"]}),o(i("el-button"),{text:!0,onClick:()=>{"pql"!==b.value?y(t):b.value="default"}},{default:()=>["pql"===b.value?"切换项":"添加项"]}),l&&s.value&&o(i("el-button"),{text:!0,onClick:()=>{b.value="pql"}},{default:()=>[h("添加PQL")]}),o(i("el-select"),{"model-value":t.logicType,teleported:!1,class:a.be("group","logic-type"),onChange:e=>{b.value="default",((e,t)=>{e.logicType=t})(t,e)}},{default:()=>[o(i("el-option"),{key:"AND",value:"AND",label:"AND"},null),o(i("el-option"),{key:"OR",value:"OR",label:"OR"},null)]})]),"pql"===b.value&&o("div",{class:a.be("group","editor")},[o(i("iBizPqlEditor"),{ref:"pqlEditor",value:g.value,fields:m.value,context:e.context,params:e.params,onChange:f},null)]),"pql"!==b.value&&o("div",{class:a.be("group","list")},[t.children.length>0&&t.children.map(((e,s)=>{const l="FIELD"===e.nodeType?I(e,n):E(e,n);return l?o("div",{class:a.be("group","list-item")},[o("div",{class:a.be("group","list-item-left")},[t.logicType]),l,o(i("iBizIcon"),{class:a.be("group","list-item-right"),onClick:()=>{t.children.splice(s,1)},icon:{cssClass:"trash"}},null)]):null}))])])};D=e=>{let t;const n=u(e);if(n){if(e.simple){let t;const s=e.children[0];if(!s)return;return[o(i("el-select"),{disabled:s.disabled,"model-value":n.key,teleported:!1,class:a.e("field-select"),onChange:t=>{w(e,t)}},pb(t=p.map((e=>o(i("el-option"),{key:e.name,value:e.name,label:e.label},null))))?t:{default:()=>[t]}),o(i("iBizFilterModeSelect"),{disabled:!0,class:a.e("mode-select"),value:s.valueOP,modes:[s.valueOP]},null),C(s,n)]}return o("div",{class:(a.b("group"),a.bm("group","items"))},[o("div",{class:a.be("group","actions")},[I(e),o(i("el-button"),{text:!0,onClick:()=>{y(e)}},pb(t=ibiz.i18n.t("control.searchBar.filterTree.addItem"))?t:{default:()=>[t]})]),o("div",{class:a.be("group","list")},[e.children.length>0&&e.children.map(((t,s)=>{const l="FIELD"===t.nodeType?I(t,n):E(t,n);return o("div",{class:a.be("group","list-item")},[o("div",{class:a.be("group","list-item-left")},[h("AND")]),l,o(i("iBizIcon"),{class:a.be("group","list-item-right"),onClick:()=>{e.children.splice(s,1)},icon:{cssClass:"trash"}},null)])}))])])}};return{ns:a,renderFilterGroup:E,renderFilterItem:I,onConfirm:()=>{var e,a;if("pql"!==b.value)t("confirm",b.value,g.value);else if(v.value){(null==(a=(e=v.value).verify)?void 0:a.call(e))&&t("confirm",b.value,g.value)}},onCancel:()=>{t("cancel")},isInSearchBar:s,UiFilterNodes:d,pqlEditor:v}},render(){let e;return o("div",{class:[this.ns.b()]},[this.UiFilterNodes.length>0&&this.UiFilterNodes.map((e=>"FIELD"===e.nodeType?this.renderFilterItem(e):this.renderFilterGroup(e,void 0,!0))),o("div",{class:this.ns.b("footer")},[o(i("el-button"),{onClick:()=>{this.onConfirm()}},{default:()=>[this.isInSearchBar?ibiz.i18n.t("app.search"):ibiz.i18n.t("control.common.determine")]}),o(i("el-button"),{onClick:()=>{this.onCancel()}},pb(e=ibiz.i18n.t("app.reset"))?e:{default:()=>[e]})])])}});const bb=[{valueOP:xa.EQ,label:"等于(=)"},{valueOP:xa.NOT_EQ,label:"不等于(<>)"},{valueOP:xa.GT,label:"大于(>)"},{valueOP:xa.GT_AND_EQ,label:"大于等于(>=)"},{valueOP:xa.LT,label:"小于(<)"},{valueOP:xa.LT_AND_EQ,label:"小于等于(<=)"},{valueOP:xa.IS_NULL,label:"值为空(Nil)"},{valueOP:xa.IS_NOT_NULL,label:"值不为空(NotNil)"},{valueOP:xa.IN,label:"值在范围中(In)"},{valueOP:xa.NOT_IN,label:"值不在范围中(NotIn)"},{valueOP:xa.LIKE,label:"文本包含(%)"},{valueOP:xa.LIFT_LIKE,label:"文本左包含(%#)"},{valueOP:xa.RIGHT_LIKE,label:"文本右包含(#%)"},{valueOP:xa.EXISTS,label:"存在(EXISTS)"},{valueOP:xa.NOT_EXISTS,label:"不存在(NOTEXISTS)"}],gb=a({name:"IBizFilterModeSelect",props:{value:String,modes:Array,disabled:Boolean},emits:{change:e=>!0},setup:(e,{emit:t})=>({availableModes:l((()=>{var t;return(null==(t=e.modes)?void 0:t.length)?bb.filter((t=>e.modes.includes(t.valueOP))):bb})),onChange:e=>{t("change",e)}}),render(){let e;return o(i("el-select"),{"model-value":this.value,disabled:this.disabled,teleported:!1,onChange:e=>{this.onChange(e)}},"function"==typeof(t=e=this.availableModes.map((e=>o(i("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null))))||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]});var t}});function fb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const wb=a({name:"IBizSearchGroups",components:{draggable:Ui},props:{controller:{type:Object,required:!0},counterData:{type:Object,default:()=>{}}},setup(e){const t=B("search-groups"),a=e.controller,i=n(!1),{newDialogVisible:s,newForm:r,newFormRef:c,newFormRules:d,handleNewFormSubmit:p,handleNewFormCancel:h}=function(e){const t=n(!1),a=u({caption:""}),o=n(),i=u({caption:[{required:!0,message:ibiz.i18n.t("control.searchBar.searchGroups.groupValueRule"),trigger:"blur"}]}),s=()=>{o.value&&o.value.resetFields(),t.value=!1};return{newDialogVisible:t,newForm:a,newFormRef:o,newFormRules:i,handleNewFormSubmit:async()=>{o.value&&await o.value.validate((async(t,n)=>{if(t){if(e.state.searchBarGroups.find((e=>e.caption===a.caption)))return void ibiz.message.error(ibiz.i18n.t("control.searchBar.searchGroups.errorMessage"));await e.service.create(a.caption),s(),await e.initSearBarGroups(),ibiz.message.success("".concat(ibiz.i18n.t("control.common.newSuccCreated"),"!"))}}))},handleNewFormCancel:s}}(a),{editDialogVisible:m,editForm:v,editFormRef:b,editFormRules:g,handleEditFormSubmit:f,handleEditFormCancel:w}=function(e){const t=n(!1),a=u({caption:""}),o=n(),i=u({caption:[{required:!0,message:ibiz.i18n.t("control.searchBar.searchGroups.groupValueRule"),trigger:"blur"}]});return{editDialogVisible:t,editForm:a,editFormRef:o,editFormRules:i,handleEditFormSubmit:async()=>{o.value&&await o.value.validate((async(n,o)=>{if(n){if(e.currentEditGroup&&(await e.service.update(e.currentEditGroup.id,{caption:a.caption})).ok){const t=e.state.searchBarGroups.findIndex((t=>t.id===e.currentEditGroup.id));-1!==t&&(e.state.searchBarGroups[t].caption=a.caption)}ibiz.message.success("".concat(ibiz.i18n.t("control.common.updateSuccess"),"!")),t.value=!1}}))},handleEditFormCancel:()=>{t.value=!1}}}(a),y=a.model.quickGroupCount||4,C=l((()=>a.state.searchBarGroups.filter((e=>e.show)).slice(0,y))),I=l((()=>a.state.searchBarGroups.filter((e=>e.show)).slice(y))),D=l((()=>!!a.state.selectedSearchGroupItem&&I.value.includes(a.state.selectedSearchGroupItem)));return{ns:t,c:a,showGroups:C,hiddenGroups:I,onGroupClick:e=>{a.handleGroupClick(e)},newDialogVisible:s,editDialogVisible:m,manageDialogVisible:i,newGroup:()=>{s.value=!0},manageGroup:()=>{i.value=!0},newForm:r,newFormRef:c,newFormRules:d,handleNewFormSubmit:p,handleNewFormCancel:h,editForm:v,editFormRef:b,editFormRules:g,handleEditFormSubmit:f,handleEditFormCancel:w,editGroup:e=>{m.value=!0,a.currentEditGroup=e,v.caption=e.caption||e.name},removeGroup:e=>{si({title:ibiz.i18n.t("control.searchBar.searchGroups.delTitle"),message:()=>o("div",{class:t.b("remove-dialog")},[o("div",{class:t.b("remove-dialog-content"),innerHTML:ibiz.i18n.t("control.searchBar.searchGroups.confirmDelPrompt",{itemName:e.caption||e.name})},null),o("div",{class:t.b("remove-dialog-tip")},[ibiz.i18n.t("control.searchBar.searchGroups.unrecoverablePrompt")])]),showCancelButton:!0,confirmButtonText:ibiz.i18n.t("control.common.determine"),confirmButtonClass:t.b("remove-confirm-btn"),cancelButtonText:ibiz.i18n.t("app.cancel"),cancelButtonClass:t.b("remove-cancel-btn")}).then((async()=>{if(e.id){if((await a.service.remove(e.id)).ok){const t=a.state.searchBarGroups.findIndex((t=>t.name===e.name));-1!==t&&a.state.searchBarGroups.splice(t,1)}ibiz.message.success("".concat(ibiz.i18n.t("control.common.deleteSuccess"),"!")),await a.initSearBarGroups()}})).catch((()=>{}))},isActiveMore:D,onDragChange:async e=>{if(a.state.searchBarGroups.forEach(((e,t)=>{e.order=100*(t+1)})),e.moved){const t=e.moved.newIndex,n=e.moved.oldIndex,o=Math.min(t,n),i=Math.max(t,n)+1,s=a.state.searchBarGroups.slice(o,i);if(s.length>0){const e=async()=>{await a.service.updateBatch(s)},t=s.filter((e=>!e.saved));if(t.length){const n=await a.service.createBatch(t);if(n.ok&&n.data&&n.data[0]){const o=n.data[0];o.length>0&&o.forEach((e=>{const t=s.find((t=>t.name===e.name));t&&Ut(t,e)})),await e(),t.forEach((e=>{const t=a.state.searchBarGroups.find((t=>t.name===e.name));t&&(t.saved=!0)}))}}else await e()}}},editLinkTitle:e=>e.saved?e.noEdit?ibiz.i18n.t("control.searchBar.searchGroups.noEditPrompt"):"":ibiz.i18n.t("control.searchBar.searchGroups.savePrompt")}},render(){var e;return o("div",{class:this.ns.b()},[null==(e=this.showGroups)?void 0:e.map((e=>{var t;return this.c.calcCountVisible(e)?o("span",{class:[this.ns.b("quick-group-item"),this.ns.is("selected",(null==(t=this.c.state.selectedSearchGroupItem)?void 0:t.name)===e.name)],onClick:()=>this.onGroupClick(e)},[e.caption||e.name,e.counterId&&o(i("iBizBadge"),{class:this.ns.e("counter"),value:this.counterData[e.counterId],counterMode:e.counterMode},null)]):null})),o(i("el-dropdown"),{"popper-class":this.ns.b("dropdown")},{default:()=>{var e;return o("div",{class:[this.ns.b("more"),this.ns.is("selected",this.isActiveMore)]},[this.isActiveMore?null==(e=this.c.state.selectedSearchGroupItem)?void 0:e.caption:this.c.model.groupMoreText||ibiz.i18n.t("app.more"),o("ion-icon",{name:"chevron-down-outline"},null)])},dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>[this.hiddenGroups.map((e=>o(i("el-dropdown-item"),{onClick:()=>this.onGroupClick(e)},{default:()=>{var t;return[o("ion-icon",{name:"list-outline"},null),o("span",{class:this.ns.b("item-caption")},[e.caption||e.name]),(null==(t=this.c.state.selectedSearchGroupItem)?void 0:t.name)===e.name&&o("ion-icon",{name:"checkmark-outline"},null)]}}))),o(i("el-dropdown-item"),{divided:this.hiddenGroups.length>0,onClick:this.newGroup},{default:()=>[o("ion-icon",{name:"add-outline"},null),o("span",{class:this.ns.b("item-caption")},[ibiz.i18n.t("control.searchBar.searchGroups.newGroup")])]}),o(i("el-dropdown-item"),{onClick:this.manageGroup},{default:()=>[o("ion-icon",{name:"settings-outline"},null),o("span",{class:this.ns.b("item-caption")},[ibiz.i18n.t("control.searchBar.searchGroups.groupManage")])]})]})}),o(i("el-dialog"),{modelValue:this.newDialogVisible,"onUpdate:modelValue":e=>this.newDialogVisible=e,title:zt(ibiz.i18n.t("control.searchBar.searchGroups.newGroup")),"modal-class":this.ns.b("new-dialog")},{default:()=>o(i("el-form"),{ref:"newFormRef",model:this.newForm,"label-position":"top",rules:this.newFormRules},{default:()=>[o(i("el-form-item"),{label:ibiz.i18n.t("control.searchBar.searchGroups.groupName"),prop:"caption"},{default:()=>[o(i("el-input"),{modelValue:this.newForm.caption,"onUpdate:modelValue":e=>this.newForm.caption=e,placeholder:ibiz.i18n.t("control.searchBar.searchGroups.enterPrompt")},null)]})]}),footer:()=>{let e,t;return o("div",{class:this.ns.b("new-dialog-footer")},[o(i("el-button"),{class:this.ns.b("cancel-btn"),onClick:this.handleNewFormCancel},fb(e=ibiz.i18n.t("control.searchBar.searchGroups.dialogCancel"))?e:{default:()=>[e]}),o(i("el-button"),{type:"primary",onClick:this.handleNewFormSubmit},fb(t=ibiz.i18n.t("control.searchBar.searchGroups.dialogDetermine"))?t:{default:()=>[t]})])}}),o(i("el-dialog"),{modelValue:this.editDialogVisible,"onUpdate:modelValue":e=>this.editDialogVisible=e,title:zt(ibiz.i18n.t("control.searchBar.searchGroups.editGroup")),"modal-class":this.ns.b("edit-dialog")},{default:()=>o(i("el-form"),{ref:"editFormRef",model:this.editForm,"label-position":"top",rules:this.editFormRules},{default:()=>[o(i("el-form-item"),{label:ibiz.i18n.t("control.searchBar.searchGroups.groupName"),prop:"caption"},{default:()=>[o(i("el-input"),{modelValue:this.editForm.caption,"onUpdate:modelValue":e=>this.editForm.caption=e,placeholder:ibiz.i18n.t("control.searchBar.searchGroups.enterPrompt")},null)]})]}),footer:()=>{let e,t;return o("div",{class:this.ns.b("edit-dialog-footer")},[o(i("el-button"),{class:this.ns.b("cancel-btn"),onClick:this.handleEditFormCancel},fb(e=ibiz.i18n.t("control.searchBar.searchGroups.dialogCancel"))?e:{default:()=>[e]}),o(i("el-button"),{type:"primary",onClick:this.handleEditFormSubmit},fb(t=ibiz.i18n.t("control.searchBar.searchGroups.dialogDetermine"))?t:{default:()=>[t]})])}}),o(i("el-dialog"),{modelValue:this.manageDialogVisible,"onUpdate:modelValue":e=>this.manageDialogVisible=e,title:zt(ibiz.i18n.t("control.searchBar.searchGroups.groupManage")),"modal-class":this.ns.b("manage-dialog")},{default:()=>[o("div",{class:this.ns.b("manage-dialog-content")},[o("div",{class:this.ns.b("content-top")},[o("div",{class:this.ns.b("content-top-left")},[o("ion-icon",{name:"alert-circle-outline"},null),ibiz.i18n.t("control.searchBar.searchGroups.manageTips")]),o("div",{class:this.ns.b("content-top-right")},[o(i("el-button"),{onClick:()=>{this.newDialogVisible=!0}},{default:()=>[o("ion-icon",{name:"add-outline"},null),ibiz.i18n.t("control.searchBar.searchGroups.newGroup")]})])]),o("div",{class:this.ns.b("content-bottom")},[o("div",{class:this.ns.b("table-header")},[o("div",{class:this.ns.b("name")},[ibiz.i18n.t("control.searchBar.searchGroups.name")]),o("div",{class:this.ns.b("show")},[ibiz.i18n.t("control.searchBar.searchGroups.show")]),o("div",{class:this.ns.b("action")},[ibiz.i18n.t("control.searchBar.searchGroups.operate")])]),o(Ui,{class:this.ns.b("table-body"),modelValue:this.c.state.searchBarGroups,"onUpdate:modelValue":e=>this.c.state.searchBarGroups=e,group:this.c.model.id,itemKey:"id",sort:!0,"force-fallback":!0,animation:500,"ghost-class":this.ns.b("table-row-ghost"),onChange:e=>this.onDragChange(e)},{item:({element:e})=>{let t,a;return o("div",{class:this.ns.b("table-row")},[o("div",{class:this.ns.b("name")},[e.caption||e.name]),o("div",{class:this.ns.b("show")},[o(i("el-switch"),{modelValue:e.show,"onUpdate:modelValue":t=>e.show=t},null)]),o("div",{class:this.ns.b("action")},[o(i("el-link"),{type:"primary",disabled:!e.saved||e.noEdit,title:zt(this.editLinkTitle(e)),onClick:()=>this.editGroup(e)},fb(t=ibiz.i18n.t("app.edit"))?t:{default:()=>[t]}),o(i("el-link"),{type:"danger",disabled:!e.saved||"SYSTEM"===e.ownerType,title:zt(e.saved&&"SYSTEM"!==e.ownerType?"":ibiz.i18n.t("control.searchBar.searchGroups.savePrompt")),onClick:()=>this.removeGroup(e)},fb(a=ibiz.i18n.t("app.delete"))?a:{default:()=>[a]})])])}})])])]})])}});const yb=a({name:"IBizQuickSearchSelect",props:{controller:{type:xn,required:!0}},setup:e=>({ns:B("quick-search-select"),onItemClick:t=>{const a=t.fieldName,{quickSearchFieldNames:n}=e.controller.state,o=n.indexOf(a);if(-1===o)n.push(a);else{if(n.length<=1)return;n.splice(o,1)}e.controller.calcQuickSearchPlaceHolder()}}),render(){const{state:e}=this.controller;return o(i("el-dropdown"),{onCommand:this.onItemClick,trigger:"click","hide-on-click":!1,class:[this.ns.b()],"popper-class":[this.ns.b("popover")]},{default:()=>o("div",{title:ibiz.i18n.t("control.searchBar.quickSearchSelect.searchField"),class:this.ns.e("icon")},[o("ion-icon",{name:"settings-outline"},null)]),dropdown:()=>{let t;return o(i("el-dropdown-menu"),null,"function"==typeof(a=t=e.quickSearchItems.map((t=>{const a=e.quickSearchFieldNames.includes(t.fieldName);return o(i("el-dropdown-item"),{class:[this.ns.be("popover","item"),a&&this.ns.bem("popover","item","selected")],command:t},{default:()=>[t.label]})})))||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?t:{default:()=>[t]});var a}})}}),Cb=e("a3",oe(rb,(function(e){e.component(rb.name,rb),e.component(vb.name,vb),e.component(gb.name,gb),e.component(wb.name,wb),e.component(yb.name,yb),Ba(_a.SEARCHBAR,(()=>new ub))})));var Ib=Object.defineProperty,Db=(e,t,a)=>(((e,t,a)=>{t in e?Ib(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Eb{constructor(){Db(this,"component","IBizChartControl")}}const Sb=e("a4",{install(e){e.component("IBizChartControl",S({loader:()=>t.import("./chart-q7pMKjYo.js"),loadingComponent:ge,delay:0})),Ba(_a.CHART,(()=>new Eb))}});function xb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Pb=a({name:"IBizWizardPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=ne(((...e)=>new Pn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return{c:e,ns:t}},render(){var e,t,a,n,s;const{activeFormTag:l,buttonsState:c}=this.c.state;let d=null,u=null,p=null;if(l&&this.c.activeWizardForm){if(this.c.providers[l]){const t=i(this.c.providers[l].component),a=null==(e=this.c.model.deeditForms)?void 0:e.find((e=>{var t;return l===(null==(t=e.dewizardForm)?void 0:t.formTag)}));u=r(t,{class:this.ns.e("form"),modelData:a,context:Object.assign(this.c.context,{srfsilent:!0}),params:this.c.params,key:l,onMounted:e=>this.c.onFormMounted(l,e),onSaveSuccess:e=>this.c.onFormSaved(e)})}const{dewizard:h}=this.c.model;p=h&&o("div",{key:"".concat(l,"footer"),class:this.ns.b("footer")},[(null==(t=c["".concat(l,"@PREV")])?void 0:t.visible)&&o(i("el-button"),{onClick:()=>{this.c.onPrevClick()}},{default:()=>[h.prevCaption?h.prevCaption:ibiz.i18n.t("control.common.retreat")]}),(null==(a=c["".concat(l,"@NEXT")])?void 0:a.visible)&&o(i("el-button"),{onClick:()=>{this.c.onNextClick()}},{default:()=>[h.nextCaption?h.nextCaption:ibiz.i18n.t("control.common.forward")]}),(null==(n=c["".concat(l,"@FINISH")])?void 0:n.visible)&&o(i("el-button"),{onClick:()=>{this.c.onFinishClick()}},{default:()=>[h.finishCaption?h.finishCaption:ibiz.i18n.t("app.complete")]})]);const{dewizardSteps:m}=h;if(this.c.model.showStepBar&&m&&m.length>0){let e,t=this.c.steps.indexOf(this.c.stepTags["".concat(this.c.model.name,"_form_").concat(null==(s=this.c.state.activeFormTag)?void 0:s.toLowerCase())]);-1===t&&(t=0),d=o(i("el-steps"),{class:this.ns.b("header"),"align-center":!0,"finish-status":"success",active:t},xb(e=m.map((e=>{const t={title:()=>{var t;return o("span",{class:[this.ns.bm("header","title"),null==(t=e.titleSysCss)?void 0:t.cssName]},[zt(e.title)])}};return e.sysImage&&Object.assign(t,{icon:()=>o($,{class:this.ns.bm("header","step-icon"),icon:e.sysImage},null)}),o(i("el-step"),null,xb(t)?t:{default:()=>[t]})})))?e:{default:()=>[e]})}}return o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b(),this.ns.is("header",this.c.model.showStepBar)]},{default:()=>[d,u,p]})}});var kb=Object.defineProperty,Tb=(e,t,a)=>(((e,t,a)=>{t in e?kb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class zb{constructor(){Tb(this,"component","IBizWizardPanelControl")}}const Ab=e("a5",oe(Pb,(function(e){e.component(Pb.name,Pb),Ba(_a.WIZARD_PANEL,(()=>new zb))})));var Ob=Object.defineProperty,Mb=(e,t,a)=>(((e,t,a)=>{t in e?Ob(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Nb extends kn{constructor(){super(...arguments),Mb(this,"counter"),Mb(this,"router")}get navPos(){var e;return null==(e=this.view.layoutPanel)?void 0:e.panelItems.nav_pos}get viewNavPos(){var e;return null==(e=this.view.layoutPanel)?void 0:e.panelItems.view_nav_pos}get form(){var e;return null==(e=this.view)?void 0:e.getController("form")}get isCreate(){return this.getData()[0].srfuf!==qa.UPDATE}getData(){var e;return(null==(e=this.form)?void 0:e.getData())||[{}]}setRouter(e){this.router=e}get routeDepth(){return this.view.modal.routeDepth}initState(){super.initState(),this.state.drBarItems=[],this.state.srfnav="",this.state.selectedItem="",this.state.hideEditItem=!!this.model.hideEditItem}async onCreated(){await super.onCreated(),this.initDRBarItems(),await this.initCounter()}calcItemStateByCounter(e,t=!0){if(this.state.activated&&(this.state.drBarItems.forEach((e=>{var t;if(null==(t=e.children)?void 0:t.length)e.children.forEach((e=>{const t=Tn(e,this.counter);void 0!==t&&(e.visible=t)})),e.visible=e.children.some((e=>e.visible));else{const t=Tn(e,this.counter);void 0!==t&&(e.visible=t)}})),this.state.selectedItem&&t)){const{visible:e,defaultVisibleItem:t}=this.getItemVisibleState(this.state.selectedItem);!e&&t&&this.handleSelectChange(t.tag)}}getItemVisibleState(e){let t,a=!0;return this.state.drBarItems.forEach((n=>{if(n.children){t||(t=n.children.find((e=>e.visible)));const o=n.children.find((t=>t.tag===e));o&&(a=!!o.visible)}else!t&&n.visible&&(t=n),n.tag===e&&(a=!!n.visible)})),{visible:a,defaultVisibleItem:t}}async calcPermitted(e){var t;let a=!0;const n=(null==(t=this.getData())?void 0:t.length)?this.getData()[0]:void 0,o=await zn(e,this.context,this.params,this.model.appDataEntityId,this.model.appId,n);void 0!==o&&(a=o),e.visible=a}async calcDrBarItemsState(){await Promise.all(this.state.drBarItems.map((async e=>{var t;(null==(t=e.children)?void 0:t.length)?(await Promise.all(e.children.map((async e=>{await this.calcPermitted(e)}))),e.visible=e.children.some((e=>e.visible))):await this.calcPermitted(e)}))),this.calcItemStateByCounter({},!1),this.state.isCalculatedPermission=!0}async onMounted(){await super.onMounted(),this.form?(this.form.evt.on("onLoadSuccess",(async e=>{const t=e.data[0];this.view.state.srfactiveviewdata=t,Object.prototype.hasOwnProperty.call(t,"srfreadonly")&&(this.view.context.srfreadonly=t.srfreadonly),await this.calcDrBarItemsState(),this.handleFormChange(),this.doDefaultSelect()})),this.form.evt.on("onLoadDraftSuccess",(()=>{this.handleFormChange()})),this.form.evt.on("onSaveSuccess",(()=>{this.handleFormChange()}))):await this.calcDrBarItemsState(),this.form&&this.form.state.isLoaded&&this.doDefaultSelect()}handleFormChange(){const e=this.isCreate;this.setDRBarItemsState(this.state.drBarItems,e)}setDRBarItemsState(e,t){e.forEach((e=>{e.tag!==this.model.uniqueTag&&(e.disabled=t),e.children&&this.setDRBarItemsState(e.children,t)}))}initDRBarItems(){var e;const{dedrctrlItems:t,dedrbarGroups:a}=this.model,n=[];if(!this.state.hideEditItem){const{editItemCaption:t,editItemCapLanguageRes:a,editItemSysImage:o,uniqueTag:i}=this.model;let s=t;a&&(s=ibiz.i18n.t(a.lanResTag,t)),n.push({tag:i,caption:s,disabled:!1,sysImage:o,fullPath:null==(e=this.router)?void 0:e.currentRoute.value.fullPath}),this.state.defaultItem=i,this.state.selectedItem=n[0].tag}const o=e=>{let t=e.caption;e.capLanguageRes&&(t=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption));const{enableMode:a,testAppDELogicId:n,testScriptCode:o,counterMode:i}=e;return{tag:e.id,caption:t,sysImage:e.sysImage,disabled:!1,counterId:e.counterId,visible:!1,dataAccessAction:e.dataAccessAction||void 0,enableMode:a,testAppDELogicId:n,testScriptCode:o,counterMode:i}};a&&t&&(1===a.length?t.forEach((e=>{n.push(o(e))})):a.forEach((e=>{var a;const i=t.filter((t=>t.dedrbarGroupId===e.id));if(i.length>1||"true"===(null==(a=this.controlParams)?void 0:a.singleitemgroup)&&1===i.length){let t=e.caption;e.capLanguageRes&&(t=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),n.push({tag:e.id,caption:t,sysImage:e.sysImage,visible:!1,children:i.map((e=>o(e)))})}else 1===i.length&&n.push(o(i[0]))}))),this.state.drBarItems=n}handleSelectChange(e=this.state.selectedItem||this.state.defaultItem,t=!1){var a,n;if(this.state.selectedItem===e)return;const o=null==(a=this.model.dedrctrlItems)?void 0:a.find((t=>t.id===e));o?(this.setVisible("navPos"),this.openNavPosView(o,t)):(this.setVisible("form"),this.routeDepth&&(null==(n=this.state.drBarItems[0])?void 0:n.fullPath)&&this.router.push(this.state.drBarItems[0].fullPath)),this.state.selectedItem=e}setVisible(e){var t;if(this.state.hideEditItem)return;const a=null==(t=this.view.layoutPanel)?void 0:t.panelItems.view_form;"form"===e?(a&&(a.state.visible=!0,a.state.keepAlive=!0),this.viewNavPos&&(this.viewNavPos.state.visible=!1,this.viewNavPos.state.keepAlive=!0)):(a&&(a.state.visible=!1,a.state.keepAlive=!0),this.viewNavPos&&(this.viewNavPos.state.visible=!0,this.viewNavPos.state.keepAlive=!0))}prepareParams(e){const{navigateContexts:t,navigateParams:a}=e,n={navContexts:t,navParams:a},o={context:this.context,params:this.params,data:this.getData()[0]},{resultContext:i,resultParams:s}=ka(n,o);return{context:Object.assign(this.context.clone(),i),params:{...this.params,...s}}}async openNavPosView(e,t=!1){var a;if(!e.appViewId)return;const{context:n,params:o}=this.prepareParams(e);n.currentSrfNav=e.id,this.state.srfnav=e.id,null==(a=this.navPos)||a.openView({key:e.id,context:n,params:o,viewId:e.appViewId,isRoutePushed:t})}doDefaultSelect(){var e,t;const a=null==(e=this.view.layoutPanel)?void 0:e.panelItems.view_form;if(a&&(a.state.visible=!1,a.state.keepAlive=!1),!this.state.hideEditItem&&!this.state.srfnav)return void this.setVisible("form");if(this.isCreate)return void(this.state.defaultItem=this.model.uniqueTag);const{drBarItems:n}=this.state;let o=(null==(t=n[0].children)?void 0:t[0].tag)||n[0].tag;if(this.routeDepth&&this.state.srfnav&&(o=this.state.srfnav),o){const e=!!this.routeDepth&&An(this.routeDepth),{visible:t,defaultVisibleItem:a}=this.getItemVisibleState(o);!t&&a?(o=a.tag,this.handleSelectChange(o)):this.handleSelectChange(o,e),this.state.defaultItem=o}}async initCounter(){const{appCounterRefs:e}=this.model,t=null==e?void 0:e[0];t&&(this.counter=await On.getCounterByRef(t,this.context,{...this.params}),this.calcItemStateByCounter=this.calcItemStateByCounter.bind(this),this.counter.onChange(this.calcItemStateByCounter))}async onDestroyed(){await super.onDestroyed(),this.counter&&(this.counter.offChange(this.calcItemStateByCounter),this.counter.destroy())}setActive(e){this.handleSelectChange(e)}}e("a7",Nb);const Bb=a({name:"IBizDrBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},showMode:{type:String,default:"vertical"},hideEditItem:{type:Boolean,default:void 0}},setup(e){const t=ne(((...e)=>new Nb(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),n=Xi(),s=u({}),l=e=>{Object.assign(s,e)};t.evt.on("onCreated",(()=>{t.counter&&t.counter.onChange(l,!0)})),p((()=>{var e;null==(e=t.counter)||e.offChange(l)})),t.setRouter(n);const r=Yi();let d="";const h=[];c((()=>t.state.isCreated),((a,n)=>{if("horizontal"!==e.showMode){const{drBarItems:e}=t.state;e.forEach((e=>{h.push(e.tag)}))}})),t.routeDepth&&(d=me(r,t.routeDepth)),r&&c((()=>r.fullPath),((e,a)=>{if(e!==a){const e=t.routeDepth;if(e){if(me(r,t.routeDepth)===d){const a=K(r),{srfnav:n}=a.pathNodes[e-1];t.handleSelectChange(n)}}}}),{immediate:!0});const m=n=>{if(n.visible){if(n.children){let s="";if("horizontal"===e.showMode&&n.tag!==t.state.selectedItem){const e=n.children.find((e=>e.tag===t.state.selectedItem));e&&(s="-".concat(e.caption))}return o(i("el-sub-menu"),{class:a.b("group"),index:n.tag,disabled:n.disabled},{default:()=>n.children.map((e=>m(e))),title:()=>[o(i("iBizIcon"),{class:a.e("icon"),icon:n.sysImage},null),o("span",null,[n.caption,s])]})}return o(i("el-menu-item"),{class:a.e("item"),index:n.tag,disabled:n.disabled},{default:()=>[o(i("iBizIcon"),{class:a.e("icon"),icon:n.sysImage},null),o("span",null,[n.caption]),n.counterId&&null!=s[n.counterId]&&o(i("iBizBadge"),{class:a.e("counter"),value:s[n.counterId],counterMode:n.counterMode},null)]})}};return{c:t,ns:a,handleSelect:e=>{t.handleSelectChange(e);const a=t.state.drBarItems.find((t=>t.tag===e));a&&t.evt.emit("onTabChange",{data:a})},renderMenuItems:m,opens:h}},render(){const{isCreated:e,drBarItems:t,selectedItem:a,isCalculatedPermission:n}=this.c.state;return o(i("iBizControlBase"),{controller:this.c,class:this.ns.b()},{default:()=>[e&&n&&o(i("el-menu"),{class:this.ns.e("menu"),mode:this.showMode,"default-active":a,onSelect:this.handleSelect,"default-openeds":this.opens},{default:()=>t.map((e=>this.renderMenuItems(e)))})]})}});var _b=Object.defineProperty,Rb=(e,t,a)=>(((e,t,a)=>{t in e?_b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Lb{constructor(){Rb(this,"component","IBizDrBarControl")}}const jb=e("a6",oe(Bb,(function(e){e.component(Bb.name,Bb),Ba(_a.DRBAR,(()=>new Lb))})));var Vb=Object.defineProperty,Fb=(e,t,a)=>(((e,t,a)=>{t in e?Vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ub extends kn{constructor(){super(...arguments),Fb(this,"counter"),Fb(this,"srfCachePos",!1),Fb(this,"srfCacheKeyTempl",""),Fb(this,"router")}get navPos(){var e;return null==(e=this.view.layoutPanel)?void 0:e.panelItems.nav_pos}get form(){var e;return null==(e=this.view)?void 0:e.getController("form")}get routeDepth(){return this.view.modal.routeDepth}get storageTag(){if(this.srfCacheKeyTempl)return this.srfCacheKeyTempl;const e=this.context.srfuserid;return"".concat(e,"_").concat(this.view.model.codeName,"_").concat(this.model.codeName)}get enableAnchor(){return this.controlParams.enablenavbar?"true"===this.controlParams.enablenavbar:ibiz.config.drtab.enableNavbar}get navbarpos(){var e;return(null==(e=this.controlParams.navbarpos)?void 0:e.toLowerCase())||ibiz.config.drtab.navbarPos.toLowerCase()}get navbarwidth(){return this.controlParams.navbarwidth||ibiz.config.drtab.navbarWidth}setRouter(e){this.router=e}getData(){var e;return(null==(e=this.form)?void 0:e.getData())||[{}]}initState(){super.initState(),this.state.drTabPages=[],this.state.showMore=!1,this.state.hideEditItem=!!this.model.hideEditItem}async onCreated(){await super.onCreated(),await this.initCounter(),this.srfCacheKeyTempl=this.controlParams.srfcachekeytempl||"",this.controlParams.showmore&&(this.state.showMore="true"===this.controlParams.showmore),this.controlParams.srfcachepos&&(this.srfCachePos="true"===this.controlParams.srfcachepos.toLowerCase())}calcItemStateByCounter(){if(this.state.activated&&(this.state.drTabPages.forEach((e=>{const t=Tn(e,this.counter);void 0!==t&&(e.hidden=!t)})),this.state.activeName)){const{visible:e,defaultVisibleItem:t}=this.getItemVisibleState(this.state.activeName);!e&&t&&(this.state.activeName=t.tag,this.handleTabChange())}}getItemVisibleState(e){let t,a=!0;return this.state.drTabPages.forEach((n=>{t||n.hidden||(t=n),n.tag===e&&(a=!n.hidden)})),{visible:a,defaultVisibleItem:t}}async calcPermitted(e){var t;let a=!0;const n=(null==(t=this.getData())?void 0:t.length)?this.getData()[0]:void 0,o=await zn(e,this.context,this.params,this.model.appDataEntityId,this.model.appId,n);void 0!==o&&(a=o),e.hidden=!a}async calcDrTabPagesState(){await Promise.all(this.state.drTabPages.map((async e=>{await this.calcPermitted(e)}))),this.calcItemStateByCounter(),this.state.isCalculatedPermission=!0}async onMounted(){await super.onMounted(),this.form&&(this.form.evt.on("onLoadSuccess",(async e=>{const t=e.data[0];this.view.state.srfactiveviewdata=t,Object.prototype.hasOwnProperty.call(t,"srfreadonly")&&(this.view.context.srfreadonly=t.srfreadonly),await this.calcDrTabPagesState(),this.handleFormChange(),this.doDefaultSelect()})),this.form.evt.on("onLoadDraftSuccess",(()=>{this.handleFormChange()})),this.form.evt.on("onSaveSuccess",(()=>{this.handleFormChange()}))),this.initDRTabPages(),this.form||await this.calcDrTabPagesState(),this.form&&this.form.state.isLoaded&&this.doDefaultSelect()}doDefaultSelect(){var e;const t=null==(e=this.view.layoutPanel)?void 0:e.panelItems.view_form;t&&(t.state.visible=!1,t.state.keepAlive=!1),this.state.hideEditItem||this.state.activeName!==this.model.uniqueTag||this.setVisible("form")}handleFormChange(){const e=this.getData()[0].srfuf!==qa.UPDATE;this.setDRTabPagesState(this.state.drTabPages,e)}setDRTabPagesState(e,t){e.forEach((e=>{e.tag!==this.model.uniqueTag&&(e.disabled=t)}))}initDRTabPages(){const{editItemCaption:e,editItemCapLanguageRes:t,editItemSysImage:a,uniqueTag:n,dedrtabPages:o}=this.model,i=[];let s=e;if(t&&(s=ibiz.i18n.t(t.lanResTag,e)),this.state.hideEditItem||i.push({caption:s,tag:n,hidden:!!this.state.hideEditItem,disabled:!1,sysImage:a,fullPath:this.routeDepth?me(this.router.currentRoute.value,this.routeDepth):""}),null==o||o.forEach((e=>{let t=e.caption;e.capLanguageRes&&(t=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption));const{enableMode:a,dataAccessAction:n,testAppDELogicId:o,testScriptCode:s,counterMode:l}=e;i.push({tag:e.id,caption:t,sysImage:e.sysImage,hidden:!1,disabled:!1,counterId:e.counterId,dataAccessAction:n,enableMode:a,testAppDELogicId:o,testScriptCode:s,counterMode:l})})),this.state.drTabPages=i,this.state.defaultName=i[0].tag,this.view.state.srfnav)this.state.activeName=this.view.state.srfnav;else if(this.state.activeName=i[0].tag,this.srfCachePos&&localStorage.getItem(this.storageTag)){const e=localStorage.getItem(this.storageTag);this.state.activeName=e}const l=!!this.routeDepth&&An(this.routeDepth);this.handleTabChange(l)}handleTabChange(e=!1){var t;const{activeName:a}=this.state,n=null==(t=this.model.dedrtabPages)?void 0:t.find((e=>e.id===a));this.srfCachePos&&a&&localStorage.setItem("".concat(this.storageTag),a),n?(this.setVisible("navPos"),this.openNavPosView(n,e)):(this.setVisible("form"),this.routeDepth&&this.state.drTabPages[0]&&this.router.push(this.state.drTabPages[0].fullPath))}setVisible(e){var t;if(this.state.hideEditItem)return;const a=null==(t=this.view.layoutPanel)?void 0:t.panelItems.view_form;"form"===e?(a&&(a.state.visible=!0,a.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!1,this.navPos.state.keepAlive=!0)):(a&&(a.state.visible=!1,a.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!0,this.navPos.state.keepAlive=!0))}prepareParams(e){const{navigateContexts:t,navigateParams:a}=e,n={navContexts:t,navParams:a},o={context:this.context,params:this.params,data:this.getData()[0]},{resultContext:i,resultParams:s}=ka(n,o);return{context:Object.assign(this.context.clone(),i,{currentSrfNav:e.id}),params:{...this.params,...s}}}async openNavPosView(e,t=!1,a){var n;const{context:o,params:i}=this.prepareParams(e);e.appViewId&&(null==(n=this.navPos)||n.openView({key:a||e.id,context:o,params:i,viewId:e.appViewId,isRoutePushed:t}))}async initCounter(){const{appCounterRefs:e}=this.model,t=null==e?void 0:e[0];t&&(this.counter=await On.getCounterByRef(t,this.context,{...this.params}),this.calcItemStateByCounter=this.calcItemStateByCounter.bind(this),this.counter.onChange(this.calcItemStateByCounter))}async refresh(){var e;const{activeName:t}=this.state,a=null==(e=this.model.dedrtabPages)?void 0:e.find((e=>e.id===t));a?(this.setVisible("navPos"),this.openNavPosView(a,!1,ei())):(this.setVisible("form"),this.routeDepth&&this.state.drTabPages[0]&&this.router.push(this.state.drTabPages[0].fullPath))}async onDestroyed(){await super.onDestroyed(),this.counter&&(this.counter.offChange(this.calcItemStateByCounter),this.counter.destroy())}setActive(e){this.state.activeName=e,this.handleTabChange()}}function Hb(e,t,a){let o=null,i=0;const s=n([]),l=n([]),r=(e,t={})=>{let a=0;const n=document.createElement("span"),o=document.createElement("span");return o.innerHTML=e,Object.assign(o.style,t),Object.assign(n.style,{width:"auto",position:"absolute",left:"-9999px"}),n.appendChild(o),document.body.appendChild(n),a=n.offsetWidth,document.body.removeChild(n),a};function d(){const{drTabPages:n,showMore:o}=e.state;if(!t.value||!o||0===n.length)return s.value=n,void(l.value=[]);const i=t.value.$el.offsetWidth;let c=0;s.value=[],l.value=[],n.forEach(((e,t)=>{if(!e.hidden){const n=e.caption||"",o=e.counterId?a[e.counterId]:void 0,d="var(--".concat(al,"-font-size-regular)");if(null!=o&&(o||0===o)&&!(1===e.counterMode&&o<=0)){const e={marginLeft:"var(--".concat(al,"-spacing-tight)"),minWidth:"20px",fontSize:d},t=r(String(o),e);c+=t}const u={padding:"0 var(--".concat(al,0===t?"-spacing-base) 0 0":"-spacing-base)"),fontSize:d},p=r(n,u);c+=p;const h={padding:"0 0 0 var(--".concat(al,"-spacing-base)"),fontSize:d},m=r("".concat(ibiz.i18n.t("app.more")," ^"),h);c+m>i?l.value.push(e):s.value.push(e)}}))}c((()=>e.state.drTabPages),(()=>{d()}),{deep:!0});const u=x((()=>{t.value&&(()=>{if(window.ResizeObserver){const e=t.value.$el;e&&(o=new ResizeObserver((e=>{const t=e[0].contentRect.width;t!==i&&(d(),i=t)})),o.observe(e))}})()}));return p((()=>{o&&o.disconnect(),u()})),{visibleItems:s,moreItems:l}}e("a9",Ub);const qb=a({name:"FlowDrtab",props:{pagesstate:{type:Array,default:()=>[]},drtabpages:{type:Array,default:()=>[]},context:{type:Object,default:()=>{}},params:{type:Object,default:()=>{}},counterData:{type:Array,default:()=>{}},showHeader:{type:Boolean,default:!0},activeTab:{type:Object,default:()=>{}},controller:{type:Object,default:()=>{}}},setup(e){const t=B("flow-drtab"),a=ei(),i=e.controller,s=n(""),r=n([]),d=n(),u=n(200),p=[],h=n(0),m=n(),v=n(0),g=n(),f=n();d.value=i.navbarpos,u.value=i.navbarwidth;const w=l((()=>e.pagesstate.filter((t=>e.drtabpages.find((e=>e.id===t.tag))&&!t.hidden)).length)),y=l((()=>e.pagesstate?e.pagesstate.map((t=>{const a=e.drtabpages.find((e=>e.id===t.tag));return"".concat(null==a?void 0:a.appViewId,"_").concat(t.tag)})):[])),C=()=>{if(s.value){const e=document.getElementById("".concat(s.value));e&&e.scrollIntoView()}},I=()=>{const e=document.getElementById("navbar_".concat(s.value));e&&m.value&&!((e,t)=>{const a=t.getBoundingClientRect(),n=e.getBoundingClientRect();return n.top>=a.top&&n.bottom<=a.bottom&&n.left>=a.left&&n.right<=a.right})(e,m.value)&&e.scrollIntoView({behavior:"smooth"})},E=new IntersectionObserver((e=>{e.forEach((e=>{var t,a;if(e.isIntersecting){if(e.target&&e.target.id)if(p.length>0){(null==(t=y.value)?void 0:t.findIndex((t=>t===e.target.id)))<(null==(a=y.value)?void 0:a.findIndex((e=>e===p[0])))?p.unshift(e.target.id):p.push(e.target.id)}else p.push(e.target.id)}else if(e.target&&e.target.id){const t=p.indexOf(e.target.id);t>=0&&p.splice(t,1)}})),p.sort(((e,t)=>{var a,n;return(null==(a=y.value)?void 0:a.findIndex((t=>t===e)))-(null==(n=y.value)?void 0:n.findIndex((e=>e===t)))})),w.value===v.value&&i.enableAnchor&&(p.length>0&&(s.value=p[0]),f.value?(clearTimeout(g.value),g.value=setTimeout((()=>{s.value=f.value,I(),f.value=""}),200)):I())}));c((()=>e.activeTab),((t,a)=>{if(t&&t.tag!==(null==a?void 0:a.tag)){const a=e.drtabpages.find((e=>e.id===t.tag));s.value="".concat(null==a?void 0:a.appViewId,"_").concat(t.tag),t.tag!==e.drtabpages[0].id&&C()}}),{deep:!0,immediate:!0}),c((()=>e.drtabpages),(e=>{e&&Promise.all(e.map((async e=>{const t=await ibiz.hub.getAppView(e.appViewId);return{id:e.id,height:null==t?void 0:t.height,width:null==t?void 0:t.width}}))).then((e=>{r.value=e}))}),{deep:!0,immediate:!0}),D((()=>{b((()=>{const e=document.getElementById("".concat(a));e&&(e.scrollTop=h.value)}))}));return{c:i,ns:t,uuid:a,navbarpos:d,onViewMounted:t=>{const a=e.drtabpages.find((e=>e.id===t.tag));v.value+=1,v.value!==w.value||s.value||(s.value="".concat(null==a?void 0:a.appViewId,"_").concat(e.pagesstate[0].tag));const n=document.getElementById("".concat(null==a?void 0:a.appViewId,"_").concat(t.tag));n&&E.observe(n),v.value===w.value&&e.activeTab&&e.activeTab.tag!==e.drtabpages[0].id&&b((()=>{C()}))},navBarWidth:u,calcStyle:e=>{const t=r.value.find((t=>t.id===e));if(t)return{height:t.height?"".concat(t.height,"px"):"100%",width:t.width?"".concat(t.width,"px"):"100%"}},renderAnchorBar:()=>{if(i.enableAnchor)return o("div",{class:[t.e("anchor-bar"),t.is(d.value,!0)],style:{width:"".concat(u.value,"px")}},[o("div",{class:[t.e("anchor-items"),t.is(d.value)],ref:e=>{m.value=e}},[e.pagesstate.map((a=>{const n=e.drtabpages.find((e=>e.id===a.tag));return!n||a.hidden?null:o("div",{class:[t.e("anchor-item"),t.is("active","".concat(null==n?void 0:n.appViewId,"_").concat(a.tag)===s.value)],id:"navbar_".concat(n.appViewId,"_").concat(a.tag),onClick:()=>(t=>{const a=e.drtabpages.find((e=>e.id===t.tag));f.value="".concat(null==a?void 0:a.appViewId,"_").concat(t.tag);const n=document.getElementById("".concat(null==a?void 0:a.appViewId,"_").concat(t.tag));n&&(n.scrollIntoView({behavior:"smooth"}),p.includes(f.value)&&(s.value=f.value))})(a)},[a.caption])}))])])},handleScroll:()=>{const e=document.getElementById("".concat(a));e&&(h.value=e.scrollTop)}}},render(){var e,t;const a=this.pagesstate.map((e=>{const t=e.counterId?this.counterData[e.counterId]:void 0,a=i("IBizViewShell"),n=this.drtabpages.find((t=>t.id===e.tag));return!n||e.hidden?null:o("div",{id:"".concat(n.appViewId,"_").concat(e.tag),class:this.ns.e("tab-item")},[this.showHeader&&o("div",{class:this.ns.em("tab-item","label")},[e.sysImage&&o(i("iBizIcon"),{class:this.ns.be("label","icon"),icon:e.sysImage},null),o("span",{class:this.ns.be("label","text")},[e.caption]),!ui(t)&&o(i("iBizBadge"),{class:this.ns.e("counter"),value:t,counterMode:e.counterMode},null)]),o("div",{class:this.ns.em("tab-item","tab-view"),style:this.calcStyle(e.tag)},[r(a,{context:this.context,params:this.params,viewId:n.appViewId,onMounted:()=>this.onViewMounted(e)})])])}));return o("div",{class:[this.ns.b(),this.ns.m(this.navbarpos),this.ns.is("left",null==(e=this.navbarpos)?void 0:e.includes("left")),this.ns.is("right",null==(t=this.navbarpos)?void 0:t.includes("right")),this.ns.is("enable-anchor",this.c.enableAnchor)],onScroll:this.handleScroll,id:this.uuid},[this.renderAnchorBar(),o("div",{class:this.ns.e("container"),style:{"--navbarwidth":"".concat(this.navBarWidth,"px")}},[a])])}}),Gb=a({name:"IBizDrTabControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},hideEditItem:{type:Boolean,default:void 0}},setup(){var e;const t=ne(((...e)=>new Ub(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),s=Xi(),r=n(),d=u({}),{visibleItems:h,moreItems:m}=Hb(t,r,d),v=e=>{Object.assign(d,e)},b=(null==(e=t.view.model.tabLayout)?void 0:e.toLowerCase())||"top";t.evt.on("onCreated",(()=>{t.counter&&t.counter.onChange(v,!0)}));const g=l((()=>t.state.drTabPages.find((e=>e.tag===t.state.activeName))));p((()=>{var e;null==(e=t.counter)||e.offChange(v)})),t.setRouter(s);const f=()=>{const{activeName:e}=t.state,a=t.state.drTabPages.find((t=>t.tag===e));a&&t.evt.emit("onTabChange",{data:a})},w=e=>{t.state.activeName=e,t.handleTabChange(),f()},y=Yi();let C="";t.routeDepth&&(C=me(y,t.routeDepth)),y&&c((()=>y.fullPath),((e,a)=>{if(e!==a){const e=t.routeDepth;if(e){if(me(y,t.routeDepth)===C){const a=K(y),{srfnav:n}=a.pathNodes[e-1],o=!!t.routeDepth&&An(t.routeDepth);if(n&&t.state.activeName&&t.state.activeName!==n)t.state.activeName=n,t.handleTabChange(o);else if(!n){const e=!!t.routeDepth&&!An(t.routeDepth);(t.state.activeName!==t.state.defaultName||e)&&(t.state.activeName=t.state.defaultName,t.handleTabChange(o))}}}}}),{immediate:!0});return{c:t,ns:a,activeTab:g,controlRef:r,counterData:d,visibleItems:h,moreItems:m,tabPosition:b,onTabChange:w,handleTabChange:()=>{t.handleTabChange(),f()},renderDropdownList:()=>o(i("el-dropdown"),{trigger:"click",class:a.b("dropdown-list"),"popper-class":a.be("dropdown-list","popper"),onCommand:w},{default:()=>{var e,t,n;return o("div",{class:a.be("dropdown-list","trigger")},[(null==(e=g.value)?void 0:e.sysImage)&&o(i("iBizIcon"),{icon:g.value.sysImage},null),o("div",{class:"caption"},[null==(t=g.value)?void 0:t.caption,(null==(n=g.value)?void 0:n.counterId)&&o(i("iBizBadge"),{value:d[g.value.counterId],counterMode:g.value.counterMode},null)]),o("ion-icon",{name:"chevron-down-outline"},null)])},dropdown:()=>o("div",{class:a.bem("dropdown-list","popper","content")},[t.state.drTabPages.map((e=>e.hidden?null:o(i("el-dropdown-item"),{class:[a.bem("dropdown-list","popper","item"),a.is("active",e.tag===t.state.activeName)],command:e.tag,disabled:e.disabled},{default:()=>[e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),o("span",{class:"caption"},[e.caption]),e.counterId&&o(i("iBizBadge"),{value:d[e.counterId],counterMode:e.counterMode},null),e.tag===t.state.activeName&&o("ion-icon",{name:"checkmark-outline"},null)]})))])})}},render(){const{isCreated:e,isCalculatedPermission:t}=this.c.state;if("flow_noheader"===this.tabPosition||"flow"===this.tabPosition)return o(qb,{pagesstate:this.visibleItems,drtabpages:this.modelData.dedrtabPages,context:this.c.context,params:this.c.params,showHeader:"flow"===this.tabPosition,counterData:this.counterData,activeTab:this.activeTab,controller:this.c},null);const a=this.moreItems.find((e=>e.tag===this.c.state.activeName))||{},n=o(i("el-dropdown"),{trigger:"click",class:this.ns.b("more-dropdown"),"popper-class":this.ns.b("more-dropdown-popper")},{default:()=>o("div",{class:this.ns.be("more-dropdown","link"),onClick:e=>e.stopPropagation()},[o("span",null,[ibiz.i18n.t("app.more"),h(" ")]),o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.978 11.997l-.005.006L2.3 6.33l.83-.831 4.848 4.848L12.826 5.5l.83.83-5.673 5.673-.005-.006z"},null)])])]),dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>this.moreItems.map((e=>o(i("el-dropdown-item"),{class:[this.c.state.activeName===e.tag?this.ns.be("more-dropdown-popper","active"):""],onClick:()=>this.onTabChange(e.tag)},{default:()=>[o("span",{class:[this.ns.be("more-dropdown-popper","label")]},[o("span",{class:this.ns.bem("more-dropdown-popper","label","text"),title:zt(e.caption||"")},[e.caption||""]),e.counterId&&null!=this.counterData[e.counterId]&&o(i("iBizBadge"),{class:this.ns.bem("more-dropdown-popper","label","counter"),value:this.counterData[e.counterId],counterMode:e.counterMode},null)])]})))})});return o(i("iBizControlBase"),{ref:"controlRef",controller:this.c,class:[this.ns.b(),this.moreItems.length>0?this.ns.b("more"):""]},{default:()=>[e&&t&&"top_dropdownlist"===this.tabPosition?this.renderDropdownList():o(i("el-tabs"),{modelValue:this.c.state.activeName,"onUpdate:modelValue":e=>this.c.state.activeName=e,tabPosition:this.tabPosition,onTabChange:this.handleTabChange},{default:()=>[this.visibleItems.map((e=>{const t=e.counterId?this.counterData[e.counterId]:void 0;return e.hidden?null:o(i("el-tab-pane"),{class:this.ns.e("tab-item"),label:e.caption+t,disabled:e.disabled,name:e.tag},{label:()=>o("span",{class:this.ns.b("label")},[e.sysImage&&o(i("iBizIcon"),{class:this.ns.be("label","icon"),icon:e.sysImage},null),o("span",{class:this.ns.be("label","text")},[e.caption]),!ui(t)&&o(i("iBizBadge"),{class:this.ns.e("counter"),value:t,counterMode:e.counterMode},null)])})})),this.moreItems.length>0&&o(i("el-tab-pane"),{label:"",name:a.tag},{label:()=>n})]})]})}});var Wb=Object.defineProperty,Kb=(e,t,a)=>(((e,t,a)=>{t in e?Wb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Yb{constructor(){Kb(this,"component","IBizDrTabControl")}}const Xb=e("a8",oe(Gb,(function(e){e.component(Gb.name,Gb),Ba(_a.DRTAB,(()=>new Yb))})));function $b(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Jb={};function Qb(e,t,a){var n;const s=t.providers[e.id],l={modelData:e,controller:t.portlets[e.id]};if(!s)return o("div",null,[e.portletType,ibiz.i18n.t("app.noSupport")]);const c=i(s.component);if("CONTAINER"===e.portletType){const a=e;return r(c,{...l,key:e.id,id:e.id},{default:()=>{var e;return null==(e=a.controls)?void 0:e.map((e=>Qb(e,t)))}})}return r(c,{...l,key:(null==(n=Jb[e.id])?void 0:n.refreshtag)?Jb[e.id].refreshtag:e.id,id:e.id})}const Zb=a({name:"IBizDashboardControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=ne(((...e)=>new Mn(...e)));ue(e);const t=C().proxy,a=n([]),o=n([]),i=n(),s=B("control-".concat(e.model.controlType.toLowerCase()));e.evt.on("onInitPortlets",(()=>{Object.values(e.portlets).forEach((e=>{T(e.state)||(e.state=u(e.state))})),o.value=e.enableAnchorCtrls})),e.evt.on("onItemModelReset",(async n=>{if(2!==e.model.customizeMode)return;const{name:o}=n,i=a.value.findIndex((e=>e.id===o));if(-1!==i){const n=ibiz.hub.getApp(ibiz.env.appId),s=await e.loadDynaPortletById("".concat(n.model.codeName,".").concat(o));s&&(Jb[s.id]={refreshtag:xi()},a.value.splice(i,1,s),t.$forceUpdate())}}));return{c:e,ns:s,customModelDatas:a,anchorList:o,dashboardRef:i,calcNavBarConfig:()=>{const{navBarPos:t,navBarSysCss:a,navBarWidth:n,navBarStyle:o,navbarHeight:i}=e.model;return{navBarPos:t,navBarSysCss:a,navBarWidth:n,navBarStyle:o,navbarHeight:i}},handleCustomModelChange:n=>{const o=n.model,i=e.model.controls;o&&o.length>0?o.forEach((e=>{"FILTER"===e.portletType&&(Jb[e.id]={refreshtag:xi()})})):i&&i.length>0&&i.forEach((e=>{"FILTER"===e.portletType&&(Jb[e.id]={refreshtag:xi()})})),a.value=o,t.$forceUpdate()}}},render(){const{state:e,model:t}=this.c,a=()=>o(i("iBizRow"),{ref:"dashboardRef",class:[this.ns.b()],layout:t.layout},{default:()=>{var e;return[null==(e=t.controls)?void 0:e.map((e=>{var t;let a;return o(i("iBizCol"),{layoutPos:e.layoutPos,state:null==(t=this.c.portlets[e.id])?void 0:t.state},$b(a=Qb(e,this.c))?a:{default:()=>[a]})}))]}}),n=()=>{const e={default:()=>a()};return this.customModelDatas.forEach((t=>{e[t.codeName]=()=>Qb(t,this.c)})),e};let s=null;if(t.enableCustomized){let e;s=o(i("iBizCustomDashboardContainer"),{modelData:this.modelData,dashboard:this.c,onChanged:this.handleCustomModelChange},$b(e=n())?e:{default:()=>[e]})}else if(t.showDashboardNavBar){let e;s=o(i("iBizAnchorContainer"),{anchorList:this.anchorList.map((e=>({id:e.id,title:e.title}))),anchorTargetEle:this.dashboardRef,navBarConfig:this.calcNavBarConfig()},$b(e=a())?e:{default:()=>[e]})}else s=a();return o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[e.isCreated&&s]})}});function eg(e,t){var a;const{layoutRowH:n,layoutColNum:o}=t,i=ibiz.hub.getApp(ibiz.env.appId),s=(e,t)=>{const{controls:a,layout:o}=e,i=(null==a?void 0:a.filter((e=>!!e.layoutPos)))||[],l=[],r=[];if("TABLE_24COL"===(null==o?void 0:o.layout)||"TABLE_12COL"===(null==o?void 0:o.layout))i.forEach((a=>{var o;const{height:i}=a.layoutPos,{span:c,offset:d}=function(e){const{layout:t,colXS:a,colSM:n,colMD:o,colLG:i,colXSOffset:s,colSMOffset:l,colMDOffset:r,colLGOffset:c}=e,d=i||o||n||a,u=c||r||l||s,p="TABLE_24COL"===t?24:12;return{span:d&&-1!==d?d/p:1,offset:u&&-1!==u?u/p:0}}(a.layoutPos),u=c*t.w,p=d*t.w;let h=i?i/n:3;if("CONTAINER"===a.portletType&&(null==(o=a.controls)?void 0:o.length)){const e=s(a,{w:u,x:p});h=e.reduce(((e,t)=>Math.max(e,t.y+t.h)),-1/0),r.push(...e)}l.push({w:u,x:p,h:h,y:0,model:a,parentId:e.codeName})}));else if("FLEX"===(null==o?void 0:o.layout)){const a=function(e,t){const{dir:a,align:n,valign:o}=t.layout,i=[],s=(null==a?void 0:a.includes("reverse"))?e.toReversed():e;if(null==a?void 0:a.includes("row")){const e=parseFloat((t.w/s.length).toFixed(1));let o=0,l=0,r=0;s.forEach((e=>{const{grow:t,width:a}=e.layoutPos;t||!a?l++:(r++,o+=parseFloat((a/100).toFixed(1)))}));const c=o>e*r?e*r:o,d=t.w-c,u=l>0?d/l:0;s.forEach((e=>{const{grow:t,width:a}=e.layoutPos;i.push({x:0,model:e,w:t||!a?u:parseFloat((a/100).toFixed(1))})}));const p=i.reduce(((e,t)=>e+t.w),0),h=t.w-p;switch(n){case"flex-start":"row-reverse"===a&&(i[0].x=h);break;case"flex-end":"row"===a&&(i[0].x=h);break;case"center":h&&(i[0].x=h/2);break;case"space-between":if(h&&i.length>1){const e=h/(i.length-1);i.forEach(((t,a)=>{0!==a&&(t.x=e)}))}break;case"space-around":if(h){const e=h/(2*i.length);i.forEach(((t,a)=>{t.x=0===a?e:2*e}))}}}return(null==a?void 0:a.includes("column"))&&s.forEach((e=>{const{width:a}=e.layoutPos;let n=0,s=t.w;a&&(s=a/100>1&&a/100<t.w?a/100:t.w);const l=t.w-s;switch(o){case"flex-end":n=l;break;case"center":l&&(n=(t.w-s)/2)}i.push({x:n,w:s,model:e})})),i}(i,{...t,layout:o});a.forEach((t=>{var a;const{x:o,w:i,model:c}=t,{height:d}=c.layoutPos;let u=d?d/n:3;if("CONTAINER"===c.portletType&&(null==(a=c.controls)?void 0:a.length)){const e=s(c,{w:i,x:o});u=e.reduce(((e,t)=>Math.max(e,t.y+t.h)),-1/0),r.push(...e)}l.push({w:i,x:o,h:u,y:0,model:c,parentId:e.codeName})}))}!function(e,t){let a=0,n=0,o=0;e.forEach((e=>{a+e.x+e.w>t.w&&(n+=o,a=0,o=0),e.x=a+e.x,e.y=n,a+=e.x+e.w-a,o=Math.max(o,e.h)})),e.forEach((e=>{e.x+=t.x}))}(l,t),l.forEach((e=>{if("CONTAINER"===e.model.portletType){r.filter((t=>t.parentId===e.model.codeName)).forEach((t=>{t.x+=e.x,t.y+=e.y}))}}));const c=l.filter((e=>!["CONTAINER","RAWITEM"].includes(e.model.portletType)));return c.push(...r),c},l=[];if(null==(a=e.model.controls)?void 0:a.length){s(e.model,{x:0,w:o}).forEach((e=>{const{x:t,y:a,w:n,h:o,model:s}=e;l.push({x:t,y:a,w:n,h:o,i:s.codeName,appName:i.model.name,portletName:s.title,portletImage:s.sysImage,portletCodeName:s.codeName,appCodeName:s.appDataEntityId||i.model.pkgcodeName})}))}return l}function tg(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const ag=a({name:"IBizDashboardDesign",props:{dashboard:{type:Object,required:!0},customDashboard:{type:Object,required:!0},isShowDesign:{type:Boolean,required:!0}},emits:["saved","reset"],setup(e,{emit:t}){const a=B("dashboard-design"),o=e.dashboard,i=e.customDashboard,s=n([]),r=n([]),d=n([]),u=n(""),h=n(pi(i.customModelData)),m=n(pi(i.portletConfig)),v=n({}),b=n({}),g=n(null),f=n(!1),w=e=>{const t=[];return e.forEach((e=>{let a=t.find((t=>Object.is(e.type,t.type)));a||(a={},Object.assign(a,{type:e.type,name:Object.is(e.type,"app")?ibiz.i18n.t("control.dashboard.dashboardDesign.global"):e.appName,children:[]}),t.push(a)),((e,t)=>{let a=e.find((e=>Object.is(t.groupCodeName,e.type)));a||(a={},Object.assign(a,{type:t.groupCodeName,name:t.groupName,children:[]}),e.push(a)),a.children.find((e=>Object.is(e.portletCodeName,t.portletCodeName)))||a.children.push(t)})(a.children,e)})),t},y=async()=>{const t=[],a=ibiz.hub.getApp(ibiz.env.appId);if(2===o.model.customizeMode){const e=await o.loadAllDynaPortlet();null==e||e.forEach((e=>{const n={type:"app",dynamodelFlag:1,portletId:e.psappportletid,portletCodeName:e.codename,portletName:e.psappportletname,groupCodeName:e.groupcodename||"Ungroup",groupName:e.groupname||ibiz.i18n.t("control.dashboard.dashboardDesign.unGroup"),appCodeName:a.model.pkgcodeName,appName:a.model.name};t.push(n)}))}else if(a.model.appPortletCats&&a.model.appPortlets){const n=i.model.appDataEntityId,o=e.dashboard.controlParams.categorytag,s=e.dashboard.controlParams.portletnametag;a.model.appPortlets.forEach((e=>{var i;if(!n&&!e.enableAppDashboard)return;if(n&&!e.enableDEDashboard)return;const l=null==(i=a.model.appPortletCats)?void 0:i.find((t=>{var a;return t.codeName===(null==(a=e.appPortletCat)?void 0:a.codeName)}));if(o){const e=new RegExp(o);if(!l||l&&l.codeName&&!e.test(l.codeName))return}if(s){const t=new RegExp(s);if(e.codeName&&!t.test(e.codeName))return}const r={type:"app",portletCodeName:e.codeName,portletName:e.name,portletImage:e.control.sysImage,groupCodeName:(null==l?void 0:l.codeName)||"",groupName:(null==l?void 0:l.name)||"",appCodeName:e.appDataEntityId||a.model.pkgcodeName,appName:a.model.name};t.push(r)}))}const n=(e=>{const t=[];return e.forEach((e=>{var a;Object.is(e.type,"app")&&t.push(e);const n=(null==(a=i.model)?void 0:a.appDataEntityId)||"app";Object.is(e.appCodeName,n)&&t.push(e)})),t})(t);s.value=n,r.value=w(n).reverse(),d.value=(e=>{const t=[];return e.forEach((e=>{const a=t.find((t=>Object.is(t.value,e.groupCodeName)));a?a.children.find((t=>Object.is(t.portletCodeName,e.portletCodeName)))||a.children.push(e):t.push({name:e.groupName,value:e.groupCodeName,children:[e]})})),t})(n)},C=l((()=>{let e=[];return u.value?e=[u.value]:d.value.forEach(((t,a)=>{e.push(t.value+a)})),e})),I=e=>{const t=ibiz.hub.getApp(ibiz.env.appId);if(t.model.appPortlets){const a=t.model.appPortlets.find((t=>{var a;return(null==(a=t.control)?void 0:a.codeName)===e}));if(a)return a.control}},D=async e=>{if(e.dynamodelFlag){if(e.portletModel)return e.portletModel;return await o.loadDynaPortletById(e.portletId)}return I(e.portletCodeName)},E=async t=>{const a=await(async e=>{const t=[];if(e.length>0)for(let a=0;a<e.length;a++){const n=await D(e[a]);n&&t.push(n)}return t})(t);return await(async t=>{(null==t?void 0:t.length)&&await Promise.all(t.map((async t=>{const a=await Nn(t);if(a){v.value[t.id]=a;const n=await a.createController(t,e.dashboard);b.value[t.id]=n}})))})(a),await(async()=>{const e=m.value||{};Object.keys(e).forEach((t=>{const a=b.value[t];a&&(a.config=e[t],a.state.title=a.config.srftitle,Object.assign(a.params,a.config))}))})(),a};c((()=>e.isShowDesign),(async e=>{if(e)try{f.value=!0,await y();const e=await i.loadCustomModelData();let t=pi(e.model);t.length||(t=eg(o,i));const a=await E(t);h.value=t,h.value.forEach(((e,t)=>{e.dynamodelFlag&&(e.portletModel=a[t])})),m.value=pi(e.config)}catch(e){ibiz.log.error(e)}finally{f.value=!1}}),{immediate:!0});const S=n(0),x=l((()=>"calc((100% - 10px) / ".concat(i.layoutColNum,") ").concat(i.layoutRowH+10,"px")));return p((async()=>{const e=Object.values(b.value);await Promise.all(e.map((async e=>{await e.destroyed()})))})),{ns:a,customC:i,portlets:s,list:r,groups:d,filterVal:u,defaultOpens:C,layoutModel:h,isLoading:f,onReset:async()=>{const e=await i.resetCustomModelData();h.value=e.model,m.value=e.config,t("reset")},onSave:async()=>{const e=await i.saveCustomModelData(h.value);t("saved",{model:e.model,config:e.config})},removeItem:async e=>{const t=h.value.indexOf(e);if(-1!==t){h.value.splice(t,1);const a=await D(e);if(a){const e=b.value[a.id];await e.destroyed()}}},addLayoutItem:async e=>{const t=await E([e]),a=g.value;a&&(S.value=a.scrollHeight+3*i.layoutRowH);let n=0;for(const e of h.value)e.y>n&&(n=e.y);const s={w:4,h:3,x:0,y:n+3,i:e.portletCodeName,...e};if(e.dynamodelFlag){const a=o.dynaPortletMap.get(e.portletId);a&&Object.assign(s,{controlmodeldigest:a.controlmodeldigest}),Object.assign(s,{portletModel:t[0]})}if(h.value.push(s),a){const e=setInterval((()=>{a.scrollHeight>=S.value&&(a.scrollTo({top:a.scrollHeight,behavior:"smooth"}),clearInterval(e))}),50)}},handleColNumberChange:e=>{i.layoutColNum=e},handleRolHChange:e=>{i.layoutRowH=e},isDisabled:e=>!!h.value.find((t=>t.i===e.portletCodeName)),providers:v,portletControllers:b,maskSize:x,designPanel:g,getPortletModelByCodeName:I}},render(){let e,t,a,n;const s=e=>o(i("el-menu-item"),{key:e.portletCodeName,index:e.portletCodeName,tag:e.portletCodeName,disabled:this.isDisabled(e)},{default:()=>[o("span",null,[o("ion-icon",{icon:e.portletImage},null),e.portletName]),o("ion-icon",{title:zt(ibiz.i18n.t("control.dashboard.dashboardDesign.add")),name:"arrow-forward-outline",onClick:()=>this.addLayoutItem(e)},null)]}),l=e=>{const t=e.dynamodelFlag?e.portletModel:this.getPortletModelByCodeName(e.portletCodeName);if(!t)return null;const a=this.providers[t.id],n=this.portletControllers[t.id],s={modelData:t,controller:n};if(!a||!n)return o("div",null,[t.portletType,ibiz.i18n.t("app.noSupport")]);const l=i(a.component);return r(l,{...s,key:t.id})};return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("header")},[o("span",null,[ibiz.i18n.t("control.dashboard.dashboardDesign.customPortal")]),o("span",{class:this.ns.b("header-utils")},[o("div",{class:this.ns.be("header-utils","col-num")},[ibiz.i18n.t("control.dashboard.dashboardDesign.colNum"),h(":"),o(i("el-input-number"),{modelValue:this.customC.layoutColNum,"onUpdate:modelValue":e=>this.customC.layoutColNum=e,onChange:this.handleColNumberChange},null)]),o("div",{class:this.ns.be("header-utils","row-h")},[ibiz.i18n.t("control.dashboard.dashboardDesign.cellHeight"),h(":"),o(i("el-input-number"),{modelValue:this.customC.layoutRowH,"onUpdate:modelValue":e=>this.customC.layoutRowH=e,onChange:this.handleRolHChange},null)]),o(i("el-button"),{class:this.ns.be("header-utils","reset"),style:{display:this.customC.multiMode?"none":"inline-flex"},onClick:this.onReset},tg(e=ibiz.i18n.t("control.dashboard.dashboardDesign.restoreDefault"))?e:{default:()=>[e]}),o(i("el-button"),{class:this.ns.be("header-utils","save"),onClick:this.onSave},tg(t=ibiz.i18n.t("control.dashboard.dashboardDesign.save"))?t:{default:()=>[t]})])]),o("div",{class:this.ns.b("content")},[o("div",{class:this.ns.b("tree")},[o(i("el-select"),{modelValue:this.filterVal,"onUpdate:modelValue":e=>this.filterVal=e,clearable:!0,class:this.ns.b("tree-filter")},tg(a=this.groups.map((e=>o(i("el-option"),{key:e.value,value:e.value,label:e.name},null))))?a:{default:()=>[a]}),o("div",{class:this.ns.b("tree-content")},[(()=>{let e,t;return this.filterVal?o(i("el-menu"),{"default-openeds":this.defaultOpens,class:this.ns.is("filter",!0),key:this.filterVal},tg(e=this.groups.map((e=>e.value===this.filterVal?o(i("el-sub-menu"),{key:e.value,index:e.value},{title:()=>e.name,default:()=>e.children.map((e=>s(e)))}):null)))?e:{default:()=>[e]}):o(i("el-menu"),{class:this.ns.is("no-filter",!0),"default-openeds":this.defaultOpens,key:"default"},tg(t=this.groups.map(((e,t)=>o(i("el-sub-menu"),{key:e.value+t,index:e.value+t},{title:()=>e.name,default:()=>e.children.map((e=>s(e)))}))))?t:{default:()=>[t]})})()])]),g(o("div",{ref:"designPanel",class:this.ns.b("scroll-box")},[o("div",{class:this.ns.b("panel")},[o("div",{class:this.ns.b("grid-layout-mask"),style:{backgroundSize:this.maskSize}},null),o(i("grid-layout"),{class:this.ns.b("grid-layout"),layout:this.layoutModel,"col-num":this.customC.layoutColNum,"row-height":this.customC.layoutRowH,"is-draggable":!0,"is-resizable":!0,"is-mirrored":!1,"vertical-compact":!0,margin:[10,10],"use-css-transforms":!0,style:{maxHeight:"100%"}},tg(n=this.layoutModel.map((e=>o(i("grid-item"),{x:e.x,y:e.y,w:e.w,h:e.h,i:e.i,key:e.i},{default:()=>[o(i("el-card"),{class:this.ns.b("grid-layout-item")},{default:()=>[o("ion-icon",{name:"close-outline",title:ibiz.i18n.t("app.delete"),onClick:()=>this.removeItem(e),class:this.ns.b("grid-layout-item-icon")},null),o("div",{class:this.ns.b("grid-layout-item-content")},[l(e)])]})]}))))?n:{default:()=>[n]})])]),[[y("loading"),this.isLoading]])])])}}),ng=a({name:"IBizCustomDashboardContainer",props:{modelData:{type:Object,required:!0},dashboard:{type:Object,required:!0}},setup(e,{emit:t}){const a=B("custom-dashboard-container"),o=new Bn(e.modelData,e.dashboard);e.dashboard.setCustomDashboard(o);const i=u(o),s=n(!1),l=n(!1),r=n(!1),c=n(!1),p=async t=>{if(t.dynamodelFlag){if(t.portletModel)return t.portletModel;return await e.dashboard.loadDynaPortletById(t.portletId)}return(e=>{const t=ibiz.hub.getApp(ibiz.env.appId);if(t.model.appPortlets){const a=t.model.appPortlets.find((t=>{var a;return(null==(a=t.control)?void 0:a.codeName)===e}));if(a)return a.control}})(t.portletCodeName)},h=async e=>{const t=[];if(e.length>0)for(let a=0;a<e.length;a++){const n=await p(e[a]);n&&t.push(n)}return t},m=async t=>{var a;const n=null==(a=e.dashboard.model.controls)?void 0:a.filter((e=>"FILTER"===e.portletType));t.model&&t.model.length>0?await e.dashboard.initPortlets(t.model):n&&n.length>0&&await e.dashboard.initPortlets(n),await e.dashboard.initPortletsConfig(t.config)};return d((async()=>{var a;c.value="BIREPORTDASHBOARD"===(null==(a=e.dashboard.model)?void 0:a.dashboardStyle);const n=await i.loadCustomModelData(),o=await h(n.model);t("changed",{model:o}),await m({model:o,config:n.config}),s.value=!0,e.dashboard.evt.on("onConfigChange",(async e=>{const{name:t,config:a}=e;i.saveCustomModelData(i.customModelData,{[t]:a})})),e.dashboard.evt.on("onSavePortlet",(async a=>{const n=await h(a.model);await m({model:n,config:a.config}),e.dashboard.refresh(),t("changed",{model:n})}))})),{ns:a,customC:i,isShowDesign:l,isInited:s,showTypeDir:r,showFilter:c,openDesign:()=>{l.value=!0},onSaved:async e=>{l.value=!1;const a=await h(e.model);await m({model:a,config:e.config}),t("changed",{model:a})},onReset:async()=>{s.value=!1,l.value=!1,await e.dashboard.resetPortlets(),await b(),s.value=!0},clickCollapse:e=>{r.value="left"===e},openFilterDesign:()=>{e.dashboard.openFilterDesignPage()}}},render(){var e,t;return g(o("div",{class:[this.ns.b()]},[this.customC.showDesignBtn?o("div",{class:this.ns.b("build-btn")},[this.showTypeDir?o("div",null,[this.showFilter?o(i("el-button"),{class:this.ns.b("deisgn-btn"),title:ibiz.i18n.t("control.dashboard.customDashboardContainer.newFilter"),onClick:this.openFilterDesign},{default:()=>[o("ion-icon",{name:"filter-outline"},null)]}):null,o(i("el-button"),{class:this.ns.b("deisgn-btn"),title:zt(ibiz.i18n.t("control.dashboard.customDashboardContainer.portalCustomPrompt")),onClick:this.openDesign},{default:()=>[o("ion-icon",{name:"build-outline"},null)]}),o(i("el-button"),{class:this.ns.b("forward-btn"),onClick:()=>this.clickCollapse("right")},{default:()=>[o("ion-icon",{name:"chevron-forward-outline"},null)]})]):o(i("el-button"),{class:this.ns.b("back-btn"),onClick:()=>this.clickCollapse("left")},{default:()=>[o("ion-icon",{name:"chevron-back-outline"},null)]})]):null,o(i("el-drawer"),{modelValue:this.isShowDesign,"onUpdate:modelValue":e=>this.isShowDesign=e,"with-header":!1,size:"80%","modal-class":"custom-dashboard-drawer"},{default:()=>[this.isShowDesign&&o(i("iBizDashboardDesign"),{dashboard:this.dashboard,"custom-dashboard":this.customC,"is-show-design":this.isShowDesign,onSaved:this.onSaved,onReset:this.onReset},null)]}),this.isInited&&(0===this.customC.customModelData.length?null==(t=(e=this.$slots).default)?void 0:t.call(e):this.customC.customModelData.map((e=>{var t,a;const n={position:"absolute",height:"".concat(e.h*this.customC.layoutRowH,"px"),width:"calc(100% / ".concat(this.customC.layoutColNum," * ").concat(e.w,")"),top:"".concat(e.y*this.customC.layoutRowH,"px"),left:"calc(100% / ".concat(this.customC.layoutColNum," * ").concat(e.x,")")};return o("div",{style:n},[null==(a=(t=this.$slots)[e.portletCodeName])?void 0:a.call(t)])})))]),[[y("loading"),!this.isInited]])}});var og=Object.defineProperty,ig=(e,t,a)=>(((e,t,a)=>{t in e?og(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sg{constructor(){ig(this,"component","IBizDashboardControl")}}function lg(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const rg=e("ac",a({name:"IBizContainerPortlet",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(e){var t;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase()))}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{layout:this.modelData.layout},lg(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},lg(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]}),l=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(i("iBizPortletLayout"),{controller:this.controller,class:l},lg(s)?s:{default:()=>[s]})}}));var cg=Object.defineProperty,dg=(e,t,a)=>(((e,t,a)=>{t in e?cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ug{constructor(){dg(this,"component","IBizContainerPortlet")}async createController(e,t,a){const n=new _n(e,t,a);return await n.init(),n}}const pg=e("ab",oe(rg,(function(e){e.component(rg.name,rg),Rn("CONTAINER",(()=>new ug))}))),hg=e("ad",a({name:"IBizPortletLayout",props:{controller:{type:Ln,required:!0},linkAction:{type:Object}},setup(e){var t;const a=B("portlet-layout"),n="portlet-".concat(null==(t=e.controller.model.portletType)?void 0:t.toLowerCase()),o=e.controller,i=e.controller.dashboard.state.zIndex,s=l((()=>{const e=[a.em("toolbar","".concat(n,"-").concat(o.model.id))],{codeName:t}=o.dashboard.view.model;return e.push(a.em("toolbar",t)),e})),r=l((()=>o.model.showTitleBar&&(o.model.title||o.model.sysImage)||o.model.uiactionGroup));return{c:o,ns:a,zIndex:i,popperClass:s,portletType:n,isShowHeader:r,openLink:t=>{e.linkAction&&e.controller.onActionClick(e.linkAction,t)},clickPorlet:(e,t)=>{e.stopPropagation(),o.dashboard.view.evt.emit("onPorletClick",{data:{tag:o.model.codeName,position:t}})},onActionClick:async(t,a)=>{await e.controller.onActionClick(t,a)}}},render(){var e,t;const{model:a,state:n}=this.controller;return o("div",{class:[this.ns.b(),this.ns.is("no-header",!this.isShowHeader),this.ns.is("hight-light",n.hightLight)]},[this.isShowHeader&&o("div",{key:"header",class:this.ns.b("header")},[o("div",{class:this.ns.be("header","left"),onClick:e=>this.clickPorlet(e,"title")},[a.showTitleBar&&o("div",{class:[this.ns.e("caption"),this.ns.is("link",!!this.linkAction)],onClick:this.openLink},[o(i("iBizIcon"),{class:this.ns.e("caption-icon"),icon:a.sysImage},null),o("span",{class:this.ns.e("caption-text"),title:zt(n.title)},[n.title])])]),o("div",{class:this.ns.be("header","right")},["ACTIONBAR"!==a.portletType&&a.uiactionGroup&&o(i("iBizActionToolbar"),{zIndex:this.zIndex,class:this.ns.e("toolbar"),"action-details":a.uiactionGroup.uiactionGroupDetails,"actions-state":n.actionGroupState,mode:"ITEMS"===a.actionGroupExtractMode?"dropdown":"buttons",popperClass:this.popperClass,onActionClick:this.onActionClick},null)])]),o("div",{key:"content",class:this.ns.b("content"),onClick:e=>this.clickPorlet(e,"content")},[null==(t=(e=this.$slots).default)?void 0:t.call(e)])])}}));const mg=e("af",a({name:"IBizViewPortlet",props:{modelData:{type:Object,required:!0},controller:{type:jn,required:!0}},setup(e){var t;const a=B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),n=e.modelData.portletAppView;let o;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(o=setInterval((()=>{e.controller.refresh()}),t))})),m((()=>{clearInterval(o)})),{ns:a,view:n}},render(){let e;const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:a,params:n}=this.controller;return o(i("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(i("IBizViewShell"),{context:a,params:n,modelData:this.view}))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?e:{default:()=>[e]});var l}}));var vg=Object.defineProperty,bg=(e,t,a)=>(((e,t,a)=>{t in e?vg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gg{constructor(){bg(this,"component","IBizViewPortlet")}async createController(e,t,a){const n=new jn(e,t,a);return await n.init(),n}}const fg=e("ae",oe(mg,(function(e){e.component(mg.name,mg),Rn("VIEW",(()=>new gg))})));function wg(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const yg=a({name:"IBizAppMenuPortletControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){var e;const t=ne(((...e)=>new Ra(...e))),a=B("control-".concat(t.model.controlType.toLowerCase(),"-portlet")),s=n(""),l=n([]);null==(e=t.model.appMenuItems)||e.forEach((e=>{"MENUITEM"===e.itemType&&l.value.push(e.id)}));const r=async(e,a)=>{await t.onClickMenuItem(e,a)},c=e=>t.state.menuItemsState[e.id].visible?o("div",{class:[a.b("item"),a.is("disabled",!e.appFuncId)],title:zt(e.tooltip||e.caption),onClick:t=>{e.appFuncId&&r(e.id,t)}},[o(i("iBizIcon"),{class:a.be("item","icon"),icon:e.sysImage},null),o("span",{class:a.be("item","label")},[e.caption])]):null;return{c:t,ns:a,defaultActive:s,defaultOpens:l,onClick:r,renderGroup:e=>t.state.menuItemsState[e.id].visible?e.appMenuItems?o(i("el-collapse-item"),{class:a.b("group"),name:e.id,title:zt(e.caption)},{default:()=>{var t;return[null==(t=e.appMenuItems)?void 0:t.map((e=>c(e)))]}}):c(e):null,renderItem:c}},render(){var e;const{state:t,model:a}=this.c;let n=null;if(t.isCreated&&(null==(e=a.appMenuItems)?void 0:e.length)){let e;n=o(i("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":e=>this.defaultOpens=e},wg(e=a.appMenuItems.map((e=>"MENUITEM"!==e.itemType?null:this.renderGroup(e))))?e:{default:()=>[e]})}return o(i("iBizControlBase"),{class:[this.ns.b()],controller:this.c},wg(n)?n:{default:()=>[n]})}}),Cg=e("ah",a({name:"IBizMenuPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Vn,required:!0}},setup(e){var t,a;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),menu:null==(a=e.modelData.controls)?void 0:a.find((e=>e.controlType===_a.APP_MENU))}},render(){const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:t,params:a}=this.controller;return o(i("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[this.menu&&o(i("iBizAppMenuPortletControl"),{modelData:this.menu,context:t,params:a},null)]})}}));var Ig=Object.defineProperty,Dg=(e,t,a)=>(((e,t,a)=>{t in e?Ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Eg{constructor(){Dg(this,"component","IBizMenuPortlet")}async createController(e,t,a){const n=new Vn(e,t,a);return await n.init(),n}}const Sg=e("ag",oe(Cg,(function(e){e.component(Cg.name,Cg),e.component(yg.name,yg),Rn("APPMENU",(()=>new Eg))})));const xg=e("aj",a({name:"IBizChartPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Fn,required:!0}},setup(e){var t,a;const n=B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),o=null==(a=e.modelData.controls)?void 0:a.find((e=>e.controlType===_a.CHART));let i;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(i=setInterval((()=>{e.controller.refresh()}),t))})),m((()=>{clearInterval(i)})),{ns:n,chart:o}},render(){let e;const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:a,params:n}=this.controller;return o(i("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(i("IBizControlShell"),{context:a,params:n,modelData:this.chart}))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?e:{default:()=>[e]});var l}}));var Pg=Object.defineProperty,kg=(e,t,a)=>(((e,t,a)=>{t in e?Pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Tg{constructor(){kg(this,"component","IBizChartPortlet")}async createController(e,t,a){const n=new Fn(e,t,a);return await n.init(),n}}const zg=e("ai",oe(xg,(function(e){e.component(xg.name,xg),Rn("CHART",(()=>new Tg))})));const Ag=e("al",a({name:"IBizRawItemPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Un,required:!0}},setup(e){var t;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),rawItem:e.modelData}},render(){let e;const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(i("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(a=e=r(i("iBizRawItem"),{rawItem:this.rawItem}))||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?e:{default:()=>[e]});var a}}));var Og=Object.defineProperty,Mg=(e,t,a)=>(((e,t,a)=>{t in e?Og(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ng{constructor(){Mg(this,"component","IBizRawItemPortlet")}async createController(e,t,a){const n=new Un(e,t,a);return await n.init(),n}}const Bg=e("ak",oe(Ag,(function(e){e.component(Ag.name,Ag),Rn("RAWITEM",(()=>new Ng))})));const _g=e("an",a({name:"IBizListPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Hn,required:!0}},setup(e){var t,a;const n=B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),o=null==(a=e.modelData.controls)?void 0:a.find((e=>e.controlType===_a.LIST));let i;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(i=setInterval((()=>{e.controller.refresh()}),t))})),m((()=>{clearInterval(i)})),{ns:n,list:o}},render(){let e;const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:a,params:n}=this.controller;return o(i("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(i("IBizControlShell"),{context:a,params:n,modelData:this.list}))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?e:{default:()=>[e]});var l}}));var Rg=Object.defineProperty,Lg=(e,t,a)=>(((e,t,a)=>{t in e?Rg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jg{constructor(){Lg(this,"component","IBizListPortlet")}async createController(e,t,a){const n=new Hn(e,t,a);return await n.init(),n}}const Vg=e("am",oe(_g,(function(e){e.component(_g.name,_g),Rn("LIST",(()=>new jg))}))),Fg=e("ap",a({name:"IBizHtmlPortlet",props:{modelData:{type:Object,required:!0},controller:{type:qn,required:!0}},setup(e){var t;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase()))}},render(){const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(i("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[o("iframe",{src:this.modelData.pageUrl},null)]})}}));var Ug=Object.defineProperty,Hg=(e,t,a)=>(((e,t,a)=>{t in e?Ug(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qg{constructor(){Hg(this,"component","IBizHtmlPortlet")}async createController(e,t,a){const n=new qn(e,t,a);return await n.init(),n}}const Gg=e("ao",oe(Fg,(function(e){e.component(Fg.name,Fg),Rn("HTML",(()=>new qg))}))),Wg=e("ar",a({name:"IBizActionBarPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Gn,required:!0}},setup(e){var t;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),zIndex:e.controller.dashboard.state.zIndex,onActionClick:async(t,a)=>{await e.controller.onActionClick(t,a)}}},render(){const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(i("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[this.modelData.uiactionGroup&&o(i("iBizActionToolbar"),{zIndex:this.zIndex,"action-details":this.modelData.uiactionGroup.uiactionGroupDetails,"actions-state":this.controller.state.actionGroupState,onActionClick:this.onActionClick},null)]})}}));var Kg=Object.defineProperty,Yg=(e,t,a)=>(((e,t,a)=>{t in e?Kg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Xg{constructor(){Yg(this,"component","IBizActionBarPortlet")}async createController(e,t,a){const n=new Gn(e,t,a);return await n.init(),n}}const $g=e("aq",oe(Wg,(function(e){e.component(Wg.name,Wg),Rn("ACTIONBAR",(()=>new Xg))})));const Jg=e("at",a({name:"IBizReportPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Wn,required:!0}},setup(e){var t,a;const n=B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),o=null==(a=e.modelData.controls)?void 0:a.find((e=>e.controlType===_a.REPORT_PANEL)),i=l((()=>{const{uiactionGroupDetails:t=[]}=e.controller.model.uiactionGroup||{};return t.find((e=>e.uiactionId&&e.uiactionId.startsWith("bi_report_view")))}));let s;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(s=setInterval((()=>{e.controller.refresh()}),t))})),m((()=>{clearInterval(s)})),{ns:n,report:o,linkAction:i}},render(){let e;const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:a,params:n}=this.controller;return o(i("iBizPortletLayout"),{controller:this.controller,linkAction:this.linkAction,class:t},"function"==typeof(l=e=r(i("IBizControlShell"),{context:a,params:n,modelData:this.report}))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?e:{default:()=>[e]});var l}}));var Qg=Object.defineProperty,Zg=(e,t,a)=>(((e,t,a)=>{t in e?Qg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ef{constructor(){Zg(this,"component","IBizReportPortlet")}async createController(e,t,a){const n=new Wn(e,t,a);return await n.init(),n}}const tf=e("as",oe(Jg,(function(e){e.component(Jg.name,Jg),Rn("REPORT",(()=>new ef))})));const af=a({name:"IBizFilterPortletItem",props:{context:{type:Object,required:!0},params:{type:Object,required:!0},field:{type:Object,required:!0},filterNode:{type:Object}},emits:["change"],setup(e,{emit:t}){const a=B("filter-portlet-item"),d=n(void 0),u=n(void 0),p=n({value:null,valueOP:null,nodeType:"FIELD",field:e.field.appDEFieldId}),h=l((()=>ibiz.util.jsonSchema.getValueOPsByDataType(e.field.type))),m=async t=>{const a=ibiz.util.jsonSchema.getMockEditor(e.context,e.field,t);a&&(d.value=await Pa(a),d.value&&(u.value=await d.value.createController(a,{context:e.context,params:e.params})))};c((()=>e.filterNode),(()=>{(async()=>{e.filterNode&&(p.value={...e.filterNode}),m(h.value[0].valueOP)})()}),{immediate:!0});const v=e=>{p.value.value=e,t("change",p.value)},b=()=>{if(u.value){const e=i(d.value.formEditor);return r(e,{value:p.value.value,controller:u.value,onChange:(e,t)=>{v(e)}})}};return{ns:a,renderContent:()=>{let e;return o("div",{class:a.e("content")},[o("div",{class:a.em("content","option")},[o(i("el-select"),{"model-value":p.value.valueOP,onChange:e=>{(e=>{p.value.valueOP=e,v(null),m(e)})(e)}},(t=e=h.value.map((e=>o(i("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}))]),o("div",{class:a.em("content","editor")},[b()])]);var t}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:this.ns.e("header")},[o("span",{class:this.ns.em("header","caption")},[this.field.caption])]),this.renderContent()])}});function nf(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const of=e("av",a({name:"IBizFilterPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Kn,required:!0}},setup(e){var t;const a=e.controller,n=B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase()));return{ns:n,handleReset:()=>{a.resetFilter()},handleSearch:()=>{a.search()},renderFilter:()=>{if(!a.state.filterNode)return;return(a.state.filterNode.children||[]).map(((e,t)=>((e,t)=>{const n=a.jsonSchemaFields.find((t=>t.appDEFieldId===e.field));if(n)return r(af,{field:n,filterNode:e,context:a.context,params:a.params,onChange:e=>{a.state.filterNode.children[t]=e}})})(e,t)))}}},render(){let e,t;const a=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(i("iBizPortletLayout"),{controller:this.controller,class:a},{default:()=>[o("div",{class:this.ns.e("left")},[this.renderFilter()]),o("div",{class:this.ns.e("right")},[o(i("el-button"),{onClick:this.handleReset},nf(e=ibiz.i18n.t("app.reset"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.handleSearch},nf(t=ibiz.i18n.t("app.search"))?t:{default:()=>[t]})])]})}}));var sf=Object.defineProperty,lf=(e,t,a)=>(((e,t,a)=>{t in e?sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class rf{constructor(){lf(this,"component","IBizFilterPortlet")}async createController(e,t,a){const n=new Kn(e,t,a);return await n.init(),n}}function cf(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const df=a({name:"IBizFilterPortletDesign",props:{context:{type:Object,required:!0},viewParams:{type:Object,required:!0},filter:{type:Object},items:{type:Array,default:()=>[]},dashboardStyle:{type:String},dismiss:{type:Function,required:!0}},emits:["lisTSelect","formChange"],setup(e){const t=B("filter-portlet-design"),a=n(!1),s=n(!1),l=n(),r=u({title:[{required:!0,message:ibiz.i18n.t("control.dashboard.filterPortletDesign.ctrlTitleError"),trigger:"blur"}]}),c=u({title:"",selectAll:!0,items:[]}),d=n({}),p=n();let m=[],v=[];const b=n({}),f=n([]),w=new Map,C=new Map,I=n([]),D=async t=>{t&&(w.has(t)||(s.value=!0,f.value=await ibiz.util.jsonSchema.getEntitySchemaFields(t,e.context,e.viewParams),s.value=!1,w.set(t,f.value)),f.value=w.get(t))},E=()=>{I.value=Yn(p.value.id,e.context,e.items,"BIREPORTDASHBOARD"===e.dashboardStyle||"BIREPORTDASHBOARD2"===e.dashboardStyle)};(async()=>{var t;if(v=(()=>{let t=[];const a=ibiz.hub.getApp(e.context.srfappid);return m=a.model.appPortlets||[],m.length>0&&(t=m.filter((e=>{if(e.control)return"PORTLET"===e.control.controlType&&"FILTER"===e.control.portletType}))),t})(),e.items&&(c.items=e.items.map((e=>e.id))),e.filter){const a=v.find((t=>t.id===e.filter.model.id));if(a){p.value=Ht(a.control),c.title=e.filter.config.srftitle,b.value=a.portletParams||{};"all"===e.filter.filterConfig.scope||(c.selectAll=!1,c.items=(null==(t=e.filter.filterConfig.scopedata)?void 0:t.split(","))||[]),d.value=e.filter.searchConds}}!p.value&&v.length>0&&(p.value=Ht(v[0].control),c.title=p.value.title||"",b.value=v[0].portletParams||{}),p.value&&(await D(p.value.appDataEntityId),E()),a.value=!0})();const S=e=>{d.value=e,C.set(p.value.appDataEntityId,e)},x=t=>{t&&e.items&&(c.items=e.items.map((e=>e.id)))},P=()=>{e.dismiss({ok:!1})},k=()=>{l.value&&l.value.validate((t=>{if(t){const t={config:(()=>{const e={};if(c.selectAll)e.scope="all";else{e.scope="custom";const t=[];I.value.forEach((e=>{c.items.includes(e.id)&&t.push(e.id)})),e.scopedata=t.join(",")}return Object.keys(b.value).length>0&&(e.scopetag=b.value.filtergroup),e})(),model:Object.assign(p.value,{title:c.title}),searchconds:d.value};e.dismiss({ok:!0,data:[t]})}}))},T=()=>v.length?o("ul",{class:[t.b("left-list")]},[v.map((a=>{var n;const i=a.control,s=a.portletParams||{};let l=!1;return e.filter&&e.filter.id!==i.id&&(l=!0),o("li",{class:[t.be("left-list","item"),t.is("disabled",l),t.is("actvie",i.id===(null==(n=p.value)?void 0:n.id))],title:i.title,onClick:()=>((e,t,a)=>{a||(p.value=Ht(e),c.title=e.title||"",b.value=t,D(e.appDataEntityId),C.has(e.appDataEntityId)?d.value=C.get(e.appDataEntityId):d.value={},E())})(i,s,l)},[i.title])}))]):o(i("iBizNoData"),{text:ibiz.i18n.t("control.common.currentNoData")},null),z=()=>{let e;if(!I.value)return;const a=I.value.length>0&&1===c.items.length;return o(i("el-checkbox-group"),{class:[t.b("checkbox"),t.is("only-add",a)],modelValue:c.items,"onUpdate:modelValue":e=>c.items=e,disabled:c.selectAll},cf(e=I.value.map((e=>o(i("el-checkbox"),{label:e.id,disabled:a&&c.items.includes(e.id)},{default:()=>[e.title]}))))?e:{default:()=>[e]})};return{ns:t,loaded:a,formRef:l,renderRightContent:()=>o("div",{class:[t.b("right-content")]},[o("div",{class:[t.be("right-content","title")]},[ibiz.i18n.t("control.dashboard.filterPortletDesign.baseSet")]),p.value?o(i("el-form"),{ref:"formRef",model:c,rules:r,"label-width":"auto",class:t.b("right-form")},{default:()=>[o(i("el-form-item"),{required:!0,label:ibiz.i18n.t("control.dashboard.filterPortletDesign.ctrlTitle"),prop:"title"},{default:()=>[o(i("el-input"),{modelValue:c.title,"onUpdate:modelValue":e=>c.title=e,maxlength:32,placeholder:ibiz.i18n.t("control.dashboard.filterPortletDesign.ctrlPlaceholder")},{suffix:()=>o("div",null,[c.title.length,h(" / "),32])})]}),o(i("el-form-item"),{class:t.be("right-form","checks"),label:ibiz.i18n.t("control.dashboard.filterPortletDesign.checkTitle"),required:!0,props:"items"},{default:()=>[o(i("el-switch"),{title:ibiz.i18n.t("control.dashboard.filterPortletDesign.selectAll"),modelValue:c.selectAll,"onUpdate:modelValue":e=>c.selectAll=e,onChange:x},null),z()]})]}):null]),renderLeftContent:()=>{const a=e.filter?ibiz.i18n.t("app.edit"):ibiz.i18n.t("app.newlyBuild");return o("div",{class:[t.b("left-content")]},[o("div",{class:t.be("left-content","title")},["".concat(a," ").concat(ibiz.i18n.t("control.dashboard.filterPortletDesign.filterTitle"))]),T()])},renderCondition:()=>g(o(i("iBizCustomFilterCondition"),{class:t.b("condition"),context:e.context,params:e.viewParams,value:d.value,schemaFields:f.value,onChange:S},null),[[y("loading"),s.value]]),renderFooter:()=>{let e,a;return o("div",{class:t.b("footer")},[o(i("el-button"),{onClick:P,title:ibiz.i18n.t("app.cancel")},cf(e=ibiz.i18n.t("app.cancel"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:k,title:ibiz.i18n.t("app.confirm")},cf(a=ibiz.i18n.t("app.confirm"))?a:{default:()=>[a]})])}}},render(){if(this.loaded)return o("div",{class:[this.ns.b()]},[o("div",{class:[this.ns.e("layout-left")]},[this.renderLeftContent()]),o("div",{class:[this.ns.e("layout-right")]},[this.renderRightContent(),this.renderCondition(),this.renderFooter()])])}}),uf=e("au",oe(of,(function(e){e.component(of.name,of),e.component(df.name,df),Rn("FILTER",(()=>new rf))}))),pf=e("aa",oe(Zb,(function(e){e.component(Zb.name,Zb),e.component(ag.name,ag),e.component(ng.name,ng),Ba(_a.DASHBOARD,(()=>new sg)),e.component(hg.name,hg),e.use(pg),e.use(fg),e.use(Sg),e.use(zg),e.use(Bg),e.use(Vg),e.use(Gg),e.use($g),e.use(tf),e.use(uf)}))),hf="__epPropKey",mf=["#2196F3","#4CAF50","#3F51B5","#FF9800","#673AB7","#757575"],vf=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,bf=/^(rgb|rgba|RGB|RGBA)/,gf=(e,t,a,n="~")=>{var o,i;let s="";return e&&(null==(o=Vi(e))?void 0:o.isValid())&&(s=Vi(e).format(a)),t&&(null==(i=Vi(t))?void 0:i.isValid())&&(s="".concat(s," ").concat(n," ").concat(Vi(t).format(a))),s},ff=(e,t)=>{let a=e.get(t);const n=e.size;return t&&!a&&n<mf.length&&(a=mf[n],e.set(t,a)),a||mf[0]},wf=e=>{if(!e)return console.error("getRgbValue: Missing parameters!"),!1;const t=(e=>{const t=vf.test(e),a=bf.test(e),n=e;return t||a||e?n:(console.error("Color: Invalid color!"),"")})(e);if(!t)return!1;const a=vf.test(t),n=bf.test(t),o=t.toLowerCase();return a?(e=>{const t=e.replace("#","");return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]})(o):n?(e=>e.replace(/rgb\(|rgba\(|\)/g,"").split(",").slice(0,3).map((function(e){return parseInt(e,10)})))(o):void 0},yf=(e,t)=>{const a=t||100;if(!e)return console.error("fade: Missing parameters!"),!1;const n=wf(e);if(!n)return!1;return(e=>{if(!e)return console.error("getColorFromRgbValue: Missing parameters!"),!1;const t=e.length;if(3!==t&&4!==t)return console.error("getColorFromRgbValue: Value is illegal!"),!1;let a=3===t?"rgb(":"rgba(";return a+="".concat(e.join(","),")"),a})([...n,a/100])},Cf=(e,t)=>{const a=new Date(e),n=t?new Date(t):new Date;return a.getDate()===n.getDate()&&a.getMonth()===n.getMonth()&&a.getFullYear()===n.getFullYear()};function If(e,t,a){const n=Vi(a),o=Vi(e),i=Vi(t);return!!(n.isValid()&&o.isValid()&&i.isValid())&&(n.isSame(o,"day")||n.isSame(i,"day")||o.isBefore(n,"day")&&i.isAfter(n,"day"))}function Df(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const Ef=(e,t,a)=>{const n=new Date(e),o=new Date(t),i=new Date(a);return n.setHours(0,0,0,0),o.setHours(0,0,0,0),i.setHours(0,0,0,0),n>=o&&n<=i},Sf=(e,t)=>{const a=new Date(e),n=new Date(t);return a.getTime()>n.getTime()},xf=(e,t,a,n,o,i,s)=>{let l=pi(i),r=!0;const c=n.find((e=>t.id===e.id)),d=l.findIndex((e=>t.id===e.id));switch(o?-1===d?l.push(c):(Object.assign(t,{isSelectedEvent:!1}),r=!1,l.splice(d,1)):-1===d?l=[c]:(Object.assign(t,{isSelectedEvent:!1}),r=!1,l=[]),e){case"eventClick":s("eventClick",{location:a,data:l});break;case"eventDblClick":s("eventDblClick",{location:a,data:l})}return{eventName:e,tempSelectedData:l,isSelectedEvent:r}},Pf=(e,t)=>{if(!ki(e)||ki(a=e)&&a[hf])return e;var a;const{values:n,required:o,default:i,type:s,validator:l}=e,r=n||l?a=>{let o=!1,s=[];if(n&&(s=Array.from(n),Df(e,"default")&&s.push(i),o||(o=s.includes(a))),l&&(o||(o=l(a))),!o&&s.length>0){const e=[...new Set(s)].map((e=>JSON.stringify(e))).join(", ");z("Invalid prop: validation failed".concat(t?' for prop "'.concat(t,'"'):"",". Expected one of [").concat(e,"], got value ").concat(JSON.stringify(a),"."))}return o}:void 0,c={type:s,required:!!o,validator:r,[hf]:!0};return Df(e,"default")&&(c.default=i),c},kf=e=>Pi(Object.entries(e).map((([e,t])=>[e,Pf(t,e)])));function Tf(e,t,a){const n=ibiz.overlay.createPopover((t=>r(e,{modal:t})),void 0,{width:"auto",height:"auto",noArrow:!0,...a});return null==n||n.present(t),n}function zf(e,t){t.style.left="".concat(e.clientX+20,"px"),t.style.top="".concat(e.clientY+20,"px")}const Af=()=>{var e;const t=document.createElement("div");return t.style="position: fixed; height: 2px; width: 2px; z-index: -1;",null==(e=document.body)||e.appendChild(t),t},Of=e=>{document.body.removeChild(e)},Mf="update:modelValue",Nf="change",Bf="input",_f=kf({calendarTitle:{type:String},showDetail:{type:Boolean,default:!1},modelValue:{type:Date},range:{type:Array,validator:e=>Ti(e)&&2===e.length&&e.every((e=>zi(e)))},viewType:{type:String,default:"DAY"},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object}}),Rf={[Mf]:e=>zi(e),[Bf]:e=>zi(e),[Nf]:e=>zi(e),eventClick:e=>e,eventDblClick:e=>e,eventContextmenu:e=>e},Lf=kf({selectedDay:{type:Object},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object},showDetail:{type:Boolean,default:!1}}),jf={pick:e=>ki(e),eventClick:e=>e,eventDblClick:e=>e,eventContextmenu:e=>e},Vf=kf({showDetail:{type:Boolean,default:!1},selectedDay:{type:Object},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object}}),Ff={pick:e=>ki(e),eventClick:e=>e,eventDblClick:e=>e,eventContextmenu:e=>e},Uf=kf({selectedDay:{type:Object,default:()=>new Date},events:{type:Array,default:[]}}),Hf=a({name:"CalendarDaily",props:Lf,emits:jf,setup(e,{emit:t,slots:a}){const s=B("calendar-daily"),{drawData:r,curTimeTop:u,curTimeVal:h,resizableHand:v,events:b,curTimeTimer:g,calendarDaily:f,selectedData:w,handleEventClick:y,handleEventDblClick:C,handleDrag:I,handleDragStart:D,handleCurTime:E,initDrawData:S,eventContextmenu:x,contentMousemove:P,eventMouseenter:k,eventMouseleave:T}=((e,t,a)=>{const o=n([]),i=n(),s=n(0),r=n("00:00"),c=n(),d=n(),u=l((()=>e.legends||[])),p=l((()=>!0===e.multiple)),h=n([]);let v=0,b=0;const g=l((()=>f(e.events,null==e?void 0:e.selectedDay,u.value,d.value))),f=(e,t,a,n)=>{const o=[],i=new Map;let s=0;n&&(s=parseInt(window.getComputedStyle(n).width,10)),e.sort(((e,t)=>{const a=new Date(e.beginTime).getTime()-new Date(t.beginTime).getTime();let n;return n=0===a?new Date(e.endTime).getTime()-new Date(t.endTime).getTime():a,n}));const l=[];return e.forEach((e=>{const n=a.find((t=>Object.is(t.id,e.itemType)));if(n&&n.isShow&&e&&e.beginTime&&If(e.beginTime,e.endTime,t)){const t={...e,targetLegend:n};h.value.find((t=>t.id===e.id))?Object.assign(t,{isSelectedEvent:!0}):Object.assign(t,{isSelectedEvent:!1}),!e.endTime&&e.beginTime&&Object.assign(t,{endTime:e.beginTime}),l.push(t)}})),l.forEach(((e,a)=>{const{targetLegend:n}=e,r={};Object.assign(r,e),Object.assign(r,{zIndex:a+1});const c=l.length,d=(s-90)/c,u=Number((100/c).toFixed(3));let p="".concat(u,"%"),h="".concat(a*u,"%");d<100&&(p="100px",h="".concat(100*a,"px")),Object.assign(r,{width:p,styleLeft:h});let m="auto",v=60;const b=gf(e.beginTime,e.endTime,"YYYY-MM-DD HH:mm:ss");if(Cf(e.beginTime,e.endTime))m=w(e.beginTime,e.endTime),v=y(new Date(e.beginTime)).styleTop;else if(Cf(e.beginTime,t)&&!Cf(e.endTime,t)){const a=new Date(t);a.setHours(23,59,59,0),m=w(e.beginTime,a),v=y(new Date(e.beginTime)).styleTop}else if(Cf(e.endTime,t)&&!Cf(e.beginTime,t)){const a=new Date(t);a.setHours(0,0,0,0),m=w(a,e.endTime),v=y(new Date(a)).styleTop}else{const e=new Date(t),a=new Date(e.setHours(0,0,0,0)),n=new Date(e.setHours(23,59,59,59));m=w(a,n),v=y(new Date(a)).styleTop}if(Object.assign(r,{height:m,styleTop:v,timeRange:b}),!(null==e?void 0:e.bkColor)){const t=n&&n.bkcolor||ff(i,e.itemType);Object.assign(r,{bkColor:t})}if(r.bkColor){const e=yf(r.bkColor,10);Object.assign(r,{bkColorFade:e})}if(!(null==e?void 0:e.color)){const e=n&&n.color;Object.assign(r,{color:e})}if((null==r?void 0:r.height)&&(null==r?void 0:r.height)>10){const e="1px solid #FFF";Object.assign(r,{border:e})}else Object.assign(r,{border:"none"});o.push(r)})),i.clear(),o},w=(e,t)=>{let a=1;if(Cf(e,t)){const n=new Date(t).getTime()-new Date(e).getTime();a=Math.floor(n/6e4)}return a<30&&(a="auto"),a},y=e=>{const t=e.getHours(),a=e.getMinutes(),n=String(t).padStart(2,"0"),o=String(a).padStart(2,"0");let i,s;return 0===t&&0===a?(i=0,s="00:00"):(i=60*t+a,s="".concat(n,":").concat(o)),{styleTop:i,timeVal:s}},C=Af();let I=null,D="";return m((()=>{Of(C)})),{drawData:o,curTimeTimer:i,curTimeTop:s,curTimeVal:r,events:g,resizableHand:c,calendarDaily:d,selectedData:h,handleCurTime:()=>{const{styleTop:e,timeVal:t}=y(new Date);s.value=e,r.value=t},handleDrag:e=>{const t=e.clientY-v+b;t<320&&(c.value.style.height="".concat(t,"px"))},handleDragStart:e=>{v=e.clientY,b=parseInt(window.getComputedStyle(c.value).height,10)},handleEventClick:(a,n)=>{const o=xf("eventClick",a,n,e.events,p.value,h.value,t),{tempSelectedData:i,isSelectedEvent:s}=o;s||Object.assign(a,{isSelectedEvent:s}),h.value=i},handleEventDblClick:(a,n)=>{const o=xf("eventDblClick",a,n,e.events,p.value,h.value,t),{tempSelectedData:i,isSelectedEvent:s}=o;s||Object.assign(a,{isSelectedEvent:s}),h.value=i},eventContextmenu:async(e,a)=>{t("eventContextmenu",{evt:a,data:[e]})},initDrawData:()=>{const e=[];for(let t=1;t<24;t++){const a=String(t).padStart(2,"0"),n="".concat(a,":00");e.push(n)}return e},contentMousemove:e=>{"content"===D&&I&&C&&zf(e,C)},eventMouseenter:(t,n,o)=>{if(!e.showDetail||I)return;const i="content"===o;D=o,I=Tf(n,i?C:t.target,{placement:i?"right-start":"bottom",modalClass:a.e("event-popover")})},eventMouseleave:e=>{null==I||I.dismiss(),I=null,D=""}}})(e,t,s);c((()=>e.selectedData),(()=>{if(e.selectedData&&e.selectedData.length>0){const t=e.selectedData.length>w.value.length?e.selectedData:w.value;w.value=t}else w.value=[]}),{immediate:!0,deep:!0}),d((()=>{E(),r.value=S(),g.value=setInterval((()=>E()),1e3)})),p((()=>{const e=g.value;e&&(clearInterval(e),g.value=null)}));const z=(t,n,i,l,r,c,d)=>{var u;let p="".concat(l.text||"");"header"===t&&l.timeRange&&(p="".concat(p," ").concat(l.timeRange||"")),p=zt(p)||"",e.showDetail&&(p="");const h=(e=>{var t;const n={...e,color:"",bkColor:""};return o("div",{class:[s.em("event-popover","body")]},[o("div",{class:[s.em("event-popover","scroll")]},[(null==a?void 0:a.event)?null==(t=a.event)?void 0:t.call(a,{data:n}):o("div",{class:[s.em("event-popover","content")]},["".concat(e.text||""," ").concat(e.timeRange||"")])])])})(l);return o("div",{key:r,class:[s.em(d,"event-box")],style:n},[o("button",{class:[s.em(d,"event-content"),l.isSelectedEvent?"is-selected-event":"",l.classname],onClick:()=>{y(l,"head")},onDblclick:()=>{C(l,"head")},onContextmenu:e=>x(l,e),onMouseenter:e=>k(e,h,t),onMouseleave:T,style:i,title:p},[a[c]?null==(u=a[c])?void 0:u.call(a,{data:l}):o("div",{class:[s.em(d,"event-summary"),l.classname]},[l.icon&&o("span",{class:[l.icon,s.em(d,"event-icon")],style:{color:l.bkColor}},null),l.text&&o("span",{class:[s.em(d,"event-name")]},[l.text])]),"header"===t&&l.isSelectedEvent?o("span",{class:["fa fa-check",s.em(d,"check")]},null):""])])};return{ns:s,calendarDaily:f,renderHeader:()=>o("div",{class:[s.e("calendar-daily__head")],ref:e=>{v.value=e}},[o("div",{class:s.e("allday-info")},[ibiz.i18n.t("control.calendar.calendardaily.tip")]),o("div",{class:s.em("allday-info","work-items")},[o("div",{class:s.em("allday-info","work-items-scroll")},[o("div",{class:s.em("allday-info","work-items-body")},[b.value.length>0?b.value.map(((e,t)=>{const a={background:e.bkColorFade};return z("header",{},a,e,t,"head-event","allday-info")})):o(i("iBizNoData"),{hideNoDataImage:!0},null)])])]),o("div",{class:s.e("resizable-handle"),draggable:"true",onDrag:e=>I(e),onDragstart:e=>D(e)},[o("div",{class:s.e("allday-resize-line")},null)])]),renderContent:()=>o("div",{class:[s.e("scroll-area")],onMousemove:P},[o("div",{class:s.e("time-pane")},[o("div",{class:s.em("time-pane","time-labels")},[r.value.map((e=>o("div",{key:e,class:[s.em("time-pane","time-label")]},[e])))]),o("div",{class:s.em("time-pane","time-columns")},[r.value.map(((e,t)=>o("div",{key:e,class:[s.em("time-pane","time-column"),t===r.value.length-1&&s.em("time-pane","time-column-last")]},null))),o("div",{class:s.em("time-pane","event-timed-container")},[o("div",{class:s.em("time-pane","container-scroll")},[b.value.map(((e,t)=>{const a={top:"".concat(e.styleTop,"px"),left:"".concat(e.styleLeft),height:"number"==typeof e.height?"".concat(e.height,"px"):e.height,width:"".concat(e.width),"z-index":e.zIndex};"number"==typeof e.height&&Object.assign(a,{"min-height":"".concat(e.height,"px")});const n={background:e.bkColorFade,"border-left":"3px solid ".concat(e.bkColor)};return z("content",a,n,e,t,"","time-pane")}))])])]),Cf(null==e?void 0:e.selectedDay,new Date)?o("div",{class:s.em("time-pane","current-time"),style:{top:"".concat(u.value,"px")}},[o("div",{class:s.em("time-pane","current-time-label")},[h.value])]):""])])}},render(){return o("div",{ref:e=>{this.calendarDaily=e},class:this.ns.b()},[this.renderHeader(),this.renderContent()])}}),qf=oe(Hf,(function(e){e.component(Hf.name,Hf)})),Gf=(e,t,a)=>{const o=n([]),i=n(),s=n(1),r=n("00:00"),d=n(),u=n(),p=n(),h=l((()=>!0===e.multiple)),v=n([]),g=n([]),f=n([]),w=n([]),y=n(!0);let C=0,I=0;const D=(e,t)=>{const a=new Date(e),n=new Date(t),o=[];a.setHours(0,0,0,0),n.setHours(0,0,0,0);for(let e=new Date(a);e<=n;e.setDate(e.getDate()+1))o.push(new Date(e));return o},E=(e,t,a,n,o)=>{const i={},{targetLegend:s}=e;Object.assign(i,e),Object.assign(i,{zIndex:o+1});const l=Number((100/n).toFixed(3)),r="".concat(l,"%"),c="".concat(o*l,"%");Object.assign(i,{width:r,styleLeft:c});let d="auto",u=60;const p=gf(e.beginTime,e.endTime,"YYYY-MM-DD HH:mm:ss");if(Cf(e.beginTime,e.endTime)){d=x(e.beginTime,e.endTime);u=T(new Date(e.beginTime)).styleTop}else if(Cf(e.beginTime,t.date)&&!Cf(e.endTime,t.date)){const a=new Date(t.date);a.setHours(23,59,59,0),d=x(e.beginTime,a);u=T(new Date(e.beginTime)).styleTop}else if(Cf(e.endTime,t.date)&&!Cf(e.beginTime,t.date)){const a=new Date(t.date);a.setHours(0,0,0,0),d=x(a,e.endTime);u=T(new Date(a)).styleTop}else{const e=new Date(t.date),a=new Date(e.setHours(0,0,0,0)),n=new Date(e.setHours(23,59,59,59));d=x(a,n);u=T(new Date(a)).styleTop}if(Object.assign(i,{height:d,styleTop:u,timeRange:p}),!(null==e?void 0:e.bkColor)){const t=s&&s.bkcolor||ff(a,e.itemType);Object.assign(i,{bkColor:t})}if(i.bkColor){const e=yf(i.bkColor,10);Object.assign(i,{bkColorFade:e})}if(!(null==e?void 0:e.color)){const e=s&&s.color;Object.assign(i,{color:e})}if((null==i?void 0:i.height)&&(null==i?void 0:i.height)>10){const e="1px solid #FFF";Object.assign(i,{border:e})}else Object.assign(i,{border:"none"});return i},S=()=>{const t=e.events,a=null==e?void 0:e.selectedDay,n=new Map,{firstDay:o,lastDay:i}=(e=>{const t=new Date(e),a=t.getDay(),n=new Date(t);n.setDate(t.getDate()-a);const o=new Date(n);return o.setDate(n.getDate()+6),n.setHours(0,0,0,0),o.setHours(23,59,59,0),{firstDay:n,lastDay:o}})(a),s=[],l=[],r=[],c=[];w.value=[];for(let e=0;e<7;e++){const t=e,n=o.getDate()+t,i=new Date(o.getFullYear(),o.getMonth(),n),d=i.getDate(),u={date:i,day:d,caption:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].map((e=>ibiz.i18n.t("control.calendar.calendarweek.weeks.".concat(e))))[e],isActivate:Cf(i,a)};w.value.push(u),s.push([]),l.push([]),r.push([]),c.push([])}t.forEach((e=>{const t=p.value.find((t=>Object.is(t.id,e.itemType)));if(t&&t.isShow&&e.beginTime){const a={targetLegend:t};Object.assign(a,e);if(v.value.find((t=>t.id===e.id))?Object.assign(a,{isSelectedEvent:!0}):Object.assign(a,{isSelectedEvent:!1}),!e.endTime&&e.beginTime&&Object.assign(a,{endTime:e.beginTime}),Ef(a.beginTime,o,i)&&Ef(a.endTime,o,i)||Ef(a.beginTime,o,i)&&!Ef(a.endTime,o,i)||Ef(a.endTime,o,i)&&!Ef(a.beginTime,o,i)||!Ef(e.endTime,o,i)&&!Ef(e.beginTime,o,i)&&Sf(o,e.beginTime)&&Sf(e.endTime,o)){D(o,i).forEach((e=>{const t=new Date(e).getDay();l[t].push({...a})}))}if(Ef(a.beginTime,o,i)&&Ef(a.endTime,o,i)){D(a.beginTime,a.endTime).forEach((e=>{const t=new Date(e).getDay();s[t].push(a)}))}else if(Ef(a.beginTime,o,i)&&!Ef(a.endTime,o,i)){D(a.beginTime,i).forEach((e=>{const t=new Date(e).getDay();s[t].push(a)}))}else if(Ef(a.endTime,o,i)&&!Ef(a.beginTime,o,i)){D(o,a.endTime).forEach((e=>{const t=new Date(e).getDay();s[t].push(a)}))}else if(!Ef(e.endTime,o,i)&&!Ef(e.beginTime,o,i)&&Sf(o,e.beginTime)&&Sf(e.endTime,o)){D(o,i).forEach((e=>{const t=new Date(e).getDay();s[t].push(a)}))}}})),s.forEach((e=>{e.sort(((e,t)=>{const a=e,n=t,o=new Date(a.beginTime).getTime()-new Date(n.beginTime).getTime();let i;return i=0===o?new Date(a.endTime).getTime()-new Date(n.endTime).getTime():o,i}))})),l.forEach((e=>{e.sort(((e,t)=>{const a=e,n=t,o=new Date(a.beginTime).getTime()-new Date(n.beginTime).getTime();let i;return i=0===o?new Date(a.endTime).getTime()-new Date(n.endTime).getTime():o,i}))})),s.forEach(((e,t)=>{e.forEach(((e,a)=>{if(e.targetLegend){const o=s[t].length,i=w.value[t];r[t].push(E(e,i,n,o,a))}}))})),l.forEach(((e,t)=>{e.forEach(((e,a)=>{if(e.targetLegend){const l=s[t].length,r=w.value[t],d=E(e,r,n,l,a);c[t].push(((e,t,a,n,o,i,s)=>{const l={};Object.assign(l,e),Object.assign(l,{width:0,styleLeft:0});let r=0,c=0;if(Ef(e.beginTime,a,n)&&Ef(e.endTime,a,n)){const t=P(e.beginTime,e.endTime,a,n),o=k(e.beginTime,a,n);r="".concat(t,"%"),c="".concat(o,"%")}else if(Ef(e.beginTime,a,n)&&!Ef(e.endTime,a,n)){const t=P(e.beginTime,n,a,n),o=k(e.beginTime,a,n);r="".concat(t,"%"),c="".concat(o,"%")}else if(Ef(e.endTime,a,n)&&!Ef(e.beginTime,a,n)){const t=P(a,e.endTime,a,n);r="".concat(t,"%"),c="".concat(0,"%")}else if(!Ef(e.endTime,a,n)&&!Ef(e.beginTime,a,n)&&Sf(a,e.beginTime)&&Sf(e.endTime,a)){const e=P(a,n,a,n);r="".concat(e,"%"),c="".concat(0,"%")}Object.assign(l,{width:r,styleLeft:c});let d=!1;(Ef(e.beginTime,a,n)&&Cf(e.beginTime,t.date)||0===s)&&(d=!0);const u=new Date(t.date);return If(e.beginTime,e.endTime,u)||(d=!1),Object.assign(l,{isShow:d}),l})(d,r,o,i,0,0,t))}}))})),n.clear(),g.value=r,f.value=c},x=(e,t)=>{let a=1;if(Cf(e,t)){const n=new Date(t).getTime()-new Date(e).getTime();a=Math.floor(n/6e4)}return a<30&&(a="auto"),a},P=(e,t,a,n)=>{let o="0";if(Ef(e,a,n)&&Ef(t,a,n)){const a=Number((100/24).toFixed(3));o=((new Date(t).getTime()-new Date(e).getTime())/36e5*a).toFixed(3)}return o},k=(e,t,a)=>{let n="0";if(Ef(e,t,a)){n=((new Date(e).getHours()+new Date(e).getMinutes()/60)*Number((100/24).toFixed(3))).toFixed(3)}return n},T=e=>{const t=e.getHours(),a=e.getMinutes(),n=String(t).padStart(2,"0"),o=String(a).padStart(2,"0");let i,s;if(0===t&&0===a)i=1,s="00:00";else{i=60*t+a,s="".concat(n,":").concat(o)}return{styleTop:i,timeVal:s}},z=n(),A=n(0),O=n(0),M=n(!1),N=n(0),B=n(1),_=n(1),R=n(!1),L=e=>{if(M.value){const t=e.clientY-N.value;A.value+=t,N.value=e.clientY,z.value&&(z.value.scrollTop=B.value*(A.value/_.value))}e.preventDefault(),e.stopPropagation()},j=e=>{M.value=!1,e.preventDefault(),e.stopPropagation(),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",j)},V=()=>{B.value=0,_.value=0,R.value=!1,O.value=0,b((()=>{z.value&&(B.value=z.value.scrollHeight,_.value=z.value.clientHeight,B.value>_.value&&(R.value=!0),O.value=_.value*(_.value/B.value))}))};c((()=>z.value),(()=>{V()}),{immediate:!0,deep:!0});const F=Af();let U=null,H="";return m((()=>{Of(F)})),{drawData:o,curTimeTimer:i,curTimeTop:s,curTimeVal:r,rows:g,resizableHand:d,calendarWeek:u,selectedData:v,weekDays:w,legends:p,rowsHeader:f,popVisible:y,headerEventRef:z,thumbHeight:O,realHeight:B,scrollTop:A,isScroll:R,handleCurTime:()=>{const{styleTop:e,timeVal:t}=T(new Date);s.value=e,r.value=t},handleDrag:e=>{const t=e.clientY-C+I;t<320&&(d.value.style.height="".concat(t,"px"))},handleDragStart:e=>{C=e.clientY,I=parseInt(window.getComputedStyle(d.value).height,10)},handleDragEnd:()=>{V()},handleEventClick:(a,n)=>{y.value=!1;const o=xf("eventClick",a,n,e.events,h.value,v.value,t),{tempSelectedData:i,isSelectedEvent:s}=o;s||Object.assign(a,{isSelectedEvent:s}),v.value=i,S()},handleEventDblClick:(a,n)=>{y.value=!1;const o=xf("eventDblClick",a,n,e.events,h.value,v.value,t),{tempSelectedData:i,isSelectedEvent:s}=o;s||Object.assign(a,{isSelectedEvent:s}),v.value=i,S()},initDrawData:()=>{const e=[];for(let t=1;t<24;t++){const a=String(t).padStart(2,"0"),n="".concat(a,":00");e.push(n)}return e},handleUIEvents:S,onScrollbarMouseDown:e=>{N.value=e.clientY,M.value=!0,e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",L),document.addEventListener("mouseup",j)},onHeaderEventScroll:e=>{var t,a,n;const o=(null==(t=e.target)?void 0:t.scrollTop)||0;B.value=null==(a=e.target)?void 0:a.scrollHeight,_.value=null==(n=e.target)?void 0:n.clientHeight;const i=o/B.value;A.value=i*_.value,O.value=_.value*(_.value/B.value)},initHeaderEventScroll:V,eventContextmenu:async(e,a)=>{t("eventContextmenu",{evt:a,data:[e]})},contentMousemove:e=>{"content"===H&&U&&F&&zf(e,F)},eventMouseenter:(t,n,o)=>{if(!e.showDetail||U)return;const i="content"===o;H=o,U=Tf(n,i?F:t.target,{placement:i?"right-start":"bottom",modalClass:a.e("event-popover")})},eventMouseleave:e=>{null==U||U.dismiss(),U=null,H=""}}},Wf=a({name:"CalendarWeek",props:Vf,emits:Ff,setup(e,{emit:t,slots:a}){const n=B("calendar-week"),{drawData:i,resizableHand:s,rows:l,weekDays:r,curTimeTimer:u,calendarWeek:h,selectedData:m,legends:v,rowsHeader:b,headerEventRef:g,thumbHeight:f,scrollTop:w,realHeight:y,isScroll:C,handleEventClick:I,handleEventDblClick:D,handleDrag:E,handleDragStart:S,handleDragEnd:x,handleCurTime:P,initDrawData:k,handleUIEvents:T,onScrollbarMouseDown:z,onHeaderEventScroll:A,initHeaderEventScroll:O,eventContextmenu:M,contentMousemove:N,eventMouseenter:_,eventMouseleave:R}=Gf(e,t,n);c((()=>e.selectedData),(()=>{if(e.selectedData&&e.selectedData.length>0){const t=e.selectedData.length>m.value.length?e.selectedData:m.value;m.value=t}else m.value=[]}),{immediate:!0,deep:!0}),c((()=>e.legends),(()=>{v.value=e.legends||[],T()}),{immediate:!0,deep:!0}),c((()=>e.events),(()=>{T(),O()}),{immediate:!0,deep:!0}),d((()=>{P(),i.value=k(),u.value=setInterval((()=>P()),1e3)})),p((()=>{const e=u.value;e&&(clearInterval(e),u.value=null)}));const L=(t,i,s,l,r,c,d)=>{var u;let p="".concat(l.text||"");"header"===t&&l.timeRange&&(p="".concat(p," ").concat(l.timeRange||"")),p=zt(p)||"",e.showDetail&&(p="");const h=(e=>{var t;const i={...e,color:"",bkColor:""};return o("div",{class:[n.em("event-popover","body")]},[o("div",{class:[n.em("event-popover","scroll")]},[(null==a?void 0:a.event)?null==(t=a.event)?void 0:t.call(a,{data:i}):o("div",{class:[n.em("event-popover","content")]},["".concat(e.text||""," ").concat(e.timeRange||"")])])])})(l);return o("div",{key:r,class:[n.em(d,"event-box")],style:i},[o("button",{class:[n.em(d,"event-content"),n.is("selected-event",!!l.isSelectedEvent),l.classname],onClick:()=>{I(l,"head")},onDblclick:()=>{D(l,"head")},onContextmenu:e=>M(l,e),onMouseenter:e=>_(e,h,t),onMouseleave:R,style:s,title:p},[a[c]?null==(u=a[c])?void 0:u.call(a,{data:l}):o("div",{class:[n.em(d,"event-summary"),l.classname]},[l.icon&&o("span",{class:[l.icon,n.em(d,"event-icon")],style:{color:l.bkColor}},null),l.text&&o("span",{class:[n.em(d,"event-name")]},[l.text])]),"header"===t&&l.isSelectedEvent?o("span",{class:["fa fa-check",n.em(d,"check")]},null):""])])};return{ns:n,thumbHeight:f,calendarWeek:h,scrollTop:w,realHeight:y,headerEventRef:g,renderHeader:()=>o("div",{class:[n.e("header")],ref:e=>{s.value=e}},[o("div",{class:[n.em("header","dates")]},[o("div",{class:[n.em("header","date-cell-first")]},null),r.value.map((e=>o("div",{class:[n.em("header","date-cell")]},[o("div",{class:[n.em("header","date-week")]},[e.caption]),o("div",{class:[n.em("header","date-day"),e.isActivate?"is-today":""]},[e.day])])))]),o("div",{class:[n.em("header","events")]},[o("div",{class:[n.em("header","event-cell-first")]},[ibiz.i18n.t("control.calendar.calendardaily.tip")]),o("div",{class:n.em("header","event-container"),ref:e=>{g.value=e},onScroll:A},[o("div",{class:n.em("header","container-scroll")},[b.value.map((e=>o("div",{class:[n.em("header","event-cell")]},[e.map(((e,t)=>{const a={top:"".concat(Number(26*t)+2,"px"),left:"".concat(e.styleLeft),width:"".concat(null==e?void 0:e.width)},n={background:e.bkColorFade};return e.isShow?L("header",a,n,e,t,"head-event","header"):""}))])))]),C.value&&o("div",{class:n.b("scroll-bar")},[o("div",{class:n.be("scroll-bar","thumb"),onMousedown:z},null)])])]),o("div",{class:n.em("header","resizable-handle"),draggable:"true",onDrag:e=>E(e),onDragstart:e=>S(e),onDragend:()=>x()},[o("div",{class:n.em("header","resize-line")},null)])]),renderContent:()=>o("div",{class:[n.e("scroll-area")],onMousemove:N},[o("div",{class:n.e("time-pane")},[o("div",{class:n.em("time-pane","time-labels")},[i.value.map((e=>o("div",{key:e,class:[n.em("time-pane","time-label")]},[e])))]),l.value.map((e=>o("div",{class:n.em("time-pane","time-columns")},[i.value.map(((e,t)=>o("div",{key:e,class:[n.em("time-pane","time-column"),t===i.value.length-1&&n.em("time-pane","time-column-last")]},null))),o("div",{class:n.em("time-pane","event-timed-container")},[o("div",{class:n.em("time-pane","container-scroll")},[e.map(((e,t)=>{const a={top:"".concat(e.styleTop,"px"),left:"".concat(e.styleLeft),height:"number"==typeof e.height?"".concat(e.height,"px"):e.height,width:"".concat(e.width),"min-height":"".concat(e.height&&e.height>30?e.height:30,"px"),"z-index":e.zIndex};"number"==typeof e.height&&Object.assign(a,{"min-height":"".concat(e.height,"px")});const n={background:e.bkColorFade,"border-left":"3px solid ".concat(e.bkColor)};return L("content",a,n,e,t,"","time-pane")}))])])])))])])}},render(){return o("div",{ref:e=>{this.calendarWeek=e},class:this.ns.b(),style:{["".concat(this.ns.cssVarBlockName("header-event-scroll-bar-thumb-height"))]:"".concat(this.thumbHeight,"px"),["".concat(this.ns.cssVarBlockName("header-event-scroll-bar-thumb-top"))]:"".concat(this.scrollTop,"px"),["".concat(this.ns.cssVarBlockName("header-event-scroll-real-height"))]:"".concat(this.realHeight,"px")}},[this.renderHeader(),this.renderContent()])}}),Kf=oe(Wf,(function(e){e.component(Wf.name,Wf)}));const Yf=a({name:"CalendarUser",props:Uf,emits:{eventClick:e=>e,eventDblClick:e=>e},setup(e,{emit:t,slots:a}){const s=B("calendar-user"),l=n([]),r=n([]);r.value=function(){const e=[];for(let t=0;t<24;t++)e.push({time:t,text:"".concat(t,":00")});return e}();const d=n(""),u=n(),p=n(),m=n(0),v=n(0),b=n(!1),g=n(0),f=n(1),w=n(1),y=n(!1);c((()=>e.selectedDay),(()=>{e.selectedDay&&(l.value=function(e){const t=[],a=e.getDay();let n;if(0===a){const t=e.getTime()-5184e5;n=new Date(t)}else{const t=e.getTime()-24*(a-1)*60*60*1e3;n=new Date(t)}const o=[ibiz.i18n.t("control.calendar.calendarUser.weeks.monday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.tuesday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.wednesday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.thursday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.friday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.saturday"),ibiz.i18n.t("control.calendar.calendarUser.weeks.sunday")];for(let e=0;e<7;e++){const a=24*e*60*60*1e3;t.push({text:o[e],date:Vi(new Date(n.getTime()+a)).format("MM/DD")})}return t}(new Date(e.selectedDay)))}),{immediate:!0,deep:!0});const C=()=>{t("eventClick",{data:[]})},I=(t,n)=>{const l=function(e,t,a){const n=e.filter((e=>Vi(new Date(e.beginTime)).format("MM/DD")===t.date))||[];return a?n.filter((e=>new Date(e.beginTime).getHours()===a.time)):n}(e.events,t,n);return 0===(r=l).length?o("div",{class:s.e("black"),onClick:C},null):r.length>1?[null==(c=a.event)?void 0:c.call(a,{data:r[0]}),o(i("el-popover"),{"popper-class":s.e("custom-user-popover"),trigger:"click",ref:e=>{e&&r[0].id===d.value&&(u.value=e)},onShow:()=>{d.value=r[0].id}},{reference:()=>o("span",{class:s.b("more")},["+".concat(r.length-1," ").concat(ibiz.i18n.t("app.more"),"...")]),default:()=>r.map((e=>{var t;return null==(t=a.event)?void 0:t.call(a,{data:e})}))})]:r.map((e=>{var t;return null==(t=a.event)?void 0:t.call(a,{data:e})}));var r,c},D=e=>{if(b.value){const t=e.clientY-g.value;m.value+=t,g.value=e.clientY,p.value&&(p.value.scrollTop=f.value*(m.value/w.value))}e.preventDefault(),e.stopPropagation()},E=e=>{b.value=!1,e.preventDefault(),e.stopPropagation(),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",E)},S=e=>{g.value=e.clientY,b.value=!0,e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",D),document.addEventListener("mouseup",E)},x=e=>{var t,a,n;const o=(null==(t=e.target)?void 0:t.scrollTop)||0;f.value=null==(a=e.target)?void 0:a.scrollHeight,w.value=null==(n=e.target)?void 0:n.clientHeight;const i=o/f.value;m.value=i*w.value};return c((()=>p.value),(()=>{p.value&&(f.value=p.value.scrollHeight,w.value=p.value.clientHeight,f.value>w.value&&(y.value=!0),v.value=w.value*(w.value/f.value))}),{immediate:!0,deep:!0}),{ns:s,renderWeekHeader:()=>o("div",{class:s.b("header")},[o("div",{class:s.be("header","time-item")},[o("div",{class:[s.e("cell"),s.be("header","time-text"),s.be("header","top")]},null),l.value.map((e=>o("div",{class:[s.be("header","week-day"),s.e("cell"),s.be("header","top")]},[e.text,e.date])))]),o("div",{class:s.be("header","time-item")},[o("div",{class:[s.e("cell"),s.be("header","time-text")]},[h("全天")]),l.value.map((e=>o("div",{class:[s.be("header","week-item"),s.e("cell")]},[I(e)])))])]),renderWeekContent:()=>o("div",{class:s.b("content"),style:{["--".concat(s.namespace,"-calendar-user-scroll-bar-thumb-height")]:"".concat(v.value,"px"),["--".concat(s.namespace,"-calendar-user-scroll-bar-thumb-top")]:"".concat(m.value,"px")}},[o("div",{class:s.be("content","wrapping"),ref:e=>{p.value=e},onScroll:x},[r.value.map((e=>o("div",{class:s.be("content","time-item")},[o("div",{class:[s.be("content","time-text"),s.e("cell")]},[e.text]),l.value.map((t=>o("div",{class:[s.be("content","week-item"),s.e("cell")]},[I(t,e)])))])))]),y.value&&o("div",{class:s.b("scroll-bar")},[o("div",{class:s.be("scroll-bar","thumb"),onMousedown:S},null)])])}},render(){return o("div",{class:this.ns.b()},[this.renderWeekHeader(),this.renderWeekContent()])}}),Xf=oe(Yf,(function(e){e.component(Yf.name,Yf)}));const $f=a({name:"CustomCalendar",props:_f,emits:Rf,setup(e,{emit:t,slots:a}){const s=B("custom-calendar"),{date:r,events:d,shortcuts:u,viewType:p,validatedRange:h,realSelectedDay:m,curWeek:v,legends:b,multiple:g,selectedData:f,pickDay:w,handleEVentClick:y,handleEVentDblClick:C,handleEventContextmenu:I,selectDate:D,selectLegend:E}=((e,t,a)=>{const{lang:o}=ci(),i=n(),s=Vi().locale(o.value),r=n(),d=l((()=>e.viewType)),u=n([]),p=new Map,h=l((()=>!0===e.multiple)),m=l((()=>e.selectedData));c((()=>e.legends),(t=>{const a=[];t&&e.legends.forEach((e=>{const t={};if(Object.assign(t,e),Object.assign(t,{isShow:!0}),e&&!e.bkcolor){const a=ff(p,e.id);Object.assign(t,{bkcolor:a})}a.push(t)})),u.value=a}),{immediate:!0,deep:!0});const v=(e,t)=>{const a=e.startOf("week"),n=t.endOf("week"),o=a.get("month"),i=n.get("month");let s;return s=o===i?[[a,n]]:(o+1)%12===i?((e,t)=>{const a=e.endOf("month"),n=t.startOf("month"),o=a.isSame(n,"week");return[[e,a],[(o?n.add(1,"week"):n).startOf("week"),t]]})(a,n):o+2===i||(o+1)%11===i?((e,t)=>{const a=e.endOf("month"),n=e.add(1,"month").startOf("month"),o=a.isSame(n,"week")?n.add(1,"week"):n,i=o.endOf("month"),s=t.startOf("month"),l=i.isSame(s,"week")?s.add(1,"week"):s;return[[e,a],[o.startOf("week"),i],[l.startOf("week"),t]]})(a,n):[],s},b=l((()=>{if(!e.range)return[];let t=[];const a=e.range.map((e=>Vi(e).locale(o.value))),[n,i]=a;return n.isAfter(i)&&(t=[]),n.isSame(i,"month")||n.add(1,"month").month()!==i.month()&&(t=[]),t=v(n,i),t})),g=l((()=>{let t;return t=e.modelValue?Vi(e.modelValue).locale(o.value):r.value||(b.value.length?b.value[0][0]:s),t})),f=l({get(){let t=g.value;return e.modelValue||(t=i.value),r.value=t,t},set(e){if(!e)return;const a=Vi(e);i.value=a;const n=a.toDate();t(Bf,n),t(Nf,n),t(Mf,n)}}),w=l((()=>{if(e.events.length>0)return e.events.map((e=>{const t={};return Object.assign(t,e),Object.assign(t,{deData:e.deData,beginTime:e.beginTime,endTime:e.endTime,id:e.id,classname:e.classname,text:e.text,content:e.content,tips:e.tips,icon:e.icon,color:e.color,bkColor:e.bkColor,itemType:e.itemType}),t}))})),y=l((()=>g.value.subtract(1,"month").date(1))),C=l((()=>g.value.add(1,"month").date(1))),I=l((()=>g.value.subtract(1,"year").date(1))),D=l((()=>g.value.add(1,"year").date(1))),E=e=>{f.value=e},S=l((()=>{const e="".concat(g.value.format("M"));return"".concat(g.value.year()," ").concat(ibiz.i18n.t("control.calendar.year")," ").concat(e," ").concat(ibiz.i18n.t("control.calendar.month"))})),x=[{text:ibiz.i18n.t("control.calendar.today"),value:new Date},{text:ibiz.i18n.t("control.calendar.calendardaily.tomorrow"),value:()=>{const e=new Date;return e.setTime(e.getTime()+864e5),e}},{text:ibiz.i18n.t("control.calendar.calendardaily.nextweek"),value:()=>{const e=new Date;return e.setTime(e.getTime()+6048e5),e}}],P=l((()=>{let e="";if(f.value){const t=f.value.day();e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].map((e=>ibiz.i18n.t("control.calendar.calendardaily.weeks.".concat(e))))[t]}return e}));return{date:g,viewType:d,i18nDate:S,events:w,shortcuts:x,validatedRange:b,realSelectedDay:f,curWeek:P,legends:u,multiple:h,selectedData:m,calculateValidatedDateRange:v,pickDay:E,selectDate:e=>{const t={"prev-month":y.value,"next-month":C.value,"prev-year":I.value,"next-year":D.value,today:s}[e];t.isSame(g.value,"day")||E(t)},handleEVentClick:e=>{t("eventClick",e)},handleEVentDblClick:e=>{t("eventDblClick",e)},handleEventContextmenu:e=>{t("eventContextmenu",e)},selectLegend:e=>{const t=u.value.find((t=>e.id===t.id));t&&Object.assign(t,{isShow:!e.isShow})}}})(e,t),S=()=>{const e=function(e){let t,a;const n=e.getDay();return 0===n?(t=Vi(new Date(e.getTime()-5184e5)).format("YYYY-MM-DD"),a=Vi(e).format("YYYY-MM-DD")):(t=Vi(new Date(e.getTime()-864e5*(n-1))).format("YYYY-MM-DD"),a=Vi(new Date(e.getTime()+864e5*(7-n))).format("YYYY-MM-DD")),[t,a]}(new Date(m.value));return o("div",{class:[s.e("calendar-user")]},[o("div",{class:[s.e("calendar-user-header")]},[o("div",{class:s.em("calendar-user-header","left")},[e.map((e=>Vi(new Date(e)).format("YYYY-MM-DD"))).join(" ~ ")]),o("div",{class:s.em("calendar-user-header","right")},[o(i("el-date-picker"),{type:"week",clearable:!1,"popper-class":s.em("calendar-user-header","date-picker"),modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,class:s.em("calendar-user-header","date-range"),placeholder:ibiz.i18n.t("control.calendar.calendarUser.selectWeekRange"),format:ibiz.i18n.t("control.calendar.calendarUser.weekFormat")},null)])]),o(Xf,{"selected-day":m.value,events:d.value,onEventClick:e=>y(e),onEventDblClick:e=>C(e)},a)])};return{ns:s,date:r,validatedRange:h,pickDay:w,selectDate:D,renderContent:()=>{switch(p.value){case"DAY":return o("div",{class:[s.e("calendar-week")]},[(null==a?void 0:a.header)?o("div",{class:[s.em("calendar-month","header")]},[null==(t=null==a?void 0:a.header)?void 0:t.call(a,{date:Vi(m.value).format("YYYY-MM-DD"),legends:b.value})]):o("div",{class:[s.em("calendar-week","header")]},[o("div",{class:s.em("calendar-week","header-top")},[o("div",{class:s.em("calendar-week","title")},[e.calendarTitle||ibiz.i18n.t("control.calendar.title")]),o("div",{class:s.em("calendar-week","legend")},[b.value.length>1&&b.value.map((e=>o("div",{class:s.em("calendar-week","legend-item"),onClick:()=>E(e)},[o("div",{class:s.em("calendar-week","legend-item-tip"),style:{background:e.isShow?e.bkcolor:"var(".concat(s.cssVarName("color-disabled-bg"),")")}},null),o("div",{class:s.em("calendar-week","legend-item-text"),title:zt(e.name)},[e.name])])))]),o("div",{class:s.em("calendar-week","select-time")},[o(i("el-date-picker"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,type:"date",placeholder:ibiz.i18n.t("control.calendar.calendardaily.selectdate"),shortcuts:u},null)])]),o("div",{class:s.em("calendar-week","text-secondary")},[v.value])]),o(qf,{"selected-day":m.value,controller:e.controller,showDetail:e.showDetail,events:d.value,legends:b.value,multiple:g.value,selectedData:f.value,onEventClick:e=>y(e),onEventDblClick:e=>C(e),onEventContextmenu:e=>I(e)},a)]);case"WEEK":return(()=>{var t;return o("div",{class:[s.e("calendar-week")]},[(null==a?void 0:a.header)?o("div",{class:[s.em("calendar-month","header")]},[null==(t=null==a?void 0:a.header)?void 0:t.call(a,{date:Vi(m.value).format("YYYY-MM-DD"),legends:b.value})]):o("div",{class:[s.em("calendar-week","header")]},[o("div",{class:s.em("calendar-week","header-top")},[o("div",{class:s.em("calendar-week","title")},[e.calendarTitle||ibiz.i18n.t("control.calendar.title")]),o("div",{class:s.em("calendar-week","legend")},[b.value.length>1&&b.value.map((e=>o("div",{class:s.em("calendar-week","legend-item"),onClick:()=>E(e)},[o("div",{class:s.em("calendar-week","legend-item-tip"),style:{background:e.isShow?e.bkcolor:"var(".concat(s.cssVarName("color-disabled-bg"),")")}},null),o("div",{class:s.em("calendar-week","legend-item-text"),title:zt(e.name)},[e.name])])))]),o("div",{class:s.em("calendar-week","select-time")},[o(i("el-date-picker"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,type:"date",placeholder:"选择日期",shortcuts:u},null)])])]),o(Kf,{"selected-day":m.value,showDetail:e.showDetail,events:d.value,legends:b.value,multiple:g.value,selectedData:f.value,onEventClick:e=>y(e),onEventDblClick:e=>C(e),onEventContextmenu:e=>I(e)},a)])})();case"USER":return S();default:return null}var t}}},render(){return o("div",{class:[this.ns.b()]},[this.renderContent()])}}),Jf=oe($f,(function(e){e.component($f.name,$f)})),Qf=e=>{const{date:t,beginTime:a,endTime:n,unit:o="day"}=e;return!!(a&&Vi(t).isSame(a,o)||n&&Vi(t).isSame(n,o)||a&&n&&Vi(t).isAfter(a,o)&&Vi(t).isBefore(n,o))};function Zf(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const ew=a({name:"IBizCalendarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},isSimple:{type:Boolean,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new Xn(...e))),a=B("control-".concat(e.model.controlType.toLowerCase())),{UIStore:s}=G(),{getFontColor:l,getBkColor:r,getActBdrColors:d}=function(e){const t=e=>{const t=document.documentElement;return getComputedStyle(t).getPropertyValue(e)},a=[t("".concat(e.cssVarName("color-primary"))),"#2196F3","#4CAF50","#3F51B5","#FF9800","#673AB7","#757575"],n=a.map((()=>t("".concat(e.cssVarName("color-black")))));return{getFontColor:()=>t("".concat(e.cssVarName("color-primary-text"))),getBkColor:e=>a[e]||a[0],getActBdrColors:a=>n[a]||t("".concat(e.cssVarName("color-primary")))}}(a),u=n(),p=n(),h=n("daterange"===e.controlParams.showmode),m=n("expand"===e.controlParams.showmode),v=n([]),b=["DAY","WEEK","MONTH"],g=()=>{v.value=e.state.legends.map(((t,a)=>{const n={...t,isShow:!0};return e.model.calendarStyle&&b.includes(e.model.calendarStyle)?(t.bkcolor||Object.assign(n,{bkcolor:r(a),actBdrColor:d(a)}),t.color||Object.assign(n,{color:l()}),n):n}))};c((()=>e.state.legends),(()=>{g()}),{deep:!0}),c((()=>s.theme),(()=>{g()}));const f=n("");e.evt.on("onActive",(()=>{p.value&&(p.value.hide(),p.value=void 0)}));const w=e=>{const t=e.getDay();let a;return a=0===t?e.getTime()-5184e5:e.getTime()-24*(t-1)*60*60*1e3,Vi(new Date(a)).format("YYYY-MM-DD")};c((()=>e.state.selectedDate),((t,a)=>{((t,a)=>{if("WEEK"===e.model.calendarStyle||"USER"===e.model.calendarStyle)return w(t)===w(a);if("DAY"===e.model.calendarStyle)return Vi(t).format("YYYY-MM-DD")===Vi(a).format("YYYY-MM-DD");if("MONTH"===e.model.calendarStyle)return Vi(a).format("YYYY-MM")===Vi(t).format("YYYY-MM");return"TIMELINE"===e.model.calendarStyle&&Vi(t).isSame(Vi(a),"millisecond")})(t,a)||e.load()}));let y;const C=i("IBizRawItem"),I=i("IBizIcon");e.evt.on("onMounted",(()=>{if(Object.values(e.contextMenus).length>0){(()=>t.import("@imengyu/vue3-context-menu"))().then((e=>{y=e.default,y.default&&!y.showContextMenu&&(y=y.default)}))}}));const D=(t,a,n,i)=>{const s=[];return t.forEach((t=>{var l,r;if("SEPERATOR"===t.itemType)return void s.push({divided:"self"});const c=i[t.id];if(c&&!c.visible)return;let d={};if(t.showCaption&&t.caption&&(d.label=t.caption),t.sysImage&&t.showIcon&&(d.icon=o(I,{icon:t.sysImage},null)),"DEUIACTION"===t.itemType){d.disabled=c.disabled,d.clickClose=!0;const{uiactionId:o}=t;o&&(d.onClick=()=>{e.doUIAction(o,a,n,t.appId)})}else if("RAWITEM"===t.itemType){const{rawItem:e}=t;e&&(d.label=o(C,{rawItem:t},null))}else if("ITEMS"===t.itemType){const c=t;if((null==(l=c.detoolbarItems)?void 0:l.length)&&(d.children=D(c.detoolbarItems,a,n,i)),c.uiactionGroup&&c.groupExtractMode){const t=null==(r=c.uiactionGroup.uiactionGroupDetails)?void 0:r.filter((e=>i[e.id].visible)).map((t=>{const s=i[t.id],{sysImage:l}=t;return{label:t.showCaption?t.caption:void 0,icon:t.showIcon?o(I,{icon:l},null):void 0,disabled:s.disabled,clickableWhenHasChildren:!0,onClick:()=>{y.closeContextMenu(),e.doUIAction(t.uiactionId,a,n,t.appId)}}}));switch(c.groupExtractMode){case"ITEMS":d.children=t;break;case"ITEMX":t&&(d=t[0],d.children=t.slice(1));break;default:d=void 0,t&&s.push(...t)}}}d&&s.push(d)})),s};return{c:e,ns:a,curPopover:p,calendarRef:u,showDateRange:h,showDateList:m,popoverValue:f,legendItems:v,selectDate:e=>{u.value&&u.value.selectDate(e)},calcItemStyle:e=>{const t=v.value.find((t=>t.id===e.itemType));return{color:e.color,backgroundColor:e.bkColor,["".concat(a.cssVarBlockName("item-color"))]:e.color,["".concat(a.cssVarBlockName("item-active-border-color"))]:null==t?void 0:t.actBdrColor}},calcCalendarItems:t=>{const a=(e=>{const t=Vi(e),a=t.startOf("week"),n=t.endOf("week"),o=[];let i=a;for(;i.isBefore(n)||i.isSame(n,"day");)o.push(i),i=i.add(1,"day");return o})(t),n=e.state.items.filter((e=>{const n=v.value.find((t=>t.id===e.itemType));return!(n&&!n.isShow)&&(h.value?a.some((t=>Qf({beginTime:e.beginTime,endTime:e.endTime,date:t}))):Vi(t).isSame(e.beginTime,"day"))}));return h.value&&n.sort(((e,t)=>{let a=0;return a=Vi(e.beginTime).isSame(t.beginTime,"day")?Vi(e.endTime).isAfter(t.endTime)?-1:1:Vi(e.beginTime).isAfter(t.beginTime)?1:-1,a})),n.map((e=>{const t=v.value.find((t=>Object.is(t.id,e.itemType)));return t?(e.bkColor||Object.assign(e,{bkColor:t.bkcolor}),e.color||Object.assign(e,{color:t.color}),e):e}))},onNodeContextmenu:async(t,n)=>{n.preventDefault(),n.stopPropagation();const{sysCalendarItems:o}=e.model,i=null==o?void 0:o.find((e=>e.id===t.itemType));if(!(null==i?void 0:i.decontextMenu))return;const s=e.contextMenus[i.decontextMenu.id];if(!s.model.detoolbarItems)return;await s.calcButtonState(t.deData||(t.deData?t:void 0),i.appDataEntityId,{view:e.view,ctrl:e});const l=s.state.buttonsState,r=D(s.model.detoolbarItems,t,n,l);r.length&&y.showContextMenu({x:n.x,y:n.y,customClass:a.b("context-menu"),items:r,zIndex:9999})},monthLegendClick:e=>{Object.assign(e,{isShow:!e.isShow})}}},render(){const e=(e,t,a)=>{const{context:n,params:s}=this.c,l=this.c.state.selectedData.findIndex((t=>t.deData.srfkey===e.deData.srfkey)),r=[this.ns.b("item"),this.ns.is("active",-1!==l),this.ns.is("begin-time",a&&Vi(a).isSame(e.beginTime,"day")),this.ns.is("hidden",this.showDateRange&&!Qf({beginTime:e.beginTime,endTime:e.endTime,date:a})),this.ns.is("no-begin-time",this.showDateRange&&!e.beginTime),this.ns.is("no-end-time",this.showDateRange&&!e.endTime),this.ns.is("end-time",a&&Vi(a).isSame(e.endTime,"day"))],c=this.calcItemStyle(e);return o(i("iBizControlShell"),{class:r,data:e.deData,modelData:t,context:n,params:s,style:c,onClick:t=>(t.stopPropagation(),this.c.onRowClick(e)),onDblclick:t=>(t.stopPropagation(),this.c.onDbRowClick(e)),onContextmenu:t=>this.onNodeContextmenu(e,t)},null)},t=(e,t)=>{const a=this.c.state.selectedData.findIndex((t=>t.deData.srfkey===e.deData.srfkey)),n=[this.ns.b("item"),this.ns.be("item","default"),this.ns.is("active",-1!==a),this.ns.is("begin-time",t&&Vi(t).isSame(e.beginTime,"day")),this.ns.is("hidden",this.showDateRange&&!Qf({beginTime:e.beginTime,endTime:e.endTime,date:t})),this.ns.is("no-begin-time",this.showDateRange&&!e.beginTime),this.ns.is("no-end-time",this.showDateRange&&!e.endTime),this.ns.is("end-time",t&&Vi(t).isSame(e.endTime,"day"))],i=this.calcItemStyle(e);return o("div",{class:n,key:e.deData.srfkey,style:i,title:zt(e.tips||e.text),onClick:()=>this.c.onRowClick(e),onDblclick:()=>this.c.onDbRowClick(e),onContextmenu:t=>this.onNodeContextmenu(e,t)},[this.showDateRange?t&&(Vi(t).isSame(e.beginTime,"day")||0===Vi(t).day()||!e.beginTime&&Vi(t).isSame(e.endTime,"day"))?e.text:"":e.text])},a=(a,n)=>{var o;const i=(null==(o=this.c.model.sysCalendarItems)?void 0:o.find((e=>a.itemType===e.itemType))).layoutPanel;return i?e(a,i,n):t(a,n)},n=(e,t)=>e.length>1&&!this.showDateRange&&!this.showDateList?[a(e[0],t),o(i("el-popover"),{trigger:"click",ref:t=>{t&&e[0].id===this.popoverValue&&(this.curPopover=t)},onShow:()=>{this.popoverValue=e[0].id}},{reference:()=>o("span",{class:this.ns.b("more")},["+".concat(e.length-1," ").concat(ibiz.i18n.t("app.more"),"...")]),default:()=>e.map((e=>a(e,t)))})]:e.map((e=>a(e,t))),s=e=>{const t=this.calcCalendarItems(e);return n(t,e)},l=()=>o("div",{class:[this.ns.b("content"),this.ns.is("show-date-range",this.showDateRange)]},[o(i("el-calendar"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":e=>this.c.state.selectedDate=e,ref:"calendarRef"},{header:({date:e})=>{let t,a,n,s,l;return[o("span",{class:this.ns.b("content-title")},[e]),o("div",{class:this.ns.b("legend")},[this.legendItems&&this.legendItems.length>1&&this.legendItems.map((e=>{var t;let a=e.name;const n=null==(t=this.c.model.sysCalendarItems)?void 0:t.find((t=>t.id===e.id));return(null==n?void 0:n.nameLanguageRes)&&(a=ibiz.i18n.t(n.nameLanguageRes.lanResTag,n.name)),o("div",{class:[this.ns.be("legend","item")],onClick:()=>this.monthLegendClick(e)},[o("div",{class:this.ns.bem("legend","item","tip"),style:{background:e.isShow?null==e?void 0:e.bkcolor:"var(".concat(this.ns.cssVarName("color-disabled-bg"),")"),color:null==e?void 0:e.color}},null),o("div",{class:this.ns.bem("legend","item","text")},[a])])}))]),o("div",{class:this.ns.b("content-header")},[o(i("el-date-picker"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":e=>this.c.state.selectedDate=e,type:"month"},null),o(i("el-button-group"),null,{default:()=>[o(i("el-button"),{onClick:()=>{this.selectDate("prev-year")}},Zf(t=ibiz.i18n.t("control.calendar.lastYear"))?t:{default:()=>[t]}),o(i("el-button"),{onClick:()=>{this.selectDate("prev-month")}},Zf(a=ibiz.i18n.t("control.calendar.lastMonth"))?a:{default:()=>[a]}),o(i("el-button"),{onClick:()=>{this.selectDate("today")}},Zf(n=ibiz.i18n.t("control.calendar.today"))?n:{default:()=>[n]}),o(i("el-button"),{onClick:()=>{this.selectDate("next-month")}},Zf(s=ibiz.i18n.t("control.calendar.nextMonth"))?s:{default:()=>[s]}),o(i("el-button"),{onClick:()=>{this.selectDate("next-year")}},Zf(l=ibiz.i18n.t("control.calendar.nextYear"))?l:{default:()=>[l]})]})])]},"date-cell":({data:e})=>{const{date:t}=e;return o("div",{class:this.ns.b("day")},[o("p",{class:this.ns.b("date-text")},[t.getDate()]),o("div",{class:this.ns.b("items")},[s(t)])])}})]),r=()=>{const{isLoaded:e}=this.c.state,t={};return ce(this.c)&&Object.assign(t,{customRender:()=>o(de,{controller:this.c},null)}),e&&o(i("iBizNoData"),{text:this.c.model.emptyText,emptyTextLanguageRes:this.c.model.emptyTextLanguageRes,hideNoDataImage:this.c.state.hideNoDataImage},Zf(t)?t:{default:()=>[t]})},c=()=>{const a={},{sysCalendarItems:n}=this.c.model;return a.event=({data:a})=>{const o=null==n?void 0:n.find((e=>e.id===a.itemType));return o&&o.layoutPanel?e(a,o.layoutPanel):t(a)},o("div",{class:this.ns.b("content")},[o(Jf,{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":e=>this.c.state.selectedDate=e,showDetail:this.c.state.showDetail,calendarTitle:this.c.state.calendarTitle,ref:"calendarRef",viewType:this.c.model.calendarStyle,events:this.c.state.items,legends:this.legendItems,multiple:!this.c.state.singleSelect,selectedData:this.c.state.selectedData,onEventClick:e=>{const{data:t}=e,a=t[0];a&&this.c.onRowClick(a)},onEventDblClick:e=>{const{data:t}=e,a=t[0];a&&this.c.onDbRowClick(a)},onEventContextmenu:e=>{const{data:t,evt:a}=e,n=t[0];n&&a&&this.onNodeContextmenu(n,a)}},Zf(a)?a:{default:()=>[a]})])},d=()=>o("div",{class:this.ns.b("timeline-content")},[o(i("el-timeline"),null,{default:()=>[this.c.state.items.length>0?this.c.state.items.map((a=>{var n;const s=null==(n=this.c.model.sysCalendarItems)?void 0:n.find((e=>a.itemType===e.itemType));return o(i("el-timeline-item"),{key:a.id,placement:"top",color:a.bkColor,timestamp:a.beginTime},{default:()=>[(null==s?void 0:s.layoutPanel)?e(a,s.layoutPanel):t(a)]})})):r()]})]),u=()=>{switch(this.c.model.calendarStyle){case"TIMELINE":return d();case"WEEK":case"DAY":case"USER":return c();default:return l()}};return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>{var e;return[o(i("iBizControlBase"),{controller:this.c,class:this.ns.e(null==(e=this.c.model.calendarStyle)?void 0:e.toLowerCase())},{default:()=>[u(),this.c.state.enableNavView&&this.c.state.showNavIcon?this.c.state.showNavView?o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),name:"eye-off-outline",onClick:()=>this.c.onShowNavViewChange()},null):o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),name:"eye-outline",onClick:()=>this.c.onShowNavViewChange()},null):null]})]}})}});var tw=Object.defineProperty,aw=(e,t,a)=>(((e,t,a)=>{t in e?tw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class nw{constructor(){aw(this,"component","IBizCalendarControl")}}const ow=e("aw",oe(ew,(function(e){e.use(Jf),e.component(ew.name,ew),Ba(_a.CALENDAR,(()=>new nw))})));function iw(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const sw=a({name:"IBizSwimlaneKanban",components:{draggable:Ui},props:{controller:{type:Object,required:!0}},setup(e){var t,a;const s=B("swimlane-kanban"),r=e.controller,{zIndex:c}=G(),u=n(!1),p={zIndex:c.increment()},v=n(!0),b=n(),g=n();let f=Lt;d((()=>{f=Bt(window,"resize",(()=>{u.value=r.getFullscreen()}))})),m((()=>{f!==Lt&&f()}));const w=l((()=>!r.state.draggable||0===r.draggableMode||r.state.updating||r.state.readonly)),y=l((()=>{const{groupWidth:e,cardWidth:t}=r.model;return e||t||320})),C=l((()=>r.state.batching?r.state.selectGroupKey:"")),I=null==(t=r.model.controls)?void 0:t.find((e=>e.name==="".concat(r.model.name,"_quicktoolbar")||e.name==="".concat(r.model.name,"_groupquicktoolbar"))),D=null==(a=r.model.controls)?void 0:a.find((e=>e.name==="".concat(r.model.name,"_batchtoolbar")));let E=null;const S=()=>{const e=g.value;u.value=r.onFullScreen(e)},x=()=>{v.value=!v.value,r.state.swimlanes.forEach((e=>{e.isExpand=v.value}))},P=e=>{let t;const a=r.model.groupUIActionGroup&&e.groupActionGroupState||D;return!1===e.isExpand?null:C.value===e.key?o("div",{class:[s.em("cell","right"),s.em("header","actions")]},[o(i("el-button"),{text:!0,onClick:()=>r.closeBatch()},iw(t=ibiz.i18n.t("app.complete"))?t:{default:()=>[t]})]):o("div",{class:[s.em("cell","right"),s.em("header","actions")]},[o(i("el-button"),{text:!0,circle:!0,class:s.em("header","action"),onClick:()=>{e.isExpand=!1}},{default:()=>[o("ion-icon",{name:"chevron-back-outline",title:ibiz.i18n.t("control.kanban.collapsed")},null)]}),a&&o(i("el-dropdown"),{trigger:"click",teleported:!1,style:p,class:[s.em("header","action"),s.is("visible",e.key===b.value)],"popper-class":s.em("header","popper"),onVisibleChange:t=>((e,t)=>{b.value=e?t:void 0})(t,e.key)},{default:()=>o(i("el-button"),{text:!0,circle:!0},{default:()=>[o("ion-icon",{title:zt(ibiz.i18n.t("app.more")),name:"ellipsis-horizontal"},null)]}),dropdown:()=>o("div",{class:s.em("header","toolbar")},[r.model.groupUIActionGroup&&o(i("iBizActionToolbar"),{zIndex:r.state.zIndex,actionDetails:r.model.groupUIActionGroup.uiactionGroupDetails,actionsState:e.groupActionGroupState,onActionClick:(t,a)=>{r.onGroupToolbarClick(t,a,e)}},null),D&&o(i("el-button"),{size:"small",onClick:()=>{r.openBatch(e.key)}},{default:()=>[o("ion-icon",{name:"checkmark-sharp"},null),ibiz.i18n.t("control.kanban.natchOperation")]})])})])},k=(e,t)=>{const{context:a,params:n}=r,{itemLayoutPanel:l}=r.model;if(l)return o(i("iBizControlShell"),{data:t,params:n,context:a,class:s.e("panel-item"),modelData:l},null)},T=(e,t,a)=>{const n=r.getOptItemModel();return o("div",{class:s.e("default-item")},[o("div",{class:s.em("default-item","header")},[t.srfmajortext]),o("div",{class:s.em("default-item","content")},[t.content]),n.length?o("div",{class:s.em("default-item","footer")},[o(i("iBizActionToolbar"),{zIndex:r.state.zIndex,class:s.em("default-item","actions"),"action-details":n,"actions-state":r.state.uaState[t.srfkey],onActionClick:(n,o)=>r.onGroupActionClick(n,t,o,a,e)},null)]):null])},z=(e,t)=>{const{swimlaneAppDEFieldId:a}=r.model,n=t.children.filter((t=>t[a]===e.key));return o("div",{class:s.em("cell","toolbar")},[r.enableNew&&!r.state.readonly&&o(i("el-button"),{text:!0,class:s.em("cell","action"),onClick:a=>{r.onClickNew(a,t.key,e)}},{default:()=>[o("ion-icon",{name:"add-outline"},null),ibiz.i18n.t("app.newlyBuild")]}),I&&0===n.length&&o(i("iBizControlShell"),{class:s.e("quicktoolbar"),modelData:{...I,name:"".concat(I.name,"_").concat(t.key)},context:r.context,params:r.params},null)])},A=e=>{let t;if(!D||C.value!==e.key)return;const a=e.selectedData||[],n=a.length===e.children.length,l=a.length>0&&a.length<e.children.length;return o("div",{class:s.e("batch")},[o(i("iBizControlShell"),{modelData:{...D,name:"".concat(D.name,"_").concat(e.key)},class:s.em("batch","toolbar"),context:r.context,params:r.params},null),o("div",{class:s.em("batch","check")},[o(i("el-checkbox"),{"model-value":n,indeterminate:l,onChange:()=>((e,t)=>{const a=e.selectedData||[];t?a.forEach((e=>{r.onRowClick(e)})):e.children.filter((e=>!a.includes(e))).forEach((e=>{r.onRowClick(e)}))})(e,n)},iw(t=ibiz.i18n.t("control.kanban.selectAll"))?t:{default:()=>[t]}),o("span",{class:s.em("batch","info"),innerHTML:ibiz.i18n.t("control.kanban.selectedDataCount",{length:a.length})},null)])])},O=(e,t,a)=>{const{swimlaneAppDEFieldId:n}=r.model;return o("div",{class:[s.e("cell"),s.em("body","cell"),s.is("collapsed",!1===a.isExpand)]},[0===e&&A(a),!1!==a.isExpand?o("div",{class:s.em("cell","content")},[t.isExpand?[o(Ui,{itemKey:"srfkey",disabled:w.value,modelValue:a.children,handle:".".concat(s.e("drag-icon")),class:s.em("cell","draggable"),group:(l=a.key,c=t.key,1===r.draggableMode?l.toString():2===r.draggableMode?c||"custom":r.model.id),onChange:e=>((e,t,a)=>{e.moved&&r.onDragChange({from:t,to:t,fromIndex:e.moved.oldIndex,toIndex:e.moved.newIndex,fromLane:a,toLane:a}),e.added&&(E={to:t,toLane:a,toIndex:e.added.newIndex}),e.removed&&(E&&(Object.assign(E,{from:t,fromLane:a,fromIndex:e.removed.oldIndex}),r.onDragChange(E)),E=null)})(e,a.key,t.key)},{item:({element:e})=>{return n&&e[n]===t.key?o(i("el-card"),{shadow:"hover",class:[s.e("card"),s.is("selected",(l=e,-1!==r.state.selectedData.findIndex((e=>e.srfkey===l.srfkey)))),s.is("disabled",r.state.draggable&&r.state.updating)],onClick:()=>r.onRowClick(e),onDblclick:()=>r.onDbRowClick(e)},{default:()=>[o("div",{class:s.em("card","content")},[r.state.draggable&&!r.state.readonly&&0!==r.draggableMode&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",class:s.e("drag-icon"),preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])]),r.model.itemLayoutPanel?k(0,e):T(t,e,a)])]}):null;var l}}),z(t,a)]:o("div",{class:s.em("cell","left")},[o("span",{class:s.em("cell","description")},["".concat(a.children.filter((e=>n&&e[n]===t.key)).length," 个").concat(a.caption)])])]):null]);var l,c};return{ns:s,swimlaneKanban:g,width:y,renderHeader:()=>o("div",{class:s.e("header")},[o("div",{class:s.em("header","row")},[o("div",{class:[s.e("cell"),s.em("header","cell")]},[o("div",{class:s.em("cell","content")},[o("div",{class:s.em("cell","left")},[o("ion-icon",{onClick:x,class:s.em("cell","expand-icon"),title:v.value?ibiz.i18n.t("control.kanban.allCollapsed"):ibiz.i18n.t("control.kanban.allExpand"),name:v.value?"chevron-collapse-outline":"chevron-expand-outline"},null),o("div",{class:s.em("cell","caption")},[ibiz.i18n.t("control.kanban.lane")])]),o("div",{class:s.em("cell","right")},[r.enableGroupHidden&&o(i("iBizKanbanSetting"),{buttonStyle:{circle:!0,type:"text"},controller:e.controller},null),r.enableFullScreen&&o(i("el-button"),{type:"text",circle:!0,onClick:S,title:u.value?ibiz.i18n.t("app.cancelFullscreen"):ibiz.i18n.t("app.fullscreen")},{default:()=>[o("ion-icon",{name:u.value?"contract-outline":"expand-outline"},null)]})])])]),r.state.groups.map((e=>{if(!e.hidden)return(e=>o("div",{class:[s.e("cell"),s.em("header","cell"),s.is("collapsed",!1===e.isExpand)]},[o("div",{class:s.em("cell","content")},[o("div",{class:s.em("cell","left")},[o("div",{class:s.em("cell","caption")},[e.caption,o("span",{class:s.em("cell","separator")},[h("·")]),e.children.length]),!1===e.isExpand&&o(i("el-button"),{text:!0,circle:!0,onClick:()=>{e.isExpand=!0}},{default:()=>[o("ion-icon",{title:ibiz.i18n.t("control.kanban.expand"),name:"chevron-forward-outline"},null)]})]),P(e)])]))(e)}))])]),renderBody:()=>o("div",{class:s.e("body")},[r.state.swimlanes.map(((e,t)=>o("div",{class:[s.em("body","row"),s.is("expand",e.isExpand)]},[o("div",{class:[s.e("cell"),s.em("body","cell")]},[o("div",{class:s.em("cell","content")},[o("div",{class:s.em("cell","left")},[o("ion-icon",{class:s.em("cell","expand-icon"),name:e.isExpand?"chevron-down-outline":"chevron-forward-outline",onClick:()=>{e.isExpand=!e.isExpand}},null),o("div",{class:s.em("cell","caption")},[e.caption])]),o("div",{class:s.em("cell","right")},[o("span",{class:s.em("cell","description")},["".concat(e.count," 个").concat(r.laneDescription)])])])]),r.state.groups.map((a=>{if(!a.hidden)return O(t,e,a)}))])))])}},render(){var e;return o("div",{ref:"swimlaneKanban",class:[this.ns.b(),this.ns.e(null==(e=this.controller.model.groupStyle)?void 0:e.toLowerCase())],style:{"--ibiz-swimlane-kanban-width":"".concat(this.width,"px")}},[o("div",{class:this.ns.e("table")},[this.renderHeader(),this.renderBody()])])}});function lw(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const rw=a({name:"IBizKanbanControl",components:{draggable:Ui},props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e){var t,a,s;const r=ne(((...e)=>new $n(...e)));ue(r);const u=B("control-".concat(r.model.controlType.toLowerCase())),p=n(),v=n(!1),{onPageChange:b,onPageRefresh:g,onPageSizeChange:f}=Ws(r),w=()=>{e.data&&(r.state.items=e.data.map((e=>new ua(e))),r.afterLoad({},r.state.items))};r.evt.on("onCreated",(async()=>{e.isSimple&&(w(),r.state.isSimple=!0,r.state.isLoaded=!0)})),c((()=>e.data),(()=>{e.isSimple&&w()}),{deep:!0});const y=l((()=>r.state.batching?r.state.selectGroupKey:"")),C=null==(t=r.model.controls)?void 0:t.find((e=>e.name==="".concat(r.model.name,"_quicktoolbar")||e.name==="".concat(r.model.name,"_groupquicktoolbar"))),I=null==(a=r.model.controls)?void 0:a.find((e=>e.name==="".concat(r.model.name,"_batchtoolbar"))),D=(null==(s=r.model.groupSysCss)?void 0:s.cssName)||"",E=n({});let S=Lt;const x={};switch(r.model.groupLayout){case"ROW":x.width="".concat(r.model.groupWidth||300,"px"),x.height="100%";break;case"COLUMN":x.width="100%",x.height="".concat(r.model.groupHeight||500,"px")}const P=e=>{e.stopPropagation()},k=(e,t)=>{P(t);const a=String(e.key);E.value[a]=!E.value[a]};d((()=>{S=Bt(window,"resize",(()=>{v.value=r.getFullscreen()}))})),m((()=>{S!==Lt&&S()}));const T=(e,t)=>{const{context:a,params:n}=r;return o(i("iBizControlShell"),{data:e,class:u.e("panel-item"),modelData:t,context:a,params:n},null)},z=(e,t)=>o(i("iBizActionToolbar"),{zIndex:r.state.zIndex,class:u.bem("item","bottom","actions"),"action-details":r.getOptItemModel(),"actions-state":r.state.uaState[e.srfkey],onActionClick:(a,n)=>r.onGroupActionClick(a,e,n,t)},null),A=e=>{if(C)return o(i("iBizControlShell"),{class:u.e("quicktoolbar"),modelData:{...C,name:"".concat(C.name,"_").concat(e.key)},context:r.context,params:r.params},null)},O=e=>{if(I)return o("div",{class:u.be("batch","toolbar")},[o(i("iBizControlShell"),{modelData:{...I,name:"".concat(I.name,"_").concat(e.key)},context:r.context,params:r.params},null)])},M=e=>{let t;const a=e.selectedData||[],n=a.length===e.children.length,s=a.length>0&&a.length<e.children.length;return o("div",{class:u.be("batch","check")},[o(i("el-checkbox"),{"model-value":n,indeterminate:s,onChange:()=>((e,t)=>{const a=e.selectedData||[];t?a.forEach((e=>{r.onRowClick(e)})):e.children.filter((e=>!a.includes(e))).forEach((e=>{r.onRowClick(e)}))})(e,n)},lw(t=ibiz.i18n.t("control.kanban.selectAll"))?t:{default:()=>[t]}),o("span",{class:u.be("batch","info"),innerHTML:ibiz.i18n.t("control.kanban.selectedDataCount",{length:a.length})},null)])},N=e=>{if(y.value===e.key)return o("div",{class:u.b("batch")},[O(e),M(e)])},_=(e,t)=>{const a=r.getOptItemModel();return o("div",{class:u.e("default-item")},[o("div",{class:u.be("item","top")},[o("div",{class:u.bem("item","top","title")},[e.srfmajortext]),o("div",{class:u.bem("item","top","description")},[e.content])]),a.length?o("div",{class:u.be("item","bottom")},[z(e,t)]):null])},R=(t,a)=>{const n=r.state.selectedData.findIndex((e=>e.srfkey===t.srfkey)),s=[u.b("item"),u.is("selected",-1!==n),u.is("disabled",r.state.draggable&&r.state.updating)],l={};r.model.cardWidth&&(l.width="".concat(r.model.cardWidth,"px")),r.model.cardHeight&&(l.height="".concat(r.model.cardHeight,"px"));const c=e.modelData.itemLayoutPanel;return o(i("el-card"),{shadow:"hover",class:s,"body-style":l,onClick:e=>((e,t)=>(P(t),r.onRowClick(e)))(t,e),onDblclick:e=>((e,t)=>(P(t),r.onDbRowClick(e)))(t,e)},{default:()=>[o("div",{class:u.be("item","content")},[r.state.draggable&&!r.state.readonly&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",class:u.e("drag-icon"),preserveAspectRatio:"xMidYMid meet",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("g",{transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},null)])])]),c?T(t,c):_(t,a)])]})},L=()=>{if(!r.state.isLoaded)return;const e={};return ce(r)&&Object.assign(e,{customRender:()=>o(de,{controller:r},null)}),o(i("iBizNoData"),{text:r.model.emptyText,emptyTextLanguageRes:r.model.emptyTextLanguageRes},lw(e)?e:{default:()=>[e]})};let j=null;const V=e=>{const t=r.model.groupUIActionGroup&&e.groupActionGroupState||I;if(y.value===e.key){let e;return o("span",{class:u.be("group","header-right"),onClick:e=>P(e)},[o(i("el-button"),{text:!0,onClick:()=>r.closeBatch()},lw(e=ibiz.i18n.t("app.complete"))?e:{default:()=>[e]})])}return o("span",{class:u.be("group","header-right"),onClick:e=>P(e)},[r.enableNew&&!r.state.readonly&&o(i("el-button"),{class:u.be("group","header-new"),text:!0,circle:!0,onClick:t=>{((e,t)=>{P(e),r.onClickNew(e,t)})(t,e.key)}},{default:()=>[o("ion-icon",{name:"add-outline",title:ibiz.i18n.t("app.newlyBuild")},null)]}),t&&o(i("el-dropdown"),{class:u.be("group","header-actions"),trigger:"click",teleported:!1,"popper-class":u.e("popover")},{default:()=>o("span",{title:ibiz.i18n.t("app.more")},[h("···")]),dropdown:()=>o("div",{class:u.be("group","actions-dropdown")},[r.model.groupUIActionGroup&&e.groupActionGroupState&&o(i("iBizActionToolbar"),{actionDetails:r.model.groupUIActionGroup.uiactionGroupDetails,actionsState:e.groupActionGroupState,onActionClick:(t,a)=>{r.onGroupToolbarClick(t,a,e)}},null),I&&o(i("el-button"),{size:"small",onClick:()=>{r.openBatch(e.key)}},{default:()=>[o("ion-icon",{name:"checkmark-sharp"},null),ibiz.i18n.t("control.kanban.natchOperation")]})])})])};return{c:r,ns:u,isFull:v,kanban:p,renderGroup:e=>{const t=E.value[String(e.key)],a="COLUMN"===r.model.groupLayout,n={...x};return t&&(n.height="50px"),!t||a?o("div",{class:[u.b("group"),u.is("collapse",t),D],style:n},[o("div",{class:u.be("group","header"),style:{borderTopColor:e.color||"transparent"},onClick:t=>k(e,t)},[o("div",{class:u.be("group","header-left")},[o("ion-icon",{name:"caret-down-sharp"},null),o("span",{class:[u.be("group","header-caption"),u.is("badge",!!e.color)],style:{backgroundColor:e.color}},["".concat(e.caption).concat(e.children.length?" · ".concat(e.children.length):"")])]),V(e)]),N(e),o("div",{class:[u.be("group","list"),u.is("empty",!e.children.length)]},[o(Ui,{itemKey:"srfkey",group:r.model.id,modelValue:e.children,class:u.be("group","draggable"),handle:".".concat(u.e("drag-icon")),disabled:!r.state.draggable||r.state.updating||r.state.readonly,onChange:t=>((e,t)=>{e.moved&&r.onDragChange({from:t,to:t,fromIndex:e.moved.oldIndex,toIndex:e.moved.newIndex}),e.added&&(j={to:t,toIndex:e.added.newIndex}),e.removed&&(j&&(j.from=t,j.fromIndex=e.removed.oldIndex,r.onDragChange(j)),j=null)})(t,e.key)},{item:({element:t})=>R(t,e),header:()=>e.children.length?null:o("div",{class:u.be("group","list")},[L()])}),A(e)])]):o("div",{class:[u.b("group"),u.is("collapse",t),D]},[o("div",{class:u.be("group","header"),style:{borderTopColor:e.color||"transparent"},onClick:t=>k(e,t)},[o("span",{class:[u.be("group","header-caption"),u.is("badge",!!e.color)],style:{backgroundColor:e.color}},["".concat(e.caption).concat(e.children.length?" · ".concat(e.children.length):"")]),o("ion-icon",{name:"caret-forward-sharp"},null)])])},onFullScreen:()=>{const e=p.value.$el;v.value=r.onFullScreen(e)},onPageChange:b,onPageRefresh:g,onPageSizeChange:f}},render(){var e;const{groups:t,isCreated:a}=this.c.state,{swimlaneAppDEFieldId:n}=this.c.model;return a?o(i("iBizControlBase"),{ref:"kanban",controller:this.c,class:[this.ns.m(null==(e=this.modelData.groupLayout)?void 0:e.toLowerCase()),this.ns.is("full",this.isFull),this.ns.is("swimlane",!!n),this.ns.is("enable-page",this.c.state.enablePagingBar)]},{default:()=>[o("div",{class:this.ns.e("content")},[n?o(sw,{controller:this.c},null):[o("div",{class:this.ns.b("group-container")},[t.length>0&&t.map((e=>e.hidden?null:this.renderGroup(e)))]),t.length>0&&o("div",{class:this.ns.b("toolbar")},[this.c.enableGroupHidden&&o(i("iBizKanbanSetting"),{controller:this.c},null),this.c.enableFullScreen&&o(i("el-button"),{type:"info",onClick:this.onFullScreen,title:this.isFull?ibiz.i18n.t("app.cancelFullscreen"):ibiz.i18n.t("app.fullscreen")},{default:()=>[o("ion-icon",{name:this.isFull?"contract-outline":"expand-outline"},null)]})])]]),this.c.state.enablePagingBar&&o(i("iBizPagination"),{size:this.c.state.size,total:this.c.state.total,curPage:this.c.state.curPage,totalPages:this.c.state.totalPages,onChange:this.onPageChange,onPageRefresh:this.onPageRefresh,onPageSizeChange:this.onPageSizeChange},null)]}):null}});var cw=Object.defineProperty,dw=(e,t,a)=>(((e,t,a)=>{t in e?cw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uw{constructor(){dw(this,"component","IBizKanbanControl")}}const pw=e("ax",oe(rw,(function(e){e.component(rw.name,rw),Ba(_a.KANBAN,(()=>new uw))})));function hw(e,t){let a;const s=n(!1),l=n(!1),r=n(),c=u({}),d=async t=>{var n;const o=(t=>{if(!e.value)throw new _t(ibiz.i18n.t("control.common.citeErrMessage"));const a=e.value.$el;let n=".el-table__row";t.data._uuid&&(n+='[class*="id-'.concat(t.data._uuid,'"]'));const o=a.querySelector(n);if(!o)throw new _t(ibiz.i18n.t("control.common.noDomErrMessage"));return o})(t);if(l.value=(null==(n=o.parentNode)?void 0:n.lastElementChild)===o,!a)throw new _t(ibiz.i18n.t("control.common.noPopErrMessage"));const i=a.$el,{x:d,y:u}=await Li(o,i,{placement:"bottom"});Object.assign(c,{top:"".concat(u,"px"),left:"".concat(d,"px")}),r.value=t,setTimeout((()=>{s.value=!0}),200)},p=async()=>{r.value&&t.switchRowEdit(r.value,!1,!0)},h=async()=>{r.value&&t.switchRowEdit(r.value,!1,!1)};return t.evt.on("onRowEditChange",(e=>{e.row.showRowEdit?setTimeout((()=>{d(e.row)}),0):(r.value=void 0,s.value=!1,Object.assign(c,{top:void 0,left:void 0}))})),{renderPopover:()=>[o("div",{class:"row-edit-popover__placeholder",style:{display:l.value?"block":"none"}},null),o(i("iBizRowEditPopover"),{ref:e=>{a=e},style:c,show:s.value,onConfirm:p,onCancel:h},null)]}}const mw=a({name:"IBizTreeGridExControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=ne(((...e)=>new Jn(...e)));ue(e);const t=B("control-".concat(e.model.controlType.toLowerCase())),a=l((()=>{const t=[];return e.state.columnStates.forEach((a=>{var n,o;if(a.hidden)return;const i=(null==(n=e.fieldColumns[a.key])?void 0:n.model)||(null==(o=e.uaColumns[a.key])?void 0:o.model);i&&t.push(i)})),t})),r=(e,t=!1)=>e.map((e=>{const a={id:e._id,_uuid:e._uuid,hasChildren:!e._leaf};return t||e._leaf||void 0===e._children||(a.children=r(e._children)),a})),c=n(ei()),d=l((()=>e.state.isLoaded?e.model.rootVisible?e.state.rootNodes:e.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[])),u=l((()=>(c.value=ei(),0===d.value.length?[]:r(d.value,!0))));e.evt.on("onAfterRefreshParent",(()=>{c.value=ei()}));const p=n(),{renderPopover:h}=hw(p,e);x((()=>{if(p.value){const t=p.value.store.states.treeData.value,a=e.state.expandedKeys;Object.keys(t).forEach((n=>{if(a.includes(n)!==t[n].expanded){const t=r([e.getNodeData(n)])[0];p.value.store.loadOrToggle(t)}}))}}));return{c:e,ns:t,tableRef:p,elTableData:u,renderColumns:a,tableRefreshKey:c,renderNoData:()=>{const{isLoaded:t}=e.state,a={};return ce(e)&&Object.assign(a,{customRender:()=>o(de,{controller:e},null)}),t&&o(i("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n},loadData:async(t,a,n)=>{let o;const i=e.getNodeData(t.id);o=i._children?i._children:await e.loadNodes(i),n(r(o))},onRowClick:async(t,a,n)=>{const o=e.getNodeData(t.id);if("row"===e.editShowMode&&e.model.enableEdit){const a=e.state.rows[o._uuid];if(!a||!0===a.showRowEdit)throw new _t(ibiz.i18n.t("control.treeGridEx.noFoundMessage",{id:t.id}));await e.switchRowEdit(a,!0)}else e.onTreeNodeClick(o,n)},onExpandChange:(t,a)=>{const n=e.getNodeData(t._uuid);if(!n)throw new _t(ibiz.i18n.t("control.common.noFoundNode",{id:t._uuid}));e.onExpandChange(n,a)},renderPopover:h,handleRowClassName:function({row:t}){const a=e.getNodeData(t.id);if(!a)return"";let n="";e.state.selectedData.length>0&&e.state.selectedData.forEach((e=>{e===a&&(n="current-row")}));const o=e.getRowState(a._uuid);return(null==o?void 0:o.showRowEdit)&&(n+=" editing-row"),n+=" id-".concat(a._uuid),n}}},render(){const e=(e,t)=>{var a,n;if(this.$slots[e.id])return P(this.$slots,e.id,{model:e,data:this.c.state.items});const{codeName:s,width:l}=e,c=this.c.columns[s],d=this.c.state.columnStates.find((e=>e.key===s)),u=c.isAdaptiveColumn||!this.c.hasAdaptiveColumn&&t===this.renderColumns.length-1?"min-width":"width";return o(i("el-table-column"),w({label:e.caption,prop:s},{[u]:l},{fixed:d.fixed,sortable:!!e.enableSort&&"custom","label-class-name":null==(a=c.model.headerSysCss)?void 0:a.cssName,align:(null==(n=e.align)?void 0:n.toLowerCase())||"center"}),{header:({column:e})=>o(i("iBizGridColumnHeader"),{key:e.property,controller:c},null),default:({row:e})=>{const t=this.c.getRowState(e.id);if(t){const e=i(this.c.providers[s].component);return r(e,{controller:c,row:t,key:t.data._uuid+s})}return null}})};return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[this.c.state.isLoaded&&o(i("el-table"),{ref:"tableRef",key:this.tableRefreshKey,class:this.ns.e("table"),border:!0,"row-key":"id",data:this.elTableData,"tree-props":{children:"children",hasChildren:"hasChildren"},lazy:!0,onRowClick:this.onRowClick,onExpandChange:this.onExpandChange,"row-class-name":this.handleRowClassName,load:this.loadData},{empty:this.renderNoData,default:()=>[this.renderColumns.map(((t,a)=>e(t,a)))],append:()=>this.renderPopover()})]})]})}});var vw=Object.defineProperty,bw=(e,t,a)=>(((e,t,a)=>{t in e?vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gw{constructor(){bw(this,"component","IBizTreeGridExControl")}}const fw=a({name:"IBizTreeGridExFieldColumn",props:{controller:{type:Qn,required:!0},row:{type:Zn,required:!0}},setup(e){const t=B("tree-grid-ex-field-column"),a=e.controller.treeGrid.state.zIndex,o=l((()=>"DE"!==e.row.data._nodeType&&e.controller.isFirstShowColumn?e.row.data._text:e.row.data[e.controller.name])),i=l((()=>e.controller.nodeColumnControllerMap.get(e.row.data._nodeId))),s=n(""),r=l((()=>{var t,a;const n=i.value;if(n){if(n.nodeEditItem)return;if(n.codeList)return s.value;let i=n.formatValue(o.value);return e.controller.treeGrid.emptyHiddenUnit?i&&(i+=n.unitName||(null==(t=n.nodeColumn)?void 0:t.unitName)||""):i+=n.unitName||(null==(a=n.nodeColumn)?void 0:a.unitName)||"",i}return o.value})),c=l((()=>{if("ellipsis"===e.controller.treeGrid.overflowMode&&hi(o.value)&&""!==o.value)return r.value})),d=l((()=>o.value&&i.value&&(i.value.isLinkColumn||i.value.hasClickAction)));return{ns:t,zIndex:a,tooltip:c,showText:r,clickable:d,nodeColumn:i,fieldValue:o,onTextClick:t=>{var a;null==(a=i.value)||a.onTextClick(e.row,t)},onActionClick:async(t,a)=>{var n;await(null==(n=i.value)?void 0:n.onActionClick(t,e.row,a))},onInfoTextChange:e=>{s.value=e}}},render(){var e,t,a,n;let s,l=null;return l=(null==(e=this.nodeColumn)?void 0:e.nodeEditItem)?o(i("iBizTreeGridExEditColumn"),{controller:this.nodeColumn,row:this.row},null):(null==(t=this.nodeColumn)?void 0:t.codeList)?o(i("iBizCodeList"),{class:this.ns.e("text"),codeListItems:this.nodeColumn.codeListItems,codeList:this.nodeColumn.codeList,value:this.fieldValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:zt(this.tooltip)},null):o("span",{class:this.ns.e("text"),title:zt(this.tooltip),onClick:this.onTextClick},[this.showText]),this.$slots.actions?s=this.$slots.actions():this.row.columnActionsStates[this.controller.name]&&(s=o(i("iBizActionToolbar"),{zIndex:this.zIndex,class:this.ns.e("toolbar"),"action-details":null==(a=this.nodeColumn)?void 0:a.nodeColumn.deuiactionGroup.uiactionGroupDetails,"actions-state":this.row.columnActionsStates[this.controller.name],groupLevelKeys:[50,100],onActionClick:this.onActionClick},null)),o("div",{class:[this.ns.b(),this.clickable&&this.ns.m("clickable"),this.ns.m(this.controller.treeGrid.overflowMode),null==(n=this.controller.model.cellSysCss)?void 0:n.cssName,this.ns.is("has-action",!!s)]},[o("div",{class:this.ns.b("text-container")},[l]),o("div",{class:this.ns.b("toolbar-container")},[s])])}});var ww=Object.defineProperty,yw=(e,t,a)=>(((e,t,a)=>{t in e?ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cw{constructor(){yw(this,"component","IBizTreeGridExFieldColumn")}async createController(e,t){const a=new Qn(e,t);return await a.init(),a}}const Iw=oe(fw,(function(e){e.component(fw.name,fw),eo("DEFGRIDCOLUMN",(()=>new Cw))}));const Dw=a({name:"IBizTreeGridExEditColumn",props:{controller:{type:to,required:!0},row:{type:Zn,required:!0}},setup(e){const t=l((()=>e.row.data[e.controller.name])),a=B("tree-grid-ex-edit-column"),o=n(),i=e.controller,{gridEditItemProps:s,editorProps:r}=(()=>{switch(i.treeGrid.editShowMode){case"cell":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.name].disabled)),o=l((()=>e.row.editColStates[a.name].readonly)),i=l((()=>!!e.row.errors[a.name])),s=l((()=>e.row.editColStates[a.name].editable)),r=t=>{e.row.editColStates[a.name].editable=t},c=l((()=>!n.value&&!o.value&&!i.value)),d=l((()=>i.value||c.value&&s.value)),p=l((()=>!d.value)),h=l((()=>!i.value)),m=l((()=>c.value&&!s.value)),v=l((()=>c.value));let b;return{gridEditItemProps:u({showEditMask:m,stopPropagation:v,onMaskClick:()=>{r(!0),b=le(t,(async e=>{r(!1),b.stop()}))}}),editorProps:u({autoFocus:h,disabled:!1,readonly:p,onBlur:()=>{ibiz.log.debug("".concat(a.name,"属性编辑器blur事件")),r(!1),"cell-blur"===a.treeGrid.editSaveMode&&a.treeGrid.save(e.row.data)},onFocus:()=>{b&&b.stop(),ibiz.log.debug("".concat(a.name,"属性编辑器focus事件"))}})}}(e,o);case"row":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.name].disabled)),o=l((()=>e.row.editColStates[a.name].readonly)),i=l((()=>e.row.editColStates[a.name].editable)),s=l((()=>o.value||!i.value)),r=l((()=>i.value&&n.value)),c=l((()=>i.value));return{gridEditItemProps:u({stopPropagation:c}),editorProps:u({disabled:r,readonly:s})}}(e);case"all":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.name].disabled)),o=l((()=>e.row.editColStates[a.name].readonly)),i=l((()=>e.controller.treeGrid.state.rowEditOpen)),s=l((()=>o.value||!i.value)),r=l((()=>i.value&&n.value)),c=l((()=>i.value));return{gridEditItemProps:u({stopPropagation:c}),editorProps:u({disabled:r,readonly:s,onBlur:()=>{"cell-blur"===a.treeGrid.editSaveMode&&a.treeGrid.save(e.row.data)}})}}(e);default:throw new _t(ibiz.i18n.t("control.common.noSupportItem",{name:i.treeGrid.editShowMode}))}})(),c=n(void 0),d=l((()=>{if(r.readonly)return ui(c.value)?i.formatValue(t.value):c.value}));return{ns:a,fieldValue:t,componentRef:o,tooltip:d,rowDataChange:async(t,a,n=!1)=>{ibiz.log.debug("".concat(i.name,"值变更"),t),await i.setRowValue(e.row,t,a,n)},onInfoTextChange:e=>{c.value=e},gridEditItemProps:s,editorProps:r}},render(){return o(i("iBizGridEditItem"),{ref:"componentRef",required:!this.controller.nodeEditItem.allowEmpty,overflowMode:this.controller.treeGrid.overflowMode,class:[this.ns,this.ns.m(this.controller.treeGrid.overflowMode)],...this.gridEditItemProps},{default:()=>[this.controller.editorProvider&&r(i(this.controller.editorProvider.gridEditor),{class:this.ns.e("editor"),value:this.fieldValue,data:this.row.data,controller:this.controller.editor,overflowMode:this.controller.treeGrid.overflowMode,onChange:this.rowDataChange,onInfoTextChange:this.onInfoTextChange,title:this.tooltip,...this.editorProps})]})}}),Ew=a({name:"IBizTreeGridExUAColumn",props:{controller:{type:ao,required:!0},row:{type:Zn,required:!0}},setup:e=>({ns:B("tree-grid-ex-ua-column"),onStopPropagation:e=>{e.stopPropagation()},onActionClick:async(t,a)=>{await e.controller.onActionClick(t,e.row,a)}}),render(){var e,t;const a=this.controller.getUIActionGroup(this.row);return o("div",{class:[this.ns.b(),null==(e=this.controller.model.cellSysCss)?void 0:e.cssName],onDblclick:this.onStopPropagation,onClick:this.onStopPropagation},[(null==(t=null==a?void 0:a.uiactionGroupDetails)?void 0:t.length)&&o(i("iBizActionToolbar"),{"action-details":a.uiactionGroupDetails,"actions-state":this.row.columnActionsStates[this.controller.model.codeName],onActionClick:this.onActionClick},null)])}});var Sw=Object.defineProperty,xw=(e,t,a)=>(((e,t,a)=>{t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Pw{constructor(){xw(this,"component","IBizTreeGridExUAColumn")}async createController(e,t){const a=new ao(e,t);return await a.init(),a}}const kw=oe(Ew,(function(e){e.component(Ew.name,Ew),eo("UAGRIDCOLUMN",(()=>new Pw))})),Tw=e("ay",oe(mw,(function(e){e.component(mw.name,mw),e.component(Dw.name,Dw),Ba(_a.TREE_GRIDEX,(()=>new gw)),e.use(Iw),e.use(kw)})));const zw=a({name:"IBizTreeGridControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},rowEditOpen:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(e,{slots:t}){const a=ne(((...e)=>new no(...e)));ue(a);const n=B("control-grid"),l=B("control-".concat(a.model.controlType.toLowerCase())),{tableRef:r,onRowClick:d,onDbRowClick:u,onSortChange:p,onSelectionChange:m,handleRowClassName:v,handleHeaderCellClassName:g}=Hd(a),{onPageChange:f,onPageRefresh:w,onPageSizeChange:y}=qd(a),{tableData:C,defaultSort:I,renderColumns:D,summaryMethod:E,headerDragend:S}=Gd(a,e,r),{renderPopover:x}=Yd(r,a),{headerCssVars:k}=Wd(r,n),T=e=>{r.value&&a.state.expandRowKeys.length&&(a.state.expandRowKeys.forEach((t=>{const a=e.find((e=>e.srfkey===t));a&&b((()=>{r.value.store.loadOrToggle(a)}))})),(()=>{const{expandRowKeys:e,selectedData:t,singleSelect:n}=a.state,o=r.value;if(!o||!t.length)return;const i=o.store.states.treeData.value,s=Object.keys(i).filter((e=>i[e].loaded));if(e.length===s.length&&e.sort().every(((e,t)=>e===s.sort()[t]))){const e=[],a=t.map((e=>e.srfkey));Vt({children:o.store.states.data.value},(t=>{a.includes(t.srfkey)&&e.push(t)})),b((()=>{n?o.setCurrentRow(e[0]):o.store.states.selection.value=e}))}})())};c((()=>r.value),(()=>{T(a.state.treeGirdData)}));return{c:a,ns:n,ns2:l,tableRef:r,tableData:C,defaultSort:I,renderColumns:D,headerCssVars:k,loadData:async(e,t,n)=>{const o=a.state.items.map((e=>a.getTreeGridDataItem(e))).filter((t=>e[a.treeGridValueField]===t[a.treeGridParentField]));e.children=o,n(o),T(o)},onRowClick:d,renderColumn:(e,n)=>t[e.id]?P(t,e.id,{model:e,data:a.state.items}):Qd(a,e,D.value,n),onDbRowClick:u,onSortChange:p,onPageChange:f,renderNoData:()=>{var e;const{isLoaded:t}=a.state;if(t){const t=null==(e=a.model.controls)?void 0:e.find((e=>e.name==="".concat(a.model.name,"_quicktoolbar")));if(t)return o(i("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:n.b("quick-toolbar")},null);const r={};return ce(a)&&Object.assign(r,{customRender:()=>o(de,{controller:a},null)}),o(i("iBizNoData"),{text:a.model.emptyText,emptyTextLanguageRes:a.model.emptyTextLanguageRes},"function"==typeof(l=r)||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?r:{default:()=>[r]})}var l;return null},onPageRefresh:w,summaryMethod:E,headerDragend:S,renderPopover:x,onPageSizeChange:y,onSelectionChange:m,handleRowClassName:v,renderBatchToolBar:()=>{var e;const t=null==(e=a.model.controls)?void 0:e.find((e=>e.name==="".concat(a.model.name,"_batchtoolbar")));if(t&&!a.state.singleSelect)return o("div",{class:[n.b("batch-toolbar"),n.is("show",a.state.selectedData.length>0)]},[o("div",{class:n.b("batch-toolbar-content")},[o("div",{class:n.b("batch-toolbar-text")},[ibiz.i18n.t("control.common.itemsSelected",{length:a.state.selectedData.length})]),o("div",{class:n.b("batch-toolbar-separator")},[h("|")]),o(i("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:n.b("batch-toolbar-items")},null)])])},handleHeaderCellClassName:g}},render(){const e=this.c.state,{hideHeader:t,enablePagingBar:a}=this.c.model;return o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{class:[this.ns.b(),this.ns2.b(),this.ns.is("show-header",!t),this.ns.is("enable-page",a),this.ns.is("enable-group",this.c.model.enableGroup),this.ns.is("enable-customized",this.c.model.enableCustomized)],controller:this.c,style:this.headerCssVars},{default:()=>{var n;return[this.c.state.isLoaded&&o(i("el-table"),w({lazy:!0,border:!0,ref:"tableRef","row-key":"srfkey",load:this.loadData,"tooltip-effect":"light","show-header":!t,class:this.ns.e("table"),key:this.c.state.tableKey,onRowClick:this.onRowClick,"default-sort":this.defaultSort,"show-summary":this.c.enableAgg,onSortChange:this.onSortChange,onRowDblclick:this.onDbRowClick,"summary-method":this.summaryMethod,onHeaderDragend:this.headerDragend,"row-class-name":this.handleRowClassName,onSelectionChange:this.onSelectionChange,"highlight-current-row":e.singleSelect,onExpandChange:(e,t)=>this.c.expandChange(e,t),"header-cell-class-name":this.handleHeaderCellClassName,"tree-props":{children:"children",hasChildren:"hasChildren"},data:this.c.state.showTreeGrid?e.treeGirdData:this.tableData},this.$attrs),{empty:this.renderNoData,default:()=>[!e.singleSelect&&o(i("el-table-column"),{width:"55",type:"selection","reserve-selection":!0,"class-name":this.ns.e("selection")},null),e.isCreated&&this.renderColumns.map(((e,t)=>this.renderColumn(e,t)))],append:()=>this.renderPopover()}),a&&o(i("iBizPagination"),{total:e.total,curPage:e.curPage,size:e.size,totalPages:e.totalPages,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh,popperClass:"".concat((null==(n=this.c.model.sysCss)?void 0:n.cssName)||"default","--popper")},null),this.c.model.enableCustomized&&!t&&o("div",{class:this.ns.b("setting-box")},[o(i("iBizGridSetting"),{columnStates:e.columnStates,controller:this.c},null)]),this.renderBatchToolBar()]}})]})}});var Aw=Object.defineProperty,Ow=(e,t,a)=>(((e,t,a)=>{t in e?Aw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Mw{constructor(){Ow(this,"component","IBizTreeGridControl")}}const Nw=e("az",oe(zw,(function(e){e.component(zw.name,zw),Ba(_a.TREEGRID,(()=>new Mw))}))),Bw=a({name:"IBizMEditViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const e=ne(((...e)=>new oo(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(null),o=n(0);let i=null;return d((()=>{a.value&&(i=new MutationObserver((()=>{const t=a.value.scrollHeight;t!==o.value&&e.state.isNeedScroll&&(o.value=t,a.value.scrollTop=t)})),i.observe(a.value,{childList:!0,attributes:!0,characterData:!0,subtree:!0}))})),p((()=>{i&&i.disconnect()})),{c:e,ns:t,panelContent:a,handleDelete:t=>{e.handleDelete(t)},onTabChange:t=>{e.state.activeTab=t,e.onTabChange(t)},handleTabDelete:(t,a)=>{a.stopPropagation(),e.handleDelete(t)}}},render(){const e=i("IBizViewShell"),t=()=>o(i("el-tabs"),{class:this.ns.b("tabs"),addable:!0,modelValue:this.c.state.activeTab,"onUpdate:modelValue":e=>this.c.state.activeTab=e,onTabChange:this.onTabChange,onTabAdd:()=>this.c.handleAdd()},{addIcon:()=>o(i("el-button"),null,{default:()=>[o("ion-icon",{name:"add"},null),ibiz.i18n.t("app.add")]}),default:()=>this.c.state.panelUiItems.map((t=>o(i("el-tab-pane"),{key:t.id+t.srfmajortext,name:t.id},{label:()=>o("div",{class:this.ns.b("tab-label")},[o("span",null,[t.srfmajortext]),o("ion-icon",{name:"close-outline",onClick:e=>this.handleTabDelete(t,e)},null)]),default:()=>this.c.state.activeTab===t.id&&r(e,{context:t.context,params:t.params,viewId:this.c.model.embeddedAppViewId,onDataChange:e=>this.c.onViewDataChange(e,t.id),onCreated:e=>this.c.onViewCreated(e,t.id)})})))}),a=()=>this.c.state.panelUiItems.map((t=>o("div",{class:this.ns.b("item"),key:t.id},[[r(e,{context:t.context,params:t.params,viewId:this.c.model.embeddedAppViewId,onDataChange:e=>this.c.onViewDataChange(e,t.id),onCreated:e=>this.c.onViewCreated(e,t.id)}),o("div",{class:this.ns.b("close")},[o("ion-icon",{name:"close-outline",onClick:()=>this.handleDelete(t)},null)])]]))),n=()=>{if(this.c.model.embeddedAppViewId)return Object.is(this.c.model.panelStyle,"TAB_TOP")?t():a()};return o(i("iBizControlBase"),{controller:this.c},{default:()=>[o("div",{class:this.ns.b("content"),ref:"panelContent"},[this.c.state.panelUiItems.length>0?n():null])]})}});var _w=Object.defineProperty,Rw=(e,t,a)=>(((e,t,a)=>{t in e?_w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Lw{constructor(){Rw(this,"component","IBizMEditViewPanelControl")}}const jw=e("aA",oe(Bw,(function(e){e.component(Bw.name,Bw),Ba(_a.MULTI_EDIT_VIEWPANEL,(()=>new Lw))}))),Vw=a({name:"IBizMapControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},isSimple:{type:Boolean,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const e=ne(((...e)=>new io(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(),o=e.model.mapStyle,i=l((()=>({strAreaCode:e.state.strAreaCode,defaultAreaCode:e.state.defaultAreaCode,jsonBaseUrl:e.state.jsonBaseUrl})));return{c:e,ns:t,mapRef:a,mapOpts:i,mapStyle:o}},render(){const{state:e}=this.c;if(!e.isCreated)return;let t;return e.isLoaded&&(t="USER"===this.mapStyle?o(i("iBizMapChartUser"),{areaData:e.areaData,pointData:e.pointData,options:this.mapOpts,class:this.ns.e("map"),controller:this.c},null):o(i("iBizMapChart"),{controller:this.c,areaData:e.areaData,pointData:e.pointData,options:this.mapOpts,class:this.ns.e("map"),onPointClick:e=>{this.c.onPointClick(e)},onAreaClick:e=>{this.c.onAreaClick(e,"","")}},null)),o(i("iBizControlNavigation"),{controller:this.c},{default:()=>[o(i("iBizControlBase"),{controller:this.c},{default:()=>[t,this.c.state.enableNavView&&this.c.state.showNavIcon?this.c.state.showNavView?o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.hiddenNav"),name:"eye-off-outline",onClick:()=>this.c.onShowNavViewChange()},null):o("ion-icon",{class:this.ns.e("nav-icon"),title:ibiz.i18n.t("component.controlNavigation.showNav"),name:"eye-outline",onClick:()=>this.c.onShowNavViewChange()},null):null]})]})}});var Fw=Object.defineProperty,Uw=(e,t,a)=>(((e,t,a)=>{t in e?Fw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Hw{constructor(){Uw(this,"component","IBizMapControl")}}const qw=e("aB",{install(e){e.component(Vw.name,Vw),Ba(_a.MAP,(()=>new Hw))}});const Gw=a({name:"IBizReportPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},noLoadDefault:{type:Boolean,default:!1}},setup(){const e=ne(((...e)=>new so(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return{c:e,ns:t,renderContent:()=>{const{reportType:t}=e.state;switch(t){case"USER":return o(i("iBizUserReportPanel"),{controller:e},null);case"USER2":return o(i("iBizUser2ReportPanel"),{controller:e},null);case"DESYSBIREPORTS":case"SYSBICUBE":case"DESYSBICUBES":case"ALLSYSBICUBES":case"SYSBIREPORT":case"SYSBICUBEREPORTS":case"ALLSYSBIREPORTS":return o(i("iBizBIReportPanel"),{controller:e},null);default:return o("div",null,[ibiz.i18n.t("control.reportPanel.unrealized")])}}}},render(){let e;var t;if(this.c.state.isCreated)return o(i("iBizControlBase"),{controller:this.c},"function"==typeof(t=e=this.renderContent())||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]})}});var Ww=Object.defineProperty,Kw=(e,t,a)=>(((e,t,a)=>{t in e?Ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Yw{constructor(){Kw(this,"component","IBizReportPanelControl")}}const Xw=a({name:"IBizUserReportPanel",props:{controller:{type:Object}},setup(e){const t=e.controller;return{c:t,ns:B("user-report-panel"),generator:t&&t.generator}},render(){if(!this.c)return;const e=this.c.state;return o("div",{class:this.ns.e("container")},[o(i("iBizRelationshipDesign"),{data:e.data,context:this.c.context,params:this.c.params,config:this.generator&&this.generator.config.CONFIG,pluginConfig:this.generator&&this.generator.config.PLUGINCONFIG,nodeLegendConfig:this.generator&&this.generator.config.NODELEGENDCONFIG,edgeLegendConfig:this.generator&&this.generator.config.EDGELEGENDCONFIG,hooks:this.generator&&this.generator.config.HOOKS,showLoading:!0,onInit:e=>{this.generator&&this.generator.init(e)}},null)])}}),$w=oe(Xw,(function(e){e.component(Xw.name,Xw)})),Jw=a({name:"IBizUser2ReportPanel",props:{controller:{type:Object}},setup(e){const t=e.controller,a=B("user2-report-panel"),n=t&&t.generator;return{c:t,ns:a,generator:n,handleClick:async e=>{let a=e.target.getAttribute("click"),n=e.target.getAttribute("params");if(!a||!t||!n)return;a=a.replaceAll("`",""),n=n.replaceAll("`",'"');const o=/\(([^)]+)\)/.exec(a);o&&o[1]&&va.exec(o[1],{context:t.context,params:t.params,data:[JSON.parse(n)],view:t.view},t.context.srfappid)}}},render(){if(!this.c)return;const e=this.c.state;return e.isLoaded?o("div",{class:this.ns.e("container"),innerHTML:e.data,onClick:e=>{this.handleClick(e)}},null):o("div",{class:this.ns.e("empty")},[ibiz.i18n.t("control.common.currentNoData")])}}),Qw=oe(Jw,(function(e){e.component(Jw.name,Jw)})),Zw=a({name:"IBizBIReportPanel",props:{controller:{type:Object}},setup(e){const t=e.controller;return{c:t,ns:B("bi-report-panel"),generator:t&&t.generator}},render(){if(this.c)return o("div",{class:this.ns.e("container")},[o(i("iBizBIReportContent"),{mode:"CONTENT",context:this.c.context,viewParams:this.c.params,config:this.generator&&this.generator.config,onInit:e=>{this.generator&&this.generator.init(e)},onReportChartChange:e=>{this.generator&&this.generator.init(e)}},null)])}}),ey=oe(Zw,(function(e){e.component(Zw.name,Zw)})),ty=e("aC",oe(Gw,(function(e){e.use($w),e.use(Qw),e.use(ey),e.component(Gw.name,Gw),Ba(_a.REPORT_PANEL,(()=>new Yw))})));const ay=a({name:"IBizGanttControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},loadDefault:{type:Boolean,default:!0},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0}},setup(e){var a;const u=ne(((...e)=>new lo(...e))),p=n(),h=n(!1),m=B("control-".concat(u.model.controlType.toLowerCase()));let v=null,g=null;const f=n(!1),w=i("IBizRawItem"),y=i("IBizIcon");let I=!1,D=!1;const E=[],S=null==(a=C())?void 0:a.appContext.app;d((()=>{t.import("@ibiz-template-plugin/gantt").then((e=>{const t=e.default;null==S||S.use(t),h.value=!0})),u.evt.on("onToggleRowExpansion",(e=>{const{row:t,expand:a}=e;p.value&&(a?p.value.setExpand(t):p.value.setCollapse(t))}))}));const x=e=>{const t=document.documentElement;return getComputedStyle(t).getPropertyValue(e)},{UIStore:P}=G(),k=n({});c((()=>P.theme),(()=>{var e,t;k.value={primaryColor:(null==(e=u.state.ganttStyle)?void 0:e.primaryColor)||x("--ibiz-color-primary"),textColor:(null==(t=u.state.ganttStyle)?void 0:t.textColor)||x("--ibiz-color-text-3"),headerBgColor:"rgba(".concat(x("--ibiz-grey-1"),", 1)"),bgColor:x("--ibiz-color-bg-1"),weekendColor:x("--ibiz-color-fill-2"),todayColor:x("--ibiz-color-primary-light-active"),borderColor:x("--ibiz-color-tertiary-light-active")}}),{immediate:!0});const T=l((()=>!!u.state.isLoaded&&u.state.isLoading)),z=l((()=>u.state.isLoaded?u.model.rootVisible?u.state.rootNodes:u.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[])),A=l((()=>{const e=[];return u.state.columnStates.forEach((t=>{var a;const n=null==(a=u.columns[t.key])?void 0:a.model;!t.hidden&&n&&e.push(n)})),e})),O=l((()=>ibiz.i18n.getLang().toLowerCase()));c([()=>p.value,()=>u.state.selectedData],(([e,t])=>{!D&&e&&b((()=>{var e,a;u.state.singleSelect?t[0]?null==(e=p.value)||e.setSelected(t[0]):null==(a=p.value)||a.setSelected():(E.length=0,E.push(...t),t.forEach((e=>{var t;return null==(t=p.value)?void 0:t.setChecked(e,!0)})))}))}));let M=!1;const N=[],_=(e,t)=>{e.forEach((e=>e.parentElement!==t&&(null==t?void 0:t.append(e))))},R=()=>{var e;const t=null==(e=p.value)?void 0:e.getElementRefs().rootRef.value,a=Object.values((()=>{var e;const t={},a=null==(e=document.querySelector(".el-popover"))?void 0:e.parentElement;return a&&Object.assign(t,{elPopover:a}),t})()).filter((e=>e&&e.parentElement===document.body));N.push(...a),_(a,t)},L=(e,t)=>{I||f.value?f.value=!1:(D=!0,u.onTreeNodeClick(e,t),I=!0,setTimeout((()=>{I=!1,D=!1}),200))},j=e=>{u.onDbTreeNodeClick(e)};u.evt.on("onNewRow",(e=>{var t;const a=e.row.data;null==(t=p.value)||t.setExpand(a)}));const V=(e,t,a,n)=>{const i=[];return e.forEach((e=>{var s;if("SEPERATOR"===e.itemType)return void i.push({divided:"self"});const l=n[e.id];if(l&&!l.visible)return;const r={};if(e.showCaption&&e.caption&&(r.label=e.caption),e.sysImage&&e.showIcon&&(r.icon=o(y,{icon:e.sysImage},null)),"DEUIACTION"===e.itemType){r.disabled=l.disabled,r.clickClose=!0;const{uiactionId:n}=e;n&&(r.onClick=()=>{u.doUIAction(n,t,a,e.appId)})}else if("RAWITEM"===e.itemType){const{rawItem:t}=e;t&&(r.label=o(w,{rawItem:e},null))}else"ITEMS"===e.itemType&&(null==(s=e.detoolbarItems)?void 0:s.length)&&(r.children=V(e.detoolbarItems,t,a,n));i.push(r)})),i};let F;u.evt.on("onMounted",(()=>{if(Object.values(u.contextMenus).length>0){(()=>t.import("@imengyu/vue3-context-menu"))().then((e=>{F=e.default,F.default&&!F.showContextMenu&&(F=F.default)}))}}));const U=(e,t)=>r(Z,{data:t,modelData:e,context:u.context,params:u.params}),H=(e,t)=>{var a;if(v)return;const n=M&&(null==(a=p.value)?void 0:a.getElementRefs().rootRef.value),i=(e=>{var t;let a;const n=u.getNodeModel(e);return null==(t=null==n?void 0:n.controlRenders)||t.forEach((e=>{"LAYOUTPANEL"===e.renderType&&"nodelinkrender"!==(e.id||"").split("_")[0]&&(a=e.layoutPanel)})),a})(e._nodeId),s=i?U(i,e._deData):(l=e,o("div",{class:m.em("slider","container")},[o("div",{class:m.em("slider","container-title")},[o("div",{class:"number"},[l._icon&&o(y,{class:"icon",icon:l._icon},null),l._snDataItemValue]),o("div",{class:"caption"},[l._text])])]));var l;v=ibiz.overlay.createPopover((e=>r(s,{modal:e})),void 0,{width:"auto",height:"auto",noArrow:!0,placement:"bottom",modalClass:m.e("slider-popover"),appendTo:n}),null==v||v.present(t.target.children[0])},q=()=>{null==v||v.dismiss(),v=null},W=()=>o(i("x-gantt-slider"),{"allow-link":!1,"resize-mode":"dragonly",move:u.state.sliderDraggable,"resize-left":u.state.sliderDraggable,"resize-right":u.state.sliderDraggable},{content:({row:e,left:t})=>{const{sysCss:a}=u.getNodeModel(e._nodeId),n=(null==a?void 0:a.cssName)||"",i=t<0?"".concat(-t,"px"):"",s=null==e?void 0:e._text;return o("div",{class:[m.e("slider"),n],onClick:t=>L(e,t),onDblclick:()=>j(e),onContextmenu:t=>(async(e,t)=>{t.stopPropagation(),t.preventDefault();const a=u.getNodeModel(e._nodeId);if(!(null==a?void 0:a.decontextMenu))return;const n=u.contextMenus[a.decontextMenu.id];if(!n.model.detoolbarItems)return;await n.calcButtonState(e._deData||(e.srfkey?e:void 0),a.appDataEntityId,{view:u.view,ctrl:u});const o=n.state.buttonsState,i=V(n.model.detoolbarItems,e,t,o);i.length&&F.showContextMenu({x:t.x,y:t.y,customClass:m.b("context-menu"),items:i})})(e,t),onMouseenter:t=>H(e,t),onMouseleave:q},[o("div",{class:m.em("slider","caption"),style:{marginLeft:i},title:s,innerHTML:s},null)])}}),K=async(e,t,a)=>{var n;const o=(e=>{var t;let a;const n=u.getNodeModel(e);return null==(t=null==n?void 0:n.controlRenders)||t.find((e=>"LAYOUTPANEL"===e.renderType&&"nodelinkrender"===(e.id||"").split("_")[0]&&(a=e.layoutPanel,!0))),a})(e._nodeId);if(g||!o)return;const i=M&&(null==(n=p.value)?void 0:n.getElementRefs().rootRef.value),s=U(o,t);g=ibiz.overlay.createPopover((e=>r(s,{modal:e})),void 0,{width:"auto",height:"auto",noArrow:!0,autoClose:!0,modalClass:m.e("link-path-popover"),appendTo:i}),null==g||g.present(a.currentTarget),await g.onWillDismiss(),g=null};return{c:u,ns:m,ganttRef:p,isInited:h,data:z,locale:O,columns:A,onCheck:(e,t)=>{if(D=!0,e)E.push(t);else{const e=E.findIndex((e=>e._id===t._id));e>-1&&E.splice(e,1)}u.setSelection(E),setTimeout((()=>{D=!1}),200)},loading:T,ganttStyle:k,onNodeClick:L,onNodeDbClick:j,onNodeExpand:e=>{u.onExpandChange(e,!0),e&&!e._children&&u.refreshNodeChildren(e)},onNodeCollapse:e=>{u.onExpandChange(e,!1)},renderContent:()=>[...A.value.map(((e,t)=>((e,t)=>{const{caption:a,codeName:n,width:s,headerSysCss:l,align:c}=e,d=u.columns[n],p=u.state.columnStates.find((e=>e.key===n));let h=30;return p&&p.columnWidth?h=p.columnWidth>30?p.columnWidth:30:s&&s>30&&(h=s),o(i("x-gantt-column"),{label:a,prop:n,width:h,center:"center"===(null==c?void 0:c.toLowerCase())},{title:()=>o("div",{class:null==l?void 0:l.cssName},[a]),default:({row:e})=>{const t=u.getRowState(e._id);if(t){const e=i(u.providers[n].component);return r(e,{controller:d,row:t,key:t.data._uuid+n})}return null}})})(e))),W()],renderSetting:()=>!u.controlParams.enablecustomized||u.controlParams.enablecustomized&&"false"===u.controlParams.enablecustomized?null:o("div",{class:m.e("setting"),onClick:()=>(async()=>{let e=0;u.controlParams.limitsize&&(e=Number(u.controlParams.limitsize));const t=await ibiz.overlay.modal((t=>{const a=i("IBizGanttSetting"),n={modal:t,columnStates:u.state.columnStates,limitsize:e};return u.state.mustShowColumns&&(n.mustShowColumns=u.state.mustShowColumns),r(a,n)}),void 0,{width:"auto",height:"auto"});t.ok&&t.data&&t.data.length>0&&u.setColumnVisible(t.data)})(),title:zt(ibiz.i18n.t("control.gantt.hideControl"))},[o("svg",{class:m.em("setting","icon"),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{"stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M11.405 13.975l3.398-5.889L11.405 2.2H4.607L1.208 8.087l3.399 5.889h6.798zm1.023-12.4l3.43 5.938c.205.356.205.793 0 1.149l-3.43 5.938a1.147 1.147 0 0 1-.993.574H4.577c-.41 0-.789-.218-.994-.573L.153 8.66a1.153 1.153 0 0 1 0-1.147l3.43-5.94c.205-.356.584-.575.994-.575h6.858c.409 0 .788.22.993.576zM8.006 9.879c.988 0 1.792-.804 1.792-1.792s-.804-1.792-1.792-1.792-1.792.804-1.792 1.792.804 1.792 1.792 1.792zm0-4.784a2.993 2.993 0 1 1-.002 5.985 2.993 2.993 0 0 1 .002-5.985z"},null)])])]),onSliderMove:e=>{var t;const a=null==(t=e[0])?void 0:t.row,n={begin:a._beginDataItemValue?Vi(a._beginDataItemValue).format("YYYY-MM-DD HH:mm:ss"):void 0,end:a._endDataItemValue?Vi(a._endDataItemValue).format("YYYY-MM-DD HH:mm:ss"):void 0};f.value=!0,u.modifyNodeTime(a,n)},renderNoData:()=>{const{isLoaded:e}=u.state,t={};return ce(u)&&Object.assign(t,{customRender:()=>o(de,{controller:u},null)}),e&&o(i("iBizNoData"),{text:u.model.emptyText,emptyTextLanguageRes:u.model.emptyTextLanguageRes},"function"==typeof(a=t)||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?t:{default:()=>[t]});var a},allowDrop:(e,t,a)=>{const n=hv(e._uuid,u),o=hv(t._uuid,u);return u.calcAllowDrop(n,o,a)},allowDrag:e=>{const t=hv(e._uuid,u);return u.calcAllowDrag(t)},handleDrop:(e,t,a)=>{const n=hv(e._uuid,u),o=hv(t._uuid,u),i=mv(a);u.onNodeDrop(n,o,i)},onHeaderDragend:(e,t)=>{const a=u.state.columnStates.filter((e=>{var t;const a=null==(t=u.columns[e.key])?void 0:t.model;return!e.hidden&&a}));a&&a[e]&&(a[e].columnWidth=t,u.saveColumnState())},handleClickLink:(e,t)=>{if(e&&t){const a=u.state.links.find((t=>t._uuid===e.id));a&&K(a._fromData,a._deData,t)}},handleFullscreenChange:e=>{M=e,e?R():(()=>{const e=N.filter((e=>!!e));N.length=0,_(e,document.body)})()}}},render(){var e;return this.isInited?g(o(i("iBizControlBase"),{controller:this.c,class:[this.ns.b(),(null==(e=this.data)?void 0:e.length)?"":this.ns.m("empty")]},{default:()=>[o(i("x-gantt"),{ref:"ganttRef","data-id":"_id",data:this.data,links:this.c.state.links,"row-height":46,"expand-all":!1,headerDrag:!0,"start-key":"_beginDataItemValue","end-key":"_endDataItemValue",children:"_children",leaf:"_leaf","expand-key":"_defaultExpand","link-props":{fromKey:"_from",toKey:"_to",linkKey:"_uuid"},locale:this.locale,unit:this.c.state.unit,draggable:{level:"all",draggable:!1,draggableStateKey:"_draggable"},"allow-drop":this.allowDrop,"allow-drag":this.allowDrag,onNodeDrop:this.handleDrop,showCheckbox:!this.c.state.singleSelect,onNodeExpand:this.onNodeExpand,onNodeCollapse:this.onNodeCollapse,onRowClick:this.onNodeClick,onRowDblClick:this.onNodeDbClick,onRowChecked:this.onCheck,onHeaderDragend:this.onHeaderDragend,onMoveSlider:this.onSliderMove,onClickLink:this.handleClickLink,onFullscreenChange:this.handleFullscreenChange,primaryColor:this.ganttStyle.primaryColor,headerStyle:{textColor:this.ganttStyle.textColor,bgColor:this.ganttStyle.headerBgColor},borderColor:this.ganttStyle.borderColor,enableDateCompletion:!0,bodyStyle:{todayColor:this.ganttStyle.todayColor,weekendColor:this.ganttStyle.headerBgColor,bgColor:this.ganttStyle.bgColor,selectColor:this.ganttStyle.headerBgColor}},{default:()=>this.renderContent(),empty:()=>this.renderNoData(),setting:()=>this.renderSetting()})]}),[[y("loading"),this.loading]]):null}});var ny=Object.defineProperty,oy=(e,t,a)=>(((e,t,a)=>{t in e?ny(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class iy{constructor(){oy(this,"component","IBizGanttControl")}}const sy=e("aD",oe(ay,(function(e){e.component(ay.name,ay),Ba(_a.GANTT,(()=>new iy))})));const ly=a({name:"IBizContextMenuControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},mode:{type:String,default:"buttons"},groupLevelKeys:{type:Object,default:[50]},nodeData:{type:Object,required:!0},nodeModel:{type:Object,required:!0},actionCallBack:{type:Function}},setup(e,{emit:t}){const a=ne(((...e)=>new ro(...e))),s=B("context-menu"),l=e.modelData.detoolbarItems,r=n([]),d=n([]),u=n(),{popoverVisible:p,setPopoverVisible:h}=_(u,(e=>e.ref)),m=n(),{popoverid:v,setPopoverZIndex:b}=fe(),g=e=>{Array.isArray(e)&&e.forEach((e=>{e.capLanguageRes&&e.capLanguageRes.lanResTag&&(e.caption=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),e.tooltipLanguageRes&&e.tooltipLanguageRes.lanResTag&&(e.tooltip=ibiz.i18n.t(e.tooltipLanguageRes.lanResTag,e.tooltip)),g(e.detoolbarItems)}))};l&&(g(l),l.forEach((t=>{t.actionLevel&&-1===e.groupLevelKeys.findIndex((e=>e===t.actionLevel))?r.value.push(t):d.value.push(t)})));const f=e=>{var t;const{actionLevel:n}=e;return[s.e("item"),"".concat(null==(t=null==e?void 0:e.sysCss)?void 0:t.cssName),s.em("item","level-".concat(n)),s.is("disabled",a.state.buttonsState[e.id].disabled)]};c((()=>e.nodeData),(async(t,n)=>{t!==n&&await a.calcButtonState(t._deData||(t.srfkey?t:void 0),e.nodeModel.appDataEntityId)})),a.evt.on("onCreated",(async()=>{await a.calcButtonState(e.nodeData._deData||(e.nodeData.srfkey?e.nodeData:void 0),e.nodeModel.appDataEntityId)}));const w=async(a,n)=>{n.stopPropagation(),a.uiactionId?(e.actionCallBack&&await e.actionCallBack(a,n),"buttons"===e.mode?h(!1):m.value&&m.value.handleClose(),e.actionCallBack||t("action-click",a,n)):h(!1)},y=e=>o(i("el-divider"),{class:s.e("separator"),"border-style":"double",direction:e?"vertical":"horizontal"},null),C=(e,t=!0)=>a.state.buttonsState[e.id].visible?[e.addSeparator&&y(t),o(i("el-button"),{text:!0,size:"small",title:zt(e.tooltip),class:f(e),disabled:a.state.buttonsState[e.id].disabled,onClick:t=>w(e,t)},{default:()=>[o("div",{class:s.e("action-content")},[e.showIcon&&e.sysImage&&o("div",{class:s.e("action-content-icon")},[o(i("iBizIcon"),{icon:e.sysImage},null)]),e.showCaption?o("div",{class:s.e("action-content-caption")},[e.caption]):""])]})]:null,I=(e,t=!0)=>e.map((e=>{var n;return(null==(n=a.state.buttonsState[e.id])?void 0:n.visible)?"SEPERATOR"===e.itemType?y(t):"DEUIACTION"===e.itemType?C(e,t):"ITEMS"===e.itemType?((e,t=!0)=>{var n,l,r;const{groupExtractMode:c,uiactionGroup:d}=e;let u=e;if(d&&"ITEM"===c)return null==(n=null==d?void 0:d.uiactionGroupDetails)?void 0:n.map((e=>C(e,t)));const p=null==(r=null==(l=e.uiactionGroup)?void 0:l.uiactionGroupDetails)?void 0:r.filter((e=>a.state.buttonsState[e.id].visible));return d&&"ITEMX"===c&&p&&(u=p[0]),u?o(i("el-popover"),{placement:"right-start","popper-class":s.e("popover"),teleported:!1,"popper-options":{modifiers:[{name:"offset",options:{offset:[0,4]}}]}},{reference:()=>o(i("el-button"),{text:!0,size:"small",onClick:e=>w(u,e),title:zt(u.tooltip),class:f(u),disabled:a.state.buttonsState[u.id].disabled},{default:()=>[o("div",{class:s.e("action-content")},[u.showIcon&&u.sysImage&&o("div",{class:s.e("action-content-icon")},[o(i("iBizIcon"),{icon:u.sysImage},null)]),u.showCaption?o("div",{class:[s.e("action-content-caption"),s.e("action-content-group-caption")]},[u.caption]):"",o("ion-icon",{class:s.e("action-content-group-icon"),name:"chevron-forward-outline"},null)])]}),default:()=>d?null==p?void 0:p.map(((e,a)=>"ITEMX"===c&&0===a?null:C(e,t))):I(e.detoolbarItems||[],t)}):void 0})(e,t):null:null}));return{c:a,ns:s,popoverid:v,expandDetails:r,groupDetails:d,groupButtonRef:u,dropdownRef:m,popoverVisible:p,handleClick:w,renderActions:I,renderActionButton:C,calcActionItemClass:f,setPopoverZIndex:b,actionDetails:l}},render(){const e=this.actionDetails||[],t=()=>{let e;if(0===this.groupDetails.length)return null;if(!(-1!==this.groupDetails.findIndex((e=>!0===this.c.state.buttonsState[e.id].visible))))return null;const t=-1===this.groupDetails.findIndex((e=>!1===this.c.state.buttonsState[e.id].disabled));return[o(i("el-button"),{size:"small",text:!0,disabled:t,ref:"groupButtonRef",class:[this.ns.e("item"),this.ns.is("expand",this.popoverVisible)],onClick:()=>{this.popoverVisible=!this.popoverVisible}},{icon:()=>o("ion-icon",{class:this.ns.e("icon"),name:"ellipsis-vertical"},null)}),o(i("el-popover"),{placement:"bottom-start","virtual-ref":this.groupButtonRef,visible:this.popoverVisible,"popper-class":[this.popoverid,this.ns.e("popover"),this.ns.e("transfer")],"virtual-triggering":!0,transition:"none","onBefore-enter":()=>this.setPopoverZIndex("--".concat(this.ns.namespace,"-context-menu-transfer-zindex"))},(a=e=this.renderActions(this.groupDetails,!1),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?e:{default:()=>[e]}))];var a};if(this.c.state.buttonsState.visible)return"buttons"===this.mode?o("div",{class:[this.ns.b(),this.ns.m("buttons")],onClick:e=>e.stopPropagation()},[this.renderActions(this.expandDetails),t()]):o(i("el-dropdown"),{ref:"dropdownRef",onCommand:e=>this.handleClick(e,new MouseEvent("click")),"onVisible-change":()=>this.setPopoverZIndex("--".concat(this.ns.namespace,"-context-menu-transfer-zindex")),"popper-class":[this.popoverid,this.ns.e("transfer")],class:[this.ns.b(),this.ns.m("dropdown")]},{default:()=>o("span",{class:this.ns.e("caption")},[o("ion-icon",{class:this.ns.e("caption-icon"),name:"ibiz-arrow-down"},null)]),dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>[e.length>0&&e.map((e=>{var t;return(null==(t=this.c.state.buttonsState[e.id])?void 0:t.visible)?o(i("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("disabled",!1)],title:zt(e.tooltip),disabled:this.c.state.buttonsState[e.id].disabled,command:e},{default:()=>[e.showIcon&&e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),e.showCaption?e.caption:""]}):null}))]})})}});var ry=Object.defineProperty,cy=(e,t,a)=>(((e,t,a)=>{t in e?ry(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dy{constructor(){cy(this,"component","IBizContextMenuControl")}}const uy=e("aE",oe(ly,(function(e){e.component(ly.name,ly),Ba(_a.CONTEXT_MENU,(()=>new dy))}))),py=a({name:"IBizViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){var e;const t=ne(((...e)=>new co(...e))),a=B("control-".concat(null==(e=t.model.controlType)?void 0:e.toLowerCase()));return{c:t,ns:a,onCreated:e=>{e&&e.view&&t.setEmbedView(e.view)}}},render(){return o(i("iBizControlBase"),{controller:this.c},{default:()=>[this.c.state.isCreated&&(this.$slots.default?this.$slots.default({context:this.c.context,params:this.c.params,onCreated:this.onCreated}):r(i("IBizViewShell"),{context:this.c.context,params:this.c.params,viewId:this.c.model.embeddedAppDEViewId,onCreated:this.onCreated}))]})}});var hy=Object.defineProperty,my=(e,t,a)=>(((e,t,a)=>{t in e?hy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vy{constructor(){my(this,"component","IBizViewPanelControl")}}const by=e("aF",oe(py,(function(e){e.component(py.name,py),Ba(_a.VIEWPANEL,(()=>new vy))})));var gy=Object.defineProperty,fy=(e,t,a)=>(((e,t,a)=>{t in e?gy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class wy extends uo{constructor(){super(...arguments),fy(this,"rawItemParams",{})}async onInit(){await super.onInit(),this.handleRawItemParams()}handleRawItemParams(){var e;const t=null==(e=this.model.rawItem)?void 0:e.rawItemParams;Array.isArray(t)&&t.forEach((e=>{const t=e.key,a=e.value;t&&a&&(this.rawItemParams[t.toLowerCase()]=a)}))}}const yy=a({name:"IBizAuthUserinfo",props:{modelData:{type:Object,required:!0},controller:{type:wy,required:!0}},setup(e){var t;const a=B("user-info"),n=e.controller,{srfusername:o=ibiz.i18n.t("panelComponent.authUserinfo.visitor"),loginname:i}=(null==(t=ibiz.appData)?void 0:t.context)||{},s=Xi(),r=A("ctx",void 0),c=l((()=>(null==r?void 0:r.view)&&r.view.model.mainMenuAlign||"LEFT")),d=l((()=>{const{strictly:e}=n.rawItemParams;return(!e||"true"!==e)&&n.panel.view.state.isCollapse})),u=l((()=>{const{readonly:e}=n.rawItemParams;return"true"===e}));return{ns:a,c:n,onClick:()=>{ibiz.hub.controller.logout()},srfusername:o,loginname:i,router:s,menuAlign:c,isCollapse:d,isReadonly:u}},render(){return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("left","LEFT"===this.menuAlign),this.ns.is("top","TOP"===this.menuAlign),this.ns.is("collapse",this.isCollapse),this.ns.is("readonly",this.isReadonly)]},[o(i("el-dropdown"),{disabled:this.isReadonly},{default:()=>o("div",{class:[this.ns.b("info"),this.ns.is("collapse",this.isCollapse)]},[o("div",{class:this.ns.b("label")},[o(i("el-avatar"),{class:this.ns.b("avatar"),src:"./assets/images/user-avatar.png"},null),o("div",{class:[this.ns.b("name"),this.ns.is("collapse",this.isCollapse)]},[o("div",{class:this.ns.be("name","user-name")},[this.srfusername]),"LEFT"===this.menuAlign&&this.loginname&&o("div",{class:this.ns.be("name","person-name")},[this.loginname])])]),o("ion-icon",{class:[this.ns.e("down"),this.ns.is("collapse",this.isCollapse)],name:"chevron-down-outline"},null)]),dropdown:()=>o(i("el-dropdown-menu"),null,{default:()=>[o(i("el-dropdown-item"),null,{default:()=>[o("ion-icon",{name:"log-out-outline",class:this.ns.e("icon")},null),o("span",{onClick:this.onClick},[ibiz.i18n.t("app.logout")])]})]})})])}});var Cy=Object.defineProperty,Iy=(e,t,a)=>(((e,t,a)=>{t in e?Cy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Dy{constructor(){Iy(this,"component","IBizAuthUserinfo")}async createController(e,t,a){const n=new wy(e,t,a);return await n.init(),n}}const Ey=e("aH",oe(yy,(function(e){e.component(yy.name,yy),po("RAWITEM_AUTH_USERINFO",(()=>new Dy))})));var Sy=Object.defineProperty,xy=(e,t,a)=>(((e,t,a)=>{t in e?Sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Py extends ho{constructor(){super(...arguments),xy(this,"currentKey",""),xy(this,"cacheKeys",["RouterShell"]),xy(this,"navViewMsgs",{}),xy(this,"operateSort",[])}}e("aI",Py);var ky=Object.defineProperty,Ty=(e,t,a)=>(((e,t,a)=>{t in e?ky(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class zy extends uo{constructor(){super(...arguments),Ty(this,"viewModals",{}),Ty(this,"router"),Ty(this,"autoGoLast",!0),Ty(this,"noCache",!1),Ty(this,"rawItemParams",{}),Ty(this,"currentKey","")}createState(){var e;return new Py(null==(e=this.parent)?void 0:e.state)}setRouter(e){this.router=e}get routeDepth(){return this.panel.view.modal.routeDepth}get navTabs(){return this.panel.panelItems.nav_tabs}get navBreadcrumb(){return this.panel.panelItems.nav_breadcrumb}get appmenu(){return this.panel.getController("appmenu")}async onInit(){await super.onInit(),this.handleRawItemParams(),this.noCache="NO_CACHE"===this.rawItemParams.expcache}changeView(e){var t;const a=this.state.navViewMsgs[e];(null==a?void 0:a.fullPath)&&(null==(t=this.router)||t.push(a.fullPath))}onRouteChange({currentKey:e,fullPath:t}){if(this.state.currentKey!==e){if(this.state.cacheKeys.includes(e)&&this.router&&this.router.currentRoute.value.matched.length===this.routeDepth+1){const a=this.state.navViewMsgs[e].fullPath;if(a!==t)return void setTimeout((()=>{this.router.replace({path:a})}),0)}this.state.currentKey=e,this.navTabs&&(this.navTabs.state.currentKey=e)}if(""===e)return;this.currentKey=e;const a=this.state.operateSort.indexOf(e);-1!==a&&this.state.operateSort.splice(a,1),this.state.operateSort.push(e),this.state.cacheKeys.includes(e)||(this.state.cacheKeys.push(e),this.routeDepth&&(this.viewModals[e]=new sa({mode:la.ROUTE,viewUsage:1,routeDepth:this.routeDepth+1,dismiss:t=>{this.dismiss(e,t)}}))),this.state.navViewMsgs[e]?this.state.navViewMsgs[e].fullPath=t:(ibiz.log.debug("维护导航视图信息",e,t),this.state.navViewMsgs[e]={key:e,fullPath:t},R.active(e))}onViewCreated(e){const{view:t}=e,a=this.state.currentKey,n="".concat(t.model.codeName,"-").concat(t.id);this.navTabs&&(this.navTabs.updateViewInfo(a,{viewKey:n,caption:t.model.caption,sysImage:t.model.sysImage}),t.evt.on("onViewInfoChange",(({caption:e,dataInfo:t})=>{this.navTabs.updateViewInfo(a,{viewKey:n,caption:e,dataInfo:t})}))),this.navBreadcrumb&&(this.navBreadcrumb.updateViewInfo(a,{viewName:t.model.codeName,caption:t.model.caption}),t.evt.on("onViewInfoChange",(({caption:e,dataInfo:n})=>{this.navBreadcrumb.updateViewInfo(a,{viewName:t.model.codeName,caption:e,dataInfo:n})})),t.evt.on("onActivated",(()=>{const e=t.state.srfactiveviewdata,n={viewName:t.model.codeName,caption:t.model.caption};e&&e.srfkey&&Object.assign(n,{dataInfo:e.srfmajortext||""}),this.navBreadcrumb.updateViewInfo(a,n)})))}removeCache(e){const t=this.state.cacheKeys.indexOf(e);if(-1!==t){this.state.cacheKeys.splice(t,1),delete this.viewModals[e],delete this.state.navViewMsgs[e];const a=this.state.operateSort.indexOf(e);-1!==a&&this.state.operateSort.splice(a,1)}}clearCache(){this.state.cacheKeys=[this.currentKey],this.viewModals={}}async closeViewByKeys(e){this.autoGoLast=!1;for(let t=0;t<e.length;t++){const a=e[t],n=this.viewModals[a];await n.dismiss()}this.goLast(),this.autoGoLast=!0}dismiss(e,t){R.close(e,t),this.navTabs&&this.navTabs.removeCache(e),this.navBreadcrumb&&this.navBreadcrumb.removeCache(e),this.removeCache(e),this.autoGoLast&&this.goLast()}goLast(){const e=this.state.operateSort.pop();if(e){if(this.state.currentKey===e)return void this.state.operateSort.push(e);const t=this.state.navViewMsgs[e].fullPath;this.router.push(t)}else{const e=this.router.currentRoute.value,{appContext:t}=e.params;let a="/".concat(t);for(let t=1;t<=this.routeDepth;t++)a+="/".concat(e.params["view".concat(t)],"/").concat(ibiz.env.routePlaceholder);this.router.push(a),ibiz.util.setBrowserTitle("")}}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}}e("aJ",zy);const Ay=a({name:"IBizNavPosIndex",props:{modelData:{type:Object,required:!0},controller:{type:zy,required:!0}},setup(e){var t;const a=e.controller,n=B("nav-pos-index"),o=Xi();if(a.setRouter(o),a.routeDepth&&(ve((e=>{a.onRouteChange(e)}),a.routeDepth+1),"APPINDEXVIEW"===a.panel.view.model.viewType&&!a.navTabs)){const e=Yi();let n="";null==(t=a.appmenu)||t.evt.on("onClick",(()=>{n=e.fullPath})),o.beforeEach(((e,t,o)=>{t.fullPath===n&&a.clearCache(),o()}))}return{ns:n,onViewCreated:e=>{a.onViewCreated(e)},c:a}},render(){const{state:e,viewModals:t}=this.c,{currentKey:a,cacheKeys:n}=e;if(a)return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("no-nav",ibiz.config.view.disableHomeTabs)]},[this.c.routeDepth?o(i("iBizRouterView"),{manualKey:a,modal:t[a],onCreated:this.onViewCreated},{default:({Component:e})=>this.c.noCache?e?o(e,null,null):null:o(i("keepAlive"),{include:n,max:30,isKey:!0},{default:()=>[e&&o(e,null,null)]})}):o("div",null,[ibiz.i18n.t("panelComponent.navPosIndex.noSupportPrompt")])])}});var Oy=Object.defineProperty,My=(e,t,a)=>(((e,t,a)=>{t in e?Oy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ny{constructor(){My(this,"component","IBizNavPosIndex")}async createController(e,t,a){const n=new zy(e,t,a);return await n.init(),n}}const By=e("aK",oe(Ay,(function(e){e.component(Ay.name,Ay),po("RAWITEM_NAV_POS_INDEX",(()=>new Ny))})));var _y=Object.defineProperty,Ry=(e,t,a)=>(((e,t,a)=>{t in e?_y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ly extends ho{constructor(){super(...arguments),Ry(this,"currentKey",""),Ry(this,"tabItems",[]),Ry(this,"activeTab","")}}class jy extends uo{createState(){var e;return new Ly(null==(e=this.parent)?void 0:e.state)}get routeDepth(){return this.panel.view.modal.routeDepth}get navPos(){return this.panel.panelItems.nav_pos_index}findTabItem(e){return this.state.tabItems.find((t=>t.key===e))}findTabItemByViewKey(e){return this.state.tabItems.find((t=>t.viewKey===e))}onTabClick(e){var t;null==(t=this.navPos)||t.changeView(e)}updateViewInfo(e,t){const a=t.viewKey?this.findTabItemByViewKey(t.viewKey):this.findTabItem(e);a?(Object.assign(a,mi(ui,t)),this.refreshItemUI(e)):(this.state.tabItems.push({key:e,...t}),this.state.activeTab=this.state.currentKey)}removeCache(e){const t=this.state.tabItems.findIndex((t=>t.key===e));-1!==t&&this.state.tabItems.splice(t,1)}onTabRemove(e){var t;null==(t=this.navPos)||t.closeViewByKeys([e])}removeOther(){var e;const t=this.state.currentKey,a=[];this.state.tabItems.forEach((e=>{e.key!==t&&a.push(e.key)})),a.length>0&&(null==(e=this.navPos)||e.closeViewByKeys(a))}removeAll(){var e;const t=this.state.tabItems.map((e=>e.key));t.length>0&&(null==(e=this.navPos)||e.closeViewByKeys(t))}refreshItemUI(e){const t={key:"exampleItem",caption:""};this.state.tabItems.push(t),this.state.activeTab=t.key,b((()=>{this.state.tabItems.pop(),this.state.activeTab=e}))}}function Vy(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Fy=a({name:"IBizNavTabs",props:{modelData:{type:Object,required:!0},controller:{type:jy,required:!0}},setup(e){const t=B("nav-tabs"),a=e.controller,{state:n}=e.controller,o=[{text:ibiz.i18n.t("panelComponent.navTabs.closeAll"),value:"closeAll"},{text:ibiz.i18n.t("panelComponent.navTabs.closeOther"),value:"closeOther"}];return c((()=>a.state.currentKey),((e,t)=>{if(e!==t){a.findTabItem(e)&&(n.activeTab=e)}})),{ns:t,actions:o,changePage:e=>{n.currentKey!==e.paneName&&a.onTabClick(e.paneName)},onTabRemove:e=>{a.onTabRemove(e)},handleCommand:e=>{"closeAll"===e.value?a.removeAll():"closeOther"===e.value&&a.removeOther()}}},render(){let e;const{state:t}=this.controller;return o("div",{class:[this.ns.b(),...this.controller.containerClass]},[o("div",{class:this.ns.e("left")},[o(i("el-tabs"),{type:"card",modelValue:t.activeTab,"onUpdate:modelValue":e=>t.activeTab=e,closable:!0,onTabClick:this.changePage,onTabRemove:this.onTabRemove},Vy(e=t.tabItems.map((e=>{let t=e.caption;return e.dataInfo&&(t+=" - ".concat(e.dataInfo)),o(i("el-tab-pane"),{name:e.key,key:e.key,label:t},{label:()=>o("div",{class:this.ns.em("left","content")},[o(i("iBizIcon"),{class:this.ns.em("left","icon"),icon:e.sysImage},null),o("div",{class:this.ns.em("left","caption"),title:zt(t)},[t])])})})))?e:{default:()=>[e]})]),o("div",{class:this.ns.e("right")},[o(i("el-dropdown"),{onCommand:this.handleCommand},{default:()=>o(i("el-button"),{size:"small",type:"primary"},{default:()=>[ibiz.i18n.t("app.more"),o("ion-icon",{name:"arrow-down"},null)]}),dropdown:()=>{let e;return o(i("el-dropdown-menu"),null,Vy(e=this.actions.map((e=>o(i("el-dropdown-item"),{command:e},{default:()=>[e.text]}))))?e:{default:()=>[e]})}})])])}});var Uy=Object.defineProperty,Hy=(e,t,a)=>(((e,t,a)=>{t in e?Uy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qy{constructor(){Hy(this,"component","IBizNavTabs")}async createController(e,t,a){const n=new jy(e,t,a);return await n.init(),n}}const Gy=oe(Fy,(function(e){e.component(Fy.name,Fy),po("RAWITEM_NAV_TABS",(()=>new qy))}));var Wy=Object.defineProperty,Ky=(e,t,a)=>(((e,t,a)=>{t in e?Wy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Yy extends ho{constructor(){super(...arguments),Ky(this,"breadcrumbItems",[]),Ky(this,"menuTag","")}}function Xy(e){const t=ibiz.hub.getAppSourceModel(e.srfappid);if(t.getDefaultPSAppIndexView){return t.getDefaultPSAppIndexView.path.split("/").pop().replace(".json","")}return ibiz.hub.defaultAppIndexViewName}function $y(e){const t=ibiz.hub.getApp(e.srfappid).model.caption;return{viewName:Xy(e),fullPath:"/",type:"default",caption:t}}function Jy(e){var t;return e.length>1&&(null==(t=e[1].params)?void 0:t.srfmenuitem)||""}async function Qy(e,t,a){var n;if(!e)return;const o=t.allAppMenuItems.find((t=>t.id===e));if(o){const t=ibiz.hub.getApp(a.srfappid).getAppFunc(o.appFuncId),i=(null==(n=t.appViewId)?void 0:n.split(".").pop())||"",s=await ibiz.hub.config.view.get(i);return{tag:e,viewName:i,viewConfig:s,appFunc:t,menuItem:o}}}var Zy=Object.defineProperty,eC=(e,t,a)=>(((e,t,a)=>{t in e?Zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tC{constructor(e,t){this.navMode=e,this.context=t,eC(this,"chache",[])}add(e){this.chache.push(e),this.chache=this.chache.filter((e=>!e.isEmbed&&!e.isModal)),"store"===this.navMode&&localStorage.setItem("breadcrumb",JSON.stringify(this.chache))}remove(e){const t=this.chache.findIndex((t=>t.fullPath===e));return-1!==t&&this.chache.splice(t,1),pi(this.chache)}removeAfter(e){if(0===this.chache.length)return[];const t=this.chache.findIndex((t=>t.fullPath===e));if(-1!==t){const e=this.chache.splice(t+1,this.chache.length);return"store"===this.navMode&&localStorage.setItem("breadcrumb",JSON.stringify(this.chache)),e}return[]}update(e){if(!this.chache.length&&"store"===this.navMode){const e=localStorage.getItem("breadcrumb");e&&(this.chache=JSON.parse(e))}const t=this.chache.findIndex((t=>t.fullPath&&t.fullPath===e.fullPath||t.viewName.toLowerCase()===e.viewName.toLowerCase()));-1!==t&&(Object.assign(this.chache[t],mi(ui,e)),this.chache=this.chache.filter((e=>!e.isEmbed&&!e.isModal)),"store"===this.navMode&&localStorage.setItem("breadcrumb",JSON.stringify(this.chache)))}getItem(e){const{viewName:t="",fullPath:a=""}=e,n=Xy(this.context);if(t===n)return $y(this.context);const o=this.chache.find((e=>a&&e.fullPath===a||t&&e.viewName.toLowerCase()===t.toLowerCase()));return o?pi(o):void 0}getChache(){if("store"===this.navMode){const e=localStorage.getItem("breadcrumb");return e?JSON.parse(e):[]}return"router"===this.navMode?pi(this.chache.filter((e=>!e.isEmbed))):pi(this.chache)}setChache(e){this.chache=pi(e),this.chache=this.chache.filter((e=>!e.isEmbed&&!e.isModal)),"store"===this.navMode&&localStorage.setItem("breadcrumb",JSON.stringify(this.chache))}}var aC=Object.defineProperty,nC=(e,t,a)=>(((e,t,a)=>{t in e?aC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class oC extends uo{constructor(){super(...arguments),nC(this,"separator","/"),nC(this,"navMode","router"),nC(this,"showHome",!0),nC(this,"service"),nC(this,"rawItemParams",{})}createState(){var e;return new Yy(null==(e=this.parent)?void 0:e.state)}get appmenu(){return this.panel.view.getController("appmenu")}get navPos(){return this.panel.panelItems.nav_pos_index}async onInit(){await super.onInit(),this.handleRawItemParams(),this.navMode=this.rawItemParams.navmode||"router",this.separator=this.rawItemParams.separator||"/",this.showHome="true"===this.rawItemParams.showhome,this.service=new tC(this.navMode,this.panel.context)}onCreated(e){"menu"===this.navMode&&this.setBreadcrumbByMenu(e),"store"===this.navMode&&this.setBreadcrumbByStore(e)}onRouteChange(e){if("router"!==this.navMode){if("store"===this.navMode){const{currentRoute:t}=e,a=K(t.value),n=t.value.fullPath,o=function(e){var t;const{currentRoute:a}=e;return(null==(t=K(a.value).pathNodes.pop())?void 0:t.viewName)||""}(e),i=Jy(a.pathNodes),s=this.service.getItem({fullPath:n,viewName:o}),l=Xy(this.panel.context);if(s){if(s.viewName===l)return this.service.setChache([{...$y(this.panel.context),fullPath:n}]),void this.resetBreadcrumbs();this.service.update({...s,fullPath:n});this.service.removeAfter(n).forEach((e=>{var t;null==(t=this.navPos)||t.removeCache(e.fullPath)})),this.resetBreadcrumbs()}else this.state.menuTag!==i?this.setBreadcrumbByRouter(e):this.service.add({viewName:o,fullPath:n,type:"default"});this.state.menuTag=i}}else this.setBreadcrumbByRouter(e)}resetBreadcrumbs(){this.state.breadcrumbItems=this.service.getChache()}updateViewInfo(e,t){"menu"!==this.navMode&&(this.service.update({fullPath:e,type:"default",...t}),this.resetBreadcrumbs())}removeCache(e){this.service.remove(e)}async setBreadcrumbByRouter(e){const{currentRoute:t}=e,a=K(t.value),{appContext:n={},pathNodes:o}=a,i=Jy(o);let s=!1;const l=await Qy(i,this.appmenu,this.panel.context),r=a.pathNodes.map((async(e,t)=>{this.appmenu&&l&&l.viewName===e.viewName&&(s=!0);const a=Y({appContext:n,pathNodes:o.slice(0,t+1)}),i={viewName:e.viewName,fullPath:a,type:"default"},r=this.service.getItem({viewName:e.viewName});r&&(r.fullPath||(r.fullPath=a),Object.assign(i,r));const c=function(e,t){if(e===mo.ROUTE_MODAL_TAG)return{viewName:e,fullPath:"",isModal:!0};const a=ibiz.appUtil.viewCacheCenter.get(e),n=Xy(t);if(a){let e=!1;a.parentView&&a.parentView.model.codeName!==n&&(e=!0);const t=a.state.srfactiveviewdata,o={viewName:a.model.codeName,caption:a.model.caption,isEmbed:e};return t&&t.srfkey&&Object.assign(o,{dataInfo:t.srfmajortext||""}),o}}(e.viewName,this.panel.context);return c&&Object.assign(i,mi(ui,c)),i})),c=await Promise.all(r);if(!s&&l){this.state.menuTag=l.tag;const e={viewName:l.viewName,caption:l.menuItem.caption,fullPath:"",type:"menuItem",menuTag:l.tag};c.splice(1,0,e)}this.service.setChache(c),this.resetBreadcrumbs()}setBreadcrumbByMenu(e){const{currentRoute:t}=e;let a;if(K(t.value).pathNodes.some(((e,t)=>{if(0===t)return!1;const{viewName:n}=e,o=(i=n,s=this.panel.context.srfappid,(ibiz.hub.getApp(s).model.appFuncs||[]).find((e=>{const{appViewId:t=""}=e,a=t.split(".").pop();return(null==a?void 0:a.toLowerCase())===i.toLowerCase()})));var i,s;return o&&(a=o),a})),this.appmenu){if(a){const e=function(e,t){const a=[],n=t=>t.find((t=>(t.appFuncId&&t.appFuncId===e.id||!!(t.appMenuItems&&t.appMenuItems.length>0&&n(t.appMenuItems)))&&(a.unshift(t),!0)));return n(t),a}(a,this.appmenu.model.appMenuItems||[]),t=e.map((e=>({caption:e.caption,fullPath:"",type:"default",viewName:e.id})));t.unshift($y(this.panel.context)),this.service.setChache(t),this.resetBreadcrumbs()}else this.service.setChache([$y(this.panel.context)]),this.resetBreadcrumbs();this.appmenu.evt.on("onClick",(e=>{const{event:t}=e,a=t.map((e=>{const t=this.appmenu.allAppMenuItems.find((t=>t.id===e));if(t)return{caption:t.caption,fullPath:"",viewName:t.id}}));a.unshift($y(this.panel.context)),this.service.setChache(a),this.resetBreadcrumbs()}))}}setBreadcrumbByStore(e){0===this.service.getChache().length?this.setBreadcrumbByRouter(e):this.resetBreadcrumbs(),this.appmenu&&this.appmenu.evt.on("onClick",(async e=>{const{eventArg:t}=e,a=await Qy(t,this.appmenu,this.panel.context);if(a){const{viewName:e,appFunc:t,viewConfig:n}=a;if("INDEXVIEWTAB"!==t.openMode||n&&n.openMode&&"INDEXVIEWTAB"!==n.openMode)return;const o=this.service.getItem({viewName:e}),i=[];o?i.push(o):i.push({viewName:e,fullPath:"",type:"default"}),i.unshift($y(this.panel.context)),this.service.setChache(i),this.resetBreadcrumbs()}}))}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}openMenuItemView(e,t){this.appmenu&&this.appmenu.onClickMenuItem(e.menuTag,t)}}function iC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const sC=a({name:"IBizNavBreadcrumb",props:{modelData:{type:Object,required:!0},controller:{type:oC,required:!0}},setup(e){const t=B("nav-breadcrumb"),a=e.controller,n=Yi(),o=Xi();a.onCreated(o),c((()=>n.fullPath),(()=>{a.onRouteChange(o)}),{immediate:!0});const i=l((()=>{const{breadcrumbItems:e}=a.state;let t=e.filter((e=>e.caption));const n=Xy(a.panel.context);return a.showHome||(t=t.filter((e=>e.viewName!==n))),t}));return{ns:t,c:a,items:i,onClick:(e,t)=>{"menuItem"===t.type&&(e.stopPropagation(),a.openMenuItemView(t,e))}}},render(){let e;return o("div",{class:[this.ns.b(),...this.controller.containerClass,this.ns.m(this.c.navMode)]},[o(i("el-breadcrumb"),{separator:this.c.separator},iC(e=this.items.map((e=>{let t=e.caption;return e.dataInfo&&(t+=" - ".concat(e.dataInfo)),o(i("el-breadcrumb-item"),{class:this.ns.is("link","menuItem"===e.type),to:e.fullPath,onClick:t=>this.onClick(t,e)},iC(t)?t:{default:()=>[t]})})))?e:{default:()=>[e]})])}});var lC=Object.defineProperty,rC=(e,t,a)=>(((e,t,a)=>{t in e?lC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cC{constructor(){rC(this,"component","IBizNavBreadcrumb")}async createController(e,t,a){const n=new oC(e,t,a);return await n.init(),n}}const dC=oe(sC,(function(e){e.component(sC.name,sC),po("RAWITEM_NAV_BREADCRUMB",(()=>new cC))}));var uC=Object.defineProperty,pC=(e,t,a)=>(((e,t,a)=>{t in e?uC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hC extends ho{constructor(){super(...arguments),pC(this,"loading",!1),pC(this,"uiActionState")}}class mC extends uo{createState(){var e;return new hC(null==(e=this.parent)?void 0:e.state)}get data(){return this.dataParent.data}constructor(e,t,a){super(e,t,a),this.state.uiActionState=this.createUIActionState()}async onInit(){await super.onInit(),this.updateButtonState()}createUIActionState(){const{uiactionId:e,name:t}=this.model;return new vo(t,this.panel.context.srfappid,e)}async dataChangeNotify(e){await this.updateButtonState(),super.dataChangeNotify(e)}async panelStateNotify(e){await this.updateButtonState(),super.panelStateNotify(e)}async updateButtonState(){await this.state.uiActionState.update(this.panel.context,this.data,this.panel.model.appDataEntityId)}async onActionClick(e){const{uiactionId:t,actionType:a}=this.model;"NONE"!==a&&(e.stopPropagation(),e.preventDefault(),await va.execAndResolved(t,{context:this.panel.context,params:{panelDataParent:this.dataParent.model.id,...this.panel.params},data:[this.data],view:this.panel.view,event:e,noWaitRoute:!0,ctrl:this.panel},this.model.appId))}calcItemVisible(e){!1!==this.state.uiActionState.visible?super.calcItemVisible(e):this.state.visible=!1}calcItemDisabled(e){!0!==this.state.uiActionState.disabled?super.calcItemDisabled(e):this.state.disabled=!0}}e("aM",mC);const vC=a({name:"IBizPanelButton",props:{modelData:{type:Object,required:!0},controller:{type:mC,required:!0}},setup(e){const t=B("panel-button"),{caption:a,captionItemName:o,renderMode:i,showCaption:s,sysImage:r,codeName:c,itemStyle:d,tooltip:u,buttonCssStyle:p,buttonStyle:h}=e.modelData,{panel:m,state:v}=e.controller,b=n("");p&&(b.value=p);const g=l((()=>o&&m.data?m.data[o.toLowerCase()]:a));let f=!1;Object.is(i,"LINK")&&(f=!0);return{ns:t,isText:f,captionText:g,buttonType:l((()=>Object.is(i,"LINK")?"text":cl(h))),showCaption:s,sysImage:r,codeName:c,state:v,tooltip:u,handleButtonClick:async t=>{try{v.loading=!0,await e.controller.onActionClick(t),e.controller.onClick(t)}finally{v.loading=!1}},buttonCssStyle:p,tempStyle:b,itemStyle:d}},render(){return this.state.visible?o("div",{class:[this.ns.b(),this.ns.m(this.codeName),this.ns.is("loading",this.state.loading),this.itemStyle&&this.ns.m(this.itemStyle.toLowerCase()),...this.controller.containerClass],style:this.tempStyle},[o(i("el-button"),{type:this.buttonType,text:this.isText,"data-id":this.modelData.id,title:zt(this.tooltip),disabled:this.state.disabled,loading:this.state.loading,onClick:this.handleButtonClick},{default:()=>[o("div",{class:this.ns.b("content")},[o(i("iBizIcon"),{class:this.ns.bm("content","icon"),icon:this.sysImage},null),this.showCaption?o("span",{class:this.ns.bm("content","caption")},[this.captionText]):""])]})]):null}});var bC=Object.defineProperty,gC=(e,t,a)=>(((e,t,a)=>{t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fC{constructor(){gC(this,"component","IBizPanelButton")}async createController(e,t,a){const n=new mC(e,t,a);return await n.init(),n}}const wC=e("aL",oe(vC,(function(e){e.component(vC.name,vC),po("BUTTON",(()=>new fC))})));var yC=Object.defineProperty,CC=(e,t,a)=>(((e,t,a)=>{t in e?yC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class IC extends ho{constructor(){super(...arguments),CC(this,"caption",""),CC(this,"caption2",""),CC(this,"subCaption",""),CC(this,"subCaption2",""),CC(this,"icon",""),CC(this,"icon2",""),CC(this,"isSvg",!1)}}var DC=Object.defineProperty,EC=(e,t,a)=>(((e,t,a)=>{t in e?DC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class SC extends uo{constructor(){super(...arguments),EC(this,"captionSplit","|"),EC(this,"rawItemParams",{})}createState(){var e;return new IC(null==(e=this.parent)?void 0:e.state)}async onInit(){if(await super.onInit(),this.handleRawItemParams(),"APPINDEXVIEW"!==this.panel.view.model.viewType){const e=this.panel.view.model,t=ibiz.hub.getApp(e.appId);return void(t&&(this.state.caption=ibiz.env.AppTitle||t.model.caption||""))}const e=this.panel.view.model;e.title&&!document.title&&(document.title=e.title),this.model.sysImage&&this.model.sysImage.rawContent?this.state.icon=this.model.sysImage.rawContent:e.appIconPath&&(this.state.icon=e.appIconPath),e.appIconPath2&&(this.state.icon2=e.appIconPath2),e.caption&&(this.state.caption=e.caption.split(this.captionSplit)[0],this.state.caption2=e.caption.split(this.captionSplit)[1]||e.caption.split(this.captionSplit)[0]),e.subCaption&&(this.state.subCaption=e.subCaption.split(this.captionSplit)[0],this.state.subCaption2=e.subCaption.split(this.captionSplit)[1]||e.subCaption.split(this.captionSplit)[0]),(this.state.icon.endsWith(".svg")||this.state.icon2.endsWith(".svg"))&&(this.state.isSvg=!0);ibiz.hub.getApp().model.appId===e.appId&&ibiz.env.AppTitle&&(this.state.caption=ibiz.env.AppTitle)}handleRawItemParams(){var e;const t=null==(e=this.model.rawItem)?void 0:e.rawItemParams;Array.isArray(t)&&t.forEach((e=>{const t=e.key,a=e.value;t&&a&&(this.rawItemParams[t.toLowerCase()]=a)}))}}e("aO",SC);const xC=a({name:"IBizPanelAppTitle",props:{modelData:{type:Object,required:!0},controller:{type:SC,required:!0}},setup(e){const t=B("panel-app-title"),a=e.controller,n=Yi(),o=Xi(),i=A("ctx",void 0),s=l((()=>(null==i?void 0:i.view)&&i.view.model.mainMenuAlign||"LEFT")),r=l((()=>"LEFT"===s.value)),c=l((()=>{const{strictly:e}=a.rawItemParams;return(!e||"true"!==e)&&a.panel.view.state.isCollapse})),d=l((()=>"STYLE2"===a.model.itemStyle));return{ns:t,c:a,menuAlign:s,showImgOnly:r,handleClick:async()=>{if("APPLOGINVIEW"!==a.panel.view.model.viewType){if(null==i?void 0:i.view){const e=K(n);e.pathNodes=e.pathNodes.slice(0,1);const t=Y(e);o.push({path:t}),setTimeout((()=>{window.location.reload()}))}e.controller.onClick()}},isCollapse:c,showIcon:d}},render(){const{icon:e,isSvg:t,caption:a,caption2:n,subCaption:i,subCaption2:s}=this.c.state;let l=null,r=null;const c=o("span",{class:this.ns.e("title")},[a]);if("APPINDEXVIEW"!==this.c.panel.view.model.viewType)r=c;else{if("LEFT"===this.menuAlign)if(this.isCollapse)if(e){let a=null;a=t?o("ion-icon",{class:this.ns.e("logo"),icon:e},null):o("span",{class:this.ns.e("logo")},[o("img",{src:e},null)]),l=o("div",{class:this.ns.e("collpase-icon")},[a])}else l=o("div",{class:this.ns.e("collapse-title")},[o("div",{class:this.ns.e("caption2")},[n]),o("div",{class:this.ns.e("subCaption2")},[s])]);else if(this.showIcon&&e){let n=null;n=t?o("ion-icon",{class:this.ns.em("logo","expand"),icon:e},null):o("span",{class:this.ns.em("logo","expand")},[o("img",{src:e},null)]);let s=o("g",{id:"app-caption-panel",stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[o("text",{id:"app-caption","font-family":"Poppins-Bold, Poppins","font-size":"22","font-weight":"bold"},[o("tspan",{x:"0",y:"52"},[a])])]);i&&(s=o("g",{id:"app-caption-panel",stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[o("text",{id:"app-caption","font-family":"Poppins-Bold, Poppins","font-size":"22","font-weight":"bold"},[o("tspan",{x:"8",y:"39"},[a])]),o("text",{id:"app-subcaption","font-family":"PingFangSC-Semibold, PingFang SC","font-size":"14","font-weight":"bold"},[o("tspan",{x:"8",y:"66"},[i])])])),l=o("span",{class:this.ns.e("logo")},[n,o("svg",{width:"166px",height:"80px",viewBox:"0 0 166 90",version:"1.1"},[s])])}else l=o("span",{class:this.ns.e("logo")},[o("svg",{width:"256px",height:"80px",viewBox:"0 0 256 80",version:"1.1"},[o("g",{id:"app-caption-panel",stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[o("text",{id:"app-caption","font-family":"Poppins-Bold, Poppins","font-size":"22","font-weight":"bold"},[o("tspan",{x:"20.961",y:"40"},[a])]),o("text",{id:"app-subcaption","font-family":"PingFangSC-Semibold, PingFang SC","font-size":"18","font-weight":"bold"},[o("tspan",{x:"96",y:"69"},[i])])])])]);else"TOP"===this.menuAlign&&e&&(l=t?o("ion-icon",{class:this.ns.e("logo"),icon:e},null):o("span",{class:this.ns.e("logo")},[o("img",{src:e},null)]));r="LEFT"===this.menuAlign?l:[l,c]}return o("div",{class:[this.ns.b(),this.ns.is("only-img",this.showImgOnly),this.ns.is("collapse",this.isCollapse),this.ns.is("only-title","APPINDEXVIEW"!==this.c.panel.view.model.viewType),...this.controller.containerClass],onClick:this.handleClick},[r])}});var PC=Object.defineProperty,kC=(e,t,a)=>(((e,t,a)=>{t in e?PC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class TC{constructor(){kC(this,"component","IBizPanelAppTitle")}async createController(e,t,a){const n=new SC(e,t,a);return await n.init(),n}}const zC=e("aN",oe(xC,(function(e){e.component(xC.name,xC),po("RAWITEM_APP_APPTITLE",(()=>new TC)),po("CTRLPOS_APP_APPTITLE",(()=>new TC))})));function AC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const OC=a({name:"IBizPanelAppHeader",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("panel-app-header"),{showCaption:a,titleBarCloseMode:o,id:i}=e.modelData,s=0!==o,r=n(2===o),c=l((()=>"TOP"===e.controller.panel.view.model.mainMenuAlign?"horizontal":"vertical")),d=l((()=>{let n=[t.b(),t.m(c.value),t.m(i)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),s&&t.m("collapsible"),t.is("collapse",s&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:d,changeCollapse:()=>{s&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},AC(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},AC(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[s])}});var MC=Object.defineProperty,NC=(e,t,a)=>(((e,t,a)=>{t in e?MC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class BC{constructor(){NC(this,"component","IBizPanelAppHeader")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const _C=oe(OC,(function(e){e.component(OC.name,OC),po("CONTAINER_AppHeader",(()=>new BC))}));function RC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const LC=a({name:"IBizPanelViewHeader",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("panel-view-header"),{showCaption:a,titleBarCloseMode:o,id:i}=e.modelData,s=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(i)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),s&&t.m("collapsible"),t.is("collapse",s&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{s&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},RC(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},RC(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[s])}});var jC=Object.defineProperty,VC=(e,t,a)=>(((e,t,a)=>{t in e?jC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class FC{constructor(){VC(this,"component","IBizPanelViewHeader")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const UC=oe(LC,(function(e){e.component(LC.name,LC),po("CONTAINER_ViewHeader",(()=>new FC))}));function HC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const qC=a({name:"IBizPanelExpHeader",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("panel-exp-header"),{showCaption:a,titleBarCloseMode:o,id:i}=e.modelData,s=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(i)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),s&&t.m("collapsible"),t.is("collapse",s&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{s&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},HC(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},HC(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[s])}});var GC=Object.defineProperty,WC=(e,t,a)=>(((e,t,a)=>{t in e?GC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class KC{constructor(){WC(this,"component","IBizPanelExpHeader")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const YC=oe(qC,(function(e){e.component(qC.name,qC),po("CONTAINER_Exp_Header",(()=>new KC))}));function XC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const $C=a({name:"IBizPanelViewContent",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("panel-view-content"),{showCaption:a,titleBarCloseMode:o,id:i}=e.modelData,s=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(i)];const{view:o}=e.controller.panel;return o.model.viewType&&n.push(t.m(o.model.viewType.toLowerCase())),n.push(t.is("no-caption",!o.model.showCaptionBar)),!0===a&&(n=[...n,...e.controller.containerClass,t.is("collapse",s&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{s&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{layout:this.modelData.layout},XC(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},XC(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[s])}});var JC=Object.defineProperty,QC=(e,t,a)=>(((e,t,a)=>{t in e?JC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ZC{constructor(){QC(this,"component","IBizPanelViewContent")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const eI=oe($C,(function(e){e.component($C.name,$C),po("CONTAINER_VIEWCONTENT",(()=>new ZC))}));var tI=Object.defineProperty,aI=(e,t,a)=>(((e,t,a)=>{t in e?tI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class nI extends ho{constructor(){super(...arguments),aI(this,"activeTab","")}}class oI extends uo{createState(){var e;return new nI(null==(e=this.parent)?void 0:e.state)}async onInit(){var e;await super.onInit(),this.state.activeTab=(null==(e=this.model.panelTabPages)?void 0:e[0].id)||""}onTabChange(e){this.state.activeTab=e}}const iI=a({name:"IBizPanelTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:oI,required:!0}},setup(e){const t=B("panel-tab-panel"),{state:a}=e.controller,n=l((()=>{const{id:a}=e.modelData,n=[t.b(),t.m(a)];return n.push(...e.controller.containerClass),n}));return{ns:t,state:a,classArr:n,onTabClick:(t,a)=>{e.controller.onTabChange(t.props.name)}}},render(){var e,t;let a;if(!this.controller.state.visible)return;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[];return o(i("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],"model-value":this.state.activeTab,onTabClick:this.onTabClick},"function"==typeof(l=a=n.map((e=>{const t=e.props;if(!t||!t.controller)return e;const a=t.controller;return a.state.visible||a.state.keepAlive?o(i("el-tab-pane"),{class:this.ns.b("tab-item"),label:a.model.caption,name:a.model.id,lazy:!0},{default:()=>[this.state.activeTab===a.model.id&&e]}):null})))||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?a:{default:()=>[a]});var l}});var sI=Object.defineProperty,lI=(e,t,a)=>(((e,t,a)=>{t in e?sI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class rI{constructor(){lI(this,"component","IBizPanelTabPanel")}async createController(e,t,a){const n=new oI(e,t,a);return await n.init(),n}}const cI=e("aP",oe(iI,(function(e){e.component(iI.name,iI),po("TABPANEL",(()=>new rI))})));var dI=Object.defineProperty,uI=(e,t,a)=>(((e,t,a)=>{t in e?dI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class pI extends uo{constructor(){super(...arguments),uI(this,"splitMode","horizontal"),uI(this,"splitValue",.5),uI(this,"lastSplitValue",null)}initSplitValue(e,t){"PX"===t&&(this.splitValue="".concat(e,"px")),"PERCENTAGE"===t&&(this.splitValue=e/100),this.state.splitValue=this.splitValue}async onInit(){await super.onInit();const{predefinedType:e,panelItems:t}=this.model;if(this.splitMode="CONTAINER_V_SPLIT"===e?"vertical":"horizontal",Array.isArray(t)&&t.length){const e=t[0].layoutPos;if(e){if("horizontal"===this.splitMode){const{width:t,widthMode:a}=e;null!=t&&null!=a&&this.initSplitValue(t,a)}if("vertical"===this.splitMode){const{height:t,heightMode:a}=e;null!=t&&null!=a&&this.initSplitValue(t,a)}}}}hiddenPanel(e){this.state.isHiddenTrigger||(this.lastSplitValue=this.state.splitValue),"left"!==e&&"top"!==e||(this.state.splitValue=0),"right"!==e&&"bottom"!==e||(this.state.splitValue=1),this.state.isHiddenTrigger=!0}showPanel(){null!=this.lastSplitValue&&(this.state.splitValue=this.lastSplitValue,this.state.isHiddenTrigger=!1,this.lastSplitValue=null)}}e("aQ",pI);const hI=a({name:"IBizSplitContainer",props:{modelData:{type:Object,required:!0},controller:{type:pI,required:!0}},setup(e){const t=B("split-container"),{id:a}=e.modelData,n=l((()=>{let n=[t.b(),t.m(a)];return n=[...n,...e.controller.containerClass,t.is("hidden",!e.controller.state.visible),t.is("hidden-trigger",e.controller.state.isHiddenTrigger)],n}));return{ns:t,classArr:n}},render(){var e,t;const a=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[];return o("div",{class:this.classArr},[o(i("iBizSplit"),{modelValue:this.controller.state.splitValue,"onUpdate:modelValue":e=>this.controller.state.splitValue=e,mode:this.controller.splitMode},{left:()=>a[0],right:()=>a[1],top:()=>a[0],bottom:()=>a[1]})])}});var mI=Object.defineProperty,vI=(e,t,a)=>(((e,t,a)=>{t in e?mI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bI{constructor(){vI(this,"component","IBizSplitContainer")}async createController(e,t,a){const n=new pI(e,t,a);return await n.init(),n}}const gI=e("aR",oe(hI,(function(e){e.component(hI.name,hI),po("CONTAINER_CONTAINER_H_SPLIT",(()=>new bI)),po("CONTAINER_CONTAINER_V_SPLIT",(()=>new bI))})));var fI=Object.defineProperty,wI=(e,t,a)=>(((e,t,a)=>{t in e?fI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yI extends uo{constructor(){super(...arguments),wI(this,"rawItemParams",{})}async onInit(){await super.onInit(),this.handleRawItemParams()}handleRawItemParams(){var e;const t=null==(e=this.model.rawItem)?void 0:e.rawItemParams;Array.isArray(t)&&t.forEach((e=>{const t=e.key,a=e.value;t&&a&&(this.rawItemParams[t.toLowerCase()]=a)}))}}const CI=a({name:"IBizPanelIndexViewSearch",props:{modelData:{type:Object,required:!0},controller:{type:yI,required:!0}},setup(e){const t=B("panel-index-view-search"),a=e.controller,o=n(""),i=Ii((()=>{}),500),s=A("ctx",void 0),r=l((()=>(null==s?void 0:s.view)&&s.view.model.mainMenuAlign||"LEFT")),c=l((()=>{const{strictly:e}=a.rawItemParams;return(!e||"true"!==e)&&a.panel.view.state.isCollapse})),d=l((()=>{const{placeholder:e}=a.rawItemParams;return e||ibiz.i18n.t("component.indexSearch.placeholder")})),u=l((()=>{const{id:a}=e.modelData,n=[t.b(),t.m(a),t.is("collapse",c.value)];return n.push(...e.controller.containerClass),n})),p=async()=>{const t=e.modelData.id,n=a.panel.view.getController("appmenu");if(n){const e=n.allAppMenuItems.find((e=>e.id===t));if(e){const t=a.panel.context.clone(),n=a.panel.params;t.srfappid=e.appId||ibiz.env.appId,await ibiz.commands.execute(bo.TAG,e.appFuncId,t,{...n,srfquery:o.value},{})}}};return{ns:t,classArr:u,isCollapse:c,curPlaceholder:d,onInput:e=>{o.value=e,i()},onSearch:p,c:a,query:o,menuAlign:r,onEnter:e=>{"Enter"===e.key&&p()}}},render(){if(this.controller.state.visible)return o("div",{class:this.classArr},["LEFT"===this.menuAlign&&!this.isCollapse&&o(i("el-input"),{"model-value":this.query,class:this.ns.b("search"),placeholder:this.curPlaceholder,onInput:this.onInput,onKeyup:this.onEnter},{prefix:()=>o("ion-icon",{class:this.ns.e("search-icon"),name:"search"},null)})])}});var II=Object.defineProperty,DI=(e,t,a)=>(((e,t,a)=>{t in e?II(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class EI{constructor(){DI(this,"component","IBizPanelIndexViewSearch")}async createController(e,t,a){const n=new yI(e,t,a);return await n.init(),n}}const SI=e("aS",oe(CI,(function(e){e.component(CI.name,CI),po("RAWITEM_INDEX_VIEW_SEARCH",(()=>new EI))})));class xI extends ho{}class PI extends uo{createState(){var e;return new xI(null==(e=this.parent)?void 0:e.state)}}function kI(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const TI=a({name:"IBizPanelAppLoginView",props:{modelData:{type:Object,required:!0},controller:{type:PI,required:!0}},setup(e){const t=B("panel-app-login-view"),{id:a}=e.modelData,n=l((()=>{let n=[t.b(),t.m(a)];return n=[...n,...e.controller.containerClass,t.is("hidden",!e.controller.state.visible)],n})),o=l((()=>{let e={};const a=window.location.pathname;if(a){const t=a.lastIndexOf("/");if(-1!==t){const n=a.substring(0,t+1);e={"header-url":"url('".concat(n,"assets/images/login-header.png')"),"avatar-url":"url('".concat(n,"assets/images/login-avatar.png')")}}}return t.cssVarBlock(e)}));return{ns:t,classArr:n,cssVars:o}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},kI(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},kI(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr,style:this.cssVars,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?o("style",{type:"text/css"},[this.controller.model.cssStyle]):null,s])}});var zI=Object.defineProperty,AI=(e,t,a)=>(((e,t,a)=>{t in e?zI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class OI{constructor(){AI(this,"component","IBizPanelAppLoginView")}async createController(e,t,a){const n=new PI(e,t,a);return await n.init(),n}}const MI=oe(TI,(function(e){e.component(TI.name,TI),po("CONTAINER_APPLOGINVIEW",(()=>new OI))}));class NI extends ho{}class BI extends uo{createState(){var e;return new NI(null==(e=this.parent)?void 0:e.state)}}const _I=a({name:"IBizPanelRememberMe",props:{modelData:{type:Object,required:!0},controller:{type:BI,required:!0}},setup(e){const t=B("panel-remember-me"),{id:a}=e.modelData,n=e.controller,o=l((()=>{let n=[t.b(),t.m(a)];return n=[...n,...e.controller.containerClass,t.is("hidden",!e.controller.state.visible)],n})),i=l({get:()=>n.panel.state.data.isRemember,set:e=>{n.panel.state.data.isRemember=e}});return{ns:t,classArr:o,c:n,isRemember:i}},render(){return o("div",{class:this.classArr},[o(i("el-checkbox"),{modelValue:this.isRemember,"onUpdate:modelValue":e=>this.isRemember=e,label:ibiz.i18n.t("app.rememberMe")},null)])}});var RI=Object.defineProperty,LI=(e,t,a)=>(((e,t,a)=>{t in e?RI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jI{constructor(){LI(this,"component","IBizPanelRememberMe")}async createController(e,t,a){const n=new BI(e,t,a);return await n.init(),n}}const VI=oe(_I,(function(e){e.component(_I.name,_I),po("CONTAINER_REMEMBER_ME",(()=>new jI)),po("FIELD_AUTH_REMEMBERME",(()=>new jI))}));function FI(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const UI=a({name:"IBizIndexActions",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(e){const t=B("index-actions"),{id:a}=e.modelData,n=l((()=>e.controller.panel.view.state.isCollapse)),o=l((()=>{let o=[t.b(),t.m(a)];return o=[...o,...e.controller.containerClass,t.is("hidden",!e.controller.state.visible),t.is("collapse",n.value)],o}));return{ns:t,classArr:o,isCollapse:n}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},FI(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},FI(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?o("style",{type:"text/css"},[this.controller.model.cssStyle]):null,s])}});var HI=Object.defineProperty,qI=(e,t,a)=>(((e,t,a)=>{t in e?HI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class GI{constructor(){qI(this,"component","IBizIndexActions")}async createController(e,t,a){const n=new we(e,t,a);return await n.init(),n}}const WI=e("aT",oe(UI,(function(e){e.component(UI.name,UI),po("CONTAINER_INDEX_ACTIONS",(()=>new GI))}))),KI={10:"未开始",20:"执行中",30:"已执行",40:"执行失败"},YI={10:"info",20:"",30:"success",40:"danger"},XI=a({name:"IBizAsyncAction",props:{action:{type:Object,required:!0},provider:{type:Object,required:!0}},emits:{close:()=>!0},setup(e,{emit:t}){const a=B("async-action"),n=l((()=>ki(e.action.actionresult))),o=l((()=>!e.action.actiontype||n.value));return{ns:a,showErrorInfo:l((()=>e.action.actiontype&&yi(e.action.actionresult))),clickable:o,actionstate:l((()=>{if(n.value){const t=e.action.actionresult;return t.total-t.success>0?40:30}return e.action.actionstate})),progressText:l((()=>e.action.completionrate?"(".concat(e.action.completionrate,"%)"):"")),onClick:async a=>{if(e.provider.onClick){await e.provider.onClick(e.action,a)&&t("close")}}}},render(){const{asyncacitonname:e,begintime:t,stepinfo:a="进行中"}=this.action;return o("div",{class:[this.ns.b(),this.clickable?this.ns.m("clickable"):""],onClick:this.onClick},[o("div",{class:this.ns.b("left")},[o("ion-icon",{name:"list-outline"},null)]),o("div",{class:this.ns.b("center")},[o("div",{class:this.ns.e("caption")},[e]),this.showErrorInfo&&o("div",{title:zt(this.action.actionresult),class:this.ns.e("error-info")},[this.action.actionresult]),20===this.actionstate?o("div",{class:this.ns.e("progress")},[a,this.progressText]):o("div",{class:this.ns.e("begin-time")},[t])]),o("div",{class:this.ns.b("right")},[o(i("el-tag"),{type:YI[this.actionstate]},{default:()=>[KI[this.actionstate]]})]),20===this.actionstate&&!!this.action.completionrate&&o("div",{class:this.ns.b("loading-warp")},[o("div",{class:this.ns.be("loading-warp","inner"),style:"width:".concat(this.action.completionrate,"%;")},null)])])}}),$I=a({name:"IBizAsyncActionTab",props:{controller:{type:Object,required:!0},showPopover:{type:Boolean,required:!0}},emits:{hiddenPopover:()=>!0},setup(e,{emit:t}){const a=B("async-action-tab"),o=e.controller,i=n([]),s=()=>{i.value=Ht(o.actions)};s(),o.evt.on("dataChange",s);return{ns:a,allItems:i,hiddenPopover:()=>{t("hiddenPopover")}}},render(){return o("div",{class:[this.ns.b()]},[this.allItems.length>0&&this.allItems.map((e=>{let t;try{t=pa(e)}catch(e){ibiz.log.error(e)}return t?t.render({class:this.ns.e("item"),action:e,onClose:this.hiddenPopover}):o("div",{class:this.ns.e("item")},[ibiz.i18n.t("panelComponent.userMessage.asyncActionTab.noSupportType",{type:e.actiontype})])})),0===this.allItems.length&&o("div",{class:this.ns.e("nodata")},[ibiz.i18n.t("panelComponent.userMessage.asyncActionTab.noAsyncAction")])])}});function JI(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const QI=a({name:"IBizAsyncActionPreview",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup(e){const t=B("async-action-preview"),a=u({title:"",beginTime:"",endTime:"",total:0,success:0,error:0,errorDetails:[{row:0,reason:""}],errorFileUrl:""});if(a.title=ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.importDetailPrompt",{name:e.asyncAction.asyncacitonname}),a.beginTime=e.asyncAction.begintime,a.endTime=e.asyncAction.endtime,e.asyncAction.actionresult){let t=e.asyncAction.actionresult;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw new _t(ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.parseImportInfoErr"))}a.total=t.total||0,a.success=t.success||0,a.error=a.total-a.success,t.errorinfo?a.errorDetails=Object.keys(t.errorinfo).map((e=>({row:Number(e),reason:t.errorinfo[e].errorInfo}))):a.errorDetails=[],t.errorfile&&(a.errorFileUrl="".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId).concat(ibiz.env.downloadFileUrl,"/").concat(t.errorfile.folder,"/").concat(t.errorfile.fileid).replace("/{cat}",""))}return{ns:t,info:a,onClose:()=>{e.modal.dismiss()},onDownLoad:()=>{var e;e={url:a.errorFileUrl,name:a.title},ibiz.net.request(e.url,{method:"get",responseType:"blob",baseURL:""}).then((t=>{let a=Fi.parse(t.headers["content-disposition"],{delimiter:";"}).filename;if(a&&(a.startsWith('"')&&a.endsWith('"')&&(a=a.substring(1,a.length-1)),e.name+=".".concat(a.split(".")[1])),200!==t.status)throw new _t(ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.downloadFailedErr"));if(!t.data)throw new _t(ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.noExistentErr"));{const a=e.name;qt(t.data,a)}}))}}},render(){let e,t;return o("div",{class:[this.ns.b()]},[o("div",{class:this.ns.b("header")},[o("div",{class:this.ns.e("title")},[this.info.title]),o("div",{class:this.ns.b("toolbar")},[this.info.errorFileUrl&&o(i("el-button"),{onClick:this.onDownLoad},JI(e=ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.downloadErrFile"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.onClose},JI(t=ibiz.i18n.t("app.close"))?t:{default:()=>[t]})])]),o("div",{class:this.ns.b("time")},[o(i("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.importTime")},{default:()=>[this.info.beginTime,h(" ~ "),this.info.endTime]})]),o(i("el-row"),{class:this.ns.b("count")},{default:()=>[o(i("el-col"),{span:8},{default:()=>[o(i("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.importTotal")},{default:()=>[this.info.total]})]}),o(i("el-col"),{span:8},{default:()=>[o(i("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.successImport")},{default:()=>[this.info.success]})]}),o(i("el-col"),{span:8},{default:()=>[o(i("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.ImportFailed")},{default:()=>[this.info.error]})]})]}),this.info.errorDetails.length>0&&o("div",{class:this.ns.b("detail")},[this.info.errorDetails.map((e=>o("div",{class:this.ns.b("detail-item")},[o("div",{class:this.ns.be("detail-item","index")},[e.row]),o("div",{class:this.ns.be("detail-item","error")},[o("div",{class:this.ns.be("detail-item","error-title")},[ibiz.i18n.t("app.error")]),o("div",{class:this.ns.be("detail-item","error-reason")},[e.reason])])])))])])}}),ZI=a({name:"IBizAsyncActionResult",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup:e=>({ns:B("async-action-preview"),message:l((()=>ki(e.asyncAction.actionresult)?JSON.stringify(e.asyncAction.actionresult):"".concat(e.asyncAction.actionresult)))}),render(){return o("div",{class:[this.ns.b()]},[this.message])}});function eD(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const tD=a({name:"IBizAsyncDataExport",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup(e){const t=B("async-data-export"),a=u({title:"",beginTime:"",endTime:"",fileUrl:"",fileName:"",isFinish:!1});if(a.title=ibiz.i18n.t("panelComponent.userMessage.asyncDataExport.exportDetailPrompt",{name:e.asyncAction.asyncacitonname}),a.beginTime=e.asyncAction.begintime,a.endTime=e.asyncAction.endtime,e.asyncAction.asyncresultdownloadurl){const t=JSON.parse(e.asyncAction.asyncresultdownloadurl);a.fileUrl="".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId).concat(ibiz.env.downloadFileUrl,"/").concat(t.folder,"/").concat(t.fileid).replace("/{cat}",""),a.fileName=t.filename}[30,40].includes(e.asyncAction.actionstate)?a.isFinish=!0:a.isFinish=!1;return{ns:t,info:a,onClose:()=>{e.modal.dismiss()},onDownLoad:()=>{ibiz.util.file.fileDownload(a.fileUrl,a.fileName,void 0,!1)}}},render(){let e,t;return o("div",{class:[this.ns.b()]},[o("div",{class:this.ns.b("header")},[o("div",{class:this.ns.e("title")},[this.info.title]),o("div",{class:this.ns.b("toolbar")},[this.info.fileUrl&&o(i("el-button"),{onClick:this.onDownLoad},eD(e=ibiz.i18n.t("panelComponent.userMessage.asyncDataExport.downloadFile"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.onClose},eD(t=ibiz.i18n.t("app.close"))?t:{default:()=>[t]})])]),o("div",{class:this.ns.b("time")},[this.info.isFinish?o(i("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncDataExport.excuteTime")},{default:()=>[this.info.beginTime,h(" ~ "),this.info.endTime]}):o("span",{class:this.ns.be("time","executing")},[ibiz.i18n.t("panelComponent.userMessage.asyncDataExport.executing")])])])}});var aD=Object.defineProperty,nD=(e,t,a)=>(((e,t,a)=>{t in e?aD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class oD{constructor(){nD(this,"component",XI)}render(e){return r(this.component,{provider:this,...e})}async onClick(e,t){return Si(e.actiontype)?(ibiz.overlay.modal((t=>r(ZI,{asyncAction:e,modal:t})),{},{width:"80%",height:"80%"}),!0):"DEEXPORTDATA"===e.actiontype?(ibiz.overlay.modal((t=>r(tD,{asyncAction:e,modal:t})),{},{width:"80%",height:"80%"}),!0):!!ki(e.actionresult)&&(ibiz.overlay.modal((t=>r(QI,{asyncAction:e,modal:t})),{},{width:"80%",height:"80%"}),!0)}}const iD={READ:"已阅读",SENT:"已发送",RECEIVED:"已接收",REPLIED:"已回复",SEND_FAILED:"发送失败",NOT_SENT:"未发送",DELETED:"已删除"},sD={READ:"",SENT:"success",RECEIVED:"success",REPLIED:"warning",SEND_FAILED:"danger",NOT_SENT:"info",DELETED:"info"},lD=a({name:"IBizInternalMessageDefault",props:{message:{type:Object,required:!0},provider:{type:Object,required:!0}},emits:{close:()=>!0},setup:()=>({ns:B("internal-message")}),render(){const{title:e,create_time:t,content:a,status:n}=this.message,s=o("div",{class:this.ns.e("short-content")},[a]);return o(i("iBizInternalMessageContainer"),{class:[this.ns.b()],message:this.message,provider:this.provider,onClose:()=>this.$emit("close")},{default:()=>[o("div",{class:this.ns.b("left")},[o("ion-icon",{name:"list-outline"},null)]),o("div",{class:this.ns.b("center")},[o("div",{class:this.ns.e("caption")},[o(i("el-tag"),{class:this.ns.e("status"),type:sD[n]},{default:()=>[iD[n]]}),e]),s,o("div",{class:this.ns.e("create-time")},[t])])]})}});var rD=Object.defineProperty,cD=(e,t,a)=>(((e,t,a)=>{t in e?rD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dD{constructor(){cD(this,"component",lD),cD(this,"router",Xi())}render(e){return r(this.component,{provider:this,...e})}async onClick(e,t){await ibiz.hub.notice.internalMessage.markRead(e);const a=ibiz.env.isMob?e.mobile_url:e.url;return this.openViewByUrl(a)}async openRedirectView(e,t){await ibiz.hub.notice.internalMessage.markRead(e),this.openViewByUrl(t)}openViewByUrl(e){if(e){if(e.startsWith("view://")){const{viewId:t,context:a,params:n}=go(e);a.srfkeepnull=!0,ibiz.commands.execute(fo.TAG,t,Nt.create(a),n)}else if(e.startsWith("route://")){const t="/".concat(e.split("route://")[1]);this.router.push(t)}return!0}return!1}}const uD=a({name:"IBizInternalMessageJSON",props:{message:{type:Object,required:!0},provider:{type:Object,required:!0}},emits:{close:()=>!0},setup(e,{emit:t}){const a=B("internal-message-json"),n=l((()=>e.message.content&&"JSON"===e.message.content_type?JSON.parse(e.message.content):null)),o=l((()=>{var t;return(ibiz.env.isMob?e.message.mobile_url:e.message.url)||(null==(t=n.value)?void 0:t.redirecturl)})),i=l((()=>{if(o.value)return[{icon:"link-outline",key:"openRedirectView",tooltip:ibiz.i18n.t("panelComponent.userMessage.internalMessageJson.jumpToView")}]}));return{ns:a,jsonContent:n,toolbarItems:i,redirectUrl:o,onToolbarClick:a=>{"openRedirectView"===a&&(e.provider.openRedirectView(e.message,o.value),t("close"))}}},render(){var e,t;let a=null;return a=(null==(e=this.jsonContent)?void 0:e.html)?o("div",{class:this.ns.e("content"),innerHTML:this.jsonContent.html},null):(null==(t=this.jsonContent)?void 0:t.todoid)?o("div",{class:this.ns.e("content")},[o("div",{class:this.ns.b("todo")},[o("div",{class:this.ns.e("header")},[o("div",{class:this.ns.e("title")},["".concat(this.jsonContent.title).concat(this.jsonContent.param05)]),o("div",{class:this.ns.e("state")},[o(i("el-tag"),null,{default:()=>[this.jsonContent.todostatetext]})])]),o("div",{class:this.ns.e("content")},[ibiz.i18n.t("panelComponent.userMessage.internalMessageJson.todoContent",{createmanname:this.jsonContent.createmanname,processdate:this.jsonContent.processdate})])])]):o("div",{class:this.ns.e("content")},[ibiz.i18n.t("panelComponent.userMessage.internalMessageJson.missingHtml")]),o(i("iBizInternalMessageContainer"),{class:[this.ns.b()],message:this.message,provider:this.provider,clickable:!!this.redirectUrl,toolbarItems:this.toolbarItems,onToolbarClick:this.onToolbarClick,onClose:()=>this.$emit("close")},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?a:{default:()=>[a]});var n}}),pD=a({name:"IBizInternalMessageContainer",props:{message:{type:Object,required:!0},provider:{type:Object,required:!0},clickable:{type:Boolean,default:void 0},toolbarItems:{type:Array,default:()=>[]}},emits:{toolbarClick:e=>!0,close:()=>!0},setup(e,{emit:t}){const a=B("internal-message-container"),n=l((()=>"RECEIVED"===e.message.status)),o=l((()=>{const t=[...e.toolbarItems];return n.value&&t.push({key:"read",icon:"checkmark-done-outline",tooltip:ibiz.i18n.t("panelComponent.userMessage.internalMessageContainer.markAsRead")}),t})),i=l((()=>void 0===e.clickable?ibiz.env.isMob?!!e.message.mobile_url:!!e.message.url:e.clickable));return{ns:a,isUnread:n,isClickable:i,finalToolbarItems:o,onToolbarClick:(a,n)=>{a.stopPropagation(),"read"===n?ibiz.hub.notice.internalMessage.markRead(e.message):t("toolbarClick",n)},onClick:async a=>{if(i.value&&e.provider.onClick){await e.provider.onClick(e.message,a)&&t("close")}}}},render(){var e,t;return o("div",{class:[this.ns.b(),this.isClickable?this.ns.m("clickable"):"",this.isUnread?this.ns.m("unread"):""],onClick:this.onClick},[null==(t=(e=this.$slots).default)?void 0:t.call(e),o("div",{class:this.ns.b("toolbar")},[this.finalToolbarItems.map((e=>o(i("iBizIcon"),{class:this.ns.be("toolbar","button"),icon:{imagePath:"svg/read.svg"},baseDir:"iconfont",title:zt(e.tooltip),onClick:t=>this.onToolbarClick(t,e.key)},null)))]),o("div",{class:this.ns.e("unread-tag")},null),this.isClickable&&o("ion-icon",{class:this.ns.e("click-tag"),name:"chevron-forward-outline"},null)])}});var hD=Object.defineProperty,mD=(e,t,a)=>(((e,t,a)=>{t in e?hD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vD extends dD{constructor(){super(...arguments),mD(this,"component",uD)}async onClick(e,t){if(!await super.onClick(e,t)&&"JSON"===e.content_type&&e.content){const t=JSON.parse(e.content);if(t.redirecturl)return this.openRedirectView(e,t.redirecturl),!0}return!0}}const bD=a({name:"IBizInternalMessageHTML",props:{message:{type:Object,required:!0},provider:{type:Object,required:!0}},emits:{close:()=>!0},setup:e=>({ns:B("internal-message-html"),msgContent:l((()=>ys(e.message.content)))}),render(){return o(i("iBizInternalMessageContainer"),{class:[this.ns.b()],message:this.message,provider:this.provider,onClose:()=>this.$emit("close")},{default:()=>[o("div",{class:this.ns.e("content"),innerHTML:this.msgContent},null)]})}});var gD=Object.defineProperty,fD=(e,t,a)=>(((e,t,a)=>{t in e?gD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class wD extends dD{constructor(){super(...arguments),fD(this,"component",bD)}async onClick(e,t){if(!await super.onClick(e,t)&&"JSON"===e.content_type&&e.content){const t=JSON.parse(e.content);if(t.redirecturl)return this.openRedirectView(e,t.redirecturl),!0}return!0}}const yD=a({name:"IBizInternalMessageText",props:{message:{type:Object,required:!0},provider:{type:Object,required:!0}},emits:{close:()=>!0},setup:()=>({ns:B("internal-message-text")}),render(){const{title:e,create_time:t,content:a}=this.message;return o(i("iBizInternalMessageContainer"),{class:[this.ns.b()],message:this.message,provider:this.provider,onClose:()=>this.$emit("close")},{default:()=>[o("div",{class:this.ns.e("caption")},[e]),!!a&&o("div",{class:this.ns.e("content")},[a]),o("div",{class:this.ns.e("create-time")},[t])]})}});var CD=Object.defineProperty,ID=(e,t,a)=>(((e,t,a)=>{t in e?CD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class DD extends dD{constructor(){super(...arguments),ID(this,"component",yD)}}const ED=a({name:"IBizInternalMessageTab",props:{controller:{type:Object,required:!0},showPopover:{type:Boolean,required:!0}},emits:{hiddenPopover:()=>!0},setup(e,{emit:t}){var a;const o=B("internal-message-tab"),i=e.controller,s="".concat(null==(a=ibiz.appData)?void 0:a.context.srfsystemid,"-unreadOnly"),l=n(!1);ibiz.mc.command.internalMessage.on((async e=>{ibiz.log.debug("mqtt internalMessage: ",e),"INTERNALMESSAGE"===e.subtype&&(l.value=!0)})),c((()=>e.showPopover),(e=>{e&&l.value&&(i.load(),i.refreshUnreadCount(),l.value=!1)}));const r=n([]),h=u({total:0,pageSize:0,unreadOnly:i.unreadOnly}),m=()=>{r.value=pi(i.messages),h.total=i.total,h.pageSize=i.size};m();const v=e=>{h.unreadOnly=e};i.evt.on("dataChange",m),i.evt.on("unreadOnlyChange",v),p((()=>{i.evt.off("dataChange",m),i.evt.off("unreadOnlyChange",v)}));return d((()=>{(()=>{const e=localStorage.getItem(s);e&&("true"===e?(h.unreadOnly=!0,i.unreadOnly=!0):(h.unreadOnly=!1,i.unreadOnly=!1))})(),i.load()})),{ns:o,allItems:r,state:h,hiddenPopover:()=>{t("hiddenPopover")},showMore:()=>{i.loadMore()},switchChange:()=>{i.toggleUnReadOnly(),localStorage.setItem(s,i.unreadOnly.toString())}}},render(){const e=this.state.total-this.allItems.length;return o("div",{class:[this.ns.b()]},[o("div",{class:this.ns.b("content")},[this.allItems.length>0&&this.allItems.map((e=>{let t;try{t=wo(e)}catch(e){ibiz.log.error(e)}return t?t.render({class:[this.ns.e("item")],message:e,onClose:this.hiddenPopover}):o("div",{class:this.ns.e("item")},[ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.noSupportType",{type:e.content_type})])})),0===this.allItems.length&&o("div",{class:this.ns.e("nodata")},[ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.notificationYet")]),e>0&&o("div",{class:this.ns.e("load-more"),onClick:this.showMore},[ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.loadMore",{length:e})])]),o("div",{class:this.ns.b("footer")},[o(i("el-switch"),{value:this.state.unreadOnly,onChange:this.switchChange,class:this.ns.be("footer","switch")},null)," ",ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.onlyShowUnread")])])}});const SD=a({name:"IBizUserMessage",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("user-message"),a=e.controller,o=ibiz.hub.notice,i=n(!1);let s=0;o.internalMessage.ns=t,o.internalMessage.provider=new dD;const l=n("notification"),r=e.modelData.sysImage||{imagePath:"svg/message.svg"},c=n(),u=n(o.total),h=e=>{u.value=e};o.evt.on("totalChange",h);const m=()=>{if("hidden"===document.visibilityState)s=(new Date).getTime();else{((new Date).getTime()-s)/1e3>300&&(async()=>{const e=await ibiz.net.get("/appdata",ibiz.appUtil.getAppContext());e.ok&&(ibiz.appData=e.data,Zi())})()}};return d((()=>{document.addEventListener("visibilitychange",m)})),p((()=>{o.evt.off("totalChange",h),document.removeEventListener("visibilitychange",m)})),{ns:t,c:a,noticeController:o,noticeNum:u,popoverRef:c,showPopover:i,sysImage:r,currentTab:l,hiddenPopover:()=>{c.value.hide()},onBatchReadClick:()=>{o.internalMessage.batchMarkRead()}}},render(){return o("div",{title:zt(ibiz.i18n.t("panelComponent.userMessage.notice")),class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[o(i("el-popover"),{ref:"popoverRef","popper-class":this.ns.b("popover"),placement:"bottom",trigger:"click",visible:this.showPopover,"onUpdate:visible":e=>this.showPopover=e},{reference:()=>o(i("el-badge"),{class:this.ns.e("badge"),value:this.noticeNum,hidden:0===this.noticeNum},{default:()=>[o(i("i-biz-icon"),{id:Co.MESSAGE,class:[this.ns.e("image")],icon:this.sysImage},null)]}),default:()=>o("div",{class:this.ns.b("popover-content-box")},[o(i("el-tabs"),{class:this.ns.b("popover-content"),modelValue:this.currentTab,"onUpdate:modelValue":e=>this.currentTab=e},{default:()=>[o(i("el-tab-pane"),{label:ibiz.i18n.t("panelComponent.userMessage.notice"),name:"notification"},{default:()=>[o(ED,{controller:this.noticeController.internalMessage,showPopover:this.showPopover,onHiddenPopover:this.hiddenPopover},null)]}),o(i("el-tab-pane"),{label:ibiz.i18n.t("panelComponent.userMessage.backendTasks"),name:"async-action"},{default:()=>[o($I,{controller:this.noticeController.asyncAction,showPopover:this.showPopover,onHiddenPopover:this.hiddenPopover},null)]})]}),o("div",{class:this.ns.b("popover-icons")},[o(i("iBizIcon"),{class:this.ns.b("popover-icons-read"),icon:{imagePath:"svg/read.svg"},baseDir:"iconfont",title:zt(ibiz.i18n.t("panelComponent.userMessage.allRead")),onClick:this.onBatchReadClick},null)])])})])}});var xD=Object.defineProperty,PD=(e,t,a)=>(((e,t,a)=>{t in e?xD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kD{constructor(){PD(this,"component","IBizUserMessage")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const TD=oe(SD,(function(e){e.component(SD.name,SD),e.component(XI.name,XI),Io("DEIMPORTDATA2",(()=>new oD)),Io("DEEXPORTDATA",(()=>new oD)),Io("DEFAULT",(()=>new oD)),function(e){e.component(pD.name,pD),e.component(lD.name,lD),e.component(uD.name,uD),e.component(bD.name,bD),e.component(yD.name,yD),yo("DEFAULT",(()=>new dD)),yo("JSON",(()=>new vD)),yo("HTML",(()=>new wD)),yo("TEXT",(()=>new DD))}(e),po("RAWITEM_USERMESSAGE",(()=>new kD))}));var zD=Object.defineProperty,AD=(e,t,a)=>(((e,t,a)=>{t in e?zD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class OD extends uo{constructor(){super(...arguments),AD(this,"searchFrom")}get searchButtonStyle(){return this.searchFrom.model.searchButtonStyle||"DEFAULT"}get advanceSearch(){return!!this.searchFrom.model.enableAdvanceSearch}get storedFilters(){var e;return(null==(e=this.searchFrom)?void 0:e.state.storedFilters)||[]}async onInit(){await super.onInit();const e=this.panel.container;if(!e)throw new _t(ibiz.i18n.t("panelComponent.searchformButtons.errMessage"));this.searchFrom=e}onSearchButtonClick(){va.execAndResolved("search",{context:this.panel.context,params:this.panel.params,data:[],ctrl:this.searchFrom,view:this.panel.view},this.panel.context.srfappid)}onResetButtonClick(){va.execAndResolved("reset",{context:this.panel.context,params:this.panel.params,data:[],ctrl:this.searchFrom,view:this.panel.view},this.panel.context.srfappid)}}function MD(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const ND=a({name:"IBizSearchFormButtons",props:{modelData:{type:Object,required:!0},controller:{type:OD,required:!0}},setup(e){var t,a;const n=B("searchform-buttons"),o=e.controller,i="DESIGN"===(null==(a=null==(t=o.panel)?void 0:t.context)?void 0:a.srfrunmode);return{c:o,ns:n,onSearchButtonClick:()=>{i||o.onSearchButtonClick()},onResetButtonClick:()=>{o.onResetButtonClick()},saveFilterConfirm:()=>{si.prompt(ibiz.i18n.t("panelComponent.searchformButtons.enterPrompt"),ibiz.i18n.t("panelComponent.searchformButtons.queryPrompt"),{confirmButtonText:ibiz.i18n.t("app.save"),cancelButtonText:ibiz.i18n.t("app.cancel")}).then((({value:e})=>{o.searchFrom.storeFilter(e)}))},onAdvanceSearch:()=>{o.searchFrom.evt.emit("openAdvanceSearch",void 0)}}},render(){let e,t;return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},["SEARCHONLY"===this.controller.searchButtonStyle?o(i("el-button"),{onClick:this.onSearchButtonClick},MD(e=ibiz.i18n.t("app.search"))?e:{default:()=>[e]}):o(i("el-dropdown"),{"split-button":!0,type:"primary",onClick:this.onSearchButtonClick},{default:()=>o("span",{class:this.ns.b("label")},[ibiz.i18n.t("app.search")]),dropdown:()=>{let e,t;return o(i("el-dropdown-menu"),null,{default:()=>[o(i("el-dropdown-item"),{onClick:this.onResetButtonClick},MD(e=ibiz.i18n.t("app.reset"))?e:{default:()=>[e]}),this.controller.searchFrom.state.enableStoredFilters&&o(i("el-dropdown-item"),{onClick:this.saveFilterConfirm},MD(t=ibiz.i18n.t("panelComponent.searchformButtons.saveCondition"))?t:{default:()=>[t]}),this.controller.storedFilters.length>0&&this.controller.storedFilters.map(((e,t)=>o(i("el-dropdown-item"),{class:this.ns.b("filter-item"),onClick:()=>{this.controller.searchFrom.applyStoredFilter(t)}},{default:()=>[o("span",{class:this.ns.be("filter-item","text")},[e.name,o("ion-icon",{class:this.ns.be("filter-item","remove"),onClick:e=>{e.stopPropagation(),this.controller.searchFrom.removeStoredFilter(t)},name:"close-outline"},null)])]})))]})}}),this.controller.advanceSearch&&o(i("el-button"),{onClick:this.onAdvanceSearch},MD(t=ibiz.i18n.t("app.advanceSearch"))?t:{default:()=>[t]})])}});var BD=Object.defineProperty,_D=(e,t,a)=>(((e,t,a)=>{t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class RD{constructor(){_D(this,"component","IBizSearchFormButtons")}async createController(e,t,a){const n=new OD(e,t,a);return await n.init(),n}}const LD=oe(ND,(function(e){e.component(ND.name,ND),po("RAWITEM_SEARCHFORM_BUTTONS",(()=>new RD))})),jD=a({name:"IBizViewMessage",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("view-message"),a=e.controller,n=he(),{view:o}=n;return{ns:t,c:a,view:o}},render(){const e=this.view;if(e.state.isCreated){const t=e.state.viewMessages.BODY;if(null==t?void 0:t.length)return o(i("view-message"),{class:[this.ns.e("body-message")],messages:t},null)}return null}});var VD=Object.defineProperty,FD=(e,t,a)=>(((e,t,a)=>{t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class UD{constructor(){FD(this,"component","IBizViewMessage")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const HD=oe(jD,(function(e){e.component(jD.name,jD),po("RAWITEM_VIEW_MESSAGE",(()=>new UD))})),qD=a({name:"IBizPanelStaticCarousel",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){var t;const a=B("panel-static-carousel"),o=e.modelData,i=n([]),s=n(!0),l=n(3e3),r=n("DEFAULT"),c=e=>{const t=e.find((e=>Object.is(e.key,"autoplay")));t&&(s.value=!!Object.is(t.value,"1"));const a=e.find((e=>Object.is(e.key,"timespan")));a&&(l.value=Number(a.value)||0);const n=e.find((e=>Object.is(e.key,"showMode")));n&&n.value&&(r.value=n.value)};if(null==(t=o.rawItem)?void 0:t.rawItemParams){let e=[];const t=o.rawItem.rawItemParams;let a=0;t.findIndex((e=>Object.is(e.key,"autoplay")))>=0&&(a+=1),t.findIndex((e=>Object.is(e.key,"timespan")))>=0&&(a+=1),t.findIndex((e=>Object.is(e.key,"showMode")))>=0&&(a+=1),a>0?(e=t.slice(0,-a),c(t.slice(-a))):(e=t,c(t)),i.value=e.map((e=>{const{id:t,key:a,sysImage:n}=e;return{id:t,name:a,imgUrl:(null==n?void 0:n.imagePath)||(null==n?void 0:n.rawContent),cssClass:null==n?void 0:n.cssClass,linkPath:e.linkPath}}))}return{ns:a,carouselData:i,isAuto:s,timeSpan:l,showMode:r}},render(){return o("div",{class:this.ns.b()},[o(i("iBizCarouselComponent"),{carouselData:this.carouselData,isAuto:this.isAuto,timeSpan:this.timeSpan,showMode:this.showMode},null)])}});var GD=Object.defineProperty,WD=(e,t,a)=>(((e,t,a)=>{t in e?GD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class KD{constructor(){WD(this,"component","IBizPanelStaticCarousel")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const YD=oe(qD,(function(e){e.component(qD.name,qD),po("RAWITEM_STATIC_CAROUSEL",(()=>new KD))}));var XD=Object.defineProperty,$D=(e,t,a)=>(((e,t,a)=>{t in e?XD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class JD extends ho{constructor(){super(...arguments),$D(this,"key",ei()),$D(this,"messageModes"),$D(this,"messageMap",new Map),$D(this,"alertParams",{data:{action:"VIEW",entity:"",key:"",time:0,username:""}})}}var QD=Object.defineProperty,ZD=(e,t,a)=>(((e,t,a)=>{t in e?QD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class eE extends uo{constructor(){super(...arguments),ZD(this,"operator",[]),ZD(this,"rawItemParams",{}),ZD(this,"showMode","default"),ZD(this,"messageModeMap",new Map([["OPENDATA","VIEW"],["EDITDATA","EDIT"],["NOTICERELOAD","UPDATE"]]))}createState(){var e;return new JD(null==(e=this.parent)?void 0:e.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.showMode=this.rawItemParams.showmode,await this.getOperator()}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}initMessageModes(e){if(e.includes("DISPLAYOPPERSON")){1===e.length?this.state.messageModes=["VIEW","EDIT","UPDATE"]:this.state.messageModes=e.map((e=>this.messageModeMap.get(e)||e));const t=this.panel.context.srfusername;this.state.messageMap.set(t,{username:t})}}updateMessage(e){this.state.key=ei();const{data:t}=e;"CLOSE"===t.action?this.state.messageMap.delete(t.username):this.state.messageMap.set(t.username,t),this.state.alertParams=e}async getOperator(){if("avatar"===this.showMode){const e=await ibiz.hub.getApp(this.panel.context.srfappid);this.operator=await e.codeList.get("SysOperator",this.panel.context,this.panel.params)}}getIconUrlByName(e){var t;let a="";const n=this.operator.find((t=>t.text===e));return n&&(a=(null==(t=n.data)?void 0:t.iconurl)||""),a}getDownloadUrl(e){if(!e)return"";const t=JSON.parse(e);if(0===t.length)return"";const{downloadUrl:a}=ibiz.util.file.calcFileUpDownUrl(this.panel.context,this.panel.params);return a.replace("%fileId%",t[0].id)}}const tE=a({name:"IBizCoopPos",props:{modelData:{type:Object,required:!0},controller:{type:eE,required:!0}},setup(e){const t=e.controller,a=B("coop-pos"),i=n([]),s=l((()=>[...t.state.messageMap.values()].filter((e=>!e.action||(t.state.messageModes||[]).includes(e.action)))));return{ns:a,c:t,messages:s,renderItem:e=>{let n=ibiz.util.text.abbreviation(e.username)||e.username;if("avatar"===t.showMode){const s=t.getIconUrlByName(e.username),l=t.getDownloadUrl(s);l&&!i.value.includes(l)&&(n=o("img",{class:a.e("img"),src:l,onError:()=>(e=>{i.value.push(e)})(l)},null))}return n}}},render(){return o("div",{class:[this.ns.b(),...this.controller.containerClass]},[this.c.state.messageModes?o("div",{class:this.ns.e("on-line-editing")},[this.messages.map((e=>o("div",{class:this.ns.em("on-line-editing","person"),title:e.action?ibiz.i18n.t("panelComponent.coopPos.".concat(e.action.toLowerCase()),{username:e.username}):"",style:"background-color: ".concat(ibiz.util.text.stringToHexColor(e.username))},[this.renderItem(e)])))]):o(i("iBizCoopAlert"),w({key:this.c.state.key},this.c.state.alertParams),null)])}});var aE=Object.defineProperty,nE=(e,t,a)=>(((e,t,a)=>{t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class oE{constructor(){nE(this,"component","IBizCoopPos")}async createController(e,t,a){const n=new eE(e,t,a);return await n.init(),n}}const iE=oe(tE,(function(e){e.component(tE.name,tE),po("RAWITEM_COOP_POS",(()=>new oE))}));var sE=Object.defineProperty,lE=(e,t,a)=>(((e,t,a)=>{t in e?sE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class rE extends uo{constructor(){super(...arguments),lE(this,"rawItemParams",{})}async onInit(){await super.onInit(),this.handleRawItemParams()}handleRawItemParams(){var e;const t=null==(e=this.model.rawItem)?void 0:e.rawItemParams;Array.isArray(t)&&t.forEach((e=>{const t=e.key,a=e.value;t&&a&&(this.rawItemParams[t.toLowerCase()]=a)}))}}const cE=a({name:"IBizViewMsgPos",props:{modelData:{type:Object,required:!0},controller:{type:rE,required:!0}},setup:()=>({ns:B("view-msg-pos"),view:he().view}),render(){const e=this.controller;if(!this.view.state.isCreated)return;const t=e.rawItemParams.position||"BODY",a="true"===e.rawItemParams.scroll,n=this.view.state.viewMessages[t];return(null==n?void 0:n.length)?o("div",{class:this.ns.b()},[o(i("view-message"),{messages:n,scroll:a,context:e.panel.context,params:e.panel.params,controller:e.panel.view.viewMsgController},null)]):null}});var dE=Object.defineProperty,uE=(e,t,a)=>(((e,t,a)=>{t in e?dE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class pE{constructor(){uE(this,"component","IBizViewMsgPos")}async createController(e,t,a){const n=new rE(e,t,a);return await n.init(),n}}const hE=oe(cE,(function(e){e.component(cE.name,cE),po("RAWITEM_VIEWMSG_POS",(()=>new pE))})),mE=a({name:"IBizUserAction",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){var t;const a=B("user-action"),n=e.controller,o={SETTING:{imagePath:"svg/setting.svg"},HELPER:{imagePath:"svg/helper.svg"},CUSTOM:{imagePath:"svg/custom-workbench.svg"}};let i=e.modelData.sysImage;if(!i&&e.modelData&&e.modelData.rawItem){const t=e.modelData.rawItem.predefinedType;t&&(i=o[t])}let s,l="PARENT";(null==(t=e.modelData.rawItem)?void 0:t.rawItemParams)&&e.modelData.rawItem.rawItemParams.find((e=>{var t;return!("noprivmode"!==(null==(t=e.key)?void 0:t.toLowerCase())||!e.value)&&(l=e.value,!0)}));n.panel.view.evt.on("onMounted",(()=>{(()=>{const t=n.panel.view.getController("appmenu");if(t&&(s=t.allAppMenuItems.find((t=>t.id===e.modelData.id)),s&&s.accessKey)){const e=ibiz.hub.getApp(n.panel.context.srfappid).authority.calcByResCode(s.accessKey);n.state.visible=e,n.parent&&"PARENT"===l&&(n.parent.state.visible=e)}})()}));return{ns:a,c:n,sysImage:i,onClick:async e=>{if(s){const t=n.panel.context.clone(),a=n.panel.params;t.srfappid=s.appId||ibiz.env.appId,await ibiz.commands.execute(bo.TAG,s.appFuncId,t,a,{event:e})}}}},render(){return o("div",{class:this.ns.b(),title:zt(this.modelData.caption)},[o(i("i-biz-icon"),{class:[this.ns.e("image")],icon:this.sysImage,onClick:e=>this.onClick(e)},null)])}});var vE=Object.defineProperty,bE=(e,t,a)=>(((e,t,a)=>{t in e?vE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gE{constructor(){bE(this,"component","IBizUserAction")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const fE=e("aU",oe(mE,(function(e){e.component(mE.name,mE),po("RAWITEM_SETTING",(()=>new gE)),po("RAWITEM_HELPER",(()=>new gE)),po("RAWITEM_CUSTOM",(()=>new gE))}))),wE=a({name:"IBizDataImportShell",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("data-import-shell"),a=e.controller;return{ns:t,c:a,onDismiss:()=>{a.panel.view.closeView()}}},render(){const{deDataImport:e,appDataEntity:t}=this.c.panel.view.state,a=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],n=e.enableCustomized?"DataImport2":"DataImport";return r(i(n),{dismiss:this.onDismiss,dataImport:e,appDataEntity:t,context:this.c.panel.context,params:this.c.panel.params,class:a})}});var yE=Object.defineProperty,CE=(e,t,a)=>(((e,t,a)=>{t in e?yE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class IE{constructor(){CE(this,"component","IBizDataImportShell")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const DE=oe(wE,(function(e){e.component(wE.name,wE),po("RAWITEM_DATA_IMPORT",(()=>new IE))})),EE=a({name:"IBizShortCut",components:{draggable:Ui},props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){const t=B("short-cut"),a=C().proxy,s=Xi(),l=ibiz.util.shortCut,r=n(!0),c=n(!1),h=u(l.data),m={newIndex:0,oldIndex:0},v=new Map([["ROUTE_MODAL","INDEXVIEWTAB_POPUPMODAL"],["MODAL","POPUPMODAL"],["DRAWER","DRAWER_RIGHT"]]),b=e=>{0===h.length&&c.value&&(c.value=!1),a.$forceUpdate()};d((()=>{r.value="vertical"!==l.mode,ibiz.util.shortCut.onChange(b)})),p((()=>{ibiz.util.shortCut.offChange(b)}));const g=()=>{r.value=!r.value,r.value?(c.value=!1,l.setShortCutMode("horizontal")):l.setShortCutMode("vertical")},f=e=>{e.moved?ibiz.util.shortCut.changeIndex(e.moved.newIndex,e.moved.oldIndex):e.added?m.newIndex=e.added.newIndex:e.removed&&(m.oldIndex=e.removed.oldIndex,ibiz.util.shortCut.changeIndex(m.newIndex,m.oldIndex))},w=a=>o(Ui,{itemKey:"key",class:[t.e("draggable"),t.is("horizontal",!a),t.is("vertical",a)],modelValue:h,group:e.controller.model.id,onChange:e=>f(e)},{item:({element:e,index:n})=>{if(a&&!r.value||a&&r.value&&n>5||!a&&n<6)return o("div",{class:[t.e("item"),t.e("draggable-item")],title:zt(e.caption),onClick:()=>(e=>{if(c.value=!1,"ROUTE"===e.openMode){const t=e.fullPath.substring(1);s.currentRoute.value.fullPath!==t&&s.push({path:e.fullPath.substring(1)})}else ibiz.commands.execute(fo.TAG,e.appViewId,Nt.create(e.context),e.params,{openMode:v.get(e.openMode)})})(e)},[o("svg",{viewBox:"0 0 16 16",class:["drag-icon","icon"],xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",focusable:"false"},[o("g",{id:"drag-icon/drag--","stroke-width":"1","fill-rule":"evenodd"},[o("g",{id:"drag-icon",transform:"translate(5 1)","fill-rule":"nonzero"},[o("path",{d:"M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z",id:"drag-icon-air"},null)])])]),e.icon?o(i("iBizIcon"),{class:["caption-icon","icon"],icon:e.icon},null):o("ion-icon",{class:["caption-icon","icon"],name:"ellipsis-horizontal-circle-outline"},null),o("div",{class:t.em("item","caption")},[e.caption]),o("ion-icon",{name:"close-outline",class:["close-icon","icon"],onClick:t=>((e,t)=>{e.stopPropagation(),ibiz.util.shortCut.removeShortCut(t)})(t,e.key)},null)])}});return{ns:t,data:h,isShowToolbar:r,onChange:f,renderDraggable:w,renderMore:()=>o(i("el-popover"),{visible:c.value,"onUpdate:visible":e=>c.value=e,placement:"top-start",trigger:"click",width:"auto","popper-class":t.e("popover")},{reference:()=>o("div",{class:[t.e("more"),t.e("operate")]},[o(i("el-tooltip"),{content:ibiz.i18n.t("app.more"),placement:"top"},{default:()=>[o("div",null,[o("span",{class:t.em("more","caption")},[r.value?"6/".concat(h.length):h.length]),o("i",{class:["fa","icon","more-icon",c.value?"fa-angle-double-down":"fa-angle-double-up"],"aria-hidden":"true"},null)])]})]),default:()=>[w(!0),o("div",{class:[t.e("item"),t.e("action-item"),t.is("hidden",r.value)],onClick:g},[o("ion-icon",{class:["expand-icon","icon"],name:"chevron-back-outline"},null),o("div",{class:t.em("item","caption")},[ibiz.i18n.t("panelComponent.shortCut.expandToolbar")])])]}),renderRecover:()=>o("div",{class:[t.e("recover"),t.e("operate")],onClick:g},[o(i("el-tooltip"),{effect:"dark",content:ibiz.i18n.t("app.retract"),placement:"top"},{default:()=>[o("ion-icon",{class:["recover-icon","icon"],name:"chevron-forward-outline"},null)]})])}},render(){return o("div",{class:[this.ns.b(),...this.controller.containerClass,this.ns.is("conceal",0===this.data.length)]},[this.isShowToolbar&&this.renderDraggable(!1),(!this.isShowToolbar||this.data.length>6)&&this.renderMore(),this.isShowToolbar&&this.renderRecover()])}});var SE=Object.defineProperty,xE=(e,t,a)=>(((e,t,a)=>{t in e?SE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class PE{constructor(){xE(this,"component","IBizShortCut")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const kE=oe(EE,(function(e){e.component(EE.name,EE),po("RAWITEM_SHORTCUT",(()=>new PE))}));var TE=Object.defineProperty,zE=(e,t,a)=>(((e,t,a)=>{t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class AE extends ho{constructor(){super(...arguments),zE(this,"code",""),zE(this,"image",""),zE(this,"state",""),zE(this,"loading",!1),zE(this,"error")}}var OE=Object.defineProperty,ME=(e,t,a)=>(((e,t,a)=>{t in e?OE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class NE extends uo{constructor(){super(...arguments),ME(this,"captcha",u({"Captcha-State":"","Captcha-Code":""}))}createState(){var e;return new AE(null==(e=this.parent)?void 0:e.state)}async panelStateNotify(e){super.panelStateNotify(e),this.data.captcha=this.captcha}async onInit(){super.onInit(),await this.loadCaptcha(),this.panel.view.evt.on("onAfterLogin",(e=>{e.ok||e.panelDataParent&&e.panelDataParent!==this.dataParent.model.id||(this.loadCaptcha(),this.state.code="")}))}async validate(){return this.state.code?(this.state.error=void 0,!0):(this.state.error="请输入验证码",!1)}onChange(){Object.assign(this.captcha,{"Captcha-State":this.state.state,"Captcha-Code":this.state.code})}async loadCaptcha(){this.state.loading=!0;const e={url:"".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId,"/auths/captcha"),method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"},data:{}};try{const t=await as(e);200===t.status&&t.data&&(this.state.state=t.data.state,this.state.image=t.data.image)}catch(e){this.state.state="",this.state.image=""}finally{this.state.loading=!1,this.onChange()}}}const BE=a({name:"IBizAuthCaptcha",props:{modelData:{type:Object,required:!0},controller:{type:NE,required:!0}},setup(e){const t=B("auth-captcha"),a=e.controller,n=l((()=>{let n=[t.b(),t.m(a.model.id)];return n=[...n,...e.controller.containerClass,t.is("hidden",!e.controller.state.visible),t.is("error",!!a.state.error)],n}));return{c:a,ns:t,classArr:n,onClick:()=>{a.state.loading||a.loadCaptcha()},onChange:()=>{a.onChange(),a.validate()}}},render(){return o("div",{class:this.classArr},[o(i("el-input"),{modelValue:this.c.state.code,"onUpdate:modelValue":e=>this.c.state.code=e,class:this.ns.e("captcha"),onInput:this.onChange,onBlur:this.onChange,placeholder:"验证码"},null),g(o(i("el-image"),{src:this.c.state.image,class:this.ns.e("image"),onClick:this.onClick,title:zt("点击图片刷新")},{error:()=>o("div",{onClick:this.onClick,class:[this.ns.em("image","hint"),this.ns.is("loading",this.c.state.loading)]},[this.c.state.loading?"加载中...":"加载失败"])}),[[y("loading"),this.c.state.loading]]),this.c.state.error&&o("div",{class:this.ns.e("error")},[this.c.state.error])])}});var _E=Object.defineProperty,RE=(e,t,a)=>(((e,t,a)=>{t in e?_E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class LE{constructor(){RE(this,"component","IBizAuthCaptcha")}async createController(e,t,a){const n=new NE(e,t,a);return await n.init(),n}}const jE=oe(BE,(function(e){e.component(BE.name,BE),po("RAWITEM_AUTH_CAPTCHA",(()=>new LE))}));var VE=Object.defineProperty,FE=(e,t,a)=>(((e,t,a)=>{t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class UE extends ho{constructor(){super(...arguments),FE(this,"buttonsState")}}class HE extends uo{createState(){var e;return new UE(null==(e=this.parent)?void 0:e.state)}get data(){return this.dataParent.data}constructor(e,t,a){super(e,t,a),this.state.buttonsState=new Do}async onInit(){await super.onInit(),await this.initButtonsState()}async initButtonsState(){var e;const{buttonListType:t,uiactionGroup:a,panelButtons:n}=this.model;"UIACTIONGROUP"===t?null==(e=null==a?void 0:a.uiactionGroupDetails)||e.forEach((e=>{if(e.uiactionId){const t=new vo(e.id,e.appId,e.uiactionId,e);this.state.buttonsState.addState(e.id,t)}})):null==n||n.forEach((e=>{if(e.uiactionId){const t=new vo(e.id,this.model.appId,e.uiactionId);this.state.buttonsState.addState(e.id,t)}})),await this.state.buttonsState.init()}async dataChangeNotify(e){await this.state.buttonsState.update(this.panel.context,this.data,this.panel.model.appDataEntityId),super.dataChangeNotify(e)}async panelStateNotify(e){await this.state.buttonsState.update(this.panel.context,this.data,this.panel.model.appDataEntityId),super.panelStateNotify(e)}getModelById(e){var t;const{buttonListType:a,uiactionGroup:n,panelButtons:o}=this.model;return"UIACTIONGROUP"===a?null==(t=null==n?void 0:n.uiactionGroupDetails)?void 0:t.find((t=>t.id===e)):null==o?void 0:o.find((t=>t.id===e))}async handleClick(e,t){const a=this.getModelById(e);(null==a?void 0:a.uiactionId)&&await va.execAndResolved(a.uiactionId,{context:this.panel.context,params:{panelDataParent:this.dataParent.model.id,...this.panel.params},event:t,data:[this.data],view:this.panel.view,ctrl:this.panel,noWaitRoute:!0},a.appId||this.model.appId)}calcItemVisible(e){this.state.buttonsState.visible?super.calcItemVisible(e):this.state.visible=!1}calcItemDisabled(e){this.state.buttonsState.disabled?this.state.disabled=!0:super.calcItemDisabled(e)}}const qE=a({name:"IBizPanelButtonList",props:{modelData:{type:Object,required:!0},controller:{type:HE,required:!0}},setup(e){const t=B("panel-button-list"),a=e.controller;return{ns:t,handleClick:async(e,t)=>{null==t||t.stopPropagation(),a.handleClick(e,t)}}},render(){const{state:e}=this.controller;return e.visible?o(i("iBizButtonList"),{class:[this.ns.b(),...this.controller.containerClass],model:this.modelData,disabled:e.disabled,buttonsState:e.buttonsState,onClick:this.handleClick},null):null}});var GE=Object.defineProperty,WE=(e,t,a)=>(((e,t,a)=>{t in e?GE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class KE{constructor(){WE(this,"component","IBizPanelButtonList")}async createController(e,t,a){const n=new HE(e,t,a);return await n.init(),n}}const YE=oe(qE,(function(e){e.component(qE.name,qE),po("BUTTONLIST",(()=>new KE))})),XE=a({name:"IBizAuthSsO",props:{modelData:{type:Object,required:!0},controller:{type:uo,required:!0}},setup(e){var t;const a=B("auth-sso"),n=null==(t=e.controller.model.rawItem)?void 0:t.rawItemParams,o=null==n?void 0:n.map((e=>{const t=e.value?JSON.parse(e.value):{};return{key:e.key,sysImage:e.sysImage,title:t.title,params:t}}));return{ns:a,items:o,handleThridLogin:(e,t)=>{if(e)switch(e){case"DINGDING":(async()=>{ibiz.thirdAuth.auth("DINGTALK","THIRD")})();break;case"WXWORK":(async()=>{ibiz.thirdAuth.auth("WXWORK","THIRD")})();break;default:(async e=>{ibiz.thirdAuth.auth("OAUTH","THIRD",e)})(t)}}}},render(){return this.items&&this.items.length?o("div",{class:this.ns.b()},[this.items.map((e=>{var t;let a;return e.sysImage?a=o(i("iBizIcon"),{icon:e.sysImage},null):"DINGDING"===e.key?a=o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"651",width:"48",height:"48"},[o("defs",null,[o("style",{type:"text/css"},null)]),o("path",{d:"M512 2C230.2 2 2 230.2 2 512s228.2 510 510 510 510-228.2 510-510S793.3 2 512 2z m235.9 442c-1 4.6-3.6 10.8-7.2 19.1l-0.5 0.5c-21.6 45.8-77.3 135.5-77.3 135.5l-0.5-0.5-16.5 28.3h78.8L574.3 826.8l34-136h-61.8l21.6-90.2c-17.5 4.1-38.1 9.8-62.3 18 0 0-33 19.1-94.8-37.1 0 0-41.7-37.1-17.5-45.8 10.3-4.1 50-8.8 81.4-12.9 42.2-5.7 68.5-8.8 68.5-8.8s-130.3 2.1-161.2-3.1c-30.9-4.6-70.1-56.7-78.3-102 0 0-12.9-24.7 27.8-12.9 40.2 11.8 209.2 45.8 209.2 45.8S321.4 375 307 358.5c-14.4-16.5-42.8-89.6-39.2-134.5 0 0 1.5-11.3 12.9-8.2 0 0 161.8 74.2 272.5 114.4C664.5 371.4 760.8 392 747.9 444z",fill:"#3296FA","p-id":"652"},null)]):"WXWORK"===e.key&&(a=o("svg",{class:"icon",width:"200px",height:"200.00px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[o("path",{fill:"#36ab60",d:"M352.814545 385.396364m-33.512727 0a33.512727 33.512727 0 1 0 67.025455 0 33.512727 33.512727 0 1 0-67.025455 0Z"},null),o("path",{fill:"#36ab60",d:"M502.690909 384.465455m-33.512727 0a33.512727 33.512727 0 1 0 67.025454 0 33.512727 33.512727 0 1 0-67.025454 0Z"},null),o("path",{fill:"#36ab60",d:"M576.232727 534.341818m-23.272727 0a23.272727 23.272727 0 1 0 46.545455 0 23.272727 23.272727 0 1 0-46.545455 0Z"},null),o("path",{fill:"#36ab60",d:"M694.458182 536.203636m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z"},null),o("path",{fill:"#36ab60",d:"M512 0C229.003636 0 0 229.003636 0 512s229.003636 512 512 512 512-229.003636 512-512S794.996364 0 512 0z m-87.505455 630.225455c-26.996364 0-48.407273-5.585455-75.403636-11.17091l-75.403636 37.236364 21.410909-64.232727c-53.992727-37.236364-85.643636-85.643636-85.643637-145.221818 0-102.4 96.814545-182.458182 215.04-182.458182 105.192727 0 198.283636 64.232727 216.901819 150.807273-6.516364-0.930909-13.963636-0.930909-20.48-0.93091-102.4 0-182.458182 76.334545-182.458182 170.356364 0 15.825455 2.792727 30.72 6.516363 44.683636-7.447273 0-13.963636 0.930909-20.48 0.93091z m314.647273 75.403636l15.825455 53.992727-58.647273-32.581818c-21.410909 5.585455-42.821818 11.170909-64.232727 11.170909-102.4 0-182.458182-69.818182-182.458182-155.461818s80.058182-155.461818 182.458182-155.461818c96.814545 0 182.458182 69.818182 182.458182 155.461818 0 47.476364-31.650909 90.298182-75.403637 122.88z"},null)])),o("div",{class:[this.ns.e("sign-btn"),this.ns.m("WXWORK"===e.key?"wx":null==(t=e.key)?void 0:t.toLowerCase())],title:e.title,onClick:()=>this.handleThridLogin(e.key,e.params)},[a])}))]):o("div",{class:this.ns.b()},[o("div",{class:[this.ns.e("sign-btn"),this.ns.m("dingding")],onClick:()=>this.handleThridLogin("DINGDING"),title:ibiz.i18n.t("panelComponent.authSsO.dingLogin")},[o("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"651",width:"48",height:"48"},[o("defs",null,[o("style",{type:"text/css"},null)]),o("path",{d:"M512 2C230.2 2 2 230.2 2 512s228.2 510 510 510 510-228.2 510-510S793.3 2 512 2z m235.9 442c-1 4.6-3.6 10.8-7.2 19.1l-0.5 0.5c-21.6 45.8-77.3 135.5-77.3 135.5l-0.5-0.5-16.5 28.3h78.8L574.3 826.8l34-136h-61.8l21.6-90.2c-17.5 4.1-38.1 9.8-62.3 18 0 0-33 19.1-94.8-37.1 0 0-41.7-37.1-17.5-45.8 10.3-4.1 50-8.8 81.4-12.9 42.2-5.7 68.5-8.8 68.5-8.8s-130.3 2.1-161.2-3.1c-30.9-4.6-70.1-56.7-78.3-102 0 0-12.9-24.7 27.8-12.9 40.2 11.8 209.2 45.8 209.2 45.8S321.4 375 307 358.5c-14.4-16.5-42.8-89.6-39.2-134.5 0 0 1.5-11.3 12.9-8.2 0 0 161.8 74.2 272.5 114.4C664.5 371.4 760.8 392 747.9 444z",fill:"#3296FA","p-id":"652"},null)])]),o("div",{class:[this.ns.e("sign-btn"),this.ns.m("wx")],onClick:()=>this.handleThridLogin("WXWORK"),title:ibiz.i18n.t("panelComponent.authSsO.wechatLogin")},[o("svg",{class:"icon",width:"200px",height:"200.00px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[o("path",{fill:"#36ab60",d:"M352.814545 385.396364m-33.512727 0a33.512727 33.512727 0 1 0 67.025455 0 33.512727 33.512727 0 1 0-67.025455 0Z"},null),o("path",{fill:"#36ab60",d:"M502.690909 384.465455m-33.512727 0a33.512727 33.512727 0 1 0 67.025454 0 33.512727 33.512727 0 1 0-67.025454 0Z"},null),o("path",{fill:"#36ab60",d:"M576.232727 534.341818m-23.272727 0a23.272727 23.272727 0 1 0 46.545455 0 23.272727 23.272727 0 1 0-46.545455 0Z"},null),o("path",{fill:"#36ab60",d:"M694.458182 536.203636m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z"},null),o("path",{fill:"#36ab60",d:"M512 0C229.003636 0 0 229.003636 0 512s229.003636 512 512 512 512-229.003636 512-512S794.996364 0 512 0z m-87.505455 630.225455c-26.996364 0-48.407273-5.585455-75.403636-11.17091l-75.403636 37.236364 21.410909-64.232727c-53.992727-37.236364-85.643636-85.643636-85.643637-145.221818 0-102.4 96.814545-182.458182 215.04-182.458182 105.192727 0 198.283636 64.232727 216.901819 150.807273-6.516364-0.930909-13.963636-0.930909-20.48-0.93091-102.4 0-182.458182 76.334545-182.458182 170.356364 0 15.825455 2.792727 30.72 6.516363 44.683636-7.447273 0-13.963636 0.930909-20.48 0.93091z m314.647273 75.403636l15.825455 53.992727-58.647273-32.581818c-21.410909 5.585455-42.821818 11.170909-64.232727 11.170909-102.4 0-182.458182-69.818182-182.458182-155.461818s80.058182-155.461818 182.458182-155.461818c96.814545 0 182.458182 69.818182 182.458182 155.461818 0 47.476364-31.650909 90.298182-75.403637 122.88z"},null)])])])}});var $E=Object.defineProperty,JE=(e,t,a)=>(((e,t,a)=>{t in e?$E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class QE{constructor(){JE(this,"component","IBizAuthSsO")}async createController(e,t,a){const n=new uo(e,t,a);return await n.init(),n}}const ZE=oe(XE,(function(e){e.component(XE.name,XE),po("RAWITEM_AUTH_SSO",(()=>new QE))}));function eS(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const tS=a({name:"IBizIndexBlankPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=e.controller,a=B("index-blank-placeholder"),{id:n}=e.modelData,o=l((()=>{let t=[a.b(),a.m(n)];return t=[...t,...e.controller.containerClass,a.is("hidden",!e.controller.state.visible)],t}));return t.routeDepth&&ve((e=>{t.setVisible(!e.currentKey)}),t.routeDepth+1),{ns:a,classArr:o}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],s=o(i("iBizRow"),{slot:"content",layout:this.modelData.layout},eS(a=n.map((e=>{const t=e.props;return t&&t.controller?o(i("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},eS(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?o("style",{type:"text/css"},[this.controller.model.cssStyle]):null,s])}});class aS extends ho{}class nS extends uo{createState(){var e;return new aS(null==(e=this.parent)?void 0:e.state)}get routeDepth(){return this.panel.view.modal.routeDepth}get appmenu(){return this.panel.getController("appmenu")}get navPos(){return this.panel.panelItems.nav_pos_index}async onInit(){await super.onInit(),this.state.keepAlive=!0,this.state.visible=!1,this.panel.evt.on("onMounted",(async()=>{var e;this.navPos&&(this.navPos.state.keepAlive=!0);const t=null==(e=this.appmenu)?void 0:e.getDefaultOpenView();if(t){const e=await ibiz.hub.config.view.get(t),{openMode:a="INDEXVIEWTAB"}=e;this.state.visible=!a.startsWith("INDEXVIEWTAB")}}))}setVisible(e){this.state.visible=e,this.navPos&&(this.navPos.state.visible=!e)}}var oS=Object.defineProperty,iS=(e,t,a)=>(((e,t,a)=>{t in e?oS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sS{constructor(){iS(this,"component","IBizIndexBlankPlaceholder")}async createController(e,t,a){const n=new nS(e,t,a);return await n.init(),n}}const lS=oe(tS,(function(e){e.component(tS.name,tS),po("CONTAINER_INDEX_BLANK_PLACEHOLDER",(()=>new sS))}));var rS=Object.defineProperty,cS=(e,t,a)=>(((e,t,a)=>{t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dS extends ho{constructor(){super(...arguments),cS(this,"query",""),cS(this,"items",[]),cS(this,"histories",[]),cS(this,"list",[]),cS(this,"loading",!1)}}var uS=Object.defineProperty,pS=(e,t,a)=>(((e,t,a)=>{t in e?uS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hS extends uo{constructor(){super(...arguments),pS(this,"keyName","srfkey"),pS(this,"textName","srfmajortext"),pS(this,"rawItemParams",{}),pS(this,"historyCacheKey","global-search-history"),pS(this,"maxHistory",7),pS(this,"size",100)}createState(){var e;return new dS(null==(e=this.parent)?void 0:e.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.initParams(),this.initHistory(),await this.initGlobalSearchItem()}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}initParams(){this.rawItemParams.historycachekey&&(this.historyCacheKey+=this.rawItemParams.historycachekey),this.rawItemParams.maxhistory&&(this.maxHistory=Number(this.rawItemParams.maxhistory)),this.rawItemParams.size&&(this.size=Number(this.rawItemParams.size))}initHistory(){const e=localStorage.getItem(this.historyCacheKey);e&&(this.state.histories=JSON.parse(e))}async getSearchFunc(e){const t=[],a=e.map((async e=>{try{if(e.appMenuItems){const a=await this.getSearchFunc(e.appMenuItems);return void t.push(...a)}if(e.appFuncId){let a=ibiz.hub.getApp(e.appId);a||(a=await ibiz.hub.getAppAsync(e.appId));const n=a.getAppFunc(e.appFuncId);n&&"SEARCH"===n.appFuncType&&n.appDEACModeId&&n.appDataEntityId&&t.push(n)}}catch(t){console.error("计算菜单应用功能异常: ".concat(e.appFuncId),t)}}));return await Promise.all(a),t}async initGlobalSearchItem(){const e=vn(this.panel.view.model,"appmenu");if(!e)return;const t=e.appMenuItems||[],a=await this.getSearchFunc(t);await Promise.all(a.map((async e=>{const t=await ha(e.appDEACModeId,e.appDataEntityId,e.appId);if(t){let a;t.itemSysPFPluginId&&(a=await Eo(t)),this.state.items.push({deACMode:t,acItemProvider:a,appDataEntityId:e.appDataEntityId})}})))}addToHistory(e){const t=this.state.histories.filter((t=>t!==e));t.push(e),t.length>this.maxHistory&&t.shift(),this.state.histories=t,localStorage.setItem(this.historyCacheKey,JSON.stringify(this.state.histories))}getFetchParams(e){const{deACMode:t}=e,{minorSortDir:a,minorSortAppDEFieldId:n}=t,o={page:0,size:this.size,query:this.state.query};return a&&n&&Object.assign(o,{sort:"".concat(n.toLowerCase(),",").concat(a.toLowerCase())}),o}handleResponseHeader(e){return{page:e.headers["x-page"]?Number(e.headers["x-page"]):0,total:e.headers["x-total"]?Number(e.headers["x-total"]):0}}async loadByACMode(e){let t=[];const{appDataEntityId:a,deACMode:n}=e,{appDEDataSetId:o}=n;if(!o)return t;const i=this.getFetchParams(e),s=ibiz.hub.getApp(n.appId),l=await s.deService.exec(a,o,this.panel.context,i);if(l.ok&&l.data){const{page:e,total:a}=this.handleResponseHeader(l),n=l.data;(e+1)*this.size<a&&n.push({[this.textName]:"".concat(ibiz.i18n.t("panelComponent.globalSearch.moreTips",{total:a,size:this.size})),[this.keyName]:ei()}),t=n}return t}clearHistory(){this.state.histories=[],localStorage.setItem(this.historyCacheKey,JSON.stringify(this.state.histories))}async search(e){if(this.state.query=e,this.state.query){this.state.list=[],this.state.loading=!0,this.addToHistory(this.state.query);try{await Promise.all(this.state.items.map((async e=>{const t=await this.loadByACMode(e);this.state.list.push(...t)})))}catch(e){ibiz.log.error(e)}finally{this.state.loading=!1}}}openLinkView(e,t){const{appDataEntityId:a,deACMode:n}=t,{linkAppViewId:o}=n;if(!o)return;const i=this.panel.context.clone(),s=ia(a);Object.assign(i,{[s]:e[this.keyName]}),ibiz.commands.execute(fo.TAG,o,i,{noWaitRoute:!0})}getSearchItemByEntity(e){return this.state.items.find((t=>ia(t.appDataEntityId)===(null==e?void 0:e.toLowerCase())))}}var mS=Object.defineProperty,vS=(e,t,a)=>(((e,t,a)=>{t in e?mS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bS{constructor(){vS(this,"component","IBizGlobalSearch")}async createController(e,t,a){const n=new hS(e,t,a);return await n.init(),n}}const gS=a({name:"IBizVirtualList",props:{items:{type:Array,required:!0},itemSize:{type:Number,default:34},maxHeight:{type:Number,default:300},buffer:{type:Number,default:5},getKey:{type:Function,default:e=>e.id}},emits:["scroll","reach-bottom"],setup(e,{emit:t}){const a=B("virtual-list"),o=n(),i=n(0),s=l((()=>e.items.length*e.itemSize)),r=l((()=>s.value>e.maxHeight?e.maxHeight:s.value)),c=l((()=>Math.ceil(r.value/e.itemSize)+e.buffer)),d=l((()=>Math.floor(i.value/e.itemSize))),u=l((()=>Math.min(d.value+c.value,e.items.length))),p=l((()=>e.items.slice(d.value,u.value))),h=l((()=>d.value*e.itemSize)),m=e=>{o.value&&(o.value.scrollTop=e,i.value=e)};return{ns:a,height:r,offsetY:h,container:o,scrollTop:i,totalHeight:s,visibleData:p,scrollTo:m,handleScroll:()=>{if(o.value){const{scrollHeight:e,clientHeight:a}=o.value;i.value=o.value.scrollTop,t("scroll",{scrollTop:i.value,scrollHeight:o.value.scrollHeight,clientHeight:o.value.clientHeight}),e-(i.value+a)<50&&t("reach-bottom")}},scrollToIndex:t=>{const a=t*e.itemSize;m(a)}}},render(){return o("div",{ref:"container",class:this.ns.b(),style:{height:"".concat(this.height,"px")},onScroll:this.handleScroll},[o("div",{class:this.ns.e("phantom"),style:{height:"".concat(this.totalHeight,"px")}},null),o("div",{class:this.ns.e("content"),style:{transform:"translateY(".concat(this.offsetY,"px)")}},[this.visibleData.map((e=>{var t,a;return o("div",{key:this.getKey(e),style:{height:"".concat(this.itemSize,"px")},class:this.ns.em("content","item")},[null==(a=(t=this.$slots).default)?void 0:a.call(t,{item:e})])}))])])}});const fS=a({name:"IBizGlobalSearch",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=e.controller,a=B("global-search"),u=n();let h=!1;const m=n(!1),v=n(),b=n(""),g=l((()=>{const{query:e,list:a,histories:n,loading:o}=t.state,i=e&&a.length>0,s=!e&&n.length>0,l=n.includes(e)&&0===a.length;return(i||l||s||o)&&m.value})),f=l((()=>{const{placeholder:e}=t.rawItemParams;return e||ibiz.i18n.t("panelComponent.globalSearch.placeholder")})),w=()=>{t.state.list=[],t.state.query=""},y=e=>{const t=e.target;t.closest(".".concat(a.b()))||t.closest(".".concat(a.e("popper")))||t.closest(".el-input__suffix")||(m.value=!1)},C=()=>{w(),t.clearHistory()},I=e=>{var t;(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),null==(t=u.value)||t.focus())};c((()=>g.value),(()=>{g.value&&(setTimeout((()=>{var e;null==(e=v.value)||e.scrollTo(0)})),b.value!==t.state.histories[t.state.histories.length-1]&&w())})),d((()=>{document.addEventListener("click",y,{capture:!0}),document.addEventListener("keydown",I)})),p((()=>{document.removeEventListener("click",y,{capture:!0}),document.removeEventListener("keydown",I)}));return{c:t,ns:a,visible:g,editorRef:u,searchValue:b,curPlaceholder:f,handleFocus:e=>{h?h=!1:m.value=!0},handleEnter:e=>{"Enter"===e.key&&(m.value=!0,t.search(b.value))},renderAction:()=>{let e;if(!t.state.query&&t.state.histories.length)return o("div",{class:a.em("content","action-item")},[o(i("el-button"),{text:!0,onClick:C},(n=e=ibiz.i18n.t("panelComponent.globalSearch.clearHistory"),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!s(n)?e:{default:()=>[e]}))]);var n},renderFooter:()=>{const{query:e,list:n,histories:i,loading:s}=t.state,l=i.includes(e)&&0===n.length;if(s||l)return o("div",{class:a.e("footer")},[ibiz.i18n.t("panelComponent.globalSearch.".concat(s?"loading":"empty"))])},renderSearchList:()=>{if(t.state.list.length)return o(gS,{ref:v,items:t.state.list,class:a.e("virtual-list"),getKey:e=>e[t.keyName]},{default:({item:e})=>{const n=t.getSearchItemByEntity(e.srfdecodename);let s=e[t.textName];return(null==n?void 0:n.acItemProvider)?s=r(i(n.acItemProvider.component),{item:e,controller:t}):(null==n?void 0:n.deACMode.itemLayoutPanel)&&(s=o(i("iBizControlShell"),{data:e,modelData:n.deACMode.itemLayoutPanel,context:t.panel.context,params:t.panel.params},null)),o("div",{class:[a.em("list","item"),a.em("list","srearch-item")],onClick:()=>((e,a)=>{h=!0,m.value=!1,a&&t.openLinkView(e,a)})(e,n),title:zt(e[t.textName])},[s])}})},renderHistoryList:()=>o("div",{class:a.e("list")},[t.state.histories.map((e=>o("div",{onClick:()=>{return a=e,b.value=a,void t.search(b.value);var a},class:[a.em("list","item"),a.em("list","history-item")]},[e])))]),handleClearSearch:w}},render(){return o("div",{class:this.ns.b()},[o(i("el-popover"),{width:"auto",visible:this.visible,placement:"bottom-start","popper-class":this.ns.e("popper")},{reference:()=>o(i("el-input"),{clearable:!0,ref:"editorRef",modelValue:this.searchValue,"onUpdate:modelValue":e=>this.searchValue=e,placeholder:this.curPlaceholder,class:[this.ns.e("search"),this.ns.is("search",this.visible)],onFocus:this.handleFocus,onKeyup:this.handleEnter,onClear:this.handleClearSearch},{prefix:()=>o("ion-icon",{name:"search",class:this.ns.em("search","icon")},null),suffix:()=>{if(this.searchValue)return o("ion-icon",{title:ibiz.i18n.t("panelComponent.globalSearch.search"),name:"return-down-back-outline",class:[this.ns.em("search","icon"),this.ns.em("search","enter-icon")],onClick:()=>this.c.search(this.searchValue)},null)}}),default:()=>o("div",{class:this.ns.e("content")},[this.c.state.query?this.renderSearchList():this.renderHistoryList(),this.renderAction(),this.renderFooter()])})])}}),wS=oe(fS,(function(e){e.component(fS.name,fS),po("RAWITEM_GLOBAL_SEARCH",(()=>new bS))}));var yS=Object.defineProperty,CS=(e,t,a)=>(((e,t,a)=>{t in e?yS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class IS extends ho{constructor(){super(...arguments),CS(this,"activeMicroAppId",""),CS(this,"items",[])}}var DS=Object.defineProperty,ES=(e,t,a)=>(((e,t,a)=>{t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class SS extends uo{constructor(){super(...arguments),ES(this,"rawItemParams",{}),ES(this,"util"),ES(this,"sourceType","REFAPP")}get view(){return this.panel.view}get context(){return this.panel.context}createState(){var e;return new IS(null==(e=this.parent)?void 0:e.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.state.visible=1===this.view.model.appSwitchMode,this.state.visible&&(this.state.items=await this.loadAllApps(),this.initActiveMicroAppId())}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t),this.sourceType=this.rawItemParams.sourcetype||"REFAPP"}async loadAllApps(){return"UTIL"===this.sourceType?this.loadAppsWithUtil():this.loadAppsWithRefApp()}initActiveMicroAppId(){if(this.view&&this.state.items.length>0){const e=this.state.items.find((e=>{var t;return e.indexViewName===(null==(t=this.view.model.codeName)?void 0:t.toLowerCase())}));e&&this.setActiveMicroAppId(e.id)}}setActiveMicroAppId(e){ibiz.hub.activeMicroAppId=e,this.state.activeMicroAppId=e}async loadAppsWithUtil(){const e=[];if(!this.util){const t=ibiz.hub.getApp(ibiz.env.appId).getAppUtil("HUBAPP","CUSTOM");if(!t)return e;this.util=new So(t)}const t=await this.util.load("",this.context,this.panel.params);if(!t||0===t.length)return e;const a=ibiz.hub.getAppSourceModel(ibiz.env.appId).getAllPSSubAppRefs;for(let n=0;n<t.length;n++){if(t[n].id!==ibiz.env.appId&&!/^[0-9a-zA-Z]+__[0-9a-zA-Z]+__[0-9a-zA-Z]+$/.test(t[n].id)){const e=a.find((e=>e.id.endsWith(t[n].id)));e&&(t[n].id=e.id)}e.push({id:"".concat(t[n].id,"@").concat(t[n].indexViewName.toLowerCase()),dataId:t[n].dataId,caption:t[n].caption,indexViewName:t[n].indexViewName.toLowerCase(),order:t[n].order})}return e.sort(((e,t)=>e.order-t.order))}async loadAppsWithRefApp(){var e,t,a,n;const o=[],i=ibiz.hub.getApp();if(!i)return o;const s=ibiz.hub.getAppSourceModel(i.appId),l=null==(t=null==(e=s.cache)?void 0:e.getPSAppViews)?void 0:t.filter((e=>"APPINDEXVIEW"===e.viewType));if(l&&l.length>0)for(let e=0;e<l.length;e++){const t=l[e];o.push({id:"".concat(t.appId,"@").concat(t.codeName.toLowerCase()),caption:t.title||t.caption,indexViewName:t.codeName.toLowerCase(),order:100*(e+1)})}const r=s.getAllPSSubAppRefs;if(!r||0===r.length)return o;for(let e=0;e<r.length;e++){const t=r[e];if(t.appMode&&"CLOUDHUBSUBAPP"===t.appMode){const e=await ibiz.hub.getAppAsync(t.id),i=null==(n=null==(a=ibiz.hub.getAppSourceModel(e.appId).cache)?void 0:a.getPSAppViews)?void 0:n.filter((e=>"APPINDEXVIEW"===e.viewType));if(i&&i.length>0)for(let e=0;e<i.length;e++){const t=i[e];o.push({id:"".concat(t.appId,"@").concat(t.codeName.toLowerCase()),caption:t.title||t.caption,indexViewName:t.codeName.toLowerCase(),order:100*(o.length+1)})}}}return o.sort(((e,t)=>e.order-t.order))}async switchMicroApp(e,t){if(e===this.state.activeMicroAppId)return;let a=e;-1!==e.indexOf("@")&&(a=e.split("@")[0]),a!==ibiz.env.appId&&await ibiz.hub.getAppAsync(a);const n=ibiz.hub.getAppSourceModel(a);if(ibiz.hub.getApp().model.appId===a&&window.Environment.AppTitle)ibiz.env.AppTitle=window.Environment.AppTitle;else if(n.getDefaultPSAppIndexView){const e=n.getDefaultPSAppIndexView;if(n.caption)ibiz.env.AppTitle=n.caption;else{const t=n.cache.getPSAppViews.find((t=>t.dynaModelFilePath===e.path));t&&(ibiz.env.AppTitle=t.caption)}}this.setActiveMicroAppId(e);const o=this.state.items.findIndex((t=>t.id===e)),i=K(t.currentRoute.value);i.pathNodes=i.pathNodes.slice(0,1),i.pathNodes[0].viewName=this.state.items[o].indexViewName;const s=Y(i);t.push(s)}}const xS=a({name:"IBizAppSwitch",props:{modelData:{type:Object,required:!0},controller:{type:SS,required:!0}},setup(e){const t=B("app-switch"),{state:a}=e.controller,n=Xi();return{ns:t,state:a,handleClick:t=>{e.controller.switchMicroApp(t,n)}}},render(){return this.state.visible?o(i("el-dropdown"),{class:this.ns.b(),trigger:"click",onCommand:e=>this.handleClick(e)},{default:()=>o("span",{class:this.ns.e("icon")},[o("i",{class:"fa fa-th","aria-hidden":"true"},null)]),dropdown:()=>o(i("el-dropdown-menu"),{class:[this.ns.e("dropdown")]},{default:()=>[this.state.items.length>0?this.state.items.map((e=>o(i("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("active",this.state.activeMicroAppId===e.id)],title:zt(e.caption),command:e.id},{default:()=>[e.caption]}))):o(i("iBizNoData"),null,null)]})}):null}});var PS=Object.defineProperty,kS=(e,t,a)=>(((e,t,a)=>{t in e?PS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class TS{constructor(){kS(this,"component","IBizAppSwitch")}async createController(e,t,a){const n=new SS(e,t,a);return await n.init(),n}}const zS=oe(xS,(function(e){e.component(xS.name,xS),po("RAWITEM_APP_SWITCH",(()=>new TS))}));function AS(e,t,a,o){let i=0,s=null;const l=new Map,c=n([]),d=new Map,u=t=>{switch(e.position){case"TOP":return t>0?"right-start":"bottom-start";case"BOTTOM":return t>0?"right-end":"top-start";case"RIGHT":return"left-start";case"LEFT":return"right-start";default:return}},p=()=>{s&&(clearTimeout(s),s=null)},h=e=>{const a=l.get(e);a&&(a.dismiss(),l.delete(e),((e,t)=>{const a=d.get(t);a&&(a.classList.remove(e.is("rotate-arrow",!0)),d.delete(t))})(t,e))},m=()=>{for(const e of l.keys())h(e);l.clear(),c.value=[],i=0},v=()=>{p(),s=setTimeout((()=>{i<=0&&m()}),300)},b=()=>{i++,p()},g=(e,t)=>{i=Math.max(0,i-1),v()},f=(e,n,i)=>{var s;const c=ibiz.overlay.createPopover((()=>r(o(e),{onMouseenter:b,onMouseleave:g})),void 0,{width:"auto",height:"auto",noArrow:!0,placement:u(e.level),offsetOpts:10,...i,modalClass:"".concat(t.b("cascader-popover")," ").concat(t.is(a.value,!0)," ").concat((null==i?void 0:i.modalClass)||"")});var p,h,m;l.set(e.level,c),null==c||c.present(n.currentTarget),p=null==(s=n.currentTarget)?void 0:s.parentElement,h=t,m=e.level,p&&(p.classList.add(h.is("rotate-arrow",!0)),d.set(m,p))};return{getOverlayNum:()=>l.size,openCascaderPopover:f,clearAllCascader:()=>{m(),p()},handleMenuItemMouseEnter:(e,t)=>{c.value.includes(e.id)||(c.value.push(e.id),(e=>{let t=e;for(;l.get(t+1);)t++;for(let a=t;a>=e;a--)h(a)})(e.level),e.children&&f(e,t),p())},handleMenuItemMouseLeave:e=>{const t=c.value.indexOf(e.id);-1!==t&&c.value.splice(t,1),v()}}}function OS(e,t,a,n,o,i){let s;const l=()=>{switch(a){case"TOP":return"bottom";case"BOTTOM":return"top";case"RIGHT":return"left";case"LEFT":return"right";default:return}};let c;const u=()=>{null==s||s.dismiss(),s=null,document.removeEventListener("mousemove",h),c=void 0},h=e=>{c||(c=document.querySelector(".".concat(t.b("border-popover"))));const a=(e=>{let t=0,a=0,n=e;for(;n;)t+=n.offsetLeft,a+=n.offsetTop,n=n.offsetParent;return{x:t,y:a,width:e.offsetWidth,height:e.offsetHeight}})(c);!(e.pageX>=a.x&&e.pageX<=a.x+a.width&&e.pageY>=a.y&&e.pageY<=a.y+a.height)&&o()<=0&&u()},m=async e=>{var a;if(s)return;s=ibiz.overlay.createPopover((()=>r(i())),void 0,{width:"auto",height:"auto",noArrow:!0,placement:l(),offsetOpts:-1,modalClass:"".concat(t.b("border-popover")," ").concat(t.is(n.value,!0))});const o=null==(a=e.currentTarget)?void 0:a.querySelector(".".concat(t.be("placehold","line")));await(null==s?void 0:s.present(o)),setTimeout((()=>{document.addEventListener("mousemove",h)}),200)};let v=null,b=null,g=null;const f=(e,t)=>"BOTTOM"===a?e+t-20:e,w=(e,t)=>"RIGHT"===a?e+t-20:e,y=e=>["RIGHT","LEFT"].includes(a)?20:e,C=e=>["TOP","BOTTOM"].includes(a)?20:e;function I(e){if(!v)return;const t=e.getBoundingClientRect();v.style.top="".concat(f(t.top,t.height),"px"),v.style.left="".concat(w(t.left,t.width),"px"),v.style.width="".concat(y(t.width),"px"),v.style.height="".concat(C(t.height),"px")}return d((function(){const n=e.value;if(!n)return;!function(e){const n=document.createElement("div");n.classList.add(t.b("placehold")),n.classList.add(t.is(a.toLowerCase(),!!a));const o=document.createElement("div");o.classList.add(t.be("placehold","line"));const i=document.createElement("div");i.classList.add(t.be("placehold","arrow")),n.appendChild(o),n.appendChild(i),document.body.appendChild(n),v=n,v.addEventListener("mouseenter",m),i.innerHTML='\n <svg xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 1024 1024"\n width="1em"\n height="1em"\n fill="currentColor">\n <path fill="currentColor"\n d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z">\n </path>\n </svg>\n ',I(e)}(n),b=new ResizeObserver((()=>I(n))),b.observe(n);const o=()=>{I(n),g=requestAnimationFrame(o)};g=requestAnimationFrame(o)})),p((function(){if(b){const t=e.value;t&&b.unobserve(t),b.disconnect(),b=null}null!==g&&(cancelAnimationFrame(g),g=null),v&&v.parentNode&&(v.removeEventListener("mouseenter",m),v.parentNode.removeChild(v),v=null)})),{closeBorderPopover:u}}function MS(e,t,a=0){return e.map((e=>{var n;const o={...e,value:e.id,label:e.caption,parentId:null==t?void 0:t.id,level:a};return(null==(n=e.appMenuItems)?void 0:n.length)&&(o.children=MS(e.appMenuItems,e,a+1)),o}))}function NS(e,t){let a;return t&&t.some((t=>!t.id||(t.id===e?(a=t,!0):!!(t.appMenuItems&&t.appMenuItems.length>0)&&(a=NS(e,t.appMenuItems),!!a)))),a}function BS(e){const{ns:t,isLayout:a,menuLayout:n,position:s,menuAlign:l,menus:r,menuItemsState:c,showCascaderArrow:d,handleMenuItemClick:u,handleMenuItemMouseEnter:p,handleMenuItemMouseLeave:h}=e,m=a?function(e){if("FLEX"===(null==e?void 0:e.layout)){const{align:t,valign:a}=e;return{justifyContent:t,alignItems:a}}return{}}(n):{};return o(i("el-row"),{class:[t.e("content"),t.is(l,!!l),t.is(null==s?void 0:s.toLowerCase(),!!s)],style:m},{default:()=>r.map((e=>{var n,s;const r=function(e){var t,a,n;const{ns:s,menu:l,menuAlign:r,menuItemsState:c}=e;if(l.id&&(null==(t=c[l.id])?void 0:t.visible)){if("MENUITEM"===l.itemType)return o(i("el-button"),{class:[s.e("menuitem"),"".concat((null==(a=l.sysCss)?void 0:a.cssName)||"")],index:l.id},{default:()=>[l.sysImage&&o(i("iBizIcon"),{class:s.e("icon"),icon:l.sysImage},null),l.caption&&o("span",{class:s.e("caption"),title:zt(l.tooltip)},[l.caption])]});if("SEPERATOR"===l.itemType){const e="horizontal"===r?"vertical":"horizontal";return o(i("el-divider"),{direction:e,class:[s.em("separator"),s.em("separator",e)],id:l.id},null)}return"RAWITEM"===l.itemType?o(i("el-button"),{index:l.id,title:zt(l.tooltip),class:[s.e("rawitem"),"".concat((null==(n=l.sysCss)?void 0:n.cssName)||"")]},{default:()=>[o(i("iBizRawItem"),{rawItem:l},null)]}):void 0}}({menu:e,ns:t,menuAlign:l,menuItemsState:c});if(!r)return;const m={};if(a&&"FLEX"===(null==(n=e.layoutPos)?void 0:n.layout)){const t=e.layoutPos;Object.assign(m,{flexGrow:t.grow,flexShrink:1===t.shrink?void 0:t.shrink,flexBasis:t.basis})}const v=!(!d||!e.children);return o("div",{class:[t.em("content","item"),t.em("content",null==(s=e.itemType)?void 0:s.toLowerCase()),t.is("show-arrow",v)],style:m},[o("div",{class:t.em("content","item-container"),onMouseenter:t=>p(e,t),onMouseleave:t=>h(e,t),onClick:t=>u(e,t)},[r]),v&&o("span",{class:t.em("content","item-arrow")},[o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em",fill:"currentColor"},[o("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null)])])])}))})}const _S=a({name:"IBizExtendButtonMenu",props:{items:{type:Object,required:!0},menuItemsState:{type:Object,required:!0},providers:{type:Object,required:!0},position:{type:String,required:!0},layoutMode:{type:String,required:!0},layout:{type:Object}},emits:{menuItemClick:(e,t)=>!0},setup(e,{emit:t}){const a=B("extend-menu-button"),o=n(),i=l((()=>["TOP","BOTTOM"].includes(e.position)?"horizontal":"vertical")),s=l((()=>"BORDER"!==e.layoutMode)),r=n(MS(e.items)),c=()=>BS({ns:a,menuAlign:i.value,position:e.position,menus:r.value,menuItemsState:e.menuItemsState,handleMenuItemClick:v,handleMenuItemMouseEnter:p,handleMenuItemMouseLeave:h,showCascaderArrow:!0,isLayout:!1}),{getOverlayNum:d,clearAllCascader:u,handleMenuItemMouseEnter:p,handleMenuItemMouseLeave:h}=AS(e,a,i,(t=>BS({ns:a,menuAlign:"vertical",position:e.position,menus:t.children,menuItemsState:e.menuItemsState,handleMenuItemClick:v,handleMenuItemMouseEnter:p,handleMenuItemMouseLeave:h,showCascaderArrow:!0,isLayout:!1})));let m;if("BORDER"===e.layoutMode){const t=OS(o,a,e.position,i,d,c);m=t.closeBorderPopover}const v=async(a,n)=>{if(a.children)return;if(u(),m&&m(),!a.appFuncId)return void ibiz.log.warn(ibiz.i18n.t("runtime.controller.control.menu.noConfigured"));const o=NS(a.id,e.items);t("menuItemClick",o,n)};return{ns:a,menus:r,menuAlign:i,isLayout:s,buttonMenuRef:o,handleMenuItemClick:v,handleMenuItemMouseEnter:p,handleMenuItemMouseLeave:h}},render(){return o("div",{ref:"buttonMenuRef",class:[this.ns.b(),this.ns.is(this.layoutMode.toLowerCase(),!!this.layoutMode),this.ns.is(this.position.toLowerCase(),!!this.position),this.ns.is(this.menuAlign,!!this.menuAlign)]},["BORDER"!==this.layoutMode&&BS({ns:this.ns,menuAlign:this.menuAlign,isLayout:this.isLayout,menuLayout:this.layout,position:this.position,menus:this.menus,menuItemsState:this.menuItemsState,handleMenuItemClick:this.handleMenuItemClick,handleMenuItemMouseEnter:this.handleMenuItemMouseEnter,handleMenuItemMouseLeave:this.handleMenuItemMouseLeave})])}});function RS(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}function LS(e){var t,a,n,s;const{isFirst:l,menu:r,collapse:c,ns:d,menuAlign:u,menuItemsState:p}=e;if(r.id&&(!p||(null==(t=p[r.id])?void 0:t.visible))){if("MENUITEM"===r.itemType){let e;return e=l&&c?[r.sysImage?o(i("iBizIcon"),{class:d.e("icon"),icon:r.sysImage},null):o("span",{class:d.e("caption")},[null==(a=r.caption)?void 0:a.slice(0,1)])]:[r.sysImage?o(i("iBizIcon"),{class:d.e("icon"),icon:r.sysImage},null):null,o("span",{class:d.e("caption")},[r.caption])],l&&c?o(i("el-tooltip"),{class:d.b("tooltip"),content:r.caption,placement:"horizontal"===u?"bottom":"left",theme:"light"},{default:()=>{var t;return[o(i("el-menu-item"),{class:[d.e("item"),"".concat((null==(t=r.sysCss)?void 0:t.cssName)||"")],index:r.id},RS(e)?e:{default:()=>[e]})]}}):o(i("el-menu-item"),{class:[d.e("item"),"".concat((null==(n=r.sysCss)?void 0:n.cssName)||"")],index:r.id,title:zt(r.tooltip)},RS(e)?e:{default:()=>[e]})}if("SEPERATOR"===r.itemType){const e="horizontal"===u&&l?"vertical":"horizontal";return o(i("el-divider"),{direction:e,class:d.em("separator",e),id:r.id},null)}return"RAWITEM"===r.itemType?o(i("el-menu-item"),{index:r.id,title:zt(r.tooltip),class:[d.e("rawitem"),"".concat((null==(s=r.sysCss)?void 0:s.cssName)||"")]},{default:()=>[o(i("iBizRawItem"),{rawItem:r},null)]}):void 0}}function jS(e){var t,a;const{isFirst:n,menu:s,collapse:l,ns:r,menuAlign:c,menuItemsState:d}=e;if(s.id&&(!d||(null==(t=d[s.id])?void 0:t.visible)))return o(i("el-sub-menu"),{class:[r.b("submenu"),"".concat((null==(a=s.sysCss)?void 0:a.cssName)||"")],index:s.id,teleported:!0,"popper-class":[r.b("popup-container")]},{default:()=>s.children&&s.children.map((e=>e.children&&e.children?jS({isFirst:!1,menu:e,collapse:l,ns:r,menuAlign:c,menuItemsState:d}):LS({isFirst:!1,menu:e,collapse:l,ns:r,menuAlign:c,menuItemsState:d}))),title:()=>{var e;return l?s.sysImage?o(i("iBizIcon"),{class:r.e("icon"),icon:s.sysImage},null):[n?null==(e=s.caption)?void 0:e.slice(0,1):s.caption,n?null:o("ion-icon",{name:"chevron-forward-outline"},null)]:[o(i("iBizIcon"),{class:r.e("icon"),icon:s.sysImage},null),o("span",{class:r.e("caption")},[s.caption])]}})}function VS(e){const{refreshKey:t,ns:a,collapse:n,menuAlign:s,position:l,menus:r,menuItemsState:c,handleMenuSelect:d}=e;return o("div",{class:[a.e("content"),a.is("collapse",n),a.is(s,!!s),a.is(null==l?void 0:l.toLowerCase(),!!l)]},[o(i("el-menu"),{key:t,"popper-class":[a.b("popper")],collapse:n,"collapse-transition":!1,onSelect:d,theme:"light",mode:s,"ellipsis-icon":()=>o("ion-icon",{name:"ellipsis-horizontal"},null),ellipsis:"horizontal"===s},{default:()=>r.map((e=>e.children&&e.children.length>0?jS({isFirst:!0,menu:e,collapse:n,ns:a,menuAlign:s,menuItemsState:c}):LS({isFirst:!0,menu:e,collapse:n,ns:a,menuAlign:s,menuItemsState:c})))})])}const FS=a({name:"IBizExtendStandardMenu",props:{items:{type:Object,required:!0},menuItemsState:{type:Object,required:!0},providers:{type:Object,required:!0},position:{type:String,required:!0},layoutMode:{type:String,required:!0},layout:{type:Object}},emits:{menuItemClick:(e,t)=>!0},setup:(e,{emit:t})=>({ns:B("extend-standard-menu"),defaultMenuRef:n(),refreshKey:n(ei()),collapse:n(!1),menuAlign:l((()=>["TOP","BOTTOM"].includes(e.position)?"horizontal":"vertical")),menus:n(MS(e.items)),handleMenuSelect:async(a,n)=>{const o=NS(a,e.items);(null==o?void 0:o.appFuncId)?t("menuItemClick",o,n):ibiz.log.warn(ibiz.i18n.t("runtime.controller.control.menu.noConfigured"))}}),render(){return o("div",{ref:"defaultMenuRef",class:[this.ns.b(),this.ns.b(this.layoutMode.toLowerCase()),this.ns.is(this.position.toLowerCase(),!0),this.ns.is(this.menuAlign,!0),this.ns.is("collapse",this.collapse)]},[VS({isLayout:!1,position:this.position,refreshKey:this.refreshKey,ns:this.ns,collapse:this.collapse,menuAlign:this.menuAlign,menus:this.menus,menuLayout:this.layout,menuItemsState:this.menuItemsState,handleMenuSelect:this.handleMenuSelect})])}}),US=a({name:"IBizCommonExtendMenu",components:{ExtendButtonMenu:_S,ExtendStandardMenu:FS},props:{renderMode:{type:String,required:!0},items:{type:Object,required:!0},menuItemsState:{type:Object,required:!0},providers:{type:Object,required:!0},position:{type:String,required:!0},layoutMode:{type:String,default:"FLEX"},layout:{type:Object}},emits:{menuItemClick:(e,t)=>!0},setup:(e,{emit:t})=>({ns:B("common-extend-menu"),handleMenuItemClick:(e,a)=>{e&&"RAWITEM"!==(null==e?void 0:e.itemType)&&t("menuItemClick",e,a)}}),render(){var e;let t=o(_S,{items:this.items,menuItemsState:this.menuItemsState,providers:this.providers,position:this.position,layoutMode:this.layoutMode,layout:this.layout,onMenuItemClick:this.handleMenuItemClick},null);return"MENU"===(null==(e=this.renderMode)?void 0:e.toLocaleUpperCase())&&(t=o(FS,{items:this.items,menuItemsState:this.menuItemsState,providers:this.providers,position:this.position,layoutMode:this.layoutMode,layout:this.layout,onMenuItemClick:this.handleMenuItemClick},null)),o("div",{class:this.ns.b()},[t])}});var HS=Object.defineProperty,qS=(e,t,a)=>(((e,t,a)=>{t in e?HS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class GS extends ho{constructor(){super(...arguments),qS(this,"items",[]),qS(this,"menuItemsState",{})}}var WS=Object.defineProperty,KS=(e,t,a)=>(((e,t,a)=>{t in e?WS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class YS extends uo{constructor(){super(...arguments),KS(this,"rawItemParams",{rendermode:"BUTTON"}),KS(this,"appMenuName",""),KS(this,"appMenu"),KS(this,"app"),KS(this,"itemProviders",{}),KS(this,"allAppMenuItems",[])}get view(){return this.panel.view}get routeDepth(){return this.view.modal.routeDepth}get context(){return this.panel.context}get params(){return this.panel.params}createState(){var e;return new GS(null==(e=this.parent)?void 0:e.state)}async onInit(){var e,t;await super.onInit(),this.handleRawItemParams(),this.app=await ibiz.hub.getApp(this.context.srfappid),this.appMenu=this.computeAppMenu(),this.state.items=this.appMenu&&this.appMenu.appMenuItems?this.appMenu.appMenuItems:[],this.flattenAllItems(),await this.initAppMenuItemProviders(),null==(t=null==(e=this.appMenu)?void 0:e.appMenuItems)||t.forEach((e=>{this.initMenuItemState(e)}))}computeAppMenu(){return vn(this.view.model,this.appMenuName)}flattenAllItems(){if(!this.appMenu)return;const e=[],t=a=>{a.forEach((a=>{e.push(a),a.appMenuItems&&a.appMenuItems.length>0&&t(a.appMenuItems)}))};t(this.appMenu.appMenuItems),this.allAppMenuItems=e}async initAppMenuItemProviders(){0!==this.allAppMenuItems.length&&await Promise.all(this.allAppMenuItems.map((async e=>{const t=await xo(e);t&&(this.itemProviders[e.id]=t)})))}initMenuItemState(e){var t;const a={permitted:!0,visible:!0};if(e.hidden)a.visible=!1;else{let n=!0;e.accessKey&&(n=this.app.authority.calcByResCode(e.accessKey));let o=n;if(null==(t=e.appMenuItems)?void 0:t.length){const t=e.appMenuItems.map((e=>this.initMenuItemState(e).visible));o=o&&t.includes(!0)}a.permitted=n,a.visible=o}return this.state.menuItemsState[e.id]=a,a}async handleClickMenuItem(e,t,a=!0){if(!e)return;const n=this.itemProviders[e.id];if(n&&n.onClick)return n.onClick(e,t);if(!e.appFuncId)throw new Gt(e,ibiz.i18n.t("runtime.controller.control.menu.noConfigured"));const o=this.context.clone();o.srfappid=e.appId||ibiz.env.appId,this.routeDepth&&a&&Object.assign(o,{toRouteDepth:this.routeDepth+1});const i={...this.params};await ibiz.commands.execute(bo.TAG,e.appFuncId,o,i,{view:this.view})}handleRawItemParams(){var e;let t={};const a=null==(e=this.model.rawItem)?void 0:e.rawItemParams;ai(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}}var XS=Object.defineProperty,$S=(e,t,a)=>(((e,t,a)=>{t in e?XS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class JS extends YS{constructor(){super(...arguments),$S(this,"appMenuName","leftsidemenu")}}const QS=a({name:"IBizLeftSideMenu",props:{modelData:{type:Object,required:!0},controller:{type:JS,required:!0}},setup(e){const t=B("left-side-menu"),{state:a}=e.controller;return{ns:t,state:a}},render(){return this.controller.appMenu?o("div",{class:this.ns.b()},[o(i("iBizCommonExtendMenu"),{renderMode:this.controller.rawItemParams.rendermode,items:this.state.items,menuItemsState:this.state.menuItemsState,providers:this.controller.itemProviders,position:"LEFT",layoutMode:this.controller.appMenu.layoutMode,layout:this.controller.appMenu.layout,onMenuItemClick:(e,t)=>{this.controller.handleClickMenuItem(e,t)}},null)]):null}});var ZS=Object.defineProperty,ex=(e,t,a)=>(((e,t,a)=>{t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tx{constructor(){ex(this,"component","IBizLeftSideMenu")}async createController(e,t,a){const n=new JS(e,t,a);return await n.init(),n}}var ax={install(e){e.component(QS.name,QS),po("RAWITEM_PREDEFINE_LEFT_SIDE_MENU",(()=>new tx))}},nx=Object.defineProperty,ox=(e,t,a)=>(((e,t,a)=>{t in e?nx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ix extends YS{constructor(){super(...arguments),ox(this,"appMenuName","rightsidemenu")}}const sx=a({name:"IBizRightSideMenu",props:{modelData:{type:Object,required:!0},controller:{type:ix,required:!0}},setup(e){const t=B("right-side-menu"),{state:a}=e.controller;return{ns:t,state:a}},render(){return this.controller.appMenu?o("div",{class:this.ns.b()},[o(i("iBizCommonExtendMenu"),{renderMode:this.controller.rawItemParams.rendermode,items:this.state.items,menuItemsState:this.state.menuItemsState,providers:this.controller.itemProviders,position:"RIGHT",layoutMode:this.controller.appMenu.layoutMode,layout:this.controller.appMenu.layout,onMenuItemClick:(e,t)=>{this.controller.handleClickMenuItem(e,t)}},null)]):null}});var lx=Object.defineProperty,rx=(e,t,a)=>(((e,t,a)=>{t in e?lx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cx{constructor(){rx(this,"component","IBizRightSideMenu")}async createController(e,t,a){const n=new ix(e,t,a);return await n.init(),n}}var dx={install(e){e.component(sx.name,sx),po("RAWITEM_PREDEFINE_RIGHT_SIDE_MENU",(()=>new cx))}},ux=Object.defineProperty,px=(e,t,a)=>(((e,t,a)=>{t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hx extends YS{constructor(){super(...arguments),px(this,"appMenuName","bottomsidemenu")}}const mx=a({name:"IBizBottomSideMenu",props:{modelData:{type:Object,required:!0},controller:{type:hx,required:!0}},setup(e){const t=B("bottom-side-menu"),{state:a}=e.controller;return{ns:t,state:a}},render(){return this.controller.appMenu?o("div",{class:this.ns.b()},[o(i("iBizCommonExtendMenu"),{renderMode:this.controller.rawItemParams.rendermode,items:this.state.items,menuItemsState:this.state.menuItemsState,providers:this.controller.itemProviders,position:"BOTTOM",layoutMode:this.controller.appMenu.layoutMode,layout:this.controller.appMenu.layout,onMenuItemClick:(e,t)=>{this.controller.handleClickMenuItem(e,t)}},null)]):null}});var vx=Object.defineProperty,bx=(e,t,a)=>(((e,t,a)=>{t in e?vx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gx{constructor(){bx(this,"component","IBizBottomSideMenu")}async createController(e,t,a){const n=new hx(e,t,a);return await n.init(),n}}var fx={install(e){e.component(mx.name,mx),po("RAWITEM_PREDEFINE_BOTTOM_SIDE_MENU",(()=>new gx))}},wx=Object.defineProperty,yx=(e,t,a)=>(((e,t,a)=>{t in e?wx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cx extends YS{constructor(){super(...arguments),yx(this,"appMenuName","topsidemenu")}}const Ix=a({name:"IBizTopSideMenu",props:{modelData:{type:Object,required:!0},controller:{type:Cx,required:!0}},setup(e){const t=B("top-side-menu"),{state:a}=e.controller;return{ns:t,state:a}},render(){return this.controller.appMenu?o("div",{class:this.ns.b()},[o(i("iBizCommonExtendMenu"),{renderMode:this.controller.rawItemParams.rendermode,items:this.state.items,menuItemsState:this.state.menuItemsState,providers:this.controller.itemProviders,position:"TOP",layoutMode:this.controller.appMenu.layoutMode,layout:this.controller.appMenu.layout,onMenuItemClick:(e,t)=>{this.controller.handleClickMenuItem(e,t)}},null)]):null}});var Dx=Object.defineProperty,Ex=(e,t,a)=>(((e,t,a)=>{t in e?Dx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Sx{constructor(){Ex(this,"component","IBizTopSideMenu")}async createController(e,t,a){const n=new Cx(e,t,a);return await n.init(),n}}var xx={install(e){e.component(Ix.name,Ix),po("RAWITEM_PREDEFINE_TOP_SIDE_MENU",(()=>new Sx))}},Px={install(e){e.component(US.name,US),e.use(ax),e.use(dx),e.use(fx),e.use(xx)}};const kx=e("aG",{install:e=>{e.use(wS),e.use(lS),e.use(ZE),e.use(ye),e.use(Ce),e.use(Ie),e.use(De),e.use(Ey),e.use(By),e.use(Gy),e.use(dC),e.use(wC),e.use(Ee),e.use(zC),e.use(Se),e.use(xe),e.use(Pe),e.use(ke),e.use(_C),e.use(UC),e.use(YC),e.use(Te),e.use(eI),e.use(ze),e.use(cI),e.use(Ae),e.use(gI),e.use(SI),e.use(MI),e.use(VI),e.use(WI),e.use(Oe),e.use(TD),e.use(Me),e.use(LD),e.use(Ne),e.use(HD),e.use(YD),e.use(Be),e.use(_e),e.use(iE),e.use(hE),e.use(fE),e.use(DE),e.use(kE),e.use(jE),e.use(YE),e.use(Re),e.use(zS),e.use(Px)}}),Tx=a({name:"NotSupportedEditor",props:{modelData:{type:Object,required:!0},context:{type:Object}},setup(e){var t;return{ns:B("not-supported-editor"),isDesignPreview:"DESIGN"===(null==(t=e.context)?void 0:t.srfrunmode)}},render(){return this.isDesignPreview?o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("preview-content")},null)]):o("div",{class:this.ns.b()},[ibiz.i18n.t("editor.notSupportedEditor.unsupportedType",{type:this.modelData.editorType})])}});Vi.extend(ns);const zx=a({name:"IBizSpan",props:Le(),setup(e,{emit:t}){var a,o;const i=B("span"),s=e.controller,r=n(""),d=s.codeList,{valueFormat:u,dataType:p,unitName:h}=s.parent,m=n(""),v=s.model.textSeparator||(null==(a=s.editorParams)?void 0:a.TEXTSEPARATOR)||(null==(o=s.editorParams)?void 0:o.textseparator)||",";c((()=>e.value),((e,t)=>{if(e!==t){if(ui(e))return void(r.value="");if("SIMPLES"===s.model.valueType)r.value=e.join(v);else if("OBJECT"===s.model.valueType)r.value=e[s.model.objectNameField?s.model.objectNameField:"srfmajortext"];else if("OBJECTS"===s.model.valueType){const t=[];e.forEach((e=>{t.push(e[s.model.objectNameField?s.model.objectNameField:"srfmajortext"])})),r.value=t.join(v)}else if("ADDRESSPICKUP"===s.model.editorType)try{const t=[];JSON.parse(e).forEach((e=>{t.push(e[s.model.objectNameField?s.model.objectNameField:"srfmajortext"])})),r.value=t.join(v)}catch(t){ibiz.log.error("标签地址选择器的值不符合JSON格式".concat(e))}else if(u)try{if(null!=p&&Wt.isDate(p))r.value=Vi(e).format(u);else{const t=Vi(e).format(u);(a=t)!==(n=u)&&Vi(a,n,!0).isValid()?r.value=t:!Number.isNaN(Number(e))&&Number.isFinite(Number(e))?r.value="".concat(ibiz.util.text.format(Number(e),u)):r.value=ibiz.util.text.format("".concat(e),u)}}catch(t){r.value="".concat(e),ibiz.log.error("".concat(e," 值格式化错误"))}else Kt("".concat(e))?r.value=Yt("".concat(e)):r.value="".concat(e);h&&(s.emptyHiddenUnit?r.value&&(r.value+=h):r.value+=h)}var a,n}),{immediate:!0});const b=n([]);d&&c((()=>e.data),(e=>{s.loadCodeList(e).then((e=>{b.value=e}))}),{immediate:!0,deep:!0});se(s.model.appCodeListId,s.context.srfappid,(e=>{e&&(b.value=e)}));const{componentRef:g}=je((()=>t("focus")),(()=>t("blur"))),f=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));return{ns:i,c:s,text:r,editorRef:g,items:b,valueFormat:u,unitName:h,showFormDefaultContent:f,spanTitle:m}},render(){let e=null;this.c.codeList?e=this.c.codeList.thresholdGroup?this.items.length>0&&o(i("iBizCodeList"),{class:this.ns.e("code-list"),codeListItems:this.items,codeList:this.c.codeList,value:this.value,valueFormat:this.valueFormat,unitName:this.unitName,convertToCodeItemText:this.c.convertToCodeItemText},null):this.items.length>0&&o(i("iBizCodeList"),{class:this.ns.e("code-list"),codeListItems:this.items,codeList:this.c.codeList,value:this.text,convertToCodeItemText:this.c.convertToCodeItemText},null):this.text?(e=this.text,this.spanTitle=this.text):e=o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null);const t="ellipsis"===this.c.editorParams.overflowMode||"ellipsis"===this.c.editorParams.overflowmode||"NOWRAP"===this.c.model.wrapMode;return o("span",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("is-ellipsis",t)],ref:"editorRef",title:zt(this.spanTitle)},[e])}}),Ax=a({name:"IBizSpanLink",props:Le(),emits:Ve(),setup(e,{emit:t}){const a=B("span-link"),o=e.controller,i=n("");c((()=>e.value),((e,t)=>{e&&e!==t&&(i.value="".concat(e))}),{immediate:!0});const{componentRef:s}=je((()=>t("focus")),(()=>t("blur"))),r=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));return{ns:a,openLinkView:async()=>{await o.openLinkView(e.data)},curValue:i,editorRef:s,showFormDefaultContent:r}},render(){return o("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o("a",{onClick:this.openLinkView},[this.curValue])])}});var Ox=Object.defineProperty,Mx=(e,t,a)=>(((e,t,a)=>{t in e?Ox(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Nx extends Po{constructor(){super(...arguments),Mx(this,"valueItem",""),Mx(this,"emptyHiddenUnit",!0),Mx(this,"codeList")}async onInit(){var e,t;if(super.onInit(),(null==(t=null==(e=this.model)?void 0:e.editorItems)?void 0:t[0])&&(this.valueItem=this.model.editorItems[0].id),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}this.extraParams&&(this.emptyHiddenUnit=this.extraParams.emptyHiddenUnit)}async openLinkView(e){const t=this.context.clone();e[this.valueItem]&&(t.srfkey=e[this.valueItem]);const{context:a,params:n}=this.handlePublicParams(e,t,this.params),{linkAppViewId:o}=this.model;if(!o)throw new Gt(this.model,ibiz.i18n.t("editor.common.linkViewConfigErr"));return ibiz.commands.execute(fo.TAG,o,a,n)}}var Bx=Object.defineProperty,_x=(e,t,a)=>(((e,t,a)=>{t in e?Bx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Rx{constructor(e){_x(this,"formEditor","IBizSpan"),_x(this,"gridEditor","IBizSpan"),"SPAN_LINK"===e&&(this.formEditor="IBizSpanLink",this.gridEditor="IBizSpanLink")}async createController(e,t){const a=new Nx(e,t);return await a.init(),a}}const Lx=a({name:"IBizInput",props:Fe(),emits:Ve(),setup(e,{emit:a}){const o=B("input"),i=e.controller,s=i.model,r=n(!1),d=n(),u=n(!0),h=n(!1),m=n(2);"TEXTAREA_10"===s.editorType&&(m.value=10),i.editorParams&&("false"!==i.editorParams.SHOWLIMIT&&"false"!==i.editorParams.showlimit||(u.value=!1),"true"!==i.editorParams.ISAUTO&&"true"!==i.editorParams.isauto||(h.value=!0));const v=l((()=>{switch(s.editorType){case"TEXTBOX":case"MOBTEXT":return"text";case"PASSWORD":case"MOBPASSWORD":return"password";case"TEXTAREA":case"TEXTAREA_10":case"MOBTEXTAREA":return"textarea";default:return"string"}})),b=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),g=n("");c((()=>e.value),((e,t)=>{e!==t&&(null==e?g.value="":Kt("".concat(e))?g.value=Yt("".concat(e)):g.value=e.toString())}),{immediate:!0});const f=l((()=>{let t="";const{unitName:a}=e.controller.parent;return g.value&&(t=e.controller.formatValue(g.value)),a&&(i.emptyHiddenUnit?t&&(t+=a):t+=a),t})),w=(e,t="blur")=>{t===i.triggerMode&&a("change",e)},y=e=>{e?r.value=e:setTimeout((()=>{r.value=e}),100)};let C,I,D=!1;const E=e=>{I!==e&&w(e),I=void 0},S=Ii((e=>{I!==e&&w(e,"input"),I=void 0,D=!1,C&&C()}),300,{leading:!0});c(d,(t=>{if(e.autoFocus&&t){const e="textarea"===v.value?"textarea":"input";t.$el.getElementsByTagName(e)[0].focus()}}));let x;p((()=>{x&&x.close()}));const P=l((()=>{const{unitName:t}=e.controller.parent;let a="".concat(e.controller.formatValue(g.value));return t&&(i.emptyHiddenUnit?a&&(a+=t):a+=t),a})),k=l((()=>i.model.editorParams&&i.model.editorParams.autocomplete&&i.toBoolean(i.model.editorParams.autocomplete)?"on":"new-password")),T=n([]);i.codeList&&c((()=>e.data),(e=>{i.loadCodeList(e).then((e=>{T.value=e}))}),{immediate:!0,deep:!0});return se(i.model.appCodeListId,i.context.srfappid,(e=>{e&&(T.value=e)})),{c:i,ns:o,rows:m,type:v,items:T,currentVal:g,readonlyText:P,handleChange:E,handleInput:e=>{D=!0,S(e)},handleKeyUp:e=>{e&&"Enter"===e.code&&(a("enter",e),D&&(C=()=>{d.value.$el.dispatchEvent(e)}))},onBlur:t=>{I=t.target.value,I!=e.value&&w(I),a("blur",t),y(!1)},onFocus:e=>{a("focus",e),y(!0)},editorRef:d,onClick:async()=>{const a=i.model.appDataEntityId;if(!a||!i.deACMode)return;const{contentToolbarItems:n,footerToolbarItems:o,questionToolbarItems:s,otherToolbarItems:l}=Qs(i.deACMode),{zIndex:r}=G(),c=r.increment(),d=await t.import("@ibiz-template-plugin/ai-chat");x=d.chat||d.default.chat;let u,p="";x.create({containerOptions:{zIndex:c},chatOptions:{caption:i.deACMode.logicName,context:{...i.context},params:{...i.params,srfactag:i.deACMode.codeName},appendCurData:"true"===i.editorParams.srfaiappendcurdata?e.data:void 0,appendCurContent:i.editorParams.srfaiappendcurcontent?Xt.fill(i.editorParams.srfaiappendcurcontent,i.context,i.params,e.data):void 0,appDataEntityId:a,contentToolbarItems:n,footerToolbarItems:o,questionToolbarItems:s,otherToolbarItems:l,question:async(e,t,a,n,o,i)=>{p=ei(),u=new AbortController;const s=await ibiz.hub.getApp(t.srfappid).deService.getService(t,n.appDataEntityId);try{await s.aiChatSse((t=>{if(20===t.actionstate&&t.actionresult)e.addMessage({messageid:p,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t.actionresult});else if(30===t.actionstate&&t.actionresult){const a=JSON.parse(t.actionresult).choices;a&&a.length>0&&e.replaceMessage({messageid:p,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:a[0].content||""})}else 40===t.actionstate&&e.replaceMessage({messageid:p,state:t.actionstate,type:"ERROR",role:"ASSISTANT",content:t.actionresult})}),u,t,a,{messages:o,sessionid:i})}catch(t){e.replaceMessage({messageid:p,state:40,type:"ERROR",role:"ASSISTANT",content:t.message||ibiz.i18n.t("app.aiError")}),null==u||u.abort()}finally{return e.completeMessage(p,!0),!0}},abortQuestion:async e=>{null==u||u.abort(),await e.stopMessage({messageid:p,state:30,type:"DEFAULT",role:"ASSISTANT",content:""}),await e.completeMessage(p,!0)},action:(e,t)=>{"backfill"===e&&E(t.realcontent||"")},history:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=a.appendCurData?a.appendCurData:{},i=await n.aiChatHistory(e,t,o);if(i.data&&Array.isArray(i.data)){let e;i.data.forEach((t=>{if("TOOL"===t.role)e&&t.content&&x.aiChat.updateRecommendPrompt(e,t.content);else{const a={messageid:ei(),state:30,type:"DEFAULT",role:t.role,content:t.content,completed:!0};e=a,x.aiChat.addMessage(a)}}))}return!0},recommendPrompt:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=await n.aiChatRecommendPrompt(e,t,a.message);if(o.ok&&o.data){const e=o.data.choices;return e&&e.length>0?e[0]:null}return null},uploader:{onUpload:async(e,t,a)=>{const n=ibiz.util.file.calcFileUpDownUrl((null==a?void 0:a.context)||i.context,(null==a?void 0:a.params)||i.params,{}),o=ibiz.util.file.getUploadHeaders(),s=new FormData;s.append("file",e);return(await ibiz.net.axios({url:n.uploadUrl,method:"post",headers:o,data:s,onUploadProgress:e=>{const a=e.loaded/e.total*100;t(a)}})).data}},extendToolbarClick:async(e,t,a,n,o)=>{var s,l;const r=await va.exec(t.id,{view:i.view,ctrl:i.ctrl,context:Nt.create(a),params:n,data:[o],event:e},t.appId);if(r.closeView)i.view.closeView({ok:!0});else if(r.refresh)switch(r.refreshMode){case 1:i.view.callUIAction(ca.REFRESH);break;case 2:null==(s=i.view.parentView)||s.callUIAction(ca.REFRESH);break;case 3:null==(l=i.view.getTopView())||l.callUIAction(ca.REFRESH)}return r}}})},shouldAutoComplete:k,isEditable:r,setEditable:y,showLimit:u,isAuto:h,showFormDefaultContent:b,currentFormatVal:f}},render(){const{unitName:e}=this.c.parent,{editorWidth:t,editorHeight:a,predefinedType:n}=this.c.model;let l=null;if(this.readonly)l=this.c.codeList?o(i("iBizCodeList"),{codeListItems:this.items,codeList:this.c.codeList,value:this.currentVal,convertToCodeItemText:this.c.convertToCodeItemText},null):this.readonlyText;else{const t={};e&&(t.suffix=()=>{let t="";return this.c.emptyHiddenUnit?this.currentVal&&(t=e):t=e,o("i",{class:this.ns.e("unit")},[t])}),"AUTH_USERID"===n?t.prefix=()=>o("ion-icon",{name:"person"},null):"AUTH_PASSWORD"===n&&(t.prefix=()=>o("ion-icon",{name:"unlock-alt"},null)),l=o(i("el-input"),w({ref:"editorRef",clearable:!0,modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,placeholder:this.c.placeHolder,type:this.type,rows:this.rows,resize:"none",autosize:this.isAuto,maxlength:this.c.model.maxLength,minlength:this.c.model.minLength,"show-word-limit":this.showLimit&&this.c.model.showMaxLength,onChange:this.handleChange,onInput:this.handleInput,onKeyup:this.handleKeyUp,onBlur:this.onBlur,onFocus:this.onFocus,class:this.ns.b("input"),disabled:this.disabled,"show-password":"password"===this.type,autocomplete:this.shouldAutoComplete},this.$attrs),"function"==typeof(r=t)||"[object Object]"===Object.prototype.toString.call(r)&&!s(r)?t:{default:()=>[t]})}var r;const c=o("div",{class:this.ns.b("form-default-content")},[this.currentVal?"password"===this.type?this.currentVal.split("").map((e=>"•")):this.currentFormatVal:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.ns.is("textarea",Object.is(this.type,"textarea")),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)],style:{width:t?"".concat(t,"px"):"",height:a?"".concat(a,"px"):""}},[this.showFormDefaultContent&&c,"password"===this.type&&"new-password"===this.shouldAutoComplete?o("input",{type:"text",style:"opacity: 0;position:absolute;width:0;height:0;"},null):null,l,this.c.chatCompletion?o("div",{class:this.ns.e("ai-chat"),onClick:this.onClick},[o("ion-icon",{src:"./assets/images/svg/chat.svg"},null)]):null])}}),jx=a({name:"IBizInputNumber",props:Ue(),emits:Ve(),setup(e,{emit:t}){const a=B("input-number"),o=n(!1),i=e.controller,s=i.model,r=n(null);let d=1/0,u=-1/0;s.editorParams&&(s.editorParams.maxvalue&&(d=Ai(s.editorParams.maxvalue)),s.editorParams.minvalue&&(u=Ai(s.editorParams.minvalue)),s.editorParams.enablethousands&&(o.value=JSON.parse(s.editorParams.enablethousands)));const p=n(!1),h=n(),m=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),v=(e,t=0)=>{const a={minimumFractionDigits:t,maximumFractionDigits:t};return null==e?void 0:e.toLocaleString("en-US",a)};c((()=>e.value),((e,t)=>{if(e!==t){const t=null==e||Object.is(e,"")?null:Number(e);o.value?r.value=Number.isNaN(t)?null:v(t,i.precision?i.precision:0):r.value=Number.isNaN(t)?null:t}}),{immediate:!0});const b=l((()=>{if(o.value){if(r.value||0===r.value)return v(Number(r.value),i.precision?i.precision:0)}else if(r.value||0===r.value)return e.controller.formatValue(r.value);return""})),g=e=>{e?p.value=e:setTimeout((()=>{p.value=e}),100)};c(h,(t=>{if(e.autoFocus&&t){t.$el.getElementsByTagName("input")[0].focus()}}));const f=((e,t)=>{let a;return(...n)=>{clearTimeout(a),a=setTimeout((()=>e.apply(this,n)),t)}})((e=>{let a=null;"string"==typeof e&&(a=(e=>{const t=e.replace(/,/g,"");return parseFloat(t)})(e)),t("change",a)}),300);return{ns:a,c:i,currentVal:r,handleChange:(e,a="blur")=>{a===i.triggerMode&&t("change",e)},onFocus:e=>{t("focus",e),g(!0)},onBlur:e=>{t("blur",e),o.value&&f(r.value),g(!1)},editorRef:h,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},isEditable:p,setEditable:g,showFormDefaultContent:m,max:d,min:u,currentFormatVal:b,enablethousands:o,onInput:e=>{r.value=e}}},render(){const{unitName:e}=this.c.parent;let t=null;this.readonly?(t=ni(this.currentVal)?"":"".concat(this.currentFormatVal),e&&(this.c.emptyHiddenUnit?t&&(t+=e):t+=e)):t=[this.enablethousands?o(i("el-input"),w({ref:"editorRef",class:[this.ns.b("input")],"model-value":this.currentVal,onInput:this.onInput,placeholder:this.c.placeHolder,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},this.$attrs),null):o(i("el-input-number"),w({ref:"editorRef",class:[this.ns.b("input")],"model-value":this.currentVal,placeholder:this.c.placeHolder,min:this.min,max:this.max,precision:this.c.precision,disabled:this.disabled,controls:!1,onChange:e=>this.handleChange(e,"blur"),onInput:e=>this.handleChange(e,"input"),onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},this.$attrs),null),e&&o("i",{class:this.ns.e("unit")},[e])];return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&(()=>{let t="";return e&&(this.c.emptyHiddenUnit?this.currentFormatVal&&(t=e):t=e),o("div",{class:this.ns.b("form-default-content")},[this.currentVal||0===this.currentVal?this.currentFormatVal+t:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)])})(),t])}}),Vx=a({name:"IBizInputIP",props:He(),emits:Ve(),setup(e,{emit:t}){const a=B("input-ip"),o=e.controller,i=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),s=n(!1),r=n(!1),d=e=>{const t=e.split(".");return[t[0]||"",t[1]||"",t[2]||"",t[3]||""]},u=e=>e.join("."),p=n(d(e.value||"")),h=n([]);return c((()=>e.value),(e=>{p.value=d(e||"")})),c((()=>h.value[0]),(t=>{e.autoFocus&&t&&t.focus()})),{ns:a,c:o,showFormDefaultContent:i,activeElement:s,ipSegments:p,ipInputs:h,joinIp:u,handleInput:(e,a)=>{var n;if(e=e.replace(/[^0-9]/g,"").slice(0,3)){const t=parseInt(e,10);e=t>255?"255":"".concat(t)}p.value[a]=e;const o=h.value[a],i=null==o?void 0:o.input;if(3===p.value[a].length&&a<3&&i&&i.selectionStart===p.value[a].length&&i.selectionEnd===p.value[a].length){const e=h.value[a+1];e&&(e.focus(),null==(n=e.input)||n.setSelectionRange(0,p.value[a+1].length))}p.value.every((e=>!!e&&/^(0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])$/.test(e)))&&t("change",u(p.value))},handleKeydown:(e,a)=>{var n,o,i,s,l;if("Enter"!==e.key)if(/^[0-9]$/.test(e.key)){const t=e.target;if(t&&3===p.value[a].length&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),a<3&&t.selectionEnd===p.value[a].length)){const e=a+1,t=h.value[e];t&&(t.focus(),null==(n=t.input)||n.setSelectionRange(0,p.value[e].length))}}else if("."!==e.key){if("Backspace"===e.key){const t=e.target;if(t&&a>0&&0===t.selectionStart&&0===t.selectionEnd){e.preventDefault();const t=a-1,n=p.value[t],o=h.value[t];n.length>0&&(p.value[t]=n.slice(0,-1)),o&&(o.focus(),null==(i=o.input)||i.setSelectionRange(p.value[t].length,p.value[t].length))}}if("ArrowLeft"===e.key){const t=e.target;if(t&&a>0&&0===t.selectionStart&&0===t.selectionEnd){e.preventDefault();const t=a-1,n=h.value[t];n&&(n.focus(),null==(s=n.input)||s.setSelectionRange(p.value[t].length,p.value[t].length))}}if("ArrowRight"===e.key){const t=e.target;if(t&&a<3&&t.selectionStart===p.value[a].length&&t.selectionEnd===p.value[a].length){e.preventDefault();const t=a+1,n=h.value[t];n&&(n.focus(),null==(l=n.input)||l.setSelectionRange(0,0))}}}else{e.preventDefault();const t=e.target;if(t&&a<3&&t.selectionStart===t.selectionEnd&&0!==t.selectionEnd&&p.value[a].length){const e=a+1,t=h.value[e];t&&(t.focus(),null==(o=t.input)||o.setSelectionRange(0,p.value[e].length))}}else t("enter",e)},handleFocus:()=>{s.value=!0,r.value&&(r.value=!1,t("focus"))},handleBlur:()=>{s.value=!1,setTimeout((()=>{s.value||(r.value=!0,t("blur"))}),0)}}},render(){let e=null;e=this.readonly?this.value:o("div",{class:this.ns.b("content")},[this.ipSegments.map(((e,t)=>[o(i("el-input"),{"model-value":e,maxlength:4,disabled:this.disabled,readonly:this.readonly,ref:e=>{this.ipInputs[t]=e||void 0},onInput:e=>this.handleInput(e,t),onKeydown:e=>this.handleKeydown(e,t),onFocus:this.handleFocus,onBlur:this.handleBlur},null),t<3&&o("span",{class:this.ns.b("dot")},[h(".")])]))]);const t=o("div",{class:this.ns.b("form-default-content")},[this.ipSegments.some((e=>e))?this.joinIp(this.ipSegments):o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("focus",this.activeElement&&!this.disabled&&!this.readonly)]},[this.showFormDefaultContent&&t,e])}}),Fx=a({name:"IBizSignature",props:Fe(),emits:Ve(),setup(e,{emit:t}){const a=B("signature"),o=e.controller,i=o.model,s=n({["".concat(ibiz.env.tokenHeader,"Authorization")]:"".concat(ibiz.env.tokenPrefix,"Bearer ").concat($t(Jt.TOKEN))}),r=n(""),d=n(""),u=n(),p=n(!1),h=n(""),m=n("");let v="img",g=[{label:ibiz.i18n.t("editor.signature.undo"),type:"undo"},{label:ibiz.i18n.t("editor.signature.rewrite"),type:"rewrite"},{label:ibiz.i18n.t("editor.signature.confirm"),type:"confirm",buttonType:"primary"}];if(i.editorParams&&(i.editorParams.mode&&(v=i.editorParams.mode),i.editorParams.buttons))try{g=JSON.parse(i.editorParams.buttons)}catch(e){ibiz.log.error(e)}const f=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),w=async()=>{var t,a;if(m.value){if(ibiz.loading.showRedirect(),"img"===v)h.value=m.value;else if(d.value){const a=JSON.parse(m.value)[0],n=d.value.replace("%fileId%",a.id);try{const i={...o.editorParams};i.exportparams&&(i.exportParams=JSON.parse(i.exportparams));const s=await ibiz.util.file.requestFile(n,void 0,{context:o.context,params:o.params,data:e.data,file:{fileId:a.id},extraParams:i,downloadTicketParams:o.downloadTicketParams}),l=await(null==(t=u.value)?void 0:t.signaturePad.blobToDataURL(s));h.value=l}catch(e){ibiz.log.error(e)}}(()=>{var e;null==(e=u.value)||e.updateSignaturePad((()=>{b((()=>{var e,t;h.value?null==(e=u.value)||e.signaturePad.fromDataURL(h.value):null==(t=u.value)||t.signaturePad.clear()}))}))})(),null==(a=u.value)||a.signaturePad.loadImage(h.value,(()=>{ibiz.loading.hideRedirect()}))}};c((()=>e.data),(e=>{if(e){const t=ibiz.util.file.calcFileUpDownUrl(o.context,o.params,e,o.editorParams);r.value=t.uploadUrl,d.value=t.downloadUrl}}),{immediate:!0,deep:!0}),c((()=>e.value),(async(e,t)=>{e!==t&&(m.value=e?"".concat(e||""):"",await w())}),{immediate:!0});const y=e=>{t("change",e)},C=async e=>{const t=await(async e=>{const{type:t}=(e=>({type:e.split(",")[0].split(":")[1].split(";")[0]}))(e),a=Qt(e),n="signature_".concat(Date.now(),".png"),o=new File([a],n,{type:t});return await ibiz.util.file.fileUpload(r.value,o,s.value)})(e);y(JSON.stringify([{name:t.name,id:t.id}]))},I=()=>{var e,t,a;if(p.value=!1,!(null==(e=u.value)?void 0:e.signaturePad.isRedrawn()))return;if(null==(t=u.value)?void 0:t.signaturePad.isEmpty())return void(()=>{var e;null==(e=u.value)||e.signaturePad.clear(),h.value="",y(null)})();const n=null==(a=u.value)?void 0:a.signaturePad.toDataURL();if(n!==h.value)if(h.value=n,"file"===v)C(n);else y(n)};return{c:o,ns:a,signatureRef:u,fullScreen:p,currentDataURL:h,buttons:g,showFormDefaultContent:f,handleButtonClick:e=>{var t,a;switch(e){case"undo":null==(t=u.value)||t.signaturePad.undoLastStep();break;case"rewrite":null==(a=u.value)||a.signaturePad.clear();break;case"confirm":I()}}}},render(){return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)]},[o(i("iBizSignaturePad"),{ref:"signatureRef",class:this.ns.e("pad"),options:{...this.c.model.editorParams,...this.$attrs}},null),!this.readonly&&o("div",{class:this.ns.e("toolbar")},[this.buttons.map((e=>o(i("el-button"),{disabled:this.disabled,type:e.buttonType&&e.buttonType.toLowerCase()||"default",onClick:()=>this.handleButtonClick(e.type)},{default:()=>[e.label]})))])])}});var Ux=Object.defineProperty,Hx=(e,t,a)=>(((e,t,a)=>{t in e?Ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qx extends Po{constructor(){super(...arguments),Hx(this,"precision"),Hx(this,"deService"),Hx(this,"deACMode"),Hx(this,"keyName","srfkey"),Hx(this,"textName","srfmajortext"),Hx(this,"sort","asc"),Hx(this,"dataItems",[]),Hx(this,"chatCompletion",!1),Hx(this,"codeList"),Hx(this,"emptyHiddenUnit",!0)}async onInit(){if(await super.onInit(),this.precision=this.editorParams.precision?Ai(this.editorParams.precision):this.model.precision,"TEXTAREA"===this.model.editorType||"TEXTAREA_10"===this.model.editorType||"MOBTEXTAREA"===this.model.editorType){const e=this.model;if(e.appDEACModeId&&(this.deACMode=await ha(e.appDEACModeId,e.appDataEntityId,this.context.srfappid),this.deACMode)){if("AUTOCOMPLETE"===this.deACMode.actype){const{minorSortAppDEFieldId:e,minorSortDir:t}=this.deACMode;e&&t&&(this.sort="".concat(e.toLowerCase(),",").concat(t.toLowerCase())),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach((e=>{"value"!==e.id&&"text"!==e.id&&this.dataItems.push(e)})))}"CHATCOMPLETION"===this.deACMode.actype&&ibiz.env.enableAI&&(this.deService=await ibiz.hub.getApp(e.appId).deService.getService(this.context,e.appDataEntityId),this.chatCompletion=!0)}}if("AUTH_USERID"!==this.model.predefinedType||this.placeHolder?"AUTH_PASSWORD"!==this.model.predefinedType||this.placeHolder||(this.placeHolder=ibiz.i18n.t("app.pleaseEnterPassword")):this.placeHolder=ibiz.i18n.t("app.pleaseEnterAccount"),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}this.extraParams&&(this.emptyHiddenUnit=this.extraParams.emptyHiddenUnit)}}var Gx=Object.defineProperty,Wx=(e,t,a)=>(((e,t,a)=>{t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Kx{constructor(e){Wx(this,"formEditor","IBizInput"),Wx(this,"gridEditor","IBizInput"),"NUMBER"===e&&(this.formEditor="IBizInputNumber",this.gridEditor="IBizInputNumber"),"IPADDRESSTEXTBOX"===e&&(this.formEditor="IBizInputIP",this.gridEditor="IBizInputIP"),"SIGNATURE"===e&&(this.formEditor="IBizSignature",this.gridEditor="IBizSignature")}async createController(e,t){const a=new qx(e,t);return await a.init(),a}}const Yx=a({name:"IBizDropdown",props:qe(),emits:Ve(),setup(e,{emit:t}){var a;const s=B("dropdown"),r=e.controller,u=n([]),h=n([]),m=n(!1),v=n(!1),g=n([]),f=n(!1),w=n(),y=r.model.editorItems,C=n(!1);let I,D="";const E=n(!1),S=n(),x=(null==(a=r.editorParams)?void 0:a.valueseparator)||",",P=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),k=l((()=>"DROPDOWNLIST_100"===r.model.editorType?s.cssVarBlock({width:"100px"}):{})),T=e=>{if(0===e.length)return[];const t=[],a=new Set(h.value.map((e=>e.value)));return e.forEach((e=>{var n;a.has(e.value)||h.value.push(e);const o={label:e.text,value:null==(n=e.value)?void 0:n.toString(),color:null==e?void 0:e.color,textCls:null==e?void 0:e.textCls,sysImage:e.sysImage,disabled:!0===e.disableSelect,children:[]};e.children&&e.children.length>0&&(o.children=T(e.children)),t.push(o)})),t},z=e=>{u.value=[],h.value=[],r.multiple&&!e.some((e=>e.children))&&(e=r.handleCodeListAllItems(e)),r.blankItemName&&!r.multiple?u.value=[{value:void 0,text:r.blankItemName},...e]:u.value=e;for(let t=0;t<u.value.length;t++){if(u.value[t].children){v.value=!0,g.value=T(e);break}}},A=async()=>{if(r.model.appCodeListId){const e=ibiz.hub.getApp(r.context.srfappid).codeList.getCodeList(r.model.appCodeListId);e&&(E.value=e.codeItemValueNumber||!1)}C.value=!0;const t=await r.loadCodeList(e.data);z(t),m.value=!0,C.value=!1};c((()=>e.value),(async(e,t)=>{(e||null===e||0===e)&&(m.value||void 0!==t||await A())}),{immediate:!0});const O=e=>{e?f.value=e:setTimeout((()=>{f.value=e}),100)},{getSelection:M,getSelectionValue:N}=ko(r.allItemsValue),_=l({get(){var t,a,n;return m.value?y&&y.length>0&&!r.multiple?null==(t=e.data[y[0].id])?void 0:t.toString():e.value&&"string"==typeof e.value?r.allItems&&r.multiple&&!v.value?M([],e.value.split(x),u.value,u.value).map((e=>"".concat(e))):r.multiple?null==(a=e.value)?void 0:a.toString().split(x):e.value.toString():e.value&&Array.isArray(e.value)?r.allItems&&r.multiple&&!v.value?M([],e.value,u.value,u.value).map((e=>"".concat(e))):r.multiple?e.value:e.value.toString():r.multiple?[]:(null==(n=e.value)?void 0:n.toString())||"":r.multiple?[]:""},set(a){let n=a;if(r.blankItemName&&!a&&(n=void 0),Array.isArray(n)){if(r.allItems&&r.multiple&&!v.value){const e=M(_.value,n,u.value,u.value);n=N(e).map((e=>"".concat(e)))}let e=null;e=0===n.length?null:"SIMPLES"===r.model.valueType?n:n.join(x),t("change",e)}else if(y&&y.length>0){let e=n;E.value&&(e=""===n?null:Number(n)),t("change",e,y[0].id);const a=(o=E.value?Number(n):n,(v.value?h.value:u.value).find((e=>e.value===o)));a&&t("change",a.text)}else{let e=n;E.value&&(e=""===n?null:Number(n)),t("change",e)}var o;O(!1),"true"!==r.editorParams.alwaysLoad&&"true"!==r.editorParams.alwaysload||A(),e.autoFocus&&(D="blur",t("blur"))}}),R=l((()=>{const e=Array.isArray(_.value)?_.value:[_.value],t=v.value?h.value:u.value,a=[];return e.forEach((e=>{t.forEach((t=>{(E.value?t.value===Number(e):t.value===e)&&a.push(t.text)}))})),a.join(x)}));c(R,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),c(w,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const L=e=>(v.value?h.value:u.value).find((t=>t.text===e));se(r.model.appCodeListId,r.context.srfappid,(e=>{e&&z(e)})),d((()=>{(()=>{const{navigateContexts:t=[],navigateParams:a=[]}=r.model,n=[];[...t,...a].forEach((e=>{!e.rawValue&&e.value&&n.push(e.value)})),c((()=>{const t={};return Object.keys(e.data).forEach((a=>{n.includes(a)&&(t[a]=e.data[a])})),t}),(()=>{e.data&&A()}),{deep:!0})})(),w.value&&(I=le(w,(async e=>{D="outside"})))})),p((()=>{I&&I.stop&&I.stop()}));const j={};return"round"===r.editorParams.type&&Object.assign(j,{prefix:()=>R.value.split(x).map((e=>{const t=L(e);return o("div",{class:[s.b("select-option-text"),null==t?void 0:t.textCls],style:(null==t?void 0:t.color)||(null==t?void 0:t.bkcolor)?s.cssVarBlock({"select-option-item-color":"".concat(t.color||""),"select-option-item-bkcolor":"".concat(t.bkcolor||""),"select-option-item-padding":"0 var(".concat(s.cssVarName("spacing-base"),")")}):""},[(null==t?void 0:t.sysImage)&&o(i("iBizIcon"),{icon:null==t?void 0:t.sysImage},null),e||""])}))}),{ns:s,c:r,curValue:_,items:u,customNodeClass:(e,t)=>e.children.length?s.e("branch-node"):null,valueText:R,hasChildren:v,onBlur:e=>{D="blur",t("blur",e),O(!1)},onFocus:e=>{D="focus",t("focus",e),O(!0)},editorRef:w,treeNodes:g,cssVars:k,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},getCodeListItem:L,isEditable:f,setEditable:O,showFormDefaultContent:P,onVisibleChange:async e=>{var t,a,n;const o="SEARCHFORM"===(null==(n=null==(a=null==(t=r.parent)?void 0:t.form)?void 0:a.model)?void 0:n.controlType);!e&&o&&b((()=>{var e;null==(e=S.value)||e.focus()})),!e||m.value&&"true"!==r.editorParams.alwaysLoad&&"true"!==r.editorParams.alwaysload||(await A(),v.value&&w.value&&"outside"!==D&&b((()=>{w.value.focus()})),b((()=>{window.dispatchEvent(new Event("resize"))})))},isLoading:C,prefix:j,hiddenInputRef:S,valueSeparator:x}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||this.c.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),t=this.hasChildren?o(i("el-tree-select"),w({ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,clearable:!0,class:[this.ns.b("select")],filterable:!0,teleported:!this.showFormDefaultContent,data:this.treeNodes,"allow-create":!this.c.forceSelection,"default-first-option":this.c.defaultFirstOption,"check-strictly":!0,"render-after-expand":!0,multiple:this.c.multiple,placeholder:this.c.placeHolder?this.c.placeHolder:" ",disabled:this.disabled,loading:this.isLoading,"fit-input-width":e,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onVisibleChange:this.onVisibleChange,"popper-class":"".concat(this.ns.b("popper")," ").concat(this.ns.is("allow-create",!this.c.forceSelection)),props:{class:this.customNodeClass}},this.$attrs),{default:t=>{const a=(t.data||{}).label||"";return o("span",{title:zt(e?a:"")},[a])}}):o(i("el-select"),w({ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,clearable:!0,class:[this.ns.b("select")],filterable:!0,teleported:!this.showFormDefaultContent,multiple:this.c.multiple,"allow-create":!this.c.forceSelection,placeholder:this.c.placeHolder?this.c.placeHolder:" ",disabled:this.disabled,loading:this.isLoading,"fit-input-width":e,"popper-class":"".concat(this.ns.b("popper")," ").concat("round"===this.c.editorParams.type?this.ns.bm("popper","round"):""," ").concat(this.ns.bm("popper","".concat(this.c.model.id))),onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onVisibleChange:this.onVisibleChange},this.$attrs),{default:()=>this.items.map((t=>{var a;return o(i("el-option"),{key:t.value,value:null==(a=t.value)?void 0:a.toString(),label:t.text,disabled:!0===t.disableSelect,style:t.bkcolor?this.ns.cssVarBlock({"select-option-item-bkcolor":"".concat(t.bkcolor)}):"",class:[t.cls?t.cls:null],title:zt(e?t.text:"")},{default:()=>o("div",{class:[this.ns.b("select-option-content"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"select-option-item-color":"".concat(t.color)}):""},[t.sysImage&&o(i("iBizIcon"),{icon:t.sysImage},null),o("span",{class:[e&&this.ns.be("select-option-content","text")]},[t.text])])})})),...this.prefix}),a=this.valueText.split(this.valueSeparator).map((e=>{const t=this.getCodeListItem(e);return o("span",{class:[this.ns.b("readonly-text-item"),null==t?void 0:t.textCls],style:(null==t?void 0:t.color)||(null==t?void 0:t.bkcolor)?this.ns.cssVarBlock({"readonly-text-item-color":"".concat(t.color||""),"select-option-item-color":"".concat(t.color||""),"select-option-item-bkcolor":"".concat(("round"===this.c.editorParams.type?t.bkcolor:"")||"")}):""},[(null==t?void 0:t.sysImage)&&o(i("iBizIcon"),{icon:null==t?void 0:t.sysImage},null),o("span",{class:this.ns.be("readonly-text-item","label")},[e])])})),n=o("div",{class:[this.ns.b("form-default-content"),this.ns.is("multiple",this.c.multiple)]},[this.valueText?this.valueText.split(this.valueSeparator).map((e=>{const t=this.getCodeListItem(e);return o("span",{class:[this.ns.b("content-item"),null==t?void 0:t.textCls],style:(null==t?void 0:t.color)||(null==t?void 0:t.bkcolor)?this.ns.cssVarBlock({"select-option-item-color":"".concat(t.color||""),"select-option-item-bkcolor":"".concat(("round"===this.c.editorParams.type?t.bkcolor:"")||"")}):""},[o("span",{class:this.ns.be("content-item","label")},[e])])})):o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]),s=o("input",{ref:"hiddenInputRef",type:"text",class:this.ns.e("hidden-input"),readonly:!0,onKeyup:this.handleKeyUp},null);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent),"round"===this.c.editorParams.type&&this.ns.m("round")],style:this.cssVars},[this.showFormDefaultContent&&n,this.readonly?a:t,this.readonly?null:s])}}),Xx=a({name:"IBizEmojiPicker",props:qe(),emits:Ve(),setup(e,{emit:t}){const a=B("emoji-picker"),s=e.controller,r=n(),d=n(""),u=n(!1),p=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),h=e=>{e.stopPropagation(),e.preventDefault(),u.value=!0},m=e=>{e.stopPropagation(),e.preventDefault(),d.value="",u.value=!1,t("change",""),r.value.click()};c((()=>e.value),((e,t)=>{e!==t&&(d.value=e&&Kt("".concat(e))?Yt(e):e)}),{immediate:!0});const v=()=>{let e=o("span",{class:[a.e("button-content")],onClick:h},[o("svg",{class:a.em("button-content","icon"),viewBox:"0 0 1040 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1490",width:"1em",height:"1em"},[o("path",{d:"M512.075261 1024A511.774217 511.774217 0 1 1 730.482434 48.769072a37.630457 37.630457 0 1 1-32.061149 68.035867 436.513303 436.513303 0 1 0 250.468323 395.270322 37.630457 37.630457 0 0 1 75.260914 0 512.526826 512.526826 0 0 1-512.075261 511.924739z","p-id":"1491"},null),o("path",{d:"M333.857416 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.499339 57.499339 0 0 0-57.348817-57.348817zM686.53006 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.348817 57.348817 0 0 0-57.348817-57.348817zM515.236219 783.165074c-162.864619 0-262.359547-141.942084-262.359547-219.159782a30.104366 30.104366 0 0 1 60.208731 0c0 48.618551 76.314567 158.951051 202.150816 158.951051s193.571072-134.114949 193.571072-158.951051a30.104366 30.104366 0 0 1 60.208731 0c0 54.488902-90.012054 219.159782-253.779803 219.159782zM1009.549904 207.720123h-67.132735V139.985301a30.104366 30.104366 0 1 0-60.208732 0v67.734822h-67.734822a30.104366 30.104366 0 0 0-30.104366 30.104366 30.104366 30.104366 0 0 0 30.104366 30.104366h67.734822v67.734823a30.104366 30.104366 0 0 0 60.208732 0v-67.734823h67.734823a30.104366 30.104366 0 0 0 30.104365-30.104366 30.104366 30.104366 0 0 0-30.706453-30.104366z","p-id":"1492"},null)]),ibiz.i18n.t("editor.emojiPicker.addEmoji")]);return d.value&&(e=o("span",{class:[a.e("button-content")]},[o("svg",{class:a.em("button-content","icon"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em",onClick:m},[o("path",{d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"},null)]),o("span",{innerHTML:d.value},null)])),e};return{ns:a,c:s,emoji:d,visible:u,emojiRef:r,showFormDefaultContent:p,onSelect:e=>{u.value=!1,d.value=e.data,t("change",Zt(e.data))},onAddEmoji:h,onClearEmoji:m,renderReference:()=>o(i("el-button"),{class:[a.e("button"),a.is("clear",!!d.value)]},{default:()=>[p.value&&o("div",{class:[a.b("form-default-content"),a.is("clear",!!d.value)]},[d.value?d.value:o(i("iBizEditorEmptyText"),{showPlaceholder:s.emptyShowPlaceholder,placeHolder:s.placeHolder},null)]),v()]})}},render(){return o("div",{ref:"emojiRef",class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("active",this.visible),this.ns.is("show-default",this.showFormDefaultContent)]},[o(i("el-popover"),{trigger:"click",placement:"bottom-start",width:"auto",visible:this.visible,"onUpdate:visible":e=>this.visible=e,"hide-after":0,"popper-class":[this.ns.b("popper")]},{reference:()=>this.renderReference(),default:()=>o(i("iBizEmojiSelect"),{continuousList:!0,dark:!0,onSelect:this.onSelect},null)})])}}),$x=a({name:"IBizVirtualizedList",props:qe(),emits:Ve(),setup(e,{emit:t}){const a=B("dropdown"),s=e.controller,r=n([]),u=n([]),h=n(!1),m=n(!1),v=n([]),g=n(),f=s.model.editorItems,w=n(!1);let y="";const C=n(!1),I=e=>{if(0===e.length)return[];const t=[],a=new Set(u.value.map((e=>e.value)));return e.forEach((e=>{var n;a.has(e.value)||u.value.push(e);const o={label:e.text,value:null==(n=e.value)?void 0:n.toString(),color:null==e?void 0:e.color,textCls:null==e?void 0:e.textCls,sysImage:e.sysImage,disabled:!0===e.disableSelect,children:[]};e.children&&e.children.length>0&&(o.children=I(e.children)),t.push(o)})),t},D=e=>{r.value=[],u.value=[],s.multiple&&!e.some((e=>e.children))&&(e=s.handleCodeListAllItems(e)),s.blankItemName&&!s.multiple?r.value=[{value:void 0,text:s.blankItemName},...e]:r.value=e;for(let t=0;t<r.value.length;t++){if(r.value[t].children){m.value=!0,v.value=I(e);break}}},E=async()=>{if(s.model.appCodeListId){const e=ibiz.hub.getApp(s.context.srfappid).codeList.getCodeList(s.model.appCodeListId);e&&(C.value=e.codeItemValueNumber||!1)}w.value=!0;const t=await s.loadCodeList(e.data);D(t),h.value=!0,w.value=!1};c((()=>e.value),(async(e,t)=>{(e||null===e||0===e)&&(h.value||void 0!==t||await E())}),{immediate:!0});const{getSelection:S,getSelectionValue:x}=ko(s.allItemsValue),P=l({get(){var t,a,n;return h.value?f&&f.length>0&&!s.multiple?null==(t=e.data[f[0].id])?void 0:t.toString():e.value&&"string"==typeof e.value?s.allItems&&s.multiple&&!m.value?S([],e.value.split(","),r.value,r.value).map((e=>"".concat(e))):s.multiple?null==(a=e.value)?void 0:a.toString().split(","):e.value.toString():e.value&&Array.isArray(e.value)?s.allItems&&s.multiple&&!m.value?S([],e.value,r.value,r.value).map((e=>"".concat(e))):s.multiple?e.value:e.value.toString():s.multiple?[]:(null==(n=e.value)?void 0:n.toString())||"":s.multiple?[]:""},set(a){let n=a;if(s.blankItemName&&!a&&(n=void 0),Array.isArray(n)){if(s.allItems&&s.multiple&&!m.value){const e=S(P.value,n,r.value,r.value);n=x(e).map((e=>"".concat(e)))}let e=null;e=0===n.length?null:"SIMPLES"===s.model.valueType?n:n.join(","),t("change",e)}else if(f&&f.length>0){let e=void 0===n?null:n;C.value&&null!==e&&(e=Number(n)),t("change",e,f[0].id);const a=(o=C.value?Number(n):n,(m.value?u.value:r.value).find((e=>e.value===o)));a&&t("change",a.text)}else{let e=void 0===n?null:n;C.value&&null!==e&&(e=Number(n)),t("change",e)}var o;"true"!==s.editorParams.alwaysLoad&&"true"!==s.editorParams.alwaysload||E(),e.autoFocus&&(y="blur",t("blur"))}}),k=l((()=>{const e=Array.isArray(P.value)?P.value:[P.value],t=m.value?u.value:r.value,a=[];return e.forEach((e=>{t.forEach((t=>{(C.value?t.value===Number(e):t.value===e)&&a.push(t.text)}))})),a.join(",")}));c(k,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),c(g,(t=>{var a;e.autoFocus&&t&&t.focus&&(null==(a=t.focus)||a.call(t))}));const T=e=>{y="focus",t("focus",e)},z=e=>{y="blur",t("blur",e)},A=e=>(m.value?u.value:r.value).find((t=>t.text===e));se(s.model.appCodeListId,s.context.srfappid,(e=>{e&&D(e)}));const O=e=>{const t=e.target;"focus"!==y||g.value.$el.contains(t)||g.value.$refs.popper.popperRef.contentRef.contains(t)||z(e)};d((()=>{(()=>{const{navigateContexts:t=[],navigateParams:a=[]}=s.model,n=[];[...t,...a].forEach((e=>{!e.rawValue&&e.value&&n.push(e.value)})),c((()=>{const t={};return Object.keys(e.data).forEach((a=>{n.includes(a)&&(t[a]=e.data[a])})),t}),(()=>E()),{deep:!0})})(),document.addEventListener("click",O,{capture:!0})})),p((()=>{document.removeEventListener("click",O,{capture:!0})}));const M={};return"round"===s.editorParams.type&&Object.assign(M,{prefix:()=>k.value.split(",").map((e=>{const t=A(e);return o("div",{class:[a.b("select-option-text"),null==t?void 0:t.textCls],style:(null==t?void 0:t.color)||(null==t?void 0:t.bkcolor)?a.cssVarBlock({"select-option-item-color":"".concat(t.color||""),"select-option-item-bkcolor":"".concat(t.bkcolor||""),"select-option-item-padding":"0 var(".concat(a.cssVarName("spacing-base"),")")}):""},[(null==t?void 0:t.sysImage)&&o(i("iBizIcon"),{icon:null==t?void 0:t.sysImage},null),e||""])}))}),{c:s,ns:a,items:r,prefix:M,curValue:P,editorRef:g,isLoading:w,treeNodes:v,valueText:k,hasChildren:m,onBlur:z,onFocus:T,handleClear:()=>{T()},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},customNodeClass:(e,t)=>e.children.length?a.e("branch-node"):null,getCodeListItem:A,onVisibleChange:async e=>{!e||h.value&&"true"!==s.editorParams.alwaysLoad&&"true"!==s.editorParams.alwaysload||(await E(),m.value&&g.value&&"outside"!==y&&b((()=>{var e,t;null==(t=(e=g.value).focus)||t.call(e)})),b((()=>{window.dispatchEvent(new Event("resize"))})))}}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||this.c.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),t=o(i("el-select-v2"),w({ref:"editorRef",modelValue:this.curValue||void 0,"onUpdate:modelValue":e=>{this.curValue=e},clearable:!0,class:[this.ns.b("select")],filterable:!0,multiple:this.c.multiple,"allow-create":!this.c.forceSelection,placeholder:this.c.placeHolder?this.c.placeHolder:" ",disabled:this.disabled,loading:this.isLoading,"fit-input-width":e,"popper-class":"".concat(this.ns.b("popper")," ").concat("round"===this.c.editorParams.type?this.ns.bm("popper","round"):""," ").concat(this.ns.bm("popper","".concat(this.c.model.id))," ").concat(this.ns.b("virtualized-list-popper")),onFocus:this.onFocus,onClear:this.handleClear,onKeyup:this.handleKeyUp,onVisibleChange:this.onVisibleChange,options:this.items,props:{key:"value",label:"text"}},this.$attrs),{default:t=>{const{item:a}=t;return o("div",{style:a.bkcolor?this.ns.cssVarBlock({"select-option-item-bkcolor":"".concat(a.bkcolor)}):"",class:["select-v2-option-item",a.cls?a.cls:null,!0===a.disableSelect?"disabled-select-v2":null],title:zt(e?a.text:"")},[o("div",{class:[this.ns.b("select-option-content"),a.textCls?a.textCls:null],style:a.color?this.ns.cssVarBlock({"select-option-item-color":"".concat(a.color)}):""},[a.sysImage&&o(i("iBizIcon"),{icon:a.sysImage},null),o("span",{class:[e&&this.ns.be("select-option-content","text")]},[a.text])])])},...this.prefix}),a=this.valueText.split(",").map((e=>{const t=this.getCodeListItem(e);return o("span",{class:[this.ns.b("readonly-text-item"),null==t?void 0:t.textCls],style:(null==t?void 0:t.color)||(null==t?void 0:t.bkcolor)?this.ns.cssVarBlock({"readonly-text-item-color":"".concat(t.color||""),"select-option-item-color":"".concat(t.color||""),"select-option-item-bkcolor":"".concat(("round"===this.c.editorParams.type?t.bkcolor:"")||"")}):""},[(null==t?void 0:t.sysImage)&&o(i("iBizIcon"),{icon:null==t?void 0:t.sysImage},null),o("span",{class:this.ns.be("readonly-text-item","label")},[e])])}));return o("div",{class:[this.ns.b(),this.ns.b("virtualized-list"),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"","round"===this.c.editorParams.type&&this.ns.m("round"),this.ns.is("has-value",null!=this.value&&""!==this.value)]},[this.readonly?a:t])}});function Jx(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const Qx=a({name:"IBizTreePicker",props:qe(),emits:Ve(),setup(e,{emit:t}){const a=B("tree-picker"),o=e.controller,i=o.model,s=n([]),l=n([]),r=n(!1),u=n([]),p=n([]),h=n(!1),m=n(!1),v=n(""),b=n(),g=n(!0),f=n(!1),w=n([]),y=o.model.valueSeparator||",";let C=!1;if(i.editorParams){const{editorParams:e}=i;e.showtoolbar&&(C="true"===e.showtoolbar)}const I=e=>{if(0===e.length)return[];const t=[];return e.forEach((e=>{var a;-1===l.value.findIndex((t=>t.value===e.value))&&l.value.push(e);const n={label:e.text,value:null==(a=e.value)?void 0:a.toString(),color:null==e?void 0:e.color,textCls:null==e?void 0:e.textCls,sysImage:e.sysImage,disabled:!0===e.disableSelect,children:[]};e.children&&e.children.length>0&&(n.children=I(e.children)),t.push(n)})),t},D=e=>{s.value=[],l.value=[];let t=e;o.multiple&&!t.some((e=>e.children))&&(t=o.handleCodeListAllItems(t)),s.value=t;for(let e=0;e<s.value.length;e++){if(s.value[e].children){u.value=I(t);break}}},E=async()=>{if(o.model.appCodeListId){const e=ibiz.hub.getApp(o.context.srfappid).codeList.getCodeList(o.model.appCodeListId);e&&(m.value=e.codeItemValueNumber||!1)}h.value=!0;const t=await o.loadCodeList(e.data);D(t),r.value=!0,h.value=!1};c((()=>e.value),(async(e,t)=>{if(e){let a=[];r.value||void 0!==t||await E(),Ti(e)?a=e:yi(e)&&(a=e.split(y)),p.value=a.filter((e=>l.value.find((t=>t.value===e&&t.isLeaf))))}}),{immediate:!0});const S=e=>{let a=null;a="SIMPLES"===o.model.valueType?e:e.join(y),t("change",a)};se(o.model.appCodeListId,o.context.srfappid,(e=>{e&&D(e)})),d((()=>{E()}));c(v,(e=>{var t;null==(t=b.value)||t.filter(e)}));const x=(e=!0)=>{l.value.forEach((t=>{t.children&&t.children.length>0&&((e,t)=>{var a;const n=null==(a=b.value)?void 0:a.getNode(e);n.isLeaf||(t?n.expand():n.collapse())})(t.value,e)}))};return{ns:a,c:o,items:s,treeRef:b,filterText:v,treeNodes:u,isCancel:g,defaultCheckedKeys:p,expandedKeys:w,showToolbar:C,onNodeExpand:(...e)=>{e[0]&&e[0].value&&w.value.push(e[0].value)},onNodeCollapse:(...e)=>{if(e[0]&&e[0].value){const t=w.value.findIndex((t=>e[0].value===t));-1!==t&&w.value.splice(t,1)}},filterNode:(e,t)=>!e||t.label&&t.label.includes(e),customNodeClass:e=>e.children.length?a.e("branch-node"):null,onAllExpand:()=>{f.value=!0,x()},onAllCollapse:()=>{f.value=!1,x(!1)},onAllSelect:()=>{var e,t;const a=null==(e=l.value)?void 0:e.map((e=>e.value));x(f.value),null==(t=b.value)||t.setCheckedKeys(a),S(a)},onAllCancel:()=>{var e;x(f.value),null==(e=b.value)||e.setCheckedKeys([]),S([])},onCheck:(...e)=>{if(e[1]){const{checkedKeys:t,halfCheckedKeys:a}=e[1],n=[...a,...t].filter(((e,t,a)=>a.indexOf(e)===t));S(n)}}}},render(){const e=this.readonly||this.disabled,t=[o("div",{class:[this.ns.e("search")]},[o(i("el-input"),{modelValue:this.filterText,"onUpdate:modelValue":e=>this.filterText=e,placeholder:this.c.placeHolder||" "},null)]),o("div",{class:[this.ns.e("tree")]},[o(i("el-tree"),{ref:"treeRef",class:this.ns.b("tree"),data:this.treeNodes,"node-key":"value",props:{children:"children",label:"label",class:this.customNodeClass},"show-checkbox":!e,"default-checked-keys":this.defaultCheckedKeys,"default-expanded-keys":this.expandedKeys,"filter-node-method":this.filterNode,onNodeExpand:this.onNodeExpand,onNodeCollapse:this.onNodeCollapse,onCheck:this.onCheck},null)])];if(!e&&this.showToolbar){let e,a,n,s;t.unshift(o("div",{class:[this.ns.e("header")]},[o(i("el-button"),{type:"primary",onClick:this.onAllSelect},Jx(e=ibiz.i18n.t("editor.treePicker.allowAll"))?e:{default:()=>[e]}),o(i("el-button"),{type:"primary",onClick:this.onAllCancel},Jx(a=ibiz.i18n.t("editor.treePicker.allProhibited"))?a:{default:()=>[a]}),o(i("el-button"),{type:"primary",onClick:this.onAllExpand},Jx(n=ibiz.i18n.t("editor.treePicker.expandAll"))?n:{default:()=>[n]}),o(i("el-button"),{type:"primary",onClick:this.onAllCollapse},Jx(s=ibiz.i18n.t("editor.treePicker.collapseAll"))?s:{default:()=>[s]})]))}return o("div",{class:[this.ns.b()]},[t])}});var Zx=Object.defineProperty,eP=(e,t,a)=>(((e,t,a)=>{t in e?Zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tP extends Po{constructor(){super(...arguments),eP(this,"multiple",!1),eP(this,"forceSelection",!0),eP(this,"defaultFirstOption",!1),eP(this,"blankItemName","")}async onInit(){var e,t,a,n,o,i;super.onInit(),"MDROPDOWNLIST"!==this.model.editorType&&"MOBCHECKLIST"!==this.model.editorType||(this.multiple=!0),(null==(e=this.editorParams)?void 0:e.forceSelection)&&(this.forceSelection=this.toBoolean(this.editorParams.forceSelection)),(null==(t=this.editorParams)?void 0:t.forceselection)&&(this.forceSelection=this.toBoolean(this.editorParams.forceselection)),(null==(a=this.editorParams)?void 0:a.defaultFirstOption)&&(this.defaultFirstOption=this.toBoolean(this.editorParams.defaultFirstOption)),(null==(n=this.editorParams)?void 0:n.defaultfirstoption)&&(this.defaultFirstOption=this.toBoolean(this.editorParams.defaultfirstoption)),(null==(o=this.editorParams)?void 0:o.blankItemName)&&(this.blankItemName=this.editorParams.blankItemName),(null==(i=this.editorParams)?void 0:i.blankitemname)&&(this.blankItemName=this.editorParams.blankitemname)}}var aP=Object.defineProperty,nP=(e,t,a)=>(((e,t,a)=>{t in e?aP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class oP{constructor(e){nP(this,"formEditor","IBizDropdown"),nP(this,"gridEditor","IBizDropdown");let t="IBizDropdown";switch(e){case"EMOJI_PICKER":t="IBizEmojiPicker";break;case"VIRTUALIZED_LIST":t="IBizVirtualizedList";break;case"TREE_PICKER":t="IBizTreePicker"}this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new tP(e,t);return await a.init(),a}}const iP=a({name:"IBizCheckbox",props:Ge(),emits:Ve(),setup(e,{emit:t}){var a,n,o,i;const s=B("checkbox"),r=e.controller.model;let c=1,d=0;(null==(a=r.editorParams)?void 0:a.selectValue)&&(c=r.editorParams.selectValue),(null==(n=r.editorParams)?void 0:n.selectvalue)&&(c=r.editorParams.selectvalue),(null==(o=r.editorParams)?void 0:o.nullValue)&&(d=r.editorParams.nullValue),(null==(i=r.editorParams)?void 0:i.nullvalue)&&(d=r.editorParams.nullvalue);const u=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{useInFocusAndBlur:p,useInValueChange:h}=We(e,t),m=l({get:()=>e.value==c,set(e){let a;a=e?c:d,t("change",a),h()}}),{componentRef:v}=je((()=>t("focus")),(()=>p()));return{ns:s,editorModel:r,currentVal:m,editorRef:v,showFormDefaultContent:u}},render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o(i("el-checkbox"),w({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled||this.readonly},this.$attrs),null)])}});class sP extends To{}var lP=Object.defineProperty,rP=(e,t,a)=>(((e,t,a)=>{t in e?lP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cP{constructor(){rP(this,"formEditor","IBizCheckbox"),rP(this,"gridEditor","IBizCheckbox")}async createController(e,t){const a=new sP(e,t);return await a.init(),a}}const dP=a({name:"IBizCheckboxList",props:Ke(),emits:Ve(),setup(e,{emit:t}){const a=B("checkbox-list"),o=e.controller,i=o.codeList,s=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),r=n([]);c((()=>e.data),(e=>{o.loadCodeList(e).then((e=>{r.value=o.handleCodeListAllItems(e)}))}),{immediate:!0,deep:!0});const d=l((()=>i&&i.orMode?i.orMode:"STR")),u=zo(d.value,o.model.valueType);se(o.model.appCodeListId,o.context.srfappid,(e=>{e&&(r.value=o.handleCodeListAllItems(e))}));let p=",";i&&i.valueSeparator&&(p=i.valueSeparator);const{useInFocusAndBlur:h,useInValueChange:m}=We(e,t),{getSelection:v,getSelectionValue:b}=ko(o.allItemsValue),g=l({get(){if(!ui(e.value)){const{getSelectArray:t}=u,a=t(e.value,i,r.value,p,null==i?void 0:i.codeItemValueNumber);if(a)return o.allItems?v([],a,r.value,r.value):a}return[]},set(e){if(o.allItems){const t=v(g.value,e,r.value,r.value);e=b(t)}let a=null;const{setSelectArray:n}=u;a=n(e,r.value,p),t("change",a),m()}}),f=l((()=>{const e=Array.isArray(g.value)?g.value:[g.value];return r.value.filter((t=>{let a=!1;return e.forEach((e=>{e==t.value&&(a=!0)})),a})).map((e=>e.text)).join(",")}));c(f,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});const{componentRef:w}=je((()=>t("focus")),(()=>h()));return{ns:a,items:r,selectArray:g,valueText:f,editorRef:w,onSelectArrayChange:e=>{g.value=e},showFormDefaultContent:s}},render(){let e;return o("div",{ref:"editorRef",class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("grid-layout",!!this.controller.rowNumber)],style:this.controller.rowNumber?"".concat(this.ns.cssVarBlockName("group-row-number"),":").concat(this.controller.rowNumber):""},[this.readonly?this.valueText:o(i("el-checkbox-group"),w({"model-value":this.selectArray,onChange:this.onSelectArrayChange},this.$attrs),(t=e=this.items.map(((e,t)=>o(i("el-checkbox"),{key:t,label:e.value,disabled:this.disabled||!0===e.disableSelect},{default:()=>[o("span",{class:this.ns.e("text")},[e.text])]}))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}))]);var t}});var uP=Object.defineProperty,pP=(e,t,a)=>(((e,t,a)=>{t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hP extends Po{constructor(){super(...arguments),pP(this,"codeList"),pP(this,"rowNumber")}async onInit(){var e,t;if(super.onInit(),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}(null==(e=this.editorParams)?void 0:e.rowNumber)&&(this.rowNumber=Number(this.editorParams.rowNumber)),(null==(t=this.editorParams)?void 0:t.rownumber)&&(this.rowNumber=Number(this.editorParams.rownumber))}}var mP=Object.defineProperty,vP=(e,t,a)=>(((e,t,a)=>{t in e?mP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bP{constructor(){vP(this,"formEditor","IBizCheckboxList"),vP(this,"gridEditor","IBizCheckboxList")}async createController(e,t){const a=new hP(e,t);return await a.init(),a}}const gP=a({name:"IBizRadio",props:Ye(),emits:Ve(),setup(e,{emit:t}){const a=B("radio"),o=e.controller,i=o.model;let s="radio",r=!1;i.editorParams&&(i.editorParams.renderMode&&(s=i.editorParams.renderMode),i.editorParams.rendermode&&(s=i.editorParams.rendermode),i.editorParams.isBtnRoundCorner&&(r=o.toBoolean(i.editorParams.isBtnRoundCorner)),i.editorParams.isbtnroundcorner&&(r=o.toBoolean(i.editorParams.isbtnroundcorner)));const{useInFocusAndBlur:d,useInValueChange:u}=We(e,t),p=n([]);c((()=>e.data),(e=>{o.loadCodeList(e).then((e=>{p.value=e}))}),{immediate:!0,deep:!0});se(o.model.appCodeListId,o.context.srfappid,(e=>{e&&(p.value=e)}));const h=l((()=>{var t;return(null==(t=p.value.find((t=>t.value==e.value)))?void 0:t.text)||""})),m=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c(h,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});const{componentRef:v}=je((()=>t("focus")),(()=>d()));return{ns:a,editorModel:i,items:p,valueText:h,onSelectValueChange:e=>{t("change",e),u()},editorRef:v,renderMode:s,isBtnRoundCorner:r,showFormDefaultContent:m}},render(){var e;let t;const a=null==(e=this.controller.editorParams)?void 0:e.itemwidth,n=a?"".concat(a,"px"):"";return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("grid-layout",!!this.controller.rowNumber)],style:this.controller.rowNumber?"".concat(this.ns.cssVarBlockName("group-row-number"),":").concat(this.controller.rowNumber):"",ref:"editorRef"},[this.readonly?this.valueText:"tab"!==this.renderMode?o(i("el-radio-group"),w({class:this.ns.e("group"),"model-value":ai(this.value)?String(this.value):"",onChange:this.onSelectValueChange},this.$attrs),(l=t=this.items.map(((e,t)=>"radio"===this.renderMode?o(i("el-radio"),{key:t,style:{width:n},title:zt(e.text),label:ai(e.value)?String(e.value):"",disabled:this.disabled||!0===e.disableSelect},{default:()=>[e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),o("span",{class:this.ns.e("text")},[e.text])]}):o(i("el-radio-button"),{key:t,class:[this.ns.e("button"),this.isBtnRoundCorner?this.ns.em("button","round-corner"):""],style:{width:n},title:zt(e.text),label:ai(e.value)?String(e.value):"",disabled:this.disabled||!0===e.disableSelect},{default:()=>[e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),o("span",{class:this.ns.em("button","text")},[e.text])]}))),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!s(l)?t:{default:()=>[t]})):o("div",{class:this.ns.b("tab")},[this.items.map((e=>{const t=ai(this.value)?String(this.value):"",a=ai(e.value)?String(e.value):"",s=this.disabled||!0===e.disableSelect;return o("span",{class:[this.ns.b("tab-item"),this.ns.is("selected",t===a),this.ns.is("disabled",s)],style:{width:n},title:zt(e.text),onClick:()=>{s||this.onSelectValueChange(a)}},[e.sysImage&&o(i("iBizIcon"),{icon:e.sysImage},null),o("span",{class:this.ns.be("tab-item","text")},[e.text||""])])}))])]);var l}});var fP=Object.defineProperty,wP=(e,t,a)=>(((e,t,a)=>{t in e?fP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yP extends Po{constructor(){super(...arguments),wP(this,"rowNumber")}async onInit(){var e,t;super.onInit(),(null==(e=this.editorParams)?void 0:e.rowNumber)&&(this.rowNumber=Number(this.editorParams.rowNumber)),(null==(t=this.editorParams)?void 0:t.rownumber)&&(this.rowNumber=Number(this.editorParams.rownumber))}}var CP=Object.defineProperty,IP=(e,t,a)=>(((e,t,a)=>{t in e?CP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class DP{constructor(){IP(this,"formEditor","IBizRadio"),IP(this,"gridEditor","IBizRadio")}async createController(e,t){const a=new yP(e,t);return await a.init(),a}}const EP=a({name:"IBizDatePicker",props:Xe(),emits:Ve(),setup(e,{emit:t}){const a=B("date-picker"),o=e.controller,i=o.model,s=n("date"),r=n("YYYY-MM-DD"),d=n(!1),u=n(!1),p=n(),h=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));switch(i.editorType){case"DATEPICKEREX":case"DATEPICKEREX_NOTIME":case"MOBDATE_NOTIME":s.value="date";break;case"DATEPICKEREX_NODAY":case"DATEPICKEREX_NODAY_NOSECOND":case"MOBDATE_NODAY":case"MOBDATE_NODAY_NOSECOND":d.value=!0,s.value="time";break;default:s.value="datetime"}const m=o.valueFormat;m&&(r.value=m);const v=n();c((()=>e.value),((e,t)=>{if(e&&e!==t){const t=Vi(e).format(m);v.value="Invalid Date"!==t?t:e}else null==e&&(v.value=e)}),{immediate:!0});const b=e=>{e?u.value=e:setTimeout((()=>{u.value=e}),100)};c(p,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));c(v,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});return{ns:a,c:o,editorModel:i,type:s,format:r,formatValue:v,handleChange:(e,a)=>{t("change",e),b(!1)},editorRef:p,isTimePicker:d,onFocus:e=>{t("focus",e),b(!0)},onBlur:e=>{t("blur",e),b(!1)},isEditable:u,setEditable:b,showFormDefaultContent:h,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)}}},render(){const e=this.isTimePicker?o(i("el-time-picker"),w({ref:"editorRef",class:[this.ns.b("input")],type:this.type,format:this.format,"value-format":this.format,placeholder:this.c.placeHolder,modelValue:this.formatValue,"onUpdate:modelValue":e=>this.formatValue=e,onChange:this.handleChange,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur},this.$attrs),null):o(i("el-date-picker"),w({ref:"editorRef",class:[this.ns.b("input")],type:this.type,format:this.format,"value-format":this.format,placeholder:this.c.placeHolder,modelValue:this.formatValue,"onUpdate:modelValue":e=>this.formatValue=e,onChange:this.handleChange,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur},this.$attrs),null),t=this.formatValue,a=o("div",{class:this.ns.b("form-default-content")},[this.formatValue?this.formatValue:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.e(this.editorModel.editorType),this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)],onKeyup:this.handleKeyUp},[this.showFormDefaultContent&&a,this.readonly?t:e])}});class SP extends To{getFormatByType(e){switch(e){case"DATEPICKER":case"MOBDATE":case"DATEPICKEREX":case"DATEPICKEREX_SECOND":case"MOBDATE_SECOND":default:return"YYYY-MM-DD HH:mm:ss";case"DATEPICKEREX_NOTIME":case"MOBDATE_NOTIME":return"YYYY-MM-DD";case"DATEPICKEREX_HOUR":case"MOBDATE_HOUR":return"YYYY-MM-DD HH";case"DATEPICKEREX_MINUTE":case"MOBDATE_MINUTE":case"DATEPICKEREX_NOSECOND":return"YYYY-MM-DD HH:mm";case"DATEPICKEREX_NODAY":case"MOBDATE_NODAY":return"HH:mm:ss";case"DATEPICKEREX_NODAY_NOSECOND":case"MOBDATE_NODAY_NOSECOND":return"HH:mm"}}get valueFormat(){return super.valueFormat?super.valueFormat:this.model.dateTimeFormat?this.model.dateTimeFormat:this.getFormatByType(this.model.editorType)}}var xP=Object.defineProperty,PP=(e,t,a)=>(((e,t,a)=>{t in e?xP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kP{constructor(){PP(this,"formEditor","IBizDatePicker"),PP(this,"gridEditor","IBizDatePicker")}async createController(e,t){const a=new SP(e,t);return await a.init(),a}}const TP=a({name:"IBizRaw",props:$e(),emits:Ve(),setup(e){const t=B("raw"),a=e.controller,o=a.model,i=n(""),s=l((()=>!!a.model.editorHeight));let r="TEXT",d="";o.contentType&&(r=o.contentType),o.editorParams&&o.editorParams.contenttype&&(r=o.editorParams.contenttype),o.editorParams&&o.editorParams.template&&(d=o.editorParams.template.replace(/\/\/n/g,"\n")),o.editorParams&&o.editorParams.TEMPLATE&&(d=o.editorParams.TEMPLATE.replace(/\/\/n/g,"\n"));const u=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));return c((()=>e.value),(async(t,a)=>{if(t!==a&&("string"!=typeof t&&"number"!=typeof t&&t||(i.value=t),d&&t)){let a=t;if("string"==typeof t)try{a=JSON.parse(t)}catch(e){ibiz.log.error("JSON字符串转换错误")}Array.isArray(a)||Object.assign(a,{data:{...e.data}}),ibiz.log.debug("模板内容:",d),ibiz.log.debug("模板编译对象:",a),i.value=await ibiz.util.hbs.render(d,a)}}),{immediate:!0}),{ns:t,content:i,type:r,template:d,enableOverFlow:s,showFormDefaultContent:u}},render(){return o("div",{class:[this.ns.b(),this.ns.is("overflow",this.enableOverFlow),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)]},[this.content&&o(i("iBizRawItem"),{class:this.ns.b("content"),content:this.content,type:this.type},null)])}});class zP extends To{}var AP=Object.defineProperty,OP=(e,t,a)=>(((e,t,a)=>{t in e?AP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class MP{constructor(){OP(this,"formEditor","IBizRaw"),OP(this,"gridEditor","IBizRaw")}async createController(e,t){const a=new zP(e,t);return await a.init(),a}}const NP=a({name:"IBizStepper",props:Je(),emits:Ve(),setup(e,{emit:t}){const a=B("stepper"),o=e.controller,i=o.model,s=n(null);let r=1,d=0,u=1/0,p=-1/0;i.editorParams&&(i.editorParams.stepvalue&&(r=Ai(i.editorParams.stepvalue)),i.editorParams.precision&&(d=Ai(i.editorParams.precision)),i.editorParams.maxvalue&&(u=Ai(i.editorParams.maxvalue)),i.editorParams.minvalue&&(p=Ai(i.editorParams.minvalue)));const h=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{if(e!==t){const t=Number(e);s.value=Number.isNaN(t)?0:t}}),{immediate:!0});const m=n();return{ns:a,c:o,currentVal:s,handleChange:e=>{t("change",e)},inputRef:m,step:r,precision:d,max:u,min:p,onFocus:()=>{t("focus")},onBlur:()=>{t("blur")},showFormDefaultContent:h}},render(){let e=null;return e=this.readonly?ni(this.currentVal)?"":"".concat(this.currentVal):[o(i("el-input-number"),w({ref:"inputRef",modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,placeholder:this.c.placeHolder,precision:this.precision,min:this.min,max:this.max,step:this.step,disabled:this.disabled,onChange:this.handleChange,onFocus:this.onFocus,onBlur:this.onBlur},this.$attrs),null)],o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)]},[e])}});class BP extends To{}var _P=Object.defineProperty,RP=(e,t,a)=>(((e,t,a)=>{t in e?_P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class LP{constructor(){RP(this,"formEditor","IBizStepper"),RP(this,"gridEditor","IBizStepper")}async createController(e,t){const a=new BP(e,t);return await a.init(),a}}const jP=a({name:"IBizRate",props:Qe(),emits:Ve(),setup(e,{emit:t}){const a=B("rate"),o=n(),i=e.controller,s=i.model,{useInFocusAndBlur:r,useInValueChange:d}=We(e,t);let u=[],p=!1,h=5,m=[];s.editorParams&&(s.editorParams.colors&&(u=i.toObj(s.editorParams.colors)),s.editorParams.showText&&(p=i.toBoolean(s.editorParams.showText)),s.editorParams.showtext&&(p=i.toBoolean(s.editorParams.showtext)),s.editorParams.maxvalue&&(h=Ai(s.editorParams.maxvalue)),s.editorParams.texts&&(m=i.toObj(s.editorParams.texts)));const v=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&(o.value=e||0)}),{immediate:!0});const{componentRef:b}=je((()=>t("focus")),(()=>r()));return{ns:a,currentVal:o,handleChange:e=>{t("change",e),d()},colors:u,showText:p,max:h,texts:m,editorRef:b,showFormDefaultContent:v}},render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o(i("el-rate"),w({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled||this.readonly,max:this.max,colors:this.colors,showText:this.showText,texts:this.texts,onChange:this.handleChange},this.$attrs),null)])}});class VP extends To{}var FP=Object.defineProperty,UP=(e,t,a)=>(((e,t,a)=>{t in e?FP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class HP{constructor(){UP(this,"formEditor","IBizRate"),UP(this,"gridEditor","IBizRate")}async createController(e,t){const a=new VP(e,t);return await a.init(),a}}const qP=a({name:"IBizSwitch",props:Ze(),emits:Ve(),setup(e,{emit:t}){const a=B("switch"),o=e.controller,i=o.model,s=n(!1);let r="",d="",u=[{value:0,label:""},{value:1,label:""}];if(i.editorParams&&(i.editorParams.dicData&&(u=o.toObj(i.editorParams.dicData)),i.editorParams.dicdata&&(u=o.toObj(i.editorParams.dicdata))),u&&Array.isArray(u)){const e=u.find((e=>0===e.value));e&&(d=e.label);const t=u.find((e=>1===e.value));t&&(r=t.label)}const p=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((t,a)=>{t!==a&&(s.value=!!t&&1==e.value)}),{immediate:!0});const h=l((()=>!e.autoFocus&&(e.disabled||e.readonly))),{useInFocusAndBlur:m,useInValueChange:v}=We(e,t),{componentRef:b}=je((()=>t("focus")),(()=>m()));return{ns:a,currentVal:s,curDisabled:h,activeText:r,inactiveText:d,handleChange:e=>{t("change",!0===e?1:0),v()},dicData:u,editorRef:b,showFormDefaultContent:p}},render(){const e={...this.$attrs,title:""};return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o(i("el-switch"),w({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.curDisabled,activeText:this.activeText,inactiveText:this.inactiveText,onChange:this.handleChange},e),null)])}}),GP=a({name:"IBizSwitchTriState",props:Ze(),emits:Ve(),setup(e,{emit:t}){const a=B("switch-tristate"),o=e.controller,i=n(null),s=n(null);c((()=>e.value),((e,t)=>{e!==t&&(s.value=0===e?0:1===e?1:null)}),{immediate:!0});return{ns:a,c:o,currentVal:s,onSwitchClick:()=>{e.disabled||e.readonly||(null===s.value&&(null!==i.value&&0!==i.value||(i.value=null,t("change",1)),1===i.value&&(i.value=null,t("change",0))),1===s.value&&(i.value=1,t("change",null)),0===s.value&&(i.value=0,t("change",null)))}}},render(){return o("div",{class:[this.ns.b()]},[o("div",{class:[this.ns.e("switch-wrapper"),this.ns.is("left",0===this.currentVal),this.ns.is("center",null===this.currentVal),this.ns.is("right",1===this.currentVal),this.ns.is("disabled",this.disabled||this.readonly)],onClick:this.onSwitchClick},null)])}});class WP extends To{}var KP=Object.defineProperty,YP=(e,t,a)=>(((e,t,a)=>{t in e?KP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class XP{constructor(e){YP(this,"formEditor","IBizSwitch"),YP(this,"gridEditor","IBizSwitch"),"TRISTATE"===e&&(this.formEditor="IBizSwitchTriState",this.gridEditor="IBizSwitchTriState")}async createController(e,t){const a=new WP(e,t);return await a.init(),a}}const $P=a({name:"IBizSlider",props:et(),emits:Ve(),setup(e,{emit:t}){const a=B("slider"),o=e.controller,i=o.model,{valueFormat:s}=o.parent,{useInFocusAndBlur:r,useInValueChange:u}=We(e,t),p=n(""),h=n(0);let v=1,g=100,f=0,w=!1,y=!1,C=!1,I=!1,D=s||"0%",E="line",S="",x="",P="";i.editorParams&&(i.editorParams.stepvalue&&(v=Ai(i.editorParams.stepvalue)),i.editorParams.maxvalue&&(g=Ai(i.editorParams.maxvalue)),i.editorParams.minvalue&&(f=Ai(i.editorParams.minvalue)),i.editorParams.showstops&&(w=o.toBoolean(i.editorParams.showstops)),i.editorParams.range&&(y=o.toBoolean(i.editorParams.range)),i.editorParams.showinput&&(C=o.toBoolean(i.editorParams.showinput)),i.editorParams.showText&&(I=o.toBoolean(i.editorParams.showText)),i.editorParams.showtext&&(I=o.toBoolean(i.editorParams.showtext)),i.editorParams.format&&(D=i.editorParams.format),i.editorParams.type&&(E=i.editorParams.type),i.editorParams.textItem&&(S=i.editorParams.textItem),i.editorParams.textitem&&(S=i.editorParams.textitem),i.editorParams.pieBg&&(x=i.editorParams.pieBg),i.editorParams.piebg&&(x=i.editorParams.piebg),i.editorParams.piePercentBg&&(P=i.editorParams.piePercentBg),i.editorParams.piepercentbg&&(P=i.editorParams.piepercentbg));const k=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),T=e=>100*Number(e),z=e=>{switch(E){case"line":return(e=>y?JSON.parse(e):Number(e))(e);case"circle":case"pie":return T(e);default:return e}},{componentRef:A}=je((()=>t("focus")),(()=>r())),O=()=>{A.value&&(h.value=Math.min(A.value.clientHeight,A.value.clientWidth)),p.value="",h.value>0&&(p.value="height:".concat(h.value,"px;width:").concat(h.value,"px;min-width:unset;min-height:unset;")),x&&(p.value+="".concat(a.cssVarName("editor-slider-pie-bg"),":").concat(x,";")),P&&(p.value+="".concat(a.cssVarName("editor-slider-pie-percent-bg"),":").concat(P,";")),p.value+="animation-delay:-".concat(M.value,"s;")},M=n();c((()=>e.value),((e,t)=>{e!==t&&(null==e?(M.value=y?[0,1]:0,"pie"===E&&O()):(M.value=z(e),"pie"===E&&O()))}),{immediate:!0});const N=()=>{O()};d((()=>{"pie"===E&&(window.addEventListener("resize",N),b((()=>{O()})))})),m((()=>{"pie"===E&&window.removeEventListener("resize",N)}));const _=l((()=>{if(S){const t=e.data||{};return ibiz.util.text.format("".concat(null!=t[S]?t[S]:""),D)}const t=Number(M.value),a=Number(t/g);return ibiz.util.text.format("".concat(null!=a?a:""),D)}));return{ns:a,currentVal:M,handleChange:e=>{Array.isArray(e)?t("change",JSON.stringify(e)):t("change",e),u()},step:v,max:g,min:f,type:E,textItem:S,showStops:w,range:y,showInput:C,editorRef:A,showText:I,textVal:_,showFormDefaultContent:k,pieStyle:p}},render(){let e;return"line"===this.type&&(e=[o(i("el-slider"),w({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled||this.readonly,step:this.step,max:this.max,min:this.min,showStops:this.showStops,range:this.range,showInput:this.showInput,onChange:this.handleChange},this.$attrs),null),this.showText?o("span",{class:[this.ns.em("text","val")]},[this.textVal]):null]),"circle"===this.type&&(e=o(i("el-progress"),w({type:this.type,percentage:this.currentVal},this.$attrs),{default:e=>{if(!this.showText)return"";let t=e.percentage;return this.textItem&&(t=this.textVal),o("span",{class:this.ns.em("circle","text")},[t])}})),"pie"===this.type&&(e=o("div",{class:[this.ns.e("pie-content"),this.ns.is("hundred-percent",this.currentVal>=this.max)],style:this.pieStyle},null)),o("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):"",this.showText?this.ns.e("text"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.e(this.type)],ref:"editorRef"},[e])}});class JP extends To{async onInit(){super.onInit(),this.model.precision&&ibiz.log.warn("滑动输入条不支持配置精度")}}var QP=Object.defineProperty,ZP=(e,t,a)=>(((e,t,a)=>{t in e?QP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ek{constructor(){ZP(this,"formEditor","IBizSlider"),ZP(this,"gridEditor","IBizSlider")}async createController(e,t){const a=new JP(e,t);return await a.init(),a}}function tk(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const ak=a({name:"IBizListBox",props:tt(),emits:Ve(),setup(e,{emit:t}){const a=B("list-box"),o=e.controller,i=o.model;let s=!1;i.editorParams&&i.editorParams.multiple&&(s=o.toBoolean(i.editorParams.multiple));const{useInFocusAndBlur:r,useInValueChange:d}=We(e,t),u=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),p=o.codeList,h=i.editorType,m=n([]);(async()=>{if(Object.is("LISTBOX",h)){const t=o;t.loadCodeList(e.data).then((e=>{m.value=s?t.handleCodeListAllItems(e):e}))}else if(Object.is("LISTBOXPICKUP",h)){const t=o;if(t.model.appDataEntityId){const a=await t.getServiceData(e.data);a&&(m.value=a.data.map((e=>({value:e[t.keyName],text:e[t.textName]}))))}}})();se(o.model.appCodeListId,o.context.srfappid,(e=>{if(e){if(Object.is("LISTBOX",h)&&s)return void(m.value=o.handleCodeListAllItems(e));m.value=e}}));const v=l((()=>p&&p.orMode?p.orMode:"STR")),b=zo(v.value,o.model.valueType);let g=",";p&&p.valueSeparator&&(g=p.valueSeparator);const{getSelection:f,getSelectionValue:w}=ko(Object.is("LISTBOX",h)?o.allItemsValue:""),y=n([]);c((()=>e.value),(e=>{if(ui(e))y.value=[];else if(s){let t=[];if("LISTBOX"===h){const{getSelectArray:a}=b,n=a(e,p,m.value,g,null==p?void 0:p.codeItemValueNumber);n&&(t=n,o.allItems&&(t=f([],t,m.value,m.value)))}else"LISTBOXPICKUP"===h&&""!==e&&(t="SIMPLES"===o.model.valueType&&Array.isArray(e)?e:e.split(g));y.value=t}else y.value=[e]}),{immediate:!0,deep:!0});const{componentRef:C}=je((()=>t("focus")),(()=>r()));return{ns:a,items:m,selectArray:y,onSelectArrayChange:e=>{let a;if(s){let t=[...e];if(Object.is("LISTBOX",h)){if(o.allItems){const e=f(y.value,t,m.value,m.value);t=w(e)}const{setSelectArray:e}=b;a=e(t,m.value,g)}else Object.is("LISTBOXPICKUP",h)&&("SIMPLES"===o.model.valueType?a=t:"SIMPLE"===o.model.valueType&&(a=t.join(g)))}else a=e;t("change",a),d()},multiple:s,editorRef:C,showFormDefaultContent:u}},render(){let e,t;return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[this.multiple?o(i("el-checkbox-group"),w({class:this.ns.b("checkbox"),modelValue:this.selectArray,onChange:this.onSelectArrayChange},this.$attrs),tk(e=this.items.map(((e,t)=>o(i("el-checkbox"),{key:t,label:e.value,disabled:this.disabled||this.readonly||!0===e.disableSelect},{default:()=>{const t=this.controller;if(t.acItemProvider){const a=i(t.acItemProvider.component);return r(a,{item:e,controller:t})}return o("span",{class:this.ns.e("text")},[e.text])}}))))?e:{default:()=>[e]}):o(i("el-radio-group"),w({class:this.ns.b("radio"),modelValue:this.selectArray[0]},this.$attrs),tk(t=this.items.map(((e,t)=>o(i("el-radio"),{key:t,label:e.value,disabled:this.disabled||this.readonly||!0===e.disableSelect,onChange:()=>{this.onSelectArrayChange(e.value)}},{default:()=>{const t=this.controller;if(t.acItemProvider){const a=i(t.acItemProvider.component);return r(a,{item:e,controller:t})}return o("span",{class:this.ns.e("text")},[e.text])}}))))?t:{default:()=>[t]})])}});var nk=Object.defineProperty,ok=(e,t,a)=>(((e,t,a)=>{t in e?nk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ik extends Po{constructor(){super(...arguments),ok(this,"codeList")}async onInit(){if(super.onInit(),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}}}var sk=Object.defineProperty,lk=(e,t,a)=>(((e,t,a)=>{t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class rk extends To{constructor(){super(...arguments),lk(this,"keyName","srfkey"),lk(this,"textName","srfmajortext"),lk(this,"interfaceName",""),lk(this,"deACMode"),lk(this,"acItemProvider")}async onInit(){super.onInit(),"LISTBOXPICKUP"===this.model.editorType&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDataEntityId&&this.model.appDEACModeId&&(this.deACMode=await ha(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode&&this.deACMode.itemSysPFPluginId&&(this.acItemProvider=await Eo(this.deACMode))))}async getServiceData(e){const{context:t,params:a}=this.handlePublicParams(e,this.context,this.params),n=vi(a,{size:1e3});if(this.interfaceName){const e=ibiz.hub.getApp(this.context.srfappid);return await e.deService.exec(this.model.appDataEntityId,this.interfaceName,t,n)}throw new Gt(this.model,ibiz.i18n.t("editor.common.entityConfigErr"))}}var ck=Object.defineProperty,dk=(e,t,a)=>(((e,t,a)=>{t in e?ck(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uk{constructor(){dk(this,"formEditor","IBizListBox"),dk(this,"gridEditor","IBizListBox")}async createController(e,t){let a;return a="LISTBOXPICKUP"===e.editorType?new rk(e,t):new ik(e,t),await a.init(),a}}const pk=a({name:"IBizAutoComplete",props:at(),emits:Ve(),setup(e,{emit:t}){const a=B("autocomplete"),s=e.controller,r=s.model.editorType,d=n(""),u=n([]),p=n(!0),h=n(!1),m=n(),v=n(!1),b=n(!1),g=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c(u,((t,a)=>{if(0===a.length&&t.length>0){const a=t.findIndex((t=>Object.is(t[s.keyName],e.value)));-1!==a&&(d.value=t[a][s.textName])}}));const f=e=>{e?h.value=e:setTimeout((()=>{h.value=e}),100)},w=async(t,a)=>{if(s.model.appDataEntityId){const n=t.trim(),o=await s.getServiceData(n,e.data);if(o&&(u.value=o.data,v.value=!0,a&&a instanceof Function))if(u.value.length)a([...u.value,...s.actionDetails]);else{a([{srftype:"empty"},...s.actionDetails])}}};c((()=>e.value),(async(e,t)=>{if(e||null===e){v.value||void 0!==t||await w(""),null===e&&(d.value="");const a=u.value.findIndex((t=>Object.is(t[s.keyName],e)));-1!==a?d.value=u.value[a][s.textName]:(d.value=e,null===e&&(d.value=""))}}),{immediate:!0}),c(m,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const y=()=>{if(u.value.length){const t=u.value.findIndex((t=>Object.is(t[s.keyName],e.value)));-1!==t&&(d.value=u.value[t][s.textName])}else w("")},C=l((()=>!Object.is("AC_NOBUTTON",r))),I=l((()=>!(Object.is("AC_NOBUTTON",r)||Object.is("AC_FS_NOBUTTON",r))));let D,E=!1;const S=Ii((e=>{D!==e&&t("change",e),D=void 0,E=!1}),300,{leading:!0});return{ns:a,c:s,curValue:d,triggerOnFocus:C,autoCompleteClearable:I,onSearch:w,onClear:()=>{const e=s.dataItems;e.length>0&&e.forEach((e=>{t("change",null,e.id)})),t("change",null)},onFocus:e=>{b.value=!0,m.value.loading=!0,t("focus",e),f(!0)},onBlur:e=>{b.value=!1,t("blur",e),f(!1)},onACSelect:async a=>{p.value=!0,f(!1),"empty"!==a.srftype?"DEUIACTION"===a.detailType?(s.onActionClick(a,e.data),y()):await(async e=>{const a=await s.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)})),t("change",e[s.keyName])})(a):y()},items:u,handleInput:e=>{"AC_FS"!==r&&"AC_FS_NOBUTTON"!==r&&(E=!0,S(e))},isDebounce:E,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},editorRef:m,isEditable:h,isReverse:b,setEditable:f,showFormDefaultContent:g,renderActionItem:t=>{if(s.groupActionState[t.id].visible)return o("div",{class:[a.e("action-item"),a.is("disabled",s.groupActionState[t.id].disabled)],onClick:a=>s.onActionClick(t,e.data,a),title:zt(t.tooltip)},[t.showIcon&&t.sysImage&&o(i("iBizIcon"),{icon:t.sysImage},null),t.showCaption?t.caption:""])},renderEmpty:()=>o(i("iBizNoData"),{class:a.e("empty"),onClick:e=>e.stopPropagation()},null)}},render(){var e;const t="ellipsis"===(this.c.editorParams.overflowMode||this.c.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),a=null==(e=this.c.deACMode)?void 0:e.itemLayoutPanel,{context:n,params:s}=this.c,l=o(i("el-autocomplete"),w({class:this.ns.b("input"),ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,"value-key":this.c.textName,placeholder:this.c.placeHolder,placement:"bottom",clearable:this.autoCompleteClearable,"popper-class":[this.ns.e("transfer"),this.ns.is("empty",!this.items.length)],teleported:!this.showFormDefaultContent,"fetch-suggestions":this.onSearch,onClear:this.onClear,disabled:this.disabled||this.readonly,onSelect:this.onACSelect,onInput:this.handleInput,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp,"fit-input-width":t},this.$attrs),{default:({item:e})=>{if("empty"===e.srftype)return this.renderEmpty();if("DEUIACTION"===e.detailType)return this.renderActionItem(e);if(this.c.acItemProvider){const t=i(this.c.acItemProvider.component);return r(t,{item:e,controller:this.c})}const l=[this.ns.is("ellipsis",t),this.ns.e("transfer-item")];return a?o(i("iBizControlShell"),{data:e,class:l,modelData:a,context:n,params:s,onClick:()=>{this.onACSelect(e)}},null):o("div",{class:l,title:zt(t?e[this.c.textName]:"")},[e[this.c.textName]])},suffix:()=>{if(this.controller.model.showTrigger)return o("ion-icon",{name:"chevron-down-outline",class:[this.ns.e("suffix"),this.ns.is("reverse",this.isReverse)]},null)}}),c=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.curValue]),d=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.curValue:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&d,this.readonly?c:l])}});var hk=Object.defineProperty,mk=(e,t,a)=>(((e,t,a)=>{t in e?hk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vk extends To{constructor(){super(...arguments),mk(this,"keyName","srfkey"),mk(this,"textName","srfmajortext"),mk(this,"interfaceName",""),mk(this,"sort",""),mk(this,"deACMode"),mk(this,"dataItems",[]),mk(this,"acItemProvider"),mk(this,"groupActionState",new Do),mk(this,"actionDetails",[])}async onInit(){if(super.onInit(),this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await ha(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode))){const{minorSortAppDEFieldId:e,minorSortDir:t}=this.deACMode;e&&t&&(this.sort="".concat(e.toLowerCase(),",").concat(t.toLowerCase())),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach((e=>{"value"!==e.id&&"text"!==e.id&&this.dataItems.push(e)}))),this.deACMode.itemSysPFPluginId&&(this.acItemProvider=await Eo(this.deACMode))}this.model.uiactionGroup&&(this.actionDetails=this.model.uiactionGroup.uiactionGroupDetails||[],this.actionDetails.length>0&&(this.actionDetails.forEach((e=>{const t=e.uiactionId;if(t){const a=new vo(e.id,this.context.srfappid,t);this.groupActionState.addState(e.id,a)}})),await this.groupActionState.init(),this.actionDetails.forEach((e=>{e.capLanguageRes&&e.capLanguageRes.lanResTag&&(e.caption=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),e.tooltipLanguageRes&&e.tooltipLanguageRes.lanResTag&&(e.tooltip=ibiz.i18n.t(e.tooltipLanguageRes.lanResTag,e.tooltip))}))))}async getServiceData(e,t){const{context:a,params:n}=this.handlePublicParams(t,this.context,this.params),o={};ibiz.config.pickerdefaultsort&&Object.assign(o,{sort:ibiz.config.pickerdefaultsort}),this.sort&&!Object.is(this.sort,"")&&Object.assign(o,{sort:this.sort}),e&&Object.assign(o,{query:e}),Object.assign(o,{size:1e3});const i=vi(n,o);if(this.interfaceName){const e=ibiz.hub.getApp(this.context.srfappid);return await e.deService.exec(this.model.appDataEntityId,this.interfaceName,a,i)}throw new Gt(this.model,ibiz.i18n.t("editor.common.entityConfigErr"))}async calcFillDataItems(e){if(this.deACMode){if(0===this.dataItems.length)return[];return await Promise.all(this.dataItems.map((t=>{const a=e[t.appDEFieldId];return t.format||t.convertToCodeItemText&&t.codeListId||t.customCode,{id:t.id,value:a}})))}return[]}async onActionClick(e,t,a){a&&a.stopPropagation();const n=e.uiactionId;await va.execAndResolved(n,{context:this.context,params:this.params,data:[t],view:this.view,event:a},e.appId)}}var bk=Object.defineProperty,gk=(e,t,a)=>(((e,t,a)=>{t in e?bk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fk{constructor(){gk(this,"formEditor","IBizAutoComplete"),gk(this,"gridEditor","IBizAutoComplete")}async createController(e,t){const a=new vk(e,t);return await a.init(),a}}function wk(e,t,a){const o=n([]),i=ibiz.util.file.getUploadHeaders(),s=n({...i}),r=n(""),d={count:0,cacheFiles:[]},u=new Map;c((()=>e.value),(e=>{o.value=e?JSON.parse(e):[]}),{immediate:!0});const p=(e,t)=>{const n={...a.editorParams};n.exportparams&&(n.exportParams=JSON.parse(n.exportparams)),t&&t.folder&&(n.osscat=t.folder);return ibiz.util.file.calcFileUpDownUrl(a.context,a.params,e,n).downloadUrl};c((()=>e.data),(e=>{if(e){const t={...a.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const n=ibiz.util.file.calcFileUpDownUrl(a.context,a.params,e,t);r.value=n.uploadUrl}}),{immediate:!0,deep:!0});const h=e=>{const t=u.get(e.id);t?e.base64=t:(async e=>{try{const t=await fetch(e);if(!t.ok)throw new Error("Failed to fetch SVG: ".concat(t.status));const a=await t.blob(),n=new FileReader;return new Promise(((e,t)=>{n.onloadend=()=>{const t=n.result;if(t){const a=t.replace("data:application/octet-stream;base64","data:image/svg+xml;base64");e(a)}},n.onerror=t,n.readAsDataURL(a)}))}catch(e){throw ibiz.log.error(null==e?void 0:e.message),e}})(e.url).then((t=>{e.base64=t}))};c(o,(t=>{(null==t?void 0:t.length)&&t.forEach((t=>{const n=p(e.data,t);t.url=t.url||n.replace("%fileId%",t.id),ibiz.config.common.enableDownloadTicket?ibiz.util.file.getDownloadTicket(a.context,a.params,e.data,{fileId:t.id},a.downloadTicketParams).then((e=>{e&&e.ticket&&(t.url=n.replace("%fileId%",e.ticket),"svg"===t.name.split(".").pop()&&h(t))})):"svg"===t.name.split(".").pop()&&h(t)}))}),{immediate:!0});const m=()=>{const e=[...o.value,...d.cacheFiles],n=e.length>0?JSON.stringify(e.map((e=>({name:e.name,id:e.id,folder:e.folder,...a.transformInfoMap(e,a.infoMap,!0)})))):null;d.cacheFiles=[],t(n)},v=l((()=>a.multiple?9999:1));return{uploadUrl:r,headers:s,files:o,limit:v,onDownload:t=>{const n=p(e.data,t),o=t.url||n.replace("%fileId%",t.id),i={...a.editorParams};i.exportparams&&(i.exportParams=JSON.parse(i.exportparams)),ibiz.util.file.fileDownload(o,t.name,{context:a.context,params:a.params,data:e.data,file:{fileId:t.id,...t},extraParams:i,downloadTicketParams:a.downloadTicketParams})},onError:(...e)=>{const t=e[0];throw d.count-=1,new ea({response:{data:JSON.parse(t.message),status:t.status}})},onRemove:t=>{if(e.disabled)return;const a=o.value.findIndex((e=>e.id===t.id));-1!==a&&o.value.splice(a,1),m()},onSuccess:e=>{if(e){if(ibiz.config.common.enableDownloadTicket&&e.ticket&&ibiz.util.file.setDownloadTicket(e.id,e.ticket),d.cacheFiles.push({name:e.filename,id:e.fileid,folder:e.folder,...a.transformInfoMap(e,a.infoMap)}),"svg"===e.name.split(".").pop()){const t=u.get(e.name);t&&(u.set(e.fileid,t),u.delete(e.name))}d.count-=1,0===d.count&&m()}},beforeUpload:e=>{if("svg"===e.name.split(".").pop()){const t=URL.createObjectURL(e);u.set(e.name,t)}const t=e.size/1024/1024;return a.size&&t>a.size?(ibiz.message.error("".concat(ibiz.i18n.t("editor.upload.fileSizeErr")," ").concat(a.size,"MB!")),!1):(d.count+=1,!0)}}}const yk=a({name:"IBizFileUpload",props:nt(),emits:Ve(),setup(e,{emit:t}){const a=B("file-upload"),n=e.controller,{useInFocusAndBlur:o,useInValueChange:i}=We(e,t),{uploadUrl:s,headers:r,files:c,limit:d,onDownload:u,onError:p,onRemove:h,onSuccess:m,beforeUpload:v}=wk(e,(e=>{t("change",e),i()}),n),b=l((()=>{var e;return 1===d.value&&1===(null==(e=c.value)?void 0:e.length)})),g=l((()=>!!n.parent.model.columnType)),f=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{componentRef:w}=je((()=>t("focus")),(()=>o()));return{ns:a,c:n,uploadUrl:s,headers:r,files:c,limit:d,noUploadIcon:b,onDownload:u,onError:p,onRemove:h,onSuccess:m,beforeUpload:v,isGridEditor:g,componentRef:w,showFormDefaultContent:f}},render(){let e;return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)],ref:"componentRef"},[o(i("el-upload"),w({class:[this.ns.b("icon"),this.ns.is("not-show",this.noUploadIcon)],"file-list":this.files,action:this.uploadUrl,headers:this.headers,disabled:this.disabled||this.readonly,multiple:this.c.multiple,limit:this.limit,drag:!!this.c.isDrag,accept:this.c.accept,"before-upload":this.beforeUpload,onSuccess:this.onSuccess,onError:this.onError,onRemove:this.onRemove,onPreview:this.onDownload},this.$attrs),{default:()=>{return[this.noUploadIcon?null:o(i("el-button"),{class:[this.ns.b("button")],size:this.isGridEditor?"small":"default"},(t=e=ibiz.i18n.t("editor.upload.uploadFiles"),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}))];var t}})])}}),Ck=a({name:"IBizImageUpload",props:nt(),emits:Ve(),setup(e,{emit:t}){const a=B("image-upload"),o=e.controller,{useInFocusAndBlur:i,useInValueChange:s}=We(e,t),{uploadUrl:r,headers:c,files:d,limit:u,onDownload:p,onError:h,onRemove:m,onSuccess:v,beforeUpload:b}=wk(e,(e=>{t("change",e),s()}),o),g=n([]),f=n(0),w=n(!1),y=l((()=>1===u.value&&1===d.value.length)),C=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{componentRef:I}=je((()=>t("focus")),(()=>i()));return{ns:a,c:o,files:d,limit:u,headers:c,uploadUrl:r,dialogImageUrl:g,dialogVisible:w,noUploadIcon:y,beforeUpload:b,onSuccess:v,onError:h,onRemove:m,onDownload:p,onDialogVisibleChange:e=>{w.value=e},onPreview:e=>{g.value=[],d.value.forEach((e=>{e.base64?g.value.push(e.base64):e.url&&g.value.push(e.url)})),f.value=d.value.findIndex((t=>t.url===e.url)),w.value=!0},componentRef:I,showFormDefaultContent:C,dialogImageUrlIndex:f}},render(){return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.readonly&&this.c.autoPreview&&this.ns.m("autosize"),this.ns.is("show-default",this.showFormDefaultContent)],ref:"componentRef"},[o("div",{class:this.ns.e("image-upload-list")},[this.files.map((e=>o("div",{key:e.id,class:this.ns.e("list-item")},[o("img",{src:e.base64?e.base64:e.url},null),o("div",{class:this.ns.e("list-item-cover")},[o("ion-icon",{class:this.ns.e("preview-icon"),onClick:()=>this.onPreview(e),name:"search"},null),o("ion-icon",{class:this.ns.e("download-icon"),onClick:()=>this.onDownload(e),name:"download"},null),o("ion-icon",{class:this.ns.e("remove-icon"),onClick:()=>this.onRemove(e),name:"remove"},null)])])))]),o(i("el-upload"),w({ref:"imageUpload",class:[this.ns.b("icon"),this.ns.is("not-show",this.noUploadIcon)],"file-list":this.files,action:this.uploadUrl,headers:this.headers,disabled:this.disabled,multiple:this.c.multiple,limit:this.limit,"show-file-list":!1,accept:this.c.accept,"list-type":"picture-card","before-upload":this.beforeUpload,onSuccess:this.onSuccess,onError:this.onError,onRemove:this.onRemove,onPreview:this.onDownload},this.$attrs),{default:()=>[o("ion-icon",{name:"add-outline",class:this.ns.e("image-upload-add")},null)]}),this.dialogVisible?o(i("el-image-viewer"),w({onClose:()=>this.onDialogVisibleChange(!1),"url-list":this.dialogImageUrl,"hide-on-click-modal":!0,"close-on-press-escape":!0,teleported:!0,"z-index":9999,"initial-index":this.dialogImageUrlIndex},this.$attrs),null):null])}}),Ik=a({name:"IBizImagePreview",props:nt(),emits:Ve(),setup(e){var t,a;const n=B("image-preview"),o=e.controller;let i="false"!==(null==(t=o.editorParams)?void 0:t.STOPPROPAGATION);(null==(a=o.editorParams)?void 0:a.stoppropagation)&&(i="false"!==o.editorParams.stoppropagation);return{ns:n,c:o,showFormDefaultContent:l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),previewList:l((()=>i?[e.value]:[])),onClick:e=>{i&&e.stopPropagation()}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],onClick:this.onClick},[o(i("el-image"),w({fit:"contain",src:this.value,"preview-src-list":this.previewList},this.$attrs),null)])}}),Dk=a({name:"IBizImageCropping",props:nt(),emits:Ve(),setup(e,{emit:t}){var a,o,i,s;const r=B("image-cropping-upload"),c=e.controller,{useInFocusAndBlur:d,useInValueChange:u}=We(e,t),{uploadUrl:p,headers:h,files:m,limit:v,onDownload:g,onError:f,onRemove:w,onSuccess:y,beforeUpload:C}=wk(e,(e=>{t("change",e),u()}),c),I=n([]),D=n(0),E=n(!1),S=n(!1),x=n(),P={};(null==(a=c.editorParams)?void 0:a.cropWidth)&&Object.assign(P,{cropareaWidth:Number(c.editorParams.cropWidth)}),(null==(o=c.editorParams)?void 0:o.cropwidth)&&Object.assign(P,{cropareaWidth:Number(c.editorParams.cropwidth)}),(null==(i=c.editorParams)?void 0:i.cropHeight)&&Object.assign(P,{cropareaHeight:Number(c.editorParams.cropHeight)}),(null==(s=c.editorParams)?void 0:s.cropheight)&&Object.assign(P,{cropareaHeight:Number(c.editorParams.cropheight)});const k=n(),T=n(!1),z=l((()=>1===v.value&&1===m.value.length)),A=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{componentRef:O}=je((()=>t("focus")),(()=>d()));return{ns:r,c:c,files:m,limit:v,headers:h,uploadUrl:p,dialogImageUrl:I,dialogVisible:E,noUploadIcon:z,beforeUpload:C,onSuccess:y,onError:f,onRemove:w,onDownload:g,onDialogVisibleChange:e=>{E.value=e},onPreview:e=>{I.value=[],m.value.forEach((e=>{e.base64?I.value.push(e.base64):e.url&&I.value.push(e.url)})),D.value=m.value.findIndex((t=>t.url===e.url)),E.value=!0},componentRef:O,showFormDefaultContent:A,dialogImageUrlIndex:D,cropVisible:T,tempFileList:k,imageUpload:x,cropRect:P,onChange:e=>{"ready"!==e.status||S.value||(k.value=e,S.value=!0,T.value=!0)},cropDialogClose:()=>{k.value&&(ibiz.message.info(ibiz.i18n.t("editor.upload.cancelUpload")),x.value.handleRemove(k.value)),S.value=!1},cropChange:e=>{if(!e)return S.value=!1,T.value=!1,void ibiz.message.info(ibiz.i18n.t("editor.upload.cancelUpload"));const t=(e=>{const t=atob(e.split(",")[1]),a=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),o=new Uint8Array(n);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);return new Blob([n],{type:a})})(e),a=new File([t],"cropimg.png",{type:t.type});a&&b((()=>{x.value.handleRemove(k.value),x.value.handleStart(a),k.value=void 0,x.value.submit(),S.value=!1,T.value=!1}))}}},render(){return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.readonly&&this.c.autoPreview&&this.ns.m("autosize"),this.ns.is("show-default",this.showFormDefaultContent)],ref:"componentRef"},[o("div",{class:this.ns.e("image-upload-list")},[this.files.map((e=>o("div",{key:e.id,class:this.ns.e("list-item")},[o("img",{src:e.base64?e.base64:e.url},null),o("div",{class:this.ns.e("list-item-cover")},[o("ion-icon",{class:this.ns.e("preview-icon"),onClick:()=>this.onPreview(e),name:"search"},null),o("ion-icon",{class:this.ns.e("download-icon"),onClick:()=>this.onDownload(e),name:"download"},null),o("ion-icon",{class:this.ns.e("remove-icon"),onClick:()=>this.onRemove(e),name:"remove"},null)])])))]),o(i("el-upload"),w({ref:"imageUpload",class:[this.ns.b("icon"),this.ns.is("not-show",this.noUploadIcon)],"file-list":this.files,action:this.uploadUrl,headers:this.headers,disabled:this.disabled,multiple:!1,limit:this.limit,"show-file-list":!1,accept:this.c.accept,"list-type":"picture-card","auto-upload":!1,onChange:this.onChange,"before-upload":this.beforeUpload,onSuccess:this.onSuccess,onError:this.onError,onRemove:this.onRemove,onPreview:this.onDownload},this.$attrs),{default:()=>[o("ion-icon",{name:"add-outline",class:this.ns.e("image-upload-add")},null)]}),o(i("el-dialog"),{modelValue:this.cropVisible,"onUpdate:modelValue":e=>this.cropVisible=e,title:ibiz.i18n.t("editor.upload.cropImg"),class:this.ns.e("upload-dialog"),onClosed:this.cropDialogClose,"destroy-on-close":!0,width:640},{default:()=>o(i("iBizCropping"),w({img:this.tempFileList,onChange:this.cropChange},this.cropRect),null)}),this.dialogVisible?o(i("el-image-viewer"),w({onClose:()=>this.onDialogVisibleChange(!1),"url-list":this.dialogImageUrl,"hide-on-click-modal":!0,"close-on-press-escape":!0,teleported:!0,"z-index":9999,"initial-index":this.dialogImageUrlIndex},this.$attrs),null):null])}});var Ek=Object.defineProperty,Sk=(e,t,a)=>(((e,t,a)=>{t in e?Ek(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class xk extends To{constructor(){super(...arguments),Sk(this,"isDrag",!1),Sk(this,"multiple",!0),Sk(this,"accept",""),Sk(this,"size",0),Sk(this,"uploadParams"),Sk(this,"exportParams"),Sk(this,"infoMap",""),Sk(this,"autoPreview",!1),Sk(this,"transformInfoMap",((e={},t="",a=!1)=>{const n={};return t.split(";").forEach((t=>{let[o,i]=t.split(":");a&&(o=i),o&&i&&Object.assign(n,{[i]:e[o]})})),n}))}async onInit(){var e;if(await super.onInit(),this.infoMap=ibiz.config.uploadEditor.infoMap,(null==(e=this.model.editorType)?void 0:e.includes("PICTURE"))&&(this.accept="image/*"),["FILEUPLOADER_ONE","PICTURE_ONE","PICTURE_ONE_RAW","MOBSINGLEFILEUPLOAD","MOBPICTURE_RAW"].includes(this.model.editorType)&&(this.multiple=!1),this.editorParams){const{isDrag:e,multiple:t,accept:a,size:n,uploadParams:o,exportParams:i,autoPreview:s,isdrag:l,uploadparams:r,exportparams:c,autopreview:d,infomap:u}=this.editorParams;if(e&&(this.isDrag=Boolean(e)),l&&(this.isDrag=Boolean(l)),s&&(this.autoPreview=s),d&&(this.autoPreview=d),t&&(this.multiple=Boolean(t)),a&&(this.accept=a),n&&(this.size=Number(n)),u&&(this.infoMap=u),o)try{this.uploadParams=JSON.parse(o)}catch(e){throw new Gt(o,ibiz.i18n.t("editor.upload.uploadJsonFormatErr"))}if(r)try{this.uploadParams=JSON.parse(r)}catch(e){throw new Gt(r,ibiz.i18n.t("editor.upload.uploadJsonFormatErr"))}if(i)try{this.exportParams=JSON.parse(i)}catch(e){throw new Gt(i,ibiz.i18n.t("editor.upload.exportJsonFormatErr"))}if(c)try{this.exportParams=JSON.parse(c)}catch(e){throw new Gt(c,ibiz.i18n.t("editor.upload.exportJsonFormatErr"))}}}}var Pk=Object.defineProperty,kk=(e,t,a)=>(((e,t,a)=>{t in e?Pk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Tk{constructor(e){kk(this,"formEditor","IBizFileUpload"),kk(this,"gridEditor","IBizFileUpload");let t="IBizFileUpload";switch(e){case"PICTURE":case"PICTURE_ONE":case"MOBPICTURE":case"MOBPICTURELIST":t="IBizImageUpload";break;case"PICTURE_CROPPING":t="IBizImageCropping";break;case"PICTURE_ONE_RAW":case"MOBPICTURE_RAW":t="IBizImagePreview"}this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new xk(e,t);return await a.init(),a}}const zk=a({name:"IBizPicker",props:ot(),emits:Ve(),setup(e,{emit:t}){var a;const s=B("picker"),r=e.controller,u=n(""),p=n([]),h=n(!0),m=n(!1),v=n(),b=n(!1),g=n(!1),f=(null==(a=r.model.editorParams)?void 0:a.actionpostion)||"bottom",w=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),y=()=>{const{value:t}=e;"OBJECT"===r.model.valueType?u.value=t&&r.objectNameField?t[r.objectNameField]:"":u.value=t||"";const a=e.data[r.valueItem];-1===p.value.findIndex((e=>Object.is(e[r.keyName],a)))&&(p.value=[],t&&!bi(a)&&p.value.push({[r.textName]:t,[r.keyName]:a}))};c((()=>e.value),(()=>{y()}),{immediate:!0});const C=e=>{e?m.value=e:setTimeout((()=>{m.value=e}),100)},I=async e=>{const a=await r.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)})),Object.assign(e,{[r.keyName]:e[r.keyName]?e[r.keyName]:e.srfkey,[r.textName]:e[r.textName]?e[r.textName]:e.srfmajortext}),r.valueItem&&t("change",e[r.keyName],r.valueItem),"OBJECT"===r.model.valueType?t("change",r.handleObjectParams(e)):t("change",e[r.textName]),C(!1)},D=async(t,a)=>{if(r.model.appDataEntityId){let n="";t!==e.value&&(n=t.trim());const o=await r.getServiceData(n,e.data);if(o&&(p.value=o.data,b.value=!0,a&&a instanceof Function)){const e=p.value.length?[...p.value]:[{srftype:"empty"}];"top"===f?e.unshift(...r.actionDetails):e.push(...r.actionDetails),a(e)}}},E=(r.linkView?1:0)+(r.pickupView?1:0);c(v,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const S=l((()=>it(u.value)));c(S,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),d((()=>{c((()=>e.data[r.valueItem]),(async(a,n)=>{if(a!==n){b.value||!ui(e.value)||ui(a)||await D("");const n=p.value.find((e=>Object.is(e[r.keyName],a)));n&&(u.value=n[r.textName],ui(e.value)&&!ui(a)&&t("change",u.value,r.model.id,!0)),null===a&&t("change",null,r.model.id,!0)}}),{immediate:!0})}));return{ns:s,c:r,items:p,curValue:u,valueText:S,editorRef:v,closeCircle:E,isEditable:m,isReverse:g,showFormDefaultContent:w,onBlur:e=>{g.value=!1,y(),t("blur",e),C(!1)},onFocus:e=>{g.value=!0,r.noAC||(v.value.loading=!0),t("focus",e),C(!0)},onClear:()=>{const e=r.dataItems;(null==e?void 0:e.length)&&e.forEach((e=>{t("change",null,e.id)})),r.valueItem&&t("change",null,r.valueItem),t("change",null)},onSearch:D,onACSelect:async e=>{if(h.value=!0,C(!1),"empty"===e.srftype||"DEUIACTION"===e.detailType)return y();await I(e)},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},setEditable:C,renderEmpty:()=>o(i("iBizNoData"),{class:s.e("empty"),onClick:e=>e.stopPropagation()},null),openLinkView:async t=>{t.stopPropagation();const a=await r.openLinkView(e.data);a&&a.ok&&a.data&&a.data.length>0&&await I(a.data[0])},openPickUpView:async t=>{t.stopPropagation();const a=await r.openPickUpView(e.data,JSON.stringify((()=>{const t=[];if(u.value){const a={srfkey:e.data[r.valueItem],srfmajortext:u.value,..."OBJECT"===r.model.valueType&&e.value&&r.objectValueField?e.value[r.objectValueField]:{}};r.deACMode&&r.dataItems.length&&r.dataItems.forEach((t=>Object.assign(a,{[t.appDEFieldId]:e.data[t.id]}))),t.push(a)}return t})()));a&&a[0]&&await I(a[0])},renderActionItem:t=>{if(r.groupActionState[t.id].visible)return o("div",{title:zt(t.tooltip),class:[s.e("action-item"),s.is("disabled",r.groupActionState[t.id].disabled)],onClick:a=>{r.groupActionState[t.id].disabled||r.onActionClick(t,e.data,a)}},[t.showIcon&&t.sysImage&&o(i("iBizIcon"),{class:s.em("action-item","icon"),icon:t.sysImage},null),o("span",{class:s.em("action-item","caption")},[t.showCaption?t.caption:""])])}}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||this.c.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),t=t=>{var a;const n=null==(a=this.c.deACMode)?void 0:a.itemLayoutPanel,{context:s,params:l}=this.c;let c=t[this.c.textName]||t.srfmajortext===this.curValue;this.c.valueItem&&(c=(t[this.c.keyName]||t.srfkey)===this.data[this.c.valueItem]);const d=[this.ns.is("active",c),this.ns.e("transfer-item")];if(this.c.acItemProvider){const e=i(this.c.acItemProvider.component);return r(e,{item:t,controller:this.c,class:d,onClick:()=>{this.onACSelect(t)}})}return n?o(i("iBizControlShell"),{data:t,class:d,modelData:n,context:s,params:l,onClick:()=>{this.onACSelect(t)}},null):o("div",{class:[this.ns.is("ellipsis",e),...d],title:zt(e?t[this.c.textName]:""),onClick:()=>{this.onACSelect(t)}},[t[this.c.textName]])},a=this.c.noAC?o(i("el-input"),w({ref:"editorRef",class:[this.ns.b("input")],modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,clearable:!0,placeholder:this.c.placeHolder,onClear:this.onClear,disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp},this.$attrs),{suffix:()=>this.$slots.append?this.$slots.append({}):this.c.noButton?void 0:[this.c.model.pickupAppViewId?o("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null,this.c.model.linkAppViewId&&this.curValue?o("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null):null]}):o("div",{class:[this.ns.e("autocomplete"),this.ns.m(this.closeCircle.toString())]},[o(i("el-autocomplete"),w({ref:"editorRef",class:[this.ns.b("input")],modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,"value-key":this.c.textName,placeholder:this.c.placeHolder,clearable:!0,"popper-class":[this.ns.e("transfer"),this.ns.is("empty",!this.items.length)],"fetch-suggestions":this.onSearch,onClear:this.onClear,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onSelect:this.onACSelect,disabled:this.disabled,"fit-input-width":e},this.$attrs),{default:({item:e})=>this.$slots.append?this.$slots.append({}):"empty"===e.srftype?this.renderEmpty():"DEUIACTION"===e.detailType?this.renderActionItem(e):t(e),suffix:()=>{if(!this.c.noButton)return[this.c.model.pickupAppViewId?o("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null,this.c.model.linkAppViewId&&this.curValue?o("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null):null,this.c.model.showTrigger&&!this.c.model.pickupAppViewId?o("ion-icon",{name:"chevron-down-outline",class:[this.ns.e("suffix"),this.ns.is("reverse",this.isReverse)]},null):null]}})]),n=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),s=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.valueText:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&s,this.readonly?n:a])}});const Ak=a({name:"IBizMPicker",props:ot(),emits:Ve(),setup(e,{emit:t}){var a;const s=B("mpicker"),u=e.controller,p=n([]),h=n([]),m=n([]),v=n(!1),b=n(!1),g=n(!1),f=n(),w=(null==(a=u.model.editorParams)?void 0:a.actionpostion)||"bottom",y="ellipsis"===(u.editorParams.overflowMode||u.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),C=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),I=()=>{if(p.value=[],m.value=[],e.value){if("OBJECTS"===u.model.valueType)e.value.forEach((e=>{const t=Oi(e);Object.assign(t,{[u.keyName]:e[u.objectIdField],[u.textName]:e[u.objectNameField]}),u.objectValueField&&(Object.assign(t,{...e[u.objectValueField]}),delete t[u.objectValueField]),t[u.keyName]&&m.value.push(t)}));else if(u.objectIdField&&u.model.valueSeparator){e.value.split(u.model.valueSeparator).forEach((e=>{m.value.push({[u.keyName]:e})}))}else try{m.value=JSON.parse(e.value)}catch(t){ibiz.log.error("SIMPLE类型地址栏值格式".concat(e.value,"不符合JSON字符串要求"))}m.value.forEach((e=>{p.value.push(e[u.keyName]);const t=h.value.findIndex((t=>Object.is(t[u.keyName],e[u.keyName])));t<0&&h.value.push({[u.keyName]:e[u.keyName],[u.textName]:e[u.textName]})}))}};c((()=>e.value),(()=>{I()}),{immediate:!0,deep:!0}),c(f,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const D=e=>{e?g.value=e:setTimeout((()=>{g.value=e}),100)},E=async t=>{if(u.model.appDataEntityId){b.value=!0;try{const a=t.trim(),n=await u.getServiceData(a,e.data);b.value=!1,n&&(h.value=n.data)}catch(e){b.value=!1}}},S=l((()=>m.value.map((e=>e[u.textName])).join(",")));c(S,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});d((()=>{u.objectNameField&&E("")}));const x=()=>u.actionDetails.map((t=>{if(u.groupActionState[t.id].visible)return o(i("el-option"),{key:t.id,label:t.caption,value:"DEUIACTION-".concat(t.id),disabled:u.groupActionState[t.id].disabled,title:zt(y?t.tooltip:"")},{default:()=>o("div",{class:[s.e("action-item"),s.is("disabled",u.groupActionState[t.id].disabled)],onClick:a=>{u.groupActionState[t.id].disabled||u.onActionClick(t,e.data,a)}},[t.showIcon&&t.sysImage&&o(i("iBizIcon"),{class:s.em("action-item","icon"),icon:t.sysImage},null),o("span",{class:s.em("action-item","caption")},[t.showCaption?t.caption:""])])})})),P=()=>h.value.length?h.value.map((e=>o(i("el-option"),{key:e[u.keyName],value:e[u.keyName],label:e[u.textName],title:zt(y?e[u.textName]:"")},{default:()=>{var t;if(u.acItemProvider){const t=i(u.acItemProvider.component);return r(t,{item:e,controller:u})}const a=null==(t=u.deACMode)?void 0:t.itemLayoutPanel;return a?o(i("iBizControlShell"),{data:e,modelData:a,context:u.context,params:u.params},null):o("span",null,[null!=e[u.textName]?e[u.textName]:""])}}))):[o(i("el-option"),{value:"empty"},{default:()=>[o(i("iBizNoData"),{class:s.e("empty"),onClick:e=>e.stopPropagation()},null)]})];return{c:u,ns:s,items:h,loading:b,curValue:p,valueText:S,editorRef:f,isEllipsis:y,isEditable:g,selectItems:m,showFormDefaultContent:C,onBlur:e=>{t("blur",e),D(!1)},onFocus:e=>{t("focus",e),D(!0)},onSearch:E,onSelect:async e=>{var a;if(D(!1),e.includes("empty")||e.some((e=>e.includes("DEUIACTION"))))return null==(a=f.value)||a.blur(),I();const n=[];let o=null;const i=e.map((e=>{let t=h.value.findIndex((t=>Object.is(t[u.keyName],e))),a={};return t>=0?a=h.value[t]:(t=m.value.findIndex((t=>Object.is(t[u.keyName],e))),t>=0&&(a=m.value[t])),a})),s=i.map((async e=>{const t=await u.calcFillDataItems(e),a={};return t.forEach((e=>{Object.assign(a,{[e.id]:e.value})})),a})),l=await Promise.all(s);i.forEach(((e,t)=>{const a=l[t];"OBJECTS"===u.model.valueType?n.push({...u.handleObjectParams(e),...a}):u.objectIdField?n.push(e[u.keyName]):n.push({[u.keyName]:e[u.keyName],[u.textName]:e[u.textName],...a})})),n.length>0&&(o="OBJECTS"===u.model.valueType?n:u.objectIdField?n.join(u.model.valueSeparator):JSON.stringify(n)),t("change",o)},onRemove:e=>{const a=m.value.findIndex((t=>Object.is(t[u.keyName],e)));if(a>=0){m.value.splice(a,1);const e=[];let n=null;m.value.forEach((t=>{"OBJECTS"===u.model.valueType?e.push(u.handleObjectParams(t)):u.objectIdField?e.push(t[u.keyName]):e.push({[u.keyName]:t[u.keyName],[u.textName]:t[u.textName]})})),e.length>0&&(n="OBJECTS"===u.model.valueType?e:u.objectIdField?e.join(u.model.valueSeparator):JSON.stringify(e)),t("change",n)}},onOpenChange:e=>{v.value=e,v.value&&(h.value=[],E(""))},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},setEditable:D,openPickUpView:async()=>{let a;if(m.value.length){const e=JSON.parse(JSON.stringify(m.value));e.forEach(((t,a)=>{e[a].srfkey=t[u.keyName],e[a].srfmajortext=t[u.textName]})),a=JSON.stringify(e)}const n=await u.openPickUpView(e.data,a);n&&(async e=>{const a=[];if(e&&Array.isArray(e)){const t=e.map((async e=>{const t=e;e.srfnodeid&&Object.assign(t,e._deData);const a=await u.calcFillDataItems(t),n={};return a.forEach((e=>{Object.assign(n,{[e.id]:e.value})})),n})),n=await Promise.all(t);e.forEach(((e,t)=>{Object.assign(e,{[u.keyName]:e[u.keyName]?e[u.keyName]:e.srfkey,[u.textName]:e[u.textName]?e[u.textName]:e.srfmajortext});const o=n[t];"OBJECTS"===u.model.valueType?a.push({...u.handleObjectParams(e),...o}):u.objectIdField?a.push(e[u.keyName]):a.push({[u.keyName]:e[u.keyName],[u.textName]:e[u.textName],...o}),h.value.findIndex((t=>Object.is(t[u.keyName],e[u.keyName])))<0&&h.value.push(e)}))}let n=null;a.length>0&&(n="OBJECTS"===u.model.valueType?a:u.objectIdField?a.join(u.model.valueSeparator):JSON.stringify(a)),t("change",n),D(!1)})(n)},renderListContent:()=>"top"===w?[...x(),...P()]:[...P(),...x()]}},render(){let e;const t=[!this.readonly&&o(i("el-select"),w({ref:"editorRef",class:[this.ns.b("select")],modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,filterable:!0,remote:!0,multiple:!0,"popper-class":[this.ns.e("transfer"),this.ns.is("empty",!this.items.length)],teleported:!this.showFormDefaultContent,loading:this.loading,placeholder:this.c.placeHolder?this.c.placeHolder:" ","remote-method":this.onSearch,onVisibleChange:this.onOpenChange,onChange:this.onSelect,onRemoveTag:this.onRemove,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp,"fit-input-width":this.isEllipsis,"remote-show-suffix":this.c.model.showTrigger},this.$attrs),(a=e=this.renderListContent(),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?e:{default:()=>[e]})),!this.readonly&&o("div",{class:this.ns.e("buns-position")},[this.c.model.pickupAppViewId?o("div",{class:this.ns.e("btns"),onClick:this.openPickUpView},[o("ion-icon",{name:"search"},null)]):null])];var a;const n=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),l=o("div",{class:this.ns.b("form-default-content")},[this.curValue.length>0?this.selectItems.map((e=>o("span",{class:this.ns.b("content-item")},[e[this.c.textName]]))):o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&l,this.readonly?n:t])}}),Ok=a({name:"IBizPickerDropDown",props:ot(),emits:Ve(),setup(e,{emit:t}){const a=B("picker-dropdown"),s=e.controller,r=n(""),u=n([]),p=n(!1),h=n(""),m=n(!1),v=n(),g=n(!1);let f=null;const w=n(!1),y=n(),C=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),I=()=>{const{value:t}=e;"OBJECT"===s.model.valueType?r.value=t&&s.objectNameField?t[s.objectNameField]:"":r.value=t||"";const a=e.data[s.valueItem];h.value=a||r.value;-1===u.value.findIndex((e=>Object.is(e[s.keyName],a)))&&(u.value=[],ui(e.value)||ui(a)||u.value.push({[s.textName]:e.value,[s.keyName]:a}))};c((()=>e.value),(()=>{I()}),{immediate:!0}),c(v,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const D=async t=>{if(p.value)if(s.model.appDataEntityId&&!1===g.value){g.value=!0;try{let a="";t!==e.value&&(a=t.trim());const n=await s.getServiceData(a,e.data);n&&(u.value=n.data)}finally{if(g.value=!1,w.value=!0,null!=f){const e=f;f=null,await D(e)}}}else f=t},E=e=>{e?m.value=e:setTimeout((()=>{m.value=e}),100)},S=l((()=>it(r.value))),{popoverid:x,setPopoverZIndex:P}=fe();c(S,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),d((()=>{c((()=>e.data[s.valueItem]),(async(a,n)=>{if(a!==n){w.value||!ui(e.value)||ui(a)||(p.value=!0,await D(""),p.value=!1);const n=u.value.find((e=>Object.is(e[s.keyName],a)));n&&(r.value=n[s.textName],ui(e.value)&&!ui(a)&&t("change",r.value,s.model.id,!0)),h.value=a,null===a&&t("change",null,s.model.id,!0)}}),{immediate:!0,deep:!0}),P("--".concat(a.namespace,"-picker-dropdown-transfer-zindex"))}));return{ns:a,c:s,refValue:h,curValue:r,valueText:S,loading:g,items:u,onOpenChange:e=>{var t,a,n;if(e)u.value=[],D("");else{"SEARCHFORM"===(null==(n=null==(a=null==(t=s.parent)?void 0:t.form)?void 0:a.model)?void 0:n.controlType)&&b((()=>{var e;null==(e=y.value)||e.focus()}))}},onClear:()=>{const e=s.dataItems;(null==e?void 0:e.length)&&e.forEach((e=>{t("change",null,e.id)})),s.valueItem&&t("change",null,s.valueItem),t("change",null)},onSelect:a=>{if(p.value=!1,E(!1),"empty"===a)return void I();const n=s.actionDetails.find((e=>e.id===a));if(n)return s.onActionClick(n,e.data),void I();const o=u.value.findIndex((e=>Object.is(e[s.keyName],a)));o>=0&&(async e=>{const a=await s.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)}));const n=pi(e);Object.assign(n,{[s.keyName]:n[s.keyName]?n[s.keyName]:n.srfkey,[s.textName]:n[s.textName]?n[s.textName]:n.srfmajortext}),s.valueItem&&t("change",n[s.keyName],s.valueItem),"OBJECT"===s.model.valueType?t("change",s.handleObjectParams(n)):t("change",e[s.textName]),E(!1)})(u.value[o])},onSearch:D,onFocus:e=>{p.value=!0,t("focus",e),E(!0)},onBlur:e=>{p.value=!1,t("blur",e),E(!1)},onClick:()=>{p.value=!0},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},editorRef:v,isEditable:m,setEditable:E,showFormDefaultContent:C,renderGroupAction:()=>{const t=s.actionDetails;if(t.length&&s.groupActionState.visible)return t.map((t=>(t=>{if(s.groupActionState[t.id].visible)return o(i("el-option"),{value:t.id,title:zt(t.tooltip),disabled:s.groupActionState[t.id].disabled},{default:()=>[o("div",{class:a.e("action-item"),onClick:a=>s.onActionClick(t,e.data,a)},[t.showIcon&&t.sysImage&&o(i("iBizIcon"),{icon:t.sysImage},null),t.showCaption?t.caption:""])]})})(t)))},renderEmpty:()=>{if(!u.value.length)return o(i("el-option"),{value:"empty"},{default:()=>[o(i("iBizNoData"),{class:a.e("empty"),onClick:e=>e.stopPropagation()},null)]})},popoverid:x,hiddenInputRef:y}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||this.c.editorParams.overflowmode||ibiz.config.pickerEditor.overflowMode),t=this.readonly?this.value:o(i("el-select"),w({ref:"editorRef",class:[this.ns.b("select")],modelValue:this.refValue,"onUpdate:modelValue":e=>this.refValue=e,filterable:!0,remote:!0,"remote-show-suffix":this.c.model.showTrigger,clearable:!0,"popper-class":[this.popoverid,this.ns.e("transfer"),this.ns.is("empty",!this.items.length)],loading:this.loading,placeholder:this.c.placeHolder?this.c.placeHolder:" ","remote-method":this.onSearch,onVisibleChange:this.onOpenChange,onChange:this.onSelect,onClear:this.onClear,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp,onClick:this.onClick,"fit-input-width":e},this.$attrs),{default:()=>[this.items.map((t=>o(i("el-option"),{title:zt(e?t[this.c.textName]:""),value:t[this.c.keyName],key:t[this.c.keyName],label:t[this.c.textName]},{default:()=>{var e;if(this.c.acItemProvider){const e=i(this.c.acItemProvider.component);return r(e,{item:t,controller:this.c})}const a=null==(e=this.c.deACMode)?void 0:e.itemLayoutPanel;return a?o(i("iBizControlShell"),{data:t,modelData:a,context:this.c.context,params:this.c.params},null):o("span",null,[null!=t[this.c.textName]?t[this.c.textName]:""])}}))),this.renderEmpty(),this.renderGroupAction()]}),a=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),n=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.valueText:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]),s=o("input",{ref:"hiddenInputRef",type:"text",class:this.ns.e("hidden-input"),readonly:!0,onKeyup:this.handleKeyUp},null);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&n,this.readonly?a:t,this.readonly?null:s])}}),Mk=a({name:"IBizPickerLink",props:ot(),emits:Ve(),setup(e,{emit:t}){const a=B("picker-link"),o=e.controller,i=n(""),s=n([]),r=n(!1),{useInFocusAndBlur:u,useInValueChange:p}=We(e,t),h=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),(e=>{"OBJECT"===o.model.valueType?i.value=e&&o.objectNameField?e[o.objectNameField]:"":i.value=e||""}),{immediate:!0}),d((()=>{c((()=>e.data[o.valueItem]),(async(a,n)=>{if(a!==n){r.value||!ui(e.value)||ui(a)||await(async t=>{if(o.model.appDataEntityId){let a="";t!==e.value&&(a=t.trim());const n=await o.getServiceData(a,e.data);n&&(r.value=!0,s.value=n.data)}})("");const n=s.value.find((e=>Object.is(e[o.keyName],a)));n&&(i.value=n[o.textName],ui(e.value)&&!ui(a)&&t("change",i.value,o.model.id,!0)),null===a&&t("change",null,o.model.id,!0)}}),{immediate:!0})}));const{componentRef:m}=je((()=>t("focus")),(()=>u())),v=l((()=>it(i.value)));return c(v,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),{ns:a,openLinkView:async()=>{const a=await o.openLinkView(e.data);a&&a.ok&&a.data&&a.data.length&&(e=>{const a={};Object.assign(a,e),Object.assign(a,{[o.keyName]:a[o.keyName]?a[o.keyName]:a.srfkey,[o.textName]:a[o.textName]?a[o.textName]:a.srfmajortext}),o.valueItem&&t("change",a[o.keyName],o.valueItem),"OBJECT"===o.model.valueType?t("change",o.handleObjectParams(a)):t("change",e[o.textName]),p()})(a.data[0])},curValue:i,editorRef:m,showFormDefaultContent:h}},render(){var e,t;const a=null==this.curValue||""===this.curValue,n="ellipsis"===(null==(e=this.controller.editorParams)?void 0:e.overflowMode)||"ellipsis"===(null==(t=this.controller.editorParams)?void 0:t.overflowmode);return o("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent),this.ns.is("empty",a),this.ns.is("ellipsis",n)],ref:"editorRef",title:zt(a?"":this.curValue)},[o("a",{onClick:()=>{a||this.openLinkView()}},[a?o(i("iBizEditorEmptyText"),{showPlaceholder:this.controller.emptyShowPlaceholder,placeHolder:this.controller.placeHolder},null):this.curValue])])}}),Nk=a({name:"IBizPickerEmbedView",props:ot(),emits:Ve(),setup(e,{emit:t}){const a=B("picker-embed-view"),o=e.controller,i=n(o.context.clone()),s=n({...o.params}),r=l((()=>({...s.value})));c((()=>e.data),(e=>{const{context:t,params:a}=o.handlePublicParams(e,o.context,o.params),n=Object.assign(o.context.clone(),t),l=Object.assign({...o.params},a);JSON.stringify(i.value)!==JSON.stringify(n)&&(i.value=n),JSON.stringify(s.value)!==JSON.stringify(l)&&(s.value=l)}),{deep:!0,immediate:!0});const d=o.model.editorParams,u=n(!0),p=n(!0),h=n(!0);d&&(d.multiple&&(u.value=!o.toBoolean(d.multiple)),d.checkStrictly&&(p.value=o.toBoolean(d.checkStrictly)),d.checkstrictly&&(p.value=o.toBoolean(d.checkstrictly)),d.isShowText&&(h.value=o.toBoolean(d.isShowText)),d.isshowtext&&(h.value=o.toBoolean(d.isshowtext)));const m=n([]);c((()=>e.value),(t=>{var a,n,i,s;if(m.value=[],t&&o.valueItem){const l=null==(i=null==(n=null==(a=e.data)?void 0:a[o.valueItem])?void 0:n.split)?void 0:i.call(n,","),r=null==(s=null==t?void 0:t.split)?void 0:s.call(t,",");l&&r&&(m.value=l.map(((e,t)=>({srfkey:e,srfmajortext:r[t]}))))}}),{immediate:!0});const{componentRef:v}=je((()=>t("focus")),(()=>t("blur")));return{ns:a,c:o,context:i,params:s,editorRef:v,isShowText:h,cloneParams:r,singleSelect:u,selectedData:m,checkStrictly:p,onSelectionChange:e=>{(e=>{let a="",n="";e&&Array.isArray(e)&&(e.forEach((e=>{a+="".concat(e.srfkey,","),n+="".concat(e.srfmajortext,",")})),a=a.substring(0,a.length-1),n=n.substring(0,n.length-1),o.valueItem&&t("change",a,o.valueItem),t("change",n))})(e.data)}}},render(){const e=i("IBizViewShell");return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.isShowText?this.ns.m("show-value"):""],ref:"editorRef"},[this.c.model.pickupAppViewId?[o("div",{class:this.ns.b("view")},[r(e,{context:this.context,params:this.cloneParams,viewId:this.c.model.pickupAppViewId,state:{singleSelect:this.singleSelect,checkStrictly:this.checkStrictly,selectedData:this.selectedData},onSelectionChange:this.onSelectionChange})]),this.isShowText&&o("div",{class:this.ns.b("value")},[this.$props.value?this.$props.value.split(",").map((e=>o("span",null,[e,h("; ")]))):o("span",null,[this.c.placeHolder])])]:null])}});const Bk=a({name:"IBizPickerSelectView",props:ot(),emits:Ve(),setup(e,{emit:t}){var a;const i=B("picker-select-view"),s=e.controller,r=s.model,u=n(!0);r.editorParams&&r.editorParams.multiple&&(u.value=!s.toBoolean(r.editorParams.multiple));const p=n([]),h=n([]),m=n([]),v=n(""),b=n(!1),g=n("auto"),f=n(s.context.clone()),w=n({...s.params}),y=l((()=>({...w.value})));c((()=>e.data),(e=>{const{context:t,params:a}=s.handlePublicParams(e,s.context,s.params),n=Object.assign(s.context.clone(),t),o={...s.params,...a};JSON.stringify(f.value)!==JSON.stringify(n)&&(f.value=n),JSON.stringify(w.value)!==JSON.stringify(o)&&(w.value=o)}),{immediate:!0,deep:!0});const C=n(!1),I=n(null),D=n(null),E=n(null),S=n(!1),x="DESIGN"===(null==(a=s.context)?void 0:a.srfrunmode),P=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),k=e=>{e?C.value=e:setTimeout((()=>{C.value=e}),100)},{componentRef:T}=je((()=>t("focus")),(()=>t("blur")));c((()=>e.value),(t=>{if(u.value)"OBJECT"===s.model.valueType?v.value=t?t[s.objectNameField]:null:v.value=t||"",s.valueItem||x?m.value=[{srfkey:e.data[s.valueItem],srfmajortext:e.value}]:ibiz.log.error("值项异常");else{const a=[];if(p.value=[],h.value=[],t)if("OBJECTS"===s.model.valueType)t.forEach((e=>{const t=pi(e);Object.assign(t,{[s.keyName]:e[s.objectIdField],[s.textName]:e[s.objectNameField]}),s.objectValueField&&(Object.assign(t,{...e[s.objectValueField]}),delete t[s.objectValueField]),t[s.keyName]&&(h.value.push(t),p.value.push(t[s.keyName]))})),a.push(...t);else if(s.valueItem){const n=e.data[s.valueItem].split(","),o=t.split(",");n.forEach(((e,t)=>{a.push({srfmajortext:o[t],srfkey:e})})),a.forEach((e=>{p.value.push(e.srfkey);const t=h.value.findIndex((t=>Object.is(t.srfkey,e.srfkey)));t<0&&h.value.push({srfmajortext:e.srfmajortext,srfkey:e.srfkey})}))}else ibiz.log.error("值项异常");m.value=a,E.value=a}}),{immediate:!0,deep:!0}),c(T,(t=>{e.autoFocus&&t&&t.focus&&t.focus()})),d((()=>{T.value&&(g.value="".concat(T.value.$parent.$el.offsetWidth,"px"))}));const z=()=>{const e=s.dataItems;(null==e?void 0:e.length)&&e.forEach((e=>{t("change",null,e.id)})),s.valueItem&&t("change",null,s.valueItem),t("change",null)},A=e=>{if(0!==e.length){if(u.value){if(b.value=!1,s.valueItem){const a=e[0][s.keyName]?e[0][s.keyName]:e[0].srfkey;t("change",a,s.valueItem)}const a=e[0][s.textName]?e[0][s.textName]:e[0].srfmajortext;"OBJECT"===s.model.valueType?t("change",s.handleObjectParams(e[0])):t("change",a)}else if("OBJECTS"===s.model.valueType){if(e&&Array.isArray(e)){const t=[];e.forEach((e=>{const a=s.handleObjectParams(e);t.push(a)})),E.value=t}}else{let t="",a="";e&&Array.isArray(e)&&(h.value=[],e.forEach((e=>{const n=e[s.keyName]?e[s.keyName]:e.srfkey;t+="".concat(n,",");const o=e[s.textName]?e[s.textName]:e.srfmajortext;a+="".concat(o,",");h.value.findIndex((e=>Object.is(e.srfkey,n)))<0&&h.value.push({srfmajortext:o,srfkey:n})}))),t=t.substring(0,t.length-1),a=a.substring(0,a.length-1),s.valueItem&&(I.value=t),D.value=a}u.value||(0===e.length?(h.value=[],p.value=[]):Array.isArray(e)&&(h.value=e.map((e=>({srfkey:e[s.keyName]||e.srfkey,srfmajortext:e[s.textName]||e.srfmajortext}))),p.value=h.value.map((e=>e.srfkey)))),u.value||("OBJECTS"===s.model.valueType?t("change",E.value):(s.valueItem&&t("change",I.value,s.valueItem),t("change",D.value)))}else u.value?z():(h.value=[],"OBJECTS"===s.model.valueType?E.value=null:(s.valueItem&&(I.value=null),D.value=null),p.value=[])},O=(e,t=!1)=>{e.data&&(A(e.data),t&&T.value&&T.value.handleClose())},M=new sa({mode:la.DRAWER,viewUsage:2,dismiss:e=>{O(e,!0)}}),N=e=>{t("blur",e),k(!1)},_=l((()=>u.value?v.value:m.value.map((e=>e[s.textName])).join(",")));return{c:s,ns:i,items:h,modal:M,keySet:p,params:w,visible:b,context:f,showView:S,editorRef:T,valueText:_,isEditable:C,queryValue:v,cloneParams:y,selectedData:m,singleSelect:u,pickViewWidth:g,showFormDefaultContent:P,arrow:()=>o("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[o("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"},null)]),onBlur:N,onClear:z,onFocus:e=>{t("focus",e),k(!0)},triggerMenu:t=>{e.disabled||(b.value=t||!b.value)},setEditable:k,handleKeyUp:e=>{e&&"Enter"===e.code?t("enter",e):"Escape"===e.code&&(e.stopPropagation(),T.value&&T.value.handleClose())},openLinkView:async t=>{t.stopPropagation();const a=await s.openLinkView(e.data);a&&a.ok&&a.data&&A(a.data)},remoteMethod:e=>{v.value=e},onInputChange:e=>{e||z()},onSelectChange:e=>{const a=[];if(e.length>0&&e.forEach((e=>{const t=h.value.findIndex((t=>Object.is(t.srfkey,e)));t>=0&&a.push(h.value[t])})),"OBJECTS"===s.model.valueType){const e=[];a.forEach((t=>{const a=s.handleObjectParams(t);e.push(a)})),t("change",e)}else{let e="",n="";a.forEach((t=>{const a=t[s.keyName]?t[s.keyName]:t.srfkey;e+="".concat(a,",");const o=t[s.textName]?t[s.textName]:t.srfmajortext;n+="".concat(o,",")})),e=e.substring(0,e.length-1),n=n.substring(0,n.length-1),s.valueItem&&(I.value=e,t("change",e,s.valueItem)),D.value=n,t("change",n)}},onVisibleChange:e=>{S.value=e,!1===e?N({}):T.value&&(g.value="".concat(T.value.$parent.$el.offsetWidth,"px"))},onViewDataChange:A,onSelectionChange:O,handleDropDownKeyDown:e=>{"Escape"===e.code&&(e.stopPropagation(),T.value&&T.value.handleClose())}}},render(){const e=o(i("el-dropdown"),{ref:"editorRef",trigger:"click",disabled:this.disabled||this.readonly,class:this.ns.b("select"),"popper-class":this.ns.b("popper"),onVisibleChange:this.onVisibleChange,onKeydown:this.handleDropDownKeyDown},{default:()=>{let e;return this.singleSelect?o(i("el-input"),{modelValue:this.queryValue,"onUpdate:modelValue":e=>this.queryValue=e,placeholder:this.c.placeHolder,disabled:this.disabled,readonly:this.readonly,onChange:this.onInputChange,clearable:!0,onFocus:e=>{this.onFocus(e)},onKeyup:this.handleKeyUp},{suffix:()=>[this.queryValue&&!this.disabled&&!this.readonly&&o("ion-icon",{onClick:this.onClear,name:"clear"},null),this.c.model.linkAppViewId&&o("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null),this.c.model.showTrigger&&o("div",{class:[this.ns.e("arrow"),this.showView?"overturn":""]},[this.arrow()])]}):o(i("el-select"),{"popper-class":this.ns.b("select-popover"),"model-value":this.keySet,placeholder:this.c.placeHolder?this.c.placeHolder:" ",multiple:!0,filterable:!0,remote:!0,"remote-method":this.remoteMethod,onChange:this.onSelectChange,onFocus:e=>{this.onFocus(e)},onKeyup:this.handleKeyUp,disabled:this.disabled||this.readonly,"remote-show-suffix":this.c.model.showTrigger},(t=e=this.items.map(((e,t)=>o(i("el-option"),{key:e.srfkey+t,label:e.srfmajortext,value:e.srfkey},null))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}));var t},dropdown:()=>{var e,t;if(!this.showView)return;const a=i("IBizViewShell");return this.c.pickupView&&r(a,{modal:this.modal,context:this.context,params:this.cloneParams,viewId:this.c.pickupView.id,style:{height:"".concat((null==(e=this.c.editorParams)?void 0:e.pickupViewHeight)||(null==(t=this.c.editorParams)?void 0:t.pickupviewheight)||500,"px"),width:this.pickViewWidth},state:{singleSelect:this.singleSelect,selectedData:this.selectedData},onSelectionChange:e=>this.onSelectionChange(e,this.singleSelect)})}}),t=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),a=o("div",{class:this.ns.b("form-default-content")},[this.valueText?this.singleSelect?o("span",{class:this.ns.b("content-item")},[this.valueText]):this.valueText.split(",").map((e=>o("span",{class:this.ns.b("content-item")},[e]))):o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&a,this.readonly?t:e])}}),_k="update:modelValue",Rk="change",Lk="leftCheckChange",jk="rightCheckChange",Vk=(e,t)=>[e,t].every(Ti)||Ti(e)&&Si(t),Fk={data:{type:Array,default:()=>[]},titles:{type:Array,default:()=>[]},buttonTexts:{type:Array,default:()=>[]},filterPlaceholder:String,filterMethod:{type:Function},rightSearchMethod:{type:Function},leftDefaultChecked:{type:Array,default:()=>[]},rightDefaultChecked:{type:Array,default:()=>[]},renderContent:{type:Function},modelValue:{type:Array,default:()=>[]},format:{type:Object,default:()=>({})},filterable:Boolean,props:{type:Object,default:()=>({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},enableRemoteSearch:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},Uk={[Rk]:(e,t,a)=>[e,a].every(Ti)&&["left","right"].includes(t),[_k]:e=>Ti(e),[Lk]:Vk,[jk]:Vk,leftAcSearch:e=>e},Hk=e=>{const t={label:"label",key:"key",disabled:"disabled"};return l((()=>({...t,...e.props})))},qk="checkedChange",Gk={data:{type:Array,default:()=>[]},optionRender:{type:Function},placeholder:String,title:String,filterable:Boolean,enableAcSearch:Boolean,format:{type:Object,default:()=>({})},filterMethod:{type:Function},defaultChecked:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"label",key:"key",disabled:"disabled"})},loading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},Wk=e=>{const t={label:"label",key:"key",disabled:"disabled"};return l((()=>({...t,...e.props})))},Kk=a({name:"IBizTransferPanel",props:Gk,emits:{[qk]:(e,t)=>[e,t].every(Ti)||Ti(e)&&Si(t),acSearch:e=>e},setup(e,{emit:t,slots:a}){const o=B("transfer-panel"),i=u({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),s=Wk(e),{filteredData:r,checkedSummary:d,isIndeterminate:p,onInputChange:h,handleAllCheckedChange:m}=((e,t,a)=>{const o=Wk(e),i=n([]),s=l((()=>i.value.filter((e=>!e[o.value.disabled])))),r=l((()=>{const a=t.checked.length,n=e.data.length,{noChecked:o,hasChecked:i}=e.format;return o&&i?a>0?i.replace(/\${checked}/g,a.toString()).replace(/\${total}/g,n.toString()):o.replace(/\${total}/g,n.toString()):"".concat(a,"/").concat(n)})),d=l((()=>{const e=t.checked.length;return e>0&&e<s.value.length})),u=(t="")=>{i.value=e.data.filter((a=>wi(e.filterMethod)?e.filterMethod(t,a):String(a[o.value.label]||a[o.value.key]).toLowerCase().includes(t.toLowerCase())))},p=()=>{const e=s.value.map((e=>e[o.value.key]));t.allChecked=e.length>0&&e.every((e=>t.checked.includes(e)))};return c((()=>t.checked),((e,n)=>{if(p(),t.checkChangeByUser){const t=e.concat(n).filter((t=>!e.includes(t)||!n.includes(t)));a(qk,e,t)}else a(qk,e),t.checkChangeByUser=!0})),c(s,(()=>{p()})),c((()=>e.data),(()=>{u(t.query);const e=[],a=i.value.map((e=>e[o.value.key]));t.checked.forEach((t=>{a.includes(t)&&e.push(t)})),t.checkChangeByUser=!1,t.checked=e})),c((()=>e.defaultChecked),(a=>{const n=[],i=e.data.map((e=>e[o.value.key]));a.forEach((e=>{i.includes(e)&&n.push(e)})),t.checkChangeByUser=!1,t.checked=n}),{immediate:!0}),{filteredData:i,checkableData:s,checkedSummary:r,isIndeterminate:d,onInputChange:async t=>{e.enableAcSearch?a("acSearch",t):u(t)},updateAllChecked:p,handleAllCheckedChange:e=>{t.checked=e?s.value.map((e=>e[o.value.key])):[]}}})(e,i,t),v=l((()=>!bi(i.query)&&bi(r.value))),b=l((()=>!(a.default&&bi(a.default()[0].children)))),{checked:g,allChecked:f,query:w}=O(i);return{ns:o,query:w,allChecked:f,checkedSummary:d,hasNoMatch:v,hasFooter:b,checked:g,filteredData:r,propsAlias:s,isIndeterminate:p,onInputChange:h,handleAllCheckedChange:m}},render(){var e,t;return o("div",{class:this.ns.b()},[o("p",{class:this.ns.e("header")},[o(i("el-checkbox"),{modelValue:this.allChecked,"onUpdate:modelValue":e=>this.allChecked=e,disabled:this.readonly,indeterminate:this.isIndeterminate,validateEvent:!1,onChange:this.handleAllCheckedChange},{default:()=>[this.title,o("span",null,[this.checkedSummary])]})]),o("div",{class:[this.ns.e("body"),this.ns.is("with-footer",this.hasFooter)]},[this.filterable?o(i("el-input"),{modelValue:this.query,"onUpdate:modelValue":e=>this.query=e,readonly:this.readonly,class:this.ns.e("filter"),size:"default",placeholder:this.placeholder,prefixIcon:()=>o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"},null)]),clearable:!0,validateEvent:!1,onInput:this.onInputChange},null):null,g(o("div",{class:[this.ns.e("content"),this.ns.is("filterable",this.filterable)]},[this.hasNoMatch||bi(this.data)?o("div",{class:this.ns.e("empty")},[this.$slots.empty?null==(t=(e=this.$slots).empty)?void 0:t.call(e):o(i("iBizNoData"),{class:this.ns.em("empty","no-data")},null)]):o(i("el-checkbox-group"),{modelValue:this.checked,"onUpdate:modelValue":e=>this.checked=e,validateEvent:!1,disabled:this.readonly,class:[this.ns.e("list")]},{default:()=>this.filteredData.map((e=>o(i("el-checkbox"),{class:this.ns.e("item"),key:e[this.propsAlias.key],label:e[this.propsAlias.key],disabled:!!e[this.propsAlias.disabled],validateEvent:!1},{default:()=>{var t;return[null==(t=this.optionRender)?void 0:t.call(this,e)]}})))})]),[[y("loading"),this.enableAcSearch&&this.loading]])])])}}),Yk=a({name:"IBizTransfer",props:Fk,emits:Uk,setup(e,{emit:t,slots:a}){const o=B("transfer"),i=u({leftChecked:[],rightChecked:[]}),s=Hk(e),{sourceData:c,targetData:d}=(e=>{const t=Hk(e),a=l((()=>e.data.reduce(((e,a)=>(e[a[t.value.key]]=a)&&e),{}))),n=l((()=>e.data.filter((a=>!e.modelValue.includes(a[t.value.key]))))),o=l((()=>"original"===e.targetOrder?e.data.filter((a=>e.modelValue.includes(a[t.value.key]))):e.modelValue.reduce(((e,t)=>{const n=a.value[t];return n&&e.push(n),e}),[])));return{sourceData:n,targetData:o}})(e),{onSourceCheckedChange:p,onTargetCheckedChange:h}=((e,t)=>({onSourceCheckedChange:(a,n)=>{e.leftChecked=a,n&&t(Lk,a,n)},onTargetCheckedChange:(a,n)=>{e.rightChecked=a,n&&t(jk,a,n)}}))(i,t),{addToLeft:m,addToRight:v}=((e,t,a)=>{const n=Hk(e),o=(e,t,n)=>{a(_k,e),a(Rk,e,t,n)};return{addToLeft:()=>{const a=e.modelValue.slice();t.rightChecked.forEach((e=>{const t=a.indexOf(e);t>-1&&a.splice(t,1)})),o(a,"left",t.rightChecked)},addToRight:()=>{let a=e.modelValue.slice();const i=e.data.filter((a=>{const o=a[n.value.key];return t.leftChecked.includes(o)&&!e.modelValue.includes(o)})).map((e=>e[n.value.key]));a="unshift"===e.targetOrder?i.concat(a):a.concat(i),"original"===e.targetOrder&&(a=e.data.filter((e=>a.includes(e[n.value.key]))).map((e=>e[n.value.key]))),o(a,"right",t.leftChecked)}}})(e,i,t),b=n(),g=n(),f=l((()=>2===e.buttonTexts.length)),w=l((()=>e.titles[0]||"可选列表")),y=l((()=>e.titles[1]||"已选列表")),C=l((()=>e.filterPlaceholder||"请输入"));return{ns:o,targetData:d,rightPanelTitle:y,optionRender:l((()=>t=>{var n;if(e.renderContent)return e.renderContent(r,t);const o=((null==(n=a.default)?void 0:n.call(a,{option:t}))||[]).filter((e=>e.type!==Comment));return o.length?o:r("span",t[s.value.label]||t[s.value.key])})),panelFilterPlaceholder:C,leftPanelTitle:w,sourceData:c,leftPanel:b,rightPanel:g,hasButtonTexts:f,checkedState:i,addToLeft:m,addToRight:v,clearQuery:e=>{switch(e){case"left":b.value.query="";break;case"right":g.value.query=""}},onLeftAcSearch:e=>{t("leftAcSearch",e)},onSourceCheckedChange:p,onTargetCheckedChange:h}},render(){return o("div",{class:this.ns.b()},[o(Kk,{ref:"leftPanel",data:this.sourceData,readonly:this.readonly,optionRender:this.optionRender,placeholder:this.panelFilterPlaceholder,title:this.leftPanelTitle,filterable:this.filterable,format:this.format,enableAcSearch:this.enableRemoteSearch,loading:this.loading,filterMethod:this.filterMethod,defaultChecked:this.leftDefaultChecked,onAcSearch:this.onLeftAcSearch,props:this.props,onCheckedChange:this.onSourceCheckedChange},null),o("div",{class:this.ns.e("buttons")},[o(i("el-button"),{class:[this.ns.e("button"),this.ns.is("with-texts",this.hasButtonTexts)],type:"primary",disabled:!!bi(this.checkedState.rightChecked)||this.readonly,onClick:this.addToLeft},{default:()=>[o(i("el-icon"),null,{default:()=>o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"},null)])}),void 0!==this.buttonTexts[0]?o("span",null,[this.buttonTexts[0]]):null]}),o(i("el-button"),{class:[this.ns.e("button"),this.ns.is("with-texts",this.hasButtonTexts)],type:"primary",disabled:!!bi(this.checkedState.leftChecked)||this.readonly,onClick:this.addToRight},{default:()=>[void 0!==this.buttonTexts[1]?o("span",null,[this.buttonTexts[1]]):null,o(i("el-icon"),null,{default:()=>o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null)])})]})]),o(Kk,{ref:"rightPanel",data:this.targetData,readonly:this.readonly,optionRender:this.optionRender,placeholder:this.panelFilterPlaceholder,filterable:this.filterable,format:this.format,filterMethod:this.filterMethod,title:this.rightPanelTitle,defaultChecked:this.rightDefaultChecked,props:this.props,onCheckedChange:this.onTargetCheckedChange},null)])}}),Xk=a({name:"IBizTransferPicker",props:ot(),emits:Ve(),setup(e,{emit:t}){const a=B("picker"),o=B("transfer-picker"),i=e.controller,s=i.model,r=n([]),u=n([]),p=n([]),h=n(!1),m=n(),v=n([]),b=n([]),g=n([]),f=n([]),w=i.model.valueType,y=i.model.valueSeparator||",";let C=[ibiz.i18n.t("editor.transferPicker.optionalList"),ibiz.i18n.t("editor.transferPicker.selectedList")],I=[ibiz.i18n.t("app.delete"),ibiz.i18n.t("app.add")],D=!1;if(s.editorParams){const{editorParams:e}=s;if(e.titles)try{C=JSON.parse(e.titles)}catch(e){ibiz.log.info(e)}if(e.buttontexts)try{I=JSON.parse(e.buttontexts)}catch(e){ibiz.log.info(e)}e.remotesearch&&(D="true"===e.remotesearch)}c((()=>e.value),(e=>{if(r.value=[],p.value=[],e){if("OBJECTS"===w)e.forEach((e=>{const t=Oi(e);Object.assign(t,{[i.keyName]:e[i.objectIdField],[i.textName]:e[i.objectNameField]}),i.objectValueField&&(Object.assign(t,{...e[i.objectValueField]}),delete t[i.objectValueField]),t[i.keyName]&&p.value.push(t)}));else if(i.objectIdField&&y){e.split(y).forEach((e=>{p.value.push({[i.keyName]:e})}))}else try{p.value=JSON.parse(e)}catch(t){ibiz.log.error("SIMPLE类型地址栏值格式".concat(e,"不符合JSON字符串要求"))}p.value.forEach((e=>{r.value.push(e[i.keyName]);const t=u.value.findIndex((t=>Object.is(t[i.keyName],e[i.keyName])));t<0&&u.value.push({[i.keyName]:e[i.keyName],[i.textName]:e[i.textName]})}))}}),{immediate:!0,deep:!0}),c(m,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const E=async(...t)=>{f.value=u.value.filter((e=>!!p.value.find((t=>t[i.keyName]===e[i.keyName]))));const a=t[0]||"";h.value=!0;const n=await(async t=>{let a=[];if(i.model.appDataEntityId)try{const n=t.trim(),o=await i.getServiceData(n,e.data);o&&(a=o.data)}catch(e){ibiz.log.error(e)}return a})(a);n&&(u.value=[...f.value,...n.filter((e=>!f.value.find((t=>t[i.keyName]===e[i.keyName]))))]),g.value=[...g.value],b.value=[...b.value],h.value=!1},S=ta(E,1e3),x=l((()=>p.value.map((e=>e[i.textName])).join(",")));c(x,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),d((()=>{i.objectNameField&&(u.value=[],E(""))}));return{c:i,ns:a,ns2:o,items:u,loading:h,curValue:r,valueText:x,editorRef:m,curIndexs:v,leftChecked:b,rightChecked:g,titles:C,buttonTexts:I,enableRemoteSearch:D,onSearch:E,filterMethod:(e,t)=>{const a=t[i.textName];return!e||(null==a?void 0:a.toLowerCase().includes(null==e?void 0:e.toLowerCase()))},onRightChange:e=>{(e=>{const a=[];e&&Array.isArray(e)&&e.forEach((e=>{Object.assign(e,{[i.keyName]:e[i.keyName]?e[i.keyName]:e.srfkey,[i.textName]:e[i.textName]?e[i.textName]:e.srfmajortext}),"OBJECTS"===w?a.push(i.handleObjectParams(e)):i.objectIdField?a.push(e[i.keyName]):a.push({[i.keyName]:e[i.keyName],[i.textName]:e[i.textName]}),u.value.findIndex((t=>Object.is(t[i.keyName],e[i.keyName])))<0&&u.value.push(e)}));let n=null;a.length>0&&(n="OBJECTS"===w?a:i.objectIdField?a.join(y):JSON.stringify(a)),t("change",n)})(e.map((e=>u.value.find((t=>t[i.keyName]===e))||{})))},onLeftCheckChange:e=>{b.value=e},onRightCheckChange:e=>{g.value=e},renderContentItem:(e,t)=>e("span",{title:t[i.textName]},t[i.textName]),onLeftAcSearch:e=>{S(e)}}},render(){const e=o("div",{class:[this.ns.e("autocomplete")]},[o(Yk,w({ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,data:this.items,readonly:this.readonly||this.disabled,"left-default-checked":this.leftChecked,"right-default-checked":this.rightChecked,props:{key:this.c.keyName,label:this.c.textName},filterable:!0,"filter-placeholder":this.c.placeHolder,enableRemoteSearch:this.enableRemoteSearch,titles:this.titles,"button-texts":this.buttonTexts,format:{noChecked:"${total}",hasChecked:"${checked}/${total}"},"target-order":this.enableRemoteSearch?"push":"original",loading:this.loading,filterMethod:this.filterMethod,renderContent:this.renderContentItem,onChange:this.onRightChange,onLeftCheckChange:this.onLeftCheckChange,onRightCheckChange:this.onRightCheckChange,onLeftAcSearch:this.onLeftAcSearch},this.$attrs),null)]);return o("div",{class:[this.ns.b(),this.ns2.b(),this.disabled?this.ns.m("disabled"):""]},[e])}});var $k=Object.defineProperty,Jk=(e,t,a)=>(((e,t,a)=>{t in e?$k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Qk extends To{constructor(){super(...arguments),Jk(this,"multiple",!1),Jk(this,"pickupView",null),Jk(this,"linkView",null),Jk(this,"valueItem",""),Jk(this,"keyName","srfkey"),Jk(this,"textName","srfmajortext"),Jk(this,"interfaceName",""),Jk(this,"sort",""),Jk(this,"noAC",!1),Jk(this,"noButton",!1),Jk(this,"deACMode"),Jk(this,"dataItems",[]),Jk(this,"objectIdField",""),Jk(this,"objectNameField",""),Jk(this,"objectValueField",""),Jk(this,"acItemProvider"),Jk(this,"groupActionState",new Do),Jk(this,"actionDetails",[])}async onInit(){var e,t,a,n;if(super.onInit(),this.initParams(),this.valueItem=(null==(e=this.model.valueItemName)?void 0:e.toLowerCase())||"",this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await ha(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode))){const{minorSortAppDEFieldId:e,minorSortDir:t}=this.deACMode;e&&t&&(this.sort="".concat(e.toLowerCase(),",").concat(t.toLowerCase())),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach((e=>{"value"!==e.id&&"text"!==e.id&&this.dataItems.push(e)}))),this.deACMode.itemSysPFPluginId&&(this.acItemProvider=await Eo(this.deACMode))}this.model.editorType&&["PICKEREX_DROPDOWNVIEW","PICKEREX_DROPDOWNVIEW_LINK","PICKUPVIEW","MOBPICKER_DROPDOWNVIEW"].includes(this.model.editorType)&&this.initPickupViewParams(),this.objectIdField=null==(t=this.model.objectIdField)?void 0:t.toLowerCase(),this.objectNameField=null==(a=this.model.objectNameField)?void 0:a.toLowerCase(),this.objectValueField=null==(n=this.model.objectValueField)?void 0:n.toLowerCase(),this.model.uiactionGroup&&(this.actionDetails=this.model.uiactionGroup.uiactionGroupDetails||[],this.actionDetails.length>0&&(this.actionDetails.forEach((e=>{const t=e.uiactionId;if(t){const a=new vo(e.id,this.context.srfappid,t);this.groupActionState.addState(e.id,a)}})),await this.groupActionState.init(),this.actionDetails.forEach((e=>{e.capLanguageRes&&e.capLanguageRes.lanResTag&&(e.caption=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),e.tooltipLanguageRes&&e.tooltipLanguageRes.lanResTag&&(e.tooltip=ibiz.i18n.t(e.tooltipLanguageRes.lanResTag,e.tooltip))}))))}initParams(){switch(this.model.editorType){case"PICKEREX_NOAC":case"PICKEREX_NOAC_LINK":this.noAC=!0;break;case"PICKEREX_NOBUTTON":this.noButton=!0;break;default:this.noButton=!1,this.noAC=!1}}async initPickupViewParams(){this.model.pickupAppViewId&&(this.pickupView=await ibiz.hub.config.view.get(this.model.pickupAppViewId))}async initLinkViewParams(){this.model.linkAppViewId&&(this.linkView=await ibiz.hub.config.view.get(this.model.linkAppViewId))}async getServiceData(e,t){const{context:a,params:n}=this.handlePublicParams(t,this.context,this.params),o={};ibiz.config.pickerdefaultsort&&Object.assign(o,{sort:ibiz.config.pickerdefaultsort}),this.sort&&!Object.is(this.sort,"")&&Object.assign(o,{sort:this.sort}),e&&Object.assign(o,{query:e}),Object.assign(o,{size:1e3});const i=vi(n,o);if(this.interfaceName){const e=ibiz.hub.getApp(this.context.srfappid);return await e.deService.exec(this.model.appDataEntityId,this.interfaceName,a,i)}throw new Gt(this.model,ibiz.i18n.t("editor.common.entityConfigErr"))}async openPickUpView(e,t){await this.initPickupViewParams();const{context:a,params:n}=this.handlePublicParams(e,this.context,this.params);if(t&&(n.selecteddata=t),!this.pickupView)throw new Gt(this.model,ibiz.i18n.t("editor.common.selectViewConfigErr"));const o=await ibiz.commands.execute(fo.TAG,this.pickupView.id,a,n,{openMode:"POPUPMODAL"});if(o&&o.ok&&o.data)return o.data;ibiz.log.debug("模态取消或关闭异常",o)}async openLinkView(e){const t=this.context.clone();e[this.valueItem]&&(t.srfkey=e[this.valueItem]);const{context:a,params:n}=this.handlePublicParams(e,t,this.params),{linkAppViewId:o}=this.model;if(!o)throw new Gt(this.model,ibiz.i18n.t("editor.common.linkViewConfigErr"));return ibiz.commands.execute(fo.TAG,o,a,n)}async calcFillDataItems(e){if(this.deACMode){if(0===this.dataItems.length)return[];return await Promise.all(this.dataItems.map((t=>{const a=e[t.appDEFieldId];return t.format||t.convertToCodeItemText&&t.codeListId||t.customCode,{id:t.id,value:a}})))}return[]}handleObjectParams(e){const t={};if(this.objectIdField&&Object.assign(t,{[this.objectIdField]:e[this.keyName]}),this.objectNameField&&Object.assign(t,{[this.objectNameField]:e[this.textName]}),this.objectValueField){const a={...e};delete a.srfkey,delete a.srfmajortext,Object.assign(t,{[this.objectValueField]:a})}return e.srfnodeid&&Object.assign(t,{srfnodeid:e.srfnodeid}),t}async onActionClick(e,t,a){const n=e.uiactionId;await va.execAndResolved(n,{context:this.context,params:this.params,data:[t],view:this.view,event:a},e.appId)}}var Zk=Object.defineProperty,eT=(e,t,a)=>(((e,t,a)=>{t in e?Zk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tT{constructor(e){eT(this,"formEditor"),eT(this,"gridEditor");let t="IBizPicker";switch(e){case"PICKEREX_TRIGGER":t="IBizPickerDropDown";break;case"PICKEREX_LINKONLY":t="IBizPickerLink";break;case"ADDRESSPICKUP":case"ADDRESSPICKUP_AC":case"MOBMPICKER":t="IBizMPicker";break;case"PICKEREX_DROPDOWNVIEW":case"PICKEREX_DROPDOWNVIEW_LINK":case"MOBPICKER_DROPDOWNVIEW":t="IBizPickerSelectView";break;case"PICKUPVIEW":t="IBizPickerEmbedView";break;case"TRANSFER_PICKER":t="IBizTransferPicker"}this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new Qk(e,t);return await a.init(),a}}const aT=a({name:"IBizNumberRangePicker",props:st(),emits:Ve(),setup(e,{emit:t}){const a=B("number-range-picker"),o=e.controller,i=o.model,{useInFocusAndBlur:s,useInValueChange:r}=We(e,t);let d=1/0,u=-1/0,p=0,h="-";const m=i.placeHolder&&i.placeHolder.split(";")[0]||"",v=i.placeHolder&&i.placeHolder.split(";")[1]||"";let b="~";i.editorParams&&(i.editorParams.maxvalue&&(d=Ai(i.editorParams.maxvalue)),i.editorParams.minvalue&&(u=Ai(i.editorParams.minvalue)),i.editorParams.precision&&(p=Ai(i.editorParams.precision)),i.editorParams.valueSeparator&&(h=i.editorParams.valueSeparator),i.editorParams.valueseparator&&(h=i.editorParams.valueseparator),i.editorParams.rangeSeparator&&(b=i.editorParams.rangeSeparator),i.editorParams.rangeseparator&&(b=i.editorParams.rangeseparator));const g=n([]),f=i.editorItems;if(f&&f.length>0){const e=f.map((e=>e.id));g.value=e}const w=n(null),y=n(null),C=n(!1),I=n(),D=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&"string"==typeof e&&(w.value=e.split(h)[0]?Number(e.split(h)[0]):null,y.value=e.split(h)[1]?Number(e.split(h)[1]):null)}),{immediate:!0});const E=e=>{e?C.value=e:setTimeout((()=>{C.value=e}),100)},S=(e,a,n)=>{e===o.triggerMode&&t("change",a,n)},{componentRef:x}=je((()=>t("focus")),(()=>s())),P=l((()=>"number"==typeof w.value&&"number"==typeof y.value?"".concat(w.value).concat(b).concat(y.value):null));return{ns:a,c:o,refFormItem:g,minValue:w,maxValue:y,handleChange:(e,t,a="blur")=>{if(0===t?w.value=e:1===t&&(y.value=e),null!==w.value&&null!==y.value&&(S(a,[w.value,y.value].join(h)),E(!1),r()),g.value){const n=g.value[t];S(a,e,n),r()}},max:d,min:u,precision:p,valueSeparator:h,startPlaceHolder:m,endPlaceHolder:v,rangeSeparator:b,componentRef:x,editorRef:I,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},onFocus:e=>{t("focus",e),E(!0)},onBlur:e=>{null!==w.value&&null!==y.value&&(t("blur",e),E(!1))},valueText:P,isEditable:C,setEditable:E,showFormDefaultContent:D}},render(){const e=o("div",{class:this.ns.b("input")},[o(i("el-input-number"),w({ref:"editorRef",min:this.min,modelValue:this.minValue,disabled:this.disabled,readonly:this.readonly,precision:this.controller.model.precision,placeholder:this.startPlaceHolder,controls:!1,onChange:e=>this.handleChange(e,0),onInput:e=>this.handleChange(e,0,"input"),onKeyup:this.handleKeyUp,onFocus:this.onFocus,onBlur:this.onBlur},this.$attrs),null),o("div",{class:this.ns.b("separator")},[this.rangeSeparator]),o(i("el-input-number"),w({min:"number"==typeof this.minValue?this.minValue+1:-1/0,max:this.max,modelValue:this.maxValue,disabled:this.disabled,readonly:this.readonly,precision:this.controller.model.precision,placeholder:this.endPlaceHolder,controls:!1,onChange:e=>this.handleChange(e,1),onInput:e=>this.handleChange(e,1,"input"),onKeyup:this.handleKeyUp,onFocus:this.onFocus,onBlur:this.onBlur},this.$attrs),null)]),t=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),a=o("div",{class:this.ns.b("form-default-content")},[this.valueText?[o("div",{class:this.ns.b("default-min")},[this.minValue]),o("div",{class:this.ns.b("default-separator")},[this.rangeSeparator]),o("div",{class:this.ns.b("default-max")},[this.maxValue])]:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)],ref:"componentRef"},[this.showFormDefaultContent&&a,this.readonly?t:e])}});class nT extends To{}var oT=Object.defineProperty,iT=(e,t,a)=>(((e,t,a)=>{t in e?oT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sT{constructor(){iT(this,"formEditor","IBizNumberRangePicker"),iT(this,"gridEditor","IBizNumberRangePicker")}async createController(e,t){const a=new nT(e,t);return await a.init(),a}}const lT=a({name:"IBizDateRangePicker",props:lt(),emits:Ve(),setup(e,{emit:t}){const a=B("date-range-picker"),o=e.controller,i=o.model;let s=",",r=!1;const d=i.placeHolder&&i.placeHolder.split(";")[0]||"",u=i.placeHolder&&i.placeHolder.split(";")[1]||"";let p=ibiz.i18n.t("editor.dateRange.rangeSeparator");i.editorParams&&(i.editorParams.valueSeparator&&(s=i.editorParams.valueSeparator),i.editorParams.valueseparator&&(s=i.editorParams.valueseparator),i.editorParams.rangeSeparator&&(p=i.editorParams.rangeSeparator),i.editorParams.rangeseparator&&(p=i.editorParams.rangeseparator),i.editorParams.unlinkPanels&&(r=o.toBoolean(i.editorParams.unlinkPanels)),i.editorParams.unlinkpanels&&(r=o.toBoolean(i.editorParams.unlinkpanels)));const h=n("daterange");switch(i.editorType){case"DATERANGE":case"MOBDATERANGE":default:h.value="datetimerange";break;case"DATERANGE_NOTIME":case"MOBDATERANGE_NOTIME":h.value="daterange"}const m=n("YYYY-MM-DD"),v=o.valueFormat;v&&(m.value=v);const b=n([]),g=i.editorItems;if(g&&g.length>0){const e=g.map((e=>e.id));b.value=e}const f=n(!1),w=n(),y=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),C=e=>{e?f.value=e:setTimeout((()=>{f.value=e}),100)},I=l({get(){let t=[];if(b.value.length>0)b.value.forEach((a=>{e.data[a]&&t.push(e.data[a])}));else if(e.value&&"string"==typeof e.value){const a=e.value.split(s);t=a.every((e=>Vi(e).isValid()))?a:[]}return t},set(e){e&&e.length>0?(t("change",e.join(s)),b.value.length>0&&e.forEach(((e,a)=>{t("change",e,b.value[a])}))):(t("change",null),b.value.length>0&&b.value.forEach(((e,a)=>{t("change",null,b.value[a])}))),C(!1)}});c(w,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const D=l((()=>I.value.length>0?"".concat(I.value[0]," ").concat(p," ").concat(I.value[1]):null));return{ns:a,c:o,refFormItem:b,curValue:I,type:h,format:m,valueSeparator:s,startPlaceHolder:d,endPlaceHolder:u,rangeSeparator:p,unlinkPanels:r,onFocus:e=>{t("focus",e),C(!0)},onBlur:e=>{t("blur",e),C(!1)},editorRef:w,valueText:D,isEditable:f,setEditable:C,showFormDefaultContent:y,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},onCalendarChange:e=>{o.dateRange=pi(e)}}},render(){const e=o(i("el-date-picker"),w({ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,class:this.ns.b("input"),type:this.type,"popper-class":this.ns.b("popper"),format:this.format,"value-format":this.format,disabled:this.disabled,readonly:this.readonly,"range-separator":this.rangeSeparator,"start-placeholder":this.startPlaceHolder,"end-placeholder":this.endPlaceHolder,"unlink-panels":this.unlinkPanels,onFocus:this.onFocus,onBlur:this.onBlur,onCalendarChange:this.onCalendarChange},this.$attrs),null),t=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),a=o("div",{class:[this.ns.b("form-default-content"),this.ns.is("has-val",this.curValue.length>0)]},[this.curValue.length>0?o(i("el-date-picker"),w({"model-value":this.curValue,class:this.ns.b("default-input"),type:this.type,format:this.format,"value-format":this.format,readonly:!0,"range-separator":this.rangeSeparator,"start-placeholder":this.startPlaceHolder,"end-placeholder":this.endPlaceHolder,"unlink-panels":this.unlinkPanels},this.$attrs),null):o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)],onKeyup:this.handleKeyUp},[this.showFormDefaultContent&&a,this.readonly?t:e])}});var rT=Object.defineProperty,cT=(e,t,a)=>(((e,t,a)=>{t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dT extends To{constructor(){super(...arguments),cT(this,"dateRange",[])}getFormatByType(){switch(this.model.editorType){case"DATERANGE":case"MOBDATERANGE":default:return"YYYY-MM-DD HH:mm:ss";case"DATERANGE_NOTIME":case"MOBDATERANGE_NOTIME":return"YYYY-MM-DD"}}get valueFormat(){return this.model.dateTimeFormat?this.model.dateTimeFormat:super.valueFormat?super.valueFormat:this.getFormatByType()}}var uT=Object.defineProperty,pT=(e,t,a)=>(((e,t,a)=>{t in e?uT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hT{constructor(){pT(this,"formEditor","IBizDateRangePicker"),pT(this,"gridEditor","IBizDateRangePicker")}async createController(e,t){const a=new dT(e,t);return await a.init(),a}}const mT=a({name:"IBizCode",props:rt(),emits:Ve(),setup(e,{emit:a}){const i=n(),s=B("code"),l=e.controller,r=ei(),u=n(""),h=n(!0),m=n(!1),v=n(!1),g=n(!1),f=n(!1),w=n(!1),y=l.model;let C,I,D,E,S,x;y.editorParams&&(y.editorParams.enableEdit&&(m.value=!0,v.value=!0,h.value=l.toBoolean(y.editorParams.enableEdit)&&!e.readonly&&!e.disabled),y.editorParams.enableedit&&(m.value=!0,v.value=!0,h.value=l.toBoolean(y.editorParams.enableedit)&&!e.readonly&&!e.disabled),y.editorParams.enableFullScreen&&(g.value=l.toBoolean(y.editorParams.enableFullScreen)),y.editorParams.enablefullscreen&&(g.value=l.toBoolean(y.editorParams.enablefullscreen)));const{UIStore:P,zIndex:k}=G(),T=e=>{var t;const a=null==(t=null==l?void 0:l.editorParams)?void 0:t.customTheme;return a?"dark"===a?"vs-dark":"vs":ibiz.config.codeEditorTheme?"dark"===ibiz.config.codeEditorTheme?"vs-dark":"vs":"dark"===e?"vs-".concat(P.theme):"vs"};c((()=>P.theme),(e=>{I.setTheme(T(e))})),c((()=>e.value),(e=>{e!==u.value&&(u.value=e||"",null==C||C.setValue(u.value))}),{immediate:!0});const z=()=>{C&&((e.readonly||e.disabled)&&(m.value=!1,v.value=!0),C.updateOptions({readOnly:m.value?v.value:e.readonly||e.disabled}))};c((()=>e.readonly),z,{immediate:!0}),c((()=>e.disabled),z,{immediate:!0});const A=()=>{null==C||C.dispose(),C=null,null==S||S.clear(),S=null,null==D||D.dispose(),D=null,null==E||E.dispose(),E=null,null==x||x.close()},O=()=>{b((()=>{w.value=!0,dr.config({paths:{vs:"".concat(ibiz.env.pluginBaseUrl,"/monaco-editor@0.45.0/min/vs")}}),dr.init().then((n=>{w.value=!1,C||(I=n.editor,C=I.create(i.value,{language:e.language||e.controller.language,theme:T(P.theme),foldingStrategy:"indentation",renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!0},readOnly:m.value?v.value:e.readonly||e.disabled,readOnlyMessage:{value:ibiz.i18n.t("editor.code.readOnlyPrompt")},fontSize:16,fixedOverflowWidgets:!0,scrollBeyondLastLine:!1,overviewRulerBorder:!1}),C.__instanceId=r,l.deACMode&&ibiz.env.enableAI&&(D=n.languages.registerCodeLensProvider(e.language||e.controller.language,{provideCodeLenses:function(o,i){return(e=>{const t=I.getEditors().find((t=>t.getModel()===e));return!(!t||t.__instanceId!==r)})(o)?{lenses:[{id:"AI",range:new n.Range(1,1,1,1),command:{title:"".concat(l.deACMode.logicName),id:C.addCommand(0,(()=>(async()=>{if(!l.deACMode||!l.model.appDataEntityId)return;const{contentToolbarItems:n,footerToolbarItems:o,questionToolbarItems:i,otherToolbarItems:s}=Qs(l.deACMode),r=await t.import("@ibiz-template-plugin/ai-chat");x=r.chat||r.default.chat;let c,d="";x.create({containerOptions:{zIndex:k.increment()},chatOptions:{caption:l.deACMode.logicName,context:{...l.context},params:{...l.params,srfactag:l.deACMode.codeName},appendCurData:"true"===l.editorParams.srfaiappendcurdata?e.data:void 0,appendCurContent:l.editorParams.srfaiappendcurcontent?Xt.fill(l.editorParams.srfaiappendcurcontent,l.context,l.params,e.data):void 0,appDataEntityId:l.model.appDataEntityId,contentToolbarItems:n,footerToolbarItems:o,questionToolbarItems:i,otherToolbarItems:s,question:async(e,t,a,n,o,i)=>{d=ei(),c=new AbortController;const s=await ibiz.hub.getApp(t.srfappid).deService.getService(t,n.appDataEntityId);try{await s.aiChatSse((t=>{if(20===t.actionstate&&t.actionresult)e.addMessage({messageid:d,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t.actionresult});else if(30===t.actionstate&&t.actionresult){const a=JSON.parse(t.actionresult).choices;a&&a.length>0&&e.replaceMessage({messageid:d,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:a[0].content||""})}else 40===t.actionstate&&e.replaceMessage({messageid:d,state:t.actionstate,type:"ERROR",role:"ASSISTANT",content:t.actionresult})}),c,t,a,{messages:o,sessionid:i})}catch(t){e.replaceMessage({messageid:d,state:40,type:"ERROR",role:"ASSISTANT",content:t.message||ibiz.i18n.t("app.aiError")}),null==c||c.abort()}finally{return e.completeMessage(d,!0),!0}},abortQuestion:async e=>{null==c||c.abort(),await e.stopMessage({messageid:d,state:30,type:"DEFAULT",role:"ASSISTANT",content:""}),await e.completeMessage(d,!0)},action:(e,t)=>{"backfill"===e&&a("change",t.realcontent)},history:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=a.appendCurData?a.appendCurData:{},i=await n.aiChatHistory(e,t,o);if(i.data&&Array.isArray(i.data)){let e;i.data.forEach((t=>{if("TOOL"===t.role)e&&t.content&&x.aiChat.updateRecommendPrompt(e,t.content);else{const a={messageid:ei(),state:30,type:"DEFAULT",role:t.role,content:t.content,completed:!0};e=a,x.aiChat.addMessage(a)}}))}return!0},recommendPrompt:async(e,t,a)=>{const n=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),o=await n.aiChatRecommendPrompt(e,t,a.message);if(o.ok&&o.data){const e=o.data.choices;return e&&e.length>0?e[0]:null}return null},uploader:{onUpload:async(e,t,a)=>{const n=ibiz.util.file.calcFileUpDownUrl((null==a?void 0:a.context)||l.context,(null==a?void 0:a.params)||l.params,{}),o=ibiz.util.file.getUploadHeaders(),i=new FormData;return i.append("file",e),(await ibiz.net.axios({url:n.uploadUrl,method:"post",headers:o,data:i,onUploadProgress:e=>{const a=e.loaded/e.total*100;t(a)}})).data}},extendToolbarClick:async(e,t,a,n,o)=>{var i,s;const r=await va.exec(t.id,{view:l.view,ctrl:l.ctrl,context:Nt.create(a),params:n,data:[o],event:e},t.appId);if(r.closeView)l.view.closeView({ok:!0});else if(r.refresh)switch(r.refreshMode){case 1:l.view.callUIAction(ca.REFRESH);break;case 2:null==(i=l.view.parentView)||i.callUIAction(ca.REFRESH);break;case 3:null==(s=l.view.getTopView())||s.callUIAction(ca.REFRESH)}return r}}})})()))}}],dispose:()=>{}}:{lenses:[],dispose:()=>{}}},resolveCodeLens:(e,t,a)=>t}))),setTimeout((()=>{C.layout(),C.setValue(u.value)}));const o=()=>{S&&S.clear(),l.placeHolder&&!(null==C?void 0:C.getValue())&&(S=C.createDecorationsCollection([{range:new n.Range(1,1,1,1),options:{isWholeLine:!0,beforeContentClassName:"".concat(s.e("first-prompt")," ghost-text-decoration")}}]))},c=C.setValue.bind(C);C.setValue=e=>{c(e),o()},C.onDidFocusEditorText((()=>{null==S||S.clear()})),C.onDidBlurEditorText((()=>{o()})),C.onDidChangeModelContent((()=>{m.value||(u.value=C.getValue(),a("change",u.value))})),window.addEventListener("resize",(()=>{C.layout()}))})).catch((()=>{w.value=!1}))}))},M=()=>{v.value=!v.value,C&&(v.value?C.updateOptions({readOnly:!0}):C.updateOptions({readOnly:!1}))},N=async()=>{u.value=String(null==C?void 0:C.getValue()),A(),f.value=!f.value,O()};return d((()=>{O()})),p((()=>{A()})),{ns:s,currentVal:u,codeEditBox:i,isFullScreen:f,hasEnableEdit:m,readonlyState:v,isLoading:w,renderFooter:()=>m.value?o("div",{class:[s.b("footer"),{[s.b("footer-dialog")]:f.value}]},[o("div",{class:s.be("footer","cancel"),onClick:()=>{e.value!==(null==C?void 0:C.getValue())?si({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:s.b("message"),message:o("div",{class:s.be("message","message-content")},[o("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),o("p",{class:s.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:s.be("message","message-cancel"),confirmButtonClass:s.be("message","message-comfire")}).then((()=>{null==C||C.setValue(String(e.value||"")),M()})).catch((()=>{null==C||C.focus()})):M()}},[ibiz.i18n.t("app.cancel")]),o("div",{class:s.be("footer","save"),onClick:()=>(M(),C&&(u.value=C.getValue(),a("change",u.value)),void(f.value&&N()))},[ibiz.i18n.t("app.save")])]):null,renderHeaderToolbar:()=>m.value||g.value?o("div",{class:s.b("toolbar")},[m.value&&h.value&&v.value?o("i",{class:"fa fa-edit","aria-hidden":"true",onClick:()=>M()},null):null,g.value?o("span",{class:s.be("toolbar","fullscreen"),title:ibiz.i18n.t("editor.common.".concat(f.value?"minimize":"fullscreen")),onClick:()=>N()},[f.value?o("i",{class:"ch-icon ch-icon-minscreen"},null):o("i",{class:"ch-icon ch-icon-fullscreen"},null)]):null]):null,renderCodeContent:()=>o("div",{ref:i,class:s.e("box"),style:{[s.cssVarBlockName("placeholder")]:'"'.concat(l.placeHolder,'"')}},null),changeFullScreenState:N}},render(){var e,t;const a=!(null==(t=null==(e=this.controller.view)?void 0:e.state)?void 0:t.isLoading)&&this.isLoading;return this.isFullScreen?o(i("el-dialog"),{modelValue:this.isFullScreen,"onUpdate:modelValue":e=>this.isFullScreen=e,class:this.ns.b("dialog-full-screen"),onClose:()=>this.changeFullScreenState()},{default:()=>[g(o("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},{[this.ns.b("editor-enable")]:!this.readonlyState}]},[this.renderHeaderToolbar(),this.renderCodeContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[y("loading"),a]])]}):g(o("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},{[this.ns.b("editor-enable")]:!this.readonlyState},this.ns.is("enable",this.hasEnableEdit)]},[this.renderHeaderToolbar(),this.renderCodeContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[y("loading"),a]])}});var vT=Object.defineProperty,bT=(e,t,a)=>(((e,t,a)=>{t in e?vT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gT extends To{constructor(){super(...arguments),bT(this,"deACMode")}get language(){return this.editorParams.codeType||this.editorParams.language||"typescript"}get theme(){return this.editorParams.theme||"vs-dark"}async onInit(){await super.onInit();const{appDEACModeId:e,appDataEntityId:t}=this.model;e&&(this.deACMode=await ha(e,t,this.context.srfappid))}}var fT=Object.defineProperty,wT=(e,t,a)=>(((e,t,a)=>{t in e?fT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yT{constructor(){wT(this,"formEditor","IBizCode"),wT(this,"gridEditor","IBizCode")}async createController(e,t){const a=new gT(e,t);return await a.init(),a}}var CT=Object.defineProperty,IT=(e,t,a)=>(((e,t,a)=>{t in e?CT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class DT{constructor(){IT(this,"title","AI"),IT(this,"iconSvg",'<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="13" font-size="16" fill="black">AI</text></svg>'),IT(this,"tag","button")}isActive(){return!1}getValue(){return"aichart"}isDisabled(){return!1}exec(e){e.emit("aiClick")}}const ET={key:"aichart",factory:()=>new DT};var ST=Object.defineProperty,xT=(e,t,a)=>(((e,t,a)=>{t in e?ST(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);const PT={type:"emoji",renderElem:e=>{const{data:t={}}=e;return Kr("emoji-elem",{dataset:{value:t.emoji?Yt(t.emoji):""},props:{contentEditable:!1}},[])}};class kT{constructor(){xT(this,"title","".concat(ibiz.i18n.t("editor.html.wangEditor.emoji"))),xT(this,"tag","button"),xT(this,"iconSvg","<svg viewBox='0 0 1040 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1490' width='1em' height='1em' stroke='var(--w-e-toolbar-color)' > <path stroke-width='38' d='M512.075261 1024A511.774217 511.774217 0 1 1 730.482434 48.769072a37.630457 37.630457 0 1 1-32.061149 68.035867 436.513303 436.513303 0 1 0 250.468323 395.270322 37.630457 37.630457 0 0 1 75.260914 0 512.526826 512.526826 0 0 1-512.075261 511.924739z' p-id='1491' ></path> <path stroke-width='38' d='M333.857416 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.499339 57.499339 0 0 0-57.348817-57.348817zM686.53006 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.348817 57.348817 0 0 0-57.348817-57.348817zM515.236219 783.165074c-162.864619 0-262.359547-141.942084-262.359547-219.159782a30.104366 30.104366 0 0 1 60.208731 0c0 48.618551 76.314567 158.951051 202.150816 158.951051s193.571072-134.114949 193.571072-158.951051a30.104366 30.104366 0 0 1 60.208731 0c0 54.488902-90.012054 219.159782-253.779803 219.159782zM1009.549904 207.720123h-67.132735V139.985301a30.104366 30.104366 0 1 0-60.208732 0v67.734822h-67.734822a30.104366 30.104366 0 0 0-30.104366 30.104366 30.104366 30.104366 0 0 0 30.104366 30.104366h67.734822v67.734823a30.104366 30.104366 0 0 0 60.208732 0v-67.734823h67.734823a30.104366 30.104366 0 0 0 30.104365-30.104366 30.104366 30.104366 0 0 0-30.706453-30.104366z' p-id='1492' ></path> </svg>")}isActive(){return!1}getValue(){return!1}isDisabled(){return!1}exec(e){e.emit("openEmojiSelect")}}const TT={renderElems:[PT],elemsToHtml:[{type:"emoji",elemToHtml:e=>{const{data:t}=e;return"<span data-w-e-type=\"emoji\" class='emoji'>".concat(t.emoji,"</span>")}}],parseElemsHtml:[{selector:'span[data-w-e-type="emoji"]',parseElemHtml:e=>({data:{emoji:e.innerHTML},type:"emoji",children:[{text:""}]})}],menus:[{key:"emoji",factory:()=>new kT}]};class zT extends HTMLElement{static get observedAttributes(){return["data-value"]}attributeChangedCallback(e,t,a){if("data-value"===e){if(a&&t===a)return;const e=this.attachShadow({mode:"open"}),n=e.ownerDocument.createElement("span");n.innerHTML=a,n.part.add("box"),n.classList.add("emoji-elem_box"),e.appendChild(n)}}}const AT=e=>{const{isInline:t,isVoid:a}=e;return e.isInline=e=>"emoji"===Hi.getNodeType(e)||t(e),e.isVoid=e=>"emoji"===Hi.getNodeType(e)||a(e),e},OT=a({name:"IBizHtmlEmoji",props:{modal:{type:Object,required:!0}},setup:e=>({ns:B("html-emoji"),onSelect:t=>{const a={ok:!0,data:[{emoji:Zt(t.data)}]};e.modal.dismiss(a)}}),render(){return o("div",{class:this.ns.b()},[o(i("iBizEmojiSelect"),{dark:!0,continuousList:!0,onSelect:this.onSelect},null)])}});var MT=Object.defineProperty,NT=(e,t,a)=>(((e,t,a)=>{t in e?MT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class BT extends To{constructor(){super(...arguments),NT(this,"uploadParams"),NT(this,"exportParams"),NT(this,"deService"),NT(this,"deACMode"),NT(this,"chatCompletion",!1),NT(this,"wangEditor"),NT(this,"overlay",null),NT(this,"cleanup",Lt),NT(this,"presetPreventEvents",[13,38,40]),NT(this,"presetPreventPropEvents",[27])}async onInit(){if(await super.onInit(),this.customRegister(),this.editorParams){const{uploadParams:e,exportParams:t,uploadparams:a,exportparams:n}=this.editorParams;if(e)try{this.uploadParams=JSON.parse(e)}catch(e){ibiz.log.error("编辑器[".concat(ibiz.log.error(e),"]编辑器参数 uploadParams 非 json 格式"))}if(a)try{this.uploadParams=JSON.parse(a)}catch(e){ibiz.log.error("编辑器[".concat(ibiz.log.error(e),"]编辑器参数 uploadparams 非 json 格式"))}if(t)try{this.exportParams=JSON.parse(t)}catch(e){ibiz.log.error("编辑器[".concat(ibiz.log.error(e),"]编辑器参数 exportParams 非 json 格式"))}if(n)try{this.exportParams=JSON.parse(n)}catch(e){ibiz.log.error("编辑器[".concat(ibiz.log.error(e),"]编辑器参数 exportparams 非 json 格式"))}}const e=this.model;e.appDEACModeId&&(this.deACMode=await ha(e.appDEACModeId,e.appDataEntityId,this.context.srfappid),this.deACMode&&"CHATCOMPLETION"===this.deACMode.actype&&(this.deService=await ibiz.hub.getApp(e.appId).deService.getService(this.context,e.appDataEntityId),this.chatCompletion=!0))}customRegister(){!window.aichartRegister&&ibiz.env.enableAI&&(Gi.registerMenu(ET),window.aichartRegister=!0),window.customElements.get("emoji-elem")||window.customElements.define("emoji-elem",zT),window.emojiIsRegiter||(Gi.registerModule(TT),window.emojiIsRegiter=!0),window.wangEditorPlugin||(Gi.registerPlugin(AT),window.wangEditorPlugin=!0)}onCreated(e){this.wangEditor=e,this.listenEvent()}listenEvent(){const e=this.wangEditor.getEditableContainer();this.wangEditor.on("openEmojiSelect",(()=>this.openEmojiSelect())),this.cleanup=Bt(e,"keydown",(e=>{var t;this.overlay&&this.presetPreventEvents.includes(e.keyCode)&&e.preventDefault(),this.overlay&&this.presetPreventPropEvents.includes(e.keyCode)&&(e.stopPropagation(),null==(t=this.overlay)||t.dismiss())}))}async openEmojiSelect(){const e=document.getSelection(),{focusNode:t}=e;t&&(this.overlay=ibiz.overlay.createPopover((e=>r(OT,{modal:e})),void 0,{width:"auto",noArrow:!0,autoClose:!0,placement:"bottom-start"}),await this.overlay.present(t.parentNode),this.overlay.onWillDismiss().then((e=>{var t;const a=e,n=null==(t=a.data)?void 0:t[0];a.ok&&n&&this.addEmojiNode(n),this.overlay=null})))}addEmojiNode(e){const t={data:e,type:"emoji",children:[{text:""}]};this.wangEditor.restoreSelection(),this.wangEditor.insertNode(t),this.wangEditor.move(1)}onDestroyed(){this.cleanup!==Lt&&this.cleanup(),this.overlay&&this.overlay.dismiss()}}var _T=Object.defineProperty,RT=(e,t,a)=>(((e,t,a)=>{t in e?_T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class LT{constructor(){RT(this,"formEditor","IBizHtml"),RT(this,"gridEditor","IBizHtml")}async createController(e,t){const a=new BT(e,t);return await a.init(),a}}var jT=Object.defineProperty,VT=(e,t,a)=>(((e,t,a)=>{t in e?jT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class FT extends To{constructor(){super(...arguments),VT(this,"uploadParams"),VT(this,"exportParams"),VT(this,"deService"),VT(this,"deACMode"),VT(this,"keyName","srfkey"),VT(this,"textName","srfmajortext"),VT(this,"sort","asc"),VT(this,"dataItems",[]),VT(this,"chatCompletion",!1)}async onInit(){if(await super.onInit(),this.style.height||(this.style.height="600px"),this.editorParams){const{uploadparams:e,exportparams:t}=this.editorParams;if(e)try{this.uploadParams=JSON.parse(e)}catch(t){throw new Gt(e,ibiz.i18n.t("editor.markdown.uploadJsonFormatErr"))}if(t)try{this.exportParams=JSON.parse(t)}catch(e){throw new Gt(t,ibiz.i18n.t("editor.markdown.exportJsonFormatErr"))}}const e=this.model;if(e.appDEACModeId&&(this.deACMode=await ha(e.appDEACModeId,e.appDataEntityId,this.context.srfappid),this.deACMode)){if("AUTOCOMPLETE"===this.deACMode.actype){const{minorSortAppDEFieldId:e,minorSortDir:t}=this.deACMode;e&&t&&(this.sort="".concat(e.toLowerCase(),",").concat(t.toLowerCase())),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach((e=>{"value"!==e.id&&"text"!==e.id&&this.dataItems.push(e)})))}"CHATCOMPLETION"===this.deACMode.actype&&(this.deService=await ibiz.hub.getApp(e.appId).deService.getService(this.context,e.appDataEntityId),this.chatCompletion=!0)}}}var UT=Object.defineProperty,HT=(e,t,a)=>(((e,t,a)=>{t in e?UT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qT{constructor(){HT(this,"formEditor","IBizMarkDown"),HT(this,"gridEditor","IBizMarkDown")}async createController(e,t){const a=new FT(e,t);return await a.init(),a}}const GT=a({name:"IBizArray",props:ct(),emits:Ve(),setup(e,{emit:t}){const a=B("array"),o=e.controller,i=o.model;let s,r="default",d="default",u=0,p=!1,h="",m="",v="_blank";const b=n([]);i.editorParams&&(i.editorParams.editorStyle&&(r=i.editorParams.editorStyle),i.editorParams.editorstyle&&(r=i.editorParams.editorstyle),i.editorParams.size&&(d=i.editorParams.size),i.editorParams.limit&&(u=Ai(i.editorParams.limit)),i.editorParams.maxLength&&(s=Ai(i.editorParams.maxLength)),i.editorParams.maxlength&&(s=Ai(i.editorParams.maxlength)),i.editorParams.showWordLimit&&(p=o.toBoolean(i.editorParams.showWordLimit)),i.editorParams.showwordlimit&&(p=o.toBoolean(i.editorParams.showwordlimit)),i.editorParams.prepend&&(h=i.editorParams.prepend),i.editorParams.append&&(m=i.editorParams.append),i.editorParams.target&&(v=i.editorParams.target));const g=i.dataType,f=Object.is(g,"NUMBER")||Object.is(g,"INTEGER")?"number":"text",w=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{if(e&&e!==t&&0===b.value.length){const t=e.map((e=>({value:e,key:ei()})));b.value=t}}),{immediate:!0});const y=(e="blur")=>{const a=b.value.map((e=>e.value));e===o.triggerMode&&t("change",a)};return{ns:a,c:o,editorStyle:r,type:f,size:d,limit:u,maxLength:s,showWordLimit:p,prepend:h,append:m,target:v,items:b,getUrl:e=>{let t=e;return t&&(h&&(t=h+t),m&&(t+=m)),t},addItem:t=>{if(e.disabled||e.readonly)return;const a={key:ei(),value:null};t?b.value.splice(t,0,a):b.value.push(a),y()},removeItem:e=>{b.value.splice(e,1),y()},handleChange:(e,t)=>{b.value[t].value=e,y()},handleInput:(e,t)=>{b.value[t].value=e,y("input")},onBlur:e=>{t("blur",e)},onFocus:e=>{t("focus",e)},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},showFormDefaultContent:w}},render(){return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)]},[0===this.items.length?o("ion-icon",{class:this.ns.b("add-icon"),name:"add-outline",onClick:this.addItem},null):this.items.map(((e,t)=>o("div",{class:this.ns.b("item"),key:e.key},["default"===this.editorStyle?o(i("el-input"),w({type:this.type,size:this.size,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:this.c.placeHolder,disabled:this.disabled,readonly:this.readonly,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onChange:e=>this.handleChange(e,t),onInput:e=>this.handleInput(e,t)},this.$attrs),null):o(i("el-tooltip"),{placement:"bottom",trigger:"hover","popper-class":this.ns.b("tooltip")},{default:()=>o(i("el-input"),w({type:this.type,size:this.size,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:this.c.placeHolder,disabled:this.disabled,readonly:this.readonly,maxlength:Object.is(this.editorStyle,"url")?this.maxLength:null,"show-word-limit":Object.is(this.editorStyle,"url")?this.showWordLimit:null,onBlur:this.onBlur,onFocus:this.onFocus,onChange:e=>this.handleChange(e,t),onInput:e=>this.handleInput(e,t),onKeyup:this.handleKeyUp},this.$attrs),{prefix:()=>Object.is(this.editorStyle,"url")&&this.prepend?this.prepend:null,suffix:()=>Object.is(this.editorStyle,"url")&&this.append?this.append:null}),content:()=>{let t;return"img"===this.editorStyle?o(i("el-image"),{fit:"contain",src:e.value},null):o(i("el-link"),{href:this.getUrl(e.value),target:this.target},"function"==typeof(a=t=this.getUrl(e.value))||"[object Object]"===Object.prototype.toString.call(a)&&!s(a)?t:{default:()=>[t]});var a}}),!(this.disabled||this.readonly)&&o("div",{class:this.ns.b("icons")},[(!this.limit||this.items.length<this.limit)&&o("ion-icon",{class:this.ns.b("add-icon"),name:"add",onClick:()=>this.addItem(t+1)},null),o("ion-icon",{class:this.ns.b("remove-icon"),name:"remove",onClick:()=>this.removeItem(t)},null)])])))])}});class WT extends To{}var KT=Object.defineProperty,YT=(e,t,a)=>(((e,t,a)=>{t in e?KT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class XT{constructor(){YT(this,"formEditor","IBizArray"),YT(this,"gridEditor","IBizArray")}async createController(e,t){const a=new WT(e,t);return await a.init(),a}}const $T=a({name:"IBizCascader",props:dt(),emits:Ve(),setup(e,{emit:t}){const a=B("cascader"),o=e.controller,i=o.model,s=n(null),r=n([]),c=i.editorItems;if(c&&c.length>0){const e=c.map((e=>({name:e.id,appId:e.appId,appDataEntityId:e.appDataEntityId,appDEDataSetId:e.appDEDataSetId})));r.value=e}let d="default",u="default",p=!0,h=!1,m="/";i.editorParams&&(i.editorParams.editorStyle&&(d=i.editorParams.editorStyle),i.editorParams.editorstyle&&(d=i.editorParams.editorstyle),i.editorParams.size&&(u=i.editorParams.size),i.editorParams.filterable&&(p=o.toBoolean(i.editorParams.filterable)),i.editorParams.multiple&&(h=o.toBoolean(i.editorParams.multiple)),i.editorParams.separator&&(m=i.editorParams.separator));const v=n([]),b=n([]),g=n(null),f=n([]),w=n([]),y=n([]),C=n(""),I=n(!1),D=n(!1),E=n(),S=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),x=e=>{e?D.value=e:setTimeout((()=>{D.value=e}),100)};r.value&&r.value.length>0&&r.value.forEach((e=>{w.value.push({name:e.name,value:[]})}));const P=(t,a)=>{const{level:n,value:o}=t;I.value=!0;let i=[];if(0===n)(()=>{if(e.value&&r.value){const t=[],a=JSON.parse(e.value);if(a.forEach((e=>{t.push({label:e,value:[]})})),w.value.forEach((t=>{const a=e.data[t.name]?e.data[t.name].split(","):[];t.value=a})),f.value=[],t.forEach(((e,t)=>{w.value.forEach((a=>{e.value.push(a.value[t])}));const a=e.value.join(m);f.value.push({label:e.label,value:a})})),f.value.forEach((e=>{const t=e.value.split(m),a=e.label.split(m);t.forEach(((e,t)=>{b.value.find((t=>t.value===e))||b.value.push({value:e,label:a[t]})}))})),Object.is(d,"default")){let e=[];h?f.value.forEach((t=>{e.push(t.value.split(m))})):e=f.value[0].value.split(m),g.value=e}else{g.value=h?a:a.join(m);const e=w.value[w.value.length-1].value;if(w.value.length>1){const t=w.value[w.value.length-2].value;t&&t.length>0&&t.forEach(((t,a)=>{e[a]="".concat(t,"_").concat(e[a])}))}y.value=e}}})(),v.value.length>0?a.forEach((e=>{const t=v.value.findIndex((t=>e.value===t.value));t>-1?Object.assign(v.value[t],e):(v.value.push(e),i.push(e))})):(v.value=[...a],i=[...a]);else{const e=(t,n)=>{t&&t.length>0&&t.forEach((t=>{t.value===o?t.children&&t.children.length>0?a.forEach((e=>{const a=t.children.findIndex((t=>t.value===e.value));a>-1?Object.assign(t.children[a],e):(t.children.push(e),i.push(e))})):(t.children=a,i=a):e(t.children)}))};e(v.value)}const s=g.value||[];return setTimeout((()=>{g.value=s,I.value=!1})),i},k=()=>{var e,a;if(!I.value){w.value.forEach((e=>{e.value=[]})),(null==(e=g.value)?void 0:e.length)&&g.value.forEach(((e,t)=>{"string"==typeof e?w.value[t].value.push(e):e.forEach(((e,t)=>{w.value[t].value.push(e)}))}));const n=[];let o=[];(null==(a=g.value)?void 0:a.length)&&g.value.forEach((e=>{if(h){const t=e.map((e=>{const t=b.value.find((t=>t.value===e));if(t)return t.label}));n.push(t)}else{const t=b.value.find((t=>t.value===e));t&&n.push(t.label)}})),w.value.forEach((e=>{t("change",e.value.length>0?e.value.join(","):null,e.name)})),n.length>0&&(h?n.forEach((e=>{o.push(e.join(m))})):o=[n.join(m)]),t("change",o.length>0?JSON.stringify(o):null),x(!1)}},T=l((()=>{if(e.value){return JSON.parse(e.value)[0]}return null}));return{ns:a,c:o,valueItems:r,editorStyle:d,filterable:p,separator:m,onBlur:e=>{t("blur",e),x(!1)},onFocus:e=>{t("focus",e),x(!0)},treeData:v,items:b,selectValue:g,treeSelectData:f,valueItemData:w,defaultCheckedKeys:y,searchValue:C,isLoaded:I,getSize:()=>{switch(u){case"large":return"large";case"small":return"small";default:return"default"}},getIsLeaf:(e,t)=>e.leaf,getDisabled:(e,t)=>t.level!==r.value.length,loadData:async(e,t)=>{const{level:a}=e,n=Object.is(d,"default")?e.value:e.data?e.data.value:null,i=r.value[a];try{if(i.appDataEntityId&&i.appDEDataSetId){const{context:s,params:l}=await(async(e,t)=>{const a=pi(o.context),n=pi(o.params);if(e>0){const{appDataEntityId:a}=r.value[e-1],{appId:o,appDataEntityId:i}=r.value[e],s=await ibiz.hub.getAppDataEntity(i,o),{minorAppDERSs:l}=s;if(l){const e=l.find((e=>e.majorAppDataEntityId===a));e&&e.parentAppDEFieldId&&Object.assign(n,{["n_".concat(e.parentAppDEFieldId.toLowerCase(),"_eq")]:t})}}return{context:a,params:n}})(a,n),c=ibiz.hub.getApp(o.context.srfappid),u=await c.deService.exec(i.appDataEntityId,i.appDEDataSetId,s,l);if(u&&200===u.status&&u.data.length>0){const o=u.data.map(((e,t)=>({...e,value:e.srfkey,label:e.srfmajortext?e.srfmajortext:ibiz.i18n.t("editor.cascader.ibizCascader.title",{index:t}),leaf:a===r.value.length-1,nodekey:"".concat(n?"".concat(n,"_").concat(e.srfkey):e.srfkey)})));if(o.forEach((e=>{const t=b.value.findIndex((t=>e.value===t.value));t>-1?b.value[t]=e:b.value.push(e)})),Object.is(d,"default")){t(P(e,o))}else t(o)}}t([])}catch(e){t([])}},treeRef:s,handleTreeClear:()=>{f.value=[],w.value.forEach((e=>{e.value=[]})),s.value&&s.value.setCheckedKeys([]),(()=>{const e=[];g.value=[],f.value.forEach((t=>{e.push(t.label)})),g.value=h?e:e.length>0?e[0]:null,w.value.forEach((e=>{t("change",e.value.length>0?e.value.join(","):null,e.name)})),t("change",g.value.length>0?JSON.stringify(g.value):null)})()},handleRemoveTag:()=>{setTimeout((()=>{k()}))},multiple:h,handleCascaderValueChange:k,editorRef:E,valueText:T,isEditable:D,setEditable:x,showFormDefaultContent:S,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)}}},render(){const e=o(i("el-cascader"),w({ref:"editorRef",class:[this.ns.b("input")],"popper-class":this.ns.b("popper"),clearable:!0,teleported:!this.showFormDefaultContent,options:this.treeData,size:this.getSize(),separator:this.separator,filterable:this.filterable,placeholder:this.c.placeHolder?this.c.placeHolder:" ",props:{lazy:!0,multiple:this.multiple,lazyLoad:this.loadData},disabled:this.disabled,modelValue:this.selectValue,"onUpdate:modelValue":e=>this.selectValue=e,onBlur:this.onBlur,onFocus:this.onFocus,onRemoveTag:this.handleRemoveTag,onChange:this.handleCascaderValueChange},this.$attrs),null),t=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),a=o("div",{class:this.ns.b("form-default-content")},[this.valueText?this.valueText:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)],onKeyup:this.handleKeyUp},[this.showFormDefaultContent&&a,this.readonly?t:e])}});class JT extends To{}var QT=Object.defineProperty,ZT=(e,t,a)=>(((e,t,a)=>{t in e?QT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ez{constructor(){ZT(this,"formEditor","IBizCascader"),ZT(this,"gridEditor","IBizCascader")}async createController(e,t){const a=new JT(e,t);return await a.init(),a}}const tz=a({name:"IBizColorMPickerCustom",props:{value:{type:Array},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultVal:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const a=B("color-mpicker-custom"),s=[{text:ibiz.i18n.t("editor.colorPicker.selector"),value:"select"},{text:ibiz.i18n.t("editor.colorPicker.textValue"),value:"write"}],l=n(["#000000","#2C2C2C","#50555C","#ACB3BF","#D0D3D9","#C4C4C4","#DADADA","#E5E5E5","#F0F0F0","#F24E1E","#E99C58","#FFC700","#FF4D00","#FF00D6","#D82E57","#8E1DE8","#0ACF83","#18A0FB","#A259FF","#907CFF"]),r=n([]),d=n("select"),u=n("");return c((()=>e.value),(()=>{e.value&&0!==e.value.length?(r.value=e.value,u.value=r.value.toString()):(u.value="",r.value=e.defaultVal||[])}),{immediate:!0,deep:!0}),{ns:a,tabs:s,curSelect:d,colorStr:u,renderColorList:()=>r.value.map(((n,s)=>o("div",{class:a.em("color-list","item")},[o(i("el-color-picker"),{modelValue:n,"onUpdate:modelValue":e=>n=e,disabled:e.disabled||e.readonly,predefine:l.value,onChange:e=>((e,a)=>{r.value[e]=a,t("change",[...r.value])})(s,e)},null),o("ion-icon",{name:"close-circle-outline",onClick:()=>(e=>{r.value.splice(e,1),r.value.length?t("change",[...r.value]):t("change",null)})(s)},null)]))),onSelect:e=>{if(d.value=e,"select"===e){const e=u.value.split(",");r.value=e.filter((e=>/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(e)))}else u.value=r.value.toString()},onAdd:()=>{e.readonly||e.disabled||(r.value.push("#FFFFFF"),t("change",[...r.value]))},onBlur:()=>{if("select"===d.value)t("change",r.value);else{const e=u.value.split(",");r.value=e.filter((e=>/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(e))),t("change",r.value)}}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:[this.ns.e("tabs")]},[o("div",{class:[this.ns.e("anchor"),this.ns.is("select-text","write"===this.curSelect)]},[this.tabs.map((e=>o("div",{class:[this.ns.em("tabs","tab"),this.ns.is("selected",e.value===this.curSelect)],onClick:()=>this.onSelect(e.value)},[e.text])))])]),o("div",{class:this.ns.e("content")},["select"===this.curSelect?o("div",{class:this.ns.e("color-list")},[this.renderColorList(),o("div",{class:[this.ns.em("color-list","add"),this.ns.is("disabled",this.disabled||this.readonly)],onClick:this.onAdd,title:ibiz.i18n.t("editor.colorPicker.add")},[o("ion-icon",{name:"add-outline"},null)])]):o(i("el-input"),{type:"textarea",modelValue:this.colorStr,"onUpdate:modelValue":e=>this.colorStr=e,disabled:this.disabled,readonly:this.readonly,onBlur:this.onBlur},null)])])}}),az=a({name:"IBizColorMPickerDefault",props:{value:{type:[Array,String]},customColorList:{type:String},type:{type:String,default:"ITEMS"},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:t}){const a=B("color-mpicker-default"),o=n("default"),i=n(""),s=n(!1),r=[{text:ibiz.i18n.t("editor.colorPicker.systemColor"),value:"default"},{text:ibiz.i18n.t("editor.colorPicker.templateColor"),value:"template"}],d=l((()=>e.customColorList?JSON.parse(e.customColorList):[{text:ibiz.i18n.t("editor.colorPicker.simpleBlue"),value:"ITEM"===e.type?["#6698FF"]:["#6698FF","#73DEB3","#7585A2","#F7BE21","#EE734A","#83D0EE"]},{text:ibiz.i18n.t("editor.colorPicker.autumnOrange"),value:"ITEM"===e.type?["#EE734A"]:["#EE734A","#7585A2","#FEC103","#9EB411","#CD8050","#DAD5B5"]},{text:ibiz.i18n.t("editor.colorPicker.Macaroon"),value:"ITEM"===e.type?["#467CE6"]:["#467CE6","#CD74CA","#4997CC","#BCBFE3","#666CEB","#82BC9A"]},{text:ibiz.i18n.t("editor.colorPicker.mintGreen"),value:"ITEM"===e.type?["#118299"]:["#118299","#13B3B3","#73DEB3","#FEC103","#9EB411","#83D0EE"]}]));return c((()=>e.value),(()=>{e.value?"string"==typeof e.value?(o.value="default",s.value=!1):(o.value="template",s.value=!0,e.value.length>0&&(i.value=JSON.stringify(e.value))):(o.value="default",s.value=!1)}),{immediate:!0,deep:!0}),{ns:a,curType:o,curTemplateColor:i,showTemplateList:s,colorType:r,templateColorList:d,handleTemplateColorChange:()=>{const e=JSON.parse(i.value);t("change",e)},handleSchemeChange:()=>{var e,a;"default"===o.value?(s.value=!1,t("change",null==(a=null==(e=d.value[0])?void 0:e.value)?void 0:a[0])):s.value=!0}}},render(){return o("div",{class:this.ns.b()},[o(i("el-select"),{class:this.ns.b("picker"),"popper-class":this.ns.b("popper"),modelValue:this.curType,"onUpdate:modelValue":e=>this.curType=e,onChange:this.handleSchemeChange},{default:()=>this.colorType.map((e=>o(i("el-option"),{key:e.value,label:e.text,value:e.value},null)))}),this.showTemplateList&&o(i("el-select"),{class:this.ns.b("template-color-picker"),"popper-class":this.ns.b("popper"),modelValue:this.curTemplateColor,"onUpdate:modelValue":e=>this.curTemplateColor=e,onChange:this.handleTemplateColorChange},{default:()=>this.templateColorList.map((e=>o(i("el-option"),{key:e.key,label:e.text,value:JSON.stringify(e.value)},{default:()=>o("div",{class:this.ns.b("template-color-picker-option")},[Array.isArray(e.value)?e.value.map((e=>o("div",{class:this.ns.be("template-color-picker","icon"),style:{background:e}},null))):o("div",{class:this.ns.be("template-color-picker","icon"),style:{background:e.value}},null),o("div",{class:this.ns.be("template-color-picker","text")},[e.text])])}))),prefix:()=>{if(this.curTemplateColor){const e=JSON.parse(this.curTemplateColor);return Array.isArray(e)?e.map((e=>o("div",{class:this.ns.be("template-color-picker","icon"),style:{background:e}},null))):o("div",{class:this.ns.be("template-color-picker","icon"),style:{background:e[0]}},[e[0]])}}})])}}),nz=a({name:"IBizColorPicker",props:ut(),emits:Ve(),setup(e,{emit:t}){var a,o,i,s,r,d,u,p;const h=B("color-picker"),m=e.controller,v=n(""),b=n(null),g="true"===(null==(a=m.editorParams)?void 0:a.MULTIPLE)||"true"===(null==(o=m.editorParams)?void 0:o.multiple),f="true"===(null==(i=m.editorParams)?void 0:i.CUSTOM)||"true"===(null==(s=m.editorParams)?void 0:s.custom),w=(null==(r=m.editorParams)?void 0:r.TYPE)||(null==(d=m.editorParams)?void 0:d.type),y=(null==(u=m.editorParams)?void 0:u.CUSTOMCOLORLIST)||(null==(p=m.editorParams)?void 0:p.customcolorlist)||"",C=n(["#000000","#2C2C2C","#50555C","#ACB3BF","#D0D3D9","#C4C4C4","#DADADA","#E5E5E5","#F0F0F0","#F24E1E","#E99C58","#FFC700","#FF4D00","#FF00D6","#D82E57","#8E1DE8","#0ACF83","#18A0FB","#A259FF","#907CFF"]),I=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&(v.value=g?e||(f?[]:""):e||"")}),{immediate:!0});const D=l((()=>m.style?m.style:null));return{ns:h,c:m,currentVal:v,predefineColors:C,contentStyle:D,colorPicker:b,multiple:g,isCustom:f,customColorList:y,type:w,handleChange:e=>{t("change",e)},showPicker:e=>{setTimeout((()=>{b.value&&b.value.show()}),200)},onFocus:e=>{t("focus",e)},onBlur:e=>{t("blur",e)},showFormDefaultContent:I,onChange:e=>{t("change",e)}}},render(){var e,t,a;if(this.multiple)return this.isCustom?o(tz,{value:this.currentVal||[],onChange:this.onChange,readonly:this.readonly,disabled:this.disabled,defaultVal:this.controller.defaultVal},null):o(az,{value:this.currentVal||"",type:this.type,customColorList:this.customColorList,readonly:this.readonly,disabled:this.disabled,onChange:this.onChange},null);let n=null;return n=this.readonly?"".concat(null==(e=this.currentVal)?void 0:e.toString()):o("span",{class:this.ns.b("content"),style:this.contentStyle,onClick:this.showPicker},[o(i("el-color-picker"),w({ref:"colorPicker",modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled,onChange:this.handleChange,onBlur:this.onBlur,onFocus:this.onFocus,size:"small",predefine:this.predefineColors,"show-alpha":!0},this.$attrs),null),"true"===(null==(t=this.c.editorParams)?void 0:t.isHiddenText)||"true"===(null==(a=this.c.editorParams)?void 0:a.ishiddentext)?null:o("span",{class:this.ns.b("text")},[this.currentVal])]),o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)],style:{color:this.currentVal||""}},[n])}});var oz=Object.defineProperty,iz=(e,t,a)=>(((e,t,a)=>{t in e?oz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sz extends To{constructor(){super(...arguments),iz(this,"defaultVal",[])}async onInit(){await super.onInit();const{defaultVal:e,defaultval:t}=this.editorParams;e&&(this.defaultVal=JSON.parse(e)),t&&(this.defaultVal=JSON.parse(t))}}var lz=Object.defineProperty,rz=(e,t,a)=>(((e,t,a)=>{t in e?lz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cz{constructor(){rz(this,"formEditor","IBizColorPicker"),rz(this,"gridEditor","IBizColorPicker")}async createController(e,t){const a=new sz(e,t);return await a.init(),a}}const dz=a({name:"IBizPresetRawitem",props:$e(),emits:Ve(),setup(e,{emit:t}){const a=B("preset-rawitem"),o=e.controller,i=o.model,{componentRef:s}=je((()=>t("focus")),(()=>t("blur"))),l=o.model.predefinedType,r=n("");return c((()=>e.value),((e,t)=>{e!==t&&(r.value=e)}),{immediate:!0}),{ns:a,editorModel:i,editorRef:s,type:l,content:r}},render(){let e=null;return e="FIELD_IMAGE"===this.type?o(i("iBizRawItem"),{content:this.content,type:"IMAGE"},null):"FIELD_TEXT_DYNAMIC"===this.type?o(i("iBizRawItem"),{content:this.content,type:"TEXT"},null):o("div",null,[ibiz.i18n.t("editor.preset.ibizPresetRawitem.noSupportType",{type:this.type})]),o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[e])}}),uz=a({name:"IBizCarousel",props:pt(),emits:Ve(),setup(e){const t=B("carousel"),a=e.controller,o=a.model,i=n([]),s=n(!0),l=n(3e3);c((()=>e.value),(e=>{"string"==typeof e&&(i.value=e?JSON.parse(e):[])}),{immediate:!0});return c(i,(t=>{(null==t?void 0:t.length)&&t.forEach((t=>{const n=((e,t)=>{const n={...a.editorParams};return n.exportparams&&(n.exportParams=JSON.parse(n.exportparams)),t&&t.folder&&(n.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(a.context,a.params,e,n).downloadUrl})(e.data,t);t.imgUrl=t.imgUrl||n.replace("%fileId%",t.id),ibiz.config.common.enableDownloadTicket&&ibiz.util.file.getDownloadTicket(a.context,a.params,e.data,{fileId:t.id},a.downloadTicketParams).then((e=>{e&&e.ticket&&(t.imgUrl=n.replace("%fileId%",e.ticket))}))}))}),{immediate:!0}),{ns:t,c:a,editorModel:o,carouselData:i,isAuto:s,timeSpan:l}},render(){return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.e(this.editorModel.editorType)]},[o(i("iBizCarouselComponent"),w({carouselData:this.carouselData,isAuto:this.isAuto,timeSpan:this.timeSpan},this.$attrs),null)])}});class pz extends To{}var hz=Object.defineProperty,mz=(e,t,a)=>(((e,t,a)=>{t in e?hz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vz{constructor(){mz(this,"formEditor","IBizCarousel"),mz(this,"gridEditor","IBizCarousel")}async createController(e,t){const a=new pz(e,t);return await a.init(),a}}var bz=Object.defineProperty,gz=(e,t,a)=>(((e,t,a)=>{t in e?bz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fz extends To{constructor(){super(...arguments),gz(this,"searchBarFilters",[]),gz(this,"filterControllers",[]),gz(this,"appDataEntity",null)}async onInit(){await super.onInit(),await this.initByEntitySchema(),await this.initSearchBarFilters()}async initByEntitySchema(){if(!this.model.appDataEntityId)return;const e=await ibiz.hub.getAppDataEntity(this.model.appDataEntityId,this.context.srfappid);e&&(this.appDataEntity=e);const t=await Ao(this.model.appDataEntityId,this.context);if(!t)return;const a=await Oo(t,this.model.appDataEntityId,this.model.appId);this.searchBarFilters=a}async initSearchBarFilters(){var e;(null==(e=this.searchBarFilters)?void 0:e.length)&&this.appDataEntity&&(this.searchBarFilters.forEach((e=>{const t=new Mo(e,this.appDataEntity,this.context,this.params);this.filterControllers.push(t)})),await Promise.all(this.filterControllers.map((e=>e.init()))))}}var wz=Object.defineProperty,yz=(e,t,a)=>(((e,t,a)=>{t in e?wz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cz{constructor(){yz(this,"formEditor","IBizSearchCondEdit"),yz(this,"gridEditor","IBizSearchCondEdit")}async createController(e,t){const a=new fz(e,t);return await a.init(),a}}const Iz=a({name:"IBizSearchCondEdit",props:Fe(),emits:Ve(),setup(e,{emit:t}){const a=B("searchcond-edit"),s=e.controller,r=n(null),d=n(!1),u=n(),p=n([]),h=n();let m;const v=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{if(e!==t)if(null==e)r.value="",p.value=No();else if("string"==typeof e&&(r.value=e,e))try{const t=JSON.parse(e);p.value=t.map((e=>Bo(e)))}catch(t){ibiz.log.error("".concat(e,"值格式不正确,必须为json字符串"))}}),{immediate:!0});const b=()=>{p.value=No()};b();const g=e=>{e?d.value=e:setTimeout((()=>{d.value=e}),100)};c(u,(t=>{if(e.autoFocus&&t){t.$el.getElementsByTagName("input")[0].focus()}}));const f=()=>{const e=_o(p.value);e&&(r.value=JSON.stringify(e,null,2))},w=async()=>{m=ibiz.overlay.createPopover((()=>o(i("iBizFilterTreeControl"),{filterControllers:s.filterControllers,filterNodes:p.value,parent:"searchcond-edit",onConfirm:()=>{f(),m&&m.dismiss(),t("change",r.value)},onCancel:()=>{b(),f(),t("change","")}},null)),void 0,{placement:"bottom-end",autoClose:!0}),m.present(h.value.$el),await m.onWillDismiss(),m=void 0};return{ns:a,c:s,currentVal:r,handleChange:e=>{t("change",e)},onFocus:e=>{t("focus",e),g(!0)},onBlur:e=>{t("blur",e),g(!1)},editorRef:u,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},isEditable:d,setEditable:g,showFormDefaultContent:v,filterNodes:p,triggerFilter:()=>{m?m.dismiss():w()},filterButtonRef:h,resetFilter:b}},render(){let e=null;return e=this.readonly?ni(this.currentVal)?"":"".concat(this.currentVal):[o(i("el-input"),w({ref:"editorRef",class:[this.ns.b("input")],"model-value":this.currentVal,type:"textarea",rows:10,placeholder:this.c.placeHolder,disabled:this.disabled,controls:!1,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},this.$attrs),null),o(i("el-button"),{ref:"filterButtonRef",type:"primary",title:zt(ibiz.i18n.t("app.edit")),class:this.ns.b("filter"),onClick:()=>this.triggerFilter()},{default:()=>[o(i("iBizIcon"),{icon:{cssClass:"fa fa-edit"}},null)]})],o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("editable",this.isEditable),this.ns.is("show-default",this.showFormDefaultContent)]},[e])}});var Dz=a({name:"BIQuarterRangeSelect",props:{value:{type:Array,default:()=>[]}},emits:["change","visibleChange"],setup(e,{emit:t}){const a=B("bi-quarter-range-select"),i=n(),s=n(),l=n(),r=n(),d=n(),u=n(!1),p=["Q1","Q2","Q3","Q4"],h=(e,t,a)=>{let n=3*t;"START"===a&&(n-=2);const o=new Date("".concat(e,"-").concat(n));if("START"===a)o.setDate(1),o.setHours(0,0,0,0);else{[1,3,5,7,8,10,12].includes(n)?o.setDate(31):o.setDate(30),o.setHours(23,59,59,0)}return o};c((()=>e.value),(e=>{if(e&&Array.isArray(e)&&e.length>0){const t=new Date(e[0]),a=new Date(e[1]);i.value=t.getFullYear();const n=a.getFullYear();i.value===n?s.value=i.value+1:s.value=n;const o=Math.ceil((t.getMonth()+1)/3),c=Math.ceil((a.getMonth()+1)/3);l.value=h(i.value,o,"START"),r.value=h(n,c,"END")}else i.value=(new Date).getFullYear(),s.value=(new Date).getFullYear()+1,l.value=null,r.value=null}),{immediate:!0,deep:!0});const m=e=>"right"===e&&i.value===s.value?o("div",null,null):o("svg",{onClick:()=>(e=>{"left"===e?i.value-=1:s.value-=1})(e),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[o("g",{id:"aav1.icon图标/5.navigation/angle-double-left","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.984 7l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 7l.005.006L7.984 7zm0-4l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 3l.005.006L7.984 3z",id:"aav形状结合",transform:"rotate(-90 7.949 7.822)"},null)])]),v=e=>"left"===e&&i.value===s.value?o("div",null,null):o("svg",{onClick:()=>(e=>{"left"===e?i.value+=1:s.value+=1})(e),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[o("g",{id:"aaw1.icon图标/5.navigation/angle-double-right","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.984 7.3l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 7.3l.005.006.006-.006zm0-4l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 3.3l.005.006.006-.006z",id:"aaw形状结合",transform:"rotate(90 7.949 8.122)"},null)])]),b=(e,a)=>{if(l.value&&r.value&&(l.value=null,r.value=null),l.value){const n=l.value.getFullYear(),o=l.value.getMonth()+1,i=Math.ceil(o/3);e>n?r.value=h(e,a,"END"):e<n?(r.value=h(n,i,"END"),l.value=h(e,a,"START")):a>=i?r.value=h(e,a,"END"):(r.value=h(n,i,"END"),l.value=h(e,a,"START")),t("change",[l.value.toLocaleDateString(),r.value.toLocaleDateString()]),u.value=!1}else l.value=h(e,a,"START")},g=(e,t)=>{if(i.value&&s.value&&l.value&&r.value){const a=l.value.getFullYear(),n=r.value.getFullYear(),o=l.value.getMonth()+1,i=r.value.getMonth()+1,s=Math.ceil(o/3),c=Math.ceil(i/3);if(e>a&&e<n)return!0;if(e===a&&e<n&&t>=s)return!0;if(e===n&&e>a&&t<=c)return!0;if(e===a&&e===n&&t<=c&&t>=s)return!0}return!1},f=(e,t)=>{if(i.value&&s.value&&l.value&&!r.value&&d.value){const a=d.value.getFullYear(),n=d.value.getMonth()+1,o=Math.ceil(n/3);let i=l.value,s=d.value;const r=l.value.getFullYear(),c=l.value.getMonth()+1,u=Math.ceil(c/3);a<=r&&o<=u&&(s=l.value,i=d.value);const p=i.getFullYear(),h=s.getFullYear(),m=i.getMonth()+1,v=s.getMonth()+1,b=Math.ceil(m/3),g=Math.ceil(v/3);if(e>p&&e<h)return!0;if(e===p&&e<h&&t>=b)return!0;if(e===h&&e>p&&t<=g)return!0;if(a<=r&&o<u&&e===a&&t>=o&&t<=u)return!0;if(a>=r&&o>u&&e===a&&t<=o&&t>=u)return!0}return!1},w=(e,t)=>{if(l.value){const a=l.value.getFullYear(),n=l.value.getMonth()+1,o=Math.ceil(n/3);if(e===a&&o===t)return!0}if(r.value){const a=r.value.getFullYear(),n=r.value.getMonth()+1,o=Math.ceil(n/3);if(e===a&&o===t)return!0}return!1},y=(e,t)=>!!d.value&&d.value.getTime()===h(e,t,"START").getTime(),C=(e,t)=>{const a=h(e,t,"START"),n=new Date,o=a.getMonth()+1,i=Math.ceil(o/3),s=n.getFullYear(),l=n.getMonth()+1,r=Math.ceil(l/3);return e===s&&i===r},I=(e,t)=>{d.value=h(e,t,"START")},D=()=>{d.value=null};return{ns:a,renderSelect:()=>o("div",{class:a.e("date-panel")},[o("div",{class:a.em("date-panel","left")},[o("div",{class:a.em("date-panel","left-header")},[m("left"),o("span",null,[i.value,ibiz.i18n.t("editor.dateRangeSelect.year")]),v("left")]),o("div",{class:a.em("date-panel","left-content")},[p.map(((e,t)=>o("div",{class:[a.em("date-panel","left-item"),a.is("include",g(i.value,t+1)),a.is("selected",w(i.value,t+1)),a.is("hoverinclude",f(i.value,t+1)),a.is("curquarter",C(i.value,t+1)),a.is("hover",y(i.value,t+1))],onClick:()=>b(i.value,t+1),onMouseenter:()=>I(i.value,t+1),onMouseleave:()=>D()},[e])))])]),o("div",{class:a.em("date-panel","right")},[o("div",{class:a.em("date-panel","right-header")},[m("right"),o("span",null,[s.value,ibiz.i18n.t("editor.dateRangeSelect.year")]),v("right")]),o("div",{class:a.em("date-panel","right-content")},[p.map(((e,t)=>o("div",{class:[a.em("date-panel","right-item"),a.is("selected",w(s.value,t+1)),a.is("include",g(s.value,t+1)),a.is("hoverinclude",f(s.value,t+1)),a.is("curquarter",C(s.value,t+1)),a.is("hover",y(s.value,t+1))],onClick:()=>b(s.value,t+1),onMouseenter:()=>I(s.value,t+1),onMouseleave:()=>D()},[e])))])])]),visible:u,handleClose:()=>{u.value=!1},handleOpen:()=>{u.value=!0},visibleChange:e=>{t("visibleChange",e)}}},render(){return o("div",{class:this.ns.b()},[o(i("el-popover"),{visible:this.visible,"onUpdate:visible":e=>this.visible=e,trigger:"click",width:600,"popper-class":this.ns.b("quarter-pop"),placement:"right",onAfterEnter:()=>this.visibleChange(!0),onAfterLeave:()=>this.visibleChange(!1)},{default:()=>this.renderSelect(),reference:()=>o("div",null,null)})])}}),Ez=a({name:"BIYearRangeSelect",props:{value:{type:Array,default:()=>[]}},emits:["change","visibleChange"],setup(e,{emit:t}){const a=B("bi-year-range-select"),i=n(),s=n(!1),l=n([(new Date).getFullYear()-(new Date).getFullYear()%10,(new Date).getFullYear()+(9-(new Date).getFullYear()%10)]),r=n([(new Date).getFullYear()+(10-(new Date).getFullYear()%10),(new Date).getFullYear()+(19-(new Date).getFullYear()%10)]),d=n({start:void 0,end:void 0}),u=n([]),p=n([]),h=(e,t)=>{let a=e-1;const n=[];for(;a<=t+1;)n.push(a),a+=1;return n};u.value=h(l.value[0],l.value[1]),p.value=h(r.value[0],r.value[1]),c((()=>e.value),(e=>{if(e&&Array.isArray(e)&&e.length>0){const t=Number(e[0]),a=Number(e[1]);Number.isNaN(t)||Number.isNaN(a)||(l.value=[t-t%10,t+(9-t%10)],d.value.start=t,r.value=[a-a%10,a+(9-a%10)],d.value.end=a)}else l.value=[(new Date).getFullYear()-(new Date).getFullYear()%10,(new Date).getFullYear()+(9-(new Date).getFullYear()%10)],r.value=[(new Date).getFullYear()+(10-(new Date).getFullYear()%10),(new Date).getFullYear()+(19-(new Date).getFullYear()%10)]}),{immediate:!0,deep:!0});const m=e=>"right"===e&&l.value&&r.value&&l.value.at(-1)===r.value[0]-1?o("div",null,null):o("svg",{onClick:()=>(e=>{"left"===e?(l.value[0]-=10,l.value[1]-=10,u.value=h(l.value[0],l.value[1])):(r.value[0]-=10,r.value[1]-=10,p.value=h(r.value[0],r.value[1]))})(e),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[o("g",{id:"aav1.icon图标/5.navigation/angle-double-left","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.984 7l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 7l.005.006L7.984 7zm0-4l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 3l.005.006L7.984 3z",id:"aav形状结合",transform:"rotate(-90 7.949 7.822)"},null)])]),v=e=>"left"===e&&l.value&&r.value&&l.value.at(-1)===r.value[0]-1?o("div",null,null):o("svg",{onClick:()=>(e=>{"left"===e?(l.value[0]+=10,l.value[1]+=10,u.value=h(l.value[0],l.value[1])):(r.value[0]+=10,r.value[1]+=10,p.value=h(r.value[0],r.value[1]))})(e),viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[o("g",{id:"aaw1.icon图标/5.navigation/angle-double-right","stroke-width":"1","fill-rule":"evenodd"},[o("path",{d:"M7.984 7.3l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 7.3l.005.006.006-.006zm0-4l4.75 4.762-.832.817-3.924-3.924-3.99 3.99-.825-.836L7.973 3.3l.005.006.006-.006z",id:"aaw形状结合",transform:"rotate(90 7.949 8.122)"},null)])]),b=e=>{if(d.value.start&&d.value.end&&(d.value.start=void 0,d.value.end=void 0),d.value.start){if(e>=d.value.start)d.value.end=e;else{const t=d.value.start;d.value.start=e,d.value.end=t}t("change",[null==(a=d.value.start)?void 0:a.toString(),null==(n=d.value.end)?void 0:n.toString()]),s.value=!1}else d.value.start=e;var a,n},g=e=>!!(d.value.start&&d.value.end&&e>=d.value.start&&e<=d.value.end),f=e=>{if(d.value.start&&!d.value.end&&i.value){let t=d.value.start,a=i.value;if(i.value<d.value.start&&(a=d.value.start,t=i.value),e>=t&&e<=a)return!0}return!1},w=e=>d.value.start===e||d.value.end===e,y=e=>e===(new Date).getFullYear(),C=e=>{i.value=e},I=()=>{i.value=null};return{ns:a,visible:s,renderSelect:()=>{var e,t;return o("div",{class:a.e("date-panel")},[o("div",{class:a.em("date-panel","left")},[o("div",{class:a.em("date-panel","left-header")},[m("left"),o("span",null,[null==(e=l.value)?void 0:e.join("-")]),v("left")]),o("div",{class:a.em("date-panel","left-content")},[u.value.map((e=>o("div",{class:[a.em("date-panel","left-item"),a.is("selected",w(e)),a.is("include",g(e)),a.is("hover",i.value===e),a.is("curyear",y(e)),a.is("hoverinclude",f(e))],onClick:()=>b(e),onMouseenter:()=>C(e),onMouseleave:()=>I()},[e])))])]),o("div",{class:a.em("date-panel","right")},[o("div",{class:a.em("date-panel","right-header")},[m("right"),o("span",null,[null==(t=r.value)?void 0:t.join("-")]),v("right")]),o("div",{class:a.em("date-panel","right-content")},[p.value.map((e=>o("div",{class:[a.em("date-panel","right-item"),a.is("selected",w(e)),a.is("include",g(e)),a.is("hover",i.value===e),a.is("curyear",y(e)),a.is("hoverinclude",f(e))],onClick:()=>b(e),onMouseenter:()=>C(e),onMouseleave:()=>I()},[e])))])])])},handleClose:()=>{s.value=!0},handleOpen:()=>{s.value=!0},visibleChange:e=>{s.value=e,t("visibleChange",e)}}},render(){return o("div",{class:this.ns.b()},[o(i("el-popover"),{visible:this.visible,"onUpdate:visible":e=>this.visible=e,trigger:"click",width:600,placement:"top",onAfterEnter:()=>this.visibleChange(!0),onAfterLeave:()=>this.visibleChange(!1)},{default:()=>this.renderSelect(),reference:()=>o("div",null,null)})])}});e("a","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function Sz(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(e,t){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),n={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var a=100*e+t;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return a.default.locale(n,null,!0),n}(Vi)}({exports:{}});const xz=a({name:"IBizDateRangeSelect",components:{"bi-quarter-range-select":Dz,"bi-year-range-select":Ez,"bi-week-range-select":a({props:{value:{type:Array,default:()=>[]}},emits:["change","visibleChange"],setup(e,{emit:t}){const a=B("bi-week-range"),o=n(),i=n(),s=n(!1),l=Vi(new Date).format("YYYY/MM/DD"),r=n(),d=n();let u=!1;const p=n(),h=()=>{r.value=null,d.value=null};c((()=>e.value),(e=>{e&&Array.isArray(e)?(r.value=new Date(e[0]),d.value=new Date(e[1])):h()}),{immediate:!0,deep:!0});const m=e=>{const t=e.getDay();let a=t;0===t&&(a=7);const n=e.getTime()+24*(7-a)*60*60*1e3,o=new Date(n);return o.setHours(23,59,59,0),o},v=e=>{const t=e.getDay();let a=t;0===t&&(a=7);const n=e.getTime()-24*(a-1)*60*60*1e3,o=new Date(n);return o.setHours(0,0,0,0),o},b=e=>{const{date:t}=e;if(p.value){const e=v(p.value),a=m(p.value),n=t.getTime();if(e.getTime()<=n&&a.getTime()>=n)return!0}return!1};return{ns:a,curValue:o,weekRangeRef:i,isInRange:e=>{const{date:t}=e,a=t.getTime();if(r.value&&d.value){const e=r.value.getTime(),t=d.value.getTime();if(a>=e&&a<=t)return!0}return!1},isInHoverRange:e=>{var t;const{date:a}=e,n=a.getTime();if(r.value&&!d.value&&p.value){const a=null==(t=p.value)?void 0:t.getTime();let o=r.value,i=p.value;a<r.value.getTime()&&(i=r.value,o=p.value);const s=o.getTime(),l=i.getTime();return n>=s&&n<=l||b(e)}return!1},isEnded:e=>{const{date:t}=e;if(d.value){const e=m(d.value),a=v(d.value);return t.getTime()>=a.getTime()&&t.getTime()<=e.getTime()}},isStarted:e=>{const{date:t}=e;if(r.value){const e=m(r.value),a=v(r.value);return t.getTime()>=a.getTime()&&t.getTime()<=e.getTime()}},isToday:e=>e.dayjs.format("YYYY/MM/DD")===l,weekRangeClick:()=>{s.value?i.value.handleClose():i.value.handleOpen()},cellClick:e=>{const{date:t}=e;if(u){const e=m(t),a=v(t);a.getTime()>r.value.getTime()?d.value=e:(d.value=m(r.value),r.value=a),u=!1}else h(),r.value=v(t),u=!0},visibleChange:e=>{s.value=e,t("visibleChange",e)},handleChange:()=>{if(r.value&&d.value){const e=r.value.toLocaleDateString(),a=d.value.toLocaleDateString();t("change",[e,a])}},handleClose:()=>{i.value.handleClose()},handleOpen:()=>{i.value.handleOpen()},isHover:b,isMonday:e=>{const{date:t}=e;return 1===t.getDay()},isSunday:e=>{const{date:t}=e;return 0===t.getDay()},onMouseHover:e=>{const{date:t}=e;p.value=t},onMouseleave:()=>{p.value=null}}},render(){return o("div",{class:this.ns.b(),onClick:this.weekRangeClick},[o(i("el-date-picker"),{ref:"weekRangeRef",modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,"popper-class":this.ns.b("picker-pop"),type:"daterange",onChange:this.handleChange,onVisibleChange:this.visibleChange},{default:e=>o("div",{class:[this.ns.e("cell-item"),this.ns.is("inrange",this.isInRange(e)&&!this.isEnded(e)&&!this.isStarted(e)),this.ns.is("inhoverrange",this.isInHoverRange(e)&&!this.isEnded(e)&&!this.isStarted(e)),this.ns.is("hover",this.isHover(e)&&!this.isEnded(e)&&!this.isStarted(e)),this.ns.is("left",0===e.column),this.ns.is("right",6===e.column),this.ns.is("ended",this.isEnded(e)),this.ns.is("started",this.isStarted(e)),this.ns.is("monday",this.isMonday(e)),this.ns.is("sunday",this.isSunday(e))],onMouseenter:()=>this.onMouseHover(e),onMouseleave:()=>this.onMouseleave(),onClick:()=>this.cellClick(e)},[o("span",{class:[this.ns.em("cell-item","text"),this.ns.is("today",this.isToday(e))]},[e.text])])})])}})},props:ht(),emits:mt(),setup(e,{emit:t}){const a=B("date-range-select"),l=e.controller,r=n(l.defaultUnit),u=n(),p=n("DYNAMIC"),h=n({DYNAMIC:null,STATIC:null}),v=n({ALL:!1,STATIC:!1,DYNAMIC:!1}),b=n(),g=n(!1),f=[{value:"DAY",label:ibiz.i18n.t("editor.dateRangeSelect.day")},{value:"WEEK",label:ibiz.i18n.t("editor.dateRangeSelect.week")},{value:"MONTH",label:ibiz.i18n.t("editor.dateRangeSelect.month")},{value:"QUARTER",label:ibiz.i18n.t("editor.dateRangeSelect.quarter")},{value:"YEAR",label:ibiz.i18n.t("editor.dateRangeSelect.year")}],w=[{caption:ibiz.i18n.t("editor.dateRangeSelect.static"),type:"STATIC"},{caption:ibiz.i18n.t("editor.dateRangeSelect.dynamic"),type:"DYNAMIC"}],y=(e,t,a,n)=>{b.value=l.handleTimeToText(e,r.value,t,a,n)},C=()=>{u.value=l.initDefaultDate(r.value);const{start:a,end:n,emitStart:o,emitEnd:i}=e.controller.computedDateTypesTime(r.value,"DYNAMIC",u.value[0],u.value[1]);y("DYNAMIC",u.value,a,n),t("change",{unit:r.value,type:"DYNAMIC",start:o,end:i})},I=()=>{C()},D=(a,n)=>{v.value[a]=!1,v.value.ALL=!1,u.value=n;const{start:o,end:i,emitStart:s,emitEnd:l}=e.controller.computedDateTypesTime(r.value,a,n[0],n[1]);y(a,n,o,i),t("change",{start:s,end:l,unit:r.value,type:p.value})},E=(t,a)=>{var n;a||(v.value[t]=!1,v.value.STATIC||v.value.DYNAMIC||g.value?(g.value=!1,(null==(n=e.value)?void 0:n.type)&&p.value!==e.value.type&&(v.value.ALL=!1,D(p.value,u.value))):v.value.ALL=!1)},S=e=>{e.stopPropagation(),e.preventDefault(),v.value.ALL=!v.value.ALL},x=(e,t)=>{h.value[e]=t},P=e=>{if("QUARTER"===r.value)return o(i("bi-quarter-range-select"),{ref:t=>x(e,t),class:[a.em("date-type","editor"),a.em("date-type","quarter")],value:u.value,onVisibleChange:t=>E(e,t),onChange:t=>D(e,t)},null);if("YEAR"===r.value)return o(i("bi-year-range-select"),{ref:t=>x(e,t),class:[a.em("date-type","editor"),a.em("date-type","year")],value:u.value,onVisibleChange:t=>E(e,t),onChange:t=>D(e,t)},null);if("WEEK"===r.value)return o(i("bi-week-range-select"),{ref:t=>x(e,t),class:[a.em("date-type","editor"),a.em("date-type","week")],value:u.value,onChange:t=>D(e,t),onVisibleChange:t=>E(e,t)},null);const t="DAY"===r.value?"daterange":"monthrange",n="DAY"===r.value?"YYYY-MM-DD":"YYYY-MM";return o(i("el-date-picker"),{ref:t=>x(e,t),modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,class:a.em("date-type","editor"),type:t,format:"YYYY-MM-DD","value-format":n,onVisibleChange:t=>E(e,t),onChange:t=>D(e,t)},null)},k=()=>{v.value.DYNAMIC||v.value.STATIC||(v.value.ALL=!1)};return c((()=>e.value),(t=>{if(t&&Object.keys(t).length>0){const{start:a,end:n,unit:o,type:i}=t;if(r.value=o,p.value=i,"TIME"===e.controller.emitMode){u.value="YEAR"===o?[new Date(String(a)).getFullYear(),new Date(String(n)).getFullYear()]:[Vi(a).format("YYYY-MM-DD"),Vi(n).format("YYYY-MM-DD")];const{start:t,end:s}=e.controller.computedDateTypesTime(r.value,i,a,n);y(p.value,u.value,t,s)}else u.value=l.computedDynamicTimeToDate(r.value,p.value,a,n),y(p.value,u.value,a,n)}else C()}),{immediate:!0}),d((()=>{window.addEventListener("click",k)})),m((()=>{window.removeEventListener("click",k)})),{ns:a,c:l,renderDateUnit:()=>{let e;return o("div",{class:a.e("date-unit")},[o("span",{class:a.em("date-unit","label")},[ibiz.i18n.t("editor.dateRangeSelect.dateUnit")]),o("div",{class:a.em("date-unit","editor")},[o(i("el-select"),{modelValue:r.value,"onUpdate:modelValue":e=>r.value=e,class:a.em("date-unit","editor-select"),onChange:I},(t=e=f.map((e=>o(i("el-option"),{key:e.value,value:e.value,label:e.label},{default:()=>e.label}))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}))])]);var t},renderDateRange:()=>o("div",{class:a.e("date-range")},[o("div",{class:a.em("date-range","label")},[ibiz.i18n.t("editor.dateRangeSelect.daterange")]),o(i("el-popover"),{visible:v.value.ALL||v.value.DYNAMIC||v.value.STATIC,trigger:"click",width:"240px","popper-class":a.b("date-range-select")},{reference:()=>o("div",{class:a.em("date-range","editor"),onClick:S},[o("span",{class:a.em("select","time-caption")},[o("div",{class:a.e("select-value")},[b.value])]),o("i",{class:"fa fa-angle-down","aria-hidden":"true"},null)]),default:()=>o("div",{class:a.e("date-type")},[w.map((t=>o("div",{class:a.em("date-type","item"),onClick:a=>((t,a)=>{if(a.stopPropagation(),a.preventDefault(),v.value.STATIC||v.value.DYNAMIC?(v.value[p.value]=!1,g.value=!0,h.value[t].handleClose()):(g.value=!0,p.value=t,v.value[t]=!0,h.value[t].handleOpen()),u.value&&Array.isArray(u.value)&&u.value.length>0){const{start:t,end:a}=e.controller.computedDateTypesTime(r.value,p.value,u.value[0],u.value[1]);y(p.value,u.value,t,a)}})(t.type,a)},[o("span",{class:a.em("date-type","item-caption")},[t.caption]),o("span",{class:a.em("date-type","item-icon")},[t.type===p.value&&o("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false"},[o("g",{id:"agctips/check","stroke-width":"1","fill-rule":"evenodd"},[o("path",{id:"agc路径-12",d:"M6.012 11.201L1.313 6.832l-.817.879 5.54 5.15 9.304-9.163-.842-.855z"},null)])]),o("i",{class:"fa fa-angle-right","aria-hidden":"true"},null)]),P(t.type)])))])})]),onOpen:S}},render(){return o("div",{class:this.ns.b(),onClick:this.onOpen},[this.c.switchUnit&&this.renderDateUnit(),this.renderDateRange()])}});var Pz=Object.defineProperty,kz=(e,t,a)=>(((e,t,a)=>{t in e?Pz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Tz extends To{constructor(){super(...arguments),kz(this,"switchUnit",!0),kz(this,"defaultUnit","DAY"),kz(this,"emitMode","DEFAULT"),kz(this,"initDefaultDate",(e=>{const t=new Date((new Date).toLocaleDateString());if("DAY"===e){const e=new Date(t.getTime()-6048e5),a=t.toLocaleDateString().replaceAll("/","-");return[Vi(e).format("YYYY-MM-DD"),Vi(a).format("YYYY-MM-DD")]}if("WEEK"===e){const e=t.getDay();let a=e;0===e&&(a=7);const n=t.getTime()+24*(7-a)*60*60*1e3,o=new Date(n).toLocaleDateString().replaceAll("/","-"),i=t.getTime()-36288e5;return[new Date(i).toLocaleDateString().replaceAll("/","-"),o]}if("MONTH"===e){const e=t.getFullYear(),a=t.getMonth()+1;let n=e,o=a-6;o<1&&(o+=12,n-=1);let i="".concat(o),s="".concat(a);return o<10&&(i="0".concat(i)),a<10&&(s="0".concat(a)),["".concat(n,"-").concat(i),"".concat(e,"-").concat(s)]}if("QUARTER"===e){const e=t.getFullYear();return["".concat(e,"-1"),"".concat(e,"-12")]}if("YEAR"===e)return[t.getFullYear(),t.getFullYear()]})),kz(this,"handleTimeToText",((e,t,a,n,o)=>{if(!a||Array.isArray(a)&&!a.length)return"";const i=new Date(a[0]),s=new Date(a[1]),l=i.getFullYear(),r=s.getFullYear(),c=i.getMonth()+1,d=s.getMonth()+1,u=this.getYearWeek(i),p=this.getYearWeek(s);let h=a.join("~"),m="";if("DAY"===t&&(h=a.join("~")),"WEEK"===t){const e="".concat(l,"-").concat(u).concat(ibiz.i18n.t("editor.dateRangeSelect.week")),t="".concat(r,"-").concat(p).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));h="".concat(e,"~").concat(t)}if("MONTH"===t){let e=c,t=d;c<10&&(e="0".concat(c)),d<10&&(t="0".concat(d)),h="".concat(l,"-").concat(e," ~ ").concat(r,"-").concat(t)}if("QUARTER"===t){const e=Math.ceil(c/3),t=Math.ceil(d/3);h="".concat(l,"-Q").concat(e," ~ ").concat(r,"-Q").concat(t)}return"YEAR"===t&&(h="".concat(a[0]," ~ ").concat(a[1])),m="STATIC"===e?ibiz.i18n.t("editor.dateRangeSelect.static"):"DAY"===t?this.computedTextOfDay(n,o):"WEEK"===t?this.computedTextOfWeek(n,o):"MONTH"===t?this.computedTextOfMonth(n,o):"QUARTER"===t?this.computedTextOfQuarter(n,o,l,r,c,d):"YEAR"===t?this.computedTextOfYear(n,o):this.computedTextOfDay(n,o),"".concat(m," | ").concat(h)}))}async init(){await super.onInit(),this.editorParams&&(this.editorParams.switchUnit&&(this.switchUnit="true"===this.editorParams.switchUnit),this.editorParams.switchunit&&(this.switchUnit="true"===this.editorParams.switchunit),this.editorParams.defaultUnit&&(this.defaultUnit=this.editorParams.defaultUnit),this.editorParams.defaultunit&&(this.defaultUnit=this.editorParams.defaultunit),this.editorParams.emitMode&&(this.emitMode=this.editorParams.emitMode),this.editorParams.emitmode&&(this.emitMode=this.editorParams.emitmode))}computedDynamicTimeToDate(e,t,a,n){if("STATIC"===t){const t=new Date(1e3*a),o=new Date(1e3*n);return"YEAR"===e?[t.getFullYear(),o.getFullYear()]:[Vi(t).format("YYYY-MM-DD"),Vi(o).format("YYYY-MM-DD")]}const o=new Date;if(o.setHours(0,0,0,0),"WEEK"===e){return[this.timeSpanConvertToWeek(o,a),this.timeSpanConvertToWeek(o,n)]}if("MONTH"===e){return[this.timeSpanConvertToMonth(o,a),this.timeSpanConvertToMonth(o,n)]}if("QUARTER"===e){return[this.timeSpanConvertToQuarter(o,a),this.timeSpanConvertToQuarter(o,n)]}if("YEAR"===e){return[o.getFullYear()+a,o.getFullYear()+n]}const i=24*a*60*60*1e3,s=24*n*60*60*1e3,l=new Date(o.getTime()+i),r=new Date(o.getTime()+s);return[Vi(l).format("YYYY-MM-DD"),Vi(r).format("YYYY-MM-DD")]}timeSpanConvertToQuarter(e,t){const a=t%4;let n=Math.floor(Math.abs(t)/4);t<0&&(n=-n);let o=e.getFullYear()+n;const i=e.getMonth()+1;let s=Math.ceil(i/3)+a;return s<0&&(o-=1,s+=4),s>4&&(o+=1,s-=4),"".concat(o,"-").concat(3*s)}timeSpanConvertToWeek(e,t){const a=e.getTime();return new Date(a+7*t*24*60*60*1e3).toLocaleDateString()}timeSpanConvertToMonth(e,t){const a=t%12;let n=Math.floor(Math.abs(t)/12);t<0&&(n=-n);let o=e.getFullYear()+n,i=e.getMonth()+1+a;return i<0&&(o-=1,i+=12),i>12&&(o+=1,i-=12),i<10?"".concat(o,"-0").concat(i):"".concat(o,"-").concat(i)}computedDateTypesTime(e,t,a,n){const o={start:0,end:0,emitStart:0,emitEnd:0};if("STATIC"===t){const{start:t,end:i}=this.computedStaticTime(e,a,n);Object.assign(o,{start:t,end:i,emitStart:t,emitEnd:i})}else{const{start:t,end:i}=this.computedDynamicTime(e,a,n);Object.assign(o,{start:t,end:i,emitStart:t,emitEnd:i})}if("TIME"===this.emitMode){const t=this.computedFullDateFormat(a,e,"START"),i=this.computedFullDateFormat(n,e,"END");Object.assign(o,{emitStart:t,emitEnd:i})}return o}computedFullDateFormat(e,t,a){const n=new Date(String(e)),o=n.getMonth()+1,i=[1,3,5,7,8,10,12];return"START"===a?n.setHours(0,0,0,0):n.setHours(23,59,59,0),"MONTH"===t&&("START"===a?n.setDate(1):2===o?n.setDate(29):i.includes(o)?n.setDate(31):n.setDate(30)),"QUARTER"===t&&("START"===a?n.setDate(1):2===o?n.setDate(29):i.includes(o)?n.setDate(31):n.setDate(30)),"YEAR"===t&&("START"===a?(n.setMonth(0),n.setDate(1)):(n.setMonth(11),n.setDate(31))),n.toLocaleString()}computedDynamicTime(e,t,a){switch(e){case"DAY":default:return this.computedDaysSpace(t,a);case"WEEK":return this.computedWeeksSpace(t,a);case"MONTH":return this.computedMonthsSpace(t,a);case"QUARTER":return this.computedQuartersSpace(t,a);case"YEAR":return this.computedYearsSpace(t,a)}}computedDaysSpace(e,t){const a=new Date,n=new Date(e),o=new Date(t);a.setHours(0,0,0,0),n.setHours(0,0,0,0),o.setHours(0,0,0,0);return{start:(n.getTime()-a.getTime())/864e5,end:(o.getTime()-a.getTime())/864e5}}computedWeeksSpace(e,t){const a=new Date,n=new Date(e),o=new Date(t);a.setHours(0,0,0,0),n.setHours(0,0,0,0),o.setHours(0,0,0,0);const i=(e,t)=>{const a=this.getDateWeekMonday(e);return(this.getDateWeekMonday(t).getTime()-a.getTime())/6048e5};return{start:i(a,n),end:i(a,o)}}getDateWeekMonday(e){const t=e.getDay();let a=t;0===t&&(a=7);const n=e.getTime()-24*(a-1)*60*60*1e3;return new Date(n)}getYearWeek(e){const t=new Date(e.getFullYear(),0,1);let a=e.getDay();0===a&&(a=7);let n=t.getDay();0===n&&(n=7);const o=e.getTime()-t.getTime(),i=Math.floor((o+864e5*(n-a))/864e5);return Math.ceil(i/7)+1}computedMonthsSpace(e,t){const a=new Date,n=new Date(e),o=new Date(t),i=(e,t)=>{const a=e.getFullYear(),n=e.getMonth()+1;return 12*(t.getFullYear()-a)-n+(t.getMonth()+1)};return{start:i(a,n),end:i(a,o)}}computedQuartersSpace(e,t){const a=new Date,n=new Date(e),o=new Date(t),i=(e,t)=>{const a=e.getFullYear(),n=e.getMonth()+1,o=Math.ceil(n/3),i=t.getFullYear(),s=t.getMonth()+1;return 4*(i-a)-o+Math.ceil(s/3)};return{start:i(a,n),end:i(a,o)}}computedYearsSpace(e,t){const a=(new Date).getFullYear();return{start:new Date("".concat(e)).getFullYear()-a,end:new Date("".concat(t)).getFullYear()-a}}computedStaticTime(e,t,a){switch(e){case"DAY":default:return this.computedDaysTime(t,a);case"WEEK":return this.computedWeeksTime(t,a);case"MONTH":return this.computedMonthsTime(t,a);case"QUARTER":return this.computedQuartersTime(t,a);case"YEAR":return this.computedYearsTime(t,a)}}computedDaysTime(e,t){const a=new Date(e),n=new Date(t);a.setHours(0,0,0,0),n.setHours(23,59,59,0);return{start:a.getTime()/1e3,end:n.getTime()/1e3}}computedWeeksTime(e,t){const a=new Date(e),n=new Date(t);a.setHours(0,0,0,0),n.setHours(23,59,59,0);return{start:a.getTime()/1e3,end:n.getTime()/1e3}}computedMonthsTime(e,t){const a=new Date(e),n=new Date(t);a.setHours(0,0,0,0),[1,3,5,7,8,10,12].includes(n.getMonth()+1)?n.setDate(31):1===n.getMonth()?n.setDate(29):n.setDate(30),n.setHours(23,59,59,0);return{start:a.getTime()/1e3,end:n.getTime()/1e3}}computedQuartersTime(e,t){const a=new Date(e),n=new Date(t);a.setHours(0,0,0,0),n.setHours(23,59,59,0);return{start:a.getTime()/1e3,end:n.getTime()/1e3}}computedYearsTime(e,t){const a=new Date(e),n=new Date(t);a.setHours(0,0,0,0),n.setMonth(11),n.setDate(31),n.setHours(23,59,59,0);return{start:a.getTime()/1e3,end:n.getTime()/1e3}}computedTextOfDay(e,t){let a="";if(e===t&&0===e)a=ibiz.i18n.t("editor.dateRangeSelect.today");else if(0===t&&e<0)a="".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.day"));else{const n="".concat(e>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.day")),o="".concat(t>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(t)).concat(ibiz.i18n.t("editor.dateRangeSelect.day"));a="".concat(n," ~ ").concat(o)}return a}computedTextOfWeek(e,t){let a="";if(e===t&&0===e)a=ibiz.i18n.t("editor.dateRangeSelect.currentWeek");else if(0===t&&e<0)a="".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));else{const n="".concat(e>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.week")),o="".concat(t>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(t)).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));a="".concat(n," ~ ").concat(o)}return a}computedTextOfMonth(e,t){let a="";if(e===t&&0===e)a=ibiz.i18n.t("editor.dateRangeSelect.pastTime");else if(0===t&&e<0)a="".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.month"));else{const n="".concat(e>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.month")),o="".concat(t>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(t)).concat(ibiz.i18n.t("editor.dateRangeSelect.month"));a="".concat(n," ~ ").concat(o)}return a}computedTextOfQuarter(e,t,a,n,o,i){let s="";const l=(new Date).getFullYear(),r=Math.ceil(o/3),c=Math.ceil(i/3);if(a===n&&1===r&&4===c)s=ibiz.i18n.t("editor.dateRangeSelect.currentYear");else if(e===t&&0===e)s=ibiz.i18n.t("editor.dateRangeSelect.currentYear");else if(0===t&&e<0&&l===a)s="".concat(ibiz.i18n.t("editor.dateRangeSelect.currentYear")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter"));else{const a="".concat(e>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter")),n="".concat(t>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(t)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter"));s="".concat(a," ~ ").concat(n)}return s}computedTextOfYear(e,t){let a="";if(e===t&&0===e)a=ibiz.i18n.t("editor.dateRangeSelect.currentYear");else if(0===t&&e<0)a="".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.year"));else{const n="".concat(e>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(e)).concat(ibiz.i18n.t("editor.dateRangeSelect.year")),o="".concat(t>0?ibiz.i18n.t("editor.dateRangeSelect.future"):ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(t)).concat(ibiz.i18n.t("editor.dateRangeSelect.year"));a="".concat(n," ~ ").concat(o)}return a}}var zz=Object.defineProperty,Az=(e,t,a)=>(((e,t,a)=>{t in e?zz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Oz{constructor(){Az(this,"formEditor","IBizDateRangeSelect"),Az(this,"gridEditor","IBizDateRangeSelect")}async createController(e,t){const a=new Tz(e,t);return await a.init(),a}}var Mz={exports:{}};!function(e,t){e.exports=function(){function e(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function s(e){try{r(n.next(e))}catch(e){i(e)}}function l(e){try{r(n.throw(e))}catch(e){i(e)}}function r(e){e.done?a(e.value):o(e.value).then(s,l)}r((n=n.apply(e,t||[])).next())}))}function t(e,t){function a(e){return function(t){return n([e,t])}}function n(a){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((s=0<(s=r.trys).length&&s[s.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3]))r.label=a[1];else if(6===a[0]&&r.label<s[1])r.label=s[1],s=a;else{if(!(s&&r.label<s[2])){s[2]&&r.ops.pop(),r.trys.pop();continue}r.label=s[2],r.ops.push(a)}}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{o=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}var o,i,s,l,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l}function a(e){var t=[];return e.AMapUI&&t.push(n(e.AMapUI)),e.Loca&&t.push(o(e.Loca)),Promise.all(t)}function n(e){return new Promise((function(t,a){var n=[];if(e.plugins)for(var o=0;o<e.plugins.length;o+=1)-1==l.AMapUI.plugins.indexOf(e.plugins[o])&&n.push(e.plugins[o]);if(r.AMapUI===i.failed)a("前次请求 AMapUI 失败");else if(r.AMapUI===i.notload){r.AMapUI=i.loading,l.AMapUI.version=e.version||l.AMapUI.version,o=l.AMapUI.version;var s=document.body||document.head,d=document.createElement("script");d.type="text/javascript",d.src="https://webapi.amap.com/ui/"+o+"/main.js",d.onerror=function(e){r.AMapUI=i.failed,a("请求 AMapUI 失败")},d.onload=function(){if(r.AMapUI=i.loaded,n.length)window.AMapUI.loadUI(n,(function(){for(var e=0,a=n.length;e<a;e++){var o=n[e].split("/").slice(-1)[0];window.AMapUI[o]=arguments[e]}for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()}));else for(t();c.AMapUI.length;)c.AMapUI.splice(0,1)[0]()},s.appendChild(d)}else r.AMapUI===i.loaded?e.version&&e.version!==l.AMapUI.version?a("不允许多个版本 AMapUI 混用"):n.length?window.AMapUI.loadUI(n,(function(){for(var e=0,a=n.length;e<a;e++){var o=n[e].split("/").slice(-1)[0];window.AMapUI[o]=arguments[e]}t()})):t():e.version&&e.version!==l.AMapUI.version?a("不允许多个版本 AMapUI 混用"):c.AMapUI.push((function(e){e?a(e):n.length?window.AMapUI.loadUI(n,(function(){for(var e=0,a=n.length;e<a;e++){var o=n[e].split("/").slice(-1)[0];window.AMapUI[o]=arguments[e]}t()})):t()}))}))}function o(e){return new Promise((function(t,a){if(r.Loca===i.failed)a("前次请求 Loca 失败");else if(r.Loca===i.notload){r.Loca=i.loading,l.Loca.version=e.version||l.Loca.version;var n=l.Loca.version,o=l.AMap.version.startsWith("2"),s=n.startsWith("2");if(o&&!s||!o&&s)a("JSAPI 与 Loca 版本不对应!!");else{o=l.key,s=document.body||document.head;var d=document.createElement("script");d.type="text/javascript",d.src="https://webapi.amap.com/loca?v="+n+"&key="+o,d.onerror=function(e){r.Loca=i.failed,a("请求 AMapUI 失败")},d.onload=function(){for(r.Loca=i.loaded,t();c.Loca.length;)c.Loca.splice(0,1)[0]()},s.appendChild(d)}}else r.Loca===i.loaded?e.version&&e.version!==l.Loca.version?a("不允许多个版本 Loca 混用"):t():e.version&&e.version!==l.Loca.version?a("不允许多个版本 Loca 混用"):c.Loca.push((function(e){e?a(e):a()}))}))}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var i,s;(s=i||(i={})).notload="notload",s.loading="loading",s.loaded="loaded",s.failed="failed";var l={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},r={AMap:i.notload,AMapUI:i.notload,Loca:i.notload},c={AMap:[],AMapUI:[],Loca:[]},d=[],u=function(e){"function"==typeof e&&(r.AMap===i.loaded?e(window.AMap):d.push(e))};return{load:function(n){var o=this;return new Promise((function(s,c){if(r.AMap==i.failed)c("");else if(r.AMap==i.notload){var p=n.key,h=n.version,m=n.plugins;if(p){window.AMap&&"lbs.amap.com"!==location.host&&c("禁止多种API加载方式混用"),l.key=p,l.AMap.version=h||l.AMap.version,l.AMap.plugins=m||l.AMap.plugins,r.AMap=i.loading;var v=document.body||document.head;window.___onAPILoaded=function(e){if(delete window.___onAPILoaded,e)r.AMap=i.failed,c(e);else for(r.AMap=i.loaded,a(n).then((function(){s(window.AMap)})).catch(c);d.length;)d.splice(0,1)[0]()};var b=document.createElement("script");b.type="text/javascript",p="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+l.AMap.version+"&key="+p+"&plugin="+l.AMap.plugins.join(","),fetch(p).then((function(a){return e(o,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,a.text()];case 1:return e=t.sent(),b.textContent=e.replace("define.amd","undefined"),v.appendChild(b),[2]}}))}))})).catch((function(e){r.AMap=i.failed,c(e)}))}else c("请填写key")}else if(r.AMap==i.loaded)if(n.key&&n.key!==l.key)c("多个不一致的 key");else if(n.version&&n.version!==l.AMap.version)c("不允许多个版本 JSAPI 混用");else{if(p=[],n.plugins)for(h=0;h<n.plugins.length;h+=1)-1==l.AMap.plugins.indexOf(n.plugins[h])&&p.push(n.plugins[h]);p.length?window.AMap.plugin(p,(function(){a(n).then((function(){s(window.AMap)})).catch(c)})):a(n).then((function(){s(window.AMap)})).catch(c)}else if(n.key&&n.key!==l.key)c("多个不一致的 key");else if(n.version&&n.version!==l.AMap.version)c("不允许多个版本 JSAPI 混用");else{var g=[];if(n.plugins)for(h=0;h<n.plugins.length;h+=1)-1==l.AMap.plugins.indexOf(n.plugins[h])&&g.push(n.plugins[h]);u((function(){g.length?window.AMap.plugin(g,(function(){a(n).then((function(){s(window.AMap)})).catch(c)})):a(n).then((function(){s(window.AMap)})).catch(c)}))}}))},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,l={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},r={AMap:i.notload,AMapUI:i.notload,Loca:i.notload},c={AMap:[],AMapUI:[],Loca:[]}}}}()}(Mz);var Nz=Sz(Mz.exports);const Bz=a({name:"IBizMapPicker",props:vt(),emits:Ve(),setup(e,{emit:t}){var a;const o=B("map-picker"),i=e.controller,s=null==(a=i.model.editorItems)?void 0:a[0],r=n(),c=n(),d=n(),u=n(),h=n(!1),m=n(!1),v=n(""),g=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));let f,w,y;const C={address:"",longitude:null,latitude:null},I=()=>{w&&(w.setMap(null),w=void 0)},D=(e,t)=>{const a=window.AMap;a&&(I(),w=new a.Marker({position:[e,t]}))},E=(e,t)=>{const a=window.AMap;if(!a)return;if(!w)return;const n=new a.Geocoder({}),i=w;n.getAddress([e,t],((a,n)=>{if(w&&w===i&&"complete"===a&&"OK"===n.info&&n.regeocode){const a=n.regeocode.formattedAddress,i=document.createElement("div"),s=document.createElement("img");s.style.width="25px",s.src="//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",i.appendChild(s);const l=document.createElement("span");l.className=o.b("dialog-map-marker-text"),l.textContent=a,i.appendChild(l),w.setContent(i),w.setMap(f),C.address=a,C.longitude=e,C.latitude=t,v.value=a}}))};return p((()=>{null==f||f.destroy()})),{ns:o,c:i,inputRef:r,searchInputRef:c,mapContainerRef:d,searchResultContainerRef:u,dialogVisible:h,isLoading:m,searchValue:v,showFormDefaultContent:g,handleShow:()=>{var t;h.value=!0,null==(t=r.value)||t.blur(),b((async()=>{var t;if(window.AMap||await(async()=>{try{m.value=!0,window._AMapSecurityConfig={securityJsCode:ibiz.env.aMapSecurityJsCode},await Nz.load({key:ibiz.env.aMapKey,version:"2.0",plugins:["AMap.PlaceSearch","AMap.Geocoder"],AMapUI:{version:"1.1",plugins:["misc/PoiPicker"]}})}finally{m.value=!1}})(),f&&(null==(t=d.value)?void 0:t.children.length)||(null==f||f.destroy(),(()=>{const e=window.AMap;if(!e)return;if(!d.value)return;f=new e.Map(d.value,{viewMode:"3D",zoom:11}),null==f||f.on("click",(e=>{const t=e.lnglat,a=t.lng,n=t.lat;null!=a&&null!=n&&(D(a,n),E(a,n))}));const t=window.AMapUI;t&&c.value&&u.value&&t.loadUI(["misc/PoiPicker"],(function(e){c.value&&u.value&&e&&(y=new e({input:c.value,placeSearchOptions:{map:f},searchResultsContainer:u.value}),null==y||y.on("poiPicked",(function(e){var t,a;I();const n=e.item;n&&(C.address=n.name,C.longitude=null==(t=n.location)?void 0:t.lng,C.latitude=null==(a=n.location)?void 0:a.lat,v.value=n.name,"search"!==e.source&&(null==y||y.searchByKeyword(n.name)))})))}))})()),v.value=e.value||"",s&&s.id){const[t,a]=s.id.split(",");if(e.data){const n=e.data[t],o=e.data[a];n&&o&&(null==f||f.setCenter([n,o],!0),D(n,o),E(n,o))}}}))},handleConfirm:()=>{if(h.value=!1,s&&s.id){const[e,a]=s.id.split(",");e&&t("change",null!=C.longitude?C.longitude:null,e),a&&t("change",null!=C.latitude?C.latitude:null,a)}t("change",C.address||"")},handleClose:()=>{y&&(y.clearSuggest(),y.clearSearchResults()),v.value="",C.address="",C.longitude=null,C.latitude=null,I()},handleClear:()=>{if(s&&s.id){const[e,a]=s.id.split(",");e&&t("change",null,e),a&&t("change",null,a)}t("change","")},handleSearchClear:()=>{v.value="",C.address="",C.longitude=null,C.latitude=null,I()}}},render(){const e=o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"},null),o("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"},null)]);let t;t=this.readonly?this.value:[o(i("el-input"),{class:this.ns.b("input"),ref:"inputRef","model-value":this.value,placeholder:this.c.placeHolder,disabled:this.disabled,onFocus:this.handleShow},{suffix:()=>{if(this.value&&!this.disabled)return o("i",{class:"el-icon el-input__icon el-input__clear",onClick:e=>{e.stopPropagation(),this.handleClear()}},[e])}}),o(i("el-dialog"),{class:this.ns.b("dialog"),modelValue:this.dialogVisible,"onUpdate:modelValue":e=>this.dialogVisible=e,title:ibiz.i18n.t("editor.mapPicker.title"),"append-to-body":!0,"align-center":!0,width:"80%",onClose:this.handleClose},{default:()=>o("div",{class:this.ns.b("dialog-content")},[o("div",{class:"el-input el-input--suffix ".concat(this.ns.b("dialog-search-input")," ").concat(this.isLoading?"is-disabled":"")},[o("div",{class:"el-input__wrapper",tabindex:"-1"},[g(o("input",{ref:"searchInputRef",class:"el-input__inner",type:"text",autocomplete:"off",tabindex:"0",placeholder:ibiz.i18n.t("editor.mapPicker.searchPlaceholder"),disabled:this.isLoading,"onUpdate:modelValue":e=>this.searchValue=e},null),[[I,this.searchValue]]),this.searchValue?o("span",{class:"el-input__suffix"},[o("span",{class:"el-input__suffix-inner"},[o("i",{class:"el-icon el-input__icon el-input__clear",onClick:e=>{e.stopPropagation(),this.handleSearchClear()}},[e])])]):null])]),g(o("div",{class:this.ns.b("dialog-map-content")},[o("div",{class:this.ns.b("dialog-map-container"),ref:"mapContainerRef"},null),o("div",{class:this.ns.b("dialog-search-result-container"),ref:"searchResultContainerRef"},null)]),[[y("loading"),this.isLoading]])]),footer:()=>{let e;return o("div",{class:this.ns.b("dialog-footer")},[o(i("el-button"),{type:"primary",disabled:this.isLoading,onClick:this.handleConfirm},(t=e=ibiz.i18n.t("editor.common.confirm"),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?e:{default:()=>[e]}))]);var t}})];const a=o("div",{class:this.ns.b("form-default-content")},[this.value?this.value:o(i("iBizEditorEmptyText"),{showPlaceholder:this.c.emptyShowPlaceholder,placeHolder:this.c.placeHolder},null)]);return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)]},[this.showFormDefaultContent&&a,t])}});class _z extends To{}var Rz=Object.defineProperty,Lz=(e,t,a)=>(((e,t,a)=>{t in e?Rz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jz{constructor(){Lz(this,"formEditor","IBizMapPicker"),Lz(this,"gridEditor","IBizMapPicker")}async createController(e,t){const a=new _z(e,t);return await a.init(),a}}const Vz=e("aV",{install:e=>{e.component(Dk.name,Dk),e.component(Tx.name,Tx),e.component(zx.name,zx),e.component(Ax.name,Ax),e.component(Lx.name,Lx),e.component(jx.name,jx),e.component(Vx.name,Vx),e.component(Fx.name,Fx),e.component(Yx.name,Yx),e.component(Xx.name,Xx),e.component(Qx.name,Qx),e.component(iP.name,iP),e.component(dP.name,dP),e.component(gP.name,gP),e.component(EP.name,EP),e.component(TP.name,TP),e.component(NP.name,NP),e.component(jP.name,jP),e.component(qP.name,qP),e.component(GP.name,GP),e.component($P.name,$P),e.component(ak.name,ak),e.component(pk.name,pk),e.component(yk.name,yk),e.component(Ik.name,Ik),e.component(Ck.name,Ck),e.component(zk.name,zk),e.component(Ak.name,Ak),e.component(Ok.name,Ok),e.component(Mk.name,Mk),e.component(Nk.name,Nk),e.component(Bk.name,Bk),e.component(Xk.name,Xk),e.component(aT.name,aT),e.component(lT.name,lT),e.component(mT.name,mT),e.component(GT.name,GT),e.component($T.name,$T),e.component(nz.name,nz),e.component(dz.name,dz),e.component(Iz.name,Iz),e.component(uz.name,uz),e.component(Bz.name,Bz),e.component("IBizHtml",S((()=>t.import("./wang-editor-g7C0GfoE.js")))),e.component("IBizMarkDown",S((()=>t.import("./ibiz-markdown-editor-Bd4vTqbM.js")))),e.component(xz.name,xz),e.component($x.name,$x),Ro("SPAN",(()=>new Rx)),Ro("SPAN_ADDRESSPICKUP",(()=>new Rx)),Ro("SPAN_LINK",(()=>new Rx("SPAN_LINK")));const a=new Kx;Ro("TEXTBOX",(()=>a)),Ro("TEXTAREA",(()=>a)),Ro("TEXTAREA_10",(()=>a)),Ro("PASSWORD",(()=>a)),Ro("NUMBER",(()=>new Kx("NUMBER"))),Ro("IPADDRESSTEXTBOX",(()=>new Kx("IPADDRESSTEXTBOX"))),Ro("MOBTEXT",(()=>a)),Ro("MOBNUMBER",(()=>new Kx("NUMBER"))),Ro("MOBTEXTAREA",(()=>a)),Ro("MOBPASSWORD",(()=>a)),Ro("TEXTBOX_SIGNATURE",(()=>new Kx("SIGNATURE"))),Ro("DROPDOWNLIST",(()=>new oP)),Ro("MOBDROPDOWNLIST",(()=>new oP)),Ro("MOBCHECKLIST",(()=>new oP)),Ro("DROPDOWNLIST_100",(()=>new oP)),Ro("MDROPDOWNLIST",(()=>new oP)),Ro("DROPDOWNLIST_EMOJI_PICKER",(()=>new oP("EMOJI_PICKER"))),Ro("MDROPDOWNLIST_TREE_PICKER",(()=>new oP("TREE_PICKER"))),Ro("DROPDOWNLIST_VIRTUALIZED_LIST",(()=>new oP("VIRTUALIZED_LIST"))),Ro("MDROPDOWNLIST_VIRTUALIZED_LIST",(()=>new oP("VIRTUALIZED_LIST"))),Ro("CHECKBOX",(()=>new cP)),Ro("CHECKBOXLIST",(()=>new bP)),Ro("RADIOBUTTONLIST",(()=>new DP)),Ro("MOBRADIOLIST",(()=>new DP));const n=new kP;Ro("DATEPICKER",(()=>n)),Ro("DATEPICKEREX",(()=>n)),Ro("DATEPICKEREX_NOTIME",(()=>n)),Ro("DATEPICKEREX_HOUR",(()=>n)),Ro("DATEPICKEREX_MINUTE",(()=>n)),Ro("DATEPICKEREX_SECOND",(()=>n)),Ro("DATEPICKEREX_NODAY",(()=>n)),Ro("DATEPICKEREX_NODAY_NOSECOND",(()=>n)),Ro("MOBDATE",(()=>n)),Ro("MOBDATE_HOUR",(()=>n)),Ro("MOBDATE_MINUTE",(()=>n)),Ro("MOBDATE_NODAY",(()=>n)),Ro("MOBDATE_NODAY_NOSECOND",(()=>n)),Ro("MOBDATE_NOTIME",(()=>n)),Ro("MOBDATE_SECOND",(()=>n)),Ro("DATERANGE_SWITCHUNIT",(()=>new Oz)),Ro("FILEUPLOADER",(()=>new Tk("FILEUPLOADER"))),Ro("FILEUPLOADER_ONE",(()=>new Tk("FILEUPLOADER_ONE"))),Ro("MOBSINGLEFILEUPLOAD",(()=>new Tk("MOBSINGLEFILEUPLOAD"))),Ro("MOBMULTIFILEUPLOAD",(()=>new Tk("MOBMULTIFILEUPLOAD"))),Ro("PICTURE",(()=>new Tk("PICTURE"))),Ro("PICTURE_ONE",(()=>new Tk("PICTURE_ONE"))),Ro("PICTURE_ONE_RAW",(()=>new Tk("PICTURE_ONE_RAW"))),Ro("MOBPICTURE",(()=>new Tk("MOBPICTURE"))),Ro("MOBPICTURE_RAW",(()=>new Tk("MOBPICTURE_RAW"))),Ro("MOBPICTURELIST",(()=>new Tk("MOBPICTURELIST"))),Ro("PICTURE_CROPPING",(()=>new Tk("PICTURE_CROPPING"))),Ro("RAW",(()=>new MP)),Ro("STEPPER",(()=>new LP)),Ro("MOBSTEPPER",(()=>new LP)),Ro("RATING",(()=>new HP)),Ro("MOBRATING",(()=>new HP)),Ro("SLIDER",(()=>new ek)),Ro("MOBSLIDER",(()=>new ek)),Ro("SWITCH",(()=>new XP)),Ro("SWITCH_TRISTATE",(()=>new XP("TRISTATE"))),Ro("MOBSWITCH",(()=>new XP)),Ro("LISTBOX",(()=>new uk)),Ro("LISTBOXPICKUP",(()=>new uk));const o=new fk;Ro("AC",(()=>o)),Ro("AC_FS",(()=>o)),Ro("AC_NOBUTTON",(()=>o)),Ro("AC_FS_NOBUTTON",(()=>o)),Ro("PICKER",(()=>new tT("PICKER"))),Ro("PICKER_TRANSFER_PICKER",(()=>new tT("TRANSFER_PICKER"))),Ro("PICKEREX_NOAC",(()=>new tT("PICKEREX_NOAC"))),Ro("PICKEREX_NOAC_LINK",(()=>new tT("PICKEREX_NOAC_LINK"))),Ro("PICKEREX_TRIGGER_LINK",(()=>new tT("PICKEREX_TRIGGER_LINK"))),Ro("PICKEREX_TRIGGER",(()=>new tT("PICKEREX_TRIGGER"))),Ro("PICKEREX_LINK",(()=>new tT("PICKEREX_LINK"))),Ro("ADDRESSPICKUP",(()=>new tT("ADDRESSPICKUP"))),Ro("ADDRESSPICKUP_AC",(()=>new tT("ADDRESSPICKUP_AC"))),Ro("PICKEREX_LINKONLY",(()=>new tT("PICKEREX_LINKONLY"))),Ro("PICKEREX_NOBUTTON",(()=>new tT("PICKEREX_NOBUTTON"))),Ro("PICKEREX_DROPDOWNVIEW",(()=>new tT("PICKEREX_DROPDOWNVIEW"))),Ro("PICKEREX_DROPDOWNVIEW_LINK",(()=>new tT("PICKEREX_DROPDOWNVIEW_LINK"))),Ro("PICKUPVIEW",(()=>new tT("PICKUPVIEW"))),Ro("MOBPICKER",(()=>new tT("MOBPICKER"))),Ro("MOBPICKER_DROPDOWNVIEW",(()=>new tT("MOBPICKER_DROPDOWNVIEW"))),Ro("MOBMPICKER",(()=>new tT("MOBMPICKER"))),Ro("NUMBERRANGE",(()=>new sT)),Ro("MOBNUMBERRANGE",(()=>new sT)),Ro("DATERANGE",(()=>new hT)),Ro("DATERANGE_NOTIME",(()=>new hT)),Ro("MOBDATERANGE",(()=>new hT)),Ro("MOBDATERANGE_NOTIME",(()=>new hT)),Ro("CODE",(()=>new yT)),Ro("MOBCODE",(()=>new yT)),Ro("HTMLEDITOR",(()=>new LT)),Ro("MOBHTMLTEXT",(()=>new LT)),Ro("MARKDOWN",(()=>new qT)),Ro("MOBMARKDOWN",(()=>new qT)),Ro("ARRAY",(()=>new XT)),Ro("MOBARRAY",(()=>new XT)),Ro("CASCADER",(()=>new ez)),Ro("MOBCASCADER",(()=>new ez)),Ro("COLORPICKER",(()=>new cz)),Ro("MOBCOLORPICKER",(()=>new cz)),Ro("PICKER_searchCondEdit",(()=>new Cz)),Ro("MAPPICKER",(()=>new jz)),Ro("FIELD_IMAGE_PICTURE_ONE",(()=>new Tk("PICTURE_ONE"))),Ro("FIELD_IMAGE_PICTURE",(()=>new Tk("PICTURE"))),Ro("FIELD_TEXT_DYNAMIC_SPAN",(()=>new Rx)),Ro("VIEW_PAGECAPTION_SPAN",(()=>new Rx)),Ro("STATIC_LABEL_RAW",(()=>new MP)),Ro("FIELD_TEXTBOX_TEXTBOX",(()=>a)),Ro("FIELD_TEXTAREA_TEXTAREA",(()=>a)),Ro("FIELD_RADIOBUTTONLIST_RADIOBUTTONLIST",(()=>new DP)),Ro("FIELD_CHECKBOXLIST_CHECKBOXLIST",(()=>new bP)),Ro("FIELD_DROPDOWNLIST_DROPDOWNLIST",(()=>new oP)),Ro("FIELD_RATING_RATING",(()=>new HP)),Ro("FIELD_SWITCH_SWITCH",(()=>new XP)),Ro("FIELD_SLIDER_SLIDER",(()=>new ek)),Ro("FIELD_DATEPICKER_DATEPICKER",(()=>new kP)),Ro("FIELD_DATERANGE_DATERANGE",(()=>new hT)),Ro("FIELD_PICKER_PICKER",(()=>new tT("PICKER"))),Ro("FIELD_ARRAY_ARRAY",(()=>new XT)),Ro("AUTH_USERID_TEXTBOX",(()=>a)),Ro("AUTH_PASSWORD_PASSWORD",(()=>a)),Ro("FIELD_CAROUSEL_PICTURE",(()=>new vz))}}),Fz=e("aW",a({name:"IBizView404",setup(){const e=B("404-view"),t=Xi(),a=Yi();d((()=>ibiz.util.hiddenAppLoading()));return{ns:e,isTop:l((()=>a&&!a.params.view1)),gotoIndexView:async()=>{await t.push("/"),window.location.reload()}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("top",this.isTop)]},[o("img",{class:this.ns.b("img"),src:"".concat(ibiz.env.assetsUrl,"/images/404.png")},null),o("div",{class:this.ns.b("text")},[o("div",{class:this.ns.be("text","text1")},[ibiz.i18n.t("view.noResourcesView.noResourcePrompt")]),this.isTop?o("div",{class:this.ns.be("text","text2")},[ibiz.i18n.t("view.noResourcesView.resourceNoExist"),o("a",{onClick:this.gotoIndexView},[ibiz.i18n.t("view.common.backHomepage")]),ibiz.i18n.t("view.common.continueBrowsing")]):null])])}})),Uz=e("aX",a({name:"IBizView403",setup(){const e=B("403-view"),t=Xi(),a=Yi();d((()=>ibiz.util.hiddenAppLoading()));return{ns:e,isTop:l((()=>a&&!a.params.view1)),gotoIndexView:async()=>{await t.push("/"),window.location.reload()}}},render(){return o("div",{class:[this.ns.b(),this.ns.is("top",this.isTop)]},[o("img",{class:this.ns.b("img"),src:"".concat(ibiz.env.assetsUrl,"/images/403.png")},null),o("div",{class:this.ns.b("text")},[o("div",{class:this.ns.be("text","text1")},[ibiz.i18n.t("view.noPermissionView.noPermissionPrompt")]),this.isTop?o("div",{class:this.ns.be("text","text2")},[ibiz.i18n.t("view.noPermissionView.noPermission"),o("a",{onClick:this.gotoIndexView},[ibiz.i18n.t("view.common.backHomepage")]),ibiz.i18n.t("view.common.continueBrowsing")]):null])])}}));const Hz=e("aY",a({setup(){const e=B("login-view"),t={username:[{required:!0,message:ibiz.i18n.t("app.pleaseEnterAccount"),trigger:"blur"}],password:[{required:!0,message:ibiz.i18n.t("app.pleaseEnterPassword"),trigger:"blur"},{type:"string",min:6,message:ibiz.i18n.t("view.loginView.passwordLength"),trigger:"blur"}]},a=u({username:"",password:""}),c=n(null),h=Yi().query.ru||"/",m=n(!1),v=n(null),b=i("IBizViewShell"),g=Nt.create({}),f={},w=n(!1),y=n(!1),C=n(!1),I=n(!0);let D=ibiz.env.AppTitle;const E=l((()=>window.location.href.indexOf("srfthird_auth_success=false")>=0));(async()=>{const e=(await ibiz.hub.getAppAsync(ibiz.env.appId)).model;e.caption&&!D&&(D=e.caption)})();const S=window.navigator.userAgent.toUpperCase();E.value||ibiz.env.loginMode===aa.OAUTH||(-1!==S.indexOf("DINGTALK")?ibiz.thirdAuth.auth("DINGTALK","EMBED"):-1!==S.indexOf("WXWORK")&&ibiz.thirdAuth.auth("WXWORK","EMBED")),ibiz.appData=void 0,ibiz.orgData=void 0;const x=async()=>{c.value.validate((async e=>{if(e){w.value=!0;if(!0===await ibiz.auth.login(a.username,a.password,C.value))if(window.location.hash=h,window.history.pushState({},""),E.value){const e=window.location.href.replace("?srfthird_auth_success=false","");window.location.href=e}else window.location.reload();w.value=!1}}))},{cleanup:P}=rl(document,["a",'input:not([type="checkbox"])',"button","textarea","select",'[tabindex]:not([tabindex="-1"])']);return d((async()=>{const e=Fi.parse(window.location.search.replace("?",""));if(E.value&&ibiz.message.error(ibiz.i18n.t("view.loginView.thirdAuthFail")),-1===S.indexOf("DINGTALK")&&-1===S.indexOf("WXWORK")||E.value){if("true"===e.isAnonymous){!0===await ibiz.auth.anonymousLogin()&&(window.location.hash=h,window.location.reload())}else{try{const e=await ibiz.hub.config.view.get("AppLoginView");e&&(v.value=e,m.value=!0)}catch(e){ibiz.log.warn(e)}I.value=!1}ibiz.util.hiddenAppLoading(),y.value=!0}})),p((()=>{P()})),()=>{if(y.value&&!1===I.value){let n;return m.value?r(b,{context:g,params:f,viewId:v.value.id}):o("div",{class:e.b()},[o("div",{class:e.b("box")},[o("header",{class:e.b("box-header")},[o("img",{src:"./assets/images/login-header.png"},null),o("span",{class:e.b("box-header-title")},[D])]),o("main",{class:e.b("box-main")},[o("img",{class:e.be("box-main","avatar"),src:"./assets/images/login-avatar.png"},null),o("div",{class:e.b("box-main-content")},[o(i("el-form"),{model:a,rules:t,ref:c},{default:()=>[o(i("el-form-item"),{size:"large",prop:"username"},{default:()=>[o(i("el-input"),{modelValue:a.username,"onUpdate:modelValue":e=>a.username=e,clearable:!0,placeholder:ibiz.i18n.t("app.pleaseEnterAccount")},{prefix:()=>o("ion-icon",{name:"person"},null)})]}),o(i("el-form-item"),{size:"large",prop:"password"},{default:()=>[o(i("el-input"),{type:"password",modelValue:a.password,"onUpdate:modelValue":e=>a.password=e,"show-password":!0,placeholder:ibiz.i18n.t("app.pleaseEnterPassword")},{prefix:()=>o("ion-icon",{name:"unlock-alt"},null)})]}),o(i("el-checkbox"),{modelValue:C.value,"onUpdate:modelValue":e=>C.value=e,label:ibiz.i18n.t("app.rememberMe")},null),o(i("el-form-item"),{size:"large"},{default:()=>{return[o(i("el-button"),{type:"primary",onClick:x,size:"large",round:!0,loading:w.value,onKeyup:e=>(e=>{"Enter"===e.key&&x()})(e)},(e=n=ibiz.i18n.t("view.loginView.login"),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)?n:{default:()=>[n]}))];var e}})]})])])])])}return null}}}));var qz=Object.defineProperty,Gz=(e,t,a)=>(((e,t,a)=>{t in e?qz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Wz{constructor(){Gz(this,"component","IBizWFStepTraceView")}}const Kz=a({name:"IBizWFStepTraceView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){const e=B("view"),t=bt(((...e)=>new Lo(...e))),{viewType:a,sysCss:n,codeName:o}=t.model,i=a.toLowerCase(),s=null==n?void 0:n.cssName,l=[e.b(),e.b(i),e.m(o),s];return{c:t,ns:e,viewClassNames:l}},render(){return o("div",{class:this.viewClassNames},[o(i("iBizExtendActionTimeLine"),{data:this.c.state.historyData},null)])}}),Yz=e("aZ",oe(Kz,(function(e){e.component(Kz.name,Kz),jo(Vo.APP_WF_STEP_TRACE_VIEW,(()=>new Wz))})));var Xz=Object.defineProperty,$z=(e,t,a)=>(((e,t,a)=>{t in e?Xz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Jz{constructor(){$z(this,"component","IBizSubAppRefView")}}const Qz=a({name:"IBizSubAppRefView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){const e=B("sub-app-ref-view"),t=bt(((...e)=>new Fo(...e))),{viewType:a,sysCss:n,codeName:o}=t.model,i=a.toLowerCase(),s=null==n?void 0:n.cssName,r=[e.b(),e.b(i),e.m(o),s],c=l((()=>ibiz.env.marketAddress||window.Environment.marketAddress));return{c:t,ns:e,viewClassNames:r,htmlUrl:c,handleClick:()=>{c.value&&window.open(c.value,"_blank")}}},render(){return o("div",{class:this.viewClassNames},[o(i("el-result"),{class:this.ns.b("result"),icon:"info"},null),this.c.model.caption&&o("div",{class:this.ns.b("caption")},[this.c.model.caption]),this.c.model.subCaption&&o("div",{class:this.ns.b("sub-caption")},[this.c.model.subCaption]),this.htmlUrl&&o(i("el-button"),{class:this.ns.b("btn"),onClick:this.handleClick,size:"large"},{default:()=>[this.c.model.title||ibiz.i18n.t("view.subAppRefView.jump")]})])}}),Zz=e("a_",oe(Qz,(function(e){e.component(Qz.name,Qz),jo(Vo.DE_SUB_APP_REF_VIEW,(()=>new Jz))}))),eA=e("a$",a({name:"ErrorView",setup(){const e=B("error-view"),t=Yi(),a=l((()=>"".concat(t.params.code)));d((()=>ibiz.util.hiddenAppLoading()));return{ns:e,isTop:l((()=>t&&!t.params.view1)),code:a}},render(){if(this.code){const e=Uo(this.code);if(e)return"string"==typeof e.component?r(i(e.component)):r(e.component)}return o("div",{class:[this.ns.b()]},[ibiz.i18n.t("view.errorView.noExistPrompt",{code:this.code})])}}));class tA extends Ho{get form(){return this.view.getController("form")}init(){if(super.init(),1===this.view.model.multiFormMode&&this.view.params.srfdatatype){const e=vn(this.view.model,"_form_".concat(this.view.params.srfdatatype));if(e){const t=qo(this.view.model).filter((e=>"FORM"!==e.controlType));e.name="form",t.push(e),this.view.model.viewLayoutPanel?this.view.model.viewLayoutPanel.controls=t:this.view.model.controls=t}}}async modalPreDismissHook(e){try{this.form&&this.form.state.modified&&this.form.model.enableAutoSave&&await this.form.immediateAutoSave()}catch(t){e.allowNext=!1}}async modalShouldDismissHook(e){var t,a;const n=this.view.context.srfsessionid,o=ibiz.uiDomainManager.get(n);let i=!0===this.view.model.enableDirtyChecking;if(n===this.view.id){const e=(null==o?void 0:o.dataModification)||!1;i=i&&((null==(t=this.form)?void 0:t.state.modified)||e)}else i=i&&(null==(a=this.form)?void 0:a.state.modified);if(i&&null==e.allowClose){const t=await ibiz.confirm.error({title:ibiz.i18n.t("viewEngine.closeRemind"),desc:ibiz.i18n.t("viewEngine.confirmClosePrompt")});e.allowClose=!!t}}async onCreated(){await super.onCreated(),this.modalPreDismissHook=this.modalPreDismissHook.bind(this),this.modalShouldDismissHook=this.modalShouldDismissHook.bind(this),this.formDataStateChange=this.formDataStateChange.bind(this);const{childNames:e,modal:t}=this.view;e.push("form"),this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.loadDefault=!1,this.view.slotProps.toolbar||(this.view.slotProps.toolbar={}),this.view.slotProps.toolbar.manualCalcButtonState=!0,t.hooks.preDismiss.tapPromise(this.modalPreDismissHook),t.hooks.shouldDismiss.tapPromise(this.modalShouldDismissHook)}formDataStateChange(e){var t;const{model:a,evt:n}=this.view,o=this.form.model.appDataEntityId,i=e.data[0];null==(t=this.toolbar)||t.calcButtonState(i,o,e),a.showDataInfoBar&&(i.srfkey?n.emit("onViewInfoChange",{dataInfo:i.srfmajortext||""}):n.emit("onViewInfoChange",{dataInfo:ibiz.i18n.t("app.newlyBuild")}))}async onMounted(){await super.onMounted();const{model:e,evt:t}=this.view;if(this.form){this.form.evt.on("onLoadSuccess",(e=>{this.formDataStateChange(e);const a=e.data[0];this.view.state.srfactiveviewdata=a,Object.prototype.hasOwnProperty.call(a,"srfreadonly")&&(this.view.context.srfreadonly=a.srfreadonly),t.emit("onDataChange",{...e,actionType:"LOAD"})})),this.form.evt.on("onLoadDraftSuccess",(e=>{this.formDataStateChange(e),t.emit("onDataChange",{...e,actionType:"LOADDRAFT"})})),this.form.evt.on("onSaveSuccess",(e=>{this.view.state.closeOK=!0;const a=ia(this.view.model.appDataEntityId),n=e.data[0];this.view.context[a]!==n.srfkey&&(this.view.context[a]=n.srfkey),this.formDataStateChange(e),t.emit("onDataChange",{...e,actionType:"SAVE"})})),this.form.evt.on("onRemoveSuccess",(e=>{this.formDataStateChange(e),t.emit("onDataChange",{...e,actionType:"REMOVE"})}));const a=await ibiz.hub.getAppDataEntity(this.view.model.appDataEntityId,this.view.model.appId);this.form.evt.on("onFormDataChange",(e=>{const{name:t,value:n}=e;t===a.formTypeAppDEFieldId&&1===this.view.model.multiFormMode&&this.view.redrawView({context:this.view.context,params:{srfdatatype:n,[t]:n},isReloadModel:!0})})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}}getData(){return this.form.getData()}async load(){return this.form.load()}async save(e){return this.form.save(e)}async refresh(){this.form.refresh()}async call(e,t){if(e===ca.SAVE)return await this.form.save(),null;if(e===ca.SAVE_AND_EXIT)return await this.form.save(),{closeView:!0};if(e===ca.REMOVE_AND_EXIT){return{closeView:await this.form.remove()}}if(e===ca.SAVE_AND_NEW)return this.saveAndNew(),null;if(e===ca.REFRESH)return await this.refresh(),null;if(e===ca.SAVE_AND_START)return await this.wfStart(),null;if(e===ca.FIRST_RECORD||e===ca.LAST_RECORD||e===ca.PREV_RECORD||e===ca.NEXT_RECORD)return await this.changeRecord(e),null;if(e===ca.VIEW_WF_STEP)return await this.wfSubmit(),null;if(e===Na.LOAD)return this.load(),null;if(e===Na.VALIDATE)return this.form.validate();if(e===Na.WF_WITHDRAW)return await this.wfWithdraw(),null;if(e===ca.EXPAND){const{srfcollapsetag:e,srfgroupid:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.form.changeCollapse({tag:n,expand:!0}),null}if(e===ca.COLLAPSE){const{srfcollapsetag:e,srfgroupid:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.form.changeCollapse({tag:n,expand:!1}),null}return e===ca.EXPANDALL?(this.form.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.form.changeCollapse({expand:!1}),null):super.call(e,t)}async saveAndNew(){await this.form.save(),this.form.state.data=new ua,this.view.context[ia(this.view.model.appDataEntityId)]=void 0,await this.form.load()}async cancelChanges(e={targetState:"INIT"}){await super.cancelChanges(e),await this.form.cancelChanges(e.targetState)}async wfStart(){var e,t;await this.save({silent:!0});const a=await ibiz.hub.getAppDEService(this.view.model.appId,this.view.model.appDataEntityId,this.view.context),n=this.form.state.data,o=await a.wf.getWFVersion(null!=(t=null!=(e=n.srfwftag)?e:this.view.params.srfwftag)?t:this.view.context.srfwftag);if(0===o.data.length)throw new _t(ibiz.i18n.t("viewEngine.noExistVersionErr"));const i=o.data[0],s="WFSTART@".concat(i.wfversion),l=Object.assign(this.view.context.clone(),{activeForm:i["process-form"]}),r={processDefinitionKey:i.definitionkey},c=Go(this.view.model,s);if(!c)return await this.form.wfStart({viewParam:r}),void await this.view.closeView();(await ibiz.commands.execute(fo.TAG,c.refAppViewId,l,r)).ok&&await this.view.closeView()}wfSubmit(){return this.form.wfSubmit()}async wfWithdraw(){const e=ibiz.hub.getApp(this.view.context.srfappid),t=this.form.state.data,a=await e.deService.getService(this.view.context,this.view.model.appDataEntityId);await a.wf.exec("withdraw",this.view.context,{...this.view.params,taskId:this.view.params.taskId||this.view.params.srftaskid},t instanceof ua?t.getOrigin():t),ibiz.mc.command.send({srfdecodename:"SysTodo"},"OBJECTUPDATED","WITHDRAW")}doMarkDataAction(){if(super.doMarkDataAction(),this.doActions.includes("VIEW")&&this.form.evt.on("onLoadSuccess",(()=>this.sendViewDataAction())),this.doActions.includes("EDIT")){let e=!1;this.form.evt.on("onFormDataChange",(()=>{const t=this.form.getData()[0];e||(e=!0,this.sendMarkDataAction("EDIT",t.srfkey),setTimeout((()=>{e=!1}),3e5))}))}this.doActions.includes("UPDATE")&&this.form.evt.on("onSaveSuccess",(()=>{const e=this.form.getData()[0];this.sendMarkDataAction("UPDATE",e.srfkey)})),this.doActions.includes("CLOSE")&&this.view.evt.on("onCloseView",(()=>{const e=this.form.getData()[0];(null==e?void 0:e.srfkey)&&this.sendMarkDataAction("CLOSE",e.srfkey)}))}async reloadConfirm(){const e=await super.reloadConfirm();return e&&this.form.state.modified?ibiz.confirm.warning({title:ibiz.i18n.t("viewEngine.refreshRemind"),desc:ibiz.i18n.t("viewEngine.confirmRefreshPrompt")}):e}async changeRecord(e){const t="".concat(this.view.context.srfnavctrlid);if(!t)throw new _t(ibiz.i18n.t("viewEngine.missingErr"));const a=this.form.state.data.srfkey;let n;switch(e){case ca.FIRST_RECORD:n=await ibiz.util.record.getFirstRecord(t,a);break;case ca.LAST_RECORD:n=await ibiz.util.record.getLastRecord(t,a);break;case ca.PREV_RECORD:n=await ibiz.util.record.getPreviousRecord(t,a);break;case ca.NEXT_RECORD:n=await ibiz.util.record.getNextRecord(t,a)}if(n){const e=await ibiz.hub.getAppDataEntity(this.form.model.appDataEntityId,this.form.context.srfappid),{srfparentkey:a,srfparentdename:o}=await Wo(this.form.model.appDataEntityId,this.view.context,{viewParams:this.view.params}),i=e.formTypeAppDEFieldId||e.dataTypeAppDEFieldId,s={srfdatatype:i?n[i]:void 0},l=await Ko(n,this.view.context,this.form.model.appDataEntityId);l[this.deName]=n.srfkey;const r="".concat(this.view.context.srfnavlogicid);if(r){const e=ibiz.util.record.getTriggerLogic(r),a=ibiz.util.record.getCtrl(t);if(e){const{navContexts:t,navParams:o}=e;t&&Object.assign(l,Yo(t,n,(null==a?void 0:a.params)||s,(null==a?void 0:a.context)||{})),o&&Object.assign(s,Yo(o,n,(null==a?void 0:a.params)||s,(null==a?void 0:a.context)||{}))}}return Object.assign(this.view.context,l),Object.assign(this.view.params,s),o&&1===this.view.model.dynaSysMode&&this.view.context[o]!==a?this.view.redrawView({params:s,context:l,data:[n],isReloadModel:!0}):this.view.redrawView({params:s,context:l,data:[n]})}}async onDestroyed(){super.onDestroyed();const{modal:e}=this.view;e.hooks.preDismiss.removeTapPromise(this.modalPreDismissHook),e.hooks.shouldDismiss.removeTapPromise(this.modalShouldDismissHook)}}e("bg",tA);class aA extends tA{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drbar"),this.view.slotProps.drbar||(this.view.slotProps.drbar={}),this.view.slotProps.drbar.srfnav=this.view.state.srfnav}get drbar(){return this.view.getController("drbar")}}e("bh",aA);class nA extends tA{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}e("bi",nA);class oA extends tA{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab"),this.view.slotProps.drtab||(this.view.slotProps.drtab={}),this.view.slotProps.drtab.hideEditItem=!0}get drtab(){return this.view.getController("drtab")}}e("bj",oA);class iA extends Xo{async call(e,t){if(e===ca.NEW_ROW)return this.grid.newRow(),null;if(e===ca.TOGGLE_ROW_EDIT)return this.grid.toggleRowEdit(),null;if(e===ca.SAVE||e===ca.SAVE_ROW)return this.grid.saveAll(),null;if(e===ca.EXPAND){const{srfcollapsetag:e}=t.params||{};let a=e||"";if(!a){const{selectedData:e}=this.grid.state,t=e.filter((e=>e.isGroupData));t.length>0&&(a=t[0].srfkey)}if(!a)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.grid.changeCollapse({tag:a,expand:!0}),null}if(e===ca.COLLAPSE){const{srfcollapsetag:e}=t.params||{};let a=e||"";if(!a){const{selectedData:e}=this.grid.state,t=e.filter((e=>e.isGroupData));t.length>0&&(a=t[0].srfkey)}if(!a)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.grid.changeCollapse({tag:a,expand:!1}),null}return e===ca.EXPANDALL?(this.grid.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.grid.changeCollapse({expand:!1}),null):super.call(e,t)}get grid(){return this.view.getController("grid")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.grid||(this.view.slotProps.grid={}),this.view.slotProps.grid.mdctrlActiveMode=e.gridRowActiveMode,this.view.slotProps.grid.rowEditOpen=e.rowEditDefault}}e("b1",iA);var sA=Object.defineProperty,lA=(e,t,a)=>(((e,t,a)=>{t in e?sA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class rA extends $o{constructor(){super(...arguments),lA(this,"route",Yi())}get appmenu(){return this.view.getController("appmenu")}get enableCollapse(){return"LEFT"===this.view.model.mainMenuAlign||void 0===this.view.model.mainMenuAlign}initViewState(){super.initViewState(),this.view.state.isCollapse=!1}async onCreated(){await super.onCreated(),this.view.childNames.push("appmenu"),this.view.slotProps.appmenu||(this.view.slotProps.appmenu={}),this.view.slotProps.appmenu.collapse=this.view.state.isCollapse,ibiz.util.hiddenAppLoading()}async onMounted(){if(await super.onMounted(),!this.isExistAndInLayout("appmenu")&&!this.route.params.view2){const{model:e,context:t,params:a}=this.view,{defAppViewId:n}=e;n&&ibiz.commands.execute(fo.TAG,n,t,a)}(window.innerWidth<=1200||ibiz.config.appMenu.defaultCollapse)&&this.toggleCollapse()}async call(e,t){if(e===Na.TOGGLE_COLLAPSE)return this.toggleCollapse(),null}toggleCollapse(){var e;if(!this.enableCollapse)return void ibiz.log.error("非左侧菜单模式折叠功能不启用");this.view.state.isCollapse=!this.view.state.isCollapse,this.view.slotProps.appmenu.collapse=this.view.state.isCollapse;const t=null==(e=this.view.layoutPanel)?void 0:e.panelItems.container_scroll_left;t&&(this.view.state.isCollapse?t.state.layout.width="56px":t.state.layout.width="".concat(t.model.width,"px"))}calcViewHeaderVisible(){return!0}}e("b2",rA);class cA extends Xo{get list(){return this.view.getController("list")}async onMounted(){await super.onMounted();const{model:e}=this.view;this.list.state.mdctrlActiveMode=e.mdctrlActiveMode}async call(e,t){if(e===ca.EXPAND){const{srfcollapsetag:e,srfgroup:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.list.changeCollapse({tag:n,expand:!0}),null}if(e===ca.COLLAPSE){const{srfcollapsetag:e,srfgroup:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.list.changeCollapse({tag:n,expand:!1}),null}return e===ca.EXPANDALL?(this.list.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.list.changeCollapse({expand:!1}),null):super.call(e,t)}}e("bq",cA);class dA extends Xo{get dataview(){return this.view.getController("dataview")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.dataview||(this.view.slotProps.dataview={}),this.view.slotProps.dataview.mdctrlActiveMode=e.mdctrlActiveMode}async call(e,t){if(e===ca.EXPAND){const{srfcollapsetag:e,srfgroup:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.dataview.changeCollapse({tag:n,expand:!0}),null}if(e===ca.COLLAPSE){const{srfcollapsetag:e,srfgroup:a}=t.params||{},n=e||a;if(!n)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.dataview.changeCollapse({tag:n,expand:!1}),null}return e===ca.EXPANDALL?(this.dataview.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.dataview.changeCollapse({expand:!1}),null):super.call(e,t)}}e("b3",dA);class uA extends $o{get form(){return this.view.getController("form")}init(){if(super.init(),1===this.view.model.multiFormMode&&this.view.params.srfdatatype){const e=vn(this.view.model,"_form_".concat(this.view.params.srfdatatype));if(e){const t=qo(this.view.model).filter((e=>"FORM"!==e.controlType));e.name="form",t.push(e),this.view.model.viewLayoutPanel?this.view.model.viewLayoutPanel.controls=t:this.view.model.controls=t}}}async onCreated(){await super.onCreated(),this.modalPreDismissHook=this.modalPreDismissHook.bind(this),this.modalShouldDismissHook=this.modalShouldDismissHook.bind(this);const{childNames:e,modal:t}=this.view;e.push("form"),this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.loadDefault=!1,this.view.slotProps.toolbar||(this.view.slotProps.toolbar={}),this.view.slotProps.toolbar.manualCalcButtonState=!0,t.hooks.preDismiss.tapPromise(this.modalPreDismissHook),t.hooks.shouldDismiss.tapPromise(this.modalShouldDismissHook)}async onMounted(){await super.onMounted();const{model:e,evt:t}=this.view,a=this.form.model.appDataEntityId,n=e=>{var n;const o=e.data[0];null==(n=this.toolbar)||n.calcButtonState(o,a,e),o.srfkey&&t.emit("onViewInfoChange",{dataInfo:o.srfmajortext})};this.form.evt.on("onLoadSuccess",(e=>{const t=e.data[0];this.view.state.srfactiveviewdata=t,Object.prototype.hasOwnProperty.call(t,"srfreadonly")&&(this.view.context.srfreadonly=t.srfreadonly),n(e)})),this.form.evt.on("onLoadDraftSuccess",(e=>{n(e)})),this.form.evt.on("onSaveSuccess",(e=>{n(e)}));const o=await ibiz.hub.getAppDataEntity(this.view.model.appDataEntityId,this.view.model.appId);this.form.evt.on("onFormDataChange",(e=>{const{name:t,value:a}=e;t===o.formTypeAppDEFieldId&&1===this.view.model.multiFormMode&&this.view.redrawView({context:this.view.context,params:{...this.view.params,srfdatatype:a,srfdefdata:e.data[0],[t]:a},isReloadModel:!0})})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}async onDestroyed(){super.onDestroyed();const{modal:e}=this.view;e.hooks.preDismiss.removeTapPromise(this.modalPreDismissHook),e.hooks.shouldDismiss.removeTapPromise(this.modalShouldDismissHook)}async modalPreDismissHook(e){try{this.form&&this.form.state.modified&&this.form.model.enableAutoSave&&await this.form.immediateAutoSave()}catch(t){e.allowNext=!1}}async modalShouldDismissHook(e){var t,a;const n=this.view.context.srfsessionid,o=ibiz.uiDomainManager.get(n);let i=!0===this.view.model.enableDirtyChecking;if(n===this.view.id){const e=(null==o?void 0:o.dataModification)||!1;i=i&&((null==(t=this.form)?void 0:t.state.modified)||e)}else i=i&&(null==(a=this.form)?void 0:a.state.modified);if(i&&null==e.allowClose){const t=await ibiz.confirm.error({title:ibiz.i18n.t("viewEngine.closeRemind"),desc:ibiz.i18n.t("viewEngine.confirmClosePrompt")});e.allowClose=!!t}}getData(){return this.form.getData()}load(){return this.form.load()}async refresh(){await this.form.refresh()}async call(e,t){return e===ca.CANCEL?(this.cancel(),null):e===ca.OK?(await this.confirm(),null):e===Na.LOAD?(this.load(),null):e===Na.VALIDATE?this.form.validate():e===ca.REFRESH?(await this.refresh(),null):super.call(e,t)}async confirm(){this.view.state.isClosing=!0;try{await this.form.save(),await this.view.closeView({ok:!0,data:this.getData()})}catch(e){throw this.view.state.isClosing=!1,e}}cancel(){this.view.modal.ignoreDismissCheck=!0,this.view.closeView({ok:!1,data:[]})}}e("b4",uA);var pA=Object.defineProperty,hA=(e,t,a)=>(((e,t,a)=>{t in e?pA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class mA extends iA{constructor(){super(...arguments),hA(this,"selectData",[])}get grid(){return this.view.getController("grid")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.grid||(this.view.slotProps.grid={}),this.view.slotProps.grid.singleSelect=this.view.state.singleSelect,this.view.slotProps.grid.mdctrlActiveMode=e.gridRowActiveMode,this.initSelectData()}initSelectData(){this.view.params.selecteddata&&(this.selectData=JSON.parse(this.view.params.selecteddata),delete this.view.params.selecteddata),this.view.state.selectedData&&(this.selectData=[...this.view.state.selectedData])}async onMounted(){await super.onMounted(),this.xdataControl.evt.on("onSelectionChange",(async e=>{this.view.evt.emit("onSelectionChange",{...e})})),this.xdataControl.evt.on("onActive",(async e=>{this.view.evt.emit("onDataActive",{...e})})),this.setSelectedData(this.selectData)}async call(e,t){return e===Na.GET_ALL_DATA?this.grid.state.items:super.call(e,t)}}e("by",mA);var vA=Object.defineProperty,bA=(e,t,a)=>(((e,t,a)=>{t in e?vA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gA extends $o{constructor(){super(...arguments),bA(this,"selectData",[])}get pickupViewPanel(){return this.view.getController("pickupviewpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("pickupviewpanel"),this.initSelectData()}initSelectData(){this.view.params.selecteddata&&(this.selectData=JSON.parse(this.view.params.selecteddata),delete this.view.params.selecteddata),this.view.state.selectedData&&(this.selectData=[...this.view.state.selectedData])}async onMounted(){await super.onMounted(),this.pickupViewPanel.state.singleSelect=!0,this.pickupViewPanel.evt.on("onSelectionChange",(e=>{this.selectData=e.data})),this.pickupViewPanel.evt.on("onDataActive",(e=>{this.pickupViewPanelDataActive(e.data)})),this.setSelectedData(this.selectData)}setSelectedData(e){this.selectData=e,this.pickupViewPanel.setSelectedData(e)}pickupViewPanelDataActive(e){this.selectData=e,this.view.closeView({ok:!0,data:this.selectData})}async call(e,t){return e===ca.CANCEL?(this.cancel(),null):e===ca.OK?(this.confirm(),null):super.call(e,t)}confirm(){this.view.closeView({ok:!0,data:this.selectData})}cancel(){this.view.closeView({ok:!1,data:[]})}}e("bA",gA);class fA extends gA{get simpleList(){return this.view.getController("simplelist")}async onCreated(){if(await super.onCreated(),!this.view.providers.simplelist)throw new Gt(this.view.model,ibiz.i18n.t("viewEngine.missingConfigErr"));const{childNames:e}=this.view;e.push("simplelist"),this.view.slotProps.simplelist||(this.view.slotProps.simplelist={}),this.view.slotProps.pickupviewpanel||(this.view.slotProps.pickupviewpanel={}),this.view.slotProps.simplelist.mdctrlActiveMode=2,this.view.slotProps.simplelist.isSimple=!0,this.view.slotProps.simplelist.singleSelect=!1,this.view.slotProps.pickupviewpanel.singleSelect=!1}async onMounted(){await super.onMounted(),this.simpleList.evt.on("onActive",(e=>{this.simpleListActive(e.data)})),this.setSelectedData(this.selectData)}async call(e,t){return e===ca.CANCEL?(this.cancel(),null):e===ca.OK?(this.confirm(),null):e===ca.ADD_SELECTION?(this.addSelection(),null):e===ca.ADD_ALL?(this.addAll(),null):e===ca.REMOVE_ALL?(this.removeAll(),null):e===ca.REMOVE_SELECTION?(this.removeSelection(),null):super.call(e,t)}async pickupViewPanelDataActive(e){await this.handlePushSimpleListItems(e)}simpleListActive(e){const t=this.simpleList.getAllData();e.forEach((e=>{const a=t.findIndex((t=>t.srfkey===e.srfkey));-1!==a&&t.splice(a,1)})),this.setSelectedData(t)}async addSelection(){const e=await this.pickupViewPanel.getSelectedData();await this.handlePushSimpleListItems(e)}async handlePushSimpleListItems(e){const t=await this.pickupViewPanel.getAllData(),a=this.simpleList.getAllData().filter((e=>!t.some((t=>t.srfkey===e.srfkey))));a.push(...e);const n=this.handleUniqueItems(a);this.setSelectedData(n)}handleUniqueItems(e){const t=new Map;return e.filter((e=>!t.has(e.srfkey)&&t.set(e.srfkey,1)))}async addAll(){const e=await this.pickupViewPanel.getAllData();await this.handlePushSimpleListItems(e)}removeAll(){this.setSelectedData([])}removeSelection(){const e=this.simpleList.getData(),t=this.simpleList.getAllData();e.forEach((e=>{const a=t.findIndex((t=>e.srfkey===t.srfkey));-1!==a&&t.splice(a,1)})),this.setSelectedData(t)}setSelectedData(e){super.setSelectedData(e),this.simpleList.setData(e)}confirm(){const e=this.simpleList.getAllData();this.view.closeView({ok:!0,data:e})}}e("bu",fA);class wA extends Xo{async onCreated(){await super.onCreated(),this.view.slotProps.tree||(this.view.slotProps.tree={})}get tree(){return this.view.getController("tree")}async call(e,t){var a;if(e===ca.REFRESH_ALL)return await this.xdataControl.refresh(),null;if(e===ca.REFRESH)return(null==(a=null==t?void 0:t.data)?void 0:a[0])?await this.xdataControl.refreshNodeChildren(t.data[0],!1):await this.xdataControl.refresh(),null;if(e===ca.REFRESH_PARENT)return await this.xdataControl.refreshNodeChildren(t.data[0],!0),null;if(e===ca.EXPAND){const{data:e=[]}=t,{srfcollapsetag:a}=t.params||{};let n=a||"";if(!n&&e.length>0&&(n=e[0].srfnodeid),!n)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.xdataControl.changeCollapse({tag:n,expand:!0}),null}if(e===ca.COLLAPSE){const{data:e=[]}=t,{srfcollapsetag:a}=t.params||{};let n=a||"";if(!n&&e.length>0&&(n=e[0].srfnodeid),!n)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.xdataControl.changeCollapse({tag:n,expand:!1}),null}return e===ca.EXPANDALL?(this.xdataControl.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.xdataControl.changeCollapse({expand:!1}),null):super.call(e,t)}async openData(e){const{data:t,event:a}=e;return await this.xdataControl.openData(t[0],a)}async newData(e){const{data:t,event:a}=e;return await this.xdataControl.newData(t[0],a)}}e("bI",wA);class yA extends $o{get tabExpPanel(){return this.view.getController("tabexppanel")}async onCreated(){var e;this.preprocessTabExpModelLayout(),await super.onCreated();const{childNames:t,model:a}=this.view;t.push("tabexppanel"),this.view.slotProps.tabexppanel||(this.view.slotProps.tabexppanel={});const{appViewParams:n}=a,o=null==(e=null==n?void 0:n.find((e=>"srfdefaultnav"===e.id)))?void 0:e.value;this.view.slotProps.tabexppanel.defaultTabName=this.view.state.srfnav||o,this.view.slotProps.tabexppanel.hideEditItem=!0}async refresh(){await this.loadEntityData(),this.tabExpPanel.refresh()}async call(e,t){return e===ca.REFRESH?(await this.refresh(),null):super.call(e,t)}async onMounted(){await super.onMounted(),await this.loadEntityData()}async loadEntityData(){const e=ia(this.view.model.appDataEntityId);if(this.view.context[e])return super.loadEntityData()}preprocessTabExpModelLayout(){const e=(t,a=this.view.model.viewLayoutPanel.rootPanelItems)=>{if(null==a?void 0:a.length)for(let n=0;n<a.length;n++){const o=a[n];if(o.id===t)return o;const i=o;if(i.panelItems&&i.panelItems.length>0){const a=e(t,i.panelItems);if(a)return a}}},t=(e,a=this.view.model.viewLayoutPanel.rootPanelItems)=>{for(let n=0;n<a.length;n++){const o=a[n];e.includes(o.id)&&a.splice(n,1);const i=o;i.panelItems&&i.panelItems.length>0&&t(e,i.panelItems)}},a=t=>{const a=e("tabexppanel");if(!a)throw new Ft(this.view.model.viewLayoutPanel,ibiz.i18n.t("viewEngine.noFoundLayoutOccupied"));const n=e(t);if(!n)throw new Ft(this.view.model.viewLayoutPanel,ibiz.i18n.t("viewEngine.noFoundLayoutContainer",{name:t}));n.panelItems=[a]},{tabLayout:n}=this.view.model,o=["view_tabexppanel","view_tabexppanel_left","view_tabexppanel_bottom","view_tabexppanel_right"];let i="view_tabexppanel";switch(n){case"LEFT":i="view_tabexppanel_left",o.splice(1,1);break;case"BOTTOM":i="view_tabexppanel_bottom",o.splice(2,1);break;case"RIGHT":i="view_tabexppanel_right",o.splice(3,1);break;case"TOP":default:o.splice(0,1);case"FLOW":case"FLOW_NOHEADER":}"FLOW"!==n&&"FLOW_NOHEADER"!==n&&(a(i),t(o))}calcViewHeaderVisible(){let e=super.calcViewHeaderVisible();const{tabLayout:t}=this.view.model;return(void 0===t||["TOP","TOP_DROPDOWNLIST"].includes(t)&&vn(this.view.model,"tabexppanel"))&&(e=!0),e}}e("b5",yA);class CA extends Xo{get expBarName(){throw Error(ibiz.i18n.t("viewEngine.subclassAchieve"))}get expBar(){return this.view.getController(this.expBarName)}get xdataControl(){return this.expBar.xDataController}constructor(e){var t,a;const n=null==(a=null==(t=e.model.viewLayoutPanel)?void 0:t.controls)?void 0:a.find((e=>"searchbar"===e.id));n&&!n.name&&(n.name="searchbar"),super(e)}async onCreated(){super.onCreated(),this.modifySplitContainer();const{childNames:e}=this.view;e.push(this.expBarName),this.view.slotProps[this.expBarName]||(this.view.slotProps[this.expBarName]={}),this.view.slotProps[this.expBarName].loadDefault=!1,this.view.slotProps[this.expBarName].srfnav=this.view.state.srfnav}modifySplitContainer(){const e=vn(this.view.model,this.expBarName),{width:t,height:a}=e;(t||a)&&Vt(this.view.model.viewLayoutPanel,(e=>{"view_exp_split"===e.id&&(t&&(e.panelItems[0].layoutPos.width=t),a&&(e.panelItems[0].layoutPos.height=a))}),{childrenFields:["rootPanelItems","panelItems","panelTabPages"]})}async onXDataActive(e){}getSearchParams(){const e=super.getSearchParams();return this.expBar.state.query&&(e.query=this.expBar.state.query),e}async load(e){await this.expBar.load()}}e("bk",CA);class IA extends CA{get expBarName(){return"gridexpbar"}}e("bn",IA);class DA extends CA{get expBarName(){return"listexpbar"}}e("bp",DA);class EA extends CA{get expBarName(){return"dataviewexpbar"}}e("be",EA);class SA extends CA{get expBarName(){return"treeexpbar"}get tree(){return this.expBar.xDataController}async call(e,t){var a;if(e===ca.REFRESH_ALL)return await this.tree.refresh(),null;if(e===ca.REFRESH)return(null==(a=null==t?void 0:t.data)?void 0:a[0])?await this.tree.refreshNodeChildren(t.data[0],!1):await this.tree.refresh(),null;if(e===ca.REFRESH_PARENT)return await this.tree.refreshNodeChildren(t.data[0],!0),null;if(e===ca.EXPAND){const{data:e=[]}=t,{srfcollapsetag:a}=t.params||{};let n=a||"";if(!n&&e.length>0&&(n=e[0].srfnodeid),!n)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.tree.changeCollapse({tag:n,expand:!0}),null}if(e===ca.COLLAPSE){const{data:e=[]}=t,{srfcollapsetag:a}=t.params||{};let n=a||"";if(!n&&e.length>0&&(n=e[0].srfnodeid),!n)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.tree.changeCollapse({tag:n,expand:!1}),null}return e===ca.EXPANDALL?(this.tree.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.tree.changeCollapse({expand:!1}),null):super.call(e,t)}async onMounted(){await super.onMounted(),await this.loadEntityData()}async loadEntityData(){const e=ia(this.view.model.appDataEntityId);if(this.view.context[e]&&this.view.model.showDataInfoBar)return super.loadEntityData()}}e("b6",SA);class xA extends $o{get wizardPanel(){return this.view.getController("wizardpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("wizardpanel")}async onMounted(){await super.onMounted(),this.view.slotProps.wizardpanel||(this.view.slotProps.wizardpanel={}),this.wizardPanel.initialize(),this.wizardPanel.evt.on("onFinishSuccess",(e=>{this.view.closeView({ok:!0,data:e.data})}))}}e("bO",xA);class PA extends Xo{get xdataControlName(){return"chart"}get chart(){return this.view.getController("chart")}async onCreated(){await super.onCreated(),this.view.slotProps.chart||(this.view.slotProps.chart={})}}e("bb",PA);var kA=Object.defineProperty,TA=(e,t,a)=>(((e,t,a)=>{t in e?kA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class zA extends tA{constructor(){super(...arguments),TA(this,"isEditable",!1),TA(this,"isCalcWFToolbar",!0),TA(this,"entityService"),TA(this,"processForm"),TA(this,"wfLinks",[])}get form(){return this.view.getController(this.processForm.name)}async onCreated(){await super.onCreated();const e=ibiz.hub.getApp(this.view.context.srfappid);this.entityService=await e.deService.getService(this.view.context,this.view.model.appDataEntityId),await this.calcProcessForm();const{childNames:t}=this.view;t.push(this.processForm.name)}async onMounted(){var e;await super.onMounted(),null==(e=this.toolbar)||e.evt.on("onClick",(async e=>{"extra"===e.buttonType&&e.eventArg&&this.onLinkClick(e.eventArg)}))}async load(){const e=await super.load();return this.isCalcWFToolbar&&this.calcWfToolbar(),e}async refresh(){const e=this.processForm;await this.calcProcessForm(),e===this.processForm&&await super.refresh()}async calcProcessFormName(){const e=(await this.entityService.wf.getWFStep(Object.assign(this.view.context.clone(),{...this.view.params}))).data;this.isEditable="true"===e.isEditable,this.isEditable||e.hasOwnProperty("process-editmode")&&Number(e["process-editmode"])>0&&(this.isEditable=!0);const t="process-".concat(ibiz.env.isMob?"mob":"","form");return e[t]?"wfform_".concat(e[t]):"form"}async calcProcessForm(){const e=await this.calcProcessFormName(),t=vn(this.view.model,e.toLowerCase());if(!t)throw new Gt(this.view.model,ibiz.i18n.t("viewEngine.noFoundFormModel",{name:e}));this.processForm=t,this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.modelData=this.processForm}async calcWfToolbar(){if(!this.toolbar)throw new Gt(this.view.model,ibiz.i18n.t("viewEngine.missingToolbarModel"));this.toolbar.clearExtraButtons();const e=ibiz.hub.getApp(this.view.context.srfappid),t=await e.deService.getService(this.view.context,this.view.model.appDataEntityId),a=await t.wf.getWFLink(Object.assign(this.view.context.clone(),{taskDefinitionKey:this.view.params.taskDefinitionKey}),this.getData()[0].getOrigin());this.wfLinks=a.data,this.wfLinks.forEach((e=>{e.id=ei()}));const n=this.wfLinks.map((e=>({id:e.id,appId:this.view.model.appId,caption:e.sequenceFlowName,buttonType:"extra",tooltip:e.sequenceFlowName,showCaption:!0})));this.toolbar.setExtraButtons("before",n)}async onLinkClick(e){const t=this.wfLinks.find((t=>t.id===e));if(t)return this.wfSubmitByLink(t)}async wfSubmitByLink(e){this.isEditable&&await this.save({silent:!0});const t=Object.assign(this.view.context.clone(),{isEditable:this.isEditable,processForm:e.sequenceflowform}),a={...e},n=Jo(this.view.model,e);if(!n)return await this.form.wfSubmit({viewParam:a}),void await this.view.closeView();(await ibiz.commands.execute(fo.TAG,n,t,a)).ok&&await this.view.closeView()}}e("bK",zA);class AA extends zA{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}e("bL",AA);var OA=Object.defineProperty,MA=(e,t,a)=>(((e,t,a)=>{t in e?OA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class NA extends zA{constructor(){super(...arguments),MA(this,"isCalcWFToolbar",!1)}async calcProcessFormName(){this.isEditable="true"===this.view.context.isEditable;return this.view.context.processForm?"wfform_".concat(this.view.context.processForm):"form"}async call(e,t){return e===ca.OK?(this.onOkButtonClick(),null):e===ca.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,t)}async onOkButtonClick(){this.view.context.isEditable?await this.save({silent:!0}):this.form.state.modified=!1,await this.form.wfSubmit({}),await this.view.closeView({ok:!0,data:this.getData()})}async onCancelButtonClick(){await this.view.closeView({ok:!1,data:[]})}}e("bJ",NA);var BA=Object.defineProperty,_A=(e,t,a)=>(((e,t,a)=>{t in e?BA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class RA extends zA{constructor(){super(...arguments),_A(this,"isCalcWFToolbar",!1)}async calcProcessFormName(){this.isEditable="true"===this.view.context.isEditable;return this.view.context.processForm?"wfform_".concat(this.view.context.processForm):"form"}async call(e,t){return e===ca.OK?(this.onOkButtonClick(),null):e===ca.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,t)}async onOkButtonClick(){await this.save({silent:!0}),await this.form.wfStart({}),await this.view.closeView({ok:!0,data:this.getData()})}async onCancelButtonClick(){await this.view.closeView({ok:!1,data:[]})}}e("bM",RA);class LA extends Ho{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("dashboard")}get dashboard(){return this.view.getController("dashboard")}async refresh(){await this.dashboard.refresh()}getData(){return this.view.state.srfactiveviewdata?[this.view.state.srfactiveviewdata]:[]}async call(e,t){return e===ca.REFRESH?(t.ctrl?await t.ctrl.refresh():await this.refresh(),null):super.call(e,t)}async onMounted(){await super.onMounted(),this.view.model.appDataEntityId&&await this.loadEntityData()}doMarkDataAction(){if(super.doMarkDataAction(),this.doActions.includes("VIEW")&&this.view.evt.on("onDataChange",(()=>this.sendViewDataAction())),this.doActions.includes("EDIT")){let e=!1;this.dashboard.evt.on("onConfigChange",(()=>{const t=this.getData()[0];(null==t?void 0:t.srfkey)&&!e&&(e=!0,this.sendMarkDataAction("EDIT",t.srfkey),setTimeout((()=>{e=!1}),3e5))}))}this.doActions.includes("UPDATE")&&this.dashboard.evt.on("onSavePortlet",(()=>{const e=this.getData()[0];(null==e?void 0:e.srfkey)&&this.sendMarkDataAction("UPDATE",null==e?void 0:e.srfkey)}))}}e("bC",LA);class jA extends $o{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("panel")}get panel(){return this.view.getController("panel")}async onMounted(){await super.onMounted(),this.view.model.appDataEntityId&&await this.loadEntityData()}}e("bw",jA);var VA=Object.defineProperty,FA=(e,t,a)=>(((e,t,a)=>{t in e?VA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class UA extends $o{constructor(){super(...arguments),FA(this,"controls",[])}async onCreated(){await super.onCreated(),this.controls=qo(this.view.model)}async onMounted(){await super.onMounted(),this.calcToolbarState=this.calcToolbarState.bind(this),this.controls.forEach((e=>{const t=this.view.getController(e.name);null==t||t.evt.on("onLoadSuccess",(t=>this.calcToolbarButtonState(e,void 0,t))),null==t||t.evt.on("onSelectionChange",(t=>this.calcToolbarButtonState(e,t.data[0],t))),null==t||t.evt.on("onRefreshSuccess",(t=>this.calcToolbarButtonState(e,t.data[0],t)))}))}calcToolbarButtonState(e,t,a){const n=this.controls.find((t=>{var a;return"TOOLBAR"===t.controlType&&(null==(a=t.xdataControlName)?void 0:a.toLowerCase())===e.name}));if(n){const o=this.view.getController(n.name);null==o||o.calcButtonState(t,e.appDataEntityId,a)}}async call(e,t){var a;return e===ca.REFRESH?(await(null==(a=this.viewLayoutPanel)?void 0:a.load()),null):super.call(e,t)}}e("bc",UA);var HA=Object.defineProperty,qA=(e,t,a)=>(((e,t,a)=>{t in e?HA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class GA extends $o{constructor(){super(...arguments),qA(this,"controls",[])}async onCreated(){await super.onCreated(),this.controls=qo(this.view.model),this.initMDCtrlActiveMode()}async onMounted(){await super.onMounted(),this.calcToolbarState=this.calcToolbarState.bind(this),this.controls.forEach((e=>{const t=this.view.getController(e.name);null==t||t.evt.on("onLoadSuccess",(t=>this.calcToolbarButtonState(e,void 0,t))),null==t||t.evt.on("onSelectionChange",(t=>this.calcToolbarButtonState(e,t.data[0],t))),null==t||t.evt.on("onRefreshSuccess",(t=>this.calcToolbarButtonState(e,t.data[0],t)))}))}initMDCtrlActiveMode(){const{model:e}=this.view;this.controls.forEach((t=>{const a=t.name||t.id;this.view.slotProps[a]||(this.view.slotProps[a]={}),this.view.slotProps[a].mdctrlActiveMode=e.mdctrlActiveMode}))}calcToolbarButtonState(e,t,a){const n=this.controls.find((t=>{var a;return"TOOLBAR"===t.controlType&&(null==(a=t.xdataControlName)?void 0:a.toLowerCase())===e.name}));if(n){const o=this.view.getController(n.name);null==o||o.calcButtonState(t,e.appDataEntityId,a)}}async call(e,t){return e===ca.REFRESH?(await this.refresh(),null):e===ca.EDIT||e===ca.VIEW?this.openData(t):e===ca.NEW?this.newData(t):super.call(e,t)}async refresh(){if(this.view.state.xdatacontrolname){const e=this.view.getController(this.view.state.xdatacontrolname);await(null==e?void 0:e.refresh())}}async openData(e){var t,a;const{data:n,ctrl:o,event:i}=e,s=(e.context||this.view.context).clone();let l=null==(t=n[0].srfdecodename)?void 0:t.toLowerCase();o&&(s.srfnavctrlid=o.ctrlId,l||(l=ia(o.model.appDataEntityId)));const r=e.params||this.view.params;s[l.toLowerCase()]=n[0].srfkey;const c=await(null==(a=this.view.scheduler)?void 0:a.triggerCustom("opendata",{context:s,params:r,data:n,event:i,view:this.view}));if(-1===c)throw new Gt(this.view.model,ibiz.i18n.t("runtime.engine.logicOpendata"));return{cancel:!c||!c.ok}}async newData(e){var t,a,n;const{data:o,event:i,copyMode:s}=e;if(!(null==(a=null==(t=this.view.model.viewLayoutPanel)?void 0:t.appViewLogics)?void 0:a.find((e=>"newdata"===e.id))))throw new Gt(this.view.model,ibiz.i18n.t("runtime.engine.logicNewdata"));const l=Oi(this.view.params);s&&(l.srfcopymode=s);const r=await(null==(n=this.view.scheduler)?void 0:n.triggerCustom("newdata",{context:this.view.context,params:l,data:o,event:i,view:this.view}));if(-1===r)throw new Gt(this.view.model,ibiz.i18n.t("runtime.engine.logicNewdata"));return{cancel:!r||!r.ok}}}e("bd",GA);var WA=Object.defineProperty,KA=(e,t,a)=>(((e,t,a)=>{t in e?WA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class YA extends wA{constructor(){super(...arguments),KA(this,"selectData",[])}async onCreated(){super.onCreated(),this.view.slotProps.tree||(this.view.slotProps.tree={}),this.view.slotProps.tree.singleSelect=this.view.state.singleSelect,this.view.slotProps.tree.checkStrictly=this.view.state.checkStrictly,this.initSelectData()}initSelectData(){this.view.params.selecteddata&&(this.selectData=JSON.parse(this.view.params.selecteddata),delete this.view.params.selecteddata),this.view.state.selectedData&&(this.selectData=[...this.view.state.selectedData])}async onMounted(){const{model:e}=this.view;this.xdataControl.evt.on("onSelectionChange",(async e=>{this.view.evt.emit("onSelectionChange",{...e})})),this.xdataControl.evt.on("onActive",(async e=>{this.view.evt.emit("onDataActive",{...e})})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load(),this.setSelectedData(this.selectData)}async call(e,t){return e===Na.GET_ALL_DATA?this.tree.state.items:super.call(e,t)}}e("bz",YA);var XA=Object.defineProperty,$A=(e,t,a)=>(((e,t,a)=>{t in e?XA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class JA extends dA{constructor(){super(...arguments),$A(this,"selectData",[])}get dataview(){return this.view.getController("dataview")}async onCreated(){super.onCreated(),this.view.slotProps.dataview.singleSelect=this.view.state.singleSelect,this.initSelectData()}initSelectData(){this.view.params.selecteddata&&(this.selectData=JSON.parse(this.view.params.selecteddata),delete this.view.params.selecteddata),this.view.state.selectedData&&(this.selectData=[...this.view.state.selectedData])}async onMounted(){await super.onMounted(),this.xdataControl.evt.on("onSelectionChange",(async e=>{this.view.evt.emit("onSelectionChange",{...e})})),this.xdataControl.evt.on("onActive",(async e=>{this.view.evt.emit("onDataActive",{...e})})),this.setSelectedData(this.selectData)}async call(e,t){return e===Na.GET_ALL_DATA?this.dataview.state.items:super.call(e,t)}}e("bx",JA);class QA extends gA{get treeExpBar(){return this.view.getController("treeexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("treeexpbar"),this.view.slotProps.treeexpbar||(this.view.slotProps.treeexpbar={}),this.view.slotProps.treeexpbar.noNeedNavView=!0,this.view.slotProps.pickupviewpanel||(this.view.slotProps.pickupviewpanel={}),this.view.slotProps.pickupviewpanel.noLoadDefault=!0,this.view.slotProps.pickupviewpanel.singleSelect=!0}async onMounted(){await super.onMounted(),this.treeExpBar.load(),this.treeExpBar.evt.on("onNavViewChange",(e=>{this.view.slotProps.pickupviewpanel.context=e.navViewMsg.context,this.view.slotProps.pickupviewpanel.params={...this.view.params,...e.navViewMsg.params}}))}}e("bB",QA);class ZA extends Xo{async onXDataActive(e){}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.calendar||(this.view.slotProps.calendar={}),this.view.slotProps.calendar.mdctrlActiveMode=e.mdctrlActiveMode}async openData(e){const{data:t,event:a}=e;return await this.xdataControl.openData(t[0],a)}async newData(e){const{data:t,event:a}=e;return await this.xdataControl.newData(t[0],a)}}e("b9",ZA);class eO extends CA{get expBarName(){return"calendarexpbar"}}e("b8",eO);class tO extends fA{get treeExpBar(){return this.view.getController("treeexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("treeexpbar"),this.view.slotProps.treeexpbar||(this.view.slotProps.treeexpbar={}),this.view.slotProps.treeexpbar.noNeedNavView=!0,this.view.slotProps.pickupviewpanel.noLoadDefault=!0}async onMounted(){await super.onMounted(),this.treeExpBar.load(),this.treeExpBar.evt.on("onNavViewChange",(e=>{this.view.slotProps.pickupviewpanel.context=e.navViewMsg.context,this.view.slotProps.pickupviewpanel.params=e.navViewMsg.params}))}}e("bv",tO);class aO extends Xo{get kanbanview(){return this.view.getController("kanban")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.kanban||(this.view.slotProps.kanban={}),this.view.slotProps.kanban.mdctrlActiveMode=e.mdctrlActiveMode}}e("bo",aO);class nO extends JA{}e("bl",nO);var oO=Object.defineProperty,iO=(e,t,a)=>(((e,t,a)=>{t in e?oO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sO extends $o{constructor(){super(...arguments),iO(this,"route",Yi()),iO(this,"enterKeyListener",(async e=>{if("BUTTON"===e.target.nodeName&&"Enter"===e.key&&this.view.layoutPanel){const t={data:[{username:this.view.layoutPanel.data.username,password:this.view.layoutPanel.data.password,captcha:this.view.layoutPanel.data.captcha}]},a=e.target.dataset.id;if(a){const e=this.view.layoutPanel.findPanelItemByName(a);e&&(t.data=[e.data])}await this.login(t)}}))}async onMounted(){super.onMounted(),document.addEventListener("keyup",this.enterKeyListener)}async onDestroyed(){super.onDestroyed(),document.removeEventListener("keyup",this.enterKeyListener)}async call(e,t={}){return e===ca.LOGIN?(await this.login(t),null):super.call(e,t)}async login(e){var t;let a;const n={},o=e.data[0]||{},i=null==(t=e.params)?void 0:t.panelDataParent;if(this.view.layoutPanel){if(!await this.view.layoutPanel.validate(i))return;const e=this.view.layoutPanel.data;"boolean"==typeof e.isRemember&&(a=e.isRemember),o.captcha&&Object.assign(n,o.captcha),e.srfheaders&&Object.assign(n,e.srfheaders)}let s=o.username;ai(o.orgid)&&(s="".concat(o.username,"@").concat(o.orgid));const l=await ibiz.auth.login(s,o.password,a,n);if(this.view.evt.emit("onAfterLogin",{ok:l,panelDataParent:i}),!0===l){const e=window.location.href.indexOf("srfthird_auth_success=false")>=0;if(window.location.hash=this.route.query.ru||"/",window.history.pushState({},""),e){const e=window.location.href.replace("?srfthird_auth_success=false","");window.location.href=e}else window.location.reload()}}async cancelChanges(e={targetState:"INIT"}){this.view.layoutPanel&&Object.keys(this.view.layoutPanel.panelItems).forEach((e=>{const t=this.view.layoutPanel.panelItems[e],{viewFieldName:a}=t.model;a&&t.setDataValue("",a)}))}}e("br",sO);class lO extends wA{get treeGridEx(){return this.view.getController("treegridex")}async call(e,t){return e===ca.TOGGLE_ROW_EDIT?(this.treeGridEx.toggleRowEdit(),null):e===ca.SAVE_ROW?(this.treeGridEx.save(t.data[0]),null):e===ca.SAVE?(this.treeGridEx.saveAll(),null):e===ca.REFRESH?(this.treeGridEx.load(),null):super.call(e,t)}}e("bG",lO);class rO extends iA{get xdataControlName(){return"treegrid"}get treeGrid(){return this.view.getController("treegrid")}async onCreated(){await super.onCreated(),this.view.slotProps.treegrid?Object.assign(this.view.slotProps.treegrid,this.view.slotProps.grid):this.view.slotProps.treegrid=this.view.slotProps.grid}async call(e,t){if(e===ca.EXPAND){const{srfcollapsetag:e}=t.params||{};let a=e||"";if(!a){const{selectedData:e}=this.treeGrid.state,t=e.filter((e=>e.hasChildren));t.length>0&&(a=t[0].srfkey)}if(!a)throw new _t(ibiz.i18n.t("viewEngine.noExpandTag"));return this.treeGrid.changeCollapse({tag:a,expand:!0}),null}if(e===ca.COLLAPSE){const{srfcollapsetag:e}=t.params||{};let a=e||"";if(!a){const{selectedData:e}=this.treeGrid.state,t=e.filter((e=>e.hasChildren));t.length>0&&(a=t[0].srfkey)}if(!a)throw new _t(ibiz.i18n.t("viewEngine.noCollapseTag"));return this.treeGrid.changeCollapse({tag:a,expand:!1}),null}return e===ca.EXPANDALL?(this.treeGrid.changeCollapse({expand:!0}),null):e===ca.COLLAPSEALL?(this.treeGrid.changeCollapse({expand:!1}),null):super.call(e,t)}}e("bH",rO);class cO extends Xo{get xdataControlName(){return"meditviewpanel"}get meditviewpanel(){return this.view.getController("meditviewpanel")}async onCreated(){await super.onCreated(),this.view.slotProps.meditviewpanel||(this.view.slotProps.meditviewpanel={})}async call(e,t){return e===ca.NEW?(await this.meditviewpanel.handleAdd(),null):e===ca.REFRESH?null:super.call(e,t)}}e("bt",cO);class dO extends CA{get expBarName(){return"chartexpbar"}}e("ba",dO);class uO extends Xo{get map(){return this.view.getController("map")}async onCreated(){super.onCreated(),this.view.slotProps.map||(this.view.slotProps.map={})}}e("bs",uO);class pO extends $o{get searchForm(){return this.view.getController("searchform")}get searchBar(){return this.view.getController("searchbar")}get reportpanel(){return this.view.getController("reportpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("searchform","searchbar","reportpanel"),this.view.slotProps.reportpanel||(this.view.slotProps.reportpanel={})}async onMounted(){await super.onMounted();const{model:e}=this.view;this.reportpanel.evt.on("onBeforeLoad",(()=>{this.reportpanel.state.searchParams=this.getSearchParams()})),this.reportpanel.evt.on("onLoadSuccess",(e=>{this.view.evt.emit("onDataChange",{...e,actionType:"LOAD"})}));const t=this.viewLayoutPanel.panelItems.view_searchform;if(t){const a=!!this.searchForm;t.state.keepAlive=a,t.state.visible=a&&!!e.expandSearchForm}this.searchForm&&this.searchForm.evt.on("onSearch",(()=>{this.reLoad()})),this.searchBar&&this.searchBar.evt.on("onSearch",(()=>{this.reLoad()})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}async call(e,t){return e===ca.REFRESH?(await this.refresh(),null):e===ca.SEARCH?(await this.searchForm.search(),null):e===ca.RESET?(await this.searchForm.reset(),null):super.call(e,t)}getData(){return this.reportpanel.getData()}async load(){return this.reportpanel.load()}async reLoad(){await this.reportpanel.load({isInitialLoad:!0})}async refresh(){this.reportpanel.doNextActive((()=>this.load()),{key:"load"})}getSearchParams(){const e={};return this.searchForm&&Object.assign(e,this.searchForm.getFilterParams()),this.searchBar&&Object.assign(e,this.searchBar.getFilterParams()),e}calcViewHeaderVisible(){const e=super.calcViewHeaderVisible();return this.calcViewSearchBarVisible()||e}calcViewSearchBarVisible(){const{model:e}=this.view,t=this.isExistAndInLayout("searchbar");if(!t)return t;const a=vn(e,"searchbar");return!(!a.enableQuickSearch&&!a.enableGroup&&!0!==a.enableFilter)}calcRemoveLayoutModel(){const e=super.calcRemoveLayoutModel();return this.calcViewSearchBarVisible()||e.push("view_searchbar"),e}toggleFilter(){if(this.searchForm){const e=this.viewLayoutPanel.panelItems.view_searchform;e&&(e.state.visible=!e.state.visible)}}}e("bD",pO);class hO extends lO{get gantt(){return this.view.getController("gantt")}async call(e,t){return e===ca.NEW_ROW?(this.gantt.newRow(t),null):e===ca.TOGGLE_ROW_EDIT?(this.gantt.toggleRowEdit(),null):e===ca.SAVE_ROW?(this.gantt.save(t.data[0]),null):e===ca.SAVE?(this.gantt.saveAll(),null):e===ca.REFRESH?(await this.gantt.refresh(),null):super.call(e,t)}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.gantt||(this.view.slotProps.gantt={}),this.view.slotProps.gantt.mdctrlActiveMode=e.mdctrlActiveMode}}e("bm",hO);class mO extends tA{get drbar(){return this.view.getController("drbar")}get routeDepth(){return this.view.modal.routeDepth}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drbar"),this.view.slotProps.drbar||(this.view.slotProps.drbar={}),this.view.slotProps.drbar.showMode="horizontal",this.view.slotProps.drbar.srfnav=this.view.state.srfnav,this.view.slotProps.drbar.hideEditItem=!0}formDataStateChange(e){var t;const{evt:a}=this.view,n=this.form.model.appDataEntityId,o=e.data[0];null==(t=this.toolbar)||t.calcButtonState(o,n,e),o.srfkey&&a.emit("onViewInfoChange",{dataInfo:o.srfmajortext||""})}}e("bf",mO);class vO extends $o{}e("bE",vO);class bO extends yA{get searchForm(){return this.view.getController("searchform")}get searchBar(){return this.view.getController("searchbar")}get tabExpPanel(){return this.view.getController("tabexppanel")}preprocessTabExpModelLayout(){}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("searchform","searchbar")}async onMounted(){await super.onMounted();const e=this.viewLayoutPanel.panelItems.view_searchform;if(e){const t=!!this.searchForm;e.state.keepAlive=t,e.state.visible=t}const t=this.viewLayoutPanel.panelItems.view_searchbar;if(t){const e=this.searchBar&&!(!this.searchBar.model.enableQuickSearch&&!this.searchBar.model.enableGroup&&!0!==this.searchBar.model.enableFilter);t.state.visible=e}if(this.searchForm&&this.searchForm.evt.on("onSearch",(()=>{this.calcViewParams()})),this.searchBar&&this.searchBar.evt.on("onSearch",(()=>{this.calcViewParams()})),this.tabExpPanel){this.tabExpPanel.evt.on("onTabChange",(({tab:e})=>{this.calcViewParams(),this.onQuickSearchPlaceHolder(e)}));const{activeTabViewPanelModel:e}=this.tabExpPanel;e&&this.onQuickSearchPlaceHolder(e)}}async onQuickSearchPlaceHolder(e){let{caption:t}=e;const a=await ibiz.hub.config.view.get(e.embeddedAppDEViewId||""),n=await ibiz.hub.getAppDataEntity(a.appDataEntityId,a.appId);if(n){const e=n.appDEFields.filter((e=>e.enableQuickSearch));if(e.length){const a=[];e.forEach((e=>{e.lnlanguageRes&&e.lnlanguageRes.lanResTag?a.push(ibiz.i18n.t(e.lnlanguageRes.lanResTag,e.logicName)):e.logicName&&a.push(e.logicName)})),a.length>0&&(t=a.join("、"))}}this.searchBar&&(this.searchBar.placeHolder=t||"",this.searchBar.state.quickSearchPlaceHolder=t||"")}async call(e,t){return e===ca.SEARCH?(await this.searchForm.search(),null):e===ca.RESET?(await this.searchForm.reset(),null):e===ca.REFRESH?(await this.calcViewParams(),null):super.call(e,t)}getSearchParams(){const e={};return this.searchForm&&Object.assign(e,this.searchForm.getFilterParams()),this.searchBar&&Object.assign(e,this.searchBar.getFilterParams()),e}calcViewHeaderVisible(){let e=!1;const{model:t}=this.view;return t.showCaptionBar&&(e=!0),ibiz.env.isMob?(this.isExistAndInLayout("lefttoolbar")&&(e=!0),this.isExistAndInLayout("righttoolbar")&&(e=!0)):this.isExistAndInLayout("toolbar")&&(e=!0),e}calcViewParams(){this.tabExpPanel.state.expViewParams=this.getSearchParams(),this.tabExpPanel.refresh()}}e("bF",bO);class gO extends $o{}e("b7",gO);class fO extends $o{}e("bN",fO);class wO extends $o{async onCreated(){await super.onCreated(),ibiz.util.hiddenAppLoading()}}class yO extends $o{async onCreated(){await super.onCreated(),ibiz.util.hiddenAppLoading()}}const CO=e("b0",{install:e=>{ibiz.engine.register("VIEW_APPWFSTEPDATAVIEW",(e=>new fO(e))),ibiz.engine.register("VIEW_AppIndexView",(e=>new rA(e))),ibiz.engine.register("VIEW_APPINDEXVIEW",(e=>new rA(e))),ibiz.engine.register("VIEW_GridView",(e=>new iA(e))),ibiz.engine.register("VIEW_ListView",(e=>new cA(e))),ibiz.engine.register("VIEW_TreeView",(e=>new wA(e))),ibiz.engine.register("VIEW_EditView",(e=>new tA(e))),ibiz.engine.register("VIEW_EditView2",(e=>new aA(e))),ibiz.engine.register("VIEW_EditView3",(e=>new nA(e))),ibiz.engine.register("VIEW_EditView4",(e=>new oA(e))),ibiz.engine.register("VIEW_DataView",(e=>new dA(e))),ibiz.engine.register("VIEW_OptionView",(e=>new uA(e))),ibiz.engine.register("VIEW_PickupGridView",(e=>new mA(e))),ibiz.engine.register("VIEW_PickupTreeView",(e=>new YA(e))),ibiz.engine.register("VIEW_DEPICKUPVIEW2",(e=>new QA(e))),ibiz.engine.register("VIEW_PickupView",(e=>new gA(e))),ibiz.engine.register("VIEW_MPickupView",(e=>new fA(e))),ibiz.engine.register("VIEW_DEMPICKUPVIEW2",(e=>new tO(e))),ibiz.engine.register("VIEW_TabExpView",(e=>new yA(e))),ibiz.engine.register("VIEW_GridExpView",(e=>new IA(e))),ibiz.engine.register("VIEW_ListExpView",(e=>new DA(e))),ibiz.engine.register("VIEW_DataViewExpView",(e=>new EA(e))),ibiz.engine.register("VIEW_ChartView",(e=>new PA(e))),ibiz.engine.register("VIEW_TreeExpView",(e=>new SA(e))),ibiz.engine.register("VIEW_WizardView",(e=>new xA(e))),ibiz.engine.register("VIEW_WFDynaEditView",(e=>new zA(e))),ibiz.engine.register("VIEW_DEWFDYNAEDITVIEW3",(e=>new AA(e))),ibiz.engine.register("VIEW_DEWFDYNAACTIONVIEW",(e=>new NA(e))),ibiz.engine.register("VIEW_DEWFDYNASTARTVIEW",(e=>new RA(e))),ibiz.engine.register("VIEW_APPPORTALVIEW",(e=>new LA(e))),ibiz.engine.register("VIEW_DEPORTALVIEW",(e=>new LA(e))),ibiz.engine.register("VIEW_PortalView9",(e=>new LA(e))),ibiz.engine.register("VIEW_PortalView",(e=>new LA(e))),ibiz.engine.register("VIEW_DEPANELVIEW",(e=>new jA(e))),ibiz.engine.register("VIEW_APPPANELVIEW",(e=>new jA(e))),ibiz.engine.register("VIEW_DECUSTOMVIEW",(e=>new UA(e))),ibiz.engine.register("VIEW_DEMDCUSTOMVIEW",(e=>new GA(e))),ibiz.engine.register("VIEW_DEPICKUPDATAVIEW",(e=>new JA(e))),ibiz.engine.register("VIEW_PickupDataView",(e=>new JA(e))),ibiz.engine.register("VIEW_DEINDEXPICKUPDATAVIEW",(e=>new JA(e))),ibiz.engine.register("VIEW_DECALENDARVIEW",(e=>new ZA(e))),ibiz.engine.register("VIEW_CalendarExpView",(e=>new eO(e))),ibiz.engine.register("VIEW_FormPickupDataView",(e=>new nO(e))),ibiz.engine.register("VIEW_KanBanView",(e=>new aO(e))),ibiz.engine.register("VIEW_APPLOGINVIEW",(e=>new sO(e))),ibiz.engine.register("VIEW_TreeGridExView",(e=>new lO(e))),ibiz.engine.register("VIEW_DETREEGRIDVIEW",(e=>new rO(e))),ibiz.engine.register("VIEW_DECHARTEXPVIEW",(e=>new dO(e))),ibiz.engine.register("VIEW_DEGANTTVIEW",(e=>new hO(e))),ibiz.engine.register("VIEW_DESUBAPPREFVIEW",(e=>new vO(e))),ibiz.engine.register("VIEW_APPDATAUPLOADVIEW",(e=>new gO(e))),ibiz.engine.register("VIEW_APPSTARTVIEW",(e=>new wO(e))),ibiz.engine.register("VIEW_APPWELCOMEVIEW",(e=>new yO(e))),ibiz.engine.register("VIEW_GridView9",(e=>new iA(e))),ibiz.engine.register("VIEW_ListView9",(e=>new cA(e))),ibiz.engine.register("VIEW_EditView9",(e=>new tA(e))),ibiz.engine.register("VIEW_DataView9",(e=>new dA(e))),ibiz.engine.register("VIEW_TreeView9",(e=>new wA(e))),ibiz.engine.register("VIEW_DETABEXPVIEW9",(e=>new yA(e))),ibiz.engine.register("VIEW_PortalView9",(e=>new LA(e))),ibiz.engine.register("VIEW_DEPORTALVIEW9",(e=>new LA(e))),ibiz.engine.register("VIEW_DEMEDITVIEW9",(e=>new cO(e))),ibiz.engine.register("VIEW_DEMAPVIEW",(e=>new uO(e))),ibiz.engine.register("VIEW_DEREPORTVIEW",(e=>new pO(e))),ibiz.engine.register("VIEW_DEINDEXVIEW",(e=>new mO(e))),ibiz.engine.register("VIEW_DETABSEARCHVIEW",(e=>new bO(e)))}});var IO=Object.defineProperty,DO=(e,t,a)=>(((e,t,a)=>{t in e?IO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);const EO=e("i",os({legacy:!1,locale:"zh-CN"}));const SO=new class{constructor(){DO(this,"html"),DO(this,"defaultLang"),DO(this,"langMap",new Map),this.defaultLang="zh-CN",this.html=document.querySelector("html");const e=localStorage.getItem("language")||navigator.language||this.defaultLang;EO.global.locale.value=e,this.html.setAttribute("lang",e),this.langMap.set("en",(()=>t.import("./index-mjpFeLkH.js"))),this.langMap.set("zh-CN",(()=>t.import("./index-pz3nYBld.js")))}async init(){const e=EO.global.locale.value;let t;t=this.langMap.has(e)?this.langMap.get(e):this.langMap.get(this.defaultLang);const a=await t();EO.global.setLocaleMessage(EO.global.locale.value,a.default)}setLangConfigs(e){Object.keys(e).forEach((t=>{this.langMap.set(t,e[t])}))}setLang(e){ibiz.confirm.warning({title:"提示",desc:"切换语言需要刷新页面,确认切换?"}).then((t=>{t&&(localStorage.setItem("language",e),window.location.reload())}))}getLang(){return this.html.getAttribute("lang")||this.defaultLang}t(e,t,a){return EO.global.t(e,t,a)}mergeLocaleMessage(e,t){if("string"==typeof e){const a=e;EO.global.mergeLocaleMessage(a,t)}else{const t=e;t&&Object.keys(t).length>0&&Object.keys(t).forEach((e=>{EO.global.mergeLocaleMessage(e,t[e])}))}}};var xO=Object.defineProperty,PO=(e,t,a)=>(((e,t,a)=>{t in e?xO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kO{constructor(e){PO(this,"isFullCode",!1),PO(this,"customModelLoader"),this.isFullCode=(null==e?void 0:e.isFullCode)||!1,this.customModelLoader=(null==e?void 0:e.customModelLoader)||void 0,this.customModelLoader&&ibiz.hub.registerModelLoaderProvider(this.customModelLoader)}async verify(e,t=!0){if(t){let t=!0;try{ibiz.env.enableAnonymous?await this.anonymousValidate(e):await this.appInit(e)}catch(e){t=!1,e.tag="APPINIT",ibiz.util.error.handle(e)}return t}return await this.initModel(e,!1),!0}async anonymousValidate(e){const t=ibiz.auth.getAuthInfo();if(t&&!t.isAnonymous)try{return void await this.appInit(e)}catch(t){const{status:a}=t;if(401!==a)throw t;if($t(Jt.REFRESH_TOKEN))return await ibiz.auth.refreshToken(),void await this.appInit(e);ibiz.auth.clearAuthData()}if(null==t?void 0:t.token){try{await this.appInit(e)}catch(t){const{status:a}=t;if(401!==a)throw t;if(!await ibiz.auth.anonymousLogin())throw new _t(ibiz.i18n.t("webApp.authGuard.loginFailed"));await this.appInit(e)}return}await this.initModel(e,!1);const a=window.location.hash.split("/"),n=a[a.length-2];let o;try{o="#"===n&&ibiz.hub.defaultPage?await ibiz.hub.getAppView(ibiz.hub.defaultPage.id):await ibiz.hub.getAppView(n)}catch(e){ibiz.log.error(e)}if(!o)return ibiz.log.error("找不到视图模型".concat(n,",请确保该视图配置了匿名访问和用户引用")),void this.throw401();if(3===o.accUserMode){if(!t){if(!await ibiz.auth.anonymousLogin())throw new _t(ibiz.i18n.t("webApp.authGuard.loginFailed"))}await this.appInit(e)}else this.throw401()}async appInit(e){await gt.beforeInitApp.call({context:e});try{!0===ibiz.env.isSaaSMode&&await this.loadOrgData(),await this.loadAppData(e),await gt.authedApp.call({context:e})}catch(t){const a=t.status,n=$t(Jt.TOKEN_REMEMBER),o=$t(Jt.REFRESH_TOKEN);if(401!==a||!n||null==o||""===o)throw t;try{await ibiz.auth.refreshToken(),!0===ibiz.env.isSaaSMode&&await this.loadOrgData(),await this.loadAppData(e),await gt.authedApp.call({context:e})}catch(e){throw t}}await this.initModel(e),await ibiz.auth.extendLogin(e),await ibiz.hub.notice.init(),await ibiz.util.theme.initCustomTheme()}async initModel(e,t=!0){}async loadAppData(e){let t;t=e&&Object.keys(e).length>0?await ibiz.net.get("/appdata",e):await ibiz.net.get("/appdata"),t.ok&&(ibiz.appData=t.data,Zi())}async loadOrgData(){const e=await ibiz.net.get("/uaa/getbydcsystem/".concat(ibiz.env.dcSystem));if(e.ok){const t=e.data;if(t){const[e]=t;ibiz.orgData=e}}}async initTheme(e){const a=await t.import("@ibiz-template/web-theme"),n=a.default||a;gt.useComponent.callSync(null,n),e.appUIThemes&&await this.loadTheme()}async loadTheme(){const e=ibiz.hub.getApp().model.appUIThemes||[];if(e.length>0){const t=e.filter((e=>e.themeParams&&"true"!==e.themeParams["icon-theme"]));if(t.length>0){const e=t[0];await ibiz.util.theme.loadTheme(e)}const a=e.filter((e=>e.themeParams&&"true"===e.themeParams["icon-theme"]));if(a.length>0){const e=a[0];await ibiz.util.theme.loadTheme(e,"ICON")}}}async initEnvironment(e){const t=e.userParam;t&&(Object.keys(t).forEach((e=>{const a=ibiz.util.rawValue.format(t[e]),n=e.split(".");let o=ibiz.env;for(let e=0;e<n.length;e++){const t=n[e];e===n.length-1?o[t]=a:(o[t]=o[t]||{},o=o[t])}})),ibiz.env.globalConfig&&(ibiz.config=gi(ibiz.config,ibiz.env.globalConfig)),ibiz.log.setLevel(ibiz.env.logLevel))}throw401(){throw new ea({response:{status:401,statusText:ibiz.i18n.t("webApp.authGuard.noPermission")}})}}e("c4",kO);var TO=Object.defineProperty,zO=(e,t,a)=>(((e,t,a)=>{t in e?TO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class AO extends kO{constructor(){super(...arguments),zO(this,"hasModelInit",!1),zO(this,"noPermissionModel",!1)}async initModel(e,a=!0){if(!this.hasModelInit||this.hasModelInit&&this.noPermissionModel!==a){ibiz.hub.reset();const n=new is((async(e,t)=>(await ibiz.net.get("".concat(ibiz.env.remoteModelUrl).concat(e),t,a?{}:{srfdcsystem:ibiz.env.dcSystem})).data),ibiz.env.appId,e,a),o=await n.getAppModel();await this.initEnvironment(o);const i=await ibiz.hub.getAppAsync(ibiz.env.appId);await gt.initedApp.call({context:e,app:i});const s=i.model;if(ibiz.env.isMob=!0===s.mobileApp,ibiz.env.isEnableMultiLan){const e=ibiz.i18n.getLang(),t=(await n.getPSAppLang(e.replace("-","_").toUpperCase())).languageItems||[],a={};t.forEach((e=>{a[e.lanResTag]=e.content})),EO.global.mergeLocaleMessage(e,a)}const l=await t.import("@ibiz-template/web-theme"),r=l.default||l;gt.useComponent.callSync(null,r),ibiz.config.theme&&ibiz.util.theme.setTheme(ibiz.config.theme),s.appUIThemes&&await this.loadTheme(),i.model.title&&ibiz.util.setBrowserTitle("")}this.noPermissionModel=a,this.hasModelInit=!0}}
9
- /*! Element Plus v2.4.4 */var OO={name:"zh-cn",el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"}}},MO=e("I",{install:e=>{ibiz.i18n=SO,ibiz.util.getExcelUtil=()=>t.import("./xlsx-util-l4u_wJSg.js"),Qo("404",(()=>({component:Fz}))),Qo("403",(()=>({component:Uz}))),e.use(_c),e.use(kx),e.use(CO),e.use(ft),e.use(wt),e.use(yt),e.use(Yz),e.use(Ct),e.use(Zz),e.use(pv),e.use(wv),e.use($c),e.use(ad),e.use(nu),e.use(Nw),e.use(ru),e.use(Sb),e.use(Ev),e.use(tv),e.use(It),e.use(Dt),e.use(qm),e.use(Fv),e.use(Jv),e.use(Wv),e.use(vu),e.use(Um),e.use(sv),e.use(Tv),e.use(_v),e.use(Cb),e.use(Ab),e.use(jb),e.use(Xb),e.use(pf),e.use(ow),e.use(ab),e.use(pw),e.use(Tw),e.use(jw),e.use(lb),e.use(qw),e.use(ty),e.use(sy),e.use(uy),e.use(by),e.use(Vz)}});function NO(e,a){const n=v(e,a);n.component("KeepAlive",M),n.config.errorHandler=function(e){ibiz.util.error.handle(e)};const o=(e,t,a)=>{n.use(t,a)};gt.useComponent.tap(o);t.import("@ibiz-template-plugin/bi-report").then((e=>{const t=e.default;gt.useComponent.callSync(null,t),gt.createApp.tap(((e,a)=>{a.use(t)}))}));if(t.import("@ibiz-template-plugin/data-view").then((e=>{const t=e.default;gt.useComponent.callSync(null,t),gt.createApp.tap(((e,a)=>{a.use(t)}))})),a){const e=a.unmounted;a.unmounted=()=>{e(),gt.useComponent.removeTap(o)}}return n.use(EO),n.use(ri,{locale:OO}),n.use(Et),n.use(MO),gt.createApp.callSync(null,n),ibiz.plugin.register(n),n}const BO=new Map([["baseUrl","BaseUrl"],["remoteModelUrl","remoteDynaPath"],["dcSystem","mockDcSystemId"],["enablePermission","enablePermissionValid"],["enableTitle","enableTitle"]]);async function _O(){const e=window.Environment,t=Fi.parse(window.location.search,{ignoreQueryPrefix:!0});if(Object.keys(ibiz.env).forEach((t=>{const a=BO.has(t)?BO.get(t):t;null!=e[a]&&(ibiz.env[t]="customParams"===a||"devtoolConfig"===a?JSON.parse(e[a]):e[a])})),t&&t.srfdcsystem&&(ibiz.env.dcSystem=t.srfdcsystem),e.AppLabel&&(document.title=e.AppLabel),e.favicon){const t=document.getElementById("favicon");if(t){const a=e.favicon;a.endsWith(".png")?t.type="image/png":a.endsWith(".ico")?t.type="image/x-icon":a.endsWith(".gif")?t.type="image/gif":a.endsWith(".svg")&&(t.type="image/svg+xml"),t.href=a}}e.globalConfig&&(ibiz.env.globalConfig=e.globalConfig,ibiz.config=gi(ibiz.config,e.globalConfig)),ibiz.log.setLevel(ibiz.env.logLevel)}var RO=a({setup(){const e=new sa({mode:la.ROUTE,viewUsage:1,routeDepth:1}),t=()=>{window.removeEventListener("unload",t),ibiz.hub.destroy()};let a;return window.addEventListener("unload",t),d((()=>{gt.initedApp.tapPromise((async({context:e})=>{var t;null==a||a(),a=ibiz.util.watermark.mount(ibiz.config.watermark,void 0,{...e,...null==(t=ibiz.appData)?void 0:t.context})}))})),m((()=>{null==a||a()})),p((()=>{t(),gt.destoryApp.call(null)})),{modal:e}},render(){return o(i("router-view"),{modal:this.modal},null)}}),LO=Object.defineProperty,jO=(e,t,a)=>(((e,t,a)=>{t in e?LO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class VO{constructor(){jO(this,"hasPermErrPending",!1)}match(e){return e instanceof ea&&(401===e.status||403===e.status)}async oauthLogin(){window.location.href.indexOf("srfthird_auth_success=false")>=0&&(ibiz.log.debug("获取OAUTH的token失败,跳转正常登录页"),this.normalLogin());(await ibiz.thirdAuth.auth("OAUTH","THIRD")).ok||(ibiz.log.debug("获取OAUTH重定向地址失败,跳转正常登录页"),this.normalLogin())}async casLogin(){if(!ibiz.env.casLoginUrl)throw new _t(ibiz.i18n.t("webApp.unauthorizedHandler.noFoundEnvParams"));const{origin:e}=window.location,t="".concat(e).concat(ibiz.env.baseUrl),a="".concat(t,"/cas/v7/login").concat(Fi.stringify({RU:Ot.fullPath,base:t},{addQueryPrefix:!0})),n=-1!==ibiz.env.casLoginUrl.indexOf("?"),o=ibiz.env.casLoginUrl+(n?"&":"?")+Fi.stringify({service:a},{addQueryPrefix:!1});window.location.href=o}async normalLogin(){const e=window.location.hash.replace("#",""),t="".concat(Ot.routeBase,"/login?ru=").concat(encodeURIComponent(e));document.body.style.display="none",window.location.href=t,window.location.reload()}async handle403(e){if("APPINIT"===e.tag){if(this.hasPermErrPending)return;this.hasPermErrPending=!0;const e=await ibiz.confirm.warning({title:ibiz.i18n.t("webApp.unauthorizedHandler.forbiddenAccess"),desc:ibiz.i18n.t("webApp.unauthorizedHandler.logoutAccount")});if(this.hasPermErrPending=!1,e){await ibiz.hub.controller.logout()&&window.location.reload()}}else ibiz.mc.error.send(e)}handle(e){if(e instanceof ea){if(401===e.status){return(Fi.parse(window.location.search.replace("?","")).isAnonymous||ibiz.env.enableAnonymous)&&"APPINIT"!==e.tag?ibiz.auth.anonymousLogin().then((e=>{e&&window.location.reload()})):ibiz.env.loginMode===aa.CAS?this.casLogin():ibiz.env.loginMode===aa.OAUTH?this.oauthLogin():this.normalLogin(),!0}if(403===e.status)return this.handle403(e),!0}}}var FO={exports:{}};
10
- /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
11
- * @license MIT */!function(e,t){e.exports=function(){var e,t,a={version:"0.2.0"},n=a.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(e,t,a){return e<t?t:e>a?a:e}function i(e){return 100*(-1+e)}function s(e,t,a){var o;return(o="translate3d"===n.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===n.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+a,o}a.configure=function(e){var t,a;for(t in e)void 0!==(a=e[t])&&e.hasOwnProperty(t)&&(n[t]=a);return this},a.status=null,a.set=function(e){var t=a.isStarted();e=o(e,n.minimum,1),a.status=1===e?null:e;var i=a.render(!t),c=i.querySelector(n.barSelector),d=n.speed,u=n.easing;return i.offsetWidth,l((function(t){""===n.positionUsing&&(n.positionUsing=a.getPositioningCSS()),r(c,s(e,d,u)),1===e?(r(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout((function(){r(i,{transition:"all "+d+"ms linear",opacity:0}),setTimeout((function(){a.remove(),t()}),d)}),d)):setTimeout(t,d)})),this},a.isStarted=function(){return"number"==typeof a.status},a.start=function(){a.status||a.set(0);var e=function(){setTimeout((function(){a.status&&(a.trickle(),e())}),n.trickleSpeed)};return n.trickle&&e(),this},a.done=function(e){return e||a.status?a.inc(.3+.5*Math.random()).set(1):this},a.inc=function(e){var t=a.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),a.set(t)):a.start()},a.trickle=function(){return a.inc(Math.random()*n.trickleRate)},e=0,t=0,a.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&a.start(),e++,t++,n.always((function(){0==--t?(e=0,a.done()):a.set((e-t)/e)})),this):this},a.render=function(e){if(a.isRendered())return document.getElementById("nprogress");d(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=n.template;var o,s=t.querySelector(n.barSelector),l=e?"-100":i(a.status||0),c=document.querySelector(n.parent);return r(s,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),n.showSpinner||(o=t.querySelector(n.spinnerSelector))&&h(o),c!=document.body&&d(c,"nprogress-custom-parent"),c.appendChild(t),t},a.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(n.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&h(e)},a.isRendered=function(){return!!document.getElementById("nprogress")},a.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var a=e.shift();a&&a(t)}return function(a){e.push(a),1==e.length&&t()}}(),r=function(){var e=["Webkit","O","Moz","ms"],t={};function a(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function n(t){var a=document.body.style;if(t in a)return t;for(var n,o=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((n=e[o]+i)in a)return n;return t}function o(e){return e=a(e),t[e]||(t[e]=n(e))}function i(e,t,a){t=o(t),e.style[t]=a}return function(e,t){var a,n,o=arguments;if(2==o.length)for(a in t)void 0!==(n=t[a])&&t.hasOwnProperty(a)&&i(e,a,n);else i(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function d(e,t){var a=p(e),n=a+t;c(a,t)||(e.className=n.substring(1))}function u(e,t){var a,n=p(e);c(e,t)&&(a=n.replace(" "+t+" "," "),e.className=a.substring(1,a.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function h(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return a}()}(FO);var UO=Sz(FO.exports);const HO=a({name:"ModalRouterShell",props:{modal:{type:Object,required:!0}},setup(e){const t=Yi(),a=Xi(),o=n(!1),i=n({}),s=[],l=e.modal.routeDepth;let r=null;p((()=>{o.value=!0,r&&(r.dismiss(),r=null),(()=>{if(i.value.context){const{context:e}=k(i.value);e&&e.destroy()}})()}));const c=async e=>{var t;if(i.value=await St(e,l,!0),o.value)return;i.value.context instanceof Nt||(i.value.context=Nt.create(i.value.context));const n=e.params.modalView,c=e.params.modalParams;if(c&&"-"!==c){const e=Fi.parse(c,{strictNullHandling:!0,delimiter:";"});if(e.srfnavctx){const t=JSON.parse(decodeURIComponent(e.srfnavctx));Object.assign(i.value.context,t),delete e.srfnavctx}e.srfnav&&(i.value.srfnav=e.srfnav,delete e.srfnav),bi(e)||(i.value.params?Object.assign(i.value.params,e):i.value.params=e)}if(!i.value.context){const e=Nt.create({});i.value.context=e}let d,u=i.value.viewConfig;try{u||(u=await ibiz.hub.config.view.get(n)),d=xt({context:i.value.context,params:i.value.params,viewId:u.id})}catch(e){d=Fz}const p={width:(null==u?void 0:u.width)||"80%",height:(null==u?void 0:u.height)||"80%",footerHide:!0,isRouteModal:!0};r=ibiz.overlay.createModal(d,void 0,p),r.present(),s.push(e.fullPath);const h=await r.onWillDismiss();if(r=null,!1===o.value){const n=s.indexOf(e.fullPath);if(-1!==n&&s.splice(n,1),null==(t=window.history.state)?void 0:t.back)a.back();else{const t=e.path,n=t.indexOf("/".concat(mo.ROUTE_MODAL_TAG,"/"));a.replace(t.substring(0,n))}R.close(a.currentRoute.value.fullPath,h||{ok:!1})}};return $i(((e,t)=>{if(!o.value&&s.length>0&&-1!==s.indexOf(t.fullPath)&&-1===s.indexOf(e.fullPath)){const t=K(e).pathNodes,a=t[t.length-1];a&&a.viewName===mo.ROUTE_MODAL_TAG&&c(e)}})),c(t),{}},render:()=>o("div",{style:"position: absolute;width: 0;height: 0;"},null)}),qO=a({name:"RouterShell",props:{modal:{type:Object,required:!0}},setup(e){var t;const a=Yi(),o=Xi(),i=n({}),s=n(!1),l=n(!0),r=()=>{if(i.value.context){const{context:e}=k(i.value);e&&e.destroy()}},d=null==(t=e.modal)?void 0:t.routeDepth;p((()=>{r()}));const u=async()=>{if(d)try{const e=await St(a,d),t=Nt.create(e.context);i.value={...e,context:t},s.value=!0}catch(e){o.push({name:"errorView".concat(d),params:{code:"404"}})}};u(),c((()=>a.params.view1),(()=>{1===d&&(r(),u())}));const h=new sa({mode:la.ROUTE,routeDepth:(d||0)+1});return D((()=>{l.value=!0})),E((()=>{l.value=!1})),{routeModal:h,route:a,viewData:i,isLoaded:s,isActivated:l}},render(){if(!this.isLoaded)return null;const{context:e,params:t,srfnav:a,viewConfig:n}=this.viewData,s=vi({...this.$props,...this.$attrs,context:e,params:t,viewId:n.id,key:n.codeName},{state:{srfnav:a}});return o(N,null,[r(i("IBizViewShell"),s,this.$slots),this.isActivated&&o(i("router-view"),{key:n.codeName,name:mo.ROUTE_MODAL_TAG,modal:this.routeModal},null)])}});function GO(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!s(e)}const WO=a({setup(){const e=B("share-view"),t=Yi(),a=n(!1),o=n(!1),i=n({});let s={},l="";d((async()=>{const e=t.query;l=window.atob(e.shareThemeId),i.value={userId:e.shareUserId,userName:e.shareUserName},ibiz.util.hiddenAppLoading(),await ibiz.util.theme.initCustomTheme(!1),await(async()=>{const{userId:e}=i.value;s=await ibiz.util.theme.getShareTheme(e,l),s&&ibiz.util.theme.previewCustomTheme(s.themeTag,s.themeVars)})(),o.value=!0}));return{ns:e,loading:a,isMounted:o,shareUser:i,handleApply:async()=>{},handleCancel:()=>{}}},render(){let e,t;if(this.isMounted)return o("div",{class:this.ns.b()},[o("div",{class:this.ns.b("box")},[o("header",{class:this.ns.b("box-header")},[o("img",{src:"./assets/images/login-header.png"},null),o("div",{class:this.ns.b("box-header-title")},[o("div",null,[this.shareUser.userName]),ibiz.i18n.t("view.shareView.inviting")])]),o("main",{class:this.ns.b("box-main")},[o("div",{class:this.ns.b("box-main-content")},[o(i("el-button"),{onClick:this.handleApply,size:"large",round:!0,loading:this.loading},GO(e=ibiz.i18n.t("view.shareView.use"))?e:{default:()=>[e]}),o(i("el-button"),{onClick:this.handleCancel,size:"large",round:!0},GO(t=ibiz.i18n.t("view.shareView.cancel"))?t:{default:()=>[t]})])])])])}});var KO=Object.defineProperty,YO=(e,t,a)=>(((e,t,a)=>{t in e?KO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class XO{static setAuthGuard(e){this.authGuard=e}static getAppContext(e){let t={};return e.params.appContext&&e.params.appContext!==ibiz.env.routePlaceholder&&(t=Fi.parse(e.params.appContext,{strictNullHandling:!0,delimiter:";"})),t}static getRouter(){const e=ibiz.env.routePlaceholder,t="[^/]+=[^/]+|".concat(e),a="[^=/]+";return this.router||(this.router=Ji({history:Qi(),routes:[{path:"/",redirect:"/".concat(e,"/index/").concat(e)},{path:"/login",name:"loginView",beforeEnter:async(e,t,a)=>{await this.authGuard(this.getAppContext(e),!1),a()},component:Hz},{path:"/share",name:"shareView",beforeEnter:async(e,t,a)=>{await this.authGuard(this.getAppContext(e))?a():a(!1)},component:WO},{path:"/error/:code",name:"errorView1",component:eA},{path:"/appredirectview",name:"appRedirectView",beforeEnter:async(e,t,a)=>{await this.authGuard(this.getAppContext(e))?a():a(!1)},component:Pt},{path:"/:appContext(".concat(t,")/:view1(").concat(a,")/:params1(").concat(t,")"),beforeEnter:async(e,t,a)=>{await this.authGuard(this.getAppContext(e))?a():a(!1)},component:qO,children:[{path:"error/:code",name:"errorView2",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view2(".concat(a,")/:params2(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView3",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view3(".concat(a,")/:params3(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView4",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view4(".concat(a,")/:params4(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView5",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view5(".concat(a,")/:params5(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView6",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view6(".concat(a,")/:params6(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView7",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view7(".concat(a,")/:params7(").concat(t,")"),component:qO,children:[{path:"error/:code",name:"errorView8",component:eA},{path:"".concat(mo.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[mo.ROUTE_MODAL_TAG]:HO}},{path:":view8(".concat(a,")/:params8(").concat(t,")"),component:qO},{path:":pathMatch(.*)*",redirect:{name:"errorView8"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView7"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView6"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView5"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView4"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView3"}}]},{path:":pathMatch(.*)*",redirect:{name:"errorView2"}}]},{path:"/:pathMatch(.*)*",redirect:{name:"errorView1"}}]}),this.router.beforeEach(((e,t,a)=>{UO.configure({showSpinner:!1}),UO.start(),a()})),this.router.afterEach((()=>{UO.done()}))),this.router}}e("c6",XO),YO(XO,"router"),YO(XO,"authGuard")}}}));