@ibiz-template/vue3-components 0.7.29-alpha.0 → 0.7.29

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 (44) hide show
  1. package/dist/index-dIj05Kls.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{xlsx-util-jxc7ylyH.js → xlsx-util-bhQVAaEM.js} +1 -1
  5. package/es/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.css +1 -0
  6. package/es/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.d.ts +9 -0
  7. package/es/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.mjs +87 -0
  8. package/es/common/fullscreen-toolbar/fullscreen-toolbar.css +1 -0
  9. package/es/common/fullscreen-toolbar/fullscreen-toolbar.d.ts +13 -0
  10. package/es/common/fullscreen-toolbar/fullscreen-toolbar.mjs +244 -0
  11. package/es/common/index.mjs +2 -0
  12. package/es/common/pagination/pagination.mjs +1 -1
  13. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +1 -0
  14. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +6 -0
  15. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  16. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +3 -2
  17. package/es/control/grid/grid/grid.mjs +1 -1
  18. package/es/editor/span/span/span.mjs +18 -9
  19. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +2 -1
  20. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +14 -5
  21. package/es/index.mjs +1 -0
  22. package/es/util/fullscreen/fullscreen-util.d.ts +25 -0
  23. package/es/util/fullscreen/fullscreen-util.mjs +43 -0
  24. package/es/util/index.d.ts +1 -0
  25. package/es/util/index.mjs +1 -0
  26. package/es/web-app/main.mjs +2 -0
  27. package/lib/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.cjs +89 -0
  28. package/lib/common/fullscreen-toolbar/fullscreen-toolbar-alarm-clock/fullscreen-toolbar-alarm-clock.css +1 -0
  29. package/lib/common/fullscreen-toolbar/fullscreen-toolbar.cjs +246 -0
  30. package/lib/common/fullscreen-toolbar/fullscreen-toolbar.css +1 -0
  31. package/lib/common/index.cjs +2 -0
  32. package/lib/common/pagination/pagination.cjs +1 -1
  33. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +6 -0
  34. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +3 -2
  35. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  36. package/lib/control/grid/grid/grid.cjs +1 -1
  37. package/lib/editor/span/span/span.cjs +18 -9
  38. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +14 -5
  39. package/lib/index.cjs +2 -0
  40. package/lib/util/fullscreen/fullscreen-util.cjs +45 -0
  41. package/lib/util/index.cjs +2 -0
  42. package/lib/web-app/main.cjs +2 -0
  43. package/package.json +5 -5
  44. package/dist/index-5QrDXG59.js +0 -4
@@ -1,4 +0,0 @@
1
- System.register(["vue","@ibiz-template/vue3-util","@ibiz-template/core","@ibiz-template/runtime","qx-util","dayjs","ramda","qs","vuedraggable","vue-router","lodash-es","@floating-ui/dom","element-plus","interactjs","axios","dayjs/plugin/customParseFormat","@wangeditor/editor","vue-i18n","@ibiz-template/model-helper"],(function(e,t){"use strict";var a,n,o,s,i,l,r,c,d,u,p,h,m,b,v,w,g,f,y,C,I,P,D,E,k,x,z,S,T,_,O,B,j,A,N,R,M,L,V,F,U,q,G,H,W,K,X,$,Y,J,Q,Z,ee,te,ae,ne,oe,se,ie,le,re,ce,de,ue,pe,he,me,be,ve,we,ge,fe,ye,Ce,Ie,Pe,De,Ee,ke,xe,ze,Se,Te,_e,Oe,Be,je,Ae,Ne,Re,Me,Le,Ve,Fe,Ue,qe,Ge,He,We,Ke,Xe,$e,Ye,Je,Qe,Ze,et,tt,at,nt,ot,st,it,lt,rt,ct,dt,ut,pt,ht,mt,bt,vt,wt,gt,ft,yt,Ct,It,Pt,Dt,Et,kt,xt,zt,St,Tt,_t,Ot,Bt,jt,At,Nt,Rt,Mt,Lt,Vt,Ft,Ut,qt,Gt,Ht,Wt,Kt,Xt,$t,Yt,Jt,Qt,Zt,ea,ta,aa,na,oa,sa,ia,la,ra,ca,da,ua,pa,ha,ma,ba,va,wa,ga,fa,ya,Ca,Ia,Pa,Da,Ea,ka,xa,za,Sa,Ta,_a,Oa,Ba,ja,Aa,Na,Ra,Ma,La,Va,Fa,Ua,qa,Ga,Ha,Wa,Ka,Xa,$a,Ya,Ja,Qa,Za,en,tn,an,nn,on,sn,ln,rn,cn,dn,un,pn,hn,mn,bn,vn,wn,gn,fn,yn,Cn,In,Pn,Dn,En,kn,xn,zn,Sn,Tn,_n,On,Bn,jn,An,Nn,Rn,Mn,Ln,Vn,Fn,Un,qn,Gn,Hn,Wn,Kn,Xn,$n,Yn,Jn,Qn,Zn,eo,to,ao,no,oo,so,io,lo,ro,co,uo,po,ho,mo,bo,vo,wo,go,fo,yo,Co,Io,Po,Do,Eo,ko,xo,zo,So,To,_o,Oo,Bo,jo,Ao,No,Ro,Mo,Lo,Vo,Fo,Uo,qo,Go,Ho,Wo,Ko,Xo,$o,Yo,Jo,Qo,Zo,es,ts,as,ns,os,ss;return{setters:[function(e){a=e.defineComponent,n=e.ref,o=e.createVNode,s=e.resolveComponent,i=e.isVNode,l=e.computed,r=e.h,c=e.watch,d=e.onMounted,u=e.nextTick,p=e.onBeforeUnmount,h=e.withDirectives,m=e.vShow,b=e.mergeProps,v=e.createTextVNode,w=e.resolveDirective,g=e.reactive,f=e.getCurrentInstance,y=e.vModelText,C=e.onUnmounted,I=e.defineAsyncComponent,P=e.watchEffect,D=e.renderSlot,E=e.toRaw,k=e.onActivated,x=e.warn,z=e.inject,S=e.createApp,T=e.KeepAlive,_=e.onDeactivated,O=e.Fragment},function(e){B=e.useNamespace,j=e.IBizControlBase,A=e.IBizIcon,N=e.IBizRouterView,R=e.IBizViewShell,M=e.IBizControlShell,L=e.IBizCodeList,V=e.IBizBadge,F=e.useControlController,U=e.withInstall,q=e.useCodeListListen,G=e.useClickOutside,H=e.useEventListener,W=e.routerCallback,K=e.generateRoutePath,X=e.generateRoutePathByModal,$=e.openViewModal,Y=e.openViewPopover,J=e.getDrawerPlacement,Q=e.openViewDrawer,Z=e.OverlayPopoverContainer,ee=e.useUIStore,te=e.OverlayContainer,ae=e.useController,ne=e.useCtx,oe=e.getNestedRoutePath,se=e.route2routePath,ie=e.onRouteChange,le=e.useLocalCacheKey,re=e.ControlLoadingPlaceholder,ce=e.routePath2string,de=e.PanelContainerController,ue=e.IBizPanelContainer,pe=e.IBizPanelCtrlPos,he=e.IBizScrollContainer,me=e.IBizNavPos,be=e.IBizSingleDataContainer,ve=e.IBizMultiDataContainer,we=e.IBizPanelField,ge=e.IBizPanelRawItem,fe=e.IBizGridContainer,ye=e.IBizPanelTabPage,Ce=e.IBizPanelContainerGroup,Ie=e.IBizPanelContainerImage,Pe=e.IBizPanelItemRender,De=e.IBizTeleportPlaceholder,Ee=e.IBizPanelContainerTabs,ke=e.getSpanProps,xe=e.useFocusAndBlur,ze=e.getEditorEmits,Se=e.getInputProps,Te=e.getInputNumberProps,_e=e.getInputIpProps,Oe=e.getDropdownProps,Be=e.getCheckboxProps,je=e.useAutoFocusBlur,Ae=e.getCheckboxListProps,Ne=e.getRadioProps,Re=e.getDatePickerProps,Me=e.getRawProps,Le=e.getStepperProps,Ve=e.getRateProps,Fe=e.getSwitchProps,Ue=e.getSliderProps,qe=e.getListBoxProps,Ge=e.getAutoCompleteProps,He=e.getUploadProps,We=e.getDataPickerProps,Ke=e.renderString,Xe=e.getNumberRangeProps,$e=e.getDateRangeProps,Ye=e.getCodeProps,Je=e.getArrayProps,Qe=e.getCascaderProps,Ze=e.getColorPickerProps,et=e.useViewController,tt=e.AppHooks,at=e.IBizView,nt=e.IBizPortalView,ot=e.IBizDeRedirectView,st=e.IBizViewLayoutPanelControl,it=e.IBizPanelControl,lt=e.piniaInstance,rt=e.parseRouteViewData,ct=e.createOverlayView,dt=e.AppRedirectView,ut=e.useAppStore,pt=e.PluginFactory},function(e){ht=e.showTitle,mt=e.CoreConst,bt=e.RuntimeError,vt=e.listenJSEvent,wt=e.Namespace,gt=e.calcOpenModeStyle,ft=e.NOOP,yt=e.recursiveIterate,Ct=e.ModelError,It=e.mergeInLeft,Pt=e.clone,Dt=e.downloadFileFromBlob,Et=e.IBizContext,kt=e.DataTypes,xt=e.isEmoji,zt=e.base64ToStr,St=e.RuntimeModelError,Tt=e.strToBase64,_t=e.HttpError,Ot=e.UrlHelper,Bt=e.LoginMode,jt=e.install},function(e){At=e.calcContentAlignStyle,Nt=e.downloadImportTemplate,Rt=e.selectAndImport,Mt=e.getDefaultDataImport,Lt=e.getImportSchema,Vt=e.updateImportSchema,Ft=e.createImportSchema,Ut=e.asyncImportData2,qt=e.fetchImportSchemas,Gt=e.deleteImportSchema,Ht=e.findChildFormDetails,Wt=e.AppMenuController,Kt=e.ViewCallTag,Xt=e.registerControlProvider,$t=e.ControlType,Yt=e.AppMenuIconViewController,Jt=e.GridFieldColumnController,Qt=e.GridRowState,Zt=e.ValueExUtil,ea=e.registerGridColumnProvider,ta=e.GridUAColumnController,aa=e.GridFieldEditColumnController,na=e.GridGroupColumnController,oa=e.Srfuf,sa=e.ControlVO,ia=e.Modal,la=e.ViewMode,ra=e.getAsyncActionProvider,ca=e.GridController,da=e.ScriptFactory,ua=e.ListController,pa=e.SearchFormController,ha=e.FormGroupPanelController,ma=e.registerFormDetailProvider,ba=e.FormItemController,va=e.FormPageController,wa=e.FormButtonController,ga=e.FormDRUIPartController,fa=e.FormMDCtrlController,ya=e.FormMDCtrlFormController,Ca=e.FormMDCtrlMDController,Ia=e.FormMDCtrlRepeaterController,Pa=e.EditFormController,Da=e.FormRawItemController,Ea=e.FormTabPanelController,ka=e.FormTabPageController,xa=e.ToolbarController,za=e.CaptionBarController,Sa=e.DataViewControlController,Ta=e.TreeController,_a=e.getControlPanel,Oa=e.PickupViewPanelController,Ba=e.TabExpPanelController,ja=e.TreeExpBarController,Aa=e.ExpBarControlController,Na=e.CalendarExpBarController,Ra=e.ChartExpBarController,Ma=e.SearchBarController,La=e.ValueOP,Va=e.WizardPanelController,Fa=e.ControlController,Ua=e.calcItemVisibleByCounter,qa=e.calcItemVisible,Ga=e.calcNavParams,Ha=e.hasSubRoute,Wa=e.CounterService,Ka=e.DashboardController,Xa=e.getPortletProvider,$a=e.CustomDashboardController,Ya=e.ContainerPortletController,Ja=e.registerPortletProvider,Qa=e.PortletPartController,Za=e.ViewPortletController,en=e.MenuPortletController,tn=e.ChartPortletController,an=e.RawItemPortletController,nn=e.ListPortletController,on=e.HtmlPortletController,sn=e.ActionBarPortletController,ln=e.ReportPortletController,rn=e.CalendarController,cn=e.KanbanController,dn=e.TreeGridExController,un=e.TreeGridExFieldColumnController,pn=e.TreeGridExRowState,hn=e.registerTreeGridExColumnProvider,mn=e.TreeGridExNodeColumnController,bn=e.TreeGridExUAColumnController,vn=e.TreeGridController,wn=e.MEditViewPanelController,gn=e.MapController,fn=e.ReportPanelController,yn=e.UIActionUtil,Cn=e.GanttController,In=e.ContextMenuController,Pn=e.PanelItemController,Dn=e.registerPanelItemProvider,En=e.PanelItemState,kn=e.UIActionButtonState,xn=e.AppFuncCommand,zn=e.parseViewProtocol,Sn=e.OpenAppViewCommand,Tn=e.getInternalMessageProvider,_n=e.registerInternalMessageProvider,On=e.PresetIdentifier,Bn=e.registerAsyncActionProvider,jn=e.CodeListEditorController,An=e.getDeACMode,Nn=e.EditorController,Rn=e.getAcItemProvider,Mn=e.calcDeCodeNameById,Ln=e.getEntitySchema,Vn=e.calcFilterModelBySchema,Fn=e.SearchBarFilterController,Un=e.getOriginFilterNodes,qn=e.SearchCondEx2filterNode,Gn=e.calcSearchCondExs,Hn=e.registerEditorProvider,Wn=e.WFStepTraceViewController,Kn=e.registerViewProvider,Xn=e.ViewType,$n=e.ViewController,Yn=e.getErrorViewProvider,Jn=e.ViewEngineBase,Qn=e.getControl,Zn=e.getControlsByView,eo=e.SysUIActionTag,to=e.getAppViewRef,ao=e.MDViewEngine,no=e.getWFSubmitViewId,oo=e.registerErrorViewProvider,so=e.RouteConst,io=e.install},function(e){lo=e.createUUID,ro=e.getCookie,co=e.clearAll,uo=e.notNilEmpty,po=e.isNilOrEmpty},function(e){ho=e.default},function(e){mo=e.clone,bo=e.isNil,vo=e.isNotNil,wo=e.mergeRight,go=e.reject,fo=e.mergeDeepLeft,yo=e.isEmpty,Co=e.mergeDeepRight},function(e){Io=e.default},function(e){Po=e.default},function(e){Do=e.useRoute,Eo=e.useRouter,ko=e.onBeforeRouteUpdate,xo=e.createRouter,zo=e.createWebHashHistory},function(e){So=e.cloneDeep,To=e.isNumber,_o=e.isFunction,Oo=e.isString,Bo=e.isNil,jo=e.debounce,Ao=e.fromPairs,No=e.isObject,Ro=e.isArray,Mo=e.isDate,Lo=e.toNumber,Vo=e.clone},function(e){Fo=e.computePosition,Uo=e.autoUpdate,qo=e.offset,Go=e.flip,Ho=e.shift,Wo=e.arrow},function(e){Ko=e.ElLoading,Xo=e.ElMessage,$o=e.ElMessageBox,Yo=e.ElNotification,Jo=e.useLocale,Qo=e.default},function(e){Zo=e.default},function(e){es=e.default},function(e){ts=e.default},function(e){as=e.DomEditor,ns=e.Boot},function(e){os=e.createI18n},function(e){ss=e.ModelHelper}],execute:function(){e({b5:Dl,b9:hl,bb:async function(e,t){tt.createApp.tap(((t,a)=>{e&&e.forEach((e=>{a.use(e)}))})),jt(),io(),ibiz.util.getGlobalParam=()=>ut().appStore,ibiz.util.getRouterParams=()=>se(uD.getRouter().currentRoute.value).pathNodes,ibiz.plugin=new pt,ibiz.util.error.register(new tD);const a=JP(eD);let n;te.createVueApp=JP,window.onerror=function(e,t,a,n,o){o&&ibiz.util.error.handle(o)},window.addEventListener("unhandledrejection",(function(e){e.preventDefault(),e.promise.catch((e=>{ibiz.util.error.handle(e)}))})),await ZP(),n=(null==t?void 0:t.getAuthGuard)?t.getAuthGuard():new XP;uD.setAuthGuard((e=>n.verify(e))),a.use(uD.getRouter()),ibiz.appUtil=new Sl(uD.getRouter()),ibiz.openView=new wl(uD.getRouter()),ibiz.render=new zl,ibiz.message=new rl,ibiz.modal=new cl,ibiz.confirm=new pl,ibiz.notification=new vl,ibiz.loading=new sl,ibiz.notice=new xl,ibiz.overlay=new Pl,ibiz.util.text.format=(e,t)=>a.config.globalProperties.$textFormat(e,t),await ibiz.i18n.init(),a.mount("#app")},m:Qi,n:Zi,o:el,p:tl,u:Ji});const is=e("d",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},setup(e,{emit:t}){const a=B("action-toolbar"),o=n(),s=n(!1);e.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))}));const i=n([]),l=n([]);e.actionDetails&&e.actionDetails.forEach((t=>{-1!==e.groupLevelKeys.findIndex((e=>e===t.actionLevel))?l.value.push(t):i.value.push(t)}));const r=n(),c=e.zIndex;return{ns:a,dropdownRef:o,popoverIndex:c,expandDetails:i,groupDetails:l,groupButtonRef:r,popoverVisible:s,handleClick:async(a,n)=>{n.stopPropagation(),"buttons"===e.mode?s.value=!1:o.value&&o.value.handleClose(),t("action-click",a,n)},calcActionItemClass:e=>{const{actionLevel:t}=e;return[a.e("item"),a.is("disabled",!1),a.em("item","level-".concat(t))]}}},render(){const e=this.actionDetails||[],t=e=>o(s("el-divider"),{class:this.ns.e("separator"),"border-style":"double",direction:e?"vertical":"horizontal"},null),a=(e,a=!0)=>e.map((e=>this.actionsState[e.id].visible?[e.addSeparator&&t(a),o(s("el-button"),{text:!0,size:"small",onClick:t=>this.handleClick(e,t),title:ht(e.tooltip),disabled:this.actionsState[e.id].disabled,class:this.calcActionItemClass(e)},{default:()=>[o("div",{class:this.ns.em("item","icon")},[e.showIcon&&e.sysImage&&o(s("iBizIcon"),{icon:e.sysImage},null)]),o("div",{class:this.ns.em("item","label")},[e.showCaption?e.caption:""])]})]:null)),n=()=>{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(s("el-button"),{size:"small",text:!0,disabled:t,ref:"groupButtonRef",class:[this.ns.e("item"),this.ns.is("expand",this.popoverVisible)]},{icon:()=>o("ion-icon",{class:this.ns.e("icon"),name:"ellipsis-vertical",title:ht(ibiz.i18n.t("component.actionToolbar.more"))},null)}),o(s("el-popover"),{placement:"bottom-start","virtual-ref":this.groupButtonRef,trigger:"click",visible:this.popoverVisible,"onUpdate:visible":e=>this.popoverVisible=e,"popper-class":this.ns.e("popover"),"virtual-triggering":!0,"popper-style":"z-index:".concat(this.popoverIndex)},(n=e=a(this.groupDetails,!1),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?e:{default:()=>[e]}))];var n};if(this.actionsState.visible)return"buttons"===this.mode?o("div",{class:[this.ns.b(),this.ns.m("buttons")],onClick:e=>e.stopPropagation()},[a(this.expandDetails),n()]):o(s("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(s("el-dropdown-menu"),null,{default:()=>[e.length>0&&e.map((e=>this.actionsState[e.id].visible?o(s("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("disabled",!1)],title:ht(e.tooltip),disabled:this.actionsState[e.id].disabled,command:e},{default:()=>[e.showIcon&&e.sysImage&&o(s("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("a",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:s,colMD:i,colMDOffset:l,colLG:r,colLGOffset:c}=t;return{xs:ls(a,n,t.layout),sm:ls(o,s,t.layout),md:ls(i,l,t.layout),lg:ls(r,c,t.layout)}})),o=At(e.layoutPos),s=l((()=>{const t=e.state.layout,a={width:t.width,height:t.height,...o||{}};return Object.assign(a,t.extraStyle),a})),i=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:i,gridAttrs:n,cssVars:s}},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(s("el-col"),{class:this.colClass,style:this.cssVars,...this.gridAttrs},{default:()=>n})}}));const cs=e("b",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,s=e;return o("div",{class:[this.ns.b(),this.ns.m("flex"),this.ns.m(s)],style:{flexDirection:s,justifyContent:t,alignItems:a}},[n])}return o(s("el-row"),{class:[this.ns.b(),this.ns.m("grid")]},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?n:{default:()=>[n]});var l}})),ds=e("e",a({name:"IBizRawItem",props:{type:{type:String,required:!1},content:{type:[String,Object,Number]},rawItem:{type:Object,required:!1}},setup(e){const t=B("rawitem");let a=null,o="";e.rawItem&&(a=e.rawItem.rawItem,o=a.contentType);const s=n(e.type||o||""),i=n("");let l;"IMAGE"===o&&(l=a.sysImage),"RAW"===o||"HTML"===o?"RAW"===o?(s.value="TEXT",i.value=a.caption):i.value=a.content:["VIDEO","DIVIDER","INFO","WARNING","ERROR"].includes(o)||"IMAGE"===o&&l&&(i.value=l);const r=n({id:lo(),path:"",mute:!0,autoplay:!0,replay:!1,showcontrols:!0}),d=n({contentPosition:"center",html:""}),u=n({type:"info",title:"",closeabled:!0,showIcon:!1}),p=n(""),h=()=>{var t;if("IMAGE"===s.value&&(e.content&&"string"==typeof e.content?(t=e.content,/^https?:|^http?:|(\.png|\.svg|\.jpg|\.png|\.gif|\.psd|\.tif|\.bmp|\.jpeg)/.test(t)?i.value={imagePath:e.content}:i.value={cssClass:e.content}):l&&(i.value=l)),["TEXT","HEADING1","HEADING2","HEADING3","HEADING4","HEADING5","HEADING6","PARAGRAPH","HTML","RAW"].includes(s.value)&&(p.value=i.value,"string"==typeof p.value)){const e=p.value;p.value=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;nbsp;/g," ").replace(/&nbsp;/g," ")}if(["VIDEO","DIVIDER","INFO","WARNING","ERROR"].includes(s.value)&&i.value){let e={};try{if("string"==typeof i.value){switch(e=new Function("return (".concat(i.value,");"))(),s.value){case"VIDEO":Object.assign(r.value,e);break;case"DIVIDER":Object.assign(d.value,e);break;case"INFO":case"WARNING":case"ERROR":u.value.type=s.value.toLocaleLowerCase(),Object.assign(u.value,e)}}}catch(e){ibiz.log.error(ibiz.i18n.t("component.rawItem.errorConfig",{type:s.value}))}}};return h(),c((()=>e.content),((e,t)=>{e&&e!==t&&(i.value=e,h())}),{immediate:!0}),{ns:t,rawItemText:p,playerParams:r,dividerParams:d,alertParams:u,rawItemType:s,rawItemContent:i}},render(){return o("div",{class:this.ns.b()},[(()=>"IMAGE"===this.rawItemType?o(s("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(s("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(s("el-alert"),{title:ht(this.alertParams.title),type:this.alertParams.type,"show-icon":this.alertParams.showIcon,closable:this.alertParams.closeabled},null):"MARKDOWN"===this.rawItemType?o(s("iBizMarkDown"),{value:this.content,disabled:!0},null):(["PLACEHOLDER"].includes(this.rawItemType),null))()])}})),us=a({name:"IBizNoData",props:{text:{type:String,default:"暂无数据"},emptyTextLanguageRes:{type:Object,default:void 0},enableShowImage:{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(s("el-empty"),{class:[this.ns.b(),this.enableShowImage?"hideImage":""],description:this.label},{default:()=>{var e,t;return[null==(t=(e=this.$slots).default)?void 0:t.call(e)]}})}}),ps=e("f",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),s=n(0),i=n(0),r=n(!1),h=n(0),m=n(0),b=n(.5),v=n(0),w=l((()=>[a.b("wrapper"),a.is("no-select",r.value)])),g=l((()=>[a.b("pane"),r.value?a.bm("pane","moving"):""])),f=l((()=>"horizontal"===e.mode)),y=l((()=>100-s.value)),C=l((()=>"string"==typeof e.modelValue)),I=l((()=>f.value?"offsetWidth":"offsetHeight")),P=(e,t)=>parseFloat(e)/parseFloat(t),D=t=>{const a=o.value[I.value];return C.value?"string"==typeof e[t]?e[t]:a*e[t]:"string"==typeof e[t]?P(e[t],a):e[t]},E=(e,t)=>C.value?"".concat(Math.max(parseFloat(e),parseFloat(t)),"px"):Math.max(e,t),k=e=>{let t=0;return t=C.value?"".concat(o.value[I.value]-parseFloat(e),"px"):1-e,t},x=a=>{const n=(f.value?a.pageX:a.pageY)-v.value,s=o.value[I.value];let l=C.value?"".concat(parseFloat(i.value)+n,"px"):P(s*i.value+n,s);const r=k(l);parseFloat(l)<=parseFloat(h.value)&&(l=E(l,h.value)),parseFloat(r)<=parseFloat(m.value)&&(l=k(E(r,m.value))),Object.assign(a,{atMin:e.modelValue===h.value,atMax:C.value?k(e.modelValue)===m.value:k(e.modelValue).toFixed(5)===m.value.toFixed(5)}),t("update:modelValue",l),t("on-moving",a)},z=()=>{r.value=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",z),t("on-move-end")},S=()=>{u((()=>{h.value=D("min"),m.value=D("max"),s.value=1e4*(C.value?P(e.modelValue,o.value[I.value]):e.modelValue)/100}))};return c((()=>e.modelValue),(e=>{e!==b.value&&(b.value=e,S())})),d((()=>{u((()=>{S()})),window.addEventListener("resize",S)})),p((()=>{window.removeEventListener("resize",S)})),{ns:a,outerWrapper:o,offset:s,wrapperClasses:w,paneClasses:g,isHorizontal:f,anotherOffset:y,handleMousedown:a=>{v.value=f.value?a.pageX:a.pageY,i.value=e.modelValue,r.value=!0,document.addEventListener("mousemove",x),document.addEventListener("mouseup",z),t("on-move-start")}}},render(){var e,t,a,n,i,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:{right:"".concat(this.anotherOffset,"%")},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(s("iBizSplitTrigger"),{mode:"vertical"},null)]),o("div",{style:{left:"".concat(this.offset,"%")},class:[this.paneClasses,this.ns.bm("pane","right")]},[null==(l=(i=this.$slots).right)?void 0:l.call(i)])]):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(s("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)])])])}})),hs=e("g",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")])),s=Array(8).fill(0);return{ns:t,classes:n,barConClasses:o,items:s}},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)))])])}})),ms=a({name:"IBizExtendActionTimeLine",props:{data:{type:Object}},setup(e){const t=B("extend-action-timeline"),a=n([]),i=(e,t)=>Date.parse(t.time)-Date.parse(e.time),l=e=>{const t=[];let a=mo(e);if(a.length>0)return a=a.reverse(),a.forEach((e=>{if(e.usertasks){const t=mo(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(i),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=mo(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:ht(e.linkName)},[e.linkName]):null,o("div",{class:[t.be("task","author-name"),t.is("has-type",e.type)],title:ht(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(s("i-icon"),{type:e.isShow?"md-remove":"md-add"},null)]),e.tasks&&h(o("div",{class:t.be("task","moreTask")},[u(e.tasks)]),[[m,e.isShow]])])));return{ns:t,formatDate:(e,t)=>ho(e).format(t),UIData:a,renderTimeline:u}},render(){return o("div",{class:this.ns.b()},[this.UIData&&this.renderTimeline(this.UIData)])}});const bs=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),s=n(""),i=n(!1);c((()=>e.messages),(()=>{o.value=0,s.value=lo(),Array.isArray(e.messages)?(a.value=e.messages.filter((e=>e.title||e.message||e.layoutPanel&&e.data)).map((e=>({...e}))),i.value=!1):(a.value=[],i.value=!0)}),{immediate:!0});const l=n(null),r=n("");d((()=>{u((()=>{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:s,isHiddenContainer:i,handleAlertClose:t=>{var n;a.value[t].hidden=!0;a.value.every((e=>e.hidden))&&(i.value=!0),s.value=lo();const o=a.value[t];null==(n=e.controller)||n.setMsgRemoveModeStorage(o)},handleChange:e=>{o.value=e}}},render(){const e=e=>o(s("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(s("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(s("el-carousel-item"),null,{default:()=>{var i;return[o(s("el-alert"),{type:this.getType(t.messageType),class:[this.ns.b("carousel-alert"),this.ns.bm("carousel-alert",t.title&&n?"":"single"),null==(i=t.sysCss)?void 0:i.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")},[t.message||""])})]}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!i(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 i=t.message||t.layoutPanel&&t.data;return o(s("el-alert"),{type:this.getType(t.messageType),class:[this.ns.b("alert"),this.ns.bm("alert",t.title&&i?"":"single"),this.ns.bm("alert",!t.title&&i?"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")},[t.message||""])})}))]))()}}),vs=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}},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=>{e.stopPropagation()},calcTotalPages:l((()=>Math.ceil(e.total/e.size)))}),render(){return o("div",{class:this.ns.b()},[o(s("el-pagination"),b({layout:"slot, prev, pager, next, sizes, jumper",background:!0,total:this.total,"page-count":bo(this.totalPages)||this.calcTotalPages!==this.totalPages?this.totalPages:this.calcTotalPages,"current-page":this.curPage,"page-size":this.size,"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(s("el-button"),{title:ht(ibiz.i18n.t("app.refresh")),onClick:this.pageRefresh},{default:()=>[o("ion-icon",{name:"refresh"},null)]})]),bo(this.totalPages)||this.calcTotalPages===this.totalPages?o("span",null,[ibiz.i18n.t("component.pagination.display"),v(" "),this.start,v(" - "),this.end,v(" "),ibiz.i18n.t("component.pagination.piece"),v(",")]):null,o("span",null,[ibiz.i18n.t("component.pagination.total"),v(" "),this.total,v(" "),ibiz.i18n.t("component.pagination.pieceData")])]})])}}),ws=e("h",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 gs(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const fs=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(""),s=n(!1),i=()=>{e.dismiss()};return{ns:t,onLinkClick:async()=>{Nt(e.appDataEntity,e.dataImport)},selectFile:async()=>{s.value=!0;const t=await Rt({appDataEntity:e.appDataEntity,dataImport:e.dataImport,context:e.context});if(t.cancel)s.value=!1;else{if(!t.isAsync)if(t.errorMessage)o.value=t.errorMessage;else{const{success:e,total:n,message:o}=t,s=n?Number(n):0,i=e?Number(e):0,l=n-e;a.value.state=o?"error":"over",a.value.message=o||ibiz.i18n.t("component.dataImport.importSuccess",{totalNum:s,successNum:i,errorNum:l})}s.value=!1,t.isAsync&&i()}},onCancelButtonClick:i,isLoading:s,message:a,errorMessage:o}},render(){let e,t;return h(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(s("el-button"),{onClick:this.onCancelButtonClick},gs(e=ibiz.i18n.t("app.cancel"))?e:{default:()=>[e]}),"ready"!==this.message.state&&o(s("el-button"),{onClick:this.selectFile},gs(t=ibiz.i18n.t("component.dataImport.continue"))?t:{default:()=>[t]})])]),[[w("loading"),this.isLoading]])}});function ys(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Cs=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()},s=n([[]]),i=new Map,r=n([]),u=n([]),p=n(),h=n(),m=n("");let b="";const v=n(!0),w=n(""),g=new Map,f=n([]),y=n(!1),C=e.dataImport||Mt(e.appDataEntity),I=()=>{[...i.keys()].forEach((e=>{const t=i.get(e),a=mo(t);t&&a&&(a.name="",i.set(e,a),r.value[t.index]="")}))},P=async e=>{if(e){const t=g.get(e);if(!t)return;let a=t.fields;if(!t.fields){const n=await Lt(t.id);200===n.status&&n.data&&(a=n.data.fields),t.fields=n.data.fields,g.set(e,t)}""!==t.owner_type&&"PERSONAL"!==t.owner_type&&(y.value=!0);const n=[...i.keys()],o=new Map;I(),n.forEach((e=>{const t=i.get(e),n=e.lastIndexOf("-"),s=e.substring(0,n);let l=o.get(s);l||(o.set(s,0),l=0);const c=a&&a.filter((e=>e.caption===s)),d=c&&c[l];if(d){u.value.find((e=>e.id===d.name))&&t&&(o.set(s,l+1),d.index=t.index,i.set(e,d),r.value[d.index]=d.name)}}))}else I()};c(w,((e,t)=>{P(e)}));const D=async()=>{if(""!==r.value.join(""))if(s.value[0].length){v.value=!0;const t=[...i.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),w.value){const t=g.get(w.value);t&&(a.name=t.name,a.id=t.id);const n=await Vt({appDataEntity:e.appDataEntity,dataImport:C,data:a});200===n.status&&n.ok&&g.set(w.value,n.data)}else{f.value.push({value:a.name,label:a.name,oldLabel:a.name,edit:!0,checkmark:!1,close:!1});const t=await Ft({appDataEntity:e.appDataEntity,dataImport:C,data:a});200===t.status&&t.ok&&g.set(a.name,t.data),w.value=a.name}}else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.uploadPlease"));else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.atLastOne"))},E=async()=>{if(s.value[0].length)if(w.value&&v.value){const t=g.get(w.value);let a="";t&&(a=t.id),await Ut({appDataEntity:e.appDataEntity,dataImport:C,fileId:b,schemaId:a}),o()}else await D(),await E();else ibiz.message.warning(ibiz.i18n.t("component.dataImport2.uploadPlease"))},k=e=>{/\bel-dialog\b/.test(e.className)?e.style.maxWidth="calc(100% - 100px)":e.parentElement&&k(e.parentElement)};d((()=>{C&&C.dedataImportItems?u.value=C.dedataImportItems:e.appDataEntity.appDEFields&&(u.value=e.appDataEntity.appDEFields),p.value&&p.value.parentElement&&k(p.value.parentElement),(async()=>{const t=await qt({appDataEntity:e.appDataEntity,dataImport:C});200===t.status&&t.data&&t.data.forEach((e=>{f.value.push({value:e.name,label:e.name,oldLabel:e.name,edit:!0,checkmark:!1,close:!1}),g.set(e.name,e)}))})()}));const x=n({Authorization:"Bearer ".concat(ro(mt.TOKEN))}),z=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+=Io.stringify({preview:!0},{addQueryPrefix:!0}),t}));return{ns:t,onButtonColumnMappingImportClick:D,onButtonImportClick:E,onCancelButtonClick:o,isLoading:a,UploadUrl:z,headers:x,onSuccess:(e,t,n)=>{if(m.value="",b="",e.name&&(m.value=e.name),e.fileid&&(b=e.fileid),e.previewinfo&&(s.value=JSON.parse(e.previewinfo),s.value[0]&&s.value[0].length>0)){const e=s.value[0].length;for(let t=1;t<s.value.length;t++){const a=s.value[t],n=a.length;if(n<e){const t=e-n;for(let e=0;e<t;e++)a.push("")}}i.clear(),s.value[0].forEach(((e,t)=>{i.set("".concat(e,"-").concat(t),{name:"",index:t,caption:e}),r.value[t]=""}))}a.value=!1,P(w.value)},previewinfo:s,selectValues:r,beforeUpload:()=>{a.value=!0},dataimport2:p,listValue:w,options:f,select:h,isNoPersonel:y,fileName:m,dataOption:u,ColumnMappingSave:v,columnMap:i,columnMappingSaveChange:e=>{v.value=e},selectValuesChange:(e,t)=>{r.value[e]=t},columnMapChange:(e,t)=>{i.set(e,t)},columnMappingListMap:g,listValueChange:e=>{w.value=e},columnMappingListMapChange:(e,t)=>{t?g.set(e,t):g.delete(e)},optionsChange:(e,t)=>{if(t){const a=f.value.findIndex((t=>t.label===e)),n=f.value[a];Object.keys(t).forEach((e=>{n[e]=t[e]}))}else{const t=f.value.findIndex((t=>t.label===e));-1!==t&&f.value.splice(t,1)}}}},render(){let e,t;return h(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(s("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(s("el-button"),{onClick:this.onButtonColumnMappingImportClick,disabled:this.isNoPersonel},ys(e=ibiz.i18n.t("component.dataImport2.saveMode"))?e:{default:()=>[e]})]):"",o(s("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(s("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(s("el-button"),{onClick:this.onButtonImportClick,disabled:!this.selectValues.join(""),title:ht(this.selectValues.join("")?"":ibiz.i18n.t("component.dataImport2.selectProperties"))},ys(t=ibiz.i18n.t("component.dataImport2.import"))?t:{default:()=>[t]})]):""])])])]),o(s("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)]),[[w("loading"),this.isLoading]])}});const Is=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(s("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(s("el-option"),{key:e.name,value:e.id,label:e.caption?e.caption:e.logicName},null))))||"[object Object]"===Object.prototype.toString.call(c)&&!i(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,s=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])))]))),i=[o("tr",{key:"newRow"},[t[0].map(((e,t)=>o("td",{key:t,class:a.e("dataimpoer2-table-select")},[n(e,t)])))]),...s];return o("table",{class:a.e("dataimport-table")},[o("tbody",null,[i])])}}},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 Ps(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Ds=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 Vt({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 Gt(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(s("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")},Ps(e=this.options.map((e=>o(s("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(s("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(s("el-button"),{text:!0,size:"small",onClick:t=>this.editLabel(t,e)},Ps(t=ibiz.i18n.t("component.dataImport2Select.edit"))?t:{default:()=>[t]}):"",e.checkmark?o(s("el-button"),{size:"small",onClick:t=>this.saveLabel(t,e)},{default:()=>[o("ion-icon",{name:"checkmark-outline"},null)]}):"",e.close?o(s("el-button"),{size:"small",onClick:t=>this.notSaveLabel(t,e)},{default:()=>[o("ion-icon",{name:"close-outline"},null)]}):"",o(s("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]})])}}),Es=a({name:"IBizGridSetting",components:{draggable:Po},props:{columnStates:{type:Array,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("grid-setting"),a=e.controller,n=l((()=>e.columnStates.map((e=>({...e}))))),o=l((()=>!!a.controlParams.enablecolumnsort));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(s("el-popover"),{placement:"right-start",trigger:"click",width:"auto"},{reference:()=>o("ion-icon",{name:"options-outline",class:this.ns.b("set-icon"),title:ht(ibiz.i18n.t("component.gridSetting.hideControl"))},null),default:()=>o(Po,{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(s("iBizIcon"),{class:this.ns.b("drag-icon"),icon:{imagePath:"svg/drag.svg"},baseDir:"iconfont"},null),o(s("iBizIcon"),{class:this.ns.b("disable-icon"),icon:{imagePath:"svg/disable.svg"},baseDir:"iconfont"},null),o(s("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])])})})}}),ks=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 xs=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(s("IBizCarousel-card"),{swipeData:this.swipeData,isAuto:this.isAuto,timeSpan:this.timeSpan},null):o(s("el-carousel"),{class:this.ns.b(),autoplay:this.isAuto,interval:this.timeSpan},(a=e=this.swipeData.map((e=>o(s("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)&&!i(a)?e:{default:()=>[e]}))]);var a}}),zs=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(s("el-alert"),b({class:this.ns.b()},this.$props),null)}}),Ss=[{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:"textIcon",vars:[{label:"文本图标主色",description:"文本/图标颜色 - 最主要",labelLang:"mainTextIconColor",descLang:"mianTextIconColorDesc",value:"--ibiz-color-text-0"},{label:"文本图标稍次色",description:"文本/图标颜色 - 稍次要",labelLang:"minorTextIconColor",descLang:"minorTextIconColorDesc",value:"--ibiz-color-text-1"},{label:"文本图标次色",description:"文本/图标颜色 - 次要",labelLang:"secondaryTextIconColor",descLang:"secondaryTextIconColorDesc",value:"--ibiz-color-text-2"},{label:"文本图标最次色",description:"文本/图标颜色 - 最次要",labelLang:"lastTextIconColor",descLang:"lastTextIconColorDesc",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-text-border"},{label:"禁用背景色",description:"禁用态 - 背景",labelLang:"disabledBg",descLang:"disabledBgDesc",value:"--ibiz-color-text-bg"},{label:"禁用填充色",description:"禁用态 - 填充",labelLang:"disabledFill",descLang:"disabledFillDesc",value:"--ibiz-color-text-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-bg-color",defaultValue:"--ibiz-color-primary",labelLang:"topBgColor",descLang:"topBgColorDesc",className:"ibiz-panel-app-header"},{label:"字体颜色",value:"--ibiz-panel-app-header-horizontal-color",defaultValue:"--ibiz-color-primary-text",labelLang:"topColor",descLang:"topColorDesc",className:"ibiz-panel-app-header"},{label:"悬浮色",value:"--ibiz-panel-app-header-horizontal-hover-bg-color",defaultValue:"--ibiz-color-primary-hover",labelLang:"topHoverBgColor",descLang:"topHoverBgColorDesc",className:"ibiz-panel-app-header"},{label:"选中色",value:"--ibiz-panel-app-header-horizontal-select-bg-color",defaultValue:"--ibiz-color-primary-active",labelLang:"topSelectBgColor",descLang:"topSelectBgColorDesc",className:"ibiz-panel-app-header"}]},{caption:"侧边导航栏",labelLang:"sidebar",vars:[{label:"背景",value:"--ibiz-panel-app-header-bg-color",defaultValue:"--ibiz-color-primary",labelLang:"sidebarBg",descLang:"sidebarBgDesc",className:"ibiz-panel-app-header"},{label:"字体颜色",value:"--ibiz-panel-app-header-color",defaultValue:"--ibiz-color-primary-text",labelLang:"sidebarColor",descLang:"sidebarColorDesc",className:"ibiz-panel-app-header"},{label:"悬浮色",value:"--ibiz-panel-app-header-hover-bg-color",defaultValue:"--ibiz-color-primary-hover",labelLang:"sidebarHoverBgColor",descLang:"sidebarHoverBgColorDesc",className:"ibiz-panel-app-header"},{label:"选中色",value:"--ibiz-panel-app-header-select-bg-color",defaultValue:"--ibiz-color-primary-active",labelLang:"sidebarSelectBgColor",descLang:"sidebarSelectBgColorDesc",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"}]}]}];var Ts=Object.defineProperty,_s=(e,t,a)=>(((e,t,a)=>{t in e?Ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Os{constructor(){_s(this,"state",{}),_s(this,"model",[]),_s(this,"predefineType",[{codeName:"light",label:"亮色",labelLang:"light",color:"#557da5"}]),this.model=Ss;const e=ibiz.util.theme.getCustomTheme();this.state=mo(e),this.state=g(this.state)}getCssVar(e,t){let a=t||e;if(this.state.themeVars&&this.state.themeVars[e])a=this.state.themeVars[e];else{const n=window.getComputedStyle(document.documentElement);n&&(a=n.getPropertyValue(t||e)||a)}return a.toString().endsWith("px")&&(a=Number(a.toString().slice(0,-2))),a.toString().includes(",")&&!a.toString().startsWith("rgb")&&(a="rgba(".concat(a,", 1)")),a}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 Bs(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const js=a({name:"IBizCustomTheme",props:{controller:{type:Object,required:!0}},emits:[],setup(){const e=B("custom-theme"),t=f().proxy,a=new Os,i=n(0),l=e=>{let{value:t}=e;return e.className&&(t="".concat(e.className,":").concat(t)),o(s("el-color-picker"),{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)},r=e=>{const t=a.getCssVar(e.value);return o(s("el-input-number"),{"model-value":t,step:t>=100?100:1,min:0,onChange:t=>{var n,o,s;n=e.value,o=t,s=e,a.calcSizeChange(n,o,s)}},null)},c=t=>t.children?t.children.map((e=>c(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=l(t);return"size"===t.type&&(a=r(t)),o("div",{class:e.b("var")},[o("span",{class:e.be("var","description"),title:ht(ibiz.i18n.t("control.common.customTheme.".concat(t.descLang)))},[ibiz.i18n.t("control.common.customTheme.".concat(t.labelLang))]),a])}))])]);return{ns:e,c:a,handlePreview:()=>{ibiz.util.theme.previewCustomTheme(a.state.themeTag,a.state.themeVars),t.$forceUpdate()},handleReset:()=>{a.state.themeVars={},ibiz.util.theme.resetCustomTheme(),t.$forceUpdate()},handleSave:async()=>{ibiz.util.theme.previewCustomTheme(a.state.themeTag,a.state.themeVars),t.$forceUpdate(),await ibiz.util.theme.saveCustomTheme(a.state.themeTag,a.state.themeVars)},handleShare:async()=>{ibiz.util.theme.previewCustomTheme(a.state.themeTag,a.state.themeVars),t.$forceUpdate(),await ibiz.util.theme.saveCustomTheme(a.state.themeTag,a.state.themeVars);const e=await ibiz.util.theme.shareCustomTheme(a.state.themeTag,a.state.themeVars);if(e){await ibiz.confirm.info({title:ibiz.i18n.t("control.common.customTheme.confirmCopyLink"),desc:"".concat(e)})&&ibiz.util.text.copy(e)}},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","content")},[a.predefineType.map((e=>o(s("el-button"),{color:e.color,title:ht(ibiz.i18n.t("control.common.customTheme.".concat(e.labelLang))),onClick:()=>{var t;t=e.codeName,a.state.themeTag=t}},{default:()=>[a.state.themeTag===e.codeName&&o("ion-icon",{name:"checkmark-sharp"},null)]})))])]),renderContent:()=>{let e;return o(s("el-tabs"),{modelValue:i.value,"onUpdate:modelValue":e=>i.value=e},Bs(e=a.model.map(((e,t)=>{let a;return o(s("el-tab-pane"),{name:t,label:ibiz.i18n.t("control.common.customTheme.".concat(e.labelLang))},Bs(a=c(e))?a:{default:()=>[a]})})))?e:{default:()=>[e]})}}},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(s("el-button"),{onClick:this.handlePreview},Bs(e=ibiz.i18n.t("control.common.customTheme.preview"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:this.handleSave},Bs(t=ibiz.i18n.t("control.common.customTheme.save"))?t:{default:()=>[t]}),o(s("el-button"),{onClick:this.handleReset},Bs(a=ibiz.i18n.t("control.common.customTheme.reset"))?a:{default:()=>[a]})])])}}),As=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(),s=n(),i=n(600),r=n(0),c=l((()=>(r.value-i.value-0)/2));let h=null;const m=document.getElementsByClassName("swiper-slide-card"),b=500,v=l((()=>e.swipeData.length>2?[...e.swipeData.slice(-2),...e.swipeData,...e.swipeData.slice(0,2)]:[...e.swipeData])),w=()=>{for(let t=0;t<m.length;t++)2===e.swipeData.length?(m[0].style.left="".concat(r.value/4-i.value/2,"px"),m[1].style.left="".concat(r.value/4*3-i.value/2,"px")):1===e.swipeData.length?m[t].style.left="".concat(r.value/2-i.value/2,"px"):m[t].style.left="".concat((t-1)*(i.value+0),"px"),t===a.value-1?m[t].style.transform="scale(1)":m[t].style.transform="scale(".concat(.8,")")},g=t=>{2===e.swipeData.length?(a.value=a.value?0:1,w()):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+i.value),"px")),a.value===e.swipeData.length+1?(a.value=e.swipeData.length+2,w(),setTimeout((()=>{a.value=2,w(),o.value.style.transitionProperty="none",o.value.style.left="".concat(-(i.value-c.value),"px")}),t)):(a.value++,w()))};w(),d((()=>{e.isAuto&&(h=window.setInterval((()=>g(b)),e.timeSpan))})),p((()=>{h&&(window.clearInterval(h),h=null)})),u((()=>{r.value=s.value.clientWidth,i.value=m[0].clientWidth,o.value&&(o.value.style.left="".concat(-(2*i.value+0-c.value),"px"),o.value.style.width="".concat((e.swipeData.length+2)*(i.value+0),"px")),w()}));return{ns:t,btnClick:t=>{var n;"left"===t?(n=b,2===e.swipeData.length?(a.value=a.value?0:1,w()):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+i.value),"px"),1===a.value?(w(),setTimeout((()=>{a.value=e.swipeData.length+1,w(),o.value.style.transitionProperty="none",o.value.style.left="".concat(-(parseInt(m[a.value].style.left,10)-c.value-0),"px")}),n)):w())):"right"===t&&g(b)},mainDom:o,listDom:s,imgWidth:i,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)*i.value+0-c.value),"px"),w()},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 Ns=Object.defineProperty,Rs=(e,t,a)=>(((e,t,a)=>{t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ms{constructor(e,t,a){Rs(this,"name"),Rs(this,"icon"),Rs(this,"text"),this.name=e,this.icon=t,this.text=a}get label(){return this.name}}var Ls=Object.defineProperty,Vs=(e,t,a)=>(((e,t,a)=>{t in e?Ls(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);let Fs=class{constructor(e,t,a){Vs(this,"data"),Vs(this,"category"),Vs(this,"aliases"),this.data=e,this.category=t,this.aliases=a}};const Us=[new Fs("😀","peoples",["grinning"]),new Fs("😃","peoples",["smiley"]),new Fs("😄","peoples",["smile"]),new Fs("😁","peoples",["grin"]),new Fs("😆","peoples",["laughing","satisfied"]),new Fs("😅","peoples",["sweat_smile"]),new Fs("😂","peoples",["joy"]),new Fs("🤣","peoples",["rofl"]),new Fs("😌","peoples",["relaxed"]),new Fs("😊","peoples",["blush"]),new Fs("😇","peoples",["innocent"]),new Fs("🙂","peoples",["slightly_smiling_face"]),new Fs("🙃","peoples",["upside_down_face"]),new Fs("😉","peoples",["wink"]),new Fs("😌","peoples",["relieved"]),new Fs("😍","peoples",["heart_eyes"]),new Fs("😘","peoples",["kissing_heart"]),new Fs("😗","peoples",["kissing"]),new Fs("😙","peoples",["kissing_smiling_eyes"]),new Fs("😚","peoples",["kissing_closed_eyes"]),new Fs("😋","peoples",["yum"]),new Fs("😜","peoples",["stuck_out_tongue_winking_eye"]),new Fs("😝","peoples",["stuck_out_tongue_closed_eyes"]),new Fs("😛","peoples",["stuck_out_tongue"]),new Fs("🤑","peoples",["money_mouth_face"]),new Fs("🤗","peoples",["hugs"]),new Fs("🤓","peoples",["nerd_face"]),new Fs("😎","peoples",["sunglasses"]),new Fs("🤡","peoples",["clown_face"]),new Fs("🤠","peoples",["cowboy_hat_face"]),new Fs("😏","peoples",["smirk"]),new Fs("😒","peoples",["unamused"]),new Fs("😞","peoples",["disappointed"]),new Fs("😔","peoples",["pensive"]),new Fs("😟","peoples",["worried"]),new Fs("😕","peoples",["confused"]),new Fs("🙁","peoples",["slightly_frowning_face"]),new Fs("☹️","peoples",["frowning_face"]),new Fs("😣","peoples",["persevere"]),new Fs("😖","peoples",["confounded"]),new Fs("😫","peoples",["tired_face"]),new Fs("😩","peoples",["weary"]),new Fs("😤","peoples",["triumph"]),new Fs("😠","peoples",["angry"]),new Fs("😡","peoples",["rage","pout"]),new Fs("😶","peoples",["no_mouth"]),new Fs("😐","peoples",["neutral_face"]),new Fs("😑","peoples",["expressionless"]),new Fs("😯","peoples",["hushed"]),new Fs("😦","peoples",["frowning"]),new Fs("😧","peoples",["anguished"]),new Fs("😮","peoples",["open_mouth"]),new Fs("😲","peoples",["astonished"]),new Fs("😵","peoples",["dizzy_face"]),new Fs("😳","peoples",["flushed"]),new Fs("😱","peoples",["scream"]),new Fs("😨","peoples",["fearful"]),new Fs("😰","peoples",["cold_sweat"]),new Fs("😢","peoples",["cry"]),new Fs("😥","peoples",["disappointed_relieved"]),new Fs("🤤","peoples",["drooling_face"]),new Fs("😭","peoples",["sob"]),new Fs("😓","peoples",["sweat"]),new Fs("😪","peoples",["sleepy"]),new Fs("😴","peoples",["sleeping"]),new Fs("🙄","peoples",["roll_eyes"]),new Fs("🤔","peoples",["thinking"]),new Fs("🤥","peoples",["lying_face"]),new Fs("😬","peoples",["grimacing"]),new Fs("🤐","peoples",["zipper_mouth_face"]),new Fs("🤢","peoples",["nauseated_face"]),new Fs("🤧","peoples",["sneezing_face"]),new Fs("😷","peoples",["mask"]),new Fs("🤒","peoples",["face_with_thermometer"]),new Fs("🤕","peoples",["face_with_head_bandage"]),new Fs("😈","peoples",["smiling_imp"]),new Fs("👿","peoples",["imp"]),new Fs("👹","peoples",["japanese_ogre"]),new Fs("👺","peoples",["japanese_goblin"]),new Fs("💩","peoples",["hankey","poop","shit"]),new Fs("👻","peoples",["ghost"]),new Fs("💀","peoples",["skull"]),new Fs("☠️","peoples",["skull_and_crossbones"]),new Fs("👽","peoples",["alien"]),new Fs("👾","peoples",["space_invader"]),new Fs("🤖","peoples",["robot"]),new Fs("🎃","peoples",["jack_o_lantern"]),new Fs("😺","peoples",["smiley_cat"]),new Fs("😸","peoples",["smile_cat"]),new Fs("😹","peoples",["joy_cat"]),new Fs("😻","peoples",["heart_eyes_cat"]),new Fs("😼","peoples",["smirk_cat"]),new Fs("😽","peoples",["kissing_cat"]),new Fs("🙀","peoples",["scream_cat"]),new Fs("😿","peoples",["crying_cat_face"]),new Fs("😾","peoples",["pouting_cat"]),new Fs("👐","peoples",["open_hands"]),new Fs("🙌","peoples",["raised_hands"]),new Fs("👏","peoples",["clap"]),new Fs("🙏","peoples",["pray"]),new Fs("🤝","peoples",["handshake"]),new Fs("👍","peoples",["+1","thumbsup"]),new Fs("👎","peoples",["-1","thumbsdown"]),new Fs("👊","peoples",["fist_oncoming","facepunch","punch"]),new Fs("✊","peoples",["fist_raised","fist"]),new Fs("🤛","peoples",["fist_left"]),new Fs("🤜","peoples",["fist_right"]),new Fs("🤞","peoples",["crossed_fingers"]),new Fs("✌️","peoples",["v"]),new Fs("🤘","peoples",["metal"]),new Fs("👌","peoples",["ok_hand"]),new Fs("👈","peoples",["point_left"]),new Fs("👉","peoples",["point_right"]),new Fs("👆","peoples",["point_up_2"]),new Fs("👇","peoples",["point_down"]),new Fs("☝️","peoples",["point_up"]),new Fs("✋","peoples",["hand","raised_hand"]),new Fs("🤚","peoples",["raised_back_of_hand"]),new Fs("🖐","peoples",["raised_hand_with_fingers_splayed"]),new Fs("🖖","peoples",["vulcan_salute"]),new Fs("👋","peoples",["wave"]),new Fs("🤙","peoples",["call_me_hand"]),new Fs("💪","peoples",["muscle"]),new Fs("🖕","peoples",["middle_finger","fu"]),new Fs("✍️","peoples",["writing_hand"]),new Fs("🤳","peoples",["selfie"]),new Fs("💅","peoples",["nail_care"]),new Fs("💍","peoples",["ring"]),new Fs("💄","peoples",["lipstick"]),new Fs("💋","peoples",["kiss"]),new Fs("👄","peoples",["lips"]),new Fs("👅","peoples",["tongue"]),new Fs("👂","peoples",["ear"]),new Fs("👃","peoples",["nose"]),new Fs("👣","peoples",["footprints"]),new Fs("👁","peoples",["eye"]),new Fs("👀","peoples",["eyes"]),new Fs("🗣","peoples",["speaking_head"]),new Fs("👤","peoples",["bust_in_silhouette"]),new Fs("👥","peoples",["busts_in_silhouette"]),new Fs("👶","peoples",["baby"]),new Fs("👦","peoples",["boy"]),new Fs("👧","peoples",["girl"]),new Fs("👨","peoples",["man"]),new Fs("👩","peoples",["woman"]),new Fs("👱‍♀","peoples",["blonde_woman"]),new Fs("👱","peoples",["blonde_man","person_with_blond_hair"]),new Fs("👴","peoples",["older_man"]),new Fs("👵","peoples",["older_woman"]),new Fs("👲","peoples",["man_with_gua_pi_mao"]),new Fs("👳‍♀","peoples",["woman_with_turban"]),new Fs("👳","peoples",["man_with_turban"]),new Fs("👮‍♀","peoples",["policewoman"]),new Fs("👮","peoples",["policeman","cop"]),new Fs("👷‍♀","peoples",["construction_worker_woman"]),new Fs("👷","peoples",["construction_worker_man","construction_worker"]),new Fs("💂‍♀","peoples",["guardswoman"]),new Fs("💂","peoples",["guardsman"]),new Fs("👩‍⚕","peoples",["woman_health_worker"]),new Fs("👨‍⚕","peoples",["man_health_worker"]),new Fs("👩‍🌾","peoples",["woman_farmer"]),new Fs("👨‍🌾","peoples",["man_farmer"]),new Fs("👩‍🍳","peoples",["woman_cook"]),new Fs("👨‍🍳","peoples",["man_cook"]),new Fs("👩‍🎓","peoples",["woman_student"]),new Fs("👨‍🎓","peoples",["man_student"]),new Fs("👩‍🎤","peoples",["woman_singer"]),new Fs("👨‍🎤","peoples",["man_singer"]),new Fs("👩‍🏫","peoples",["woman_teacher"]),new Fs("👨‍🏫","peoples",["man_teacher"]),new Fs("👩‍🏭","peoples",["woman_factory_worker"]),new Fs("👨‍🏭","peoples",["man_factory_worker"]),new Fs("👩‍💻","peoples",["woman_technologist"]),new Fs("👨‍💻","peoples",["man_technologist"]),new Fs("👩‍💼","peoples",["woman_office_worker"]),new Fs("👨‍💼","peoples",["man_office_worker"]),new Fs("👩‍🔧","peoples",["woman_mechanic"]),new Fs("👨‍🔧","peoples",["man_mechanic"]),new Fs("👩‍🔬","peoples",["woman_scientist"]),new Fs("👨‍🔬","peoples",["man_scientist"]),new Fs("👩‍🎨","peoples",["woman_artist"]),new Fs("👨‍🎨","peoples",["man_artist"]),new Fs("👩‍🚒","peoples",["woman_firefighter"]),new Fs("👨‍🚒","peoples",["man_firefighter"]),new Fs("👩‍🚀","peoples",["woman_astronaut"]),new Fs("👨‍🚀","peoples",["man_astronaut"]),new Fs("🤶","peoples",["mrs_claus"]),new Fs("🎅","peoples",["santa"]),new Fs("👸","peoples",["princess"]),new Fs("🤴","peoples",["prince"]),new Fs("👰","peoples",["bride_with_veil"]),new Fs("🤵","peoples",["man_in_tuxedo"]),new Fs("👼","peoples",["angel"]),new Fs("🤰","peoples",["pregnant_woman"]),new Fs("🙇‍♀","peoples",["bowing_woman"]),new Fs("🙇","peoples",["bowing_man","bow"]),new Fs("💁","peoples",["tipping_hand_woman","information_desk_person","sassy_woman"]),new Fs("💁‍♂","peoples",["tipping_hand_man","sassy_man"]),new Fs("🙅","peoples",["no_good_woman","no_good","ng_woman"]),new Fs("🙅‍♂","peoples",["no_good_man","ng_man"]),new Fs("🙆","peoples",["ok_woman"]),new Fs("🙆‍♂","peoples",["ok_man"]),new Fs("🙋","peoples",["raising_hand_woman","raising_hand"]),new Fs("🙋‍♂","peoples",["raising_hand_man"]),new Fs("🤦‍♀","peoples",["woman_facepalming"]),new Fs("🤦‍♂","peoples",["man_facepalming"]),new Fs("🤷‍♀","peoples",["woman_shrugging"]),new Fs("🤷‍♂","peoples",["man_shrugging"]),new Fs("🙎","peoples",["pouting_woman","person_with_pouting_face"]),new Fs("🙎‍♂","peoples",["pouting_man"]),new Fs("🙍","peoples",["frowning_woman","person_frowning"]),new Fs("🙍‍♂","peoples",["frowning_man"]),new Fs("💇","peoples",["haircut_woman","haircut"]),new Fs("💇‍♂","peoples",["haircut_man"]),new Fs("💆","peoples",["massage_woman","massage"]),new Fs("💆‍♂","peoples",["massage_man"]),new Fs("🕴","peoples",["business_suit_levitating"]),new Fs("💃","peoples",["dancer"]),new Fs("🕺","peoples",["man_dancing"]),new Fs("👯","peoples",["dancing_women","dancers"]),new Fs("👯‍♂","peoples",["dancing_men"]),new Fs("🚶‍♀","peoples",["walking_woman"]),new Fs("🚶","peoples",["walking_man","walking"]),new Fs("🏃‍♀","peoples",["running_woman"]),new Fs("🏃","peoples",["running_man","runner","running"]),new Fs("👫","peoples",["couple"]),new Fs("👭","peoples",["two_women_holding_hands"]),new Fs("👬","peoples",["two_men_holding_hands"]),new Fs("💑","peoples",["couple_with_heart_woman_man","couple_with_heart"]),new Fs("👩‍❤️‍👩","peoples",["couple_with_heart_woman_woman"]),new Fs("👨‍❤️‍👨","peoples",["couple_with_heart_man_man"]),new Fs("💏","peoples",["couplekiss_man_woman"]),new Fs("👩‍❤️‍💋‍👩","peoples",["couplekiss_woman_woman"]),new Fs("👨‍❤️‍💋‍👨","peoples",["couplekiss_man_man"]),new Fs("👪","peoples",["family_man_woman_boy","family"]),new Fs("👨‍👩‍👧","peoples",["family_man_woman_girl"]),new Fs("👨‍👩‍👧‍👦","peoples",["family_man_woman_girl_boy"]),new Fs("👨‍👩‍👦‍👦","peoples",["family_man_woman_boy_boy"]),new Fs("👨‍👩‍👧‍👧","peoples",["family_man_woman_girl_girl"]),new Fs("👩‍👩‍👦","peoples",["family_woman_woman_boy"]),new Fs("👩‍👩‍👧","peoples",["family_woman_woman_girl"]),new Fs("👩‍👩‍👧‍👦","peoples",["family_woman_woman_girl_boy"]),new Fs("👩‍👩‍👦‍👦","peoples",["family_woman_woman_boy_boy"]),new Fs("👩‍👩‍👧‍👧","peoples",["family_woman_woman_girl_girl"]),new Fs("👨‍👨‍👦","peoples",["family_man_man_boy"]),new Fs("👨‍👨‍👧","peoples",["family_man_man_girl"]),new Fs("👨‍👨‍👧‍👦","peoples",["family_man_man_girl_boy"]),new Fs("👨‍👨‍👦‍👦","peoples",["family_man_man_boy_boy"]),new Fs("👨‍👨‍👧‍👧","peoples",["family_man_man_girl_girl"]),new Fs("👩‍👦","peoples",["family_woman_boy"]),new Fs("👩‍👧","peoples",["family_woman_girl"]),new Fs("👩‍👧‍👦","peoples",["family_woman_girl_boy"]),new Fs("👩‍👦‍👦","peoples",["family_woman_boy_boy"]),new Fs("👩‍👧‍👧","peoples",["family_woman_girl_girl"]),new Fs("👨‍👦","peoples",["family_man_boy"]),new Fs("👨‍👧","peoples",["family_man_girl"]),new Fs("👨‍👧‍👦","peoples",["family_man_girl_boy"]),new Fs("👨‍👦‍👦","peoples",["family_man_boy_boy"]),new Fs("👨‍👧‍👧","peoples",["family_man_girl_girl"]),new Fs("👚","peoples",["womans_clothes"]),new Fs("👕","peoples",["shirt","tshirt"]),new Fs("👖","peoples",["jeans"]),new Fs("👔","peoples",["necktie"]),new Fs("👗","peoples",["dress"]),new Fs("👙","peoples",["bikini"]),new Fs("👘","peoples",["kimono"]),new Fs("👠","peoples",["high_heel"]),new Fs("👡","peoples",["sandal"]),new Fs("👢","peoples",["boot"]),new Fs("👞","peoples",["mans_shoe","shoe"]),new Fs("👟","peoples",["athletic_shoe"]),new Fs("👒","peoples",["womans_hat"]),new Fs("🎩","peoples",["tophat"]),new Fs("🎓","peoples",["mortar_board"]),new Fs("👑","peoples",["crown"]),new Fs("⛑","peoples",["rescue_worker_helmet"]),new Fs("🎒","peoples",["school_satchel"]),new Fs("👝","peoples",["pouch"]),new Fs("👛","peoples",["purse"]),new Fs("👜","peoples",["handbag"]),new Fs("💼","peoples",["briefcase"]),new Fs("👓","peoples",["eyeglasses"]),new Fs("🕶","peoples",["dark_sunglasses"]),new Fs("🌂","peoples",["closed_umbrella"]),new Fs("☂️","peoples",["open_umbrella"]),new Fs("🐶","nature",["dog"]),new Fs("🐱","nature",["cat"]),new Fs("🐭","nature",["mouse"]),new Fs("🐹","nature",["hamster"]),new Fs("🐰","nature",["rabbit"]),new Fs("🦊","nature",["fox_face"]),new Fs("🐻","nature",["bear"]),new Fs("🐼","nature",["panda_face"]),new Fs("🐨","nature",["koala"]),new Fs("🐯","nature",["tiger"]),new Fs("🦁","nature",["lion"]),new Fs("🐮","nature",["cow"]),new Fs("🐷","nature",["pig"]),new Fs("🐽","nature",["pig_nose"]),new Fs("🐸","nature",["frog"]),new Fs("🐵","nature",["monkey_face"]),new Fs("🙈","nature",["see_no_evil"]),new Fs("🙉","nature",["hear_no_evil"]),new Fs("🙊","nature",["speak_no_evil"]),new Fs("🐒","nature",["monkey"]),new Fs("🐔","nature",["chicken"]),new Fs("🐧","nature",["penguin"]),new Fs("🐦","nature",["bird"]),new Fs("🐤","nature",["baby_chick"]),new Fs("🐣","nature",["hatching_chick"]),new Fs("🐥","nature",["hatched_chick"]),new Fs("🦆","nature",["duck"]),new Fs("🦅","nature",["eagle"]),new Fs("🦉","nature",["owl"]),new Fs("🦇","nature",["bat"]),new Fs("🐺","nature",["wolf"]),new Fs("🐗","nature",["boar"]),new Fs("🐴","nature",["horse"]),new Fs("🦄","nature",["unicorn"]),new Fs("🐝","nature",["bee","honeybee"]),new Fs("🐛","nature",["bug"]),new Fs("🦋","nature",["butterfly"]),new Fs("🐌","nature",["snail"]),new Fs("🐚","nature",["shell"]),new Fs("🐞","nature",["beetle"]),new Fs("🐜","nature",["ant"]),new Fs("🕷","nature",["spider"]),new Fs("🕸","nature",["spider_web"]),new Fs("🐢","nature",["turtle"]),new Fs("🐍","nature",["snake"]),new Fs("🦎","nature",["lizard"]),new Fs("🦂","nature",["scorpion"]),new Fs("🦀","nature",["crab"]),new Fs("🦑","nature",["squid"]),new Fs("🐙","nature",["octopus"]),new Fs("🦐","nature",["shrimp"]),new Fs("🐠","nature",["tropical_fish"]),new Fs("🐟","nature",["fish"]),new Fs("🐡","nature",["blowfish"]),new Fs("🐬","nature",["dolphin","flipper"]),new Fs("🦈","nature",["shark"]),new Fs("🐳","nature",["whale"]),new Fs("🐋","nature",["whale2"]),new Fs("🐊","nature",["crocodile"]),new Fs("🐆","nature",["leopard"]),new Fs("🐅","nature",["tiger2"]),new Fs("🐃","nature",["water_buffalo"]),new Fs("🐂","nature",["ox"]),new Fs("🐄","nature",["cow2"]),new Fs("🦌","nature",["deer"]),new Fs("🐪","nature",["dromedary_camel"]),new Fs("🐫","nature",["camel"]),new Fs("🐘","nature",["elephant"]),new Fs("🦏","nature",["rhinoceros"]),new Fs("🦍","nature",["gorilla"]),new Fs("🐎","nature",["racehorse"]),new Fs("🐖","nature",["pig2"]),new Fs("🐐","nature",["goat"]),new Fs("🐏","nature",["ram"]),new Fs("🐑","nature",["sheep"]),new Fs("🐕","nature",["dog2"]),new Fs("🐩","nature",["poodle"]),new Fs("🐈","nature",["cat2"]),new Fs("🐓","nature",["rooster"]),new Fs("🦃","nature",["turkey"]),new Fs("🕊","nature",["dove"]),new Fs("🐇","nature",["rabbit2"]),new Fs("🐁","nature",["mouse2"]),new Fs("🐀","nature",["rat"]),new Fs("🐿","nature",["chipmunk"]),new Fs("🐾","nature",["feet","paw_prints"]),new Fs("🐉","nature",["dragon"]),new Fs("🐲","nature",["dragon_face"]),new Fs("🌵","nature",["cactus"]),new Fs("🎄","nature",["christmas_tree"]),new Fs("🌲","nature",["evergreen_tree"]),new Fs("🌳","nature",["deciduous_tree"]),new Fs("🌴","nature",["palm_tree"]),new Fs("🌱","nature",["seedling"]),new Fs("🌿","nature",["herb"]),new Fs("☘️","nature",["shamrock"]),new Fs("🍀","nature",["four_leaf_clover"]),new Fs("🎍","nature",["bamboo"]),new Fs("🎋","nature",["tanabata_tree"]),new Fs("🍃","nature",["leaves"]),new Fs("🍂","nature",["fallen_leaf"]),new Fs("🍁","nature",["maple_leaf"]),new Fs("🍄","nature",["mushroom"]),new Fs("🌾","nature",["ear_of_rice"]),new Fs("💐","nature",["bouquet"]),new Fs("🌷","nature",["tulip"]),new Fs("🌹","nature",["rose"]),new Fs("🥀","nature",["wilted_flower"]),new Fs("🌻","nature",["sunflower"]),new Fs("🌼","nature",["blossom"]),new Fs("🌸","nature",["cherry_blossom"]),new Fs("🌺","nature",["hibiscus"]),new Fs("🌎","nature",["earth_americas"]),new Fs("🌍","nature",["earth_africa"]),new Fs("🌏","nature",["earth_asia"]),new Fs("🌕","nature",["full_moon"]),new Fs("🌖","nature",["waning_gibbous_moon"]),new Fs("🌗","nature",["last_quarter_moon"]),new Fs("🌘","nature",["waning_crescent_moon"]),new Fs("🌑","nature",["new_moon"]),new Fs("🌒","nature",["waxing_crescent_moon"]),new Fs("🌓","nature",["first_quarter_moon"]),new Fs("🌔","nature",["moon","waxing_gibbous_moon"]),new Fs("🌚","nature",["new_moon_with_face"]),new Fs("🌝","nature",["full_moon_with_face"]),new Fs("🌞","nature",["sun_with_face"]),new Fs("🌛","nature",["first_quarter_moon_with_face"]),new Fs("🌜","nature",["last_quarter_moon_with_face"]),new Fs("🌙","nature",["crescent_moon"]),new Fs("💫","nature",["dizzy"]),new Fs("⭐️","nature",["star"]),new Fs("🌟","nature",["star2"]),new Fs("✨","nature",["sparkles"]),new Fs("⚡️","nature",["zap"]),new Fs("🔥","nature",["fire"]),new Fs("💥","nature",["boom","collision"]),new Fs("☄","nature",["comet"]),new Fs("☀️","nature",["sunny"]),new Fs("🌤","nature",["sun_behind_small_cloud"]),new Fs("⛅️","nature",["partly_sunny"]),new Fs("🌥","nature",["sun_behind_large_cloud"]),new Fs("🌦","nature",["sun_behind_rain_cloud"]),new Fs("🌈","nature",["rainbow"]),new Fs("☁️","nature",["cloud"]),new Fs("🌧","nature",["cloud_with_rain"]),new Fs("⛈","nature",["cloud_with_lightning_and_rain"]),new Fs("🌩","nature",["cloud_with_lightning"]),new Fs("🌨","nature",["cloud_with_snow"]),new Fs("☃️","nature",["snowman_with_snow"]),new Fs("⛄️","nature",["snowman"]),new Fs("❄️","nature",["snowflake"]),new Fs("🌬","nature",["wind_face"]),new Fs("💨","nature",["dash"]),new Fs("🌪","nature",["tornado"]),new Fs("🌫","nature",["fog"]),new Fs("🌊","nature",["ocean"]),new Fs("💧","nature",["droplet"]),new Fs("💦","nature",["sweat_drops"]),new Fs("☔️","nature",["umbrella"]),new Fs("🍏","foods",["green_apple"]),new Fs("🍎","foods",["apple"]),new Fs("🍐","foods",["pear"]),new Fs("🍊","foods",["tangerine","orange","mandarin"]),new Fs("🍋","foods",["lemon"]),new Fs("🍌","foods",["banana"]),new Fs("🍉","foods",["watermelon"]),new Fs("🍇","foods",["grapes"]),new Fs("🍓","foods",["strawberry"]),new Fs("🍈","foods",["melon"]),new Fs("🍒","foods",["cherries"]),new Fs("🍑","foods",["peach"]),new Fs("🍍","foods",["pineapple"]),new Fs("🥝","foods",["kiwi_fruit"]),new Fs("🥑","foods",["avocado"]),new Fs("🍅","foods",["tomato"]),new Fs("🍆","foods",["eggplant"]),new Fs("🥒","foods",["cucumber"]),new Fs("🥕","foods",["carrot"]),new Fs("🌽","foods",["corn"]),new Fs("🌶","foods",["hot_pepper"]),new Fs("🥔","foods",["potato"]),new Fs("🍠","foods",["sweet_potato"]),new Fs("🌰","foods",["chestnut"]),new Fs("🥜","foods",["peanuts"]),new Fs("🍯","foods",["honey_pot"]),new Fs("🥐","foods",["croissant"]),new Fs("🍞","foods",["bread"]),new Fs("🥖","foods",["baguette_bread"]),new Fs("🧀","foods",["cheese"]),new Fs("🥚","foods",["egg"]),new Fs("🍳","foods",["fried_egg"]),new Fs("🥓","foods",["bacon"]),new Fs("🥞","foods",["pancakes"]),new Fs("🍤","foods",["fried_shrimp"]),new Fs("🍗","foods",["poultry_leg"]),new Fs("🍖","foods",["meat_on_bone"]),new Fs("🍕","foods",["pizza"]),new Fs("🌭","foods",["hotdog"]),new Fs("🍔","foods",["hamburger"]),new Fs("🍟","foods",["fries"]),new Fs("🥙","foods",["stuffed_flatbread"]),new Fs("🌮","foods",["taco"]),new Fs("🌯","foods",["burrito"]),new Fs("🥗","foods",["green_salad"]),new Fs("🥘","foods",["shallow_pan_of_food"]),new Fs("🍝","foods",["spaghetti"]),new Fs("🍜","foods",["ramen"]),new Fs("🍲","foods",["stew"]),new Fs("🍥","foods",["fish_cake"]),new Fs("🍣","foods",["sushi"]),new Fs("🍱","foods",["bento"]),new Fs("🍛","foods",["curry"]),new Fs("🍚","foods",["rice"]),new Fs("🍙","foods",["rice_ball"]),new Fs("🍘","foods",["rice_cracker"]),new Fs("🍢","foods",["oden"]),new Fs("🍡","foods",["dango"]),new Fs("🍧","foods",["shaved_ice"]),new Fs("🍨","foods",["ice_cream"]),new Fs("🍦","foods",["icecream"]),new Fs("🍰","foods",["cake"]),new Fs("🎂","foods",["birthday"]),new Fs("🍮","foods",["custard"]),new Fs("🍭","foods",["lollipop"]),new Fs("🍬","foods",["candy"]),new Fs("🍫","foods",["chocolate_bar"]),new Fs("🍿","foods",["popcorn"]),new Fs("🍩","foods",["doughnut"]),new Fs("🍪","foods",["cookie"]),new Fs("🥛","foods",["milk_glass"]),new Fs("🍼","foods",["baby_bottle"]),new Fs("☕️","foods",["coffee"]),new Fs("🍵","foods",["tea"]),new Fs("🍶","foods",["sake"]),new Fs("🍺","foods",["beer"]),new Fs("🍻","foods",["beers"]),new Fs("🥂","foods",["clinking_glasses"]),new Fs("🍷","foods",["wine_glass"]),new Fs("🥃","foods",["tumbler_glass"]),new Fs("🍸","foods",["cocktail"]),new Fs("🍹","foods",["tropical_drink"]),new Fs("🍾","foods",["champagne"]),new Fs("🥄","foods",["spoon"]),new Fs("🍴","foods",["fork_and_knife"]),new Fs("🍽","foods",["plate_with_cutlery"]),new Fs("⚽️","activity",["soccer"]),new Fs("🏀","activity",["basketball"]),new Fs("🏈","activity",["football"]),new Fs("⚾️","activity",["baseball"]),new Fs("🎾","activity",["tennis"]),new Fs("🏐","activity",["volleyball"]),new Fs("🏉","activity",["rugby_football"]),new Fs("🎱","activity",["8ball"]),new Fs("🏓","activity",["ping_pong"]),new Fs("🏸","activity",["badminton"]),new Fs("🥅","activity",["goal_net"]),new Fs("🏒","activity",["ice_hockey"]),new Fs("🏑","activity",["field_hockey"]),new Fs("🏏","activity",["cricket"]),new Fs("⛳️","activity",["golf"]),new Fs("🏹","activity",["bow_and_arrow"]),new Fs("🎣","activity",["fishing_pole_and_fish"]),new Fs("🥊","activity",["boxing_glove"]),new Fs("🥋","activity",["martial_arts_uniform"]),new Fs("⛸","activity",["ice_skate"]),new Fs("🎿","activity",["ski"]),new Fs("⛷","activity",["skier"]),new Fs("🏂","activity",["snowboarder"]),new Fs("🏋️‍♀️","activity",["weight_lifting_woman"]),new Fs("🏋","activity",["weight_lifting_man"]),new Fs("🤺","activity",["person_fencing"]),new Fs("🤼‍♀","activity",["women_wrestling"]),new Fs("🤼‍♂","activity",["men_wrestling"]),new Fs("🤸‍♀","activity",["woman_cartwheeling"]),new Fs("🤸‍♂","activity",["man_cartwheeling"]),new Fs("⛹️‍♀️","activity",["basketball_woman"]),new Fs("⛹","activity",["basketball_man"]),new Fs("🤾‍♀","activity",["woman_playing_handball"]),new Fs("🤾‍♂","activity",["man_playing_handball"]),new Fs("🏌️‍♀️","activity",["golfing_woman"]),new Fs("🏌","activity",["golfing_man"]),new Fs("🏄‍♀","activity",["surfing_woman"]),new Fs("🏄","activity",["surfing_man","surfer"]),new Fs("🏊‍♀","activity",["swimming_woman"]),new Fs("🏊","activity",["swimming_man","swimmer"]),new Fs("🤽‍♀","activity",["woman_playing_water_polo"]),new Fs("🤽‍♂","activity",["man_playing_water_polo"]),new Fs("🚣‍♀","activity",["rowing_woman"]),new Fs("🚣","activity",["rowing_man","rowboat"]),new Fs("🏇","activity",["horse_racing"]),new Fs("🚴‍♀","activity",["biking_woman"]),new Fs("🚴","activity",["biking_man","bicyclist"]),new Fs("🚵‍♀","activity",["mountain_biking_woman"]),new Fs("🚵","activity",["mountain_biking_man","mountain_bicyclist"]),new Fs("🎽","activity",["running_shirt_with_sash"]),new Fs("🏅","activity",["medal_sports"]),new Fs("🎖","activity",["medal_military"]),new Fs("🥇","activity",["1st_place_medal"]),new Fs("🥈","activity",["2nd_place_medal"]),new Fs("🥉","activity",["3rd_place_medal"]),new Fs("🏆","activity",["trophy"]),new Fs("🏵","activity",["rosette"]),new Fs("🎗","activity",["reminder_ribbon"]),new Fs("🎫","activity",["ticket"]),new Fs("🎟","activity",["tickets"]),new Fs("🎪","activity",["circus_tent"]),new Fs("🤹‍♀","activity",["woman_juggling"]),new Fs("🤹‍♂","activity",["man_juggling"]),new Fs("🎭","activity",["performing_arts"]),new Fs("🎨","activity",["art"]),new Fs("🎬","activity",["clapper"]),new Fs("🎤","activity",["microphone"]),new Fs("🎧","activity",["headphones"]),new Fs("🎼","activity",["musical_score"]),new Fs("🎹","activity",["musical_keyboard"]),new Fs("🥁","activity",["drum"]),new Fs("🎷","activity",["saxophone"]),new Fs("🎺","activity",["trumpet"]),new Fs("🎸","activity",["guitar"]),new Fs("🎻","activity",["violin"]),new Fs("🎲","activity",["game_die"]),new Fs("🎯","activity",["dart"]),new Fs("🎳","activity",["bowling"]),new Fs("🎮","activity",["video_game"]),new Fs("🎰","activity",["slot_machine"]),new Fs("🚗","places",["car","red_car"]),new Fs("🚕","places",["taxi"]),new Fs("🚙","places",["blue_car"]),new Fs("🚌","places",["bus"]),new Fs("🚎","places",["trolleybus"]),new Fs("🏎","places",["racing_car"]),new Fs("🚓","places",["police_car"]),new Fs("🚑","places",["ambulance"]),new Fs("🚒","places",["fire_engine"]),new Fs("🚐","places",["minibus"]),new Fs("🚚","places",["truck"]),new Fs("🚛","places",["articulated_lorry"]),new Fs("🚜","places",["tractor"]),new Fs("🛴","places",["kick_scooter"]),new Fs("🚲","places",["bike"]),new Fs("🛵","places",["motor_scooter"]),new Fs("🏍","places",["motorcycle"]),new Fs("🚨","places",["rotating_light"]),new Fs("🚔","places",["oncoming_police_car"]),new Fs("🚍","places",["oncoming_bus"]),new Fs("🚘","places",["oncoming_automobile"]),new Fs("🚖","places",["oncoming_taxi"]),new Fs("🚡","places",["aerial_tramway"]),new Fs("🚠","places",["mountain_cableway"]),new Fs("🚟","places",["suspension_railway"]),new Fs("🚃","places",["railway_car"]),new Fs("🚋","places",["train"]),new Fs("🚞","places",["mountain_railway"]),new Fs("🚝","places",["monorail"]),new Fs("🚄","places",["bullettrain_side"]),new Fs("🚅","places",["bullettrain_front"]),new Fs("🚈","places",["light_rail"]),new Fs("🚂","places",["steam_locomotive"]),new Fs("🚆","places",["train2"]),new Fs("🚇","places",["metro"]),new Fs("🚊","places",["tram"]),new Fs("🚉","places",["station"]),new Fs("🚁","places",["helicopter"]),new Fs("🛩","places",["small_airplane"]),new Fs("✈️","places",["airplane"]),new Fs("🛫","places",["flight_departure"]),new Fs("🛬","places",["flight_arrival"]),new Fs("🚀","places",["rocket"]),new Fs("🛰","places",["artificial_satellite"]),new Fs("💺","places",["seat"]),new Fs("🛶","places",["canoe"]),new Fs("⛵️","places",["boat","sailboat"]),new Fs("🛥","places",["motor_boat"]),new Fs("🚤","places",["speedboat"]),new Fs("🛳","places",["passenger_ship"]),new Fs("⛴","places",["ferry"]),new Fs("🚢","places",["ship"]),new Fs("⚓️","places",["anchor"]),new Fs("🚧","places",["construction"]),new Fs("⛽️","places",["fuelpump"]),new Fs("🚏","places",["busstop"]),new Fs("🚦","places",["vertical_traffic_light"]),new Fs("🚥","places",["traffic_light"]),new Fs("🗺","places",["world_map"]),new Fs("🗿","places",["moyai"]),new Fs("🗽","places",["statue_of_liberty"]),new Fs("⛲️","places",["fountain"]),new Fs("🗼","places",["tokyo_tower"]),new Fs("🏰","places",["european_castle"]),new Fs("🏯","places",["japanese_castle"]),new Fs("🏟","places",["stadium"]),new Fs("🎡","places",["ferris_wheel"]),new Fs("🎢","places",["roller_coaster"]),new Fs("🎠","places",["carousel_horse"]),new Fs("⛱","places",["parasol_on_ground"]),new Fs("🏖","places",["beach_umbrella"]),new Fs("🏝","places",["desert_island"]),new Fs("⛰","places",["mountain"]),new Fs("🏔","places",["mountain_snow"]),new Fs("🗻","places",["mount_fuji"]),new Fs("🌋","places",["volcano"]),new Fs("🏜","places",["desert"]),new Fs("🏕","places",["camping"]),new Fs("⛺️","places",["tent"]),new Fs("🛤","places",["railway_track"]),new Fs("🛣","places",["motorway"]),new Fs("🏗","places",["building_construction"]),new Fs("🏭","places",["factory"]),new Fs("🏠","places",["house"]),new Fs("🏡","places",["house_with_garden"]),new Fs("🏘","places",["houses"]),new Fs("🏚","places",["derelict_house"]),new Fs("🏢","places",["office"]),new Fs("🏬","places",["department_store"]),new Fs("🏣","places",["post_office"]),new Fs("🏤","places",["european_post_office"]),new Fs("🏥","places",["hospital"]),new Fs("🏦","places",["bank"]),new Fs("🏨","places",["hotel"]),new Fs("🏪","places",["convenience_store"]),new Fs("🏫","places",["school"]),new Fs("🏩","places",["love_hotel"]),new Fs("💒","places",["wedding"]),new Fs("🏛","places",["classical_building"]),new Fs("⛪️","places",["church"]),new Fs("🕌","places",["mosque"]),new Fs("🕍","places",["synagogue"]),new Fs("🕋","places",["kaaba"]),new Fs("⛩","places",["shinto_shrine"]),new Fs("🗾","places",["japan"]),new Fs("🎑","places",["rice_scene"]),new Fs("🏞","places",["national_park"]),new Fs("🌅","places",["sunrise"]),new Fs("🌄","places",["sunrise_over_mountains"]),new Fs("🌠","places",["stars"]),new Fs("🎇","places",["sparkler"]),new Fs("🎆","places",["fireworks"]),new Fs("🌇","places",["city_sunrise"]),new Fs("🌆","places",["city_sunset"]),new Fs("🏙","places",["cityscape"]),new Fs("🌃","places",["night_with_stars"]),new Fs("🌌","places",["milky_way"]),new Fs("🌉","places",["bridge_at_night"]),new Fs("🌁","places",["foggy"]),new Fs("⌚️","objects",["watch"]),new Fs("📱","objects",["iphone"]),new Fs("📲","objects",["calling"]),new Fs("💻","objects",["computer"]),new Fs("⌨️","objects",["keyboard"]),new Fs("🖥","objects",["desktop_computer"]),new Fs("🖨","objects",["printer"]),new Fs("🖱","objects",["computer_mouse"]),new Fs("🖲","objects",["trackball"]),new Fs("🕹","objects",["joystick"]),new Fs("🗜","objects",["clamp"]),new Fs("💽","objects",["minidisc"]),new Fs("💾","objects",["floppy_disk"]),new Fs("💿","objects",["cd"]),new Fs("📀","objects",["dvd"]),new Fs("📼","objects",["vhs"]),new Fs("📷","objects",["camera"]),new Fs("📸","objects",["camera_flash"]),new Fs("📹","objects",["video_camera"]),new Fs("🎥","objects",["movie_camera"]),new Fs("📽","objects",["film_projector"]),new Fs("🎞","objects",["film_strip"]),new Fs("📞","objects",["telephone_receiver"]),new Fs("☎️","objects",["phone","telephone"]),new Fs("📟","objects",["pager"]),new Fs("📠","objects",["fax"]),new Fs("📺","objects",["tv"]),new Fs("📻","objects",["radio"]),new Fs("🎙","objects",["studio_microphone"]),new Fs("🎚","objects",["level_slider"]),new Fs("🎛","objects",["control_knobs"]),new Fs("⏱","objects",["stopwatch"]),new Fs("⏲","objects",["timer_clock"]),new Fs("⏰","objects",["alarm_clock"]),new Fs("🕰","objects",["mantelpiece_clock"]),new Fs("⌛️","objects",["hourglass"]),new Fs("⏳","objects",["hourglass_flowing_sand"]),new Fs("📡","objects",["satellite"]),new Fs("🔋","objects",["battery"]),new Fs("🔌","objects",["electric_plug"]),new Fs("💡","objects",["bulb"]),new Fs("🔦","objects",["flashlight"]),new Fs("🕯","objects",["candle"]),new Fs("🗑","objects",["wastebasket"]),new Fs("🛢","objects",["oil_drum"]),new Fs("💸","objects",["money_with_wings"]),new Fs("💵","objects",["dollar"]),new Fs("💴","objects",["yen"]),new Fs("💶","objects",["euro"]),new Fs("💷","objects",["pound"]),new Fs("💰","objects",["moneybag"]),new Fs("💳","objects",["credit_card"]),new Fs("💎","objects",["gem"]),new Fs("⚖️","objects",["balance_scale"]),new Fs("🔧","objects",["wrench"]),new Fs("🔨","objects",["hammer"]),new Fs("⚒","objects",["hammer_and_pick"]),new Fs("🛠","objects",["hammer_and_wrench"]),new Fs("⛏","objects",["pick"]),new Fs("🔩","objects",["nut_and_bolt"]),new Fs("⚙️","objects",["gear"]),new Fs("⛓","objects",["chains"]),new Fs("🔫","objects",["gun"]),new Fs("💣","objects",["bomb"]),new Fs("🔪","objects",["hocho","knife"]),new Fs("🗡","objects",["dagger"]),new Fs("⚔️","objects",["crossed_swords"]),new Fs("🛡","objects",["shield"]),new Fs("🚬","objects",["smoking"]),new Fs("⚰️","objects",["coffin"]),new Fs("⚱️","objects",["funeral_urn"]),new Fs("🏺","objects",["amphora"]),new Fs("🔮","objects",["crystal_ball"]),new Fs("📿","objects",["prayer_beads"]),new Fs("💈","objects",["barber"]),new Fs("⚗️","objects",["alembic"]),new Fs("🔭","objects",["telescope"]),new Fs("🔬","objects",["microscope"]),new Fs("🕳","objects",["hole"]),new Fs("💊","objects",["pill"]),new Fs("💉","objects",["syringe"]),new Fs("🌡","objects",["thermometer"]),new Fs("🚽","objects",["toilet"]),new Fs("🚰","objects",["potable_water"]),new Fs("🚿","objects",["shower"]),new Fs("🛁","objects",["bathtub"]),new Fs("🛀","objects",["bath"]),new Fs("🛎","objects",["bellhop_bell"]),new Fs("🔑","objects",["key"]),new Fs("🗝","objects",["old_key"]),new Fs("🚪","objects",["door"]),new Fs("🛋","objects",["couch_and_lamp"]),new Fs("🛏","objects",["bed"]),new Fs("🛌","objects",["sleeping_bed"]),new Fs("🖼","objects",["framed_picture"]),new Fs("🛍","objects",["shopping"]),new Fs("🛒","objects",["shopping_cart"]),new Fs("🎁","objects",["gift"]),new Fs("🎈","objects",["balloon"]),new Fs("🎏","objects",["flags"]),new Fs("🎀","objects",["ribbon"]),new Fs("🎊","objects",["confetti_ball"]),new Fs("🎉","objects",["tada"]),new Fs("🎎","objects",["dolls"]),new Fs("🏮","objects",["izakaya_lantern","lantern"]),new Fs("🎐","objects",["wind_chime"]),new Fs("✉️","objects",["email","envelope"]),new Fs("📩","objects",["envelope_with_arrow"]),new Fs("📨","objects",["incoming_envelope"]),new Fs("📧","objects",["e-mail"]),new Fs("💌","objects",["love_letter"]),new Fs("📥","objects",["inbox_tray"]),new Fs("📤","objects",["outbox_tray"]),new Fs("📦","objects",["package"]),new Fs("🏷","objects",["label"]),new Fs("📪","objects",["mailbox_closed"]),new Fs("📫","objects",["mailbox"]),new Fs("📬","objects",["mailbox_with_mail"]),new Fs("📭","objects",["mailbox_with_no_mail"]),new Fs("📮","objects",["postbox"]),new Fs("📯","objects",["postal_horn"]),new Fs("📜","objects",["scroll"]),new Fs("📃","objects",["page_with_curl"]),new Fs("📄","objects",["page_facing_up"]),new Fs("📑","objects",["bookmark_tabs"]),new Fs("📊","objects",["bar_chart"]),new Fs("📈","objects",["chart_with_upwards_trend"]),new Fs("📉","objects",["chart_with_downwards_trend"]),new Fs("🗒","objects",["spiral_notepad"]),new Fs("🗓","objects",["spiral_calendar"]),new Fs("📆","objects",["calendar"]),new Fs("📅","objects",["date"]),new Fs("📇","objects",["card_index"]),new Fs("🗃","objects",["card_file_box"]),new Fs("🗳","objects",["ballot_box"]),new Fs("🗄","objects",["file_cabinet"]),new Fs("📋","objects",["clipboard"]),new Fs("📁","objects",["file_folder"]),new Fs("📂","objects",["open_file_folder"]),new Fs("🗂","objects",["card_index_dividers"]),new Fs("🗞","objects",["newspaper_roll"]),new Fs("📰","objects",["newspaper"]),new Fs("📓","objects",["notebook"]),new Fs("📔","objects",["notebook_with_decorative_cover"]),new Fs("📒","objects",["ledger"]),new Fs("📕","objects",["closed_book"]),new Fs("📗","objects",["green_book"]),new Fs("📘","objects",["blue_book"]),new Fs("📙","objects",["orange_book"]),new Fs("📚","objects",["books"]),new Fs("📖","objects",["book","open_book"]),new Fs("🔖","objects",["bookmark"]),new Fs("🔗","objects",["link"]),new Fs("📎","objects",["paperclip"]),new Fs("🖇","objects",["paperclips"]),new Fs("📐","objects",["triangular_ruler"]),new Fs("📏","objects",["straight_ruler"]),new Fs("📌","objects",["pushpin"]),new Fs("📍","objects",["round_pushpin"]),new Fs("✂️","objects",["scissors"]),new Fs("🖊","objects",["pen"]),new Fs("🖋","objects",["fountain_pen"]),new Fs("✒️","objects",["black_nib"]),new Fs("🖌","objects",["paintbrush"]),new Fs("🖍","objects",["crayon"]),new Fs("📝","objects",["memo","pencil"]),new Fs("✏️","objects",["pencil2"]),new Fs("🔍","objects",["mag"]),new Fs("🔎","objects",["mag_right"]),new Fs("🔏","objects",["lock_with_ink_pen"]),new Fs("🔐","objects",["closed_lock_with_key"]),new Fs("🔒","objects",["lock"]),new Fs("🔓","objects",["unlock"]),new Fs("❤️","symbols",["heart"]),new Fs("💛","symbols",["yellow_heart"]),new Fs("💚","symbols",["green_heart"]),new Fs("💙","symbols",["blue_heart"]),new Fs("💜","symbols",["purple_heart"]),new Fs("🖤","symbols",["black_heart"]),new Fs("💔","symbols",["broken_heart"]),new Fs("❣️","symbols",["heavy_heart_exclamation"]),new Fs("💕","symbols",["two_hearts"]),new Fs("💞","symbols",["revolving_hearts"]),new Fs("💓","symbols",["heartbeat"]),new Fs("💗","symbols",["heartpulse"]),new Fs("💖","symbols",["sparkling_heart"]),new Fs("💘","symbols",["cupid"]),new Fs("💝","symbols",["gift_heart"]),new Fs("💟","symbols",["heart_decoration"]),new Fs("☮️","symbols",["peace_symbol"]),new Fs("✝️","symbols",["latin_cross"]),new Fs("☪️","symbols",["star_and_crescent"]),new Fs("🕉","symbols",["om"]),new Fs("☸️","symbols",["wheel_of_dharma"]),new Fs("✡️","symbols",["star_of_david"]),new Fs("🔯","symbols",["six_pointed_star"]),new Fs("🕎","symbols",["menorah"]),new Fs("☯️","symbols",["yin_yang"]),new Fs("☦️","symbols",["orthodox_cross"]),new Fs("🛐","symbols",["place_of_worship"]),new Fs("⛎","symbols",["ophiuchus"]),new Fs("♈️","symbols",["aries"]),new Fs("♉️","symbols",["taurus"]),new Fs("♊️","symbols",["gemini"]),new Fs("♋️","symbols",["cancer"]),new Fs("♌️","symbols",["leo"]),new Fs("♍️","symbols",["virgo"]),new Fs("♎️","symbols",["libra"]),new Fs("♏️","symbols",["scorpius"]),new Fs("♐️","symbols",["sagittarius"]),new Fs("♑️","symbols",["capricorn"]),new Fs("♒️","symbols",["aquarius"]),new Fs("♓️","symbols",["pisces"]),new Fs("🆔","symbols",["id"]),new Fs("⚛️","symbols",["atom_symbol"]),new Fs("🉑","symbols",["accept"]),new Fs("☢️","symbols",["radioactive"]),new Fs("☣️","symbols",["biohazard"]),new Fs("📴","symbols",["mobile_phone_off"]),new Fs("📳","symbols",["vibration_mode"]),new Fs("🈶","symbols",["u6709"]),new Fs("🈚️","symbols",["u7121"]),new Fs("🈸","symbols",["u7533"]),new Fs("🈺","symbols",["u55b6"]),new Fs("🈷️","symbols",["u6708"]),new Fs("✴️","symbols",["eight_pointed_black_star"]),new Fs("🆚","symbols",["vs"]),new Fs("💮","symbols",["white_flower"]),new Fs("🉐","symbols",["ideograph_advantage"]),new Fs("㊙️","symbols",["secret"]),new Fs("㊗️","symbols",["congratulations"]),new Fs("🈴","symbols",["u5408"]),new Fs("🈵","symbols",["u6e80"]),new Fs("🈹","symbols",["u5272"]),new Fs("🈲","symbols",["u7981"]),new Fs("🅰️","symbols",["a"]),new Fs("🅱️","symbols",["b"]),new Fs("🆎","symbols",["ab"]),new Fs("🆑","symbols",["cl"]),new Fs("🅾️","symbols",["o2"]),new Fs("🆘","symbols",["sos"]),new Fs("❌","symbols",["x"]),new Fs("⭕️","symbols",["o"]),new Fs("🛑","symbols",["stop_sign"]),new Fs("⛔️","symbols",["no_entry"]),new Fs("📛","symbols",["name_badge"]),new Fs("🚫","symbols",["no_entry_sign"]),new Fs("💯","symbols",["100"]),new Fs("💢","symbols",["anger"]),new Fs("♨️","symbols",["hotsprings"]),new Fs("🚷","symbols",["no_pedestrians"]),new Fs("🚯","symbols",["do_not_litter"]),new Fs("🚳","symbols",["no_bicycles"]),new Fs("🚱","symbols",["non-potable_water"]),new Fs("🔞","symbols",["underage"]),new Fs("📵","symbols",["no_mobile_phones"]),new Fs("🚭","symbols",["no_smoking"]),new Fs("❗️","symbols",["exclamation","heavy_exclamation_mark"]),new Fs("❕","symbols",["grey_exclamation"]),new Fs("❓","symbols",["question"]),new Fs("❔","symbols",["grey_question"]),new Fs("‼️","symbols",["bangbang"]),new Fs("⁉️","symbols",["interrobang"]),new Fs("🔅","symbols",["low_brightness"]),new Fs("🔆","symbols",["high_brightness"]),new Fs("〽️","symbols",["part_alternation_mark"]),new Fs("⚠️","symbols",["warning"]),new Fs("🚸","symbols",["children_crossing"]),new Fs("🔱","symbols",["trident"]),new Fs("⚜️","symbols",["fleur_de_lis"]),new Fs("🔰","symbols",["beginner"]),new Fs("♻️","symbols",["recycle"]),new Fs("✅","symbols",["white_check_mark"]),new Fs("🈯️","symbols",["u6307"]),new Fs("💹","symbols",["chart"]),new Fs("❇️","symbols",["sparkle"]),new Fs("✳️","symbols",["eight_spoked_asterisk"]),new Fs("❎","symbols",["negative_squared_cross_mark"]),new Fs("🌐","symbols",["globe_with_meridians"]),new Fs("💠","symbols",["diamond_shape_with_a_dot_inside"]),new Fs("Ⓜ️","symbols",["m"]),new Fs("🌀","symbols",["cyclone"]),new Fs("💤","symbols",["zzz"]),new Fs("🏧","symbols",["atm"]),new Fs("🚾","symbols",["wc"]),new Fs("♿️","symbols",["wheelchair"]),new Fs("🅿️","symbols",["parking"]),new Fs("🈳","symbols",["u7a7a"]),new Fs("🈂️","symbols",["sa"]),new Fs("🛂","symbols",["passport_control"]),new Fs("🛃","symbols",["customs"]),new Fs("🛄","symbols",["baggage_claim"]),new Fs("🛅","symbols",["left_luggage"]),new Fs("🚹","symbols",["mens"]),new Fs("🚺","symbols",["womens"]),new Fs("🚼","symbols",["baby_symbol"]),new Fs("🚻","symbols",["restroom"]),new Fs("🚮","symbols",["put_litter_in_its_place"]),new Fs("🎦","symbols",["cinema"]),new Fs("📶","symbols",["signal_strength"]),new Fs("🈁","symbols",["koko"]),new Fs("🔣","symbols",["symbols"]),new Fs("ℹ️","symbols",["information_source"]),new Fs("🔤","symbols",["abc"]),new Fs("🔡","symbols",["abcd"]),new Fs("🔠","symbols",["capital_abcd"]),new Fs("🆖","symbols",["ng"]),new Fs("🆗","symbols",["ok"]),new Fs("🆙","symbols",["up"]),new Fs("🆒","symbols",["cool"]),new Fs("🆕","symbols",["new"]),new Fs("🆓","symbols",["free"]),new Fs("0️⃣","symbols",["zero"]),new Fs("1️⃣","symbols",["one"]),new Fs("2️⃣","symbols",["two"]),new Fs("3️⃣","symbols",["three"]),new Fs("4️⃣","symbols",["four"]),new Fs("5️⃣","symbols",["five"]),new Fs("6️⃣","symbols",["six"]),new Fs("7️⃣","symbols",["seven"]),new Fs("8️⃣","symbols",["eight"]),new Fs("9️⃣","symbols",["nine"]),new Fs("🔟","symbols",["keycap_ten"]),new Fs("🔢","symbols",["1234"]),new Fs("#️⃣","symbols",["hash"]),new Fs("*️⃣","symbols",["asterisk"]),new Fs("▶️","symbols",["arrow_forward"]),new Fs("⏸","symbols",["pause_button"]),new Fs("⏯","symbols",["play_or_pause_button"]),new Fs("⏹","symbols",["stop_button"]),new Fs("⏺","symbols",["record_button"]),new Fs("⏭","symbols",["next_track_button"]),new Fs("⏮","symbols",["previous_track_button"]),new Fs("⏩","symbols",["fast_forward"]),new Fs("⏪","symbols",["rewind"]),new Fs("⏫","symbols",["arrow_double_up"]),new Fs("⏬","symbols",["arrow_double_down"]),new Fs("◀️","symbols",["arrow_backward"]),new Fs("🔼","symbols",["arrow_up_small"]),new Fs("🔽","symbols",["arrow_down_small"]),new Fs("➡️","symbols",["arrow_right"]),new Fs("⬅️","symbols",["arrow_left"]),new Fs("⬆️","symbols",["arrow_up"]),new Fs("⬇️","symbols",["arrow_down"]),new Fs("↗️","symbols",["arrow_upper_right"]),new Fs("↘️","symbols",["arrow_lower_right"]),new Fs("↙️","symbols",["arrow_lower_left"]),new Fs("↖️","symbols",["arrow_upper_left"]),new Fs("↕️","symbols",["arrow_up_down"]),new Fs("↔️","symbols",["left_right_arrow"]),new Fs("↪️","symbols",["arrow_right_hook"]),new Fs("↩️","symbols",["leftwards_arrow_with_hook"]),new Fs("⤴️","symbols",["arrow_heading_up"]),new Fs("⤵️","symbols",["arrow_heading_down"]),new Fs("🔀","symbols",["twisted_rightwards_arrows"]),new Fs("🔁","symbols",["repeat"]),new Fs("🔂","symbols",["repeat_one"]),new Fs("🔄","symbols",["arrows_counterclockwise"]),new Fs("🔃","symbols",["arrows_clockwise"]),new Fs("🎵","symbols",["musical_note"]),new Fs("🎶","symbols",["notes"]),new Fs("➕","symbols",["heavy_plus_sign"]),new Fs("➖","symbols",["heavy_minus_sign"]),new Fs("➗","symbols",["heavy_division_sign"]),new Fs("✖️","symbols",["heavy_multiplication_x"]),new Fs("💲","symbols",["heavy_dollar_sign"]),new Fs("💱","symbols",["currency_exchange"]),new Fs("™️","symbols",["tm"]),new Fs("©️","symbols",["copyright"]),new Fs("®️","symbols",["registered"]),new Fs("〰️","symbols",["wavy_dash"]),new Fs("➰","symbols",["curly_loop"]),new Fs("➿","symbols",["loop"]),new Fs("🔚","symbols",["end"]),new Fs("🔙","symbols",["back"]),new Fs("🔛","symbols",["on"]),new Fs("🔝","symbols",["top"]),new Fs("🔜","symbols",["soon"]),new Fs("✔️","symbols",["heavy_check_mark"]),new Fs("☑️","symbols",["ballot_box_with_check"]),new Fs("🔘","symbols",["radio_button"]),new Fs("⚪️","symbols",["white_circle"]),new Fs("⚫️","symbols",["black_circle"]),new Fs("🔴","symbols",["red_circle"]),new Fs("🔵","symbols",["large_blue_circle"]),new Fs("🔺","symbols",["small_red_triangle"]),new Fs("🔻","symbols",["small_red_triangle_down"]),new Fs("🔸","symbols",["small_orange_diamond"]),new Fs("🔹","symbols",["small_blue_diamond"]),new Fs("🔶","symbols",["large_orange_diamond"]),new Fs("🔷","symbols",["large_blue_diamond"]),new Fs("🔳","symbols",["white_square_button"]),new Fs("🔲","symbols",["black_square_button"]),new Fs("▪️","symbols",["black_small_square"]),new Fs("▫️","symbols",["white_small_square"]),new Fs("◾️","symbols",["black_medium_small_square"]),new Fs("◽️","symbols",["white_medium_small_square"]),new Fs("◼️","symbols",["black_medium_square"]),new Fs("◻️","symbols",["white_medium_square"]),new Fs("⬛️","symbols",["black_large_square"]),new Fs("⬜️","symbols",["white_large_square"]),new Fs("🔈","symbols",["speaker"]),new Fs("🔇","symbols",["mute"]),new Fs("🔉","symbols",["sound"]),new Fs("🔊","symbols",["loud_sound"]),new Fs("🔔","symbols",["bell"]),new Fs("🔕","symbols",["no_bell"]),new Fs("📣","symbols",["mega"]),new Fs("📢","symbols",["loudspeaker"]),new Fs("👁‍🗨","symbols",["eye_speech_bubble"]),new Fs("💬","symbols",["speech_balloon"]),new Fs("💭","symbols",["thought_balloon"]),new Fs("🗯","symbols",["right_anger_bubble"]),new Fs("♠️","symbols",["spades"]),new Fs("♣️","symbols",["clubs"]),new Fs("♥️","symbols",["hearts"]),new Fs("♦️","symbols",["diamonds"]),new Fs("🃏","symbols",["black_joker"]),new Fs("🎴","symbols",["flower_playing_cards"]),new Fs("🀄️","symbols",["mahjong"]),new Fs("🕐","symbols",["clock1"]),new Fs("🕑","symbols",["clock2"]),new Fs("🕒","symbols",["clock3"]),new Fs("🕓","symbols",["clock4"]),new Fs("🕔","symbols",["clock5"]),new Fs("🕕","symbols",["clock6"]),new Fs("🕖","symbols",["clock7"]),new Fs("🕗","symbols",["clock8"]),new Fs("🕘","symbols",["clock9"]),new Fs("🕙","symbols",["clock10"]),new Fs("🕚","symbols",["clock11"]),new Fs("🕛","symbols",["clock12"]),new Fs("🕜","symbols",["clock130"]),new Fs("🕝","symbols",["clock230"]),new Fs("🕞","symbols",["clock330"]),new Fs("🕟","symbols",["clock430"]),new Fs("🕠","symbols",["clock530"]),new Fs("🕡","symbols",["clock630"]),new Fs("🕢","symbols",["clock730"]),new Fs("🕣","symbols",["clock830"]),new Fs("🕤","symbols",["clock930"]),new Fs("🕥","symbols",["clock1030"]),new Fs("🕦","symbols",["clock1130"]),new Fs("🕧","symbols",["clock1230"]),new Fs("🏳️","flags",["white_flag"]),new Fs("🏴","flags",["black_flag"]),new Fs("🏁","flags",["checkered_flag"]),new Fs("🚩","flags",["triangular_flag_on_post"]),new Fs("🏳️‍🌈","flags",["rainbow_flag"]),new Fs("🇦🇫","flags",["afghanistan"]),new Fs("🇦🇽","flags",["aland_islands"]),new Fs("🇦🇱","flags",["albania"]),new Fs("🇩🇿","flags",["algeria"]),new Fs("🇦🇸","flags",["american_samoa"]),new Fs("🇦🇩","flags",["andorra"]),new Fs("🇦🇴","flags",["angola"]),new Fs("🇦🇮","flags",["anguilla"]),new Fs("🇦🇶","flags",["antarctica"]),new Fs("🇦🇬","flags",["antigua_barbuda"]),new Fs("🇦🇷","flags",["argentina"]),new Fs("🇦🇲","flags",["armenia"]),new Fs("🇦🇼","flags",["aruba"]),new Fs("🇦🇺","flags",["australia"]),new Fs("🇦🇹","flags",["austria"]),new Fs("🇦🇿","flags",["azerbaijan"]),new Fs("🇧🇸","flags",["bahamas"]),new Fs("🇧🇭","flags",["bahrain"]),new Fs("🇧🇩","flags",["bangladesh"]),new Fs("🇧🇧","flags",["barbados"]),new Fs("🇧🇾","flags",["belarus"]),new Fs("🇧🇪","flags",["belgium"]),new Fs("🇧🇿","flags",["belize"]),new Fs("🇧🇯","flags",["benin"]),new Fs("🇧🇲","flags",["bermuda"]),new Fs("🇧🇹","flags",["bhutan"]),new Fs("🇧🇴","flags",["bolivia"]),new Fs("🇧🇶","flags",["caribbean_netherlands"]),new Fs("🇧🇦","flags",["bosnia_herzegovina"]),new Fs("🇧🇼","flags",["botswana"]),new Fs("🇧🇷","flags",["brazil"]),new Fs("🇮🇴","flags",["british_indian_ocean_territory"]),new Fs("🇻🇬","flags",["british_virgin_islands"]),new Fs("🇧🇳","flags",["brunei"]),new Fs("🇧🇬","flags",["bulgaria"]),new Fs("🇧🇫","flags",["burkina_faso"]),new Fs("🇧🇮","flags",["burundi"]),new Fs("🇨🇻","flags",["cape_verde"]),new Fs("🇰🇭","flags",["cambodia"]),new Fs("🇨🇲","flags",["cameroon"]),new Fs("🇨🇦","flags",["canada"]),new Fs("🇮🇨","flags",["canary_islands"]),new Fs("🇰🇾","flags",["cayman_islands"]),new Fs("🇨🇫","flags",["central_african_republic"]),new Fs("🇹🇩","flags",["chad"]),new Fs("🇨🇱","flags",["chile"]),new Fs("🇨🇳","flags",["cn"]),new Fs("🇨🇽","flags",["christmas_island"]),new Fs("🇨🇨","flags",["cocos_islands"]),new Fs("🇨🇴","flags",["colombia"]),new Fs("🇰🇲","flags",["comoros"]),new Fs("🇨🇬","flags",["congo_brazzaville"]),new Fs("🇨🇩","flags",["congo_kinshasa"]),new Fs("🇨🇰","flags",["cook_islands"]),new Fs("🇨🇷","flags",["costa_rica"]),new Fs("🇨🇮","flags",["cote_divoire"]),new Fs("🇭🇷","flags",["croatia"]),new Fs("🇨🇺","flags",["cuba"]),new Fs("🇨🇼","flags",["curacao"]),new Fs("🇨🇾","flags",["cyprus"]),new Fs("🇨🇿","flags",["czech_republic"]),new Fs("🇩🇰","flags",["denmark"]),new Fs("🇩🇯","flags",["djibouti"]),new Fs("🇩🇲","flags",["dominica"]),new Fs("🇩🇴","flags",["dominican_republic"]),new Fs("🇪🇨","flags",["ecuador"]),new Fs("🇪🇬","flags",["egypt"]),new Fs("🇸🇻","flags",["el_salvador"]),new Fs("🇬🇶","flags",["equatorial_guinea"]),new Fs("🇪🇷","flags",["eritrea"]),new Fs("🇪🇪","flags",["estonia"]),new Fs("🇪🇹","flags",["ethiopia"]),new Fs("🇪🇺","flags",["eu","european_union"]),new Fs("🇫🇰","flags",["falkland_islands"]),new Fs("🇫🇴","flags",["faroe_islands"]),new Fs("🇫🇯","flags",["fiji"]),new Fs("🇫🇮","flags",["finland"]),new Fs("🇫🇷","flags",["fr"]),new Fs("🇬🇫","flags",["french_guiana"]),new Fs("🇵🇫","flags",["french_polynesia"]),new Fs("🇹🇫","flags",["french_southern_territories"]),new Fs("🇬🇦","flags",["gabon"]),new Fs("🇬🇲","flags",["gambia"]),new Fs("🇬🇪","flags",["georgia"]),new Fs("🇩🇪","flags",["de"]),new Fs("🇬🇭","flags",["ghana"]),new Fs("🇬🇮","flags",["gibraltar"]),new Fs("🇬🇷","flags",["greece"]),new Fs("🇬🇱","flags",["greenland"]),new Fs("🇬🇩","flags",["grenada"]),new Fs("🇬🇵","flags",["guadeloupe"]),new Fs("🇬🇺","flags",["guam"]),new Fs("🇬🇹","flags",["guatemala"]),new Fs("🇬🇬","flags",["guernsey"]),new Fs("🇬🇳","flags",["guinea"]),new Fs("🇬🇼","flags",["guinea_bissau"]),new Fs("🇬🇾","flags",["guyana"]),new Fs("🇭🇹","flags",["haiti"]),new Fs("🇭🇳","flags",["honduras"]),new Fs("🇭🇰","flags",["hong_kong"]),new Fs("🇭🇺","flags",["hungary"]),new Fs("🇮🇸","flags",["iceland"]),new Fs("🇮🇳","flags",["india"]),new Fs("🇮🇩","flags",["indonesia"]),new Fs("🇮🇷","flags",["iran"]),new Fs("🇮🇶","flags",["iraq"]),new Fs("🇮🇪","flags",["ireland"]),new Fs("🇮🇲","flags",["isle_of_man"]),new Fs("🇮🇱","flags",["israel"]),new Fs("🇮🇹","flags",["it"]),new Fs("🇯🇲","flags",["jamaica"]),new Fs("🇯🇵","flags",["jp"]),new Fs("🎌","flags",["crossed_flags"]),new Fs("🇯🇪","flags",["jersey"]),new Fs("🇯🇴","flags",["jordan"]),new Fs("🇰🇿","flags",["kazakhstan"]),new Fs("🇰🇪","flags",["kenya"]),new Fs("🇰🇮","flags",["kiribati"]),new Fs("🇽🇰","flags",["kosovo"]),new Fs("🇰🇼","flags",["kuwait"]),new Fs("🇰🇬","flags",["kyrgyzstan"]),new Fs("🇱🇦","flags",["laos"]),new Fs("🇱🇻","flags",["latvia"]),new Fs("🇱🇧","flags",["lebanon"]),new Fs("🇱🇸","flags",["lesotho"]),new Fs("🇱🇷","flags",["liberia"]),new Fs("🇱🇾","flags",["libya"]),new Fs("🇱🇮","flags",["liechtenstein"]),new Fs("🇱🇹","flags",["lithuania"]),new Fs("🇱🇺","flags",["luxembourg"]),new Fs("🇲🇴","flags",["macau"]),new Fs("🇲🇰","flags",["macedonia"]),new Fs("🇲🇬","flags",["madagascar"]),new Fs("🇲🇼","flags",["malawi"]),new Fs("🇲🇾","flags",["malaysia"]),new Fs("🇲🇻","flags",["maldives"]),new Fs("🇲🇱","flags",["mali"]),new Fs("🇲🇹","flags",["malta"]),new Fs("🇲🇭","flags",["marshall_islands"]),new Fs("🇲🇶","flags",["martinique"]),new Fs("🇲🇷","flags",["mauritania"]),new Fs("🇲🇺","flags",["mauritius"]),new Fs("🇾🇹","flags",["mayotte"]),new Fs("🇲🇽","flags",["mexico"]),new Fs("🇫🇲","flags",["micronesia"]),new Fs("🇲🇩","flags",["moldova"]),new Fs("🇲🇨","flags",["monaco"]),new Fs("🇲🇳","flags",["mongolia"]),new Fs("🇲🇪","flags",["montenegro"]),new Fs("🇲🇸","flags",["montserrat"]),new Fs("🇲🇦","flags",["morocco"]),new Fs("🇲🇿","flags",["mozambique"]),new Fs("🇲🇲","flags",["myanmar"]),new Fs("🇳🇦","flags",["namibia"]),new Fs("🇳🇷","flags",["nauru"]),new Fs("🇳🇵","flags",["nepal"]),new Fs("🇳🇱","flags",["netherlands"]),new Fs("🇳🇨","flags",["new_caledonia"]),new Fs("🇳🇿","flags",["new_zealand"]),new Fs("🇳🇮","flags",["nicaragua"]),new Fs("🇳🇪","flags",["niger"]),new Fs("🇳🇬","flags",["nigeria"]),new Fs("🇳🇺","flags",["niue"]),new Fs("🇳🇫","flags",["norfolk_island"]),new Fs("🇲🇵","flags",["northern_mariana_islands"]),new Fs("🇰🇵","flags",["north_korea"]),new Fs("🇳🇴","flags",["norway"]),new Fs("🇴🇲","flags",["oman"]),new Fs("🇵🇰","flags",["pakistan"]),new Fs("🇵🇼","flags",["palau"]),new Fs("🇵🇸","flags",["palestinian_territories"]),new Fs("🇵🇦","flags",["panama"]),new Fs("🇵🇬","flags",["papua_new_guinea"]),new Fs("🇵🇾","flags",["paraguay"]),new Fs("🇵🇪","flags",["peru"]),new Fs("🇵🇭","flags",["philippines"]),new Fs("🇵🇳","flags",["pitcairn_islands"]),new Fs("🇵🇱","flags",["poland"]),new Fs("🇵🇹","flags",["portugal"]),new Fs("🇵🇷","flags",["puerto_rico"]),new Fs("🇶🇦","flags",["qatar"]),new Fs("🇷🇪","flags",["reunion"]),new Fs("🇷🇴","flags",["romania"]),new Fs("🇷🇺","flags",["ru"]),new Fs("🇷🇼","flags",["rwanda"]),new Fs("🇧🇱","flags",["st_barthelemy"]),new Fs("🇸🇭","flags",["st_helena"]),new Fs("🇰🇳","flags",["st_kitts_nevis"]),new Fs("🇱🇨","flags",["st_lucia"]),new Fs("🇵🇲","flags",["st_pierre_miquelon"]),new Fs("🇻🇨","flags",["st_vincent_grenadines"]),new Fs("🇼🇸","flags",["samoa"]),new Fs("🇸🇲","flags",["san_marino"]),new Fs("🇸🇹","flags",["sao_tome_principe"]),new Fs("🇸🇦","flags",["saudi_arabia"]),new Fs("🇸🇳","flags",["senegal"]),new Fs("🇷🇸","flags",["serbia"]),new Fs("🇸🇨","flags",["seychelles"]),new Fs("🇸🇱","flags",["sierra_leone"]),new Fs("🇸🇬","flags",["singapore"]),new Fs("🇸🇽","flags",["sint_maarten"]),new Fs("🇸🇰","flags",["slovakia"]),new Fs("🇸🇮","flags",["slovenia"]),new Fs("🇸🇧","flags",["solomon_islands"]),new Fs("🇸🇴","flags",["somalia"]),new Fs("🇿🇦","flags",["south_africa"]),new Fs("🇬🇸","flags",["south_georgia_south_sandwich_islands"]),new Fs("🇰🇷","flags",["kr"]),new Fs("🇸🇸","flags",["south_sudan"]),new Fs("🇪🇸","flags",["es"]),new Fs("🇱🇰","flags",["sri_lanka"]),new Fs("🇸🇩","flags",["sudan"]),new Fs("🇸🇷","flags",["suriname"]),new Fs("🇸🇿","flags",["swaziland"]),new Fs("🇸🇪","flags",["sweden"]),new Fs("🇨🇭","flags",["switzerland"]),new Fs("🇸🇾","flags",["syria"]),new Fs("🇹🇼","flags",["taiwan"]),new Fs("🇹🇯","flags",["tajikistan"]),new Fs("🇹🇿","flags",["tanzania"]),new Fs("🇹🇭","flags",["thailand"]),new Fs("🇹🇱","flags",["timor_leste"]),new Fs("🇹🇬","flags",["togo"]),new Fs("🇹🇰","flags",["tokelau"]),new Fs("🇹🇴","flags",["tonga"]),new Fs("🇹🇹","flags",["trinidad_tobago"]),new Fs("🇹🇳","flags",["tunisia"]),new Fs("🇹🇷","flags",["tr"]),new Fs("🇹🇲","flags",["turkmenistan"]),new Fs("🇹🇨","flags",["turks_caicos_islands"]),new Fs("🇹🇻","flags",["tuvalu"]),new Fs("🇺🇬","flags",["uganda"]),new Fs("🇺🇦","flags",["ukraine"]),new Fs("🇦🇪","flags",["united_arab_emirates"]),new Fs("🇬🇧","flags",["gb","uk"]),new Fs("🇺🇸","flags",["us"]),new Fs("🇻🇮","flags",["us_virgin_islands"]),new Fs("🇺🇾","flags",["uruguay"]),new Fs("🇺🇿","flags",["uzbekistan"]),new Fs("🇻🇺","flags",["vanuatu"]),new Fs("🇻🇦","flags",["vatican_city"]),new Fs("🇻🇪","flags",["venezuela"]),new Fs("🇻🇳","flags",["vietnam"]),new Fs("🇼🇫","flags",["wallis_futuna"]),new Fs("🇪🇭","flags",["western_sahara"]),new Fs("🇾🇪","flags",["yemen"]),new Fs("🇿🇲","flags",["zambia"]),new Fs("🇿🇼","flags",["zimbabwe"])],qs='\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 ',Gs='\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 ',Hs='\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 ',Ws='\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 ',Ks='\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 ',Xs='\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 ',$s='\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 ',Ys='\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 ',Js='\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 ',Qs=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:ht(e.label),innerHTML:e.icon},null)])))])}}),Zs=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])}}),ei=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)}}),ti=(e,t)=>t.aliases.some((t=>(t=>t.toLowerCase().includes(e))(t))),ai=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"),s=n({}),i=n({}),r=l((()=>{let t=e.data[e.category];const a=e.filter.trim().toLowerCase();return a&&(t=t.filter((e=>ti(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=>ti(a,e)))})),t})),h=e=>{t("select",e)};c((()=>e.data),(()=>{s.value.$el.scrollTop=0})),c((()=>e.category),(t=>{if(e.continuousList){const a=i.value[t].$el;s.value.scrollTop=a.offsetTop-(e.hasSearch?88:44)}}));return{ns:a,emojisRef:s,gridDynamic:u,dataFiltered:r,dataFilteredByCategory:p,onSelect:h,setCategoryRef:(e,t)=>{t&&(i.value[e]=t)},renderGridEmojis:e=>{const{emojis:t,style:n,size:s,withBorder:i}=e;return t&&t.length>0?o("div",{class:[a.m("grid-emojis")],style:n},[t.map((e=>o(ei,{emoji:e,size:s,withBorder:i,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(Zs,{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})])])}}),ni=a({name:"IBizInputSearch",emits:["update"],setup(e,{emit:t}){const a=B("emoji-input-search"),o=n(""),s=()=>{t("update",o.value)};return{ns:a,inputSearch:o,onSearch:s,handleKeyUp:e=>{e&&"Enter"===e.code&&s()}}},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)])])]),h(o("input",{class:this.ns.em("container","input"),type:"text","onUpdate:modelValue":e=>this.inputSearch=e,placeholder:ibiz.i18n.t("app.search")},null),[[y,this.inputSearch]])])])}}),oi=a({name:"IBizEmojiSelect",props:{customEmojis:{type:Array,required:!0,default:()=>Us},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([]),s=n([]),i=n("peoples"),r=n([]),u=n([]),p=n([]),h=n({}),m=n({}),b=n("");b.value=i.value;const v=n(""),w=s.value.map((e=>e.name));w.includes(i.value)||(i.value=w[0]);const g=l((()=>s.value.filter((e=>!r.value.includes(e))))),f=e=>{Object.assign(m.value,{frequently:[]}),e.filter((e=>!u.value.includes(e))).forEach((e=>{const t=e.category;m.value[t]||Object.assign(m.value,{[t]:[]}),m.value[t].push(e)}))},y=async t=>{const a=m.value.frequently,n=[...new Set([t,...a])];m.value.frequently=n.slice(0,e.limitFrequently),(e=>{const t=e.map((e=>o.value.indexOf(e)));p.value=t})(n)};return c((()=>e.customEmojis),(t=>{o.value=e.customEmojis,t&&t.length&&(m.value={},f(t))}),{immediate:!0,deep:!0}),c((()=>e.customCategories),(e=>{e&&e.length>0?s.value=e:s.value=[new Ms("frequently",Ws,ibiz.i18n.t("component.emojiSelect.frequently")),new Ms("peoples",$s,ibiz.i18n.t("component.emojiSelect.peoples")),new Ms("nature",Ks,ibiz.i18n.t("component.emojiSelect.nature")),new Ms("foods",Hs,ibiz.i18n.t("component.emojiSelect.foods")),new Ms("activity",qs,ibiz.i18n.t("component.emojiSelect.activity")),new Ms("objects",Xs,ibiz.i18n.t("component.emojiSelect.objects")),new Ms("places",Ys,ibiz.i18n.t("component.emojiSelect.places")),new Ms("symbols",Js,ibiz.i18n.t("component.emojiSelect.symbols")),new Ms("flags",Gs,ibiz.i18n.t("component.emojiSelect.flags"))],s.value.forEach((e=>{Object.assign(h.value,{[e.name]:e})}))}),{immediate:!0,deep:!0}),c((()=>e.initialCategory),(()=>{i.value=e.initialCategory})),c((()=>e.exceptCategories),(()=>{r.value=e.exceptCategories})),c((()=>e.exceptEmojis),(()=>{u.value=e.exceptEmojis})),d((()=>{f(o.value),(async()=>{const e=p.value||[];Object.assign(m.value,{frequently:e.map((e=>o.value[e]))})})()})),C((()=>{m.value={},p.value=[]})),{ns:a,mapEmojis:m,filterEmoji:v,mapCategories:h,currentCategory:b,categoriesFiltered:g,onSearch:async e=>{v.value=e},onSelectEmoji:async e=>{await y(e),t("select",e)},changeCategory:async e=>{const a=m.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(Qs,{categories:this.categoriesFiltered,current:this.currentCategory,onSelect:this.changeCategory},null),this.showSearch&&o(ni,{onUpdate:this.onSearch},null),o(ai,{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 si(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const ii=a({name:"IBizQuickEdit",props:{context:{type:Object,required:!0},params:{type:Object,required:!0},modelData:{type:Object}},emits:{close:e=>!0},setup(e,{emit:t}){const a=B("quick-edit"),o=n(void 0),s=[],i=e=>{Ht(e).forEach((e=>{"FORMITEM"!==e.detailType||e.hidden||s.push(e),i(e)}))};var l;e.modelData&&(null==(l=e.modelData.deformPages)||l.forEach((e=>{i(e)})));return{ns:a,onCreated:e=>{o.value=e.ctrl},onConfirm:()=>{let e;if(o.value){const t=(()=>{const e={},t=o.value.getDiffData();return 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&&(e=[t])}t("close",{ok:!0,data:e})},onCancel:()=>{t("close",{ok:!1})}}},render(){let e,t;return o("div",{class:this.ns.b()},[o(s("iBizControlShell"),{params:this.params,context:this.context,modelData:this.modelData,onCreated:this.onCreated},null),o("div",{class:this.ns.e("footer")},[o(s("el-button"),{text:!0,onClick:this.onCancel},si(e=ibiz.i18n.t("app.cancel"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:this.onConfirm},si(t=ibiz.i18n.t("app.confirm"))?t:{default:()=>[t]})])])}}),li=e("I",{install:e=>{e.component(j.name,j),e.component(ii.name,ii),e.component(oi.name,oi),e.component(A.name,A),e.component(ks.name,ks),e.component(cs.name,cs),e.component(rs.name,rs),e.component(N.name,N),e.component(is.name,is),e.component(R.name,R),e.component(M.name,M),e.component(ds.name,ds),e.component(L.name,L),e.component(us.name,us),e.component(ps.name,ps),e.component(hs.name,hs),e.component(ms.name,ms),e.component(bs.name,bs),e.component(vs.name,vs),e.component(ws.name,ws),e.component(fs.name,fs),e.component(Cs.name,Cs),e.component(Is.name,Is),e.component(Ds.name,Ds),e.component(Es.name,Es),e.component("IBizMapChart",I({loader:()=>t.import("./map-chart-A4-TpWet.js")})),e.component(V.name,V),e.component(xs.name,xs),e.component(zs.name,zs),e.component(js.name,js),e.component(As.name,As)}});function ri(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const ci=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"),i=e.controller,l=n(!1),r=n(!1),c=n([]),d=e=>{e.stopPropagation()},u=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=u(e.children)),t.push(n)})),t},p=e=>{const t=[];return e.forEach((e=>{if(t.push(e),e.children&&e.children.length>0){const a=p(e.children);t.push(...a)}})),t},h=e=>{let t=[];return i.saveConfigs&&i.saveConfigs.length>0&&(t=p(i.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=h(e.children)),n&&Object.assign(o,{config:{visible:n.visible}}),o}))},m=async()=>{i.saveConfigs=[],await i.customController.resetCustomModelData(),c.value=h(So(e.menus)),t("reset")},b=async()=>{l.value=!0;const e=u(c.value);await i.customController.saveCustomModelData(e),i.saveConfigs=e,l.value=!1,t("saved",e)},v=e=>{var t;if(null==(t=i.state.menuItemsState[e.key])?void 0:t.visible){if("MENUITEM"===e.itemType){let t;const n=i.itemProviders[e.key];return t=n&&n.renderText?function(e,t){const a=t.allAppMenuItems.find((t=>t.id===e));if(!a)throw new bt("".concat(ibiz.i18n.t("control.menuDesign.noMenuItemModel",{menu:e})));const n=t.itemProviders[e];if(!n.renderText)throw new bt("".concat(ibiz.i18n.t("control.menuDesign.noProviderRenderText",{menu:e})));return n.renderText(a,t)}(e.key,i):[e.image?o(s("iBizIcon"),{class:a.e("icon"),icon:e.image},null):null,o("span",null,[e.label])],t}if("SEPERATOR"===e.itemType){const t="TOP"===i.view.model.mainMenuAlign?"vertical":"horizontal";return o("div",{class:a.be("content","menu-seperator")},[o(s("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,g=e=>e.map((e=>{const t=v(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(s("el-checkbox"),{modelValue:e.config.visible,"onUpdate:modelValue":t=>e.config.visible=t,onClick:d,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)]},[g(e.children)]):null]):null}));return{ns:a,c:i,configs:c,visible:r,loading:l,onReset:m,renderContent:()=>o("div",{class:a.b("content")},[g(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(s("el-button"),{onClick:m,loading:l.value},ri(e=ibiz.i18n.t("control.menuDesign.reset"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:b,loading:l.value},ri(t=ibiz.i18n.t("control.menuDesign.save"))?t:{default:()=>[t]})])])},onSave:b,openDesign:()=>{c.value=h(So(e.menus)),r.value=!0}}},render(){return o("div",{class:this.ns.b()},[o("div",{title:ht(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(s("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 di(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}function ui(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};return(null==(t=e.appMenuItems)?void 0:t.length)&&(a.children=ui(e.appMenuItems)),a}))}function pi(e,t){const a=t.allAppMenuItems.find((t=>t.id===e));if(!a)throw new bt(ibiz.i18n.t("control.menu.noFoundModel",{menuKey:e}));const n=t.itemProviders[e];if(!n.renderText)throw new bt(ibiz.i18n.t("control.menu.noFoundFunction",{menuKey:e}));return n.renderText(a,t)}function hi(e,t){let a;return t&&t.some((t=>t.key===e?(a=t,!0):!!(t.children&&t.children.length>0)&&(a=hi(e,t.children),!!a))),a}function mi(e,t){const a=hi(e,t);return!a||a.visible}function bi(e,t,a,n,i,l,r){if(i.state.menuItemsState[t.key].visible&&mi(t.key,r)){if("MENUITEM"===t.itemType){let r;const c=i.itemProviders[t.key];return r=c&&c.renderText?pi(t.key,i):e&&a?[t.image?o(s("iBizIcon"),{class:n.e("icon"),icon:t.image},null):t.label.slice(0,1)]:[t.image?o(s("iBizIcon"),{class:n.e("icon"),icon:t.image},null):null,t.label,null!=l[t.counterId]?o(s("iBizBadge"),{class:n.e("counter"),value:l[t.counterId]},null):null],e&&a?o(s("el-tooltip"),{class:n.b("tooltip"),content:t.label,placement:"left",theme:"light"},{default:()=>[o(s("el-menu-item"),{class:n.e("item"),index:t.key,disabled:t.disabled},di(r)?r:{default:()=>[r]})]}):o(s("el-menu-item"),{class:n.e("item"),index:t.key,disabled:t.disabled,title:ht(t.tooltip)},di(r)?r:{default:()=>[r]})}if("SEPERATOR"===t.itemType){const e="TOP"===i.view.model.mainMenuAlign?"vertical":"horizontal";return o(s("el-divider"),{direction:e,class:n.e("separator"),id:t.key},null)}}}function vi(e,t,a,n,i,l,r){if(i.state.menuItemsState[t.key].visible&&mi(t.key,r))return o(s("el-sub-menu"),{class:n.b("submenu"),index:t.key,"popper-class":n.b("popup-container")},{default:()=>t.children.map((e=>e.children?vi(!1,e,a,n,i,l,r):bi(!1,e,a,n,i,l,r))),title:()=>{const r=i.itemProviders[t.key];return r&&r.renderText?pi(t.key,i):a?t.image?o(s("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(s("iBizIcon"),{class:n.e("icon"),icon:t.image},null),t.label,null!=l[t.counterId]?o(s("iBizBadge"),{class:n.e("counter"),value:l[t.counterId]},null):null]}})}const wi=a({name:"IBizAppMenuControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){const e=F(((...e)=>new Wt(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(ui(e.model.appMenuItems)),s=n([]),i=n(""),r=n([]),d=Do();let u=null;const p=n({}),h=n(lo()),m=()=>{const t=e.getAllItems(),a=ibiz.hub.getApp(e.context.srfappid);return t.find((e=>{var t,n;if("MENUITEM"===e.itemType&&e.appFuncId){const o=a.getAppFunc(e.appFuncId);return(null==(n=null==(t=null==o?void 0:o.appViewId)?void 0:t.split("."))?void 0:n[1])===d.params.view2}return!1}))},b=async(t,a)=>{const n=m();(null==n?void 0:n.id)!==t&&await e.onClickMenuItem(t,a)};c((()=>d.params.view2),((e,t)=>{if(e!==t&&ibiz.config.appMenu.enableEcho){const e=m();i.value=e?e.id:""}}));const v=e=>{p.value=e};e.evt.on("onCreated",(async()=>{s.value=e.saveConfigs;const t=e.getAllItems(),a=t.find((e=>e.openDefault&&!e.hidden));if(!a||d.params.view2||d.fullPath.includes("404")){if(ibiz.config.appMenu.enableEcho){const e=m();i.value=e?e.id:""}}else i.value=a.id,b(i.value);const n=t.filter((e=>e.expanded&&!e.hidden));n.length>0&&n.forEach((e=>{r.value.push(e.id)}))})),e.evt.on("onMounted",(async()=>{const t=e.model.appCounterRefId;t&&(u=e.getCounter(t),u&&u.onChange(v))})),C((()=>{null==u||u.offChange(v),null==u||u.destroy()}));const w=l((()=>"TOP"===e.view.model.mainMenuAlign?"horizontal":"vertical"));e.view.model.mainMenuAlign&&"LEFT"!==e.view.model.mainMenuAlign&&"TOP"!==e.view.model.mainMenuAlign&&ibiz.message.warning(ibiz.i18n.t("control.menu.noSupportAlign",{align:e.view.model.mainMenuAlign}));const g=l((()=>"LEFT"===e.view.model.mainMenuAlign||void 0===e.view.model.mainMenuAlign)),f=l((()=>e.model.enableCustomized));return{menus:a,c:e,key:h,onClick:b,ns:t,defaultActive:i,defaultOpens:r,menuMode:w,counterData:p,saveConfigs:s,configSaves:e=>{s.value=e},configReset:()=>{s.value=[]},isShowCollapse:g,enableCustomized:f,ellipsisSvg:()=>o("ion-icon",{name:"ellipsis-horizontal"},null)}},render(){return o(s("iBizControlBase"),{class:[this.ns.b(),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)],controller:this.c},{default:()=>[this.c.state.isCreated&&o(s("el-menu"),{key:this.key,ref:"menu","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},{default:()=>this.menus.map((e=>{var t;return(null==(t=e.children)?void 0:t.length)>0?vi(!0,e,this.collapse,this.ns,this.c,this.counterData,this.saveConfigs):bi(!0,e,this.collapse,this.ns,this.c,this.counterData,this.saveConfigs)}))}),this.enableCustomized&&o(ci,{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(Kt.TOGGLE_COLLAPSE)}},[o("ion-icon",{name:"menu-collapse"},null)])]})}});var gi=Object.defineProperty,fi=(e,t,a)=>(((e,t,a)=>{t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yi{constructor(){fi(this,"component","IBizAppMenuControl")}}const Ci=e("j",U(wi,(function(e){e.component(ci.name,ci),e.component(wi.name,wi),Xt($t.APP_MENU,(()=>new yi))})));var Ii=Object.defineProperty,Pi=(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 Di{constructor(){Pi(this,"component","IBizAppMenuIconViewControl")}}function Ei(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const ki=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=F(((...e)=>new Yt(...e))),a=B("control-".concat(t.model.controlType.toLowerCase(),"-iconview")),i=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:ht(e.tooltip||e.caption),onClick:t=>{e.appFuncId&&r(e.id,t)}},[o(s("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:i,defaultOpens:l,onClick:r,renderGroup:e=>t.state.menuItemsState[e.id].visible?o(s("el-collapse-item"),{class:a.b("group"),name:e.id,title:ht(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(s("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":e=>this.defaultOpens=e},Ei(e=a.appMenuItems.map((e=>"MENUITEM"!==e.itemType?null:this.renderGroup(e))))?e:{default:()=>[e]})}return o(s("iBizControlBase"),{class:[this.ns.b()],controller:this.c},Ei(n)?n:{default:()=>[n]})}}),xi=e("k",U(ki,(function(e){e.component(ki.name,ki),Xt("".concat($t.APP_MENU,"_ICONVIEW"),(()=>new Di))}))),zi=a({name:"IBizGridFieldColumn",props:{controller:{type:Jt,required:!0},row:{type:Qt,required:!0}},setup(e){const t=B("grid-field-column"),a=e.controller.grid.state.zIndex,o=l((()=>e.controller.getCustomHtml(e.row))),s=l((()=>e.row.data[e.controller.fieldName])),i=l((()=>e.controller.formatValue(s.value))),r=l((()=>{const{grid:t}=e.controller;if(!t.showPercent)return"";const a=Number(s.value);if(!Number.isNaN(a)){const{totalResult:n={}}=t.state,o=n[e.controller.fieldName];if(o)return ibiz.util.text.format("".concat(a/o),"0.##%")}return""})),c=l((()=>Zt.toText(e.controller.model,s.value))),d=n(""),u=l((()=>{if("ellipsis"===e.controller.grid.overflowMode&&vo(s.value)&&""!==s.value)return e.controller.codeList?d.value:i.value+(e.controller.model.unitName||"")})),p=n([]);e.controller.codeList&&(p.value=e.controller.codeListItems);return q(e.controller.model.appCodeListId,e.controller.context.srfappid,(e=>{e&&(p.value=e)})),{ns:t,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=>{d.value=e},onActionClick:async(t,a)=>{await e.controller.onActionClick(t,e.row,a)},CustomHtml:o,fieldValue:s,formatValue:i,percent:r,codeListValue:c,tooltip:u,zIndex:a,codeListItems:p}},render(){var e;const t=this.controller,a=t.model.deuiactionGroup?o(s("iBizActionToolbar"),{class:this.ns.e("toolbar"),"action-details":t.model.deuiactionGroup.uiactionGroupDetails,"actions-state":this.row.uiActionGroupStates[this.controller.model.codeName],groupLevelKeys:[50,100],onActionClick:this.onActionClick,zIndex:this.zIndex},null):null;let n=null;return n=t.isCustomCode?o("span",{class:this.ns.e("script"),innerHTML:this.CustomHtml},null):t.codeList?o(s("iBizCodeList"),{class:this.ns.e("text"),codeListItems:this.codeListItems,codeList:t.codeList,value:this.codeListValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:ht(this.tooltip)},null):o("span",{class:this.ns.e("text"),title:ht(this.tooltip),onClick:this.onTextClick},[this.formatValue,null!=this.fieldValue&&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 Si=Object.defineProperty,Ti=(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 _i{constructor(){Ti(this,"component","IBizGridFieldColumn")}async createController(e,t){const a=new Jt(e,t);return await a.init(),a}}const Oi=e("q",U(zi,(function(e){e.component(zi.name,zi),ea("DEFGRIDCOLUMN",(()=>new _i)),ea("DEFTREEGRIDCOLUMN",(()=>new _i))}))),Bi=a({name:"IBizGridUAColumn",props:{controller:{type:ta,required:!0},row:{type:Qt,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(s("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 ji=Object.defineProperty,Ai=(e,t,a)=>(((e,t,a)=>{t in e?ji(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ni{constructor(){Ai(this,"component","IBizGridUAColumn")}async createController(e,t){const a=new ta(e,t);return await a.init(),a}}const Ri=e("r",U(Bi,(function(e){e.component(Bi.name,Bi),ea("UAGRIDCOLUMN",(()=>new Ni))})));const Mi=a({name:"IBizGridFieldEditColumn",props:{controller:{type:aa,required:!0},row:{type:Qt,required:!0},attrs:{type:Object,required:!1}},setup(e){const t=B("grid-field-edit-column"),a=n(),o=e.controller,{gridEditItemProps:s,editorProps:i}=(()=>{switch(ibiz.config.grid.editShowMode){case"cell":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.fieldName].disabled)),o=l((()=>e.row.editColStates[a.fieldName].readonly)),s=l((()=>!!e.row.errors[a.fieldName])),i=l((()=>e.row.editColStates[a.fieldName].editable)),r=t=>{e.row.editColStates[a.fieldName].editable=t},c=l((()=>!n.value&&!o.value&&!s.value)),d=l((()=>s.value||c.value&&i.value)),u=l((()=>!d.value)),p=l((()=>!s.value)),h=l((()=>c.value&&!i.value)),m=l((()=>c.value||d.value));let b;return{gridEditItemProps:g({showEditMask:h,stopPropagation:m,onMaskClick:()=>{r(!0),b=G(t,(async e=>{r(!1),b.stop()}))}}),editorProps:g({autoFocus:p,disabled:!1,readonly:u,onBlur:()=>{ibiz.log.debug("".concat(a.fieldName,"属性编辑器blur事件")),r(!1),"cell-blur"===ibiz.config.grid.editSaveMode&&a.grid.save(e.row.data)},onFocus:()=>{b&&b.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)),s=l((()=>e.row.editColStates[a.fieldName].editable)),i=l((()=>o.value||!s.value)),r=l((()=>s.value&&n.value)),c=l((()=>s.value));return{gridEditItemProps:g({stopPropagation:c}),editorProps:g({disabled:r,readonly:i})}}(e);case"all":return function(e,t){const a=e.controller,n=l((()=>e.row.editColStates[a.fieldName].disabled)),o=l((()=>e.row.editColStates[a.fieldName].readonly)),s=l((()=>e.controller.grid.state.rowEditOpen)),i=l((()=>o.value||!s.value)),r=l((()=>s.value&&n.value)),c=l((()=>s.value));return{gridEditItemProps:g({stopPropagation:c}),editorProps:g({disabled:r,readonly:i,onBlur:()=>{a.grid.save(e.row.data)}})}}(e);default:throw new bt(ibiz.i18n.t("control.common.noSupportItem",{name:ibiz.config.grid.editShowMode}))}})(),r=n(void 0),c=l((()=>{if(i.readonly){if(bo(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)=>{ibiz.log.debug("".concat(o.fieldName,"值变更"),t),await o.setRowValue(e.row,t,a)},onInfoTextChange:e=>{r.value=e},gridEditItemProps:s,editorProps:i}},render(){var e;const t=this.row.data[this.c.fieldName];return o(s("iBizGridEditItem"),{ref:"componentRef",required:!this.c.editItem.allowEmpty,error:this.row.errors[this.c.fieldName],overflowMode:this.controller.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(s(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 Li=Object.defineProperty,Vi=(e,t,a)=>(((e,t,a)=>{t in e?Li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Fi{constructor(){Vi(this,"component","IBizGridFieldEditColumn")}async createController(e,t){const a=new aa(e,t);return await a.init(),a}}const Ui=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(s("el-tooltip"),{content:this.tooltipContent,disabled:!this.showTooltip,transfer:!0,"transfer-class-name":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)])]}})])}}),qi=e("s",U(Mi,(function(e){e.component(Mi.name,Mi),e.component(Ui.name,Ui),ea("DEFGRIDCOLUMN_EDIT",(()=>new Fi))}))),Gi=a({name:"IBizGridGroupColumn",props:{controller:{type:na,required:!0},row:{type:Qt,required:!0}},setup:()=>({ns:B("grid-group-column")}),render(){return o("div",{class:[this.ns.b()]},null)}});var Hi=Object.defineProperty,Wi=(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 Ki{constructor(){Wi(this,"component","")}async createController(e,t){const a=new na(e,t);return await a.init(),a}}const Xi=e("t",U(Gi,(()=>{ea("GROUPGRIDCOLUMN",(()=>new Ki))})));function $i(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Yi=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")},s=n(document);return H(s,"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(s("el-button"),{onClick:this.onConfirm},$i(e=ibiz.i18n.t("control.common.determine"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:this.onCancel},$i(t=ibiz.i18n.t("app.cancel"))?t:{default:()=>[t]})])}});function Ji(e){const t=n();let a=!1,o=!1;return c([()=>t.value,()=>e.state.isLoaded,()=>e.state.selectedData],(([n,o,s])=>{o&&n&&(e.state.singleSelect?s[0]?t.value.setCurrentRow(s[0],!0):t.value.setCurrentRow():(a=!0,t.value.clearSelection(),s.forEach((e=>t.value.toggleRowSelection(e,!0))),a=!1))})),c((()=>e.state.sortQuery),(a=>{if(a){const a=e.state.sortQuery.split(",")[0],n=e.state.sortQuery.split(",")[1];if(a&&n){const e="desc"===n?"descending":"ascending",s=()=>{t.value?u((()=>{o=!0,t.value.sort(a,e)})):setTimeout(s,500)};s()}}})),{tableRef:t,onRowClick:async function(t,a,n){if(t.srfuf!==oa.CREATE)if("row"===ibiz.config.grid.editShowMode&&e.model.enableRowEdit){const a=e.findRowState(t);a&&!0!==a.showRowEdit&&await e.switchRowEdit(a,!0)}else e.onRowClick(t)},onDbRowClick:function(t){t.srfuf!==oa.CREATE&&e.onDbRowClick(t)},onSelectionChange:function(t){a||e.setSelection(t)},onSortChange:function(t){if(o)return void(o=!1);const{prop:a,order:n}=t,s=e.fieldColumns[a].model.appDEFieldId;let i;"ascending"===n?i="asc":"descending"===n&&(i="desc"),"".concat(s,",").concat(i)!==e.state.sortQuery&&(e.setSort(s,i),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&&(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:t,column:a,_rowIndex:n,_columnIndex:o}){var s;const i=null==(s=e.model.degridColumns)?void 0:s.find((e=>e.codeName===a.property));return i&&i.headerSysCss&&i.headerSysCss.cssName?i.headerSysCss.cssName:""}}}function Qi(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 Zi(e,t){const a=()=>{t.data&&(e.state.items=t.data,e.state.rows=t.data.map((t=>new Qt(new sa(t),e))),e.calcAggResult(e.state.items),e.calcTotalData())},n=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&&(a(),e.state.isLoaded=!0)})),c((()=>t.data),(()=>{t.isSimple&&a()}),{deep:!0});const o=l((()=>{const t=e.state;if(e.model.enableGroup){const e=[];return t.groups.forEach((t=>{if(!t.children.length)return;const a=[...t.children],n=a.shift();e.push({tempsrfkey:(null==n?void 0:n.tempsrfkey)||t.caption,srfkey:(null==n?void 0:n.srfkey)||t.caption,isGroupData:!0,caption:t.caption,first:n,children:a})})),e}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=l((()=>{if(e.isMultistageHeader)return e.model.degridColumns||[];const t=[];return e.state.columnStates.forEach((a=>{var n,o;if(a.hidden)return;const s=(null==(n=e.fieldColumns[a.key])?void 0:n.model)||(null==(o=e.uaColumns[a.key])?void 0:o.model);s&&t.push(s)})),t}));return{tableData:o,renderColumns:s,defaultSort:n,summaryMethod:({columns:t})=>t.map(((t,a)=>0===a?e.aggTitle:e.state.aggResult[t.property])),spanMethod:({row:t,column:a,rowIndex:n,columnIndex:i})=>{const{property:l}=a,{rowspankeys:r=[],colspankeys:c=[]}=e.controlParams;if(r.length>0&&r.includes(l)){const e=0===i||t[l];if(n>0&&e&&t[l]===o.value[n-1][l])return{rowspan:0,colspan:0};let a=1;for(let s=n+1;s<o.value.length&&(e&&o.value[s][l]===t[l]);s++)a+=1;return{rowspan:a,colspan:1}}if(c.length>0&&c.includes(l)){const e=s.value[i-1].codeName;if(i>0&&c.includes(e)&&t[l]===t[e])return{rowspan:0,colspan:0};let a=1;for(let e=i+1;e<s.value.length;e++){const n=s.value[e].codeName;if(!c.includes(n)||t[n]!==t[l])break;a+=1}return{rowspan:1,colspan:a}}}}}function el(e,t){let a=null,o=0;const s=n({}),i=P((()=>{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")};s.value=t.cssVarBlock(e),o=a}})),a.observe(n))}})()}));return C((()=>{a&&a.disconnect(),i()})),{headerCssVars:s}}function tl(e,t,a){if(!a.enableRowEditOrder)return{};let n=0,o=0,s=null,i=null;const l=[],r=e=>{let t="";return e.forEach((e=>{e.startsWith("id-")&&(t=e.replace("id-",""))})),t};return c([()=>e.value,()=>a.state.isLoaded],((t,c)=>{if(!c||!t)return;const d=e.value.$el;if(d){d.getElementsByClassName("el-table__row").forEach((e=>{(e=>{e.setAttribute("draggable","true");const t=vt(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)),s=a.state.rows[n]}})),c=vt(e,"dragenter",(e=>{e.preventDefault();const t=e.currentTarget,n=r(t.classList);o=a.state.rows.findIndex((e=>e.data.srfkey===n)),(null==s?void 0:s.data.srfkey)!==n&&-1!==o&&(i=a.state.rows[o])})),d=vt(e,"dragover",(e=>{e.preventDefault()})),u=vt(e,"dragend",(e=>{e.preventDefault(),s&&i&&a.onDragChange(s,i,o>n?"next":"prev")}));l.push(t),l.push(c),l.push(d),l.push(u)})(e)}))}})),{cleanup:()=>{l.forEach((e=>{e()}))}}}function al(e,t){let a;const i=n(!1),l=n(),r=g({}),c=async t=>{const n=(t=>{if(!e.value)throw new bt(ibiz.i18n.t("control.common.citeErrMessage"));const a=e.value.$el;let n=".el-table__row";t.data.srfkey&&(n+=".id-".concat(t.data.srfkey));const o=a.querySelector(n);if(!o)throw new bt(ibiz.i18n.t("control.common.noDomErrMessage"));return o})(t);if(!a)throw new bt(ibiz.i18n.t("control.common.noPopErrMessage"));const o=a.$el,{x:s,y:c}=await Fo(n,o,{placement:"bottom"});Object.assign(r,{top:"".concat(c,"px"),left:"".concat(s,"px")}),l.value=t,i.value=!0},d=async()=>{l.value&&t.switchRowEdit(l.value,!1,!0)},u=async()=>{l.value&&t.switchRowEdit(l.value,!1,!1)};return t.evt.on("onRowEditChange",(e=>{e.row.showRowEdit?setTimeout((()=>{c(e.row)}),0):(l.value=void 0,i.value=!1,Object.assign(r,{top:void 0,left:void 0}))})),{renderPopover:()=>{const e=i.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(s("iBizRowEditPopover"),{ref:e=>{a=e},style:r,show:i.value,onConfirm:d,onCancel:u},null)]}}}var nl=Object.defineProperty,ol=(e,t,a)=>(((e,t,a)=>{t in e?nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sl{constructor(){ol(this,"count",0),ol(this,"countRedirect",0),ol(this,"loading")}show(){0===this.count&&(this.loading=Ko.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("a_",sl);var il=Object.defineProperty,ll=(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 rl{constructor(){ll(this,"ns",B("message"))}info(e,t,a){Xo.info({message:e,duration:t?1e3*t:t,showClose:a})}success(e,t,a){Xo.success({message:e,duration:t?1e3*t:t,showClose:a})}warning(e,t,a){Xo.warning({message:e,duration:t?1e3*t:t,showClose:a})}error(e,t,a){Xo.error({message:e,duration:t?1e3*t:t,showClose:a})}formatParams(e){const t=wo({type:"info"},e),a={};return Object.keys(t).forEach((e=>{const n=t[e];switch(e){case"duration":bo(n)||(a.duration=1e3*n);break;case"styleType":bo(n)||(a.customClass=this.ns.m(n));break;default:a[e]=n}})),a}notice(e){Xo(this.formatParams(e))}}e("a$",rl);class cl{async info(e){await $o.alert(e.desc,e.title,{...e.options,type:"info"})}async success(e){await $o.alert(e.desc,e.title,{...e.options,type:"success"})}async warning(e){await $o.alert(e.desc,e.title,{...e.options,type:"warning"})}async error(e){await $o.alert(e.desc,e.title,{...e.options,type:"error"})}async confirm(e){return new Promise((t=>{$o.confirm(e.desc,e.title,e).then((()=>t(!0))).catch((()=>t(!1)))}))}}e("b0",cl);var dl=Object.defineProperty,ul=(e,t,a)=>(((e,t,a)=>{t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class pl{constructor(){ul(this,"ns",new wt("confirm"))}async info(e){return new Promise((t=>{$o.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=>{$o.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=>{$o.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=>{$o.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 hl(e){return e.replaceAll(/<span data-w-e-type="emoji" class='emoji'>(.+?)<\/span>/g,((e,t)=>{const a=decodeURIComponent(atob(t));return"<span data-w-e-type=\"emoji\" class='emoji'>".concat(a,"</span>")}))}e("b1",pl);var ml=Object.defineProperty,bl=(e,t,a)=>(((e,t,a)=>{t in e?ml(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vl{constructor(){bl(this,"callStack",[]),bl(this,"intervalId",null)}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?hl(e.desc):e.desc;Yo({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()}}e("b2",vl);class wl{constructor(e){this.router=e}push(e){return W.open(this.router,e)}async root(e,t,a,n){const o=await ibiz.hub.config.view.get(e),{path:s}=await K(o,this.router.currentRoute.value,t,a);return n&&!0===n.replace?this.router.replace({path:s}):this.router.push({path:s}),{ok:!1}}async rootByModal(e,t,a){const n=await ibiz.hub.config.view.get(e),{path:o}=await X(n,this.router.currentRoute.value,t,a);return this.push(o)}async modal(e,t,a){const n=await ibiz.hub.config.view.get(e),o={width:n.width||"80%",height:n.height||"80%",footerHide:!0,...n.modalOption};return $({context:t,params:a,viewId:n.id},o)}async popover(e,t,a,n,o={}){const s=await ibiz.hub.config.view.get(e),i={width:s.width,height:s.height,autoClose:!0,placement:"bottom",...o,...s.modalOption};return Y(t,{context:a,params:n,viewId:s.id},i)}async drawer(e,t,a){const n=await ibiz.hub.config.view.get(e),o=J(n.openMode),s={width:n.width,height:n.height,placement:o,...n.modalOption};return Q({context:t,params:a,viewId:n.id},s)}async custom(e,t,a){const n=await ibiz.hub.config.view.get(e);throw ibiz.log.warn("openUserCustom",n,t,a),new Error}}e("b3",wl);const gl=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("popover"),o=n(!1),s=n(),i=n(),{zIndex:l}=ee(),r=l.increment(),c=g({}),{width:d,height:u}=e.opts;d&&(To(d)?c.width=gt(d,"popover"):c.width=d),u&&(To(u)?c.height=gt(u,"popover"):c.height=u);const p=new ia({mode:la.POPOVER,viewUsage:2,dismiss:e=>{l.decrement(),t.emit("dismiss",e)}});async function h(e){await p.dismiss(e)}let m=()=>{};C((()=>{m()}));return{ns:a,el:s,arrEl:i,isShow:o,modal:p,popoverZIndex:r,onMaskClick:()=>{!0===e.opts.autoClose&&h()},present:async function(t){o.value=!0,m=Uo(t,s.value,(()=>async function(e,t,a,n){const o=[qo(n.offsetOpts||6),Go(),Ho()];n.noArrow||o.push(Wo({element:a}));const s={placement:n.placement,strategy:"absolute",middleware:o};n.options&&Object.assign(s,n.options);const i=await Fo(e,t,s);{const{x:e,y:o,placement:s,middlewareData:l}=i,{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"}[s.split("-")[0]];Object.assign(a.style,{left:null!=e?"".concat(e,"px"):"",top:null!=t?"".concat(t,"px"):"",right:"",bottom:"",[n]:"-4px"})}}}(t,s.value,i.value,e.opts)))},dismiss:h,customStyle:c}},render(){var e,t;const a=o("div",{class:[this.ns.b(),this.ns.is("show",this.isShow)],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 fl=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("modal"),o=n(!1),{zIndex:s}=ee(),i=s.increment(),l=g({}),{width:r,height:c}=e.opts;r&&(To(r)?l.width=gt(r,"modal"):l.width=r),c&&(To(c)?l.height=gt(c,"modal"):l.height=c);const d=n({footerHide:!0,modalClass:""});e.opts&&Object.assign(d.value,e.opts);const u=new ia({mode:d.value.isRouteModal?la.ROUTE_MODAL:la.MODAL,viewUsage:2,dismiss:e=>{s.decrement(),o.value=!1,t.emit("dismiss",e)}});return{ns:a,isShow:o,options:d,modalZIndex:i,customStyle:l,modal:u,present:()=>{o.value=!0},dismiss:e=>{u.dismiss(e)},onBeforeClose:async e=>{await u.dismiss()&&e()}}},render(){var e,t;return r(s("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))}});const yl=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("drawer"),o=n(!1);let s;const{zIndex:i}=ee(),l=i.increment(),r=n("100%"),{width:c,height:d,placement:u}=e.opts;"top"!==u&&"bottom"!==u||(To(d)?r.value=gt(d,"drawer"):r.value="100%"),"left"!==u&&"right"!==u||(To(c)?r.value=gt(c,"drawer"):r.value=800);const p=new ia({mode:la.DRAWER,viewUsage:2,dismiss:e=>{i.decrement(),o.value=!1,s=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",s)},onBeforeClose:async e=>{await p.dismiss()&&e()}}},render(){var e,t;const a=this.opts||{};return r(s("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 Cl=a({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const a=B("float-window"),o=n(),s=n(!1);let i;const{zIndex:l}=ee(),r=l.increment(),c=n({width:500,height:600,x:100,y:100});e.opts&&Object.assign(c.value,e.opts);const u=g({x:window.innerWidth-600,y:100,width:500,height:600,minWidth:300,minHeight:300}),p=()=>({left:"".concat(u.x,"px"),top:"".concat(u.y,"px"),height:"".concat(u.height,"px"),width:"".concat(u.width,"px"),zIndex:r}),h=()=>{Object.assign(o.value,p())};d((()=>{const e=o.value.getElementsByClassName(a.b("drag-handle")),t=e[0]?e[0]:o.value;Zo(t).draggable({modifiers:[Zo.modifiers.restrictRect({restriction:document.body,endOnly:!0})],cursorChecker:()=>"move",listeners:{move:e=>{u.x+=e.dx,u.y+=e.dy,h()}}}),Zo(o.value).resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},margin:6,modifiers:[Zo.modifiers.restrictEdges({outer:document.body}),Zo.modifiers.restrictSize({min:{width:u.minWidth,height:u.minHeight}})],inertia:!0,listeners:{move:e=>{u.x+=e.deltaRect.left,u.y+=e.deltaRect.top,u.width=e.rect.width,u.height=e.rect.height,h()}}})}));const m=new ia({mode:la.MODAL,viewUsage:2,dismiss:e=>{l.decrement(),s.value=!1,i=e}});return{ns:a,isShow:s,options:c,modalZIndex:r,modal:m,calcStyle:p,present:()=>{s.value=!0},dismiss:e=>{m.dismiss(e)},onClosed:()=>{t.emit("dismiss",i)},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),v("+")])])}});function Il(e){return Oo(e)?s(e):e}class Pl{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 Z(gl,e,t)}(_o(e)?e:()=>r(Il(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 te(yl,e,t)}(_o(e)?e:()=>r(Il(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 te(fl,e,t)}(_o(e)?e:()=>r(Il(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 te(Cl,e,t)}(_o(e)?e:()=>r(Il(e),{...t}),a)}}function Dl(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()}}}e("b4",Pl);var El=Object.defineProperty,kl=(e,t,a)=>(((e,t,a)=>{t in e?El(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class xl{constructor(){kl(this,"doingNotice")}async showAsyncAction(e){const t=B("async-action-notice"),a=await ra(e);if(a.render){const n=Yo({customClass:t.b(),message:a.render({action:e,onClose:()=>{n.close()}}),position:"bottom-right",duration:0})}}showDoingNotice(e){if(this.doingNotice)Object.assign(this.doingNotice.info,e);else{const t=g(e),a=Yo({message:r(ks,{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)}}e("b6",xl);class zl{renderViewShell(e,t,a,n,o={}){const i={viewId:e,modelData:t,context:a,params:n,...o};return r(s("IBizViewShell"),i)}renderCtrlShell(e,t,a,n={}){const o={modelData:e,context:t,params:a,...n};return r(s("IBizControlShell"),o)}renderComponent(e,t){return r(s(e),t)}}e("b7",zl);class Sl{constructor(e){this.router=e}async login(e,t,a,n,o){const s=await ibiz.auth.login(e,t,a,n);return!0===s&&(window.location.hash=this.router.currentRoute.value.query.ru||"/",window.history.pushState({},""),window.location.reload()),s}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.")}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)}}function Tl(e,t){var a;const n={};return null==(a=e.controlAttributes)||a.forEach((e=>{e.attrName&&e.attrValue&&(n[e.attrName]=da.execSingleLine(e.attrValue,{...t}))})),n}function _l(e,t,a,n){var i,l;if("GROUPGRIDCOLUMN"===t.columnType){const n=(null==(i=t.degridColumns)?void 0:i.filter((e=>!e.hideDefault&&!e.hiddenDataItem)))||[],{width:r}=t,c=(null==(l=t.align)?void 0:l.toLowerCase())||"center";return o(s("el-table-column"),{prop:t.codeName,label:t.caption,"min-width":r,align:c},{default:()=>n.map(((t,n)=>_l(e,t,a,n)))})}return function(e,t,a,n){var i;const{codeName:l,width:c}=t,d=e.columns[l],u=e.state.columnStates.find((e=>e.key===l)),p=d.isAdaptiveColumn||!e.hasAdaptiveColumn&&n===a.length-1?"min-width":"width";return o(s("el-table-column"),b({label:t.caption,prop:l},{[p]:c},{fixed:u.fixed,sortable:!!t.enableSort&&"custom",align:(null==(i=t.align)?void 0:i.toLowerCase())||"center"}),{default:({row:a})=>{let n=a;a.isGroupData&&(n=a.first);const o=e.findRowState(n);if(o){const a=s(e.providers[l].component);return r(a,{controller:d,row:o,key:n.tempsrfkey+l,attrs:Tl(t,{...e.getEventArgs(),data:o.data})})}return null}})}(e,t,a,n)}e("b8",Sl);const Ol=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=F(((...e)=>new ca(...e))),i=B("control-".concat(a.model.controlType.toLowerCase())),{zIndex:r}=ee();a.state.zIndex=r.increment();const{tableRef:d,onRowClick:u,onDbRowClick:p,onSelectionChange:h,onSortChange:m,handleRowClassName:b,handleHeaderCellClassName:w}=Ji(a),{onPageChange:g,onPageRefresh:f,onPageSizeChange:y}=Dl(a),{headerCssVars:I}=el(d,i),{cleanup:P=ft}=tl(d,0,a),{tableData:E,renderColumns:k,defaultSort:x,summaryMethod:z,spanMethod:S}=Zi(a,e),{renderPopover:T}=al(d,a);C((()=>{r.decrement(),P!==ft&&P()}));const _=l((()=>2!==a.model.pagingMode||(a.state.items.length>=a.state.total||a.state.isLoading||a.state.total<=a.state.size))),O=n(),j=n(lo());return c((()=>a.state.curPage),(()=>{var e,t;if(1===a.state.curPage&&(2===a.model.pagingMode||3===a.model.pagingMode)){j.value=lo();const a=null==(t=null==(e=O.value)?void 0:e.ElInfiniteScroll)?void 0:t.containerEl;a&&(a.lastScrollTop=0,a.scrollTop=0)}})),{c:a,ns:i,tableRef:d,tableData:E,renderColumns:k,renderTableColumn:(e,n)=>t[e.id]?D(t,e.id,{model:e,data:a.state.items}):_l(a,e,k.value,n),onDbRowClick:p,onRowClick:u,onSelectionChange:h,onSortChange:m,onPageChange:g,onPageSizeChange:y,onPageRefresh:f,handleRowClassName:b,handleHeaderCellClassName:w,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")));return t?o(s("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:i.b("quick-toolbar")},null):o(s("iBizNoData"),{text:a.model.emptyText,emptyTextLanguageRes:a.model.emptyTextLanguageRes,enableShowImage:a.state.hideNoDataImage},null)}return o("div",null,null)},summaryMethod:z,spanMethod:S,renderPopover:T,defaultSort:x,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:[i.b("batch-toolbar"),i.is("show",a.state.selectedData.length>0)]},[o("div",{class:i.b("batch-toolbar-content")},[o("div",{class:i.b("batch-toolbar-text")},[ibiz.i18n.t("control.common.itemsSelected",{length:a.state.selectedData.length})]),o("div",{class:i.b("batch-toolbar-separator")},[v("|")]),o(s("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:i.b("batch-toolbar-items")},null)])])},headerCssVars:I,renderDragIconColumn:()=>o(s("el-table-column"),{"class-name":i.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)])])])}),isLodeMoreDisabled:_,infiniteScroll:O,infiniteScrollKey:j}},render(){if(!this.c.state.isCreated)return;const e=this.c.state;return o(s("iBizControlBase"),{class:[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",e.singleSelect),this.ns.is("empty",0===e.items.length),this.ns.is("enable-customized",this.c.model.enableCustomized)],controller:this.c,style:this.headerCssVars},{default:()=>[o(s("el-table"),{ref:"tableRef",class:this.ns.e("table"),"default-sort":this.defaultSort,border:!0,"show-header":!this.c.state.hideHeader,"show-summary":this.c.enableAgg,"summary-method":this.summaryMethod,"highlight-current-row":e.singleSelect,"row-class-name":this.handleRowClassName,"header-cell-class-name":this.handleHeaderCellClassName,"row-key":"tempsrfkey",data:this.tableData,"span-method":this.spanMethod,onRowClick:this.onRowClick,onRowDblclick:this.onDbRowClick,onSelectionChange:this.onSelectionChange,onSortChange:this.onSortChange,"tooltip-effect":"light","scrollbar-always-on":!0},{empty:this.renderNoData,default:()=>[this.c.enableRowEditOrder&&this.renderDragIconColumn(),!e.singleSelect&&o(s("el-table-column"),{"class-name":this.ns.e("selection"),type:"selection",width:"55"},null),this.renderColumns.map(((e,t)=>this.renderTableColumn(e,t)))],append:()=>{let e;return[h(o("div",{ref:"infiniteScroll",key:this.infiniteScrollKey,"infinite-scroll-distance":10,"infinite-scroll-disabled":this.isLodeMoreDisabled},null),[[w("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(s("el-button"),{text:!0,onClick:()=>this.c.loadMore()},(t=e=ibiz.i18n.t("control.common.loadMore"),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!i(t)?e:{default:()=>[e]}))]),this.renderPopover()];var t}}),this.c.state.enablePagingBar&&1===this.c.model.pagingMode&&o(s("iBizPagination"),{total:e.total,curPage:e.curPage,size:e.size,totalPages:e.totalPages,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null),this.c.model.enableCustomized&&!this.c.state.hideHeader&&o("div",{class:this.ns.b("setting-box")},[o(s("iBizGridSetting"),{columnStates:e.columnStates,controller:this.c},null)]),this.renderBatchToolBar()]})}});var Bl=Object.defineProperty,jl=(e,t,a)=>(((e,t,a)=>{t in e?Bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Al{constructor(){jl(this,"component","IBizGridControl")}}const Nl=e("l",U(Ol,(e=>{e.component(Ol.name,Ol),e.component(Yi.name,Yi),e.use(Oi),e.use(Ri),e.use(qi),e.use(Xi),Xt($t.GRID,(()=>new Al))})));function Rl(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Ml=a({name:"IBizListControl",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},loadDefault:{type:Boolean,default:!0}},setup(e){const t=F(((...e)=>new ua(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),{onPageChange:i,onPageRefresh:r,onPageSizeChange:d}=Dl(t),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=n(),m=n(lo());c((()=>t.state.curPage),(()=>{var e,a;if(1===t.state.curPage&&(2===t.model.pagingMode||3===t.model.pagingMode)){m.value=lo();const t=null==(a=null==(e=p.value)?void 0:e.ElInfiniteScroll)?void 0:a.containerEl;t&&(t.lastScrollTop=0,t.scrollTop=0)}}));const b=(e,n)=>{const{context:i,params:l}=t,r=t.state.selectedData.findIndex((t=>t.srfkey===e.srfkey)),c=[a.b("item"),a.is("active",-1!==r)];return o(s("iBizControlShell"),{class:c,data:e,modelData:n,context:i,params:l,onClick:()=>t.onRowClick(e),onDblclick:()=>t.onDbRowClick(e)},null)},v=e=>{const n=t.state.selectedData.findIndex((t=>t.srfkey===e.srfkey)),s=[a.b("item"),a.is("active",-1!==n)];return o("div",{class:s,key:e.srfkey,onClick:()=>t.onRowClick(e),onDblclick:()=>t.onDbRowClick(e)},["".concat(Bo(e.srfmajortext)?"":e.srfmajortext)])},g=t=>{const n=e.modelData.itemLayoutPanel;return o(s("el-collapse-item"),{title:ht(t.caption),class:a.be("group-content","item")},{default:()=>[t.children.length>0?t.children.map((e=>n?b(e,n):v(e))):o("div",{class:a.bem("group-content","item","empty")},[ibiz.i18n.t("app.noData")])]})};return{c:t,ns:a,infiniteScroll:p,renderListContent:()=>{let n;if(t.model.enableGroup&&!t.state.isSimple)return o(s("el-collapse"),{class:[a.b("group-content"),a.b("content")]},{default:()=>{var e;return[null==(e=t.state.groups)?void 0:e.map((e=>o("div",{class:[a.b("scroll-item")]},[g(e)])))]}});const i=e.modelData.itemLayoutPanel;return h(o("div",{class:[a.b("scroll"),a.b("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":u.value,ref:"infiniteScroll",key:m.value},[t.state.items.map((e=>o("div",{class:[a.b("scroll-item")]},[i?b(e,i):v(e)]))),3===t.model.pagingMode&&!(t.state.items.length>=t.state.total||t.state.isLoading||t.state.total<=t.state.size)&&o("div",{class:a.e("load-more-button")},[o(s("el-button"),{text:!0,onClick:()=>t.loadMore()},Rl(n=ibiz.i18n.t("control.common.loadMore"))?n:{default:()=>[n]})])]),[[w("infinite-scroll"),()=>t.loadMore()]])},renderNoData:()=>{let e;const{isLoaded:n}=t.state;if(n)return n&&o(s("iBizNoData"),{class:a.b("content"),text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes,enableShowImage:t.state.hideNoDataImage},Rl(e=(()=>{var e;const a=null==(e=t.model.controls)?void 0:e.find((e=>e.name==="".concat(t.model.name,"_quicktoolbar")));if(a)return o(s("iBizToolbarControl"),{modelData:a,context:t.context,params:t.params},null)})())?e:{default:()=>[e]})},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.b("batchtoolbar")},[o(s("iBizToolbarControl"),{modelData:n,context:t.context,params:t.params},null)])},onPageChange:i,onPageRefresh:r,onPageSizeChange:d}},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(s("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(s("iBizControlBase"),{class:[this.ns.is("enable-page",!!this.c.state.enablePagingBar)],controller:this.c},Rl(e)?e:{default:()=>[e]})}});var Ll=Object.defineProperty,Vl=(e,t,a)=>(((e,t,a)=>{t in e?Ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Fl{constructor(){Vl(this,"component","IBizListControl")}}const Ul=e("v",U(Ml,(function(e){e.component(Ml.name,Ml),Xt($t.LIST,(()=>new Fl))}))),ql=a({name:"IBizSearchFormControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(){const e=F(((...e)=>new pa(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return e.evt.on("onCreated",(()=>{Object.keys(e.details).forEach((t=>{const a=e.details[t];a.state=g(a.state)}))})),{c:e,ns:t}},render(){const{state:e}=this.c;if(e.isCreated)return o(s("iBizFormControl"),{class:[this.ns.b()],controller:this.c,onKeyup:e=>this.c.onKeyUp(e)},{...this.$slots})}});var Gl=Object.defineProperty,Hl=(e,t,a)=>(((e,t,a)=>{t in e?Gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Wl{constructor(){Hl(this,"component","IBizSearchFormControl")}}const Kl=e("w",U(ql,(function(e){e.component(ql.name,ql),Xt($t.SEARCHFORM,(()=>new Wl))})));function Xl(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const $l=a({name:"IBizFormGroupPanel",props:{modelData:{type:Object,required:!0},controller:{type:ha,required:!0}},setup(e){const t=B("form-group"),a=n(!e.controller.defaultExpansion),o=l((()=>{const{captionItemName:t,caption:a}=e.modelData;return t?e.controller.data[t]:a}));return{ns:t,isCollapse:a,captionText:o,changeCollapse:()=>{e.controller.disableClose||(a.value=!a.value)},onActionClick:async(t,a)=>{await e.controller.onActionClick(t,a)}}},render(){var e,t;let a;const{state:n}=this.controller,i=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],l=o(s("iBizRow"),{class:this.ns.be("content","row"),layout:this.modelData.layout},Xl(a=i.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},Xl(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]}),r=[this.ns.b(),this.ns.m(this.modelData.codeName),...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.isCollapse)),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.captionText])]),o("div",{class:[this.ns.be("header","right")]},[this.modelData.uiactionGroup&&o(s("iBizActionToolbar"),{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.isCollapse?o("ion-icon",{name:"caret-forward-sharp"},null):o("ion-icon",{name:"caret-down-sharp"},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",{class:r,onClick:e=>this.controller.onClick(e)},[c,o("div",{class:[this.ns.b("content")]},[l]),d])}});var Yl=Object.defineProperty,Jl=(e,t,a)=>(((e,t,a)=>{t in e?Yl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ql{constructor(){Jl(this,"component","IBizFormGroupPanel")}async createController(e,t,a){const n=new ha(e,t,a);return await n.init(),n}}const Zl=e("x",U($l,(function(e){e.component($l.name,$l),ma("GROUPPANEL",(()=>new Ql))})));const er=a({name:"IBizFormItem",props:{modelData:{type:Object,required:!0},controller:{type:ba,required:!0},attrs:{type:Object,required:!1}},setup:e=>({ns:B("form-item"),c:e.controller,onValueChange:(t,a)=>{e.controller.setDataValue(t,a)}}),render(){if(!this.c.state.visible)return null;let e=null;const t={style:this.controller.editor.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,controlParams:this.controller.form.controlParams,onFocus:e=>this.c.onFocus(e),onBlur:e=>this.c.onBlur(e),onEnter:e=>this.controller.onEnter(e),...this.attrs};if(this.c.form.state.isLoaded)if(this.$slots.default)e=this.$slots.default(t);else if(this.controller.editorProvider){const a=s(this.controller.editorProvider.formEditor);e=r(a,{...t})}else e=o(s("not-supported-editor"),{modelData:this.modelData.editor},null);return o(s("iBizFormItemContainer"),{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],style:this.modelData.cssStyle,required:this.c.state.required,error:this.c.state.error,label:this.c.labelCaption,labelClass:this.controller.labelClass,"label-pos":this.c.model.labelPos,"label-width":this.c.model.labelWidth,enableInputTip:this.modelData.enableInputTip,inputTip:this.modelData.inputTip,inputTipUrl:this.modelData.inputTipUrl,inputTipClosable:this.modelData.inputTipClosable,onClick:e=>this.c.onClick(e)},"function"==typeof(a=e)||"[object Object]"===Object.prototype.toString.call(a)&&!i(a)?e:{default:()=>[e]});var a}}),tr=e("z",a({name:"IBizFormItemContainer",props:{required:{type:Boolean,required:!0},error:{type:String},label:{type:String},labelClass:{type:Array},labelPos:{type:String,required:!0},labelWidth:{type:Number,default:130},enableInputTip:{type:Boolean},inputTip:{type:String},inputTipUrl:{type:String},inputTipClosable:{type:Boolean}},setup(e){const t=B("form-item-container"),a=n(),i=l((()=>130!==e.labelWidth?t.cssVarBlock({"label-width":"".concat(e.labelWidth,"px")}):{})),r=()=>{a.value&&a.value.hide()};return{ns:t,cssVars:i,tooltip:a,renderLabel:()=>{const a=[t.e("label"),...e.labelClass||[]];return e.enableInputTip?o(s("el-tooltip"),{"popper-class":t.e("popper"),placement:e.labelPos.toLowerCase(),ref:"tooltip"},{default:()=>o("div",{class:a},[e.label]),content:()=>o("div",{class:t.em("label","tooltip")},[e.inputTip||e.label,e.inputTipUrl&&o("a",{href:e.inputTipUrl,target:"_blank"},[ibiz.i18n.t("component.formItemContainer.more")]),e.inputTipClosable&&o("ion-icon",{name:"close-outline",onClick:r},null)])}):o("div",{class:a,title:ht(e.label)},[e.label])}}},render(){var e,t;const a=o("div",{class:[this.ns.e("content"),this.ns.em("content","label-".concat(this.labelPos.toLowerCase()))]},[o("div",{class:[this.ns.e("editor")]},[null==(t=(e=this.$slots).default)?void 0:t.call(e)]),this.error?o("div",{title:ht(this.error),class:[this.ns.e("error")]},[this.error]):null]);return o("div",{class:[this.ns.b(),this.ns.m(this.labelPos.toLowerCase()),this.ns.is("required",this.required),this.ns.is("error",!!this.error)],style:this.cssVars},["LEFT"===this.labelPos||"TOP"===this.labelPos?this.renderLabel():null,a,"RIGHT"===this.labelPos||"BOTTOM"===this.labelPos?this.renderLabel():null])}}));var ar=Object.defineProperty,nr=(e,t,a)=>(((e,t,a)=>{t in e?ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class or{constructor(){nr(this,"component","IBizFormItem")}async createController(e,t,a){const n=new ba(e,t,a);return await n.init(),n}}const sr=e("y",U(er,(function(e){e.component(er.name,er),e.component(tr.name,tr),ma("FORMITEM",(()=>new or))})));const ir=a({name:"IBizFormPage",props:{modelData:{type:Object,required:!0}},setup(e){const t=B("form-page");let a="top";return e.modelData.tabHeaderPos&&(a=e.modelData.tabHeaderPos.toLowerCase()),{ns:t,position:a}},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(s("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},"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(s("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(s("iBizIcon"),{icon:a.model.sysImage},null):null,a.model.caption])}):null})))||"[object Object]"===Object.prototype.toString.call(d)&&!i(d)?l:{default:()=>[l]});var d}});function lr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const rr=e("B",a({name:"IBizFormPageItem",props:{modelData:{type:Object,required:!0},controller:{type:va,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(s("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],layout:this.modelData.layout},lr(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},lr(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]})}}));var cr=Object.defineProperty,dr=(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);class ur{constructor(){dr(this,"component","IBizFormPageItem")}async createController(e,t,a){const n=new va(e,t);return await n.init(),n}}const pr=e("A",U(ir,(function(e){e.component(ir.name,ir),e.component(rr.name,rr),ma("FORMPAGE",(()=>new ur))}))),hr=a({name:"IBizFormButton",props:{modelData:{type:Object,required:!0},controller:{type:wa,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(s("el-button"),{sime:"small",onClick:this.controller.onClick.bind(this.controller),loading:this.controller.state.loading,disabled:this.controller.state.disabled,title:ht(this.modelData.tooltip)},{default:()=>[o("div",{class:this.ns.b("content")},[o(s("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 mr=Object.defineProperty,br=(e,t,a)=>(((e,t,a)=>{t in e?mr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vr{constructor(){br(this,"component","IBizFormButton")}async createController(e,t,a){const n=new wa(e,t,a);return await n.init(),n}}const wr=e("C",U(hr,(function(e){e.component(hr.name,hr),ma("BUTTON",(()=>new vr))}))),gr=a({name:"IBizFormDRUIPart",props:{modelData:{type:Object,required:!0},controller:{type:ga,required:!0}},setup(e){const t=B("form-druipart");ae(e.controller);return{ns:t,onCreated:t=>{e.controller.setEmbedView(t.view)}}},render(){if(!this.controller.state.visible&&!this.controller.state.keepAlive||!this.controller.state.viewComponentKey)return null;const e=s("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 fr=Object.defineProperty,yr=(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 Cr{constructor(){yr(this,"component","IBizFormDRUIPart")}async createController(e,t,a){const n=new ga(e,t,a);return await n.init(),n}}const Ir=e("E",U(gr,(function(e){e.component(gr.name,gr),ma("DRUIPART",(()=>new Cr))}))),Pr=a({name:"IBizFormMDCtrl",props:{modelData:{type:Object,required:!0},controller:{type:fa,required:!0}},setup(e){const t=B("form-mdctrl");ae(e.controller);const a=e.controller,n=a.model.showCaption&&!!a.model.caption;return{c:a,ns:t,hasCaption:n,hasHeader:n||a.model.uiactionGroup,onActionClick:async(t,a)=>{await e.controller.onActionClick(t,a)}}},render(){const{model:e}=this.c;let t;switch(e.contentType){case"GRID":case"LIST":case"DATAVIEW":t=o(s("iBizFormMDCtrlMD"),{controller:this.c},null);break;case"FORM":t=o(s("iBizFormMDCtrlForm"),{controller:this.c},null);break;case"REPEATER":t=o(s("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(s("iBizActionToolbar"),{class:this.ns.e("toolbar"),"action-details":e.uiactionGroup.uiactionGroupDetails,"actions-state":this.controller.state.actionGroupState,onActionClick:this.onActionClick},null)]),t])}});const Dr=a({name:"IBizFormMDCtrlForm",props:{controller:{type:ya,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(s("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)&&!i(n)?a:{default:()=>[a]});var n}}},render(){const{state:e,formProvider:t,model:a}=this.controller;return"STYLE2"===a.detailStyle?o(s("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(s(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(s("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})=>{if(!t)return o("div",null,[ibiz.i18n.t("control.form.formMDctrlForm.noFindProvider")]);return r(s(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)}})}})}});function Er(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const kr=a({name:"IBizFormMDCtrlMD",props:{controller:{type:Ca,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 i=null;if(this.controller.form.state.isLoaded){const e={class:this.ns.b("content"),modelData:n.contentControl,context:this.controller.form.context,params:this.controller.form.params,onCreated:this.onCreated,onSelectionChange:this.onSelectionChange};"GRID"===n.contentType&&(e.rowEditOpen=!0),i=r(s(a.component),e)}return o("div",{class:this.ns.b()},[i,this.showActions&&o("div",{class:this.ns.b("actions")},[this.controller.enableCreate&&o(s("el-button"),{class:[this.ns.be("actions","create"),this.ns.be("actions","btn")],onClick:()=>this.controller.create()},Er(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]}),this.controller.enableDelete&&o(s("el-button"),{type:"danger",disabled:!this.isSelected,class:[this.ns.be("actions","remove"),this.ns.be("actions","btn")],onClick:()=>this.controller.remove()},Er(t=ibiz.i18n.t("app.delete"))?t:{default:()=>[t]})])])}}),xr=a({name:"IBizRepeaterSingleForm",props:{data:{type:Object,required:!0},controller:{type:Ia,required:!0}},emits:{change:e=>!0,created:e=>!0},setup(e,{emit:t}){const a=B("repeater-single-form");return{ns:a,onFormDataChange:e=>{const a=(e=>{const t={};return e.$dataUIMap.forEach((a=>{void 0!==e[a.dataKey]&&(t[a.dataKey]=e[a.dataKey])})),t})(e.data[0]);t("change",a)},onCreated:e=>{t("created",e)}}},render(){if(!this.controller.repeatedForm)throw new bt(ibiz.i18n.t("control.form.repeaterSingleForm.errorMessage"));return o(s("iBizControlShell"),{class:this.ns.b(),context:this.controller.context,params:this.controller.params,modelData:this.controller.repeatedForm,isSimple:!0,data:this.data,onFormDataChange:this.onFormDataChange,onCreated:this.onCreated},null)}}),zr=a({name:"IBizRepeaterMultiForm",props:{controller:{type:Ia,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;return o(s("iBizMDCtrlContainer"),{class:this.ns.b(),items:e,enableCreate:this.controller.enableCreate,enableDelete:this.controller.enableDelete,onAddClick:()=>this.controller.create(),onRemoveClick:(e,t)=>this.controller.remove(t)},{item:({data:e,index:t})=>o(xr,{key:t,data:e,controller:this.controller,onChange:e=>{this.onValueChange(e,t)},onCreated:e=>this.onCreated(t,e)},null)})}});function Sr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Tr=a({name:"IBizRepeaterGrid",props:{controller:{type:Ia,required:!0}},emits:{change:e=>!0},setup(e,{emit:t}){const a=B("repeater-grid"),n=[];yt(e.controller.repeatedForm,(e=>{"FORMITEM"===e.detailType&&n.push(e)}),{childrenFields:["deformPages","deformTabPages","deformDetails"]});const i=ne(),l=g([]),r=async(a={})=>{const n=new Pa(e.controller.repeatedForm,e.controller.context,e.controller.params,i);n.state.isSimple=!0,await n.created(),n.setSimpleData(a),l.push(n),e.controller.setRepeaterController("".concat(l.length-1),n),n.evt.on("onFormDataChange",(a=>{((a,n)=>{const o=[...e.controller.value];o[n]=a,t("change",o)})({...a.data[0]},l.indexOf(n))}))};c((()=>e.controller.value),(e=>{e&&e.length>0&&(e.forEach(((e,t)=>{const a=l[t];if(a){const t=e||{};Object.keys(a.data).find((e=>t[e]!==a.data[e]))&&a.setSimpleData(t)}else r(e)})),e.length<l.length&&l.forEach(((t,a)=>{a>=e.length&&(t.state.isLoaded=!1)})))}),{immediate:!0,deep:!0});return{ns:a,formItems:n,formControllers:l,renderRemoveBtn:t=>{let n;return e.controller.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?o(s("el-popconfirm"),{title:ht(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(s("el-button"),{text:!0,type:"danger",class:[a.be("index","remove")]},Sr(e=ibiz.i18n.t("app.delete"))?e:{default:()=>[e]})}}):o(s("el-button"),{text:!0,type:"danger",class:[a.be("index","remove")],onClick:()=>e.controller.remove(t)},Sr(n=ibiz.i18n.t("app.delete"))?n:{default:()=>[n]}):null}}},render(){let e;return o("div",{class:this.ns.b()},[this.controller.enableCreate&&o(s("el-button"),{class:this.ns.e("add-btn"),onClick:()=>{this.controller.create()}},Sr(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]}),o(s("el-table"),{class:this.ns.e("table"),"show-header":!0,data:this.controller.value,"cell-class-name":({columnIndex:e})=>0===e?this.ns.b("index"):""},{default:()=>[o(s("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(s("el-table-column"),{label:e.caption,prop:e.id,width:a,align:"center"},{default:t=>{const{$index:a}=t,n=E(this.formControllers[a]);if(!n||!n.state.isLoaded)return o("div",null,[ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);const i=n.formItems.find((t=>t.name===e.id));let l=null;if(i.editorProvider){const e=s(i.editorProvider.formEditor);l=r(e,{value:i.value,data:i.data,controller:i.editor,disabled:i.state.disabled,readonly:i.state.readonly,onChange:(e,t)=>{i.setDataValue(e,t)}})}else l=o(s("not-supported-editor"),{modelData:e.editor},null);return o(s("iBizGridEditItem"),{error:i.state.error,required:i.state.required},Sr(l)?l:{default:()=>[l]})}})}))]})])}}),_r=a({name:"IBizFormMDCtrlRepeater",props:{controller:{type:Ia,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(zr,{class:e,onChange:this.onDataChange,controller:this.controller},null);case"Grid":return o(Tr,{class:e,controller:this.controller,onChange:this.onDataChange},null);case"SingleForm":return o(xr,{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 Or=Object.defineProperty,Br=(e,t,a)=>(((e,t,a)=>{t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jr{constructor(){Br(this,"component","IBizFormMDCtrl")}async createController(e,t,a){let n;switch(e.contentType){case"LIST":case"GRID":case"DATAVIEW":n=new Ca(e,t,a);break;case"FORM":n=new ya(e,t,a);break;case"REPEATER":n=new Ia(e,t,a);break;default:throw new Ct(e,"".concat(ibiz.i18n.t("control.form.formMDctrl.errorMessage",{contentType:e.contentType})))}return await n.init(),n}}function Ar(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Nr=a({name:"IBizMDCtrlContainer",props:{enableCreate:{type:Boolean,required:!0},enableDelete:{type:Boolean,required:!0},items:{type:Object,required:!0}},emits:{addClick:()=>!0,removeClick:(e,t)=>!0},setup(e,{emit:t}){const a=B("mdctrl-container"),n=l((()=>e.enableCreate||e.enableDelete));return{ns:a,showActions:n,renderAddBtn:()=>{let e;return o(s("el-button"),{class:[a.be("item-actions","create"),a.be("item-actions","btn")],onClick:()=>t("addClick")},Ar(e=ibiz.i18n.t("app.add"))?e:{default:()=>[e]})},renderRemoveBtn:(n,i)=>{let l;return e.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?o(s("el-popconfirm"),{title:ht(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",n,i)},{reference:()=>{let e;return o(s("el-button"),{type:"danger",class:[a.be("item-actions","remove"),a.be("item-actions","btn")]},Ar(e=ibiz.i18n.t("app.delete"))?e:{default:()=>[e]})}}):o(s("el-button"),{type:"danger",class:[a.be("item-actions","remove"),a.be("item-actions","btn")],onClick:()=>t("removeClick",n,i)},Ar(l=ibiz.i18n.t("app.delete"))?l:{default:()=>[l]}):null}}},render(){var e;return o("div",{class:this.ns.b()},[(null==(e=this.items)?void 0:e.length)?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("item-actions")},[0===t&&this.enableCreate&&this.renderAddBtn(),this.renderRemoveBtn(e,t)])])})):o("div",{class:this.ns.b("no-data")},[this.enableCreate&&o("div",{class:this.ns.b("item-actions")},[this.renderAddBtn()])])])}}),Rr=a({name:"IBizMDCtrlContainer2",components:{draggable:Po},props:{controller:{type:ya,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(""),s=n(),i=n(!1),l=n(!1),r=n(!0);let u;const p=()=>{if(s.value){const e=s.value.$el;e&&(i.value=e.scrollLeft>0,l.value=e.scrollLeft<e.scrollWidth-e.offsetWidth,r.value=e.offsetWidth>e.scrollWidth)}};d((()=>{s.value&&s.value.$el&&(u=new ResizeObserver((e=>{e.forEach((()=>{p()}))})),u.observe(s.value.$el))})),C((()=>{u&&u.disconnect()}));return{ns:t,currentItem:a,draggingKey:o,container:s,isShowLeftArrow:i,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)||""),p()},handleArrowClick:(e,a)=>{if(e.stopPropagation(),s.value){const e=s.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)}p()}}},handleDragStart:e=>{o.value=e.id},handleDragEnd:()=>{o.value="",e.controller.updateData(),p()}}},render(){return o("div",{class:this.ns.b()},[o("div",{class:[this.ns.b("header")]},[o(Po,{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:ht(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})])}))])])}}),Mr=e("F",U(Pr,(function(e){e.component(Pr.name,Pr),e.component(Dr.name,Dr),e.component(kr.name,kr),e.component(_r.name,_r),e.component(Nr.name,Nr),e.component(Rr.name,Rr),ma("MDCTRL",(()=>new jr))}))),Lr=a({name:"IBizFormRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Da,required:!0}},setup(e){const t=B("form-raw-item"),a=e.controller,o=n(""),s=l((()=>!(!e.controller.form.controlParams||"hover"!==e.controller.form.controlParams.editmode)));return c((()=>a.data),(async e=>{if(e){const t=a.model.rawItem;if(!t)return;let n="";const s={...e};"RAW"===t.contentType?n=t.caption:"HTML"===t.contentType&&(n=t.content),n&&t.templateMode&&(n=await ibiz.util.hbs.render(n.replaceAll("//n","\n"),Object.assign(s,{data:{...e}}))),o.value=n}}),{immediate:!0}),{ns:t,content:o,showFormDefaultContent:s}},render(){return this.controller.state.visible?o(s("iBizRawItem"),{class:[this.ns.b(),...this.controller.containerClass,this.ns.is("show-default",this.showFormDefaultContent)],rawItem:this.modelData,content:this.content,onClick:e=>this.controller.onClick(e)},null):null}});var Vr=Object.defineProperty,Fr=(e,t,a)=>(((e,t,a)=>{t in e?Vr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ur{constructor(){Fr(this,"component","IBizFormRawItem")}async createController(e,t,a){const n=new Da(e,t,a);return await n.init(),n}}const qr=e("G",U(Lr,(function(e){e.component(Lr.name,Lr),ma("RAWITEM",(()=>new Ur))})));function Gr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Hr=a({name:"IBizFormTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:Ea,required:!0}},setup(e,{slots:t}){const a=B("form-tab-panel");ae(e.controller);let o=null;const s=g({}),i=n(""),l=e=>{s.value=e};return d((()=>{var a,n;const s=(null==(a=t.default)?void 0:a.call(t))||[];for(let e=0;e<s.length;e++){const t=null==(n=s[e].props)?void 0:n.controller;if(t&&t.model&&t.model.appCounterRefId){i.value=t.model.appCounterRefId;break}}i.value&&(o=e.controller.getCounter(i.value),o&&o.onChange(l))})),C((()=>{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:s}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],i=e=>o("span",{class:[this.ns.b("tab-item-content"),...e.labelClass]},[e.model.sysImage&&o(s("iBizIcon"),{icon:e.model.sysImage},null),e.model.showCaption&&e.model.caption]);return o(s("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],"model-value":this.controller.state.activeTab,onTabClick:this.onTabClick},Gr(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(s("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(s("el-badge"),{class:this.ns.e("badge"),value:t,hidden:!t&&0!==t||1===a.model.counterMode&&t<=0},Gr(e=i(a))?e:{default:()=>[e]}):i(a)}}):null})))?a:{default:()=>[a]})}});var Wr=Object.defineProperty,Kr=(e,t,a)=>(((e,t,a)=>{t in e?Wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Xr{constructor(){Kr(this,"component","IBizFormTabPanel")}async createController(e,t,a){const n=new Ea(e,t,a);return await n.init(),n}}const $r=e("H",U(Hr,(function(e){e.component(Hr.name,Hr),ma("TABPANEL",(()=>new Xr))})));function Yr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Jr=a({name:"IBizFormTabPage",props:{modelData:{type:Object,required:!0},controller:{type:ka,required:!0}},setup(e){const t=B("form-tab-page");return ae(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(s("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],layout:this.modelData.layout,onClick:e=>this.controller.onClick(e)},Yr(a=n.map((e=>{const t=e.props;if(!t||!t.controller)return e;const a=t.controller;return o(s("iBizCol"),{layoutPos:a.model.layoutPos,state:a.state},Yr(e)?e:{default:()=>[e]})})))?a:{default:()=>[a]})}});var Qr=Object.defineProperty,Zr=(e,t,a)=>(((e,t,a)=>{t in e?Qr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ec{constructor(){Zr(this,"component","IBizFormTabPage")}async createController(e,t,a){const n=new ka(e,t,a);return await n.init(),n}}const tc=e("J",U(Jr,(function(e){e.component(Jr.name,Jr),ma("TABPAGE",(()=>new ec))})));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{constructor(){nc(this,"component","IBizEditFormControl")}}const sc=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}},setup(e){const t=F(((...e)=>new Pa(...e)),{excludePropsKeys:["data"]});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}));const a=B("control-".concat(t.model.controlType.toLowerCase()));return t.evt.on("onCreated",(()=>{Object.keys(t.details).forEach((e=>{const a=t.details[e];a.state=g(a.state)}))})),{c:t,ns:a}},render(){return o(s("iBizFormControl"),{class:this.ns.b(),controller:this.c},{...this.$slots})}}),ic=e("K",U(sc,(function(e){e.component(sc.name,sc),Xt($t.FORM,(()=>new oc))})));const lc=a({name:"IBizFormControl",props:{controller:{type:Object,required:!0}},setup(e,{slots:t}){const a=B("control-form"),n=e.controller,i={form:n},l=t=>{var a;const n={};return null==(a=t.controlAttributes)||a.forEach((t=>{t.attrName&&t.attrValue&&(n[t.attrName]=da.execSingleLine(t.attrValue,{...e.controller.getEventArgs(),data:e.controller.data}))})),n},c=e=>{if(e.hidden)return;const a=e.id;if(t[a])return D(t,a,{model:e,data:n.state.data,value:n.state.data[a]});const i={};"FORMITEM"===e.detailType&&t["".concat(a,"_editor")]&&(i.default=(...e)=>t["".concat(a,"_editor")](...e));const d=Ht(e);d.length&&(i.default=()=>d.map((e=>c(e))));const u=n.providers[a];if(!u)return o("div",null,[ibiz.i18n.t("control.form.noSupportDetailType",{detailType:e.detailType})]);const p=s(u.component);return r(p,{modelData:e,controller:n.details[a],key:e.id,attrs:l(e)},i)},d=e=>{const{modelData:t}=e;return(t instanceof Array?t:[t]).map((e=>c(e)))};return d.props=["modelData"],i.FormDetail=d,{ns:a,c:n,FormDetail:d,slotProps:i,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===$t.SEARCHFORM?"searchform":"form";l[a?e:"default"]=()=>o(s("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)))]}})}return o(s("iBizControlBase"),{class:[this.ns.b()],controller:this.c},"function"==typeof(r=l)||"[object Object]"===Object.prototype.toString.call(r)&&!i(r)?l:{default:()=>[l]});var r}}),rc=e("L",U(lc,(function(e){e.component(lc.name,lc),e.use(pr),e.use(sr),e.use(Zl),e.use(wr),e.use(Ir),e.use(Mr),e.use(qr),e.use($r),e.use(tc)})));function cc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const dc=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),s=n(9999);return{ns:a,endPage:s,startPage:o,onCommand:(e,a)=>{e&&t("exportExcel",a,{type:e,startPage:o.value,endPage:s.value})}}},render(){return"menu"===this.$props.mode?o(s("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(s("el-button"),{title:ht(this.item.tooltip),size:this.$props.size,class:this.ns.b("submenu-button")},cc(e=this.btnContent(this.item))?e:{default:()=>[e]})},default:()=>{let e,t,a,n;return[o(s("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("maxRowCount",e)},cc(e=ibiz.i18n.t("control.toolbar.exportExcel.exportAll"))?e:{default:()=>[e]}),o(s("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("activatedPage",e)},cc(t=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentPage"))?t:{default:()=>[t]}),o(s("el-menu-item"),{class:this.ns.b("menu-item"),onClick:e=>this.onCommand("selectedRows",e)},cc(a=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentSelect"))?a:{default:()=>[a]}),o(s("el-menu-item"),{class:[this.ns.b("menu-item"),this.ns.e("custom")]},{default:()=>[o(s("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()}},[v("-")]),o(s("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(s("el-button"),{onClick:e=>this.onCommand("customPage",e),size:"small"},cc(n=ibiz.i18n.t("control.toolbar.exportExcel.export"))?n:{default:()=>[n]})]})]}}):o(s("el-dropdown"),{size:this.$props.size,onCommand:this.onCommand,"popper-class":this.ns.b(),trigger:"click"},{default:()=>{let e;return o(s("el-button"),{title:ht(this.item.tooltip),size:this.$props.size,class:this.ns.e("button")},cc(e=this.btnContent(this.item))?e:{default:()=>[e]})},dropdown:()=>{let e,t,a,n;return o(s("el-dropdown-menu"),null,{default:()=>[o(s("el-dropdown-item"),{command:"maxRowCount"},cc(e=ibiz.i18n.t("control.toolbar.exportExcel.exportAll"))?e:{default:()=>[e]}),o(s("el-dropdown-item"),{command:"activatedPage"},cc(t=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentPage"))?t:{default:()=>[t]}),o(s("el-dropdown-item"),{command:"selectedRows"},cc(a=ibiz.i18n.t("control.toolbar.exportExcel.expCurrentSelect"))?a:{default:()=>[a]}),o(s("el-dropdown-item"),{class:this.ns.e("custom"),command:""},{default:()=>[o(s("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()}},[v("-")]),o(s("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(s("el-button"),{onClick:e=>this.onCommand("customPage",e),size:"small"},cc(n=ibiz.i18n.t("control.toolbar.exportExcel.export"))?n:{default:()=>[n]})]})]})}})}}),uc=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"),s=null==(a=e.item.buttonStyle)?void 0:a.toLowerCase();return{ns:n,ns2:o,buttonState:l((()=>e.controller.state.buttonsState[e.item.id])),buttonType:s,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(s("el-button"),{title:ht(this.isShortCut?"".concat(ibiz.i18n.t("app.cancel")).concat(this.item.tooltip):this.item.tooltip),size:this.size,text:Object.is(this.buttonType,"inverse"),type:this.buttonType,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(s("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 pc(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const hc=e=>{const t=e.sysImage,a=[],n=B("toolbar-item");return e.showIcon&&t&&a.push(o("span",{class:n.b("icon")},[o(s("iBizIcon"),{icon:t},null)])),e.showCaption&&e.caption&&a.push(o("span",{class:n.b("text")},[e.caption])),a},mc=e=>{var t;return null==(t=null==e?void 0:e.sysCss)?void 0:t.cssName},bc=a({name:"IBizToolbarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},manualCalcButtonState:{type:Boolean,default:!1}},setup(){var e;const t=F(((...e)=>new xa(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),i=B("control-".concat(t.model.controlType.toLowerCase(),"-actions")),l=n("default"),c=null==(e=t.model.toolbarStyle)?void 0:e.toLowerCase(),d=async(e,a,n)=>{await t.onItemClick(e,a,n)},u=e=>{const n=e.detoolbarItems||[],i=t.state.buttonsState[e.id].visible,p=t.state.buttonsState[e.id].disabled;if(!i)return null;const h=-1!==n.findIndex((e=>t.state.buttonsState[e.id].loading));if(!(-1!==n.findIndex((e=>!0===t.state.buttonsState[e.id].visible))))return null;const m=p||-1===n.findIndex((e=>!1===t.state.buttonsState[e.id].disabled)),b=e.buttonStyle||"";return o(s("el-sub-menu"),{class:[a.b("submenu"),a.em("item",b.toLowerCase()),mc(e)],index:e.id,disabled:m,title:ht(e.tooltip),"popper-class":[a.b("submenu-popper"),a.bm("submenu-popper",c),a.em("submenu-popper",b.toLowerCase()),a.bm("submenu-popper",mc(e))]},{default:()=>n.map((n=>{var i,c;const p=n.uiactionId,h=null==(i=t.state.buttonsState[n.id])?void 0:i.visible,m=t.itemProviders[n.id];if(!h)return null;if(m){const o=s(m.component);return r(o,{key:n.id,class:[a.e("item")],item:e,controller:t})}if("SEPERATOR"!==n.itemType){if("RAWITEM"===n.itemType)return o(s("el-menu-item"),{index:"menuitem".concat(n.id),title:ht(n.tooltip)},{default:()=>[o(s("iBizRawItem"),{rawItem:n,class:a.b("submenu-rawitem")},null)]});if("DEUIACTION"===n.itemType){let e;const i=null==(c=n.buttonStyle)?void 0:c.toLowerCase();return"exportexcel"===p?o(dc,{class:[a.e("menu-exportexcel"),a.em("item",i),mc(n)],mode:"menu",item:n,btnContent:hc,size:l.value,controller:t,onExportExcel:(e,t)=>{d(n,e,t)}},null):o(s("el-menu-item"),{class:[a.is("loading",t.state.buttonsState[n.id].loading),a.em("item",i),mc(n)],index:"menuitem".concat(n.id),disabled:t.state.buttonsState[n.id].disabled,title:ht(n.tooltip),onClick:e=>d(n,e)},{default:()=>[o(s("el-button"),{loading:t.state.buttonsState[n.id].loading},pc(e=hc(n))?e:{default:()=>[e]})]})}return"ITEMS"===n.itemType?u(n):null}})),title:()=>{let t;return o(s("el-button"),{loading:h,disabled:m},pc(t=hc(e))?t:{default:()=>[t]})}})},p=e=>{if(t.state.buttonsState[e.id].visible){let a;return[o(s("el-button"),{title:ht(e.caption),size:l.value,class:[mc(e)],loading:t.state.buttonsState[e.id].loading,disabled:t.state.buttonsState[e.id].disabled,onClick:t=>(async(e,t,a)=>{const n={};Object.assign(n,{...e,itemType:e.detailType}),await d(n,t,a)})(e,t)},pc(a=hc(e))?a:{default:()=>[a]})]}return null},h=e=>{if(t.state.buttonsState[e.id].visible){let a;const n=t.state.buttonsState[e.id].disabled;return o(s("el-dropdown-item"),{class:[i.be("dropdown-popper","dropdown-item"),i.is("disabled",n)]},pc(a=p(e))?a:{default:()=>[a]})}return null},m=(e,a)=>{const n=e.slice(a,1);return n[0]?t.state.buttonsState[n[0].id].visible?a:m(e,a+1):-1},b=e=>{const{groupExtractMode:t}=e;switch(t){case"ITEMS":return(e=>{const{uiactionGroup:t}=e;if(t&&t.uiactionGroupDetails){const{uiactionGroupDetails:a}=t,n=a.length>0,l=e.buttonStyle||"";return o(s("el-dropdown"),{"popper-class":[i.b("dropdown-popper"),i.bm("dropdown-popper",c),i.em("dropdown-popper",l.toLowerCase()),i.bm("dropdown-popper",mc(e))]},{default:()=>p(e),dropdown:()=>{let e;return n&&o(s("el-dropdown-menu"),null,pc(e=a.map((e=>h(e))))?e:{default:()=>[e]})}})}return null})(e);case"ITEMX":return(e=>{const{uiactionGroup:t}=e;if(t&&t.uiactionGroupDetails){const{uiactionGroupDetails:a}=t,n=m(a,0);if(-1!==n){const t=a.slice(n,1),l=a.slice(n+1),r=l.length>0,d=e.buttonStyle||"";return o(s("el-dropdown"),{"split-button":r,"popper-class":[i.b("dropdown-popper"),i.bm("dropdown-popper",c),i.em("dropdown-popper",d.toLowerCase()),i.bm("dropdown-popper",mc(e))]},{default:()=>p(t[0]),dropdown:()=>{let e;return r&&o(s("el-dropdown-menu"),null,pc(e=l.map((e=>h(e))))?e:{default:()=>[e]})}})}}return null})(e);default:return(e=>{const{uiactionGroup:t}=e;if(t&&t.uiactionGroupDetails){const{uiactionGroupDetails:e}=t;return e.map((e=>o("div",{class:i.e("item-deuiaction")},[p(e)])))}return null})(e)}};return{c:t,btnSize:l,ns:a,toolbarStyle:c,handleClick:d,renderExtraButtons:e=>e.map((e=>{let t;return o("div",{key:e.id,class:[a.e("item")]},[o(s("el-button"),{title:ht(e.tooltip),size:l.value,onClick:t=>d(e,t)},pc(t=hc(e))?t:{default:()=>[t]})])})),renderToolbarItem:e=>{var n,c,p;const h=e.id,m=null==(n=t.state.buttonsState[h])?void 0:n.visible,w=t.itemProviders[h];if(!m)return null;if(w){const n=s(w.component);return r(n,{key:h,class:[a.e("item")],item:e,controller:t})}if("SEPERATOR"===e.itemType)return o("div",{key:h,class:[a.e("item"),a.e("item-separator")]},[v("|")]);if("RAWITEM"===e.itemType)return o("div",{key:h,class:[a.e("item"),a.e("item-rawitem")]},[o(s("iBizRawItem"),{rawItem:e},null)]);if("DEUIACTION"===e.itemType){let n;const i=e.uiactionId,r=null==(c=e.buttonStyle)?void 0:c.toLowerCase();return"exportexcel"===i?o(dc,{class:[a.e("item"),a.e("item-deuiaction"),a.em("item",r),mc(e)],item:e,btnContent:hc,size:l.value,controller:t,onExportExcel:(t,a)=>{d(e,t,a)}},null):"shortcut"===i?o(uc,{key:h,class:[a.e("item"),a.e("item-deuiaction"),a.em("item",r),mc(e)],item:e,controller:t,size:l.value,onClick:t=>d(e,t)},null):o("div",{key:h,class:[a.e("item"),a.e("item-deuiaction"),a.em("item",r),mc(e),a.is("loading",t.state.buttonsState[h].loading)]},[o(s("el-button"),{title:ht(e.tooltip),size:l.value,text:Object.is(r,"inverse"),type:r,loading:t.state.buttonsState[h].loading,disabled:t.state.buttonsState[h].disabled,onClick:t=>d(e,t)},pc(n=hc(e))?n:{default:()=>[n]})])}if("ITEMS"===e.itemType){let t;const n=e,l=n.buttonStyle||"";if(n.groupExtractMode&&n.uiactionGroup){const t="extract-mode-".concat((null==(p=n.groupExtractMode)?void 0:p.toLowerCase())||"item");return o("div",{class:[i.b(),i.e(t),i.em("item",l.toLowerCase()),mc(e)]},[b(e)])}return o(s("el-menu"),{mode:"horizontal",class:[a.e("menu"),a.em("menu",l.toLowerCase()),mc(e)],ellipsis:!1,"menu-trigger":"hover"},pc(t=u(e))?t:{default:()=>[t]})}return null}}},render(){var e,t,a;const{state:n}=this.c;let i=null;return n.isCreated&&(i=[(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(s("iBizControlBase"),{controller:this.c,class:[this.ns.m(n.viewMode.toLowerCase()),this.ns.m(this.toolbarStyle)]},pc(i)?i:{default:()=>[i]})}});var vc=Object.defineProperty,wc=(e,t,a)=>(((e,t,a)=>{t in e?vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gc{constructor(){wc(this,"component","IBizToolbarControl")}}const fc=e("M",U(bc,(function(e){e.component(bc.name,bc),Xt($t.TOOLBAR,(()=>new gc))}))),yc=a({name:"IBizCaptionBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=F(((...e)=>new za(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return e.setBrowserTabTitle(),k((()=>{e.setBrowserTabTitle()})),{c:e,ns:t}},render(){return o(s("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(s("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])])]})}});var Cc=Object.defineProperty,Ic=(e,t,a)=>(((e,t,a)=>{t in e?Cc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Pc{constructor(){Ic(this,"component","IBizCaptionBarControl")}}const Dc=e("N",U(yc,(function(e){e.component(yc.name,yc),Xt($t.CAPTIONBAR,(()=>new Pc))})));function Ec(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const kc=a({name:"IBizDataViewControl",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},loadDefault:{type:Boolean,default:!0}},setup(e){const t=F(((...e)=>new Sa(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),i=l((()=>[a.is("enable-page",!0===t.model.enablePagingBar)])),r=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)))),d=n(),u=n(lo());c((()=>t.state.curPage),(()=>{var e,a;if(1===t.state.curPage&&(2===t.model.pagingMode||3===t.model.pagingMode)){u.value=lo();const t=null==(a=null==(e=d.value)?void 0:e.ElInfiniteScroll)?void 0:a.containerEl;t&&(t.lastScrollTop=0,t.scrollTop=0)}}));const{onPageChange:p,onPageRefresh:m,onPageSizeChange:b}=Dl(t),v=(e,a)=>(a.stopPropagation(),t.onRowClick(e)),g=(e,a)=>(a.stopPropagation(),t.onDbRowClick(e)),f=(e,a)=>{const{context:n,params:i}=t;return o(s("iBizControlShell"),{data:e,modelData:a,context:n,params:i,onClick:t=>v(e,t),onDblclick:t=>g(e,t)},null)},y=e=>{var n;return o(s("iBizActionToolbar"),{class:a.bem("item-content","bottom","actions"),"action-details":null==(n=t.getOptItemModel().deuiactionGroup)?void 0:n.uiactionGroupDetails,"actions-state":t.getOptItemAction(e),onActionClick:(a,n)=>t.onActionClick(a,e,n)},null)},C=e=>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])]),t.getOptItemModel()?o("div",{class:a.be("item-content","bottom")},[y(e)]):null]),I=n=>{let i=-1!==t.state.selectedData.findIndex((e=>e.srfkey===n.srfkey));"DEDATAVIEW"===t.view.model.viewType&&1===t.state.mdctrlActiveMode&&!0===t.state.singleSelect&&(i=!1);const l=[a.b("item"),a.is("active",i)],r={};t.model.cardWidth&&Object.assign(r,{width:"".concat(t.model.cardWidth,"px")}),t.model.cardHeight&&Object.assign(r,{height:"".concat(t.model.cardHeight,"px")});const c=e.modelData.itemLayoutPanel;return o(s("el-card"),{shadow:"hover",class:l,"body-style":r,onClick:e=>v(n,e),onDblclick:e=>g(n,e)},{default:()=>[c?f(n,c):C(n)]})},P=e=>{const{cardColXS:n,cardColSM:i,cardColMD:l,cardColLG:r,groupSysCss:c}=t.model;return o("div",{class:[a.be("group-content","item"),null==c?void 0:c.cssName]},[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(s("iBizActionToolbar"),{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)])]),n||i||l||r?o(s("el-row"),{class:a.be("group-content","item-row")},{default:()=>[e.children.length>0?e.children.map((e=>{let t;return o(s("el-col"),{xs:n,sm:i,md:l,lg:r,class:a.be("group-content","item-col")},Ec(t=I(e))?t:{default:()=>[t]})})):o("div",{class:a.bem("group-content","item","empty")},[ibiz.i18n.t("app.noData")])]}):o("div",{class:a.be("group-content","item-content")},[e.children.length>0?e.children.map((e=>I(e))):o("div",{class:a.bem("group-content","item","empty")},[ibiz.i18n.t("app.noData")])])])},D=()=>{const{cardColXS:e,cardColSM:n,cardColMD:i,cardColLG:l}=t.model;if(t.model.enableGroup)return o("div",{class:a.b("group-content")},[t.state.groups.map((e=>o("div",{class:[a.b("scroll-item")]},[P(e)])))]);if(e||n||i||l){let r;return o(s("el-row"),{class:[a.b("item-row")]},Ec(r=t.state.items.map((t=>{let r;return o(s("el-col"),{xs:e,sm:n,md:i,lg:l,class:[a.b("item-col")]},Ec(r=I(t))?r:{default:()=>[r]})})))?r:{default:()=>[r]})}return t.state.items.map((e=>o("div",{class:[a.b("scroll-item")]},[I(e)])))};return{c:t,ns:a,classNames:i,infiniteScroll:d,renderHasData:()=>{let e;return h(o("div",{class:[a.b("scroll"),a.e("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":r.value,ref:"infiniteScroll",key:u.value},[D(),3===t.model.pagingMode&&!(t.state.items.length>=t.state.total||t.state.isLoading||t.state.total<=t.state.size)&&o("div",{class:a.e("load-more-button")},[o(s("el-button"),{text:!0,onClick:()=>t.loadMore()},Ec(e=ibiz.i18n.t("control.common.loadMore"))?e:{default:()=>[e]})])]),[[w("infinite-scroll"),()=>t.loadMore()]])},renderNoData:()=>{const{isLoaded:e}=t.state;if(e)return o(s("iBizNoData"),{class:a.e("content"),text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes,enableShowImage:t.state.hideNoDataImage},null)},onPageChange:p,onPageRefresh:m,onPageSizeChange:b}},render(){const{items:e,isCreated:t}=this.c.state;let a=null;return t&&(a=[this.c.state.noSort?null:o(s("iBizSortBar"),{onSortChange:(e,t)=>{this.c.setSort(e.key,t),this.c.load({isInitialLoad:2===this.c.model.pagingMode||3===this.c.model.pagingMode})},sortItems:this.c.state.sortItems},null),e.length>0?this.renderHasData():this.renderNoData(),this.c.state.enablePagingBar&&1===this.c.model.pagingMode?o(s("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(s("iBizControlBase"),{class:[this.ns.is("enable-page",!!this.c.state.enablePagingBar)],controller:this.c},Ec(a)?a:{default:()=>[a]})}});var xc=Object.defineProperty,zc=(e,t,a)=>(((e,t,a)=>{t in e?xc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Sc{constructor(){zc(this,"component","IBizDataViewControl")}}e("P",Sc);const Tc=e("O",U(kc,(function(e){e.component(kc.name,kc),Xt($t.DATAVIEW,(()=>new Sc))})));function _c(e,t){const a=t.state.items.find((t=>t._id===e));return a||t.state.items.find((t=>t._uuid===e))}function Oc(e){switch(e){case"inner":return"inner";case"before":return"prev";case"after":return"next";default:throw new bt(ibiz.i18n.t("control.tree.noSupported",{dropType:e}))}}const Bc=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}},setup(){const e=F(((...e)=>new Ta(...e))),a=n(!1),i=g({}),r=e=>{Object.assign(i,e)};e.evt.on("onCreated",(()=>{e.counter&&e.counter.onChange(r,!0),e.controlParams.cascadeselect&&(a.value=!0)})),C((()=>{var t;null==(t=e.counter)||t.offChange(r)}));const p=B("control-".concat(e.model.controlType.toLowerCase())),h=n(null),m=n(null),b=n(""),v=n(null),w=n(null),f=n(null);c((()=>v.value),(e=>{e&&e.$el.getElementsByTagName("input")[0].focus()}));const y=()=>{var t;const a=null==(t=h.value)?void 0:t.getCurrentKey();if(!a||a===w.value)return;const n=_c(a,e),o=e.getNodeModel(n._nodeId);(null==o?void 0:o.allowEditText)&&(w.value=a)},{updateUI:I,triggerNodeExpand:P}=function(e,t){const a=()=>{const t=e.value;if(!t)throw new bt(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=jo(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)}}}(h,e),D=e=>e.map((e=>({_id:e._id,_uuid:e._uuid,_leaf:e._leaf,_text:e._text,_disableSelect:e._disableSelect})));e.evt.on("onAfterRefreshParent",(e=>{if(h.value){const{parentNode:t,children:a}=e,n=D(a);h.value.updateKeyChildren(t._id,n),I()}})),e.evt.on("onAfterNodeDrop",(e=>{e.isChangedParent&&(b.value=lo())}));const E=l((()=>e.state.isLoaded?e.model.rootVisible?e.state.rootNodes:e.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[]));c(E,((e,t)=>{e!==t&&(b.value=lo())}));let k=!1;e.evt.on("onLoadSuccess",(()=>{k=!0,setTimeout((()=>{k=!1}),200)})),e.evt.on("onSelectionChange",(async()=>{var t;k&&await u(),e.state.singleSelect?h.value.setCurrentKey((null==(t=e.state.selectedData[0])?void 0:t._id)||void 0):h.value.setCheckedKeys(e.state.selectedData.map((e=>e._id)))}));let x=!1;const z=l((()=>!(!0!==e.context.srfreadonly&&"true"!==e.context.srfreadonly)));let S;e.evt.on("onMounted",(()=>{if(Object.values(e.contextMenus).length>0){(()=>t.import("@imengyu/vue3-context-menu"))().then((e=>{S=e.default,S.default&&!S.showContextMenu&&(S=S.default)}))}}));const T=s("IBizRawItem"),_=s("IBizIcon"),O=(t,a,n,s)=>{const i=[];return t.forEach((t=>{var l;if("SEPERATOR"===t.itemType)return void i.push({divided:"self"});const r=s[t.id];if(r&&!r.visible)return;const c={};if(t.showCaption&&t.caption&&(c.label=t.caption),t.sysImage&&t.showIcon&&(c.icon=o(_,{icon:t.sysImage},null)),"DEUIACTION"===t.itemType){c.disabled=r.disabled,c.clickClose=!0;const{uiactionId:o}=t;o&&(c.onClick=()=>{e.doUIAction(o,a,n,t.appId)})}else if("RAWITEM"===t.itemType){const{rawItem:e}=t;e&&(c.label=o(T,{rawItem:t},null))}else"ITEMS"===t.itemType&&(null==(l=t.detoolbarItems)?void 0:l.length)&&(c.children=O(t.detoolbarItems,a,n,s));i.push(c)})),i},j=jo((()=>{e.load()}),500),A=e=>{"F2"!==e.code&&"Enter"!==e.code||y()};d((()=>{var e;null==(e=m.value)||e.$el.addEventListener("keydown",A)})),C((()=>{var e;null==(e=m.value)||e.$el.removeEventListener("keydown",A)}));return{c:e,ns:p,treeRef:h,treeviewRef:m,treeNodeTextInputRef:v,treeData:E,treeRefreshKey:b,editingNodeKey:w,editingNodeText:f,cascadeSelect:a,findNodeData:_c,onCheck:(t,a)=>{const{checkedNodes:n}=a;e.setSelection(n)},onNodeClick:(t,a)=>{var n,o;if(a.stopPropagation(),!t._disableSelect&&!x){if((null==(n=h.value)?void 0:n.getCurrentKey())!==t._id||z.value||y(),e.state.singleSelect||null==(o=h.value)||o.setCurrentKey(t._id),e.state.navigational){const a=e.getNodeModel(t._nodeId);if(!(null==a?void 0:a.navAppViewId)){const a=P(t._id);e.onExpandChange(t,a)}}e.onTreeNodeClick(t,a),x=!0,setTimeout((()=>{x=!1}),200)}},onNodeDbClick:(t,a)=>{a.stopPropagation(),t._disableSelect||e.onDbTreeNodeClick(t)},onNodeContextmenu:async(t,a)=>{a.preventDefault(),a.stopPropagation();const n=e.getNodeModel(t._nodeId);if(!(null==n?void 0:n.decontextMenu))return;const o=e.contextMenus[n.decontextMenu.id];if(!o.model.detoolbarItems)return;await o.calcButtonState(t._deData||(t.srfkey?t:void 0),n.appDataEntityId);const s=o.state.buttonsState,i=O(o.model.detoolbarItems,t,a,s);i.length&&S.showContextMenu({x:a.x,y:a.y,customClass:p.b("context-menu"),items:i})},loadData:async(t,a)=>{let n;if(0===t.level)n=E.value,ibiz.log.debug("初始加载");else{const a=_c(t.data._uuid,e);a._children?(ibiz.log.debug("节点展开加载-本地",a),n=a._children):(ibiz.log.debug("节点展开加载-远程",a),n=await e.loadNodes(a))}ibiz.log.debug("给树返回值",n),a(D(n)),I()},renderContextMenu:(t,a)=>{var n,i;if(!(null==(i=null==(n=null==t?void 0:t.decontextMenu)?void 0:n.detoolbarItems)?void 0:i.length))return;const l=e.contextMenuInfos[t.id];return l.clickTBUIActionItem&&l.onlyOneActionItem?null:o(s("iBizContextMenuControl"),{modelData:t.decontextMenu,groupLevelKeys:[50,100],nodeModel:t,nodeData:a,context:e.context,onActionClick:(t,n)=>e.doUIAction(t.uiactionId,a,n,t.appId)},null)},renderCounter:e=>{if(e.counterId){const t=i[e.counterId];return bo(t)||1===e.counterMode&&0===t?null:o(s("iBizBadge"),{class:p.e("counter"),value:t},null)}},updateNodeExpand:(t,a)=>{const n=_c(t._uuid,e);if(!n)throw new bt(ibiz.i18n.t("control.common.noFoundNode",{id:t._uuid}));e.onExpandChange(n,a)},onInput:t=>{e.state.query=t,j()},allowDrop:(t,a,n)=>{const o=_c(t.data._uuid,e),s=_c(a.data._uuid,e);return e.calcAllowDrop(o,s,n)},allowDrag:t=>{const a=_c(t.data._uuid,e);return e.calcAllowDrag(a)},handleDrop:(t,a,n)=>{const o=Oc(n),s=_c(t.data._uuid,e),i=_c(a.data._uuid,e);e.onNodeDrop(s,i,o)},onNodeTextEditBlur:async()=>{if(w.value)if(f.value){const t=_c(w.value,e);await e.modifyNodeText(t,f.value),w.value=null,f.value=null}else w.value=null}}},render(){const e={searchbar:()=>this.c.enableQuickSearch?o(s("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(s("el-tree"),{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"},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},{default:({data:e})=>{var t,a;const n=this.findNodeData(e._uuid,this.c);if(!n)return null;const i=this.c.getNodeModel(n._nodeId);if(this.editingNodeKey===n._id)return o("div",{class:[this.ns.b("node"),null==(t=i.sysCss)?void 0:t.cssName]},[o(s("el-input"),{modelValue:this.editingNodeText,"onUpdate:modelValue":e=>this.editingNodeText=e,ref:"treeNodeTextInputRef",class:this.ns.b("editing-node"),onBlur:()=>{this.onNodeTextEditBlur()},onKeydown:e=>{e.stopPropagation(),"Enter"===e.code&&this.onNodeTextEditBlur()}},null)]);const l=_a(i);let r;return r=l?o(s("iBizControlShell"),{data:n,modelData:l,context:this.c.context,params:this.c.params},null):[n._icon?o(s("iBizIcon"),{class:this.ns.be("node","icon"),icon:n._icon},null):null,n._textHtml?o("span",{class:this.ns.be("node","label"),innerHTML:n._textHtml},null):o("span",{class:this.ns.be("node","label")},[n._text])],o("div",{onDblclick:e=>this.onNodeDbClick(n,e),onClick:e=>this.onNodeClick(n,e),onContextmenu:e=>this.onNodeContextmenu(n,e),class:[this.ns.b("node"),n._disableSelect?this.ns.bm("node","disabled"):"",null==(a=i.sysCss)?void 0:a.cssName]},[r,this.renderCounter(i),this.renderContextMenu(i,n)])}})},h(o(s("iBizControlBase"),{ref:"treeviewRef",controller:this.c},"function"==typeof(a=e)||"[object Object]"===Object.prototype.toString.call(a)&&!i(a)?e:{default:()=>[e]}),[[w("loading"),this.c.state.isLoading]]);var a}});var jc=Object.defineProperty,Ac=(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 Nc{constructor(){Ac(this,"component","IBizTreeControl")}}const Rc=e("Q",U(Bc,(function(e){e.component(Bc.name,Bc),Xt($t.TREEVIEW,(()=>new Nc))}))),Mc=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=F(((...e)=>new Oa(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return{c:e,ns:t,onCreated:t=>{e.setEmbedView(t.view)}}},render(){return o(s("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(s("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 Lc=Object.defineProperty,Vc=(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 Fc{constructor(){Vc(this,"component","IBizPickupViewPanelControl")}}const Uc=e("R",U(Mc,(function(e){e.component(Mc.name,Mc),Xt($t.PICKUP_VIEW_PANEL,(()=>new Fc))})));const qc=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=F(((...e)=>new Ba(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),n=(null==(e=t.view.model.tabLayout)?void 0:e.toLowerCase())||"top",o=Do();let s="";return t.routeDepth&&(s=oe(o,t.routeDepth)),c((()=>o.fullPath),((e,a)=>{if(e!==a){const e=t.routeDepth;if(e){if(oe(o,t.routeDepth)===s){const a=se(o),{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:n,handleTabChange:()=>{t.handleTabChange()}}},render(){let e;const{isCreated:t,tabPages:a}=this.c.state;return o(s("iBizControlBase"),{controller:this.c},{default:()=>{return[t&&o(s("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=>o(s("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(s("iBizIcon"),{icon:e.sysImage},null),this.c.isShowCaption&&e.caption])}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?e:{default:()=>[e]}))];var n}})}});var Gc=Object.defineProperty,Hc=(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 Wc{constructor(){Hc(this,"component","IBizTabExpPanelControl")}}const Kc=e("S",U(qc,(function(e){e.component(qc.name,qc),Xt($t.TAB_EXP_PANEL,(()=>new Wc))})));function Xc(e,t){const a=B("exp-bar"),n=jo((()=>{e.load()}),500),i=t=>{e.state.query=t,n()};return{renderTitle:()=>{const{model:n}=e;if(!n.showTitleBar)return null;let i=n.title;return n.titleLanguageRes&&(i=ibiz.i18n.t(n.titleLanguageRes.lanResTag,n.title)),o("div",{class:[t.b("caption"),a.b("caption")]},[n.sysImage&&o(s("iBizIcon"),{class:[a.be("caption","icon")],icon:n.sysImage},null),i&&o("span",{class:[t.be("caption","text")]},[i])])},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=s("IBizControlShell");return r(a,{modelData:d,...t})}return o(s("el-input"),{"model-value":e.state.query,class:[t.b("quick-search"),a.b("quick-search")],placeholder:e.state.placeHolder,onInput:i},{prefix:()=>o("ion-icon",{class:t.e("search-icon"),name:"search"},null)})}}}function $c(e){const t=e.view.modal.routeDepth;if(t){const a=Do();let n;ie((({currentKey:o,fullPath:s})=>{if(n){if(n===o){const n=se(a),{srfnav:o}=n.pathNodes[t-1];e.onRouterChange({srfnav:o||"",path:s})}}else n=o}),t)}}const Yc=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=F(((...e)=>new ja(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);$c(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(s("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(s("iBizControlBase"),{controller:this.c},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?n:{default:()=>[n]});var l}});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","IBizTreeExpBarControl")}}const ed=e("T",U(Yc,(function(e){e.component(Yc.name,Yc),Xt($t.TREE_EXP_BAR,(()=>new Zc))})));const td=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=F(((...e)=>new Aa(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);return $c(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(s("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(s("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?a:{default:()=>[a]});var n}});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","IBizListExpBarControl")}}const sd=e("U",U(td,(function(e){e.component(td.name,td),Xt($t.LIST_EXPBAR,(()=>new od))})));const id=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=F(((...e)=>new Aa(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);return $c(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(s("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(s("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?a:{default:()=>[a]});var n}});var ld=Object.defineProperty,rd=(e,t,a)=>(((e,t,a)=>{t in e?ld(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cd{constructor(){rd(this,"component","IBizGridExpBarControl")}}const dd=e("V",U(id,(function(e){e.component(id.name,id),Xt($t.GRID_EXPBAR,(()=>new cd))})));const ud=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=F(((...e)=>new Aa(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);return $c(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(s("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(s("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?a:{default:()=>[a]});var n}});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","IBizDataViewExpBarControl")}}const bd=e("W",U(ud,(function(e){e.component(ud.name,ud),Xt($t.DATA_VIEW_EXPBAR,(()=>new md))})));const vd=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=F(((...e)=>new Na(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);return $c(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(s("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(s("iBizControlBase"),{controller:this.c},"function"==typeof(l=n)||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?n:{default:()=>[n]});var l}});var wd=Object.defineProperty,gd=(e,t,a)=>(((e,t,a)=>{t in e?wd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class fd{constructor(){gd(this,"component","IBizCalendarExpBarControl")}}const yd=e("X",U(vd,(function(e){e.component(vd.name,vd),Xt($t.CALENDAR_EXPBAR,(()=>new fd))})));const Cd=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=F(((...e)=>new Ra(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),{renderTitle:a,renderSearchBar:n}=Xc(e,t);return $c(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(s("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:t,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return o(s("iBizControlBase"),{controller:this.c},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?a:{default:()=>[a]});var n}});var Id=Object.defineProperty,Pd=(e,t,a)=>(((e,t,a)=>{t in e?Id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Dd{constructor(){Pd(this,"component","IBizChartExpBarControl")}}const Ed=e("Y",U(Cd,(function(e){e.component(Cd.name,Cd),Xt($t.CHART_EXPBAR,(()=>new Dd))}))),kd=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=F(((...e)=>new Ma(...e)));t.setStorageKeyFn(le(t.context,"SEARCH_BAR_SELECTED_GROUP",t.view.modal.routeDepth));const a=B("control-".concat(t.model.controlType.toLowerCase()));let i=!1;const r=()=>{i=!0,t.onSearch()},c=l((()=>t.model.quickSearchWidth?a.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 d=n();let u;return{c:t,ns:a,cssVars:c,filterButtonRef:d,onClear:()=>{!0===i&&(i=!1,t.onSearch())},onSearch:r,onKeydown:e=>{"Enter"===e.code&&r()},onGroupClick:e=>{t.state.selectedGroupItem=e,r()},triggerFilter:()=>{u?u.dismiss():(async()=>{u=ibiz.overlay.createPopover((()=>o(s("iBizFilterTreeControl"),{filterControllers:t.filterControllers,filterNodes:t.state.filterNodes,parent:"search-bar",onConfirm:()=>{t.onSearch(),u&&u.dismiss()},onCancel:()=>{t.resetFilter()}},null)),void 0,{placement:"bottom-end",autoClose:!0}),u.present(d.value.$el),await u.onWillDismiss(),u=void 0})()},handleSave:()=>{t.handleSave()},renderAdvancedSearch:()=>t.state.advancedQuickSearch?o(s("iBizQuickSearchSelect"),{controller:t},null):null}},render(){return o(s("iBizControlBase"),{controller:this.c,class:[this.ns.b()],style:this.cssVars},{default:()=>{var e;return[this.c.model.enableGroup&&(this.c.isBackendSearchGroup?o(s("iBizSearchGroups"),{controller:this.c},null):o("div",{class:this.ns.b("quick-group")},[null==(e=this.c.model.searchBarGroups)?void 0:e.map((e=>{var t;return 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])}))])),this.c.model.enableGroup&&this.c.isBackendSearchGroup&&o(s("el-button"),{class:this.ns.b("save"),title:ht(ibiz.i18n.t("control.searchBar.saveGroup")),onClick:this.handleSave},{default:()=>[o("ion-icon",{name:"save-outline"},null)]}),this.c.model.enableQuickSearch&&o(s("el-input"),{modelValue:this.c.state.query,"onUpdate:modelValue":e=>this.c.state.query=e,class:this.ns.b("quick-search"),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(s("el-button"),{ref:"filterButtonRef",type:"primary",title:ht(ibiz.i18n.t("control.searchBar.filter")),class:this.ns.b("filter"),onClick:()=>this.triggerFilter()},{default:()=>[o(s("iBizIcon"),{icon:{cssClass:"funnel-outline"}},null)]})]}})}});var xd=Object.defineProperty,zd=(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 Sd{constructor(){zd(this,"component","IBizSearchBarControl")}}function Td(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const _d=[{valueOP:La.EQ,label:"等于(=)"},{valueOP:La.NOT_EQ,label:"不等于(<>)"},{valueOP:La.GT,label:"大于(>)"},{valueOP:La.GT_AND_EQ,label:"大于等于(>=)"},{valueOP:La.LT,label:"小于(<)"},{valueOP:La.LT_AND_EQ,label:"小于等于(<=)"},{valueOP:La.IS_NULL,label:"值为空(Nil)"},{valueOP:La.IS_NOT_NULL,label:"值不为空(NotNil)"},{valueOP:La.IN,label:"值在范围中(In)"},{valueOP:La.NOT_IN,label:"值不在范围中(NotIn)"},{valueOP:La.LIKE,label:"文本包含(%)"},{valueOP:La.LIFT_LIKE,label:"文本左包含(%#)"},{valueOP:La.RIGHT_LIKE,label:"文本右包含(#%)"},{valueOP:La.EXISTS,label:"存在(EXISTS)"},{valueOP:La.NOT_EXISTS,label:"不存在(NOTEXISTS)"}],Od=[La.IS_NULL,La.IS_NOT_NULL,La.EXISTS,La.NOT_EXISTS],Bd=a({name:"IBizFilterTreeControl",props:{filterControllers:{type:Array,required:!0},filterNodes:{type:Array,required:!0},parent:{type:String,required:!0}},emits:["confirm","cancel","change"],setup(e,{emit:t}){const a=B("filter-tree"),n=l((()=>"search-bar"===e.parent)),i=l((()=>e.filterNodes)),c=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))))},d=[];e.filterControllers.forEach((e=>{let t=d.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),d.push(t)),e.valueOP?t.valueOPs.push(e.valueOP):t.valueOPs=_d.map((e=>e.valueOP)))}));const u=(e,t,a=d)=>{const n=a.find((e=>e.name===t));n?(co(e),n.simpleFilterC?n.simpleFilterC.addSimpleFilterNode(e):(e.nodeType="FIELD",e.field=n.fieldName)):ibiz.log.error("allFields找不到属性标识为".concat(t,"的"))},p=e=>{e.children.push({nodeType:"FIELD",field:null,valueOP:null,value:null})},h=(e,t)=>{if(t.noEditor||e.valueOP&&Od.includes(e.valueOP))return null;let n=null;if(t.editorProvider){const{data:a,value:o}=t.calcEditorProps(e),i=s(t.editorProvider.formEditor);n=r(i,{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(s("not-supported-editor"),{modelData:t.model.editor},null);return o("div",{class:a.e("editor")},[n])},m=(e,t)=>{if(e.hidden)return;let n=d;t&&(n=t.allFields);const i=((e,t=d)=>{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=h(e,a)}else{const t=c(e);t&&!["EXISTS","NOTEXISTS"].includes(t.valueOP)&&(l=h(e,t))}return o("div",{class:a.b("item")},[o(s("el-select"),{disabled:e.disabled,"model-value":e.field,teleported:!1,class:a.e("field-select"),onChange:t=>{u(e,t,n)}},{default:()=>[null==n?void 0:n.map((e=>o(s("el-option"),{key:e.name,value:e.name,label:e.label},null)))]}),i&&i.length>0&&o(s("iBizFilterModeSelect"),{disabled:e.disabled,class:a.e("mode-select"),value:e.valueOP,modes:i,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 b=e=>o("div",null,null);const w=(e,t)=>{if(!e.hidden)return"ITEMS"===e.nodeType?b(e):o("div",{class:a.b("group")},[o("div",{class:a.be("group","actions")},[o(s("el-button"),{text:!0,type:"primary",onClick:()=>{(e=>{e.children.push({nodeType:"GROUP",logicType:"AND",children:[{nodeType:"FIELD",field:null,valueOP:null,value:null}]})})(e)}},{default:()=>[v("添加组")]}),o(s("el-button"),{text:!0,onClick:()=>{p(e)}},{default:()=>[v("添加项")]}),o(s("el-select"),{"model-value":e.logicType,teleported:!1,class:a.be("group","logic-type"),onChange:t=>{((e,t)=>{e.logicType=t})(e,t)}},{default:()=>[o(s("el-option"),{key:"AND",value:"AND",label:"AND"},null),o(s("el-option"),{key:"OR",value:"OR",label:"OR"},null)]})]),o("div",{class:a.be("group","list")},[e.children.length>0&&e.children.map(((n,i)=>{const l="FIELD"===n.nodeType?m(n,t):w(n,t);return l?o("div",{class:a.be("group","list-item")},[o("div",{class:a.be("group","list-item-left")},[e.logicType]),l,o(s("iBizIcon"),{class:a.be("group","list-item-right"),onClick:()=>{e.children.splice(i,1)},icon:{cssClass:"trash"}},null)]):null}))])])};b=e=>{let t;const n=c(e);if(e.simple){let t;const i=e.children[0];if(!i)return;return[o(s("el-select"),{"model-value":n.key,teleported:!1,class:a.e("field-select"),onChange:t=>{u(e,t)}},Td(t=d.map((e=>o(s("el-option"),{key:e.name,value:e.name,label:e.label},null))))?t:{default:()=>[t]}),o(s("iBizFilterModeSelect"),{disabled:!0,class:a.e("mode-select"),value:i.valueOP,modes:[i.valueOP]},null),h(i,n)]}return o("div",{class:(a.b("group"),a.bm("group","items"))},[o("div",{class:a.be("group","actions")},[m(e),o(s("el-button"),{text:!0,onClick:()=>{p(e)}},Td(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,i)=>{const l="FIELD"===t.nodeType?m(t,n):w(t,n);return o("div",{class:a.be("group","list-item")},[o("div",{class:a.be("group","list-item-left")},[v("AND")]),l,o(s("iBizIcon"),{class:a.be("group","list-item-right"),onClick:()=>{e.children.splice(i,1)},icon:{cssClass:"trash"}},null)])}))])])};return{ns:a,renderFilterGroup:w,renderFilterItem:m,onConfirm:()=>{t("confirm")},onCancel:()=>{t("cancel")},isInSearchBar:n,UiFilterNodes:i}},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))),o("div",{class:this.ns.b("footer")},[o(s("el-button"),{onClick:()=>{this.onConfirm()}},{default:()=>[this.isInSearchBar?ibiz.i18n.t("app.search"):ibiz.i18n.t("control.common.determine")]}),o(s("el-button"),{onClick:()=>{this.onCancel()}},Td(e=ibiz.i18n.t("app.reset"))?e:{default:()=>[e]})])])}});const jd=[{valueOP:La.EQ,label:"等于(=)"},{valueOP:La.NOT_EQ,label:"不等于(<>)"},{valueOP:La.GT,label:"大于(>)"},{valueOP:La.GT_AND_EQ,label:"大于等于(>=)"},{valueOP:La.LT,label:"小于(<)"},{valueOP:La.LT_AND_EQ,label:"小于等于(<=)"},{valueOP:La.IS_NULL,label:"值为空(Nil)"},{valueOP:La.IS_NOT_NULL,label:"值不为空(NotNil)"},{valueOP:La.IN,label:"值在范围中(In)"},{valueOP:La.NOT_IN,label:"值不在范围中(NotIn)"},{valueOP:La.LIKE,label:"文本包含(%)"},{valueOP:La.LIFT_LIKE,label:"文本左包含(%#)"},{valueOP:La.RIGHT_LIKE,label:"文本右包含(#%)"},{valueOP:La.EXISTS,label:"存在(EXISTS)"},{valueOP:La.NOT_EXISTS,label:"不存在(NOTEXISTS)"}],Ad=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)?jd.filter((t=>e.modes.includes(t.valueOP))):jd})),onChange:e=>{t("change",e)}}),render(){let e;return o(s("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(s("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null))))||"[object Object]"===Object.prototype.toString.call(t)&&!i(t)?e:{default:()=>[e]});var t}});function Nd(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Rd=a({name:"IBizSearchGroups",components:{draggable:Po},props:{controller:{type:Object,required:!0}},setup(e){const t=B("search-groups"),a=e.controller,s=n(!1),{newDialogVisible:i,newForm:r,newFormRef:c,newFormRules:d,handleNewFormSubmit:u,handleNewFormCancel:p}=function(e){const t=n(!1),a=g({caption:""}),o=n(),s=g({caption:[{required:!0,message:ibiz.i18n.t("control.searchBar.searchGroups.groupValueRule"),trigger:"blur"}]}),i=()=>{o.value&&o.value.resetFields(),t.value=!1};return{newDialogVisible:t,newForm:a,newFormRef:o,newFormRules:s,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),i(),await e.initSearBarGroups(),ibiz.message.success("".concat(ibiz.i18n.t("control.common.newSuccCreated"),"!"))}}))},handleNewFormCancel:i}}(a),{editDialogVisible:h,editForm:m,editFormRef:b,editFormRules:v,handleEditFormSubmit:w,handleEditFormCancel:f}=function(e){const t=n(!1),a=g({caption:""}),o=n(),s=g({caption:[{required:!0,message:ibiz.i18n.t("control.searchBar.searchGroups.groupValueRule"),trigger:"blur"}]});return{editDialogVisible:t,editForm:a,editFormRef:o,editFormRules:s,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))),P=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:i,editDialogVisible:h,manageDialogVisible:s,newGroup:()=>{i.value=!0},manageGroup:()=>{s.value=!0},newForm:r,newFormRef:c,newFormRules:d,handleNewFormSubmit:u,handleNewFormCancel:p,editForm:m,editFormRef:b,editFormRules:v,handleEditFormSubmit:w,handleEditFormCancel:f,editGroup:e=>{h.value=!0,a.currentEditGroup=e,m.caption=e.caption||e.name},removeGroup:e=>{$o({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:P,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),s=Math.max(t,n)+1,i=a.state.searchBarGroups.slice(o,s);if(i.length>0){const e=async()=>{await a.service.updateBatch(i)},t=i.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=i.find((t=>t.name===e.name));t&&It(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 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])})),o(s("el-dropdown"),{"popper-class":this.ns.b("dropdown")},{default:()=>o("div",{class:[this.ns.b("more"),this.ns.is("selected",this.isActiveMore)]},[this.c.model.groupMoreText||ibiz.i18n.t("app.more"),o("ion-icon",{name:"chevron-down-outline"},null)]),dropdown:()=>o(s("el-dropdown-menu"),null,{default:()=>[this.hiddenGroups.map((e=>o(s("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(s("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(s("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(s("el-dialog"),{modelValue:this.newDialogVisible,"onUpdate:modelValue":e=>this.newDialogVisible=e,title:ht(ibiz.i18n.t("control.searchBar.searchGroups.newGroup")),"modal-class":this.ns.b("new-dialog")},{default:()=>o(s("el-form"),{ref:"newFormRef",model:this.newForm,"label-position":"top",rules:this.newFormRules},{default:()=>[o(s("el-form-item"),{label:ibiz.i18n.t("control.searchBar.searchGroups.groupName"),prop:"caption"},{default:()=>[o(s("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(s("el-button"),{class:this.ns.b("cancel-btn"),onClick:this.handleNewFormCancel},Nd(e=ibiz.i18n.t("control.searchBar.searchGroups.dialogCancel"))?e:{default:()=>[e]}),o(s("el-button"),{type:"primary",onClick:this.handleNewFormSubmit},Nd(t=ibiz.i18n.t("control.searchBar.searchGroups.dialogDetermine"))?t:{default:()=>[t]})])}}),o(s("el-dialog"),{modelValue:this.editDialogVisible,"onUpdate:modelValue":e=>this.editDialogVisible=e,title:ht(ibiz.i18n.t("control.searchBar.searchGroups.editGroup")),"modal-class":this.ns.b("edit-dialog")},{default:()=>o(s("el-form"),{ref:"editFormRef",model:this.editForm,"label-position":"top",rules:this.editFormRules},{default:()=>[o(s("el-form-item"),{label:ibiz.i18n.t("control.searchBar.searchGroups.groupName"),prop:"caption"},{default:()=>[o(s("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(s("el-button"),{class:this.ns.b("cancel-btn"),onClick:this.handleEditFormCancel},Nd(e=ibiz.i18n.t("control.searchBar.searchGroups.dialogCancel"))?e:{default:()=>[e]}),o(s("el-button"),{type:"primary",onClick:this.handleEditFormSubmit},Nd(t=ibiz.i18n.t("control.searchBar.searchGroups.dialogDetermine"))?t:{default:()=>[t]})])}}),o(s("el-dialog"),{modelValue:this.manageDialogVisible,"onUpdate:modelValue":e=>this.manageDialogVisible=e,title:ht(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(s("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(Po,{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(s("el-switch"),{modelValue:e.show,"onUpdate:modelValue":t=>e.show=t},null)]),o("div",{class:this.ns.b("action")},[o(s("el-link"),{type:"primary",disabled:!e.saved||e.noEdit,title:ht(this.editLinkTitle(e)),onClick:()=>this.editGroup(e)},Nd(t=ibiz.i18n.t("app.edit"))?t:{default:()=>[t]}),o(s("el-link"),{type:"danger",disabled:!e.saved,title:ht(e.saved?"":ibiz.i18n.t("control.searchBar.searchGroups.savePrompt")),onClick:()=>this.removeGroup(e)},Nd(a=ibiz.i18n.t("app.delete"))?a:{default:()=>[a]})])])}})])])]})])}});const Md=a({name:"IBizQuickSearchSelect",props:{controller:{type:Ma,required:!0}},setup:e=>({ns:B("quick-search-select"),onItemClick:t=>{const a=t.fieldName,{quickSearchFieldNames:n}=e.controller.state,o=n.indexOf(a);-1===o?n.push(a):n.splice(o,1),e.controller.calcQuickSearchPlaceHolder()}}),render(){const{state:e}=this.controller;return o(s("el-dropdown"),{onCommand:this.onItemClick,trigger:"click","hide-on-click":!1,class:[this.ns.b()],"popper-class":[this.ns.b("popover")]},{default:()=>o("div",{class:this.ns.e("icon")},[o("ion-icon",{name:"settings-outline"},null)]),dropdown:()=>{let t;return o(s("el-dropdown-menu"),null,"function"==typeof(a=t=e.quickSearchItems.map((t=>{const a=e.quickSearchFieldNames.includes(t.fieldName);return o(s("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)&&!i(a)?t:{default:()=>[t]});var a}})}}),Ld=e("Z",U(kd,(function(e){e.component(kd.name,kd),e.component(Bd.name,Bd),e.component(Ad.name,Ad),e.component(Rd.name,Rd),e.component(Md.name,Md),Xt($t.SEARCHBAR,(()=>new Sd))})));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","IBizChartControl")}}const qd=e("_",{install(e){e.component("IBizChartControl",I({loader:()=>t.import("./chart-4KHwhatb.js"),loadingComponent:re,delay:0})),Xt($t.CHART,(()=>new Ud))}});const Gd=a({name:"IBizWizardPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=F(((...e)=>new Va(...e))),t=B("control-".concat(e.model.controlType.toLowerCase()));return{c:e,ns:t}},render(){var e,t,a,n,l;const{activeFormTag:c,buttonsState:d}=this.c.state;let u=null,p=null,h=null;if(c&&this.c.activeWizardForm){if(this.c.providers[c]){const t=s(this.c.providers[c].component),a=null==(e=this.c.model.deeditForms)?void 0:e.find((e=>{var t;return c===(null==(t=e.dewizardForm)?void 0:t.formTag)}));p=r(t,{class:this.ns.e("form"),modelData:a,context:this.c.context,params:this.c.params,key:c,onMounted:e=>this.c.onFormMounted(c,e),onSaveSuccess:e=>this.c.onFormSaved(e)})}const{dewizard:b}=this.c.model;h=b&&o("div",{key:"".concat(c,"footer"),class:this.ns.b("footer")},[(null==(t=d["".concat(c,"@PREV")])?void 0:t.visible)&&o(s("el-button"),{onClick:()=>{this.c.onPrevClick()}},{default:()=>[b.prevCaption?b.prevCaption:ibiz.i18n.t("control.common.retreat")]}),(null==(a=d["".concat(c,"@NEXT")])?void 0:a.visible)&&o(s("el-button"),{onClick:()=>{this.c.onNextClick()}},{default:()=>[b.nextCaption?b.nextCaption:ibiz.i18n.t("control.common.forward")]}),(null==(n=d["".concat(c,"@FINISH")])?void 0:n.visible)&&o(s("el-button"),{onClick:()=>{this.c.onFinishClick()}},{default:()=>[b.finishCaption?b.finishCaption:ibiz.i18n.t("app.complete")]})]);const{dewizardSteps:v}=b;if(this.c.model.showStepBar&&v&&v.length>0){let e;const t=this.c.steps.indexOf(this.c.stepTags["".concat(this.c.model.name,"_form_").concat(null==(l=this.c.state.activeFormTag)?void 0:l.toLowerCase())])+1;u=o(s("el-steps"),{class:this.ns.b("header"),"align-center":!0,"finish-status":"success",active:t},"function"==typeof(m=e=v.map((e=>o(s("el-step"),{title:ht(e.title)},null))))||"[object Object]"===Object.prototype.toString.call(m)&&!i(m)?e:{default:()=>[e]})}}var m;return o(s("iBizControlBase"),{controller:this.c,class:[this.ns.b(),this.ns.is("header",this.c.model.showStepBar)]},{default:()=>[u,p,h]})}});var Hd=Object.defineProperty,Wd=(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 Kd{constructor(){Wd(this,"component","IBizWizardPanelControl")}}const Xd=e("$",U(Gd,(function(e){e.component(Gd.name,Gd),Xt($t.WIZARD_PANEL,(()=>new Kd))})));var $d=Object.defineProperty,Yd=(e,t,a)=>(((e,t,a)=>{t in e?$d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Jd extends Fa{constructor(){super(...arguments),Yd(this,"counter"),Yd(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!==oa.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.hideEditItem=!!this.model.hideEditItem}async onCreated(){await super.onCreated(),this.initDRBarItems(),await this.initCounter()}calcItemStateByCounter(e,t=!0){if(this.state.drBarItems.forEach((e=>{var t;if(null==(t=e.children)?void 0:t.length)e.children.forEach((e=>{const t=Ua(e,this.counter);void 0!==t&&(e.visible=t)})),e.visible=e.children.some((e=>e.visible));else{const t=Ua(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 qa(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.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(){const{dedrctrlItems:e,dedrbarGroups:t}=this.model,a=[];if(!this.state.hideEditItem){const{editItemCaption:e,editItemCapLanguageRes:t,editItemSysImage:n,uniqueTag:o}=this.model;let s=e;t&&(s=ibiz.i18n.t(t.lanResTag,e)),a.push({tag:o,caption:s,disabled:!1,sysImage:n,fullPath:this.router.currentRoute.value.fullPath}),this.state.defaultItem=o}const n=e=>{let t=e.caption;e.capLanguageRes&&(t=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption));const{enableMode:a,testAppDELogicId:n,testScriptCode:o,counterMode:s}=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:s}};t&&e&&(1===t.length?e.forEach((e=>{a.push(n(e))})):t.forEach((t=>{var o;const s=e.filter((e=>e.dedrbarGroupId===t.id));if(s.length>1||"true"===(null==(o=this.controlParams)?void 0:o.singleitemgroup)&&1===s.length){let e=t.caption;t.capLanguageRes&&(e=ibiz.i18n.t(t.capLanguageRes.lanResTag,t.caption)),a.push({tag:t.id,caption:e,sysImage:t.sysImage,visible:!1,children:s.map((e=>n(e)))})}else 1===s.length&&a.push(n(s[0]))}))),this.state.drBarItems=a}handleSelectChange(e=this.state.defaultItem,t=!1){var a;if(this.state.selectedItem===e)return;const n=null==(a=this.model.dedrctrlItems)?void 0:a.find((t=>t.id===e));n?(this.setVisible("navPos"),this.openNavPosView(n,t)):(this.setVisible("form"),this.routeDepth&&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:s,resultParams:i}=Ga(n,o);return{context:Object.assign(this.context.clone(),s),params:{...this.params,...i}}}async openNavPosView(e,t=!1){var a;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&&Ha(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 Wa.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())}}e("a1",Jd);const Qd=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=F(((...e)=>new Jd(...e))),a=B("control-".concat(t.model.controlType.toLowerCase())),n=Eo(),i=g({}),l=e=>{Object.assign(i,e)};t.evt.on("onCreated",(()=>{t.counter&&t.counter.onChange(l,!0)})),C((()=>{var e;null==(e=t.counter)||e.offChange(l)})),t.setRouter(n);const r=Do();let d="";const u=[];c((()=>t.state.isCreated),((a,n)=>{if("horizontal"!==e.showMode){const{drBarItems:e}=t.state;e.forEach((e=>{u.push(e.tag)}))}})),t.routeDepth&&(d=oe(r,t.routeDepth)),c((()=>r.fullPath),((e,a)=>{if(e!==a){const e=t.routeDepth;if(e){if(oe(r,t.routeDepth)===d){const a=se(r),{srfnav:n}=a.pathNodes[e-1];t.handleSelectChange(n)}}}}),{immediate:!0});const p=n=>{if(n.visible){if(n.children){let i="";if("horizontal"===e.showMode&&n.tag!==t.state.selectedItem){const e=n.children.find((e=>e.tag===t.state.selectedItem));e&&(i="-".concat(e.caption))}return o(s("el-sub-menu"),{class:a.b("group"),index:n.tag,disabled:n.disabled},{default:()=>n.children.map((e=>p(e))),title:()=>[o(s("iBizIcon"),{class:a.e("icon"),icon:n.sysImage},null),o("span",null,[n.caption,i])]})}return o(s("el-menu-item"),{class:a.e("item"),index:n.tag,disabled:n.disabled},{default:()=>[o(s("iBizIcon"),{class:a.e("icon"),icon:n.sysImage},null),o("span",null,[n.caption]),n.counterId&&null!=i[n.counterId]&&o(s("iBizBadge"),{class:a.e("counter"),value:i[n.counterId],counterMode:n.counterMode},null)]})}};return{c:t,ns:a,handleSelect:e=>{t.handleSelectChange(e)},renderMenuItems:p,opens:u}},render(){let e;const{isCreated:t,drBarItems:a,selectedItem:n,isCalculatedPermission:l}=this.c.state;return o(s("iBizControlBase"),{controller:this.c,class:this.ns.b()},{default:()=>{return[t&&l&&o(s("el-menu"),{class:this.ns.e("menu"),mode:this.showMode,"default-active":n,onSelect:this.handleSelect,"default-openeds":this.opens},(r=e=a.map((e=>this.renderMenuItems(e))),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!i(r)?e:{default:()=>[e]}))];var r}})}});var Zd=Object.defineProperty,eu=(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 tu{constructor(){eu(this,"component","IBizDrBarControl")}}const au=e("a0",U(Qd,(function(e){e.component(Qd.name,Qd),Xt($t.DRBAR,(()=>new tu))})));var nu=Object.defineProperty,ou=(e,t,a)=>(((e,t,a)=>{t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class su extends Fa{constructor(){super(...arguments),ou(this,"counter"),ou(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}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}async onCreated(){await super.onCreated(),await this.initCounter()}handleControlParams(){super.handleControlParams(),this.controlParams.showmore&&(this.state.showMore="true"===this.controlParams.showmore)}calcItemStateByCounter(){if(this.state.drTabPages.forEach((e=>{const t=Ua(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 qa(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.form.evt.on("onLoadDraftSuccess",(()=>{this.handleFormChange()})),this.form.evt.on("onSaveSuccess",(()=>{this.handleFormChange()}))),this.initDRTabPages(),this.form||await this.calcDrTabPagesState()}handleFormChange(){const e=this.getData()[0].srfuf!==oa.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,hideEditItem:a,editItemSysImage:n,uniqueTag:o,dedrtabPages:s}=this.model,i=[];let l=e;t&&(l=ibiz.i18n.t(t.lanResTag,e)),a?this.state.defaultName=(null==s?void 0:s[0].id)||"":(i.push({tag:o,caption:l,hidden:!!a,disabled:!1,sysImage:n,fullPath:this.routeDepth?oe(this.router.currentRoute.value,this.routeDepth):""}),this.state.defaultName=""),null==s||s.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.view.state.srfnav?this.state.activeName=this.view.state.srfnav:this.state.activeName=i[0].tag;const r=!!this.routeDepth&&Ha(this.routeDepth);this.handleTabChange(r)}handleTabChange(e=!1){var t;const{activeName:a}=this.state,n=null==(t=this.model.dedrtabPages)?void 0:t.find((e=>e.id===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;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:s,resultParams:i}=Ga(n,o);return{context:Object.assign(this.context.clone(),s,{currentSrfNav:e.id}),params:{...this.params,...i}}}async openNavPosView(e,t=!1){var a;const{context:n,params:o}=this.prepareParams(e);null==(a=this.navPos)||a.openView({key:e.id,context:n,params:o,viewId:e.appViewId,isRoutePushed:t})}async initCounter(){const{appCounterRefs:e}=this.model,t=null==e?void 0:e[0];t&&(this.counter=await Wa.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())}}e("a3",su);const iu="ibiz";function lu(e,t,a){let o=null,s=0;const i=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 i.value=n,void(l.value=[]);const s=t.value.$el.offsetWidth;let c=0;i.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(iu,"-font-size-regular)");if(null!=o&&(o||0===o)&&!(1===e.counterMode&&o<=0)){const e={marginLeft:"var(--".concat(iu,"-spacing-tight)"),minWidth:"20px",fontSize:d},t=r(String(o),e);c+=t}const u={padding:"0 var(--".concat(iu,0===t?"-spacing-base) 0 0":"-spacing-base)"),fontSize:d},p=r(n,u);c+=p;const h={padding:"0 0 0 var(--".concat(iu,"-spacing-base)"),fontSize:d},m=r("".concat(ibiz.i18n.t("app.more")," ^"),h);c+m>s?l.value.push(e):i.value.push(e)}}))}c((()=>e.state.drTabPages),(()=>{d()}),{deep:!0});const u=P((()=>{t.value&&(()=>{if(window.ResizeObserver){const e=t.value.$el;e&&(o=new ResizeObserver((e=>{const t=e[0].contentRect.width;t!==s&&(d(),s=t)})),o.observe(e))}})()}));return C((()=>{o&&o.disconnect(),u()})),{visibleItems:i,moreItems:l}}const ru=a({name:"IBizDrTabControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=F(((...e)=>new su(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=Eo(),o=n(),s=g({}),{visibleItems:i,moreItems:l}=lu(e,o,s),r=e=>{Object.assign(s,e)};e.evt.on("onCreated",(()=>{e.counter&&e.counter.onChange(r,!0)})),C((()=>{var t;null==(t=e.counter)||t.offChange(r)})),e.setRouter(a);const d=Do();let u="";return e.routeDepth&&(u=oe(d,e.routeDepth)),c((()=>d.fullPath),((t,a)=>{if(t!==a){const t=e.routeDepth;if(t){if(oe(d,e.routeDepth)===u){const a=se(d),{srfnav:n}=a.pathNodes[t-1],o=!!e.routeDepth&&Ha(e.routeDepth);if(n&&e.state.activeName&&e.state.activeName!==n)e.state.activeName=n,e.handleTabChange(o);else if(!n){const t=!!e.routeDepth&&!Ha(e.routeDepth);(e.state.activeName!==e.state.defaultName||t)&&(e.state.activeName=e.state.defaultName,e.handleTabChange(o))}}}}}),{immediate:!0}),{c:e,ns:t,controlRef:o,counterData:s,visibleItems:i,moreItems:l,handleTabChange:()=>{e.handleTabChange()},handleMoreChange:t=>{e.state.activeName=t,e.handleTabChange()}}},render(){const{isCreated:e,isCalculatedPermission:t}=this.c.state,a=this.moreItems.find((e=>e.tag===this.c.state.activeName))||{},n=o(s("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"),v(" ")]),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(s("el-dropdown-menu"),null,{default:()=>this.moreItems.map((e=>o(s("el-dropdown-item"),{class:[this.c.state.activeName===e.tag?this.ns.be("more-dropdown-popper","active"):""],onClick:()=>this.handleMoreChange(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:ht(e.caption||"")},[e.caption||""]),e.counterId&&null!=this.counterData[e.counterId]&&o(s("iBizBadge"),{class:this.ns.bem("more-dropdown-popper","label","counter"),value:this.counterData[e.counterId],counterMode:e.counterMode},null)])]})))})});return o(s("iBizControlBase"),{ref:"controlRef",controller:this.c,class:[this.ns.b(),this.moreItems.length>0?this.ns.b("more"):""]},{default:()=>[e&&t&&o(s("el-tabs"),{modelValue:this.c.state.activeName,"onUpdate:modelValue":e=>this.c.state.activeName=e,onTabChange:this.handleTabChange},{default:()=>[this.visibleItems.map((e=>{const t=e.counterId?this.counterData[e.counterId]:void 0;return e.hidden?null:o(s("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")},[o("span",{class:this.ns.be("label","text")},[e.caption]),!bo(t)&&o(s("iBizBadge"),{class:this.ns.e("counter"),value:t,counterMode:e.counterMode},null)])})})),this.moreItems.length>0&&o(s("el-tab-pane"),{label:"",name:a.tag},{label:()=>n})]})]})}});var cu=Object.defineProperty,du=(e,t,a)=>(((e,t,a)=>{t in e?cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uu{constructor(){du(this,"component","IBizDrTabControl")}}const pu=e("a2",U(ru,(function(e){e.component(ru.name,ru),Xt($t.DRTAB,(()=>new uu))})));function hu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}function mu(e,t,a){const n=t.providers[e.id],i={modelData:e,controller:t.portlets[e.id]};if(!n)return o("div",null,[e.portletType,ibiz.i18n.t("app.noSupport")]);const l=s(n.component);if("CONTAINER"===e.portletType){const a=e;return r(l,{...i,key:e.id},{default:()=>{var e;return null==(e=a.controls)?void 0:e.map((e=>mu(e,t)))}})}return r(l,{...i,key:e.id})}const bu=a({name:"IBizDashboardControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=F(((...e)=>new Ka(...e))),t=f().proxy,a=n([]),o=B("control-".concat(e.model.controlType.toLowerCase()));e.evt.on("onCreated",(()=>{Object.values(e.portlets).forEach((e=>{e.state=g(e.state)}))}));return{c:e,ns:o,customModelDatas:a,handleCustomModelChange:e=>{a.value=e.model,t.$forceUpdate()}}},render(){let e;const{state:t,model:a}=this.c,n=()=>o(s("iBizRow"),{class:[this.ns.b()],layout:a.layout},{default:()=>{var e;return[null==(e=a.controls)?void 0:e.map((e=>{var t;let a;return o(s("iBizCol"),{layoutPos:e.layoutPos,state:null==(t=this.c.portlets[e.id])?void 0:t.state},hu(a=mu(e,this.c))?a:{default:()=>[a]})}))]}}),i=()=>{const e={default:()=>n()};return this.customModelDatas.forEach((t=>{e[t.codeName]=()=>mu(t,this.c)})),e};return o(s("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[t.isCreated&&(a.enableCustomized?o(s("iBizCustomDashboardContainer"),{modelData:this.modelData,dashboard:this.c,onChanged:this.handleCustomModelChange},hu(e=i())?e:{default:()=>[e]}):n())]})}});function vu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const wu=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,s=e.customDashboard,i=n([]),r=n([]),d=n([]),u=n(""),p=n(mo(s.customModelData)),h=n(mo(s.portletConfig)),m=n({}),b=n({}),v=n(null),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},g=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||"未分类",appCodeName:a.model.pkgcodeName,appName:a.model.name};t.push(n)}))}else if(a.model.appPortletCats&&a.model.appPortlets){const n=s.model.appDataEntityId,o=e.dashboard.controlParams.categorytag;a.model.appPortlets.forEach((e=>{var s;if(!n&&!e.enableAppDashboard)return;if(n&&!e.enableDEDashboard)return;const i=null==(s=a.model.appPortletCats)?void 0:s.find((t=>{var a;return t.codeName===(null==(a=e.appPortletCat)?void 0:a.codeName)}));if(o&&(!i||i.codeName!==o))return;const l={type:"app",portletCodeName:e.codeName,portletName:e.name,portletImage:e.control.sysImage,groupCodeName:(null==i?void 0:i.codeName)||"",groupName:(null==i?void 0:i.name)||"",appCodeName:e.appDataEntityId||a.model.pkgcodeName,appName:a.model.name};t.push(l)}))}const n=(e=>{const t=[];return e.forEach((e=>{var a;Object.is(e.type,"app")&&t.push(e);const n=(null==(a=s.model)?void 0:a.appDataEntityId)||"app";Object.is(e.appCodeName,n)&&t.push(e)})),t})(t);i.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)},f=l((()=>{let e=[];return u.value?e=[u.value]:d.value.forEach(((t,a)=>{e.push(t.value+a)})),e})),y=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}},I=async e=>{if(e.dynamodelFlag){if(e.portletModel)return e.portletModel;return await o.loadDynaPortletById(e.portletId)}return y(e.portletCodeName)},P=async t=>{const a=await(async e=>{const t=[];if(e.length>0)for(let a=0;a<e.length;a++){const n=await I(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 Xa(t);if(a){m.value[t.id]=a;const n=await a.createController(t,e.dashboard);b.value[t.id]=n}})))})(a),await(async()=>{const e=h.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){await g();const e=await s.loadCustomModelData(),t=mo(e.model),a=await P(t);p.value=t,p.value.forEach(((e,t)=>{e.dynamodelFlag&&(e.portletModel=a[t])})),h.value=mo(e.config)}}),{immediate:!0});const D=n(0),E=l((()=>"calc((100% - 10px) / ".concat(s.layoutColNum,") ").concat(s.layoutRowH+10,"px")));return C((async()=>{const e=Object.values(b.value);await Promise.all(e.map((async e=>{await e.destroyed()})))})),{ns:a,customC:s,portlets:i,list:r,groups:d,filterVal:u,defaultOpens:f,layoutModel:p,onReset:async()=>{const e=await s.resetCustomModelData();p.value=e.model,h.value=e.config,t("reset")},onSave:async()=>{const e=await s.saveCustomModelData(p.value);t("saved",{model:e.model,config:e.config})},removeItem:async e=>{const t=p.value.indexOf(e);if(-1!==t){p.value.splice(t,1);const a=await I(e);if(a){const e=b.value[a.id];await e.destroyed()}}},addLayoutItem:async e=>{const t=await P([e]),a=v.value;a&&(D.value=a.scrollHeight+3*s.layoutRowH);let n=0;for(const e of p.value)e.y>n&&(n=e.y);const o={w:4,h:3,x:0,y:n+3,i:e.portletCodeName,...e};if(e.dynamodelFlag&&Object.assign(o,{portletModel:t[0]}),p.value.push(o),a){const e=setInterval((()=>{a.scrollHeight>=D.value&&(a.scrollTo({top:a.scrollHeight,behavior:"smooth"}),clearInterval(e))}),50)}},handleColNumberChange:e=>{s.layoutColNum=e},handleRolHChange:e=>{s.layoutRowH=e},isDisabled:e=>!!p.value.find((t=>t.i===e.portletCodeName)),providers:m,portletControllers:b,maskSize:E,designPanel:v,getPortletModelByCodeName:y}},render(){let e,t,a,n;const i=e=>o(s("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:ht(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={modelData:t,controller:this.portletControllers[t.id]};if(!a)return o("div",null,[t.portletType,ibiz.i18n.t("app.noSupport")]);const i=s(a.component);return r(i,{...n,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"),v(":"),o(s("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"),v(":"),o(s("el-input-number"),{modelValue:this.customC.layoutRowH,"onUpdate:modelValue":e=>this.customC.layoutRowH=e,onChange:this.handleRolHChange},null)]),o(s("el-button"),{class:this.ns.be("header-utils","reset"),onClick:this.onReset},vu(e=ibiz.i18n.t("control.dashboard.dashboardDesign.restoreDefault"))?e:{default:()=>[e]}),o(s("el-button"),{class:this.ns.be("header-utils","save"),onClick:this.onSave},vu(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(s("el-select"),{modelValue:this.filterVal,"onUpdate:modelValue":e=>this.filterVal=e,clearable:!0,class:this.ns.b("tree-filter")},vu(a=this.groups.map((e=>o(s("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(s("el-menu"),{"default-openeds":this.defaultOpens,class:this.ns.is("filter",!0),key:this.filterVal},vu(e=this.groups.map((e=>e.value===this.filterVal?o(s("el-sub-menu"),{key:e.value,index:e.value},{title:()=>e.name,default:()=>e.children.map((e=>i(e)))}):null)))?e:{default:()=>[e]}):o(s("el-menu"),{class:this.ns.is("no-filter",!0),"default-openeds":this.defaultOpens,key:"default"},vu(t=this.groups.map(((e,t)=>o(s("el-sub-menu"),{key:e.value+t,index:e.value+t},{title:()=>e.name,default:()=>e.children.map((e=>i(e)))}))))?t:{default:()=>[t]})})()])]),o("div",{class:this.ns.b("scroll-box"),ref:"designPanel"},[o("div",{class:this.ns.b("panel")},[o("div",{class:this.ns.b("grid-layout-mask"),style:{backgroundSize:this.maskSize}},null),o(s("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%"}},vu(n=this.layoutModel.map((e=>o(s("grid-item"),{x:e.x,y:e.y,w:e.w,h:e.h,i:e.i,key:e.i},{default:()=>[o(s("el-card"),{class:this.ns.b("grid-layout-item")},{default:()=>[o("div",{class:this.ns.b("grid-layout-item-header")},[o("span",null,[e.portletName]),o("ion-icon",{name:"close-outline",onClick:()=>this.removeItem(e)},null)]),o("div",{class:this.ns.b("grid-layout-item-content")},[l(e)])]})]}))))?n:{default:()=>[n]})])])])])}}),gu=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=g(new $a(e.modelData,e.dashboard)),s=n(!1),i=n(!1),r=n(!1),c=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)},p=async e=>{const t=[];if(e.length>0)for(let a=0;a<e.length;a++){const n=await c(e[a]);n&&t.push(n)}return t},h=async t=>{await e.dashboard.initPortlets(t.model),await e.dashboard.initPortletsConfig(t.config)},m=l((()=>0===o.customModelData.length));return d((async()=>{const a=await o.loadCustomModelData(),n=await p(a.model);t("changed",{model:n}),await h({model:n,config:a.config}),s.value=!0,e.dashboard.evt.on("onConfigChange",(async e=>{const{name:t,config:a}=e;o.saveCustomModelData(o.customModelData,{[t]:a})}))})),{ns:a,customC:o,isShowDesign:i,isInited:s,isShowDefault:m,showTypeDir:r,openDesign:()=>{i.value=!0},onSaved:async a=>{i.value=!1;const n=await p(a.model);await h({model:n,config:a.config}),await e.dashboard.evt.emit("onSavePortlet",void 0),t("changed",{model:n})},onReset:async()=>{s.value=!1,i.value=!1,await e.dashboard.resetPortlets(),await u(),s.value=!0},clickCollapse:e=>{r.value="left"===e}}},render(){var e,t;return o("div",{class:[this.ns.b()]},[this.customC.showDesignBtn?o("div",{class:this.ns.b("build-btn")},[this.showTypeDir?o("div",null,[o(s("el-button"),{class:this.ns.b("deisgn-btn"),title:ht(ibiz.i18n.t("control.dashboard.customDashboardContainer.portalCustomPrompt")),onClick:this.openDesign},{default:()=>[o("ion-icon",{name:"build-outline"},null)]}),o(s("el-button"),{class:this.ns.b("forward-btn"),onClick:()=>this.clickCollapse("right")},{default:()=>[o("ion-icon",{name:"chevron-forward-outline"},null)]})]):o(s("el-button"),{class:this.ns.b("back-btn"),onClick:()=>this.clickCollapse("left")},{default:()=>[o("ion-icon",{name:"chevron-back-outline"},null)]})]):null,o(s("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(s("iBizDashboardDesign"),{dashboard:this.dashboard,"custom-dashboard":this.customC,"is-show-design":this.isShowDesign,onSaved:this.onSaved,onReset:this.onReset},null)]}),this.isInited&&(this.isShowDefault?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)])})))])}});var fu=Object.defineProperty,yu=(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 Cu{constructor(){yu(this,"component","IBizDashboardControl")}}function Iu(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Pu=e("a6",a({name:"IBizContainerPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Ya,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))||[],i=o(s("iBizRow"),{layout:this.modelData.layout},Iu(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},Iu(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]}),l=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return o(s("iBizPortletLayout"),{controller:this.controller,class:l},Iu(i)?i:{default:()=>[i]})}}));var Du=Object.defineProperty,Eu=(e,t,a)=>(((e,t,a)=>{t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ku{constructor(){Eu(this,"component","IBizContainerPortlet")}async createController(e,t,a){const n=new Ya(e,t,a);return await n.init(),n}}const xu=e("a5",U(Pu,(function(e){e.component(Pu.name,Pu),Ja("CONTAINER",(()=>new ku))}))),zu=e("a7",a({name:"IBizPortletLayout",props:{controller:{type:Qa,required:!0}},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,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})),i=l((()=>o.model.showTitleBar&&(o.model.title||o.model.sysImage)||o.model.uiactionGroup));return{c:o,ns:a,popperClass:s,portletType:n,isShowHeader:i,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.isShowHeader&&o("div",{key:"header",class:this.ns.b("header")},[o("div",{class:this.ns.be("header","left")},[a.showTitleBar&&o("div",{class:this.ns.e("caption")},[o(s("iBizIcon"),{class:this.ns.e("caption-icon"),icon:a.sysImage},null),o("span",{class:this.ns.e("caption-text"),title:ht(n.title)},[n.title])])]),o("div",{class:this.ns.be("header","right")},[a.uiactionGroup&&o(s("iBizActionToolbar"),{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")},[null==(t=(e=this.$slots).default)?void 0:t.call(e)])])}}));const Su=e("a9",a({name:"IBizViewPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Za,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))})),p((()=>{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(s("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(s("IBizViewShell"),{context:a,params:n,modelData:this.view}))||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?e:{default:()=>[e]});var l}}));var Tu=Object.defineProperty,_u=(e,t,a)=>(((e,t,a)=>{t in e?Tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ou{constructor(){_u(this,"component","IBizViewPortlet")}async createController(e,t,a){const n=new Za(e,t,a);return await n.init(),n}}const Bu=e("a8",U(Su,(function(e){e.component(Su.name,Su),Ja("VIEW",(()=>new Ou))})));function ju(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Au=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=F(((...e)=>new Yt(...e))),a=B("control-".concat(t.model.controlType.toLowerCase(),"-portlet")),i=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:ht(e.tooltip||e.caption),onClick:t=>{e.appFuncId&&r(e.id,t)}},[o(s("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:i,defaultOpens:l,onClick:r,renderGroup:e=>t.state.menuItemsState[e.id].visible?e.appMenuItems?o(s("el-collapse-item"),{class:a.b("group"),name:e.id,title:ht(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(s("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":e=>this.defaultOpens=e},ju(e=a.appMenuItems.map((e=>"MENUITEM"!==e.itemType?null:this.renderGroup(e))))?e:{default:()=>[e]})}return o(s("iBizControlBase"),{class:[this.ns.b()],controller:this.c},ju(n)?n:{default:()=>[n]})}}),Nu=e("ab",a({name:"IBizMenuPortlet",props:{modelData:{type:Object,required:!0},controller:{type:en,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===$t.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(s("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[this.menu&&o(s("iBizAppMenuPortletControl"),{modelData:this.menu,context:t,params:a},null)]})}}));var Ru=Object.defineProperty,Mu=(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 Lu{constructor(){Mu(this,"component","IBizMenuPortlet")}async createController(e,t,a){const n=new en(e,t,a);return await n.init(),n}}const Vu=e("aa",U(Nu,(function(e){e.component(Nu.name,Nu),e.component(Au.name,Au),Ja("APPMENU",(()=>new Lu))})));const Fu=e("ad",a({name:"IBizChartPortlet",props:{modelData:{type:Object,required:!0},controller:{type:tn,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===$t.CHART));let s;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(s=setInterval((()=>{e.controller.refresh()}),t))})),p((()=>{clearInterval(s)})),{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(s("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(s("IBizControlShell"),{context:a,params:n,modelData:this.chart}))||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?e:{default:()=>[e]});var l}}));var Uu=Object.defineProperty,qu=(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 Gu{constructor(){qu(this,"component","IBizChartPortlet")}async createController(e,t,a){const n=new tn(e,t,a);return await n.init(),n}}const Hu=e("ac",U(Fu,(function(e){e.component(Fu.name,Fu),Ja("CHART",(()=>new Gu))})));const Wu=e("af",a({name:"IBizRawItemPortlet",props:{modelData:{type:Object,required:!0},controller:{type:an,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(s("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(a=e=r(s("iBizRawItem"),{rawItem:this.rawItem}))||"[object Object]"===Object.prototype.toString.call(a)&&!i(a)?e:{default:()=>[e]});var a}}));var Ku=Object.defineProperty,Xu=(e,t,a)=>(((e,t,a)=>{t in e?Ku(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class $u{constructor(){Xu(this,"component","IBizRawItemPortlet")}async createController(e,t,a){const n=new an(e,t,a);return await n.init(),n}}const Yu=e("ae",U(Wu,(function(e){e.component(Wu.name,Wu),Ja("RAWITEM",(()=>new $u))})));const Ju=e("ah",a({name:"IBizListPortlet",props:{modelData:{type:Object,required:!0},controller:{type:nn,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===$t.LIST));let s;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(s=setInterval((()=>{e.controller.refresh()}),t))})),p((()=>{clearInterval(s)})),{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(s("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(s("IBizControlShell"),{context:a,params:n,modelData:this.list}))||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?e:{default:()=>[e]});var l}}));var Qu=Object.defineProperty,Zu=(e,t,a)=>(((e,t,a)=>{t in e?Qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ep{constructor(){Zu(this,"component","IBizListPortlet")}async createController(e,t,a){const n=new nn(e,t,a);return await n.init(),n}}const tp=e("ag",U(Ju,(function(e){e.component(Ju.name,Ju),Ja("LIST",(()=>new ep))}))),ap=e("aj",a({name:"IBizHtmlPortlet",props:{modelData:{type:Object,required:!0},controller:{type:on,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(s("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[o("iframe",{src:this.modelData.pageUrl},null)]})}}));var np=Object.defineProperty,op=(e,t,a)=>(((e,t,a)=>{t in e?np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sp{constructor(){op(this,"component","IBizHtmlPortlet")}async createController(e,t,a){const n=new on(e,t,a);return await n.init(),n}}const ip=e("ai",U(ap,(function(e){e.component(ap.name,ap),Ja("HTML",(()=>new sp))}))),lp=e("al",a({name:"IBizActionBarPortlet",props:{modelData:{type:Object,required:!0},controller:{type:sn,required:!0}},setup(e){var t;return{ns:B("portlet-".concat(null==(t=e.modelData.portletType)?void 0:t.toLowerCase())),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(s("iBizPortletLayout"),{controller:this.controller,class:e},{default:()=>[this.modelData.uiactionGroup&&o(s("iBizActionToolbar"),{"action-details":this.modelData.uiactionGroup.uiactionGroupDetails,"actions-state":this.controller.state.actionGroupState,onActionClick:this.onActionClick},null)]})}}));var rp=Object.defineProperty,cp=(e,t,a)=>(((e,t,a)=>{t in e?rp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dp{constructor(){cp(this,"component","IBizActionBarPortlet")}async createController(e,t,a){const n=new sn(e,t,a);return await n.init(),n}}const up=e("ak",U(lp,(function(e){e.component(lp.name,lp),Ja("ACTIONBAR",(()=>new dp))})));const pp=e("an",a({name:"IBizReportPortlet",props:{modelData:{type:Object,required:!0},controller:{type:ln,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===$t.REPORT_PANEL));let s;return d((()=>{const t=e.controller.model.timer;t&&t>0&&(s=setInterval((()=>{e.controller.refresh()}),t))})),p((()=>{clearInterval(s)})),{ns:n,report: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(s("iBizPortletLayout"),{controller:this.controller,class:t},"function"==typeof(l=e=r(s("IBizControlShell"),{context:a,params:n,modelData:this.report}))||"[object Object]"===Object.prototype.toString.call(l)&&!i(l)?e:{default:()=>[e]});var l}}));var hp=Object.defineProperty,mp=(e,t,a)=>(((e,t,a)=>{t in e?hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bp{constructor(){mp(this,"component","IBizReportPortlet")}async createController(e,t,a){const n=new ln(e,t,a);return await n.init(),n}}const vp=e("am",U(pp,(function(e){e.component(pp.name,pp),Ja("REPORT",(()=>new bp))}))),wp=e("a4",U(bu,(function(e){e.component(bu.name,bu),e.component(wu.name,wu),e.component(gu.name,gu),Xt($t.DASHBOARD,(()=>new Cu)),e.component(zu.name,zu),e.use(xu),e.use(Bu),e.use(Vu),e.use(Hu),e.use(Yu),e.use(tp),e.use(ip),e.use(up),e.use(vp)})));let gp,fp=0;const yp="__epPropKey",Cp=["#2196F3","#4CAF50","#3F51B5","#FF9800","#673AB7","#757575"],Ip=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,Pp=/^(rgb|rgba|RGB|RGBA)/;function Dp(e){var t;return e?!(null==e?void 0:e.parentNode)||(null==(t=null==e?void 0:e.classList)?void 0:t.contains("el-popover"))?e:Dp(e.parentNode):null}const Ep=e=>{const t=Dp(e.target);t&&(t.style.display="none")},kp=(e,t,a,n="-")=>{var o,s;let i="";return e&&(null==(o=ho(e))?void 0:o.isValid())&&(i=ho(e).format(a)),t&&(null==(s=ho(t))?void 0:s.isValid())&&(i="".concat(i," ").concat(n," ").concat(ho(t).format(a))),i},xp=(e,t)=>{let a=e.get(t);const n=e.size;return t&&!a&&n<Cp.length&&(a=Cp[n],e.set(t,a)),a||Cp[0]},zp=e=>{if(!e)return console.error("getRgbValue: Missing parameters!"),!1;const t=(e=>{const t=Ip.test(e),a=Pp.test(e),n=e;return t||a||e?n:(console.error("Color: Invalid color!"),"")})(e);if(!t)return!1;const a=Ip.test(t),n=Pp.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},Sp=(e,t)=>{const a=t||100;if(!e)return console.error("fade: Missing parameters!"),!1;const n=zp(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])},Tp=(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 _p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const Op=(e,t,a)=>{const n=new Date(e),o=new Date(t),s=new Date(a);return n.setHours(0,0,0,0),o.setHours(0,0,0,0),s.setHours(0,0,0,0),n>=o&&n<=s},Bp=(e,t)=>{const a=new Date(e),n=new Date(t);return a.getTime()>n.getTime()},jp=(e,t,a,n,o,s,i)=>{let l=mo(s),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":i("eventClick",{location:a,data:l});break;case"eventDblClick":i("eventDblClick",{location:a,data:l})}return{eventName:e,tempSelectedData:l,isSelectedEvent:r}},Ap=(e,t,a,n,o,s)=>new Promise((i=>{fp+=1,1===fp?gp=setTimeout((()=>{1===fp&&i(jp("eventClick",e,t,a,n,o,s)),fp=0}),300):2===fp&&(clearTimeout(gp),i(jp("eventDblClick",e,t,a,n,o,s)),fp=0)})),Np=(e,t)=>{if(!No(e)||No(a=e)&&a[yp])return e;var a;const{values:n,required:o,default:s,type:i,validator:l}=e,r=n||l?a=>{let o=!1,i=[];if(n&&(i=Array.from(n),_p(e,"default")&&i.push(s),o||(o=i.includes(a))),l&&(o||(o=l(a))),!o&&i.length>0){const e=[...new Set(i)].map((e=>JSON.stringify(e))).join(", ");x("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:i,required:!!o,validator:r,[yp]:!0};return _p(e,"default")&&(c.default=s),c},Rp=e=>Ao(Object.entries(e).map((([e,t])=>[e,Np(t,e)]))),Mp="update:modelValue",Lp="change",Vp="input",Fp=Rp({calendarTitle:{type:String},showDetail:{type:Boolean,default:!1},modelValue:{type:Date},range:{type:Array,validator:e=>Ro(e)&&2===e.length&&e.every((e=>Mo(e)))},viewType:{type:String,default:"DAY"},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object}}),Up={[Mp]:e=>Mo(e),[Vp]:e=>Mo(e),[Lp]:e=>Mo(e),eventClick:e=>e,eventDblClick:e=>e},qp=Rp({selectedDay:{type:Object},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object}}),Gp={pick:e=>No(e),eventClick:e=>e,eventDblClick:e=>e},Hp=Rp({showDetail:{type:Boolean,default:!1},selectedDay:{type:Object},events:{type:Array,default:[]},legends:{type:Array,default:[]},multiple:{type:Boolean},selectedData:{type:Object}}),Wp={pick:e=>No(e),eventClick:e=>e,eventDblClick:e=>e},Kp=a({name:"CalendarDaily",props:qp,emits:Gp,setup(e,{emit:t,slots:a}){const s=B("calendar-daily"),{drawData:i,curTimeTop:r,curTimeVal:u,resizableHand:p,events:h,curTimeTimer:m,calendarDaily:b,selectedData:v,eventClick:w,handleDrag:g,handleDragStart:f,handleCurTime:y,initDrawData:I}=((e,t)=>{const a=n([]),o=n(),s=n(0),i=n("00:00"),r=n(),c=n(),d=l((()=>e.legends||[])),u=l((()=>!0===e.multiple)),p=n([]);let h=0,m=0;const b=l((()=>v(e.events,null==e?void 0:e.selectedDay,d.value,c.value))),v=(e,t,a,n)=>{const o=[],s=new Map;let i=0;n&&(i=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=e.filter((e=>e&&e.beginTime&&e.endTime&&Tp(t,e.beginTime)&&Tp(t,e.endTime)));return l.forEach(((e,n)=>{const r={};Object.assign(r,e);const c=a.find((t=>Object.is(t.id,e.itemType))),d=p.value.find((t=>t.id===e.id));Object.assign(r,{zIndex:n+1});const u=l.length,h=(i-90)/u,m=Number((100/u).toFixed(3));let b="".concat(m,"%"),v="".concat(n*m,"%");if(h<100&&(b="100px",v="".concat(100*n,"px")),Object.assign(r,{width:b,styleLeft:v}),e.beginTime&&e.endTime){const a=w(e.beginTime,e.endTime,t),n=kp(e.beginTime,e.endTime,"HH:mm");Object.assign(r,{height:a,timeRange:n})}if(e.beginTime){const{styleTop:t}=g(new Date(e.beginTime));Object.assign(r,{styleTop:t})}if(!(null==e?void 0:e.bkColor)){const t=c?c.bkcolor:xp(s,e.itemType);Object.assign(r,{bkColor:t})}if(r.bkColor){const e=Sp(r.bkColor,10);Object.assign(r,{bkColorFade: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"});d?Object.assign(r,{isSelectedEvent:!0}):Object.assign(r,{isSelectedEvent:!1}),(c&&c.isShow||!c)&&o.push(r)})),s.clear(),o},w=(e,t,a)=>{let n=1;if(Tp(e,a)&&Tp(t,a)){const a=new Date(t).getTime()-new Date(e).getTime();n=Math.floor(a/6e4)}return n<3&&(n=3),n},g=e=>{const t=e.getHours(),a=e.getMinutes(),n=String(t).padStart(2,"0"),o=String(a).padStart(2,"0");let s,i;return 0===t&&0===a?(s=0,i="00:00"):(s=60*t+a,i="".concat(n,":").concat(o)),{styleTop:s,timeVal:i}};return{drawData:a,curTimeTimer:o,curTimeTop:s,curTimeVal:i,events:b,resizableHand:r,calendarDaily:c,selectedData:p,handleCurTime:()=>{const{styleTop:e,timeVal:t}=g(new Date);s.value=e,i.value=t},handleDrag:e=>{const t=e.clientY-h+m;r.value.style.height="".concat(t,"px")},handleDragStart:e=>{h=e.clientY,m=parseInt(window.getComputedStyle(r.value).height,10)},eventClick:async(a,n)=>{const o=await Ap(a,n,e.events,u.value,p.value,t),{tempSelectedData:s,isSelectedEvent:i}=o;i||Object.assign(a,{isSelectedEvent:i}),p.value=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}}})(e,t);c((()=>e.selectedData),(()=>{if(e.selectedData&&e.selectedData.length>0){const t=e.selectedData.length>v.value.length?e.selectedData:v.value;v.value=t}else v.value=[]}),{immediate:!0,deep:!0}),d((()=>{y(),i.value=I(),m.value=setInterval((()=>y()),1e3)})),C((()=>{const e=m.value;e&&(clearInterval(e),m.value=null)}));const P=(e,t,n,i,l,r,c)=>{var d;return o("div",{key:l,class:[s.em(c,"event-box")],style:t},[o("button",{class:[s.em(c,"event-content"),i.isSelectedEvent?"is-selected-event":"",i.classname],onClick:()=>w(i,"head"),style:n},[a[r]?null==(d=a[r])?void 0:d.call(a,{data:i}):o("div",{class:[s.em(c,"event-summary"),i.classname],title:ht("".concat(i.text||""," ").concat(i.timeRange||""))},[i.icon&&o("span",{class:[i.icon,s.em(c,"event-icon")],style:{color:i.bkColor}},null),i.text&&o("span",{class:[s.em(c,"event-name")]},[i.text])]),"header"===e&&i.isSelectedEvent?o("span",{class:["fa fa-check",s.em(c,"check")]},null):""])])};return{ns:s,calendarDaily:b,renderHeader:()=>o("div",{class:[s.e("calendar-daily__head")],ref:e=>{p.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")},[h.value.map(((e,t)=>{const a={color:e.color,background:e.bkColorFade};return P("header",{},a,e,t,"head-event","allday-info")}))])])]),o("div",{class:s.e("resizable-handle"),draggable:"true",onDrag:e=>g(e),onDragstart:e=>f(e)},[o("div",{class:s.e("allday-resize-line")},null)])]),renderContent:()=>o("div",{class:[s.e("scroll-area")]},[o("div",{class:s.e("time-pane")},[o("div",{class:s.em("time-pane","time-labels")},[i.value.map((e=>o("div",{key:e,class:[s.em("time-pane","time-label")]},[e])))]),o("div",{class:s.em("time-pane","time-columns")},[i.value.map(((e,t)=>o("div",{key:e,class:[s.em("time-pane","time-column"),t===i.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")},[h.value.map(((e,t)=>{const a={top:"".concat(e.styleTop,"px"),left:"".concat(e.styleLeft),height:"".concat(e.height,"px"),width:"".concat(e.width),"min-height":"".concat(e.height,"px"),"z-index":e.zIndex},n={background:e.bkColorFade,"border-left":"3px solid ".concat(e.bkColor),color:e.color};return P("content",a,n,e,t,"event","time-pane")}))])])]),Tp(null==e?void 0:e.selectedDay,new Date)?o("div",{class:s.em("time-pane","current-time"),style:{top:"".concat(r.value,"px")}},[o("div",{class:s.em("time-pane","current-time-label")},[u.value])]):""])])}},render(){return o("div",{ref:e=>{this.calendarDaily=e},class:this.ns.b()},[this.renderHeader(),this.renderContent()])}}),Xp=U(Kp,(function(e){e.component(Kp.name,Kp)})),$p=(e,t)=>{const a=n([]),o=n(),s=n(1),i=n("00:00"),r=n(),c=n(),d=n(),u=l((()=>!0===e.multiple)),p=n([]),h=n([]),m=n([]),b=n([]),v=n(!0);let w=0,g=0;const f=(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},y=()=>{const t=e.events,a=null==e?void 0:e.selectedDay,n=new Map,{firstDay:o,lastDay:s}=(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),i=[],l=[],r=[];b.value=[];for(let e=0;e<7;e++){const t=e,n=o.getDate()+t,s=new Date(o.getFullYear(),o.getMonth(),n),c=s.getDate(),d={date:s,day:c,caption:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].map((e=>ibiz.i18n.t("control.calendar.calendarweek.weeks.".concat(e))))[e],isActivate:Tp(s,a)};b.value.push(d),i.push([]),l.push([]),r.push([])}t.forEach((e=>{if(e.beginTime){const t={};Object.assign(t,e);if(p.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}),Op(t.beginTime,o,s)&&Op(t.endTime,o,s)){f(t.beginTime,t.endTime).forEach((e=>{const a=new Date(e).getDay();i[a].push(t)}))}else if(Op(t.beginTime,o,s)&&!Op(t.endTime,o,s)){f(t.beginTime,s).forEach((e=>{const a=new Date(e).getDay();i[a].push(t)}))}else if(Op(t.endTime,o,s)&&!Op(t.beginTime,o,s)){f(o,t.endTime).forEach((e=>{const a=new Date(e).getDay();i[a].push(t)}))}else if(!Op(e.endTime,o,s)&&!Op(e.beginTime,o,s)&&Bp(o,e.beginTime)&&Bp(e.endTime,o)){f(o,s).forEach((e=>{const a=new Date(e).getDay();i[a].push(t)}))}}})),i.forEach((e=>{e.sort(((e,t)=>{const a=e,n=t,o=new Date(a.beginTime).getTime()-new Date(n.beginTime).getTime();let s;return s=0===o?new Date(a.endTime).getTime()-new Date(n.endTime).getTime():o,s}))})),i.forEach(((e,t)=>{e.forEach(((e,a)=>{const c=d.value.find((t=>Object.is(t.id,e.itemType)));if(c&&c.isShow||!c){const d={},u={},p=i[t].length,h=b.value[t];Object.assign(d,e),Object.assign(d,{zIndex:a+1});const m=Number((100/p).toFixed(3)),v="".concat(m,"%"),w="".concat(a*m,"%");Object.assign(d,{width:v,styleLeft:w});let g=3,f=60,y="";if(Tp(e.beginTime,e.endTime)){g=C(e.beginTime,e.endTime),y=kp(e.beginTime,e.endTime,"HH:mm");f=D(new Date(e.beginTime)).styleTop}else if(Tp(e.beginTime,h.date)&&!Tp(e.endTime,h.date)){const t=new Date(h.date);t.setHours(23,59,59,0),g=C(e.beginTime,t),y=kp(e.beginTime,e.endTime,"YYYY-MM-DD HH:mm");f=D(new Date(e.beginTime)).styleTop}else if(Tp(e.endTime,h.date)&&!Tp(e.beginTime,h.date)){const t=new Date(h.date);t.setHours(0,0,0,0),g=C(t,e.endTime),y=kp(e.beginTime,e.endTime,"YYYY-MM-DD HH:mm");f=D(new Date(t)).styleTop}else{const t=new Date(h.date),a=new Date(t.setHours(0,0,0,0)),n=new Date(t.setHours(23,59,59,59));g=C(a,n),y=kp(e.beginTime,e.endTime,"YYYY-MM-DD HH:mm");f=D(new Date(a)).styleTop}if(Object.assign(d,{height:g,styleTop:f,timeRange:y}),!(null==e?void 0:e.bkColor)){const t=c?c.bkcolor:xp(n,e.itemType);Object.assign(d,{bkColor:t})}if(d.bkColor){const e=Sp(d.bkColor,10);Object.assign(d,{bkColorFade:e})}if((null==d?void 0:d.height)&&(null==d?void 0:d.height)>10){const e="1px solid #FFF";Object.assign(d,{border:e})}else Object.assign(d,{border:"none"});if(l[t].push(d),!Tp(e.beginTime,e.endTime)){Object.assign(u,d),Object.assign(u,{width:0,styleLeft:0});let a=0,n=0;if(Op(e.beginTime,o,s)&&Op(e.endTime,o,s)){const t=I(e.beginTime,e.endTime,o,s),i=P(e.beginTime,o,s);a="".concat(t,"%"),n="".concat(i,"%")}else if(Op(e.beginTime,o,s)&&!Op(e.endTime,o,s)){const t=I(e.beginTime,s,o,s),i=P(e.beginTime,o,s);a="".concat(t,"%"),n="".concat(i,"%")}else if(Op(e.endTime,o,s)&&!Op(e.beginTime,o,s)){const t=I(o,e.endTime,o,s);a="".concat(t,"%"),n="".concat(0,"%")}else if(!Op(e.endTime,o,s)&&!Op(e.beginTime,o,s)&&Bp(o,e.beginTime)&&Bp(e.endTime,o)){const e=I(o,s,o,s);a="".concat(e,"%"),n="".concat(0,"%")}Object.assign(u,{width:a,styleLeft:n});let i=!1;(Op(e.beginTime,o,s)&&Tp(e.beginTime,h.date)||0===t)&&(i=!0),Object.assign(u,{isShow:i}),r[t].push(u)}}}))})),n.clear(),h.value=l,m.value=r},C=(e,t)=>{let a=1;if(Tp(e,t)){const n=new Date(t).getTime()-new Date(e).getTime();a=Math.floor(n/6e4)}return a<3&&(a=3),a},I=(e,t,a,n)=>{let o="0";if(Op(e,a,n)&&Op(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},P=(e,t,a)=>{let n="0";if(Op(e,t,a)){n=((new Date(e).getHours()+new Date(e).getMinutes()/60)*Number((100/24).toFixed(3))).toFixed(3)}return n},D=e=>{const t=e.getHours(),a=e.getMinutes(),n=String(t).padStart(2,"0"),o=String(a).padStart(2,"0");let s,i;if(0===t&&0===a)s=1,i="00:00";else{s=60*t+a,i="".concat(n,":").concat(o)}return{styleTop:s,timeVal:i}};return{drawData:a,curTimeTimer:o,curTimeTop:s,curTimeVal:i,rows:h,resizableHand:r,calendarWeek:c,selectedData:p,weekDays:b,legends:d,rowsHeader:m,popVisible:v,handleCurTime:()=>{const{styleTop:e,timeVal:t}=D(new Date);s.value=e,i.value=t},handleDrag:e=>{const t=e.clientY-w+g;r.value.style.height="".concat(t,"px")},handleDragStart:e=>{w=e.clientY,g=parseInt(window.getComputedStyle(r.value).height,10)},eventClick:async(a,n)=>{v.value=!1;const o=await Ap(a,n,e.events,u.value,p.value,t),{tempSelectedData:s,isSelectedEvent:i}=o;i||Object.assign(a,{isSelectedEvent:i}),p.value=s,y()},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:y}},Yp=a({name:"CalendarWeek",props:Hp,emits:Wp,setup(e,{emit:t,slots:a}){const i=B("calendar-week"),{drawData:l,resizableHand:r,rows:u,weekDays:p,curTimeTimer:h,calendarWeek:m,selectedData:b,legends:v,rowsHeader:w,eventClick:g,handleDrag:f,handleDragStart:y,handleCurTime:I,initDrawData:P,handleUIEvents:D}=$p(e,t),E=n(""),k=n(!1);c((()=>e.selectedData),(()=>{if(e.selectedData&&e.selectedData.length>0){const t=e.selectedData.length>b.value.length?e.selectedData:b.value;b.value=t}else b.value=[]}),{immediate:!0,deep:!0}),c((()=>e.legends),(()=>{v.value=e.legends||[],D()}),{immediate:!0,deep:!0}),c((()=>e.events),(()=>{D()}),{immediate:!0,deep:!0}),d((()=>{I(),l.value=P(),h.value=setInterval((()=>I()),1e3)})),C((()=>{const e=h.value;e&&(clearInterval(e),h.value=null)}));const x=()=>{k.value=!1},z=()=>{E.value="",k.value=!1},S=(e,t,n,s,l,r,c)=>{var d;return o("div",{key:l,class:[i.em(c,"event-box")],style:t,onMouseenter:()=>(e=>{E.value=String(e.id),k.value=!0})(s),onMouseleave:z,onClick:x},[o("button",{class:[i.em(c,"event-content"),s.isSelectedEvent?"is-selected-event":"",s.classname],onClick:()=>{g(s,"head")},style:n},[a[r]?null==(d=a[r])?void 0:d.call(a,{data:s}):o("div",{class:[i.em(c,"event-summary"),s.classname],title:ht("header"===e?"".concat(s.text||""," ").concat(s.timeRange||""):"")},[s.icon&&o("span",{class:[s.icon,i.em(c,"event-icon")],style:{color:s.bkColor}},null),s.text&&o("span",{class:[i.em(c,"event-name")]},[s.text])]),"header"===e&&s.isSelectedEvent?o("span",{class:["fa fa-check",i.em(c,"check")]},null):""])])};return{ns:i,calendarWeek:m,renderHeader:()=>o("div",{class:[i.e("header")],ref:e=>{r.value=e}},[o("div",{class:[i.em("header","dates")]},[o("div",{class:[i.em("header","date-cell-first")]},null),p.value.map((e=>o("div",{class:[i.em("header","date-cell")]},[o("div",{class:[i.em("header","date-week")]},[e.caption]),o("div",{class:[i.em("header","date-day"),e.isActivate?"is-today":""]},[e.day])])))]),o("div",{class:[i.em("header","events")]},[o("div",{class:[i.em("header","event-cell-first")]},[ibiz.i18n.t("control.calendar.calendardaily.tip")]),w.value.map((e=>o("div",{class:[i.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={color:e.color,background:e.bkColorFade};return e.isShow?S("header",a,n,e,t,"head-event","header"):""}))])))]),o("div",{class:i.em("header","resizable-handle"),draggable:"true",onDrag:e=>f(e),onDragstart:e=>y(e)},[o("div",{class:i.em("header","resize-line")},null)])]),renderContent:()=>o("div",{class:[i.e("scroll-area")]},[o("div",{class:i.e("time-pane")},[o("div",{class:i.em("time-pane","time-labels")},[l.value.map((e=>o("div",{key:e,class:[i.em("time-pane","time-label")]},[e])))]),u.value.map((t=>o("div",{class:i.em("time-pane","time-columns")},[l.value.map(((e,t)=>o("div",{key:e,class:[i.em("time-pane","time-column"),t===l.value.length-1&&i.em("time-pane","time-column-last")]},null))),o("div",{class:i.em("time-pane","event-timed-container")},[o("div",{class:i.em("time-pane","container-scroll")},[t.map(((t,n)=>{const l={top:"".concat(t.styleTop,"px"),left:"".concat(t.styleLeft),height:"".concat(t.height,"px"),width:"".concat(t.width),"min-height":"".concat(t.height,"px"),"z-index":t.zIndex},r={background:t.bkColorFade,"border-left":"3px solid ".concat(t.bkColor),color:t.color};return((t,n)=>e.showDetail?o(s("el-popover"),{visible:k.value&&n.id===E.value,"show-after":100,offset:4,width:"auto","popper-class":[i.e("event-popover")],placement:"right-start"},{reference:()=>t,default:()=>{var e;return o("div",{class:[i.em("event-popover","body")]},[o("div",{class:[i.em("event-popover","close")],onClick:e=>Ep(e),innerHTML:"<i class='el-icon' data-v-ea893728=''> <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' data-v-ea893728='' > <path d='M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z'></path> </svg></i>"},null),o("div",{class:[i.em("event-popover","scroll")]},[(null==a?void 0:a.event)?null==(e=a.event)?void 0:e.call(a,{data:n}):o("div",{class:[i.em("event-popover","content")]},["".concat(n.text||""," ").concat(n.timeRange||"")])])])}}):t)(S("content",l,r,t,n,"","time-pane"),t)}))])])])))])])}},render(){return o("div",{ref:e=>{this.calendarWeek=e},class:this.ns.b()},[this.renderHeader(),this.renderContent()])}}),Jp=U(Yp,(function(e){e.component(Yp.name,Yp)})),Qp=a({name:"CustomCalendar",props:Fp,emits:Up,setup(e,{emit:t,slots:a}){const i=B("custom-calendar"),{date:r,events:u,shortcuts:p,viewType:h,validatedRange:m,realSelectedDay:b,curWeek:v,legends:w,multiple:g,selectedData:f,pickDay:y,handleEVentClick:C,handleEVentDblClick:I,selectDate:P,selectLegend:D}=((e,t,a)=>{const{lang:o}=Jo(),s=n(),i=ho().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=xp(p,e.id);Object.assign(t,{bkcolor:a})}a.push(t)})),u.value=a}),{immediate:!0,deep:!0});const b=(e,t)=>{const a=e.startOf("week"),n=t.endOf("week"),o=a.get("month"),s=n.get("month");let i;return i=o===s?[[a,n]]:(o+1)%12===s?((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===s||(o+1)%11===s?((e,t)=>{const a=e.endOf("month"),n=e.add(1,"month").startOf("month"),o=a.isSame(n,"week")?n.add(1,"week"):n,s=o.endOf("month"),i=t.startOf("month"),l=s.isSame(i,"week")?i.add(1,"week"):i;return[[e,a],[o.startOf("week"),s],[l.startOf("week"),t]]})(a,n):[],i},v=l((()=>{if(!e.range)return[];let t=[];const a=e.range.map((e=>ho(e).locale(o.value))),[n,s]=a;return n.isAfter(s)&&(t=[]),n.isSame(s,"month")||n.add(1,"month").month()!==s.month()&&(t=[]),t=b(n,s),t})),w=l((()=>{let t;return t=e.modelValue?ho(e.modelValue).locale(o.value):r.value||(v.value.length?v.value[0][0]:i),t})),g=l({get(){let t=w.value;return e.modelValue||(t=s.value),r.value=t,t},set(e){if(!e)return;const a=ho(e);s.value=a;const n=a.toDate();t(Vp,n),t(Lp,n),t(Mp,n)}}),f=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((()=>w.value.subtract(1,"month").date(1))),C=l((()=>w.value.add(1,"month").date(1))),I=l((()=>w.value.subtract(1,"year").date(1))),P=l((()=>w.value.add(1,"year").date(1))),D=e=>{g.value=e},E=l((()=>{const e="".concat(w.value.format("M"));return"".concat(w.value.year()," ").concat(ibiz.i18n.t("control.calendar.year")," ").concat(e," ").concat(ibiz.i18n.t("control.calendar.month"))})),k=[{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}}],x=l((()=>{let e="";if(g.value){const t=g.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:w,viewType:d,i18nDate:E,events:f,shortcuts:k,validatedRange:v,realSelectedDay:g,curWeek:x,legends:u,multiple:h,selectedData:m,calculateValidatedDateRange:b,pickDay:D,selectDate:e=>{const t={"prev-month":y.value,"next-month":C.value,"prev-year":I.value,"next-year":P.value,today:i}[e];t.isSame(w.value,"day")||D(t)},handleEVentClick:e=>{t("eventClick",e)},handleEVentDblClick:e=>{t("eventDblClick",e)},selectLegend:e=>{const t=u.value.find((t=>e.id===t.id));t&&Object.assign(t,{isShow:!e.isShow})}}})(e,t);d((()=>{y(ho(new Date))}));return{ns:i,date:r,validatedRange:m,pickDay:y,selectDate:P,renderContent:()=>{switch(h.value){case"DAY":return o("div",{class:[i.e("calendar-week")]},[(null==a?void 0:a.header)?o("div",{class:[i.em("calendar-month","header")]},[null==(t=null==a?void 0:a.header)?void 0:t.call(a,{date:ho(b.value).format("YYYY-MM-DD"),legends:w.value})]):o("div",{class:[i.em("calendar-week","header")]},[o("div",{class:i.em("calendar-week","header-top")},[o("div",{class:i.em("calendar-week","title")},[e.calendarTitle||ibiz.i18n.t("control.calendar.title")]),o("div",{class:i.em("calendar-week","legend")},[w.value.length>1&&w.value.map((e=>o("div",{class:i.em("calendar-week","legend-item"),onClick:()=>D(e)},[o("div",{class:i.em("calendar-week","legend-item-tip"),style:{background:e.isShow?e.bkcolor:"#CCCCCC"}},null),o("div",{class:i.em("calendar-week","legend-item-text"),style:{color:e.isShow?e.color:"#CCCCCC"},title:ht(e.name)},[e.name])])))]),o("div",{class:i.em("calendar-week","select-time")},[o(s("el-date-picker"),{modelValue:b.value,"onUpdate:modelValue":e=>b.value=e,type:"date",placeholder:"选择日期",shortcuts:p},null)])]),o("div",{class:i.em("calendar-week","text-secondary")},[v.value])]),o(Xp,{"selected-day":b.value,controller:e.controller,events:u.value,legends:w.value,multiple:g.value,selectedData:f.value,onEventClick:e=>C(e),onEventDblClick:e=>I(e)},a)]);case"WEEK":return(()=>{var t;return o("div",{class:[i.e("calendar-week")]},[(null==a?void 0:a.header)?o("div",{class:[i.em("calendar-month","header")]},[null==(t=null==a?void 0:a.header)?void 0:t.call(a,{date:ho(b.value).format("YYYY-MM-DD"),legends:w.value})]):o("div",{class:[i.em("calendar-week","header")]},[o("div",{class:i.em("calendar-week","header-top")},[o("div",{class:i.em("calendar-week","title")},[e.calendarTitle||ibiz.i18n.t("control.calendar.title")]),o("div",{class:i.em("calendar-week","legend")},[w.value.length>1&&w.value.map((e=>o("div",{class:i.em("calendar-week","legend-item"),onClick:()=>D(e)},[o("div",{class:i.em("calendar-week","legend-item-tip"),style:{background:e.isShow?e.bkcolor:"#CCCCCC"}},null),o("div",{class:i.em("calendar-week","legend-item-text"),style:{color:e.isShow?e.color:"#CCCCCC"},title:ht(e.name)},[e.name])])))]),o("div",{class:i.em("calendar-week","select-time")},[o(s("el-date-picker"),{modelValue:b.value,"onUpdate:modelValue":e=>b.value=e,type:"date",placeholder:"选择日期",shortcuts:p},null)])])]),o(Jp,{"selected-day":b.value,showDetail:e.showDetail,events:u.value,legends:w.value,multiple:g.value,selectedData:f.value,onEventClick:e=>C(e),onEventDblClick:e=>I(e)},a)])})();default:return null}var t}}},render(){return o("div",{class:[this.ns.b()]},[this.renderContent()])}}),Zp=U(Qp,(function(e){e.component(Qp.name,Qp)}));function eh(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const th=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},loadDefault:{type:Boolean,default:!0}},setup(){const e=F(((...e)=>new rn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(),o=n(!1);e.evt.on("onActive",(()=>{o.value=!1})),c((()=>e.state.selectedDate),((t,a)=>{ho(t).format("YYYY-MM")!==ho(a).format("YYYY-MM")&&e.load()}));return{c:e,ns:t,calendarRef:a,popoverVisible:o,selectDate:e=>{a.value&&a.value.selectDate(e)},calcItemStyle:e=>({color:e.color,backgroundColor:e.bkColor})}},render(){let e;const t=(e,t)=>{const{context:a,params:n}=this.c,i=this.c.state.selectedData.findIndex((t=>t.deData.srfkey===e.deData.srfkey)),l=[this.ns.b("item"),this.ns.is("active",-1!==i)],r=this.calcItemStyle(e);return o(s("iBizControlShell"),{class:l,data:e.deData,modelData:t,context:a,params:n,style:r,onClick:t=>(t.stopPropagation(),this.c.onRowClick(e)),onDblclick:t=>(t.stopPropagation(),this.c.onDbRowClick(e))},null)},a=e=>{const t=this.c.state.selectedData.findIndex((t=>t.deData.srfkey===e.deData.srfkey)),a=[this.ns.b("item"),this.ns.is("active",-1!==t)],n=this.calcItemStyle(e);return o("div",{class:a,key:e.deData.srfkey,style:n,title:ht(e.tips||e.text),onClick:()=>this.c.onRowClick(e),onDblclick:()=>this.c.onDbRowClick(e)},[e.text])},n=e=>{var n;const o=(null==(n=this.c.model.sysCalendarItems)?void 0:n.find((t=>e.itemType===t.itemType))).layoutPanel;return o?t(e,o):a(e)},i=e=>e.length>1?[n(e[0]),o(s("el-popover"),{trigger:"click",visible:this.popoverVisible,"onUpdate:visible":e=>this.popoverVisible=e},{reference:()=>o("span",{class:this.ns.b("more")},["+".concat(e.length-1," ").concat(ibiz.i18n.t("app.more"),"...")]),default:()=>e.map((e=>n(e)))})]:e.map((e=>n(e))),l=e=>{const t=ho(e).format("YYYY-MM-DD"),a=this.c.state.items.filter((e=>{const a=new Date(e.beginTime);return t===ho(a).format("YYYY-MM-DD")}));return i(a)},r=()=>o("div",{class:this.ns.b("content")},[o(s("el-calendar"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":e=>this.c.state.selectedDate=e,ref:"calendarRef"},{header:({date:e})=>{var t;let a,n,i,l,r;return[o("span",{class:this.ns.b("content-title")},[e]),o("div",{class:this.ns.b("content-header")},[o(s("el-date-picker"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":e=>this.c.state.selectedDate=e,type:"month"},null),o(s("el-button-group"),null,{default:()=>[o(s("el-button"),{onClick:()=>{this.selectDate("prev-year")}},eh(a=ibiz.i18n.t("control.calendar.lastYear"))?a:{default:()=>[a]}),o(s("el-button"),{onClick:()=>{this.selectDate("prev-month")}},eh(n=ibiz.i18n.t("control.calendar.lastMonth"))?n:{default:()=>[n]}),o(s("el-button"),{onClick:()=>{this.selectDate("today")}},eh(i=ibiz.i18n.t("control.calendar.today"))?i:{default:()=>[i]}),o(s("el-button"),{onClick:()=>{this.selectDate("next-month")}},eh(l=ibiz.i18n.t("control.calendar.nextMonth"))?l:{default:()=>[l]}),o(s("el-button"),{onClick:()=>{this.selectDate("next-year")}},eh(r=ibiz.i18n.t("control.calendar.nextYear"))?r:{default:()=>[r]})]})]),o("div",{class:this.ns.b("legend")},[this.c.model.sysCalendarItems&&this.c.model.sysCalendarItems.length>1&&(null==(t=this.c.model.sysCalendarItems)?void 0:t.map((e=>{let t=e.name;return e.nameLanguageRes&&(t=ibiz.i18n.t(e.nameLanguageRes.lanResTag,e.name)),o("div",{class:this.ns.e("calendar-item")},[o("div",{class:this.ns.e("icon"),style:{background:e.bkcolor,color:e.color}},null),t])})))])]},"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")},[l(t)])])}})]),c=()=>{const{isLoaded:e}=this.c.state;return e&&o(s("iBizNoData"),{text:this.c.model.emptyText,emptyTextLanguageRes:this.c.model.emptyTextLanguageRes,enableShowImage:this.c.state.hideNoDataImage},null)},d=()=>{const e={},{sysCalendarItems:n}=this.c.model;return e.event=({data:e})=>{const o=null==n?void 0:n.find((t=>t.id===e.itemType));return o&&o.layoutPanel?t(e,o.layoutPanel):a(e)},o("div",{class:this.ns.b("content")},[o(Zp,{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.c.state.legends,multiple:!this.c.state.singleSelect,selectedData:this.c.state.selectedData,onEventClick:e=>{const{data:t}=e;this.c.onRowClick(t[0])},onEventDblClick:e=>{const{data:t}=e;this.c.onDbRowClick(t[0])}},eh(e)?e:{default:()=>[e]})])},u=()=>o("div",{class:this.ns.b("timeline-content")},[o(s("el-timeline"),null,{default:()=>[this.c.state.items.length>0?this.c.state.items.map((e=>{var n;const i=null==(n=this.c.model.sysCalendarItems)?void 0:n.find((t=>e.itemType===t.itemType));return o(s("el-timeline-item"),{key:e.id,placement:"top",color:e.bkColor,timestamp:e.beginTime},{default:()=>[(null==i?void 0:i.layoutPanel)?t(e,i.layoutPanel):a(e)]})})):c()]})]);return o(s("iBizControlBase"),{controller:this.c},eh(e=(()=>{switch(this.c.model.calendarStyle){case"TIMELINE":return u();case"WEEK":case"DAY":return d();default:return r()}})())?e:{default:()=>[e]})}});var ah=Object.defineProperty,nh=(e,t,a)=>(((e,t,a)=>{t in e?ah(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class oh{constructor(){nh(this,"component","IBizCalendarControl")}}const sh=e("ao",U(th,(function(e){e.use(Zp),e.component(th.name,th),Xt($t.CALENDAR,(()=>new oh))})));function ih(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const lh=a({name:"IBizKanbanControl",components:{draggable:Po},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},loadDefault:{type:Boolean,default:!0}},setup(e){var t,a,i;const r=F(((...e)=>new cn(...e))),c=B("control-".concat(r.model.controlType.toLowerCase())),u=n(),h=n(!1),m=l((()=>!r.state.draggable||r.state.updating)),b=l((()=>r.state.batching?r.state.selectGroupKey:"")),w=null==(t=r.model.controls)?void 0:t.find((e=>e.name==="".concat(r.model.name,"_quicktoolbar")||e.name==="".concat(r.model.name,"_groupquicktoolbar"))),g=null==(a=r.model.controls)?void 0:a.find((e=>e.name==="".concat(r.model.name,"_batchtoolbar"))),f=(null==(i=r.model.groupSysCss)?void 0:i.cssName)||"",y=n({});let C=ft;const I={};switch(r.model.groupLayout){case"ROW":I.width="".concat(r.model.groupWidth||300,"px"),I.height="100%";break;case"COLUMN":I.width="100%",I.height="".concat(r.model.groupHeight||500,"px")}const P=e=>{e.stopPropagation()},D=(e,t)=>{P(t);const a=String(e.key);y.value[a]=!y.value[a]};d((()=>{C=vt(window,"resize",(()=>{h.value=r.getFullscreen()}))})),p((()=>{C!==ft&&C()}));const E=(e,t)=>{const{context:a,params:n}=r;return o(s("iBizControlShell"),{data:e,modelData:t,context:a,params:n},null)},k=(e,t)=>{var a;return o(s("iBizActionToolbar"),{class:c.bem("item","bottom","actions"),"action-details":null==(a=r.getOptItemModel().deuiactionGroup)?void 0:a.uiactionGroupDetails,"actions-state":r.getOptItemAction(e),onActionClick:(a,n)=>r.onGroupActionClick(a,e,n,t)},null)},x=e=>{if(w)return o(s("iBizControlShell"),{class:c.e("quicktoolbar"),modelData:{...w,name:"".concat(w.name,"_").concat(e.key)},context:r.context,params:r.params},null)},z=e=>{if(g)return o("div",{class:c.be("batch","toolbar")},[o(s("iBizControlShell"),{modelData:{...g,name:"".concat(g.name,"_").concat(e.key)},context:r.context,params:r.params},null)])},S=e=>{let t;const a=e.selectedData||[],n=a.length===e.children.length,i=a.length>0&&a.length<e.children.length;return o("div",{class:c.be("batch","check")},[o(s("el-checkbox"),{"model-value":n,indeterminate:i,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)},ih(t=ibiz.i18n.t("control.kanban.selectAll"))?t:{default:()=>[t]}),o("span",{class:c.be("batch","info"),innerHTML:ibiz.i18n.t("control.kanban.selectedDataCount",{length:a.length})},null)])},T=e=>{if(b.value===e.key)return o("div",{class:c.b("batch")},[z(e),S(e)])},_=(e,t)=>[o("div",{class:c.be("item","top")},[o("div",{class:c.bem("item","top","title")},[e.srfmajortext]),o("div",{class:c.bem("item","top","description")},[e.content])]),r.getOptItemModel()?o("div",{class:c.be("item","bottom")},[k(e,t)]):null],O=(t,a)=>{const n=r.state.selectedData.findIndex((e=>e.srfkey===t.srfkey)),i=[c.b("item"),c.is("selected",-1!==n),c.is("disabled",m.value)],l={};r.model.cardWidth&&(l.width="".concat(r.model.cardWidth,"px")),r.model.cardHeight&&(l.height="".concat(r.model.cardHeight,"px"));const d=e.modelData.itemLayoutPanel;return o(s("el-card"),{shadow:"hover",class:i,"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:()=>[d?E(t,d):_(t,a)]})},j=()=>{if(r.state.isLoaded)return o(s("iBizNoData"),{text:r.model.emptyText,emptyTextLanguageRes:r.model.emptyTextLanguageRes},null)};let A=null;const N=e=>{const t=r.model.groupUIActionGroup&&e.groupActionGroupState||g;if(b.value===e.key){let e;return o("span",{class:c.be("group","header-right"),onClick:e=>P(e)},[o(s("el-button"),{text:!0,onClick:()=>r.closeBatch()},ih(e=ibiz.i18n.t("app.complete"))?e:{default:()=>[e]})])}return o("span",{class:c.be("group","header-right"),onClick:e=>P(e)},[r.enableNew&&!r.state.readonly&&o(s("el-button"),{class:c.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:ht(ibiz.i18n.t("app.newlyBuild"))},null)]}),t&&o(s("el-dropdown"),{class:c.be("group","header-actions"),trigger:"click",teleported:!1},{default:()=>o("span",null,[v("···")]),dropdown:()=>o("div",{class:c.be("group","actions-dropdown")},[r.model.groupUIActionGroup&&e.groupActionGroupState&&o(s("iBizActionToolbar"),{actionDetails:r.model.groupUIActionGroup.uiactionGroupDetails,actionsState:e.groupActionGroupState,onActionClick:(t,a)=>{r.onGroupToolbarClick(t,a,e)}},null),g&&o(s("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:c,isFull:h,kanban:u,onFullScreen:()=>{const e=u.value.$el;h.value=r.onFullScreen(e)},renderGroup:e=>{const t=y.value[String(e.key)],a="COLUMN"===r.model.groupLayout,n={...I};return t&&(n.height="50px"),!t||a?o("div",{class:[c.b("group"),c.is("collapse",t),f],style:n},[o("div",{class:c.be("group","header"),style:{borderTopColor:e.color||"transparent"},onClick:t=>D(e,t)},[o("div",{class:c.be("group","header-left")},[o("ion-icon",{name:"caret-down-sharp"},null),o("span",{class:[c.be("group","header-caption"),c.is("badge",!!e.color)],style:{backgroundColor:e.color}},["".concat(e.caption).concat(e.children.length?" · ".concat(e.children.length):"")])]),N(e)]),T(e),o("div",{class:[c.be("group","list"),c.is("empty",!e.children.length)]},[o(Po,{class:c.be("group","draggable"),modelValue:e.children,group:r.model.id,itemKey:"srfkey",disabled:m.value||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&&(A={to:t,toIndex:e.added.newIndex}),e.removed&&(A&&(A.from=t,A.fromIndex=e.removed.oldIndex,r.onDragChange(A)),A=null)})(t,e.key)},{item:({element:t})=>O(t,e),header:()=>e.children.length?null:o("div",{class:c.be("group","list")},[j()])}),x(e)])]):o("div",{class:[c.b("group"),c.is("collapse",t),f]},[o("div",{class:c.be("group","header"),style:{borderTopColor:e.color||"transparent"},onClick:t=>D(e,t)},[o("span",{class:[c.be("group","header-caption"),c.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)])])}}},render(){var e;const{groups:t,isCreated:a}=this.c.state;return a?o(s("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)]},{default:()=>[o("div",{class:this.ns.b("group-container")},[t.length>0&&t.map((e=>this.renderGroup(e)))]),t.length>0&&o("div",{class:this.ns.e("full-btn"),onClick:this.onFullScreen},[this.isFull?o("ion-icon",{name:"contract-outline"},null):o("ion-icon",{name:"expand-outline"},null)])]}):null}});var rh=Object.defineProperty,ch=(e,t,a)=>(((e,t,a)=>{t in e?rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dh{constructor(){ch(this,"component","IBizKanbanControl")}}const uh=e("ap",U(lh,(function(e){e.component(lh.name,lh),Xt($t.KANBAN,(()=>new dh))})));function ph(e,t){let a;const i=n(!1),l=n(!1),r=n(),c=g({}),d=async t=>{var n;const o=(t=>{if(!e.value)throw new bt(ibiz.i18n.t("control.common.citeErrMessage"));const a=e.value.$el;let n=".el-table__row";t.data._uuid&&(n+=".id-".concat(t.data._uuid));const o=a.querySelector(n);if(!o)throw new bt(ibiz.i18n.t("control.common.noDomErrMessage"));return o})(t);if(l.value=(null==(n=o.parentNode)?void 0:n.lastElementChild)===o,!a)throw new bt(ibiz.i18n.t("control.common.noPopErrMessage"));const s=a.$el,{x:d,y:u}=await Fo(o,s,{placement:"bottom"});Object.assign(c,{top:"".concat(u,"px"),left:"".concat(d,"px")}),r.value=t,setTimeout((()=>{i.value=!0}),200)},u=async()=>{r.value&&t.switchRowEdit(r.value,!1,!0)},p=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,i.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(s("iBizRowEditPopover"),{ref:e=>{a=e},style:c,show:i.value,onConfirm:u,onCancel:p},null)]}}const hh=a({name:"IBizTreeGridExControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const e=F(((...e)=>new dn(...e))),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 s=(null==(n=e.fieldColumns[a.key])?void 0:n.model)||(null==(o=e.uaColumns[a.key])?void 0:o.model);s&&t.push(s)})),t})),i=(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=i(e._children)),a})),r=n(lo()),c=l((()=>e.state.isLoaded?e.model.rootVisible?e.state.rootNodes:e.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[])),d=l((()=>(r.value=lo(),0===c.value.length?[]:i(c.value,!0))));e.evt.on("onAfterRefreshParent",(()=>{r.value=lo()}));const u=n(),{renderPopover:p}=ph(u,e);P((()=>{if(u.value){const t=u.value.store.states.treeData.value,a=e.state.expandedKeys;Object.keys(t).forEach((n=>{if(a.includes(n)!==t[n].expanded){const t=i([e.getNodeData(n)])[0];u.value.store.loadOrToggle(t)}}))}}));return{c:e,ns:t,tableRef:u,elTableData:d,renderColumns:a,tableRefreshKey:r,renderNoData:()=>{const{isLoaded:t}=e.state;return t&&o(s("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},loadData:async(t,a,n)=>{let o;const s=e.getNodeData(t.id);o=s._children?s._children:await e.loadNodes(s),n(i(o))},onRowClick:async(t,a,n)=>{const o=e.getNodeData(t.id);if("row"===ibiz.config.grid.editShowMode&&e.model.enableEdit){const a=e.state.rows[o._uuid];if(!a||!0===a.showRowEdit)throw new bt(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 bt(ibiz.i18n.t("control.common.noFoundNode",{id:t._uuid}));e.onExpandChange(n,a)},renderPopover:p,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 D(this.$slots,e.id,{model:e,data:this.c.state.items});const{codeName:i,width:l}=e,c=this.c.columns[i],d=this.c.state.columnStates.find((e=>e.key===i)),u=c.isAdaptiveColumn||!this.c.hasAdaptiveColumn&&t===this.renderColumns.length-1?"min-width":"width";return o(s("el-table-column"),b({label:e.caption,prop:i},{[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"}),{default:({row:e})=>{const t=this.c.getRowState(e.id);if(t){const e=s(this.c.providers[i].component);return r(e,{controller:c,row:t,key:t.data._uuid+i})}return null}})};return o(s("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[this.c.state.isLoaded&&o(s("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 mh=Object.defineProperty,bh=(e,t,a)=>(((e,t,a)=>{t in e?mh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vh{constructor(){bh(this,"component","IBizTreeGridExControl")}}const wh=a({name:"IBizTreeGridExFieldColumn",props:{controller:{type:un,required:!0},row:{type:pn,required:!0}},setup(e){const t=B("tree-grid-ex-field-column"),a=n();c((()=>e.row.data),(()=>{"DE"!==e.row.data._nodeType&&e.controller.isFirstShowColumn?a.value=e.row.data._text:a.value=e.row.data[e.controller.name]}),{deep:!0,immediate:!0});const o=l((()=>e.controller.nodeColumnControllerMap.get(e.row.data._nodeId))),s=n(""),i=l((()=>{const e=o.value;if(e){if(e.nodeEditItem)return;return e.codeList?s.value:e.formatValue(a.value)+(e.unitName||"")}return a.value})),r=l((()=>{if("ellipsis"===e.controller.treeGrid.overflowMode&&vo(a.value)&&""!==a.value)return i.value})),d=l((()=>a.value&&o.value&&(o.value.isLinkColumn||o.value.hasClickAction)));return{ns:t,nodeColumn:o,fieldValue:a,showText:i,clickable:d,tooltip:r,onInfoTextChange:e=>{s.value=e},onTextClick:t=>{var a;null==(a=o.value)||a.onTextClick(e.row,t)},onActionClick:async(t,a)=>{var n;await(null==(n=o.value)?void 0:n.onActionClick(t,e.row,a))}}},render(){var e,t,a,n;let i,l=null;return l=(null==(e=this.nodeColumn)?void 0:e.nodeEditItem)?o(s("iBizTreeGridExEditColumn"),{controller:this.nodeColumn,row:this.row},null):(null==(t=this.nodeColumn)?void 0:t.codeList)?o(s("iBizCodeList"),{class:this.ns.e("text"),codeListItems:this.nodeColumn.codeListItems,codeList:this.nodeColumn.codeList,value:this.fieldValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:ht(this.tooltip)},null):o("span",{class:this.ns.e("text"),title:ht(this.tooltip),onClick:this.onTextClick},[this.showText]),this.$slots.actions?i=this.$slots.actions():this.row.columnActionsStates[this.controller.name]&&(i=o(s("iBizActionToolbar"),{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",!!i)]},[o("div",{class:this.ns.b("text-container")},[l]),o("div",{class:this.ns.b("toolbar-container")},[i])])}});var gh=Object.defineProperty,fh=(e,t,a)=>(((e,t,a)=>{t in e?gh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class yh{constructor(){fh(this,"component","IBizTreeGridExFieldColumn")}async createController(e,t){const a=new un(e,t);return await a.init(),a}}const Ch=U(wh,(function(e){e.component(wh.name,wh),hn("DEFGRIDCOLUMN",(()=>new yh))}));const Ih=a({name:"IBizTreeGridExEditColumn",props:{controller:{type:mn,required:!0},row:{type:pn,required:!0}},setup(e){const t=l((()=>e.row.data[e.controller.name])),a=B("tree-grid-ex-edit-column"),o=n(),s=e.controller,{gridEditItemProps:i,editorProps:r}=(()=>{switch(ibiz.config.grid.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)),s=l((()=>!!e.row.errors[a.name])),i=l((()=>e.row.editColStates[a.name].editable)),r=t=>{e.row.editColStates[a.name].editable=t},c=l((()=>!n.value&&!o.value&&!s.value)),d=l((()=>s.value||c.value&&i.value)),u=l((()=>!d.value)),p=l((()=>!s.value)),h=l((()=>c.value&&!i.value)),m=l((()=>c.value));let b;return{gridEditItemProps:g({showEditMask:h,stopPropagation:m,onMaskClick:()=>{r(!0),b=G(t,(async e=>{r(!1),b.stop()}))}}),editorProps:g({autoFocus:p,disabled:!1,readonly:u,onBlur:()=>{ibiz.log.debug("".concat(a.name,"属性编辑器blur事件")),r(!1),"cell-blur"===ibiz.config.grid.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)),s=l((()=>e.row.editColStates[a.name].editable)),i=l((()=>o.value||!s.value)),r=l((()=>s.value&&n.value)),c=l((()=>s.value));return{gridEditItemProps:g({stopPropagation:c}),editorProps:g({disabled:r,readonly:i})}}(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)),s=l((()=>e.controller.treeGrid.state.rowEditOpen)),i=l((()=>o.value||!s.value)),r=l((()=>s.value&&n.value)),c=l((()=>s.value));return{gridEditItemProps:g({stopPropagation:c}),editorProps:g({disabled:r,readonly:i,onBlur:()=>{a.treeGrid.save(e.row.data)}})}}(e);default:throw new bt(ibiz.i18n.t("control.common.noSupportItem",{name:ibiz.config.grid.editShowMode}))}})(),c=n(void 0),d=l((()=>{if(r.readonly)return bo(c.value)?s.formatValue(t.value):c.value}));return{ns:a,fieldValue:t,componentRef:o,tooltip:d,rowDataChange:async(t,a)=>{ibiz.log.debug("".concat(s.name,"值变更"),t),await s.setRowValue(e.row,t,a)},onInfoTextChange:e=>{c.value=e},gridEditItemProps:i,editorProps:r}},render(){return o(s("iBizGridEditItem"),{ref:"componentRef",required:!this.controller.nodeEditItem.allowEmpty,overflowMode:this.controller.overflowMode,class:[this.ns,this.ns.m(this.controller.overflowMode)],...this.gridEditItemProps},{default:()=>[this.controller.editorProvider&&r(s(this.controller.editorProvider.gridEditor),{class:this.ns.e("editor"),value:this.fieldValue,data:this.row.data,controller:this.controller.editor,overflowMode:this.controller.overflowMode,onChange:this.rowDataChange,onInfoTextChange:this.onInfoTextChange,title:this.tooltip,...this.editorProps})]})}}),Ph=a({name:"IBizTreeGridExUAColumn",props:{controller:{type:bn,required:!0},row:{type:pn,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(s("iBizActionToolbar"),{"action-details":a.uiactionGroupDetails,"actions-state":this.row.columnActionsStates[this.controller.model.codeName],onActionClick:this.onActionClick},null)])}});var Dh=Object.defineProperty,Eh=(e,t,a)=>(((e,t,a)=>{t in e?Dh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kh{constructor(){Eh(this,"component","IBizTreeGridExUAColumn")}async createController(e,t){const a=new bn(e,t);return await a.init(),a}}const xh=U(Ph,(function(e){e.component(Ph.name,Ph),hn("UAGRIDCOLUMN",(()=>new kh))})),zh=e("aq",U(hh,(function(e){e.component(hh.name,hh),e.component(Ih.name,Ih),Xt($t.TREE_GRIDEX,(()=>new vh)),e.use(Ch),e.use(xh)}))),Sh=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=F(((...e)=>new vn(...e))),n=B("control-grid"),i=B("control-".concat(a.model.controlType.toLowerCase())),{tableRef:r,onRowClick:c,onDbRowClick:d,onSelectionChange:u,onSortChange:p,handleRowClassName:h}=Ji(a),{onPageChange:m,onPageRefresh:b,onPageSizeChange:w}=Qi(a),{tableData:g,renderColumns:f,defaultSort:y,summaryMethod:C}=Zi(a,e),{renderPopover:I}=al(r,a),{headerCssVars:P}=el(r,n),E=e=>{const t=e.clone();return t.hasChildren=a.state.items.some((t=>e[a.treeGridValueField]===t[a.treeGridParentField])),t.children=[],t},k=l((()=>{const e=a.state.rows.map((e=>E(e.data))),t=[],n=[];return e.forEach((e=>{const t=e[a.treeGridValueField];t&&n.push(t)})),e.forEach((e=>{n.includes(e[a.treeGridParentField])||t.push(e)})),t}));return{c:a,ns:n,ns2:i,tableRef:r,treeGirdData:k,tableData:g,renderColumns:f,renderColumn:(e,n)=>t[e.id]?D(t,e.id,{model:e,data:a.state.items}):_l(a,e,f.value,n),defaultSort:y,onDbRowClick:d,onRowClick:c,onSelectionChange:u,onSortChange:p,onPageChange:m,onPageSizeChange:w,onPageRefresh:b,handleRowClassName:h,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")));return t?o(s("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:n.b("quick-toolbar")},null):o(s("iBizNoData"),{text:a.model.emptyText,emptyTextLanguageRes:a.model.emptyTextLanguageRes},null)}return null},loadData:async(e,t,n)=>{n(a.state.rows.map((e=>E(e.data))).filter((t=>e[a.treeGridValueField]===t[a.treeGridParentField])))},summaryMethod:C,renderPopover:I,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")},[v("|")]),o(s("iBizToolbarControl"),{modelData:t,context:a.context,params:a.params,class:n.b("batch-toolbar-items")},null)])])},headerCssVars:P}},render(){const e=this.c.state,{hideHeader:t,enablePagingBar:a}=this.c.model;return o(s("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:()=>[this.c.state.isLoaded&&o(s("el-table"),{ref:"tableRef",class:this.ns.e("table"),"default-sort":this.defaultSort,border:!0,"show-header":!t,"show-summary":this.c.enableAgg,"summary-method":this.summaryMethod,"highlight-current-row":e.singleSelect,"row-class-name":this.handleRowClassName,"row-key":"srfkey",data:this.c.state.showTreeGrid?this.treeGirdData:this.tableData,onRowClick:this.onRowClick,onRowDblclick:this.onDbRowClick,onSelectionChange:this.onSelectionChange,onSortChange:this.onSortChange,"tooltip-effect":"light","tree-props":{children:"children",hasChildren:"hasChildren"},load:this.loadData,lazy:!0},{empty:this.renderNoData,default:()=>[!e.singleSelect&&o(s("el-table-column"),{"class-name":this.ns.e("selection"),type:"selection",width:"55"},null),e.isCreated&&this.renderColumns.map(((e,t)=>this.renderColumn(e,t)))],append:()=>this.renderPopover()}),a&&o(s("iBizPagination"),{total:e.total,curPage:e.curPage,size:e.size,totalPages:e.totalPages,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null),this.c.model.enableCustomized&&!t&&o("div",{class:this.ns.b("setting-box")},[o(s("iBizGridSetting"),{columnStates:e.columnStates,controller:this.c},null)]),this.renderBatchToolBar()]})}});var Th=Object.defineProperty,_h=(e,t,a)=>(((e,t,a)=>{t in e?Th(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Oh{constructor(){_h(this,"component","IBizTreeGridControl")}}const Bh=e("ar",U(Sh,(function(e){e.component(Sh.name,Sh),Xt($t.TREEGRID,(()=>new Oh))})));const jh=a({name:"IBizMEditViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const e=F(((...e)=>new wn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(null),o=n(0);let s=null;return d((()=>{a.value&&(s=new MutationObserver((()=>{const t=a.value.scrollHeight;t!==o.value&&e.state.isNeedScroll&&(o.value=t,a.value.scrollTop=t)})),s.observe(a.value,{childList:!0,attributes:!0,characterData:!0,subtree:!0}))})),C((()=>{s&&s.disconnect()})),{c:e,ns:t,panelContent:a,handleDelete:t=>{e.handleDelete(t)}}},render(){const e=s("IBizViewShell"),t=()=>{let t;return o(s("el-tabs"),{class:this.ns.b("tabs"),modelValue:this.c.state.activeTab,"onUpdate:modelValue":e=>this.c.state.activeTab=e},(a=t=this.c.state.panelUiItems.map(((t,a)=>o(s("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:()=>this.c.handleTabDelete(t,a)},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)})}))),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!i(a)?t:{default:()=>[t]}));var a},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)}),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(s("iBizControlBase"),{controller:this.c},{default:()=>[o("div",{class:this.ns.b("content"),ref:"panelContent"},[this.c.state.panelUiItems.length>0?n():null])]})}});var Ah=Object.defineProperty,Nh=(e,t,a)=>(((e,t,a)=>{t in e?Ah(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Rh{constructor(){Nh(this,"component","IBizMEditViewPanelControl")}}const Mh=e("as",U(jh,(function(e){e.component(jh.name,jh),Xt($t.MULTI_EDIT_VIEWPANEL,(()=>new Rh))}))),Lh=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},loadDefault:{type:Boolean,default:!0}},setup(){const e=F(((...e)=>new gn(...e))),t=B("control-".concat(e.model.controlType.toLowerCase())),a=n(),o=l((()=>({strAreaCode:e.state.strAreaCode,defaultAreaCode:e.state.defaultAreaCode,jsonBaseUrl:e.state.jsonBaseUrl})));return{c:e,ns:t,mapRef:a,mapOpts:o}},render(){const{state:e}=this.c;return o(s("iBizControlBase"),{controller:this.c},{default:()=>[e.isLoaded&&o(s("iBizMapChart"),{areaData:e.areaData,pointData:e.pointData,options:this.mapOpts,class:this.ns.e("map"),onMapChange:e=>{this.c.onMapChange(e.areaCode)},onPointChange:e=>{this.c.onAreaClick(e)},onAreaChange:e=>{this.c.onPointClick(e)}},null)]})}});var Vh=Object.defineProperty,Fh=(e,t,a)=>(((e,t,a)=>{t in e?Vh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Uh{constructor(){Fh(this,"component","IBizMapControl")}}const qh=e("at",{install(e){e.component(Lh.name,Lh),Xt($t.MAP,(()=>new Uh))}});const Gh=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=F(((...e)=>new fn(...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(s("iBizUserReportPanel"),{controller:e},null);case"USER2":return o(s("iBizUser2ReportPanel"),{controller:e},null);case"DESYSBIREPORTS":case"SYSBICUBE":case"DESYSBICUBES":case"ALLSYSBICUBES":case"SYSBIREPORT":case"SYSBICUBEREPORTS":case"ALLSYSBIREPORTS":return o(s("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(s("iBizControlBase"),{controller:this.c},"function"==typeof(t=e=this.renderContent())||"[object Object]"===Object.prototype.toString.call(t)&&!i(t)?e:{default:()=>[e]})}});var Hh=Object.defineProperty,Wh=(e,t,a)=>(((e,t,a)=>{t in e?Hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Kh{constructor(){Wh(this,"component","IBizReportPanelControl")}}const Xh=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(s("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)])}}),$h=U(Xh,(function(e){e.component(Xh.name,Xh)})),Yh=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]&&yn.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")])}}),Jh=U(Yh,(function(e){e.component(Yh.name,Yh)})),Qh=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(s("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)])}}),Zh=U(Qh,(function(e){e.component(Qh.name,Qh)})),em=e("au",U(Gh,(function(e){e.use($h),e.use(Jh),e.use(Zh),e.component(Gh.name,Gh),Xt($t.REPORT_PANEL,(()=>new Kh))}))),tm=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 i=F(((...e)=>new Cn(...e))),c=n(),u=n(!1),p=B("control-".concat(i.model.controlType.toLowerCase())),h=n(!1),m=s("IBizRawItem"),b=s("IBizIcon");let v=!1;const w=[],g=["blue","light-blue","blue-cyan","pink","purple","violet","indigo","cyan","teal","green","light-green","lime","yellow","amber","orange","grey","sky-blue"],y=null==(a=f())?void 0:a.appContext.app;d((()=>{t.import("@ibiz-template-plugin/gantt").then((e=>{const t=e.default;null==y||y.use(t),u.value=!0}))}));const C=e=>{const t=document.documentElement;return getComputedStyle(t).getPropertyValue(e)},I=l((()=>{var e,t;return{primaryColor:(null==(e=i.state.ganttStyle)?void 0:e.primaryColor)||C("--ibiz-color-primary"),textColor:(null==(t=i.state.ganttStyle)?void 0:t.textColor)||C("--ibiz-color-primary-text")}})),P=l((()=>{var e;const t={};return null==(e=i.model.detreeNodes)||e.forEach(((e,a)=>{const n=a%g.length;t[e.id]="rgba(".concat(C("--ibiz-".concat(g[n],"-0")),", 1)")})),t})),D=l((()=>!!i.state.isLoaded&&i.state.isLoading)),E=l((()=>i.state.isLoaded?i.model.rootVisible?i.state.rootNodes:i.state.rootNodes.reduce(((e,t)=>t._children?e.concat(t._children):e),[]):[])),k=l((()=>{const e=[];return i.state.columnStates.forEach((t=>{var a;const n=null==(a=i.columns[t.key])?void 0:a.model;!t.hidden&&n&&e.push(n)})),e})),x=l((()=>ibiz.i18n.getLang().toLowerCase())),z=(e,t)=>{v||h.value?h.value=!1:(i.onTreeNodeClick(e,t),v=!0,setTimeout((()=>{v=!1}),200))},S=e=>{i.onDbTreeNodeClick(e)};i.evt.on("onNewRow",(e=>{var t;const a=e.row.data;null==(t=c.value)||t.setExpand(a)}));const T=(e,t,a,n)=>{const s=[];return e.forEach((e=>{var l;if("SEPERATOR"===e.itemType)return void s.push({divided:"self"});const r=n[e.id];if(r&&!r.visible)return;const c={};if(e.showCaption&&e.caption&&(c.label=e.caption),e.sysImage&&e.showIcon&&(c.icon=o(b,{icon:e.sysImage},null)),"DEUIACTION"===e.itemType){c.disabled=r.disabled,c.clickClose=!0;const{uiactionId:n}=e;n&&(c.onClick=()=>{i.doUIAction(n,t,a,e.appId)})}else if("RAWITEM"===e.itemType){const{rawItem:t}=e;t&&(c.label=o(m,{rawItem:e},null))}else"ITEMS"===e.itemType&&(null==(l=e.detoolbarItems)?void 0:l.length)&&(c.children=T(e.detoolbarItems,t,a,n));s.push(c)})),s};let _;i.evt.on("onMounted",(()=>{if(Object.values(i.contextMenus).length>0){(()=>t.import("@imengyu/vue3-context-menu"))().then((e=>{_=e.default,_.default&&!_.showContextMenu&&(_=_.default)}))}}));const O=()=>o(s("x-gantt-slider"),{"allow-link":!1,move:i.state.sliderDraggable,"resize-left":i.state.sliderDraggable,"resize-right":i.state.sliderDraggable},{content:({row:e})=>o(s("el-popover"),{placement:"bottom",width:"auto","popper-style":{"min-width":"300px"}},{reference:()=>o("div",{class:p.e("slider"),style:{background:P.value[e._nodeId]},onClick:t=>z(e,t),onDblclick:()=>S(e),onContextmenu:t=>(async(e,t)=>{t.stopPropagation(),t.preventDefault();const a=i.getNodeModel(e._nodeId);if(!(null==a?void 0:a.decontextMenu))return;const n=i.contextMenus[a.decontextMenu.id];if(!n.model.detoolbarItems)return;await n.calcButtonState(e._deData||(e.srfkey?e:void 0),a.appDataEntityId);const o=n.state.buttonsState,s=T(n.model.detoolbarItems,e,t,o);s.length&&_.showContextMenu({x:t.x,y:t.y,customClass:p.b("context-menu"),items:s})})(e,t)},null),default:()=>{const t=(e=>{var t;let a;const n=i.getNodeModel(e);return null==(t=null==n?void 0:n.controlRenders)||t.forEach((e=>{"LAYOUTPANEL"===e.renderType&&(a=e.layoutPanel)})),a})(e._nodeId);return t?(a=t,n=e._deData,o(s("iBizControlShell"),{data:n,modelData:a,context:i.context,params:i.params},null)):(e=>o("div",{class:p.em("slider","container")},[o("div",{class:p.em("slider","container-title")},[o("div",{class:"number"},[e._icon&&o(b,{class:"icon",icon:e._icon},null),e._snDataItemValue]),o("div",{class:"caption"},[e._text])])]))(e);var a,n}})});return{c:i,ns:p,ganttRef:c,isInited:u,data:E,locale:x,columns:k,onCheck:(e,t)=>{if(e)w.push(t);else{const e=w.findIndex((e=>e._id===t._id));e>-1&&w.splice(e,1)}i.setSelection(w)},loading:D,ganttStyle:I,onNodeClick:z,onNodeDbClick:S,onNodeExpand:e=>{i.onExpandChange(e,!0),e&&!e._children&&i.refreshNodeChildren(e)},onNodeCollapse:e=>{i.onExpandChange(e,!1)},renderContent:()=>[...k.value.map(((e,t)=>((e,t)=>{const{caption:a,codeName:n,width:l,headerSysCss:c,align:d}=e,u=i.columns[n];return o(s("x-gantt-column"),{label:a,prop:n,width:l&&l>30?l:30,center:"center"===(null==d?void 0:d.toLowerCase())},{title:({label:e})=>o("div",{class:null==c?void 0:c.cssName},[e]),default:({row:e})=>{const t=i.getRowState(e._id);if(t){const e=s(i.providers[n].component);return r(e,{controller:u,row:t,key:t.data._uuid+n})}return null}})})(e))),O()],onSliderMove:e=>{var t;const a=null==(t=e[0])?void 0:t.row,n={begin:a._beginDataItemValue?ho(a._beginDataItemValue).format("YYYY-MM-DD HH:mm:ss"):void 0,end:a._endDataItemValue?ho(a._endDataItemValue).format("YYYY-MM-DD HH:mm:ss"):void 0};h.value=!0,i.modifyNodeTime(a,n)},renderNoData:()=>{const{isLoaded:e}=i.state;return e&&o(s("iBizNoData"),{text:i.model.emptyText,emptyTextLanguageRes:i.model.emptyTextLanguageRes},null)},allowDrop:(e,t,a)=>{const n=_c(e._uuid,i),o=_c(t._uuid,i);return i.calcAllowDrop(n,o,a)},allowDrag:e=>{const t=_c(e._uuid,i);return i.calcAllowDrag(t)},handleDrop:(e,t,a)=>{const n=_c(e._uuid,i),o=_c(t._uuid,i),s=Oc(a);i.onNodeDrop(n,o,s)}}},render(){var e;return this.isInited?h(o(s("iBizControlBase"),{controller:this.c,class:[this.ns.b(),(null==(e=this.data)?void 0:e.length)?"":this.ns.m("empty")]},{default:()=>[o(s("x-gantt"),{ref:"ganttRef","data-id":"_id",data:this.data,"row-height":46,"expand-all":!1,"start-key":"_beginDataItemValue","end-key":"_endDataItemValue",children:"_children",leaf:"_leaf","expand-key":"_defaultExpand",locale:this.locale,draggable:{level:"all",draggable:!0},"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,onMoveSlider:this.onSliderMove,primaryColor:this.ganttStyle.primaryColor,headerStyle:{textColor:this.ganttStyle.textColor}},{default:()=>this.renderContent(),empty:()=>this.renderNoData()})]}),[[w("loading"),this.loading]]):null}});var am=Object.defineProperty,nm=(e,t,a)=>(((e,t,a)=>{t in e?am(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class om{constructor(){nm(this,"component","IBizGanttControl")}}const sm=e("av",U(tm,(function(e){e.component(tm.name,tm),Xt($t.GANTT,(()=>new om))})));const im=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}},setup(e,{emit:t}){const a=F(((...e)=>new In(...e))),o=B("context-menu"),s=e.modelData.detoolbarItems,i=n([]),l=n([]),r=n(),d=n(),u=n(!1),p=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)),p(e.detoolbarItems)}))};s&&(p(s),s.forEach((t=>{t.actionLevel&&-1===e.groupLevelKeys.findIndex((e=>e===t.actionLevel))?i.value.push(t):l.value.push(t)})));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)}));return{c:a,ns:o,expandDetails:i,groupDetails:l,groupButtonRef:r,dropdownRef:d,popoverVisible:u,handleClick:async(a,n)=>{"buttons"===e.mode?u.value=!1:d.value&&d.value.handleClose(),n.stopPropagation(),u.value=!1,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))]},actionDetails:s}},render(){const e=this.actionDetails||[],t=e=>o(s("el-divider"),{class:this.ns.e("separator"),"border-style":"double",direction:e?"vertical":"horizontal"},null),a=(e,n=!0)=>e.map((e=>{var i,l;return(null==(i=this.c.state.buttonsState[e.id])?void 0:i.visible)?"SEPERATOR"===e.itemType?t(n):"DEUIACTION"===e.itemType||"ITEMS"===e.itemType&&!(null==(l=e.detoolbarItems)?void 0:l.length)?[e.addSeparator&&t(n),o(s("el-button"),{text:!0,size:"small",onClick:t=>this.handleClick(e,t),title:ht(e.tooltip),disabled:this.c.state.buttonsState[e.id].disabled,class:this.calcActionItemClass(e)},{default:()=>[o("div",{class:this.ns.e("action-content")},[e.showIcon&&e.sysImage&&o("div",{class:this.ns.e("action-content-icon")},[o(s("iBizIcon"),{icon:e.sysImage},null)]),e.showCaption?o("div",{class:this.ns.e("action-content-caption")},[e.caption]):""])]})]:"ITEMS"===e.itemType?o(s("el-popover"),{placement:"right-start","popper-class":this.ns.e("popover"),teleported:!1},{reference:()=>[e.addSeparator&&t(n),o(s("el-button"),{text:!0,size:"small",onClick:t=>this.handleClick(e,t),title:ht(e.tooltip),disabled:this.c.state.buttonsState[e.id].disabled,class:this.calcActionItemClass(e)},{default:()=>[o("div",{class:this.ns.e("action-content")},[e.showIcon&&e.sysImage&&o("div",{class:this.ns.e("action-content-icon")},[o(s("iBizIcon"),{icon:e.sysImage},null)]),e.showCaption?o("div",{class:[this.ns.e("action-content-caption"),this.ns.e("action-content-group-caption")]},[e.caption]):"",o("ion-icon",{class:this.ns.e("action-content-group-icon"),name:"chevron-forward-outline"},null)])]})],default:()=>a(e.detoolbarItems||[],n)}):null:null})),n=()=>{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(s("el-button"),{size:"small",text:!0,disabled:t,ref:"groupButtonRef",class:[this.ns.e("item"),this.ns.is("expand",this.popoverVisible)]},{icon:()=>o("ion-icon",{class:this.ns.e("icon"),name:"ellipsis-vertical"},null)}),o(s("el-popover"),{placement:"bottom-start","virtual-ref":this.groupButtonRef,trigger:"click",visible:this.popoverVisible,"onUpdate:visible":e=>this.popoverVisible=e,"popper-class":this.ns.e("popover"),"virtual-triggering":!0,transition:"none"},(n=e=a(this.groupDetails,!1),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?e:{default:()=>[e]}))];var n};if(this.c.state.buttonsState.visible)return"buttons"===this.mode?o("div",{class:[this.ns.b(),this.ns.m("buttons")],onClick:e=>e.stopPropagation()},[a(this.expandDetails),n()]):o(s("el-dropdown"),{ref:"dropdownRef",onCommand:e=>this.handleClick(e,new MouseEvent("click")),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(s("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(s("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("disabled",!1)],title:ht(e.tooltip),disabled:this.c.state.buttonsState[e.id].disabled,command:e},{default:()=>[e.showIcon&&e.sysImage&&o(s("iBizIcon"),{icon:e.sysImage},null),e.showCaption?e.caption:""]}):null}))]})})}});var lm=Object.defineProperty,rm=(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 cm{constructor(){rm(this,"component","IBizContextMenuControl")}}const dm=e("aw",U(im,(function(e){e.component(im.name,im),Xt($t.CONTEXT_MENU,(()=>new cm))}))),um=a({name:"IBizAuthUserinfo",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){var t;const a=B("user-info"),n=e.controller,{srfusername:o=ibiz.i18n.t("panelComponent.authUserinfo.visitor"),loginname:s}=(null==(t=ibiz.appData)?void 0:t.context)||{},i=Eo(),r=z("ctx",void 0),c=l((()=>(null==r?void 0:r.view)&&r.view.model.mainMenuAlign||"LEFT")),d=l((()=>n.panel.view.state.isCollapse));return{ns:a,c:n,onClick:()=>{ibiz.hub.controller.logout()},srfusername:o,loginname:s,router:i,menuAlign:c,isCollapse:d}},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)]},[o(s("el-dropdown"),null,{default:()=>o("div",{class:[this.ns.b("info"),this.ns.is("collapse",this.isCollapse)]},[o("div",{class:this.ns.b("label")},[o(s("el-avatar"),{class:this.ns.b("avatar"),src:"./assets/images/user-avatar.png"},null),!this.isCollapse&&o("div",{class:this.ns.b("name")},[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(s("el-dropdown-menu"),null,{default:()=>[o(s("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 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","IBizAuthUserinfo")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const bm=e("ay",U(um,(function(e){e.component(um.name,um),Dn("RAWITEM_AUTH_USERINFO",(()=>new mm))})));var vm=Object.defineProperty,wm=(e,t,a)=>(((e,t,a)=>{t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class gm extends En{constructor(){super(...arguments),wm(this,"currentKey",""),wm(this,"cacheKeys",["RouterShell"]),wm(this,"navViewMsgs",{}),wm(this,"operateSort",[])}}e("az",gm);var fm=Object.defineProperty,ym=(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 Cm extends Pn{constructor(){super(...arguments),ym(this,"viewModals",{}),ym(this,"router"),ym(this,"autoGoLast",!0),ym(this,"noCache",!1),ym(this,"rawItemParams",{})}createState(){var e;return new gm(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 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;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 ia({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},W.active(e))}onViewCreated(e){if(this.navTabs){const{view:t}=e,a=this.state.currentKey;this.navTabs.updateViewInfo(a,{caption:t.model.caption}),t.evt.on("onViewInfoChange",(({caption:e,dataInfo:t})=>{this.navTabs.updateViewInfo(a,{caption:e,dataInfo:t})}))}}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.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){W.close(e,t),this.navTabs&&this.navTabs.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;uo(a)&&(t=a.reduce(((e,t)=>(e[t.key.toLowerCase()]=t.value,e)),{})),Object.assign(this.rawItemParams,t)}}e("aA",Cm);const Im=a({name:"IBizNavPosIndex",props:{modelData:{type:Object,required:!0},controller:{type:Cm,required:!0}},setup(e){var t;const a=e.controller,n=B("nav-pos-index"),o=Eo();if(a.setRouter(o),a.routeDepth&&(ie((e=>{a.onRouteChange(e)}),a.routeDepth+1),"APPINDEXVIEW"===a.panel.view.model.viewType&&!a.navTabs)){const e=Do();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;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(s("iBizRouterView"),{manualKey:a,modal:t[a],onCreated:this.onViewCreated},{default:({Component:e})=>this.c.noCache?e?o(e,null,null):null:o(s("keepAlive"),{include:n,max:30,isKey:!0},{default:()=>[e&&o(e,null,null)]})}):o("div",null,[ibiz.i18n.t("panelComponent.navPosIndex.noSupportPrompt")])])}});var Pm=Object.defineProperty,Dm=(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 Em{constructor(){Dm(this,"component","IBizNavPosIndex")}async createController(e,t,a){const n=new Cm(e,t,a);return await n.init(),n}}const km=e("aB",U(Im,(function(e){e.component(Im.name,Im),Dn("RAWITEM_NAV_POS_INDEX",(()=>new Em))})));var xm=Object.defineProperty,zm=(e,t,a)=>(((e,t,a)=>{t in e?xm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Sm extends En{constructor(){super(...arguments),zm(this,"currentKey",""),zm(this,"tabItems",[]),zm(this,"activeTab","")}}class Tm extends Pn{createState(){var e;return new Sm(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))}onTabClick(e){var t;null==(t=this.navPos)||t.changeView(e)}updateViewInfo(e,t){const a=this.findTabItem(e);a?(Object.assign(a,go(bo,t)),this.refreshItemUI()):(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(){const e={key:"exampleItem",caption:""};this.state.tabItems.push(e),this.state.activeTab=e.key,u((()=>{this.state.tabItems.pop(),this.state.activeTab=this.state.tabItems[this.state.tabItems.length-1].key}))}}function _m(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Om=a({name:"IBizNavTabs",props:{modelData:{type:Object,required:!0},controller:{type:Tm,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(s("el-tabs"),{type:"card",modelValue:t.activeTab,"onUpdate:modelValue":e=>t.activeTab=e,closable:!0,onTabClick:this.changePage,onTabRemove:this.onTabRemove},_m(e=t.tabItems.map((e=>{let t=e.caption;return e.dataInfo&&(t+=" - ".concat(e.dataInfo)),o(s("el-tab-pane"),{name:e.key,key:e.key,label:t},{label:()=>o("div",{class:this.ns.em("left","caption")},[t])})})))?e:{default:()=>[e]})]),o("div",{class:this.ns.e("right")},[o(s("el-dropdown"),{onCommand:this.handleCommand},{default:()=>o(s("el-button"),{size:"small",type:"primary"},{default:()=>[ibiz.i18n.t("app.more"),o("ion-icon",{name:"arrow-down"},null)]}),dropdown:()=>{let e;return o(s("el-dropdown-menu"),null,_m(e=this.actions.map((e=>o(s("el-dropdown-item"),{command:e},{default:()=>[e.text]}))))?e:{default:()=>[e]})}})])])}});var Bm=Object.defineProperty,jm=(e,t,a)=>(((e,t,a)=>{t in e?Bm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Am{constructor(){jm(this,"component","IBizNavTabs")}async createController(e,t,a){const n=new Tm(e,t,a);return await n.init(),n}}const Nm=U(Om,(function(e){e.component(Om.name,Om),Dn("RAWITEM_NAV_TABS",(()=>new Am))}));var Rm=Object.defineProperty,Mm=(e,t,a)=>(((e,t,a)=>{t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Lm extends En{constructor(){super(...arguments),Mm(this,"loading",!1),Mm(this,"uiActionState")}}class Vm extends Pn{createState(){var e;return new Lm(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 kn(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 yn.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},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("aD",Vm);const Fm=a({name:"IBizPanelButton",props:{modelData:{type:Object,required:!0},controller:{type:Vm,required:!0}},setup(e){const t=B("panel-button"),{caption:a,captionItemName:o,renderMode:s,showCaption:i,sysImage:r,codeName:c,itemStyle:d,tooltip:u,buttonCssStyle:p}=e.modelData,{panel:h,state:m}=e.controller,b=n("");p&&(b.value=p);const v=l((()=>o&&h.data?h.data[o.toLowerCase()]:a));let w=!1;Object.is(s,"LINK")&&(w=!0);return{ns:t,isText:w,captionText:v,buttonType:l((()=>{if(Object.is(s,"LINK"))return null;switch(d){case"PRIMARY":return"primary";case"SUCCESS":return"success";case"INFO":case"INVERSE":return"info";case"WARNING":return"warning";case"DANGER":return"danger";default:return null}})),showCaption:i,sysImage:r,codeName:c,state:m,tooltip:u,handleButtonClick:async t=>{try{m.loading=!0,await e.controller.onActionClick(t),e.controller.onClick()}finally{m.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(s("el-button"),{type:this.buttonType,text:this.isText,title:ht(this.tooltip),disabled:this.state.disabled,loading:this.state.loading,onClick:this.handleButtonClick},{default:()=>[o("div",{class:this.ns.b("content")},[o(s("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 Um=Object.defineProperty,qm=(e,t,a)=>(((e,t,a)=>{t in e?Um(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Gm{constructor(){qm(this,"component","IBizPanelButton")}async createController(e,t,a){const n=new Vm(e,t,a);return await n.init(),n}}const Hm=e("aC",U(Fm,(function(e){e.component(Fm.name,Fm),Dn("BUTTON",(()=>new Gm))})));var Wm=Object.defineProperty,Km=(e,t,a)=>(((e,t,a)=>{t in e?Wm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Xm extends En{constructor(){super(...arguments),Km(this,"caption",""),Km(this,"caption2",""),Km(this,"subCaption",""),Km(this,"subCaption2",""),Km(this,"icon",""),Km(this,"icon2",""),Km(this,"isSvg",!1)}}var $m=Object.defineProperty,Ym=(e,t,a)=>(((e,t,a)=>{t in e?$m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Jm extends Pn{constructor(){super(...arguments),Ym(this,"captionSplit","|")}createState(){var e;return new Xm(null==(e=this.parent)?void 0:e.state)}async onInit(){await super.onInit();const e=this.panel.view.model;e.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)}}e("aF",Jm);const Qm=a({name:"IBizPanelAppTitle",props:{modelData:{type:Object,required:!0},controller:{type:Jm,required:!0}},setup(e){const t=B("panel-app-title"),a=e.controller,n=Do(),o=Eo(),s=z("ctx",void 0),i=l((()=>(null==s?void 0:s.view)&&s.view.model.mainMenuAlign||"LEFT")),r=l((()=>"LEFT"===i.value)),c=l((()=>a.panel.view.state.isCollapse));return{ns:t,c:a,menuAlign:i,showImgOnly:r,handleClick:async()=>{if(null==s?void 0:s.view){const e=se(n);e.pathNodes=e.pathNodes.slice(0,1);const t=ce(e);o.push({path:t}),setTimeout((()=>{window.location.reload()}))}e.controller.onClick()},isCollapse:c}},render(){const{icon:e,isSvg:t,caption:a,caption2:n,subCaption:s,subCaption2:i}=this.c.state;let l=null;const r=o("span",{class:this.ns.e("title")},[a]);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")},[i])]);else l=o("span",{class:this.ns.e("logo")},[o("svg",{width:"256px",height:"90px",viewBox:"0 0 256 90",version:"1.1"},[o("g",{id:"画板",stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[o("text",{id:"Omni-OA","font-family":"Poppins-Bold, Poppins","font-size":"22","font-weight":"bold"},[o("tspan",{x:"20.961",y:"39"},[a])]),o("text",{id:"一体化办公平台","font-family":"PingFangSC-Semibold, PingFang SC","font-size":"18","font-weight":"bold"},[o("tspan",{x:"96",y:"73"},[s])])])])]);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)]));let c=null;return c="LEFT"===this.menuAlign?l:[l,r],o("div",{class:[this.ns.b(),this.ns.is("only-img",this.showImgOnly),this.ns.is("collapse",this.isCollapse),...this.controller.containerClass],onClick:this.handleClick},[c])}});var Zm=Object.defineProperty,eb=(e,t,a)=>(((e,t,a)=>{t in e?Zm(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","IBizPanelAppTitle")}async createController(e,t,a){const n=new Jm(e,t,a);return await n.init(),n}}const ab=e("aE",U(Qm,(function(e){e.component(Qm.name,Qm),Dn("RAWITEM_APP_APPTITLE",(()=>new tb))})));function nb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const ob=a({name:"IBizPanelAppHeader",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("panel-app-header"),{showCaption:a,titleBarCloseMode:o,id:s}=e.modelData,i=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(s)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),i&&t.m("collapsible"),t.is("collapse",i&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:d,changeCollapse:()=>{i&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],i=o(s("iBizRow"),{slot:"content",layout:this.modelData.layout},nb(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},nb(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[i])}});var sb=Object.defineProperty,ib=(e,t,a)=>(((e,t,a)=>{t in e?sb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class lb{constructor(){ib(this,"component","IBizPanelAppHeader")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const rb=U(ob,(function(e){e.component(ob.name,ob),Dn("CONTAINER_AppHeader",(()=>new lb))}));function cb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const db=a({name:"IBizPanelViewHeader",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("panel-view-header"),{showCaption:a,titleBarCloseMode:o,id:s}=e.modelData,i=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(s)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),i&&t.m("collapsible"),t.is("collapse",i&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{i&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],i=o(s("iBizRow"),{slot:"content",layout:this.modelData.layout},cb(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},cb(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[i])}});var ub=Object.defineProperty,pb=(e,t,a)=>(((e,t,a)=>{t in e?ub(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hb{constructor(){pb(this,"component","IBizPanelViewHeader")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const mb=U(db,(function(e){e.component(db.name,db),Dn("CONTAINER_ViewHeader",(()=>new hb))}));function bb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const vb=a({name:"IBizPanelExpHeader",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("panel-exp-header"),{showCaption:a,titleBarCloseMode:o,id:s}=e.modelData,i=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(s)];return!0===a&&(n=[...n,...e.controller.containerClass,a&&t.m("show-header"),i&&t.m("collapsible"),t.is("collapse",i&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{i&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],i=o(s("iBizRow"),{slot:"content",layout:this.modelData.layout},bb(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},bb(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[i])}});var wb=Object.defineProperty,gb=(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 fb{constructor(){gb(this,"component","IBizPanelExpHeader")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const yb=U(vb,(function(e){e.component(vb.name,vb),Dn("CONTAINER_Exp_Header",(()=>new fb))}));function Cb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Ib=a({name:"IBizPanelViewContent",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("panel-view-content"),{showCaption:a,titleBarCloseMode:o,id:s}=e.modelData,i=0!==o,r=n(2===o),c=l((()=>{let n=[t.b(),t.m(s)];return!0===a&&(n=[...n,...e.controller.containerClass,t.is("collapse",i&&r.value),t.is("hidden",!e.controller.state.visible)]),n}));return{ns:t,isCollapse:r,classArr:c,changeCollapse:()=>{i&&(r.value=!r.value)}}},render(){var e,t;let a;const n=(null==(t=(e=this.$slots).default)?void 0:t.call(e))||[],i=o(s("iBizRow"),{layout:this.modelData.layout},Cb(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},Cb(e)?e:{default:()=>[e]}):e})))?a:{default:()=>[a]});return o("div",{class:this.classArr},[i])}});var Pb=Object.defineProperty,Db=(e,t,a)=>(((e,t,a)=>{t in e?Pb(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","IBizPanelViewContent")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const kb=U(Ib,(function(e){e.component(Ib.name,Ib),Dn("CONTAINER_VIEWCONTENT",(()=>new Eb))}));var xb=Object.defineProperty,zb=(e,t,a)=>(((e,t,a)=>{t in e?xb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Sb extends En{constructor(){super(...arguments),zb(this,"activeTab","")}}class Tb extends Pn{createState(){var e;return new Sb(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}}function _b(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Ob=a({name:"IBizPanelTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:Tb,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(s("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],"model-value":this.state.activeTab,onTabClick:this.onTabClick},_b(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(s("el-tab-pane"),{class:this.ns.b("tab-item"),label:a.model.caption,name:a.model.id,lazy:!0},_b(e)?e:{default:()=>[e]}):null})))?a:{default:()=>[a]})}});var Bb=Object.defineProperty,jb=(e,t,a)=>(((e,t,a)=>{t in e?Bb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ab{constructor(){jb(this,"component","IBizPanelTabPanel")}async createController(e,t,a){const n=new Tb(e,t,a);return await n.init(),n}}const Nb=e("aG",U(Ob,(function(e){e.component(Ob.name,Ob),Dn("TABPANEL",(()=>new Ab))})));var Rb=Object.defineProperty,Mb=(e,t,a)=>(((e,t,a)=>{t in e?Rb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Lb extends Pn{constructor(){super(...arguments),Mb(this,"splitMode","horizontal"),Mb(this,"splitValue",.5),Mb(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.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("aH",Lb);const Vb=a({name:"IBizSplitContainer",props:{modelData:{type:Object,required:!0},controller:{type:Lb,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(s("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 Fb=Object.defineProperty,Ub=(e,t,a)=>(((e,t,a)=>{t in e?Fb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class qb{constructor(){Ub(this,"component","IBizSplitContainer")}async createController(e,t,a){const n=new Lb(e,t,a);return await n.init(),n}}const Gb=e("aI",U(Vb,(function(e){e.component(Vb.name,Vb),Dn("CONTAINER_CONTAINER_H_SPLIT",(()=>new qb)),Dn("CONTAINER_CONTAINER_V_SPLIT",(()=>new qb))}))),Hb=a({name:"IBizPanelIndexViewSearch",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("panel-index-view-search"),a=e.controller,o=n(""),s=jo((()=>{}),500),i=z("ctx",void 0),r=l((()=>(null==i?void 0:i.view)&&i.view.model.mainMenuAlign||"LEFT")),c=l((()=>a.panel.view.state.isCollapse)),d=l((()=>{const{id:a}=e.modelData,n=[t.b(),t.m(a),t.is("collapse",c.value)];return n.push(...e.controller.containerClass),n})),u=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(xn.TAG,e.appFuncId,t,{...n,srfquery:o.value},{})}}};return{ns:t,classArr:d,isCollapse:c,onInput:e=>{o.value=e,s()},onSearch:u,c:a,query:o,menuAlign:r,onEnter:e=>{"Enter"===e.key&&u()}}},render(){if(this.controller.state.visible)return o("div",{class:this.classArr},["LEFT"===this.menuAlign&&!this.isCollapse&&o(s("el-input"),{"model-value":this.query,class:this.ns.b("search"),placeholder:ibiz.i18n.t("component.indexSearch.placeholder"),onInput:this.onInput,onKeyup:this.onEnter},{prefix:()=>o("ion-icon",{class:this.ns.e("search-icon"),name:"search"},null)})])}});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 Xb{constructor(){Kb(this,"component","IBizPanelIndexViewSearch")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const $b=e("aJ",U(Hb,(function(e){e.component(Hb.name,Hb),Dn("RAWITEM_INDEX_VIEW_SEARCH",(()=>new Xb))})));class Yb extends En{}class Jb extends Pn{createState(){var e;return new Yb(null==(e=this.parent)?void 0:e.state)}}function Qb(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Zb=a({name:"IBizPanelAppLoginView",props:{modelData:{type:Object,required:!0},controller:{type:Jb,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))||[],i=o(s("iBizRow"),{slot:"content",layout:this.modelData.layout},Qb(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},Qb(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,i])}});var ev=Object.defineProperty,tv=(e,t,a)=>(((e,t,a)=>{t in e?ev(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class av{constructor(){tv(this,"component","IBizPanelAppLoginView")}async createController(e,t,a){const n=new Jb(e,t,a);return await n.init(),n}}const nv=U(Zb,(function(e){e.component(Zb.name,Zb),Dn("CONTAINER_APPLOGINVIEW",(()=>new av))}));class ov extends En{}class sv extends Pn{createState(){var e;return new ov(null==(e=this.parent)?void 0:e.state)}}const iv=a({name:"IBizPanelRememberMe",props:{modelData:{type:Object,required:!0},controller:{type:sv,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})),s=l({get:()=>n.panel.state.data.isRemember,set:e=>{n.panel.state.data.isRemember=e}});return{ns:t,classArr:o,c:n,isRemember:s}},render(){return o("div",{class:this.classArr},[o(s("el-checkbox"),{modelValue:this.isRemember,"onUpdate:modelValue":e=>this.isRemember=e,label:ibiz.i18n.t("app.rememberMe")},null)])}});var lv=Object.defineProperty,rv=(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 cv{constructor(){rv(this,"component","IBizPanelRememberMe")}async createController(e,t,a){const n=new sv(e,t,a);return await n.init(),n}}const dv=U(iv,(function(e){e.component(iv.name,iv),Dn("CONTAINER_REMEMBER_ME",(()=>new cv)),Dn("FIELD_AUTH_REMEMBERME",(()=>new cv))}));function uv(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const pv=a({name:"IBizIndexActions",props:{modelData:{type:Object,required:!0},controller:{type:de,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))||[],i=o(s("iBizRow"),{slot:"content",layout:this.modelData.layout},uv(a=n.map((e=>{const t=e.props;return t&&t.controller?o(s("iBizCol"),{layoutPos:t.modelData.layoutPos,state:t.controller.state},uv(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,i])}});var hv=Object.defineProperty,mv=(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 bv{constructor(){mv(this,"component","IBizIndexActions")}async createController(e,t,a){const n=new de(e,t,a);return await n.init(),n}}const vv=e("aK",U(pv,(function(e){e.component(pv.name,pv),Dn("CONTAINER_INDEX_ACTIONS",(()=>new bv))}))),wv={10:"未开始",20:"执行中",30:"已执行",40:"执行失败"},gv={10:"info",20:"",30:"success",40:"danger"},fv=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((()=>No(e.action.actionresult))),o=l((()=>!e.action.actiontype||n.value));return{ns:a,showErrorInfo:l((()=>e.action.actiontype&&Oo(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:ht(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(s("el-tag"),{type:gv[this.actionstate]},{default:()=>[wv[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)])])}}),yv=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,s=n([]),i=()=>{s.value=Pt(o.actions)};i(),o.evt.on("dataChange",i);return{ns:a,allItems:s,hiddenPopover:()=>{t("hiddenPopover")}}},render(){return o("div",{class:[this.ns.b()]},[this.allItems.length>0&&this.allItems.map((e=>{let t;try{t=ra(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 Cv(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const Iv=a({name:"IBizAsyncActionPreview",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup(e){const t=B("async-action-preview"),a=g({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 bt(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=Io.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 bt(ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.downloadFailedErr"));if(!t.data)throw new bt(ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.noExistentErr"));{const a=e.name;Dt(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(s("el-button"),{onClick:this.onDownLoad},Cv(e=ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.downloadErrFile"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:this.onClose},Cv(t=ibiz.i18n.t("app.close"))?t:{default:()=>[t]})])]),o("div",{class:this.ns.b("time")},[o(s("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.importTime")},{default:()=>[this.info.beginTime,v(" ~ "),this.info.endTime]})]),o(s("el-row"),{class:this.ns.b("count")},{default:()=>[o(s("el-col"),{span:8},{default:()=>[o(s("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.importTotal")},{default:()=>[this.info.total]})]}),o(s("el-col"),{span:8},{default:()=>[o(s("el-form-item"),{label:ibiz.i18n.t("panelComponent.userMessage.asyncActionPreview.successImport")},{default:()=>[this.info.success]})]}),o(s("el-col"),{span:8},{default:()=>[o(s("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])])])))])])}}),Pv=a({name:"IBizAsyncActionResult",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup:e=>({ns:B("async-action-preview"),message:l((()=>No(e.asyncAction.actionresult)?JSON.stringify(e.asyncAction.actionresult):"".concat(e.asyncAction.actionresult)))}),render(){return o("div",{class:[this.ns.b()]},[this.message])}});var Dv=Object.defineProperty,Ev=(e,t,a)=>(((e,t,a)=>{t in e?Dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kv{constructor(){Ev(this,"component",fv)}render(e){return r(this.component,{provider:this,...e})}async onClick(e,t){return Bo(e.actiontype)?(ibiz.overlay.modal((t=>r(Pv,{asyncAction:e,modal:t})),{},{width:"80%",height:"80%"}),!0):!!No(e.actionresult)&&(ibiz.overlay.modal((t=>r(Iv,{asyncAction:e,modal:t})),{},{width:"80%",height:"80%"}),!0)}}const xv={READ:"已阅读",SENT:"已发送",RECEIVED:"已接收",REPLIED:"已回复",SEND_FAILED:"发送失败",NOT_SENT:"未发送",DELETED:"已删除"},zv={READ:"",SENT:"success",RECEIVED:"success",REPLIED:"warning",SEND_FAILED:"danger",NOT_SENT:"info",DELETED:"info"},Sv=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,i=o("div",{class:this.ns.e("short-content")},[a]);return o(s("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(s("el-tag"),{class:this.ns.e("status"),type:zv[n]},{default:()=>[xv[n]]}),e]),i,o("div",{class:this.ns.e("create-time")},[t])])]})}});var Tv=Object.defineProperty,_v=(e,t,a)=>(((e,t,a)=>{t in e?Tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ov{constructor(){_v(this,"component",Sv),_v(this,"router",Eo())}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}=zn(e);ibiz.commands.execute(Sn.TAG,t,Et.create(a),n)}else if(e.startsWith("route://")){const t="/".concat(e.split("route://")[1]);this.router.push(t)}return!0}return!1}}const Bv=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)})),s=l((()=>{if(o.value)return[{icon:"link-outline",key:"openRedirectView",tooltip:ibiz.i18n.t("panelComponent.userMessage.internalMessageJson.jumpToView")}]}));return{ns:a,jsonContent:n,toolbarItems:s,redirectUrl:o,onToolbarClick:a=>{"openRedirectView"===a&&(e.provider.openRedirectView(e.message,o.value),t("close"))}}},render(){var e;let t=null;return t=(null==(e=this.jsonContent)?void 0:e.html)?o("div",{class:this.ns.e("content"),innerHTML:this.jsonContent.html},null):o("div",{class:this.ns.e("content")},[ibiz.i18n.t("panelComponent.userMessage.internalMessageJson.missingHtml")]),o(s("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(a=t)||"[object Object]"===Object.prototype.toString.call(a)&&!i(a)?t:{default:()=>[t]});var a}}),jv=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})),s=l((()=>void 0===e.clickable?ibiz.env.isMob?!!e.message.mobile_url:!!e.message.url:e.clickable));return{ns:a,isUnread:n,isClickable:s,finalToolbarItems:o,onToolbarClick:(a,n)=>{a.stopPropagation(),"read"===n?ibiz.hub.notice.internalMessage.markRead(e.message):t("toolbarClick",n)},onClick:async a=>{if(s.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(s("iBizIcon"),{class:this.ns.be("toolbar","button"),icon:{imagePath:"svg/read.svg"},baseDir:"iconfont",title:ht(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 Av=Object.defineProperty,Nv=(e,t,a)=>(((e,t,a)=>{t in e?Av(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Rv extends Ov{constructor(){super(...arguments),Nv(this,"component",Bv)}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 Mv=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((()=>hl(e.message.content)))}),render(){return o(s("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 Lv=Object.defineProperty,Vv=(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 Fv extends Ov{constructor(){super(...arguments),Vv(this,"component",Mv)}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 Uv=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(s("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 qv=Object.defineProperty,Gv=(e,t,a)=>(((e,t,a)=>{t in e?qv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Hv extends Ov{constructor(){super(...arguments),Gv(this,"component",Uv)}}const Wv=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"),s=e.controller,i="".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&&(s.load(),s.refreshUnreadCount(),l.value=!1)}));const r=n([]),u=g({total:0,pageSize:0,unreadOnly:s.unreadOnly}),p=()=>{r.value=mo(s.messages),u.total=s.total,u.pageSize=s.size};p();const h=e=>{u.unreadOnly=e};s.evt.on("dataChange",p),s.evt.on("unreadOnlyChange",h),C((()=>{s.evt.off("dataChange",p),s.evt.off("unreadOnlyChange",h)}));return d((()=>{(()=>{const e=localStorage.getItem(i);e&&("true"===e?(u.unreadOnly=!0,s.unreadOnly=!0):(u.unreadOnly=!1,s.unreadOnly=!1))})(),s.load()})),{ns:o,allItems:r,state:u,hiddenPopover:()=>{t("hiddenPopover")},showMore:()=>{s.loadMore()},switchChange:()=>{s.toggleUnReadOnly(),localStorage.setItem(i,s.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=Tn(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(s("el-switch"),{value:this.state.unreadOnly,onChange:this.switchChange,class:this.ns.be("footer","switch")},null)," ",ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.onlyShowUnread")])])}});const Kv=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,s=n(!1);let i=0;o.internalMessage.ns=t,o.internalMessage.provider=new Ov;const l=n("notification"),r=e.modelData.sysImage||{imagePath:"svg/message.svg"},c=n(),u=n(o.total),p=e=>{u.value=e};o.evt.on("totalChange",p);const h=()=>{if("hidden"===document.visibilityState)i=(new Date).getTime();else{((new Date).getTime()-i)/1e3>300&&(async()=>{const e=await ibiz.net.get("/appdata");e.ok&&(ibiz.appData=e.data)})()}};return d((()=>{document.addEventListener("visibilitychange",h)})),C((()=>{o.evt.off("totalChange",p),document.removeEventListener("visibilitychange",h)})),{ns:t,c:a,noticeController:o,noticeNum:u,popoverRef:c,showPopover:s,sysImage:r,currentTab:l,hiddenPopover:()=>{c.value.hide()},onBatchReadClick:()=>{o.internalMessage.batchMarkRead()}}},render(){return o("div",{title:ht(ibiz.i18n.t("panelComponent.userMessage.notice")),class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[o(s("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(s("el-badge"),{class:this.ns.e("badge"),value:this.noticeNum,hidden:0===this.noticeNum},{default:()=>[o(s("i-biz-icon"),{id:On.MESSAGE,class:[this.ns.e("image")],icon:this.sysImage},null)]}),default:()=>o("div",{class:this.ns.b("popover-content-box")},[o(s("el-tabs"),{class:this.ns.b("popover-content"),modelValue:this.currentTab,"onUpdate:modelValue":e=>this.currentTab=e},{default:()=>[o(s("el-tab-pane"),{label:ibiz.i18n.t("panelComponent.userMessage.notice"),name:"notification"},{default:()=>[o(Wv,{controller:this.noticeController.internalMessage,showPopover:this.showPopover,onHiddenPopover:this.hiddenPopover},null)]}),o(s("el-tab-pane"),{label:ibiz.i18n.t("panelComponent.userMessage.backendTasks"),name:"async-action"},{default:()=>[o(yv,{controller:this.noticeController.asyncAction,showPopover:this.showPopover,onHiddenPopover:this.hiddenPopover},null)]})]}),o("div",{class:this.ns.b("popover-icons")},[o(s("iBizIcon"),{class:this.ns.b("popover-icons-read"),icon:{imagePath:"svg/read.svg"},baseDir:"iconfont",title:ht(ibiz.i18n.t("panelComponent.userMessage.allRead")),onClick:this.onBatchReadClick},null)])])})])}});var Xv=Object.defineProperty,$v=(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 Yv{constructor(){$v(this,"component","IBizUserMessage")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const Jv=U(Kv,(function(e){e.component(Kv.name,Kv),e.component(fv.name,fv),Bn("DEIMPORTDATA2",(()=>new kv)),Bn("DEFAULT",(()=>new kv)),function(e){e.component(jv.name,jv),e.component(Sv.name,Sv),e.component(Bv.name,Bv),e.component(Mv.name,Mv),e.component(Uv.name,Uv),_n("DEFAULT",(()=>new Ov)),_n("JSON",(()=>new Rv)),_n("HTML",(()=>new Fv)),_n("TEXT",(()=>new Hv))}(e),Dn("RAWITEM_USERMESSAGE",(()=>new Yv))}));var Qv=Object.defineProperty,Zv=(e,t,a)=>(((e,t,a)=>{t in e?Qv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ew extends Pn{constructor(){super(...arguments),Zv(this,"searchFrom")}get searchButtonStyle(){return this.searchFrom.model.searchButtonStyle||"DEFAULT"}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 bt(ibiz.i18n.t("panelComponent.searchformButtons.errMessage"));this.searchFrom=e}onSearchButtonClick(){yn.execAndResolved("search",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view},this.panel.context.srfappid)}onResetButtonClick(){yn.execAndResolved("reset",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view},this.panel.context.srfappid)}}function tw(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const aw=a({name:"IBizSearchFormButtons",props:{modelData:{type:Object,required:!0},controller:{type:ew,required:!0}},setup(e){const t=B("searchform-buttons"),a=e.controller;return{ns:t,c:a,onSearchButtonClick:()=>{a.onSearchButtonClick()},onResetButtonClick:()=>{a.onResetButtonClick()},saveFilterConfirm:()=>{$o.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})=>{a.searchFrom.storeFilter(e)}))}}},render(){let e;return o("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},["SEARCHONLY"===this.controller.searchButtonStyle?o(s("el-button"),{onClick:this.onSearchButtonClick},tw(e=ibiz.i18n.t("app.search"))?e:{default:()=>[e]}):o(s("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(s("el-dropdown-menu"),null,{default:()=>[o(s("el-dropdown-item"),{onClick:this.onResetButtonClick},tw(e=ibiz.i18n.t("app.reset"))?e:{default:()=>[e]}),o(s("el-dropdown-item"),{onClick:this.saveFilterConfirm},tw(t=ibiz.i18n.t("panelComponent.searchformButtons.saveCondition"))?t:{default:()=>[t]}),this.controller.storedFilters.length>0&&this.controller.storedFilters.map(((e,t)=>o(s("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)])]})))]})}})])}});var nw=Object.defineProperty,ow=(e,t,a)=>(((e,t,a)=>{t in e?nw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sw{constructor(){ow(this,"component","IBizSearchFormButtons")}async createController(e,t,a){const n=new ew(e,t,a);return await n.init(),n}}const iw=U(aw,(function(e){e.component(aw.name,aw),Dn("RAWITEM_SEARCHFORM_BUTTONS",(()=>new sw))})),lw=a({name:"IBizViewMessage",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("view-message"),a=e.controller,n=ne(),{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(s("view-message"),{class:[this.ns.e("body-message")],messages:t},null)}return null}});var rw=Object.defineProperty,cw=(e,t,a)=>(((e,t,a)=>{t in e?rw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dw{constructor(){cw(this,"component","IBizViewMessage")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const uw=U(lw,(function(e){e.component(lw.name,lw),Dn("RAWITEM_VIEW_MESSAGE",(()=>new dw))})),pw=a({name:"IBizPanelStaticCarousel",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){var t;const a=B("panel-static-carousel"),o=e.modelData,s=n([]),i=n(!0),l=n(3e3),r=n("DEFAULT"),c=e=>{const t=e.find((e=>Object.is(e.key,"autoplay")));t&&(i.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)),s.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:s,isAuto:i,timeSpan:l,showMode:r}},render(){return o("div",{class:this.ns.b()},[o(s("iBizCarouselComponent"),{carouselData:this.carouselData,isAuto:this.isAuto,timeSpan:this.timeSpan,showMode:this.showMode},null)])}});var hw=Object.defineProperty,mw=(e,t,a)=>(((e,t,a)=>{t in e?hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bw{constructor(){mw(this,"component","IBizPanelStaticCarousel")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const vw=U(pw,(function(e){e.component(pw.name,pw),Dn("RAWITEM_STATIC_CAROUSEL",(()=>new bw))}));var ww=Object.defineProperty,gw=(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 fw extends En{constructor(){super(...arguments),gw(this,"key",lo()),gw(this,"alertParams",{data:{action:"VIEW",entity:"",key:"",time:0,username:""}})}}class yw extends Pn{createState(){var e;return new fw(null==(e=this.parent)?void 0:e.state)}updateMessage(e){this.state.key=lo(),this.state.alertParams=e}}const Cw=a({name:"IBizCoopPos",props:{modelData:{type:Object,required:!0},controller:{type:yw,required:!0}},setup(e){const t=e.controller;return{ns:B("coop-pos"),c:t}},render(){return o("div",{class:this.ns.b()},[o(s("iBizCoopAlert"),b({key:this.c.state.key},this.c.state.alertParams),null)])}});var Iw=Object.defineProperty,Pw=(e,t,a)=>(((e,t,a)=>{t in e?Iw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Dw{constructor(){Pw(this,"component","IBizCoopPos")}async createController(e,t,a){const n=new yw(e,t,a);return await n.init(),n}}const Ew=U(Cw,(function(e){e.component(Cw.name,Cw),Dn("RAWITEM_COOP_POS",(()=>new Dw))}));var kw=Object.defineProperty,xw=(e,t,a)=>(((e,t,a)=>{t in e?kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class zw extends Pn{constructor(){super(...arguments),xw(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 Sw=a({name:"IBizViewMsgPos",props:{modelData:{type:Object,required:!0},controller:{type:zw,required:!0}},setup:()=>({ns:B("view-msg-pos"),view:ne().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(s("view-message"),{messages:n,scroll:a,context:e.panel.context,params:e.panel.params,controller:e.panel.view.viewMsgController},null)]):null}});var Tw=Object.defineProperty,_w=(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 Ow{constructor(){_w(this,"component","IBizViewMsgPos")}async createController(e,t,a){const n=new zw(e,t,a);return await n.init(),n}}const Bw=U(Sw,(function(e){e.component(Sw.name,Sw),Dn("RAWITEM_VIEWMSG_POS",(()=>new Ow))})),jw=a({name:"IBizUserAction",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(e){const t=B("user-action"),a=e.controller,n={SETTING:{imagePath:"svg/setting.svg"},HELPER:{imagePath:"svg/helper.svg"},CUSTOM:{imagePath:"svg/custom-workbench.svg"}};let o=e.modelData.sysImage;if(!o&&e.modelData&&e.modelData.rawItem){const t=e.modelData.rawItem.predefinedType;t&&(o=n[t])}return{ns:t,c:a,sysImage:o,onClick:async t=>{const n={...t};n.target=t.currentTarget;const o=e.modelData.id,s=a.panel.view.getController("appmenu");if(s){const e=s.allAppMenuItems.find((e=>e.id===o));if(e){if(e.accessKey){if(!(await ibiz.hub.getApp(a.panel.context.srfappid)).authority.calcByResCode(e.accessKey))return}const t=a.panel.context.clone(),o=a.panel.params;t.srfappid=e.appId||ibiz.env.appId,await ibiz.commands.execute(xn.TAG,e.appFuncId,t,o,{event:n})}}}}},render(){return o("div",{class:this.ns.b(),title:ht(this.modelData.caption)},[o(s("i-biz-icon"),{class:[this.ns.e("image")],icon:this.sysImage,onClick:e=>this.onClick(e)},null)])}});var Aw=Object.defineProperty,Nw=(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 Rw{constructor(){Nw(this,"component","IBizUserAction")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const Mw=e("aL",U(jw,(function(e){e.component(jw.name,jw),Dn("RAWITEM_SETTING",(()=>new Rw)),Dn("RAWITEM_HELPER",(()=>new Rw)),Dn("RAWITEM_CUSTOM",(()=>new Rw))}))),Lw=a({name:"IBizDataImportShell",props:{modelData:{type:Object,required:!0},controller:{type:Pn,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(s(n),{dismiss:this.onDismiss,dataImport:e,appDataEntity:t,context:this.c.panel.context,params:this.c.panel.params,class:a})}});var Vw=Object.defineProperty,Fw=(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 Uw{constructor(){Fw(this,"component","IBizDataImportShell")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const qw=U(Lw,(function(e){e.component(Lw.name,Lw),Dn("RAWITEM_DATA_IMPORT",(()=>new Uw))})),Gw=a({name:"IBizShortCut",components:{draggable:Po},props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(e){const t=B("short-cut"),a=f().proxy,i=Eo(),l=ibiz.util.shortCut,r=n(!0),c=n(!1),u=g(l.data),p={newIndex:0,oldIndex:0},h=new Map([["ROUTE_MODAL","INDEXVIEWTAB_POPUPMODAL"],["MODAL","POPUPMODAL"],["DRAWER","DRAWER_RIGHT"]]),m=e=>{0===u.length&&c.value&&(c.value=!1),a.$forceUpdate()};d((()=>{r.value="vertical"!==l.mode,ibiz.util.shortCut.onChange(m)})),C((()=>{ibiz.util.shortCut.offChange(m)}));const b=()=>{r.value=!r.value,r.value?(c.value=!1,l.setShortCutMode("horizontal")):l.setShortCutMode("vertical")},v=e=>{e.moved?ibiz.util.shortCut.changeIndex(e.moved.newIndex,e.moved.oldIndex):e.added?p.newIndex=e.added.newIndex:e.removed&&(p.oldIndex=e.removed.oldIndex,ibiz.util.shortCut.changeIndex(p.newIndex,p.oldIndex))},w=a=>o(Po,{itemKey:"key",class:[t.e("draggable"),t.is("horizontal",!a),t.is("vertical",a)],modelValue:u,group:e.controller.model.id,onChange:e=>v(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:ht(e.caption),onClick:()=>(e=>{if(c.value=!1,"ROUTE"===e.openMode){const t=e.fullPath.substring(1);i.currentRoute.value.fullPath!==t&&i.push({path:e.fullPath.substring(1)})}else ibiz.commands.execute(Sn.TAG,e.appViewId,Et.create(e.context),e.params,{openMode:h.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(s("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:u,isShowToolbar:r,onChange:v,renderDraggable:w,renderMore:()=>o(s("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(s("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(u.length):u.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:b},[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:b},[o(s("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 Hw=Object.defineProperty,Ww=(e,t,a)=>(((e,t,a)=>{t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Kw{constructor(){Ww(this,"component","IBizShortCut")}async createController(e,t,a){const n=new Pn(e,t,a);return await n.init(),n}}const Xw=U(Gw,(function(e){e.component(Gw.name,Gw),Dn("RAWITEM_SHORTCUT",(()=>new Kw))}));var $w=Object.defineProperty,Yw=(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 Jw extends En{constructor(){super(...arguments),Yw(this,"code",""),Yw(this,"image",""),Yw(this,"state",""),Yw(this,"loading",!1),Yw(this,"error")}}var Qw=Object.defineProperty,Zw=(e,t,a)=>(((e,t,a)=>{t in e?Qw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class eg extends Pn{constructor(){super(...arguments),Zw(this,"captcha",g({"Captcha-State":"","Captcha-Code":""}))}createState(){var e;return new Jw(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 es(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 tg=a({name:"IBizAuthCaptcha",props:{modelData:{type:Object,required:!0},controller:{type:eg,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(s("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),h(o(s("el-image"),{src:this.c.state.image,class:this.ns.e("image"),onClick:this.onClick,title:ht("点击图片刷新")},{error:()=>o("div",{onClick:this.onClick,class:[this.ns.em("image","hint"),this.ns.is("loading",this.c.state.loading)]},[this.c.state.loading?"加载中...":"加载失败"])}),[[w("loading"),this.c.state.loading]]),this.c.state.error&&o("div",{class:this.ns.e("error")},[this.c.state.error])])}});var ag=Object.defineProperty,ng=(e,t,a)=>(((e,t,a)=>{t in e?ag(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class og{constructor(){ng(this,"component","IBizAuthCaptcha")}async createController(e,t,a){const n=new eg(e,t,a);return await n.init(),n}}const sg=U(tg,(function(e){e.component(tg.name,tg),Dn("RAWITEM_AUTH_CAPTCHA",(()=>new og))})),ig=e("ax",{install:e=>{e.use(ue),e.use(pe),e.use(he),e.use(bm),e.use(km),e.use(Nm),e.use(Hm),e.use(me),e.use(ab),e.use(be),e.use(ve),e.use(we),e.use(rb),e.use(mb),e.use(yb),e.use(ge),e.use(kb),e.use(fe),e.use(Nb),e.use(ye),e.use(Gb),e.use($b),e.use(nv),e.use(dv),e.use(vv),e.use(Ce),e.use(Jv),e.use(Ie),e.use(iw),e.use(Pe),e.use(uw),e.use(vw),e.use(De),e.use(Ee),e.use(Ew),e.use(Bw),e.use(Mw),e.use(qw),e.use(Xw),e.use(sg)}}),lg=a({name:"NotSupportedEditor",props:{modelData:{type:Object,required:!0}},setup:()=>({ns:B("not-supported-editor")}),render(){return o("div",{class:this.ns.b()},[ibiz.i18n.t("editor.notSupportedEditor.unsupportedType",{type:this.modelData.editorType})])}});ho.extend(ts);const rg=a({name:"IBizSpan",props:ke(),setup(e,{emit:t}){var a;const o=B("span"),s=e.controller,i=n(""),r=s.codeList,{valueFormat:d,dataType:u,unitName:p}=s.parent,h=s.model.textSeparator||(null==(a=s.editorParams)?void 0:a.TEXTSEPARATOR)||",";c((()=>e.value),((e,t)=>{if(e!==t){if(bo(e))return void(i.value="");if("SIMPLES"===s.model.valueType)i.value=e.join(h);else if("OBJECT"===s.model.valueType)i.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"])})),i.value=t.join(h)}else if("ADDRESSPICKUP"===s.model.editorType)try{const t=[];JSON.parse(e).forEach((e=>{t.push(e[s.model.objectNameField?s.model.objectNameField:"srfmajortext"])})),i.value=t.join(h)}catch(t){ibiz.log.error("标签地址选择器的值不符合JSON格式".concat(e))}else if(d)try{if(null!=u&&kt.isDate(u))i.value=ho(e).format(d);else{const t=ho(e).format(d);(a=t)!==(n=d)&&ho(a,n,!0).isValid()?i.value=t:i.value=ibiz.util.text.format("".concat(e),d)}}catch(t){i.value="".concat(e),ibiz.log.error("".concat(e," 值格式化错误"))}else xt("".concat(e))?i.value=zt("".concat(e)):i.value="".concat(e);p&&(i.value+=p)}var a,n}),{immediate:!0});const m=n([]);r&&c((()=>e.data),(e=>{s.loadCodeList(e).then((e=>{m.value=e}))}),{immediate:!0,deep:!0});q(s.model.appCodeListId,s.context.srfappid,(e=>{e&&(m.value=e)}));const{componentRef:b}=xe((()=>t("focus")),(()=>t("blur"))),v=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));return{ns:o,c:s,text:i,editorRef:b,items:m,valueFormat:d,unitName:p,showFormDefaultContent:v}},render(){let e=null;return e=this.c.codeList?this.items.length>0&&o(s("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.text?this.text:"- - -",o("span",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):"",this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[e])}}),cg=a({name:"IBizSpanLink",props:ke(),emits:ze(),setup(e,{emit:t}){const a=B("span-link"),o=e.controller,s=n("");c((()=>e.value),((e,t)=>{e&&e!==t&&(s.value="".concat(e))}),{immediate:!0});const{componentRef:i}=xe((()=>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:s,editorRef:i,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 dg=Object.defineProperty,ug=(e,t,a)=>(((e,t,a)=>{t in e?dg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class pg extends jn{constructor(){super(...arguments),ug(this,"valueItem",""),ug(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)}}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 St(this.model,ibiz.i18n.t("editor.common.linkViewConfigErr"));return ibiz.commands.execute(Sn.TAG,o,a,n)}}var hg=Object.defineProperty,mg=(e,t,a)=>(((e,t,a)=>{t in e?hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class bg{constructor(e){mg(this,"formEditor","IBizSpan"),mg(this,"gridEditor","IBizSpan"),"SPAN_LINK"===e&&(this.formEditor="IBizSpanLink",this.gridEditor="IBizSpanLink")}async createController(e,t){const a=new pg(e,t);return await a.init(),a}}const vg=a({name:"IBizInput",props:Se(),emits:ze(),setup(e,{emit:a}){const o=B("input"),s=e.controller,i=s.model,r=n(!1),d=n(),u=n(!0),p=n(!1),h=n(2);"TEXTAREA_10"===i.editorType&&(h.value=10),s.editorParams&&("false"===s.editorParams.SHOWLIMIT&&(u.value=!1),"true"===s.editorParams.ISAUTO&&(p.value=!0));const m=l((()=>{switch(i.editorType){case"TEXTBOX":return"text";case"PASSWORD":return"password";case"TEXTAREA":case"TEXTAREA_10":return"textarea";default:return"string"}})),b=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),v=n("");c((()=>e.value),((e,t)=>{e!==t&&(null==e?v.value="":xt("".concat(e))?v.value=zt("".concat(e)):v.value=e.toString())}),{immediate:!0});const w=l((()=>v.value?e.controller.formatValue(v.value):"")),g=(e,t="blur")=>{t===s.triggerMode&&a("change",e)},f=e=>{e?r.value=e:setTimeout((()=>{r.value=e}),100)};let y;const I=e=>{y!==e&&g(e),y=void 0};c(d,(t=>{if(e.autoFocus&&t){const e="textarea"===m.value?"textarea":"input";t.$el.getElementsByTagName(e)[0].focus()}}));let P;C((()=>{P&&P.close()}));const D=l((()=>{const{unitName:t}=e.controller.parent;let a="".concat(e.controller.formatValue(v.value));return a&&t&&(a+=t),a})),E=l((()=>s.model.editorParams&&s.model.editorParams.autocomplete&&s.toBoolean(s.model.editorParams.autocomplete)?"on":"new-password")),k=n([]);s.codeList&&c((()=>e.data),(e=>{s.loadCodeList(e).then((e=>{k.value=e}))}),{immediate:!0,deep:!0});return q(s.model.appCodeListId,s.context.srfappid,(e=>{e&&(k.value=e)})),{c:s,ns:o,rows:h,type:m,items:k,currentVal:v,readonlyText:D,handleChange:I,handleInput:e=>{y!==e&&g(e,"input"),y=void 0},handleKeyUp:e=>{e&&"Enter"===e.code&&(a("enter",e),d.value.$el.dispatchEvent(e))},onBlur:t=>{y=t.target.value,y!=e.value&&g(y),a("blur",t),f(!1)},onFocus:e=>{a("focus",e),f(!0)},editorRef:d,onClick:async()=>{var e,a;if(s.deService){const n=await t.import("@ibiz-template-plugin/ai-chat"),o=n.chat||n.default.chat;P=o;const i=o.create({question:async e=>{var t,a;const n=lo();return await(null==(a=s.deService)?void 0:a.aiChatSse((e=>{if(ibiz.log.info("aiChatSse",e),20===e.actionstate&&e.actionresult)i.addMessage({messageid:n,state:e.actionstate,type:"DEFAULT",role:"ASSISTANT",content:e.actionresult});else if(30===e.actionstate&&e.actionresult){const t=JSON.parse(e.actionresult).choices;t&&t.length>0&&i.replaceMessage({messageid:n,state:e.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t[0].content||""})}else 40===e.actionstate&&i.replaceMessage({messageid:n,state:e.actionstate,type:"ERROR",role:"ASSISTANT",content:e.actionresult})}),s.context,{srfactag:null==(t=s.deACMode)?void 0:t.codeName},{messages:e})),i.addMessage({messageid:n,state:10,type:"DEFAULT",role:"ASSISTANT",content:""}),!0},action:(e,t)=>{"backfill"===e&&I(t.content)}}),l=await(null==(a=s.deService)?void 0:a.aiChatHistory(s.context,{srfactag:null==(e=s.deACMode)?void 0:e.codeName}));l.data&&Array.isArray(l.data)&&l.data.forEach((e=>{const t={messageid:lo(),state:30,type:"DEFAULT",role:e.role,content:e.content};i.addMessage(t)}))}},shouldAutoComplete:E,isEditable:r,setEditable:f,showLimit:u,isAuto:p,showFormDefaultContent:b,currentFormatVal:w}},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(s("iBizCodeList"),{codeListItems:this.items,codeList:this.c.codeList,value:this.currentVal,convertToCodeItemText:this.c.convertToCodeItemText},null):this.readonlyText;else{const t={};e&&(t.suffix=()=>o("i",{class:this.ns.e("unit")},[e])),"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(s("el-input"),b({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)&&!i(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:"-"]);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])}}),wg=a({name:"IBizInputNumber",props:Te(),emits:ze(),setup(e,{emit:t}){const a=B("input-number"),o=n(!1),s=e.controller,i=s.model,r=n(null);let d=1/0,u=-1/0;i.editorParams&&(i.editorParams.maxvalue&&(d=Lo(i.editorParams.maxvalue)),i.editorParams.minvalue&&(u=Lo(i.editorParams.minvalue)),i.editorParams.enablethousands&&(o.value=JSON.parse(i.editorParams.enablethousands)));const p=n(!1),h=n(),m=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),b=(e,t=0)=>{const a={minimumFractionDigits:t,maximumFractionDigits:t};return 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:b(t,s.precision?s.precision:0):r.value=Number.isNaN(t)?null:t}}),{immediate:!0});const v=l((()=>{if(o.value){if(r.value||0===r.value)return b(Number(r.value),s.precision?s.precision:0)}else if(r.value||0===r.value)return e.controller.formatValue(r.value);return""})),w=e=>{e?p.value=e:setTimeout((()=>{p.value=e}),100)};c(h,(t=>{if(e.autoFocus&&t){t.$el.getElementsByTagName("input")[0].focus()}}));const g=((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:s,currentVal:r,handleChange:(e,a="blur")=>{a===s.triggerMode&&t("change",e)},onFocus:e=>{t("focus",e),w(!0)},onBlur:e=>{t("blur",e),o.value&&g(r.value),w(!1)},editorRef:h,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},isEditable:p,setEditable:w,showFormDefaultContent:m,max:d,min:u,currentFormatVal:v,enablethousands:o,onInput:e=>{r.value=e}}},render(){const{unitName:e}=this.c.parent;let t=null;this.readonly?(t=po(this.currentVal)?"":"".concat(this.currentFormatVal),t&&e&&(t+=e)):t=[this.enablethousands?o(s("el-input"),b({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(s("el-input-number"),b({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])];const a=o("div",{class:this.ns.b("form-default-content")},[this.currentVal||0===this.currentVal?this.currentFormatVal:"-"]);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,t])}}),gg=a({name:"IBizInputIP",props:_e(),emits:ze(),setup(e,{emit:t}){const a=B("input-ip"),o=e.controller,s=n(),i=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),r=n([]),d=n(!1),u=n(!1),p=n(""),h=n(""),m=n(""),b=n("");if(e.value){const t=e.value.split(".");r.value=t,p.value=r.value[0],h.value=r.value[1],m.value=r.value[2],b.value=r.value[3]}const v=(e,a,n,o)=>{if(""===e)return;/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/g.test(e)?r.value[o]=e:n&&(ibiz.message.warning(ibiz.i18n.t("editor.textBox.warningMessage",{num:o+1})),n.value=a,r.value[o]=a),p.value&&h.value&&m.value&&b.value&&t("change","".concat(p.value,".").concat(h.value,".").concat(m.value,".").concat(b.value))};c(p,((e,t)=>{v(e,t,p,0)})),c(h,((e,t)=>{v(e,t,h,1)})),c(m,((e,t)=>{v(e,t,m,2)})),c(b,((e,t)=>{v(e,t,b,3)})),c(s,(t=>{if(e.autoFocus&&t){t.$el.getElementsByTagName("input")[0].focus()}}));return{ns:a,c:o,editorRef:s,currentVal:r,getFocus:()=>{d.value=!0,u.value&&(u.value=!1,t("focus"))},blur:()=>{d.value=!1,setTimeout((()=>{d.value||(u.value=!0,t("blur"))}),0)},firstIp:p,secIp:h,thirdIp:m,forIp:b,showFormDefaultContent:i,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)}}},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(s("el-input"),{ref:"editorRef",type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,onKeyup:this.handleKeyUp,maxlength:3,modelValue:this.firstIp,"onUpdate:modelValue":e=>this.firstIp=e},null),v("."),o(s("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,onKeyup:this.handleKeyUp,maxlength:3,modelValue:this.secIp,"onUpdate:modelValue":e=>this.secIp=e},null),v("."),o(s("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,onKeyup:this.handleKeyUp,maxlength:3,modelValue:this.thirdIp,"onUpdate:modelValue":e=>this.thirdIp=e},null),v("."),o(s("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,onKeyup:this.handleKeyUp,maxlength:3,modelValue:this.forIp,"onUpdate:modelValue":e=>this.forIp=e},null)])}});var fg=Object.defineProperty,yg=(e,t,a)=>(((e,t,a)=>{t in e?fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cg extends jn{constructor(){super(...arguments),yg(this,"precision"),yg(this,"deService"),yg(this,"deACMode"),yg(this,"keyName","srfkey"),yg(this,"textName","srfmajortext"),yg(this,"sort","asc"),yg(this,"dataItems",[]),yg(this,"chatCompletion",!1),yg(this,"codeList")}async onInit(){if(await super.onInit(),this.precision=this.editorParams.precision?Lo(this.editorParams.precision):this.model.precision,"TEXTAREA"===this.model.editorType||"TEXTAREA_10"===this.model.editorType){const e=this.model;if(e.appDEACModeId&&(this.deACMode=await An(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)}}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)}}}var Ig=Object.defineProperty,Pg=(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 Dg{constructor(e){Pg(this,"formEditor","IBizInput"),Pg(this,"gridEditor","IBizInput"),"NUMBER"===e&&(this.formEditor="IBizInputNumber",this.gridEditor="IBizInputNumber"),"IPADDRESSTEXTBOX"===e&&(this.formEditor="IBizInputIP",this.gridEditor="IBizInputIP")}async createController(e,t){const a=new Cg(e,t);return await a.init(),a}}const Eg=a({name:"IBizDropdown",props:Oe(),emits:ze(),setup(e,{emit:t}){const a=B("dropdown"),o=e.controller,s=n([]),i=n([]),r=n(!1),p=n(!1),h=n([]),m=n(!1),b=n(),v=o.model.editorItems,w=n(!1);let g,f="";const y=n(!1),I=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),P=l((()=>"DROPDOWNLIST_100"===o.model.editorType?a.cssVarBlock({width:"100px"}):{})),D=e=>{if(0===e.length)return[];const t=[];return e.forEach((e=>{var a;i.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=D(e.children)),t.push(n)})),t},E=async()=>{if(o.model.appCodeListId){const e=ibiz.hub.getApp(o.context.srfappid).codeList.getCodeList(o.model.appCodeListId);e&&(y.value=e.codeItemValueNumber||!1)}w.value=!0;const t=await o.loadCodeList(e.data);r.value=!0,o.blankItemName?s.value=[{value:void 0,text:o.blankItemName},...t]:s.value=t;for(let e=0;e<s.value.length;e++){if(s.value[e].children){p.value=!0,h.value=D(t);break}}w.value=!1};c((()=>e.value),(async(e,t)=>{(e||null===e||0===e)&&(r.value||void 0!==t||await E())}),{immediate:!0});const k=e=>{e?m.value=e:setTimeout((()=>{m.value=e}),100)},x=l({get(){var t,a,n;return r.value?v&&v.length>0&&!o.multiple?null==(t=e.data[v[0].id])?void 0:t.toString():e.value&&"string"==typeof e.value?o.multiple?null==(a=e.value)?void 0:a.toString().split(","):e.value.toString():e.value&&Array.isArray(e.value)?o.multiple?e.value:e.value.toString():null==(n=e.value)?void 0:n.toString():o.multiple?[]:""},set(a){let n=a;if(o.blankItemName&&!a&&(n=void 0),Array.isArray(n)){let e=null;e=0===n.length?null:"SIMPLES"===o.model.valueType?n:n.join(","),t("change",e)}else if(v&&v.length>0){t("change",y.value?Number(n):n,v[0].id);const e=(l=y.value?Number(n):n,(p.value?i.value:s.value).find((e=>e.value===l)));e&&t("change",e.text)}else t("change",y.value?Number(n):n);var l;k(!1),e.autoFocus&&(f="blur",t("blur"))}}),z=l((()=>{const e=Array.isArray(x.value)?x.value:[x.value],t=p.value?i.value:s.value,a=[];return e.forEach((e=>{t.forEach((t=>{(y.value?t.value===Number(e):t.value===e)&&a.push(t.text)}))})),a.join(",")}));c(z,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),c(b,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));return q(o.model.appCodeListId,o.context.srfappid,(e=>{e&&(s.value=e)})),d((()=>{b.value&&(g=G(b,(async e=>{f="outside"})))})),C((()=>{g&&g.stop&&g.stop()})),{ns:a,c:o,curValue:x,items:s,customNodeClass:(e,t)=>e.children.length?a.e("branch-node"):null,valueText:z,hasChildren:p,onBlur:e=>{f="blur",t("blur",e),k(!1)},onFocus:e=>{f="focus",t("focus",e),k(!0)},editorRef:b,treeNodes:h,cssVars:P,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},getCodeListItem:e=>(p.value?i.value:s.value).find((t=>t.text===e)),isEditable:m,setEditable:k,showFormDefaultContent:I,onVisibleChange:async e=>{e&&!r.value&&(await E(),p.value&&b.value&&"outside"!==f&&u((()=>{b.value.focus()})))},isLoading:w}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||ibiz.config.pickerEditor.overflowMode),t=this.hasChildren?o(s("el-tree-select"),b({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,"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,props:{class:this.customNodeClass}},this.$attrs),{default:t=>{const a=(t.data||{}).label||"";return o("span",{title:ht(e?a:"")},[a])}}):o(s("el-select"),b({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"):""),onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onVisibleChange:this.onVisibleChange},this.$attrs),{default:()=>this.items.map((t=>{var a;return o(s("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:ht(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(s("iBizIcon"),{icon:t.sysImage},null),o("span",{class:[e&&this.ns.be("select-option-content","text")]},[t.text])])})})),prefix:()=>{if("round"===this.c.editorParams.type)return this.valueText.split(",").map((e=>{const t=this.getCodeListItem(e);return o("div",{class:[this.ns.b("select-option-text"),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(t.bkcolor||"")}):""},[(null==t?void 0:t.sysImage)&&o(s("iBizIcon"),{icon:null==t?void 0:t.sysImage},null),e||""])}))}}),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(s("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(",").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])])})):"-"]);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])}}),kg=a({name:"IBizEmojiPicker",props:Oe(),emits:ze(),setup(e,{emit:t}){const a=B("emoji-picker"),i=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&&xt("".concat(e))?zt(e):e)}),{immediate:!0});const b=()=>{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:i,emoji:d,visible:u,emojiRef:r,showFormDefaultContent:p,onSelect:e=>{u.value=!1,d.value=e.data,t("change",Tt(e.data))},onAddEmoji:h,onClearEmoji:m,renderReference:()=>o(s("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:"-"]),b()]})}},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(s("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(s("iBizEmojiSelect"),{continuousList:!0,dark:!0,onSelect:this.onSelect},null)})])}});var xg=Object.defineProperty,zg=(e,t,a)=>(((e,t,a)=>{t in e?xg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Sg extends jn{constructor(){super(...arguments),zg(this,"multiple",!1),zg(this,"forceSelection",!0),zg(this,"blankItemName","")}async onInit(){var e,t;super.onInit(),"MDROPDOWNLIST"===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.blankItemName)&&(this.blankItemName=this.editorParams.blankItemName)}}var Tg=Object.defineProperty,_g=(e,t,a)=>(((e,t,a)=>{t in e?Tg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Og{constructor(e){_g(this,"formEditor","IBizDropdown"),_g(this,"gridEditor","IBizDropdown");let t="IBizDropdown";if("EMOJI_PICKER"===e)t="IBizEmojiPicker";this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new Sg(e,t);return await a.init(),a}}const Bg=a({name:"IBizCheckbox",props:Be(),emits:ze(),setup(e,{emit:t}){var a,n;const o=B("checkbox"),s=e.controller.model;let i=1,r=0;(null==(a=s.editorParams)?void 0:a.selectValue)&&(i=s.editorParams.selectValue),(null==(n=s.editorParams)?void 0:n.nullValue)&&(r=s.editorParams.nullValue);const c=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{useInFocusAndBlur:d,useInValueChange:u}=je(e,t),p=l({get:()=>e.value==i,set(e){let a;a=e?i:r,t("change",a),u()}}),{componentRef:h}=xe((()=>t("focus")),(()=>d()));return{ns:o,editorModel:s,currentVal:p,editorRef:h,showFormDefaultContent:c}},render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o(s("el-checkbox"),b({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled||this.readonly},this.$attrs),null)])}});class jg extends Nn{}var Ag=Object.defineProperty,Ng=(e,t,a)=>(((e,t,a)=>{t in e?Ag(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Rg{constructor(){Ng(this,"formEditor","IBizCheckbox"),Ng(this,"gridEditor","IBizCheckbox")}async createController(e,t){const a=new jg(e,t);return await a.init(),a}}const Mg=a({name:"IBizCheckboxList",props:Ae(),emits:ze(),setup(e,{emit:t}){const a=B("checkbox-list"),o=e.controller,s=o.codeList,i=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),r=n([]);c((()=>e.data),(e=>{o.loadCodeList(e).then((e=>{r.value=e}))}),{immediate:!0,deep:!0});const d=l((()=>s&&s.orMode?s.orMode.toLowerCase():"str"));q(o.model.appCodeListId,o.context.srfappid,(e=>{e&&(r.value=e)}));let u=",";s&&s.valueSeparator&&(u=s.valueSeparator);const{useInFocusAndBlur:p,useInValueChange:h}=je(e,t),m=l({get(){if(!bo(e.value)){if(Object.is(d.value,"num")&&r){const t=[],a="string"==typeof e.value?parseInt(e.value,10):e.value;return r.value.forEach((e=>{(a&e.value)===e.value&&t.push(e.value)})),t}if(Object.is(d.value,"str")){const t=e.value;if(""!==t){if(s){const e="SIMPLES"===o.model.valueType?t:t.split(u);if(s.codeItemValueNumber)for(let t=0,a=e.length;t<a;t++)e[t]=Number(e[t]);return e}return t.split(",")}}}return[]},set(e){let a=null;if(Object.is(d.value,"num")){let t=0;e.forEach((e=>{const a="string"==typeof e?parseInt(e,10):e;t|=a})),"SIMPLES"===o.model.valueType?a=[t]:"SIMPLE"===o.model.valueType&&(a=t)}else if(Object.is(d.value,"str")){const t=[];r.value.length>0&&(r.value.forEach((a=>{-1!==e.findIndex((e=>Object.is(a.value,e)))&&t.push(a.value)})),"SIMPLES"===o.model.valueType?a=t:"SIMPLE"===o.model.valueType&&(a=t.join(u)))}t("change",a),h()}}),b=l((()=>{const e=Array.isArray(m.value)?m.value:[m.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(b,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});const{componentRef:v}=xe((()=>t("focus")),(()=>p()));return{ns:a,items:r,selectArray:m,valueText:b,editorRef:v,onSelectArrayChange:e=>{m.value=e},showFormDefaultContent:i}},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.readonly?this.valueText:o(s("el-checkbox-group"),b({"model-value":this.selectArray,onChange:this.onSelectArrayChange},this.$attrs),(t=e=this.items.map(((e,t)=>o(s("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)&&!i(t)?e:{default:()=>[e]}))]);var t}});var Lg=Object.defineProperty,Vg=(e,t,a)=>(((e,t,a)=>{t in e?Lg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Fg extends jn{constructor(){super(...arguments),Vg(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 Ug=Object.defineProperty,qg=(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 Gg{constructor(){qg(this,"formEditor","IBizCheckboxList"),qg(this,"gridEditor","IBizCheckboxList")}async createController(e,t){const a=new Fg(e,t);return await a.init(),a}}const Hg=a({name:"IBizRadio",props:Ne(),emits:ze(),setup(e,{emit:t}){const a=B("radio"),o=e.controller,s=o.model;let i="radio",r=!1;s.editorParams&&(s.editorParams.renderMode&&(i=s.editorParams.renderMode),s.editorParams.isBtnRoundCorner&&(r=o.toBoolean(s.editorParams.isBtnRoundCorner)));const{useInFocusAndBlur:d,useInValueChange:u}=je(e,t),p=n([]);c((()=>e.data),(e=>{o.loadCodeList(e).then((e=>{p.value=e}))}),{immediate:!0,deep:!0});q(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:b}=xe((()=>t("focus")),(()=>d()));return{ns:a,editorModel:s,items:p,valueText:h,onSelectValueChange:e=>{t("change",e),u()},editorRef:b,renderMode:i,isBtnRoundCorner:r,showFormDefaultContent:m}},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:"editorRef"},[this.readonly?this.valueText:o(s("el-radio-group"),b({class:this.ns.e("group"),"model-value":uo(this.value)?String(this.value):"",onChange:this.onSelectValueChange},this.$attrs),(t=e=this.items.map(((e,t)=>"radio"===this.renderMode?o(s("el-radio"),{key:t,label:uo(e.value)?String(e.value):"",disabled:this.disabled||!0===e.disableSelect},{default:()=>[o("span",{class:this.ns.e("text")},[e.text])]}):o(s("el-radio-button"),{key:t,class:[this.ns.e("button"),this.isBtnRoundCorner?this.ns.em("button","round-corner"):""],label:uo(e.value)?String(e.value):"",disabled:this.disabled||!0===e.disableSelect},{default:()=>[o("span",{class:this.ns.em("button","text")},[e.text])]}))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!i(t)?e:{default:()=>[e]}))]);var t}});class Wg extends jn{}var Kg=Object.defineProperty,Xg=(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 $g{constructor(){Xg(this,"formEditor","IBizRadio"),Xg(this,"gridEditor","IBizRadio")}async createController(e,t){const a=new Wg(e,t);return await a.init(),a}}const Yg=a({name:"IBizDatePicker",props:Re(),emits:ze(),setup(e,{emit:t}){const a=B("date-picker"),o=e.controller,s=o.model,i=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(s.editorType){case"DATEPICKEREX":case"DATEPICKEREX_NOTIME":i.value="date";break;case"DATEPICKEREX_NODAY":case"DATEPICKEREX_NODAY_NOSECOND":d.value=!0,i.value="time";break;default:i.value="datetime"}const m=o.valueFormat;m&&(r.value=m);const b=n();c((()=>e.value),((e,t)=>{if(e&&e!==t){const t=ho(e).format(m);b.value="Invalid Date"!==t?t:e}else null==e&&(b.value=e)}),{immediate:!0});const v=e=>{e?u.value=e:setTimeout((()=>{u.value=e}),100)};c(p,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));c(b,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});return{ns:a,c:o,editorModel:s,type:i,format:r,formatValue:b,handleChange:(e,a)=>{t("change",e),v(!1)},editorRef:p,isTimePicker:d,onFocus:e=>{t("focus",e),v(!0)},onBlur:e=>{t("blur",e),v(!1)},isEditable:u,setEditable:v,showFormDefaultContent:h,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)}}},render(){const e=this.isTimePicker?o(s("el-time-picker"),b({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(s("el-date-picker"),b({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:"-"]);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 Jg extends Nn{getFormatByType(e){switch(e){case"DATEPICKER":case"DATEPICKEREX":case"DATEPICKEREX_SECOND":default:return"YYYY-MM-DD HH:mm:ss";case"DATEPICKEREX_NOTIME":return"YYYY-MM-DD";case"DATEPICKEREX_HOUR":return"YYYY-MM-DD HH";case"DATEPICKEREX_MINUTE":case"DATEPICKEREX_NOSECOND":return"YYYY-MM-DD HH:mm";case"DATEPICKEREX_NODAY":return"HH:mm:ss";case"DATEPICKEREX_NODAY_NOSECOND":return"HH:mm"}}get valueFormat(){return this.model.dateTimeFormat?this.model.dateTimeFormat:super.valueFormat?super.valueFormat:this.getFormatByType(this.model.editorType)}}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,"formEditor","IBizDatePicker"),Zg(this,"gridEditor","IBizDatePicker")}async createController(e,t){const a=new Jg(e,t);return await a.init(),a}}const tf=a({name:"IBizRaw",props:Me(),emits:ze(),setup(e){var t,a,o,s;const i=B("raw"),r=e.controller.model,d=n("");let u="TEXT",p="";r.contentType&&(u=r.contentType),(null==(t=r.editorParams)?void 0:t.contenttype)&&(u=null==(a=r.editorParams)?void 0:a.contenttype),(null==(o=r.editorParams)?void 0:o.template)&&(p=r.editorParams.template.replaceAll("//n","\n")),(null==(s=r.editorParams)?void 0:s.TEMPLATE)&&(p=r.editorParams.TEMPLATE.replaceAll("//n","\n"));const h=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||(d.value=t),p&&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}}),d.value=await ibiz.util.hbs.render(p,a)}}),{immediate:!0}),{ns:i,content:d,type:u,template:p,showFormDefaultContent:h}},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)]},[this.content&&o(s("iBizRawItem"),{class:this.ns.b("content"),content:this.content,type:this.type},null)])}});class af extends Nn{}var nf=Object.defineProperty,of=(e,t,a)=>(((e,t,a)=>{t in e?nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class sf{constructor(){of(this,"formEditor","IBizRaw"),of(this,"gridEditor","IBizRaw")}async createController(e,t){const a=new af(e,t);return await a.init(),a}}const lf=a({name:"IBizStepper",props:Le(),emits:ze(),setup(e,{emit:t}){const a=B("stepper"),o=e.controller,s=o.model,i=n(null);let r=1,d=0,u=1/0,p=-1/0;s.editorParams&&(s.editorParams.stepvalue&&(r=Lo(s.editorParams.stepvalue)),s.editorParams.precision&&(d=Lo(s.editorParams.precision)),s.editorParams.maxvalue&&(u=Lo(s.editorParams.maxvalue)),s.editorParams.minvalue&&(p=Lo(s.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);i.value=Number.isNaN(t)?0:t}}),{immediate:!0});const m=n();return{ns:a,c:o,currentVal:i,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?"".concat(this.currentVal):[o(s("el-input-number"),b({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 rf extends Nn{}var cf=Object.defineProperty,df=(e,t,a)=>(((e,t,a)=>{t in e?cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uf{constructor(){df(this,"formEditor","IBizStepper"),df(this,"gridEditor","IBizStepper")}async createController(e,t){const a=new rf(e,t);return await a.init(),a}}const pf=a({name:"IBizRate",props:Ve(),emits:ze(),setup(e,{emit:t}){const a=B("rate"),o=n(),s=e.controller,i=s.model,{useInFocusAndBlur:r,useInValueChange:d}=je(e,t);let u=[],p=!1,h=5,m=[];i.editorParams&&(i.editorParams.colors&&(u=s.toObj(i.editorParams.colors)),i.editorParams.showText&&(p=s.toBoolean(i.editorParams.showText)),i.editorParams.maxvalue&&(h=Lo(i.editorParams.maxvalue)),i.editorParams.texts&&(m=s.toObj(i.editorParams.texts)));const b=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&(o.value=e||0)}),{immediate:!0});const{componentRef:v}=xe((()=>t("focus")),(()=>r()));return{ns:a,currentVal:o,handleChange:e=>{t("change",e),d()},colors:u,showText:p,max:h,texts:m,editorRef:v,showFormDefaultContent:b}},render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],ref:"editorRef"},[o(s("el-rate"),b({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 hf extends Nn{}var mf=Object.defineProperty,bf=(e,t,a)=>(((e,t,a)=>{t in e?mf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class vf{constructor(){bf(this,"formEditor","IBizRate"),bf(this,"gridEditor","IBizRate")}async createController(e,t){const a=new hf(e,t);return await a.init(),a}}const wf=a({name:"IBizSwitch",props:Fe(),emits:ze(),setup(e,{emit:t}){const a=B("switch"),o=e.controller,s=o.model,i=n(!1);let r="",d="",u=[{value:0,label:""},{value:1,label:""}];if(s.editorParams&&s.editorParams.dicData&&(u=o.toObj(s.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&&(i.value=!!t&&1==e.value)}),{immediate:!0});const h=l((()=>!e.autoFocus&&(e.disabled||e.readonly))),{useInFocusAndBlur:m,useInValueChange:b}=je(e,t),{componentRef:v}=xe((()=>t("focus")),(()=>m()));return{ns:a,currentVal:i,curDisabled:h,activeText:r,inactiveText:d,handleChange:e=>{t("change",!0===e?1:0),b()},dicData:u,editorRef:v,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(s("el-switch"),b({modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.curDisabled,activeText:this.activeText,inactiveText:this.inactiveText,onChange:this.handleChange},e),null)])}});class gf extends Nn{}var ff=Object.defineProperty,yf=(e,t,a)=>(((e,t,a)=>{t in e?ff(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cf{constructor(){yf(this,"formEditor","IBizSwitch"),yf(this,"gridEditor","IBizSwitch")}async createController(e,t){const a=new gf(e,t);return await a.init(),a}}const If=a({name:"IBizSlider",props:Ue(),emits:ze(),setup(e,{emit:t}){const a=B("slider"),o=e.controller,s=o.model,{valueFormat:i}=o.parent,{useInFocusAndBlur:r,useInValueChange:d}=je(e,t);let u=1,p=100,h=0,m=!1,b=!1,v=!1,w=!1,g=i||"0%",f="line",y="";s.editorParams&&(s.editorParams.stepvalue&&(u=Lo(s.editorParams.stepvalue)),s.editorParams.maxvalue&&(p=Lo(s.editorParams.maxvalue)),s.editorParams.minvalue&&(h=Lo(s.editorParams.minvalue)),s.editorParams.showstops&&(m=o.toBoolean(s.editorParams.showstops)),s.editorParams.range&&(b=o.toBoolean(s.editorParams.range)),s.editorParams.showinput&&(v=o.toBoolean(s.editorParams.showinput)),s.editorParams.showText&&(w=o.toBoolean(s.editorParams.showText)),s.editorParams.format&&(g=s.editorParams.format),s.editorParams.type&&(f=s.editorParams.type),s.editorParams.textItem&&(y=s.editorParams.textItem));const C=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),I=e=>{switch(f){case"line":return(e=>b?JSON.parse(e):Number(e))(e);case"circle":return(e=>100*Number(e))(e);default:return e}},P=n();c((()=>e.value),((e,t)=>{e!==t&&(P.value=null==e?b?[0,1]:0:I(e))}),{immediate:!0});const D=l((()=>{if(y){const t=e.data||{};return ibiz.util.text.format("".concat(t[y]),g)}const t=Number(P.value),a=Number(t/p);return ibiz.util.text.format("".concat(a),g)})),{componentRef:E}=xe((()=>t("focus")),(()=>r()));return{ns:a,currentVal:P,handleChange:e=>{Array.isArray(e)?t("change",JSON.stringify(e)):t("change",e),d()},step:u,max:p,min:h,type:f,textItem:y,showStops:m,range:b,showInput:v,editorRef:E,showText:w,textVal:D,showFormDefaultContent:C}},render(){let e;return"line"===this.type&&(e=[o(s("el-slider"),b({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(s("el-progress"),b({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])}})),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 Pf extends Nn{async onInit(){super.onInit(),this.model.precision&&ibiz.log.warn("滑动输入条不支持配置精度")}}var Df=Object.defineProperty,Ef=(e,t,a)=>(((e,t,a)=>{t in e?Df(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kf{constructor(){Ef(this,"formEditor","IBizSlider"),Ef(this,"gridEditor","IBizSlider")}async createController(e,t){const a=new Pf(e,t);return await a.init(),a}}function xf(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const zf=a({name:"IBizListBox",props:qe(),emits:ze(),setup(e,{emit:t}){const a=B("list-box"),o=e.controller,s=o.model;let i=!1;s.editorParams&&s.editorParams.multiple&&(i=o.toBoolean(s.editorParams.multiple));const{useInFocusAndBlur:r,useInValueChange:d}=je(e,t),u=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),p=o.codeList,h=s.editorType,m=n([]);(async()=>{if(Object.is("LISTBOX",h)){o.loadCodeList(e.data).then((e=>{m.value=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]}))))}}})();q(o.model.appCodeListId,o.context.srfappid,(e=>{e&&(m.value=e)}));const b=l((()=>p&&p.orMode?p.orMode.toLowerCase():"str"));let v=",";p&&p.valueSeparator&&(v=p.valueSeparator);const w=n([]);c((()=>e.value),(e=>{if(bo(e))w.value=[];else if(i){let t=[];if("LISTBOX"===h){if(Object.is(b.value,"num")&&m){const a="string"==typeof e?parseInt(e,10):e;m.value.forEach((e=>{(a&e.value)===e.value&&t.push(e.value)}))}else if(Object.is(b.value,"str")&&""!==e&&p&&("string"==typeof e||Array.isArray(e))&&(t=Array.isArray(e)?e:e.split(v),p.codeItemValueNumber))for(let e=0,a=t.length;e<a;e++)t[e]=Number(t[e])}else"LISTBOXPICKUP"===h&&""!==e&&(t="SIMPLES"===o.model.valueType&&Array.isArray(e)?e:e.split(v));w.value=t}else w.value=[e]}),{immediate:!0,deep:!0});const{componentRef:g}=xe((()=>t("focus")),(()=>r()));return{ns:a,items:m,selectArray:w,onSelectArrayChange:e=>{let a;if(i){const t=[...e];if(Object.is("LISTBOX",h))if(Object.is(b,"num")){let e=0;t.forEach((t=>{e|=parseInt(t,10)})),a=e}else Object.is(b,"str")&&("SIMPLES"===o.model.valueType?a=t:"SIMPLE"===o.model.valueType&&(a=t.join(v)));else Object.is("LISTBOXPICKUP",h)&&("SIMPLES"===o.model.valueType?a=t:"SIMPLE"===o.model.valueType&&(a=t.join(v)))}else a=e;t("change",a),d()},multiple:i,editorRef:g,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(s("el-checkbox-group"),b({class:this.ns.b("checkbox"),modelValue:this.selectArray,onChange:this.onSelectArrayChange},this.$attrs),xf(e=this.items.map(((e,t)=>o(s("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=s(t.acItemProvider.component);return r(a,{item:e,controller:t})}return o("span",{class:this.ns.e("text")},[e.text])}}))))?e:{default:()=>[e]}):o(s("el-radio-group"),b({class:this.ns.b("radio"),modelValue:this.selectArray[0]},this.$attrs),xf(t=this.items.map(((e,t)=>o(s("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=s(t.acItemProvider.component);return r(a,{item:e,controller:t})}return o("span",{class:this.ns.e("text")},[e.text])}}))))?t:{default:()=>[t]})])}});var Sf=Object.defineProperty,Tf=(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 _f extends jn{constructor(){super(...arguments),Tf(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 Of=Object.defineProperty,Bf=(e,t,a)=>(((e,t,a)=>{t in e?Of(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jf extends Nn{constructor(){super(...arguments),Bf(this,"keyName","srfkey"),Bf(this,"textName","srfmajortext"),Bf(this,"interfaceName",""),Bf(this,"deACMode"),Bf(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 An(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode&&this.deACMode.itemSysPFPluginId&&(this.acItemProvider=await Rn(this.deACMode))))}async getServiceData(e){const{context:t,params:a}=this.handlePublicParams(e,this.context,this.params),n=fo(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 St(this.model,ibiz.i18n.t("editor.common.entityConfigErr"))}}var Af=Object.defineProperty,Nf=(e,t,a)=>(((e,t,a)=>{t in e?Af(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Rf{constructor(){Nf(this,"formEditor","IBizListBox"),Nf(this,"gridEditor","IBizListBox")}async createController(e,t){let a;return a="LISTBOXPICKUP"===e.editorType?new jf(e,t):new _f(e,t),await a.init(),a}}const Mf=a({name:"IBizAutoComplete",props:Ge(),emits:ze(),setup(e,{emit:t}){const a=B("autocomplete"),o=e.controller,s=o.model.editorType,i=n(""),r=n([]),d=n(!0),u=n(!1),p=n(),h=n(!1),m=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c(r,((t,a)=>{if(0===a.length&&t.length>0){const a=t.findIndex((t=>Object.is(t[o.keyName],e.value)));-1!==a&&(i.value=t[a][o.textName])}}));const b=e=>{e?u.value=e:setTimeout((()=>{u.value=e}),100)},v=async(t,a)=>{if(o.model.appDataEntityId){const n=t.trim(),s=await o.getServiceData(n,e.data);s&&(r.value=s.data,h.value=!0,a&&a instanceof Function&&a(r.value))}};c((()=>e.value),(async(e,t)=>{if(e||null===e){h.value||void 0!==t||await v(""),null===e&&(i.value="");const a=r.value.findIndex((t=>Object.is(t[o.keyName],e)));i.value=-1!==a?r.value[a][o.textName]:e}}),{immediate:!0}),c(p,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const w=l((()=>!Object.is("AC_NOBUTTON",s))),g=l((()=>!(Object.is("AC_NOBUTTON",s)||Object.is("AC_FS_NOBUTTON",s))));let f,y=!1;const C=jo((e=>{f!==e&&t("change",e),f=void 0,y=!1}),300,{leading:!0});return{ns:a,c:o,curValue:i,triggerOnFocus:w,autoCompleteClearable:g,onSearch:v,onClear:()=>{const e=o.dataItems;e.length>0&&e.forEach((e=>{t("change",null,e.id)})),t("change",null)},onFocus:e=>{t("focus",e),b(!0)},onBlur:e=>{t("blur",e),b(!1)},onACSelect:async e=>{await(async e=>{const a=await o.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)})),t("change",e[o.keyName])})(e),d.value=!0,b(!1)},items:r,handleInput:e=>{"AC_FS"!==s&&"AC_FS_NOBUTTON"!==s&&(y=!0,C(e))},isDebounce:y,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},editorRef:p,isEditable:u,setEditable:b,showFormDefaultContent:m}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||ibiz.config.pickerEditor.overflowMode),t=o(s("el-autocomplete"),b({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"),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":e},this.$attrs),{default:({item:t})=>{if(this.c.acItemProvider){const e=s(this.c.acItemProvider.component);return r(e,{item:t,controller:this.c})}return o("div",{class:[this.ns.e("transfer-item"),this.ns.is("ellipsis",e)],title:ht(e?t[this.c.textName]:"")},[t[this.c.textName]])},suffix:()=>{}}),a=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.curValue]),n=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.curValue:"-"]);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])}});var Lf=Object.defineProperty,Vf=(e,t,a)=>(((e,t,a)=>{t in e?Lf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Ff extends Nn{constructor(){super(...arguments),Vf(this,"keyName","srfkey"),Vf(this,"textName","srfmajortext"),Vf(this,"interfaceName",""),Vf(this,"sort",""),Vf(this,"deACMode"),Vf(this,"dataItems",[]),Vf(this,"acItemProvider")}async onInit(){if(super.onInit(),this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await An(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 Rn(this.deACMode))}}async getServiceData(e,t){const{context:a,params:n}=this.handlePublicParams(t,this.context,this.params),o={};this.sort&&!Object.is(this.sort,"")&&Object.assign(o,{sort:this.sort}),e&&Object.assign(o,{query:e}),Object.assign(o,{size:1e3});const s=fo(n,o);if(this.interfaceName){const e=ibiz.hub.getApp(this.context.srfappid);return await e.deService.exec(this.model.appDataEntityId,this.interfaceName,a,s)}throw new St(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[]}}var Uf=Object.defineProperty,qf=(e,t,a)=>(((e,t,a)=>{t in e?Uf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Gf{constructor(){qf(this,"formEditor","IBizAutoComplete"),qf(this,"gridEditor","IBizAutoComplete")}async createController(e,t){const a=new Ff(e,t);return await a.init(),a}}function Hf(e,t,a){const o=n([]),s=n({Authorization:"Bearer ".concat(ro(mt.TOKEN))}),i=n(""),r=n(""),d={count:0,cacheFiles:[]};c((()=>e.value),(e=>{o.value=e?JSON.parse(e):[]}),{immediate:!0}),c((()=>e.data),(e=>{if(e){const t=ibiz.util.file.calcFileUpDownUrl(a.context,a.params,e,a.editorParams);i.value=t.uploadUrl,r.value=t.downloadUrl}}),{immediate:!0,deep:!0}),c(o,(e=>{(null==e?void 0:e.length)&&r.value&&e.forEach((e=>{e.url=e.url||r.value.replace("%fileId%",e.id)}))}),{immediate:!0}),c(r,(e=>{e&&o.value.length&&o.value.forEach((e=>{e.url=r.value.replace("%fileId%",e.id)}))}),{immediate:!0});const u=()=>{const e=[...o.value,...d.cacheFiles],a=e.length>0?JSON.stringify(e.map((e=>({name:e.name,id:e.id})))):null;d.cacheFiles=[],t(a)},p=l((()=>a.multiple?9999:1));return{uploadUrl:i,downloadUrl:r,headers:s,files:o,limit:p,onDownload:e=>{const t=e.url||r.value.replace("%fileId%",e.id);ibiz.util.file.fileDownload(t,e.name)},onError:(...e)=>{const t=e[0];throw d.count-=1,new _t({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),u()},onSuccess:e=>{e&&(d.cacheFiles.push({name:e.filename,id:e.fileid}),d.count-=1,0===d.count&&u())},beforeUpload:e=>{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 Wf=a({name:"IBizFileUpload",props:He(),emits:ze(),setup(e,{emit:t}){const a=B("file-upload"),n=e.controller,{useInFocusAndBlur:o,useInValueChange:s}=je(e,t),{uploadUrl:i,headers:r,files:c,limit:d,onDownload:u,onError:p,onRemove:h,onSuccess:m,beforeUpload:b}=Hf(e,(e=>{t("change",e),s()}),n),v=l((()=>{var e;return 1===d.value&&1===(null==(e=c.value)?void 0:e.length)})),w=l((()=>!!n.parent.model.columnType)),g=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{componentRef:f}=xe((()=>t("focus")),(()=>o()));return{ns:a,c:n,uploadUrl:i,headers:r,files:c,limit:d,noUploadIcon:v,onDownload:u,onError:p,onRemove:h,onSuccess:m,beforeUpload:b,isGridEditor:w,componentRef:f,showFormDefaultContent:g}},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(s("el-upload"),b({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,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(s("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)&&!i(t)?e:{default:()=>[e]}))];var t}})])}}),Kf=a({name:"IBizImageUpload",props:He(),emits:ze(),setup(e,{emit:t}){const a=B("image-upload"),o=e.controller,{useInFocusAndBlur:s,useInValueChange:i}=je(e,t),{uploadUrl:r,headers:c,files:d,limit:u,onDownload:p,onError:h,onRemove:m,onSuccess:b,beforeUpload:v}=Hf(e,(e=>{t("change",e),i()}),o),w=n(""),g=n(!1),f=l((()=>1===u.value&&1===d.value.length)),y=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),{componentRef:C}=xe((()=>t("focus")),(()=>s()));return{ns:a,c:o,files:d,limit:u,headers:c,uploadUrl:r,dialogImageUrl:w,dialogVisible:g,noUploadIcon:f,beforeUpload:v,onSuccess:b,onError:h,onRemove:m,onDownload:p,onDialogVisibleChange:e=>{g.value=e},onPreview:e=>{w.value=e.url,g.value=!0},componentRef:C,showFormDefaultContent:y}},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)],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.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(s("el-upload"),b({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(s("el-image-viewer"),b({onClose:()=>this.onDialogVisibleChange(!1),"url-list":[this.dialogImageUrl],"hide-on-click-modal":!0,"close-on-press-escape":!0,teleported:!0,"z-index":9999},this.$attrs),null):null])}}),Xf=a({name:"IBizImagePreview",props:He(),emits:ze(),setup:e=>({ns:B("image-preview"),c:e.controller,showFormDefaultContent:l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)))}),render(){return o("div",{class:[this.ns.b(),this.ns.is("show-default",this.showFormDefaultContent)],onClick:e=>{e.stopPropagation()}},[o(s("el-image"),b({fit:"contain",src:this.value,"preview-src-list":[this.value]},this.$attrs),null)])}});var $f=Object.defineProperty,Yf=(e,t,a)=>(((e,t,a)=>{t in e?$f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Jf extends Nn{constructor(){super(...arguments),Yf(this,"isDrag",!1),Yf(this,"multiple",!0),Yf(this,"accept",""),Yf(this,"size",0),Yf(this,"uploadParams"),Yf(this,"exportParams")}async onInit(){var e;if(await super.onInit(),(null==(e=this.model.editorType)?void 0:e.includes("PICTURE"))&&(this.accept="image/*"),["FILEUPLOADER_ONE","PICTURE_ONE","PICTURE_ONE_RAW"].includes(this.model.editorType)&&(this.multiple=!1),this.editorParams){const{isDrag:e,multiple:t,accept:a,size:n,uploadParams:o,exportParams:s}=this.editorParams;if(e&&(this.isDrag=Boolean(e)),t&&(this.multiple=Boolean(t)),a&&(this.accept=a),n&&(this.size=Number(n)),o)try{this.uploadParams=JSON.parse(o)}catch(e){throw new St(o,ibiz.i18n.t("editor.upload.uploadJsonFormatErr"))}if(s)try{this.exportParams=JSON.parse(s)}catch(e){throw new St(s,ibiz.i18n.t("editor.upload.exportJsonFormatErr"))}}}}var Qf=Object.defineProperty,Zf=(e,t,a)=>(((e,t,a)=>{t in e?Qf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class ey{constructor(e){Zf(this,"formEditor","IBizFileUpload"),Zf(this,"gridEditor","IBizFileUpload");let t="IBizFileUpload";switch(e){case"PICTURE":case"PICTURE_ONE":t="IBizImageUpload";break;case"PICTURE_ONE_RAW":t="IBizImagePreview"}this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new Jf(e,t);return await a.init(),a}}const ty=a({name:"IBizPicker",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("picker"),o=e.controller,s=n(""),i=n([]),r=n(!0),u=n(!1),p=n(),h=n(!1),m=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),(t=>{if(t||null===t){"OBJECT"===o.model.valueType?s.value=t?t[o.objectNameField]:null:s.value=t,null===t&&(s.value="");const a=e.data[o.valueItem];if(-1!==i.value.findIndex((e=>Object.is(e[o.keyName],a))))return;i.value=[],t&&!yo(a)&&i.value.push({[o.textName]:t,[o.keyName]:a})}}),{immediate:!0});const b=e=>{e?u.value=e:setTimeout((()=>{u.value=e}),100)},v=async e=>{const a=await o.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)})),Object.assign(e,{[o.keyName]:e[o.keyName]?e[o.keyName]:e.srfkey,[o.textName]:e[o.textName]?e[o.textName]:e.srfmajortext}),o.valueItem&&t("change",e[o.keyName],o.valueItem),"OBJECT"===o.model.valueType?t("change",o.handleObjectParams(e)):t("change",e[o.textName]),b(!1)},w=async(t,a)=>{if(o.model.appDataEntityId){let n="";t!==e.value&&(n=t.trim());const s=await o.getServiceData(n,e.data);s&&(i.value=s.data,h.value=!0,a&&a instanceof Function&&a(i.value))}},g=(o.linkView?1:0)+(o.pickupView?1:0);c(p,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const f=l((()=>Ke(s.value)));return c(f,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),d((()=>{c((()=>e.data[o.valueItem]),(async(a,n)=>{if(a!==n){!h.value&&p.value&&bo(e.value)&&await w("");const n=i.value.find((e=>Object.is(e[o.keyName],a)));n&&(s.value=n[o.textName]),null===a&&t("change",null)}}),{immediate:!0})})),{ns:a,c:o,curValue:s,valueText:f,items:i,openPickUpView:async t=>{t.stopPropagation();const a=await o.openPickUpView(e.data);a&&a[0]&&await v(a[0])},openLinkView:async t=>{t.stopPropagation();const a=await o.openLinkView(e.data);a&&a.ok&&a.data&&a.data.length>0&&await v(a.data[0])},onACSelect:async e=>{await v(e),r.value=!0},onSearch:w,editorRef:p,onClear:()=>{const e=o.dataItems;(null==e?void 0:e.length)&&e.forEach((e=>{t("change",null,e.id)})),o.valueItem&&t("change",null,o.valueItem),t("change",null)},onFocus:e=>{t("focus",e),b(!0)},onBlur:e=>{t("blur",e),b(!1)},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},closeCircle:g,isEditable:u,setEditable:b,showFormDefaultContent:m}},render(){const e="ellipsis"===(this.c.editorParams.overflowMode||ibiz.config.pickerEditor.overflowMode),t=t=>{var a;const n=null==(a=this.c.deACMode)?void 0:a.itemLayoutPanel,{context:i,params:l}=this.c;if(this.c.acItemProvider){const e=s(this.c.acItemProvider.component);return r(e,{item:t,controller:this.c,onClick:()=>{this.onACSelect(t)}})}return n?o(s("iBizControlShell"),{data:t,modelData:n,context:i,params:l,onClick:()=>{this.onACSelect(t)}},null):o("div",{class:[this.ns.e("transfer-item"),this.ns.is("ellipsis",e)],title:ht(e?t[this.c.textName]:""),onClick:()=>{this.onACSelect(t)}},[t[this.c.textName]])},a=this.c.noAC?o(s("el-input"),b({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(s("el-autocomplete"),b({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"),"fetch-suggestions":this.onSearch,onClear:this.onClear,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,disabled:this.disabled,"fit-input-width":e},this.$attrs),{default:({item:e})=>this.$slots.append?this.$slots.append({}):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]}})]),n=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),i=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.valueText:"-"]);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&&i,this.readonly?n:a])}});const ay=a({name:"IBizMPicker",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("mpicker"),o=e.controller,s=n([]),i=n([]),r=n([]),u=n(!1),p=n(!1),h=n(!1),m=n(),b=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),(e=>{if(s.value=[],r.value=[],e){if("OBJECTS"===o.model.valueType)e.forEach((e=>{const t=Vo(e);Object.assign(t,{[o.keyName]:e[o.objectIdField],[o.textName]:e[o.objectNameField]}),o.objectValueField&&(Object.assign(t,{...e[o.objectValueField]}),delete t[o.objectValueField]),t[o.keyName]&&r.value.push(t)}));else if(o.objectIdField&&o.model.valueSeparator){e.split(o.model.valueSeparator).forEach((e=>{r.value.push({[o.keyName]:e})}))}else try{r.value=JSON.parse(e)}catch(t){ibiz.log.error("SIMPLE类型地址栏值格式".concat(e,"不符合JSON字符串要求"))}r.value.forEach((e=>{s.value.push(e[o.keyName]);i.value.findIndex((t=>Object.is(t[o.keyName],e[o.keyName])))<0&&i.value.push({[o.keyName]:e[o.keyName],[o.textName]:e[o.textName]})}))}}),{immediate:!0,deep:!0}),c(m,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const v=e=>{e?h.value=e:setTimeout((()=>{h.value=e}),100)},w=async t=>{if(o.model.appDataEntityId){p.value=!0;try{const a=t.trim(),n=await o.getServiceData(a,e.data);p.value=!1,n&&(i.value=n.data)}catch(e){p.value=!1}}},g=l((()=>r.value.map((e=>e[o.textName])).join(",")));c(g,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0});return d((()=>{o.objectNameField&&w("")})),{ns:a,c:o,curValue:s,loading:p,items:i,valueText:g,onSearch:w,onOpenChange:e=>{u.value=e,u.value&&(i.value=[],w(""))},onSelect:e=>{const a=[];let n=null;e.length>0&&(e.forEach((e=>{let t=i.value.findIndex((t=>Object.is(t[o.keyName],e))),n={};t>=0?n=i.value[t]:(t=r.value.findIndex((t=>Object.is(t[o.keyName],e))),t>=0&&(n=r.value[t])),"OBJECTS"===o.model.valueType?a.push(o.handleObjectParams(n)):o.objectIdField?a.push(n[o.keyName]):a.push({[o.keyName]:n[o.keyName],[o.textName]:n[o.textName]})})),a.length>0&&(n="OBJECTS"===o.model.valueType?a:o.objectIdField?a.join(o.model.valueSeparator):JSON.stringify(a)),t("change",n)),v(!1)},onRemove:e=>{const a=r.value.findIndex((t=>Object.is(t[o.keyName],e)));if(a>=0){r.value.splice(a,1);const e=[];let n=null;r.value.forEach((t=>{"OBJECTS"===o.model.valueType?e.push(o.handleObjectParams(t)):o.objectIdField?e.push(t[o.keyName]):e.push({[o.keyName]:t[o.keyName],[o.textName]:t[o.textName]})})),e.length>0&&(n="OBJECTS"===o.model.valueType?e:o.objectIdField?e.join(o.model.valueSeparator):JSON.stringify(e)),t("change",n)}},openPickUpView:async()=>{let a;if(r.value.length){const e=JSON.parse(JSON.stringify(r.value));e.forEach(((t,a)=>{e[a].srfkey=t[o.keyName],e[a].srfmajortext=t[o.textName]})),a=JSON.stringify(e)}const n=await o.openPickUpView(e.data,a);n&&(e=>{const a=[];e&&Array.isArray(e)&&e.forEach((e=>{Object.assign(e,{[o.keyName]:e[o.keyName]?e[o.keyName]:e.srfkey,[o.textName]:e[o.textName]?e[o.textName]:e.srfmajortext}),"OBJECTS"===o.model.valueType?a.push(o.handleObjectParams(e)):o.objectIdField?a.push(e[o.keyName]):a.push({[o.keyName]:e[o.keyName],[o.textName]:e[o.textName]}),i.value.findIndex((t=>Object.is(t[o.keyName],e[o.keyName])))<0&&i.value.push(e)}));let n=null;a.length>0&&(n="OBJECTS"===o.model.valueType?a:o.objectIdField?a.join(o.model.valueSeparator):JSON.stringify(a)),t("change",n),v(!1)})(n)},onFocus:e=>{t("focus",e),v(!0)},onBlur:e=>{t("blur",e),v(!1)},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},selectItems:r,editorRef:m,isEditable:h,setEditable:v,showFormDefaultContent:b}},render(){let e;const t="ellipsis"===(this.c.editorParams.overflowMode||ibiz.config.pickerEditor.overflowMode),a=[!this.readonly&&o(s("el-select"),b({ref:"editorRef",class:[this.ns.b("select")],modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,filterable:!0,remote:!0,multiple:!0,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":t,"remote-show-suffix":this.c.model.showTrigger},this.$attrs),(n=e=this.items.map((e=>o(s("el-option"),{title:ht(t?e[this.c.textName]:""),key:e[this.c.keyName],value:e[this.c.keyName],label:e[this.c.textName]},{default:()=>{if(this.c.acItemProvider){const t=s(this.c.acItemProvider.component);return r(t,{item:e,controller:this.c})}return o("span",null,[null!=e[this.c.textName]?e[this.c.textName]:""])}}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?e:{default:()=>[e]})),!this.readonly&&o("div",{class:this.ns.e("buns-position")},[o("div",{class:this.ns.e("btns")},[this.c.model.pickupAppViewId?o("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null])])];var n;const l=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),c=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]]))):"-"]);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&&c,this.readonly?l:a])}});const ny=a({name:"IBizPickerDropDown",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("picker-dropdown"),o=e.controller,s=n(""),i=n([]),r=n(!1),u=n(""),p=n(!1),h=n(),m=n(!1);let b=null;const v=n(!1),w=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),(t=>{if(t||null===t){"OBJECT"===o.model.valueType?s.value=t?t[o.objectNameField]:null:s.value=t,null===t&&(s.value=""),u.value=s.value;const a=e.data[o.valueItem];if(-1!==i.value.findIndex((e=>Object.is(e[o.keyName],a))))return;i.value=[],bo(t)||bo(a)||i.value.push({[o.textName]:t,[o.keyName]:a})}}),{immediate:!0}),c(h,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const g=async t=>{if(r.value)if(o.model.appDataEntityId&&!1===m.value){m.value=!0;try{let a="";t!==e.value&&(a=t.trim());const n=await o.getServiceData(a,e.data);n&&(i.value=n.data)}finally{if(m.value=!1,v.value=!0,null!=b){const e=b;b=null,await g(e)}}}else b=t};d((()=>{c((()=>e.data[o.valueItem]),(async(a,n)=>{a!==n&&(!v.value&&h.value&&bo(e.value)&&(r.value=!0,await g("")),u.value=a,null===a&&t("change",null))}),{immediate:!0,deep:!0})}));const f=e=>{e?p.value=e:setTimeout((()=>{p.value=e}),100)},y=l((()=>Ke(s.value)));return c(y,((e,a)=>{e!==a&&t("infoTextChange",e)}),{immediate:!0}),{ns:a,c:o,refValue:u,curValue:s,valueText:y,loading:m,items:i,onOpenChange:e=>{e&&(i.value=[],g(""))},onClear:()=>{const e=o.dataItems;(null==e?void 0:e.length)&&e.forEach((e=>{t("change",null,e.id)})),o.valueItem&&t("change",null,o.valueItem),t("change",null)},onSelect:e=>{const a=i.value.findIndex((t=>Object.is(t[o.keyName],e)));a>=0&&(async e=>{const a=await o.calcFillDataItems(e);a.length&&a.forEach((e=>{t("change",e.value,e.id)}));const n=mo(e);Object.assign(n,{[o.keyName]:n[o.keyName]?n[o.keyName]:n.srfkey,[o.textName]:n[o.textName]?n[o.textName]:n.srfmajortext}),o.valueItem&&t("change",n[o.keyName],o.valueItem),"OBJECT"===o.model.valueType?t("change",o.handleObjectParams(n)):t("change",e[o.textName]),f(!1)})(i.value[a]),r.value=!1},onSearch:g,onFocus:e=>{r.value=!0,t("focus",e),f(!0)},onBlur:e=>{r.value=!1,t("blur",e),f(!1)},onClick:()=>{r.value=!0},handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},editorRef:h,isEditable:p,setEditable:f,showFormDefaultContent:w}},render(){let e;const t="ellipsis"===(this.c.editorParams.overflowMode||ibiz.config.pickerEditor.overflowMode),a=this.readonly?this.value:o(s("el-select"),b({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,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":t},this.$attrs),"function"==typeof(n=e=this.items.map((e=>o(s("el-option"),{title:ht(t?e[this.c.textName]:""),value:e[this.c.keyName],key:e[this.c.keyName],label:e[this.c.textName]},{default:()=>{if(this.c.acItemProvider){const t=s(this.c.acItemProvider.component);return r(t,{item:e,controller:this.c})}return o("span",null,[null!=e[this.c.textName]?e[this.c.textName]:""])}}))))||"[object Object]"===Object.prototype.toString.call(n)&&!i(n)?e:{default:()=>[e]});var n;const l=o("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]),c=o("div",{class:this.ns.b("form-default-content")},[this.curValue?this.valueText:"-"]);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&&c,this.readonly?l:a])}}),oy=a({name:"IBizPickerLink",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("picker-link"),o=e.controller,s=n(""),i=n([]),{useInFocusAndBlur:r,useInValueChange:u}=je(e,t),p=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e&&e!==t&&("OBJECT"===o.model.valueType?s.value=e?e[o.objectNameField]:"":s.value=e)}),{immediate:!0}),d((()=>{c((()=>e.data[o.valueItem]),(async(a,n)=>{if(a!==n){bo(e.value)&&await(async t=>{if(o.model.appDataEntityId){let a="";t!==e.value&&(a=t.trim());const n=await o.getServiceData(a,e.data);n&&(i.value=n.data)}})("");const n=i.value.find((e=>Object.is(e[o.keyName],a)));n&&(s.value=n[o.textName]),null===a&&t("change",null)}}),{immediate:!0})}));const{componentRef:h}=xe((()=>t("focus")),(()=>r())),m=l((()=>Ke(s.value)));return c(m,((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]),u()})(a.data[0])},curValue:s,editorRef:h,showFormDefaultContent:p}},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])])}}),sy=a({name:"IBizPickerEmbedView",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("picker-embed-view"),o=e.controller,s=n(mo(o.context)),i=n(mo(o.params)),r=()=>{const{context:t,params:a}=o.handlePublicParams(e.data,o.context,o.params);Object.assign(s.value,t),Object.assign(i.value,a)};r(),c((()=>e.data),((e,t)=>{e!==t&&r()}));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.isShowText&&(h.value=o.toBoolean(d.isShowText)));const m=n([]);c((()=>e.value),(t=>{var a,n,s,i;if(m.value=[],t&&o.valueItem){const l=null==(s=null==(n=null==(a=e.data)?void 0:a[o.valueItem])?void 0:n.split)?void 0:s.call(n,","),r=null==(i=null==t?void 0:t.split)?void 0:i.call(t,",");l&&r&&(m.value=l.map(((e,t)=>({srfkey:e,srfmajortext:r[t]}))))}}),{immediate:!0});const{componentRef:b}=xe((()=>t("focus")),(()=>t("blur"))),v=l((()=>o.pickupView));return{ns:a,c:o,context:s,params:i,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)},editorRef:b,pickupViewModel:v,singleSelect:u,checkStrictly:p,isShowText:h,selectedData:m}},render(){var e;const t=s("IBizViewShell");return o("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):""],ref:"editorRef"},[this.pickupViewModel?[o("div",{class:this.ns.b("view")},[r(t,{context:this.context,params:this.params,viewId:null==(e=this.c.pickupView)?void 0:e.id,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,v("; ")]))):o("span",null,[this.c.placeHolder])])]:null])}});const iy=a({name:"IBizPickerSelectView",props:We(),emits:ze(),setup(e,{emit:t}){const a=B("picker-select-view"),s=e.controller,i=s.model,r=n(!0);i.editorParams&&i.editorParams.multiple&&(r.value=!s.toBoolean(i.editorParams.multiple));const u=n([]),p=n([]),h=n([]),m=n(""),b=n(!1),v=n("auto"),w=n(s.context),g=n(s.params);c((()=>e.data),(e=>{const{context:t,params:a}=s.handlePublicParams(e,s.context,s.params);Object.assign(w.value,t),Object.assign(g.value,a)}),{immediate:!0,deep:!0});const f=n(!1),y=n(null),C=n(null),I=n(null),P=n(!1),D=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),E=e=>{e?f.value=e:setTimeout((()=>{f.value=e}),100)},{componentRef:k}=xe((()=>t("focus")),(()=>t("blur")));c((()=>e.value),(t=>{if(r.value)"OBJECT"===s.model.valueType?m.value=t?t[s.objectNameField]:null:m.value=t||"",e.data&&s.valueItem&&e.data[s.valueItem]?(h.value=[{srfkey:e.data[s.valueItem],srfmajortext:e.value}],g.value.selecteddata=h.value):ibiz.log.error("值项异常");else{const a=[];if(u.value=[],p.value=[],t)if("OBJECTS"===s.model.valueType)t.forEach((e=>{const t=mo(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]&&(p.value.push(t),u.value.push(t[s.keyName]))})),a.push(...t);else if(e.data&&s.valueItem&&e.data[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=>{u.value.push(e.srfkey);p.value.findIndex((t=>Object.is(t.srfkey,e.srfkey)))<0&&p.value.push({srfmajortext:e.srfmajortext,srfkey:e.srfkey})}))}else ibiz.log.error("值项异常");h.value=a,I.value=a}}),{immediate:!0,deep:!0}),c(k,(t=>{e.autoFocus&&t&&t.focus&&t.focus()})),d((()=>{k.value&&(v.value="".concat(k.value.$parent.$el.offsetWidth,"px"))}));const x=()=>{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)},z=e=>{if(0!==e.length){if(r.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)})),I.value=t}}else{let t="",a="";e&&Array.isArray(e)&&(p.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,",");p.value.findIndex((e=>Object.is(e.srfkey,n)))<0&&p.value.push({srfmajortext:o,srfkey:n})}))),t=t.substring(0,t.length-1),a=a.substring(0,a.length-1),s.valueItem&&(y.value=t),C.value=a}r.value||(0===e.length?(p.value=[],u.value=[]):Array.isArray(e)&&(p.value=e.map((e=>({srfkey:e[s.keyName]||e.srfkey,srfmajortext:e[s.textName]||e.srfmajortext}))),u.value=p.value.map((e=>e.srfkey)))),r.value||("OBJECTS"===s.model.valueType?t("change",I.value):(s.valueItem&&t("change",y.value,s.valueItem),t("change",C.value)))}else r.value?x():(p.value=[],"OBJECTS"===s.model.valueType?I.value=null:(s.valueItem&&(y.value=null),C.value=null),u.value=[])},S=e=>{e.data&&(z(e.data),r.value&&k.value&&k.value.handleClose())},T=new ia({mode:la.DRAWER,viewUsage:2,dismiss:e=>{S(e)}}),_=e=>{t("blur",e),E(!1)},O=l((()=>r.value?m.value:h.value.map((e=>e[s.textName])).join(",")));return{ns:a,c:s,singleSelect:r,keySet:u,items:p,queryValue:m,visible:b,pickViewWidth:v,context:w,params:g,editorRef:k,onInputChange:e=>{e||x()},triggerMenu:t=>{e.disabled||(b.value=t||!b.value)},onViewDataChange:z,onClear:x,openLinkView:async t=>{t.stopPropagation();const a=await s.openLinkView(e.data);a&&a.ok&&a.data&&z(a.data)},onSelectChange:e=>{const a=[];if(e.length>0&&e.forEach((e=>{const t=p.value.findIndex((t=>Object.is(t.srfkey,e)));t>=0&&a.push(p.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&&(y.value=e,t("change",e,s.valueItem)),C.value=n,t("change",n)}},remoteMethod:e=>{m.value=e},onSelectionChange:S,modal:T,onFocus:e=>{t("focus",e),E(!0)},onBlur:_,handleKeyUp:e=>{e&&"Enter"===e.code?t("enter",e):"Escape"===e.code&&(e.stopPropagation(),k.value&&k.value.handleClose())},valueText:O,isEditable:f,setEditable:E,showFormDefaultContent:D,onVisibleChange:e=>{P.value=e,!1===e&&_({})},showView:P,selectedData:h,handleDropDownKeyDown:e=>{"Escape"===e.code&&(e.stopPropagation(),k.value&&k.value.handleClose())},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)])}},render(){const e=o(s("el-dropdown"),{ref:"editorRef",trigger:"click",class:this.ns.b("select"),"popper-class":this.ns.b("popper"),onVisibleChange:this.onVisibleChange,onKeydown:this.handleDropDownKeyDown},{default:()=>{let e;return this.singleSelect?o(s("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(s("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(s("el-option"),{key:e.srfkey+t,label:e.srfmajortext,value:e.srfkey},null))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!i(t)?e:{default:()=>[e]}));var t},dropdown:()=>{if(!this.showView)return;const e=s("IBizViewShell");return this.c.pickupView&&r(e,{context:this.context,params:this.params,viewId:this.c.pickupView.id,style:{height:"100%",width:this.pickViewWidth},state:{singleSelect:this.singleSelect,selectedData:this.selectedData},onSelectionChange:this.onSelectionChange,modal:this.modal})}}),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]))):"-"]);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])}});var ly=Object.defineProperty,ry=(e,t,a)=>(((e,t,a)=>{t in e?ly(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class cy extends Nn{constructor(){super(...arguments),ry(this,"multiple",!1),ry(this,"pickupView",null),ry(this,"linkView",null),ry(this,"valueItem",""),ry(this,"keyName","srfkey"),ry(this,"textName","srfmajortext"),ry(this,"interfaceName",""),ry(this,"sort",""),ry(this,"noAC",!1),ry(this,"noButton",!1),ry(this,"deACMode"),ry(this,"dataItems",[]),ry(this,"objectIdField",""),ry(this,"objectNameField",""),ry(this,"objectValueField",""),ry(this,"acItemProvider")}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 An(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 Rn(this.deACMode))}this.model.editorType&&["PICKEREX_DROPDOWNVIEW","PICKEREX_DROPDOWNVIEW_LINK","PICKUPVIEW"].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()}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={};this.sort&&!Object.is(this.sort,"")&&Object.assign(o,{sort:this.sort}),e&&Object.assign(o,{query:e}),Object.assign(o,{size:1e3});const s=fo(n,o);if(this.interfaceName){const e=ibiz.hub.getApp(this.context.srfappid);return await e.deService.exec(this.model.appDataEntityId,this.interfaceName,a,s)}throw new St(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 St(this.model,ibiz.i18n.t("editor.common.selectViewConfigErr"));const o=await ibiz.commands.execute(Sn.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 St(this.model,ibiz.i18n.t("editor.common.linkViewConfigErr"));return ibiz.commands.execute(Sn.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={};return this.objectIdField&&Object.assign(t,{[this.objectIdField]:e[this.keyName]}),this.objectNameField&&Object.assign(t,{[this.objectNameField]:e[this.textName]}),this.objectValueField&&Object.assign(t,{[this.objectValueField]:{...e}}),e.srfnodeid&&Object.assign(t,{srfnodeid:e.srfnodeid}),t}}var dy=Object.defineProperty,uy=(e,t,a)=>(((e,t,a)=>{t in e?dy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class py{constructor(e){uy(this,"formEditor"),uy(this,"gridEditor");let t="IBizPicker";switch(e){case"PICKEREX_TRIGGER":t="IBizPickerDropDown";break;case"PICKEREX_LINK":case"PICKEREX_LINKONLY":t="IBizPickerLink";break;case"ADDRESSPICKUP":case"ADDRESSPICKUP_AC":t="IBizMPicker";break;case"PICKEREX_DROPDOWNVIEW":case"PICKEREX_DROPDOWNVIEW_LINK":t="IBizPickerSelectView";break;case"PICKUPVIEW":t="IBizPickerEmbedView"}this.formEditor=t,this.gridEditor=t}async createController(e,t){const a=new cy(e,t);return await a.init(),a}}const hy=a({name:"IBizNumberRangePicker",props:Xe(),emits:ze(),setup(e,{emit:t}){const a=B("number-range-picker"),o=e.controller,s=o.model,{useInFocusAndBlur:i,useInValueChange:r}=je(e,t);let d=1/0,u=-1/0,p=0,h="-";const m=s.placeHolder&&s.placeHolder.split(";")[0]||"",b=s.placeHolder&&s.placeHolder.split(";")[1]||"";let v="~";s.editorParams&&(s.editorParams.maxvalue&&(d=Lo(s.editorParams.maxvalue)),s.editorParams.minvalue&&(u=Lo(s.editorParams.minvalue)),s.editorParams.precision&&(p=Lo(s.editorParams.precision)),s.editorParams.valueSeparator&&(h=s.editorParams.valueSeparator),s.editorParams.rangeSeparator&&(v=s.editorParams.rangeSeparator));const w=n([]),g=s.editorItems;if(g&&g.length>0){const e=g.map((e=>e.id));w.value=e}const f=n(null),y=n(null),C=n(!1),I=n(),P=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&"string"==typeof e&&(f.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 D=e=>{e?C.value=e:setTimeout((()=>{C.value=e}),100)},E=(e,a,n)=>{e===o.triggerMode&&t("change",a,n)},{componentRef:k}=xe((()=>t("focus")),(()=>i())),x=l((()=>"number"==typeof f.value&&"number"==typeof y.value?"".concat(f.value).concat(v).concat(y.value):null));return{ns:a,c:o,refFormItem:w,minValue:f,maxValue:y,handleChange:(e,t,a="blur")=>{if(0===t?f.value=e:1===t&&(y.value=e),null!==f.value&&null!==y.value&&(E(a,[f.value,y.value].join(h)),D(!1),r()),w.value){const n=w.value[t];E(a,e,n),r()}},max:d,min:u,precision:p,valueSeparator:h,startPlaceHolder:m,endPlaceHolder:b,rangeSeparator:v,componentRef:k,editorRef:I,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},onFocus:e=>{t("focus",e),D(!0)},onBlur:e=>{null!==f.value&&null!==y.value&&(t("blur",e),D(!1))},valueText:x,isEditable:C,setEditable:D,showFormDefaultContent:P}},render(){const e=o("div",{class:this.ns.b("input")},[o(s("el-input-number"),b({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(s("el-input-number"),b({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])]:"-"]);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 my extends Nn{}var by=Object.defineProperty,vy=(e,t,a)=>(((e,t,a)=>{t in e?by(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class wy{constructor(){vy(this,"formEditor","IBizNumberRangePicker"),vy(this,"gridEditor","IBizNumberRangePicker")}async createController(e,t){const a=new my(e,t);return await a.init(),a}}const gy=a({name:"IBizDateRangePicker",props:$e(),emits:ze(),setup(e,{emit:t}){const a=B("date-range-picker"),o=e.controller,s=o.model;let i=",",r=!1;const d=s.placeHolder&&s.placeHolder.split(";")[0]||"",u=s.placeHolder&&s.placeHolder.split(";")[1]||"";let p=ibiz.i18n.t("editor.dateRange.rangeSeparator");s.editorParams&&(s.editorParams.valueSeparator&&(i=s.editorParams.valueSeparator),s.editorParams.rangeSeparator&&(p=s.editorParams.rangeSeparator),s.editorParams.unlinkPanels&&(r=o.toBoolean(s.editorParams.unlinkPanels)));const h=n("daterange");switch(s.editorType){case"DATERANGE":default:h.value="datetimerange";break;case"DATERANGE_NOTIME":h.value="daterange"}const m=n("YYYY-MM-DD"),b=o.valueFormat;b&&(m.value=b);const v=n([]),w=s.editorItems;if(w&&w.length>0){const e=w.map((e=>e.id));v.value=e}const g=n(!1),f=n(),y=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),C=e=>{e?g.value=e:setTimeout((()=>{g.value=e}),100)},I=l({get(){let t=[];return v.value.length>0?v.value.forEach((a=>{e.data[a]&&t.push(e.data[a])})):e.value&&"string"==typeof e.value&&(t=e.value.split(i)),t},set(e){e&&e.length>0?(t("change",e.join(i)),v.value.length>0&&e.forEach(((e,a)=>{t("change",e,v.value[a])}))):(t("change",null),v.value.length>0&&v.value.forEach(((e,a)=>{t("change",null,v.value[a])}))),C(!1)}});c(f,(t=>{e.autoFocus&&t&&t.focus&&t.focus()}));const P=l((()=>I.value.length>0?"".concat(I.value[0]," ").concat(p," ").concat(I.value[1]):null));return{ns:a,c:o,refFormItem:v,curValue:I,type:h,format:m,valueSeparator:i,startPlaceHolder:d,endPlaceHolder:u,rangeSeparator:p,unlinkPanels:r,onFocus:e=>{t("focus",e),C(!0)},onBlur:e=>{t("blur",e),C(!1)},editorRef:f,valueText:P,isEditable:g,setEditable:C,showFormDefaultContent:y,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},onCalendarChange:e=>{o.dateRange=mo(e)}}},render(){const e=o(s("el-date-picker"),b({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(s("el-date-picker"),b({"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):"-"]);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 fy=Object.defineProperty,yy=(e,t,a)=>(((e,t,a)=>{t in e?fy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Cy extends Nn{constructor(){super(...arguments),yy(this,"dateRange",[])}getFormatByType(){switch(this.model.editorType){case"DATERANGE":default:return"YYYY-MM-DD HH:mm:ss";case"DATERANGE_NOTIME":return"YYYY-MM-DD"}}get valueFormat(){return this.model.dateTimeFormat?this.model.dateTimeFormat:super.valueFormat?super.valueFormat:this.getFormatByType()}}var Iy=Object.defineProperty,Py=(e,t,a)=>(((e,t,a)=>{t in e?Iy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class Dy{constructor(){Py(this,"formEditor","IBizDateRangePicker"),Py(this,"gridEditor","IBizDateRangePicker")}async createController(e,t){const a=new Cy(e,t);return await a.init(),a}}function Ey(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ky(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 xy(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ky(Object(a),!0).forEach((function(t){Ey(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ky(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function zy(e,t){if(null==e)return{};var a,n,o=function(e,t){if(null==e)return{};var a,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}function Sy(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 Ty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _y(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 Oy(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?_y(Object(a),!0).forEach((function(t){Ty(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_y(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function By(e){return function t(){for(var a=this,n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.apply(a,[].concat(o,n))}}}function jy(e){return{}.toString.call(e).includes("Object")}function Ay(e){return"function"==typeof e}var Ny=By((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"}),Ry={changes:function(e,t){return jy(t)||Ny("changeType"),Object.keys(t).some((function(t){return a=e,n=t,!Object.prototype.hasOwnProperty.call(a,n);var a,n}))&&Ny("changeField"),t},selector:function(e){Ay(e)||Ny("selectorType")},handler:function(e){Ay(e)||jy(e)||Ny("handlerType"),jy(e)&&Object.values(e).some((function(e){return!Ay(e)}))&&Ny("handlersType")},initial:function(e){var t;e||Ny("initialIsRequired"),jy(e)||Ny("initialType"),t=e,Object.keys(t).length||Ny("initialContent")}};function My(e,t){return Ay(t)?t(e.current):t}function Ly(e,t){return e.current=Oy(Oy({},e.current),t),t}function Vy(e,t,a){return Ay(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 Fy={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ry.initial(e),Ry.handler(t);var a={current:e},n=By(Vy)(a,t),o=By(Ly)(a),s=By(Ry.changes)(e),i=By(My)(a);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return Ry.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,s,i)(e)}]}};var Uy,qy={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 "},Gy=(Uy=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>=Uy.length?Uy.apply(this,n):function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return e.apply(t,[].concat(n,o))}})(qy),Hy={config:function(e){var t;return e||Gy("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||Gy("configType"),e.urls?(console.warn(qy.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};function Wy(e,t){return Object.keys(t).forEach((function(a){t[a]instanceof Object&&e[a]&&Object.assign(t[a],Wy(e[a],t[a]))})),xy(xy({},e),t)}var Ky={type:"cancelation",msg:"operation is manually canceled"};function Xy(e){var t=!1,a=new Promise((function(a,n){e.then((function(e){return t?n(Ky):a(e)})),e.catch(n)}));return a.cancel=function(){return t=!0},a}var $y,Yy,Jy=Fy.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),Qy=(Yy=2,function(e){if(Array.isArray(e))return e}($y=Jy)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var a=[],n=!0,o=!1,s=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){o=!0,s=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw s}}return a}}($y,Yy)||function(e,t){if(e){if("string"==typeof e)return Sy(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)?Sy(e,t):void 0}}($y,Yy)||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.")}()),Zy=Qy[0],eC=Qy[1];function tC(e){return document.body.appendChild(e)}function aC(e){var t,a,n=Zy((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 nC(){var e=Zy((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){oC(t),e.resolve(t)}),(function(t){e.reject(t)}))}function oC(e){Zy().monaco||eC({monaco:e})}var sC=new Promise((function(e,t){return eC({resolve:e,reject:t})})),iC={config:function(e){var t=Hy.config(e),a=t.monaco,n=zy(t,["monaco"]);eC((function(e){return{config:Wy(e.config,n),monaco:a}}))},init:function(){var e=Zy((function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}}));if(!e.isInitialized){if(eC({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Xy(sC);if(window.monaco&&window.monaco.editor)return oC(window.monaco),e.resolve(window.monaco),Xy(sC);!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)}}(tC,aC)(nC)}return Xy(sC)},__getMonacoInstance:function(){return Zy((function(e){return e.monaco}))}};const lC=a({name:"IBizCode",props:Ye(),emits:ze(),setup(e,{emit:t}){const a=B("code"),s=e.controller,i=n(""),l=n(!0),r=n(!1),p=n(!1),h=n(!1),m=n(!1),b=s.model;let v,w;b.editorParams&&(b.editorParams.enableEdit&&(r.value=!0,p.value=!0,l.value=s.toBoolean(b.editorParams.enableEdit)&&!e.readonly&&!e.disabled),b.editorParams.enableFullScreen&&(h.value=s.toBoolean(b.editorParams.enableFullScreen)));const{UIStore:g}=ee(),f=e=>"dark"===e?"vs-".concat(g.theme):"vs";c((()=>g.theme),(e=>{w.setTheme(f(e))})),c((()=>e.value),(e=>{e!==i.value&&(i.value=e||"",null==v||v.setValue(i.value))}),{immediate:!0});const y=()=>{v&&((e.readonly||e.disabled)&&(r.value=!1,p.value=!0),v.updateOptions({readOnly:r.value?p.value:e.readonly||e.disabled}))};c((()=>e.readonly),y,{immediate:!0}),c((()=>e.disabled),y,{immediate:!0});const I=n(),P=()=>{u((()=>{iC.config({paths:{vs:"".concat(ibiz.env.pluginBaseUrl,"/monaco-editor@0.45.0/min/vs")}}),iC.init().then((a=>{v||(w=a.editor,v=w.create(I.value,{language:e.language||e.controller.language,theme:f(g.theme),foldingStrategy:"indentation",renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!0},readOnly:r.value?p.value:e.readonly||e.disabled,readOnlyMessage:{value:ibiz.i18n.t("editor.code.readOnlyPrompt")},fontSize:16,scrollBeyondLastLine:!1,overviewRulerBorder:!1})),setTimeout((()=>{v.layout(),v.setValue(i.value)})),v.onDidChangeModelContent((()=>{r.value||(i.value=v.getValue(),t("change",i.value))})),window.addEventListener("resize",(()=>{v.layout()}))}))}))},D=()=>{p.value=!p.value,v&&(p.value?v.updateOptions({readOnly:!0}):v.updateOptions({readOnly:!1}))},E=async()=>{i.value=String(null==v?void 0:v.getValue()),null==v||v.dispose(),v=null,m.value=!m.value,P()};return d((()=>{P()})),C((()=>{null==v||v.dispose()})),{ns:a,currentVal:i,codeEditBox:I,isFullScreen:m,hasEnableEdit:r,readonlyState:p,renderFooter:()=>r.value?o("div",{class:[a.b("footer"),{[a.b("footer-dialog")]:m.value}]},[o("div",{class:a.be("footer","cancel"),onClick:()=>{e.value!==(null==v?void 0:v.getValue())?$o({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:a.b("message"),message:o("div",{class:a.be("message","message-content")},[o("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),o("p",{class:a.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:a.be("message","message-cancel"),confirmButtonClass:a.be("message","message-comfire")}).then((()=>{null==v||v.setValue(String(e.value||"")),D()})).catch((()=>{null==v||v.focus()})):D()}},[ibiz.i18n.t("app.cancel")]),o("div",{class:a.be("footer","save"),onClick:()=>(D(),v&&(i.value=v.getValue(),t("change",i.value)),void(m.value&&E()))},[ibiz.i18n.t("app.save")])]):null,renderHeaderToolbar:()=>r.value||h.value?o("div",{class:a.b("toolbar")},[r.value&&l.value&&p.value?o("i",{class:"fa fa-edit","aria-hidden":"true",onClick:()=>D()},null):null,h.value?m.value?o("i",{class:"fa fa-compress","aria-hidden":"true",onClick:()=>E()},null):o("i",{class:"fa fa-expand","aria-hidden":"true",onClick:()=>E()},null):null]):null,renderCodeContent:()=>o("div",{ref:I,class:a.e("box")},null),changeFullScreenState:E}},render(){return this.isFullScreen?o(s("el-dialog"),{modelValue:this.isFullScreen,"onUpdate:modelValue":e=>this.isFullScreen=e,width:"80%",top:"10vh",class:this.ns.b("dialog-full-screen"),onClose:()=>this.changeFullScreenState()},{default:()=>[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])]}):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])}});class rC extends Nn{get language(){return this.editorParams.codeType||this.editorParams.language||"typescript"}get theme(){return this.editorParams.theme||"vs-dark"}}var cC=Object.defineProperty,dC=(e,t,a)=>(((e,t,a)=>{t in e?cC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class uC{constructor(){dC(this,"formEditor","IBizCode"),dC(this,"gridEditor","IBizCode")}async createController(e,t){const a=new rC(e,t);return await a.init(),a}}var pC=Object.defineProperty,hC=(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 mC{constructor(){hC(this,"title","AI"),hC(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>'),hC(this,"tag","button")}isActive(){return!1}getValue(){return"aichart"}isDisabled(){return!1}exec(e){e.emit("aiClick")}}const bC={key:"aichart",factory:()=>new mC};function vC(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 wC=Array.isArray;function gC(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function fC(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&&fC(n,a.children,a.sel)}}function yC(e,t,a){let n,o,s,i={};if(void 0!==a?(null!==t&&(i=t),wC(a)?n=a:gC(a)?o=a.toString():a&&a.sel&&(n=[a])):null!=t&&(wC(t)?n=t:gC(t)?o=t.toString():t&&t.sel?n=[t]:i=t),void 0!==n)for(s=0;s<n.length;++s)gC(n[s])&&(n[s]=vC(void 0,void 0,void 0,n[s],void 0));return"s"!==e[0]||"v"!==e[1]||"g"!==e[2]||3!==e.length&&"."!==e[3]&&"#"!==e[3]||fC(i,n,e),vC(e,i,n,o,void 0)}var CC=Object.defineProperty,IC=(e,t,a)=>(((e,t,a)=>{t in e?CC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);const PC={type:"emoji",renderElem:e=>{const{data:t={}}=e;return yC("emoji-elem",{dataset:{value:t.emoji?zt(t.emoji):""},props:{contentEditable:!1}},[])}};class DC{constructor(){IC(this,"title","".concat(ibiz.i18n.t("editor.html.wangEditor.emoji"))),IC(this,"tag","button"),IC(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 EC={renderElems:[PC],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 DC}]};class kC 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 xC=e=>{const{isInline:t,isVoid:a}=e;return e.isInline=e=>"emoji"===as.getNodeType(e)||t(e),e.isVoid=e=>"emoji"===as.getNodeType(e)||a(e),e},zC=a({name:"IBizHtmlEmoji",props:{modal:{type:Object,required:!0}},setup:e=>({ns:B("html-emoji"),onSelect:t=>{const a={ok:!0,data:[{emoji:Tt(t.data)}]};e.modal.dismiss(a)}}),render(){return o("div",{class:this.ns.b()},[o(s("iBizEmojiSelect"),{dark:!0,continuousList:!0,onSelect:this.onSelect},null)])}});var SC=Object.defineProperty,TC=(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 _C extends Nn{constructor(){super(...arguments),TC(this,"uploadParams"),TC(this,"exportParams"),TC(this,"deService"),TC(this,"deACMode"),TC(this,"chatCompletion",!1),TC(this,"wangEditor"),TC(this,"overlay",null),TC(this,"cleanup",ft),TC(this,"presetPreventEvents",[13,38,40]),TC(this,"presetPreventPropEvents",[27])}async onInit(){if(await super.onInit(),this.customRegister(),this.editorParams){const{uploadParams:e,exportParams:t}=this.editorParams;if(e)try{this.uploadParams=JSON.parse(e)}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 格式"))}}const e=this.model;e.appDEACModeId&&(this.deACMode=await An(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||(ns.registerMenu(bC),window.aichartRegister=!0),window.customElements.get("emoji-elem")||window.customElements.define("emoji-elem",kC),window.emojiIsRegiter||(ns.registerModule(EC),window.emojiIsRegiter=!0),window.wangEditorPlugin||(ns.registerPlugin(xC),window.wangEditorPlugin=!0)}onCreated(e){this.wangEditor=e,this.listenEvent()}listenEvent(){const e=this.wangEditor.getEditableContainer();this.wangEditor.on("openEmojiSelect",(()=>this.openEmojiSelect())),this.cleanup=vt(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(zC,{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!==ft&&this.cleanup(),this.overlay&&this.overlay.dismiss()}}var OC=Object.defineProperty,BC=(e,t,a)=>(((e,t,a)=>{t in e?OC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class jC{constructor(){BC(this,"formEditor","IBizHtml"),BC(this,"gridEditor","IBizHtml")}async createController(e,t){const a=new _C(e,t);return await a.init(),a}}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 RC extends Nn{constructor(){super(...arguments),NC(this,"uploadParams"),NC(this,"exportParams"),NC(this,"deService"),NC(this,"deACMode"),NC(this,"keyName","srfkey"),NC(this,"textName","srfmajortext"),NC(this,"sort","asc"),NC(this,"dataItems",[]),NC(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 St(e,ibiz.i18n.t("editor.markdown.uploadJsonFormatErr"))}if(t)try{this.exportParams=JSON.parse(t)}catch(e){throw new St(t,ibiz.i18n.t("editor.markdown.exportJsonFormatErr"))}}const e=this.model;if(e.appDEACModeId&&(this.deACMode=await An(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 MC=Object.defineProperty,LC=(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 VC{constructor(){LC(this,"formEditor","IBizMarkDown"),LC(this,"gridEditor","IBizMarkDown")}async createController(e,t){const a=new RC(e,t);return await a.init(),a}}const FC=a({name:"IBizArray",props:Je(),emits:ze(),setup(e,{emit:t}){const a=B("array"),o=e.controller,s=o.model;let i,r="default",d="default",u=0,p=!1,h="",m="",b="_blank";const v=n([]);s.editorParams&&(s.editorParams.editorStyle&&(r=s.editorParams.editorStyle),s.editorParams.size&&(d=s.editorParams.size),s.editorParams.limit&&(u=Lo(s.editorParams.limit)),s.editorParams.maxLength&&(i=Lo(s.editorParams.maxLength)),s.editorParams.showWordLimit&&(p=o.toBoolean(s.editorParams.showWordLimit)),s.editorParams.prepend&&(h=s.editorParams.prepend),s.editorParams.append&&(m=s.editorParams.append),s.editorParams.target&&(b=s.editorParams.target));const w=s.dataType,g=Object.is(w,"NUMBER")||Object.is(w,"INTEGER")?"number":"text",f=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{if(e&&e!==t&&0===v.value.length){const t=e.map((e=>({value:e,key:lo()})));v.value=t}}),{immediate:!0});const y=(e="blur")=>{const a=v.value.map((e=>e.value));e===o.triggerMode&&t("change",a)};return{ns:a,c:o,editorStyle:r,type:g,size:d,limit:u,maxLength:i,showWordLimit:p,prepend:h,append:m,target:b,items:v,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:lo(),value:null};t?v.value.splice(t,0,a):v.value.push(a),y()},removeItem:e=>{v.value.splice(e,1),y()},handleChange:(e,t)=>{v.value[t].value=e,y()},handleInput:(e,t)=>{v.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:f}},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(s("el-input"),b({type:this.type,size:this.size,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:this.c.placeHolder,disabled:this.disabled,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(s("el-tooltip"),{placement:"bottom",trigger:"hover"},{default:()=>o(s("el-input"),b({type:this.type,size:this.size,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:this.c.placeHolder,disabled:this.disabled,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(s("el-image"),{fit:"contain",src:e.value},null):o(s("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)&&!i(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 UC extends Nn{}var qC=Object.defineProperty,GC=(e,t,a)=>(((e,t,a)=>{t in e?qC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class HC{constructor(){GC(this,"formEditor","IBizArray"),GC(this,"gridEditor","IBizArray")}async createController(e,t){const a=new UC(e,t);return await a.init(),a}}const WC=a({name:"IBizCascader",props:Qe(),emits:ze(),setup(e,{emit:t}){const a=B("cascader"),o=e.controller,s=o.model,i=n(null),r=n([]),c=s.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="/";s.editorParams&&(s.editorParams.editorStyle&&(d=s.editorParams.editorStyle),s.editorParams.size&&(u=s.editorParams.size),s.editorParams.filterable&&(p=o.toBoolean(s.editorParams.filterable)),s.editorParams.multiple&&(h=o.toBoolean(s.editorParams.multiple)),s.editorParams.separator&&(m=s.editorParams.separator));const b=n([]),v=n([]),w=n(null),g=n([]),f=n([]),y=n([]),C=n(""),I=n(!1),P=n(!1),D=n(),E=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly))),k=e=>{e?P.value=e:setTimeout((()=>{P.value=e}),100)};r.value&&r.value.length>0&&r.value.forEach((e=>{f.value.push({name:e.name,value:[]})}));const x=(t,a)=>{const{level:n,value:o}=t;I.value=!0;let s=[];if(0===n)(()=>{if(e.value&&r.value){const t=[],a=JSON.parse(e.value);if(a.forEach((e=>{t.push({label:e,value:[]})})),f.value.forEach((t=>{const a=e.data[t.name]?e.data[t.name].split(","):[];t.value=a})),g.value=[],t.forEach(((e,t)=>{f.value.forEach((a=>{e.value.push(a.value[t])}));const a=e.value.join(m);g.value.push({label:e.label,value:a})})),g.value.forEach((e=>{const t=e.value.split(m),a=e.label.split(m);t.forEach(((e,t)=>{v.value.find((t=>t.value===e))||v.value.push({value:e,label:a[t]})}))})),Object.is(d,"default")){let e=[];h?g.value.forEach((t=>{e.push(t.value.split(m))})):e=g.value[0].value.split(m),w.value=e}else{w.value=h?a:a.join(m);const e=f.value[f.value.length-1].value;if(f.value.length>1){const t=f.value[f.value.length-2].value;t&&t.length>0&&t.forEach(((t,a)=>{e[a]="".concat(t,"_").concat(e[a])}))}y.value=e}}})(),b.value.length>0?a.forEach((e=>{const t=b.value.findIndex((t=>e.value===t.value));t>-1?Object.assign(b.value[t],e):(b.value.push(e),s.push(e))})):(b.value=[...a],s=[...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),s.push(e))})):(t.children=a,s=a):e(t.children)}))};e(b.value)}const i=w.value||[];return setTimeout((()=>{w.value=i,I.value=!1})),s},z=()=>{var e,a;if(!I.value){f.value.forEach((e=>{e.value=[]})),(null==(e=w.value)?void 0:e.length)&&w.value.forEach(((e,t)=>{"string"==typeof e?f.value[t].value.push(e):e.forEach(((e,t)=>{f.value[t].value.push(e)}))}));const n=[];let o=[];(null==(a=w.value)?void 0:a.length)&&w.value.forEach((e=>{if(h){const t=e.map((e=>{const t=v.value.find((t=>t.value===e));if(t)return t.label}));n.push(t)}else{const t=v.value.find((t=>t.value===e));t&&n.push(t.label)}})),f.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),k(!1)}},S=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),k(!1)},onFocus:e=>{t("focus",e),k(!0)},treeData:b,items:v,selectValue:w,treeSelectData:g,valueItemData:f,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,s=r.value[a];try{if(s.appDataEntityId&&s.appDEDataSetId){const{context:i,params:l}=await(async(e,t)=>{const a=mo(o.context),n=mo(o.params);if(e>0){const o=r.value[e-1];Object.assign(a,{[Mn(o.appDataEntityId)]:t});const s=await ibiz.hub.getAppDataEntity(o.appDataEntityId,o.appId);Object.assign(n,{["n_".concat(s.keyAppDEFieldId.toLowerCase(),"_eq")]:t})}return{context:a,params:n}})(a,n),c=ibiz.hub.getApp(o.context.srfappid),u=await c.deService.exec(s.appDataEntityId,s.appDEDataSetId,i,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=v.value.findIndex((t=>e.value===t.value));t>-1?v.value[t]=e:v.value.push(e)})),Object.is(d,"default")){t(x(e,o))}else t(o)}}t([])}catch(e){console.log(s,"查询数据集失败"),t([])}},treeRef:i,handleTreeClear:()=>{g.value=[],f.value.forEach((e=>{e.value=[]})),i.value&&i.value.setCheckedKeys([]),(()=>{const e=[];w.value=[],g.value.forEach((t=>{e.push(t.label)})),w.value=h?e:e.length>0?e[0]:null,f.value.forEach((e=>{t("change",e.value.length>0?e.value.join(","):null,e.name)})),t("change",w.value.length>0?JSON.stringify(w.value):null)})()},handleRemoveTag:()=>{setTimeout((()=>{z()}))},multiple:h,handleCascaderValueChange:z,editorRef:D,valueText:S,isEditable:P,setEditable:k,showFormDefaultContent:E,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)}}},render(){const e=o(s("el-cascader"),b({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},disable: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:"-"]);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 KC extends Nn{}var XC=Object.defineProperty,$C=(e,t,a)=>(((e,t,a)=>{t in e?XC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class YC{constructor(){$C(this,"formEditor","IBizCascader"),$C(this,"gridEditor","IBizCascader")}async createController(e,t){const a=new KC(e,t);return await a.init(),a}}const JC=a({name:"IBizColorPicker",props:Ze(),emits:ze(),setup(e,{emit:t}){const a=B("color-picker"),o=e.controller,s=n(""),i=n(null),r=n(["#000000","#2C2C2C","#50555C","#ACB3BF","#D0D3D9","#C4C4C4","#DADADA","#E5E5E5","#F0F0F0","#F24E1E","#E99C58","#FFC700","#FF4D00","#FF00D6","#D82E57","#8E1DE8","#0ACF83","#18A0FB","#A259FF","#907CFF"]),d=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{e!==t&&(s.value=e||"")}),{immediate:!0});const u=l((()=>o.style?o.style:null));return{ns:a,c:o,currentVal:s,predefineColors:r,contentStyle:u,colorPicker:i,handleChange:e=>{t("change",e)},showPicker:e=>{setTimeout((()=>{i.value&&i.value.show()}),200)},onFocus:e=>{t("focus",e)},onBlur:e=>{t("blur",e)},showFormDefaultContent:d}},render(){let e=null;return e=this.readonly?"".concat(this.currentVal):o("span",{class:this.ns.b("content"),style:this.contentStyle,onClick:this.showPicker},[o(s("el-color-picker"),b({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),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||""}},[e])}});class QC extends Nn{}var ZC=Object.defineProperty,eI=(e,t,a)=>(((e,t,a)=>{t in e?ZC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class tI{constructor(){eI(this,"formEditor","IBizColorPicker"),eI(this,"gridEditor","IBizColorPicker")}async createController(e,t){const a=new QC(e,t);return await a.init(),a}}const aI=a({name:"IBizPresetRawitem",props:Me(),emits:ze(),setup(e,{emit:t}){const a=B("preset-rawitem"),o=e.controller,s=o.model,{componentRef:i}=xe((()=>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:s,editorRef:i,type:l,content:r}},render(){let e=null;return e="FIELD_IMAGE"===this.type?o(s("iBizRawItem"),{content:this.content,type:"IMAGE"},null):"FIELD_TEXT_DYNAMIC"===this.type?o(s("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])}}),nI=a({name:"IBizCarousel",props:Re(),emits:ze(),setup(e){const t=B("carousel"),a=e.controller,o=a.model,s=n([]),i=n(!0),l=n(3e3),r=n("");return c((()=>e.value),(e=>{"string"==typeof e&&(s.value=e?JSON.parse(e):[])}),{immediate:!0}),c((()=>e.data),(e=>{if(e){const t=ibiz.util.file.calcFileUpDownUrl(a.context,a.params,e,a.editorParams);r.value=t.downloadUrl}}),{immediate:!0,deep:!0}),c(s,(e=>{(null==e?void 0:e.length)&&r.value&&e.forEach((e=>{e.imgUrl=e.imgUrl||r.value.replace("%fileId%",e.id)}))}),{immediate:!0}),{ns:t,c:a,editorModel:o,downloadUrl:r,carouselData:s,isAuto:i,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(s("iBizCarouselComponent"),b({carouselData:this.carouselData,isAuto:this.isAuto,timeSpan:this.timeSpan},this.$attrs),null)])}});class oI extends Nn{}var sI=Object.defineProperty,iI=(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 lI{constructor(){iI(this,"formEditor","IBizCarousel"),iI(this,"gridEditor","IBizCarousel")}async createController(e,t){const a=new oI(e,t);return await a.init(),a}}var rI=Object.defineProperty,cI=(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 dI extends Nn{constructor(){super(...arguments),cI(this,"searchBarFilters",[]),cI(this,"filterControllers",[]),cI(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 Ln(this.model.appDataEntityId,this.context);if(!t)return;const a=await Vn(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 Fn(e,this.appDataEntity,this.context,this.params);this.filterControllers.push(t)})),await Promise.all(this.filterControllers.map((e=>e.init()))))}}var uI=Object.defineProperty,pI=(e,t,a)=>(((e,t,a)=>{t in e?uI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class hI{constructor(){pI(this,"formEditor","IBizSearchCondEdit"),pI(this,"gridEditor","IBizSearchCondEdit")}async createController(e,t){const a=new dI(e,t);return await a.init(),a}}const mI=a({name:"IBizSearchCondEdit",props:Se(),emits:ze(),setup(e,{emit:t}){const a=B("searchcond-edit"),i=e.controller,r=n(null),d=n(!1),u=n(),p=n([]),h=n();let m;const b=l((()=>!(!e.controlParams||"hover"!==e.controlParams.editmode||e.readonly)));c((()=>e.value),((e,t)=>{if(e!==t)if(null==e)r.value="",p.value=Un();else if("string"==typeof e&&(r.value=e,e))try{const t=JSON.parse(e);p.value=t.map((e=>qn(e)))}catch(t){ibiz.log.error("".concat(e,"值格式不正确,必须为json字符串"))}}),{immediate:!0});const v=()=>{p.value=Un()};v();const w=e=>{e?d.value=e:setTimeout((()=>{d.value=e}),100)};c(u,(t=>{if(e.autoFocus&&t){t.$el.getElementsByTagName("input")[0].focus()}}));const g=()=>{const e=Gn(p.value);e&&(r.value=JSON.stringify(e,null,2))},f=async()=>{m=ibiz.overlay.createPopover((()=>o(s("iBizFilterTreeControl"),{filterControllers:i.filterControllers,filterNodes:p.value,parent:"searchcond-edit",onConfirm:()=>{g(),m&&m.dismiss(),t("change",r.value)},onCancel:()=>{v(),g(),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:i,currentVal:r,handleChange:e=>{t("change",e)},onFocus:e=>{t("focus",e),w(!0)},onBlur:e=>{t("blur",e),w(!1)},editorRef:u,handleKeyUp:e=>{e&&"Enter"===e.code&&t("enter",e)},isEditable:d,setEditable:w,showFormDefaultContent:b,filterNodes:p,triggerFilter:()=>{m?m.dismiss():f()},filterButtonRef:h,resetFilter:v}},render(){let e=null;return e=this.readonly?po(this.currentVal)?"":"".concat(this.currentVal):[o(s("el-input"),b({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(s("el-button"),{ref:"filterButtonRef",type:"primary",title:ht(ibiz.i18n.t("app.edit")),class:this.ns.b("filter"),onClick:()=>this.triggerFilter()},{default:()=>[o(s("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])}}),bI=e("aM",{install:e=>{e.component(lg.name,lg),e.component(rg.name,rg),e.component(cg.name,cg),e.component(vg.name,vg),e.component(wg.name,wg),e.component(gg.name,gg),e.component(Eg.name,Eg),e.component(kg.name,kg),e.component(Bg.name,Bg),e.component(Mg.name,Mg),e.component(Hg.name,Hg),e.component(Yg.name,Yg),e.component(tf.name,tf),e.component(lf.name,lf),e.component(pf.name,pf),e.component(wf.name,wf),e.component(If.name,If),e.component(zf.name,zf),e.component(Mf.name,Mf),e.component(Wf.name,Wf),e.component(Xf.name,Xf),e.component(Kf.name,Kf),e.component(ty.name,ty),e.component(ay.name,ay),e.component(ny.name,ny),e.component(oy.name,oy),e.component(sy.name,sy),e.component(iy.name,iy),e.component(hy.name,hy),e.component(gy.name,gy),e.component(lC.name,lC),e.component(FC.name,FC),e.component(WC.name,WC),e.component(JC.name,JC),e.component(aI.name,aI),e.component(mI.name,mI),e.component(nI.name,nI),e.component("IBizHtml",I((()=>t.import("./wang-editor-YqnK5uQU.js")))),e.component("IBizMarkDown",I((()=>t.import("./ibiz-markdown-editor-anJxfRF1.js")))),Hn("SPAN",(()=>new bg)),Hn("SPAN_ADDRESSPICKUP",(()=>new bg)),Hn("SPAN_LINK",(()=>new bg("SPAN_LINK")));const a=new Dg;Hn("TEXTBOX",(()=>a)),Hn("TEXTAREA",(()=>a)),Hn("TEXTAREA_10",(()=>a)),Hn("PASSWORD",(()=>a)),Hn("NUMBER",(()=>new Dg("NUMBER"))),Hn("IPADDRESSTEXTBOX",(()=>new Dg("IPADDRESSTEXTBOX"))),Hn("DROPDOWNLIST",(()=>new Og)),Hn("DROPDOWNLIST_100",(()=>new Og)),Hn("MDROPDOWNLIST",(()=>new Og)),Hn("DROPDOWNLIST_EMOJI_PICKER",(()=>new Og("EMOJI_PICKER"))),Hn("CHECKBOX",(()=>new Rg)),Hn("CHECKBOXLIST",(()=>new Gg)),Hn("RADIOBUTTONLIST",(()=>new $g));const n=new ef;Hn("DATEPICKER",(()=>n)),Hn("DATEPICKEREX",(()=>n)),Hn("DATEPICKEREX_NOTIME",(()=>n)),Hn("DATEPICKEREX_HOUR",(()=>n)),Hn("DATEPICKEREX_MINUTE",(()=>n)),Hn("DATEPICKEREX_SECOND",(()=>n)),Hn("DATEPICKEREX_NODAY",(()=>n)),Hn("DATEPICKEREX_NODAY_NOSECOND",(()=>n)),Hn("FILEUPLOADER",(()=>new ey("FILEUPLOADER"))),Hn("FILEUPLOADER_ONE",(()=>new ey("FILEUPLOADER_ONE"))),Hn("PICTURE",(()=>new ey("PICTURE"))),Hn("PICTURE_ONE",(()=>new ey("PICTURE_ONE"))),Hn("PICTURE_ONE_RAW",(()=>new ey("PICTURE_ONE_RAW"))),Hn("RAW",(()=>new sf)),Hn("STEPPER",(()=>new uf)),Hn("RATING",(()=>new vf)),Hn("SLIDER",(()=>new kf)),Hn("SWITCH",(()=>new Cf)),Hn("LISTBOX",(()=>new Rf)),Hn("LISTBOXPICKUP",(()=>new Rf));const o=new Gf;Hn("AC",(()=>o)),Hn("AC_FS",(()=>o)),Hn("AC_NOBUTTON",(()=>o)),Hn("AC_FS_NOBUTTON",(()=>o)),Hn("PICKER",(()=>new py("PICKER"))),Hn("PICKEREX_NOAC",(()=>new py("PICKEREX_NOAC"))),Hn("PICKEREX_NOAC_LINK",(()=>new py("PICKEREX_NOAC_LINK"))),Hn("PICKEREX_TRIGGER_LINK",(()=>new py("PICKEREX_TRIGGER_LINK"))),Hn("PICKEREX_TRIGGER",(()=>new py("PICKEREX_TRIGGER"))),Hn("PICKEREX_LINK",(()=>new py("PICKEREX_LINK"))),Hn("ADDRESSPICKUP",(()=>new py("ADDRESSPICKUP"))),Hn("ADDRESSPICKUP_AC",(()=>new py("ADDRESSPICKUP_AC"))),Hn("PICKEREX_LINKONLY",(()=>new py("PICKEREX_LINKONLY"))),Hn("PICKEREX_NOBUTTON",(()=>new py("PICKEREX_NOBUTTON"))),Hn("PICKEREX_DROPDOWNVIEW",(()=>new py("PICKEREX_DROPDOWNVIEW"))),Hn("PICKEREX_DROPDOWNVIEW_LINK",(()=>new py("PICKEREX_DROPDOWNVIEW_LINK"))),Hn("PICKUPVIEW",(()=>new py("PICKUPVIEW"))),Hn("NUMBERRANGE",(()=>new wy)),Hn("DATERANGE",(()=>new Dy)),Hn("DATERANGE_NOTIME",(()=>new Dy)),Hn("CODE",(()=>new uC)),Hn("HTMLEDITOR",(()=>new jC)),Hn("MARKDOWN",(()=>new VC)),Hn("ARRAY",(()=>new HC)),Hn("CASCADER",(()=>new YC)),Hn("COLORPICKER",(()=>new tI)),Hn("PICKER_searchCondEdit",(()=>new hI)),Hn("FIELD_IMAGE_PICTURE_ONE",(()=>new ey("PICTURE_ONE"))),Hn("FIELD_IMAGE_PICTURE",(()=>new ey("PICTURE"))),Hn("FIELD_TEXT_DYNAMIC_SPAN",(()=>new bg)),Hn("VIEW_PAGECAPTION_SPAN",(()=>new bg)),Hn("STATIC_LABEL_RAW",(()=>new sf)),Hn("FIELD_TEXTBOX_TEXTBOX",(()=>a)),Hn("FIELD_TEXTAREA_TEXTAREA",(()=>a)),Hn("FIELD_RADIOBUTTONLIST_RADIOBUTTONLIST",(()=>new $g)),Hn("FIELD_CHECKBOXLIST_CHECKBOXLIST",(()=>new Gg)),Hn("FIELD_DROPDOWNLIST_DROPDOWNLIST",(()=>new Og)),Hn("FIELD_RATING_RATING",(()=>new vf)),Hn("FIELD_SWITCH_SWITCH",(()=>new Cf)),Hn("FIELD_SLIDER_SLIDER",(()=>new kf)),Hn("FIELD_DATEPICKER_DATEPICKER",(()=>new ef)),Hn("FIELD_DATERANGE_DATERANGE",(()=>new Dy)),Hn("FIELD_PICKER_PICKER",(()=>new py("PICKER"))),Hn("FIELD_ARRAY_ARRAY",(()=>new HC)),Hn("AUTH_USERID_TEXTBOX",(()=>a)),Hn("AUTH_PASSWORD_PASSWORD",(()=>a)),Hn("FIELD_CAROUSEL_PICTURE",(()=>new lI))}}),vI=e("aN",a({name:"IBizView404",setup(){const e=B("404-view"),t=Eo(),a=Do();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:"./assets/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])])}})),wI=e("aO",a({name:"IBizView403",setup(){const e=B("403-view"),t=Eo(),a=Do();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:"./assets/images/404.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 gI=e("aP",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=g({username:"",password:""}),l=n(null),c=Do().query.ru||"/",u=n(!1),p=n(null),h=s("IBizViewShell"),m=Et.create({}),b={},v=n(!1),w=n(!1),f=n(!1),y=n(!0);let C=ibiz.env.AppTitle;(async()=>{const e=(await ibiz.hub.getAppAsync(ibiz.env.appId)).model;e.caption&&(C=e.caption)})(),ibiz.appData=void 0,ibiz.orgData=void 0;const I=async()=>{l.value.validate((async e=>{if(e){v.value=!0;!0===await ibiz.auth.login(a.username,a.password,f.value)&&(window.location.hash=c,window.history.pushState({},""),window.location.reload()),v.value=!1}}))},P=e=>{"Enter"===e.key&&I()};return d((async()=>{if("true"===Io.parse(window.location.search.replace("?","")).isAnonymous){!0===await ibiz.auth.anonymousLogin()&&(window.location.hash=c,window.location.reload())}else{try{const e=await ibiz.hub.config.view.get("AppLoginView");e&&(p.value=e,u.value=!0)}catch(e){ibiz.log.warn(e)}y.value=!1}ibiz.util.hiddenAppLoading(),w.value=!0})),()=>{if(w.value&&!1===y.value){let n;return u.value?r(h,{context:m,params:b,viewId:p.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")},[C])]),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(s("el-form"),{model:a,rules:t,ref:l},{default:()=>[o(s("el-form-item"),{size:"large",prop:"username"},{default:()=>[o(s("el-input"),{modelValue:a.username,"onUpdate:modelValue":e=>a.username=e,clearable:!0,placeholder:ibiz.i18n.t("app.pleaseEnterAccount"),onKeyup:e=>P(e)},{prefix:()=>o("ion-icon",{name:"person"},null)})]}),o(s("el-form-item"),{size:"large",prop:"password"},{default:()=>[o(s("el-input"),{type:"password",modelValue:a.password,"onUpdate:modelValue":e=>a.password=e,"show-password":!0,placeholder:ibiz.i18n.t("app.pleaseEnterPassword"),onKeyup:e=>P(e)},{prefix:()=>o("ion-icon",{name:"unlock-alt"},null)})]}),o(s("el-checkbox"),{modelValue:f.value,"onUpdate:modelValue":e=>f.value=e,label:ibiz.i18n.t("app.rememberMe")},null),o(s("el-form-item"),{size:"large"},{default:()=>{return[o(s("el-button"),{type:"primary",onClick:I,size:"large",round:!0,loading:v.value},(e=n=ibiz.i18n.t("view.loginView.login"),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)?n:{default:()=>[n]}))];var e}})]})])])])])}return null}}}));var fI=Object.defineProperty,yI=(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 CI{constructor(){yI(this,"component","IBizWFStepTraceView")}}const II=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=et(((...e)=>new Wn(...e))),{viewType:a,sysCss:n,codeName:o}=t.model,s=a.toLowerCase(),i=null==n?void 0:n.cssName,l=[e.b(),e.b(s),e.m(o),i];return{c:t,ns:e,viewClassNames:l}},render(){return o("div",{class:this.viewClassNames},[o(s("iBizExtendActionTimeLine"),{data:this.c.state.historyData},null)])}}),PI=e("aQ",U(II,(function(e){e.component(II.name,II),Kn(Xn.APP_WF_STEP_TRACE_VIEW,(()=>new CI))})));var DI=Object.defineProperty,EI=(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 kI{constructor(){EI(this,"component","IBizSubAppRefView")}}const xI=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=et(((...e)=>new $n(...e))),{viewType:a,sysCss:n,codeName:o}=t.model,s=a.toLowerCase(),i=null==n?void 0:n.cssName,r=[e.b(),e.b(s),e.m(o),i],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(s("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(s("el-button"),{class:this.ns.b("btn"),onClick:this.handleClick,size:"large"},{default:()=>[this.c.model.title||ibiz.i18n.t("view.subAppRefView.jump")]})])}}),zI=e("aR",U(xI,(function(e){e.component(xI.name,xI),Kn(Xn.DE_SUB_APP_REF_VIEW,(()=>new kI))}))),SI=e("aS",a({name:"ErrorView",setup(){const e=B("error-view"),t=Do(),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=Yn(this.code);if(e)return"string"==typeof e.component?r(s(e.component)):r(e.component)}return o("div",{class:[this.ns.b()]},[ibiz.i18n.t("view.errorView.noExistPrompt",{code:this.code})])}}));var TI=Object.defineProperty,_I=(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 OI extends Jn{constructor(){super(...arguments),_I(this,"deName")}get form(){return this.view.getController("form")}get coopPos(){var e;return null==(e=this.view.layoutPanel)?void 0:e.panelItems.coop_pos}init(){if(super.init(),1===this.view.model.multiFormMode&&this.view.params.srfdatatype){const e=Qn(this.view.model,"_form_".concat(this.view.params.srfdatatype));if(e){const t=Zn(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();const{childNames:e,modal:t}=this.view;e.push("form"),this.deName=Mn(this.view.model.appDataEntityId),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.shouldDismiss.tapPromise((async e=>{var t,a;const n=ibiz.uiDomainManager.get(this.view.context.srfsessionid),o=((null==(t=this.form)?void 0:t.state.modified)||n.dataModification)&&!0===this.view.model.enableDirtyChecking;if(o&&(null==(a=this.form)?void 0:a.model.enableAutoSave)&&!n.dataModification)await this.form.immediateAutoSave();else if(o&&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 onMounted(){await super.onMounted(),this.initMarkOpenData();const{model:e,evt:t}=this.view,a=this.form.model.appDataEntityId,n=n=>{var o;const s=n.data[0];null==(o=this.toolbar)||o.calcButtonState(s,a),e.showDataInfoBar&&(s.srfkey?t.emit("onViewInfoChange",{dataInfo:s.srfmajortext||""}):t.emit("onViewInfoChange",{dataInfo:ibiz.i18n.t("app.newlyBuild")}))};this.form.evt.on("onLoadSuccess",(e=>{n(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=>{n(e),t.emit("onDataChange",{...e,actionType:"LOADDRAFT"})})),this.form.evt.on("onSaveSuccess",(e=>{this.view.state.closeOK=!0;const a=Mn(this.view.model.appDataEntityId),o=e.data[0];this.view.context[a]!==o.srfkey&&(this.view.context[a]=o.srfkey),n(e),t.emit("onDataChange",{...e,actionType:"SAVE"})})),this.form.evt.on("onRemoveSuccess",(e=>{n(e),t.emit("onDataChange",{...e,actionType:"REMOVE"})})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}getData(){return this.form.getData()}async load(){return this.form.load()}async save(){return this.form.save()}async refresh(){this.form.doNextActive((()=>this.load()),{key:"load"})}async call(e,t){if(e===eo.SAVE)return await this.form.save(),null;if(e===eo.SAVE_AND_EXIT)return await this.form.save(),{closeView:!0};if(e===eo.REMOVE_AND_EXIT){return{closeView:await this.form.remove()}}return e===eo.SAVE_AND_NEW?(this.saveAndNew(),null):e===eo.REFRESH?(await this.refresh(),null):e===eo.SAVE_AND_START?(await this.wfStart(),null):e===eo.FIRST_RECORD||e===eo.LAST_RECORD||e===eo.PREV_RECORD||e===eo.NEXT_RECORD?(await this.changeRecord(e),null):e===eo.VIEW_WF_STEP?(await this.wfSubmit(),null):e===Kt.LOAD?(this.load(),null):e===Kt.VALIDATE?this.form.validate():(e===Kt.WF_WITHDRAW&&await this.wfWithdraw(),super.call(e,t))}async saveAndNew(){await this.form.save(),this.form.state.data=new sa,this.view.context[Mn(this.view.model.appDataEntityId)]=void 0,await this.form.load()}async wfStart(){var e,t;await this.save();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 bt(ibiz.i18n.t("viewEngine.noExistVersionErr"));const s=o.data[0],i="WFSTART@".concat(s.wfversion),l=Object.assign(this.view.context.clone(),{activeForm:s["process-form"]}),r={processDefinitionKey:s.definitionkey},c=to(this.view.model,i);if(!c)return await this.form.wfStart({viewParam:r}),void await this.view.closeView();(await ibiz.commands.execute(Sn.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 sa?t.getOrigin():t),ibiz.mc.command.send({srfdecodename:"SysTodo"},"OBJECTUPDATED","WITHDRAW")}initMarkOpenData(){if(![la.ROUTE,la.ROUTE_MODAL].includes(this.view.modal.mode)||!this.view.model.markOpenDataMode)return;const e=this.view.model.markOpenDataMode.split(";");let t=!1;const a=async a=>{if(!this.view.state.activated)return;const n=this.form.getData()[0].srfmajortext;let o="";switch(a.action){case"VIEW":o=ibiz.i18n.t("viewEngine.browseMsg");break;case"EDIT":o=ibiz.i18n.t("viewEngine.editMsg");break;case"UPDATE":o=ibiz.i18n.t("viewEngine.updateMsg")}const s="".concat(e.includes("DISPLAYOPPERSON")?a.username:ibiz.i18n.t("viewEngine.someone")," ").concat(o," ").concat(this.view.state.caption,"-").concat(n);if(this.coopPos?this.coopPos.updateMessage({title:s,data:a}):ibiz.message.notice({message:s,showClose:!0,duration:3,styleType:"alert"}),!1===t&&"UPDATE"===a.action&&e.includes("NOTICERELOAD")){t=!0;await this.reloadConfirm()&&this.refresh(),t=!1}},n=[];if(e.includes("EDITDATA")||e.includes("DISPLAYOPPERSON")||e.includes("NOTICERELOAD")?n.push("EDIT","VIEW","UPDATE","CLOSE"):e.includes("OPENDATA")&&n.push("VIEW","CLOSE"),0===n.length)return;let o,s=!1;if(n.includes("VIEW")&&this.form.evt.on("onLoadSuccess",(e=>{const t=e.data[0];o=t.srfkey,ibiz.markOpenData.action(this.deName,o,"VIEW"),s||(ibiz.markOpenData.subscribe(this.deName,o,a),this.view.evt.on("onDestroyed",(()=>{ibiz.markOpenData.unsubscribe(this.deName,o,a)})),s=!0)})),n.includes("EDIT")){let e=!1;const t=()=>{o&&!e&&(e=!0,ibiz.markOpenData.action(this.deName,o,"EDIT"),setTimeout((()=>{e=!1}),3e5))};this.form.evt.on("onFormDataChange",t)}n.includes("UPDATE")&&this.form.evt.on("onSaveSuccess",(()=>{o&&ibiz.markOpenData.action(this.deName,o,"UPDATE")})),n.includes("CLOSE")&&this.view.evt.on("onCloseView",(()=>{o&&ibiz.markOpenData.action(this.deName,o,"CLOSE")}))}async reloadConfirm(){const e=await ibiz.confirm.info({title:ibiz.i18n.t("viewEngine.refreshPrompt"),desc:ibiz.i18n.t("viewEngine.refreshPagePrompt")});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=this.view.context.srfpaginationviewid;if(!t)throw new bt(ibiz.i18n.t("viewEngine.missingErr"));const a=ibiz.util.viewStack.getView(t);if(!a)throw new bt(ibiz.i18n.t("viewEngine.noFoundViewId",{id:t}));const n=await a.call(Kt.GET_ALL_DATA),o=n.findIndex((e=>e.srfkey===this.form.state.data.srfkey));let s;switch(e){case eo.FIRST_RECORD:if(0===o)return void ibiz.message.info(ibiz.i18n.t("viewEngine.firstPieceOfData"));s=n[0];break;case eo.LAST_RECORD:if(o===n.length-1)return void ibiz.message.info(ibiz.i18n.t("viewEngine.lastPieceOfData"));s=n[n.length-1];break;case eo.PREV_RECORD:if(0===o)return void ibiz.message.info(ibiz.i18n.t("viewEngine.firstPieceOfData"));s=n[o-1];break;case eo.NEXT_RECORD:if(o===n.length-1)return void ibiz.message.info(ibiz.i18n.t("viewEngine.lastPieceOfData"));s=n[o+1]}s&&(this.view.context[this.deName]=s.srfkey,this.load())}}class BI extends OI{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")}}class jI extends OI{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class AI extends OI{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class NI extends ao{async call(e,t){return e===eo.NEW_ROW?(this.grid.newRow(),null):e===eo.TOGGLE_ROW_EDIT?(this.grid.toggleRowEdit(),null):e===eo.SAVE_ROW?(this.grid.save(t.data[0]),null):e===eo.SAVE?(this.grid.saveAll(),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("aU",NI);class RI extends Jn{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")){const{model:e,context:t,params:a}=this.view,{defAppViewId:n}=e;n&&ibiz.commands.execute(Sn.TAG,n,t,a)}window.innerWidth<=1200&&this.toggleCollapse()}async call(e,t){if(e===Kt.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("aV",RI);class MI extends ao{get list(){return this.view.getController("list")}async onMounted(){await super.onMounted();const{model:e}=this.view;this.list.state.mdctrlActiveMode=e.mdctrlActiveMode}}class LI extends ao{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}}e("aW",LI);class VI extends Jn{get form(){return this.view.getController("form")}async onCreated(){await super.onCreated();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.shouldDismiss.tapPromise((async e=>{var t;const a=ibiz.uiDomainManager.get(this.view.context.srfsessionid);if(((null==(t=this.form)?void 0:t.state.modified)||a.dataModification)&&!0===this.view.model.enableDirtyChecking&&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 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),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)})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}getData(){return this.form.getData()}load(){return this.form.load()}async call(e,t){return e===eo.CANCEL?(this.cancel(),null):e===eo.OK?(await this.confirm(),null):e===Kt.LOAD?(this.load(),null):e===Kt.VALIDATE?this.form.validate():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.closeView({ok:!1,data:[]})}}e("aX",VI);class FI extends NI{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}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})}))}async call(e,t){return e===Kt.GET_ALL_DATA?this.grid.state.items:super.call(e,t)}}var UI=Object.defineProperty,qI=(e,t,a)=>(((e,t,a)=>{t in e?UI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class GI extends Jn{constructor(){super(...arguments),qI(this,"selectData",[])}get pickupViewPanel(){return this.view.getController("pickupviewpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("pickupviewpanel")}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)}))}pickupViewPanelDataActive(e){this.selectData=e,this.view.closeView({ok:!0,data:this.selectData})}async call(e,t){return e===eo.CANCEL?(this.cancel(),null):e===eo.OK?(this.confirm(),null):super.call(e,t)}confirm(){this.view.closeView({ok:!0,data:this.selectData})}cancel(){this.view.closeView({ok:!1,data:[]})}}class HI extends GI{get simpleList(){return this.view.getController("simplelist")}async onCreated(){if(await super.onCreated(),!this.view.providers.simplelist)throw new St(this.view.model,ibiz.i18n.t("viewEngine.missingConfigErr"));const{childNames:e}=this.view;e.push("simplelist"),this.view.params.selecteddata&&(this.selectData=JSON.parse(this.view.params.selecteddata),delete this.view.params.selecteddata),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.simpleList.setData(this.selectData)}async call(e,t){return e===eo.CANCEL?(this.cancel(),null):e===eo.OK?(this.confirm(),null):e===eo.ADD_SELECTION?(this.addSelection(),null):e===eo.ADD_ALL?(this.addAll(),null):e===eo.REMOVE_ALL?(this.removeAll(),null):e===eo.REMOVE_SELECTION?(this.removeSelection(),null):super.call(e,t)}pickupViewPanelDataActive(e){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.simpleList.setData(t)}async addSelection(){const e=await this.pickupViewPanel.getSelectedData();this.handlePushSimpleListItems(e)}handlePushSimpleListItems(e){const t=[...this.simpleList.getAllData(),...e],a=this.handleUniqueItems(t);this.simpleList.setData(a)}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();this.handlePushSimpleListItems(e)}removeAll(){this.simpleList.setData([])}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.simpleList.setData(t)}confirm(){const e=this.simpleList.getAllData();this.view.closeView({ok:!0,data:e})}}class WI extends ao{get tree(){return this.view.getController("tree")}async onCreated(){await super.onCreated(),this.view.slotProps.tree||(this.view.slotProps.tree={})}async call(e,t){var a;return e===eo.REFRESH_ALL?(await this.tree.refresh(),null):e===eo.REFRESH?((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):e===eo.REFRESH_PARENT?(await this.tree.refreshNodeChildren(t.data[0],!0),null):super.call(e,t)}}class KI extends Jn{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}async onMounted(){await super.onMounted(),await this.loadEntityData()}async loadEntityData(){const e=Mn(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 s=o;if(s.panelItems&&s.panelItems.length>0){const a=e(t,s.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 s=o;s.panelItems&&s.panelItems.length>0&&t(e,s.panelItems)}},{tabLayout:a}=this.view.model,n=["view_tabexppanel","view_tabexppanel_left","view_tabexppanel_bottom","view_tabexppanel_right"];let o="view_tabexppanel";switch(a){case"LEFT":o="view_tabexppanel_left",n.splice(1,1);break;case"BOTTOM":o="view_tabexppanel_bottom",n.splice(2,1);break;case"RIGHT":o="view_tabexppanel_right",n.splice(3,1);break;default:n.splice(0,1)}(t=>{const a=e("tabexppanel");if(!a)throw new Ct(this.view.model.viewLayoutPanel,ibiz.i18n.t("viewEngine.noFoundLayoutOccupied"));const n=e(t);if(!n)throw new Ct(this.view.model.viewLayoutPanel,ibiz.i18n.t("viewEngine.noFoundLayoutContainer",{name:t}));n.panelItems=[a]})(o),t(n)}calcViewHeaderVisible(){let e=super.calcViewHeaderVisible();const{tabLayout:t}=this.view.model;return(void 0===t||"TOP"===t&&Qn(this.view.model,"tabexppanel"))&&(e=!0),e}}e("aY",KI);class XI extends ao{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=Qn(this.view.model,this.expBarName),{width:t,height:a}=e;(t||a)&&yt(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()}}class $I extends XI{get expBarName(){return"gridexpbar"}}class YI extends XI{get expBarName(){return"listexpbar"}}class JI extends XI{get expBarName(){return"dataviewexpbar"}}class QI extends XI{get expBarName(){return"treeexpbar"}get tree(){return this.expBar.xDataController}async call(e,t){var a;return e===eo.REFRESH_ALL?(await this.tree.refresh(),null):e===eo.REFRESH?((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):e===eo.REFRESH_PARENT?(await this.tree.refreshNodeChildren(t.data[0],!0),null):super.call(e,t)}}e("aZ",QI);class ZI extends Jn{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})}))}}class eP extends ao{get xdataControlName(){return"chart"}get chart(){return this.view.getController("chart")}async onCreated(){await super.onCreated(),this.view.slotProps.chart||(this.view.slotProps.chart={})}}var tP=Object.defineProperty,aP=(e,t,a)=>(((e,t,a)=>{t in e?tP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class nP extends OI{constructor(){super(...arguments),aP(this,"isEditable",!1),aP(this,"isCalcWFToolbar",!0),aP(this,"entityService"),aP(this,"processForm"),aP(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}));this.isEditable="true"===e.data.isEditable;const t="process-".concat(ibiz.env.isMob?"mob":"","form");return e.data[t]?"wfform_".concat(e.data[t]):"form"}async calcProcessForm(){const e=await this.calcProcessFormName(),t=Qn(this.view.model,e.toLowerCase());if(!t)throw new St(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 St(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=lo()}));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();const t=Object.assign(this.view.context.clone(),{isEditable:this.isEditable,processForm:e.sequenceflowform}),a={...e},n=no(this.view.model,e);if(!n)return await this.form.wfSubmit({viewParam:a}),void await this.view.closeView();(await ibiz.commands.execute(Sn.TAG,n,t,a)).ok&&await this.view.closeView()}}class oP extends nP{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}var sP=Object.defineProperty,iP=(e,t,a)=>(((e,t,a)=>{t in e?sP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class lP extends nP{constructor(){super(...arguments),iP(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===eo.OK?(this.onOkButtonClick(),null):e===eo.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,t)}async onOkButtonClick(){this.view.context.isEditable?await this.save():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:[]})}}var rP=Object.defineProperty,cP=(e,t,a)=>(((e,t,a)=>{t in e?rP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class dP extends nP{constructor(){super(...arguments),cP(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===eo.OK?(this.onOkButtonClick(),null):e===eo.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,t)}async onOkButtonClick(){await this.save(),await this.form.wfStart({}),await this.view.closeView({ok:!0,data:this.getData()})}async onCancelButtonClick(){await this.view.closeView({ok:!1,data:[]})}}class uP extends Jn{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("dashboard")}get dashboard(){return this.view.getController("dashboard")}async onMounted(){await super.onMounted(),this.view.model.appDataEntityId&&await this.loadEntityData()}}class pP extends Jn{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()}}class hP extends Jn{}var mP=Object.defineProperty,bP=(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 vP extends WI{constructor(){super(...arguments),bP(this,"selectData",[]),bP(this,"selectBySrfkey",!1)}async onCreated(){if(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.view.state.selectedData){this.selectData=this.view.state.selectedData.map((e=>({...e,_id:e.srfnodeid})));const e=new Set;this.selectData.forEach((t=>{if(t.srfnodeid){this.calcExpandKeys(t.srfnodeid).forEach((t=>e.add(t)))}else this.selectBySrfkey=!0})),this.view.slotProps.tree.defaultExpandedKeys=Array.from(e)}}calcExpandKeys(e){const t=[];return e.split(":").forEach(((e,a)=>{0===a?t.push(e):t.push("".concat(t[a-1],":").concat(e))})),t.pop(),t}async onMounted(){const{model:e}=this.view;let t=!1;this.xdataControl.evt.on("onSelectionChange",(async e=>{t||this.view.evt.emit("onSelectionChange",{...e})})),this.xdataControl.evt.on("onActive",(async e=>{this.view.evt.emit("onDataActive",{...e})})),this.xdataControl.evt.on("onLoadSuccess",(()=>{t=!0;let e=this.selectData;if(this.selectBySrfkey){const t=this.selectData.map((e=>e.srfkey));e=this.tree.state.items.filter((e=>t.includes(e.srfkey)))}this.xdataControl.setSelection(e),t=!1})),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}async call(e,t){return e===Kt.GET_ALL_DATA?this.tree.state.items:super.call(e,t)}}class wP extends LI{get dataview(){return this.view.getController("dataview")}async onCreated(){super.onCreated(),this.view.slotProps.dataview.singleSelect=this.view.state.singleSelect}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})}))}async call(e,t){return e===Kt.GET_ALL_DATA?this.dataview.state.items:super.call(e,t)}}class gP extends GI{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}}))}}class fP extends ao{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}}class yP extends Jn{get calendarExpBar(){return this.view.getController("calendarexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("calendarexpbar"),this.view.slotProps.calendarexpbar||(this.view.slotProps.calendarexpbar={}),this.view.slotProps.calendarexpbar.srfnav=this.view.state.srfnav}async onMounted(){await super.onMounted();const{model:e}=this.view;!this.view.state.noLoadDefault&&e.loadDefault&&this.calendarExpBar.load()}}class CP extends HI{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}))}}class IP extends ao{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}}class PP extends wP{}var DP=Object.defineProperty,EP=(e,t,a)=>(((e,t,a)=>{t in e?DP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class kP extends Jn{constructor(){super(...arguments),EP(this,"route",Do()),EP(this,"enterKeyListener",(async e=>{if("Enter"===e.key&&this.view.layoutPanel){const e={data:[{username:this.view.layoutPanel.data.username,password:this.view.layoutPanel.data.password,captcha:this.view.layoutPanel.data.captcha}]};await this.login(e)}}))}async onMounted(){super.onMounted(),document.addEventListener("keydown",this.enterKeyListener)}async onDestroyed(){super.onDestroyed(),document.removeEventListener("keydown",this.enterKeyListener)}async call(e,t={}){return e===eo.LOGIN&&await this.login(t),e===eo.CANCEL_CHANGES&&await this.cancelChanges(),super.call(e,t)}async login(e){let t;const a={},n=e.data[0]||{},o=e.params.panelDataParent;if(this.view.layoutPanel){if(!await this.view.layoutPanel.validate(o))return;const e=this.view.layoutPanel.data;"boolean"==typeof e.isRemember&&(t=e.isRemember),n.captcha&&Object.assign(a,n.captcha),e.srfheaders&&Object.assign(a,e.srfheaders)}let s=n.username;uo(n.orgid)&&(s="".concat(n.username,"@").concat(n.orgid));const i=await ibiz.auth.login(s,n.password,t,a);this.view.evt.emit("onAfterLogin",{ok:i,panelDataParent:o}),!0===i&&(window.location.hash=this.route.query.ru||"/",window.location.reload())}async cancelChanges(){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)}))}}class xP extends WI{get treeGridEx(){return this.view.getController("treegridex")}async call(e,t){return e===eo.TOGGLE_ROW_EDIT?(this.treeGridEx.toggleRowEdit(),null):e===eo.SAVE_ROW?(this.treeGridEx.save(t.data[0]),null):e===eo.SAVE?(this.treeGridEx.saveAll(),null):e===eo.REFRESH?(this.treeGridEx.load(),null):super.call(e,t)}}class zP extends NI{get xdataControlName(){return"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}}class SP extends ao{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===eo.NEW?(await this.meditviewpanel.handleAdd(),null):e===eo.REFRESH?null:super.call(e,t)}}class TP extends Jn{get chartExpBar(){return this.view.getController("chartexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("chartexpbar"),this.view.slotProps.chartexpbar||(this.view.slotProps.chartexpbar={}),this.view.slotProps.chartexpbar.srfnav=this.view.state.srfnav}}class _P extends ao{get map(){return this.view.getController("map")}async onCreated(){super.onCreated(),this.view.slotProps.map||(this.view.slotProps.map={})}}class OP extends Jn{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===eo.REFRESH?(await this.refresh(),null):e===eo.SEARCH?(await this.searchForm.search(),null):e===eo.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=Qn(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)}}}class BP extends ao{get gantt(){return this.view.getController("gantt")}async call(e,t){return e===eo.NEW_ROW?(this.gantt.newRow(t),null):e===eo.TOGGLE_ROW_EDIT?(this.gantt.toggleRowEdit(),null):e===eo.SAVE_ROW?(this.gantt.save(t.data[0]),null):e===eo.SAVE?(this.gantt.saveAll(),null):super.call(e,t)}async onXDataActive(e){}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.gantt||(this.view.slotProps.gantt={}),this.view.slotProps.gantt.mdctrlActiveMode=e.mdctrlActiveMode}}class jP extends OI{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}}class AP extends Jn{}class NP extends KI{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}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",(()=>{this.calcViewParams()}))}async call(e,t){return e===eo.SEARCH?(await this.searchForm.search(),null):e===eo.RESET?(await this.searchForm.reset(),null):e===eo.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()}}class RP extends Jn{}const MP=e("aT",{install:e=>{ibiz.engine.register("VIEW_AppIndexView",(e=>new RI(e))),ibiz.engine.register("VIEW_APPINDEXVIEW",(e=>new RI(e))),ibiz.engine.register("VIEW_GridView",(e=>new NI(e))),ibiz.engine.register("VIEW_ListView",(e=>new MI(e))),ibiz.engine.register("VIEW_TreeView",(e=>new WI(e))),ibiz.engine.register("VIEW_EditView",(e=>new OI(e))),ibiz.engine.register("VIEW_EditView2",(e=>new BI(e))),ibiz.engine.register("VIEW_EditView3",(e=>new jI(e))),ibiz.engine.register("VIEW_EditView4",(e=>new AI(e))),ibiz.engine.register("VIEW_DataView",(e=>new LI(e))),ibiz.engine.register("VIEW_OptionView",(e=>new VI(e))),ibiz.engine.register("VIEW_PickupGridView",(e=>new FI(e))),ibiz.engine.register("VIEW_PickupTreeView",(e=>new vP(e))),ibiz.engine.register("VIEW_DEPICKUPVIEW2",(e=>new gP(e))),ibiz.engine.register("VIEW_PickupView",(e=>new GI(e))),ibiz.engine.register("VIEW_MPickupView",(e=>new HI(e))),ibiz.engine.register("VIEW_DEMPICKUPVIEW2",(e=>new CP(e))),ibiz.engine.register("VIEW_TabExpView",(e=>new KI(e))),ibiz.engine.register("VIEW_GridExpView",(e=>new $I(e))),ibiz.engine.register("VIEW_ListExpView",(e=>new YI(e))),ibiz.engine.register("VIEW_DataViewExpView",(e=>new JI(e))),ibiz.engine.register("VIEW_ChartView",(e=>new eP(e))),ibiz.engine.register("VIEW_TreeExpView",(e=>new QI(e))),ibiz.engine.register("VIEW_WizardView",(e=>new ZI(e))),ibiz.engine.register("VIEW_WFDynaEditView",(e=>new nP(e))),ibiz.engine.register("VIEW_DEWFDYNAEDITVIEW3",(e=>new oP(e))),ibiz.engine.register("VIEW_DEWFDYNAACTIONVIEW",(e=>new lP(e))),ibiz.engine.register("VIEW_DEWFDYNASTARTVIEW",(e=>new dP(e))),ibiz.engine.register("VIEW_APPPORTALVIEW",(e=>new uP(e))),ibiz.engine.register("VIEW_DEPORTALVIEW",(e=>new uP(e))),ibiz.engine.register("VIEW_PortalView9",(e=>new uP(e))),ibiz.engine.register("VIEW_PortalView",(e=>new uP(e))),ibiz.engine.register("VIEW_DEPANELVIEW",(e=>new pP(e))),ibiz.engine.register("VIEW_APPPANELVIEW",(e=>new pP(e))),ibiz.engine.register("VIEW_DECUSTOMVIEW",(e=>new hP(e))),ibiz.engine.register("VIEW_DEPICKUPDATAVIEW",(e=>new wP(e))),ibiz.engine.register("VIEW_DEINDEXPICKUPDATAVIEW",(e=>new wP(e))),ibiz.engine.register("VIEW_DECALENDARVIEW",(e=>new fP(e))),ibiz.engine.register("VIEW_CalendarExpView",(e=>new yP(e))),ibiz.engine.register("VIEW_FormPickupDataView",(e=>new PP(e))),ibiz.engine.register("VIEW_KanBanView",(e=>new IP(e))),ibiz.engine.register("VIEW_APPLOGINVIEW",(e=>new kP(e))),ibiz.engine.register("VIEW_TreeGridExView",(e=>new xP(e))),ibiz.engine.register("VIEW_DETREEGRIDVIEW",(e=>new zP(e))),ibiz.engine.register("VIEW_DECHARTEXPVIEW",(e=>new TP(e))),ibiz.engine.register("VIEW_DEGANTTVIEW",(e=>new BP(e))),ibiz.engine.register("VIEW_DESUBAPPREFVIEW",(e=>new AP(e))),ibiz.engine.register("VIEW_APPDATAUPLOADVIEW",(e=>new RP(e))),ibiz.engine.register("VIEW_GridView9",(e=>new NI(e))),ibiz.engine.register("VIEW_ListView9",(e=>new MI(e))),ibiz.engine.register("VIEW_EditView9",(e=>new OI(e))),ibiz.engine.register("VIEW_DataView9",(e=>new LI(e))),ibiz.engine.register("VIEW_TreeView9",(e=>new WI(e))),ibiz.engine.register("VIEW_DETABEXPVIEW9",(e=>new KI(e))),ibiz.engine.register("VIEW_PortalView9",(e=>new uP(e))),ibiz.engine.register("VIEW_DEPORTALVIEW9",(e=>new uP(e))),ibiz.engine.register("VIEW_DEMEDITVIEW9",(e=>new SP(e))),ibiz.engine.register("VIEW_DEMAPVIEW",(e=>new _P(e))),ibiz.engine.register("VIEW_DEREPORTVIEW",(e=>new OP(e))),ibiz.engine.register("VIEW_DEINDEXVIEW",(e=>new jP(e))),ibiz.engine.register("VIEW_DETABSEARCHVIEW",(e=>new NP(e)))}});var LP=Object.defineProperty,VP=(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);const FP=e("i",os({legacy:!1,locale:"zh-CN"}));const UP=new class{constructor(){VP(this,"html"),VP(this,"defaultLang"),VP(this,"langMap",new Map),this.defaultLang="zh-CN",this.html=document.querySelector("html");const e=localStorage.getItem("language")||navigator.language||this.defaultLang;FP.global.locale.value=e,this.html.setAttribute("lang",e),this.langMap.set("en",(()=>t.import("./index-xa8K5AHD.js"))),this.langMap.set("zh-CN",(()=>t.import("./index-HNRMy1_g.js")))}async init(){const e=FP.global.locale.value;let t;t=this.langMap.has(e)?this.langMap.get(e):this.langMap.get(this.defaultLang);const a=await t();FP.global.setLocaleMessage(FP.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 FP.global.t(e,t,a)}mergeLocaleMessage(e,t){if("string"==typeof e){const a=e;FP.global.mergeLocaleMessage(a,t)}else{const t=e;t&&Object.keys(t).length>0&&Object.keys(t).forEach((e=>{FP.global.mergeLocaleMessage(e,t[e])}))}}};var qP=Object.defineProperty,GP=(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 HP{constructor(e){GP(this,"isFullCode",!1),GP(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=!0){if(e){let e=!0;try{ibiz.env.enableAnonymous&&await this.anonymousValidate(),await this.appInit()}catch(t){e=!1,ibiz.util.error.handle(t)}return e}return await this.initModel(!1),!0}async anonymousValidate(){const e=ibiz.auth.getAuthInfo();if(e&&!e.isAnonymous)return;await this.initModel(!1);const t=window.location.hash.split("/"),a=t[t.length-2];let n;try{n="#"===a&&ibiz.hub.defaultPage?await ibiz.hub.getAppView(ibiz.hub.defaultPage.id):await ibiz.hub.getAppView(a)}catch(e){ibiz.log.error(e)}if(!n)return ibiz.log.error("找不到视图模型".concat(a,",请确保该视图配置了匿名访问和用户引用")),void this.throw401();if(3!==n.accUserMode&&this.throw401(),!e){if(!await ibiz.auth.anonymousLogin())throw new bt(ibiz.i18n.t("webApp.authGuard.loginFailed"))}}async appInit(){try{!0===ibiz.env.isSaaSMode&&await this.loadOrgData(),await this.loadAppData()}catch(e){const t=e.status,a=ro(mt.TOKEN_REMEMBER),n=ro(mt.REFRESH_TOKEN);if(401!==t||!a||null==n||""===n)throw e;try{await ibiz.auth.refreshToken(),!0===ibiz.env.isSaaSMode&&await this.loadOrgData(),await this.loadAppData()}catch(t){throw e}}await this.initModel(),await ibiz.auth.extendLogin(),await ibiz.hub.notice.init(),await ibiz.util.theme.initCustomTheme()}async initModel(e=!0){}async loadAppData(){const e=await ibiz.net.get("/appdata");e.ok&&(ibiz.appData=e.data)}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){if(e.appUIThemes)await this.loadTheme();else{const e=await t.import("@ibiz-template/web-theme"),a=e.default||e;tt.useComponent.callSync(null,a)}}async loadTheme(){const e=ibiz.hub.getApp().model.appUIThemes||[];if(e.length>0){const t=e[0];await ibiz.util.theme.loadTheme(t)}}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=Co(ibiz.config,ibiz.env.globalConfig)),ibiz.log.setLevel(ibiz.env.logLevel))}throw401(){throw new _t({response:{status:401,statusText:ibiz.i18n.t("webApp.authGuard.noPermission")}})}}e("ba",HP);var WP=Object.defineProperty,KP=(e,t,a)=>(((e,t,a)=>{t in e?WP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);class XP extends HP{constructor(){super(...arguments),KP(this,"hasModelInit",!1),KP(this,"noPermissionModel",!1)}async initModel(e=!0){if(!this.hasModelInit||this.hasModelInit&&this.noPermissionModel!==e){ibiz.hub.reset();const a=new ss((async(t,a)=>(await ibiz.net.get("".concat(ibiz.env.remoteModelUrl).concat(t),a,e?{}:{srfdcsystem:ibiz.env.dcSystem})).data),ibiz.env.appId,e),n=await a.getAppModel();await this.initEnvironment(n);const o=await ibiz.hub.getAppAsync(ibiz.env.appId),s=o.model;if(ibiz.env.isMob=!0===s.mobileApp,ibiz.env.isEnableMultiLan){const e=ibiz.i18n.getLang(),t=(await a.getPSAppLang(e.replace("-","_").toUpperCase())).languageItems||[],n={};t.forEach((e=>{n[e.lanResTag]=e.content})),FP.global.mergeLocaleMessage(e,n)}if(s.appUIThemes)await this.loadTheme();else{const e=await t.import("@ibiz-template/web-theme"),a=e.default||e;tt.useComponent.callSync(null,a)}o.model.title&&ibiz.util.setBrowserTitle("")}this.noPermissionModel=e,this.hasModelInit=!0}}
2
- /*! Element Plus v2.4.4 */var $P={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:"取消"}}},YP={install:e=>{ibiz.i18n=UP,ibiz.util.getExcelUtil=()=>t.import("./xlsx-util-jxc7ylyH.js"),oo("404",(()=>({component:vI}))),oo("403",(()=>({component:wI}))),e.use(li),e.use(ig),e.use(MP),e.use(at),e.use(nt),e.use(PI),e.use(ot),e.use(zI),e.use(Tc),e.use(Rc),e.use(Ci),e.use(xi),e.use(Nl),e.use(Bh),e.use(Ul),e.use(qd),e.use(Uc),e.use(fc),e.use(st),e.use(it),e.use(rc),e.use(sd),e.use(bd),e.use(dd),e.use(Kl),e.use(ic),e.use(Dc),e.use(Kc),e.use(ed),e.use(Ld),e.use(Xd),e.use(au),e.use(pu),e.use(wp),e.use(sh),e.use(yd),e.use(uh),e.use(zh),e.use(Mh),e.use(Ed),e.use(qh),e.use(em),e.use(sm),e.use(dm),e.use(bI)}};function JP(e,a){const n=S(e,a);n.component("KeepAlive",T),n.config.errorHandler=function(e){ibiz.util.error.handle(e)};const o=(e,t)=>{n.use(t)};tt.useComponent.tap(o);if(t.import("@ibiz-template-plugin/bi-report").then((e=>{const t=e.default;tt.useComponent.callSync(null,t),tt.createApp.tap(((e,a)=>{a.use(t)}))})),a){const e=a.unmounted;a.unmounted=()=>{e(),tt.useComponent.removeTap(o)}}return n.use(FP),n.use(Qo,{locale:$P}),n.use(lt),n.use(YP),tt.createApp.callSync(null,n),ibiz.plugin.register(n),n}const QP=new Map([["baseUrl","BaseUrl"],["remoteModelUrl","remoteDynaPath"],["dcSystem","mockDcSystemId"],["enablePermission","enablePermissionValid"],["enableTitle","enableTitle"]]);async function ZP(){const e=window.Environment,t=Io.parse(window.location.search,{ignoreQueryPrefix:!0});if(Object.keys(ibiz.env).forEach((t=>{const a=QP.has(t)?QP.get(t):t;null!=e[a]&&(ibiz.env[t]=e[a])})),t&&t.srfdcsystem&&(ibiz.env.dcSystem=t.srfdcsystem),e.AppTitle&&(document.title=e.AppTitle),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=Co(ibiz.config,e.globalConfig)),ibiz.log.setLevel(ibiz.env.logLevel)}var eD=a({setup(){const e=new ia({mode:la.ROUTE,viewUsage:1,routeDepth:1}),a=async e=>{if((e.ctrlKey||e.metaKey)&&"F12"===e.code){document.removeEventListener("keydown",a);const e=await t.import("@ibiz-template/devtool"),n=e.default||e;tt.useComponent.callSync(null,n)}};document.addEventListener("keydown",a);const n=()=>{window.removeEventListener("unload",n),ibiz.hub.destroy()};return window.addEventListener("unload",n),C((()=>{n()})),{modal:e}},render(){return o(s("router-view"),{modal:this.modal},null)}});class tD{match(e){return e instanceof _t&&(401===e.status||403===e.status)}async casLogin(){if(!ibiz.env.casLoginUrl)throw new bt(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(Io.stringify({RU:Ot.fullPath,base:t},{addQueryPrefix:!0})),n=-1!==ibiz.env.casLoginUrl.indexOf("?"),o=ibiz.env.casLoginUrl+(n?"&":"?")+Io.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){ibiz.mc.error.send(e)}handle(e){if(e instanceof _t){if(401===e.status){return Io.parse(window.location.search.replace("?","")).isAnonymous?ibiz.auth.anonymousLogin().then((e=>{e&&window.location.reload()})):ibiz.env.loginMode===Bt.CAS?this.casLogin():this.normalLogin(),!0}if(403===e.status)return this.handle403(e),!0}}}e("c","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function aD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nD={exports:{}};
3
- /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
4
- * @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 s(e){return 100*(-1+e)}function i(e,t,a){var o;return(o="translate3d"===n.positionUsing?{transform:"translate3d("+s(e)+"%,0,0)"}:"translate"===n.positionUsing?{transform:"translate("+s(e)+"%,0)"}:{"margin-left":s(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 s=a.render(!t),c=s.querySelector(n.barSelector),d=n.speed,u=n.easing;return s.offsetWidth,l((function(t){""===n.positionUsing&&(n.positionUsing=a.getPositioningCSS()),r(c,i(e,d,u)),1===e?(r(s,{transition:"none",opacity:1}),s.offsetWidth,setTimeout((function(){r(s,{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,i=t.querySelector(n.barSelector),l=e?"-100":s(a.status||0),c=document.querySelector(n.parent);return r(i,{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,s=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((n=e[o]+s)in a)return n;return t}function o(e){return e=a(e),t[e]||(t[e]=n(e))}function s(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)&&s(e,a,n);else s(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}()}(nD);var oD=aD(nD.exports);const sD=a({name:"ModalRouterShell",props:{modal:{type:Object,required:!0}},setup(e){const t=Do(),a=Eo(),o=n(!1),s=n({}),i=[],l=e.modal.routeDepth;let r=null;C((()=>{o.value=!0,r&&(r.dismiss(),r=null),(()=>{if(s.value.context){const{context:e}=E(s.value);e&&e.destroy()}})()}));const c=async e=>{var t;if(s.value=await rt(e,l,!0),o.value)return;s.value.context instanceof Et||(s.value.context=Et.create(s.value.context));const n=e.params.modalView,c=e.params.modalParams;if(c){const e=Io.parse(c,{strictNullHandling:!0,delimiter:";"});if(e.srfnavctx){const t=JSON.parse(decodeURIComponent(e.srfnavctx));Object.assign(s.value.context,t),delete e.srfnavctx}e.srfnav&&(s.value.srfnav=e.srfnav,delete e.srfnav),yo(e)||(s.value.params?Object.assign(s.value.params,e):s.value.params=e)}if(!s.value.context){const e=Et.create({});s.value.context=e}let d,u=s.value.viewConfig;try{u||(u=await ibiz.hub.config.view.get(n)),d=ct({context:s.value.context,params:s.value.params,viewId:u.id})}catch(e){d=vI}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(),i.push(e.fullPath);const h=await r.onWillDismiss();if(r=null,!1===o.value){if(null==(t=window.history.state)?void 0:t.back)a.back();else{const t=e.path,n=t.indexOf("/".concat(so.ROUTE_MODAL_TAG,"/"));a.replace(t.substring(0,n))}W.close(a.currentRoute.value.fullPath,h||{ok:!1})}};return ko(((e,t)=>{if(!o.value&&i.length>0&&-1!==i.indexOf(t.fullPath)&&-1===i.indexOf(e.fullPath)){const t=se(e).pathNodes,a=t[t.length-1];a&&a.viewName===so.ROUTE_MODAL_TAG&&c(e)}})),c(t),{}},render:()=>o("div",{style:"position: absolute;width: 0;height: 0;"},null)}),iD=a({name:"RouterShell",props:{modal:{type:Object,required:!0}},setup(e){const t=Do(),a=Eo(),o=n({}),s=n(!1),i=n(!0),l=()=>{if(o.value.context){const{context:e}=E(o.value);e&&e.destroy()}},r=e.modal.routeDepth;C((()=>{l()}));const d=async()=>{try{const e=await rt(t,r),a=Et.create(e.context);o.value={...e,context:a},s.value=!0}catch(e){a.push({name:"errorView".concat(r),params:{code:"404"}})}};d(),c((()=>t.params.view1),(()=>{1===r&&(l(),d())}));const u=new ia({mode:la.ROUTE,routeDepth:r+1});return k((()=>{i.value=!0})),_((()=>{i.value=!1})),{routeModal:u,route:t,viewData:o,isLoaded:s,isActivated:i}},render(){if(!this.isLoaded)return null;const{context:e,params:t,srfnav:a,viewConfig:n}=this.viewData,i=fo({...this.$props,...this.$attrs,context:e,params:t,viewId:n.id,key:n.codeName},{state:{srfnav:a}});return o(O,null,[r(s("IBizViewShell"),i,this.$slots),this.isActivated&&o(s("router-view"),{key:n.codeName,name:so.ROUTE_MODAL_TAG,modal:this.routeModal},null)])}});function lD(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const rD=a({setup(){const e=B("share-view"),t=Eo(),a=Do(),o=n(!1),s=n(!1),i=n({});let l={},r="";d((async()=>{const e=a.query;r=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;l=await ibiz.util.theme.getShareTheme(e,r),l&&ibiz.util.theme.previewCustomTheme(l.themeTag,l.themeVars)})(),s.value=!0}));return{ns:e,loading:o,isMounted:s,shareUser:i,handleApply:async()=>{await ibiz.util.theme.saveCustomTheme(l.themeTag,l.themeVars),t.push("/")},handleCancel:()=>{ibiz.util.theme.resetCustomTheme(),t.push("/")}}},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(s("el-button"),{onClick:this.handleApply,size:"large",round:!0,loading:this.loading},lD(e=ibiz.i18n.t("view.shareView.use"))?e:{default:()=>[e]}),o(s("el-button"),{onClick:this.handleCancel,size:"large",round:!0},lD(t=ibiz.i18n.t("view.shareView.cancel"))?t:{default:()=>[t]})])])])])}});var cD=Object.defineProperty,dD=(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 uD{static setAuthGuard(e){this.authGuard=e}static getRouter(){const e=ibiz.env.routePlaceholder,t="[^/]+=[^/]+|".concat(e),a="[^=/]+";return this.router||(this.router=xo({history:zo(),routes:[{path:"/",redirect:"/".concat(e,"/index/").concat(e)},{path:"/login",name:"loginView",beforeEnter:async(e,t,a)=>{await this.authGuard(!1),a()},component:gI},{path:"/share",name:"shareView",beforeEnter:async(e,t,a)=>{await this.authGuard()?a():a(!1)},component:rD},{path:"/error/:code",name:"errorView1",component:SI},{path:"/appredirectview",name:"appRedirectView",beforeEnter:async(e,t,a)=>{await this.authGuard()?a():a(!1)},component:dt},{path:"/:appContext(".concat(t,")/:view1(").concat(a,")/:params1(").concat(t,")"),beforeEnter:async(e,t,a)=>{await this.authGuard()?a():a(!1)},component:iD,children:[{path:"error/:code",name:"errorView2",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view2(".concat(a,")/:params2(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView3",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view3(".concat(a,")/:params3(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView4",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view4(".concat(a,")/:params4(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView5",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view5(".concat(a,")/:params5(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView6",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view6(".concat(a,")/:params6(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView7",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view7(".concat(a,")/:params7(").concat(t,")"),component:iD,children:[{path:"error/:code",name:"errorView8",component:SI},{path:"".concat(so.ROUTE_MODAL_TAG,"/:modalView(").concat(a,")/:modalParams(").concat(t,")"),components:{[so.ROUTE_MODAL_TAG]:sD}},{path:":view8(".concat(a,")/:params8(").concat(t,")"),component:iD},{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)=>{oD.configure({showSpinner:!1}),oD.start(),a()})),this.router.afterEach((()=>{oD.done()}))),this.router}}e("bc",uD),dD(uD,"router"),dD(uD,"authGuard")}}}));