@omniaz/vue-component-library 0.2.0 → 0.2.2

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.
@@ -8,7 +8,7 @@
8
8
 
9
9
  Please specify a more appropriate element using the "as" attribute. For example:
10
10
 
11
- <Link href="${i}" method="${o}" as="button">...</Link>`),p.h(t.as,{...n,...r==="a"?{href:i}:{},onClick:s=>{NK(s)&&(s.preventDefault(),uc.visit(i,{data:a,method:o,replace:t.replace,preserveScroll:t.preserveScroll,preserveState:t.preserveState??o!=="get",only:t.only,headers:t.headers,onCancelToken:n.onCancelToken||(()=>({})),onBefore:n.onBefore||(()=>({})),onStart:n.onStart||(()=>({})),onProgress:n.onProgress||(()=>({})),onFinish:n.onFinish||(()=>({})),onCancel:n.onCancel||(()=>({})),onSuccess:n.onSuccess||(()=>({})),onError:n.onError||(()=>({}))}))}},e)}}}),wb=zK;const FK=["src","alt"],UK={key:1,class:"avatar rounded-full block h-auto w-full max-w-full"},HK={class:"avatar__letters"},WK=p.defineComponent({__name:"OmzAvatar",props:{username:{default:null},imageUrl:{default:null}},setup(t){return(e,n)=>{var r;return p.openBlock(),p.createElementBlock("div",null,[e.imageUrl?(p.openBlock(),p.createElementBlock("img",{key:0,src:e.imageUrl,alt:e.username??void 0,class:"rounded-full block h-auto w-full max-w-full bg-gray-100 dark:bg-gray-800"},null,8,FK)):(p.openBlock(),p.createElementBlock("div",UK,[p.createElementVNode("div",HK,p.toDisplayString((r=e.username)==null?void 0:r.charAt(0)),1)]))])}}}),$6e="",qK=["width","height"],YK=["d"],to=p.defineComponent({__name:"OmzIcon",props:{path:{type:String,required:!0},w:{type:String,default:"w-6"},h:{type:String,default:"h-6"},size:{type:[String,Number],default:16}},setup(t){const e=t,n=p.computed(()=>`inline-flex justify-center items-center ${e.w} ${e.h}`);return(r,o)=>(p.openBlock(),p.createElementBlock("span",{class:p.normalizeClass(n.value)},[(p.openBlock(),p.createElementBlock("svg",{viewBox:"0 0 24 24",width:t.size,height:t.size,class:"inline-block"},[p.createElementVNode("path",{fill:"currentColor",d:t.path},null,8,YK)],8,qK))],2))}}),kb={white:"bg-white text-black",light:"bg-gray-100 text-black",success:"bg-emerald-600 text-white",danger:"bg-red-600 text-white",warning:"bg-yellow-600 text-white",info:"bg-blue-600 text-white",infoSky:"bg-sky-500 text-white",omniazDarkBlue:"bg-omniaz-dark text-white"},KK={white:"hover:bg-gray-50",light:"hover:bg-gray-200",success:"hover:bg-emerald-700",danger:"hover:bg-red-700",warning:"hover:bg-yellow-700",info:"hover:bg-blue-700",infoSky:"hover:bg-sky-600",omniazDarkBlue:"hover:bg-omniaz-dark-700"},Xa={white:"border-gray-300",light:"border-gray-200 dark:border-gray-400",success:"border-emerald-700",danger:"border-red-700",warning:"border-yellow-700",info:"border-blue-700",infoSky:"border-sky-600",omniazDarkBlue:"border-omniaz-dark"},Ol={white:"text-black dark:text-gray-100",light:"text-gray-700 dark:text-gray-400",success:"text-emerald-600",danger:"text-red-600",warning:"text-yellow-600",info:"text-blue-600",infoSky:"text-sky-600",omniazDarkBlue:"border-omniaz-dark"},R3={white:[Ol.white,Xa.white],light:[Ol.light,Xa.light],success:[Ol.success,Xa.success],danger:[Ol.danger,Xa.danger],warning:[Ol.warning,Xa.warning],info:[Ol.info,Xa.info],infoSky:[Ol.infoSky,Xa.infoSky],omniazDarkBlue:[Ol.omniazDarkBlue,Xa.omniazDarkBlue]},JK={white:"hover:bg-gray-100 hover:text-gray-900 dark:hover:text-gray-900",light:"hover:bg-gray-100 hover:text-gray-900 dark:hover:text-gray-900",success:"hover:bg-emerald-700 hover:text-white",danger:"hover:bg-red-700 hover:text-white",warning:"hover:bg-yellow-700 hover:text-white",info:"hover:bg-blue-700 hover:text-white",infoSky:"hover:bg-sky-600 hover:text-white",omniazDarkBlue:"hover:bg-omniaz-dark hover:text-white"},GK=(t,e,n)=>{const r=[e?Ol[t]:kb[t],Xa[t]];return n&&r.push(e?JK[t]:KK[t]),r},mm=Symbol("inertiaRouter"),gm=Symbol("inertiaLinkComponent"),QK={key:1,class:"omz-button__spinner"},XK=p.defineComponent({__name:"OmzButton",props:{label:{default:null},icon:{default:null},href:{default:null},target:{default:null},to:{default:null},type:{default:null},color:{default:"white"},as:{type:[String,Object,Function,null],default:null},small:{type:Boolean},tiny:{type:Boolean},outline:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},download:{type:Boolean}},setup(t){const e=t,n=p.inject(gm)??wb,r=p.computed(()=>e.as?e.as:e.to?e.target==="_blank"?"a":n:e.href?"a":"button"),o=p.computed(()=>r.value==="button"?e.type??"button":null),i=p.computed(()=>e.small&&e.icon?"px-1":"px-2"),a=p.computed(()=>e.tiny?null:e.small?"p-1":"p-2"),s=p.computed(()=>{const l=["inline-flex","justify-center","items-center","whitespace-nowrap","focus:outline-none","transition-colors","focus:ring","duration-150","border","rounded",e.color==="omniazDarkBlue"?"dark:border-gray-50":null,e.active?"ring ring-black dark:ring-white":"ring-blue-700",a.value,GK(e.color,e.outline,!e.disabled)];return l.push(e.disabled?"cursor-not-allowed":"cursor-pointer"),e.disabled&&l.push("cursor-not-allowed",e.outline?"opacity-50":"opacity-70"),e.loading&&l.push("omz-disabled"),l});return(l,u)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(r.value),{class:p.normalizeClass(s.value),href:l.to||l.href,type:o.value,target:l.target,disabled:l.disabled||l.loading,download:l.download?"true":void 0,onClick:u[0]||(u[0]=p.withModifiers(()=>{},["stop"]))},{default:p.withCtx(()=>[l.icon&&!l.loading?(p.openBlock(),p.createBlock(to,{key:0,path:l.icon},null,8,["path"])):l.loading?(p.openBlock(),p.createElementBlock("div",QK)):p.createCommentVNode("",!0),l.label?(p.openBlock(),p.createElementBlock("span",{key:2,class:p.normalizeClass(i.value)},p.toDisplayString(l.label),3)):p.createCommentVNode("",!0)]),_:1},8,["class","href","type","target","disabled","download"]))}}),O6e="",L3=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Fi=L3(XK,[["__scopeId","data-v-5455c494"]]),xb=p.defineComponent({name:"OmzButtons",props:{noWrap:Boolean,type:{type:String,default:"justify-start"},classAddon:{type:String,default:"mr-3 last:mr-0 mb-3"},mb:{type:String,default:"-mb-3"}},render(){const t=["flex","items-center",this.type,this.noWrap?"flex-nowrap":"flex-wrap"];return this.mb&&t.push(this.mb),p.h("div",{class:t},this.$slots&&this.$slots.default?this.$slots.default().map(e=>e&&e.children&&typeof e.children=="object"?p.h(e,{},e.children.map(n=>p.h(n,{class:[this.classAddon]}))):p.h(e,{class:[this.classAddon]})):null)}});var ZK="M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",eJ="M13,11H18L16.5,9.5L17.92,8.08L21.84,12L17.92,15.92L16.5,14.5L18,13H13V18L14.5,16.5L15.92,17.92L12,21.84L8.08,17.92L9.5,16.5L11,18V13H6L7.5,14.5L6.08,15.92L2.16,12L6.08,8.08L7.5,9.5L6,11H11V6L9.5,7.5L8.08,6.08L12,2.16L15.92,6.08L14.5,7.5L13,6V11Z",tJ="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M7,10L12,15L17,10H7Z",nJ="M12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M17,14L12,9L7,14H17Z",rJ="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",oJ="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",iJ="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",aJ="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",Cf="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",sJ="M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z",V3="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",lJ="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",z3="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",uJ="M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",cJ="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",fJ="M18.41,16.59L13.82,12L18.41,7.41L17,6L11,12L17,18L18.41,16.59M6,6H8V18H6V6Z",dJ="M5.59,7.41L10.18,12L5.59,16.59L7,18L13,12L7,6L5.59,7.41M16,6H18V18H16V6Z",hJ="M13,2.03C17.73,2.5 21.5,6.25 21.95,11C22.5,16.5 18.5,21.38 13,21.93V19.93C16.64,19.5 19.5,16.61 19.96,12.97C20.5,8.58 17.39,4.59 13,4.05V2.05L13,2.03M11,2.06V4.06C9.57,4.26 8.22,4.84 7.1,5.74L5.67,4.26C7.19,3 9.05,2.25 11,2.06M4.26,5.67L5.69,7.1C4.8,8.23 4.24,9.58 4.05,11H2.05C2.25,9.04 3,7.19 4.26,5.67M2.06,13H4.06C4.24,14.42 4.81,15.77 5.69,16.9L4.27,18.33C3.03,16.81 2.26,14.96 2.06,13M7.1,18.37C8.23,19.25 9.58,19.82 11,20V22C9.04,21.79 7.18,21 5.67,19.74L7.1,18.37M12,7.5L7.5,12H11V16H13V12H16.5L12,7.5Z",pJ="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z",jb="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",vJ="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",mJ="M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z",gJ="M3 5V19H20V5H3M7 7V9H5V7H7M5 13V11H7V13H5M5 15H7V17H5V15M18 17H9V15H18V17M18 13H9V11H18V13M18 9H9V7H18V9Z";const yJ={key:0,class:"flex items-stretch border-b border-gray-100 dark:border-gray-700"},bJ={key:0,class:"flex items-center py-3 px-4 justify-center ring-blue-700 focus:ring"},wJ={key:0,class:"flex gap-3 items-center"},kJ={key:1,class:"text-center py-24 text-gray-500 dark:text-gray-400 flex flex-col flex-grow justify-center"},xJ={key:3,class:"flex items-stretch border-t border-gray-100 dark:border-gray-700 mt-auto py-3 px-4"},Sb=p.defineComponent({__name:"OmzCard",props:{title:{default:null},icon:{default:null},headerIcon:{default:null},roundedClass:{default:"md:rounded"},noDataText:{default:null},hasTable:{type:Boolean},scrollable:{type:Boolean},paddingSmall:{type:Boolean},empty:{type:Boolean},form:{type:Boolean},hoverable:{type:Boolean},contentClasses:{default:()=>[]},multipleView:{type:Boolean}},emits:["header-icon-click","submit"],setup(t,{emit:e}){const n=t,r=VK().url,o=p.ref(localStorage.getItem(`${r}_list`)||"list"),i=p.computed(()=>n.form?"form":"div"),a=p.computed(()=>{const f=[n.roundedClass];return n.hoverable&&f.push("hover:shadow-lg transition-shadow duration-500"),f}),s=p.computed(()=>{const f={};return n.contentClasses.forEach(d=>{f[d]=!0}),f}),l=()=>{e("header-icon-click")},u=f=>{e("submit",f)},c=()=>{o.value=o.value==="list"?"grid":"list",localStorage.setItem(`${r}_list`,o.value)};return(f,d)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.value),{class:p.normalizeClass([a.value,"flex flex-col bg-white border border-gray-200 dark:bg-gray-900 dark:border-gray-900"]),onSubmit:u},{default:p.withCtx(()=>[f.title?(p.openBlock(),p.createElementBlock("header",yJ,[p.createElementVNode("p",{class:p.normalizeClass(["flex items-center py-3 grow font-bold",[f.icon?"px-4":"px-6"]])},[f.icon?(p.openBlock(),p.createBlock(to,{key:0,path:f.icon,class:"mr-3"},null,8,["path"])):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(f.title),1)],2),f.headerIcon||f.multipleView?(p.openBlock(),p.createElementBlock("div",bJ,[f.multipleView?(p.openBlock(),p.createElementBlock("div",wJ,[o.value==="list"?(p.openBlock(),p.createElementBlock("button",{key:0,class:"flex items-center justify-center border rounded border-gray-800 dark:border-gray-400",onClick:d[0]||(d[0]=h=>c())},[p.createVNode(to,{path:p.unref(mJ),size:"20"},null,8,["path"])])):p.createCommentVNode("",!0),o.value==="grid"?(p.openBlock(),p.createElementBlock("button",{key:1,class:"flex items-center justify-center border rounded border-gray-800 dark:border-gray-400",onClick:d[1]||(d[1]=h=>c())},[p.createVNode(to,{path:p.unref(gJ),size:"30"},null,8,["path"])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),p.renderSlot(f.$slots,"header-items"),f.headerIcon?(p.openBlock(),p.createElementBlock("button",{key:1,type:"button",class:"inline-flex cursor-pointer justify-center items-center whitespace-nowrap focus:outline-none transition-colors focus:ring duration-150 border rounded-full border-white dark:border-slate-900 ring-gray-200 dark:ring-gray-500 bg-white text-black dark:bg-slate-900 dark:text-white hover:bg-gray-100 hover:dark:bg-slate-800 p-1",onClick:l},[p.createVNode(to,{path:f.headerIcon},null,8,["path"])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),f.empty?(p.openBlock(),p.createElementBlock("div",kJ,[p.createElementVNode("p",null,p.toDisplayString(f.noDataText),1)])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass({"p-6":!f.hasTable,"p-2":f.paddingSmall,flex:f.scrollable,"flex-col":f.scrollable,...s.value}),style:p.normalizeStyle({height:f.scrollable?"calc(100% - 3rem)":void 0})},[p.renderSlot(f.$slots,"default"),o.value==="list"?p.renderSlot(f.$slots,"list",{key:0}):o.value==="grid"?p.renderSlot(f.$slots,"grid",{key:1}):p.createCommentVNode("",!0)],6)),f.$slots.footer?(p.openBlock(),p.createElementBlock("footer",xJ,[p.renderSlot(f.$slots,"footer")])):p.createCommentVNode("",!0)]),_:3},40,["class"]))}});var F3={exports:{}};/*! @preserve
11
+ <Link href="${i}" method="${o}" as="button">...</Link>`),p.h(t.as,{...n,...r==="a"?{href:i}:{},onClick:s=>{NK(s)&&(s.preventDefault(),uc.visit(i,{data:a,method:o,replace:t.replace,preserveScroll:t.preserveScroll,preserveState:t.preserveState??o!=="get",only:t.only,headers:t.headers,onCancelToken:n.onCancelToken||(()=>({})),onBefore:n.onBefore||(()=>({})),onStart:n.onStart||(()=>({})),onProgress:n.onProgress||(()=>({})),onFinish:n.onFinish||(()=>({})),onCancel:n.onCancel||(()=>({})),onSuccess:n.onSuccess||(()=>({})),onError:n.onError||(()=>({}))}))}},e)}}}),wb=zK;const FK=["src","alt"],UK={key:1,class:"avatar rounded-full block h-auto w-full max-w-full"},HK={class:"avatar__letters"},WK=p.defineComponent({__name:"OmzAvatar",props:{username:{default:null},imageUrl:{default:null}},setup(t){return(e,n)=>{var r;return p.openBlock(),p.createElementBlock("div",null,[e.imageUrl?(p.openBlock(),p.createElementBlock("img",{key:0,src:e.imageUrl,alt:e.username??void 0,class:"rounded-full block h-auto w-full max-w-full bg-gray-100 dark:bg-gray-800"},null,8,FK)):(p.openBlock(),p.createElementBlock("div",UK,[p.createElementVNode("div",HK,p.toDisplayString((r=e.username)==null?void 0:r.charAt(0)),1)]))])}}}),$6e="",qK=["width","height"],YK=["d"],to=p.defineComponent({__name:"OmzIcon",props:{path:{type:String,required:!0},w:{type:String,default:"w-6"},h:{type:String,default:"h-6"},size:{type:[String,Number],default:16}},setup(t){const e=t,n=p.computed(()=>`inline-flex justify-center items-center ${e.w} ${e.h}`);return(r,o)=>(p.openBlock(),p.createElementBlock("span",{class:p.normalizeClass(n.value)},[(p.openBlock(),p.createElementBlock("svg",{viewBox:"0 0 24 24",width:t.size,height:t.size,class:"inline-block"},[p.createElementVNode("path",{fill:"currentColor",d:t.path},null,8,YK)],8,qK))],2))}}),kb={white:"bg-white text-black",light:"bg-gray-100 text-black",success:"bg-emerald-600 text-white",danger:"bg-red-600 text-white",warning:"bg-yellow-600 text-white",info:"bg-blue-600 text-white",infoSky:"bg-sky-500 text-white",omniazDarkBlue:"bg-omniaz-dark text-white"},KK={white:"hover:bg-gray-100",light:"hover:bg-gray-200",success:"hover:bg-emerald-700",danger:"hover:bg-red-700",warning:"hover:bg-yellow-700",info:"hover:bg-blue-700",infoSky:"hover:bg-sky-600",omniazDarkBlue:"hover:bg-omniaz-dark-700"},Xa={white:"border-gray-300",light:"border-gray-200 dark:border-gray-400",success:"border-emerald-700",danger:"border-red-700",warning:"border-yellow-700",info:"border-blue-700",infoSky:"border-sky-600",omniazDarkBlue:"border-omniaz-dark"},Ol={white:"text-black dark:text-gray-100",light:"text-gray-700 dark:text-gray-400",success:"text-emerald-600",danger:"text-red-600",warning:"text-yellow-600",info:"text-blue-600",infoSky:"text-sky-600",omniazDarkBlue:"border-omniaz-dark"},R3={white:[Ol.white,Xa.white],light:[Ol.light,Xa.light],success:[Ol.success,Xa.success],danger:[Ol.danger,Xa.danger],warning:[Ol.warning,Xa.warning],info:[Ol.info,Xa.info],infoSky:[Ol.infoSky,Xa.infoSky],omniazDarkBlue:[Ol.omniazDarkBlue,Xa.omniazDarkBlue]},JK={white:"hover:bg-gray-100 hover:text-gray-900 dark:hover:text-gray-900",light:"hover:bg-gray-100 hover:text-gray-900 dark:hover:text-gray-900",success:"hover:bg-emerald-700 hover:text-white",danger:"hover:bg-red-700 hover:text-white",warning:"hover:bg-yellow-700 hover:text-white",info:"hover:bg-blue-700 hover:text-white",infoSky:"hover:bg-sky-600 hover:text-white",omniazDarkBlue:"hover:bg-omniaz-dark hover:text-white"},GK=(t,e,n)=>{const r=[e?Ol[t]:kb[t],Xa[t]];return n&&r.push(e?JK[t]:KK[t]),r},mm=Symbol("inertiaRouter"),gm=Symbol("inertiaLinkComponent"),QK={key:1,class:"omz-button__spinner"},XK=p.defineComponent({__name:"OmzButton",props:{label:{default:null},icon:{default:null},href:{default:null},target:{default:null},to:{default:null},type:{default:null},color:{default:"white"},as:{type:[String,Object,Function,null],default:null},small:{type:Boolean},tiny:{type:Boolean},outline:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},download:{type:Boolean},rounded:{type:Boolean},noBorder:{type:Boolean}},setup(t){const e=t,n=p.inject(gm)??wb,r=p.computed(()=>e.as?e.as:e.to?e.target==="_blank"?"a":n:e.href?"a":"button"),o=p.computed(()=>r.value==="button"?e.type??"button":null),i=p.computed(()=>e.small&&e.icon?"px-1":"px-2"),a=p.computed(()=>e.tiny?null:e.small?"p-1":"p-2"),s=p.computed(()=>{const l=["inline-flex","justify-center","items-center","whitespace-nowrap","focus:outline-none","transition-colors","focus:ring","duration-150",e.noBorder?"":"border",e.rounded?"rounded-full":"rounded",e.color==="omniazDarkBlue"?"dark:border-gray-50":null,e.active?"ring ring-black dark:ring-white":"ring-blue-700",a.value,GK(e.color,e.outline,!e.disabled)];return l.push(e.disabled?"cursor-not-allowed":"cursor-pointer"),e.disabled&&l.push("cursor-not-allowed",e.outline?"opacity-50":"opacity-70"),e.loading&&l.push("omz-disabled"),l});return(l,u)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(r.value),{class:p.normalizeClass(s.value),href:l.to||l.href,type:o.value,target:l.target,disabled:l.disabled||l.loading,download:l.download?"true":void 0,onClick:u[0]||(u[0]=p.withModifiers(()=>{},["stop"]))},{default:p.withCtx(()=>[l.icon&&!l.loading?(p.openBlock(),p.createBlock(to,{key:0,path:l.icon},null,8,["path"])):l.loading?(p.openBlock(),p.createElementBlock("div",QK)):p.createCommentVNode("",!0),l.label?(p.openBlock(),p.createElementBlock("span",{key:2,class:p.normalizeClass(i.value)},p.toDisplayString(l.label),3)):p.createCommentVNode("",!0)]),_:1},8,["class","href","type","target","disabled","download"]))}}),O6e="",L3=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Fi=L3(XK,[["__scopeId","data-v-f4c0f351"]]),xb=p.defineComponent({name:"OmzButtons",props:{noWrap:Boolean,type:{type:String,default:"justify-start"},classAddon:{type:String,default:"mr-3 last:mr-0 mb-3"},mb:{type:String,default:"-mb-3"}},render(){const t=["flex","items-center",this.type,this.noWrap?"flex-nowrap":"flex-wrap"];return this.mb&&t.push(this.mb),p.h("div",{class:t},this.$slots&&this.$slots.default?this.$slots.default().map(e=>e&&e.children&&typeof e.children=="object"?p.h(e,{},e.children.map(n=>p.h(n,{class:[this.classAddon]}))):p.h(e,{class:[this.classAddon]})):null)}});var ZK="M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",eJ="M13,11H18L16.5,9.5L17.92,8.08L21.84,12L17.92,15.92L16.5,14.5L18,13H13V18L14.5,16.5L15.92,17.92L12,21.84L8.08,17.92L9.5,16.5L11,18V13H6L7.5,14.5L6.08,15.92L2.16,12L6.08,8.08L7.5,9.5L6,11H11V6L9.5,7.5L8.08,6.08L12,2.16L15.92,6.08L14.5,7.5L13,6V11Z",tJ="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M7,10L12,15L17,10H7Z",nJ="M12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M17,14L12,9L7,14H17Z",rJ="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",oJ="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",iJ="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",aJ="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",Cf="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",sJ="M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z",V3="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",lJ="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",z3="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",uJ="M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",cJ="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",fJ="M18.41,16.59L13.82,12L18.41,7.41L17,6L11,12L17,18L18.41,16.59M6,6H8V18H6V6Z",dJ="M5.59,7.41L10.18,12L5.59,16.59L7,18L13,12L7,6L5.59,7.41M16,6H18V18H16V6Z",hJ="M13,2.03C17.73,2.5 21.5,6.25 21.95,11C22.5,16.5 18.5,21.38 13,21.93V19.93C16.64,19.5 19.5,16.61 19.96,12.97C20.5,8.58 17.39,4.59 13,4.05V2.05L13,2.03M11,2.06V4.06C9.57,4.26 8.22,4.84 7.1,5.74L5.67,4.26C7.19,3 9.05,2.25 11,2.06M4.26,5.67L5.69,7.1C4.8,8.23 4.24,9.58 4.05,11H2.05C2.25,9.04 3,7.19 4.26,5.67M2.06,13H4.06C4.24,14.42 4.81,15.77 5.69,16.9L4.27,18.33C3.03,16.81 2.26,14.96 2.06,13M7.1,18.37C8.23,19.25 9.58,19.82 11,20V22C9.04,21.79 7.18,21 5.67,19.74L7.1,18.37M12,7.5L7.5,12H11V16H13V12H16.5L12,7.5Z",pJ="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z",jb="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",vJ="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",mJ="M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z",gJ="M3 5V19H20V5H3M7 7V9H5V7H7M5 13V11H7V13H5M5 15H7V17H5V15M18 17H9V15H18V17M18 13H9V11H18V13M18 9H9V7H18V9Z";const yJ={key:0,class:"flex items-stretch border-b border-gray-100 dark:border-gray-700"},bJ={key:0,class:"flex items-center py-3 px-4 justify-center ring-blue-700 focus:ring"},wJ={key:0,class:"flex gap-3 items-center"},kJ={key:1,class:"text-center py-24 text-gray-500 dark:text-gray-400 flex flex-col flex-grow justify-center"},xJ={key:3,class:"flex items-stretch border-t border-gray-100 dark:border-gray-700 mt-auto py-3 px-4"},Sb=p.defineComponent({__name:"OmzCard",props:{title:{default:null},icon:{default:null},headerIcon:{default:null},roundedClass:{default:"md:rounded"},noDataText:{default:null},hasTable:{type:Boolean},scrollable:{type:Boolean},paddingSmall:{type:Boolean},empty:{type:Boolean},form:{type:Boolean},hoverable:{type:Boolean},contentClasses:{default:()=>[]},multipleView:{type:Boolean}},emits:["header-icon-click","submit"],setup(t,{emit:e}){const n=t,r=VK().url,o=p.ref(localStorage.getItem(`${r}_list`)||"list"),i=p.computed(()=>n.form?"form":"div"),a=p.computed(()=>{const f=[n.roundedClass];return n.hoverable&&f.push("hover:shadow-lg transition-shadow duration-500"),f}),s=p.computed(()=>{const f={};return n.contentClasses.forEach(d=>{f[d]=!0}),f}),l=()=>{e("header-icon-click")},u=f=>{e("submit",f)},c=()=>{o.value=o.value==="list"?"grid":"list",localStorage.setItem(`${r}_list`,o.value)};return(f,d)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.value),{class:p.normalizeClass([a.value,"flex flex-col bg-white border border-gray-200 dark:bg-gray-900 dark:border-gray-900"]),onSubmit:u},{default:p.withCtx(()=>[f.title?(p.openBlock(),p.createElementBlock("header",yJ,[p.createElementVNode("p",{class:p.normalizeClass(["flex items-center py-3 grow font-bold",[f.icon?"px-4":"px-6"]])},[f.icon?(p.openBlock(),p.createBlock(to,{key:0,path:f.icon,class:"mr-3"},null,8,["path"])):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(f.title),1)],2),f.headerIcon||f.multipleView?(p.openBlock(),p.createElementBlock("div",bJ,[f.multipleView?(p.openBlock(),p.createElementBlock("div",wJ,[o.value==="list"?(p.openBlock(),p.createElementBlock("button",{key:0,class:"flex items-center justify-center border rounded border-gray-800 dark:border-gray-400",onClick:d[0]||(d[0]=h=>c())},[p.createVNode(to,{path:p.unref(mJ),size:"20"},null,8,["path"])])):p.createCommentVNode("",!0),o.value==="grid"?(p.openBlock(),p.createElementBlock("button",{key:1,class:"flex items-center justify-center border rounded border-gray-800 dark:border-gray-400",onClick:d[1]||(d[1]=h=>c())},[p.createVNode(to,{path:p.unref(gJ),size:"30"},null,8,["path"])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),p.renderSlot(f.$slots,"header-items"),f.headerIcon?(p.openBlock(),p.createElementBlock("button",{key:1,type:"button",class:"inline-flex cursor-pointer justify-center items-center whitespace-nowrap focus:outline-none transition-colors focus:ring duration-150 border rounded-full border-white dark:border-slate-900 ring-blue-700 dark:ring-gray-500 bg-white text-black dark:bg-slate-900 dark:text-white hover:bg-gray-100 hover:dark:bg-slate-800 p-1",onClick:l},[p.createVNode(to,{path:f.headerIcon},null,8,["path"])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),f.empty?(p.openBlock(),p.createElementBlock("div",kJ,[p.createElementVNode("p",null,p.toDisplayString(f.noDataText),1)])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass({"p-6":!f.hasTable,"p-2":f.paddingSmall,flex:f.scrollable,"flex-col":f.scrollable,...s.value}),style:p.normalizeStyle({height:f.scrollable?"calc(100% - 3rem)":void 0})},[p.renderSlot(f.$slots,"default"),o.value==="list"?p.renderSlot(f.$slots,"list",{key:0}):o.value==="grid"?p.renderSlot(f.$slots,"grid",{key:1}):p.createCommentVNode("",!0)],6)),f.$slots.footer?(p.openBlock(),p.createElementBlock("footer",xJ,[p.renderSlot(f.$slots,"footer")])):p.createCommentVNode("",!0)]),_:3},40,["class"]))}});var F3={exports:{}};/*! @preserve
12
12
  * numeral.js
13
13
  * version : 2.0.6
14
14
  * author : Adam Draper
@@ -245,5 +245,5 @@ return query;
245
245
  * @license MIT
246
246
  */function my(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?my=function(e){return typeof e}:my=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},my(t)}function O5e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ka(){return Ka=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ka.apply(this,arguments)}function tc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){O5e(t,o,n[o])})}return t}function E5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function _5e(t,e){if(t==null)return{};var n=E5e(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function M5e(t){return T5e(t)||A5e(t)||P5e()}function T5e(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function A5e(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function P5e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var D5e="1.10.2";function nu(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var ru=nu(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Av=nu(/Edge/i),MH=nu(/firefox/i),JC=nu(/safari/i)&&!nu(/chrome/i)&&!nu(/android/i),TH=nu(/iP(ad|od|hone)/i),N5e=nu(/chrome/i)&&nu(/android/i),AH={capture:!1,passive:!1};function er(t,e,n){t.addEventListener(e,n,!ru&&AH)}function Yn(t,e,n){t.removeEventListener(e,n,!ru&&AH)}function gy(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function B5e(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Es(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&gy(t,e):gy(t,e))||r&&t===n)return t;if(t===n)break}while(t=B5e(t))}return null}var PH=/\s+/g;function uo(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(PH," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(PH," ")}}function Qt(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function uf(t,e){var n="";if(typeof t=="string")n=t;else do{var r=Qt(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function DH(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function kl(){var t=document.scrollingElement;return t||document.documentElement}function bo(t,e,n,r,o){if(!(!t.getBoundingClientRect&&t!==window)){var i,a,s,l,u,c,f;if(t!==window&&t!==kl()?(i=t.getBoundingClientRect(),a=i.top,s=i.left,l=i.bottom,u=i.right,c=i.height,f=i.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!ru))do if(o&&o.getBoundingClientRect&&(Qt(o,"transform")!=="none"||n&&Qt(o,"position")!=="static")){var d=o.getBoundingClientRect();a-=d.top+parseInt(Qt(o,"border-top-width")),s-=d.left+parseInt(Qt(o,"border-left-width")),l=a+i.height,u=s+i.width;break}while(o=o.parentNode);if(r&&t!==window){var h=uf(o||t),v=h&&h.a,m=h&&h.d;h&&(a/=m,s/=v,f/=v,c/=m,l=a+c,u=s+f)}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function NH(t,e,n){for(var r=nc(t,!0),o=bo(t)[e];r;){var i=bo(r)[n],a=void 0;if(n==="top"||n==="left"?a=o>=i:a=o<=i,!a)return r;if(r===kl())break;r=nc(r,!1)}return!1}function yy(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if(i[o].style.display!=="none"&&i[o]!==mn.ghost&&i[o]!==mn.dragged&&Es(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function GC(t,e){for(var n=t.lastElementChild;n&&(n===mn.ghost||Qt(n,"display")==="none"||e&&!gy(n,e));)n=n.previousElementSibling;return n||null}function wo(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==mn.clone&&(!e||gy(t,e))&&n++;return n}function BH(t){var e=0,n=0,r=kl();if(t)do{var o=uf(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function I5e(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function nc(t,e){if(!t||!t.getBoundingClientRect)return kl();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Qt(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return kl();if(r||e)return n;r=!0}}while(n=n.parentNode);return kl()}function R5e(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function QC(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Pv;function IH(t,e){return function(){if(!Pv){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),Pv=setTimeout(function(){Pv=void 0},e)}}}function L5e(){clearTimeout(Pv),Pv=void 0}function RH(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function XC(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function LH(t,e){Qt(t,"position","absolute"),Qt(t,"top",e.top),Qt(t,"left",e.left),Qt(t,"width",e.width),Qt(t,"height",e.height)}function ZC(t){Qt(t,"position",""),Qt(t,"top",""),Qt(t,"left",""),Qt(t,"width",""),Qt(t,"height","")}var Si="Sortable"+new Date().getTime();function V5e(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(Qt(o,"display")==="none"||o===mn.ghost)){t.push({target:o,rect:bo(o)});var i=tc({},t[t.length-1].rect);if(o.thisAnimationDuration){var a=uf(o,!0);a&&(i.top-=a.f,i.left-=a.e)}o.fromRect=i}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(I5e(t,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var i=!1,a=0;t.forEach(function(s){var l=0,u=s.target,c=u.fromRect,f=bo(u),d=u.prevFromRect,h=u.prevToRect,v=s.rect,m=uf(u,!0);m&&(f.top-=m.f,f.left-=m.e),u.toRect=f,u.thisAnimationDuration&&QC(d,f)&&!QC(c,f)&&(v.top-f.top)/(v.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=F5e(v,d,h,o.options)),QC(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=o.options.animation),o.animate(u,v,f,l)),l&&(i=!0,a=Math.max(a,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(e),i?e=setTimeout(function(){typeof r=="function"&&r()},a):typeof r=="function"&&r(),t=[]},animate:function(r,o,i,a){if(a){Qt(r,"transition",""),Qt(r,"transform","");var s=uf(this.el),l=s&&s.a,u=s&&s.d,c=(o.left-i.left)/(l||1),f=(o.top-i.top)/(u||1);r.animatingX=!!c,r.animatingY=!!f,Qt(r,"transform","translate3d("+c+"px,"+f+"px,0)"),z5e(r),Qt(r,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),Qt(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){Qt(r,"transition",""),Qt(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},a)}}}}function z5e(t){return t.offsetWidth}function F5e(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Dv=[],e$={initializeByDefault:!0},Nv={mount:function(e){for(var n in e$)e$.hasOwnProperty(n)&&!(n in e)&&(e[n]=e$[n]);Dv.push(e)},pluginEvent:function(e,n,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var i=e+"Global";Dv.forEach(function(a){n[a.pluginName]&&(n[a.pluginName][i]&&n[a.pluginName][i](tc({sortable:n},r)),n.options[a.pluginName]&&n[a.pluginName][e]&&n[a.pluginName][e](tc({sortable:n},r)))})},initializePlugins:function(e,n,r,o){Dv.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var u=new s(e,n,e.options);u.sortable=e,u.options=e.options,e[l]=u,Ka(r,u.defaults)}});for(var i in e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,n){var r={};return Dv.forEach(function(o){typeof o.eventProperties=="function"&&Ka(r,o.eventProperties.call(n[o.pluginName],e))}),r},modifyOption:function(e,n,r){var o;return Dv.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[n]=="function"&&(o=i.optionListeners[n].call(e[i.pluginName],r))}),o}};function Bv(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,h=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[Si],!!e){var m,g=e.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!ru&&!Av?m=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(r,!0,!0)),m.to=a||n,m.from=s||n,m.item=o||n,m.clone=i,m.oldIndex=l,m.newIndex=u,m.oldDraggableIndex=c,m.newDraggableIndex=f,m.originalEvent=d,m.pullMode=h?h.lastPutMode:void 0;var b=tc({},v,Nv.getEventProperties(r,e));for(var w in b)m[w]=b[w];n&&n.dispatchEvent(m),g[y]&&g[y].call(e,m)}}var Zi=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,i=_5e(r,["evt"]);Nv.pluginEvent.bind(mn)(e,n,tc({dragEl:kt,parentEl:Ao,ghostEl:Pn,rootEl:co,nextEl:cf,lastDownEl:by,cloneEl:ko,cloneHidden:rc,dragStarted:Rv,putSortable:ui,activeSortable:mn.active,originalEvent:o,oldIndex:sh,oldDraggableIndex:Iv,newIndex:pa,newDraggableIndex:oc,hideGhostForTarget:qH,unhideGhostForTarget:YH,cloneNowHidden:function(){rc=!0},cloneNowShown:function(){rc=!1},dispatchSortableEvent:function(s){Li({sortable:n,name:s,originalEvent:o})}},i))};function Li(t){Bv(tc({putSortable:ui,cloneEl:ko,targetEl:kt,rootEl:co,oldIndex:sh,oldDraggableIndex:Iv,newIndex:pa,newDraggableIndex:oc},t))}var kt,Ao,Pn,co,cf,by,ko,rc,sh,pa,Iv,oc,wy,ui,lh=!1,ky=!1,xy=[],ff,_s,t$,n$,VH,zH,Rv,uh,Lv,Vv=!1,jy=!1,Sy,Ci,r$=[],o$=!1,Cy=[],$y=typeof document<"u",Oy=TH,FH=Av||ru?"cssFloat":"float",U5e=$y&&!N5e&&!TH&&"draggable"in document.createElement("div"),UH=function(){if($y){if(ru)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),HH=function(e,n){var r=Qt(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=yy(e,0,n),a=yy(e,1,n),s=i&&Qt(i),l=a&&Qt(a),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+bo(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+bo(a).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=o&&r[FH]==="none"||a&&r[FH]==="none"&&u+c>o)?"vertical":"horizontal"},H5e=function(e,n,r){var o=r?e.left:e.top,i=r?e.right:e.bottom,a=r?e.width:e.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===s||i===l||o+a/2===s+u/2},W5e=function(e,n){var r;return xy.some(function(o){if(!GC(o)){var i=bo(o),a=o[Si].options.emptyInsertThreshold,s=e>=i.left-a&&e<=i.right+a,l=n>=i.top-a&&n<=i.bottom+a;if(a&&s&&l)return r=o}}),r},WH=function(e){function n(i,a){return function(s,l,u,c){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(i==null&&(a||f))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return n(i(s,l,u,c),a)(s,l,u,c);var d=(a?s:l).options.group.name;return i===!0||typeof i=="string"&&i===d||i.join&&i.indexOf(d)>-1}}var r={},o=e.group;(!o||my(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,e.group=r},qH=function(){!UH&&Pn&&Qt(Pn,"display","none")},YH=function(){!UH&&Pn&&Qt(Pn,"display","")};$y&&document.addEventListener("click",function(t){if(ky)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ky=!1,!1},!0);var df=function(e){if(kt){e=e.touches?e.touches[0]:e;var n=W5e(e.clientX,e.clientY);if(n){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Si]._onDragOver(r)}}},q5e=function(e){kt&&kt.parentNode[Si]._isOutsideThisEl(e.target)};function mn(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ka({},e),t[Si]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return HH(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:mn.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};Nv.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);WH(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:U5e,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?er(t,"pointerdown",this._onTapStart):(er(t,"mousedown",this._onTapStart),er(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(er(t,"dragover",this),er(t,"dragenter",this)),xy.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ka(this,V5e())}mn.prototype={constructor:mn,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(uh=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,kt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,o=this.options,i=o.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(Z5e(r),!kt&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!u.isContentEditable&&(l=Es(l,o.draggable,r,!1),!(l&&l.animated)&&by!==l)){if(sh=wo(l),Iv=wo(l,o.draggable),typeof c=="function"){if(c.call(this,e,l,this)){Li({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),Zi("filter",n,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Es(u,f.trim(),r,!1),f)return Li({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),Zi("filter",n,{evt:e}),!0}),c)){i&&e.cancelable&&e.preventDefault();return}o.handle&&!Es(u,o.handle,r,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,n,r){var o=this,i=o.el,a=o.options,s=i.ownerDocument,l;if(r&&!kt&&r.parentNode===i){var u=bo(r);if(co=i,kt=r,Ao=kt.parentNode,cf=kt.nextSibling,by=r,wy=a.group,mn.dragged=kt,ff={target:kt,clientX:(n||e).clientX,clientY:(n||e).clientY},VH=ff.clientX-u.left,zH=ff.clientY-u.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,kt.style["will-change"]="all",l=function(){if(Zi("delayEnded",o,{evt:e}),mn.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!MH&&o.nativeDraggable&&(kt.draggable=!0),o._triggerDragStart(e,n),Li({sortable:o,name:"choose",originalEvent:e}),uo(kt,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){DH(kt,c.trim(),a$)}),er(s,"dragover",df),er(s,"mousemove",df),er(s,"touchmove",df),er(s,"mouseup",o._onDrop),er(s,"touchend",o._onDrop),er(s,"touchcancel",o._onDrop),MH&&this.nativeDraggable&&(this.options.touchStartThreshold=4,kt.draggable=!0),Zi("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Av||ru))){if(mn.eventCanceled){this._onDrop();return}er(s,"mouseup",o._disableDelayedDrag),er(s,"touchend",o._disableDelayedDrag),er(s,"touchcancel",o._disableDelayedDrag),er(s,"mousemove",o._delayedDragTouchMoveHandler),er(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&er(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){kt&&a$(kt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Yn(e,"mouseup",this._disableDelayedDrag),Yn(e,"touchend",this._disableDelayedDrag),Yn(e,"touchcancel",this._disableDelayedDrag),Yn(e,"mousemove",this._delayedDragTouchMoveHandler),Yn(e,"touchmove",this._delayedDragTouchMoveHandler),Yn(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?er(document,"pointermove",this._onTouchMove):n?er(document,"touchmove",this._onTouchMove):er(document,"mousemove",this._onTouchMove):(er(kt,"dragend",this),er(co,"dragstart",this._onDragStart));try{document.selection?Ey(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(lh=!1,co&&kt){Zi("dragStarted",this,{evt:n}),this.nativeDraggable&&er(document,"dragover",q5e);var r=this.options;!e&&uo(kt,r.dragClass,!1),uo(kt,r.ghostClass,!0),mn.active=this,e&&this._appendGhost(),Li({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(_s){this._lastX=_s.clientX,this._lastY=_s.clientY,qH();for(var e=document.elementFromPoint(_s.clientX,_s.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(_s.clientX,_s.clientY),e!==n);)n=e;if(kt.parentNode[Si]._isOutsideThisEl(e),n)do{if(n[Si]){var r=void 0;if(r=n[Si]._onDragOver({clientX:_s.clientX,clientY:_s.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);YH()}},_onTouchMove:function(e){if(ff){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,a=Pn&&uf(Pn,!0),s=Pn&&a&&a.a,l=Pn&&a&&a.d,u=Oy&&Ci&&BH(Ci),c=(i.clientX-ff.clientX+o.x)/(s||1)+(u?u[0]-r$[0]:0)/(s||1),f=(i.clientY-ff.clientY+o.y)/(l||1)+(u?u[1]-r$[1]:0)/(l||1);if(!mn.active&&!lh){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Pn){a?(a.e+=c-(t$||0),a.f+=f-(n$||0)):a={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Qt(Pn,"webkitTransform",d),Qt(Pn,"mozTransform",d),Qt(Pn,"msTransform",d),Qt(Pn,"transform",d),t$=c,n$=f,_s=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Pn){var e=this.options.fallbackOnBody?document.body:co,n=bo(kt,!0,Oy,!0,e),r=this.options;if(Oy){for(Ci=e;Qt(Ci,"position")==="static"&&Qt(Ci,"transform")==="none"&&Ci!==document;)Ci=Ci.parentNode;Ci!==document.body&&Ci!==document.documentElement?(Ci===document&&(Ci=kl()),n.top+=Ci.scrollTop,n.left+=Ci.scrollLeft):Ci=kl(),r$=BH(Ci)}Pn=kt.cloneNode(!0),uo(Pn,r.ghostClass,!1),uo(Pn,r.fallbackClass,!0),uo(Pn,r.dragClass,!0),Qt(Pn,"transition",""),Qt(Pn,"transform",""),Qt(Pn,"box-sizing","border-box"),Qt(Pn,"margin",0),Qt(Pn,"top",n.top),Qt(Pn,"left",n.left),Qt(Pn,"width",n.width),Qt(Pn,"height",n.height),Qt(Pn,"opacity","0.8"),Qt(Pn,"position",Oy?"absolute":"fixed"),Qt(Pn,"zIndex","100000"),Qt(Pn,"pointerEvents","none"),mn.ghost=Pn,e.appendChild(Pn),Qt(Pn,"transform-origin",VH/parseInt(Pn.style.width)*100+"% "+zH/parseInt(Pn.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,o=e.dataTransfer,i=r.options;if(Zi("dragStart",this,{evt:e}),mn.eventCanceled){this._onDrop();return}Zi("setupClone",this),mn.eventCanceled||(ko=XC(kt),ko.draggable=!1,ko.style["will-change"]="",this._hideClone(),uo(ko,this.options.chosenClass,!1),mn.clone=ko),r.cloneId=Ey(function(){Zi("clone",r),!mn.eventCanceled&&(r.options.removeCloneOnHide||co.insertBefore(ko,kt),r._hideClone(),Li({sortable:r,name:"clone"}))}),!n&&uo(kt,i.dragClass,!0),n?(ky=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Yn(document,"mouseup",r._onDrop),Yn(document,"touchend",r._onDrop),Yn(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(r,o,kt)),er(document,"drop",r),Qt(kt,"transform","translateZ(0)")),lh=!0,r._dragStartId=Ey(r._dragStarted.bind(r,n,e)),er(document,"selectstart",r),Rv=!0,JC&&Qt(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,o,i,a,s=this.options,l=s.group,u=mn.active,c=wy===l,f=s.sort,d=ui||u,h,v=this,m=!1;if(o$)return;function g(R,I){Zi(R,v,tc({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:a,dragRect:o,targetRect:i,canSort:f,fromSortable:d,target:r,completed:b,onMove:function($,P){return i$(co,n,kt,o,$,bo($),e,P)},changed:w},I))}function y(){g("dragOverAnimationCapture"),v.captureAnimationState(),v!==d&&d.captureAnimationState()}function b(R){return g("dragOverCompleted",{insertion:R}),R&&(c?u._hideClone():u._showClone(v),v!==d&&(uo(kt,ui?ui.options.ghostClass:u.options.ghostClass,!1),uo(kt,s.ghostClass,!0)),ui!==v&&v!==mn.active?ui=v:v===mn.active&&ui&&(ui=null),d===v&&(v._ignoreWhileAnimating=r),v.animateAll(function(){g("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(r===kt&&!kt.animated||r===n&&!r.animated)&&(uh=null),!s.dragoverBubble&&!e.rootEl&&r!==document&&(kt.parentNode[Si]._isOutsideThisEl(e.target),!R&&df(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function w(){pa=wo(kt),oc=wo(kt,s.draggable),Li({sortable:v,name:"change",toEl:n,newIndex:pa,newDraggableIndex:oc,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Es(r,s.draggable,n,!0),g("dragOver"),mn.eventCanceled)return m;if(kt.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||v._ignoreWhileAnimating===r)return b(!1);if(ky=!1,u&&!s.disabled&&(c?f||(a=!co.contains(kt)):ui===this||(this.lastPutMode=wy.checkPull(this,u,kt,e))&&l.checkPut(this,u,kt,e))){if(h=this._getDirection(e,r)==="vertical",o=bo(kt),g("dragOverValid"),mn.eventCanceled)return m;if(a)return Ao=co,y(),this._hideClone(),g("revert"),mn.eventCanceled||(cf?co.insertBefore(kt,cf):co.appendChild(kt)),b(!0);var k=GC(n,s.draggable);if(!k||J5e(e,h,this)&&!k.animated){if(k===kt)return b(!1);if(k&&n===e.target&&(r=k),r&&(i=bo(r)),i$(co,n,kt,o,r,i,e,!!r)!==!1)return y(),n.appendChild(kt),Ao=n,w(),b(!0)}else if(r.parentNode===n){i=bo(r);var C=0,S,B=kt.parentNode!==n,O=!H5e(kt.animated&&kt.toRect||o,r.animated&&r.toRect||i,h),A=h?"top":"left",M=NH(r,"top","top")||NH(kt,"top","top"),E=M?M.scrollTop:void 0;uh!==r&&(S=i[A],Vv=!1,jy=!O&&s.invertSwap||B),C=G5e(e,r,i,h,O?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,jy,uh===r);var T;if(C!==0){var z=wo(kt);do z-=C,T=Ao.children[z];while(T&&(Qt(T,"display")==="none"||T===Pn))}if(C===0||T===r)return b(!1);uh=r,Lv=C;var L=r.nextElementSibling,V=!1;V=C===1;var H=i$(co,n,kt,o,r,i,e,V);if(H!==!1)return(H===1||H===-1)&&(V=H===1),o$=!0,setTimeout(K5e,30),y(),V&&!L?n.appendChild(kt):r.parentNode.insertBefore(kt,V?L:r),M&&RH(M,0,E-M.scrollTop),Ao=kt.parentNode,S!==void 0&&!jy&&(Sy=Math.abs(S-bo(r)[A])),w(),b(!0)}if(n.contains(kt))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Yn(document,"mousemove",this._onTouchMove),Yn(document,"touchmove",this._onTouchMove),Yn(document,"pointermove",this._onTouchMove),Yn(document,"dragover",df),Yn(document,"mousemove",df),Yn(document,"touchmove",df)},_offUpEvents:function(){var e=this.el.ownerDocument;Yn(e,"mouseup",this._onDrop),Yn(e,"touchend",this._onDrop),Yn(e,"pointerup",this._onDrop),Yn(e,"touchcancel",this._onDrop),Yn(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(pa=wo(kt),oc=wo(kt,r.draggable),Zi("drop",this,{evt:e}),Ao=kt&&kt.parentNode,pa=wo(kt),oc=wo(kt,r.draggable),mn.eventCanceled){this._nulling();return}lh=!1,jy=!1,Vv=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),s$(this.cloneId),s$(this._dragStartId),this.nativeDraggable&&(Yn(document,"drop",this),Yn(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),JC&&Qt(document.body,"user-select",""),Qt(kt,"transform",""),e&&(Rv&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Pn&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),(co===Ao||ui&&ui.lastPutMode!=="clone")&&ko&&ko.parentNode&&ko.parentNode.removeChild(ko),kt&&(this.nativeDraggable&&Yn(kt,"dragend",this),a$(kt),kt.style["will-change"]="",Rv&&!lh&&uo(kt,ui?ui.options.ghostClass:this.options.ghostClass,!1),uo(kt,this.options.chosenClass,!1),Li({sortable:this,name:"unchoose",toEl:Ao,newIndex:null,newDraggableIndex:null,originalEvent:e}),co!==Ao?(pa>=0&&(Li({rootEl:Ao,name:"add",toEl:Ao,fromEl:co,originalEvent:e}),Li({sortable:this,name:"remove",toEl:Ao,originalEvent:e}),Li({rootEl:Ao,name:"sort",toEl:Ao,fromEl:co,originalEvent:e}),Li({sortable:this,name:"sort",toEl:Ao,originalEvent:e})),ui&&ui.save()):pa!==sh&&pa>=0&&(Li({sortable:this,name:"update",toEl:Ao,originalEvent:e}),Li({sortable:this,name:"sort",toEl:Ao,originalEvent:e})),mn.active&&((pa==null||pa===-1)&&(pa=sh,oc=Iv),Li({sortable:this,name:"end",toEl:Ao,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Zi("nulling",this),co=kt=Ao=Pn=cf=ko=by=rc=ff=_s=Rv=pa=oc=sh=Iv=uh=Lv=ui=wy=mn.dragged=mn.ghost=mn.clone=mn.active=null,Cy.forEach(function(e){e.checked=!0}),Cy.length=t$=n$=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":kt&&(this._onDragOver(e),Y5e(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,o=0,i=r.length,a=this.options;o<i;o++)n=r[o],Es(n,a.draggable,this.el,!1)&&e.push(n.getAttribute(a.dataIdAttr)||X5e(n));return e},sort:function(e){var n={},r=this.el;this.toArray().forEach(function(o,i){var a=r.children[i];Es(a,this.options.draggable,r,!1)&&(n[o]=a)},this),e.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))})},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return Es(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var o=Nv.modifyOption(this,e,n);typeof o<"u"?r[e]=o:r[e]=n,e==="group"&&WH(r)},destroy:function(){Zi("destroy",this);var e=this.el;e[Si]=null,Yn(e,"mousedown",this._onTapStart),Yn(e,"touchstart",this._onTapStart),Yn(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Yn(e,"dragover",this),Yn(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xy.splice(xy.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!rc){if(Zi("hideClone",this),mn.eventCanceled)return;Qt(ko,"display","none"),this.options.removeCloneOnHide&&ko.parentNode&&ko.parentNode.removeChild(ko),rc=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(rc){if(Zi("showClone",this),mn.eventCanceled)return;co.contains(kt)&&!this.options.group.revertClone?co.insertBefore(ko,kt):cf?co.insertBefore(ko,cf):co.appendChild(ko),this.options.group.revertClone&&this.animate(kt,ko),Qt(ko,"display",""),rc=!1}}};function Y5e(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function i$(t,e,n,r,o,i,a,s){var l,u=t[Si],c=u.options.onMove,f;return window.CustomEvent&&!ru&&!Av?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=o||e,l.relatedRect=i||bo(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),c&&(f=c.call(u,l,a)),f}function a$(t){t.draggable=!1}function K5e(){o$=!1}function J5e(t,e,n){var r=bo(GC(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}function G5e(t,e,n,r,o,i,a,s){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a){if(s&&Sy<u*o){if(!Vv&&(Lv===1?l>c+u*i/2:l<f-u*i/2)&&(Vv=!0),Vv)d=!0;else if(Lv===1?l<c+Sy:l>f-Sy)return-Lv}else if(l>c+u*(1-o)/2&&l<f-u*(1-o)/2)return Q5e(e)}return d=d||a,d&&(l<c+u*i/2||l>f-u*i/2)?l>c+u/2?1:-1:0}function Q5e(t){return wo(kt)<wo(t)?1:-1}function X5e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Z5e(t){Cy.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Cy.push(r)}}function Ey(t){return setTimeout(t,0)}function s$(t){return clearTimeout(t)}$y&&er(document,"touchmove",function(t){(mn.active||lh)&&t.cancelable&&t.preventDefault()}),mn.utils={on:er,off:Yn,css:Qt,find:DH,is:function(e,n){return!!Es(e,n,e,!1)},extend:R5e,throttle:IH,closest:Es,toggleClass:uo,clone:XC,index:wo,nextTick:Ey,cancelNextTick:s$,detectDirection:HH,getChild:yy},mn.get=function(t){return t[Si]},mn.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(mn.utils=tc({},mn.utils,r.utils)),Nv.mount(r)})},mn.create=function(t,e){return new mn(t,e)},mn.version=D5e;var Po=[],zv,l$,u$=!1,c$,f$,_y,Fv;function e8e(){function t(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?er(document,"dragover",this._handleAutoScroll):this.options.supportPointer?er(document,"pointermove",this._handleFallbackAutoScroll):r.touches?er(document,"touchmove",this._handleFallbackAutoScroll):er(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Yn(document,"dragover",this._handleAutoScroll):(Yn(document,"pointermove",this._handleFallbackAutoScroll),Yn(document,"touchmove",this._handleFallbackAutoScroll),Yn(document,"mousemove",this._handleFallbackAutoScroll)),KH(),My(),L5e()},nulling:function(){_y=l$=zv=u$=Fv=c$=f$=null,Po.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var o=this,i=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(i,a);if(_y=n,r||Av||ru||JC){d$(n,this.options,s,r);var l=nc(s,!0);u$&&(!Fv||i!==c$||a!==f$)&&(Fv&&KH(),Fv=setInterval(function(){var u=nc(document.elementFromPoint(i,a),!0);u!==l&&(l=u,My()),d$(n,o.options,u,r)},10),c$=i,f$=a)}else{if(!this.options.bubbleScroll||nc(s,!0)===kl()){My();return}d$(n,this.options,nc(s,!1),!1)}}},Ka(t,{pluginName:"scroll",initializeByDefault:!0})}function My(){Po.forEach(function(t){clearInterval(t.pid)}),Po=[]}function KH(){clearInterval(Fv)}var d$=IH(function(t,e,n,r){if(e.scroll){var o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,l=kl(),u=!1,c;l$!==n&&(l$=n,My(),zv=e.scroll,c=e.scrollFn,zv===!0&&(zv=nc(n,!0)));var f=0,d=zv;do{var h=d,v=bo(h),m=v.top,g=v.bottom,y=v.left,b=v.right,w=v.width,k=v.height,C=void 0,S=void 0,B=h.scrollWidth,O=h.scrollHeight,A=Qt(h),M=h.scrollLeft,E=h.scrollTop;h===l?(C=w<B&&(A.overflowX==="auto"||A.overflowX==="scroll"||A.overflowX==="visible"),S=k<O&&(A.overflowY==="auto"||A.overflowY==="scroll"||A.overflowY==="visible")):(C=w<B&&(A.overflowX==="auto"||A.overflowX==="scroll"),S=k<O&&(A.overflowY==="auto"||A.overflowY==="scroll"));var T=C&&(Math.abs(b-o)<=a&&M+w<B)-(Math.abs(y-o)<=a&&!!M),z=S&&(Math.abs(g-i)<=a&&E+k<O)-(Math.abs(m-i)<=a&&!!E);if(!Po[f])for(var L=0;L<=f;L++)Po[L]||(Po[L]={});(Po[f].vx!=T||Po[f].vy!=z||Po[f].el!==h)&&(Po[f].el=h,Po[f].vx=T,Po[f].vy=z,clearInterval(Po[f].pid),(T!=0||z!=0)&&(u=!0,Po[f].pid=setInterval((function(){r&&this.layer===0&&mn.active._onTouchMove(_y);var V=Po[this.layer].vy?Po[this.layer].vy*s:0,H=Po[this.layer].vx?Po[this.layer].vx*s:0;typeof c=="function"&&c.call(mn.dragged.parentNode[Si],H,V,t,_y,Po[this.layer].el)!=="continue"||RH(Po[this.layer].el,H,V)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==l&&(d=nc(d,!1)));u$=u}},30),JH=function(e){var n=e.originalEvent,r=e.putSortable,o=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(n){var u=r||i;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(a("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function h$(){}h$.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=yy(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:JH},Ka(h$,{pluginName:"revertOnSpill"});function p$(){}p$.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:JH},Ka(p$,{pluginName:"removeOnSpill"});var Ja;function t8e(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(n){var r=n.dragEl;Ja=r},dragOverValid:function(n){var r=n.completed,o=n.target,i=n.onMove,a=n.activeSortable,s=n.changed,l=n.cancel;if(a.options.swap){var u=this.sortable.el,c=this.options;if(o&&o!==u){var f=Ja;i(o)!==!1?(uo(o,c.swapClass,!0),Ja=o):Ja=null,f&&f!==Ja&&uo(f,c.swapClass,!1)}s(),r(!0),l()}},drop:function(n){var r=n.activeSortable,o=n.putSortable,i=n.dragEl,a=o||this.sortable,s=this.options;Ja&&uo(Ja,s.swapClass,!1),Ja&&(s.swap||o&&o.options.swap)&&i!==Ja&&(a.captureAnimationState(),a!==r&&r.captureAnimationState(),n8e(i,Ja),a.animateAll(),a!==r&&r.animateAll())},nulling:function(){Ja=null}},Ka(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Ja}}})}function n8e(t,e){var n=t.parentNode,r=e.parentNode,o,i;!n||!r||n.isEqualNode(e)||r.isEqualNode(t)||(o=wo(t),i=wo(e),n.isEqualNode(r)&&o<i&&i++,n.insertBefore(e,n.children[o]),r.insertBefore(t,r.children[i]))}var Sn=[],va=[],Uv,Ms,Hv=!1,ma=!1,ch=!1,Rr,Wv,Ty;function r8e(){function t(e){for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));e.options.supportPointer?er(document,"pointerup",this._deselectMultiDrag):(er(document,"mouseup",this._deselectMultiDrag),er(document,"touchend",this._deselectMultiDrag)),er(document,"keydown",this._checkKeyDown),er(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(o,i){var a="";Sn.length&&Ms===e?Sn.forEach(function(s,l){a+=(l?", ":"")+s.textContent}):a=i.textContent,o.setData("Text",a)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(n){var r=n.dragEl;Rr=r},delayEnded:function(){this.isMultiDrag=~Sn.indexOf(Rr)},setupClone:function(n){var r=n.sortable,o=n.cancel;if(this.isMultiDrag){for(var i=0;i<Sn.length;i++)va.push(XC(Sn[i])),va[i].sortableIndex=Sn[i].sortableIndex,va[i].draggable=!1,va[i].style["will-change"]="",uo(va[i],this.options.selectedClass,!1),Sn[i]===Rr&&uo(va[i],this.options.chosenClass,!1);r._hideClone(),o()}},clone:function(n){var r=n.sortable,o=n.rootEl,i=n.dispatchSortableEvent,a=n.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Sn.length&&Ms===r&&(GH(!0,o),i("clone"),a()))},showClone:function(n){var r=n.cloneNowShown,o=n.rootEl,i=n.cancel;this.isMultiDrag&&(GH(!1,o),va.forEach(function(a){Qt(a,"display","")}),r(),Ty=!1,i())},hideClone:function(n){var r=this;n.sortable;var o=n.cloneNowHidden,i=n.cancel;this.isMultiDrag&&(va.forEach(function(a){Qt(a,"display","none"),r.options.removeCloneOnHide&&a.parentNode&&a.parentNode.removeChild(a)}),o(),Ty=!0,i())},dragStartGlobal:function(n){n.sortable,!this.isMultiDrag&&Ms&&Ms.multiDrag._deselectMultiDrag(),Sn.forEach(function(r){r.sortableIndex=wo(r)}),Sn=Sn.sort(function(r,o){return r.sortableIndex-o.sortableIndex}),ch=!0},dragStarted:function(n){var r=this,o=n.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){Sn.forEach(function(a){a!==Rr&&Qt(a,"position","absolute")});var i=bo(Rr,!1,!0,!0);Sn.forEach(function(a){a!==Rr&&LH(a,i)}),ma=!0,Hv=!0}o.animateAll(function(){ma=!1,Hv=!1,r.options.animation&&Sn.forEach(function(a){ZC(a)}),r.options.sort&&Ay()})}},dragOver:function(n){var r=n.target,o=n.completed,i=n.cancel;ma&&~Sn.indexOf(r)&&(o(!1),i())},revert:function(n){var r=n.fromSortable,o=n.rootEl,i=n.sortable,a=n.dragRect;Sn.length>1&&(Sn.forEach(function(s){i.addAnimationState({target:s,rect:ma?bo(s):a}),ZC(s),s.fromRect=a,r.removeAnimationState(s)}),ma=!1,o8e(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(n){var r=n.sortable,o=n.isOwner,i=n.insertion,a=n.activeSortable,s=n.parentEl,l=n.putSortable,u=this.options;if(i){if(o&&a._hideClone(),Hv=!1,u.animation&&Sn.length>1&&(ma||!o&&!a.options.sort&&!l)){var c=bo(Rr,!1,!0,!0);Sn.forEach(function(d){d!==Rr&&(LH(d,c),s.appendChild(d))}),ma=!0}if(!o)if(ma||Ay(),Sn.length>1){var f=Ty;a._showClone(r),a.options.animation&&!Ty&&f&&va.forEach(function(d){a.addAnimationState({target:d,rect:Wv}),d.fromRect=Wv,d.thisAnimationDuration=null})}else a._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,o=n.isOwner,i=n.activeSortable;if(Sn.forEach(function(s){s.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){Wv=Ka({},r);var a=uf(Rr,!0);Wv.top-=a.f,Wv.left-=a.e}},dragOverAnimationComplete:function(){ma&&(ma=!1,Ay())},drop:function(n){var r=n.originalEvent,o=n.rootEl,i=n.parentEl,a=n.sortable,s=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=i.children;if(!ch)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),uo(Rr,f.selectedClass,!~Sn.indexOf(Rr)),~Sn.indexOf(Rr))Sn.splice(Sn.indexOf(Rr),1),Uv=null,Bv({sortable:a,rootEl:o,name:"deselect",targetEl:Rr,originalEvt:r});else{if(Sn.push(Rr),Bv({sortable:a,rootEl:o,name:"select",targetEl:Rr,originalEvt:r}),r.shiftKey&&Uv&&a.el.contains(Uv)){var h=wo(Uv),v=wo(Rr);if(~h&&~v&&h!==v){var m,g;for(v>h?(g=h,m=v):(g=v,m=h+1);g<m;g++)~Sn.indexOf(d[g])||(uo(d[g],f.selectedClass,!0),Sn.push(d[g]),Bv({sortable:a,rootEl:o,name:"select",targetEl:d[g],originalEvt:r}))}}else Uv=Rr;Ms=c}if(ch&&this.isMultiDrag){if((i[Si].options.sort||i!==o)&&Sn.length>1){var y=bo(Rr),b=wo(Rr,":not(."+this.options.selectedClass+")");if(!Hv&&f.animation&&(Rr.thisAnimationDuration=null),c.captureAnimationState(),!Hv&&(f.animation&&(Rr.fromRect=y,Sn.forEach(function(k){if(k.thisAnimationDuration=null,k!==Rr){var C=ma?bo(k):y;k.fromRect=C,c.addAnimationState({target:k,rect:C})}})),Ay(),Sn.forEach(function(k){d[b]?i.insertBefore(k,d[b]):i.appendChild(k),b++}),l===wo(Rr))){var w=!1;Sn.forEach(function(k){if(k.sortableIndex!==wo(k)){w=!0;return}}),w&&s("update")}Sn.forEach(function(k){ZC(k)}),c.animateAll()}Ms=c}(o===i||u&&u.lastPutMode!=="clone")&&va.forEach(function(k){k.parentNode&&k.parentNode.removeChild(k)})}},nullingGlobal:function(){this.isMultiDrag=ch=!1,va.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Yn(document,"pointerup",this._deselectMultiDrag),Yn(document,"mouseup",this._deselectMultiDrag),Yn(document,"touchend",this._deselectMultiDrag),Yn(document,"keydown",this._checkKeyDown),Yn(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof ch<"u"&&ch)&&Ms===this.sortable&&!(n&&Es(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;Sn.length;){var r=Sn[0];uo(r,this.options.selectedClass,!1),Sn.shift(),Bv({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Ka(t,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[Si];!r||!r.options.multiDrag||~Sn.indexOf(n)||(Ms&&Ms!==r&&(Ms.multiDrag._deselectMultiDrag(),Ms=r),uo(n,r.options.selectedClass,!0),Sn.push(n))},deselect:function(n){var r=n.parentNode[Si],o=Sn.indexOf(n);!r||!r.options.multiDrag||!~o||(uo(n,r.options.selectedClass,!1),Sn.splice(o,1))}},eventProperties:function(){var n=this,r=[],o=[];return Sn.forEach(function(i){r.push({multiDragElement:i,index:i.sortableIndex});var a;ma&&i!==Rr?a=-1:ma?a=wo(i,":not(."+n.options.selectedClass+")"):a=wo(i),o.push({multiDragElement:i,index:a})}),{items:M5e(Sn),clones:[].concat(va),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function o8e(t,e){Sn.forEach(function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)})}function GH(t,e){va.forEach(function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)})}function Ay(){Sn.forEach(function(t){t!==Rr&&t.parentNode&&t.parentNode.removeChild(t)})}mn.mount(new e8e),mn.mount(p$,h$);const i8e=Y$(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:r8e,Sortable:mn,Swap:t8e,default:mn},Symbol.toStringTag,{value:"Module"})));(function(t,e){(function(r,o){t.exports=o(i8e)})(typeof self<"u"?self:Qa,function(n){return function(r){var o={};function i(a){if(o[a])return o[a].exports;var s=o[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=r,i.c=o,i.d=function(a,s,l){i.o(a,s)||Object.defineProperty(a,s,{enumerable:!0,get:l})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,s){if(s&1&&(a=i(a)),s&8||s&4&&typeof a=="object"&&a&&a.__esModule)return a;var l=Object.create(null);if(i.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:a}),s&2&&typeof a!="string")for(var u in a)i.d(l,u,(function(c){return a[c]}).bind(null,u));return l},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s="fb15")}({"01f9":function(r,o,i){var a=i("2d00"),s=i("5ca1"),l=i("2aba"),u=i("32e9"),c=i("84f2"),f=i("41a0"),d=i("7f20"),h=i("38fd"),v=i("2b4c")("iterator"),m=!([].keys&&"next"in[].keys()),g="@@iterator",y="keys",b="values",w=function(){return this};r.exports=function(k,C,S,B,O,A,M){f(S,C,B);var E=function(x){if(!m&&x in V)return V[x];switch(x){case y:return function(){return new S(this,x)};case b:return function(){return new S(this,x)}}return function(){return new S(this,x)}},T=C+" Iterator",z=O==b,L=!1,V=k.prototype,H=V[v]||V[g]||O&&V[O],R=H||E(O),I=O?z?E("entries"):R:void 0,j=C=="Array"&&V.entries||H,$,P,D;if(j&&(D=h(j.call(new k)),D!==Object.prototype&&D.next&&(d(D,T,!0),!a&&typeof D[v]!="function"&&u(D,v,w))),z&&H&&H.name!==b&&(L=!0,R=function(){return H.call(this)}),(!a||M)&&(m||L||!V[v])&&u(V,v,R),c[C]=R,c[T]=w,O)if($={values:z?R:E(b),keys:A?R:E(y),entries:I},M)for(P in $)P in V||l(V,P,$[P]);else s(s.P+s.F*(m||L),C,$);return $}},"02f4":function(r,o,i){var a=i("4588"),s=i("be13");r.exports=function(l){return function(u,c){var f=String(s(u)),d=a(c),h=f.length,v,m;return d<0||d>=h?l?"":void 0:(v=f.charCodeAt(d),v<55296||v>56319||d+1===h||(m=f.charCodeAt(d+1))<56320||m>57343?l?f.charAt(d):v:l?f.slice(d,d+2):(v-55296<<10)+(m-56320)+65536)}}},"0390":function(r,o,i){var a=i("02f4")(!0);r.exports=function(s,l,u){return l+(u?a(s,l).length:1)}},"0bfb":function(r,o,i){var a=i("cb7c");r.exports=function(){var s=a(this),l="";return s.global&&(l+="g"),s.ignoreCase&&(l+="i"),s.multiline&&(l+="m"),s.unicode&&(l+="u"),s.sticky&&(l+="y"),l}},"0d58":function(r,o,i){var a=i("ce10"),s=i("e11e");r.exports=Object.keys||function(u){return a(u,s)}},1495:function(r,o,i){var a=i("86cc"),s=i("cb7c"),l=i("0d58");r.exports=i("9e1e")?Object.defineProperties:function(c,f){s(c);for(var d=l(f),h=d.length,v=0,m;h>v;)a.f(c,m=d[v++],f[m]);return c}},"214f":function(r,o,i){i("b0c5");var a=i("2aba"),s=i("32e9"),l=i("79e5"),u=i("be13"),c=i("2b4c"),f=i("520a"),d=c("species"),h=!l(function(){var m=/./;return m.exec=function(){var g=[];return g.groups={a:"7"},g},"".replace(m,"$<a>")!=="7"}),v=function(){var m=/(?:)/,g=m.exec;m.exec=function(){return g.apply(this,arguments)};var y="ab".split(m);return y.length===2&&y[0]==="a"&&y[1]==="b"}();r.exports=function(m,g,y){var b=c(m),w=!l(function(){var A={};return A[b]=function(){return 7},""[m](A)!=7}),k=w?!l(function(){var A=!1,M=/a/;return M.exec=function(){return A=!0,null},m==="split"&&(M.constructor={},M.constructor[d]=function(){return M}),M[b](""),!A}):void 0;if(!w||!k||m==="replace"&&!h||m==="split"&&!v){var C=/./[b],S=y(u,b,""[m],function(M,E,T,z,L){return E.exec===f?w&&!L?{done:!0,value:C.call(E,T,z)}:{done:!0,value:M.call(T,E,z)}:{done:!1}}),B=S[0],O=S[1];a(String.prototype,m,B),s(RegExp.prototype,b,g==2?function(A,M){return O.call(A,this,M)}:function(A){return O.call(A,this)})}}},"230e":function(r,o,i){var a=i("d3f4"),s=i("7726").document,l=a(s)&&a(s.createElement);r.exports=function(u){return l?s.createElement(u):{}}},"23c6":function(r,o,i){var a=i("2d95"),s=i("2b4c")("toStringTag"),l=a(function(){return arguments}())=="Arguments",u=function(c,f){try{return c[f]}catch{}};r.exports=function(c){var f,d,h;return c===void 0?"Undefined":c===null?"Null":typeof(d=u(f=Object(c),s))=="string"?d:l?a(f):(h=a(f))=="Object"&&typeof f.callee=="function"?"Arguments":h}},2621:function(r,o){o.f=Object.getOwnPropertySymbols},"2aba":function(r,o,i){var a=i("7726"),s=i("32e9"),l=i("69a8"),u=i("ca5a")("src"),c=i("fa5b"),f="toString",d=(""+c).split(f);i("8378").inspectSource=function(h){return c.call(h)},(r.exports=function(h,v,m,g){var y=typeof m=="function";y&&(l(m,"name")||s(m,"name",v)),h[v]!==m&&(y&&(l(m,u)||s(m,u,h[v]?""+h[v]:d.join(String(v)))),h===a?h[v]=m:g?h[v]?h[v]=m:s(h,v,m):(delete h[v],s(h,v,m)))})(Function.prototype,f,function(){return typeof this=="function"&&this[u]||c.call(this)})},"2aeb":function(r,o,i){var a=i("cb7c"),s=i("1495"),l=i("e11e"),u=i("613b")("IE_PROTO"),c=function(){},f="prototype",d=function(){var h=i("230e")("iframe"),v=l.length,m="<",g=">",y;for(h.style.display="none",i("fab2").appendChild(h),h.src="javascript:",y=h.contentWindow.document,y.open(),y.write(m+"script"+g+"document.F=Object"+m+"/script"+g),y.close(),d=y.F;v--;)delete d[f][l[v]];return d()};r.exports=Object.create||function(v,m){var g;return v!==null?(c[f]=a(v),g=new c,c[f]=null,g[u]=v):g=d(),m===void 0?g:s(g,m)}},"2b4c":function(r,o,i){var a=i("5537")("wks"),s=i("ca5a"),l=i("7726").Symbol,u=typeof l=="function",c=r.exports=function(f){return a[f]||(a[f]=u&&l[f]||(u?l:s)("Symbol."+f))};c.store=a},"2d00":function(r,o){r.exports=!1},"2d95":function(r,o){var i={}.toString;r.exports=function(a){return i.call(a).slice(8,-1)}},"2fdb":function(r,o,i){var a=i("5ca1"),s=i("d2c8"),l="includes";a(a.P+a.F*i("5147")(l),"String",{includes:function(c){return!!~s(this,c,l).indexOf(c,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(r,o,i){var a=i("86cc"),s=i("4630");r.exports=i("9e1e")?function(l,u,c){return a.f(l,u,s(1,c))}:function(l,u,c){return l[u]=c,l}},"38fd":function(r,o,i){var a=i("69a8"),s=i("4bf8"),l=i("613b")("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(c){return c=s(c),a(c,l)?c[l]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?u:null}},"41a0":function(r,o,i){var a=i("2aeb"),s=i("4630"),l=i("7f20"),u={};i("32e9")(u,i("2b4c")("iterator"),function(){return this}),r.exports=function(c,f,d){c.prototype=a(u,{next:s(1,d)}),l(c,f+" Iterator")}},"456d":function(r,o,i){var a=i("4bf8"),s=i("0d58");i("5eda")("keys",function(){return function(u){return s(a(u))}})},4588:function(r,o){var i=Math.ceil,a=Math.floor;r.exports=function(s){return isNaN(s=+s)?0:(s>0?a:i)(s)}},4630:function(r,o){r.exports=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}}},"4bf8":function(r,o,i){var a=i("be13");r.exports=function(s){return Object(a(s))}},5147:function(r,o,i){var a=i("2b4c")("match");r.exports=function(s){var l=/./;try{"/./"[s](l)}catch{try{return l[a]=!1,!"/./"[s](l)}catch{}}return!0}},"520a":function(r,o,i){var a=i("0bfb"),s=RegExp.prototype.exec,l=String.prototype.replace,u=s,c="lastIndex",f=function(){var v=/a/,m=/b*/g;return s.call(v,"a"),s.call(m,"a"),v[c]!==0||m[c]!==0}(),d=/()??/.exec("")[1]!==void 0,h=f||d;h&&(u=function(m){var g=this,y,b,w,k;return d&&(b=new RegExp("^"+g.source+"$(?!\\s)",a.call(g))),f&&(y=g[c]),w=s.call(g,m),f&&w&&(g[c]=g.global?w.index+w[0].length:y),d&&w&&w.length>1&&l.call(w[0],b,function(){for(k=1;k<arguments.length-2;k++)arguments[k]===void 0&&(w[k]=void 0)}),w}),r.exports=u},"52a7":function(r,o){o.f={}.propertyIsEnumerable},5537:function(r,o,i){var a=i("8378"),s=i("7726"),l="__core-js_shared__",u=s[l]||(s[l]={});(r.exports=function(c,f){return u[c]||(u[c]=f!==void 0?f:{})})("versions",[]).push({version:a.version,mode:i("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(r,o,i){var a=i("7726"),s=i("8378"),l=i("32e9"),u=i("2aba"),c=i("9b43"),f="prototype",d=function(h,v,m){var g=h&d.F,y=h&d.G,b=h&d.S,w=h&d.P,k=h&d.B,C=y?a:b?a[v]||(a[v]={}):(a[v]||{})[f],S=y?s:s[v]||(s[v]={}),B=S[f]||(S[f]={}),O,A,M,E;y&&(m=v);for(O in m)A=!g&&C&&C[O]!==void 0,M=(A?C:m)[O],E=k&&A?c(M,a):w&&typeof M=="function"?c(Function.call,M):M,C&&u(C,O,M,h&d.U),S[O]!=M&&l(S,O,E),w&&B[O]!=M&&(B[O]=M)};a.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,r.exports=d},"5eda":function(r,o,i){var a=i("5ca1"),s=i("8378"),l=i("79e5");r.exports=function(u,c){var f=(s.Object||{})[u]||Object[u],d={};d[u]=c(f),a(a.S+a.F*l(function(){f(1)}),"Object",d)}},"5f1b":function(r,o,i){var a=i("23c6"),s=RegExp.prototype.exec;r.exports=function(l,u){var c=l.exec;if(typeof c=="function"){var f=c.call(l,u);if(typeof f!="object")throw new TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(l)!=="RegExp")throw new TypeError("RegExp#exec called on incompatible receiver");return s.call(l,u)}},"613b":function(r,o,i){var a=i("5537")("keys"),s=i("ca5a");r.exports=function(l){return a[l]||(a[l]=s(l))}},"626a":function(r,o,i){var a=i("2d95");r.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return a(s)=="String"?s.split(""):Object(s)}},6762:function(r,o,i){var a=i("5ca1"),s=i("c366")(!0);a(a.P,"Array",{includes:function(u){return s(this,u,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(r,o,i){var a=i("626a"),s=i("be13");r.exports=function(l){return a(s(l))}},"69a8":function(r,o){var i={}.hasOwnProperty;r.exports=function(a,s){return i.call(a,s)}},"6a99":function(r,o,i){var a=i("d3f4");r.exports=function(s,l){if(!a(s))return s;var u,c;if(l&&typeof(u=s.toString)=="function"&&!a(c=u.call(s))||typeof(u=s.valueOf)=="function"&&!a(c=u.call(s))||!l&&typeof(u=s.toString)=="function"&&!a(c=u.call(s)))return c;throw TypeError("Can't convert object to primitive value")}},7333:function(r,o,i){var a=i("0d58"),s=i("2621"),l=i("52a7"),u=i("4bf8"),c=i("626a"),f=Object.assign;r.exports=!f||i("79e5")(function(){var d={},h={},v=Symbol(),m="abcdefghijklmnopqrst";return d[v]=7,m.split("").forEach(function(g){h[g]=g}),f({},d)[v]!=7||Object.keys(f({},h)).join("")!=m})?function(h,v){for(var m=u(h),g=arguments.length,y=1,b=s.f,w=l.f;g>y;)for(var k=c(arguments[y++]),C=b?a(k).concat(b(k)):a(k),S=C.length,B=0,O;S>B;)w.call(k,O=C[B++])&&(m[O]=k[O]);return m}:f},7726:function(r,o){var i=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},"77f1":function(r,o,i){var a=i("4588"),s=Math.max,l=Math.min;r.exports=function(u,c){return u=a(u),u<0?s(u+c,0):l(u,c)}},"79e5":function(r,o){r.exports=function(i){try{return!!i()}catch{return!0}}},"7f20":function(r,o,i){var a=i("86cc").f,s=i("69a8"),l=i("2b4c")("toStringTag");r.exports=function(u,c,f){u&&!s(u=f?u:u.prototype,l)&&a(u,l,{configurable:!0,value:c})}},8378:function(r,o){var i=r.exports={version:"2.6.5"};typeof __e=="number"&&(__e=i)},"84f2":function(r,o){r.exports={}},"86cc":function(r,o,i){var a=i("cb7c"),s=i("c69a"),l=i("6a99"),u=Object.defineProperty;o.f=i("9e1e")?Object.defineProperty:function(f,d,h){if(a(f),d=l(d,!0),a(h),s)try{return u(f,d,h)}catch{}if("get"in h||"set"in h)throw TypeError("Accessors not supported!");return"value"in h&&(f[d]=h.value),f}},"9b43":function(r,o,i){var a=i("d8e8");r.exports=function(s,l,u){if(a(s),l===void 0)return s;switch(u){case 1:return function(c){return s.call(l,c)};case 2:return function(c,f){return s.call(l,c,f)};case 3:return function(c,f,d){return s.call(l,c,f,d)}}return function(){return s.apply(l,arguments)}}},"9c6c":function(r,o,i){var a=i("2b4c")("unscopables"),s=Array.prototype;s[a]==null&&i("32e9")(s,a,{}),r.exports=function(l){s[a][l]=!0}},"9def":function(r,o,i){var a=i("4588"),s=Math.min;r.exports=function(l){return l>0?s(a(l),9007199254740991):0}},"9e1e":function(r,o,i){r.exports=!i("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},a352:function(r,o){r.exports=n},a481:function(r,o,i){var a=i("cb7c"),s=i("4bf8"),l=i("9def"),u=i("4588"),c=i("0390"),f=i("5f1b"),d=Math.max,h=Math.min,v=Math.floor,m=/\$([$&`']|\d\d?|<[^>]*>)/g,g=/\$([$&`']|\d\d?)/g,y=function(b){return b===void 0?b:String(b)};i("214f")("replace",2,function(b,w,k,C){return[function(O,A){var M=b(this),E=O==null?void 0:O[w];return E!==void 0?E.call(O,M,A):k.call(String(M),O,A)},function(B,O){var A=C(k,B,this,O);if(A.done)return A.value;var M=a(B),E=String(this),T=typeof O=="function";T||(O=String(O));var z=M.global;if(z){var L=M.unicode;M.lastIndex=0}for(var V=[];;){var H=f(M,E);if(H===null||(V.push(H),!z))break;var R=String(H[0]);R===""&&(M.lastIndex=c(E,l(M.lastIndex),L))}for(var I="",j=0,$=0;$<V.length;$++){H=V[$];for(var P=String(H[0]),D=d(h(u(H.index),E.length),0),x=[],_=1;_<H.length;_++)x.push(y(H[_]));var N=H.groups;if(T){var W=[P].concat(x,D,E);N!==void 0&&W.push(N);var J=String(O.apply(void 0,W))}else J=S(P,E,D,x,N,O);D>=j&&(I+=E.slice(j,D)+J,j=D+P.length)}return I+E.slice(j)}];function S(B,O,A,M,E,T){var z=A+B.length,L=M.length,V=g;return E!==void 0&&(E=s(E),V=m),k.call(T,V,function(H,R){var I;switch(R.charAt(0)){case"$":return"$";case"&":return B;case"`":return O.slice(0,A);case"'":return O.slice(z);case"<":I=E[R.slice(1,-1)];break;default:var j=+R;if(j===0)return H;if(j>L){var $=v(j/10);return $===0?H:$<=L?M[$-1]===void 0?R.charAt(1):M[$-1]+R.charAt(1):H}I=M[j-1]}return I===void 0?"":I})}})},aae3:function(r,o,i){var a=i("d3f4"),s=i("2d95"),l=i("2b4c")("match");r.exports=function(u){var c;return a(u)&&((c=u[l])!==void 0?!!c:s(u)=="RegExp")}},ac6a:function(r,o,i){for(var a=i("cadf"),s=i("0d58"),l=i("2aba"),u=i("7726"),c=i("32e9"),f=i("84f2"),d=i("2b4c"),h=d("iterator"),v=d("toStringTag"),m=f.Array,g={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=s(g),b=0;b<y.length;b++){var w=y[b],k=g[w],C=u[w],S=C&&C.prototype,B;if(S&&(S[h]||c(S,h,m),S[v]||c(S,v,w),f[w]=m,k))for(B in a)S[B]||l(S,B,a[B],!0)}},b0c5:function(r,o,i){var a=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:a!==/./.exec},{exec:a})},be13:function(r,o){r.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},c366:function(r,o,i){var a=i("6821"),s=i("9def"),l=i("77f1");r.exports=function(u){return function(c,f,d){var h=a(c),v=s(h.length),m=l(d,v),g;if(u&&f!=f){for(;v>m;)if(g=h[m++],g!=g)return!0}else for(;v>m;m++)if((u||m in h)&&h[m]===f)return u||m||0;return!u&&-1}}},c649:function(r,o,i){(function(a){i.d(o,"c",function(){return h}),i.d(o,"a",function(){return f}),i.d(o,"b",function(){return l}),i.d(o,"d",function(){return d}),i("a481");function s(){return typeof window<"u"?window.console:a.console}var l=s();function u(v){var m=Object.create(null);return function(y){var b=m[y];return b||(m[y]=v(y))}}var c=/-(\w)/g,f=u(function(v){return v.replace(c,function(m,g){return g?g.toUpperCase():""})});function d(v){v.parentElement!==null&&v.parentElement.removeChild(v)}function h(v,m,g){var y=g===0?v.children[0]:v.children[g-1].nextSibling;v.insertBefore(m,y)}}).call(this,i("c8ba"))},c69a:function(r,o,i){r.exports=!i("9e1e")&&!i("79e5")(function(){return Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a!=7})},c8ba:function(r,o){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}r.exports=i},ca5a:function(r,o){var i=0,a=Math.random();r.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++i+a).toString(36))}},cadf:function(r,o,i){var a=i("9c6c"),s=i("d53b"),l=i("84f2"),u=i("6821");r.exports=i("01f9")(Array,"Array",function(c,f){this._t=u(c),this._i=0,this._k=f},function(){var c=this._t,f=this._k,d=this._i++;return!c||d>=c.length?(this._t=void 0,s(1)):f=="keys"?s(0,d):f=="values"?s(0,c[d]):s(0,[d,c[d]])},"values"),l.Arguments=l.Array,a("keys"),a("values"),a("entries")},cb7c:function(r,o,i){var a=i("d3f4");r.exports=function(s){if(!a(s))throw TypeError(s+" is not an object!");return s}},ce10:function(r,o,i){var a=i("69a8"),s=i("6821"),l=i("c366")(!1),u=i("613b")("IE_PROTO");r.exports=function(c,f){var d=s(c),h=0,v=[],m;for(m in d)m!=u&&a(d,m)&&v.push(m);for(;f.length>h;)a(d,m=f[h++])&&(~l(v,m)||v.push(m));return v}},d2c8:function(r,o,i){var a=i("aae3"),s=i("be13");r.exports=function(l,u,c){if(a(u))throw TypeError("String#"+c+" doesn't accept regex!");return String(s(l))}},d3f4:function(r,o){r.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},d53b:function(r,o){r.exports=function(i,a){return{value:a,done:!!i}}},d8e8:function(r,o){r.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},e11e:function(r,o){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(r,o,i){var a=i("5ca1"),s=i("9def"),l=i("d2c8"),u="startsWith",c=""[u];a(a.P+a.F*i("5147")(u),"String",{startsWith:function(d){var h=l(this,d,u),v=s(Math.min(arguments.length>1?arguments[1]:void 0,h.length)),m=String(d);return c?c.call(h,m,v):h.slice(v,v+m.length)===m}})},f6fd:function(r,o){(function(i){var a="currentScript",s=i.getElementsByTagName("script");a in i||Object.defineProperty(i,a,{get:function(){try{throw new Error}catch(c){var l,u=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(c.stack)||[!1])[1];for(l in s)if(s[l].src==u||s[l].readyState=="interactive")return s[l];return null}}})})(document)},f751:function(r,o,i){var a=i("5ca1");a(a.S+a.F,"Object",{assign:i("7333")})},fa5b:function(r,o,i){r.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(r,o,i){var a=i("7726").document;r.exports=a&&a.documentElement},fb15:function(r,o,i){if(i.r(o),typeof window<"u"){i("f6fd");var a;(a=window.document.currentScript)&&(a=a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=a[1])}i("f751"),i("f559"),i("ac6a"),i("cadf"),i("456d");function s(P){if(Array.isArray(P))return P}function l(P,D){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(P)))){var x=[],_=!0,N=!1,W=void 0;try{for(var J=P[Symbol.iterator](),le;!(_=(le=J.next()).done)&&(x.push(le.value),!(D&&x.length===D));_=!0);}catch(ye){N=!0,W=ye}finally{try{!_&&J.return!=null&&J.return()}finally{if(N)throw W}}return x}}function u(P,D){(D==null||D>P.length)&&(D=P.length);for(var x=0,_=new Array(D);x<D;x++)_[x]=P[x];return _}function c(P,D){if(P){if(typeof P=="string")return u(P,D);var x=Object.prototype.toString.call(P).slice(8,-1);if(x==="Object"&&P.constructor&&(x=P.constructor.name),x==="Map"||x==="Set")return Array.from(P);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return u(P,D)}}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
247
247
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(P,D){return s(P)||l(P,D)||c(P,D)||f()}i("6762"),i("2fdb");function h(P){if(Array.isArray(P))return u(P)}function v(P){if(typeof Symbol<"u"&&Symbol.iterator in Object(P))return Array.from(P)}function m(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
248
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(P){return h(P)||v(P)||c(P)||m()}var y=i("a352"),b=i.n(y),w=i("c649");function k(P,D,x){return x===void 0||(P=P||{},P[D]=x),P}function C(P,D){return P.map(function(x){return x.elm}).indexOf(D)}function S(P,D,x,_){if(!P)return[];var N=P.map(function(le){return le.elm}),W=D.length-_,J=g(D).map(function(le,ye){return ye>=W?N.length:N.indexOf(le)});return x?J.filter(function(le){return le!==-1}):J}function B(P,D){var x=this;this.$nextTick(function(){return x.$emit(P.toLowerCase(),D)})}function O(P){var D=this;return function(x){D.realList!==null&&D["onDrag"+P](x),B.call(D,P,x)}}function A(P){return["transition-group","TransitionGroup"].includes(P)}function M(P){if(!P||P.length!==1)return!1;var D=d(P,1),x=D[0].componentOptions;return x?A(x.tag):!1}function E(P,D,x){return P[x]||(D[x]?D[x]():void 0)}function T(P,D,x){var _=0,N=0,W=E(D,x,"header");W&&(_=W.length,P=P?[].concat(g(W),g(P)):g(W));var J=E(D,x,"footer");return J&&(N=J.length,P=P?[].concat(g(P),g(J)):g(J)),{children:P,headerOffset:_,footerOffset:N}}function z(P,D){var x=null,_=function(Te,be){x=k(x,Te,be)},N=Object.keys(P).filter(function(ye){return ye==="id"||ye.startsWith("data-")}).reduce(function(ye,Te){return ye[Te]=P[Te],ye},{});if(_("attrs",N),!D)return x;var W=D.on,J=D.props,le=D.attrs;return _("on",W),_("props",J),Object.assign(x.attrs,le),x}var L=["Start","Add","Remove","Update","End"],V=["Choose","Unchoose","Sort","Filter","Clone"],H=["Move"].concat(L,V).map(function(P){return"on"+P}),R=null,I={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(D){return D}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},j={name:"draggable",inheritAttrs:!1,props:I,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(D){var x=this.$slots.default;this.transitionMode=M(x);var _=T(x,this.$slots,this.$scopedSlots),N=_.children,W=_.headerOffset,J=_.footerOffset;this.headerOffset=W,this.footerOffset=J;var le=z(this.$attrs,this.componentData);return D(this.getTag(),le,N)},created:function(){this.list!==null&&this.value!==null&&w.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&w.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&w.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var D=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var x={};L.forEach(function(W){x["on"+W]=O.call(D,W)}),V.forEach(function(W){x["on"+W]=B.bind(D,W)});var _=Object.keys(this.$attrs).reduce(function(W,J){return W[Object(w.a)(J)]=D.$attrs[J],W},{}),N=Object.assign({},this.options,_,x,{onMove:function(J,le){return D.onDragMove(J,le)}});!("draggable"in N)&&(N.draggable=">*"),this._sortable=new b.a(this.rootContainer,N),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(D){this.updateOptions(D)},deep:!0},$attrs:{handler:function(D){this.updateOptions(D)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var D=this._vnode.fnOptions;return D&&D.functional},getTag:function(){return this.tag||this.element},updateOptions:function(D){for(var x in D){var _=Object(w.a)(x);H.indexOf(_)===-1&&this._sortable.option(_,D[x])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var D=this.$slots.default;return this.transitionMode?D[0].child.$slots.default:D},computeIndexes:function(){var D=this;this.$nextTick(function(){D.visibleIndexes=S(D.getChildrenNodes(),D.rootContainer.children,D.transitionMode,D.footerOffset)})},getUnderlyingVm:function(D){var x=C(this.getChildrenNodes()||[],D);if(x===-1)return null;var _=this.realList[x];return{index:x,element:_}},getUnderlyingPotencialDraggableComponent:function(D){var x=D.__vue__;return!x||!x.$options||!A(x.$options._componentTag)?!("realList"in x)&&x.$children.length===1&&"realList"in x.$children[0]?x.$children[0]:x:x.$parent},emitChanges:function(D){var x=this;this.$nextTick(function(){x.$emit("change",D)})},alterList:function(D){if(this.list){D(this.list);return}var x=g(this.value);D(x),this.$emit("input",x)},spliceList:function(){var D=arguments,x=function(N){return N.splice.apply(N,g(D))};this.alterList(x)},updatePosition:function(D,x){var _=function(W){return W.splice(x,0,W.splice(D,1)[0])};this.alterList(_)},getRelatedContextFromMoveEvent:function(D){var x=D.to,_=D.related,N=this.getUnderlyingPotencialDraggableComponent(x);if(!N)return{component:N};var W=N.realList,J={list:W,component:N};if(x!==_&&W&&N.getUnderlyingVm){var le=N.getUnderlyingVm(_);if(le)return Object.assign(le,J)}return J},getVmIndex:function(D){var x=this.visibleIndexes,_=x.length;return D>_-1?_:x[D]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(D){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var x=this.getChildrenNodes();x[D].data=null;var _=this.getComponent();_.children=[],_.kept=void 0}},onDragStart:function(D){this.context=this.getUnderlyingVm(D.item),D.item._underlying_vm_=this.clone(this.context.element),R=D.item},onDragAdd:function(D){var x=D.item._underlying_vm_;if(x!==void 0){Object(w.d)(D.item);var _=this.getVmIndex(D.newIndex);this.spliceList(_,0,x),this.computeIndexes();var N={element:x,newIndex:_};this.emitChanges({added:N})}},onDragRemove:function(D){if(Object(w.c)(this.rootContainer,D.item,D.oldIndex),D.pullMode==="clone"){Object(w.d)(D.clone);return}var x=this.context.index;this.spliceList(x,1);var _={element:this.context.element,oldIndex:x};this.resetTransitionData(x),this.emitChanges({removed:_})},onDragUpdate:function(D){Object(w.d)(D.item),Object(w.c)(D.from,D.item,D.oldIndex);var x=this.context.index,_=this.getVmIndex(D.newIndex);this.updatePosition(x,_);var N={element:this.context.element,oldIndex:x,newIndex:_};this.emitChanges({moved:N})},updateProperty:function(D,x){D.hasOwnProperty(x)&&(D[x]+=this.headerOffset)},computeFutureIndex:function(D,x){if(!D.element)return 0;var _=g(x.to.children).filter(function(le){return le.style.display!=="none"}),N=_.indexOf(x.related),W=D.component.getVmIndex(N),J=_.indexOf(R)!==-1;return J||!x.willInsertAfter?W:W+1},onDragMove:function(D,x){var _=this.move;if(!_||!this.realList)return!0;var N=this.getRelatedContextFromMoveEvent(D),W=this.context,J=this.computeFutureIndex(N,D);Object.assign(W,{futureIndex:J});var le=Object.assign({},D,{relatedContext:N,draggedContext:W});return _(le,x)},onDragEnd:function(){this.computeIndexes(),R=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",j);var $=j;o.default=$}}).default})})(_H);var a8e=_H.exports;const s8e=vh(a8e),l8e={key:1,class:"text-xl"},u8e={class:"ml-6 block"},c8e=p.defineComponent({__name:"OmzNestedSortable",props:{items:{},itemsKey:{default:"items"},level:{default:0},maxNestingLevel:{default:4},subItemsLabel:{default:"Sub-items"},editableNames:{type:Boolean},disabled:{type:Boolean}},emits:["delete","delete-undo"],setup(t,{emit:e}){return(n,r)=>{const o=p.resolveComponent("omz-nested-sortable",!0);return p.openBlock(),p.createBlock(p.unref(s8e),{class:"min-h-[40px] mx-6 px-2 mb-2",tag:"ul",list:n.items,group:{name:"main"},"item-key":"name",animation:150,handle:".omz-nested-sortable__handle","ghost-class":"bg-blue-100",filter:".static",disabled:n.disabled},{item:p.withCtx(({element:i})=>[p.createElementVNode("div",{class:p.normalizeClass(["border border-gray-400 bg-gray-100 dark:bg-gray-800 mb-2 first:rounded-t last:rounded-b",{"static bg-red-200":i.deleted}])},[p.createElementVNode("span",{class:p.normalizeClass(["omz-nested-sortable__handle cursor-move",{"cursor-not-allowed":i.deleted}])},[p.createVNode(to,{path:p.unref(eJ),size:"20"},null,8,["path"])],2),n.editableNames?(p.openBlock(),p.createBlock(ym,{key:0,"model-value":i.name,type:"text",class:"inline-block","input-classes":"border-none bg-gray-100",small:"",disabled:i.deleted,onChange:a=>i.name=a.target.value},null,8,["model-value","disabled","onChange"])):(p.openBlock(),p.createElementBlock("strong",l8e,p.toDisplayString(i.name),1)),i.deleted?(p.openBlock(),p.createBlock(to,{key:3,path:p.unref(vJ),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete-undo",i)},null,8,["path","onClick"])):(p.openBlock(),p.createBlock(to,{key:2,path:p.unref(jb),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete",i)},null,8,["path","onClick"])),n.level<n.maxNestingLevel?(p.openBlock(),p.createElementBlock(p.Fragment,{key:4},[p.createElementVNode("small",u8e,p.toDisplayString(n.subItemsLabel)+": ",1),p.createVNode(o,{items:i[n.itemsKey],"items-key":n.itemsKey,level:n.level+1,"sub-items-label":n.subItemsLabel,class:"bg-gray-200 dark:bg-gray-600 py-2","editable-names":n.editableNames,disabled:i.deleted,filter:".static",onDelete:r[0]||(r[0]=a=>e("delete",a))},null,8,["items","items-key","level","sub-items-label","editable-names","disabled"])],64)):p.createCommentVNode("",!0)],2)]),_:1},8,["list","disabled"])}}}),f8e={class:"flex flex-col md:flex-row items-center"},d8e={class:"text-center md:text-left"},h8e=p.defineComponent({__name:"OmzNotification",props:{color:{},icon:{default:null},outline:{type:Boolean},allowClosing:{type:Boolean,default:!0},darkMode:{type:Boolean},permanentDismissKey:{default:null}},setup(t){const e=t,n=p.computed(()=>e.outline?R3[e.color]:[kb[e.color],Xa[e.color]]),r=p.ref(!1);e.permanentDismissKey&&localStorage.getItem(e.permanentDismissKey)==="true"&&(r.value=!0);const o=()=>{r.value=!0,e.permanentDismissKey&&localStorage.setItem(e.permanentDismissKey,"true")},i=p.useSlots(),a=p.computed(()=>i.right);return(s,l)=>r.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass([n.value,"px-3 py-6 md:py-3 mb-6 last:mb-0 border rounded transition-colors duration-150"])},[p.createVNode(Sh,{mb:"mb-0"},{default:p.withCtx(()=>[p.createElementVNode("div",f8e,[s.icon?(p.openBlock(),p.createBlock(to,{key:0,path:s.icon,w:"w-10 md:w-5",h:"h-10 md:h-5",size:"24",class:"md:mr-2"},null,8,["path"])):p.createCommentVNode("",!0),p.createElementVNode("span",d8e,[p.renderSlot(s.$slots,"default")])]),a.value?p.renderSlot(s.$slots,"right",{key:0}):s.allowClosing?(p.openBlock(),p.createBlock(Fi,{key:1,icon:p.unref(Cf),outline:s.outline||s.darkMode&&["white","light"].indexOf(s.color)<0,small:"",onClick:o},null,8,["icon","outline"])):p.createCommentVNode("",!0)]),_:3})],2))}}),QH=p.defineComponent({__name:"OmzSortable",props:{tag:{default:"div"},enabled:{type:Boolean,default:!0},handleClass:{default:null},multiple:{type:Boolean}},emits:["orderChanged"],setup(t,{emit:e}){const n=t,r=p.ref(null),o=p.ref(null),i=p.ref(null),a=p.ref(null),s=p.ref([]);let l=!0,u=!0;function c(d,h){const v=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft;window.scrollTo(m+d,v+h),(!u||!l)&&setTimeout(()=>c(d,h),200)}function f(){if(r.value)for(let d=0;d<r.value.children.length;d+=1){const h=r.value.children[d];n.handleClass&&(h.onmousedown=v=>{i.value=v.target,a.value=h==null?void 0:h.querySelector(`.${n.handleClass}`)}),h.draggable=!0,h.ondragstart=v=>{var m;if(r.value&&(!n.handleClass||(m=a.value)!=null&&m.contains(i.value))){o.value=h;for(let g=0;g<r.value.children.length;g+=1){const y=r.value.children[g];y!==r.value&&y.classList.add("hint")}}else v.preventDefault()},h.ondragenter=()=>{h!==o.value&&h.classList.add("active")},h.ondrag=v=>{u=!0,v.clientY<150&&(u=!1,c(0,-1))},h.ondragleave=()=>{h.classList.remove("active")},h.ondragend=()=>{if(r.value)for(const v of Array.from(r.value.children))v.classList.remove("hint"),v.classList.remove("active");u=!0,l=!0},h.ondragover=v=>{v.preventDefault()},h.onclick=v=>{if(v.preventDefault(),n.multiple&&v.shiftKey)if(s.value.includes(h)){const m=s.value.findIndex(g=>g.getAttribute("data-sortable-id")===h.getAttribute("data-sortable-id"));s.value.splice(m,1),h.classList.remove("!bg-blue-300")}else s.value.push(h),h.classList.add("!bg-blue-300")},h.ondrop=v=>{var m,g;if(r.value){if(v.preventDefault(),h!==o.value){let b=0,w=0;for(let k=0;k<r.value.children.length;k+=1)o.value===r.value.children[k]&&(b=k),h===r.value.children[k]&&(w=k);b<w?((m=h.parentNode)==null||m.insertBefore(o.value,h.nextSibling),s.value.length&&(s.value.forEach(k=>{var C;(C=h.parentNode)==null||C.insertBefore(k,h.nextSibling),k.classList.remove("!bg-blue-300")}),s.value=[])):((g=h.parentNode)==null||g.insertBefore(o.value,h),s.value.length&&(s.value.forEach(k=>{var C;(C=h.parentNode)==null||C.insertBefore(k,h),k.classList.remove("!bg-blue-300")}),s.value=[]))}const y=[];for(const b of Array.from(r.value.children))y.push(b.getAttribute("data-sortable-id"));e("orderChanged",y)}}}}return p.onMounted(()=>{if(n.enabled){f();const d=new ResizeObserver(()=>{f()});r.value&&d.observe(r.value)}}),(d,h)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(d.tag),{ref_key:"sortableParent",ref:r},{default:p.withCtx(()=>[p.renderSlot(d.$slots,"default")]),_:3},512))}}),p8e={key:0},v8e={key:1},m8e=p.defineComponent({__name:"OmzTab",props:{title:{},url:{default:null},icon:{default:null},onClick:{type:[Function,null],default:null},disabled:{type:Boolean},hasErrors:{type:Boolean},reloading:{type:Boolean}},setup(t){const e=t,n=p.ref(0),r=p.ref(!1),o=p.inject("TabsProvider");return p.watch(()=>o.selectedIndex,()=>{r.value=n.value===o.selectedIndex}),p.watch(()=>e.hasErrors,()=>{o.hasErrors[n.value]=e.hasErrors}),p.onBeforeMount(()=>{n.value=o.count,o.count++,r.value=n.value===o.selectedIndex}),(i,a)=>i.reloading?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[r.value?(p.openBlock(),p.createElementBlock("div",p8e,[p.renderSlot(i.$slots,"default")])):p.createCommentVNode("",!0)],64)):p.withDirectives((p.openBlock(),p.createElementBlock("div",v8e,[p.renderSlot(i.$slots,"default")],512)),[[p.vShow,r.value]])}}),g8e=p.defineComponent({__name:"OmzExportModal",props:p.mergeModels({title:{},exportUrl:{},locale:{},formats:{default:()=>[]},filesCheckbox:{type:Boolean},dataIds:{default:null},dataFilters:{default:()=>({})}},{modelValue:{type:Boolean}}),emits:p.mergeModels(["exportStarted","exportSuccess"],["update:modelValue"]),setup(t,{emit:e}){const n=t,{trans:r}=Nf(n.locale),o=p.useModel(t,"modelValue"),i=p.ref(!1),a=LK({ids:null,filters:{},format:null,with_files:!1}),s=p.computed(()=>n.formats.map(c=>({label:c,value:c}))),l=p.computed(()=>{var c;if(n.exportUrl){const f=new URL(n.exportUrl);return(c=n.dataIds)!=null&&c.length&&n.dataIds.forEach((d,h)=>f.searchParams.append(`ids[${h}]`,String(d))),Object.keys(n.dataFilters).forEach(d=>{f.searchParams.append(d,n.dataFilters[d])}),f.toString()}return null}),u=()=>{var c;i.value=!0,a.ids=(c=n.dataIds)!=null&&c.length?n.dataIds:null,a.filters=n.dataFilters,a.with_files?a.post(n.exportUrl,{onSuccess:()=>{o.value=!1,a.format=null,a.with_files=!1,e("exportStarted")},onFinish:()=>{i.value=!1}}):l.value?(window.location.href=l.value,e("exportSuccess"),o.value=!1,a.format=null,a.with_files=!1,i.value=!1):console.warn("No export url specified.")};return p.watch(()=>o,()=>{o&&n.formats.length===1&&([a.format]=n.formats)}),(c,f)=>(p.openBlock(),p.createBlock(p.Teleport,{to:"body"},[p.createVNode(qC,{"model-value":o.value,"button-label":p.unref(r)("exportModal.export"),"large-title":c.title,loading:i.value,locale:c.locale,"has-cancel":"",onConfirm:f[2]||(f[2]=d=>u()),onCancel:f[3]||(f[3]=d=>o.value=!1)},{default:p.withCtx(()=>[c.formats.length?(p.openBlock(),p.createBlock(QO,{key:0,label:p.unref(r)("exportModal.format"),required:""},{default:p.withCtx(()=>[p.createVNode(ah,{modelValue:p.unref(a).format,"onUpdate:modelValue":f[0]||(f[0]=d=>p.unref(a).format=d),options:s.value,disabled:c.formats.length===1,locale:c.locale},null,8,["modelValue","options","disabled","locale"])]),_:1},8,["label"])):p.createCommentVNode("",!0),c.filesCheckbox?(p.openBlock(),p.createBlock(q3,{key:1,modelValue:p.unref(a).with_files,"onUpdate:modelValue":f[1]||(f[1]=d=>p.unref(a).with_files=d),label:p.unref(r)("exportModal.withFiles"),name:"with_files",help:p.unref(r)("exportModal.withFilesHelp")},null,8,["modelValue","label","help"])):p.createCommentVNode("",!0)]),_:1},8,["model-value","button-label","large-title","loading","locale"])]))}});function XH(){const t=(n,r,...o)=>{let i=n;for(let a=0;a<o.length;a++)a===o.length-1?i[o[a]]=r:(i[o[a]]||(i[o[a]]={}),i=i[o[a]])};function e(n,r=[],o=!1){const i={};return Object.keys(n).forEach(a=>{var l,u,c,f,d,h;const s=r.find(v=>v.filtering&&v.field===a);n[a]!==void 0&&(s&&((l=s.filtering)!=null&&l.relation)?(o?t(i,s.filtering.field,"filters",a,"field"):i[`filters[${a}][field]`]=s.filtering.field,Array.isArray(n[a])?n[a].forEach((v,m)=>{o?t(i,v,"filters",a,"value",m.toString()):i[`filters[${a}][value][${m}]`]=v}):o?t(i,n[a],"filters",a,"value"):i[`filters[${a}][value]`]=n[a],o?t(i,s.filtering.relation,"filters",a,"relation"):i[`filters[${a}][relation]`]=s.filtering.relation):(u=s==null?void 0:s.filtering)!=null&&u.type?o?(t(i,s.filtering.field||a,"filters",a,"field"),t(i,n[a],"filters",a,"value"),t(i,s.filtering.type,"filters",a,"type"),(c=s.filtering)!=null&&c.operator&&t(i,s.filtering.operator,"filters",a,"operator")):(i[`filters[${a}][field]`]=s.filtering.field||a,i[`filters[${a}][value]`]=n[a].value??n[a],i[`filters[${a}][type]`]=s.filtering.type,(f=s.filtering)!=null&&f.operator&&(i[`filters[${a}][operator]`]=s.filtering.operator)):o?t(i,n[a],"filters",((d=s==null?void 0:s.filtering)==null?void 0:d.field)||a):i[`filters[${((h=s==null?void 0:s.filtering)==null?void 0:h.field)||a}]`]=n[a])}),i}return{formatFiltersForBackend:e}}const y8e=["innerHTML"],b8e={class:"flex flex-wrap md:flex-nowrap items-stretch border-b border-gray-100 dark:border-gray-700 justify-between"},w8e={class:"bg-opacity-50 p-4 whitespace-nowrap"},k8e={key:0,class:"flex"},x8e={class:"flex items-center whitespace-nowrap"},j8e={class:"flex gap-2 flex-wrap p-4"},S8e={key:0,class:"flex flex-col justify-end"},C8e={class:"relative"},$8e=["placeholder"],O8e={key:0,class:"text-sm font-bold"},E8e={key:5,class:"relative"},_8e=["id","onUpdate:modelValue","type","placeholder"],ZH=p.defineComponent({__name:"OmzTableTopBar",props:{columns:{},locale:{default:"en"},massDelete:{type:Boolean,default:!0},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},checkedRows:{default:()=>[]},checkedAll:{type:Boolean},total:{default:0},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},searchable:{type:Boolean},initialSearchValue:{default:null}},emits:["filtersChange","searchChange","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,o=p.inject(mm),{formatFiltersForBackend:i}=XH(),{trans:a}=Nf(r.locale),s=p.ref(r.initialFilters??{}),l=p.ref(r.initialSearchValue),u=p.ref(!1),c=p.ref(!1),f=p.computed(()=>Object.values(s.value).some(O=>typeof O=="object"?Object.keys(O).length:!!O)||l.value),d=p.computed(()=>r.checkedAll?`${r.total} (${f.value?a("table.filtered"):a("table.all")})`:String(r.checkedRows.length)),h=p.computed(()=>{var O;if(r.exportUrl){const A=i(s.value,r.columns),M=new URL(r.exportUrl);return!r.checkedAll&&((O=r.checkedRows)!=null&&O.length)&&r.checkedRows.forEach((E,T)=>M.searchParams.append(`ids[${T}]`,String(E.id))),Object.keys(A).forEach(E=>{M.searchParams.append(E,A[E])}),M.toString()}return null}),v=p.computed(()=>i({...s.value,...r.initialFilters},r.columns)),m=p.computed(()=>{var O;return r.checkedAll?null:(O=r.checkedRows)==null?void 0:O.map(A=>A.id)}),g=()=>{n("searchChange",l.value)},y=()=>{l.value=null,g()},b=()=>{Object.keys(s.value).forEach(O=>{s.value[O]===null&&(s.value[O]="")}),n("filtersChange",s.value)},w=O=>{s.value[O]="",b()},k=()=>{s.value={},l.value=null,b(),g()},C=O=>{var A,M;return typeof((A=O.filtering)==null?void 0:A.options)=="function"?r.initialFilters[O.field]?async E=>O.filtering.options(E,r.initialFilters[O.field]):async E=>O.filtering.options(E):(M=O==null?void 0:O.filtering)==null?void 0:M.options},S=O=>{var A,M;return typeof((A=O.filtering)==null?void 0:A.tags)=="function"?r.initialFilters[O.field]?async E=>O.filtering.tags(E,r.initialFilters[O.field]):async E=>O.filtering.tags(E):(M=O==null?void 0:O.filtering)==null?void 0:M.tags},B=async()=>{var O,A;if(r.deleteUrl){const M=i(s.value,r.columns,!0);let E;r.checkedAll?E=null:r.deleteKeyMapper?E=(O=r.checkedRows)==null?void 0:O.map(r.deleteKeyMapper):E=(A=r.checkedRows)==null?void 0:A.map(T=>T.id),o==null||o.post(r.deleteUrl,{ids:E,...M},{preserveState:!1,onSuccess:()=>{n("massDeleteSuccess")},onError:()=>{n("massDeleteError")}})}};return e({clearFilters:k}),(O,A)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[O.massDelete?(p.openBlock(),p.createBlock(qC,{key:0,"model-value":u.value,"button-label":p.unref(a)("table.massDeleteButton"),"large-title":p.unref(a)("table.massDeleteTitle"),locale:O.locale,button:"danger","has-cancel":"",onConfirm:A[0]||(A[0]=M=>B()),onCancel:A[1]||(A[1]=M=>u.value=!1)},{default:p.withCtx(()=>[p.createElementVNode("p",{innerHTML:p.unref(a)("table.massDeleteMessage",{selectedRowsText:d.value})},null,8,y8e)]),_:1},8,["model-value","button-label","large-title","locale"])):p.createCommentVNode("",!0),O.exportUrl?(p.openBlock(),p.createBlock(g8e,{key:1,modelValue:c.value,"onUpdate:modelValue":A[2]||(A[2]=M=>c.value=M),locale:O.locale,title:O.exportLabel||p.unref(a)("exportModal.export"),formats:O.exportFormats,"export-url":O.exportUrl,"data-ids":m.value,"data-filters":v.value,"files-checkbox":O.exportFilesOption,onExportStarted:A[3]||(A[3]=M=>n("exportStarted")),onExportSuccess:A[4]||(A[4]=M=>n("exportSuccess"))},null,8,["modelValue","locale","title","formats","export-url","data-ids","data-filters","files-checkbox"])):p.createCommentVNode("",!0),p.createElementVNode("div",b8e,[p.createElementVNode("div",w8e,[O.checkedRows.length||O.checkedAll?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[O.hideCheckedRowsCount?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[p.createTextVNode(p.toDisplayString(p.unref(a)("table.selectedRows"))+" ",1),p.createElementVNode("b",null,p.toDisplayString(d.value),1)],64)),O.$slots.massActions||O.massDelete?(p.openBlock(),p.createBlock(GO,{key:1},{content:p.withCtx(({toggle:M})=>[p.createVNode(Fi,{class:"ml-2",color:"omniazDarkBlue",icon:p.unref(V3),small:"",onClick:M},null,8,["icon","onClick"])]),dropdown:p.withCtx(()=>{var M;return[p.renderSlot(O.$slots,"massActions"),h.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[O.exportFilesOption||(M=O.exportFormats)!=null&&M.length?(p.openBlock(),p.createBlock(Tm,{key:0,icon:p.unref(z3),onClick:A[5]||(A[5]=E=>c.value=!0)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.exportLabel||p.unref(a)("table.export")),1)]),_:1},8,["icon"])):(p.openBlock(),p.createBlock(Tm,{key:1,href:h.value,icon:p.unref(z3)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.exportLabel||p.unref(a)("table.export")),1)]),_:1},8,["href","icon"]))],64)):p.createCommentVNode("",!0),O.massDelete?(p.openBlock(),p.createBlock(Tm,{key:1,icon:p.unref(jb),onClick:A[6]||(A[6]=E=>u.value=!0)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(p.unref(a)("table.massDeleteButton")),1)]),_:1},8,["icon"])):p.createCommentVNode("",!0)]}),_:3})):p.createCommentVNode("",!0)],64)):p.createCommentVNode("",!0)]),O.columns.some(M=>M.filtering)||O.searchable?(p.openBlock(),p.createElementBlock("div",k8e,[p.createElementVNode("div",x8e,p.toDisplayString(p.unref(a)("table.filterBy")),1),p.createElementVNode("div",j8e,[O.searchable?(p.openBlock(),p.createElementBlock("div",S8e,[p.createElementVNode("span",C8e,[p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":A[7]||(A[7]=M=>l.value=M),class:"omz-input--small",placeholder:p.unref(a)("table.search"),onInput:A[8]||(A[8]=M=>g())},null,40,$8e),[[p.vModelText,l.value]]),p.withDirectives(p.createVNode(to,{class:"absolute top-1.5 cursor-pointer right-1",path:p.unref(Cf),size:"20",onClick:A[9]||(A[9]=M=>y())},null,8,["path"]),[[p.vShow,l.value]])])])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(O.columns.filter(M=>{var E;return(E=M.filtering)==null?void 0:E.enabled}),M=>{var E,T,z,L,V,H,R,I,j,$;return p.openBlock(),p.createElementBlock("div",{key:M.header,class:"flex flex-col justify-end"},[(E=M==null?void 0:M.filtering)!=null&&E.label?(p.openBlock(),p.createElementBlock("div",O8e,p.toDisplayString(M.filtering.label),1)):p.createCommentVNode("",!0),(T=M==null?void 0:M.filtering)!=null&&T.options&&typeof M.filtering.options=="function"?(p.openBlock(),p.createBlock(ah,{key:1,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:C(M),placeholder:M.filtering.label?void 0:M.header,mode:M.filtering.multiple?"multiple":"single","min-chars":3,"resolve-on-load":!!O.initialFilters[M.field]&&!(typeof O.initialFilters[M.field]=="object"&&!Object.keys(O.initialFilters[M.field]).length),delay:0,searchable:"",class:p.normalizeClass(["px-0 max-w-[400px]",[M.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:A[10]||(A[10]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","resolve-on-load","class"])):(z=M==null?void 0:M.filtering)!=null&&z.options?(p.openBlock(),p.createBlock(ah,{key:2,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:(L=M==null?void 0:M.filtering)==null?void 0:L.options,placeholder:M.filtering.label?void 0:M.header,mode:M.filtering.multiple?"multiple":"single",searchable:"",class:p.normalizeClass(["px-0 max-w-[400px]",[M.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:A[11]||(A[11]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","class"])):(V=M==null?void 0:M.filtering)!=null&&V.tags&&typeof M.filtering.tags=="function"?(p.openBlock(),p.createBlock(ah,{key:3,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:S(M),placeholder:M.filtering.label?void 0:M.header,mode:"tags","min-chars":3,"resolve-on-load":!!O.initialFilters[M.field]&&!(typeof O.initialFilters[M.field]=="object"&&!Object.keys(O.initialFilters[M.field]).length),delay:0,searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:A[12]||(A[12]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","resolve-on-load"])):(H=M==null?void 0:M.filtering)!=null&&H.tags?(p.openBlock(),p.createBlock(ah,{key:4,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:(R=M==null?void 0:M.filtering)==null?void 0:R.tags,placeholder:M.filtering.label?void 0:M.header,mode:"tags",searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:A[13]||(A[13]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder"])):(p.openBlock(),p.createElementBlock("span",E8e,[p.withDirectives(p.createElementVNode("input",{id:`${M.field}_filter`,"onUpdate:modelValue":P=>s.value[M.field]=P,type:((I=M.filtering)==null?void 0:I.type)||"text",class:"omz-input--small",placeholder:(j=M.filtering)!=null&&j.label?void 0:M.header,onInput:A[14]||(A[14]=P=>b())},null,40,_8e),[[p.vModelDynamic,s.value[M.field]]]),p.withDirectives(p.createVNode(to,{class:p.normalizeClass(["absolute top-1.5 cursor-pointer",[(($=M.filtering)==null?void 0:$.type)==="date"?"right-7":"right-1"]]),path:p.unref(Cf),size:"20",onClick:P=>w(M.field)},null,8,["class","path","onClick"]),[[p.vShow,s.value[M.field]]])]))])}),128)),f.value?(p.openBlock(),p.createBlock(Fi,{key:1,color:"warning",label:p.unref(a)("table.clearFilters"),small:"",onClick:A[15]||(A[15]=M=>k())},null,8,["label"])):p.createCommentVNode("",!0)]),p.renderSlot(O.$slots,"default")])):p.createCommentVNode("",!0)])],64))}}),M8e={class:"bg-white dark:bg-gray-900"},T8e={key:0},A8e={key:1},P8e=["disabled"],D8e=p.createElementVNode("span",{class:"check"},null,-1),N8e=["onClick"],B8e={key:2},I8e=["data-sortable-id","onClick"],R8e={key:0,class:"cursor-move handle text-center"},L8e=["data-label"],V8e=["title"],z8e={key:1},F8e={key:5},U8e=["title"],H8e={key:2,class:"actions-cell"},W8e={key:3},q8e={key:0},Y8e=["colspan"],K8e={class:"omz-table__overlay"},J8e=[p.createElementVNode("div",{class:"omz-table__loader"},[p.createElementVNode("div"),p.createElementVNode("div"),p.createElementVNode("div")],-1)],G8e={key:0,class:"p-4 text-center"},Q8e={key:1,class:"p-3 lg:px-6 border-t dark:border-gray-800 border-gray-100"},X8e={class:"justify-self-start"},Z8e=[p.createElementVNode("option",{value:"10"}," 10 ",-1),p.createElementVNode("option",{value:"20"}," 20 ",-1),p.createElementVNode("option",{value:"50"}," 50 ",-1),p.createElementVNode("option",{value:"100"}," 100 ",-1)],e6e="lg:!bg-blue-100 lg:hover:!bg-blue-200 dark:lg:!bg-blue-800 dark:lg:hover:!bg-blue-700",t6e=p.defineComponent({__name:"OmzTable",props:{locale:{default:"en"},darkMode:{type:Boolean},checkable:{type:Boolean},data:{default:()=>[]},ajaxUrl:{default:null},ajaxParams:{default:()=>({})},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},columns:{},options:{default:()=>({pagination:!0,frontendPagination:!1})},refreshButton:{type:Boolean,default:!0},selectableRows:{type:Boolean},maxSelectedRows:{default:null},selectAllButton:{type:Boolean},massDelete:{type:Boolean,default:!0},shouldClearState:{type:Boolean},scrollable:{type:Boolean},sortable:{type:Boolean},multiSortable:{type:Boolean},rowClickCallback:{type:[Function,null],default:null},rowClickRoute:{type:[Function,null],default:null},rowClickTarget:{default:"self"},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},overflowVisible:{type:Boolean},saveState:{default:null},expanded:{type:Boolean},disableCheckAll:{type:Boolean},searchable:{type:Boolean},rowKeyMapper:{type:[Function,null],default:null}},emits:["rowsSelected","orderChanged","filtersChanged","ajaxError","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,{formatFiltersForBackend:o}=XH(),i=p.inject(mm),a=p.inject(gm)??wb,{trans:s}=Nf(r.locale),l=p.useSlots(),u=parseInt(localStorage.getItem(`${r.ajaxUrl}_perPage`)||"10",10),c=p.ref(u),f=p.ref(0),d=p.ref(null),h=p.ref(null),v=p.ref("desc"),m=p.ref([]),g=p.ref(!1),y=p.ref(null),b=p.ref(!1);let w=null;const k=p.ref(r.initialFilters?{...r.initialFilters}:{}),C=p.ref(null),S=p.ref(null),B=p.ref(null),O=p.computed(()=>o({...k.value,...r.initialFilters},r.columns??[])),A=p.computed(()=>{let ae=(r.columns??[]).filter(K=>!K.hidden).length;return r.refreshButton&&(ae+=1),r.checkable&&(ae+=1),ae}),M=p.computed(()=>Object.values(k.value).some(ae=>!!ae)),E=p.computed(()=>{var ae,K;return(ae=r.data)!=null&&ae.length?r.data:((K=y.value)==null?void 0:K.data)??y.value??[]}),T=p.computed(()=>{var K,$e;let ae=E.value;return M.value&&((K=r.data)!=null&&K.length)&&Object.entries(k.value).forEach(([Fe,me])=>{ae=ae.filter(Y=>typeof Y[Fe]=="string"?Y[Fe].toLowerCase().includes(me.toLowerCase()):Y[Fe].includes(me))}),($e=r.options)!=null&&$e.frontendPagination&&(ae=E.value.slice(c.value*f.value,c.value*(f.value+1))),!r.ajaxUrl&&d.value&&ae.sort((Fe,me)=>Fe[String(d.value)]<me[String(d.value)]?v.value==="asc"?-1:1:Fe[String(d.value)]>me[String(d.value)]?v.value==="asc"?1:-1:0),ae}),z=p.computed(()=>{var ae,K;return r.ajaxUrl&&y.value?(ae=r.options)!=null&&ae.frontendPagination?Math.ceil(E.value.length/c.value):y.value.last_page??y.value.meta.last_page:(K=r.data)!=null&&K.length?Math.ceil(r.data.length/c.value):0}),L=p.computed(()=>{var ae,K,$e;return r.ajaxUrl&&y.value&&((ae=r.options)==null?void 0:ae.pagination)!==!1?y.value.total??((K=y.value.meta)==null?void 0:K.total)??y.value.length:($e=r.data)!=null&&$e.length?r.data.length:T.value.length}),V=p.computed(()=>f.value+1),H=p.computed(()=>s("table.displaying",{from:f.value*c.value+1,to:Math.min((f.value+1)*c.value,L.value),total:L.value})),R=p.computed(()=>s("table.showPage",{current:V.value,total:z.value})),I=async()=>{var $e,Fe,me;const ae=new URLSearchParams({page:String(f.value+1),orderByScope:h.value??"",orderBy:d.value||"created_at",perPage:($e=r.options)!=null&&$e.pagination&&!((Fe=r.options)!=null&&Fe.frontendPagination)?String(c.value):"999999",orderDir:v.value,search:C.value??"",...O.value,...r.ajaxParams});b.value=!0;let K;w&&w.abort();try{w=new AbortController;const Y=await om.get(`${r.ajaxUrl}?${ae}`,{signal:w.signal});w=null,K=Y.data,b.value=!1}catch(Y){!(Y instanceof q$)&&Y instanceof vq&&((me=Y.response)==null?void 0:me.status)!==401&&n("ajaxError"),K={data:[],meta:{current_page:0,first_page_url:"",from:0,last_page:0,last_page_url:"",next_page_url:"",path:"",per_page:0,prev_page_url:null,to:0,total:0}},Y instanceof q$||(b.value=!1,w=null)}return K},j=async()=>{r.ajaxUrl&&(y.value=await I())},$=()=>{if(r.saveState){const ae={filters:k.value,page:f.value,search:C.value};sessionStorage.setItem(r.saveState,JSON.stringify(ae))}};if(r.saveState){const ae=sessionStorage.getItem(r.saveState);ae&&(B.value=JSON.parse(ae),k.value=B.value.filters,f.value=B.value.page,C.value=B.value.search??null)}j(),p.watch(()=>r.shouldClearState,(ae,K)=>{var $e;ae!==K&&ae&&(m.value=[],g.value=!1,k.value={},h.value=null,d.value=null,v.value="desc",($e=S.value)==null||$e.clearFilters(),r.ajaxUrl&&j())}),p.watch(()=>r.ajaxUrl,async()=>{await j()}),p.watch(f,async()=>{var ae;(ae=r.options)!=null&&ae.frontendPagination||await j(),$()});const P=(ae,K)=>{const $e=[];return ae.forEach(Fe=>{K(Fe)||$e.push(Fe)}),$e},D=(ae,K)=>{var $e;g.value?n("rowsSelected",($e=r.options)!=null&&$e.frontendPagination?E.value:null):(ae?m.value.includes(K)||m.value.push(K):m.value=P(m.value,Fe=>Fe.id===K.id),n("rowsSelected",m.value))},x=ae=>{if(r.selectableRows){const K=m.value.findIndex($e=>$e.id===ae.id);K!==-1?m.value.splice(K,1):r.maxSelectedRows?r.maxSelectedRows===1?m.value=[ae]:m.value.length<r.maxSelectedRows&&m.value.push(ae):m.value.push(ae),n("rowsSelected",m.value)}else if(r.rowClickRoute){const K=r.rowClickRoute(ae);K&&(r.rowClickTarget==="blank"?window.open(K,"_blank"):i==null||i.visit(K))}r.rowClickCallback&&r.rowClickCallback(ae)},_=Gte(()=>{r.ajaxUrl&&(f.value=0,j())},500),N=ae=>{var K;ae.ordering&&(d.value=ae.field,h.value=ae.orderByScope??null,v.value=v.value==="asc"?"desc":"asc",r.ajaxUrl&&!((K=r.options)!=null&&K.frontendPagination)&&j())},W=()=>{var ae;localStorage.setItem(`${r.ajaxUrl}_perPage`,String(c.value)),(ae=r.options)!=null&&ae.frontendPagination||j()},J=ae=>{n("orderChanged",ae)},le=ae=>{k.value=ae,_(),$(),n("filtersChanged",k.value)},ye=ae=>{C.value=ae,_(),$()},Te=()=>k.value,be=()=>g.value?null:m.value;return p.watch(g,ae=>{ae||(m.value=[])}),e({reloadAjax:j,getFilters:Te,getCheckedRows:be}),(ae,K)=>{var $e,Fe;return p.openBlock(),p.createElementBlock(p.Fragment,null,[ae.columns.some(me=>me.filtering)||ae.massDelete&&ae.deleteUrl?(p.openBlock(),p.createBlock(ZH,{key:0,ref_key:"tableTopBarComponent",ref:S,locale:ae.locale,"delete-url":ae.deleteUrl,"delete-key-mapper":ae.deleteKeyMapper,"export-url":ae.exportUrl,"export-label":ae.exportLabel,"export-files-option":ae.exportFilesOption,"export-formats":ae.exportFormats,columns:ae.columns,total:L.value,"checked-rows":m.value,"checked-all":g.value,"mass-delete":ae.massDelete,"initial-filters":k.value,"hide-checked-rows-count":ae.hideCheckedRowsCount,searchable:ae.searchable,"initial-search-value":C.value,onFiltersChange:le,onSearchChange:ye,onMassDeleteSuccess:K[0]||(K[0]=me=>n("massDeleteSuccess")),onMassDeleteError:K[1]||(K[1]=me=>n("massDeleteError")),onExportStarted:K[2]||(K[2]=me=>n("exportStarted")),onExportSuccess:K[3]||(K[3]=me=>n("exportSuccess"))},p.createSlots({_:2},[ae.$slots.massActions?{name:"massActions",fn:p.withCtx(()=>[p.renderSlot(ae.$slots,"massActions")]),key:"0"}:void 0]),1032,["locale","delete-url","delete-key-mapper","export-url","export-label","export-files-option","export-formats","columns","total","checked-rows","checked-all","mass-delete","initial-filters","hide-checked-rows-count","searchable","initial-search-value"])):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps(ae.$attrs,{class:["omz-table",{"omz-table--scrollable":ae.scrollable,"!overflow-visible":ae.overflowVisible}]}),[p.createElementVNode("table",null,[p.createElementVNode("thead",null,[p.createElementVNode("tr",M8e,[ae.sortable?(p.openBlock(),p.createElementBlock("th",T8e)):p.createCommentVNode("",!0),ae.checkable?(p.openBlock(),p.createElementBlock("th",A8e,[ae.disableCheckAll?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass(["checkbox align-middle",{"omz-disabled":T.value.length===0}])},[p.withDirectives(p.createElementVNode("input",{id:"check_all","onUpdate:modelValue":K[4]||(K[4]=me=>g.value=me),type:"checkbox",disabled:T.value.length===0},null,8,P8e),[[p.vModelCheckbox,g.value]]),D8e],2))])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(ae.columns.filter(me=>!me.hidden),me=>(p.openBlock(),p.createElementBlock("th",{key:me.header},[p.renderSlot(ae.$slots,"header",{column:me},()=>[p.createElementVNode("span",{class:p.normalizeClass({"cursor-pointer":me==null?void 0:me.ordering}),onClick:Y=>N(me)},[p.createTextVNode(p.toDisplayString(me.header)+" ",1),me!=null&&me.ordering&&d.value===me.field?(p.openBlock(),p.createBlock(to,{key:0,class:"align-bottom",path:v.value==="asc"?p.unref(nJ):p.unref(tJ)},null,8,["path"])):p.createCommentVNode("",!0)],10,N8e)])]))),128)),(ae.$slots.actionsCell||ae.ajaxUrl)&&ae.refreshButton?(p.openBlock(),p.createElementBlock("th",B8e,[ae.ajaxUrl?(p.openBlock(),p.createBlock(Fi,{key:0,color:"infoSky",class:"float-right",icon:p.unref(pJ),small:"",onClick:K[5]||(K[5]=me=>j())},null,8,["icon"])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)])]),p.createVNode(p.Transition,{name:"fade"},{default:p.withCtx(()=>[p.withDirectives(p.createVNode(QH,{tag:"tbody",enabled:ae.sortable,multiple:ae.multiSortable,"handle-class":"handle",onOrderChanged:J},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(T.value,(me,Y)=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:ae.rowKeyMapper?ae.rowKeyMapper(me):me.id},[p.createElementVNode("tr",{class:p.normalizeClass(["lg:hover:bg-gray-100 odd:lg:bg-gray-50",ae.selectableRows||ae.rowClickRoute||ae.rowClickCallback?"cursor-pointer":"",m.value.some(X=>X.id===me.id)||g.value?e6e:"","group"]),"data-sortable-id":ae.sortable?me.id:null,onClick:X=>x(me)},[ae.sortable?(p.openBlock(),p.createElementBlock("td",R8e,[p.createVNode(to,{path:p.unref(uJ)},null,8,["path"])])):p.createCommentVNode("",!0),ae.checkable?(p.openBlock(),p.createBlock(W3,{key:1,id:`checkbox_${me.id}`,"is-checked":g.value||m.value.some(X=>X.id===me.id),disabled:g.value,onChecked:X=>D(X,me),onClick:K[6]||(K[6]=p.withModifiers(()=>{},["stop"]))},null,8,["id","is-checked","disabled","onChecked"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(ae.columns.filter(X=>!X.hidden),X=>(p.openBlock(),p.createElementBlock("td",{key:X.field,"data-label":X.header},[p.unref(l).cell?p.renderSlot(ae.$slots,"cell",{key:0,row:me,index:Y,column:X}):p.renderSlot(ae.$slots,X.field,{key:1,row:me,index:Y,column:X},()=>[X.format?(p.openBlock(),p.createElementBlock("span",{key:0,class:"omz-table__value",title:X.format(me)},p.toDisplayString(X.format(me)),9,V8e)):X.render?(p.openBlock(),p.createElementBlock("span",z8e,p.toDisplayString(X.render(me)),1)):X.component?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(X.component(me)),{key:2})):X.link&&X.link(me)?(p.openBlock(),p.createBlock(p.unref(a),{key:3,href:X.link(me)??"",class:"hover:underline text-blue-600 hover:text-blue-800 truncate-200",onClick:K[7]||(K[7]=p.withModifiers(()=>{},["stop"]))},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(X.linkLabel&&X.linkLabel(me)),1)]),_:2},1032,["href"])):Array.isArray(me[X.field])&&X.key?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:4},p.renderList(me[X.field],ke=>(p.openBlock(),p.createBlock(Cb,{key:ke.id,text:ke[X.key],type:"info",small:""},null,8,["text"]))),128)):Array.isArray(me[X.field])&&me[X.field].length===0?(p.openBlock(),p.createElementBlock("span",F8e)):(p.openBlock(),p.createElementBlock("span",{key:6,class:p.normalizeClass({"omz-table__value break-all":A.value>3}),title:me[X.field]},p.toDisplayString(me[X.field]),11,U8e))])],8,L8e))),128)),ae.$slots.actionsCell?(p.openBlock(),p.createElementBlock("td",H8e,[p.renderSlot(ae.$slots,"actionsCell",{row:me,index:Y})])):ae.refreshButton?(p.openBlock(),p.createElementBlock("td",W8e)):p.createCommentVNode("",!0)],10,I8e),ae.$slots.expandContent&&(ae.expanded||m.value.some(X=>X.id===me.id))?(p.openBlock(),p.createElementBlock("tr",q8e,[p.createElementVNode("td",{colspan:A.value,class:"bg-blue-100"},[p.createElementVNode("div",null,[p.renderSlot(ae.$slots,"expandContent",{row:me,index:Y})])],8,Y8e)])):p.createCommentVNode("",!0)],64))),128))]),_:3},8,["enabled","multiple"]),[[p.vShow,!b.value]])]),_:3})]),p.createVNode(p.Transition,{name:"fade"},{default:p.withCtx(()=>[p.withDirectives(p.createElementVNode("div",K8e,J8e,512),[[p.vShow,b.value]])]),_:1}),L.value===0?(p.openBlock(),p.createElementBlock("div",G8e,p.toDisplayString(b.value?p.unref(s)("table.loading"):p.unref(s)("table.noData")),1)):p.createCommentVNode("",!0),($e=r.options)!=null&&$e.pagination||(Fe=r.options)!=null&&Fe.frontendPagination?(p.openBlock(),p.createElementBlock("div",Q8e,[p.createVNode(Sh,null,{default:p.withCtx(()=>[p.createElementVNode("div",X8e,[p.createElementVNode("small",null,p.toDisplayString(p.unref(s)("table.perPage")),1),p.withDirectives(p.createElementVNode("select",{id:"per_page_select","onUpdate:modelValue":K[8]||(K[8]=me=>c.value=me),class:"text-sm mx-1 px-3 py-1 focus:ring focus:outline-none border-gray-700 rounded w-20 dark:placeholder-gray-400 h-8 border bg-white dark:bg-gray-800",onChange:K[9]||(K[9]=me=>W())},Z8e,544),[[p.vModelSelect,c.value]]),p.createElementVNode("small",null,p.toDisplayString(H.value),1)]),p.createVNode(xb,{class:"justify-self-end"},{default:p.withCtx(()=>[p.createVNode(Fi,{color:"white",icon:p.unref(fJ),outline:ae.darkMode,small:"",disabled:f.value===0,onClick:K[10]||(K[10]=me=>f.value=0)},null,8,["icon","outline","disabled"]),p.createVNode(Fi,{color:"white",icon:p.unref(oJ),outline:ae.darkMode,small:"",disabled:f.value===0,onClick:K[11]||(K[11]=me=>f.value--)},null,8,["icon","outline","disabled"]),p.createElementVNode("small",null,p.toDisplayString(R.value),1),p.createVNode(Fi,{color:"white",icon:p.unref(iJ),outline:ae.darkMode,small:"",disabled:f.value+1===z.value,onClick:K[12]||(K[12]=me=>f.value++)},null,8,["icon","outline","disabled"]),p.createVNode(Fi,{color:"white",icon:p.unref(dJ),outline:ae.darkMode,small:"",disabled:f.value+1===z.value,onClick:K[13]||(K[13]=me=>f.value=z.value-1)},null,8,["icon","outline","disabled"])]),_:1})]),_:1})])):p.createCommentVNode("",!0)],16)],64)}}}),H6e="",n6e=["onClick"],r6e="inline-block py-2 px-4 text-red-600 rounded-t-lg border-b-2 border-red-600 active dark:text-red-500 dark:border-red-500",o6e="inline-block py-2 px-4 text-gray-400 rounded-t-lg !cursor-not-allowed dark:text-gray-500",i6e=p.defineComponent({__name:"OmzTabs",props:{defaultTab:{default:0},headerClasses:{default:null},vertical:{type:Boolean},noContent:{type:Boolean}},setup(t){const e=t,n=p.useSlots(),r=p.inject(mm),o=p.computed(()=>e.vertical?"block p-4 rounded-t-lg border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 w-full justify-center":"inline-block py-2 px-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"),i=p.computed(()=>e.vertical?"block p-4 text-black bg-slate-200 dark:bg-white/10 active dark:text-white dark:border-omniaz-dark w-full justify-center":"inline-block py-2 px-4 text-omniaz-dark rounded-t-lg border-b-2 border-omniaz-dark active dark:text-white dark:border-white"),a=p.reactive({selectedIndex:e.defaultTab,tabs:[],count:0,hasErrors:[]}),s=p.computed(()=>a.tabs[a.selectedIndex]);p.provide("TabsProvider",a);const l=u=>{var c,f,d,h,v,m,g,y,b;(c=a.tabs[u].props)!=null&&c.disabled||a.selectedIndex!==u&&((h=(d=(f=a.tabs)==null?void 0:f[u])==null?void 0:d.props)!=null&&h.url?r==null||r.visit((v=a.tabs[u].props)==null?void 0:v.url):((y=(g=(m=a.tabs)==null?void 0:m[u])==null?void 0:g.props)!=null&&y["on-click"]&&((b=a.tabs[u].props)==null||b["on-click"]()),a.selectedIndex=u))};return p.watchEffect(()=>{var u,c;if(n.default){const f=n.default();a.tabs=[],((c=(u=f[0])==null?void 0:u.type)==null?void 0:c.__name)!=="OmzTab"?a.tabs=f[0].children:f.forEach(d=>{d.props&&a.tabs.push(d)})}}),p.onMounted(()=>{l(e.defaultTab)}),(u,c)=>{var f,d;return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["flex",[u.vertical?"flex-col sm:flex-row":"flex-col"]])},[p.createElementVNode("div",{class:p.normalizeClass(["text-sm font-medium text-center text-gray-500 dark:text-gray-400 dark:border-gray-700 border-gray-200",[u.vertical?"":"border-b-2",u.headerClasses]])},[p.createElementVNode("ul",{class:p.normalizeClass(["-mb-[2px] sm:flex sm:flex-wrap sm:grid-cols-none",[u.vertical?"flex-col":"flex-row grid grid-cols-2"]])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.tabs,(h,v)=>{var m,g,y,b;return p.openBlock(),p.createElementBlock("li",{key:v,class:p.normalizeClass(["mr-2",[u.vertical?"border-r border-gray-100 dark:border-gray-700":""]])},[p.createElementVNode("a",{class:p.normalizeClass(["cursor-pointer inline-flex items-center h-11 justify-center w-full",v===a.selectedIndex?i.value:(m=h==null?void 0:h.props)!=null&&m.disabled?o6e:a.hasErrors[v]?r6e:o.value]),onClick:w=>l(v)},[(g=h==null?void 0:h.props)!=null&&g.icon?(p.openBlock(),p.createBlock(to,{key:0,path:(y=h==null?void 0:h.props)==null?void 0:y.icon,size:"20",class:"mr-1"},null,8,["path"])):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString((b=h==null?void 0:h.props)==null?void 0:b.title),1)],10,n6e)],2)}),128))],2)],2),!((d=(f=s.value)==null?void 0:f.props)!=null&&d.url)&&!u.noContent?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["rounded-lg",[u.vertical?"px-4 flex-grow":"py-4"]]),role:"tabpanel"},[p.renderSlot(u.$slots,"default")],2)):p.createCommentVNode("",!0)],2)}}}),a6e={install:(t,e)=>{t.provide(mm,e.inertiaRouter),t.provide(gm,e.inertiaLinkComponent)}};Mt.OmzAvatar=WK,Mt.OmzButton=Fi,Mt.OmzButtons=xb,Mt.OmzCard=Sb,Mt.OmzCardWidget=_J,Mt.OmzCheckRadioPicker=q3,Mt.OmzCheckboxCell=W3,Mt.OmzCodeSnippet=LJ,Mt.OmzColorPicker=qJ,Mt.OmzControl=ym,Mt.OmzControlIcon=Y3,Mt.OmzDatepicker=_ee,Mt.OmzDivider=JO,Mt.OmzDropdown=GO,Mt.OmzDropdownItem=Tm,Mt.OmzField=QO,Mt.OmzFileInput=mne,Mt.OmzGrowingNumber=U3,Mt.OmzIcon=to,Mt.OmzJsonEditor=T_e,Mt.OmzLevel=Sh,Mt.OmzLoader=B_e,Mt.OmzModal=qC,Mt.OmzMultiselect=ah,Mt.OmzNavBarItem=$5e,Mt.OmzNestedSortable=c8e,Mt.OmzNotification=h8e,Mt.OmzOverlay=EH,Mt.OmzPill=Cb,Mt.OmzSortable=QH,Mt.OmzTab=m8e,Mt.OmzTable=t6e,Mt.OmzTableTopBar=ZH,Mt.OmzTabs=i6e,Mt.OmzTooltip=mw,Mt.OmzTrendPill=H3,Mt.omniazComponentsPlugin=a6e,Object.defineProperty(Mt,Symbol.toStringTag,{value:"Module"})});
248
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(P){return h(P)||v(P)||c(P)||m()}var y=i("a352"),b=i.n(y),w=i("c649");function k(P,D,x){return x===void 0||(P=P||{},P[D]=x),P}function C(P,D){return P.map(function(x){return x.elm}).indexOf(D)}function S(P,D,x,_){if(!P)return[];var N=P.map(function(le){return le.elm}),W=D.length-_,J=g(D).map(function(le,ye){return ye>=W?N.length:N.indexOf(le)});return x?J.filter(function(le){return le!==-1}):J}function B(P,D){var x=this;this.$nextTick(function(){return x.$emit(P.toLowerCase(),D)})}function O(P){var D=this;return function(x){D.realList!==null&&D["onDrag"+P](x),B.call(D,P,x)}}function A(P){return["transition-group","TransitionGroup"].includes(P)}function M(P){if(!P||P.length!==1)return!1;var D=d(P,1),x=D[0].componentOptions;return x?A(x.tag):!1}function E(P,D,x){return P[x]||(D[x]?D[x]():void 0)}function T(P,D,x){var _=0,N=0,W=E(D,x,"header");W&&(_=W.length,P=P?[].concat(g(W),g(P)):g(W));var J=E(D,x,"footer");return J&&(N=J.length,P=P?[].concat(g(P),g(J)):g(J)),{children:P,headerOffset:_,footerOffset:N}}function z(P,D){var x=null,_=function(Te,be){x=k(x,Te,be)},N=Object.keys(P).filter(function(ye){return ye==="id"||ye.startsWith("data-")}).reduce(function(ye,Te){return ye[Te]=P[Te],ye},{});if(_("attrs",N),!D)return x;var W=D.on,J=D.props,le=D.attrs;return _("on",W),_("props",J),Object.assign(x.attrs,le),x}var L=["Start","Add","Remove","Update","End"],V=["Choose","Unchoose","Sort","Filter","Clone"],H=["Move"].concat(L,V).map(function(P){return"on"+P}),R=null,I={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(D){return D}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},j={name:"draggable",inheritAttrs:!1,props:I,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(D){var x=this.$slots.default;this.transitionMode=M(x);var _=T(x,this.$slots,this.$scopedSlots),N=_.children,W=_.headerOffset,J=_.footerOffset;this.headerOffset=W,this.footerOffset=J;var le=z(this.$attrs,this.componentData);return D(this.getTag(),le,N)},created:function(){this.list!==null&&this.value!==null&&w.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&w.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&w.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var D=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var x={};L.forEach(function(W){x["on"+W]=O.call(D,W)}),V.forEach(function(W){x["on"+W]=B.bind(D,W)});var _=Object.keys(this.$attrs).reduce(function(W,J){return W[Object(w.a)(J)]=D.$attrs[J],W},{}),N=Object.assign({},this.options,_,x,{onMove:function(J,le){return D.onDragMove(J,le)}});!("draggable"in N)&&(N.draggable=">*"),this._sortable=new b.a(this.rootContainer,N),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(D){this.updateOptions(D)},deep:!0},$attrs:{handler:function(D){this.updateOptions(D)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var D=this._vnode.fnOptions;return D&&D.functional},getTag:function(){return this.tag||this.element},updateOptions:function(D){for(var x in D){var _=Object(w.a)(x);H.indexOf(_)===-1&&this._sortable.option(_,D[x])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var D=this.$slots.default;return this.transitionMode?D[0].child.$slots.default:D},computeIndexes:function(){var D=this;this.$nextTick(function(){D.visibleIndexes=S(D.getChildrenNodes(),D.rootContainer.children,D.transitionMode,D.footerOffset)})},getUnderlyingVm:function(D){var x=C(this.getChildrenNodes()||[],D);if(x===-1)return null;var _=this.realList[x];return{index:x,element:_}},getUnderlyingPotencialDraggableComponent:function(D){var x=D.__vue__;return!x||!x.$options||!A(x.$options._componentTag)?!("realList"in x)&&x.$children.length===1&&"realList"in x.$children[0]?x.$children[0]:x:x.$parent},emitChanges:function(D){var x=this;this.$nextTick(function(){x.$emit("change",D)})},alterList:function(D){if(this.list){D(this.list);return}var x=g(this.value);D(x),this.$emit("input",x)},spliceList:function(){var D=arguments,x=function(N){return N.splice.apply(N,g(D))};this.alterList(x)},updatePosition:function(D,x){var _=function(W){return W.splice(x,0,W.splice(D,1)[0])};this.alterList(_)},getRelatedContextFromMoveEvent:function(D){var x=D.to,_=D.related,N=this.getUnderlyingPotencialDraggableComponent(x);if(!N)return{component:N};var W=N.realList,J={list:W,component:N};if(x!==_&&W&&N.getUnderlyingVm){var le=N.getUnderlyingVm(_);if(le)return Object.assign(le,J)}return J},getVmIndex:function(D){var x=this.visibleIndexes,_=x.length;return D>_-1?_:x[D]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(D){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var x=this.getChildrenNodes();x[D].data=null;var _=this.getComponent();_.children=[],_.kept=void 0}},onDragStart:function(D){this.context=this.getUnderlyingVm(D.item),D.item._underlying_vm_=this.clone(this.context.element),R=D.item},onDragAdd:function(D){var x=D.item._underlying_vm_;if(x!==void 0){Object(w.d)(D.item);var _=this.getVmIndex(D.newIndex);this.spliceList(_,0,x),this.computeIndexes();var N={element:x,newIndex:_};this.emitChanges({added:N})}},onDragRemove:function(D){if(Object(w.c)(this.rootContainer,D.item,D.oldIndex),D.pullMode==="clone"){Object(w.d)(D.clone);return}var x=this.context.index;this.spliceList(x,1);var _={element:this.context.element,oldIndex:x};this.resetTransitionData(x),this.emitChanges({removed:_})},onDragUpdate:function(D){Object(w.d)(D.item),Object(w.c)(D.from,D.item,D.oldIndex);var x=this.context.index,_=this.getVmIndex(D.newIndex);this.updatePosition(x,_);var N={element:this.context.element,oldIndex:x,newIndex:_};this.emitChanges({moved:N})},updateProperty:function(D,x){D.hasOwnProperty(x)&&(D[x]+=this.headerOffset)},computeFutureIndex:function(D,x){if(!D.element)return 0;var _=g(x.to.children).filter(function(le){return le.style.display!=="none"}),N=_.indexOf(x.related),W=D.component.getVmIndex(N),J=_.indexOf(R)!==-1;return J||!x.willInsertAfter?W:W+1},onDragMove:function(D,x){var _=this.move;if(!_||!this.realList)return!0;var N=this.getRelatedContextFromMoveEvent(D),W=this.context,J=this.computeFutureIndex(N,D);Object.assign(W,{futureIndex:J});var le=Object.assign({},D,{relatedContext:N,draggedContext:W});return _(le,x)},onDragEnd:function(){this.computeIndexes(),R=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",j);var $=j;o.default=$}}).default})})(_H);var a8e=_H.exports;const s8e=vh(a8e),l8e={key:1,class:"text-xl"},u8e={class:"ml-6 block"},c8e=p.defineComponent({__name:"OmzNestedSortable",props:{items:{},itemsKey:{default:"items"},level:{default:0},maxNestingLevel:{default:4},subItemsLabel:{default:"Sub-items"},editableNames:{type:Boolean},disabled:{type:Boolean}},emits:["delete","delete-undo"],setup(t,{emit:e}){return(n,r)=>{const o=p.resolveComponent("omz-nested-sortable",!0);return p.openBlock(),p.createBlock(p.unref(s8e),{class:"min-h-[40px] mx-6 px-2 mb-2",tag:"ul",list:n.items,group:{name:"main"},"item-key":"name",animation:150,handle:".omz-nested-sortable__handle","ghost-class":"bg-blue-100",filter:".static",disabled:n.disabled},{item:p.withCtx(({element:i})=>[p.createElementVNode("div",{class:p.normalizeClass(["border border-gray-400 bg-gray-100 dark:bg-gray-800 mb-2 first:rounded-t last:rounded-b",{"static bg-red-200":i.deleted}])},[p.createElementVNode("span",{class:p.normalizeClass(["omz-nested-sortable__handle cursor-move",{"cursor-not-allowed":i.deleted}])},[p.createVNode(to,{path:p.unref(eJ),size:"20"},null,8,["path"])],2),n.editableNames?(p.openBlock(),p.createBlock(ym,{key:0,"model-value":i.name,type:"text",class:"inline-block","input-classes":"border-none bg-gray-100",small:"",disabled:i.deleted,onChange:a=>i.name=a.target.value},null,8,["model-value","disabled","onChange"])):(p.openBlock(),p.createElementBlock("strong",l8e,p.toDisplayString(i.name),1)),i.deleted?(p.openBlock(),p.createBlock(to,{key:3,path:p.unref(vJ),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete-undo",i)},null,8,["path","onClick"])):(p.openBlock(),p.createBlock(to,{key:2,path:p.unref(jb),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete",i)},null,8,["path","onClick"])),n.level<n.maxNestingLevel?(p.openBlock(),p.createElementBlock(p.Fragment,{key:4},[p.createElementVNode("small",u8e,p.toDisplayString(n.subItemsLabel)+": ",1),p.createVNode(o,{items:i[n.itemsKey],"items-key":n.itemsKey,level:n.level+1,"sub-items-label":n.subItemsLabel,class:"bg-gray-200 dark:bg-gray-600 py-2","editable-names":n.editableNames,disabled:i.deleted,filter:".static",onDelete:r[0]||(r[0]=a=>e("delete",a))},null,8,["items","items-key","level","sub-items-label","editable-names","disabled"])],64)):p.createCommentVNode("",!0)],2)]),_:1},8,["list","disabled"])}}}),f8e={class:"flex flex-col md:flex-row items-center"},d8e={class:"text-center md:text-left"},h8e=p.defineComponent({__name:"OmzNotification",props:{color:{},icon:{default:null},outline:{type:Boolean},allowClosing:{type:Boolean,default:!0},darkMode:{type:Boolean},permanentDismissKey:{default:null}},setup(t){const e=t,n=p.computed(()=>e.outline?R3[e.color]:[kb[e.color],Xa[e.color]]),r=p.ref(!1);e.permanentDismissKey&&localStorage.getItem(e.permanentDismissKey)==="true"&&(r.value=!0);const o=()=>{r.value=!0,e.permanentDismissKey&&localStorage.setItem(e.permanentDismissKey,"true")},i=p.useSlots(),a=p.computed(()=>i.right);return(s,l)=>r.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass([n.value,"px-3 py-6 md:py-3 mb-6 last:mb-0 border rounded transition-colors duration-150"])},[p.createVNode(Sh,{mb:"mb-0"},{default:p.withCtx(()=>[p.createElementVNode("div",f8e,[s.icon?(p.openBlock(),p.createBlock(to,{key:0,path:s.icon,w:"w-10 md:w-5",h:"h-10 md:h-5",size:"24",class:"md:mr-2"},null,8,["path"])):p.createCommentVNode("",!0),p.createElementVNode("span",d8e,[p.renderSlot(s.$slots,"default")])]),a.value?p.renderSlot(s.$slots,"right",{key:0}):s.allowClosing?(p.openBlock(),p.createBlock(Fi,{key:1,icon:p.unref(Cf),outline:s.outline||s.darkMode&&["white","light"].indexOf(s.color)<0,small:"",onClick:o},null,8,["icon","outline"])):p.createCommentVNode("",!0)]),_:3})],2))}}),QH=p.defineComponent({__name:"OmzSortable",props:{tag:{default:"div"},enabled:{type:Boolean,default:!0},handleClass:{default:null},multiple:{type:Boolean}},emits:["orderChanged"],setup(t,{emit:e}){const n=t,r=p.ref(null),o=p.ref(null),i=p.ref(null),a=p.ref(null),s=p.ref([]);let l=!0,u=!0;function c(d,h){const v=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft;window.scrollTo(m+d,v+h),(!u||!l)&&setTimeout(()=>c(d,h),200)}function f(){if(r.value)for(let d=0;d<r.value.children.length;d+=1){const h=r.value.children[d];n.handleClass&&(h.onmousedown=v=>{i.value=v.target,a.value=h==null?void 0:h.querySelector(`.${n.handleClass}`)}),h.draggable=!0,h.ondragstart=v=>{var m;if(r.value&&(!n.handleClass||(m=a.value)!=null&&m.contains(i.value))){o.value=h;for(let g=0;g<r.value.children.length;g+=1){const y=r.value.children[g];y!==r.value&&y.classList.add("hint")}}else v.preventDefault()},h.ondragenter=()=>{h!==o.value&&h.classList.add("active")},h.ondrag=v=>{u=!0,v.clientY<150&&(u=!1,c(0,-1))},h.ondragleave=()=>{h.classList.remove("active")},h.ondragend=()=>{if(r.value)for(const v of Array.from(r.value.children))v.classList.remove("hint"),v.classList.remove("active");u=!0,l=!0},h.ondragover=v=>{v.preventDefault()},h.onclick=v=>{if(v.preventDefault(),n.multiple&&v.shiftKey)if(s.value.includes(h)){const m=s.value.findIndex(g=>g.getAttribute("data-sortable-id")===h.getAttribute("data-sortable-id"));s.value.splice(m,1),h.classList.remove("!bg-blue-300")}else s.value.push(h),h.classList.add("!bg-blue-300")},h.ondrop=v=>{var m,g;if(r.value){if(v.preventDefault(),h!==o.value){let b=0,w=0;for(let k=0;k<r.value.children.length;k+=1)o.value===r.value.children[k]&&(b=k),h===r.value.children[k]&&(w=k);b<w?((m=h.parentNode)==null||m.insertBefore(o.value,h.nextSibling),s.value.length&&(s.value.forEach(k=>{var C;(C=h.parentNode)==null||C.insertBefore(k,h.nextSibling),k.classList.remove("!bg-blue-300")}),s.value=[])):((g=h.parentNode)==null||g.insertBefore(o.value,h),s.value.length&&(s.value.forEach(k=>{var C;(C=h.parentNode)==null||C.insertBefore(k,h),k.classList.remove("!bg-blue-300")}),s.value=[]))}const y=[];for(const b of Array.from(r.value.children))y.push(b.getAttribute("data-sortable-id"));e("orderChanged",y)}}}}return p.onMounted(()=>{if(n.enabled){f();const d=new ResizeObserver(()=>{f()});r.value&&d.observe(r.value)}}),(d,h)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(d.tag),{ref_key:"sortableParent",ref:r},{default:p.withCtx(()=>[p.renderSlot(d.$slots,"default")]),_:3},512))}}),p8e={key:0},v8e={key:1},m8e=p.defineComponent({__name:"OmzTab",props:{title:{},url:{default:null},icon:{default:null},onClick:{type:[Function,null],default:null},disabled:{type:Boolean},hasErrors:{type:Boolean},reloading:{type:Boolean}},setup(t){const e=t,n=p.ref(0),r=p.ref(!1),o=p.inject("TabsProvider");return p.watch(()=>o.selectedIndex,()=>{r.value=n.value===o.selectedIndex}),p.watch(()=>e.hasErrors,()=>{o.hasErrors[n.value]=e.hasErrors}),p.onBeforeMount(()=>{n.value=o.count,o.count++,r.value=n.value===o.selectedIndex}),(i,a)=>i.reloading?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[r.value?(p.openBlock(),p.createElementBlock("div",p8e,[p.renderSlot(i.$slots,"default")])):p.createCommentVNode("",!0)],64)):p.withDirectives((p.openBlock(),p.createElementBlock("div",v8e,[p.renderSlot(i.$slots,"default")],512)),[[p.vShow,r.value]])}}),g8e=p.defineComponent({__name:"OmzExportModal",props:p.mergeModels({title:{},exportUrl:{},locale:{},formats:{default:()=>[]},filesCheckbox:{type:Boolean},dataIds:{default:null},dataFilters:{default:()=>({})}},{modelValue:{type:Boolean}}),emits:p.mergeModels(["exportStarted","exportSuccess"],["update:modelValue"]),setup(t,{emit:e}){const n=t,{trans:r}=Nf(n.locale),o=p.useModel(t,"modelValue"),i=p.ref(!1),a=LK({ids:null,filters:{},format:null,with_files:!1}),s=p.computed(()=>n.formats.map(c=>({label:c,value:c}))),l=p.computed(()=>{var c;if(n.exportUrl){const f=new URL(n.exportUrl);return(c=n.dataIds)!=null&&c.length&&n.dataIds.forEach((d,h)=>f.searchParams.append(`ids[${h}]`,String(d))),Object.keys(n.dataFilters).forEach(d=>{f.searchParams.append(d,n.dataFilters[d])}),f.toString()}return null}),u=()=>{var c;i.value=!0,a.ids=(c=n.dataIds)!=null&&c.length?n.dataIds:null,a.filters=n.dataFilters,a.with_files?a.post(n.exportUrl,{onSuccess:()=>{o.value=!1,a.format=null,a.with_files=!1,e("exportStarted")},onFinish:()=>{i.value=!1}}):l.value?(window.location.href=l.value,e("exportSuccess"),o.value=!1,a.format=null,a.with_files=!1,i.value=!1):console.warn("No export url specified.")};return p.watch(()=>o,()=>{o&&n.formats.length===1&&([a.format]=n.formats)}),(c,f)=>(p.openBlock(),p.createBlock(p.Teleport,{to:"body"},[p.createVNode(qC,{"model-value":o.value,"button-label":p.unref(r)("exportModal.export"),"large-title":c.title,loading:i.value,locale:c.locale,"has-cancel":"",onConfirm:f[2]||(f[2]=d=>u()),onCancel:f[3]||(f[3]=d=>o.value=!1)},{default:p.withCtx(()=>[c.formats.length?(p.openBlock(),p.createBlock(QO,{key:0,label:p.unref(r)("exportModal.format"),required:""},{default:p.withCtx(()=>[p.createVNode(ah,{modelValue:p.unref(a).format,"onUpdate:modelValue":f[0]||(f[0]=d=>p.unref(a).format=d),options:s.value,disabled:c.formats.length===1,locale:c.locale},null,8,["modelValue","options","disabled","locale"])]),_:1},8,["label"])):p.createCommentVNode("",!0),c.filesCheckbox?(p.openBlock(),p.createBlock(q3,{key:1,modelValue:p.unref(a).with_files,"onUpdate:modelValue":f[1]||(f[1]=d=>p.unref(a).with_files=d),label:p.unref(r)("exportModal.withFiles"),name:"with_files",help:p.unref(r)("exportModal.withFilesHelp")},null,8,["modelValue","label","help"])):p.createCommentVNode("",!0)]),_:1},8,["model-value","button-label","large-title","loading","locale"])]))}});function XH(){const t=(n,r,...o)=>{let i=n;for(let a=0;a<o.length;a++)a===o.length-1?i[o[a]]=r:(i[o[a]]||(i[o[a]]={}),i=i[o[a]])};function e(n,r=[],o=!1){const i={};return Object.keys(n).forEach(a=>{var l,u,c,f,d,h;const s=r.find(v=>v.filtering&&v.field===a);n[a]!==void 0&&(s&&((l=s.filtering)!=null&&l.relation)?(o?t(i,s.filtering.field,"filters",a,"field"):i[`filters[${a}][field]`]=s.filtering.field,Array.isArray(n[a])?n[a].forEach((v,m)=>{o?t(i,v,"filters",a,"value",m.toString()):i[`filters[${a}][value][${m}]`]=v}):o?t(i,n[a],"filters",a,"value"):i[`filters[${a}][value]`]=n[a],o?t(i,s.filtering.relation,"filters",a,"relation"):i[`filters[${a}][relation]`]=s.filtering.relation):(u=s==null?void 0:s.filtering)!=null&&u.type?o?(t(i,s.filtering.field||a,"filters",a,"field"),t(i,n[a],"filters",a,"value"),t(i,s.filtering.type,"filters",a,"type"),(c=s.filtering)!=null&&c.operator&&t(i,s.filtering.operator,"filters",a,"operator")):(i[`filters[${a}][field]`]=s.filtering.field||a,i[`filters[${a}][value]`]=n[a].value??n[a],i[`filters[${a}][type]`]=s.filtering.type,(f=s.filtering)!=null&&f.operator&&(i[`filters[${a}][operator]`]=s.filtering.operator)):o?t(i,n[a],"filters",((d=s==null?void 0:s.filtering)==null?void 0:d.field)||a):i[`filters[${((h=s==null?void 0:s.filtering)==null?void 0:h.field)||a}]`]=n[a])}),i}return{formatFiltersForBackend:e}}const y8e=["innerHTML"],b8e={class:"flex flex-wrap md:flex-nowrap items-stretch border-b border-gray-100 dark:border-gray-700 justify-between"},w8e={class:"bg-opacity-50 p-4 whitespace-nowrap"},k8e={key:0,class:"flex"},x8e={class:"flex items-center whitespace-nowrap"},j8e={class:"flex gap-2 flex-wrap p-4"},S8e={key:0,class:"flex flex-col justify-end"},C8e={class:"relative"},$8e=["placeholder"],O8e={key:0,class:"text-sm font-bold"},E8e={key:5,class:"relative"},_8e=["id","onUpdate:modelValue","type","placeholder"],ZH=p.defineComponent({__name:"OmzTableTopBar",props:{columns:{},locale:{default:"en"},massDelete:{type:Boolean,default:!0},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},checkedRows:{default:()=>[]},checkedAll:{type:Boolean},total:{default:0},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},searchable:{type:Boolean},initialSearchValue:{default:null}},emits:["filtersChange","searchChange","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,o=p.inject(mm),{formatFiltersForBackend:i}=XH(),{trans:a}=Nf(r.locale),s=p.ref(r.initialFilters??{}),l=p.ref(r.initialSearchValue),u=p.ref(!1),c=p.ref(!1),f=p.computed(()=>Object.values(s.value).some(O=>typeof O=="object"?Object.keys(O).length:!!O)||l.value),d=p.computed(()=>r.checkedAll?`${r.total} (${f.value?a("table.filtered"):a("table.all")})`:String(r.checkedRows.length)),h=p.computed(()=>{var O;if(r.exportUrl){const A=i(s.value,r.columns),M=new URL(r.exportUrl);return!r.checkedAll&&((O=r.checkedRows)!=null&&O.length)&&r.checkedRows.forEach((E,T)=>M.searchParams.append(`ids[${T}]`,String(E.id))),Object.keys(A).forEach(E=>{M.searchParams.append(E,A[E])}),M.toString()}return null}),v=p.computed(()=>i({...s.value,...r.initialFilters},r.columns)),m=p.computed(()=>{var O;return r.checkedAll?null:(O=r.checkedRows)==null?void 0:O.map(A=>A.id)}),g=()=>{n("searchChange",l.value)},y=()=>{l.value=null,g()},b=()=>{Object.keys(s.value).forEach(O=>{s.value[O]===null&&(s.value[O]="")}),n("filtersChange",s.value)},w=O=>{s.value[O]="",b()},k=()=>{s.value={},l.value=null,b(),g()},C=O=>{var A,M;return typeof((A=O.filtering)==null?void 0:A.options)=="function"?r.initialFilters[O.field]?async E=>O.filtering.options(E,r.initialFilters[O.field]):async E=>O.filtering.options(E):(M=O==null?void 0:O.filtering)==null?void 0:M.options},S=O=>{var A,M;return typeof((A=O.filtering)==null?void 0:A.tags)=="function"?r.initialFilters[O.field]?async E=>O.filtering.tags(E,r.initialFilters[O.field]):async E=>O.filtering.tags(E):(M=O==null?void 0:O.filtering)==null?void 0:M.tags},B=async()=>{var O,A;if(r.deleteUrl){const M=i(s.value,r.columns,!0);let E;r.checkedAll?E=null:r.deleteKeyMapper?E=(O=r.checkedRows)==null?void 0:O.map(r.deleteKeyMapper):E=(A=r.checkedRows)==null?void 0:A.map(T=>T.id),o==null||o.post(r.deleteUrl,{ids:E,...M},{preserveState:!1,onSuccess:()=>{n("massDeleteSuccess")},onError:()=>{n("massDeleteError")}})}};return e({clearFilters:k}),(O,A)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[O.massDelete?(p.openBlock(),p.createBlock(qC,{key:0,"model-value":u.value,"button-label":p.unref(a)("table.massDeleteButton"),"large-title":p.unref(a)("table.massDeleteTitle"),locale:O.locale,button:"danger","has-cancel":"",onConfirm:A[0]||(A[0]=M=>B()),onCancel:A[1]||(A[1]=M=>u.value=!1)},{default:p.withCtx(()=>[p.createElementVNode("p",{innerHTML:p.unref(a)("table.massDeleteMessage",{selectedRowsText:d.value})},null,8,y8e)]),_:1},8,["model-value","button-label","large-title","locale"])):p.createCommentVNode("",!0),O.exportUrl?(p.openBlock(),p.createBlock(g8e,{key:1,modelValue:c.value,"onUpdate:modelValue":A[2]||(A[2]=M=>c.value=M),locale:O.locale,title:O.exportLabel||p.unref(a)("exportModal.export"),formats:O.exportFormats,"export-url":O.exportUrl,"data-ids":m.value,"data-filters":v.value,"files-checkbox":O.exportFilesOption,onExportStarted:A[3]||(A[3]=M=>n("exportStarted")),onExportSuccess:A[4]||(A[4]=M=>n("exportSuccess"))},null,8,["modelValue","locale","title","formats","export-url","data-ids","data-filters","files-checkbox"])):p.createCommentVNode("",!0),p.createElementVNode("div",b8e,[p.createElementVNode("div",w8e,[O.checkedRows.length||O.checkedAll?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[O.hideCheckedRowsCount?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[p.createTextVNode(p.toDisplayString(p.unref(a)("table.selectedRows"))+" ",1),p.createElementVNode("b",null,p.toDisplayString(d.value),1)],64)),O.$slots.massActions||O.massDelete?(p.openBlock(),p.createBlock(GO,{key:1},{content:p.withCtx(({toggle:M})=>[p.createVNode(Fi,{class:"ml-2",color:"omniazDarkBlue",icon:p.unref(V3),small:"",onClick:M},null,8,["icon","onClick"])]),dropdown:p.withCtx(()=>{var M;return[p.renderSlot(O.$slots,"massActions"),h.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[O.exportFilesOption||(M=O.exportFormats)!=null&&M.length?(p.openBlock(),p.createBlock(Tm,{key:0,icon:p.unref(z3),onClick:A[5]||(A[5]=E=>c.value=!0)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.exportLabel||p.unref(a)("table.export")),1)]),_:1},8,["icon"])):(p.openBlock(),p.createBlock(Tm,{key:1,href:h.value,icon:p.unref(z3)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.exportLabel||p.unref(a)("table.export")),1)]),_:1},8,["href","icon"]))],64)):p.createCommentVNode("",!0),O.massDelete?(p.openBlock(),p.createBlock(Tm,{key:1,icon:p.unref(jb),onClick:A[6]||(A[6]=E=>u.value=!0)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(p.unref(a)("table.massDeleteButton")),1)]),_:1},8,["icon"])):p.createCommentVNode("",!0)]}),_:3})):p.createCommentVNode("",!0)],64)):p.createCommentVNode("",!0)]),O.columns.some(M=>M.filtering)||O.searchable?(p.openBlock(),p.createElementBlock("div",k8e,[p.createElementVNode("div",x8e,p.toDisplayString(p.unref(a)("table.filterBy")),1),p.createElementVNode("div",j8e,[O.searchable?(p.openBlock(),p.createElementBlock("div",S8e,[p.createElementVNode("span",C8e,[p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":A[7]||(A[7]=M=>l.value=M),class:"omz-input--small",placeholder:p.unref(a)("table.search"),onInput:A[8]||(A[8]=M=>g())},null,40,$8e),[[p.vModelText,l.value]]),p.withDirectives(p.createVNode(to,{class:"absolute top-1.5 cursor-pointer right-1",path:p.unref(Cf),size:"20",onClick:A[9]||(A[9]=M=>y())},null,8,["path"]),[[p.vShow,l.value]])])])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(O.columns.filter(M=>{var E;return(E=M.filtering)==null?void 0:E.enabled}),M=>{var E,T,z,L,V,H,R,I,j,$;return p.openBlock(),p.createElementBlock("div",{key:M.header,class:"flex flex-col justify-end"},[(E=M==null?void 0:M.filtering)!=null&&E.label?(p.openBlock(),p.createElementBlock("div",O8e,p.toDisplayString(M.filtering.label),1)):p.createCommentVNode("",!0),(T=M==null?void 0:M.filtering)!=null&&T.options&&typeof M.filtering.options=="function"?(p.openBlock(),p.createBlock(ah,{key:1,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:C(M),placeholder:M.filtering.label?void 0:M.header,mode:M.filtering.multiple?"multiple":"single","min-chars":3,"resolve-on-load":!!O.initialFilters[M.field]&&!(typeof O.initialFilters[M.field]=="object"&&!Object.keys(O.initialFilters[M.field]).length),delay:0,searchable:"",class:p.normalizeClass(["px-0 max-w-[400px]",[M.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:A[10]||(A[10]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","resolve-on-load","class"])):(z=M==null?void 0:M.filtering)!=null&&z.options?(p.openBlock(),p.createBlock(ah,{key:2,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:(L=M==null?void 0:M.filtering)==null?void 0:L.options,placeholder:M.filtering.label?void 0:M.header,mode:M.filtering.multiple?"multiple":"single",searchable:"",class:p.normalizeClass(["px-0 max-w-[400px]",[M.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:A[11]||(A[11]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","class"])):(V=M==null?void 0:M.filtering)!=null&&V.tags&&typeof M.filtering.tags=="function"?(p.openBlock(),p.createBlock(ah,{key:3,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:S(M),placeholder:M.filtering.label?void 0:M.header,mode:"tags","min-chars":3,"resolve-on-load":!!O.initialFilters[M.field]&&!(typeof O.initialFilters[M.field]=="object"&&!Object.keys(O.initialFilters[M.field]).length),delay:0,searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:A[12]||(A[12]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","resolve-on-load"])):(H=M==null?void 0:M.filtering)!=null&&H.tags?(p.openBlock(),p.createBlock(ah,{key:4,id:`${M.field}_filter`,modelValue:s.value[M.field],"onUpdate:modelValue":P=>s.value[M.field]=P,options:(R=M==null?void 0:M.filtering)==null?void 0:R.tags,placeholder:M.filtering.label?void 0:M.header,mode:"tags",searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:A[13]||(A[13]=P=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder"])):(p.openBlock(),p.createElementBlock("span",E8e,[p.withDirectives(p.createElementVNode("input",{id:`${M.field}_filter`,"onUpdate:modelValue":P=>s.value[M.field]=P,type:((I=M.filtering)==null?void 0:I.type)||"text",class:"omz-input--small",placeholder:(j=M.filtering)!=null&&j.label?void 0:M.header,onInput:A[14]||(A[14]=P=>b())},null,40,_8e),[[p.vModelDynamic,s.value[M.field]]]),p.withDirectives(p.createVNode(to,{class:p.normalizeClass(["absolute top-1.5 cursor-pointer",[(($=M.filtering)==null?void 0:$.type)==="date"?"right-7":"right-1"]]),path:p.unref(Cf),size:"20",onClick:P=>w(M.field)},null,8,["class","path","onClick"]),[[p.vShow,s.value[M.field]]])]))])}),128)),f.value?(p.openBlock(),p.createBlock(Fi,{key:1,color:"warning",label:p.unref(a)("table.clearFilters"),small:"",onClick:A[15]||(A[15]=M=>k())},null,8,["label"])):p.createCommentVNode("",!0)]),p.renderSlot(O.$slots,"default")])):p.createCommentVNode("",!0)])],64))}}),M8e={class:"bg-white dark:bg-gray-900"},T8e={key:0},A8e={key:1},P8e=["disabled"],D8e=p.createElementVNode("span",{class:"check"},null,-1),N8e=["onClick"],B8e={key:2},I8e=["data-sortable-id","onClick"],R8e={key:0,class:"cursor-move handle text-center"},L8e=["data-label"],V8e=["title"],z8e={key:1},F8e={key:5},U8e=["title"],H8e={key:2,class:"actions-cell"},W8e={key:3},q8e={key:0},Y8e=["colspan"],K8e={class:"omz-table__overlay"},J8e=[p.createElementVNode("div",{class:"omz-table__loader"},[p.createElementVNode("div"),p.createElementVNode("div"),p.createElementVNode("div")],-1)],G8e={key:0,class:"p-4 text-center"},Q8e={key:1,class:"p-3 lg:px-6 border-t dark:border-gray-800 border-gray-100"},X8e={class:"justify-self-start"},Z8e=[p.createElementVNode("option",{value:"10"}," 10 ",-1),p.createElementVNode("option",{value:"20"}," 20 ",-1),p.createElementVNode("option",{value:"50"}," 50 ",-1),p.createElementVNode("option",{value:"100"}," 100 ",-1)],e6e="lg:!bg-blue-100 lg:hover:!bg-blue-200 dark:lg:!bg-blue-800 dark:lg:hover:!bg-blue-700",t6e=p.defineComponent({__name:"OmzTable",props:{locale:{default:"en"},darkMode:{type:Boolean},checkable:{type:Boolean},data:{default:()=>[]},ajaxUrl:{default:null},ajaxParams:{default:()=>({})},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},columns:{},options:{default:()=>({pagination:!0,frontendPagination:!1})},refreshButton:{type:Boolean,default:!0},selectableRows:{type:Boolean},maxSelectedRows:{default:null},selectAllButton:{type:Boolean},massDelete:{type:Boolean,default:!0},shouldClearState:{type:Boolean},scrollable:{type:Boolean},sortable:{type:Boolean},multiSortable:{type:Boolean},rowClickCallback:{type:[Function,null],default:null},rowClickRoute:{type:[Function,null],default:null},rowClickTarget:{default:"self"},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},overflowVisible:{type:Boolean},saveState:{default:null},expanded:{type:Boolean},disableCheckAll:{type:Boolean},searchable:{type:Boolean},rowKeyMapper:{type:[Function,null],default:null}},emits:["rowsSelected","orderChanged","filtersChanged","ajaxError","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,{formatFiltersForBackend:o}=XH(),i=p.inject(mm),a=p.inject(gm)??wb,{trans:s}=Nf(r.locale),l=p.useSlots(),u=parseInt(localStorage.getItem(`${r.ajaxUrl}_perPage`)||"10",10),c=p.ref(u),f=p.ref(0),d=p.ref(null),h=p.ref(null),v=p.ref("desc"),m=p.ref([]),g=p.ref(!1),y=p.ref(null),b=p.ref(!1);let w=null;const k=p.ref(r.initialFilters?{...r.initialFilters}:{}),C=p.ref(null),S=p.ref(null),B=p.ref(null),O=p.computed(()=>o({...k.value,...r.initialFilters},r.columns??[])),A=p.computed(()=>{let ae=(r.columns??[]).filter(K=>!K.hidden).length;return r.refreshButton&&(ae+=1),r.checkable&&(ae+=1),ae}),M=p.computed(()=>Object.values(k.value).some(ae=>!!ae)),E=p.computed(()=>{var ae,K;return(ae=r.data)!=null&&ae.length?r.data:((K=y.value)==null?void 0:K.data)??y.value??[]}),T=p.computed(()=>{var K,$e;let ae=E.value;return M.value&&((K=r.data)!=null&&K.length)&&Object.entries(k.value).forEach(([Fe,me])=>{ae=ae.filter(Y=>typeof Y[Fe]=="string"?Y[Fe].toLowerCase().includes(me.toLowerCase()):Y[Fe].includes(me))}),($e=r.options)!=null&&$e.frontendPagination&&(ae=E.value.slice(c.value*f.value,c.value*(f.value+1))),!r.ajaxUrl&&d.value&&ae.sort((Fe,me)=>Fe[String(d.value)]<me[String(d.value)]?v.value==="asc"?-1:1:Fe[String(d.value)]>me[String(d.value)]?v.value==="asc"?1:-1:0),ae}),z=p.computed(()=>{var ae,K;return r.ajaxUrl&&y.value?(ae=r.options)!=null&&ae.frontendPagination?Math.ceil(E.value.length/c.value):y.value.last_page??y.value.meta.last_page:(K=r.data)!=null&&K.length?Math.ceil(r.data.length/c.value):0}),L=p.computed(()=>{var ae,K,$e;return r.ajaxUrl&&y.value&&((ae=r.options)==null?void 0:ae.pagination)!==!1?y.value.total??((K=y.value.meta)==null?void 0:K.total)??y.value.length:($e=r.data)!=null&&$e.length?r.data.length:T.value.length}),V=p.computed(()=>f.value+1),H=p.computed(()=>s("table.displaying",{from:f.value*c.value+1,to:Math.min((f.value+1)*c.value,L.value),total:L.value})),R=p.computed(()=>s("table.showPage",{current:V.value,total:z.value})),I=async()=>{var $e,Fe,me;const ae=new URLSearchParams({page:String(f.value+1),orderByScope:h.value??"",orderBy:d.value||"created_at",perPage:($e=r.options)!=null&&$e.pagination&&!((Fe=r.options)!=null&&Fe.frontendPagination)?String(c.value):"999999",orderDir:v.value,search:C.value??"",...O.value,...r.ajaxParams});b.value=!0;let K;w&&w.abort();try{w=new AbortController;const Y=await om.get(`${r.ajaxUrl}?${ae}`,{signal:w.signal});w=null,K=Y.data,b.value=!1}catch(Y){!(Y instanceof q$)&&Y instanceof vq&&((me=Y.response)==null?void 0:me.status)!==401&&n("ajaxError"),K={data:[],meta:{current_page:0,first_page_url:"",from:0,last_page:0,last_page_url:"",next_page_url:"",path:"",per_page:0,prev_page_url:null,to:0,total:0}},Y instanceof q$||(b.value=!1,w=null)}return K},j=async()=>{r.ajaxUrl&&(y.value=await I())},$=()=>{if(r.saveState){const ae={filters:k.value,page:f.value,search:C.value};sessionStorage.setItem(r.saveState,JSON.stringify(ae))}};if(r.saveState){const ae=sessionStorage.getItem(r.saveState);ae&&(B.value=JSON.parse(ae),k.value=B.value.filters,f.value=B.value.page,C.value=B.value.search??null)}j(),p.watch(()=>r.shouldClearState,(ae,K)=>{var $e;ae!==K&&ae&&(m.value=[],g.value=!1,k.value={},h.value=null,d.value=null,v.value="desc",($e=S.value)==null||$e.clearFilters(),r.ajaxUrl&&j())}),p.watch(()=>r.ajaxUrl,async()=>{await j()}),p.watch(f,async()=>{var ae;(ae=r.options)!=null&&ae.frontendPagination||await j(),$()});const P=(ae,K)=>{const $e=[];return ae.forEach(Fe=>{K(Fe)||$e.push(Fe)}),$e},D=(ae,K)=>{var $e;g.value?n("rowsSelected",($e=r.options)!=null&&$e.frontendPagination?E.value:null):(ae?m.value.includes(K)||m.value.push(K):m.value=P(m.value,Fe=>Fe.id===K.id),n("rowsSelected",m.value))},x=ae=>{if(r.selectableRows){const K=m.value.findIndex($e=>$e.id===ae.id);K!==-1?m.value.splice(K,1):r.maxSelectedRows?r.maxSelectedRows===1?m.value=[ae]:m.value.length<r.maxSelectedRows&&m.value.push(ae):m.value.push(ae),n("rowsSelected",m.value)}else if(r.rowClickRoute){const K=r.rowClickRoute(ae);K&&(r.rowClickTarget==="blank"?window.open(K,"_blank"):i==null||i.visit(K))}r.rowClickCallback&&r.rowClickCallback(ae)},_=Gte(()=>{r.ajaxUrl&&(f.value=0,j())},500),N=ae=>{var K;ae.ordering&&(d.value=ae.field,h.value=ae.orderByScope??null,v.value=v.value==="asc"?"desc":"asc",r.ajaxUrl&&!((K=r.options)!=null&&K.frontendPagination)&&j())},W=()=>{var ae;localStorage.setItem(`${r.ajaxUrl}_perPage`,String(c.value)),(ae=r.options)!=null&&ae.frontendPagination||j()},J=ae=>{n("orderChanged",ae)},le=ae=>{k.value=ae,_(),$(),n("filtersChanged",k.value)},ye=ae=>{C.value=ae,_(),$()},Te=()=>k.value,be=()=>g.value?null:m.value;return p.watch(g,ae=>{ae||(m.value=[])}),e({reloadAjax:j,getFilters:Te,getCheckedRows:be}),(ae,K)=>{var $e,Fe;return p.openBlock(),p.createElementBlock(p.Fragment,null,[ae.columns.some(me=>me.filtering)||ae.massDelete&&ae.deleteUrl?(p.openBlock(),p.createBlock(ZH,{key:0,ref_key:"tableTopBarComponent",ref:S,locale:ae.locale,"delete-url":ae.deleteUrl,"delete-key-mapper":ae.deleteKeyMapper,"export-url":ae.exportUrl,"export-label":ae.exportLabel,"export-files-option":ae.exportFilesOption,"export-formats":ae.exportFormats,columns:ae.columns,total:L.value,"checked-rows":m.value,"checked-all":g.value,"mass-delete":ae.massDelete,"initial-filters":k.value,"hide-checked-rows-count":ae.hideCheckedRowsCount,searchable:ae.searchable,"initial-search-value":C.value,onFiltersChange:le,onSearchChange:ye,onMassDeleteSuccess:K[0]||(K[0]=me=>n("massDeleteSuccess")),onMassDeleteError:K[1]||(K[1]=me=>n("massDeleteError")),onExportStarted:K[2]||(K[2]=me=>n("exportStarted")),onExportSuccess:K[3]||(K[3]=me=>n("exportSuccess"))},p.createSlots({_:2},[ae.$slots.massActions?{name:"massActions",fn:p.withCtx(()=>[p.renderSlot(ae.$slots,"massActions")]),key:"0"}:void 0]),1032,["locale","delete-url","delete-key-mapper","export-url","export-label","export-files-option","export-formats","columns","total","checked-rows","checked-all","mass-delete","initial-filters","hide-checked-rows-count","searchable","initial-search-value"])):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps(ae.$attrs,{class:["omz-table",{"omz-table--scrollable":ae.scrollable,"!overflow-visible":ae.overflowVisible}]}),[p.createElementVNode("table",null,[p.createElementVNode("thead",null,[p.createElementVNode("tr",M8e,[ae.sortable?(p.openBlock(),p.createElementBlock("th",T8e)):p.createCommentVNode("",!0),ae.checkable?(p.openBlock(),p.createElementBlock("th",A8e,[ae.disableCheckAll?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass(["checkbox align-middle",{"omz-disabled":T.value.length===0}])},[p.withDirectives(p.createElementVNode("input",{id:"check_all","onUpdate:modelValue":K[4]||(K[4]=me=>g.value=me),type:"checkbox",disabled:T.value.length===0},null,8,P8e),[[p.vModelCheckbox,g.value]]),D8e],2))])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(ae.columns.filter(me=>!me.hidden),me=>(p.openBlock(),p.createElementBlock("th",{key:me.header},[p.renderSlot(ae.$slots,"header",{column:me},()=>[p.createElementVNode("span",{class:p.normalizeClass({"cursor-pointer":me==null?void 0:me.ordering}),onClick:Y=>N(me)},[p.createTextVNode(p.toDisplayString(me.header)+" ",1),me!=null&&me.ordering&&d.value===me.field?(p.openBlock(),p.createBlock(to,{key:0,class:"align-bottom",path:v.value==="asc"?p.unref(nJ):p.unref(tJ)},null,8,["path"])):p.createCommentVNode("",!0)],10,N8e)])]))),128)),(ae.$slots.actionsCell||ae.ajaxUrl)&&ae.refreshButton?(p.openBlock(),p.createElementBlock("th",B8e,[ae.ajaxUrl?(p.openBlock(),p.createBlock(Fi,{key:0,color:"infoSky",class:"float-right",icon:p.unref(pJ),small:"",onClick:K[5]||(K[5]=me=>j())},null,8,["icon"])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)])]),p.createVNode(p.Transition,{name:"fade"},{default:p.withCtx(()=>[p.withDirectives(p.createVNode(QH,{tag:"tbody",enabled:ae.sortable,multiple:ae.multiSortable,"handle-class":"handle",onOrderChanged:J},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(T.value,(me,Y)=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:ae.rowKeyMapper?ae.rowKeyMapper(me):me.id},[p.createElementVNode("tr",{class:p.normalizeClass(["lg:hover:bg-gray-100 odd:lg:bg-gray-50 h-[64px]",ae.selectableRows||ae.rowClickRoute||ae.rowClickCallback?"cursor-pointer":"",m.value.some(X=>X.id===me.id)||g.value?e6e:"","group"]),"data-sortable-id":ae.sortable?me.id:null,onClick:X=>x(me)},[ae.sortable?(p.openBlock(),p.createElementBlock("td",R8e,[p.createVNode(to,{path:p.unref(uJ)},null,8,["path"])])):p.createCommentVNode("",!0),ae.checkable?(p.openBlock(),p.createBlock(W3,{key:1,id:`checkbox_${me.id}`,"is-checked":g.value||m.value.some(X=>X.id===me.id),disabled:g.value,onChecked:X=>D(X,me),onClick:K[6]||(K[6]=p.withModifiers(()=>{},["stop"]))},null,8,["id","is-checked","disabled","onChecked"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(ae.columns.filter(X=>!X.hidden),X=>(p.openBlock(),p.createElementBlock("td",{key:X.field,"data-label":X.header},[p.unref(l).cell?p.renderSlot(ae.$slots,"cell",{key:0,row:me,index:Y,column:X}):p.renderSlot(ae.$slots,X.field,{key:1,row:me,index:Y,column:X},()=>[X.format?(p.openBlock(),p.createElementBlock("span",{key:0,class:"omz-table__value",title:X.format(me)},p.toDisplayString(X.format(me)),9,V8e)):X.render?(p.openBlock(),p.createElementBlock("span",z8e,p.toDisplayString(X.render(me)),1)):X.component?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(X.component(me)),{key:2})):X.link&&X.link(me)?(p.openBlock(),p.createBlock(p.unref(a),{key:3,href:X.link(me)??"",class:"hover:underline text-blue-600 hover:text-blue-800 truncate-200",onClick:K[7]||(K[7]=p.withModifiers(()=>{},["stop"]))},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(X.linkLabel&&X.linkLabel(me)),1)]),_:2},1032,["href"])):Array.isArray(me[X.field])&&X.key?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:4},p.renderList(me[X.field],ke=>(p.openBlock(),p.createBlock(Cb,{key:ke.id,text:ke[X.key],type:"info",small:""},null,8,["text"]))),128)):Array.isArray(me[X.field])&&me[X.field].length===0?(p.openBlock(),p.createElementBlock("span",F8e)):(p.openBlock(),p.createElementBlock("span",{key:6,class:p.normalizeClass({"omz-table__value break-all":A.value>3}),title:me[X.field]},p.toDisplayString(me[X.field]),11,U8e))])],8,L8e))),128)),ae.$slots.actionsCell?(p.openBlock(),p.createElementBlock("td",H8e,[p.renderSlot(ae.$slots,"actionsCell",{row:me,index:Y})])):ae.refreshButton?(p.openBlock(),p.createElementBlock("td",W8e)):p.createCommentVNode("",!0)],10,I8e),ae.$slots.expandContent&&(ae.expanded||m.value.some(X=>X.id===me.id))?(p.openBlock(),p.createElementBlock("tr",q8e,[p.createElementVNode("td",{colspan:A.value,class:"bg-blue-100"},[p.createElementVNode("div",null,[p.renderSlot(ae.$slots,"expandContent",{row:me,index:Y})])],8,Y8e)])):p.createCommentVNode("",!0)],64))),128))]),_:3},8,["enabled","multiple"]),[[p.vShow,!b.value]])]),_:3})]),p.createVNode(p.Transition,{name:"fade"},{default:p.withCtx(()=>[p.withDirectives(p.createElementVNode("div",K8e,J8e,512),[[p.vShow,b.value]])]),_:1}),L.value===0?(p.openBlock(),p.createElementBlock("div",G8e,p.toDisplayString(b.value?p.unref(s)("table.loading"):p.unref(s)("table.noData")),1)):p.createCommentVNode("",!0),($e=r.options)!=null&&$e.pagination||(Fe=r.options)!=null&&Fe.frontendPagination?(p.openBlock(),p.createElementBlock("div",Q8e,[p.createVNode(Sh,null,{default:p.withCtx(()=>[p.createElementVNode("div",X8e,[p.createElementVNode("small",null,p.toDisplayString(p.unref(s)("table.perPage")),1),p.withDirectives(p.createElementVNode("select",{id:"per_page_select","onUpdate:modelValue":K[8]||(K[8]=me=>c.value=me),class:"text-sm mx-1 px-3 py-1 focus:ring focus:outline-none border-gray-700 rounded w-20 dark:placeholder-gray-400 h-8 border bg-white dark:bg-gray-800",onChange:K[9]||(K[9]=me=>W())},Z8e,544),[[p.vModelSelect,c.value]]),p.createElementVNode("small",null,p.toDisplayString(H.value),1)]),p.createVNode(xb,{class:"justify-self-end"},{default:p.withCtx(()=>[p.createVNode(Fi,{color:"white",icon:p.unref(fJ),outline:ae.darkMode,small:"",disabled:f.value===0,onClick:K[10]||(K[10]=me=>f.value=0)},null,8,["icon","outline","disabled"]),p.createVNode(Fi,{color:"white",icon:p.unref(oJ),outline:ae.darkMode,small:"",disabled:f.value===0,onClick:K[11]||(K[11]=me=>f.value--)},null,8,["icon","outline","disabled"]),p.createElementVNode("small",null,p.toDisplayString(R.value),1),p.createVNode(Fi,{color:"white",icon:p.unref(iJ),outline:ae.darkMode,small:"",disabled:f.value+1===z.value,onClick:K[12]||(K[12]=me=>f.value++)},null,8,["icon","outline","disabled"]),p.createVNode(Fi,{color:"white",icon:p.unref(dJ),outline:ae.darkMode,small:"",disabled:f.value+1===z.value,onClick:K[13]||(K[13]=me=>f.value=z.value-1)},null,8,["icon","outline","disabled"])]),_:1})]),_:1})])):p.createCommentVNode("",!0)],16)],64)}}}),H6e="",n6e=["onClick"],r6e="inline-block py-2 px-4 text-red-600 rounded-t-lg border-b-2 border-red-600 active dark:text-red-500 dark:border-red-500",o6e="inline-block py-2 px-4 text-gray-400 rounded-t-lg !cursor-not-allowed dark:text-gray-500",i6e=p.defineComponent({__name:"OmzTabs",props:{defaultTab:{default:0},headerClasses:{default:null},vertical:{type:Boolean},noContent:{type:Boolean}},setup(t){const e=t,n=p.useSlots(),r=p.inject(mm),o=p.computed(()=>e.vertical?"block p-4 rounded-t-lg border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 w-full justify-center":"inline-block py-2 px-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"),i=p.computed(()=>e.vertical?"block p-4 text-black bg-slate-200 dark:bg-white/10 active dark:text-white dark:border-omniaz-dark w-full justify-center":"inline-block py-2 px-4 text-omniaz-dark rounded-t-lg border-b-2 border-omniaz-dark active dark:text-white dark:border-white"),a=p.reactive({selectedIndex:e.defaultTab,tabs:[],count:0,hasErrors:[]}),s=p.computed(()=>a.tabs[a.selectedIndex]);p.provide("TabsProvider",a);const l=u=>{var c,f,d,h,v,m,g,y,b;(c=a.tabs[u].props)!=null&&c.disabled||a.selectedIndex!==u&&((h=(d=(f=a.tabs)==null?void 0:f[u])==null?void 0:d.props)!=null&&h.url?r==null||r.visit((v=a.tabs[u].props)==null?void 0:v.url):((y=(g=(m=a.tabs)==null?void 0:m[u])==null?void 0:g.props)!=null&&y["on-click"]&&((b=a.tabs[u].props)==null||b["on-click"]()),a.selectedIndex=u))};return p.watchEffect(()=>{var u,c;if(n.default){const f=n.default();a.tabs=[],((c=(u=f[0])==null?void 0:u.type)==null?void 0:c.__name)!=="OmzTab"?a.tabs=f[0].children:f.forEach(d=>{d.props&&a.tabs.push(d)})}}),p.onMounted(()=>{l(e.defaultTab)}),(u,c)=>{var f,d;return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["flex",[u.vertical?"flex-col sm:flex-row":"flex-col"]])},[p.createElementVNode("div",{class:p.normalizeClass(["text-sm font-medium text-center text-gray-500 dark:text-gray-400 dark:border-gray-700 border-gray-200",[u.vertical?"":"border-b-2",u.headerClasses]])},[p.createElementVNode("ul",{class:p.normalizeClass(["-mb-[2px] sm:flex sm:flex-wrap sm:grid-cols-none",[u.vertical?"flex-col":"flex-row grid grid-cols-2"]])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.tabs,(h,v)=>{var m,g,y,b;return p.openBlock(),p.createElementBlock("li",{key:v,class:p.normalizeClass(["mr-2",[u.vertical?"border-r border-gray-100 dark:border-gray-700":""]])},[p.createElementVNode("a",{class:p.normalizeClass(["cursor-pointer inline-flex items-center h-11 justify-center w-full",v===a.selectedIndex?i.value:(m=h==null?void 0:h.props)!=null&&m.disabled?o6e:a.hasErrors[v]?r6e:o.value]),onClick:w=>l(v)},[(g=h==null?void 0:h.props)!=null&&g.icon?(p.openBlock(),p.createBlock(to,{key:0,path:(y=h==null?void 0:h.props)==null?void 0:y.icon,size:"20",class:"mr-1"},null,8,["path"])):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString((b=h==null?void 0:h.props)==null?void 0:b.title),1)],10,n6e)],2)}),128))],2)],2),!((d=(f=s.value)==null?void 0:f.props)!=null&&d.url)&&!u.noContent?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["rounded-lg",[u.vertical?"px-4 flex-grow":"py-4"]]),role:"tabpanel"},[p.renderSlot(u.$slots,"default")],2)):p.createCommentVNode("",!0)],2)}}}),a6e={install:(t,e)=>{t.provide(mm,e.inertiaRouter),t.provide(gm,e.inertiaLinkComponent)}};Mt.OmzAvatar=WK,Mt.OmzButton=Fi,Mt.OmzButtons=xb,Mt.OmzCard=Sb,Mt.OmzCardWidget=_J,Mt.OmzCheckRadioPicker=q3,Mt.OmzCheckboxCell=W3,Mt.OmzCodeSnippet=LJ,Mt.OmzColorPicker=qJ,Mt.OmzControl=ym,Mt.OmzControlIcon=Y3,Mt.OmzDatepicker=_ee,Mt.OmzDivider=JO,Mt.OmzDropdown=GO,Mt.OmzDropdownItem=Tm,Mt.OmzField=QO,Mt.OmzFileInput=mne,Mt.OmzGrowingNumber=U3,Mt.OmzIcon=to,Mt.OmzJsonEditor=T_e,Mt.OmzLevel=Sh,Mt.OmzLoader=B_e,Mt.OmzModal=qC,Mt.OmzMultiselect=ah,Mt.OmzNavBarItem=$5e,Mt.OmzNestedSortable=c8e,Mt.OmzNotification=h8e,Mt.OmzOverlay=EH,Mt.OmzPill=Cb,Mt.OmzSortable=QH,Mt.OmzTab=m8e,Mt.OmzTable=t6e,Mt.OmzTableTopBar=ZH,Mt.OmzTabs=i6e,Mt.OmzTooltip=mw,Mt.OmzTrendPill=H3,Mt.omniazComponentsPlugin=a6e,Object.defineProperty(Mt,Symbol.toStringTag,{value:"Module"})});
249
249
  //# sourceMappingURL=vue-component-library.umd.js.map