codesaaz-core 0.1.2 → 0.1.3
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/codesaaz.es.js +5 -5
- package/dist/codesaaz.umd.js +3 -3
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/codesaaz.es.js
CHANGED
|
@@ -9712,7 +9712,7 @@ const Lg = { class: "flex items-center justify-between rounded-md w-full overflo
|
|
|
9712
9712
|
filter: S,
|
|
9713
9713
|
fullTextSearch: ""
|
|
9714
9714
|
};
|
|
9715
|
-
o.fetchParentEntities && (P.fetchParentEntities = o.fetchParentEntities), o.fetchChildEntities !== void 0 && (P.fetchChildEntities = o.fetchChildEntities), o.relatedEntities && (P.relatedEntities = o.relatedEntities), o.fetchList && (P.fetchList = o.fetchList);
|
|
9715
|
+
o.fetchParentEntities && (P.fetchParentEntities = o.fetchParentEntities), o.fetchChildEntities !== void 0 && (P.fetchChildEntities = o.fetchChildEntities), o.relatedEntities && (P.relatedEntities = o.relatedEntities.split(",").map((J) => J.trim())), o.fetchList && (P.fetchList = o.fetchList);
|
|
9716
9716
|
const z = await i.searchEntityRecords(o.entityName, P);
|
|
9717
9717
|
z && z.response ? (y.setEntity(z.response), p.value = ((_ = (I = y == null ? void 0 : y.state) == null ? void 0 : I.data) == null ? void 0 : _.presets) || []) : console.error("Error fetching entity data:", z);
|
|
9718
9718
|
} catch {
|
|
@@ -9751,7 +9751,7 @@ const Lg = { class: "flex items-center justify-between rounded-md w-full overflo
|
|
|
9751
9751
|
y.setEntity(o.linkedEntity);
|
|
9752
9752
|
else if (!o.preFiltered) {
|
|
9753
9753
|
const P = {};
|
|
9754
|
-
o.fetchParentEntities !== void 0 && (P.fetchParentEntities = o.fetchParentEntities), o.fetchChildEntities !== void 0 && (P.fetchChildEntities = o.fetchChildEntities), o.relatedEntities && (P.relatedEntities = o.relatedEntities), o.fetchList && (P.fetchList = o.fetchList);
|
|
9754
|
+
o.fetchParentEntities !== void 0 && (P.fetchParentEntities = o.fetchParentEntities), o.fetchChildEntities !== void 0 && (P.fetchChildEntities = o.fetchChildEntities), o.relatedEntities && (P.relatedEntities = o.relatedEntities.split(",").map((J) => J.trim())), o.fetchList && (P.fetchList = o.fetchList);
|
|
9755
9755
|
const z = await y.getEntity(o.entityName, P);
|
|
9756
9756
|
p.value = ((_ = (I = z == null ? void 0 : z.response) == null ? void 0 : I.entity) == null ? void 0 : _.presets) || [], console.log("Fetched presets data:", p.value), y.setEntity(z.success ? z.response : { result: [] });
|
|
9757
9757
|
}
|
|
@@ -9883,7 +9883,7 @@ const Lg = { class: "flex items-center justify-between rounded-md w-full overflo
|
|
|
9883
9883
|
], 16)) : (b(), x("p", th, "You do not have the required permissions to access this feature."));
|
|
9884
9884
|
};
|
|
9885
9885
|
}
|
|
9886
|
-
}, ca = /* @__PURE__ */ tt(nh, [["__scopeId", "data-v-
|
|
9886
|
+
}, ca = /* @__PURE__ */ tt(nh, [["__scopeId", "data-v-896c5db8"]]), oh = { class: "p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col" }, rh = { class: "flex justify-between items-start gap-4" }, ih = { class: "flex-grow" }, ah = { class: "flex flex-col gap-2" }, sh = { class: "font-bold text-gray-700" }, lh = { class: "text-gray-600" }, uh = { class: "flex flex-col gap-2" }, ch = {
|
|
9887
9887
|
__name: "EntityListingTileSingleRecord",
|
|
9888
9888
|
props: {
|
|
9889
9889
|
item: Object,
|
|
@@ -13474,7 +13474,7 @@ const l0 = { class: "flex items-center justify-between rounded-md w-full overflo
|
|
|
13474
13474
|
filter: _,
|
|
13475
13475
|
fullTextSearch: ""
|
|
13476
13476
|
};
|
|
13477
|
-
a.fetchParentEntities && (P.fetchParentEntities = a.fetchParentEntities), a.fetchChildEntities !== void 0 && (P.fetchChildEntities = a.fetchChildEntities), a.relatedEntities && (P.relatedEntities = a.relatedEntities), a.fetchList && (P.fetchList = a.fetchList);
|
|
13477
|
+
a.fetchParentEntities && (P.fetchParentEntities = a.fetchParentEntities), a.fetchChildEntities !== void 0 && (P.fetchChildEntities = a.fetchChildEntities), a.relatedEntities && (P.relatedEntities = a.relatedEntities.split(",").map((A) => A.trim())), a.fetchList && (P.fetchList = a.fetchList);
|
|
13478
13478
|
const z = await r.searchEntityRecords(a.entityName, P);
|
|
13479
13479
|
z && z.response ? (y.setEntity(z.response), p.value = ((N = (J = y == null ? void 0 : y.state) == null ? void 0 : J.data) == null ? void 0 : N.presets) || []) : console.error("Error fetching entity data:", z);
|
|
13480
13480
|
}, V = async () => {
|
|
@@ -13653,7 +13653,7 @@ const l0 = { class: "flex items-center justify-between rounded-md w-full overflo
|
|
|
13653
13653
|
], 64))
|
|
13654
13654
|
], 16));
|
|
13655
13655
|
}
|
|
13656
|
-
}, Ia = /* @__PURE__ */ tt($0, [["__scopeId", "data-v-
|
|
13656
|
+
}, Ia = /* @__PURE__ */ tt($0, [["__scopeId", "data-v-f4d2b305"]]), _l = 6048e5, O0 = 864e5, Ba = Symbol.for("constructDateFrom");
|
|
13657
13657
|
function ln(e, t) {
|
|
13658
13658
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && Ba in e ? e[Ba](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
13659
13659
|
}
|
package/dist/codesaaz.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ke,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("vue-router"),require("primevue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","primevue"],o):(ke=typeof globalThis<"u"?globalThis:ke||self,o(ke.Codesaaz={},ke.Vue,ke.VueRouter,ke.PrimeVue))})(this,function(ke,o,pt,Ln){"use strict";var Cr=document.createElement("style");Cr.textContent=`.text-color-hint[data-v-1c86833f]{color:var(--text-color)}.p-message-wrapper{padding:.5rem}.showHideColor,.sorting-filter-section[data-v-a358808d]:hover,.linked-entity-section[data-v-412eec44]:hover{color:var(--primary-color)}.border-bottom-section[data-v-412eec44]{border-bottom:1px solid var(--surface-border)}.section-heading[data-v-12a444f4]:hover{color:var(--primary-color)}.custom-sidebar[data-v-12a444f4]{padding-left:8%;padding-top:14px;padding-bottom:14px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background:var(--surface-card);border-top:1px solid var(--surface-border);bottom:0;left:0;position:fixed;right:0;z-index:1111;transition-property:none;transition-duration:.3s;transform:translateY(0)}.custom-sidebar-content[data-v-12a444f4]{display:flex;align-items:center!important;justify-content:space-between;display:inline-flex;word-break:break-word;overflow:visible;flex-grow:1;width:100%}.custom-sidebar-button[data-v-12a444f4]{display:flex;flex-wrap:nowrap;flex-shrink:1}.custom-sidebar-text[data-v-12a444f4]{flex-shrink:100000;width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:column;white-space:normal;padding-left:10px}.column-item[data-v-12a444f4]{width:calc(33.33% - 10px);margin-bottom:20px}.tile-grid[data-v-bce4d0f0]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.tile[data-v-f59ea2d9]:hover{background:var(--surface-hover)}.border-none[data-v-2bc5d993]{border:none!important}.tile-grid[data-v-b7680fe1]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.record-list[data-v-b7680fe1]{color:var(--primary-color)}.record-head[data-v-b7680fe1]{color:var(--p-red-400)}.tile[data-v-
|
|
1
|
+
(function(ke,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("vue-router"),require("primevue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","primevue"],o):(ke=typeof globalThis<"u"?globalThis:ke||self,o(ke.Codesaaz={},ke.Vue,ke.VueRouter,ke.PrimeVue))})(this,function(ke,o,pt,Ln){"use strict";var Cr=document.createElement("style");Cr.textContent=`.text-color-hint[data-v-1c86833f]{color:var(--text-color)}.p-message-wrapper{padding:.5rem}.showHideColor,.sorting-filter-section[data-v-a358808d]:hover,.linked-entity-section[data-v-412eec44]:hover{color:var(--primary-color)}.border-bottom-section[data-v-412eec44]{border-bottom:1px solid var(--surface-border)}.section-heading[data-v-12a444f4]:hover{color:var(--primary-color)}.custom-sidebar[data-v-12a444f4]{padding-left:8%;padding-top:14px;padding-bottom:14px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background:var(--surface-card);border-top:1px solid var(--surface-border);bottom:0;left:0;position:fixed;right:0;z-index:1111;transition-property:none;transition-duration:.3s;transform:translateY(0)}.custom-sidebar-content[data-v-12a444f4]{display:flex;align-items:center!important;justify-content:space-between;display:inline-flex;word-break:break-word;overflow:visible;flex-grow:1;width:100%}.custom-sidebar-button[data-v-12a444f4]{display:flex;flex-wrap:nowrap;flex-shrink:1}.custom-sidebar-text[data-v-12a444f4]{flex-shrink:100000;width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:column;white-space:normal;padding-left:10px}.column-item[data-v-12a444f4]{width:calc(33.33% - 10px);margin-bottom:20px}.tile-grid[data-v-bce4d0f0]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.tile[data-v-f59ea2d9]:hover{background:var(--surface-hover)}.border-none[data-v-2bc5d993]{border:none!important}.tile-grid[data-v-b7680fe1]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.record-list[data-v-b7680fe1]{color:var(--primary-color)}.record-head[data-v-b7680fe1]{color:var(--p-red-400)}.tile[data-v-896c5db8]:hover{background:var(--surface-hover)}.error-message[data-v-896c5db8]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-c78e676f]{display:flex}.flex-col[data-v-c78e676f]{flex-direction:column}.flex-grow[data-v-c78e676f]{flex-grow:1}.gap-4[data-v-c78e676f]{gap:1rem}.gap-2[data-v-c78e676f]{gap:.5rem}.p-6[data-v-c78e676f]{padding:1.5rem}.bg-white[data-v-c78e676f]{background-color:#fff}.shadow-md[data-v-c78e676f]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-c78e676f]{border-radius:.5rem}.border[data-v-c78e676f]{border-width:1px}.border-gray-300[data-v-c78e676f]{border-color:#d1d5db}.font-bold[data-v-c78e676f]{font-weight:700}.text-gray-700[data-v-c78e676f]{color:#4a5568}.text-gray-600[data-v-c78e676f]{color:#718096}.tile[data-v-037944bc]:hover{background:var(--surface-hover)}.error-message[data-v-037944bc]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-dcd45091]{display:flex}.flex-col[data-v-dcd45091]{flex-direction:column}.flex-grow[data-v-dcd45091]{flex-grow:1}.gap-4[data-v-dcd45091]{gap:1rem}.gap-2[data-v-dcd45091]{gap:.5rem}.p-6[data-v-dcd45091]{padding:1.5rem}.bg-white[data-v-dcd45091]{background-color:#fff}.shadow-md[data-v-dcd45091]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-dcd45091]{border-radius:.5rem}.border[data-v-dcd45091]{border-width:1px}.border-gray-300[data-v-dcd45091]{border-color:#d1d5db}.font-bold[data-v-dcd45091]{font-weight:700}.text-gray-700[data-v-dcd45091]{color:#4a5568}.text-gray-600[data-v-dcd45091]{color:#718096}@media (min-width: 400px) and (max-width: 520px){.responsive-box[data-v-dcd45091]{width:75%}}.tile[data-v-f4d2b305]:hover{background:var(--surface-hover)}.error-message[data-v-f4d2b305]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.no-scrollbar[data-v-f4d2b305]::-webkit-scrollbar{display:none}.no-scrollbar[data-v-f4d2b305]{-ms-overflow-style:none;scrollbar-width:none}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(Cr);const Er={__name:"InputText",props:o.mergeModels({placeholder:{type:String,default:"Enter text"},size:{type:String,default:"Medium"},disabled:{default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(n,r)=>{const a=o.resolveComponent("InputText",!0);return o.openBlock(),o.createBlock(a,o.mergeProps({placeholder:e.placeholder,disabled:e.disabled,size:e.size,modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i)},n.$attrs),null,16,["placeholder","disabled","size","modelValue"])}}},Br={__name:"InputNumber",props:o.mergeModels({placeholder:{type:String,default:"Enter number"},size:{type:String,default:"Medium"},disabled:{default:!1},min:{type:Number,default:void 0},max:{type:Number,default:void 0},showButtons:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(n,r)=>{const a=o.resolveComponent("InputNumber",!0);return o.openBlock(),o.createBlock(a,o.mergeProps({modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),placeholder:e.placeholder,disabled:e.disabled,size:e.size,min:e.min,max:e.max,showButtons:e.showButtons},n.$attrs,{fluid:""}),null,16,["modelValue","placeholder","disabled","size","min","max","showButtons"])}}},$r={__name:"ToggleButton",props:o.mergeModels({disabled:{default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(n,r)=>{const a=o.resolveComponent("ToggleSwitch");return o.openBlock(),o.createBlock(a,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),disabled:e.disabled},null,8,["modelValue","disabled"])}}},Nr={__name:"RadioButton",props:o.mergeModels({optionValue:{type:null},size:{type:String,default:"Medium"},disabled:{default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(n,r)=>{const a=o.resolveComponent("RadioButton",!0);return o.openBlock(),o.createBlock(a,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),value:e.optionValue,size:e.size,disabled:e.disabled},null,8,["modelValue","value","size","disabled"])}}};/*!
|
|
3
3
|
* pinia v2.3.1
|
|
4
4
|
* (c) 2025 Eduardo San Martin Morote
|
|
@@ -20,7 +20,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20
20
|
* Vue 3 Carousel 0.13.0
|
|
21
21
|
* (c) 2025
|
|
22
22
|
* @license MIT
|
|
23
|
-
*/const gi=["viewport","carousel"],gn={"bottom-to-top":"btt","left-to-right":"ltr","right-to-left":"rtl","top-to-bottom":"ttb"},hi=["ltr","left-to-right","rtl","right-to-left","ttb","top-to-bottom","btt","bottom-to-top"],np={ariaGallery:"Gallery",ariaNavigateToPage:"Navigate to page {slideNumber}",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",iconArrowDown:"Arrow pointing downwards",iconArrowLeft:"Arrow pointing to the left",iconArrowRight:"Arrow pointing to the right",iconArrowUp:"Arrow pointing upwards",itemXofY:"Item {currentSlide} of {slidesCount}"};Object.values(gn);const bi=["slide","fade"],yi=["center","start","end","center-even","center-odd"],Oe={autoplay:0,breakpointMode:gi[0],breakpoints:void 0,dir:hi[0],enabled:!0,gap:0,height:"auto",i18n:np,ignoreAnimations:!1,itemsToScroll:1,itemsToShow:1,modelValue:0,mouseDrag:!0,pauseAutoplayOnHover:!1,preventExcessiveDragging:!1,slideEffect:bi[0],snapAlign:yi[0],touchDrag:!0,transition:300,wrapAround:!1},Mt=Symbol("carousel"),op=e=>{const t=o.shallowReactive([]),n=r=>{r!==void 0?t.slice(r).forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(r+i)}):t.forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(i)})};return{cleanup:()=>{t.splice(0,t.length)},getSlides:()=>t,registerSlide:(r,a)=>{if(!r||r.props.isClone)return;const i=a??t.length;t.splice(i,0,r),n(i),e("slide-registered",{slide:r,index:i})},unregisterSlide:r=>{const a=t.indexOf(r);a!==-1&&(e("slide-unregistered",{slide:r,index:a}),t.splice(a,1),n(a))}}};function rp(e){return e.length===0?0:e.reduce((n,r)=>n+r,0)/e.length}function ki({slides:e,position:t,toShow:n}){const r=[],a=t==="before",i=a?-n:0,l=a?0:n;if(e.length<=0)return r;for(let s=i;s<l;s++){const c={index:a?s:s+e.length,isClone:!0,position:t,id:void 0,key:`clone-${t}-${s}`},u=e[(s%e.length+e.length)%e.length].vnode,m=o.cloneVNode(u,c);m.el=null,r.push(m)}return r}const ap='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';function wi(e){if(!e.el||!(e.el instanceof Element))return;const t=e.el.querySelectorAll(ap);for(const n of t)n instanceof HTMLElement&&!n.hasAttribute("disabled")&&n.getAttribute("aria-hidden")!=="true"&&n.setAttribute("tabindex","-1")}function ip(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,r)=>(n[r]=e[r],n),{})}function lp(e){const{isVertical:t,isReversed:n,dragged:r,effectiveSlideSize:a}=e,i=t?r.y:r.x;if(i===0)return 0;const l=Math.round(i/a);return n?l:-l}function wt({val:e,max:t,min:n}){return t<n?e:Math.min(Math.max(e,isNaN(n)?e:n),isNaN(t)?e:t)}function sp(e){const{transform:t}=window.getComputedStyle(e);return t.split(/[(,)]/).slice(1,-1).map(n=>parseFloat(n))}function cp(e){let t=1,n=1;return e.forEach(r=>{const a=sp(r);a.length===6&&(t/=a[0],n/=a[3])}),{widthMultiplier:t,heightMultiplier:n}}function dp(e,t){switch(e){case"start":return 0;case"center":case"center-odd":return(t-1)/2;case"center-even":return(t-2)/2;case"end":return t-1;default:return 0}}function up(e,t,n){switch(e){case"start":return 0;case"center":case"center-odd":return(n-t)/2;case"center-even":return n/2-t;case"end":return n-t;default:return 0}}function sr({slideSize:e,viewportSize:t,align:n,itemsToShow:r}){return r!==void 0?dp(n,r):e!==void 0&&t!==void 0?up(n,e,t):0}function vi(e="",t={}){return Object.entries(t).reduce((n,[r,a])=>n.replace(`{${r}}`,String(a)),e)}function xi({val:e,max:t,min:n=0}){const r=t-n+1;return((e-n)%r+r)%r+n}function cr(e,t=0){let n=!1,r=0,a=null;function i(...l){if(n)return;n=!0;const s=()=>{a=requestAnimationFrame(d=>{d-r>t?(r=d,e(...l),n=!1):s()})};s()}return i.cancel=()=>{a&&(cancelAnimationFrame(a),a=null,n=!1)},i}function po(e,t="px"){if(!(e==null||e===""))return typeof e=="number"||parseFloat(e).toString()===e?`${e}${t}`:e}const fp=o.defineComponent({name:"CarouselAria",setup(){const e=o.inject(Mt);return e?()=>o.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},vi(e.config.i18n.itemXofY,{currentSlide:e.currentSlide+1,slidesCount:e.slidesCount})):()=>""}}),mp={autoplay:{default:Oe.autoplay,type:Number},breakpoints:{default:Oe.breakpoints,type:Object},breakpointMode:{default:Oe.breakpointMode,validator(e){return gi.includes(e)}},enabled:{default:Oe.enabled,type:Boolean},gap:{default:Oe.gap,type:Number},height:{default:Oe.height,type:[Number,String]},ignoreAnimations:{default:!1,type:[Array,Boolean,String]},itemsToScroll:{default:Oe.itemsToScroll,type:Number},itemsToShow:{default:Oe.itemsToShow,type:[Number,String]},i18n:{default:Oe.i18n,type:Object},modelValue:{default:void 0,type:Number},mouseDrag:{default:Oe.mouseDrag,type:Boolean},touchDrag:{default:Oe.touchDrag,type:Boolean},pauseAutoplayOnHover:{default:Oe.pauseAutoplayOnHover,type:Boolean},preventExcessiveDragging:{default:!1,type:Boolean,validator(e,t){return e&&t.wrapAround&&console.warn('[vue3-carousel warn]: "preventExcessiveDragging" cannot be used with wrapAround. The setting will be ignored.'),!0}},snapAlign:{default:Oe.snapAlign,validator(e){return yi.includes(e)}},slideEffect:{type:String,default:Oe.slideEffect,validator(e){return bi.includes(e)}},transition:{default:Oe.transition,type:Number},dir:{type:String,default:Oe.dir,validator(e,t){if(!hi.includes(e))return!1;const n=e in gn?gn[e]:e;return["ttb","btt"].includes(n)&&(!t.height||t.height==="auto")&&console.warn(`[vue3-carousel warn]: The dir "${e}" is not supported with height "auto".`),!0}},wrapAround:{default:Oe.wrapAround,type:Boolean}};o.defineComponent({name:"VueCarousel",props:mp,emits:["before-init","drag","init","loop","slide-end","slide-registered","slide-start","slide-unregistered","update:modelValue"],setup(e,{slots:t,emit:n,expose:r}){var a;const i=op(n),l=i.getSlides(),s=o.computed(()=>l.length),d=o.ref(null),c=o.ref(null),u=o.ref(0),m=o.computed(()=>Object.assign(Object.assign(Object.assign({},Oe),ip(e,["breakpoints","modelValue"])),{i18n:Object.assign(Object.assign({},Oe.i18n),e.i18n)})),f=o.shallowReactive(Object.assign({},m.value)),p=o.ref((a=e.modelValue)!==null&&a!==void 0?a:0),g=o.ref(p.value);o.watch(p,M=>g.value=M);const h=o.ref(0),b=o.computed(()=>Math.ceil((s.value-1)/2)),y=o.computed(()=>s.value-1),k=o.computed(()=>0);let w=null,S=null,E=null;const R=o.computed(()=>u.value+f.gap),C=o.computed(()=>{const M=f.dir||"ltr";return M in gn?gn[M]:M}),x=o.computed(()=>["rtl","btt"].includes(C.value)),_=o.computed(()=>["ttb","btt"].includes(C.value)),z=o.computed(()=>f.itemsToShow==="auto"),N=o.computed(()=>_.value?"height":"width");function L(){var M;if(!oe.value)return;const W=(m.value.breakpointMode==="carousel"?(M=d.value)===null||M===void 0?void 0:M.getBoundingClientRect().width:typeof window<"u"?window.innerWidth:0)||0,X=Object.keys(e.breakpoints||{}).map(ne=>Number(ne)).sort((ne,ye)=>+ye-+ne),Y={};X.some(ne=>W>=ne?(Object.assign(Y,e.breakpoints[ne]),Y.i18n&&Object.assign(Y.i18n,m.value.i18n,e.breakpoints[ne].i18n),!0):!1),Object.assign(f,m.value,Y)}const v=cr(()=>{L(),T(),P()}),B=o.shallowReactive(new Set),I=o.ref([]);function V({widthMultiplier:M,heightMultiplier:W}){I.value=l.map(X=>{var Y;const ne=(Y=X.exposed)===null||Y===void 0?void 0:Y.getBoundingRect();return{width:ne.width*M,height:ne.height*W}})}const A=o.ref({width:0,height:0});function H({widthMultiplier:M,heightMultiplier:W}){var X;const Y=((X=c.value)===null||X===void 0?void 0:X.getBoundingClientRect())||{width:0,height:0};A.value={width:Y.width*M,height:Y.height*W}}function P(){if(!c.value)return;const M=cp(B);if(H(M),V(M),z.value)u.value=rp(I.value.map(W=>W[N.value]));else{const W=Number(f.itemsToShow),X=(W-1)*f.gap;u.value=(A.value[N.value]-X)/W}}function T(){!f.wrapAround&&s.value>0&&(p.value=wt({val:p.value,max:y.value,min:k.value})),z.value||(f.itemsToShow=wt({val:Number(f.itemsToShow),max:s.value,min:1}))}const F=o.computed(()=>typeof e.ignoreAnimations=="string"?e.ignoreAnimations.split(","):Array.isArray(e.ignoreAnimations)?e.ignoreAnimations:e.ignoreAnimations?!1:[]);o.watchEffect(()=>T()),o.watchEffect(()=>{P()});let G;const he=M=>{const W=M.target;if(!(!(W!=null&&W.contains(d.value))||Array.isArray(F.value)&&F.value.includes(M.animationName))&&(B.add(W),!G)){const X=()=>{G=requestAnimationFrame(()=>{P(),X()})};X()}},J=M=>{const W=M.target;W&&B.delete(W),G&&B.size===0&&(cancelAnimationFrame(G),P())},oe=o.ref(!1);typeof document<"u"&&o.watchEffect(()=>{oe.value&&F.value!==!1?(document.addEventListener("animationstart",he),document.addEventListener("animationend",J)):(document.removeEventListener("animationstart",he),document.removeEventListener("animationend",J))}),o.onMounted(()=>{oe.value=!0,L(),pe(),d.value&&(E=new ResizeObserver(v),E.observe(d.value)),n("init")}),o.onBeforeUnmount(()=>{oe.value=!1,i.cleanup(),S&&clearTimeout(S),G&&cancelAnimationFrame(G),w&&clearInterval(w),E&&(E.disconnect(),E=null),typeof document<"u"&&fe(),d.value&&(d.value.removeEventListener("transitionend",P),d.value.removeEventListener("animationiteration",P))});let Z=!1;const ie={x:0,y:0},se=o.reactive({x:0,y:0}),We=o.ref(!1),Re=o.ref(!1),at=()=>{We.value=!0},Je=()=>{We.value=!1},q=cr(M=>{if(!M.ctrlKey)switch(M.key){case"ArrowLeft":case"ArrowUp":_.value===M.key.endsWith("Up")&&(x.value?Qe(!0):Tt(!0));break;case"ArrowRight":case"ArrowDown":_.value===M.key.endsWith("Down")&&(x.value?Tt(!0):Qe(!0));break}},200),U=()=>{document.addEventListener("keydown",q)},fe=()=>{document.removeEventListener("keydown",q)};function De(M){const W=M.target.tagName;if(["INPUT","TEXTAREA","SELECT"].includes(W)||Te.value||(Z=M.type==="touchstart",!Z&&(M.preventDefault(),M.button!==0)))return;ie.x="touches"in M?M.touches[0].clientX:M.clientX,ie.y="touches"in M?M.touches[0].clientY:M.clientY;const X=Z?"touchmove":"mousemove",Y=Z?"touchend":"mouseup";document.addEventListener(X,we,{passive:!1}),document.addEventListener(Y,me,{passive:!0})}const we=cr(M=>{Re.value=!0;const W="touches"in M?M.touches[0].clientX:M.clientX,X="touches"in M?M.touches[0].clientY:M.clientY;se.x=W-ie.x,se.y=X-ie.y;const Y=lp({isVertical:_.value,isReversed:x.value,dragged:se,effectiveSlideSize:R.value});g.value=f.wrapAround?p.value+Y:wt({val:p.value+Y,max:y.value,min:k.value}),n("drag",{deltaX:se.x,deltaY:se.y})});function me(){if(we.cancel(),g.value!==p.value&&!Z){const X=Y=>{Y.preventDefault(),window.removeEventListener("click",X)};window.addEventListener("click",X)}Ue(g.value),se.x=0,se.y=0,Re.value=!1;const M=Z?"touchmove":"mousemove",W=Z?"touchend":"mouseup";document.removeEventListener(M,we),document.removeEventListener(W,me)}function pe(){!f.autoplay||f.autoplay<=0||(w=setInterval(()=>{f.pauseAutoplayOnHover&&We.value||Qe()},f.autoplay))}function Ee(){w&&(clearInterval(w),w=null)}function mt(){Ee(),pe()}const Te=o.ref(!1);function Ue(M,W=!1){if(!W&&Te.value)return;let X=M,Y=M;h.value=p.value,f.wrapAround?Y=xi({val:X,max:y.value,min:k.value}):X=wt({val:X,max:y.value,min:k.value}),n("slide-start",{slidingToIndex:M,currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:s.value}),Ee(),Te.value=!0,p.value=X,Y!==X&&qt.pause(),n("update:modelValue",Y),S=setTimeout(()=>{f.wrapAround&&Y!==X&&(qt.resume(),p.value=Y,n("loop",{currentSlideIndex:p.value,slidingToIndex:M})),n("slide-end",{currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:s.value}),Te.value=!1,mt()},f.transition)}function Qe(M=!1){Ue(p.value+f.itemsToScroll,M)}function Tt(M=!1){Ue(p.value-f.itemsToScroll,M)}function It(){L(),T(),P(),mt()}o.watch(()=>[m.value,e.breakpoints],()=>L(),{deep:!0}),o.watch(()=>e.autoplay,()=>mt());const qt=o.watch(()=>e.modelValue,M=>{M!==p.value&&Ue(Number(M),!0)});n("before-init");const ee=o.computed(()=>{if(!f.wrapAround)return{before:0,after:0};if(z.value)return{before:l.length,after:l.length};const M=Number(f.itemsToShow),W=Math.ceil(M+(f.itemsToScroll-1)),X=W-g.value,Y=W-(s.value-(g.value+1));return{before:Math.max(0,X),after:Math.max(0,Y)}}),it=o.computed(()=>ee.value.before?z.value?I.value.slice(-1*ee.value.before).reduce((M,W)=>M+W[N.value]+f.gap,0)*-1:ee.value.before*R.value*-1:0),Be=o.computed(()=>{var M;if(z.value){const W=(p.value%l.length+l.length)%l.length;return sr({slideSize:(M=I.value[W])===null||M===void 0?void 0:M[N.value],viewportSize:A.value[N.value],align:f.snapAlign})}return sr({align:f.snapAlign,itemsToShow:+f.itemsToShow})}),$=o.computed(()=>{let M=0;if(z.value){if(p.value<0?M=I.value.slice(p.value).reduce((W,X)=>W+X[N.value]+f.gap,0)*-1:M=I.value.slice(0,p.value).reduce((W,X)=>W+X[N.value]+f.gap,0),M-=Be.value,!f.wrapAround){const W=I.value.reduce((X,Y)=>X+Y[N.value]+f.gap,0)-A.value[N.value]-f.gap;M=wt({val:M,max:W,min:0})}}else{let W=p.value-Be.value;f.wrapAround||(W=wt({val:W,max:s.value-+f.itemsToShow,min:0})),M=W*R.value}return M*(x.value?1:-1)}),O=o.computed(()=>{var M,W;if(!z.value){const ne=p.value-Be.value;return f.wrapAround?{min:Math.floor(ne),max:Math.ceil(ne+Number(f.itemsToShow)-1)}:{min:Math.floor(wt({val:ne,max:s.value-Number(f.itemsToShow),min:0})),max:Math.ceil(wt({val:ne+Number(f.itemsToShow)-1,max:s.value-1,min:0}))}}let X=0;{let ne=0,ye=0-ee.value.before;const Se=Math.abs($.value+it.value);for(;ne<=Se;){const Fe=(ye%l.length+l.length)%l.length;ne+=((M=I.value[Fe])===null||M===void 0?void 0:M[N.value])+f.gap,ye++}X=ye-1}let Y=0;{let ne=X,ye=0;for(ne<0?ye=I.value.slice(0,ne).reduce((Se,Fe)=>Se+Fe[N.value]+f.gap,0)-Math.abs($.value+it.value):ye=I.value.slice(0,ne).reduce((Se,Fe)=>Se+Fe[N.value]+f.gap,0)-Math.abs($.value);ye<A.value[N.value];){const Se=(ne%l.length+l.length)%l.length;ye+=((W=I.value[Se])===null||W===void 0?void 0:W[N.value])+f.gap,ne++}Y=ne-1}return{min:Math.floor(X),max:Math.ceil(Y)}}),j=o.computed(()=>{if(f.slideEffect==="fade")return;const M=_.value?"Y":"X",W=_.value?se.y:se.x;let X=$.value+W;if(!f.wrapAround&&f.preventExcessiveDragging){let Y=0;z.value?Y=I.value.reduce((Se,Fe)=>Se+Fe[N.value],0):Y=(s.value-Number(f.itemsToShow))*R.value;const ne=x.value?0:-1*Y,ye=x.value?Y:0;X=wt({val:X,min:ne,max:ye})}return`translate${M}(${X}px)`}),K=o.computed(()=>({"--vc-transition-duration":Te.value?po(f.transition,"ms"):void 0,"--vc-slide-gap":po(f.gap),"--vc-carousel-height":po(f.height),"--vc-cloned-offset":po(it.value)})),te={slideTo:Ue,next:Qe,prev:Tt},ae=o.reactive({activeSlide:g,config:f,currentSlide:p,isSliding:Te,isVertical:_,maxSlide:y,minSlide:k,nav:te,normalizedDir:C,slideRegistry:i,slideSize:u,slides:l,slidesCount:s,viewport:c,visibleRange:O});o.provide(Mt,ae);const Q=o.reactive({config:f,currentSlide:p,maxSlide:y,middleSlide:b,minSlide:k,slideSize:u,slidesCount:s});return r({data:Q,nav:te,next:Qe,prev:Tt,restartCarousel:It,slideTo:Ue,updateBreakpointsConfig:L,updateSlideSize:P,updateSlidesData:T}),()=>{var M;const W=t.default||t.slides,X=(W==null?void 0:W(Q))||[],{before:Y,after:ne}=ee.value,ye=ki({slides:l,position:"before",toShow:Y}),Se=ki({slides:l,position:"after",toShow:ne}),Fe=[...ye,...X,...Se];if(!f.enabled||!Fe.length)return o.h("section",{ref:d,class:["carousel","is-disabled"]},Fe);const Dn=((M=t.addons)===null||M===void 0?void 0:M.call(t,Q))||[],_n=o.h("ol",{class:"carousel__track",style:{transform:j.value},onMousedownCapture:f.mouseDrag?De:null,onTouchstartPassiveCapture:f.touchDrag?De:null},Fe),An=o.h("div",{class:"carousel__viewport",ref:c},_n);return o.h("section",{ref:d,class:["carousel",`is-${C.value}`,`is-effect-${f.slideEffect}`,{"is-vertical":_.value,"is-sliding":Te.value,"is-dragging":Re.value,"is-hover":We.value}],dir:C.value,style:K.value,"aria-label":f.i18n.ariaGallery,tabindex:"0",onFocus:U,onBlur:fe,onMouseenter:at,onMouseleave:Je},[An,Dn,o.h(fp)])}}});var dr;(function(e){e.arrowDown="arrowDown",e.arrowLeft="arrowLeft",e.arrowRight="arrowRight",e.arrowUp="arrowUp"})(dr||(dr={}));const Si=e=>`icon${e.charAt(0).toUpperCase()+e.slice(1)}`,pp={arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"};function gp(e){return e in dr}const Ci=e=>e&&gp(e),Ei=o.defineComponent({props:{name:{type:String,required:!0,validator:Ci},title:{type:String,default:e=>e.name?Oe.i18n[Si(e.name)]:""}},setup(e){const t=o.inject(Mt,null);return()=>{const n=e.name;if(!n||!Ci(n))return;const r=pp[n],a=o.h("path",{d:r}),i=(t==null?void 0:t.config.i18n[Si(n)])||e.title,l=o.h("title",i);return o.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":i},[l,a])}}});o.defineComponent({name:"CarouselNavigation",inheritAttrs:!1,setup(e,{slots:t,attrs:n}){const r=o.inject(Mt);if(!r)return()=>"";const{next:a,prev:i}=t,l=()=>({btt:"arrowDown",ltr:"arrowLeft",rtl:"arrowRight",ttb:"arrowUp"})[r.normalizedDir],s=()=>({btt:"arrowUp",ltr:"arrowRight",rtl:"arrowLeft",ttb:"arrowDown"})[r.normalizedDir],d=o.computed(()=>!r.config.wrapAround&&r.currentSlide<=r.minSlide),c=o.computed(()=>!r.config.wrapAround&&r.currentSlide>=r.maxSlide);return()=>{const{i18n:u}=r.config,m=o.h("button",Object.assign(Object.assign({type:"button",disabled:d.value,"aria-label":u.ariaPreviousSlide,title:u.ariaPreviousSlide,onClick:r.nav.prev},n),{class:["carousel__prev",{"carousel__prev--disabled":d.value},n.class]}),(i==null?void 0:i())||o.h(Ei,{name:l()})),f=o.h("button",Object.assign(Object.assign({type:"button",disabled:c.value,"aria-label":u.ariaNextSlide,title:u.ariaNextSlide,onClick:r.nav.next},n),{class:["carousel__next",{"carousel__next--disabled":c.value},n.class]}),(a==null?void 0:a())||o.h(Ei,{name:s()}));return[m,f]}}}),o.defineComponent({name:"CarouselPagination",props:{disableOnClick:{type:Boolean},paginateByItemsToShow:{type:Boolean}},setup(e){const t=o.inject(Mt);if(!t)return()=>"";const n=o.computed(()=>t.config.itemsToShow),r=o.computed(()=>sr({align:t.config.snapAlign,itemsToShow:n.value})),a=o.computed(()=>e.paginateByItemsToShow&&n.value>1),i=o.computed(()=>Math.ceil((t.activeSlide-r.value)/n.value)),l=o.computed(()=>Math.ceil(t.slidesCount/n.value)),s=d=>xi(a.value?{val:i.value,max:l.value-1,min:0}:{val:t.activeSlide,max:t.maxSlide,min:t.minSlide})===d;return()=>{var d,c;const u=[];for(let m=a.value?0:t.minSlide;m<=(a.value?l.value-1:t.maxSlide);m++){const f=vi(t.config.i18n[a.value?"ariaNavigateToPage":"ariaNavigateToSlide"],{slideNumber:m+1}),p=s(m),g=o.h("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":p},"aria-label":f,"aria-pressed":p,"aria-controls":(c=(d=t.slides[m])===null||d===void 0?void 0:d.exposed)===null||c===void 0?void 0:c.id,title:f,disabled:e.disableOnClick,onClick:()=>t.nav.slideTo(a.value?Math.floor(m*+t.config.itemsToShow+r.value):m)}),h=o.h("li",{class:"carousel__pagination-item",key:m},g);u.push(h)}return o.h("ol",{class:"carousel__pagination"},u)}}}),o.defineComponent({name:"CarouselSlide",props:{id:{type:String,default:e=>e.isClone?void 0:o.useId()},index:{type:Number,default:void 0},isClone:{type:Boolean,default:!1},position:{type:String,default:void 0}},setup(e,{attrs:t,slots:n,expose:r}){const a=o.inject(Mt);if(o.provide(Mt,void 0),!a)return()=>"";const i=o.ref(e.index),l=g=>{i.value=g},s=o.getCurrentInstance(),d=()=>{const g=s.vnode.el;return g?g.getBoundingClientRect():{width:0,height:0}};r({id:e.id,setIndex:l,getBoundingRect:d});const c=o.computed(()=>i.value===a.activeSlide),u=o.computed(()=>i.value===a.activeSlide-1),m=o.computed(()=>i.value===a.activeSlide+1),f=o.computed(()=>i.value>=a.visibleRange.min&&i.value<=a.visibleRange.max),p=o.computed(()=>{if(a.config.itemsToShow==="auto")return;const g=a.config.itemsToShow,h=a.config.gap>0&&g>1?`calc(${100/g}% - ${a.config.gap*(g-1)/g}px)`:`${100/g}%`;return a.isVertical?{height:h}:{width:h}});return a.slideRegistry.registerSlide(s,e.index),o.onUnmounted(()=>{a.slideRegistry.unregisterSlide(s)}),e.isClone&&(o.onMounted(()=>{wi(s.vnode)}),o.onUpdated(()=>{wi(s.vnode)})),()=>{var g,h;return a.config.enabled?o.h("li",{style:[t.style,Object.assign({},p.value)],class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":f.value,"carousel__slide--active":c.value,"carousel__slide--prev":u.value,"carousel__slide--next":m.value,"carousel__slide--sliding":a.isSliding},onFocusin:()=>{a.viewport&&(a.viewport.scrollLeft=0),a.nav.slideTo(i.value)},id:e.isClone?void 0:e.id,"aria-hidden":e.isClone||void 0},(h=n.default)===null||h===void 0?void 0:h.call(n,{currentIndex:i.value,isActive:c.value,isClone:e.isClone,isPrev:u.value,isNext:m.value,isSliding:a.isSliding,isVisible:f.value})):(g=n.default)===null||g===void 0?void 0:g.call(n)}}});const hp={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},bp={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},yp={class:"flex items-center justify-center gap-2 flex-wrap"},kp={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},wp=["onClick"],vp={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},xp={class:"flex items-center justify-center gap-2 flex-wrap"},Sp={key:0,class:"error-message"},Cp={class:"text-red-500 font-bold"},Ep={key:0},Bp={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},$p={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Np={class:"flex items-center justify-center gap-2 flex-wrap"},Op={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},Vp=["onClick"],Tp={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Ip={class:"flex items-center justify-center gap-2 flex-wrap"},Fp={key:1},Bi=Ie({__name:"EntityListing",props:{entityName:String,listClass:String,listItemClass:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},displayField:String,baseUrl:String,hrefKey:String,editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object,roles:{type:[Array,String],default:()=>[]},permissions:{type:[Array,String],default:()=>[]},decoration:{type:String,default:"default"},numberVisible:{type:Number,default:3},variable:{type:String,default:"item"},showPresets:{type:Boolean,default:!1},scrollHeight:{type:String,default:""},showToolBar:{type:String,default:"top"},gap:{type:Number,default:1},justifyContent:{type:String,default:""},preFiltered:{type:String,default:""},fetchParentEntities:{type:Boolean},fetchChildEntities:{type:Number},relatedEntities:{type:String},fetchList:{type:Boolean}},setup(e,{expose:t,emit:n}){const r=e,a=$e(),i=new Le;o.ref(null),o.ref(null);const l=o.ref("id"),s=o.ref(1),d=o.ref(25),c=o.ref(0),u=o.ref(null),m=n,f=o.ref([]),p=o.ref([]),g=o.ref(!0),h=o.ref(null),{hasMatchingRoleAndPermissions:b}=zt(),y=fo();o.provide("entityObject",y),o.onMounted(async()=>{g.value=await b(r.roles,r.permissions),console.log("props entitylist",r.preFiltered),r.preFiltered&&C()}),r.linkedEntity?o.watch(()=>r.linkedEntity,v=>{v&&(f.value=v,m("linkedEntityChanged",v))},{immediate:!0}):o.watch(()=>y.state.data,v=>{v&&(f.value=v.result,m("linkedEntityChanged",v.result))},{immediate:!0});const k=v=>{u.value=v,y.state.data.filters=v,R(u.value)},w=()=>{u.value=null,l.value="id",s.value=1,y.state.data.filters={},R(u.value)},S=async(v,B)=>{l.value=v,s.value=B,u.value=y.state.data.filters?y.state.data.filters:u.value,R(u.value)},E=v=>{d.value=v,u.value=y.state.data.filters?y.state.data.filters:u.value,R(u.value)},R=async v=>{var B,I;console.log("entity state filter",y);try{const V={sortBy:[l.value],sortDirection:s.value===1?"ASC":"DESC",pageSize:d.value,currentPage:c.value,columnList:null,filter:v,fullTextSearch:""};r.fetchParentEntities&&(V.fetchParentEntities=r.fetchParentEntities),r.fetchChildEntities!==void 0&&(V.fetchChildEntities=r.fetchChildEntities),r.relatedEntities&&(V.relatedEntities=r.relatedEntities),r.fetchList&&(V.fetchList=r.fetchList);const A=await i.searchEntityRecords(r.entityName,V);A&&A.response?(y.setEntity(A.response),p.value=((I=(B=y==null?void 0:y.state)==null?void 0:B.data)==null?void 0:I.presets)||[]):console.error("Error fetching entity data:",A)}catch{}},C=async()=>{if(!r.preFiltered)return;const v=y.parsePrefilter(r.preFiltered);v.length&&R(v)};t({props:r,reload:()=>{console.log("reload data")},filter:v=>{console.log("filter data in unordered",v)},addToCurrentList:v=>{var B,I;(I=(B=y==null?void 0:y.state)==null?void 0:B.data)!=null&&I.result&&y.state.data.result.push(v)},deleteFromCurrentList:v=>{const B=y.state.data.result.indexOf(v);y.state.data.result.splice(B,1)},searchRecord:k,searchByPageSize:E,searchBySort:S,clearFilters:w}),o.watch(()=>a.globalConfigs.appId,async v=>{var B,I;if(v){if(r.linkedEntity&&r.linkedEntity.length>0)y.setEntity(r.linkedEntity);else if(!r.preFiltered){const V={};r.fetchParentEntities!==void 0&&(V.fetchParentEntities=r.fetchParentEntities),r.fetchChildEntities!==void 0&&(V.fetchChildEntities=r.fetchChildEntities),r.relatedEntities&&(V.relatedEntities=r.relatedEntities),r.fetchList&&(V.fetchList=r.fetchList);const A=await y.getEntity(r.entityName,V);p.value=((I=(B=A==null?void 0:A.response)==null?void 0:B.entity)==null?void 0:I.presets)||[],console.log("Fetched presets data:",p.value),y.setEntity(A.success?A.response:{result:[]})}}},{immediate:!0});const L=async v=>{const B=await y.applyPreset(v,r.entityName);y.state.data=B||{}};return(v,B)=>{var I,V,A;return g.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},v.$attrs,{class:"flex flex-col"}),[o.renderSlot(v.$slots,"header",{},void 0,!0),v.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",hp,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",bp,[o.createElementVNode("div",yp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",kp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,H=>(o.openBlock(),o.createElementBlock("button",{key:H,onClick:P=>{h.value=H.name,L(H.name)},class:o.normalizeClass(["bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm",["px-4 py-2 rounded-full text-sm",h.value===H.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(H.name),11,wp))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["flex flex-wrap",[r.decoration==="tiles"?"":"flex-col",`gap-${r.gap}`,r.scrollHeight?`overflow-y-auto h-[${r.scrollHeight}]`:"",r.justifyContent?`justify-${r.justifyContent}`:"justify-center"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.linkedEntity&&e.linkedEntity.length>0?e.linkedEntity:((A=(V=(I=o.unref(y))==null?void 0:I.state)==null?void 0:V.data)==null?void 0:A.result)||[],H=>o.renderSlot(v.$slots,"list-item-display",o.normalizeProps({item:H,class:e.listItemClass,[e.variable||""]:H}),void 0,!0)),256))],2),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",vp,[o.createElementVNode("div",xp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Sp,[o.createElementVNode("p",Cp,[B[0]||(B[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Ep,"Entity Name"))])])),o.createElementVNode("div",null,[o.createElementVNode("div",Bp,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",$p,[o.createElementVNode("div",Np,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",Op,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,H=>(o.openBlock(),o.createElementBlock("button",{key:H,onClick:P=>{h.value=H.name,L(H.name)},class:o.normalizeClass(["bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm",["px-4 py-2 rounded-full text-sm",h.value===H.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(H.name),11,Vp))),128))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(H,P)=>(o.openBlock(),o.createElementBlock("div",{key:P},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:tp),o.mergeProps({key:H,preFiltered:r.preFiltered,ref_for:!0},{item:H,...r}),null,16,["preFiltered"]))]))),128)),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Tp,[o.createElementVNode("div",Ip,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),o.renderSlot(v.$slots,"footer",{},void 0,!0)],64)),o.renderSlot(v.$slots,"footer",{},void 0,!0)],16)):(o.openBlock(),o.createElementBlock("p",Fp,"You do not have the required permissions to access this feature."))}}},[["__scopeId","data-v-86b4def0"]]),Pp={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col"},Rp={class:"flex justify-between items-start gap-4"},Dp={class:"flex-grow"},_p={class:"flex flex-col gap-2"},Ap={class:"font-bold text-gray-700"},Lp={class:"text-gray-600"},zp={class:"flex flex-col gap-2"},Mp=Ie({__name:"EntityListingTileSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean},setup(e){const t=e,n=o.inject("entityObject"),r=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),s=o.ref(!1);o.onMounted(()=>{r.value=n.getEntityColumns(n.state.data),a.value=r.value.find(f=>f.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const d=()=>{l.value=!0},c=()=>{s.value=!0},u=async f=>{f.remove?m():l.value=!1},m=async()=>{const f=n.getPrimaryKeyColumn(n.state.data),p=t.item[f.name],g=await n.entityRecordDelete(n.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await n.searchRecord(n.state.data,{sortBy:n.state.data.sortBy,sortDirection:n.state.data.sortDirection,pageSize:n.state.data.pageSize,currentPage:n.state.data.currentPage,columnList:null,filter:n.state.data.filters,fullTextSearch:n.state.data.fullTextSearch});h!=null&&h.response&&n.setEntity(h.response)}};return(f,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Pp,[o.createElementVNode("div",Rp,[o.createElementVNode("div",Dp,[o.createElementVNode("div",_p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",Ap,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",Lp,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",zp,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>c()),icon:"pi pi-pencil",severity:"success",rounded:"","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>d()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),s.value?(o.openBlock(),o.createBlock(pn,{key:0,showEntityForm:s.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>s.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(mo,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:u},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-c78e676f"]]),jp={class:"flex flex-wrap gap-4 p-2"},Up={key:0,class:"error-message"},Hp={class:"text-red-500 font-bold"},Wp={key:0},qp={key:1},Kp={class:"flex flex-wrap gap-4 p-4"},$i=Ie({__name:"EntityListingTile",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,dynamicPropName:{type:String,default:"item"}},setup(e,{expose:t}){const n=fo(),r=$e();o.provide("entityObject",n);const a=e,i=o.ref([]);return o.watch(()=>n.state.data,d=>{d&&(i.value=d.result)},{immediate:!0}),t({props:a,reload:()=>{console.log("reload data")},filter:()=>{console.log("filter data in unordered")}}),o.watch(()=>r.globalConfigs.appId,async d=>{if(d){const c=await n.getEntity(a.entityName);n.setEntity(c.success?c.response:{result:[]})}},{immediate:!0}),(d,c)=>{var u,m,f;return o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(d.$attrs)),[d.$slots["list-item-display-tile"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(d.$slots,"header",{},void 0,!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:0})):o.createCommentVNode("",!0),e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",jp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((f=(m=(u=o.unref(n))==null?void 0:u.state)==null?void 0:m.data)==null?void 0:f.result)||[],(p,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex flex-col p-6 border border-gray-300 shadow-md rounded-lg bg-white w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5 2xl:w-1/8"},[o.renderSlot(d.$slots,"list-item-display-tile",o.normalizeProps({[e.dynamicPropName||""]:p}),void 0,!0)]))),128))]),o.renderSlot(d.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(d.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",qp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0})):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",Kp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,g)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:Mp),o.mergeProps({key:g,ref_for:!0},{item:p,...a}),null,16))),128))]),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2})):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Up,[o.createElementVNode("p",Hp,[c[0]||(c[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Wp,"Entity Name"))])])),o.renderSlot(d.$slots,"footer",{},void 0,!0)],64))],16)}}},[["__scopeId","data-v-037944bc"]]),Gp={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col responsive-box"},Yp={class:"flex justify-between items-start gap-4"},Xp={class:"flex-grow"},Jp={class:"flex flex-col gap-2"},Qp={class:"font-bold text-gray-700"},Zp={class:"text-gray-600"},eg={class:"flex flex-col gap-2"},tg=Ie({__name:"EntityListingCarouselSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,numberVisible:{type:Number,default:3}},setup(e){const t=e,n=o.inject("entityObject"),r=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),s=o.ref(!1);o.onMounted(()=>{r.value=n.getEntityColumns(n.state.data),a.value=r.value.find(f=>f.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const d=()=>{l.value=!0},c=()=>{s.value=!0},u=async f=>{f.remove?m():l.value=!1},m=async()=>{const f=n.getPrimaryKeyColumn(n.state.data),p=t.item[f.name],g=await n.entityRecordDelete(n.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await n.searchRecord(n.state.data,{sortBy:n.state.data.sortBy,sortDirection:n.state.data.sortDirection,pageSize:n.state.data.pageSize,currentPage:n.state.data.currentPage,columnList:null,filter:n.state.data.filters,fullTextSearch:n.state.data.fullTextSearch});h!=null&&h.response&&n.setEntity(h.response)}};return(f,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Gp,[o.createElementVNode("div",Yp,[o.createElementVNode("div",Xp,[o.createElementVNode("div",Jp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",Qp,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",Zp,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",eg,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>c()),icon:"pi pi-pencil",severity:"success",variant:"text","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>d()),icon:"pi pi-trash",severity:"danger",variant:"text","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),s.value?(o.openBlock(),o.createBlock(pn,{key:0,showEntityForm:s.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>s.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(mo,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:u},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-dcd45091"]]);function ng(e,t){return e?e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className):!1}function og(e,t){if(e&&t){const n=r=>{ng(e,r)||(e.classList?e.classList.add(r):e.className+=" "+r)};[t].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function go(e){for(const t of document==null?void 0:document.styleSheets)try{for(const n of t==null?void 0:t.cssRules)for(const r of n==null?void 0:n.style)if(e.test(r))return{name:r,value:n.style.getPropertyValue(r).trim()}}catch{}return null}function ur(e,t){if(e&&t){const n=r=>{e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function Ni(e){let t={width:0,height:0};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}function Oi(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0],a=e.innerWidth||n.clientWidth||r.clientWidth,i=e.innerHeight||n.clientHeight||r.clientHeight;return{width:a,height:i}}function rg(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function ag(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function ig(e,t,n=!0){var r,a,i,l;if(e){const s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:Ni(e),d=s.height,c=s.width,u=t.offsetHeight,m=t.offsetWidth,f=t.getBoundingClientRect(),p=ag(),g=rg(),h=Oi();let b,y,k="top";f.top+u+d>h.height?(b=f.top+p-d,k="bottom",b<0&&(b=p)):b=u+f.top+p,f.left+c>h.width?y=Math.max(0,f.left+g+m-c):y=f.left+g,e.style.top=b+"px",e.style.left=y+"px",e.style.transformOrigin=k,n&&(e.style.marginTop=k==="bottom"?`calc(${(a=(r=go(/-anchor-gutter$/))==null?void 0:r.value)!=null?a:"2px"} * -1)`:(l=(i=go(/-anchor-gutter$/))==null?void 0:i.value)!=null?l:"")}}function lg(e,t){e&&(typeof t=="string"?e.style.cssText=t:Object.entries(t).forEach(([n,r])=>e.style[n]=r))}function Vi(e,t){return e instanceof HTMLElement?e.offsetWidth:0}function sg(e,t,n=!0){var r,a,i,l;if(e){const s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:Ni(e),d=t.offsetHeight,c=t.getBoundingClientRect(),u=Oi();let m,f,p="top";c.top+d+s.height>u.height?(m=-1*s.height,p="bottom",c.top+m<0&&(m=-1*c.top)):m=d,s.width>u.width?f=c.left*-1:c.left+s.width>u.width?f=(c.left+s.width-u.width)*-1:f=0,e.style.top=m+"px",e.style.left=f+"px",e.style.transformOrigin=p,n&&(e.style.marginTop=p==="bottom"?`calc(${(a=(r=go(/-anchor-gutter$/))==null?void 0:r.value)!=null?a:"2px"} * -1)`:(l=(i=go(/-anchor-gutter$/))==null?void 0:i.value)!=null?l:"")}}function hn(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}function ho(e,t={}){if(hn(e)){const n=(r,a)=>{var i,l;const s=(i=e==null?void 0:e.$attrs)!=null&&i[r]?[(l=e==null?void 0:e.$attrs)==null?void 0:l[r]]:[];return[a].flat().reduce((d,c)=>{if(c!=null){const u=typeof c;if(u==="string"||u==="number")d.push(c);else if(u==="object"){const m=Array.isArray(c)?n(r,c):Object.entries(c).map(([f,p])=>r==="style"&&(p||p===0)?`${f.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${p}`:p?f:void 0);d=m.length?d.concat(m.filter(f=>!!f)):d}}return d},s)};Object.entries(t).forEach(([r,a])=>{if(a!=null){const i=r.match(/^on(.+)/);i?e.addEventListener(i[1].toLowerCase(),a):r==="p-bind"||r==="pBind"?ho(e,a):(a=r==="class"?[...new Set(n("class",a))].join(" ").trim():r==="style"?n("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[r]=a),e.setAttribute(r,a))}})}}function cg(e,t={},...n){{const r=document.createElement(e);return ho(r,t),r.append(...n),r}}function dg(e,t){return hn(e)?Array.from(e.querySelectorAll(t)):[]}function bo(e,t){return hn(e)?e.matches(t)?e:e.querySelector(t):null}function $t(e,t){e&&document.activeElement!==e&&e.focus(t)}function ug(e,t){if(hn(e)){const n=e.getAttribute(t);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function fr(e,t=""){let n=dg(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
23
|
+
*/const gi=["viewport","carousel"],gn={"bottom-to-top":"btt","left-to-right":"ltr","right-to-left":"rtl","top-to-bottom":"ttb"},hi=["ltr","left-to-right","rtl","right-to-left","ttb","top-to-bottom","btt","bottom-to-top"],np={ariaGallery:"Gallery",ariaNavigateToPage:"Navigate to page {slideNumber}",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",iconArrowDown:"Arrow pointing downwards",iconArrowLeft:"Arrow pointing to the left",iconArrowRight:"Arrow pointing to the right",iconArrowUp:"Arrow pointing upwards",itemXofY:"Item {currentSlide} of {slidesCount}"};Object.values(gn);const bi=["slide","fade"],yi=["center","start","end","center-even","center-odd"],Oe={autoplay:0,breakpointMode:gi[0],breakpoints:void 0,dir:hi[0],enabled:!0,gap:0,height:"auto",i18n:np,ignoreAnimations:!1,itemsToScroll:1,itemsToShow:1,modelValue:0,mouseDrag:!0,pauseAutoplayOnHover:!1,preventExcessiveDragging:!1,slideEffect:bi[0],snapAlign:yi[0],touchDrag:!0,transition:300,wrapAround:!1},Mt=Symbol("carousel"),op=e=>{const t=o.shallowReactive([]),n=r=>{r!==void 0?t.slice(r).forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(r+i)}):t.forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(i)})};return{cleanup:()=>{t.splice(0,t.length)},getSlides:()=>t,registerSlide:(r,a)=>{if(!r||r.props.isClone)return;const i=a??t.length;t.splice(i,0,r),n(i),e("slide-registered",{slide:r,index:i})},unregisterSlide:r=>{const a=t.indexOf(r);a!==-1&&(e("slide-unregistered",{slide:r,index:a}),t.splice(a,1),n(a))}}};function rp(e){return e.length===0?0:e.reduce((n,r)=>n+r,0)/e.length}function ki({slides:e,position:t,toShow:n}){const r=[],a=t==="before",i=a?-n:0,l=a?0:n;if(e.length<=0)return r;for(let s=i;s<l;s++){const c={index:a?s:s+e.length,isClone:!0,position:t,id:void 0,key:`clone-${t}-${s}`},u=e[(s%e.length+e.length)%e.length].vnode,m=o.cloneVNode(u,c);m.el=null,r.push(m)}return r}const ap='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';function wi(e){if(!e.el||!(e.el instanceof Element))return;const t=e.el.querySelectorAll(ap);for(const n of t)n instanceof HTMLElement&&!n.hasAttribute("disabled")&&n.getAttribute("aria-hidden")!=="true"&&n.setAttribute("tabindex","-1")}function ip(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,r)=>(n[r]=e[r],n),{})}function lp(e){const{isVertical:t,isReversed:n,dragged:r,effectiveSlideSize:a}=e,i=t?r.y:r.x;if(i===0)return 0;const l=Math.round(i/a);return n?l:-l}function wt({val:e,max:t,min:n}){return t<n?e:Math.min(Math.max(e,isNaN(n)?e:n),isNaN(t)?e:t)}function sp(e){const{transform:t}=window.getComputedStyle(e);return t.split(/[(,)]/).slice(1,-1).map(n=>parseFloat(n))}function cp(e){let t=1,n=1;return e.forEach(r=>{const a=sp(r);a.length===6&&(t/=a[0],n/=a[3])}),{widthMultiplier:t,heightMultiplier:n}}function dp(e,t){switch(e){case"start":return 0;case"center":case"center-odd":return(t-1)/2;case"center-even":return(t-2)/2;case"end":return t-1;default:return 0}}function up(e,t,n){switch(e){case"start":return 0;case"center":case"center-odd":return(n-t)/2;case"center-even":return n/2-t;case"end":return n-t;default:return 0}}function sr({slideSize:e,viewportSize:t,align:n,itemsToShow:r}){return r!==void 0?dp(n,r):e!==void 0&&t!==void 0?up(n,e,t):0}function vi(e="",t={}){return Object.entries(t).reduce((n,[r,a])=>n.replace(`{${r}}`,String(a)),e)}function xi({val:e,max:t,min:n=0}){const r=t-n+1;return((e-n)%r+r)%r+n}function cr(e,t=0){let n=!1,r=0,a=null;function i(...l){if(n)return;n=!0;const s=()=>{a=requestAnimationFrame(d=>{d-r>t?(r=d,e(...l),n=!1):s()})};s()}return i.cancel=()=>{a&&(cancelAnimationFrame(a),a=null,n=!1)},i}function po(e,t="px"){if(!(e==null||e===""))return typeof e=="number"||parseFloat(e).toString()===e?`${e}${t}`:e}const fp=o.defineComponent({name:"CarouselAria",setup(){const e=o.inject(Mt);return e?()=>o.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},vi(e.config.i18n.itemXofY,{currentSlide:e.currentSlide+1,slidesCount:e.slidesCount})):()=>""}}),mp={autoplay:{default:Oe.autoplay,type:Number},breakpoints:{default:Oe.breakpoints,type:Object},breakpointMode:{default:Oe.breakpointMode,validator(e){return gi.includes(e)}},enabled:{default:Oe.enabled,type:Boolean},gap:{default:Oe.gap,type:Number},height:{default:Oe.height,type:[Number,String]},ignoreAnimations:{default:!1,type:[Array,Boolean,String]},itemsToScroll:{default:Oe.itemsToScroll,type:Number},itemsToShow:{default:Oe.itemsToShow,type:[Number,String]},i18n:{default:Oe.i18n,type:Object},modelValue:{default:void 0,type:Number},mouseDrag:{default:Oe.mouseDrag,type:Boolean},touchDrag:{default:Oe.touchDrag,type:Boolean},pauseAutoplayOnHover:{default:Oe.pauseAutoplayOnHover,type:Boolean},preventExcessiveDragging:{default:!1,type:Boolean,validator(e,t){return e&&t.wrapAround&&console.warn('[vue3-carousel warn]: "preventExcessiveDragging" cannot be used with wrapAround. The setting will be ignored.'),!0}},snapAlign:{default:Oe.snapAlign,validator(e){return yi.includes(e)}},slideEffect:{type:String,default:Oe.slideEffect,validator(e){return bi.includes(e)}},transition:{default:Oe.transition,type:Number},dir:{type:String,default:Oe.dir,validator(e,t){if(!hi.includes(e))return!1;const n=e in gn?gn[e]:e;return["ttb","btt"].includes(n)&&(!t.height||t.height==="auto")&&console.warn(`[vue3-carousel warn]: The dir "${e}" is not supported with height "auto".`),!0}},wrapAround:{default:Oe.wrapAround,type:Boolean}};o.defineComponent({name:"VueCarousel",props:mp,emits:["before-init","drag","init","loop","slide-end","slide-registered","slide-start","slide-unregistered","update:modelValue"],setup(e,{slots:t,emit:n,expose:r}){var a;const i=op(n),l=i.getSlides(),s=o.computed(()=>l.length),d=o.ref(null),c=o.ref(null),u=o.ref(0),m=o.computed(()=>Object.assign(Object.assign(Object.assign({},Oe),ip(e,["breakpoints","modelValue"])),{i18n:Object.assign(Object.assign({},Oe.i18n),e.i18n)})),f=o.shallowReactive(Object.assign({},m.value)),p=o.ref((a=e.modelValue)!==null&&a!==void 0?a:0),g=o.ref(p.value);o.watch(p,M=>g.value=M);const h=o.ref(0),b=o.computed(()=>Math.ceil((s.value-1)/2)),y=o.computed(()=>s.value-1),k=o.computed(()=>0);let w=null,S=null,E=null;const R=o.computed(()=>u.value+f.gap),C=o.computed(()=>{const M=f.dir||"ltr";return M in gn?gn[M]:M}),x=o.computed(()=>["rtl","btt"].includes(C.value)),_=o.computed(()=>["ttb","btt"].includes(C.value)),z=o.computed(()=>f.itemsToShow==="auto"),N=o.computed(()=>_.value?"height":"width");function L(){var M;if(!oe.value)return;const W=(m.value.breakpointMode==="carousel"?(M=d.value)===null||M===void 0?void 0:M.getBoundingClientRect().width:typeof window<"u"?window.innerWidth:0)||0,X=Object.keys(e.breakpoints||{}).map(ne=>Number(ne)).sort((ne,ye)=>+ye-+ne),Y={};X.some(ne=>W>=ne?(Object.assign(Y,e.breakpoints[ne]),Y.i18n&&Object.assign(Y.i18n,m.value.i18n,e.breakpoints[ne].i18n),!0):!1),Object.assign(f,m.value,Y)}const v=cr(()=>{L(),T(),P()}),B=o.shallowReactive(new Set),I=o.ref([]);function V({widthMultiplier:M,heightMultiplier:W}){I.value=l.map(X=>{var Y;const ne=(Y=X.exposed)===null||Y===void 0?void 0:Y.getBoundingRect();return{width:ne.width*M,height:ne.height*W}})}const A=o.ref({width:0,height:0});function H({widthMultiplier:M,heightMultiplier:W}){var X;const Y=((X=c.value)===null||X===void 0?void 0:X.getBoundingClientRect())||{width:0,height:0};A.value={width:Y.width*M,height:Y.height*W}}function P(){if(!c.value)return;const M=cp(B);if(H(M),V(M),z.value)u.value=rp(I.value.map(W=>W[N.value]));else{const W=Number(f.itemsToShow),X=(W-1)*f.gap;u.value=(A.value[N.value]-X)/W}}function T(){!f.wrapAround&&s.value>0&&(p.value=wt({val:p.value,max:y.value,min:k.value})),z.value||(f.itemsToShow=wt({val:Number(f.itemsToShow),max:s.value,min:1}))}const F=o.computed(()=>typeof e.ignoreAnimations=="string"?e.ignoreAnimations.split(","):Array.isArray(e.ignoreAnimations)?e.ignoreAnimations:e.ignoreAnimations?!1:[]);o.watchEffect(()=>T()),o.watchEffect(()=>{P()});let G;const he=M=>{const W=M.target;if(!(!(W!=null&&W.contains(d.value))||Array.isArray(F.value)&&F.value.includes(M.animationName))&&(B.add(W),!G)){const X=()=>{G=requestAnimationFrame(()=>{P(),X()})};X()}},J=M=>{const W=M.target;W&&B.delete(W),G&&B.size===0&&(cancelAnimationFrame(G),P())},oe=o.ref(!1);typeof document<"u"&&o.watchEffect(()=>{oe.value&&F.value!==!1?(document.addEventListener("animationstart",he),document.addEventListener("animationend",J)):(document.removeEventListener("animationstart",he),document.removeEventListener("animationend",J))}),o.onMounted(()=>{oe.value=!0,L(),pe(),d.value&&(E=new ResizeObserver(v),E.observe(d.value)),n("init")}),o.onBeforeUnmount(()=>{oe.value=!1,i.cleanup(),S&&clearTimeout(S),G&&cancelAnimationFrame(G),w&&clearInterval(w),E&&(E.disconnect(),E=null),typeof document<"u"&&fe(),d.value&&(d.value.removeEventListener("transitionend",P),d.value.removeEventListener("animationiteration",P))});let Z=!1;const ie={x:0,y:0},se=o.reactive({x:0,y:0}),We=o.ref(!1),Re=o.ref(!1),at=()=>{We.value=!0},Je=()=>{We.value=!1},q=cr(M=>{if(!M.ctrlKey)switch(M.key){case"ArrowLeft":case"ArrowUp":_.value===M.key.endsWith("Up")&&(x.value?Qe(!0):Tt(!0));break;case"ArrowRight":case"ArrowDown":_.value===M.key.endsWith("Down")&&(x.value?Tt(!0):Qe(!0));break}},200),U=()=>{document.addEventListener("keydown",q)},fe=()=>{document.removeEventListener("keydown",q)};function De(M){const W=M.target.tagName;if(["INPUT","TEXTAREA","SELECT"].includes(W)||Te.value||(Z=M.type==="touchstart",!Z&&(M.preventDefault(),M.button!==0)))return;ie.x="touches"in M?M.touches[0].clientX:M.clientX,ie.y="touches"in M?M.touches[0].clientY:M.clientY;const X=Z?"touchmove":"mousemove",Y=Z?"touchend":"mouseup";document.addEventListener(X,we,{passive:!1}),document.addEventListener(Y,me,{passive:!0})}const we=cr(M=>{Re.value=!0;const W="touches"in M?M.touches[0].clientX:M.clientX,X="touches"in M?M.touches[0].clientY:M.clientY;se.x=W-ie.x,se.y=X-ie.y;const Y=lp({isVertical:_.value,isReversed:x.value,dragged:se,effectiveSlideSize:R.value});g.value=f.wrapAround?p.value+Y:wt({val:p.value+Y,max:y.value,min:k.value}),n("drag",{deltaX:se.x,deltaY:se.y})});function me(){if(we.cancel(),g.value!==p.value&&!Z){const X=Y=>{Y.preventDefault(),window.removeEventListener("click",X)};window.addEventListener("click",X)}Ue(g.value),se.x=0,se.y=0,Re.value=!1;const M=Z?"touchmove":"mousemove",W=Z?"touchend":"mouseup";document.removeEventListener(M,we),document.removeEventListener(W,me)}function pe(){!f.autoplay||f.autoplay<=0||(w=setInterval(()=>{f.pauseAutoplayOnHover&&We.value||Qe()},f.autoplay))}function Ee(){w&&(clearInterval(w),w=null)}function mt(){Ee(),pe()}const Te=o.ref(!1);function Ue(M,W=!1){if(!W&&Te.value)return;let X=M,Y=M;h.value=p.value,f.wrapAround?Y=xi({val:X,max:y.value,min:k.value}):X=wt({val:X,max:y.value,min:k.value}),n("slide-start",{slidingToIndex:M,currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:s.value}),Ee(),Te.value=!0,p.value=X,Y!==X&&qt.pause(),n("update:modelValue",Y),S=setTimeout(()=>{f.wrapAround&&Y!==X&&(qt.resume(),p.value=Y,n("loop",{currentSlideIndex:p.value,slidingToIndex:M})),n("slide-end",{currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:s.value}),Te.value=!1,mt()},f.transition)}function Qe(M=!1){Ue(p.value+f.itemsToScroll,M)}function Tt(M=!1){Ue(p.value-f.itemsToScroll,M)}function It(){L(),T(),P(),mt()}o.watch(()=>[m.value,e.breakpoints],()=>L(),{deep:!0}),o.watch(()=>e.autoplay,()=>mt());const qt=o.watch(()=>e.modelValue,M=>{M!==p.value&&Ue(Number(M),!0)});n("before-init");const ee=o.computed(()=>{if(!f.wrapAround)return{before:0,after:0};if(z.value)return{before:l.length,after:l.length};const M=Number(f.itemsToShow),W=Math.ceil(M+(f.itemsToScroll-1)),X=W-g.value,Y=W-(s.value-(g.value+1));return{before:Math.max(0,X),after:Math.max(0,Y)}}),it=o.computed(()=>ee.value.before?z.value?I.value.slice(-1*ee.value.before).reduce((M,W)=>M+W[N.value]+f.gap,0)*-1:ee.value.before*R.value*-1:0),Be=o.computed(()=>{var M;if(z.value){const W=(p.value%l.length+l.length)%l.length;return sr({slideSize:(M=I.value[W])===null||M===void 0?void 0:M[N.value],viewportSize:A.value[N.value],align:f.snapAlign})}return sr({align:f.snapAlign,itemsToShow:+f.itemsToShow})}),$=o.computed(()=>{let M=0;if(z.value){if(p.value<0?M=I.value.slice(p.value).reduce((W,X)=>W+X[N.value]+f.gap,0)*-1:M=I.value.slice(0,p.value).reduce((W,X)=>W+X[N.value]+f.gap,0),M-=Be.value,!f.wrapAround){const W=I.value.reduce((X,Y)=>X+Y[N.value]+f.gap,0)-A.value[N.value]-f.gap;M=wt({val:M,max:W,min:0})}}else{let W=p.value-Be.value;f.wrapAround||(W=wt({val:W,max:s.value-+f.itemsToShow,min:0})),M=W*R.value}return M*(x.value?1:-1)}),O=o.computed(()=>{var M,W;if(!z.value){const ne=p.value-Be.value;return f.wrapAround?{min:Math.floor(ne),max:Math.ceil(ne+Number(f.itemsToShow)-1)}:{min:Math.floor(wt({val:ne,max:s.value-Number(f.itemsToShow),min:0})),max:Math.ceil(wt({val:ne+Number(f.itemsToShow)-1,max:s.value-1,min:0}))}}let X=0;{let ne=0,ye=0-ee.value.before;const Se=Math.abs($.value+it.value);for(;ne<=Se;){const Fe=(ye%l.length+l.length)%l.length;ne+=((M=I.value[Fe])===null||M===void 0?void 0:M[N.value])+f.gap,ye++}X=ye-1}let Y=0;{let ne=X,ye=0;for(ne<0?ye=I.value.slice(0,ne).reduce((Se,Fe)=>Se+Fe[N.value]+f.gap,0)-Math.abs($.value+it.value):ye=I.value.slice(0,ne).reduce((Se,Fe)=>Se+Fe[N.value]+f.gap,0)-Math.abs($.value);ye<A.value[N.value];){const Se=(ne%l.length+l.length)%l.length;ye+=((W=I.value[Se])===null||W===void 0?void 0:W[N.value])+f.gap,ne++}Y=ne-1}return{min:Math.floor(X),max:Math.ceil(Y)}}),j=o.computed(()=>{if(f.slideEffect==="fade")return;const M=_.value?"Y":"X",W=_.value?se.y:se.x;let X=$.value+W;if(!f.wrapAround&&f.preventExcessiveDragging){let Y=0;z.value?Y=I.value.reduce((Se,Fe)=>Se+Fe[N.value],0):Y=(s.value-Number(f.itemsToShow))*R.value;const ne=x.value?0:-1*Y,ye=x.value?Y:0;X=wt({val:X,min:ne,max:ye})}return`translate${M}(${X}px)`}),K=o.computed(()=>({"--vc-transition-duration":Te.value?po(f.transition,"ms"):void 0,"--vc-slide-gap":po(f.gap),"--vc-carousel-height":po(f.height),"--vc-cloned-offset":po(it.value)})),te={slideTo:Ue,next:Qe,prev:Tt},ae=o.reactive({activeSlide:g,config:f,currentSlide:p,isSliding:Te,isVertical:_,maxSlide:y,minSlide:k,nav:te,normalizedDir:C,slideRegistry:i,slideSize:u,slides:l,slidesCount:s,viewport:c,visibleRange:O});o.provide(Mt,ae);const Q=o.reactive({config:f,currentSlide:p,maxSlide:y,middleSlide:b,minSlide:k,slideSize:u,slidesCount:s});return r({data:Q,nav:te,next:Qe,prev:Tt,restartCarousel:It,slideTo:Ue,updateBreakpointsConfig:L,updateSlideSize:P,updateSlidesData:T}),()=>{var M;const W=t.default||t.slides,X=(W==null?void 0:W(Q))||[],{before:Y,after:ne}=ee.value,ye=ki({slides:l,position:"before",toShow:Y}),Se=ki({slides:l,position:"after",toShow:ne}),Fe=[...ye,...X,...Se];if(!f.enabled||!Fe.length)return o.h("section",{ref:d,class:["carousel","is-disabled"]},Fe);const Dn=((M=t.addons)===null||M===void 0?void 0:M.call(t,Q))||[],_n=o.h("ol",{class:"carousel__track",style:{transform:j.value},onMousedownCapture:f.mouseDrag?De:null,onTouchstartPassiveCapture:f.touchDrag?De:null},Fe),An=o.h("div",{class:"carousel__viewport",ref:c},_n);return o.h("section",{ref:d,class:["carousel",`is-${C.value}`,`is-effect-${f.slideEffect}`,{"is-vertical":_.value,"is-sliding":Te.value,"is-dragging":Re.value,"is-hover":We.value}],dir:C.value,style:K.value,"aria-label":f.i18n.ariaGallery,tabindex:"0",onFocus:U,onBlur:fe,onMouseenter:at,onMouseleave:Je},[An,Dn,o.h(fp)])}}});var dr;(function(e){e.arrowDown="arrowDown",e.arrowLeft="arrowLeft",e.arrowRight="arrowRight",e.arrowUp="arrowUp"})(dr||(dr={}));const Si=e=>`icon${e.charAt(0).toUpperCase()+e.slice(1)}`,pp={arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"};function gp(e){return e in dr}const Ci=e=>e&&gp(e),Ei=o.defineComponent({props:{name:{type:String,required:!0,validator:Ci},title:{type:String,default:e=>e.name?Oe.i18n[Si(e.name)]:""}},setup(e){const t=o.inject(Mt,null);return()=>{const n=e.name;if(!n||!Ci(n))return;const r=pp[n],a=o.h("path",{d:r}),i=(t==null?void 0:t.config.i18n[Si(n)])||e.title,l=o.h("title",i);return o.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":i},[l,a])}}});o.defineComponent({name:"CarouselNavigation",inheritAttrs:!1,setup(e,{slots:t,attrs:n}){const r=o.inject(Mt);if(!r)return()=>"";const{next:a,prev:i}=t,l=()=>({btt:"arrowDown",ltr:"arrowLeft",rtl:"arrowRight",ttb:"arrowUp"})[r.normalizedDir],s=()=>({btt:"arrowUp",ltr:"arrowRight",rtl:"arrowLeft",ttb:"arrowDown"})[r.normalizedDir],d=o.computed(()=>!r.config.wrapAround&&r.currentSlide<=r.minSlide),c=o.computed(()=>!r.config.wrapAround&&r.currentSlide>=r.maxSlide);return()=>{const{i18n:u}=r.config,m=o.h("button",Object.assign(Object.assign({type:"button",disabled:d.value,"aria-label":u.ariaPreviousSlide,title:u.ariaPreviousSlide,onClick:r.nav.prev},n),{class:["carousel__prev",{"carousel__prev--disabled":d.value},n.class]}),(i==null?void 0:i())||o.h(Ei,{name:l()})),f=o.h("button",Object.assign(Object.assign({type:"button",disabled:c.value,"aria-label":u.ariaNextSlide,title:u.ariaNextSlide,onClick:r.nav.next},n),{class:["carousel__next",{"carousel__next--disabled":c.value},n.class]}),(a==null?void 0:a())||o.h(Ei,{name:s()}));return[m,f]}}}),o.defineComponent({name:"CarouselPagination",props:{disableOnClick:{type:Boolean},paginateByItemsToShow:{type:Boolean}},setup(e){const t=o.inject(Mt);if(!t)return()=>"";const n=o.computed(()=>t.config.itemsToShow),r=o.computed(()=>sr({align:t.config.snapAlign,itemsToShow:n.value})),a=o.computed(()=>e.paginateByItemsToShow&&n.value>1),i=o.computed(()=>Math.ceil((t.activeSlide-r.value)/n.value)),l=o.computed(()=>Math.ceil(t.slidesCount/n.value)),s=d=>xi(a.value?{val:i.value,max:l.value-1,min:0}:{val:t.activeSlide,max:t.maxSlide,min:t.minSlide})===d;return()=>{var d,c;const u=[];for(let m=a.value?0:t.minSlide;m<=(a.value?l.value-1:t.maxSlide);m++){const f=vi(t.config.i18n[a.value?"ariaNavigateToPage":"ariaNavigateToSlide"],{slideNumber:m+1}),p=s(m),g=o.h("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":p},"aria-label":f,"aria-pressed":p,"aria-controls":(c=(d=t.slides[m])===null||d===void 0?void 0:d.exposed)===null||c===void 0?void 0:c.id,title:f,disabled:e.disableOnClick,onClick:()=>t.nav.slideTo(a.value?Math.floor(m*+t.config.itemsToShow+r.value):m)}),h=o.h("li",{class:"carousel__pagination-item",key:m},g);u.push(h)}return o.h("ol",{class:"carousel__pagination"},u)}}}),o.defineComponent({name:"CarouselSlide",props:{id:{type:String,default:e=>e.isClone?void 0:o.useId()},index:{type:Number,default:void 0},isClone:{type:Boolean,default:!1},position:{type:String,default:void 0}},setup(e,{attrs:t,slots:n,expose:r}){const a=o.inject(Mt);if(o.provide(Mt,void 0),!a)return()=>"";const i=o.ref(e.index),l=g=>{i.value=g},s=o.getCurrentInstance(),d=()=>{const g=s.vnode.el;return g?g.getBoundingClientRect():{width:0,height:0}};r({id:e.id,setIndex:l,getBoundingRect:d});const c=o.computed(()=>i.value===a.activeSlide),u=o.computed(()=>i.value===a.activeSlide-1),m=o.computed(()=>i.value===a.activeSlide+1),f=o.computed(()=>i.value>=a.visibleRange.min&&i.value<=a.visibleRange.max),p=o.computed(()=>{if(a.config.itemsToShow==="auto")return;const g=a.config.itemsToShow,h=a.config.gap>0&&g>1?`calc(${100/g}% - ${a.config.gap*(g-1)/g}px)`:`${100/g}%`;return a.isVertical?{height:h}:{width:h}});return a.slideRegistry.registerSlide(s,e.index),o.onUnmounted(()=>{a.slideRegistry.unregisterSlide(s)}),e.isClone&&(o.onMounted(()=>{wi(s.vnode)}),o.onUpdated(()=>{wi(s.vnode)})),()=>{var g,h;return a.config.enabled?o.h("li",{style:[t.style,Object.assign({},p.value)],class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":f.value,"carousel__slide--active":c.value,"carousel__slide--prev":u.value,"carousel__slide--next":m.value,"carousel__slide--sliding":a.isSliding},onFocusin:()=>{a.viewport&&(a.viewport.scrollLeft=0),a.nav.slideTo(i.value)},id:e.isClone?void 0:e.id,"aria-hidden":e.isClone||void 0},(h=n.default)===null||h===void 0?void 0:h.call(n,{currentIndex:i.value,isActive:c.value,isClone:e.isClone,isPrev:u.value,isNext:m.value,isSliding:a.isSliding,isVisible:f.value})):(g=n.default)===null||g===void 0?void 0:g.call(n)}}});const hp={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},bp={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},yp={class:"flex items-center justify-center gap-2 flex-wrap"},kp={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},wp=["onClick"],vp={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},xp={class:"flex items-center justify-center gap-2 flex-wrap"},Sp={key:0,class:"error-message"},Cp={class:"text-red-500 font-bold"},Ep={key:0},Bp={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},$p={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Np={class:"flex items-center justify-center gap-2 flex-wrap"},Op={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},Vp=["onClick"],Tp={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Ip={class:"flex items-center justify-center gap-2 flex-wrap"},Fp={key:1},Bi=Ie({__name:"EntityListing",props:{entityName:String,listClass:String,listItemClass:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},displayField:String,baseUrl:String,hrefKey:String,editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object,roles:{type:[Array,String],default:()=>[]},permissions:{type:[Array,String],default:()=>[]},decoration:{type:String,default:"default"},numberVisible:{type:Number,default:3},variable:{type:String,default:"item"},showPresets:{type:Boolean,default:!1},scrollHeight:{type:String,default:""},showToolBar:{type:String,default:"top"},gap:{type:Number,default:1},justifyContent:{type:String,default:""},preFiltered:{type:String,default:""},fetchParentEntities:{type:Boolean},fetchChildEntities:{type:Number},relatedEntities:{type:String},fetchList:{type:Boolean}},setup(e,{expose:t,emit:n}){const r=e,a=$e(),i=new Le;o.ref(null),o.ref(null);const l=o.ref("id"),s=o.ref(1),d=o.ref(25),c=o.ref(0),u=o.ref(null),m=n,f=o.ref([]),p=o.ref([]),g=o.ref(!0),h=o.ref(null),{hasMatchingRoleAndPermissions:b}=zt(),y=fo();o.provide("entityObject",y),o.onMounted(async()=>{g.value=await b(r.roles,r.permissions),console.log("props entitylist",r.preFiltered),r.preFiltered&&C()}),r.linkedEntity?o.watch(()=>r.linkedEntity,v=>{v&&(f.value=v,m("linkedEntityChanged",v))},{immediate:!0}):o.watch(()=>y.state.data,v=>{v&&(f.value=v.result,m("linkedEntityChanged",v.result))},{immediate:!0});const k=v=>{u.value=v,y.state.data.filters=v,R(u.value)},w=()=>{u.value=null,l.value="id",s.value=1,y.state.data.filters={},R(u.value)},S=async(v,B)=>{l.value=v,s.value=B,u.value=y.state.data.filters?y.state.data.filters:u.value,R(u.value)},E=v=>{d.value=v,u.value=y.state.data.filters?y.state.data.filters:u.value,R(u.value)},R=async v=>{var B,I;console.log("entity state filter",y);try{const V={sortBy:[l.value],sortDirection:s.value===1?"ASC":"DESC",pageSize:d.value,currentPage:c.value,columnList:null,filter:v,fullTextSearch:""};r.fetchParentEntities&&(V.fetchParentEntities=r.fetchParentEntities),r.fetchChildEntities!==void 0&&(V.fetchChildEntities=r.fetchChildEntities),r.relatedEntities&&(V.relatedEntities=r.relatedEntities.split(",").map(H=>H.trim())),r.fetchList&&(V.fetchList=r.fetchList);const A=await i.searchEntityRecords(r.entityName,V);A&&A.response?(y.setEntity(A.response),p.value=((I=(B=y==null?void 0:y.state)==null?void 0:B.data)==null?void 0:I.presets)||[]):console.error("Error fetching entity data:",A)}catch{}},C=async()=>{if(!r.preFiltered)return;const v=y.parsePrefilter(r.preFiltered);v.length&&R(v)};t({props:r,reload:()=>{console.log("reload data")},filter:v=>{console.log("filter data in unordered",v)},addToCurrentList:v=>{var B,I;(I=(B=y==null?void 0:y.state)==null?void 0:B.data)!=null&&I.result&&y.state.data.result.push(v)},deleteFromCurrentList:v=>{const B=y.state.data.result.indexOf(v);y.state.data.result.splice(B,1)},searchRecord:k,searchByPageSize:E,searchBySort:S,clearFilters:w}),o.watch(()=>a.globalConfigs.appId,async v=>{var B,I;if(v){if(r.linkedEntity&&r.linkedEntity.length>0)y.setEntity(r.linkedEntity);else if(!r.preFiltered){const V={};r.fetchParentEntities!==void 0&&(V.fetchParentEntities=r.fetchParentEntities),r.fetchChildEntities!==void 0&&(V.fetchChildEntities=r.fetchChildEntities),r.relatedEntities&&(V.relatedEntities=r.relatedEntities.split(",").map(H=>H.trim())),r.fetchList&&(V.fetchList=r.fetchList);const A=await y.getEntity(r.entityName,V);p.value=((I=(B=A==null?void 0:A.response)==null?void 0:B.entity)==null?void 0:I.presets)||[],console.log("Fetched presets data:",p.value),y.setEntity(A.success?A.response:{result:[]})}}},{immediate:!0});const L=async v=>{const B=await y.applyPreset(v,r.entityName);y.state.data=B||{}};return(v,B)=>{var I,V,A;return g.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},v.$attrs,{class:"flex flex-col"}),[o.renderSlot(v.$slots,"header",{},void 0,!0),v.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",hp,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",bp,[o.createElementVNode("div",yp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",kp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,H=>(o.openBlock(),o.createElementBlock("button",{key:H,onClick:P=>{h.value=H.name,L(H.name)},class:o.normalizeClass(["bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm",["px-4 py-2 rounded-full text-sm",h.value===H.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(H.name),11,wp))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["flex flex-wrap",[r.decoration==="tiles"?"":"flex-col",`gap-${r.gap}`,r.scrollHeight?`overflow-y-auto h-[${r.scrollHeight}]`:"",r.justifyContent?`justify-${r.justifyContent}`:"justify-center"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.linkedEntity&&e.linkedEntity.length>0?e.linkedEntity:((A=(V=(I=o.unref(y))==null?void 0:I.state)==null?void 0:V.data)==null?void 0:A.result)||[],H=>o.renderSlot(v.$slots,"list-item-display",o.normalizeProps({item:H,class:e.listItemClass,[e.variable||""]:H}),void 0,!0)),256))],2),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",vp,[o.createElementVNode("div",xp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Sp,[o.createElementVNode("p",Cp,[B[0]||(B[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Ep,"Entity Name"))])])),o.createElementVNode("div",null,[o.createElementVNode("div",Bp,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",$p,[o.createElementVNode("div",Np,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",Op,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,H=>(o.openBlock(),o.createElementBlock("button",{key:H,onClick:P=>{h.value=H.name,L(H.name)},class:o.normalizeClass(["bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm",["px-4 py-2 rounded-full text-sm",h.value===H.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(H.name),11,Vp))),128))])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(H,P)=>(o.openBlock(),o.createElementBlock("div",{key:P},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:tp),o.mergeProps({key:H,preFiltered:r.preFiltered,ref_for:!0},{item:H,...r}),null,16,["preFiltered"]))]))),128)),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Tp,[o.createElementVNode("div",Ip,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:r.externalFilterPayload,preFiltered:r.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),o.renderSlot(v.$slots,"footer",{},void 0,!0)],64)),o.renderSlot(v.$slots,"footer",{},void 0,!0)],16)):(o.openBlock(),o.createElementBlock("p",Fp,"You do not have the required permissions to access this feature."))}}},[["__scopeId","data-v-896c5db8"]]),Pp={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col"},Rp={class:"flex justify-between items-start gap-4"},Dp={class:"flex-grow"},_p={class:"flex flex-col gap-2"},Ap={class:"font-bold text-gray-700"},Lp={class:"text-gray-600"},zp={class:"flex flex-col gap-2"},Mp=Ie({__name:"EntityListingTileSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean},setup(e){const t=e,n=o.inject("entityObject"),r=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),s=o.ref(!1);o.onMounted(()=>{r.value=n.getEntityColumns(n.state.data),a.value=r.value.find(f=>f.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const d=()=>{l.value=!0},c=()=>{s.value=!0},u=async f=>{f.remove?m():l.value=!1},m=async()=>{const f=n.getPrimaryKeyColumn(n.state.data),p=t.item[f.name],g=await n.entityRecordDelete(n.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await n.searchRecord(n.state.data,{sortBy:n.state.data.sortBy,sortDirection:n.state.data.sortDirection,pageSize:n.state.data.pageSize,currentPage:n.state.data.currentPage,columnList:null,filter:n.state.data.filters,fullTextSearch:n.state.data.fullTextSearch});h!=null&&h.response&&n.setEntity(h.response)}};return(f,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Pp,[o.createElementVNode("div",Rp,[o.createElementVNode("div",Dp,[o.createElementVNode("div",_p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",Ap,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",Lp,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",zp,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>c()),icon:"pi pi-pencil",severity:"success",rounded:"","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>d()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),s.value?(o.openBlock(),o.createBlock(pn,{key:0,showEntityForm:s.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>s.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(mo,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:u},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-c78e676f"]]),jp={class:"flex flex-wrap gap-4 p-2"},Up={key:0,class:"error-message"},Hp={class:"text-red-500 font-bold"},Wp={key:0},qp={key:1},Kp={class:"flex flex-wrap gap-4 p-4"},$i=Ie({__name:"EntityListingTile",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,dynamicPropName:{type:String,default:"item"}},setup(e,{expose:t}){const n=fo(),r=$e();o.provide("entityObject",n);const a=e,i=o.ref([]);return o.watch(()=>n.state.data,d=>{d&&(i.value=d.result)},{immediate:!0}),t({props:a,reload:()=>{console.log("reload data")},filter:()=>{console.log("filter data in unordered")}}),o.watch(()=>r.globalConfigs.appId,async d=>{if(d){const c=await n.getEntity(a.entityName);n.setEntity(c.success?c.response:{result:[]})}},{immediate:!0}),(d,c)=>{var u,m,f;return o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(d.$attrs)),[d.$slots["list-item-display-tile"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(d.$slots,"header",{},void 0,!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:0})):o.createCommentVNode("",!0),e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",jp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((f=(m=(u=o.unref(n))==null?void 0:u.state)==null?void 0:m.data)==null?void 0:f.result)||[],(p,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex flex-col p-6 border border-gray-300 shadow-md rounded-lg bg-white w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5 2xl:w-1/8"},[o.renderSlot(d.$slots,"list-item-display-tile",o.normalizeProps({[e.dynamicPropName||""]:p}),void 0,!0)]))),128))]),o.renderSlot(d.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(d.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",qp,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0})):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",Kp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,g)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:Mp),o.mergeProps({key:g,ref_for:!0},{item:p,...a}),null,16))),128))]),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2})):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Up,[o.createElementVNode("p",Hp,[c[0]||(c[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Wp,"Entity Name"))])])),o.renderSlot(d.$slots,"footer",{},void 0,!0)],64))],16)}}},[["__scopeId","data-v-037944bc"]]),Gp={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col responsive-box"},Yp={class:"flex justify-between items-start gap-4"},Xp={class:"flex-grow"},Jp={class:"flex flex-col gap-2"},Qp={class:"font-bold text-gray-700"},Zp={class:"text-gray-600"},eg={class:"flex flex-col gap-2"},tg=Ie({__name:"EntityListingCarouselSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,numberVisible:{type:Number,default:3}},setup(e){const t=e,n=o.inject("entityObject"),r=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),s=o.ref(!1);o.onMounted(()=>{r.value=n.getEntityColumns(n.state.data),a.value=r.value.find(f=>f.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const d=()=>{l.value=!0},c=()=>{s.value=!0},u=async f=>{f.remove?m():l.value=!1},m=async()=>{const f=n.getPrimaryKeyColumn(n.state.data),p=t.item[f.name],g=await n.entityRecordDelete(n.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await n.searchRecord(n.state.data,{sortBy:n.state.data.sortBy,sortDirection:n.state.data.sortDirection,pageSize:n.state.data.pageSize,currentPage:n.state.data.currentPage,columnList:null,filter:n.state.data.filters,fullTextSearch:n.state.data.fullTextSearch});h!=null&&h.response&&n.setEntity(h.response)}};return(f,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Gp,[o.createElementVNode("div",Yp,[o.createElementVNode("div",Xp,[o.createElementVNode("div",Jp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",Qp,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",Zp,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",eg,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>c()),icon:"pi pi-pencil",severity:"success",variant:"text","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>d()),icon:"pi pi-trash",severity:"danger",variant:"text","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),s.value?(o.openBlock(),o.createBlock(pn,{key:0,showEntityForm:s.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>s.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(mo,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:u},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-dcd45091"]]);function ng(e,t){return e?e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className):!1}function og(e,t){if(e&&t){const n=r=>{ng(e,r)||(e.classList?e.classList.add(r):e.className+=" "+r)};[t].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function go(e){for(const t of document==null?void 0:document.styleSheets)try{for(const n of t==null?void 0:t.cssRules)for(const r of n==null?void 0:n.style)if(e.test(r))return{name:r,value:n.style.getPropertyValue(r).trim()}}catch{}return null}function ur(e,t){if(e&&t){const n=r=>{e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function Ni(e){let t={width:0,height:0};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}function Oi(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0],a=e.innerWidth||n.clientWidth||r.clientWidth,i=e.innerHeight||n.clientHeight||r.clientHeight;return{width:a,height:i}}function rg(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function ag(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function ig(e,t,n=!0){var r,a,i,l;if(e){const s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:Ni(e),d=s.height,c=s.width,u=t.offsetHeight,m=t.offsetWidth,f=t.getBoundingClientRect(),p=ag(),g=rg(),h=Oi();let b,y,k="top";f.top+u+d>h.height?(b=f.top+p-d,k="bottom",b<0&&(b=p)):b=u+f.top+p,f.left+c>h.width?y=Math.max(0,f.left+g+m-c):y=f.left+g,e.style.top=b+"px",e.style.left=y+"px",e.style.transformOrigin=k,n&&(e.style.marginTop=k==="bottom"?`calc(${(a=(r=go(/-anchor-gutter$/))==null?void 0:r.value)!=null?a:"2px"} * -1)`:(l=(i=go(/-anchor-gutter$/))==null?void 0:i.value)!=null?l:"")}}function lg(e,t){e&&(typeof t=="string"?e.style.cssText=t:Object.entries(t).forEach(([n,r])=>e.style[n]=r))}function Vi(e,t){return e instanceof HTMLElement?e.offsetWidth:0}function sg(e,t,n=!0){var r,a,i,l;if(e){const s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:Ni(e),d=t.offsetHeight,c=t.getBoundingClientRect(),u=Oi();let m,f,p="top";c.top+d+s.height>u.height?(m=-1*s.height,p="bottom",c.top+m<0&&(m=-1*c.top)):m=d,s.width>u.width?f=c.left*-1:c.left+s.width>u.width?f=(c.left+s.width-u.width)*-1:f=0,e.style.top=m+"px",e.style.left=f+"px",e.style.transformOrigin=p,n&&(e.style.marginTop=p==="bottom"?`calc(${(a=(r=go(/-anchor-gutter$/))==null?void 0:r.value)!=null?a:"2px"} * -1)`:(l=(i=go(/-anchor-gutter$/))==null?void 0:i.value)!=null?l:"")}}function hn(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}function ho(e,t={}){if(hn(e)){const n=(r,a)=>{var i,l;const s=(i=e==null?void 0:e.$attrs)!=null&&i[r]?[(l=e==null?void 0:e.$attrs)==null?void 0:l[r]]:[];return[a].flat().reduce((d,c)=>{if(c!=null){const u=typeof c;if(u==="string"||u==="number")d.push(c);else if(u==="object"){const m=Array.isArray(c)?n(r,c):Object.entries(c).map(([f,p])=>r==="style"&&(p||p===0)?`${f.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${p}`:p?f:void 0);d=m.length?d.concat(m.filter(f=>!!f)):d}}return d},s)};Object.entries(t).forEach(([r,a])=>{if(a!=null){const i=r.match(/^on(.+)/);i?e.addEventListener(i[1].toLowerCase(),a):r==="p-bind"||r==="pBind"?ho(e,a):(a=r==="class"?[...new Set(n("class",a))].join(" ").trim():r==="style"?n("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[r]=a),e.setAttribute(r,a))}})}}function cg(e,t={},...n){{const r=document.createElement(e);return ho(r,t),r.append(...n),r}}function dg(e,t){return hn(e)?Array.from(e.querySelectorAll(t)):[]}function bo(e,t){return hn(e)?e.matches(t)?e:e.querySelector(t):null}function $t(e,t){e&&document.activeElement!==e&&e.focus(t)}function ug(e,t){if(hn(e)){const n=e.getAttribute(t);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function fr(e,t=""){let n=dg(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
24
24
|
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
25
25
|
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
26
26
|
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
@@ -923,7 +923,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
923
923
|
border-color: transparent;
|
|
924
924
|
color: `).concat(n("button.link.active.color"),`;
|
|
925
925
|
}
|
|
926
|
-
`)},Ih={root:function(t){var n=t.instance,r=t.props;return["p-button p-component",ft(ft(ft(ft(ft(ft(ft(ft(ft({"p-button-icon-only":n.hasIcon&&!r.label&&!r.badge,"p-button-vertical":(r.iconPos==="top"||r.iconPos==="bottom")&&r.label,"p-button-loading":r.loading,"p-button-link":r.link||r.variant==="link"},"p-button-".concat(r.severity),r.severity),"p-button-raised",r.raised),"p-button-rounded",r.rounded),"p-button-text",r.text||r.variant==="text"),"p-button-outlined",r.outlined||r.variant==="outlined"),"p-button-sm",r.size==="small"),"p-button-lg",r.size==="large"),"p-button-plain",r.plain),"p-button-fluid",n.hasFluid)]},loadingIcon:"p-button-loading-icon",icon:function(t){var n=t.props;return["p-button-icon",ft({},"p-button-icon-".concat(n.iconPos),n.label)]},label:"p-button-label"},Fh=Ce.extend({name:"button",theme:Th,classes:Ih}),Ph={name:"BaseButton",extends:Ht,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:[String,Object],default:null},badge:{type:String,default:null},badgeClass:{type:[String,Object],default:null},badgeSeverity:{type:String,default:"secondary"},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},as:{type:[String,Object],default:"BUTTON"},asChild:{type:Boolean,default:!1},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},variant:{type:String,default:null},plain:{type:Boolean,default:!1},fluid:{type:Boolean,default:null}},style:Fh,provide:function(){return{$pcButton:this,$parentInstance:this}}},ll={name:"Button",extends:Ph,inheritAttrs:!1,inject:{$pcFluid:{default:null}},methods:{getPTOptions:function(t){var n=t==="root"?this.ptmi:this.ptm;return n(t,{context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||this.$attrs.disabled===""||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs.ariaLabel},hasIcon:function(){return this.icon||this.$slots.icon},attrs:function(){return o.mergeProps(this.asAttrs,this.a11yAttrs,this.getPTOptions("root"))},asAttrs:function(){return this.as==="BUTTON"?{type:"button",disabled:this.disabled}:void 0},a11yAttrs:function(){return{"aria-label":this.defaultAriaLabel,"data-pc-name":"button","data-p-disabled":this.disabled,"data-p-severity":this.severity}},hasFluid:function(){return Lt(this.fluid)?!!this.$pcFluid:this.fluid}},components:{SpinnerIcon:vo,Badge:el},directives:{ripple:il}};function Rh(e,t,n,r,a,i){var l=o.resolveComponent("SpinnerIcon"),s=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return e.asChild?o.renderSlot(e.$slots,"default",{key:1,class:o.normalizeClass(e.cx("root")),a11yAttrs:i.a11yAttrs}):o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.as),o.mergeProps({key:0,class:e.cx("root")},i.attrs),{default:o.withCtx(function(){return[o.renderSlot(e.$slots,"default",{},function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon")]},e.ptm("loadingIcon")),function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(l,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]}):o.renderSlot(e.$slots,"icon",o.mergeProps({key:1,class:[e.cx("icon")]},e.ptm("icon")),function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]}),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(s,{key:2,value:e.badge,class:o.normalizeClass(e.badgeClass),severity:e.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("pcBadge")},null,8,["value","class","severity","unstyled","pt"])):o.createCommentVNode("",!0)]})]}),_:3},16,["class"])),[[d]])}ll.render=Rh;const Dh={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},_h={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Ah={class:"flex items-center justify-center gap-2 flex-wrap"},Lh={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},zh=["onClick"],Mh={key:1,class:"relative"},jh={key:2,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Uh={class:"flex items-center justify-center gap-2 flex-wrap"},Hh={key:0,class:"error-message"},Wh={class:"text-red-500 font-bold"},qh={key:0},Kh={key:1,class:"mb-4 mt-4"},Gh={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},Yh={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Xh={class:"flex items-center justify-center gap-2 flex-wrap"},Jh={key:0,class:"relative"},Qh={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Zh={class:"flex items-center justify-center gap-2 flex-wrap"},sl=Ie({__name:"EntityListingCarousel",props:{entityName:String,listClass:String,listItemClass:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},displayField:String,baseUrl:String,hrefKey:String,editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object,roles:{type:[Array,String],default:()=>[]},permissions:{type:[Array,String],default:()=>[]},decoration:{type:String,default:"default"},numberVisible:{type:Number,default:3},variable:{type:String,default:"item"},showPresets:{type:Boolean,default:!1},scrollHeight:{type:String,default:""},showToolBar:{type:String,default:"top"},gap:{type:Number,default:1},justifyContent:{type:String,default:""},preFiltered:{type:String,default:""},fetchParentEntities:{type:Boolean},fetchChildEntities:{type:Number},relatedEntities:{type:String},fetchList:{type:Boolean}},setup(e,{expose:t,emit:n}){const r=$e(),a=new Le,i=n,l=e,s=o.ref("id"),d=o.ref(1),c=o.ref(25),u=o.ref(0),m=o.ref(null),f=o.ref([]),p=o.ref([]),g=o.ref(!0),h=o.ref(null),{hasMatchingRoleAndPermissions:b}=zt(),y=fo();o.provide("entityObject",y);const k=o.ref(null),w=I=>{const V=k.value;V&&(V.scrollLeft+=I*266)};o.onMounted(async()=>{g.value=await b(l.roles,l.permissions),console.log("props entitylist",l.preFiltered),l.preFiltered&&_()}),l.linkedEntity?o.watch(()=>l.linkedEntity,I=>{I&&(f.value=I,i("linkedEntityChanged",I))},{immediate:!0}):o.watch(()=>y.state.data,I=>{I&&(f.value=I.result,i("linkedEntityChanged",I.result))},{immediate:!0});const S=I=>{m.value=I,y.state.data.filters=I,x(m.value)},E=()=>{m.value=null,s.value="id",d.value=1,y.state.data.filters={},x(m.value)},R=async(I,V)=>{s.value=I,d.value=V,m.value=y.state.data.filters?y.state.data.filters:m.value,x(m.value)},C=I=>{c.value=I,m.value=y.state.data.filters?y.state.data.filters:m.value,x(m.value)},x=async I=>{var H,P;console.log("entity state filter",y);const V={sortBy:[s.value],sortDirection:d.value===1?"ASC":"DESC",pageSize:c.value,currentPage:u.value,columnList:null,filter:I,fullTextSearch:""};l.fetchParentEntities&&(V.fetchParentEntities=l.fetchParentEntities),l.fetchChildEntities!==void 0&&(V.fetchChildEntities=l.fetchChildEntities),l.relatedEntities&&(V.relatedEntities=l.relatedEntities),l.fetchList&&(V.fetchList=l.fetchList);const A=await a.searchEntityRecords(l.entityName,V);A&&A.response?(y.setEntity(A.response),p.value=((P=(H=y==null?void 0:y.state)==null?void 0:H.data)==null?void 0:P.presets)||[]):console.error("Error fetching entity data:",A)},_=async()=>{if(!l.preFiltered)return;const I=y.parsePrefilter(l.preFiltered);I.length&&x(I)};t({props:l,reload:()=>{console.log("reload data")},filter:I=>{console.log("filter data in unordered",I)},addToCurrentList:I=>{var V,A;(A=(V=y==null?void 0:y.state)==null?void 0:V.data)!=null&&A.result&&y.state.data.result.push(I)},deleteFromCurrentList:I=>{const V=y.state.data.result.indexOf(I);y.state.data.result.splice(V,1)},searchRecord:S,searchByPageSize:C,searchBySort:R,clearFilters:E}),o.watch(()=>r.globalConfigs.appId,async I=>{var V,A;if(I){if(l.linkedEntity&&l.linkedEntity.length>0)y.setEntity(l.linkedEntity);else if(!l.preFiltered){const H=await y.getEntity(l.entityName);p.value=((A=(V=H==null?void 0:H.response)==null?void 0:V.entity)==null?void 0:A.presets)||[],y.setEntity(H.success?H.response:{result:[]})}}},{immediate:!0});const B=async I=>{const V=await y.applyPreset(I,l.entityName);y.state.data=V||{}};return(I,V)=>(o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(I.$attrs)),[I.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(I.$slots,"header",{},void 0,!0),o.createElementVNode("div",Dh,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",_h,[o.createElementVNode("div",Ah,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",Lh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,A=>(o.openBlock(),o.createElementBlock("button",{key:A,onClick:H=>{h.value=A.name,B(A.name)},class:o.normalizeClass(["px-4 py-2 rounded-full text-sm",[h.value===A.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(A.name),11,zh))),128))])):o.createCommentVNode("",!0),f.value.length>0?(o.openBlock(),o.createElementBlock("div",Mh,[o.createElementVNode("button",{onClick:V[0]||(V[0]=A=>w(-1)),class:"absolute left-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ◀ "),o.createElementVNode("div",{ref_key:"carouselRef",ref:k,class:"flex overflow-x-auto no-scrollbar gap-4 py-2 px-10 scroll-smooth"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,A=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:"min-w-[250px] flex-shrink-0"},[o.renderSlot(I.$slots,"list-item-display",{item:A},void 0,!0)]))),128))],512),o.createElementVNode("button",{onClick:V[1]||(V[1]=A=>w(1)),class:"absolute right-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ▶ ")])):o.createCommentVNode("",!0),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",jh,[o.createElementVNode("div",Uh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0),o.renderSlot(I.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(I.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",Kh,[o.createElementVNode("div",Gh,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Yh,[o.createElementVNode("div",Xh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),f.value.length>0?(o.openBlock(),o.createElementBlock("div",Jh,[o.createElementVNode("button",{onClick:V[2]||(V[2]=A=>w(-1)),class:"absolute left-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ◀ "),o.createElementVNode("div",{ref_key:"carouselRef",ref:k,class:"flex overflow-x-auto no-scrollbar gap-4 py-2 px-10 scroll-smooth"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,A=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:"min-w-[250px] flex-shrink-0"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay&&e.listItemDisplay!==""?e.listItemDisplay:tg),o.mergeProps({ref_for:!0},{item:A,...l}),null,16))]))),128))],512),o.createElementVNode("button",{onClick:V[3]||(V[3]=A=>w(1)),class:"absolute right-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ▶ ")])):o.createCommentVNode("",!0),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Qh,[o.createElementVNode("div",Zh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Hh,[o.createElementVNode("p",Wh,[V[4]||(V[4]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",qh,"Entity Name"))])])),o.renderSlot(I.$slots,"footer",{},void 0,!0)],64))],16))}},[["__scopeId","data-v-c4440e7d"]]),cl=6048e5,eb=864e5,dl=Symbol.for("constructDateFrom");function Ot(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&dl in e?e[dl](t):e instanceof Date?new e.constructor(t):new Date(t)}function rt(e,t){return Ot(t||e,e)}let tb={};function xo(){return tb}function $n(e,t){var s,d,c,u;const n=xo(),r=(t==null?void 0:t.weekStartsOn)??((d=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,a=rt(e,t==null?void 0:t.in),i=a.getDay(),l=(i<r?7:0)+i-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function So(e,t){return $n(e,{...t,weekStartsOn:1})}function ul(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),a=Ot(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=So(a),l=Ot(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const s=So(l);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function fl(e){const t=rt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function nb(e,...t){const n=Ot.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ml(e,t){const n=rt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ob(e,t,n){const[r,a]=nb(n==null?void 0:n.in,e,t),i=ml(r),l=ml(a),s=+i-fl(i),d=+l-fl(l);return Math.round((s-d)/eb)}function rb(e,t){const n=ul(e,t),r=Ot(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),So(r)}function ab(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ib(e){return!(!ab(e)&&typeof e!="number"||isNaN(+rt(e)))}function lb(e,t){const n=rt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const sb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},cb=(e,t,n)=>{let r;const a=sb[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const db={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ub={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mb={date:wr({formats:db,defaultWidth:"full"}),time:wr({formats:ub,defaultWidth:"full"}),dateTime:wr({formats:fb,defaultWidth:"full"})},pb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gb=(e,t,n,r)=>pb[e];function Nn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):l;a=e.formattingValues[s]||e.formattingValues[l]}else{const l=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[s]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const hb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},kb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xb={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Nn({values:hb,defaultWidth:"wide"}),quarter:Nn({values:bb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nn({values:yb,defaultWidth:"wide"}),day:Nn({values:kb,defaultWidth:"wide"}),dayPeriod:Nn({values:wb,defaultWidth:"wide",formattingValues:vb,defaultFormattingWidth:"wide"})};function On(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Cb(s,m=>m.test(l)):Sb(s,m=>m.test(l));let c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(l.length);return{value:c,rest:u}}}function Sb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Cb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Eb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=n.valueCallback?n.valueCallback(l):l;const s=t.slice(a.length);return{value:l,rest:s}}}const Bb=/^(\d+)(th|st|nd|rd)?/i,$b=/\d+/i,Nb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ob={any:[/^b/i,/^(a|c)/i]},Vb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tb={any:[/1/i,/2/i,/3/i,/4/i]},Ib={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Fb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Rb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Db={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ab={ordinalNumber:Eb({matchPattern:Bb,parsePattern:$b,valueCallback:e=>parseInt(e,10)}),era:On({matchPatterns:Nb,defaultMatchWidth:"wide",parsePatterns:Ob,defaultParseWidth:"any"}),quarter:On({matchPatterns:Vb,defaultMatchWidth:"wide",parsePatterns:Tb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:On({matchPatterns:Ib,defaultMatchWidth:"wide",parsePatterns:Fb,defaultParseWidth:"any"}),day:On({matchPatterns:Pb,defaultMatchWidth:"wide",parsePatterns:Rb,defaultParseWidth:"any"}),dayPeriod:On({matchPatterns:Db,defaultMatchWidth:"any",parsePatterns:_b,defaultParseWidth:"any"})},Lb={code:"en-US",formatDistance:cb,formatLong:mb,formatRelative:gb,localize:xb,match:Ab,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zb(e,t){const n=rt(e,t==null?void 0:t.in);return ob(n,lb(n))+1}function Mb(e,t){const n=rt(e,t==null?void 0:t.in),r=+So(n)-+rb(n);return Math.round(r/cl)+1}function pl(e,t){var u,m,f,p;const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),a=xo(),i=(t==null?void 0:t.firstWeekContainsDate)??((m=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,l=Ot((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const s=$n(l,t),d=Ot((t==null?void 0:t.in)||e,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const c=$n(d,t);return+n>=+s?r+1:+n>=+c?r:r-1}function jb(e,t){var s,d,c,u;const n=xo(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,a=pl(e,t),i=Ot((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),$n(i,t)}function Ub(e,t){const n=rt(e,t==null?void 0:t.in),r=+$n(n,t)-+jb(n,t);return Math.round(r/cl)+1}function be(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return be(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):be(n+1,2)},d(e,t){return be(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return be(e.getHours()%12||12,t.length)},H(e,t){return be(e.getHours(),t.length)},m(e,t){return be(e.getMinutes(),t.length)},s(e,t){return be(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return be(a,t.length)}},on={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gl={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Vt.y(e,t)},Y:function(e,t,n,r){const a=pl(e,r),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return be(l,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):be(i,t.length)},R:function(e,t){const n=ul(e);return be(n,t.length)},u:function(e,t){const n=e.getFullYear();return be(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return be(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return be(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return be(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Ub(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):be(a,t.length)},I:function(e,t,n){const r=Mb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):be(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vt.d(e,t)},D:function(e,t,n){const r=zb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):be(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return be(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return be(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return be(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=on.noon:r===0?a=on.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=on.evening:r>=12?a=on.afternoon:r>=4?a=on.morning:a=on.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vt.s(e,t)},S:function(e,t){return Vt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return bl(r);case"XXXX":case"XX":return Wt(r);case"XXXXX":case"XXX":default:return Wt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return bl(r);case"xxxx":case"xx":return Wt(r);case"xxxxx":case"xxx":default:return Wt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hl(r,":");case"OOOO":default:return"GMT"+Wt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hl(r,":");case"zzzz":default:return"GMT"+Wt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return be(r,t.length)},T:function(e,t,n){return be(+e,t.length)}};function hl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+be(i,2)}function bl(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Wt(e,t)}function Wt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=be(Math.trunc(r/60),2),i=be(r%60,2);return n+a+t+i}const yl=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hb={p:kl,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return yl(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",yl(r,t)).replace("{{time}}",kl(a,t))}},Wb=/^D+$/,qb=/^Y+$/,Kb=["D","DD","YY","YYYY"];function Gb(e){return Wb.test(e)}function Yb(e){return qb.test(e)}function Xb(e,t,n){const r=Jb(e,t,n);if(console.warn(r),Kb.includes(e))throw new RangeError(r)}function Jb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e0=/^'([^]*?)'?$/,t0=/''/g,n0=/[a-zA-Z]/;function o0(e,t,n){var u,m,f,p;const r=xo(),a=r.locale??Lb,i=r.firstWeekContainsDate??((m=(u=r.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,l=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,s=rt(e,n==null?void 0:n.in);if(!ib(s))throw new RangeError("Invalid time value");let d=t.match(Zb).map(g=>{const h=g[0];if(h==="p"||h==="P"){const b=Hb[h];return b(g,a.formatLong)}return g}).join("").match(Qb).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:r0(g)};if(gl[h])return{isToken:!0,value:g};if(h.match(n0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(d=a.localize.preprocessor(s,d));const c={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return d.map(g=>{if(!g.isToken)return g.value;const h=g.value;(Yb(h)||Gb(h))&&Xb(h,t,String(e));const b=gl[h[0]];return b(s,h,a.localize,c)}).join("")}function r0(e){const t=e.match(e0);return t?t[1].replace(t0,"'"):e}var Co={exports:{}};/*! @preserve
|
|
926
|
+
`)},Ih={root:function(t){var n=t.instance,r=t.props;return["p-button p-component",ft(ft(ft(ft(ft(ft(ft(ft(ft({"p-button-icon-only":n.hasIcon&&!r.label&&!r.badge,"p-button-vertical":(r.iconPos==="top"||r.iconPos==="bottom")&&r.label,"p-button-loading":r.loading,"p-button-link":r.link||r.variant==="link"},"p-button-".concat(r.severity),r.severity),"p-button-raised",r.raised),"p-button-rounded",r.rounded),"p-button-text",r.text||r.variant==="text"),"p-button-outlined",r.outlined||r.variant==="outlined"),"p-button-sm",r.size==="small"),"p-button-lg",r.size==="large"),"p-button-plain",r.plain),"p-button-fluid",n.hasFluid)]},loadingIcon:"p-button-loading-icon",icon:function(t){var n=t.props;return["p-button-icon",ft({},"p-button-icon-".concat(n.iconPos),n.label)]},label:"p-button-label"},Fh=Ce.extend({name:"button",theme:Th,classes:Ih}),Ph={name:"BaseButton",extends:Ht,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:[String,Object],default:null},badge:{type:String,default:null},badgeClass:{type:[String,Object],default:null},badgeSeverity:{type:String,default:"secondary"},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},as:{type:[String,Object],default:"BUTTON"},asChild:{type:Boolean,default:!1},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},variant:{type:String,default:null},plain:{type:Boolean,default:!1},fluid:{type:Boolean,default:null}},style:Fh,provide:function(){return{$pcButton:this,$parentInstance:this}}},ll={name:"Button",extends:Ph,inheritAttrs:!1,inject:{$pcFluid:{default:null}},methods:{getPTOptions:function(t){var n=t==="root"?this.ptmi:this.ptm;return n(t,{context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||this.$attrs.disabled===""||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs.ariaLabel},hasIcon:function(){return this.icon||this.$slots.icon},attrs:function(){return o.mergeProps(this.asAttrs,this.a11yAttrs,this.getPTOptions("root"))},asAttrs:function(){return this.as==="BUTTON"?{type:"button",disabled:this.disabled}:void 0},a11yAttrs:function(){return{"aria-label":this.defaultAriaLabel,"data-pc-name":"button","data-p-disabled":this.disabled,"data-p-severity":this.severity}},hasFluid:function(){return Lt(this.fluid)?!!this.$pcFluid:this.fluid}},components:{SpinnerIcon:vo,Badge:el},directives:{ripple:il}};function Rh(e,t,n,r,a,i){var l=o.resolveComponent("SpinnerIcon"),s=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return e.asChild?o.renderSlot(e.$slots,"default",{key:1,class:o.normalizeClass(e.cx("root")),a11yAttrs:i.a11yAttrs}):o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.as),o.mergeProps({key:0,class:e.cx("root")},i.attrs),{default:o.withCtx(function(){return[o.renderSlot(e.$slots,"default",{},function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon")]},e.ptm("loadingIcon")),function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(l,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]}):o.renderSlot(e.$slots,"icon",o.mergeProps({key:1,class:[e.cx("icon")]},e.ptm("icon")),function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]}),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(s,{key:2,value:e.badge,class:o.normalizeClass(e.badgeClass),severity:e.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("pcBadge")},null,8,["value","class","severity","unstyled","pt"])):o.createCommentVNode("",!0)]})]}),_:3},16,["class"])),[[d]])}ll.render=Rh;const Dh={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},_h={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Ah={class:"flex items-center justify-center gap-2 flex-wrap"},Lh={key:0,class:"flex items-center gap-3 overflow-x-auto mb-3 p-3 scrollbar-none pr-4"},zh=["onClick"],Mh={key:1,class:"relative"},jh={key:2,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Uh={class:"flex items-center justify-center gap-2 flex-wrap"},Hh={key:0,class:"error-message"},Wh={class:"text-red-500 font-bold"},qh={key:0},Kh={key:1,class:"mb-4 mt-4"},Gh={class:"flex items-center justify-between rounded-md w-full overflow-hidden"},Yh={key:0,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Xh={class:"flex items-center justify-center gap-2 flex-wrap"},Jh={key:0,class:"relative"},Qh={key:1,class:"flex flex-col w-full bg-white rounded-lg gap-2"},Zh={class:"flex items-center justify-center gap-2 flex-wrap"},sl=Ie({__name:"EntityListingCarousel",props:{entityName:String,listClass:String,listItemClass:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},displayField:String,baseUrl:String,hrefKey:String,editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object,roles:{type:[Array,String],default:()=>[]},permissions:{type:[Array,String],default:()=>[]},decoration:{type:String,default:"default"},numberVisible:{type:Number,default:3},variable:{type:String,default:"item"},showPresets:{type:Boolean,default:!1},scrollHeight:{type:String,default:""},showToolBar:{type:String,default:"top"},gap:{type:Number,default:1},justifyContent:{type:String,default:""},preFiltered:{type:String,default:""},fetchParentEntities:{type:Boolean},fetchChildEntities:{type:Number},relatedEntities:{type:String},fetchList:{type:Boolean}},setup(e,{expose:t,emit:n}){const r=$e(),a=new Le,i=n,l=e,s=o.ref("id"),d=o.ref(1),c=o.ref(25),u=o.ref(0),m=o.ref(null),f=o.ref([]),p=o.ref([]),g=o.ref(!0),h=o.ref(null),{hasMatchingRoleAndPermissions:b}=zt(),y=fo();o.provide("entityObject",y);const k=o.ref(null),w=I=>{const V=k.value;V&&(V.scrollLeft+=I*266)};o.onMounted(async()=>{g.value=await b(l.roles,l.permissions),console.log("props entitylist",l.preFiltered),l.preFiltered&&_()}),l.linkedEntity?o.watch(()=>l.linkedEntity,I=>{I&&(f.value=I,i("linkedEntityChanged",I))},{immediate:!0}):o.watch(()=>y.state.data,I=>{I&&(f.value=I.result,i("linkedEntityChanged",I.result))},{immediate:!0});const S=I=>{m.value=I,y.state.data.filters=I,x(m.value)},E=()=>{m.value=null,s.value="id",d.value=1,y.state.data.filters={},x(m.value)},R=async(I,V)=>{s.value=I,d.value=V,m.value=y.state.data.filters?y.state.data.filters:m.value,x(m.value)},C=I=>{c.value=I,m.value=y.state.data.filters?y.state.data.filters:m.value,x(m.value)},x=async I=>{var H,P;console.log("entity state filter",y);const V={sortBy:[s.value],sortDirection:d.value===1?"ASC":"DESC",pageSize:c.value,currentPage:u.value,columnList:null,filter:I,fullTextSearch:""};l.fetchParentEntities&&(V.fetchParentEntities=l.fetchParentEntities),l.fetchChildEntities!==void 0&&(V.fetchChildEntities=l.fetchChildEntities),l.relatedEntities&&(V.relatedEntities=l.relatedEntities.split(",").map(T=>T.trim())),l.fetchList&&(V.fetchList=l.fetchList);const A=await a.searchEntityRecords(l.entityName,V);A&&A.response?(y.setEntity(A.response),p.value=((P=(H=y==null?void 0:y.state)==null?void 0:H.data)==null?void 0:P.presets)||[]):console.error("Error fetching entity data:",A)},_=async()=>{if(!l.preFiltered)return;const I=y.parsePrefilter(l.preFiltered);I.length&&x(I)};t({props:l,reload:()=>{console.log("reload data")},filter:I=>{console.log("filter data in unordered",I)},addToCurrentList:I=>{var V,A;(A=(V=y==null?void 0:y.state)==null?void 0:V.data)!=null&&A.result&&y.state.data.result.push(I)},deleteFromCurrentList:I=>{const V=y.state.data.result.indexOf(I);y.state.data.result.splice(V,1)},searchRecord:S,searchByPageSize:C,searchBySort:R,clearFilters:E}),o.watch(()=>r.globalConfigs.appId,async I=>{var V,A;if(I){if(l.linkedEntity&&l.linkedEntity.length>0)y.setEntity(l.linkedEntity);else if(!l.preFiltered){const H=await y.getEntity(l.entityName);p.value=((A=(V=H==null?void 0:H.response)==null?void 0:V.entity)==null?void 0:A.presets)||[],y.setEntity(H.success?H.response:{result:[]})}}},{immediate:!0});const B=async I=>{const V=await y.applyPreset(I,l.entityName);y.state.data=V||{}};return(I,V)=>(o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(I.$attrs)),[I.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(I.$slots,"header",{},void 0,!0),o.createElementVNode("div",Dh,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",_h,[o.createElementVNode("div",Ah,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),e.showPresets?(o.openBlock(),o.createElementBlock("div",Lh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,A=>(o.openBlock(),o.createElementBlock("button",{key:A,onClick:H=>{h.value=A.name,B(A.name)},class:o.normalizeClass(["px-4 py-2 rounded-full text-sm",[h.value===A.name?"bg-blue-800 text-white":"bg-blue-100 text-blue-700"]])},o.toDisplayString(A.name),11,zh))),128))])):o.createCommentVNode("",!0),f.value.length>0?(o.openBlock(),o.createElementBlock("div",Mh,[o.createElementVNode("button",{onClick:V[0]||(V[0]=A=>w(-1)),class:"absolute left-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ◀ "),o.createElementVNode("div",{ref_key:"carouselRef",ref:k,class:"flex overflow-x-auto no-scrollbar gap-4 py-2 px-10 scroll-smooth"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,A=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:"min-w-[250px] flex-shrink-0"},[o.renderSlot(I.$slots,"list-item-display",{item:A},void 0,!0)]))),128))],512),o.createElementVNode("button",{onClick:V[1]||(V[1]=A=>w(1)),class:"absolute right-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ▶ ")])):o.createCommentVNode("",!0),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",jh,[o.createElementVNode("div",Uh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0),o.renderSlot(I.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(I.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",Kh,[o.createElementVNode("div",Gh,[e.showToolBar=="top"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Yh,[o.createElementVNode("div",Xh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)]),f.value.length>0?(o.openBlock(),o.createElementBlock("div",Jh,[o.createElementVNode("button",{onClick:V[2]||(V[2]=A=>w(-1)),class:"absolute left-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ◀ "),o.createElementVNode("div",{ref_key:"carouselRef",ref:k,class:"flex overflow-x-auto no-scrollbar gap-4 py-2 px-10 scroll-smooth"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,A=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:"min-w-[250px] flex-shrink-0"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay&&e.listItemDisplay!==""?e.listItemDisplay:tg),o.mergeProps({ref_for:!0},{item:A,...l}),null,16))]))),128))],512),o.createElementVNode("button",{onClick:V[3]||(V[3]=A=>w(1)),class:"absolute right-0 top-1/2 transform -translate-y-1/2 z-100 bg-green-600 hover:bg-green-700 text-white p-2 rounded-lg"}," ▶ ")])):o.createCommentVNode("",!0),e.showToolBar=="bottom"&&(e.showFilters||e.showAddButton||e.showPagination)?(o.openBlock(),o.createElementBlock("div",Qh,[o.createElementVNode("div",Zh,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||Ye),{key:0,externalFilterPayload:l.externalFilterPayload,preFiltered:l.preFiltered},null,8,["externalFilterPayload","preFiltered"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(Xe,{key:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||ut),{key:2,class:"ml-auto"})):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Hh,[o.createElementVNode("p",Wh,[V[4]||(V[4]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",qh,"Entity Name"))])])),o.renderSlot(I.$slots,"footer",{},void 0,!0)],64))],16))}},[["__scopeId","data-v-f4d2b305"]]),cl=6048e5,eb=864e5,dl=Symbol.for("constructDateFrom");function Ot(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&dl in e?e[dl](t):e instanceof Date?new e.constructor(t):new Date(t)}function rt(e,t){return Ot(t||e,e)}let tb={};function xo(){return tb}function $n(e,t){var s,d,c,u;const n=xo(),r=(t==null?void 0:t.weekStartsOn)??((d=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,a=rt(e,t==null?void 0:t.in),i=a.getDay(),l=(i<r?7:0)+i-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function So(e,t){return $n(e,{...t,weekStartsOn:1})}function ul(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),a=Ot(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=So(a),l=Ot(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const s=So(l);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function fl(e){const t=rt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function nb(e,...t){const n=Ot.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ml(e,t){const n=rt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ob(e,t,n){const[r,a]=nb(n==null?void 0:n.in,e,t),i=ml(r),l=ml(a),s=+i-fl(i),d=+l-fl(l);return Math.round((s-d)/eb)}function rb(e,t){const n=ul(e,t),r=Ot(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),So(r)}function ab(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ib(e){return!(!ab(e)&&typeof e!="number"||isNaN(+rt(e)))}function lb(e,t){const n=rt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const sb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},cb=(e,t,n)=>{let r;const a=sb[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const db={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ub={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mb={date:wr({formats:db,defaultWidth:"full"}),time:wr({formats:ub,defaultWidth:"full"}),dateTime:wr({formats:fb,defaultWidth:"full"})},pb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gb=(e,t,n,r)=>pb[e];function Nn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):l;a=e.formattingValues[s]||e.formattingValues[l]}else{const l=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[s]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const hb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},kb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xb={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Nn({values:hb,defaultWidth:"wide"}),quarter:Nn({values:bb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nn({values:yb,defaultWidth:"wide"}),day:Nn({values:kb,defaultWidth:"wide"}),dayPeriod:Nn({values:wb,defaultWidth:"wide",formattingValues:vb,defaultFormattingWidth:"wide"})};function On(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Cb(s,m=>m.test(l)):Sb(s,m=>m.test(l));let c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(l.length);return{value:c,rest:u}}}function Sb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Cb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Eb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=n.valueCallback?n.valueCallback(l):l;const s=t.slice(a.length);return{value:l,rest:s}}}const Bb=/^(\d+)(th|st|nd|rd)?/i,$b=/\d+/i,Nb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ob={any:[/^b/i,/^(a|c)/i]},Vb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tb={any:[/1/i,/2/i,/3/i,/4/i]},Ib={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Fb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Rb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Db={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ab={ordinalNumber:Eb({matchPattern:Bb,parsePattern:$b,valueCallback:e=>parseInt(e,10)}),era:On({matchPatterns:Nb,defaultMatchWidth:"wide",parsePatterns:Ob,defaultParseWidth:"any"}),quarter:On({matchPatterns:Vb,defaultMatchWidth:"wide",parsePatterns:Tb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:On({matchPatterns:Ib,defaultMatchWidth:"wide",parsePatterns:Fb,defaultParseWidth:"any"}),day:On({matchPatterns:Pb,defaultMatchWidth:"wide",parsePatterns:Rb,defaultParseWidth:"any"}),dayPeriod:On({matchPatterns:Db,defaultMatchWidth:"any",parsePatterns:_b,defaultParseWidth:"any"})},Lb={code:"en-US",formatDistance:cb,formatLong:mb,formatRelative:gb,localize:xb,match:Ab,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zb(e,t){const n=rt(e,t==null?void 0:t.in);return ob(n,lb(n))+1}function Mb(e,t){const n=rt(e,t==null?void 0:t.in),r=+So(n)-+rb(n);return Math.round(r/cl)+1}function pl(e,t){var u,m,f,p;const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),a=xo(),i=(t==null?void 0:t.firstWeekContainsDate)??((m=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,l=Ot((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const s=$n(l,t),d=Ot((t==null?void 0:t.in)||e,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const c=$n(d,t);return+n>=+s?r+1:+n>=+c?r:r-1}function jb(e,t){var s,d,c,u;const n=xo(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,a=pl(e,t),i=Ot((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),$n(i,t)}function Ub(e,t){const n=rt(e,t==null?void 0:t.in),r=+$n(n,t)-+jb(n,t);return Math.round(r/cl)+1}function be(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return be(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):be(n+1,2)},d(e,t){return be(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return be(e.getHours()%12||12,t.length)},H(e,t){return be(e.getHours(),t.length)},m(e,t){return be(e.getMinutes(),t.length)},s(e,t){return be(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return be(a,t.length)}},on={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gl={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Vt.y(e,t)},Y:function(e,t,n,r){const a=pl(e,r),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return be(l,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):be(i,t.length)},R:function(e,t){const n=ul(e);return be(n,t.length)},u:function(e,t){const n=e.getFullYear();return be(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return be(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return be(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return be(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Ub(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):be(a,t.length)},I:function(e,t,n){const r=Mb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):be(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vt.d(e,t)},D:function(e,t,n){const r=zb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):be(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return be(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return be(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return be(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=on.noon:r===0?a=on.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=on.evening:r>=12?a=on.afternoon:r>=4?a=on.morning:a=on.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vt.s(e,t)},S:function(e,t){return Vt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return bl(r);case"XXXX":case"XX":return Wt(r);case"XXXXX":case"XXX":default:return Wt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return bl(r);case"xxxx":case"xx":return Wt(r);case"xxxxx":case"xxx":default:return Wt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hl(r,":");case"OOOO":default:return"GMT"+Wt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hl(r,":");case"zzzz":default:return"GMT"+Wt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return be(r,t.length)},T:function(e,t,n){return be(+e,t.length)}};function hl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+be(i,2)}function bl(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Wt(e,t)}function Wt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=be(Math.trunc(r/60),2),i=be(r%60,2);return n+a+t+i}const yl=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hb={p:kl,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return yl(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",yl(r,t)).replace("{{time}}",kl(a,t))}},Wb=/^D+$/,qb=/^Y+$/,Kb=["D","DD","YY","YYYY"];function Gb(e){return Wb.test(e)}function Yb(e){return qb.test(e)}function Xb(e,t,n){const r=Jb(e,t,n);if(console.warn(r),Kb.includes(e))throw new RangeError(r)}function Jb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e0=/^'([^]*?)'?$/,t0=/''/g,n0=/[a-zA-Z]/;function o0(e,t,n){var u,m,f,p;const r=xo(),a=r.locale??Lb,i=r.firstWeekContainsDate??((m=(u=r.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,l=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,s=rt(e,n==null?void 0:n.in);if(!ib(s))throw new RangeError("Invalid time value");let d=t.match(Zb).map(g=>{const h=g[0];if(h==="p"||h==="P"){const b=Hb[h];return b(g,a.formatLong)}return g}).join("").match(Qb).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:r0(g)};if(gl[h])return{isToken:!0,value:g};if(h.match(n0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(d=a.localize.preprocessor(s,d));const c={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return d.map(g=>{if(!g.isToken)return g.value;const h=g.value;(Yb(h)||Gb(h))&&Xb(h,t,String(e));const b=gl[h[0]];return b(s,h,a.localize,c)}).join("")}function r0(e){const t=e.match(e0);return t?t[1].replace(t0,"'"):e}var Co={exports:{}};/*! @preserve
|
|
927
927
|
* numeral.js
|
|
928
928
|
* version : 2.0.6
|
|
929
929
|
* author : Adam Draper
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.text-color-hint[data-v-1c86833f]{color:var(--text-color)}.p-message-wrapper{padding:.5rem}.showHideColor,.sorting-filter-section[data-v-a358808d]:hover,.linked-entity-section[data-v-412eec44]:hover{color:var(--primary-color)}.border-bottom-section[data-v-412eec44]{border-bottom:1px solid var(--surface-border)}.section-heading[data-v-12a444f4]:hover{color:var(--primary-color)}.custom-sidebar[data-v-12a444f4]{padding-left:8%;padding-top:14px;padding-bottom:14px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background:var(--surface-card);border-top:1px solid var(--surface-border);bottom:0;left:0;position:fixed;right:0;z-index:1111;transition-property:none;transition-duration:.3s;transform:translateY(0)}.custom-sidebar-content[data-v-12a444f4]{display:flex;align-items:center!important;justify-content:space-between;display:inline-flex;word-break:break-word;overflow:visible;flex-grow:1;width:100%}.custom-sidebar-button[data-v-12a444f4]{display:flex;flex-wrap:nowrap;flex-shrink:1}.custom-sidebar-text[data-v-12a444f4]{flex-shrink:100000;width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:column;white-space:normal;padding-left:10px}.column-item[data-v-12a444f4]{width:calc(33.33% - 10px);margin-bottom:20px}.tile-grid[data-v-bce4d0f0]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.tile[data-v-f59ea2d9]:hover{background:var(--surface-hover)}.border-none[data-v-2bc5d993]{border:none!important}.tile-grid[data-v-b7680fe1]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.record-list[data-v-b7680fe1]{color:var(--primary-color)}.record-head[data-v-b7680fe1]{color:var(--p-red-400)}.tile[data-v-
|
|
1
|
+
.text-color-hint[data-v-1c86833f]{color:var(--text-color)}.p-message-wrapper{padding:.5rem}.showHideColor,.sorting-filter-section[data-v-a358808d]:hover,.linked-entity-section[data-v-412eec44]:hover{color:var(--primary-color)}.border-bottom-section[data-v-412eec44]{border-bottom:1px solid var(--surface-border)}.section-heading[data-v-12a444f4]:hover{color:var(--primary-color)}.custom-sidebar[data-v-12a444f4]{padding-left:8%;padding-top:14px;padding-bottom:14px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background:var(--surface-card);border-top:1px solid var(--surface-border);bottom:0;left:0;position:fixed;right:0;z-index:1111;transition-property:none;transition-duration:.3s;transform:translateY(0)}.custom-sidebar-content[data-v-12a444f4]{display:flex;align-items:center!important;justify-content:space-between;display:inline-flex;word-break:break-word;overflow:visible;flex-grow:1;width:100%}.custom-sidebar-button[data-v-12a444f4]{display:flex;flex-wrap:nowrap;flex-shrink:1}.custom-sidebar-text[data-v-12a444f4]{flex-shrink:100000;width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:column;white-space:normal;padding-left:10px}.column-item[data-v-12a444f4]{width:calc(33.33% - 10px);margin-bottom:20px}.tile-grid[data-v-bce4d0f0]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.tile[data-v-f59ea2d9]:hover{background:var(--surface-hover)}.border-none[data-v-2bc5d993]{border:none!important}.tile-grid[data-v-b7680fe1]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.record-list[data-v-b7680fe1]{color:var(--primary-color)}.record-head[data-v-b7680fe1]{color:var(--p-red-400)}.tile[data-v-896c5db8]:hover{background:var(--surface-hover)}.error-message[data-v-896c5db8]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-c78e676f]{display:flex}.flex-col[data-v-c78e676f]{flex-direction:column}.flex-grow[data-v-c78e676f]{flex-grow:1}.gap-4[data-v-c78e676f]{gap:1rem}.gap-2[data-v-c78e676f]{gap:.5rem}.p-6[data-v-c78e676f]{padding:1.5rem}.bg-white[data-v-c78e676f]{background-color:#fff}.shadow-md[data-v-c78e676f]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-c78e676f]{border-radius:.5rem}.border[data-v-c78e676f]{border-width:1px}.border-gray-300[data-v-c78e676f]{border-color:#d1d5db}.font-bold[data-v-c78e676f]{font-weight:700}.text-gray-700[data-v-c78e676f]{color:#4a5568}.text-gray-600[data-v-c78e676f]{color:#718096}.tile[data-v-037944bc]:hover{background:var(--surface-hover)}.error-message[data-v-037944bc]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-dcd45091]{display:flex}.flex-col[data-v-dcd45091]{flex-direction:column}.flex-grow[data-v-dcd45091]{flex-grow:1}.gap-4[data-v-dcd45091]{gap:1rem}.gap-2[data-v-dcd45091]{gap:.5rem}.p-6[data-v-dcd45091]{padding:1.5rem}.bg-white[data-v-dcd45091]{background-color:#fff}.shadow-md[data-v-dcd45091]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-dcd45091]{border-radius:.5rem}.border[data-v-dcd45091]{border-width:1px}.border-gray-300[data-v-dcd45091]{border-color:#d1d5db}.font-bold[data-v-dcd45091]{font-weight:700}.text-gray-700[data-v-dcd45091]{color:#4a5568}.text-gray-600[data-v-dcd45091]{color:#718096}@media (min-width: 400px) and (max-width: 520px){.responsive-box[data-v-dcd45091]{width:75%}}.tile[data-v-f4d2b305]:hover{background:var(--surface-hover)}.error-message[data-v-f4d2b305]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.no-scrollbar[data-v-f4d2b305]::-webkit-scrollbar{display:none}.no-scrollbar[data-v-f4d2b305]{-ms-overflow-style:none;scrollbar-width:none}
|