PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | assets/chunks/CardBody.js +1 -1 1.3.27 → 1.6.6 View file →
@@ -1 +1 @@
1 -var fe=Object.defineProperty;var ge=(t,a,e)=>a in t?fe(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e;var Z=(t,a,e)=>ge(t,typeof a!="symbol"?a+"":a,e);import{M as pe}from"./Model.js?ver=1.3.27";import{e as u,o as n,d,b as w,m as D,a as c,r as y,t as g,w as h,f as S,u as K,F as A,g as N,X as ve,O as be,h as P,c as C,l as Q,i as L,x as G,G as ye,n as O,Q as ae,v as _e,q as R,A as ce,B as ue,S as we,R as he,z as Y,U as Ve,a1 as Ce,J as Se,T as ke}from"./vue.esm-bundler.js?ver=1.3.27";import{S as F,I as W}from"./IconButton.js?ver=1.3.27";import{R as M}from"./Rest.js?ver=1.3.27";import{a as ee,u as $e}from"./vue-router.js?ver=1.3.27";import{U as H}from"./Url.js?ver=1.3.27";import{A as J}from"./Arr.js?ver=1.3.27";import{t as k,A as le,a as ie}from"./Translator.js?ver=1.3.27";import{d as te}from"./dayjs.min.js?ver=1.3.27";import{u as Te,t as Ae}from"./timezone.js?ver=1.3.27";import{n as B}from"./Notify.js?ver=1.3.27";import{_ as I}from"./DynamicIcon.js?ver=1.3.27";import{_ as q}from"./_plugin-vue_export-helper.js?ver=1.3.27";import{E as Fe}from"./index3.js?ver=1.3.27";import{E as X}from"./index.js?ver=1.3.27";import{U as xe}from"./Utils.js?ver=1.3.27";import{T as me}from"./Badge.js?ver=1.3.27";const Pe={name:"ProFeatureNotice",methods:{translate:k},components:{DynamicIcon:I},props:{title:{type:String},text:{type:String}}},Ie={class:"fct-pro-feature-notice-wrap"},Ne={class:"fct-pro-feature-content"},Oe={class:"fct-pro-feature-icon"},De={key:0,class:"fct-pro-feature-title"},Ue={key:1,class:"fct-pro-feature-text"};function Be(t,a,e,i,s,l){const m=y("DynamicIcon"),b=y("el-button");return n(),u("div",Ie,[d("div",Ne,[d("div",Oe,[c(m,{name:"Crown"})]),e.title?(n(),u("h4",De,g(e.title),1)):w("",!0),e.text?(n(),u("p",Ue,g(e.text),1)):w("",!0),D(t.$slots,"default"),c(b,{type:"primary",tag:"a",href:"https://fluentcart.com/discount-deal",target:"_blank"},{default:h(()=>[c(m,{name:"Crown"}),S(" "+g(l.translate("Upgrade to Pro")),1)]),_:1})])])}const Ee=q(Pe,[["render",Be]]),je={class:"fluent-cart-admin-pages"},qe={class:"fct-pro-feature-title"},ze=["innerHTML"],Me={key:0,class:"fct-feature-list"},Re=["innerHTML"],Qe={__name:"Features",props:{featureName:String,featureDescription:String,features:Array,onClose:Function},setup(t){return(a,e)=>(n(),u("div",je,[c(Ee,null,{default:h(()=>[d("h4",qe,g(K(k)("%s requires FluentCart Pro",t.featureName)),1),t.featureDescription?(n(),u("p",{key:0,class:"fct-pro-feature-text",innerHTML:t.featureDescription},null,8,ze)):w("",!0)]),_:1}),t.features.length?(n(),u("ul",Me,[(n(!0),u(A,null,N(t.features,i=>(n(),u("li",{key:i,innerHTML:i},null,8,Re))),128))])):w("",!0)]))}};class He{constructor(){Z(this,"$message",Fe);Z(this,"duration",1e3)}success(a){this.show(a,"success")}error(a){this.show(a,"error")}info(a){this.show(a,"info")}show(a,e="success",i=40,s=1e3){this.$message({type:e,offset:i,message:a,dangerouslyUseHTMLString:!0,duration:s??this.duration})}showFeaturesCTA(a,e,i,s){let l=null;s&&(l=s.appContext),X({title:k("Pro Feature"),message:ve(Qe,{featureName:a,featureDescription:e,features:i}),customClass:"fluent-cart-pro-cta",showCancelButton:!1,showConfirmButton:!1,showFooter:!1,showClose:!0},l)}}const se=new He;class Vl extends pe{constructor(e={}){super();Z(this,"data",{callbacks:{onDataLoaded:null},tableData:[],search:"",advanceFilters:[[]],searching:!1,selectedView:"",sorting:{sortBy:"id",sortType:"DESC"},paginate:{current_page:1,per_page:10,last_page:1,total:0,from:1,to:10},filterType:"simple",columns:[],loading:!1,inputRef:P(null),nextPageCount:10,user_tz:null,showDeleteBulkAction:!1,savedViews:[],activeSavedViewId:null,savedViewQueryParams:null,showSaveViewDialog:!1});be(()=>{this.setupInitialData(),te.extend(Te),te.extend(Ae),this.data.user_tz=te.tz.guess(),this.data.vueInstance=e.instance,e.fetch!==!1&&this.fetch()})}onDataLoaded(e){this.data.callbacks.onDataLoaded=e}setupInitialData(){this.setupInitialTab(),this.setupInitialColumnVisibility(),this.setupInitialFilterType(),this.setupInitialAdvanceFilter(),this.setupInitialSearch(),this.setupInitialPagination(),this.setupSavedViews()}setupInitialSearch(){this.isRouteSearchApplied()&&(this.data.search=this.isRouteSearchApplied(),this.data.searching=!0)}setupInitialPagination(){const e=F.get(this.getPerPageStorageName()),i=F.get(this.getCurrentPageStorageName());this.data.paginate.per_page=parseInt(e)||10,this.data.paginate.current_page=parseInt(i)||1}setupInitialTab(){var m;const i=(m=ee().query.active_view)==null?void 0:m.toString(),s=this.getTabsCount()?this.getTabs():{};if(i){if(s.hasOwnProperty(i)){this.data.selectedView=i;return}this.data.pendingViewFromUrl=i,this.data.selectedView=this.getDefaultView();return}const l=F.get(this.getTabStorageName());if(typeof l=="string"&&s.hasOwnProperty(l)){this.data.selectedView=l;return}typeof l=="string"&&l!==""&&(this.data.pendingViewFromStorage=l),this.data.selectedView=this.getDefaultView()}setupSavedViews(){this.data.savedViews=J.get(window,`fluentCartAdminApp.table_config.${this.getTableName()}.saved_views`)||[];const e=this.data.pendingViewFromUrl||this.data.pendingViewFromStorage;if(delete this.data.pendingViewFromUrl,delete this.data.pendingViewFromStorage,e){const i=this.data.savedViews.find(s=>s.slug===e||String(s.id)===String(e));i?(this.data.activeSavedViewId=i.slug,this.data.savedViewQueryParams=i.query_params,this._resetLiveFilter(),this.data.selectedView=this.getDefaultView()):(this.data.selectedView=this.getDefaultView(),F.set(this.getTabStorageName(),this.getDefaultView()),H.pushToVueUrl(null,{active_view:this.getDefaultView()}))}}handleTabChanged(e){const i=!!this.data.activeSavedViewId;i&&(this.data.activeSavedViewId=null,this.data.savedViewQueryParams=null,this._resetLiveFilter()),!(e===this.data.selectedView&&!i)&&(this.data.selectedView=e,this.data.paginate.current_page=1,this.setCurrentPage(1),F.set(this.getTabStorageName(),this.data.selectedView),H.pushToVueUrl(null,{active_view:this.data.selectedView}),this.fetch())}getSelectedTab(){return this.data.selectedView}setupInitialColumnVisibility(){let e=F.get(this.getColumnStorageName());if(Array.isArray(e))this.data.columns=e;else{let i=[];for(let s of this.getToggleableColumns())i.push(s.value);this.data.columns=i}}isSearching(){return this.data.searching!==!1}openSearch(){this.data.activeSavedViewId&&this.data.savedViewQueryParams&&this.data.savedViewQueryParams.filter_type!=="advanced"&&this._prefillFiltersFromParams(this.data.savedViewQueryParams),this.data.searching=!this.isUsingAdvanceFilter(),F.set(this.getToggleSearchingStorageName(),this.data.searching)}closeSearch(){const e=!!this.data.search;this.data.searching=!1,this.data.search="",F.set(this.getToggleSearchingStorageName(),this.data.searching),e&&this.fetch()}showBulkDeleteAction(e=null){this.data.showDeleteBulkAction=e,F.set(this.getDeleteBulkActionStorageName(),this.data.showDeleteBulkAction)}useFullWidthSearch(){return!1}handleSortChange(){this.fetch()}isUsingSimpleFilter(){return this.data.filterType==="simple"}setupInitialFilterType(){if(!this.isProActive()){this.data.filterType="simple";return}if(this.isRouteActiveViewApplied()||this.isRouteSearchApplied()){this.data.filterType="simple";return}const e=F.get(this.getFilterTypeStorageName());if(["simple","advanced"].includes(e)){if(e==="advanced"&&!this.isAdvanceFilterEnabled())return;this.data.filterType=e}const i=F.get(this.getToggleSearchingStorageName());i&&(this.data.searching=i);const s=F.get(this.getDeleteBulkActionStorageName());s&&(this.data.showDeleteBulkAction=s)}onFilterTypeChanged(e){e==="advanced"&&(this.data.searching=!1,this.data.search="",this.data.activeSavedViewId&&this.data.savedViewQueryParams&&this.data.savedViewQueryParams.filter_type==="advanced"&&this._prefillFiltersFromParams(this.data.savedViewQueryParams)),e==="simple"&&this.fetch(),F.set(this.getFilterTypeStorageName(),this.data.filterType)}setupInitialAdvanceFilter(){let e=F.get(this.getAdvancedFilterStorageName());typeof e=="string"&&(e=[[]]),this.data.advanceFilters=e}isProActive(){return le.get("app_config.isProActive")}applyAdvancedFilter(e=!1){if(!this.isProActive()){e||se.showFeaturesCTA(k("Advanced Filter"),k("Advanced filter is only available in pro version"),[],this.data.vueInstance),this.storeAdvanceFilter();return}this.setCurrentPage(1),this.fetch(),this.storeAdvanceFilter()}storeAdvanceFilter(){F.set(this.getAdvancedFilterStorageName(),this.data.advanceFilters)}isUsingAdvanceFilter(){return this.data.filterType==="advanced"}addAdvanceFilterGroup(){this.data.advanceFilters.push([])}removeAdvanceFilterGroup(e){this.data.advanceFilters.length>1&&this.data.advanceFilters.splice(e,1),this.storeAdvanceFilter()}clearAdvanceFilter(){this.data.advanceFilters=[[]],this.applyAdvancedFilter()}getAdvanceFilterOptions(){return J.get(window,`fluentCartAdminApp.table_config.${this.getTableName()}.filters.advance`)}getSearchGuideOptions(){return J.get(window,`fluentCartAdminApp.table_config.${this.getTableName()}.filters.guide`)||[]}isAdvanceFilterEnabled(){return this.getAdvanceFilterOptions()!==null}buildQueryParams(){const e={per_page:this.data.paginate.per_page,page:this.data.paginate.current_page,sort_by:this.data.sorting.sortBy,sort_type:this.data.sorting.sortType,with:this.with(),scopes:this.scopes()};return this.data.activeSavedViewId?e.active_view=this.data.activeSavedViewId:this.isUsingAdvanceFilter()||(e.active_view=this.data.selectedView),this.isUsingAdvanceFilter()?(e.filter_type="advanced",e.advanced_filters=JSON.stringify(this.data.advanceFilters)):(e.filter_type="simple",e.search=this.data.search),e}search(){H.pushToVueUrl(null,{search:this.data.search}),this.fetch()}fetch(){this.data.loading=!0;let e=this.buildQueryParams();e.user_tz=this.data.user_tz,M.get(this.getFetchUrl(),e).then(i=>{const s=this.parseResponse(i);this.data.tableData=s.data,this.data.paginate.total=s.total,this.data.paginate.last_page=s.last_page,this.data.paginate.from=s.from,this.data.paginate.to=s.to,this.data.nextPageCount=this.guessNextPageCount(s),typeof this.data.callbacks.onDataLoaded=="function"&&this.data.callbacks.onDataLoaded(i)}).catch(i=>{var s;i.status_code=="422"?B.validationErrors(i):B.error((s=i.data)==null?void 0:s.message),this.data.tableData=[]}).finally(()=>{this.data.loading=!1})}getTableData(){return this.data.tableData}isLoading(){return this.data.loading===!0}getDefaultView(){return"all"}handleColumnVisibilityChange(){F.set(this.getColumnStorageName(),this.data.columns)}handlePerPageChange(){this.data.paginate.current_page=1,this.setCurrentPage(1),F.set(this.getPerPageStorageName(),this.data.paginate.per_page),this.fetch()}handlePageChange(){this.fetch(),this.setCurrentPage()}setCurrentPage(e){F.set(this.getCurrentPageStorageName(),e||this.data.paginate.current_page)}getCurrentPage(){return F.get(this.getCurrentPageStorageName())}getColumnStorageName(){return`${this.getTableName()}_columns`}getTabStorageName(){return`${this.getTableName()}_tab`}getFilterTypeStorageName(){return`${this.getTableName()}_filter_type`}getAdvancedFilterStorageName(){return`${this.getTableName()}_advanced_filter`}getPerPageStorageName(){return`${this.getTableName()}_per_page`}getCurrentPageStorageName(){return`${this.getTableName()}_current_page`}getToggleSearchingStorageName(){return`${this.getTableName()}_toggle_searching`}getDeleteBulkActionStorageName(){return`${this.getTableName()}_delete_bulk_action`}getSavedViews(){return this.data.savedViews}getActiveSavedViewId(){return this.data.activeSavedViewId}getCurrentUserId(){return le.get("me.id")}isViewOwner(e){return e.owner_id===this.getCurrentUserId()}promptAndSaveView(){if(!this.isProActive()){se.showFeaturesCTA(k("Saved Views"),k("Saved views is only available in pro version"),[],this.data.vueInstance);return}this.data.showSaveViewDialog=!0}_resetLiveFilter(){this.data.search="",this.data.searching=!1,this.data.advanceFilters=[[]],this.data.filterType="simple",F.set(this.getFilterTypeStorageName(),"simple")}_prefillFiltersFromParams(e){if(e){if(e.filter_type==="advanced"&&e.advanced_filters){let i;try{i=typeof e.advanced_filters=="string"?JSON.parse(e.advanced_filters):e.advanced_filters}catch{i=[[]]}this.data.advanceFilters=Array.isArray(i)?i:[[]],this.data.search="",this.data.searching=!1,this.data.filterType="advanced"}else this.data.search=e.search||"",this.data.advanceFilters=[[]],this.data.searching=!!e.search,this.data.filterType="simple",e.active_view&&(this.data.selectedView=e.active_view);F.set(this.getFilterTypeStorageName(),this.data.filterType)}}_buildViewQueryParams(){const e={filter_type:this.data.filterType};return this.data.filterType==="advanced"?e.advanced_filters=JSON.stringify(this.data.advanceFilters):(e.search=this.data.search,e.active_view=this.data.selectedView),e}saveCurrentView(e,i,s){if(this.data.savedViews.length>=20)return B.error(k("Maximum of 20 saved views reached")),null;const l=this._buildViewQueryParams();return M.post("saved-views",{object_type:this.getTableName(),name:e,description:i||"",is_public:s||!1,query_params:l}).then(m=>{const b=m.view;b.object_type=this.getTableName(),this.data.savedViews.push(b),this._syncGlobalSavedViews(),this.data.activeSavedViewId=b.slug,this.data.savedViewQueryParams=b.query_params,this._resetLiveFilter(),this.data.selectedView=this.getDefaultView(),F.set(this.getTabStorageName(),b.slug),H.pushToVueUrl(null,{active_view:b.slug})}).catch(m=>{var b;B.error(((b=m.data)==null?void 0:b.message)||k("Failed to save view"))})}applySavedView(e){const i=this.data.savedViews.find(s=>s.slug===e);i&&(this.data.activeSavedViewId=e,this.data.savedViewQueryParams=i.query_params,this._resetLiveFilter(),this.data.selectedView=this.getDefaultView(),this.data.paginate.current_page=1,this.setCurrentPage(1),F.set(this.getTabStorageName(),e),H.pushToVueUrl(null,{active_view:e}),this.fetch())}updateSavedView(e){const i=this.data.savedViews.find(l=>l.slug===e);if(!i)return;const s=this._buildViewQueryParams();M.put("saved-views/"+i.id,{query_params:s}).then(l=>{i.query_params=s}).catch(l=>{var m;B.error(((m=l.data)==null?void 0:m.message)||k("Failed to update view"))})}deleteSavedView(e){const i=this.data.savedViews.find(s=>s.slug===e);i&&M.delete("saved-views/"+i.id).then(()=>{const s=this.data.savedViews.findIndex(l=>l.slug===e);s!==-1&&this.data.savedViews.splice(s,1),this._syncGlobalSavedViews(),this.data.activeSavedViewId===e&&(this.data.activeSavedViewId=null,this.data.savedViewQueryParams=null,this.data.selectedView=this.getDefaultView(),this.data.filterType="simple",this.data.advanceFilters=[[]],this.data.search="",this.data.searching=!1,F.set(this.getFilterTypeStorageName(),"simple"),F.set(this.getTabStorageName(),this.getDefaultView()),H.pushToVueUrl(null,{active_view:this.getDefaultView()}),this.fetch())}).catch(s=>{var l;B.error(((l=s.data)==null?void 0:l.message)||k("Failed to delete view"))})}renameSavedView(e,i){const s=this.data.savedViews.find(l=>l.slug===e);s&&M.put("saved-views/"+s.id,{name:i}).then(l=>{s.name=i,this._syncGlobalSavedViews()}).catch(l=>{var m;B.error(((m=l.data)==null?void 0:m.message)||k("Failed to rename view"))})}_syncGlobalSavedViews(){if(window.fluentCartAdminApp&&window.fluentCartAdminApp.table_config){const e=this.getTableName();window.fluentCartAdminApp.table_config[e]||(window.fluentCartAdminApp.table_config[e]={}),window.fluentCartAdminApp.table_config[e].saved_views=this.data.savedViews}}isColumnVisible(e){return this.data.columns.includes(e)}getSearchHint(){throw new Error("Override getSearchHint method")}getFetchUrl(){throw new Error("Override getFetchUrl method")}getTabs(){throw new Error("Override getTabs method")}getTabsCount(){const e=this.getTabs();return e?Object.keys(e).length:0}getToggleableColumns(){throw new Error("Override getToggleableColumns method")}getSortableColumns(){throw new Error("Override getSortableColumns method")}getTableName(){throw new Error("Override getTableName method")}parseResponse(e){throw new Error("Override parseResponse method")}with(){return[]}scopes(){return[]}isRouteActiveViewApplied(){return ee().query.active_view||!1}isRouteSearchApplied(){return ee().query.search||!1}guessNextPageCount(e){const{total:i,to:s,per_page:l,current_page:m,last_page:b}=e;if(m>=b)return 1;const p=i-s;return Math.max(1,Math.min(l,p))}get nextPageCount(){return this.data.nextPageCount}guessTitle(){let e=this.getTableName();return e=e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),e=e.replace(/_?table$/,""),e.split("_").map(i=>i.charAt(0).toLowerCase()+i.slice(1)).join(" ")}isFiltering(){return this.isUsingAdvanceFilter()?(this.data.advanceFilters||[]).some(e=>Array.isArray(e)&&e.length>0)?"advanced":!1:this.data.search!==""?"search":this.data.selectedView!=="all"?"tab":!1}emptyMessageFiltered(e){return e==="search"||e==="tab"?k("No %s found based on your search",this.guessTitle()):k("No %s found based on your filter",this.guessTitle())}getEmptyMessage(){return k("No %s found",this.guessTitle())}get emptyMessage(){const e=this.isFiltering();return e?this.emptyMessageFiltered(e):this.getEmptyMessage()}getCustomColumns(){return J.get(window,`fluentCartAdminApp.table_config.${this.getTableName()}.filters.columns`)||{}}}const Ge={props:{table:{type:Object,required:!1},pagerSizes:{type:Boolean,default:!0},pagination:{required:!0,type:Object},extra_sizes:{required:!1,type:Array,default(){return[]}},hide_on_single:{required:!1,type:Boolean,default(){return!0}},background:{type:Boolean,default:!0},layout:{type:String,default:"prev, pager, next, slot"},pager_count:{type:Number,default:5}},data(){return{currentPage:1,pickerObserver:null,paginationUpdating:!1}},computed:{page_sizes(){const t=[];this.pagination.per_page<10&&t.push(this.pagination.per_page);const a=[10,20,50,80,100,120,150];return[...t,...a,...this.extra_sizes]},totalPage(){const t=this.pagination.per_page,a=this.pagination.total;return isNaN(a)||a<=0?0:Math.ceil(a/t)}},watch:{pagination:{immediate:!0,handler(t,a){setTimeout(()=>{this.translatePickerElements()},400)}},"pagination.last_page":{handler(t,a){t!==a&&(this.paginationUpdating=!0,this.$nextTick(()=>{this.paginationUpdating=!1}))},flush:"sync"}},methods:{translateNumber:ie,translate:k,changePage(t){var e;if(this.paginationUpdating)return;let a=this.getCurrentPageCount(t,this.pagination.per_page);this.currentPage=t,this.pagination.current_page=t,this.$emit("currentPageChanged",{page:t,currentPageCount:a}),this.$emit("fetch"),(e=this.table)==null||e.handlePageChange(),setTimeout(()=>{this.translatePickerElements()},300)},changeSize(t){var a;this.currentPage=1,this.pagination.current_page=1,this.$emit("onPerPageChanged",t),this.$emit("fetch"),(a=this.table)==null||a.handlePerPageChange()},getCurrentPageCount(t,a){return(t<this.pagination.last_page?a:this.pagination.total%a)||a},translatePickerElements(){const t=document.querySelector(".el-pagination.is-background");if(!t)return;t.querySelectorAll("li.number").forEach(i=>{const s=i.textContent.trim();if(s&&/\d/.test(s)&&!i.dataset.translated){const l=ie(s);i.style.setProperty("--translated-number",`"${l}"`),i.dataset.translated="1"}})}},mounted(){this.translatePickerElements()}},We={class:"pagination-wrap"},Je={key:0,class:"pager-wrap"},Ye={class:"text"},Ke={class:"el-pagination"},Ze={class:"text"};function Xe(t,a,e,i,s,l){const m=y("el-option"),b=y("el-select"),p=y("el-pagination");return n(),u("div",We,[e.pagerSizes?(n(),u("div",Je,[d("span",Ye,g(l.translate("Page %1$s of %2$s",l.translateNumber(s.currentPage),l.translateNumber(l.totalPage))),1),d("div",Ke,[c(b,{onChange:l.changeSize,modelValue:e.pagination.per_page,"onUpdate:modelValue":a[0]||(a[0]=f=>e.pagination.per_page=f),placeholder:l.translate("Select")},{default:h(()=>[(n(!0),u(A,null,N(l.page_sizes,f=>(n(),C(m,{key:f,label:l.translate("%s / page",l.translateNumber(f)),value:f},null,8,["label","value"]))),128))]),_:1},8,["onChange","modelValue","placeholder"])]),d("span",Ze,g(l.translate("Total %s",l.translateNumber(e.pagination.total))),1)])):w("",!0),c(p,{ref:"paginationRef","hide-on-single-page":e.hide_on_single,background:e.background,"current-page":e.pagination.current_page,layout:e.layout,onCurrentChange:l.changePage,"page-sizes":l.page_sizes,total:e.pagination.total,"pager-count":e.pager_count,"page-size":e.pagination.per_page},{default:h(f=>[S(g(f),1)]),_:1},8,["hide-on-single-page","background","current-page","layout","onCurrentChange","page-sizes","total","pager-count","page-size"])])}const Le=q(Ge,[["render",Xe]]),et={class:"filter-popover-item"},tt={class:"filter-popover-title"},ne={__name:"ColumnVisibility",props:{table:Object},setup(t){return(a,e)=>{const i=y("el-checkbox"),s=y("el-checkbox-group"),l=y("el-tooltip"),m=y("el-popover");return n(),C(m,{trigger:"click",placement:"bottom-start",width:"240","popper-class":"filter-popover"},{reference:h(()=>[d("span",null,[c(l,{effect:"light",content:a.$t("Toggle columns"),placement:"top","popper-class":"fct-tooltip"},{default:h(()=>[c(W,{tag:"button"},{default:h(()=>[c(I,{name:"ColumnIcon"})]),_:1})]),_:1},8,["content"])])]),default:h(()=>[d("div",et,[d("h3",tt,g(a.$t("Columns")),1),c(s,{onChange:e[0]||(e[0]=()=>{t.table.handleColumnVisibilityChange()}),class:"fct-checkbox-blocks",modelValue:t.table.data.columns,"onUpdate:modelValue":e[1]||(e[1]=b=>t.table.data.columns=b)},{default:h(()=>[(n(!0),u(A,null,N(t.table.getToggleableColumns(),b=>(n(),C(i,{key:b.value,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})}}},at={class:"filter-popover-item"},lt={class:"filter-popover-title"},oe={__name:"ColumnSort",props:{table:Object},setup(t){return(a,e)=>{const i=y("el-radio"),s=y("el-radio-group"),l=y("el-radio-button"),m=y("el-tooltip"),b=y("el-popover");return n(),C(b,{trigger:"click",placement:"bottom-start",width:"240","popper-class":"filter-popover"},{reference:h(()=>[d("span",null,[c(m,{effect:"light",content:a.$t("Sort"),placement:"top","popper-class":"fct-tooltip"},{default:h(()=>[c(W,{tag:"button"},{default:h(()=>[c(I,{name:"ArrowUpDown"})]),_:1})]),_:1},8,["content"])])]),default:h(()=>[d("div",at,[d("h3",lt,g(a.$t("Sort By")),1),c(s,{onChange:e[0]||(e[0]=()=>{t.table.handleSortChange()}),class:"fct-radios-blocks",modelValue:t.table.data.sorting.sortBy,"onUpdate:modelValue":e[1]||(e[1]=p=>t.table.data.sorting.sortBy=p)},{default:h(()=>[(n(!0),u(A,null,N(t.table.getSortableColumns(),p=>(n(),C(i,{key:p.value,value:p.value,label:p.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),e[4]||(e[4]=d("hr",null,null,-1)),c(s,{onChange:e[2]||(e[2]=()=>{t.table.handleSortChange()}),size:"small",modelValue:t.table.data.sorting.sortType,"onUpdate:modelValue":e[3]||(e[3]=p=>t.table.data.sorting.sortType=p)},{default:h(()=>[c(l,{value:"ASC"},{default:h(()=>[S(g(a.$t("Ascending")),1)]),_:1}),c(l,{value:"DESC"},{default:h(()=>[S(g(a.$t("Descending")),1)]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}},it={__name:"FluidTab",props:{activeIndex:null,hasIcon:{type:Boolean,default:!1},small:{type:Boolean,default:!1}},setup(t,{expose:a}){const e=t,i=P(null),s=P(0),l=P(0),m=P(0),b=P(0),p=P(null),f=Q(()=>({left:`${s.value}px`,top:`${l.value}px`,width:`${m.value}px`,height:`${b.value}px`})),$=v=>{if(!i.value||!v)return;const T=i.value.getBoundingClientRect(),{left:U,width:E,height:z,top:_}=v.getBoundingClientRect();s.value=U-T.left,l.value=_-T.top,m.value=E,b.value=z,p.value=v},o=v=>{if(!i.value)return;const T=i.value.children;T[v]&&$(T[v])},r=()=>{G(()=>{if(!i.value)return;const v=i.value.children,T=Array.from(v).find(U=>U.classList.contains("active"));T&&$(T)})},V=v=>p.value===v;return a({setActiveByActiveClass:r,setActiveByIndex:o}),ae("setActiveItem",$),ae("isActiveItem",V),window.addEventListener("resize",()=>{p.value&&$(p.value)}),L(()=>{G(()=>{e.activeIndex?o(e.activeIndex-1):r()})}),(v,T)=>(n(),u("div",{class:O(`fct-fluid-tab ${t.hasIcon?"is-icon":""} ${t.small?"small":""}`),ref_key:"tab",ref:i},[d("div",{class:"fct-fluid-tab-active-bar",style:ye(f.value)},null,4),D(v.$slots,"default")],2))}},st={name:"FluidTabItem",props:{label:String,requiredConfirmation:{type:Boolean,default:!1},onClick:{type:Function,default:null}},inject:["setActiveItem","isActiveItem"],data(){return{isActive:!1}},mounted(){this.updateActive()},methods:{clicked(){if(this.requiredConfirmation){typeof this.onClick=="function"&&this.onClick(this.updateActive);return}this.updateActive(),this.$emit("click")},updateActive(){var t;(t=this.$refs)!=null&&t.btn&&this.setActiveItem(this.$refs.btn),this.isActive=this.isActiveItem(this.$refs.btn)}},updated(){this.isActive=this.isActiveItem(this.$refs.btn)}};function nt(t,a,e,i,s,l){return n(),u("span",{class:"fct-fluid-tab-item",onClick:a[0]||(a[0]=(...m)=>l.clicked&&l.clicked(...m)),ref:"btn"},[e.label?(n(),u(A,{key:0},[S(g(e.label),1)],64)):D(t.$slots,"default",{key:1})],512)}const re=q(st,[["render",nt]]),ot={class:"inline-flex items-center gap-1"},rt={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"opacity-40"},dt={key:0,style:{display:"flex","align-items":"center","justify-content":"space-between",width:"100%"}},ct={class:"select-label"},ut={key:0,class:"select-desc"},ht=["onClick"],mt={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"0.6"}},ft={key:1},gt={class:"select-label"},pt={class:"select-desc"},vt={__name:"FilterTabs",props:{table:Object},setup(t){const a=t,e=P(""),i=Q(()=>{const o=a.table.getTabs(),r=Object.entries(o),v=a.table.getSavedViews().map(_=>[_.slug,{title:_.name,isCustomView:!0,viewId:_.slug,description:_.description||"",is_public:_.is_public,owner_id:_.owner_id}]),T=[...r,...v];let U=T.slice(0,4);const E=Object.fromEntries(U),z=Object.fromEntries(T.filter(([_])=>!E.hasOwnProperty(_)));return{visibleTabs:E,excludedTabs:z}}),s=P(null);L(()=>{const o=a.table.getActiveSavedViewId();o&&i.value.excludedTabs.hasOwnProperty(o)?e.value=o:i.value.excludedTabs.hasOwnProperty(a.table.getSelectedTab())&&(e.value=a.table.getSelectedTab())}),_e(()=>a.table.data.activeSavedViewId,o=>{G(()=>{s.value&&(o&&i.value.excludedTabs.hasOwnProperty(o)?(e.value=o,s.value.setActiveByIndex(-1)):s.value.setActiveByActiveClass())})});const l=(o,r)=>{const V=a.table.getActiveSavedViewId();return r&&r.isCustomView?V===r.viewId:!V&&a.table.getSelectedTab()===o},m=(o,r)=>{a.table.isUsingAdvanceFilter()&&!(r&&r.isCustomView)||(r&&r.isCustomView?(a.table.applySavedView(r.viewId),i.value.excludedTabs.hasOwnProperty(r.viewId)||(e.value="")):(a.table.handleTabChanged(o),i.value.excludedTabs.hasOwnProperty(a.table.getSelectedTab())||(e.value="")))},b=o=>{const r=i.value.excludedTabs[o];r&&r.isCustomView?a.table.applySavedView(r.viewId):a.table.isUsingAdvanceFilter()||a.table.handleTabChanged(o)},p=()=>{setTimeout(()=>{const o=a.table.getActiveSavedViewId();let r=-1;if(!o){const V=Object.keys(i.value.visibleTabs).indexOf(a.table.getSelectedTab());r=V!==-1?V+1:-1}s.value.setActiveByIndex(r)},50)},f=async(o,r)=>{try{const{value:V}=await X.prompt(k("Enter a new name"),k("Rename View"),{confirmButtonText:k("Save"),cancelButtonText:k("Cancel"),inputValue:r,inputValidator:v=>!!(v!=null&&v.trim())||k("Name is required")});V&&V.trim()&&a.table.renameSavedView(o,V.trim())}catch{}},$=async o=>{try{await X.confirm(k("Are you sure you want to delete this view?"),k("Delete View"),{confirmButtonText:k("Delete"),cancelButtonText:k("Cancel"),type:"warning"}),a.table.deleteSavedView(o),e.value===o&&(e.value="")}catch{}};return(o,r)=>{const V=y("el-dropdown-item"),v=y("el-dropdown-menu"),T=y("el-dropdown"),U=y("el-tooltip"),E=y("el-option"),z=y("el-select");return n(),C(it,{class:O(t.table.isUsingAdvanceFilter()&&!t.table.getActiveSavedViewId()?"is-disabled":""),ref_key:"fluidTab",ref:s},{default:h(()=>[(n(!0),u(A,null,N(i.value.visibleTabs,(_,j)=>(n(),C(re,{key:j,class:O(l(j,_)?"active":""),onClick:()=>m(j,_)},{default:h(()=>[_&&_.isCustomView?(n(),C(U,{key:0,content:_.description||"",disabled:!_.description,placement:"top",effect:"light","popper-class":"fct-tooltip"},{default:h(()=>[d("span",ot,[d("span",null,g(_.title),1),_.is_public?(n(),u("svg",rt,r[4]||(r[4]=[d("circle",{cx:"12",cy:"12",r:"10"},null,-1),d("path",{d:"M2 12h20"},null,-1),d("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},null,-1)]))):w("",!0),t.table.isViewOwner(_)?(n(),C(T,{key:1,trigger:"click",onCommand:x=>{x==="rename"?f(_.viewId,_.title):x==="update"?t.table.updateSavedView(_.viewId):x==="delete"&&$(_.viewId)},onClick:r[1]||(r[1]=R(()=>{},["stop"]))},{dropdown:h(()=>[c(v,null,{default:h(()=>[c(V,{command:"rename"},{default:h(()=>[S(g(o.$t("Rename")),1)]),_:1}),c(V,{command:"update"},{default:h(()=>[S(g(o.$t("Update filters")),1)]),_:1}),c(V,{command:"delete",divided:""},{default:h(()=>[S(g(o.$t("Delete")),1)]),_:1})]),_:1})]),default:h(()=>[d("span",{class:"inline-flex items-center text-system-light cursor-pointer opacity-50 hover:opacity-100 dark:text-gray-400 [&_svg]:w-3 [&_svg]:h-3",onClick:r[0]||(r[0]=R(()=>{},["stop"]))},[c(I,{name:"ChevronDown"})])]),_:2},1032,["onCommand"])):w("",!0)])]),_:2},1032,["content","disabled"])):(n(),u(A,{key:1},[S(g(typeof _=="object"?_.title:_),1)],64))]),_:2},1032,["class","onClick"]))),128)),Object.keys(i.value.excludedTabs).length>0?(n(),C(re,{key:0,class:"fct-fluid-tab-select-wrap"},{default:h(()=>[c(z,{placeholder:K(k)("More views"),modelValue:e.value,"onUpdate:modelValue":r[2]||(r[2]=_=>e.value=_),onChange:b,onVisibleChange:r[3]||(r[3]=_=>{_||p()}),class:O(["w-[120px]",{active:e.value}]),"popper-class":"fct-fluid-tab-select"},{default:h(()=>[(n(!0),u(A,null,N(i.value.excludedTabs,(_,j)=>(n(),C(E,{key:j,label:typeof _=="object"?_.title:_,value:j},{default:h(()=>[_&&_.isCustomView?(n(),u("div",dt,[d("div",null,[d("div",ct,g(_.title),1),_.description?(n(),u("div",ut,g(_.description),1)):w("",!0)]),t.table.isViewOwner(_)?(n(),u("span",{key:0,style:{display:"inline-flex","align-items":"center",cursor:"pointer",padding:"2px"},onClick:R(x=>$(_.viewId),["stop"])},[(n(),u("svg",mt,r[5]||(r[5]=[d("polyline",{points:"3 6 5 6 21 6"},null,-1),d("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},null,-1)])))],8,ht)):w("",!0)])):typeof _=="object"?(n(),u("div",ft,[d("div",gt,g(_.title),1),d("div",pt,g(_.description),1)])):(n(),u(A,{key:2},[S(g(_),1)],64))]),_:2},1032,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","class"])]),_:1})):w("",!0)]),_:1},8,["class"])}}},bt={key:0,class:"fct-alert-icon"},yt={__name:"Alert",props:{type:{type:String,default:""},content:{type:String,default:""},icon:{type:String,default:""},closable:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:a}){const e=t,i=Q(()=>({"fct-alert":!0,"fct-alert-info":e.type==="info","fct-alert-success":e.type==="success","fct-alert-warning":e.type==="warning","fct-alert-error":e.type==="error"})),s=a,l=()=>{s("close")};return(m,b)=>(n(),u("div",{class:O(i.value)},[t.icon?(n(),u("div",bt,[c(I,{name:t.icon},null,8,["name"])])):w("",!0),m.$slots.content?D(m.$slots,"content",{key:1}):(n(),u(A,{key:2},[S(g(t.content),1)],64)),t.closable?(n(),u("div",{key:3,class:"fct-alert-close",onClick:l},[c(I,{name:"Cross"})])):w("",!0),D(m.$slots,"default")],2))}},_t={class:"fct-search-guide-wrap"},wt={class:"fct-search-guide-example"},Vt={class:"fct-search-guide-list"},Ct={class:"fct-search-guide-example"},St={class:"fct-search-guide-examples-list"},kt={key:0},$t=["onClick"],Tt={class:"example-query"},At={class:"click-hint"},Ft={class:"fct-search-guide-example"},xt={class:"fct-search-guide-examples-list"},Pt=["onClick"],It={class:"example-query"},Nt={class:"example-description"},Ot={key:0,class:"example-description"},Dt={key:0,class:"click-hint"},de={__name:"SearchGuide",props:{table:{type:Object,required:!0}},setup(t){const a=P(!1),e=P("examples"),i=t,s=l=>{i.table.data.search=l,i.table.search(),a.value=!1};return(l,m)=>{const b=y("el-button"),p=y("el-tag"),f=y("el-tab-pane"),$=y("el-tabs"),o=y("el-dialog");return n(),u(A,null,[c(b,{class:"fct-search-guide-btn",link:"",size:"small",onClick:m[0]||(m[0]=r=>a.value=!0)},{default:h(()=>[S(g(l.$t("Search Help")),1)]),_:1}),c(o,{modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=r=>a.value=r),title:l.$t("Search Operators Guide"),"append-to-body":!0,class:"fct-search-guide-dialog"},{default:h(()=>[d("div",_t,[d("div",wt,[d("h5",null,g(l.$t("Available Operators")),1),d("ul",Vt,[d("li",null,[c(p,{type:"info"},{default:h(()=>[S("> "+g(l.$t("Greater Than")),1)]),_:1})]),d("li",null,[c(p,{type:"info"},{default:h(()=>[S("< "+g(l.$t("Less Than")),1)]),_:1})]),d("li",null,[c(p,{type:"info"},{default:h(()=>[S(">= "+g(l.$t("Greater Than or Equal")),1)]),_:1})]),d("li",null,[c(p,{type:"info"},{default:h(()=>[S("<= "+g(l.$t("Less Than or Equal")),1)]),_:1})]),d("li",null,[c(p,{type:"info"},{default:h(()=>[S("= "+g(l.$t("Equal")),1)]),_:1})]),d("li",null,[c(p,{type:"info"},{default:h(()=>[S("!= "+g(l.$t("Not Equal")),1)]),_:1})])])]),c(yt,{icon:"InformationFill",type:"info",content:l.$t("Note: For plain text searches, simply type your query without operators. The system will search across all text fields.")},null,8,["content"]),c($,{modelValue:e.value,"onUpdate:modelValue":m[1]||(m[1]=r=>e.value=r),class:"demo-tabs"},{default:h(()=>[c(f,{label:l.$t("Examples"),name:"examples"},{default:h(()=>[d("div",Ct,[d("div",St,[(n(!0),u(A,null,N(t.table.getSearchGuideOptions(),(r,V)=>{var v;return n(),u(A,{key:V},[(v=r.examples)!=null&&v.length?(n(),u("h5",kt,g(K(k)("Field: ")+V),1)):w("",!0),(n(!0),u(A,null,N(r.examples,(T,U)=>(n(),u("div",{key:U,class:"fct-search-guide-example-item",onClick:()=>{s(T)}},[d("div",null,[d("div",Tt,g(T),1)]),d("div",At,g(l.$t("Click to try")),1)],8,$t))),128))],64)}),128))])])]),_:1},8,["label"]),c(f,{label:l.$t("Fields"),name:"fields"},{default:h(()=>[d("div",Ft,[d("div",xt,[(n(!0),u(A,null,N(t.table.getSearchGuideOptions(),(r,V)=>{var v;return n(),u("div",{key:V,class:"fct-search-guide-example-item",onClick:()=>{Array.isArray(r.examples)&&r.examples.length>0&&s(r.examples[0])}},[d("div",null,[d("div",It,g(V),1),d("div",Nt,g(r.description),1),r.note?(n(),u("div",Ot,g(r.note),1)):w("",!0)]),(v=r.examples)!=null&&v.length?(n(),u("div",Dt,g(l.$t("Click to try")),1)):w("",!0)],8,Pt)}),128))])])]),_:1},8,["label"])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue","title"])],64)}}},Ut={class:"relative"},Bt={key:0,class:"absolute top-0 left-0 w-full h-full"},Et={class:"h-full w-full"},jt={__name:"RemoteTreeSelect",props:ce({table:{type:Object,required:!0},itemConfig:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const a=t,e=ue(t,"modelValue"),i=P(""),s=P(a.itemConfig.options??[]),l=P(!1),m=async()=>{i.value.toString().length===0&&s.value.length>0||(l.value=!0,M.get("advance_filter/get-filter-options",{search:i.value,remote_data_key:a.itemConfig.remote_data_key,include_ids:e.value,limit:a.itemConfig.limit}).then(p=>{s.value=p.options}).catch(p=>{B.error(p)}).finally(()=>{l.value=!1}))},b=p=>{i.value=p,m()};return L(()=>{typeof s.value=="object"&&Object.values(s.value).length>0||m()}),(p,f)=>{const $=y("el-tree-select"),o=we("loading");return n(),u("div",Ut,[c($,{modelValue:e.value,"onUpdate:modelValue":f[0]||(f[0]=r=>e.value=r),data:s.value,multiple:"",filterable:"","check-strictly":t.itemConfig.check_strictly||!1,"show-checkbox":"","reserve-keyword":!1,"filter-method":K(xe).debounce(b,500),"render-after-expand":!0,size:"small",onChange:f[1]||(f[1]=()=>{t.table.applyAdvancedFilter()})},null,8,["modelValue","data","check-strictly","filter-method"]),l.value?(n(),u("div",Bt,[he(d("div",Et,null,512),[[o,!0]])])):w("",!0)])}}},qt={__name:"SelectItem",props:ce({table:{type:Object,required:!0},itemConfig:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const a=t,e=ue(t,"modelValue"),i=P({}),s=P(!1),l=Q(()=>a.itemConfig.remote?i.value:a.itemConfig.options||{}),m=async p=>{a.itemConfig.remote&&(s.value=!0,M.get("advance_filter/get-filter-options",{search:p,remote_data_key:a.itemConfig.remote_data_key,include_ids:e.value,limit:a.itemConfig.limit}).then(f=>{i.value=f.options}).catch(f=>{B.error(f),i.value={}}).finally(()=>{s.value=!1}))},b=()=>{a.table.applyAdvancedFilter()};return L(()=>{m("")}),(p,f)=>{const $=y("el-option"),o=y("el-select");return t.itemConfig.options||t.itemConfig.remote?(n(),C(o,{key:0,onChange:b,"remote-method":m,size:"small",modelValue:e.value,"onUpdate:modelValue":f[0]||(f[0]=r=>e.value=r),multiple:t.itemConfig.is_multiple,placeholder:K(k)("Select Option"),remote:!0,filterable:t.itemConfig.remote,"remote-show-suffix":t.itemConfig.remote,loading:s.value},{default:h(()=>[(n(!0),u(A,null,N(l.value,(r,V)=>(n(),C($,{key:V,value:V,label:r},null,8,["value","label"]))),128))]),_:1},8,["modelValue","multiple","placeholder","filterable","remote-show-suffix","loading"])):w("",!0)}}},zt={name:"FilterItem",props:["item","filterLabels","table"],components:{SelectItem:qt,RemoteTreeSelect:jt,DynamicIcon:I,IconButton:W},data(){return{}},computed:{operatorOptionsNative(){var s,l,m;const t=((s=this.itemConfig)==null?void 0:s.type)||"text",a=(l=this.itemConfig)==null?void 0:l.filter_type,e=(m=this.itemConfig)==null?void 0:m.operators;if(a==="custom"&&e)return e;const i={text:{"=":this.$t("Equal"),"!=":this.$t("Doesn't equal"),contains:this.$t("Includes"),not_contains:this.$t("Doesn't includes")},numeric:{">":this.$t("Greater Than"),"<":this.$t("Less Than"),"=":this.$t("Equal"),"!=":this.$t("Doesn't equal")},remote_tree_select:{contains:this.$t("Includes"),not_contains:this.$t("Doesn't includes")},dates:{before:this.$t("Before"),after:this.$t("After"),date_equal:this.$t("At the date"),days_before:this.$t("Days before"),days_within:this.$t("Within days")}};return t==="selections"?this.itemConfig.is_multiple?{in:{title:this.$t("Includes any of"),description:this.$t("At least one matches")},in_all:{title:this.$t("Includes all of"),description:this.$t("All must match")},not_in:{title:this.$t("Exclude if any"),description:this.$t("Exclude if one matches")},not_in_all:{title:this.$t("Exclude if all"),description:this.$t("Exclude only if all match")}}:this.itemConfig.is_only_in?{in:this.$t("Includes in")}:{"=":this.$t("Is"),"!=":this.$t("Is Not")}:J.get(i,t,{})},operatorOptions(){return this.operatorOptionsNative},itemConfig(){const t=this.item.source.join("-");return this.filterLabels[t]||{}}},methods:{removeItem(){this.$emit("removeItem")},getProviderLabel(t){return t?(t=t.replace(/_/g," ").replace(/-/g," "),t.charAt(0).toUpperCase()+t.slice(1)):""},operatorSelected(t){!t&&this.item.operator&&setTimeout(()=>{jQuery(this.$el).find(".fct-filter-value input").focus()},200)},applyFilter(){setTimeout(()=>{this.table.applyAdvancedFilter()},200)}},mounted(){if(!this.item.operator){const t=Object.keys(this.operatorOptions);t.length&&(this.item.operator=t[0],jQuery(this.$el).find(".fct-filter-value input").focus(),jQuery(this.$el).find(".fct-filter-operator .el-select").trigger("click"))}}},Mt={class:"w-[250px] fct-filter-label"},Rt={class:"fct-filter-operator w-[190px]"},Qt={key:0,class:"fct-operator-description p-2"},Ht={style:{"padding-left":"8px"}},Gt={class:"fct-filter-value"},Wt={class:"w-[40px] text-right fct-filter-action"};function Jt(t,a,e,i,s,l){const m=y("el-option"),b=y("el-select"),p=y("el-input"),f=y("el-date-picker"),$=y("SelectItem"),o=y("RemoteTreeSelect"),r=y("DynamicIcon"),V=y("IconButton");return n(),u("tr",null,[d("td",Mt,[S(g(l.getProviderLabel(l.itemConfig.provider))+" ",1),a[8]||(a[8]=d("span",{class:"fct-provider-separator"},"/",-1)),S(" "+g(l.itemConfig.label),1)]),d("td",Rt,[c(b,{size:"small",placeholder:t.$t("Select Operator"),modelValue:e.item.operator,"onUpdate:modelValue":a[0]||(a[0]=v=>e.item.operator=v),onVisibleChange:l.operatorSelected,onChange:a[1]||(a[1]=()=>{const v=typeof e.item.value=="object"?Object.values(e.item.value):e.item.value;(Array.isArray(v)&&v>0||v.toString().length>0)&&e.table.applyAdvancedFilter()})},{default:h(()=>[(n(!0),u(A,null,N(l.operatorOptions,(v,T)=>(n(),u(A,{key:T},[typeof v=="string"?(n(),C(m,{key:0,value:T,label:v},null,8,["value","label"])):(n(),C(m,{key:1,style:{height:"auto"},value:T,label:v.title},{default:h(()=>[v.description?(n(),u("p",Qt,[d("span",null,[S(g(v.title)+" ",1),a[9]||(a[9]=d("br",null,null,-1)),d("span",Ht,"- "+g(v.description),1)])])):w("",!0)]),_:2},1032,["value","label"]))],64))),128))]),_:1},8,["placeholder","modelValue","onVisibleChange"])]),d("td",Gt,[!l.itemConfig.type||l.itemConfig.type==="text"?(n(),C(p,{key:0,size:"small",placeholder:t.$t("Condition Value"),type:"text",modelValue:e.item.value,"onUpdate:modelValue":a[2]||(a[2]=v=>e.item.value=v),onKeydown:Y(l.applyFilter,["enter"])},null,8,["placeholder","modelValue","onKeydown"])):l.itemConfig.type==="numeric"?(n(),C(p,{key:1,size:"small",type:"number",placeholder:t.$t("Condition Value"),modelValue:e.item.value,"onUpdate:modelValue":a[3]||(a[3]=v=>e.item.value=v),onKeydown:Y(l.applyFilter,["enter"])},null,8,["placeholder","modelValue","onKeydown"])):l.itemConfig.type==="dates"?(n(),u(A,{key:2},[e.item.operator==="days_before"||e.item.operator==="days_within"?(n(),C(p,{key:0,size:"small",type:"number",placeholder:t.$t("Days"),modelValue:e.item.value,"onUpdate:modelValue":a[4]||(a[4]=v=>e.item.value=v),onKeydown:Y(l.applyFilter,["enter"])},null,8,["placeholder","modelValue","onKeydown"])):e.item.operator?(n(),C(f,{key:1,onChange:l.applyFilter,type:"datetime","value-format":"YYYY-MM-DDTHH:mm:ssZ",size:"small",modelValue:e.item.value,"onUpdate:modelValue":a[5]||(a[5]=v=>e.item.value=v)},null,8,["onChange","modelValue"])):w("",!0)],64)):w("",!0),l.itemConfig.type==="selections"?(n(),C($,{key:3,table:e.table,"item-config":l.itemConfig,modelValue:e.item.value,"onUpdate:modelValue":a[6]||(a[6]=v=>e.item.value=v)},null,8,["table","item-config","modelValue"])):w("",!0),l.itemConfig.type==="remote_tree_select"?(n(),C(o,{key:4,table:e.table,"item-config":l.itemConfig,modelValue:e.item.value,"onUpdate:modelValue":a[7]||(a[7]=v=>e.item.value=v)},null,8,["table","item-config","modelValue"])):w("",!0)]),d("td",Wt,[c(V,{onClick:l.removeItem,size:"x-small",bg:"info",tag:"button"},{default:h(()=>[c(r,{name:"Delete"})]),_:1},8,["onClick"])])])}const Yt=q(zt,[["render",Jt]]),Kt={name:"_CascaderPanel",props:{options:{type:Array,required:!0},modelValue:{type:Array,default:()=>[]}},components:{TransitionAccordion:me},emits:["update:modelValue","change"],data(){return{openPanel:null}},methods:{toggleOpen(t){this.openPanel=this.openPanel===t?null:t},selectOption(t,a){const e=[t,a];this.$emit("update:modelValue",e),this.$emit("change",e),this.openPanel=null}}},Zt={class:"fct-cascader-panel"},Xt=["onClick"],Lt={class:"fct-cascader-content"},ea=["onClick"];function ta(t,a,e,i,s,l){const m=y("TransitionAccordion");return n(),u("div",Zt,[(n(!0),u(A,null,N(e.options,b=>(n(),u("div",{key:b.value,class:"fct-cascader-option"},[d("div",{class:"fct-cascader-button",onClick:p=>l.toggleOpen(b.value)},g(b.label),9,Xt),c(m,{visible:s.openPanel===b.value},{default:h(()=>[he(d("ul",Lt,[(n(!0),u(A,null,N(b.children,p=>(n(),u("li",{class:"fct-cascader-item",key:p.value,onClick:f=>l.selectOption(b.value,p.value)},g(p.label),9,ea))),128))],512),[[Ve,s.openPanel===b.value]])]),_:2},1032,["visible"])]))),128))])}const aa=q(Kt,[["render",ta]]),la={class:"fct-advanced-filters"},ia={key:0,class:"w-full"},sa={class:"fct-advanced-filter-intro"},na={class:"fct-cascader-panel-wrap"},oa={class:"px-2"},ra={__name:"_Filters",props:{table:{required:!0},items:{type:Array,default:()=>[]},filtersLength:{type:Number},filterOptions:{type:Array,default:()=>[]},filterIndex:{type:Number,required:!0}},setup(t){const a=t,e=P(null),i=P([]),s=P(!1),l=Q(()=>{const p={};return a.filterOptions.forEach(f=>{f.children&&f.children.forEach($=>{p[`${f.value}-${$.value}`]={provider:f.value,...$}})}),p}),m=p=>{if(i.value.length===2){const f=a.filterOptions.find(o=>o.value===p[0]),$=f==null?void 0:f.children.find(o=>o.value===p[1]);$&&(a.items.push({source:[...i.value],filter_type:$.filter_type,operator:"",value:"",column:$.column,relation:$.relation}),s.value=!1,G(()=>{e.value&&e.value.hide()}),i.value=[])}},b=p=>{G(()=>{a.items.splice(p,1),a.table.applyAdvancedFilter(!0)})};return(p,f)=>{const $=y("el-cascader-panel"),o=y("el-button"),r=y("el-popover");return n(),u("div",la,[t.items.length?(n(),u("table",ia,[d("tbody",null,[(n(!0),u(A,null,N(t.items,(V,v)=>(n(),C(Yt,{table:t.table,key:v,filterLabels:l.value,item:V,onRemoveItem:T=>b(v)},null,8,["table","filterLabels","item","onRemoveItem"]))),128))])])):w("",!0),d("div",sa,[c(r,{placement:"right",width:"450","popper-class":"fct-advanced-filter-popover",trigger:"click",ref_key:"popoverRef",ref:e},{reference:h(()=>[c(o,{class:"el-button--x-small"},{default:h(()=>[c(I,{name:"Plus"}),S(" "+g(p.$t("Add")),1)]),_:1})]),default:h(()=>[d("div",na,[c(aa,{options:t.filterOptions,modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=V=>i.value=V),onChange:m},null,8,["options","modelValue"]),c($,{style:{width:"100%"},options:t.filterOptions,modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=V=>i.value=V),onChange:m},null,8,["options","modelValue"])])]),_:1},512),d("span",oa,g(p.$t("Add new properties")),1),t.items.length===0?(n(),C(W,{key:0,onClick:f[2]||(f[2]=()=>{t.table.removeAdvanceFilterGroup(t.filterIndex)}),class:"float-end",size:"x-small",bg:"info",tag:"button",disabled:t.filtersLength<=1},{default:h(()=>[c(I,{name:"Delete"})]),_:1},8,["disabled"])):w("",!0)])])}}},da={class:"fct-advanced-filter-container"},ca={class:"fct-advanced-filter-wrap"},ua={key:0,class:"fct-condition-or-wrap"},ha={class:"fct-condition-or"},ma={class:"fct-condition-or-wrap"},fa={class:"fct-advanced-filter-footer justify-end"},ga={__name:"AdvancedFilter",props:{table:Object},setup(t){const a=t,e=Q(()=>(a.table.data.advanceFilters||[]).some(s=>Array.isArray(s)&&s.length>0)),i=()=>{a.table.promptAndSaveView()};return(s,l)=>{const m=y("el-button");return n(),C(me,{visible:t.table.isUsingAdvanceFilter()},{default:h(()=>[d("div",da,[d("div",ca,[(n(!0),u(A,null,N(t.table.data.advanceFilters,(b,p)=>(n(),u("div",{class:"fct-advanced-filter",key:p},[c(ra,{filterIndex:p,table:t.table,items:b,filtersLength:t.table.data.advanceFilters.length,filterOptions:t.table.getAdvanceFilterOptions()},null,8,["filterIndex","table","items","filtersLength","filterOptions"]),p<t.table.data.advanceFilters.length-1?(n(),u("div",ua,[d("div",ha,g(s.$t("or")),1)])):w("",!0)]))),128))]),d("div",ma,[d("div",{class:"fct-condition-or",onClick:l[0]||(l[0]=b=>t.table.addAdvanceFilterGroup())},[c(I,{name:"Plus"}),S(" "+g(s.$t("or")),1)])]),d("div",fa,[c(m,{onClick:l[1]||(l[1]=()=>t.table.clearAdvanceFilter()),text:"",class:"el-button--x-small"},{default:h(()=>[S(g(s.$t("Reset")),1)]),_:1}),c(m,{onClick:l[2]||(l[2]=()=>t.table.applyAdvancedFilter()),type:"primary",class:"el-button--x-small"},{default:h(()=>[S(g(s.$t("Apply")),1)]),_:1}),c(m,{onClick:i,text:"",class:"el-button--x-small",disabled:!e.value},{default:h(()=>[c(I,{name:"Plus"}),S(" "+g(s.$t("Save as view")),1)]),_:1},8,["disabled"])])])]),_:1},8,["visible"])}}},pa={class:"fct-filter-tabs-mobile"},va={key:0},ba={class:"select-label"},ya={class:"select-desc"},_a={class:"flex items-center justify-between w-full"},wa={class:"text-sm text-system-dark dark:text-gray-50"},Va=["onClick"],Ca={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"0.6"}},Sa={__name:"FilterTabsMobile",props:{table:Object},setup(t){const a=t,e=async l=>{try{await X.confirm(k("Are you sure you want to delete this view?"),k("Delete View"),{confirmButtonText:k("Delete"),cancelButtonText:k("Cancel"),type:"warning"}),a.table.deleteSavedView(l)}catch{}},i=Q({get(){const l=a.table.getActiveSavedViewId();return l||a.table.getSelectedTab()},set(){}}),s=l=>{a.table.getSavedViews().some(b=>b.slug===l)?a.table.applySavedView(l):a.table.isUsingAdvanceFilter()||a.table.handleTabChanged(l)};return(l,m)=>{const b=y("el-option"),p=y("el-select");return n(),u("div",pa,[c(p,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=f=>i.value=f),onChange:m[1]||(m[1]=f=>{s(f)}),"popper-class":"fct-fluid-tab-select",size:"small"},{default:h(()=>[(n(!0),u(A,null,N(t.table.getTabs(),(f,$)=>(n(),C(b,{key:$,label:f.title||f,value:$},{default:h(()=>[typeof f=="object"?(n(),u("div",va,[d("div",ba,g(f.title),1),d("div",ya,g(f.description),1)])):(n(),u(A,{key:1},[S(g(f),1)],64))]),_:2},1032,["label","value"]))),128)),(n(!0),u(A,null,N(t.table.getSavedViews(),f=>(n(),C(b,{key:f.slug,label:f.name,value:f.slug},{default:h(()=>[d("div",_a,[d("span",wa,g(f.name),1),t.table.isProActive()&&t.table.isViewOwner(f)?(n(),u("span",{key:0,style:{display:"inline-flex","align-items":"center",cursor:"pointer",padding:"2px"},onClick:R($=>e(f.slug),["stop"])},[(n(),u("svg",Ca,m[2]||(m[2]=[d("polyline",{points:"3 6 5 6 21 6"},null,-1),d("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},null,-1)])))],8,Va)):w("",!0)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])}}},ka={class:"fct-card"},$a={class:"fct-card-header-top"},Ta={class:"fct-card-header-left flex-1"},Aa={class:"fct-mobile-header-actions md:hidden"},Fa={class:"fct-btn-group sm"},xa={key:1},Pa={class:"flex items-center justify-between pt-1"},Ia={class:"text-xs text-system-light dark:text-gray-300"},Na={class:"fct-card-header-actions"},Oa={key:0,class:"fct-advanced-filter-toggle-wrapper"},Da={class:"fct-btn-group sm hidden md:flex"},Ua={key:0,class:"filter-search-wrap"},Ba={class:"search-bar"},Ea={class:"flex items-center justify-between pt-2"},ja={class:"text-xs text-system-light dark:text-gray-300"},qa={class:"fct-card-body"},za={class:"fct-table-wrapper-inner"},Ma={key:0,class:"block md:hidden"},Ra={class:"flex items-center gap-2"},Qa={class:"text-sm text-system-mid dark:text-gray-300"},Ha={class:"dialog-footer"},Cl={__name:"TableWrapper",props:{table:Object,classicTabStyle:!1,hasMobileSlot:!1},setup(t){const a=t,e=Ce("search-input"),i=()=>{a.table.openSearch(),G(()=>{e.value.focus()})},s=Se({name:"",description:"",is_public:!1}),l=()=>{s.name="",s.description="",s.is_public=!1,a.table.promptAndSaveView()},m=o=>{o.style.overflow="hidden",o.style.height="auto",o.style.visibility="hidden",o.style.position="absolute"},b=(o,r)=>{const V=o.scrollHeight+"px";o.style.position="",o.style.visibility="",o.style.height="0",o.style.paddingTop="0",o.style.opacity="0",o.offsetHeight,o.style.transition="height 0.25s ease, padding-top 0.25s ease, opacity 0.25s ease",o.style.height=V,o.style.paddingTop="",o.style.opacity="1",o.addEventListener("transitionend",()=>{o.style.height="",o.style.overflow="",o.style.transition="",r()},{once:!0})},p=o=>{o.style.height=o.scrollHeight+"px",o.style.overflow="hidden",o.offsetHeight},f=(o,r)=>{o.style.transition="height 0.25s ease, padding-top 0.25s ease, opacity 0.25s ease",o.style.height="0",o.style.paddingTop="0",o.style.opacity="0",o.addEventListener("transitionend",()=>{o.style.height="",o.style.paddingTop="",o.style.overflow="",o.style.transition="",r()},{once:!0})},$=()=>{if(!s.name||!s.name.trim()){B.error(k("Name is required"));return}if(s.name.trim().length>50){B.error(k("Name must be 50 characters or fewer"));return}const o=a.table.saveCurrentView(s.name.trim(),s.description.trim(),s.is_public);o&&o.then&&o.then(()=>{a.table.data.showSaveViewDialog=!1})};return(o,r)=>{var j;const V=y("el-tooltip"),v=y("el-input"),T=y("el-button"),U=y("el-switch"),E=y("el-form-item"),z=y("el-form"),_=y("el-dialog");return n(),u("div",{class:O(["fct-table-wrapper",t.hasMobileSlot?"fct-table-wrapper-mobile":""])},[d("div",ka,[d("div",{class:O(["fct-card-header",t.table.useFullWidthSearch()?"is-full-width-search":""])},[d("div",$a,[d("div",Ta,[t.table.getTabsCount()&&!t.table.isUsingAdvanceFilter()?(n(),C(vt,{key:0,class:O(`hide-animation-on-mobile hidden md:inline-flex ${t.classicTabStyle?"classic-tab-style":""}`),table:t.table},null,8,["class","table"])):w("",!0),d("div",Aa,[t.table.getTabsCount()&&!t.table.isUsingAdvanceFilter()?(n(),C(Sa,{key:0,table:t.table},null,8,["table"])):w("",!0),d("div",Fa,[!t.table.isSearching()&&!t.table.useFullWidthSearch()?(n(),C(V,{key:0,effect:"light",content:o.$t("Search"),placement:"top","popper-class":"fct-tooltip"},{default:h(()=>[c(W,{tag:"button",onClick:R(i,["prevent"]),disabled:!t.table.isUsingSimpleFilter()},{default:h(()=>[c(I,{name:"Search"})]),_:1},8,["disabled"])]),_:1},8,["content"])):w("",!0),t.table.getToggleableColumns().length?(n(),C(ne,{key:1,table:t.table},null,8,["table"])):w("",!0),t.table.getSortableColumns().length?(n(),C(oe,{key:2,table:t.table},null,8,["table"])):w("",!0)])]),t.table.useFullWidthSearch()&&!t.table.isUsingAdvanceFilter()?(n(),u("div",xa,[d("div",{class:O(`search-bar is-transparent ${t.table.isUsingAdvanceFilter()?"is-unable-advanced-filter":""}`)},[c(v,{placeholder:o.$t("Search"),ref:"search-input",onClear:r[0]||(r[0]=()=>{t.table.search()}),onKeyup:r[1]||(r[1]=Y(()=>{t.table.search()},["enter"])),modelValue:t.table.data.search,"onUpdate:modelValue":r[2]||(r[2]=x=>t.table.data.search=x),type:"text",clearable:""},{prefix:h(()=>[c(I,{name:"Search"})]),_:1},8,["placeholder","modelValue"])],2),d("div",Pa,[d("div",Ia,[S(g(t.table.getSearchHint())+" ",1),(j=t.table.getSearchGuideOptions())!=null&&j.length?(n(),C(de,{key:0,table:t.table},null,8,["table"])):w("",!0)]),c(T,{text:"",class:"el-button--x-small",onClick:l,disabled:!t.table.data.search},{default:h(()=>[c(I,{name:"Plus"}),S(" "+g(o.$t("Save as view")),1)]),_:1},8,["disabled"])])])):w("",!0)]),d("div",Na,[t.table.isAdvanceFilterEnabled()?(n(),u("div",Oa,[c(U,{class:"fct-advanced-filter-toggle",onChange:r[3]||(r[3]=x=>{t.table.onFilterTypeChanged(x)}),"active-value":"advanced","inactive-value":"simple",modelValue:t.table.data.filterType,"onUpdate:modelValue":r[4]||(r[4]=x=>t.table.data.filterType=x),"active-text":o.$t("Advanced Filter"),size:"small"},null,8,["modelValue","active-text"])])):w("",!0),d("div",Da,[!t.table.isSearching()&&!t.table.useFullWidthSearch()?(n(),C(V,{key:0,effect:"light",content:o.$t("Search"),placement:"top","popper-class":"fct-tooltip"},{default:h(()=>[c(W,{tag:"button",onClick:R(i,["prevent"]),disabled:!t.table.isUsingSimpleFilter()},{default:h(()=>[c(I,{name:"Search"})]),_:1},8,["disabled"])]),_:1},8,["content"])):w("",!0),t.table.getToggleableColumns().length?(n(),C(ne,{key:1,table:t.table},null,8,["table"])):w("",!0),t.table.getSortableColumns().length?(n(),C(oe,{key:2,table:t.table},null,8,["table"])):w("",!0)])])]),c(ga,{table:t.table},null,8,["table"]),c(ke,{css:!1,onBeforeEnter:m,onEnter:b,onBeforeLeave:p,onLeave:f},{default:h(()=>[t.table.isSearching()&&!t.table.useFullWidthSearch()?(n(),u("div",Ua,[d("div",Ba,[c(v,{ref:"search-input",onClear:r[5]||(r[5]=()=>{t.table.search()}),onKeyup:r[6]||(r[6]=Y(()=>{t.table.search()},["enter"])),modelValue:t.table.data.search,"onUpdate:modelValue":r[7]||(r[7]=x=>t.table.data.search=x),type:"text",placeholder:o.$t("Search"),clearable:""},{prefix:h(()=>[c(I,{name:"Search"})]),_:1},8,["modelValue","placeholder"]),d("div",Ea,[d("div",ja,[S(g(t.table.getSearchHint())+" ",1),c(de,{table:t.table},null,8,["table"])]),c(T,{text:"",class:"el-button--x-small",onClick:l,disabled:!t.table.data.search},{default:h(()=>[c(I,{name:"Plus"}),S(" "+g(o.$t("Save as view")),1)]),_:1},8,["disabled"])])]),c(T,{text:"",onClick:r[8]||(r[8]=()=>{t.table.closeSearch()})},{default:h(()=>[S(g(o.$t("Cancel")),1)]),_:1})])):w("",!0)]),_:1})],2),d("div",qa,[d("div",za,[d("div",{class:O({"hidden md:block":t.hasMobileSlot,block:!t.hasMobileSlot})},[D(o.$slots,"default")],2),t.hasMobileSlot?(n(),u("div",Ma,[D(o.$slots,"mobile")])):w("",!0),c(Le,{table:t.table,hide_on_single:!1,pagination:t.table.data.paginate},null,8,["table","pagination"])])])]),c(_,{modelValue:t.table.data.showSaveViewDialog,"onUpdate:modelValue":r[13]||(r[13]=x=>t.table.data.showSaveViewDialog=x),title:o.$t("Save View"),width:"420px","close-on-click-modal":!1,"append-to":"#fct_admin_app_wrapper"},{footer:h(()=>[d("div",Ha,[c(T,{onClick:r[12]||(r[12]=x=>t.table.data.showSaveViewDialog=!1)},{default:h(()=>[S(g(o.$t("Cancel")),1)]),_:1}),c(T,{type:"primary",onClick:$},{default:h(()=>[S(g(o.$t("Save")),1)]),_:1})])]),default:h(()=>[c(z,{"label-position":"top",onSubmit:R($,["prevent"])},{default:h(()=>[c(E,{label:o.$t("Name")},{default:h(()=>[c(v,{modelValue:s.name,"onUpdate:modelValue":r[9]||(r[9]=x=>s.name=x),placeholder:o.$t("View name"),maxlength:"50"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c(E,{label:o.$t("Description")},{default:h(()=>[c(v,{modelValue:s.description,"onUpdate:modelValue":r[10]||(r[10]=x=>s.description=x),placeholder:o.$t("Optional description"),type:"textarea",rows:2},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c(E,null,{default:h(()=>[d("div",Ra,[c(U,{modelValue:s.is_public,"onUpdate:modelValue":r[11]||(r[11]=x=>s.is_public=x),size:"small"},null,8,["modelValue"]),d("span",Qa,g(o.$t("Make public (visible to all users)")),1)])]),_:1})]),_:1})]),_:1},8,["modelValue","title"])],2)}}},Ga={class:"table-cell"},Sl={__name:"RouteCell",props:{to:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(t){const a=t;return $e(),(e,i)=>{const s=y("router-link");return n(),C(s,{class:"link block cursor-pointer route-cell",to:a.to},{default:h(()=>[d("div",Ga,[D(e.$slots,"default")])]),_:3},8,["to"])}}},Wa={name:"Card",props:{border:{type:Boolean}}};function Ja(t,a,e,i,s,l){return n(),u("div",{class:O(`fct-card ${e.border?"fct-card-border":""}`)},[D(t.$slots,"default")],2)}const kl=q(Wa,[["render",Ja]]),Ya={name:"CardHeader",components:{DynamicIcon:I},props:{title:{type:String},text:{type:String},border_bottom:{type:Boolean},icon:{type:String},title_size:{type:String},img:{type:String}}},Ka={key:0,class:"flex-1"},Za=["src"],Xa={key:1,class:"fct-card-header-text"},La={key:1,class:"fct-card-header-actions"};function el(t,a,e,i,s,l){const m=y("dynamic-icon");return n(),u("div",{class:O(`fct-card-header ${e.border_bottom?"border-bottom":""}`)},[e.title||e.text||t.$slots.title?(n(),u("div",Ka,[e.title||e.text?(n(),u(A,{key:0},[e.title?(n(),u("h2",{key:0,class:O(`fct-card-header-title ${e.title_size?"is-"+e.title_size:""}`)},[e.icon?(n(),C(m,{key:0,name:e.icon},null,8,["name"])):w("",!0),e.img?(n(),u("img",{key:1,src:e.img,alt:""},null,8,Za)):w("",!0),S(" "+g(e.title),1)],2)):w("",!0),e.text?(n(),u("p",Xa,g(e.text),1)):w("",!0)],64)):w("",!0),t.$slots.title?D(t.$slots,"title",{key:1}):w("",!0)])):w("",!0),t.$slots.action?(n(),u("div",La,[D(t.$slots,"action")])):w("",!0),D(t.$slots,"default")],2)}const $l=q(Ya,[["render",el]]),tl={name:"CardBody"},al={class:"fct-card-body"};function ll(t,a,e,i,s,l){return n(),u("div",al,[D(t.$slots,"default")])}const Tl=q(tl,[["render",ll]]);export{$l as C,re as F,Ee as P,Vl as T,Sl as _,Cl as a,it as b,Tl as c,kl as d,yt as e,Le as f,vt as g,ga as h,se as m};
1 +import{c as u,o,w as b,d as h,m as r,r as f,e as s,n as l,b as a,F as $,f as k,t as m}from"./vue.esm-bundler.js?ver=1.6.6";import{u as p}from"./vue-router.js?ver=1.6.6";import{_ as d}from"./_plugin-vue_export-helper.js?ver=1.6.6";import{_ as C}from"./DynamicIcon.js?ver=1.6.6";const g={class:"table-cell"},q={__name:"RouteCell",props:{to:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(e){const n=e;return p(),(t,i)=>{const c=f("router-link");return o(),u(c,{class:"link block cursor-pointer route-cell",to:n.to},{default:b(()=>[h("div",g,[r(t.$slots,"default")])]),_:3},8,["to"])}}},B={name:"Card",props:{border:{type:Boolean}}};function v(e,n,t,i,c,_){return o(),s("div",{class:l(`fct-card ${t.border?"fct-card-border":""}`)},[r(e.$slots,"default")],2)}const E=d(B,[["render",v]]),S={name:"CardHeader",components:{DynamicIcon:C},props:{title:{type:String},text:{type:String},border_bottom:{type:Boolean},icon:{type:String},title_size:{type:String},img:{type:String}}},x={key:0,class:"flex-1"},z=["src"],D={key:1,class:"fct-card-header-text"},I={key:1,class:"fct-card-header-actions"};function N(e,n,t,i,c,_){const y=f("DynamicIcon");return o(),s("div",{class:l(`fct-card-header ${t.border_bottom?"border-bottom":""}`)},[t.title||t.text||e.$slots.title?(o(),s("div",x,[t.title||t.text?(o(),s($,{key:0},[t.title?(o(),s("h2",{key:0,class:l(`fct-card-header-title ${t.title_size?"is-"+t.title_size:""}`)},[t.icon?(o(),u(y,{key:0,name:t.icon},null,8,["name"])):a("",!0),t.img?(o(),s("img",{key:1,src:t.img,alt:""},null,8,z)):a("",!0),k(" "+m(t.title),1)],2)):a("",!0),t.text?(o(),s("p",D,m(t.text),1)):a("",!0)],64)):a("",!0),e.$slots.title?r(e.$slots,"title",{key:1}):a("",!0)])):a("",!0),e.$slots.action?(o(),s("div",I,[r(e.$slots,"action")])):a("",!0),r(e.$slots,"default")],2)}const T=d(S,[["render",N]]),V={name:"CardBody"},j={class:"fct-card-body"};function w(e,n,t,i,c,_){return o(),s("div",j,[r(e.$slots,"default")])}const A=d(V,[["render",w]]);export{T as C,q as _,A as a,E as b};