@feedmepos/ui-library 1.1.17 → 1.1.18
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.
- package/dist/CHANGELOG.md +6 -0
- package/dist/components/avatar/FmAvatar.vue.d.ts +7 -2
- package/dist/components.d.ts +12 -3
- package/dist/federation/FmAvatar.vue_vue_type_script_setup_true_lang-CHzAQ9YF.js +1 -0
- package/dist/federation/{__federation_expose_FmAvatar-CH91syIa.js → __federation_expose_FmAvatar-Dll-Jwx4.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/{index-6cIJHM2F.js → index-CoP6TxX6.js} +1 -1
- package/dist/federation/index-DjDZsjW6.css +1 -0
- package/dist/feedmepos-ui-library.js +12 -2
- package/dist/feedmepos-ui-library.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmAvatar.vue_vue_type_script_setup_true_lang-BN8lgh_x.js +0 -1
- package/dist/federation/index-CxfwNWLp.css +0 -1
|
@@ -51,7 +51,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
51
51
|
* LICENSE.md file in the root directory of this source tree.
|
|
52
52
|
*
|
|
53
53
|
* @license MIT
|
|
54
|
-
*/function lV(){return!0}const Mut=Symbol("merge-proxy"),Lut={get(i,s,o){return s===Mut?o:i.get(s)},has(i,s){return i.has(s)},set:lV,deleteProperty:lV,getOwnPropertyDescriptor(i,s){return{configurable:!0,enumerable:!0,get(){return i.get(s)},set:lV,deleteProperty:lV}},ownKeys(i){return i.keys()}};function rte(i){return"value"in i?i.value:i}function uV(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return new Proxy({get(u){for(let f=s.length-1;f>=0;f--){const m=rte(s[f])[u];if(m!==void 0)return m}},has(u){for(let f=s.length-1;f>=0;f--)if(u in rte(s[f]))return!0;return!1},keys(){const u=[];for(let f=0;f<s.length;f++)u.push(...Object.keys(rte(s[f])));return[...Array.from(new Set(u))]}},Lut)}const fV=h.defineComponent({props:["render","props"],setup:i=>()=>typeof i.render=="function"||typeof i.render=="object"?h.h(i.render,i.props):i.render});function Rut(i){const s=uV({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(f,m){return uV(f,m)}},i),o=Eut(s),u=h.ref(o.initialState);return h.watchEffect(()=>{o.setOptions(f=>{var m;const y=new Proxy({},{get:(x,E)=>u.value[E]});return uV(f,i,{state:uV(y,(m=i.state)!=null?m:{}),onStateChange:x=>{x instanceof Function?u.value=x(u.value):u.value=x,i.onStateChange==null||i.onStateChange(x)}})})}),o}const $ut=["checked","disabled","indeterminate"],ATe=Au(h.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(i){const s=i,o=h.computed(()=>s.indeterminate&&!s.checked?"remove":s.checked?"check_small":"");return(u,f)=>(h.openBlock(),h.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:f[0]||(f[0]=h.withModifiers((...m)=>u.onChange&&u.onChange(...m),["stop"]))},[h.createElementVNode("input",{checked:u.checked,class:h.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":u.checked}),disabled:u.disabled,indeterminate:u.indeterminate,type:"checkbox"},null,10,$ut),u.indeterminate||u.checked?(h.openBlock(),h.createBlock(Wo,{key:0,name:o.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):h.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),But={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},NTe=h.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(i){const o=Ml(i,"modelValue"),u=h.ref(!1);return(f,m)=>(h.openBlock(),h.createBlock(nx,{onMenuChanged:m[0]||(m[0]=y=>u.value=y)},{"menu-button":h.withCtx(()=>{var y;return[h.createVNode(gl,{variant:"tertiary",label:(y=f.items.find(x=>x.value===f.modelValue))==null?void 0:y.label,size:"md",icon:u.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":h.withCtx(()=>[h.createElementVNode("div",But,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.items,y=>(h.openBlock(),h.createBlock(ig,{key:y.value,"model-value":y.value===h.unref(o),label:y.label,value:y.value,"onUpdate:modelValue":x=>o.value=y.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),Vut={class:"overflow-y-auto"},jut={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},zut=h.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),Jut=["onClick"],Uut={key:0},qut={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},Wut={key:1,class:"w-full"},Hut={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},Gut=h.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),Yut=["onClick"],Xut={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},Qut={class:"flex gap-8 items-center"},Zut=h.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),Kut={class:"flex gap-8"},eft=h.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean}},setup(i){const s=i,o=Ml(s,"modelValue"),u=Ml(s,"searchValue"),f=h.ref(s.rowData),m=()=>{let De=s.columnDefs;return s.selection&&(De=[{id:"row-selection",header:({table:$e})=>h.createVNode(ATe,{checked:$e.getIsAllPageRowsSelected(),indeterminate:$e.getIsSomePageRowsSelected(),onChange:$e.getToggleAllPageRowsSelectedHandler()},null),cell:({row:$e})=>h.createVNode(ATe,{checked:$e.getIsSelected(),disabled:!$e.getCanSelect(),onChange:$e.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...De]),De},y=h.ref([]);h.watch(()=>s.rowData,De=>{f.value=[...De]},{deep:!0});const x=h.ref({pageIndex:0,pageSize:s.pageSize}),E=Rut({enableRowSelection:!!s.selection,enableMultiRowSelection:s.selection==="multiple",columns:m(),get data(){return f.value},state:{get pagination(){return typeof s.fetchFn=="function"?x.value:void 0},get globalFilter(){return u.value},get rowSelection(){return o.value},get sorting(){return y.value}},getCoreRowModel:Dut(),getSortedRowModel:Fut(),getFilteredRowModel:Iut(),getPaginationRowModel:Out(),onRowSelectionChange:De=>{if(!U.value)return o.value=typeof De=="function"?De(o.value):De},onSortingChange:De=>{y.value=typeof De=="function"?De(y.value):De},onGlobalFilterChange:De=>{u.value=typeof De=="function"?De(u.value):De},autoResetPageIndex:s.autoResetPageIndex,manualPagination:typeof s.fetchFn=="function",...typeof s.fetchFn=="function"&&{onPaginationChange:De=>x.value=typeof De=="function"?De(x.value):De},pageCount:typeof s.fetchFn=="function"?s.pageCount:void 0,getSubRows:De=>De.subRows,getExpandedRowModel:wut()});h.watch(()=>x.value,De=>{I(De)});const N=h.ref(""),R=h.ref(!1);async function I(De){if(!s.fetchFn)return;R.value=!0;const $e=`${Math.random()}`;N.value=$e;try{await s.fetchFn(De)}catch{}finally{N.value===$e&&(R.value=!1)}}const U=h.computed(()=>{const De=R.value;return typeof s.loading=="boolean"?s.loading:De});h.watch(()=>s.rowData,()=>{E.setOptions(De=>({...De,data:s.rowData}))}),h.watch([()=>s.pageCount,()=>s.rowCount],()=>{E.setOptions(De=>({...De,pageCount:s.pageCount,rowCount:s.rowCount}))}),h.watch(()=>s.pageSize,()=>{E.setPageSize(s.pageSize)}),h.watch([()=>s.columnFilter],([De])=>{E.setColumnFilters(()=>De??[])}),h.watch(()=>s.columnDefs,()=>{E.setOptions(De=>({...De,columns:m()}))}),h.onMounted(()=>{s.fetchFn&&s.fetchFn(E.getState().pagination),E.setPageSize(s.pageSize)});const Y=h.ref(380);function te(De){var Ct;const $e=((Ct=De.el)==null?void 0:Ct.scrollHeight)??0;Y.value=Math.max(100,$e)}const ae=EC(),ye=h.ref(),fe=h.ref(typeof s.shrinkAt=="boolean"&&!s.shrinkAt?!1:ae.isBreakpointKeyword(s.shrinkAt)&&ae.isAtMost(s.shrinkAt));function Ne(De){const $e=De.el;if(!$e||typeof s.shrinkAt>"u"||typeof s.shrinkAt=="boolean"&&!s.shrinkAt)return;const Ct=Lee(function(){if(ye.value=$e.clientWidth,ae.isBreakpointKeyword(s.shrinkAt)){fe.value=ae.isAtMost(s.shrinkAt);return}const Nt=Number(s.shrinkAt);if(isNaN(Nt)){fe.value=!1;return}fe.value=$e.scrollWidth>=Nt},200);$e.resizeTable??($e.resizeTable=function(){fe.value=ae.isBreakpointKeyword(s.shrinkAt)&&ae.isAtMost(s.shrinkAt),Ct()}),window.addEventListener("resize",$e.resizeTable),$e.resizeTable()}function Pe(De){const $e=De.el;!$e||typeof s.shrinkAt>"u"||typeof s.shrinkAt=="boolean"&&!s.shrinkAt||$e.resizeTable&&window.removeEventListener("resize",$e.resizeTable)}return(De,$e)=>{const Ct=h.resolveComponent("FmListItem"),Nt=h.resolveComponent("FmList"),Zt=h.resolveComponent("FmTableHeader");return h.openBlock(),h.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:Ne,onVnodeUnmounted:Pe},[h.createElementVNode("div",Vut,[fe.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[U.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"pointer-events-none",style:h.normalizeStyle({height:`${Y.value}px`})},[h.createElementVNode("div",jut,[h.createVNode(DC),h.createVNode(G8,{size:"xl"}),h.createElementVNode("div",null,[h.renderSlot(De.$slots,"loading-text",{},()=>[zut])]),h.createVNode(DC)])],4)):(h.openBlock(),h.createBlock(Nt,{key:1,onVnodeMounted:te},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(h.unref(E).getRowModel().rows,nt=>h.renderSlot(De.$slots,"list-row",h.normalizeProps(h.mergeProps({key:nt.id},nt)),()=>[h.createVNode(Ct,{style:{padding:"0"},class:h.normalizeClass([{"bg-fm-color-neutral-gray-100":nt.getIsSelected(),"cursor-pointer":typeof De.onRowClick=="function"}]),tag:"label"},{prepend:h.withCtx(()=>{var Lt,ot,dt,Ve,Ge;return[h.createVNode(h.unref(fV),{render:(dt=(ot=(Lt=nt.getVisibleCells().find(Ot=>Ot.column.id==="row-selection"))==null?void 0:Lt.column)==null?void 0:ot.columnDef)==null?void 0:dt.cell,props:(Ge=(Ve=nt.getVisibleCells().find(Ot=>Ot.column.id==="row-selection"))==null?void 0:Ve.getContext)==null?void 0:Ge.call(Ve)},null,8,["render","props"])]}),default:h.withCtx(()=>[h.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:Lt=>{var ot;return(ot=De.onRowClick)==null?void 0:ot.call(De,nt)}},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(nt.getVisibleCells(),Lt=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:Lt.id},[Lt.column.id!=="row-selection"?(h.openBlock(),h.createElementBlock("div",Uut,[h.createElementVNode("span",qut,[h.createVNode(h.unref(fV),{render:Lt.column.columnDef.cell,props:Lt.getContext()},null,8,["render","props"])])])):h.createCommentVNode("",!0)],64))),128))],8,Jut)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(h.openBlock(),h.createElementBlock("table",Wut,[De.pinHeaderRow?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(Zt,{key:0,table:h.unref(E)},null,8,["table"])),h.renderSlot(De.$slots,"pin-top"),h.createElementVNode("tbody",{onVnodeMounted:te},[U.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"pointer-events-none",style:h.normalizeStyle({height:`${Y.value}px`})},[h.createElementVNode("div",Hut,[h.createVNode(DC),h.createVNode(G8,{size:"xl"}),h.createElementVNode("div",null,[h.renderSlot(De.$slots,"loading-text",{},()=>[Gut])]),h.createVNode(DC)])],4)):(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:1},h.renderList(h.unref(E).getRowModel().rows,nt=>h.renderSlot(De.$slots,"table-row",h.normalizeProps(h.mergeProps({key:nt.id},nt)),()=>[h.createElementVNode("tr",{class:h.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",[{"bg-fm-color-neutral-gray-100":nt.getIsSelected(),"cursor-pointer":typeof De.onRowClick=="function"},De.rowClassName]]),onClick:Lt=>{var ot;return(ot=De.onRowClick)==null?void 0:ot.call(De,nt)}},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(nt.getVisibleCells(),Lt=>{var ot,dt,Ve,Ge;return h.openBlock(),h.createElementBlock("td",{key:Lt.id,class:h.normalizeClass([U.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((ot=Lt.column.columnDef.meta)==null?void 0:ot.cellClass)??"px-16"]),style:h.normalizeStyle({width:(dt=Lt.column.columnDef.meta)==null?void 0:dt.width,maxWidth:(Ve=Lt.column.columnDef.meta)==null?void 0:Ve.maxWidth,textAlign:((Ge=Lt.column.columnDef.meta)==null?void 0:Ge.textAlign)??"left"})},[h.createElementVNode("span",Xut,[h.createVNode(h.unref(fV),{render:Lt.column.columnDef.cell,props:Lt.getContext()},null,8,["render","props"])])],6)}),128))],10,Yut)])),128))],512),De.pinHeaderRow?(h.openBlock(),h.createBlock(Zt,{key:1,class:"bg-fm-color-neutral-gray-100 sticky top-0",table:h.unref(E)},null,8,["table"])):h.createCommentVNode("",!0)]))]),De.hideFooter?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"basis-72 bg-white flex items-center justify-between px-24",style:h.normalizeStyle({maxWidth:ye.value?`${ye.value}px`:void 0})},[fe.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["flex gap-24 items-center justify-between xs:hidden xs:invisible",{"hidden invisible":De.forceMobileFooter}])},[h.createElementVNode("div",Qut,[Zut,h.createVNode(NTe,{"model-value":h.unref(E).getState().pagination.pageSize,items:[...Array.from(Array(5),(nt,Lt)=>(Lt+1)*10).map(nt=>({label:nt.toString(),value:nt})),{label:"All",value:s.rowData.length}],"onUpdate:modelValue":$e[0]||($e[0]=nt=>h.unref(E).setPageSize(nt))},null,8,["model-value","items"])]),h.createElementVNode("span",{class:h.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible",{"hidden invisible":De.forceMobileFooter}])},h.toDisplayString(s.rowData.length<h.unref(E).getState().pagination.pageSize?s.rowData.length:h.unref(E).getState().pagination.pageIndex*h.unref(E).getState().pagination.pageSize+1)+" - "+h.toDisplayString((h.unref(E).getState().pagination.pageIndex+1)*h.unref(E).getState().pagination.pageSize)+" of "+h.toDisplayString(s.rowCount??s.rowData.length)+" items ",3)],2)),h.createElementVNode("div",{class:h.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":fe.value||De.forceMobileFooter,"xs:w-full xs:justify-between":!fe.value}])},[h.createVNode(NTe,{"model-value":h.unref(E).getState().pagination.pageIndex+1,items:Array.from(Array(h.unref(E).getPageCount()),(nt,Lt)=>Lt+1).map(nt=>({label:nt.toString(),value:nt})),"onUpdate:modelValue":$e[1]||($e[1]=nt=>h.unref(E).setPageIndex(nt?nt-1:0))},null,8,["model-value","items"]),h.createElementVNode("span",{class:h.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto",{"mr-auto":fe.value||De.forceMobileFooter}])}," of "+h.toDisplayString(h.unref(E).getPageCount())+" pages ",3),h.createElementVNode("div",Kut,[h.createVNode(gl,{disabled:!h.unref(E).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:$e[2]||($e[2]=()=>h.unref(E).previousPage())},null,8,["disabled"]),h.createVNode(gl,{disabled:!h.unref(E).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:$e[3]||($e[3]=()=>h.unref(E).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),tft=h.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),nft=h.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(i,{emit:s}){const o=i,u=s,f=h.ref(!1),m=h.computed(()=>({vertical:o.vertical,disabled:o.disabled})),y=h.computed(()=>{const N=o.items.slice(0,o.showMoreAt-1),R=o.items.find(U=>{var Y;return U.value===o.modelValue||((Y=U.children)==null?void 0:Y.find(te=>te.value===o.modelValue))}),I=N.map(U=>U.value);return R&&I.includes(R.value)?o.items.slice(0,o.showMoreAt):R?[...N,R]:N}),x=h.computed(()=>{const N=y.value.map(R=>R.value);return o.items.filter(R=>!N.includes(R.value))}),E=N=>{f.value=!1,u("update:modelValue",N)};return(N,R)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex",N.vertical?"flex-col":"flex-row items-center"])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(y.value,I=>h.renderSlot(N.$slots,"default",h.normalizeProps(h.guardReactiveProps({...I,tabsProps:m.value})),()=>[h.createVNode(gTe,h.mergeProps({"model-value":o.modelValue},{children:I.children,label:I.label,icon:I.icon,disabled:I.disabled,badge:I.badge,value:I.value,tabsProps:m.value},{disabled:I.disabled===void 0?N.disabled:I.disabled,vertical:N.vertical,"onUpdate:modelValue":R[0]||(R[0]=U=>u("update:modelValue",U))}),null,16,["model-value","disabled","vertical"])])),256)),x.value.length>0?(h.openBlock(),h.createBlock(nx,{key:0,"show-menu":f.value,class:h.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":N.vertical}]),placement:N.vertical?"right-start":"bottom-start",onMenuChanged:R[1]||(R[1]=I=>f.value=I)},{"menu-button":h.withCtx(()=>[h.createElementVNode("div",{class:h.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[N.vertical?"h-40":"h-[46px]"]])},[h.createVNode(Wo,{name:"more_vert"}),tft],2)]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(x.value,I=>{var U;return h.openBlock(),h.createElementBlock(h.Fragment,{key:I.value},[(U=I.children)!=null&&U.length?(h.openBlock(),h.createBlock(nx,{key:0,placement:"right-start"},{"menu-button":h.withCtx(()=>[h.createVNode(ig,{"model-value":o.modelValue===I.value,label:I.label,icon:I.icon,disabled:I.disabled,expandable:""},{append:h.withCtx(()=>[I.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:I.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(I.children,Y=>(h.openBlock(),h.createBlock(ig,{key:Y.value,"model-value":o.modelValue===Y.value,label:Y.label,icon:Y.icon,disabled:Y.disabled,onClick:te=>E(Y.value)},{append:h.withCtx(()=>[Y.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:Y.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(h.openBlock(),h.createBlock(ig,{key:1,"model-value":o.modelValue===I.value,label:I.label,icon:I.icon,disabled:I.disabled,onClick:Y=>E(I.value)},{append:h.withCtx(()=>[I.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:I.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):h.createCommentVNode("",!0)],2))}}),rft=["tabindex"],ift=h.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(i){const s=i,o=Ml(s,"modelValue"),u=h.computed(()=>s.children.length>0),f=h.ref(!s.expand||s.disabled),m=h.computed(()=>{if(!u.value)return 0;function U(te){return te.children?[te,...te.children.flatMap(U)]:[te]}return 56*(s.children?s.children.flatMap(U):[]).length});function y(){if(!s.disabled){if(u.value){f.value=!f.value;return}o.value=s.value}}const x=h.computed(()=>typeof s.focusable=="boolean"?s.focusable:!s.disabled&&(!f.value||!u.value));function E(U){return U.children&&U.children.length?U.children.some(E):s.modelValue===U.value}const N=h.computed(()=>{const U=E(s);return u.value?U&&f.value:U}),R=h.computed(()=>s.children?s.children.map(({modelValue:U,indentation:Y,active:te,focusable:ae,...ye})=>{const fe=E(ye);return{...ye,expand:fe,focusable:!ye.disabled&&!f.value}}):[]),I=h.computed(()=>{switch(s.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(U,Y)=>{const te=h.resolveComponent("FmCollapsibleTab",!0),ae=h.resolveDirective("wave");return h.openBlock(),h.createElementBlock("div",{style:h.normalizeStyle({paddingLeft:`${I.value}px`}),class:"flex flex-col px-8"},[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!U.disabled,"cursor-not-allowed":U.disabled,"bg-fm-color-system-warning-100":N.value}]),tabindex:x.value?"0":"-1",type:"button",onClick:y},[U.icon?(h.openBlock(),h.createBlock(Wo,{key:0,class:h.normalizeClass({"text-fm-color-typo-disabled":U.disabled,"text-fm-color-typo-primary":!U.disabled&&!N.value,"text-fm-color-primary":!U.disabled&&N.value}),name:U.icon},null,8,["class","name"])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:h.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!U.disabled&&!N.value,"text-fm-color-primary":!U.disabled&&N.value,"text-fm-color-typo-disabled":U.disabled}])},h.toDisplayString(U.label),3),U.badge?(h.openBlock(),h.createBlock(AE,{key:1,value:U.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0),u.value?(h.openBlock(),h.createElementBlock("div",{key:2,style:h.normalizeStyle({transformOrigin:"center",transform:`rotate(${f.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[h.createVNode(Wo,{class:h.normalizeClass({"text-fm-color-neutral-gray-300":!U.disabled,"text-fm-color-typo-disabled":U.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):h.createCommentVNode("",!0)],10,rft)),[[ae,!U.disabled]]),u.value?(h.openBlock(),h.createElementBlock("div",{key:0,style:h.normalizeStyle({maxHeight:f.value?0:`${m.value}px`,transition:"max-height 250ms",transitionTimingFunction:f.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(R.value,(ye,fe)=>(h.openBlock(),h.createBlock(te,h.mergeProps({key:fe,"model-value":h.unref(o),"onUpdate:modelValue":Y[0]||(Y[0]=Ne=>h.isRef(o)?o.value=Ne:null),indentation:U.indentation+1},ye),null,16,["model-value","indentation"]))),128))],4)):h.createCommentVNode("",!0)],4)}}}),sft={class:"flex flex-col"},aft=h.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(i){const s=i,o=Ml(s,"modelValue"),u=h.computed(()=>s.items?s.items.map(({modelValue:m,...y})=>y):[]);function f(m){function y(E){return E.children?E.children.flatMap(y):[E.value]}return(m.children?m.children.flatMap(y):[m.value]).includes(s.modelValue)}return(m,y)=>(h.openBlock(),h.createElementBlock("div",sft,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value,(x,E)=>(h.openBlock(),h.createBlock(ift,h.mergeProps({key:E},x,{"model-value":h.unref(o),"onUpdate:modelValue":y[0]||(y[0]=N=>h.isRef(o)?o.value=N:null),active:f(x),expand:f(x)}),null,16,["model-value","active","expand"]))),128))]))}}),oft=h.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(i){const s=i,o=h.computed(()=>{if(s.initials)return s.initials.slice(0,2);if(s.name){const[u,f]=s.name.split(" ");return f?`${u[0]}${f[0]}`:u.slice(0,2)}return s.src?"":"?"});return(u,f)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":u.size==="sm","w-40 h-40 fm-typo-en-body-md-600":u.size==="md","w-48 h-48 fm-typo-en-body-lg-600":u.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":u.size==="xl","bg-fm-color-neutral-gray-100":!s.src}]),style:h.normalizeStyle({background:s.src?`url(${s.src})`:void 0,backgroundSize:s.src?"cover":void 0,backgroundPosition:s.src?"center":void 0,backgroundRepeat:s.src?"no-repeat":void 0})},h.toDisplayString(o.value),7))}}),cft=h.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:i=>i.src?"":"image"},size:{default:()=>"md"}},setup(i){const s=i;return(o,u)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-56 h-56 fm-typo-en-body-lg-600":o.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":o.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!s.src}]),style:h.normalizeStyle({background:s.src?`url(${s.src})`:void 0,backgroundSize:s.src?"cover":void 0,backgroundPosition:s.src?"center":void 0,backgroundRepeat:s.src?"no-repeat":void 0})},[o.icon?(h.openBlock(),h.createBlock(Wo,{key:0,name:o.icon},null,8,["name"])):h.createCommentVNode("",!0)],6))}}),lft={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},uft={class:"flex gap-4 items-center xs:hidden"},fft={key:1,class:"hidden xs:flex"},_ft={class:"absolute bottom-16 hidden right-16 xs:inline"},dft=h.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["click:back","click:action"],setup(i,{emit:s}){const o=i,u=s,f=h.computed(()=>{const y=[...o.actions],x=y.findIndex(U=>U.isPrimary),E=y[x],[N,R,...I]=y.filter((U,Y)=>Y!==x);return{primaryAction:E,firstSecondaryAction:N,secondSecondaryAction:R,showMoreSecondary:I,bottomSheetActions:y.filter(U=>!U.isPrimary),fabActions:y.filter(U=>U.isPrimary)}}),m=h.ref(!1);return(y,x)=>(h.openBlock(),h.createElementBlock("div",lft,[y.backButton?(h.openBlock(),h.createBlock(gl,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:x[0]||(x[0]=E=>u("click:back"))})):h.createCommentVNode("",!0),h.renderSlot(y.$slots,"prepend"),h.createVNode(Vee,{class:"flex-grow",title:y.title,description:y.description,"title-bold":""},null,8,["title","description"]),h.createElementVNode("div",uft,[f.value.firstSecondaryAction?(h.openBlock(),h.createBlock(gl,{key:0,label:f.value.firstSecondaryAction.label,"prepend-icon":f.value.firstSecondaryAction.prependIcon,"append-icon":f.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[1]||(x[1]=E=>u("click:action",f.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.secondSecondaryAction?(h.openBlock(),h.createBlock(gl,{key:1,label:f.value.secondSecondaryAction.label,"prepend-icon":f.value.secondSecondaryAction.prependIcon,"append-icon":f.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[2]||(x[2]=E=>u("click:action",f.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.showMoreSecondary.length>1?(h.openBlock(),h.createBlock(nx,{key:2},{"menu-button":h.withCtx(()=>[h.createVNode(gl,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value.showMoreSecondary,E=>(h.openBlock(),h.createBlock(ig,{key:E.value,label:E.label,icon:E.prependIcon,onClick:N=>u("click:action",E.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):f.value.showMoreSecondary.length===1?(h.openBlock(),h.createBlock(gl,{key:3,label:f.value.showMoreSecondary[0].label,"prepend-icon":f.value.showMoreSecondary[0].prependIcon,"append-icon":f.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[3]||(x[3]=E=>u("click:action",f.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.primaryAction?(h.openBlock(),h.createBlock(gl,{key:4,label:f.value.primaryAction.label,"prepend-icon":f.value.primaryAction.prependIcon,"append-icon":f.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:x[4]||(x[4]=E=>u("click:action",f.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0)]),f.value.bottomSheetActions.length>0?(h.openBlock(),h.createElementBlock("div",fft,[h.createVNode(gl,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:x[5]||(x[5]=E=>m.value=!0)})])):h.createCommentVNode("",!0),h.renderSlot(y.$slots,"append"),(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(cK,{"model-value":m.value,"onUpdate:modelValue":x[6]||(x[6]=E=>m.value=E),"dismiss-away":"","z-index":o.zIndexForBottomSheet},{default:h.withCtx(()=>[h.createVNode($ee,null,{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value.bottomSheetActions,E=>(h.openBlock(),h.createBlock(Bee,{key:E.value,class:"hover:bg-fm-color-neutral-gray-100",label:E.label,onClick:N=>{u("click:action",E.value),m.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),h.createElementVNode("div",_ft,[f.value.primaryAction?(h.openBlock(),h.createBlock(gl,{key:0,class:"fm-shadow-light-100",label:f.value.primaryAction.label,"prepend-icon":f.value.primaryAction.prependIcon,"append-icon":f.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:x[7]||(x[7]=E=>u("click:action",f.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0)])]))]))}}),pft=["colSpan","onClick"],mft={class:"flex gap-8 items-center justify-between"},gft=h.defineComponent({__name:"FmTableHeader",props:{table:{}},setup(i){function s(o){return o.column.columnDef.meta}return(o,u)=>{const f=h.resolveComponent("FmIcon");return h.openBlock(),h.createElementBlock("thead",null,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.table.getHeaderGroups(),m=>(h.openBlock(),h.createElementBlock("tr",{key:m.id},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(m.headers,y=>{var x,E,N,R;return h.openBlock(),h.createElementBlock("th",{key:y.id,colSpan:y.colSpan,class:h.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",y.column.getCanSort()?"cursor-pointer select-none":"",((x=s(y))==null?void 0:x.headerClass)??"px-16 py-12"]),style:h.normalizeStyle({width:`${(E=s(y))==null?void 0:E.width}`,maxWidth:(N=s(y))==null?void 0:N.maxWidth,textAlign:((R=s(y))==null?void 0:R.textAlign)??"left"}),onClick:I=>{var U;return(U=y.column.getToggleSortingHandler())==null?void 0:U(I)}},[h.createElementVNode("div",mft,[y.isPlaceholder?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(fV),{key:0,render:y.column.columnDef.header,props:y.getContext()},null,8,["render","props"])),y.column.getCanSort()?(h.openBlock(),h.createBlock(f,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[y.column.getIsSorted()]??"unfold_more"},null,8,["name"])):h.createCommentVNode("",!0)])],14,pft)}),128))]))),128))])}}}),hft={class:"fm-typo-title-sm-700 font-bold"},yft={class:"flex"},PTe={FmBadge:AE,FmBottomSheet:cK,FmBreadcrumb:_Xe,FmButton:gl,FmButtonGroup:xXe,FmCard:uK,FmCardActionArea:TXe,FmCardActions:CXe,FmCardHeader:DXe,FmCardMedia:AXe,FmCardSection:fK,FmCardSubtitle:Dve,FmCardTitle:Eve,FmChip:_K,FmChipGroup:dK,FmDialog:MXe,FmDropField:$Xe,FmDynamicDialog:Pve,FmLineChart:QSe,FmPieChart:cnt,FmBarChart:pnt,FmScorecard:Au(h.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(i){const s=i,o=(y,x)=>{if(y===""||x==="")return null;const E=Number(y),N=Number(x);let R=0;N===0?E===0?R=0:R=1:R=(E-N)/N;const I=u(R);return{value:isNaN(R)?"":`${(R*100).toFixed(0)}%`,icon:I}};function u(y){return y>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:y<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const f=h.computed(()=>{const{value:y,compareValue:x}=s;return x?o(y,x):null}),m=h.computed(()=>{var y;return((y=s.sparklineData)==null?void 0:y.datasets.map(x=>{var E;return{label:x.name,data:x.values,fill:!0,color:((E=f.value)==null?void 0:E.icon.color)??"fm-color-system-info-300"}}))??[]});return(y,x)=>(h.openBlock(),h.createBlock(uK,{variant:"outlined",class:"flex flex-col gap-2 p-5"},{default:h.withCtx(()=>[h.createVNode(gee,{content:s.description},{default:h.withCtx(()=>[h.renderSlot(y.$slots,"title",{},()=>[h.createElementVNode("p",{class:h.normalizeClass(["fm-typo-body-md-400",s.description?"border-b-2 border-dotted":""])},h.toDisplayString(s.title),3)],!0)]),_:3},8,["content"]),h.createElementVNode("p",hft,h.toDisplayString(s.value),1),y.hideCompare?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("div",yft,[f.value?(h.openBlock(),h.createBlock(_K,{key:0,compact:"",class:h.normalizeClass(`bg-${f.value.icon.tailwind}`)},{default:h.withCtx(()=>[h.createVNode(Wo,{name:f.value.icon.name,color:f.value.icon.color},null,8,["name","color"]),h.createElementVNode("p",{class:"fm-typo-body-md-700",style:h.normalizeStyle({color:f.value.icon.color})},h.toDisplayString(f.value.value),5)]),_:1},8,["class"])):h.createCommentVNode("",!0)]),h.renderSlot(y.$slots,"compare",{},void 0,!0)],64)),s.sparklineData?(h.openBlock(),h.createBlock(uK,{key:1},{default:h.withCtx(()=>[h.createVNode(QSe,{class:"sparkline",datasets:m.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:s.sparklineData.dimension}},null,8,["datasets","x-axis"])]),_:1})):h.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-09b20d8a"]]),FmCheckbox:KSe,FmDatePicker:Frt,FmDatePickerMobile:xxe,FmDateRangePicker:Jit,FmDateRangePickerMobile:Exe,FmSimpleDatePicker:mst,FmSimpleDatePickerMobile:wxe,FmSimpleDateRangePicker:Hst,FmSimpleDateRangePickerMobile:Axe,FmField:yd,FmForm:Gst,FmFormGroup:Fg,FmHelperText:exe,FmLabel:qE,FmPhoneNumber:act,FmPinField:lct,FmRadio:gct,FmRadioGroup:hct,FmSearch:Fee,FmGlobalSearch:Uct,FmSelect:sA,FmStepperField:Yct,FmSwitch:yee,FmTextField:Oee,FmTextarea:Qct,FmTimeInput:iV,FmTimePicker:ult,FmTimeRangePicker:ylt,FmIcon:Wo,FmList:$ee,FmListItem:Bee,FmMenu:nx,FmMenuDeprecated:Tlt,FmMenuDivider:Txe,FmMenuHeader:Clt,FmMenuItem:ig,FmCircularProgress:G8,FmLinearProgress:Nlt,FmSideSheet:Mlt,FmSnackbar:mTe,FmSpacer:DC,FmStep:jlt,FmStepper:Ult,FmTab:gTe,FmTable:eft,FmTableToolbar:Zlt,FmTableHeader:gft,FmTabs:nft,FmCollapsibleTabs:aft,FmTooltip:gee,FmAvatar:oft,FmThumbnail:cft,FmPageHead:dft,FmTopSheet:fTe},vft=h.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(i){const s=i,o=h.ref(!1),u=h.ref(null),f=h.ref(null),m=h.computed(()=>s.reference());let y;const{floatingStyles:x,middlewareData:E,placement:N}=wP(m,u,{whileElementsMounted:EP,placement:s.placement,middleware:[DP(),TP({mainAxis:6}),gxe({element:f})]}),R=h.computed(()=>{var te,ae,ye,fe;const Y={top:"bottom",right:"left",bottom:"top",left:"right"}[N.value];return{left:((te=E.value.arrow)==null?void 0:te.x)!=null?`${(ae=E.value.arrow)==null?void 0:ae.x}px`:"",top:((ye=E.value.arrow)==null?void 0:ye.y)!=null?`${(fe=E.value.arrow)==null?void 0:fe.y}px`:"",[Y]:"-3px"}}),I=()=>{s.disabled||(y&&clearTimeout(y),y=setTimeout(()=>{o.value=!0},250))},U=()=>{s.disabled||(y&&clearTimeout(y),y=setTimeout(()=>{o.value=!1},250))};return h.onMounted(()=>{m.value.addEventListener("pointerdown",I),m.value.addEventListener("pointermove",Y=>{Y.pointerType!=="touch"&&I()}),m.value.addEventListener("pointerleave",U),m.value.addEventListener("pointerup",U)}),h.onBeforeUnmount(()=>{m.value.removeEventListener("pointerdown",I),m.value.removeEventListener("pointermove",Y=>{Y.pointerType!=="touch"&&I()}),m.value.removeEventListener("pointerleave",U),m.value.removeEventListener("pointerup",U)}),(Y,te)=>o.value&&!Y.disabled?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:u,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:h.normalizeStyle(h.unref(x))},[h.withDirectives(h.createElementVNode("div",{ref_key:"arrowEl",ref:f,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:h.normalizeStyle(R.value)},null,4),[[h.vShow,!Y.hideArrow]]),h.createTextVNode(" "+h.toDisplayString(Y.content),1)],4)):h.createCommentVNode("",!0)}});let ite;const VC=h.ref([]);let ITe=0;const bft=()=>{if(ite)return;const i=document.createElement("div");document.body.appendChild(i),ite=h.createApp({render:()=>VC.value.map(s=>h.h(vft,s))}),ite.mount(i)},_V=i=>{if(i){for(const s of["top","right","bottom","left"])if(i[s])return s}return"top"},OTe=(i,s)=>{const{value:o,modifiers:u}=s;bft(),i.$_fmTooltipId=ITe,ITe+=1,typeof o=="string"?VC.value.push({id:i.$_fmTooltipId,reference:()=>i,content:o.toString(),placement:_V(u),hideArrow:!1}):o&&typeof o=="object"&&VC.value.push({id:i.$_fmTooltipId,reference:()=>i,content:o.content.toString(),placement:_V(u),disabled:o.disabled??!1,hideArrow:o.hideArrow??!1})},Sft={mounted:OTe,updated:(i,s)=>{const{value:o,modifiers:u}=s,f=VC.value.findIndex(m=>m.id===i.$_fmTooltipId);if(f===-1){OTe(i,s);return}typeof o=="string"?VC.value[f]={id:i.$_fmTooltipId,reference:()=>i,content:o.toString(),placement:_V(u),hideArrow:!1}:o&&typeof o=="object"&&(VC.value[f]={id:i.$_fmTooltipId,reference:()=>i,content:o.content.toString(),disabled:o.disabled??!1,placement:_V(u),hideArrow:o.hideArrow??!1})},beforeUnmount:i=>{const s=VC.value.findIndex(o=>o.id===i.$_fmTooltipId);s!==-1&&VC.value.splice(s,1)}},dV=16,xft=h.defineComponent({__name:"FmSnackbarToast",setup(i){const{breakpoints:s}=EC(),o=h.inject(lK),u=h.computed(()=>{var y;return[...((y=o==null?void 0:o.store)==null?void 0:y.snackbars)??[]].reduce(({currentSum:x,tops:E},N)=>{E.push({id:N.id,accumulatedHeight:x});const R=N.mountStage===jC.EXPIRED?0:dV+N.renderedHeight;return{currentSum:x+R,tops:E}},{currentSum:dV,tops:new Array}).tops}),f=h.computed(()=>{var m,y;return(y=(m=o==null?void 0:o.store)==null?void 0:m.snackbars)==null?void 0:y.map(x=>{var N,R,I,U,Y,te;let E=0;switch(x.mountStage){case jC.PREMOUNT:{E=s.value.xs?0:dV;break}case jC.MOUNTED:{E=((I=(R=(N=u.value)==null?void 0:N.find)==null?void 0:R.call(N,ae=>ae.id===x.id))==null?void 0:I.accumulatedHeight)||dV;break}case jC.EXPIRED:{E=((te=(Y=(U=u.value)==null?void 0:U.find)==null?void 0:Y.call(U,ae=>ae.id===x.id))==null?void 0:te.accumulatedHeight)||0,E=Math.max(0,E-x.renderedHeight);break}}return{...x,top:E}})});return(m,y)=>(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value,x=>(h.openBlock(),h.createBlock(h.Teleport,{key:x.id,to:"body"},[h.createVNode(mTe,{class:"fixed transition-all z-10",variant:x.type,title:x.title,description:x.message,action:x.action,dismissable:x.dismissable,style:h.normalizeStyle(h.unref(s).xs?{bottom:`${x.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:x.mountStage===h.unref(jC).EXPIRED?0:1}:{top:`${x.top}px`,right:x.mountStage===h.unref(jC).PREMOUNT?"-20px":"16px",opacity:x.mountStage===h.unref(jC).EXPIRED?0:1}),onVnodeMounted:E=>{var N;return(N=h.unref(o))==null?void 0:N.onSnackbarMounted(x.id,E.el.scrollHeight)},onOnAction:()=>{var E,N;(E=x==null?void 0:x.onAction)==null||E.call(x),(N=h.unref(o))==null||N.close(x.id)},onOnDismiss:()=>{var E;return(E=h.unref(o))==null?void 0:E.close(x.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var jC=(i=>(i.PREMOUNT="PREMOUNT",i.MOUNTED="MOUNTED",i.EXPIRED="EXPIRED",i))(jC||{});class Tft{constructor(){ws(this,"store",h.reactive({snackbars:new Array}))}open(s,o){const u=Math.random().toString(16).slice(2),f=[{...s,id:u,mountStage:"PREMOUNT",duration:o===null?null:o??5e3,renderedHeight:0,type:(s==null?void 0:s.type)??"info",dismissable:typeof(s==null?void 0:s.dismissable)=="boolean"?s.dismissable:!0},...this.store.snackbars];return this.store.snackbars=f,u}onSnackbarMounted(s,o){const u=this.store.snackbars.findIndex(m=>m.id===s);if(u===-1)return;const f=this.store.snackbars[u];this.store.snackbars[u]={...f,renderedHeight:o},setTimeout(()=>{const m=this.store.snackbars[u];this.store.snackbars[u]={...m,mountStage:"MOUNTED"}}),typeof f.duration=="number"&&setTimeout(()=>{this.close(s)},f.duration)}close(s){const o=this.store.snackbars.findIndex(f=>f.id===s);if(o===-1)return;const u=this.store.snackbars[o];this.store.snackbars[o]={...u,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(s)},500)}removeSnackbar(s){const o=this.store.snackbars.findIndex(u=>u.id===s);o!==-1&&this.store.snackbars.splice(o,1)}}const kft={install(i){i.provide(lK,new Tft);const s=document.body,o=h.createVNode(xft);o.appContext=i._context,h.render(o,s)}};function Cft(){var i=window.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);var o=i.indexOf("Trident/");if(o>0){var u=i.indexOf("rv:");return parseInt(i.substring(u+3,i.indexOf(".",u)),10)}var f=i.indexOf("Edge/");return f>0?parseInt(i.substring(f+5,i.indexOf(".",f)),10):-1}let pV;function ste(){ste.init||(ste.init=!0,pV=Cft()!==-1)}var mV={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ste(),h.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const i=document.createElement("object");this._resizeObject=i,i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex",-1),i.onload=this.addResizeHandlers,i.type="text/html",pV&&this.$el.appendChild(i),i.data="about:blank",pV||this.$el.appendChild(i)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!pV&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Eft=h.withScopeId("data-v-b329ee4c");h.pushScopeId("data-v-b329ee4c");const Dft={class:"resize-observer",tabindex:"-1"};h.popScopeId();const wft=Eft((i,s,o,u,f,m)=>(h.openBlock(),h.createBlock("div",Dft)));mV.render=wft,mV.__scopeId="data-v-b329ee4c",mV.__file="src/components/ResizeObserver.vue";function gV(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gV=function(s){return typeof s}:gV=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},gV(i)}function Aft(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function FTe(i,s){for(var o=0;o<s.length;o++){var u=s[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Nft(i,s,o){return s&&FTe(i.prototype,s),o&&FTe(i,o),i}function MTe(i){return Pft(i)||Ift(i)||Oft(i)||Fft()}function Pft(i){if(Array.isArray(i))return ate(i)}function Ift(i){if(typeof Symbol<"u"&&Symbol.iterator in Object(i))return Array.from(i)}function Oft(i,s){if(i){if(typeof i=="string")return ate(i,s);var o=Object.prototype.toString.call(i).slice(8,-1);if(o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set")return Array.from(i);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ate(i,s)}}function ate(i,s){(s==null||s>i.length)&&(s=i.length);for(var o=0,u=new Array(s);o<s;o++)u[o]=i[o];return u}function Fft(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
54
|
+
*/function lV(){return!0}const Mut=Symbol("merge-proxy"),Lut={get(i,s,o){return s===Mut?o:i.get(s)},has(i,s){return i.has(s)},set:lV,deleteProperty:lV,getOwnPropertyDescriptor(i,s){return{configurable:!0,enumerable:!0,get(){return i.get(s)},set:lV,deleteProperty:lV}},ownKeys(i){return i.keys()}};function rte(i){return"value"in i?i.value:i}function uV(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return new Proxy({get(u){for(let f=s.length-1;f>=0;f--){const m=rte(s[f])[u];if(m!==void 0)return m}},has(u){for(let f=s.length-1;f>=0;f--)if(u in rte(s[f]))return!0;return!1},keys(){const u=[];for(let f=0;f<s.length;f++)u.push(...Object.keys(rte(s[f])));return[...Array.from(new Set(u))]}},Lut)}const fV=h.defineComponent({props:["render","props"],setup:i=>()=>typeof i.render=="function"||typeof i.render=="object"?h.h(i.render,i.props):i.render});function Rut(i){const s=uV({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(f,m){return uV(f,m)}},i),o=Eut(s),u=h.ref(o.initialState);return h.watchEffect(()=>{o.setOptions(f=>{var m;const y=new Proxy({},{get:(x,E)=>u.value[E]});return uV(f,i,{state:uV(y,(m=i.state)!=null?m:{}),onStateChange:x=>{x instanceof Function?u.value=x(u.value):u.value=x,i.onStateChange==null||i.onStateChange(x)}})})}),o}const $ut=["checked","disabled","indeterminate"],ATe=Au(h.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(i){const s=i,o=h.computed(()=>s.indeterminate&&!s.checked?"remove":s.checked?"check_small":"");return(u,f)=>(h.openBlock(),h.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:f[0]||(f[0]=h.withModifiers((...m)=>u.onChange&&u.onChange(...m),["stop"]))},[h.createElementVNode("input",{checked:u.checked,class:h.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":u.checked}),disabled:u.disabled,indeterminate:u.indeterminate,type:"checkbox"},null,10,$ut),u.indeterminate||u.checked?(h.openBlock(),h.createBlock(Wo,{key:0,name:o.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):h.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),But={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},NTe=h.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(i){const o=Ml(i,"modelValue"),u=h.ref(!1);return(f,m)=>(h.openBlock(),h.createBlock(nx,{onMenuChanged:m[0]||(m[0]=y=>u.value=y)},{"menu-button":h.withCtx(()=>{var y;return[h.createVNode(gl,{variant:"tertiary",label:(y=f.items.find(x=>x.value===f.modelValue))==null?void 0:y.label,size:"md",icon:u.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":h.withCtx(()=>[h.createElementVNode("div",But,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.items,y=>(h.openBlock(),h.createBlock(ig,{key:y.value,"model-value":y.value===h.unref(o),label:y.label,value:y.value,"onUpdate:modelValue":x=>o.value=y.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),Vut={class:"overflow-y-auto"},jut={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},zut=h.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),Jut=["onClick"],Uut={key:0},qut={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},Wut={key:1,class:"w-full"},Hut={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},Gut=h.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),Yut=["onClick"],Xut={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},Qut={class:"flex gap-8 items-center"},Zut=h.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),Kut={class:"flex gap-8"},eft=h.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean}},setup(i){const s=i,o=Ml(s,"modelValue"),u=Ml(s,"searchValue"),f=h.ref(s.rowData),m=()=>{let De=s.columnDefs;return s.selection&&(De=[{id:"row-selection",header:({table:$e})=>h.createVNode(ATe,{checked:$e.getIsAllPageRowsSelected(),indeterminate:$e.getIsSomePageRowsSelected(),onChange:$e.getToggleAllPageRowsSelectedHandler()},null),cell:({row:$e})=>h.createVNode(ATe,{checked:$e.getIsSelected(),disabled:!$e.getCanSelect(),onChange:$e.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...De]),De},y=h.ref([]);h.watch(()=>s.rowData,De=>{f.value=[...De]},{deep:!0});const x=h.ref({pageIndex:0,pageSize:s.pageSize}),E=Rut({enableRowSelection:!!s.selection,enableMultiRowSelection:s.selection==="multiple",columns:m(),get data(){return f.value},state:{get pagination(){return typeof s.fetchFn=="function"?x.value:void 0},get globalFilter(){return u.value},get rowSelection(){return o.value},get sorting(){return y.value}},getCoreRowModel:Dut(),getSortedRowModel:Fut(),getFilteredRowModel:Iut(),getPaginationRowModel:Out(),onRowSelectionChange:De=>{if(!U.value)return o.value=typeof De=="function"?De(o.value):De},onSortingChange:De=>{y.value=typeof De=="function"?De(y.value):De},onGlobalFilterChange:De=>{u.value=typeof De=="function"?De(u.value):De},autoResetPageIndex:s.autoResetPageIndex,manualPagination:typeof s.fetchFn=="function",...typeof s.fetchFn=="function"&&{onPaginationChange:De=>x.value=typeof De=="function"?De(x.value):De},pageCount:typeof s.fetchFn=="function"?s.pageCount:void 0,getSubRows:De=>De.subRows,getExpandedRowModel:wut()});h.watch(()=>x.value,De=>{I(De)});const N=h.ref(""),R=h.ref(!1);async function I(De){if(!s.fetchFn)return;R.value=!0;const $e=`${Math.random()}`;N.value=$e;try{await s.fetchFn(De)}catch{}finally{N.value===$e&&(R.value=!1)}}const U=h.computed(()=>{const De=R.value;return typeof s.loading=="boolean"?s.loading:De});h.watch(()=>s.rowData,()=>{E.setOptions(De=>({...De,data:s.rowData}))}),h.watch([()=>s.pageCount,()=>s.rowCount],()=>{E.setOptions(De=>({...De,pageCount:s.pageCount,rowCount:s.rowCount}))}),h.watch(()=>s.pageSize,()=>{E.setPageSize(s.pageSize)}),h.watch([()=>s.columnFilter],([De])=>{E.setColumnFilters(()=>De??[])}),h.watch(()=>s.columnDefs,()=>{E.setOptions(De=>({...De,columns:m()}))}),h.onMounted(()=>{s.fetchFn&&s.fetchFn(E.getState().pagination),E.setPageSize(s.pageSize)});const Y=h.ref(380);function te(De){var Ct;const $e=((Ct=De.el)==null?void 0:Ct.scrollHeight)??0;Y.value=Math.max(100,$e)}const ae=EC(),ye=h.ref(),fe=h.ref(typeof s.shrinkAt=="boolean"&&!s.shrinkAt?!1:ae.isBreakpointKeyword(s.shrinkAt)&&ae.isAtMost(s.shrinkAt));function Ne(De){const $e=De.el;if(!$e||typeof s.shrinkAt>"u"||typeof s.shrinkAt=="boolean"&&!s.shrinkAt)return;const Ct=Lee(function(){if(ye.value=$e.clientWidth,ae.isBreakpointKeyword(s.shrinkAt)){fe.value=ae.isAtMost(s.shrinkAt);return}const Nt=Number(s.shrinkAt);if(isNaN(Nt)){fe.value=!1;return}fe.value=$e.scrollWidth>=Nt},200);$e.resizeTable??($e.resizeTable=function(){fe.value=ae.isBreakpointKeyword(s.shrinkAt)&&ae.isAtMost(s.shrinkAt),Ct()}),window.addEventListener("resize",$e.resizeTable),$e.resizeTable()}function Pe(De){const $e=De.el;!$e||typeof s.shrinkAt>"u"||typeof s.shrinkAt=="boolean"&&!s.shrinkAt||$e.resizeTable&&window.removeEventListener("resize",$e.resizeTable)}return(De,$e)=>{const Ct=h.resolveComponent("FmListItem"),Nt=h.resolveComponent("FmList"),Zt=h.resolveComponent("FmTableHeader");return h.openBlock(),h.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:Ne,onVnodeUnmounted:Pe},[h.createElementVNode("div",Vut,[fe.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[U.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"pointer-events-none",style:h.normalizeStyle({height:`${Y.value}px`})},[h.createElementVNode("div",jut,[h.createVNode(DC),h.createVNode(G8,{size:"xl"}),h.createElementVNode("div",null,[h.renderSlot(De.$slots,"loading-text",{},()=>[zut])]),h.createVNode(DC)])],4)):(h.openBlock(),h.createBlock(Nt,{key:1,onVnodeMounted:te},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(h.unref(E).getRowModel().rows,nt=>h.renderSlot(De.$slots,"list-row",h.normalizeProps(h.mergeProps({key:nt.id},nt)),()=>[h.createVNode(Ct,{style:{padding:"0"},class:h.normalizeClass([{"bg-fm-color-neutral-gray-100":nt.getIsSelected(),"cursor-pointer":typeof De.onRowClick=="function"}]),tag:"label"},{prepend:h.withCtx(()=>{var Lt,ot,dt,Ve,Ge;return[h.createVNode(h.unref(fV),{render:(dt=(ot=(Lt=nt.getVisibleCells().find(Ot=>Ot.column.id==="row-selection"))==null?void 0:Lt.column)==null?void 0:ot.columnDef)==null?void 0:dt.cell,props:(Ge=(Ve=nt.getVisibleCells().find(Ot=>Ot.column.id==="row-selection"))==null?void 0:Ve.getContext)==null?void 0:Ge.call(Ve)},null,8,["render","props"])]}),default:h.withCtx(()=>[h.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:Lt=>{var ot;return(ot=De.onRowClick)==null?void 0:ot.call(De,nt)}},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(nt.getVisibleCells(),Lt=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:Lt.id},[Lt.column.id!=="row-selection"?(h.openBlock(),h.createElementBlock("div",Uut,[h.createElementVNode("span",qut,[h.createVNode(h.unref(fV),{render:Lt.column.columnDef.cell,props:Lt.getContext()},null,8,["render","props"])])])):h.createCommentVNode("",!0)],64))),128))],8,Jut)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(h.openBlock(),h.createElementBlock("table",Wut,[De.pinHeaderRow?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(Zt,{key:0,table:h.unref(E)},null,8,["table"])),h.renderSlot(De.$slots,"pin-top"),h.createElementVNode("tbody",{onVnodeMounted:te},[U.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"pointer-events-none",style:h.normalizeStyle({height:`${Y.value}px`})},[h.createElementVNode("div",Hut,[h.createVNode(DC),h.createVNode(G8,{size:"xl"}),h.createElementVNode("div",null,[h.renderSlot(De.$slots,"loading-text",{},()=>[Gut])]),h.createVNode(DC)])],4)):(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:1},h.renderList(h.unref(E).getRowModel().rows,nt=>h.renderSlot(De.$slots,"table-row",h.normalizeProps(h.mergeProps({key:nt.id},nt)),()=>[h.createElementVNode("tr",{class:h.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",[{"bg-fm-color-neutral-gray-100":nt.getIsSelected(),"cursor-pointer":typeof De.onRowClick=="function"},De.rowClassName]]),onClick:Lt=>{var ot;return(ot=De.onRowClick)==null?void 0:ot.call(De,nt)}},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(nt.getVisibleCells(),Lt=>{var ot,dt,Ve,Ge;return h.openBlock(),h.createElementBlock("td",{key:Lt.id,class:h.normalizeClass([U.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((ot=Lt.column.columnDef.meta)==null?void 0:ot.cellClass)??"px-16"]),style:h.normalizeStyle({width:(dt=Lt.column.columnDef.meta)==null?void 0:dt.width,maxWidth:(Ve=Lt.column.columnDef.meta)==null?void 0:Ve.maxWidth,textAlign:((Ge=Lt.column.columnDef.meta)==null?void 0:Ge.textAlign)??"left"})},[h.createElementVNode("span",Xut,[h.createVNode(h.unref(fV),{render:Lt.column.columnDef.cell,props:Lt.getContext()},null,8,["render","props"])])],6)}),128))],10,Yut)])),128))],512),De.pinHeaderRow?(h.openBlock(),h.createBlock(Zt,{key:1,class:"bg-fm-color-neutral-gray-100 sticky top-0",table:h.unref(E)},null,8,["table"])):h.createCommentVNode("",!0)]))]),De.hideFooter?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"basis-72 bg-white flex items-center justify-between px-24",style:h.normalizeStyle({maxWidth:ye.value?`${ye.value}px`:void 0})},[fe.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["flex gap-24 items-center justify-between xs:hidden xs:invisible",{"hidden invisible":De.forceMobileFooter}])},[h.createElementVNode("div",Qut,[Zut,h.createVNode(NTe,{"model-value":h.unref(E).getState().pagination.pageSize,items:[...Array.from(Array(5),(nt,Lt)=>(Lt+1)*10).map(nt=>({label:nt.toString(),value:nt})),{label:"All",value:s.rowData.length}],"onUpdate:modelValue":$e[0]||($e[0]=nt=>h.unref(E).setPageSize(nt))},null,8,["model-value","items"])]),h.createElementVNode("span",{class:h.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible",{"hidden invisible":De.forceMobileFooter}])},h.toDisplayString(s.rowData.length<h.unref(E).getState().pagination.pageSize?s.rowData.length:h.unref(E).getState().pagination.pageIndex*h.unref(E).getState().pagination.pageSize+1)+" - "+h.toDisplayString((h.unref(E).getState().pagination.pageIndex+1)*h.unref(E).getState().pagination.pageSize)+" of "+h.toDisplayString(s.rowCount??s.rowData.length)+" items ",3)],2)),h.createElementVNode("div",{class:h.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":fe.value||De.forceMobileFooter,"xs:w-full xs:justify-between":!fe.value}])},[h.createVNode(NTe,{"model-value":h.unref(E).getState().pagination.pageIndex+1,items:Array.from(Array(h.unref(E).getPageCount()),(nt,Lt)=>Lt+1).map(nt=>({label:nt.toString(),value:nt})),"onUpdate:modelValue":$e[1]||($e[1]=nt=>h.unref(E).setPageIndex(nt?nt-1:0))},null,8,["model-value","items"]),h.createElementVNode("span",{class:h.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto",{"mr-auto":fe.value||De.forceMobileFooter}])}," of "+h.toDisplayString(h.unref(E).getPageCount())+" pages ",3),h.createElementVNode("div",Kut,[h.createVNode(gl,{disabled:!h.unref(E).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:$e[2]||($e[2]=()=>h.unref(E).previousPage())},null,8,["disabled"]),h.createVNode(gl,{disabled:!h.unref(E).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:$e[3]||($e[3]=()=>h.unref(E).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),tft=h.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),nft=h.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(i,{emit:s}){const o=i,u=s,f=h.ref(!1),m=h.computed(()=>({vertical:o.vertical,disabled:o.disabled})),y=h.computed(()=>{const N=o.items.slice(0,o.showMoreAt-1),R=o.items.find(U=>{var Y;return U.value===o.modelValue||((Y=U.children)==null?void 0:Y.find(te=>te.value===o.modelValue))}),I=N.map(U=>U.value);return R&&I.includes(R.value)?o.items.slice(0,o.showMoreAt):R?[...N,R]:N}),x=h.computed(()=>{const N=y.value.map(R=>R.value);return o.items.filter(R=>!N.includes(R.value))}),E=N=>{f.value=!1,u("update:modelValue",N)};return(N,R)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex",N.vertical?"flex-col":"flex-row items-center"])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(y.value,I=>h.renderSlot(N.$slots,"default",h.normalizeProps(h.guardReactiveProps({...I,tabsProps:m.value})),()=>[h.createVNode(gTe,h.mergeProps({"model-value":o.modelValue},{children:I.children,label:I.label,icon:I.icon,disabled:I.disabled,badge:I.badge,value:I.value,tabsProps:m.value},{disabled:I.disabled===void 0?N.disabled:I.disabled,vertical:N.vertical,"onUpdate:modelValue":R[0]||(R[0]=U=>u("update:modelValue",U))}),null,16,["model-value","disabled","vertical"])])),256)),x.value.length>0?(h.openBlock(),h.createBlock(nx,{key:0,"show-menu":f.value,class:h.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":N.vertical}]),placement:N.vertical?"right-start":"bottom-start",onMenuChanged:R[1]||(R[1]=I=>f.value=I)},{"menu-button":h.withCtx(()=>[h.createElementVNode("div",{class:h.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[N.vertical?"h-40":"h-[46px]"]])},[h.createVNode(Wo,{name:"more_vert"}),tft],2)]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(x.value,I=>{var U;return h.openBlock(),h.createElementBlock(h.Fragment,{key:I.value},[(U=I.children)!=null&&U.length?(h.openBlock(),h.createBlock(nx,{key:0,placement:"right-start"},{"menu-button":h.withCtx(()=>[h.createVNode(ig,{"model-value":o.modelValue===I.value,label:I.label,icon:I.icon,disabled:I.disabled,expandable:""},{append:h.withCtx(()=>[I.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:I.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(I.children,Y=>(h.openBlock(),h.createBlock(ig,{key:Y.value,"model-value":o.modelValue===Y.value,label:Y.label,icon:Y.icon,disabled:Y.disabled,onClick:te=>E(Y.value)},{append:h.withCtx(()=>[Y.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:Y.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(h.openBlock(),h.createBlock(ig,{key:1,"model-value":o.modelValue===I.value,label:I.label,icon:I.icon,disabled:I.disabled,onClick:Y=>E(I.value)},{append:h.withCtx(()=>[I.badge?(h.openBlock(),h.createBlock(AE,{key:0,value:I.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):h.createCommentVNode("",!0)],2))}}),rft=["tabindex"],ift=h.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(i){const s=i,o=Ml(s,"modelValue"),u=h.computed(()=>s.children.length>0),f=h.ref(!s.expand||s.disabled),m=h.computed(()=>{if(!u.value)return 0;function U(te){return te.children?[te,...te.children.flatMap(U)]:[te]}return 56*(s.children?s.children.flatMap(U):[]).length});function y(){if(!s.disabled){if(u.value){f.value=!f.value;return}o.value=s.value}}const x=h.computed(()=>typeof s.focusable=="boolean"?s.focusable:!s.disabled&&(!f.value||!u.value));function E(U){return U.children&&U.children.length?U.children.some(E):s.modelValue===U.value}const N=h.computed(()=>{const U=E(s);return u.value?U&&f.value:U}),R=h.computed(()=>s.children?s.children.map(({modelValue:U,indentation:Y,active:te,focusable:ae,...ye})=>{const fe=E(ye);return{...ye,expand:fe,focusable:!ye.disabled&&!f.value}}):[]),I=h.computed(()=>{switch(s.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(U,Y)=>{const te=h.resolveComponent("FmCollapsibleTab",!0),ae=h.resolveDirective("wave");return h.openBlock(),h.createElementBlock("div",{style:h.normalizeStyle({paddingLeft:`${I.value}px`}),class:"flex flex-col px-8"},[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!U.disabled,"cursor-not-allowed":U.disabled,"bg-fm-color-system-warning-100":N.value}]),tabindex:x.value?"0":"-1",type:"button",onClick:y},[U.icon?(h.openBlock(),h.createBlock(Wo,{key:0,class:h.normalizeClass({"text-fm-color-typo-disabled":U.disabled,"text-fm-color-typo-primary":!U.disabled&&!N.value,"text-fm-color-primary":!U.disabled&&N.value}),name:U.icon},null,8,["class","name"])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:h.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!U.disabled&&!N.value,"text-fm-color-primary":!U.disabled&&N.value,"text-fm-color-typo-disabled":U.disabled}])},h.toDisplayString(U.label),3),U.badge?(h.openBlock(),h.createBlock(AE,{key:1,value:U.badge,inline:"",variant:"numeric"},null,8,["value"])):h.createCommentVNode("",!0),u.value?(h.openBlock(),h.createElementBlock("div",{key:2,style:h.normalizeStyle({transformOrigin:"center",transform:`rotate(${f.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[h.createVNode(Wo,{class:h.normalizeClass({"text-fm-color-neutral-gray-300":!U.disabled,"text-fm-color-typo-disabled":U.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):h.createCommentVNode("",!0)],10,rft)),[[ae,!U.disabled]]),u.value?(h.openBlock(),h.createElementBlock("div",{key:0,style:h.normalizeStyle({maxHeight:f.value?0:`${m.value}px`,transition:"max-height 250ms",transitionTimingFunction:f.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(R.value,(ye,fe)=>(h.openBlock(),h.createBlock(te,h.mergeProps({key:fe,"model-value":h.unref(o),"onUpdate:modelValue":Y[0]||(Y[0]=Ne=>h.isRef(o)?o.value=Ne:null),indentation:U.indentation+1},ye),null,16,["model-value","indentation"]))),128))],4)):h.createCommentVNode("",!0)],4)}}}),sft={class:"flex flex-col"},aft=h.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(i){const s=i,o=Ml(s,"modelValue"),u=h.computed(()=>s.items?s.items.map(({modelValue:m,...y})=>y):[]);function f(m){function y(E){return E.children?E.children.flatMap(y):[E.value]}return(m.children?m.children.flatMap(y):[m.value]).includes(s.modelValue)}return(m,y)=>(h.openBlock(),h.createElementBlock("div",sft,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value,(x,E)=>(h.openBlock(),h.createBlock(ift,h.mergeProps({key:E},x,{"model-value":h.unref(o),"onUpdate:modelValue":y[0]||(y[0]=N=>h.isRef(o)?o.value=N:null),active:f(x),expand:f(x)}),null,16,["model-value","active","expand"]))),128))]))}}),oft=h.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"},rounded:{default:()=>"xxxl"}},setup(i){const s=i,o=h.computed(()=>{if(s.initials)return s.initials.slice(0,2);if(s.name){const[u,f]=s.name.split(" ");return f?`${u[0]}${f[0]}`:u.slice(0,2)}return s.src?"":"?"});return(u,f)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["inline-flex items-center justify-center uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":u.size==="sm","w-36 h-36 fm-typo-en-body-sm-600":u.size==="sm2","w-40 h-40 fm-typo-en-body-md-600":u.size==="md","w-48 h-48 fm-typo-en-body-lg-600":u.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":u.size==="xl","bg-fm-color-neutral-gray-100":!s.src},{"rounded-xxxl":u.rounded==="xxxl","rounded-xxl":u.rounded==="xxl","rounded-xl":u.rounded==="xl","rounded-lg":u.rounded==="lg","rounded-md":u.rounded==="md","rounded-sm":u.rounded==="sm"}]),style:h.normalizeStyle({background:s.src?`url(${s.src})`:void 0,backgroundSize:s.src?"cover":void 0,backgroundPosition:s.src?"center":void 0,backgroundRepeat:s.src?"no-repeat":void 0})},h.toDisplayString(o.value),7))}}),cft=h.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:i=>i.src?"":"image"},size:{default:()=>"md"}},setup(i){const s=i;return(o,u)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-56 h-56 fm-typo-en-body-lg-600":o.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":o.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!s.src}]),style:h.normalizeStyle({background:s.src?`url(${s.src})`:void 0,backgroundSize:s.src?"cover":void 0,backgroundPosition:s.src?"center":void 0,backgroundRepeat:s.src?"no-repeat":void 0})},[o.icon?(h.openBlock(),h.createBlock(Wo,{key:0,name:o.icon},null,8,["name"])):h.createCommentVNode("",!0)],6))}}),lft={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},uft={class:"flex gap-4 items-center xs:hidden"},fft={key:1,class:"hidden xs:flex"},_ft={class:"absolute bottom-16 hidden right-16 xs:inline"},dft=h.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["click:back","click:action"],setup(i,{emit:s}){const o=i,u=s,f=h.computed(()=>{const y=[...o.actions],x=y.findIndex(U=>U.isPrimary),E=y[x],[N,R,...I]=y.filter((U,Y)=>Y!==x);return{primaryAction:E,firstSecondaryAction:N,secondSecondaryAction:R,showMoreSecondary:I,bottomSheetActions:y.filter(U=>!U.isPrimary),fabActions:y.filter(U=>U.isPrimary)}}),m=h.ref(!1);return(y,x)=>(h.openBlock(),h.createElementBlock("div",lft,[y.backButton?(h.openBlock(),h.createBlock(gl,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:x[0]||(x[0]=E=>u("click:back"))})):h.createCommentVNode("",!0),h.renderSlot(y.$slots,"prepend"),h.createVNode(Vee,{class:"flex-grow",title:y.title,description:y.description,"title-bold":""},null,8,["title","description"]),h.createElementVNode("div",uft,[f.value.firstSecondaryAction?(h.openBlock(),h.createBlock(gl,{key:0,label:f.value.firstSecondaryAction.label,"prepend-icon":f.value.firstSecondaryAction.prependIcon,"append-icon":f.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[1]||(x[1]=E=>u("click:action",f.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.secondSecondaryAction?(h.openBlock(),h.createBlock(gl,{key:1,label:f.value.secondSecondaryAction.label,"prepend-icon":f.value.secondSecondaryAction.prependIcon,"append-icon":f.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[2]||(x[2]=E=>u("click:action",f.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.showMoreSecondary.length>1?(h.openBlock(),h.createBlock(nx,{key:2},{"menu-button":h.withCtx(()=>[h.createVNode(gl,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value.showMoreSecondary,E=>(h.openBlock(),h.createBlock(ig,{key:E.value,label:E.label,icon:E.prependIcon,onClick:N=>u("click:action",E.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):f.value.showMoreSecondary.length===1?(h.openBlock(),h.createBlock(gl,{key:3,label:f.value.showMoreSecondary[0].label,"prepend-icon":f.value.showMoreSecondary[0].prependIcon,"append-icon":f.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:x[3]||(x[3]=E=>u("click:action",f.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0),f.value.primaryAction?(h.openBlock(),h.createBlock(gl,{key:4,label:f.value.primaryAction.label,"prepend-icon":f.value.primaryAction.prependIcon,"append-icon":f.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:x[4]||(x[4]=E=>u("click:action",f.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0)]),f.value.bottomSheetActions.length>0?(h.openBlock(),h.createElementBlock("div",fft,[h.createVNode(gl,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:x[5]||(x[5]=E=>m.value=!0)})])):h.createCommentVNode("",!0),h.renderSlot(y.$slots,"append"),(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(cK,{"model-value":m.value,"onUpdate:modelValue":x[6]||(x[6]=E=>m.value=E),"dismiss-away":"","z-index":o.zIndexForBottomSheet},{default:h.withCtx(()=>[h.createVNode($ee,null,{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value.bottomSheetActions,E=>(h.openBlock(),h.createBlock(Bee,{key:E.value,class:"hover:bg-fm-color-neutral-gray-100",label:E.label,onClick:N=>{u("click:action",E.value),m.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),h.createElementVNode("div",_ft,[f.value.primaryAction?(h.openBlock(),h.createBlock(gl,{key:0,class:"fm-shadow-light-100",label:f.value.primaryAction.label,"prepend-icon":f.value.primaryAction.prependIcon,"append-icon":f.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:x[7]||(x[7]=E=>u("click:action",f.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):h.createCommentVNode("",!0)])]))]))}}),pft=["colSpan","onClick"],mft={class:"flex gap-8 items-center justify-between"},gft=h.defineComponent({__name:"FmTableHeader",props:{table:{}},setup(i){function s(o){return o.column.columnDef.meta}return(o,u)=>{const f=h.resolveComponent("FmIcon");return h.openBlock(),h.createElementBlock("thead",null,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.table.getHeaderGroups(),m=>(h.openBlock(),h.createElementBlock("tr",{key:m.id},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(m.headers,y=>{var x,E,N,R;return h.openBlock(),h.createElementBlock("th",{key:y.id,colSpan:y.colSpan,class:h.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",y.column.getCanSort()?"cursor-pointer select-none":"",((x=s(y))==null?void 0:x.headerClass)??"px-16 py-12"]),style:h.normalizeStyle({width:`${(E=s(y))==null?void 0:E.width}`,maxWidth:(N=s(y))==null?void 0:N.maxWidth,textAlign:((R=s(y))==null?void 0:R.textAlign)??"left"}),onClick:I=>{var U;return(U=y.column.getToggleSortingHandler())==null?void 0:U(I)}},[h.createElementVNode("div",mft,[y.isPlaceholder?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(fV),{key:0,render:y.column.columnDef.header,props:y.getContext()},null,8,["render","props"])),y.column.getCanSort()?(h.openBlock(),h.createBlock(f,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[y.column.getIsSorted()]??"unfold_more"},null,8,["name"])):h.createCommentVNode("",!0)])],14,pft)}),128))]))),128))])}}}),hft={class:"fm-typo-title-sm-700 font-bold"},yft={class:"flex"},PTe={FmBadge:AE,FmBottomSheet:cK,FmBreadcrumb:_Xe,FmButton:gl,FmButtonGroup:xXe,FmCard:uK,FmCardActionArea:TXe,FmCardActions:CXe,FmCardHeader:DXe,FmCardMedia:AXe,FmCardSection:fK,FmCardSubtitle:Dve,FmCardTitle:Eve,FmChip:_K,FmChipGroup:dK,FmDialog:MXe,FmDropField:$Xe,FmDynamicDialog:Pve,FmLineChart:QSe,FmPieChart:cnt,FmBarChart:pnt,FmScorecard:Au(h.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(i){const s=i,o=(y,x)=>{if(y===""||x==="")return null;const E=Number(y),N=Number(x);let R=0;N===0?E===0?R=0:R=1:R=(E-N)/N;const I=u(R);return{value:isNaN(R)?"":`${(R*100).toFixed(0)}%`,icon:I}};function u(y){return y>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:y<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const f=h.computed(()=>{const{value:y,compareValue:x}=s;return x?o(y,x):null}),m=h.computed(()=>{var y;return((y=s.sparklineData)==null?void 0:y.datasets.map(x=>{var E;return{label:x.name,data:x.values,fill:!0,color:((E=f.value)==null?void 0:E.icon.color)??"fm-color-system-info-300"}}))??[]});return(y,x)=>(h.openBlock(),h.createBlock(uK,{variant:"outlined",class:"flex flex-col gap-2 p-5"},{default:h.withCtx(()=>[h.createVNode(gee,{content:s.description},{default:h.withCtx(()=>[h.renderSlot(y.$slots,"title",{},()=>[h.createElementVNode("p",{class:h.normalizeClass(["fm-typo-body-md-400",s.description?"border-b-2 border-dotted":""])},h.toDisplayString(s.title),3)],!0)]),_:3},8,["content"]),h.createElementVNode("p",hft,h.toDisplayString(s.value),1),y.hideCompare?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("div",yft,[f.value?(h.openBlock(),h.createBlock(_K,{key:0,compact:"",class:h.normalizeClass(`bg-${f.value.icon.tailwind}`)},{default:h.withCtx(()=>[h.createVNode(Wo,{name:f.value.icon.name,color:f.value.icon.color},null,8,["name","color"]),h.createElementVNode("p",{class:"fm-typo-body-md-700",style:h.normalizeStyle({color:f.value.icon.color})},h.toDisplayString(f.value.value),5)]),_:1},8,["class"])):h.createCommentVNode("",!0)]),h.renderSlot(y.$slots,"compare",{},void 0,!0)],64)),s.sparklineData?(h.openBlock(),h.createBlock(uK,{key:1},{default:h.withCtx(()=>[h.createVNode(QSe,{class:"sparkline",datasets:m.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:s.sparklineData.dimension}},null,8,["datasets","x-axis"])]),_:1})):h.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-09b20d8a"]]),FmCheckbox:KSe,FmDatePicker:Frt,FmDatePickerMobile:xxe,FmDateRangePicker:Jit,FmDateRangePickerMobile:Exe,FmSimpleDatePicker:mst,FmSimpleDatePickerMobile:wxe,FmSimpleDateRangePicker:Hst,FmSimpleDateRangePickerMobile:Axe,FmField:yd,FmForm:Gst,FmFormGroup:Fg,FmHelperText:exe,FmLabel:qE,FmPhoneNumber:act,FmPinField:lct,FmRadio:gct,FmRadioGroup:hct,FmSearch:Fee,FmGlobalSearch:Uct,FmSelect:sA,FmStepperField:Yct,FmSwitch:yee,FmTextField:Oee,FmTextarea:Qct,FmTimeInput:iV,FmTimePicker:ult,FmTimeRangePicker:ylt,FmIcon:Wo,FmList:$ee,FmListItem:Bee,FmMenu:nx,FmMenuDeprecated:Tlt,FmMenuDivider:Txe,FmMenuHeader:Clt,FmMenuItem:ig,FmCircularProgress:G8,FmLinearProgress:Nlt,FmSideSheet:Mlt,FmSnackbar:mTe,FmSpacer:DC,FmStep:jlt,FmStepper:Ult,FmTab:gTe,FmTable:eft,FmTableToolbar:Zlt,FmTableHeader:gft,FmTabs:nft,FmCollapsibleTabs:aft,FmTooltip:gee,FmAvatar:oft,FmThumbnail:cft,FmPageHead:dft,FmTopSheet:fTe},vft=h.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(i){const s=i,o=h.ref(!1),u=h.ref(null),f=h.ref(null),m=h.computed(()=>s.reference());let y;const{floatingStyles:x,middlewareData:E,placement:N}=wP(m,u,{whileElementsMounted:EP,placement:s.placement,middleware:[DP(),TP({mainAxis:6}),gxe({element:f})]}),R=h.computed(()=>{var te,ae,ye,fe;const Y={top:"bottom",right:"left",bottom:"top",left:"right"}[N.value];return{left:((te=E.value.arrow)==null?void 0:te.x)!=null?`${(ae=E.value.arrow)==null?void 0:ae.x}px`:"",top:((ye=E.value.arrow)==null?void 0:ye.y)!=null?`${(fe=E.value.arrow)==null?void 0:fe.y}px`:"",[Y]:"-3px"}}),I=()=>{s.disabled||(y&&clearTimeout(y),y=setTimeout(()=>{o.value=!0},250))},U=()=>{s.disabled||(y&&clearTimeout(y),y=setTimeout(()=>{o.value=!1},250))};return h.onMounted(()=>{m.value.addEventListener("pointerdown",I),m.value.addEventListener("pointermove",Y=>{Y.pointerType!=="touch"&&I()}),m.value.addEventListener("pointerleave",U),m.value.addEventListener("pointerup",U)}),h.onBeforeUnmount(()=>{m.value.removeEventListener("pointerdown",I),m.value.removeEventListener("pointermove",Y=>{Y.pointerType!=="touch"&&I()}),m.value.removeEventListener("pointerleave",U),m.value.removeEventListener("pointerup",U)}),(Y,te)=>o.value&&!Y.disabled?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:u,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:h.normalizeStyle(h.unref(x))},[h.withDirectives(h.createElementVNode("div",{ref_key:"arrowEl",ref:f,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:h.normalizeStyle(R.value)},null,4),[[h.vShow,!Y.hideArrow]]),h.createTextVNode(" "+h.toDisplayString(Y.content),1)],4)):h.createCommentVNode("",!0)}});let ite;const VC=h.ref([]);let ITe=0;const bft=()=>{if(ite)return;const i=document.createElement("div");document.body.appendChild(i),ite=h.createApp({render:()=>VC.value.map(s=>h.h(vft,s))}),ite.mount(i)},_V=i=>{if(i){for(const s of["top","right","bottom","left"])if(i[s])return s}return"top"},OTe=(i,s)=>{const{value:o,modifiers:u}=s;bft(),i.$_fmTooltipId=ITe,ITe+=1,typeof o=="string"?VC.value.push({id:i.$_fmTooltipId,reference:()=>i,content:o.toString(),placement:_V(u),hideArrow:!1}):o&&typeof o=="object"&&VC.value.push({id:i.$_fmTooltipId,reference:()=>i,content:o.content.toString(),placement:_V(u),disabled:o.disabled??!1,hideArrow:o.hideArrow??!1})},Sft={mounted:OTe,updated:(i,s)=>{const{value:o,modifiers:u}=s,f=VC.value.findIndex(m=>m.id===i.$_fmTooltipId);if(f===-1){OTe(i,s);return}typeof o=="string"?VC.value[f]={id:i.$_fmTooltipId,reference:()=>i,content:o.toString(),placement:_V(u),hideArrow:!1}:o&&typeof o=="object"&&(VC.value[f]={id:i.$_fmTooltipId,reference:()=>i,content:o.content.toString(),disabled:o.disabled??!1,placement:_V(u),hideArrow:o.hideArrow??!1})},beforeUnmount:i=>{const s=VC.value.findIndex(o=>o.id===i.$_fmTooltipId);s!==-1&&VC.value.splice(s,1)}},dV=16,xft=h.defineComponent({__name:"FmSnackbarToast",setup(i){const{breakpoints:s}=EC(),o=h.inject(lK),u=h.computed(()=>{var y;return[...((y=o==null?void 0:o.store)==null?void 0:y.snackbars)??[]].reduce(({currentSum:x,tops:E},N)=>{E.push({id:N.id,accumulatedHeight:x});const R=N.mountStage===jC.EXPIRED?0:dV+N.renderedHeight;return{currentSum:x+R,tops:E}},{currentSum:dV,tops:new Array}).tops}),f=h.computed(()=>{var m,y;return(y=(m=o==null?void 0:o.store)==null?void 0:m.snackbars)==null?void 0:y.map(x=>{var N,R,I,U,Y,te;let E=0;switch(x.mountStage){case jC.PREMOUNT:{E=s.value.xs?0:dV;break}case jC.MOUNTED:{E=((I=(R=(N=u.value)==null?void 0:N.find)==null?void 0:R.call(N,ae=>ae.id===x.id))==null?void 0:I.accumulatedHeight)||dV;break}case jC.EXPIRED:{E=((te=(Y=(U=u.value)==null?void 0:U.find)==null?void 0:Y.call(U,ae=>ae.id===x.id))==null?void 0:te.accumulatedHeight)||0,E=Math.max(0,E-x.renderedHeight);break}}return{...x,top:E}})});return(m,y)=>(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.value,x=>(h.openBlock(),h.createBlock(h.Teleport,{key:x.id,to:"body"},[h.createVNode(mTe,{class:"fixed transition-all z-10",variant:x.type,title:x.title,description:x.message,action:x.action,dismissable:x.dismissable,style:h.normalizeStyle(h.unref(s).xs?{bottom:`${x.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:x.mountStage===h.unref(jC).EXPIRED?0:1}:{top:`${x.top}px`,right:x.mountStage===h.unref(jC).PREMOUNT?"-20px":"16px",opacity:x.mountStage===h.unref(jC).EXPIRED?0:1}),onVnodeMounted:E=>{var N;return(N=h.unref(o))==null?void 0:N.onSnackbarMounted(x.id,E.el.scrollHeight)},onOnAction:()=>{var E,N;(E=x==null?void 0:x.onAction)==null||E.call(x),(N=h.unref(o))==null||N.close(x.id)},onOnDismiss:()=>{var E;return(E=h.unref(o))==null?void 0:E.close(x.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var jC=(i=>(i.PREMOUNT="PREMOUNT",i.MOUNTED="MOUNTED",i.EXPIRED="EXPIRED",i))(jC||{});class Tft{constructor(){ws(this,"store",h.reactive({snackbars:new Array}))}open(s,o){const u=Math.random().toString(16).slice(2),f=[{...s,id:u,mountStage:"PREMOUNT",duration:o===null?null:o??5e3,renderedHeight:0,type:(s==null?void 0:s.type)??"info",dismissable:typeof(s==null?void 0:s.dismissable)=="boolean"?s.dismissable:!0},...this.store.snackbars];return this.store.snackbars=f,u}onSnackbarMounted(s,o){const u=this.store.snackbars.findIndex(m=>m.id===s);if(u===-1)return;const f=this.store.snackbars[u];this.store.snackbars[u]={...f,renderedHeight:o},setTimeout(()=>{const m=this.store.snackbars[u];this.store.snackbars[u]={...m,mountStage:"MOUNTED"}}),typeof f.duration=="number"&&setTimeout(()=>{this.close(s)},f.duration)}close(s){const o=this.store.snackbars.findIndex(f=>f.id===s);if(o===-1)return;const u=this.store.snackbars[o];this.store.snackbars[o]={...u,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(s)},500)}removeSnackbar(s){const o=this.store.snackbars.findIndex(u=>u.id===s);o!==-1&&this.store.snackbars.splice(o,1)}}const kft={install(i){i.provide(lK,new Tft);const s=document.body,o=h.createVNode(xft);o.appContext=i._context,h.render(o,s)}};function Cft(){var i=window.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);var o=i.indexOf("Trident/");if(o>0){var u=i.indexOf("rv:");return parseInt(i.substring(u+3,i.indexOf(".",u)),10)}var f=i.indexOf("Edge/");return f>0?parseInt(i.substring(f+5,i.indexOf(".",f)),10):-1}let pV;function ste(){ste.init||(ste.init=!0,pV=Cft()!==-1)}var mV={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ste(),h.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const i=document.createElement("object");this._resizeObject=i,i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex",-1),i.onload=this.addResizeHandlers,i.type="text/html",pV&&this.$el.appendChild(i),i.data="about:blank",pV||this.$el.appendChild(i)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!pV&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Eft=h.withScopeId("data-v-b329ee4c");h.pushScopeId("data-v-b329ee4c");const Dft={class:"resize-observer",tabindex:"-1"};h.popScopeId();const wft=Eft((i,s,o,u,f,m)=>(h.openBlock(),h.createBlock("div",Dft)));mV.render=wft,mV.__scopeId="data-v-b329ee4c",mV.__file="src/components/ResizeObserver.vue";function gV(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gV=function(s){return typeof s}:gV=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},gV(i)}function Aft(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function FTe(i,s){for(var o=0;o<s.length;o++){var u=s[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Nft(i,s,o){return s&&FTe(i.prototype,s),o&&FTe(i,o),i}function MTe(i){return Pft(i)||Ift(i)||Oft(i)||Fft()}function Pft(i){if(Array.isArray(i))return ate(i)}function Ift(i){if(typeof Symbol<"u"&&Symbol.iterator in Object(i))return Array.from(i)}function Oft(i,s){if(i){if(typeof i=="string")return ate(i,s);var o=Object.prototype.toString.call(i).slice(8,-1);if(o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set")return Array.from(i);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ate(i,s)}}function ate(i,s){(s==null||s>i.length)&&(s=i.length);for(var o=0,u=new Array(s);o<s;o++)u[o]=i[o];return u}function Fft(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
55
55
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mft(i){var s;return typeof i=="function"?s={callback:i}:s=i,s}function Lft(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,f,m,y=function(E){for(var N=arguments.length,R=new Array(N>1?N-1:0),I=1;I<N;I++)R[I-1]=arguments[I];if(m=R,!(u&&E===f)){var U=o.leading;typeof U=="function"&&(U=U(E,f)),(!u||E!==f)&&U&&i.apply(void 0,[E].concat(MTe(m))),f=E,clearTimeout(u),u=setTimeout(function(){i.apply(void 0,[E].concat(MTe(m))),u=0},s)}};return y._clear=function(){clearTimeout(u),u=null},y}function LTe(i,s){if(i===s)return!0;if(gV(i)==="object"){for(var o in i)if(!LTe(i[o],s[o]))return!1;return!0}return!1}var Rft=function(){function i(s,o,u){Aft(this,i),this.el=s,this.observer=null,this.frozen=!1,this.createObserver(o,u)}return Nft(i,[{key:"createObserver",value:function(o,u){var f=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Mft(o),this.callback=function(x,E){f.options.callback(x,E),x&&f.options.once&&(f.frozen=!0,f.destroyObserver())},this.callback&&this.options.throttle){var m=this.options.throttleOptions||{},y=m.leading;this.callback=Lft(this.callback,this.options.throttle,{leading:function(E){return y==="both"||y==="visible"&&E||y==="hidden"&&!E}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(x){var E=x[0];if(x.length>1){var N=x.find(function(I){return I.isIntersecting});N&&(E=N)}if(f.callback){var R=E.isIntersecting&&E.intersectionRatio>=f.threshold;if(R===f.oldResult)return;f.oldResult=R,f.callback(R,E)}},this.options.intersection),h.nextTick(function(){f.observer&&f.observer.observe(f.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),i}();function RTe(i,s,o){var u=s.value;if(u)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var f=new Rft(i,u,o);i._vue_visibilityState=f}}function $ft(i,s,o){var u=s.value,f=s.oldValue;if(!LTe(u,f)){var m=i._vue_visibilityState;if(!u){$Te(i);return}m?m.createObserver(u,o):RTe(i,{value:u},o)}}function $Te(i){var s=i._vue_visibilityState;s&&(s.destroyObserver(),delete i._vue_visibilityState)}var Bft={beforeMount:RTe,updated:$ft,unmounted:$Te};function Vft(i){return{all:i=i||new Map,on:function(s,o){var u=i.get(s);u&&u.push(o)||i.set(s,[o])},off:function(s,o){var u=i.get(s);u&&u.splice(u.indexOf(o)>>>0,1)},emit:function(s,o){(i.get(s)||[]).slice().map(function(u){u(o)}),(i.get("*")||[]).slice().map(function(u){u(s,o)})}}}var BTe={itemsLimit:1e3},jft=/(auto|scroll)/;function VTe(i,s){return i.parentNode===null?s:VTe(i.parentNode,s.concat([i]))}var ote=function(s,o){return getComputedStyle(s,null).getPropertyValue(o)},zft=function(s){return ote(s,"overflow")+ote(s,"overflow-y")+ote(s,"overflow-x")},Jft=function(s){return jft.test(zft(s))};function jTe(i){if(i instanceof HTMLElement||i instanceof SVGElement){for(var s=VTe(i.parentNode,[]),o=0;o<s.length;o+=1)if(Jft(s[o]))return s[o];return document.scrollingElement||document.documentElement}}function cte(i){"@babel/helpers - typeof";return cte=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},cte(i)}var zTe={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(s){return["vertical","horizontal"].includes(s)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function JTe(){return this.items.length&&cte(this.items[0])!=="object"}var lte=!1;if(typeof window<"u"){lte=!1;try{var Uft=Object.defineProperty({},"passive",{get:function(){lte=!0}});window.addEventListener("test",null,Uft)}catch{}}let qft=0;var FP={name:"RecycleScroller",components:{ResizeObserver:mV},directives:{ObserveVisibility:Bft},props:{...zTe,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const i={"-1":{accumulator:0}},s=this.items,o=this.sizeField,u=this.minItemSize;let f=1e4,m=0,y;for(let x=0,E=s.length;x<E;x++)y=s[x][o]||u,y<f&&(f=y),m+=y,i[x]={accumulator:m,size:y};return this.$_computedMinItemSize=f,i}return[]},simpleArray:JTe,itemIndexByKey(){const{keyField:i,items:s}=this,o={};for(let u=0,f=s.length;u<f;u++)o[s[u][i]]=u;return o}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const i=this.$_lastUpdateScrollPosition;typeof i=="number"&&this.$nextTick(()=>{this.scrollToPosition(i)})},beforeUnmount(){this.removeListeners()},methods:{addView(i,s,o,u,f){const m=h.markRaw({id:qft++,index:s,used:!0,key:u,type:f}),y=h.shallowReactive({item:o,position:0,nr:m});return i.push(y),y},unuseView(i,s=!1){const o=this.$_unusedViews,u=i.nr.type;let f=o.get(u);f||(f=[],o.set(u,f)),f.push(i),s||(i.nr.used=!1,i.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(i){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const s=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:o}=this.updateVisibleItems(!1,!0);o||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});s(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&s()},this.updateInterval))}},handleVisibilityChange(i,s){this.ready&&(i||s.boundingClientRect.width!==0||s.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(i,s=!1){const o=this.itemSize,u=this.gridItems||1,f=this.itemSecondarySize||o,m=this.$_computedMinItemSize,y=this.typeField,x=this.simpleArray?null:this.keyField,E=this.items,N=E.length,R=this.sizes,I=this.$_views,U=this.$_unusedViews,Y=this.pool,te=this.itemIndexByKey;let ae,ye,fe,Ne,Pe;if(!N)ae=ye=Ne=Pe=fe=0;else if(this.$_prerender)ae=Ne=0,ye=Pe=Math.min(this.prerender,E.length),fe=null;else{const Lt=this.getScroll();if(s){let Ve=Lt.start-this.$_lastUpdateScrollPosition;if(Ve<0&&(Ve=-Ve),o===null&&Ve<m||Ve<o)return{continuous:!0}}this.$_lastUpdateScrollPosition=Lt.start;const ot=this.buffer;Lt.start-=ot,Lt.end+=ot;let dt=0;if(this.$refs.before&&(dt=this.$refs.before.scrollHeight,Lt.start-=dt),this.$refs.after){const Ve=this.$refs.after.scrollHeight;Lt.end+=Ve}if(o===null){let Ve,Ge=0,Ot=N-1,Fe=~~(N/2),nn;do nn=Fe,Ve=R[Fe].accumulator,Ve<Lt.start?Ge=Fe:Fe<N-1&&R[Fe+1].accumulator>Lt.start&&(Ot=Fe),Fe=~~((Ge+Ot)/2);while(Fe!==nn);for(Fe<0&&(Fe=0),ae=Fe,fe=R[N-1].accumulator,ye=Fe;ye<N&&R[ye].accumulator<Lt.end;ye++);for(ye===-1?ye=E.length-1:(ye++,ye>N&&(ye=N)),Ne=ae;Ne<N&&dt+R[Ne].accumulator<Lt.start;Ne++);for(Pe=Ne;Pe<N&&dt+R[Pe].accumulator<Lt.end;Pe++);}else{ae=~~(Lt.start/o*u);const Ve=ae%u;ae-=Ve,ye=Math.ceil(Lt.end/o*u),Ne=Math.max(0,Math.floor((Lt.start-dt)/o*u)),Pe=Math.floor((Lt.end-dt)/o*u),ae<0&&(ae=0),ye>N&&(ye=N),Ne<0&&(Ne=0),Pe>N&&(Pe=N),fe=Math.ceil(N/u)*o}}ye-ae>BTe.itemsLimit&&this.itemsLimitError(),this.totalSize=fe;let De;const $e=ae<=this.$_endIndex&&ye>=this.$_startIndex;if($e)for(let Lt=0,ot=Y.length;Lt<ot;Lt++)De=Y[Lt],De.nr.used&&(i&&(De.nr.index=te[De.item[x]]),(De.nr.index==null||De.nr.index<ae||De.nr.index>=ye)&&this.unuseView(De));const Ct=$e?null:new Map;let Nt,Zt,nt;for(let Lt=ae;Lt<ye;Lt++){Nt=E[Lt];const ot=x?Nt[x]:Nt;if(ot==null)throw new Error(`Key is ${ot} on item (keyField is '${x}')`);if(De=I.get(ot),!o&&!R[Lt].size){De&&this.unuseView(De);continue}Zt=Nt[y];let dt=U.get(Zt),Ve=!1;if(!De)$e?dt&&dt.length?De=dt.pop():De=this.addView(Y,Lt,Nt,ot,Zt):(nt=Ct.get(Zt)||0,(!dt||nt>=dt.length)&&(De=this.addView(Y,Lt,Nt,ot,Zt),this.unuseView(De,!0),dt=U.get(Zt)),De=dt[nt],Ct.set(Zt,nt+1)),I.delete(De.nr.key),De.nr.used=!0,De.nr.index=Lt,De.nr.key=ot,De.nr.type=Zt,I.set(ot,De),Ve=!0;else if(!De.nr.used&&(De.nr.used=!0,Ve=!0,dt)){const Ge=dt.indexOf(De);Ge!==-1&&dt.splice(Ge,1)}De.item=Nt,Ve&&(Lt===E.length-1&&this.$emit("scroll-end"),Lt===0&&this.$emit("scroll-start")),o===null?(De.position=R[Lt-1].accumulator,De.offset=0):(De.position=Math.floor(Lt/u)*o,De.offset=Lt%u*f)}return this.$_startIndex=ae,this.$_endIndex=ye,this.emitUpdate&&this.$emit("update",ae,ye,Ne,Pe),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:$e}},getListenerTarget(){let i=jTe(this.$el);return window.document&&(i===window.document.documentElement||i===window.document.body)&&(i=window),i},getScroll(){const{$el:i,direction:s}=this,o=s==="vertical";let u;if(this.pageMode){const f=i.getBoundingClientRect(),m=o?f.height:f.width;let y=-(o?f.top:f.left),x=o?window.innerHeight:window.innerWidth;y<0&&(x+=y,y=0),y+x>m&&(x=m-y),u={start:y,end:y+x}}else o?u={start:i.scrollTop,end:i.scrollTop+i.clientHeight}:u={start:i.scrollLeft,end:i.scrollLeft+i.clientWidth};return u},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,lte?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(i){let s;const o=this.gridItems||1;this.itemSize===null?s=i>0?this.sizes[i-1].accumulator:0:s=Math.floor(i/o)*this.itemSize,this.scrollToPosition(s)},scrollToPosition(i){const s=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let o,u,f;if(this.pageMode){const m=jTe(this.$el),y=m.tagName==="HTML"?0:m[s.scroll],x=m.getBoundingClientRect(),N=this.$el.getBoundingClientRect()[s.start]-x[s.start];o=m,u=s.scroll,f=i+y+N}else o=this.$el,u=s.scroll,f=i;o[u]=f},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((i,s)=>i.nr.index-s.nr.index)}}};const Wft={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Hft={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Gft(i,s,o,u,f,m){const y=h.resolveComponent("ResizeObserver"),x=h.resolveDirective("observe-visibility");return h.withDirectives((h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["vue-recycle-scroller",{ready:f.ready,"page-mode":o.pageMode,[`direction-${i.direction}`]:!0}]),onScrollPassive:s[0]||(s[0]=(...E)=>m.handleScroll&&m.handleScroll(...E))},[i.$slots.before?(h.openBlock(),h.createElementBlock("div",Wft,[h.renderSlot(i.$slots,"before")],512)):h.createCommentVNode("v-if",!0),(h.openBlock(),h.createBlock(h.resolveDynamicComponent(o.listTag),{ref:"wrapper",style:h.normalizeStyle({[i.direction==="vertical"?"minHeight":"minWidth"]:f.totalSize+"px"}),class:h.normalizeClass(["vue-recycle-scroller__item-wrapper",o.listClass])},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(f.pool,E=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(o.itemTag),h.mergeProps({key:E.nr.id,style:f.ready?{transform:`translate${i.direction==="vertical"?"Y":"X"}(${E.position}px) translate${i.direction==="vertical"?"X":"Y"}(${E.offset}px)`,width:o.gridItems?`${i.direction==="vertical"&&o.itemSecondarySize||o.itemSize}px`:void 0,height:o.gridItems?`${i.direction==="horizontal"&&o.itemSecondarySize||o.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[o.itemClass,{hover:!o.skipHover&&f.hoverKey===E.nr.key}]]},h.toHandlers(o.skipHover?{}:{mouseenter:()=>{f.hoverKey=E.nr.key},mouseleave:()=>{f.hoverKey=null}})),{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default",{item:E.item,index:E.nr.index,active:E.nr.used})]),_:2},1040,["style","class"]))),128)),h.renderSlot(i.$slots,"empty")]),_:3},8,["style","class"])),i.$slots.after?(h.openBlock(),h.createElementBlock("div",Hft,[h.renderSlot(i.$slots,"after")],512)):h.createCommentVNode("v-if",!0),h.createVNode(y,{onNotify:m.handleResize},null,8,["onNotify"])],34)),[[x,m.handleVisibilityChange]])}FP.render=Gft,FP.__file="src/components/RecycleScroller.vue";var hV={name:"DynamicScroller",components:{RecycleScroller:FP},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(i=>{requestAnimationFrame(()=>{if(Array.isArray(i)){for(const s of i)if(s.target&&s.target.$_vs_onResize){let o,u;if(s.borderBoxSize){const f=s.borderBoxSize[0];o=f.inlineSize,u=f.blockSize}else o=s.contentRect.width,u=s.contentRect.height;s.target.$_vs_onResize(s.target.$_vs_id,o,u)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...zTe,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:JTe,itemsWithSize(){const i=[],{items:s,keyField:o,simpleArray:u}=this,f=this.vscrollData.sizes,m=s.length;for(let y=0;y<m;y++){const x=s[y],E=u?y:x[o];let N=f[E];typeof N>"u"&&!this.$_undefinedMap[E]&&(N=0),i.push({item:x,id:E,size:N})}return i}},watch:{items(){this.forceUpdate()},simpleArray:{handler(i){this.vscrollData.simpleArray=i},immediate:!0},direction(i){this.forceUpdate(!0)},itemsWithSize(i,s){const o=this.$el.scrollTop;let u=0,f=0;const m=Math.min(i.length,s.length);for(let x=0;x<m&&!(u>=o);x++)u+=s[x].size||this.minItemSize,f+=i[x].size||this.minItemSize;const y=f-u;y!==0&&(this.$el.scrollTop+=y)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Vft()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(i=!1){(i||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(i){const s=this.$refs.scroller;s&&s.scrollToItem(i)},getItemSize(i,s=void 0){const o=this.simpleArray?s??this.items.indexOf(i):i[this.keyField];return this.vscrollData.sizes[o]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const i=this.$el;this.$nextTick(()=>{i.scrollTop=i.scrollHeight+5e3;const s=()=>{i.scrollTop=i.scrollHeight+5e3,requestAnimationFrame(()=>{i.scrollTop=i.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(s)})};requestAnimationFrame(s)})}}};function Yft(i,s,o,u,f,m){const y=h.resolveComponent("RecycleScroller");return h.openBlock(),h.createBlock(y,h.mergeProps({ref:"scroller",items:m.itemsWithSize,"min-item-size":o.minItemSize,direction:i.direction,"key-field":"id","list-tag":i.listTag,"item-tag":i.itemTag},i.$attrs,{onResize:m.onScrollerResize,onVisible:m.onScrollerVisible}),{default:h.withCtx(({item:x,index:E,active:N})=>[h.renderSlot(i.$slots,"default",h.normalizeProps(h.guardReactiveProps({item:x.item,index:E,active:N,itemWithSize:x})))]),before:h.withCtx(()=>[h.renderSlot(i.$slots,"before")]),after:h.withCtx(()=>[h.renderSlot(i.$slots,"after")]),empty:h.withCtx(()=>[h.renderSlot(i.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}hV.render=Yft,hV.__file="src/components/DynamicScroller.vue";var ute={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(i,s){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const o=this.vscrollData.sizes[s],u=this.vscrollData.sizes[i];o!=null&&o!==u&&this.applySize(o)}},finalActive(i){this.size||(i?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?i?this.observeSize():this.unobserveSize():i&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const i in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[i],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:i}){!this.finalActive&&i&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||i||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(i){this.$nextTick(()=>{if(this.id===i){const s=this.$el.offsetWidth,o=this.$el.offsetHeight;this.applyWidthHeight(s,o)}this.$_pendingSizeUpdate=null})},applyWidthHeight(i,s){const o=~~(this.vscrollParent.direction==="vertical"?s:i);o&&this.size!==o&&this.applySize(o)},applySize(i){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=i,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(i,s,o){this.id===i&&this.applyWidthHeight(s,o)}},render(){return h.h(this.tag,this.$slots.default())}};ute.__file="src/components/DynamicScrollerItem.vue";function Xft(i,s){i.component("".concat(s,"recycle-scroller"),FP),i.component("".concat(s,"RecycleScroller"),FP),i.component("".concat(s,"dynamic-scroller"),hV),i.component("".concat(s,"DynamicScroller"),hV),i.component("".concat(s,"dynamic-scroller-item"),ute),i.component("".concat(s,"DynamicScrollerItem"),ute)}var Qft={version:"2.0.0-beta.8",install:function(s,o){var u=Object.assign({},{installComponents:!0,componentsPrefix:""},o);for(var f in u)typeof u[f]<"u"&&(BTe[f]=u[f]);u.installComponents&&Xft(s,u.componentsPrefix)}},Zft={};function yV(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var UTe={exports:{}};const pk=aee(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/*! *****************************************************************************
|
|
56
56
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
57
57
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|